import { createRequire } from 'module';const require = createRequire(import.meta.url);
import {
  CommonModule
} from "./chunk-2WG5QLMT.js";
import {
  ChangeDetectionStrategy,
  Component,
  ContentChild,
  ContentChildren,
  Directive,
  ElementRef,
  EventEmitter,
  Injector,
  NgModule,
  Renderer2,
  ViewContainerRef,
  setClassMetadata,
  ɵɵInheritDefinitionFeature,
  ɵɵcontentQuery,
  ɵɵdefineComponent,
  ɵɵdefineDirective,
  ɵɵdefineInjector,
  ɵɵdefineNgModule,
  ɵɵdirectiveInject,
  ɵɵloadQuery,
  ɵɵqueryRefresh
} from "./chunk-FB6BDKAH.js";
import "./chunk-NQ4HTGF6.js";

// node_modules/tslib/tslib.es6.mjs
function __decorate(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/util.js
var isBlazorPlatform = false;
function createInstance(classFunction, params) {
  var arrayParam = params;
  arrayParam.unshift(void 0);
  return new (Function.prototype.bind.apply(classFunction, arrayParam))();
}
function setImmediate(handler) {
  var unbind;
  var num = new Uint16Array(5);
  var intCrypto = window.msCrypto || window.crypto;
  intCrypto.getRandomValues(num);
  var secret = "ej2" + combineArray(num);
  var messageHandler = function(event2) {
    if (event2.source === window && typeof event2.data === "string" && event2.data.length <= 32 && event2.data === secret) {
      handler();
      unbind();
    }
  };
  window.addEventListener("message", messageHandler, false);
  window.postMessage(secret, "*");
  return unbind = function() {
    window.removeEventListener("message", messageHandler);
    handler = messageHandler = secret = void 0;
  };
}
function getValue(nameSpace, obj) {
  var value = obj;
  var splits = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  for (var i = 0; i < splits.length && !isUndefined(value); i++) {
    value = value[splits[parseInt(i.toString(), 10)]];
  }
  return value;
}
function setValue(nameSpace, value, obj) {
  var keys4 = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  var start = obj || {};
  var fromObj = start;
  var i;
  var length = keys4.length;
  var key;
  for (i = 0; i < length; i++) {
    key = keys4[parseInt(i.toString(), 10)];
    if (i + 1 === length) {
      fromObj["" + key] = value === void 0 ? {} : value;
    } else if (isNullOrUndefined(fromObj["" + key])) {
      fromObj["" + key] = {};
    }
    fromObj = fromObj["" + key];
  }
  return start;
}
function deleteObject(obj, key) {
  delete obj["" + key];
}
var containerObject = typeof window !== "undefined" ? window : {};
function isObject(obj) {
  var objCon = {};
  return !isNullOrUndefined(obj) && obj.constructor === objCon.constructor;
}
function merge(source, destination) {
  if (!isNullOrUndefined(destination)) {
    var temrObj = source;
    var tempProp = destination;
    var keys4 = Object.keys(destination);
    var deepmerge = "deepMerge";
    for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
      var key = keys_1[_i];
      if (!isNullOrUndefined(temrObj["" + deepmerge]) && temrObj["" + deepmerge].indexOf(key) !== -1 && (isObject(tempProp["" + key]) || Array.isArray(tempProp["" + key]))) {
        extend(temrObj["" + key], temrObj["" + key], tempProp["" + key], true);
      } else {
        temrObj["" + key] = tempProp["" + key];
      }
    }
  }
}
function extend(copied, first, second, deep) {
  var result = copied && typeof copied === "object" ? copied : {};
  var length = arguments.length;
  var args = [copied, first, second, deep];
  if (deep) {
    length = length - 1;
  }
  var _loop_1 = function(i2) {
    if (!args[parseInt(i2.toString(), 10)]) {
      return "continue";
    }
    var obj1 = args[parseInt(i2.toString(), 10)];
    Object.keys(obj1).forEach(function(key) {
      var src = result["" + key];
      var copy = obj1["" + key];
      var clone;
      var isArrayChanged = Array.isArray(copy) && Array.isArray(src) && copy.length !== src.length;
      var blazorEventExtend = isBlazor() ? !(src instanceof Event) && !isArrayChanged : true;
      if (deep && blazorEventExtend && (isObject(copy) || Array.isArray(copy))) {
        if (isObject(copy)) {
          clone = src ? src : {};
          if (Array.isArray(clone) && Object.prototype.hasOwnProperty.call(clone, "isComplexArray")) {
            extend(clone, {}, copy, deep);
          } else {
            result["" + key] = extend(clone, {}, copy, deep);
          }
        } else {
          clone = isBlazor() ? src && Object.keys(copy).length : src ? src : [];
          result["" + key] = extend([], clone, copy, clone && clone.length || copy && copy.length);
        }
      } else {
        result["" + key] = copy;
      }
    });
  };
  for (var i = 1; i < length; i++) {
    _loop_1(i);
  }
  return result;
}
function isNullOrUndefined(value) {
  return value === void 0 || value === null;
}
function isUndefined(value) {
  return "undefined" === typeof value;
}
function debounce(eventFunction, delay) {
  var out;
  return function() {
    var _this = this;
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      args[_i] = arguments[_i];
    }
    var later = function() {
      out = null;
      return eventFunction.apply(_this, args);
    };
    clearTimeout(out);
    out = setTimeout(later, delay);
  };
}
function compareElementParent(child, parent) {
  var node = child;
  if (node === parent) {
    return true;
  } else if (node === document || !node) {
    return false;
  } else {
    return compareElementParent(node.parentNode, parent);
  }
}
function throwError(message) {
  try {
    throw new Error(message);
  } catch (e) {
    throw new Error(e.message + "\n" + e.stack);
  }
}
function isBlazor() {
  return isBlazorPlatform;
}
function uniqueID() {
  if (typeof window === "undefined") {
    return;
  }
  var num = new Uint16Array(5);
  var intCrypto = window.msCrypto || window.crypto;
  return intCrypto.getRandomValues(num);
}
function combineArray(num) {
  var ret = "";
  for (var i = 0; i < 5; i++) {
    ret += (i ? "," : "") + num[parseInt(i.toString(), 10)];
  }
  return ret;
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/intl/parser-base.js
var defaultNumberingSystem = {
  "latn": {
    "_digits": "0123456789",
    "_type": "numeric"
  }
};
var defaultNumberSymbols = {
  "decimal": ".",
  "group": ",",
  "percentSign": "%",
  "plusSign": "+",
  "minusSign": "-",
  "infinity": "∞",
  "nan": "NaN",
  "exponential": "E"
};
var latnNumberSystem = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var ParserBase = (
  /** @class */
  function() {
    function ParserBase4() {
    }
    ParserBase4.getMainObject = function(obj, cName) {
      var value = isBlazor() ? cName : "main." + cName;
      return getValue(value, obj);
    };
    ParserBase4.getNumberingSystem = function(obj) {
      return getValue("supplemental.numberingSystems", obj) || this.numberingSystems;
    };
    ParserBase4.reverseObject = function(prop, keys4) {
      var propKeys = keys4 || Object.keys(prop);
      var res = {};
      for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
        var key = propKeys_1[_i];
        if (!Object.prototype.hasOwnProperty.call(res, prop["" + key])) {
          res[prop["" + key]] = key;
        }
      }
      return res;
    };
    ParserBase4.getSymbolRegex = function(props) {
      var regexStr = props.map(function(str) {
        return str.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
      }).join("|");
      var regExp7 = RegExp;
      return new regExp7(regexStr, "g");
    };
    ParserBase4.getSymbolMatch = function(prop) {
      var matchKeys = Object.keys(defaultNumberSymbols);
      var ret = {};
      for (var _i = 0, matchKeys_1 = matchKeys; _i < matchKeys_1.length; _i++) {
        var key = matchKeys_1[_i];
        ret[prop["" + key]] = defaultNumberSymbols["" + key];
      }
      return ret;
    };
    ParserBase4.constructRegex = function(val) {
      var len = val.length;
      var ret = "";
      for (var i = 0; i < len; i++) {
        if (i !== len - 1) {
          ret += val[parseInt(i.toString(), 10)] + "|";
        } else {
          ret += val[parseInt(i.toString(), 10)];
        }
      }
      return ret;
    };
    ParserBase4.convertValueParts = function(value, regex2, obj) {
      return value.replace(regex2, function(str) {
        return obj["" + str];
      });
    };
    ParserBase4.getDefaultNumberingSystem = function(obj) {
      var ret = {};
      ret.obj = getValue("numbers", obj);
      ret.nSystem = getValue("defaultNumberingSystem", ret.obj);
      return ret;
    };
    ParserBase4.getCurrentNumericOptions = function(curObj, numberSystem, needSymbols, blazorMode) {
      var ret = {};
      var cur = this.getDefaultNumberingSystem(curObj);
      if (!isUndefined(cur.nSystem) || blazorMode) {
        var digits = blazorMode ? getValue("obj.mapperDigits", cur) : getValue(cur.nSystem + "._digits", numberSystem);
        if (!isUndefined(digits)) {
          ret.numericPair = this.reverseObject(digits, latnNumberSystem);
          var regExp7 = RegExp;
          ret.numberParseRegex = new regExp7(this.constructRegex(digits), "g");
          ret.numericRegex = "[" + digits[0] + "-" + digits[9] + "]";
          if (needSymbols) {
            ret.numericRegex = digits[0] + "-" + digits[9];
            ret.symbolNumberSystem = getValue(blazorMode ? "numberSymbols" : "symbols-numberSystem-" + cur.nSystem, cur.obj);
            ret.symbolMatch = this.getSymbolMatch(ret.symbolNumberSystem);
            ret.numberSystem = cur.nSystem;
          }
        }
      }
      return ret;
    };
    ParserBase4.getNumberMapper = function(curObj, numberSystem, isNumber) {
      var ret = {
        mapper: {}
      };
      var cur = this.getDefaultNumberingSystem(curObj);
      if (!isUndefined(cur.nSystem)) {
        ret.numberSystem = cur.nSystem;
        ret.numberSymbols = getValue("symbols-numberSystem-" + cur.nSystem, cur.obj);
        ret.timeSeparator = getValue("timeSeparator", ret.numberSymbols);
        var digits = getValue(cur.nSystem + "._digits", numberSystem);
        if (!isUndefined(digits)) {
          for (var _i = 0, latnNumberSystem_1 = latnNumberSystem; _i < latnNumberSystem_1.length; _i++) {
            var i = latnNumberSystem_1[_i];
            ret.mapper[parseInt(i.toString(), 10)] = digits[parseInt(i.toString(), 10)];
          }
        }
      }
      return ret;
    };
    ParserBase4.nPair = "numericPair";
    ParserBase4.nRegex = "numericRegex";
    ParserBase4.numberingSystems = defaultNumberingSystem;
    return ParserBase4;
  }()
);
var blazorCurrencyData = {
  "DJF": "Fdj",
  "ERN": "Nfk",
  "ETB": "Br",
  "NAD": "$",
  "ZAR": "R",
  "XAF": "FCFA",
  "GHS": "GH₵",
  "XDR": "XDR",
  "AED": "د.إ.",
  "BHD": "د.ب.",
  "DZD": "د.ج.",
  "EGP": "ج.م.",
  "ILS": "₪",
  "IQD": "د.ع.",
  "JOD": "د.ا.",
  "KMF": "CF",
  "KWD": "د.ك.",
  "LBP": "ل.ل.",
  "LYD": "د.ل.",
  "MAD": "د.م.",
  "MRU": "أ.م.",
  "OMR": "ر.ع.",
  "QAR": "ر.ق.",
  "SAR": "ر.س.",
  "SDG": "ج.س.",
  "SOS": "S",
  "SSP": "£",
  "SYP": "ل.س.",
  "TND": "د.ت.",
  "YER": "ر.ي.",
  "CLP": "$",
  "INR": "₹",
  "TZS": "TSh",
  "EUR": "€",
  "AZN": "₼",
  "RUB": "₽",
  "BYN": "Br",
  "ZMW": "K",
  "BGN": "лв.",
  "NGN": "₦",
  "XOF": "CFA",
  "BDT": "৳",
  "CNY": "¥",
  "BAM": "КМ",
  "UGX": "USh",
  "USD": "$",
  "CZK": "Kč",
  "GBP": "£",
  "DKK": "kr.",
  "KES": "Ksh",
  "CHF": "CHF",
  "MVR": "ރ.",
  "BTN": "Nu.",
  "XCD": "EC$",
  "AUD": "$",
  "BBD": "$",
  "BIF": "FBu",
  "BMD": "$",
  "BSD": "$",
  "BWP": "P",
  "BZD": "$",
  "CAD": "$",
  "NZD": "$",
  "FJD": "$",
  "FKP": "£",
  "GIP": "£",
  "GMD": "D",
  "GYD": "$",
  "HKD": "$",
  "IDR": "Rp",
  "JMD": "$",
  "KYD": "$",
  "LRD": "$",
  "MGA": "Ar",
  "MOP": "MOP$",
  "MUR": "Rs",
  "MWK": "MK",
  "MYR": "RM",
  "PGK": "K",
  "PHP": "₱",
  "PKR": "Rs",
  "RWF": "RF",
  "SBD": "$",
  "SCR": "SR",
  "SEK": "kr",
  "SGD": "$",
  "SHP": "£",
  "SLL": "Le",
  "ANG": "NAf.",
  "SZL": "E",
  "TOP": "T$",
  "TTD": "$",
  "VUV": "VT",
  "WST": "WS$",
  "ARS": "$",
  "BOB": "Bs",
  "BRL": "R$",
  "COP": "$",
  "CRC": "₡",
  "CUP": "$",
  "DOP": "$",
  "GTQ": "Q",
  "HNL": "L",
  "MXN": "$",
  "NIO": "C$",
  "PAB": "B/.",
  "PEN": "S/",
  "PYG": "₲",
  "UYU": "$",
  "VES": "Bs.S",
  "IRR": "ريال",
  "GNF": "FG",
  "CDF": "FC",
  "HTG": "G",
  "XPF": "FCFP",
  "HRK": "kn",
  "HUF": "Ft",
  "AMD": "֏",
  "ISK": "kr",
  "JPY": "¥",
  "GEL": "₾",
  "CVE": "​",
  "KZT": "₸",
  "KHR": "៛",
  "KPW": "₩",
  "KRW": "₩",
  "KGS": "сом",
  "AOA": "Kz",
  "LAK": "₭",
  "MZN": "MTn",
  "MKD": "ден",
  "MNT": "₮",
  "BND": "$",
  "MMK": "K",
  "NOK": "kr",
  "NPR": "रु",
  "AWG": "Afl.",
  "SRD": "$",
  "PLN": "zł",
  "AFN": "؋",
  "STN": "Db",
  "MDL": "L",
  "RON": "lei",
  "UAH": "₴",
  "LKR": "රු.",
  "ALL": "Lekë",
  "RSD": "дин.",
  "TJS": "смн",
  "THB": "฿",
  "TMT": "m.",
  "TRY": "₺",
  "UZS": "сўм",
  "VND": "₫",
  "TWD": "NT$"
};
function getBlazorCurrencySymbol(currencyCode) {
  return getValue(currencyCode || "", blazorCurrencyData);
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/intl/intl-base.js
var defaultCurrencyCode = "USD";
var NumberFormat = null;
var DateFormat = null;
function setNumberFormat(value) {
  NumberFormat = value;
}
function setDateFormat(value) {
  DateFormat = value;
}
var regExp = RegExp;
var blazorCultureFormats = {
  "en-US": {
    "d": "M/d/y",
    "D": "EEEE, MMMM d, y",
    "f": "EEEE, MMMM d, y h:mm a",
    "F": "EEEE, MMMM d, y h:mm:s a",
    "g": "M/d/y h:mm a",
    "G": "M/d/yyyy h:mm:ss tt",
    "m": "MMMM d",
    "M": "MMMM d",
    "r": "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
    "R": "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
    "s": "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
    "t": "h:mm tt",
    "T": "h:m:s tt",
    "u": "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
    "U": "dddd, MMMM d, yyyy h:mm:ss tt",
    "y": "MMMM yyyy",
    "Y": "MMMM yyyy"
  }
};
var IntlBase;
(function(IntlBase4) {
  IntlBase4.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
  IntlBase4.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0# ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
  IntlBase4.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
  var fractionRegex = /[0-9]/g;
  IntlBase4.defaultCurrency = "$";
  var mapper5 = ["infinity", "nan", "group", "decimal"];
  var patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g;
  var patternMatch = {
    "G": "",
    "M": "m",
    "L": "m",
    "H": "h",
    "c": "d",
    "'": '"',
    " a": " AM/PM",
    "yy": "yy",
    "y": "yyyy",
    "EEEE": "dddd",
    "E": "ddd"
  };
  IntlBase4.dateConverterMapper = /dddd|ddd/ig;
  var defaultFirstDay = "sun";
  IntlBase4.islamicRegex = /^islamic/;
  var firstDayMapper = {
    "sun": 0,
    "mon": 1,
    "tue": 2,
    "wed": 3,
    "thu": 4,
    "fri": 5,
    "sat": 6
  };
  IntlBase4.formatRegex = new regExp("(^[ncpae]{1})([0-1]?[0-9]|20)?$", "i");
  IntlBase4.currencyFormatRegex = new regExp("(^[ca]{1})([0-1]?[0-9]|20)?$", "i");
  IntlBase4.curWithoutNumberRegex = /(c|a)$/ig;
  var typeMapper = {
    "$": "isCurrency",
    "%": "isPercent",
    "-": "isNegative",
    0: "nlead",
    1: "nend"
  };
  IntlBase4.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi;
  IntlBase4.basicPatterns = ["short", "medium", "long", "full"];
  IntlBase4.defaultObject = {
    "dates": {
      "calendars": {
        "gregorian": {
          "months": {
            "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": {
            "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"
              }
            }
          },
          "dayPeriods": {
            "format": {
              "wide": {
                "am": "AM",
                "pm": "PM"
              }
            }
          },
          "eras": {
            "eraNames": {
              "0": "Before Christ",
              "0-alt-variant": "Before Common Era",
              "1": "Anno Domini",
              "1-alt-variant": "Common Era"
            },
            "eraAbbr": {
              "0": "BC",
              "0-alt-variant": "BCE",
              "1": "AD",
              "1-alt-variant": "CE"
            },
            "eraNarrow": {
              "0": "B",
              "0-alt-variant": "BCE",
              "1": "A",
              "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": {
              "d": "d",
              "E": "ccc",
              "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",
              "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"
            }
          }
        },
        "islamic": {
          "months": {
            "stand-alone": {
              "abbreviated": {
                "1": "Muh.",
                "2": "Saf.",
                "3": "Rab. I",
                "4": "Rab. II",
                "5": "Jum. I",
                "6": "Jum. II",
                "7": "Raj.",
                "8": "Sha.",
                "9": "Ram.",
                "10": "Shaw.",
                "11": "Dhuʻl-Q.",
                "12": "Dhuʻl-H."
              },
              "narrow": {
                "1": "1",
                "2": "2",
                "3": "3",
                "4": "4",
                "5": "5",
                "6": "6",
                "7": "7",
                "8": "8",
                "9": "9",
                "10": "10",
                "11": "11",
                "12": "12"
              },
              "wide": {
                "1": "Muharram",
                "2": "Safar",
                "3": "Rabiʻ I",
                "4": "Rabiʻ II",
                "5": "Jumada I",
                "6": "Jumada II",
                "7": "Rajab",
                "8": "Shaʻban",
                "9": "Ramadan",
                "10": "Shawwal",
                "11": "Dhuʻl-Qiʻdah",
                "12": "Dhuʻl-Hijjah"
              }
            }
          },
          "days": {
            "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"
              }
            }
          },
          "dayPeriods": {
            "format": {
              "wide": {
                "am": "AM",
                "pm": "PM"
              }
            }
          },
          "eras": {
            "eraNames": {
              "0": "AH"
            },
            "eraAbbr": {
              "0": "AH"
            },
            "eraNarrow": {
              "0": "AH"
            }
          },
          "dateFormats": {
            "full": "EEEE, MMMM d, y G",
            "long": "MMMM d, y G",
            "medium": "MMM d, y G",
            "short": "M/d/y GGGGG"
          },
          "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": {
              "d": "d",
              "E": "ccc",
              "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",
              "M": "L",
              "Md": "M/d",
              "MEd": "E, M/d",
              "MMM": "LLL",
              "MMMd": "MMM d",
              "MMMEd": "E, MMM d",
              "MMMMd": "MMMM d",
              "ms": "mm:ss",
              "y": "y G",
              "yyyy": "y G",
              "yyyyM": "M/y GGGGG",
              "yyyyMd": "M/d/y GGGGG",
              "yyyyMEd": "E, M/d/y GGGGG",
              "yyyyMMM": "MMM y G",
              "yyyyMMMd": "MMM d, y G",
              "yyyyMMMEd": "E, MMM d, y G",
              "yyyyMMMM": "MMMM y G",
              "yyyyQQQ": "QQQ y G",
              "yyyyQQQQ": "QQQQ y G"
            }
          }
        }
      },
      "timeZoneNames": {
        "hourFormat": "+HH:mm;-HH:mm",
        "gmtFormat": "GMT{0}",
        "gmtZeroFormat": "GMT"
      }
    },
    "numbers": {
      "currencies": {
        "USD": {
          "displayName": "US Dollar",
          "symbol": "$",
          "symbol-alt-narrow": "$"
        },
        "EUR": {
          "displayName": "Euro",
          "symbol": "€",
          "symbol-alt-narrow": "€"
        },
        "GBP": {
          "displayName": "British Pound",
          "symbol-alt-narrow": "£"
        }
      },
      "defaultNumberingSystem": "latn",
      "minimumGroupingDigits": "1",
      "symbols-numberSystem-latn": {
        "decimal": ".",
        "group": ",",
        "list": ";",
        "percentSign": "%",
        "plusSign": "+",
        "minusSign": "-",
        "exponential": "E",
        "superscriptingExponent": "×",
        "perMille": "‰",
        "infinity": "∞",
        "nan": "NaN",
        "timeSeparator": ":"
      },
      "decimalFormats-numberSystem-latn": {
        "standard": "#,##0.###"
      },
      "percentFormats-numberSystem-latn": {
        "standard": "#,##0%"
      },
      "currencyFormats-numberSystem-latn": {
        "standard": "¤#,##0.00",
        "accounting": "¤#,##0.00;(¤#,##0.00)"
      },
      "scientificFormats-numberSystem-latn": {
        "standard": "#E0"
      }
    }
  };
  IntlBase4.blazorDefaultObject = {
    "numbers": {
      "mapper": {
        "0": "0",
        "1": "1",
        "2": "2",
        "3": "3",
        "4": "4",
        "5": "5",
        "6": "6",
        "7": "7",
        "8": "8",
        "9": "9"
      },
      "mapperDigits": "0123456789",
      "numberSymbols": {
        "decimal": ".",
        "group": ",",
        "plusSign": "+",
        "minusSign": "-",
        "percentSign": "%",
        "nan": "NaN",
        "timeSeparator": ":",
        "infinity": "∞"
      },
      "timeSeparator": ":",
      "currencySymbol": "$",
      "currencypData": {
        "nlead": "$",
        "nend": "",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "percentpData": {
        "nlead": "",
        "nend": "%",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "percentnData": {
        "nlead": "-",
        "nend": "%",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "currencynData": {
        "nlead": "($",
        "nend": ")",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "decimalnData": {
        "nlead": "-",
        "nend": "",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "decimalpData": {
        "nlead": "",
        "nend": "",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      }
    },
    "dates": {
      "dayPeriods": {
        "am": "AM",
        "pm": "PM"
      },
      "dateSeperator": "/",
      "days": {
        "abbreviated": {
          "sun": "Sun",
          "mon": "Mon",
          "tue": "Tue",
          "wed": "Wed",
          "thu": "Thu",
          "fri": "Fri",
          "sat": "Sat"
        },
        "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"
        }
      },
      "months": {
        "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"
        },
        "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"
        }
      },
      "eras": {
        "1": "AD"
      }
    }
  };
  IntlBase4.monthIndex = {
    3: "abbreviated",
    4: "wide",
    5: "narrow",
    1: "abbreviated"
  };
  IntlBase4.month = "months";
  IntlBase4.days = "days";
  IntlBase4.patternMatcher = {
    C: "currency",
    P: "percent",
    N: "decimal",
    A: "currency",
    E: "scientific"
  };
  function getResultantPattern(skeleton, dateObject, type, isIslamic, blazorCulture) {
    var resPattern;
    var iType = type || "date";
    if (blazorCulture) {
      resPattern = compareBlazorDateFormats({
        skeleton
      }, blazorCulture).format || compareBlazorDateFormats({
        skeleton: "d"
      }, "en-US").format;
    } else {
      if (IntlBase4.basicPatterns.indexOf(skeleton) !== -1) {
        resPattern = getValue(iType + "Formats." + skeleton, dateObject);
        if (iType === "dateTime") {
          var dPattern = getValue("dateFormats." + skeleton, dateObject);
          var tPattern = getValue("timeFormats." + skeleton, dateObject);
          resPattern = resPattern.replace("{1}", dPattern).replace("{0}", tPattern);
        }
      } else {
        resPattern = getValue("dateTimeFormats.availableFormats." + skeleton, dateObject);
      }
      if (isUndefined(resPattern) && skeleton === "yMd") {
        resPattern = "M/d/y";
      }
    }
    return resPattern;
  }
  IntlBase4.getResultantPattern = getResultantPattern;
  function getDependables(cldr, culture, mode, isNumber) {
    var ret = {};
    var calendartype = mode || "gregorian";
    ret.parserObject = ParserBase.getMainObject(cldr, culture) || (isBlazor() ? IntlBase4.blazorDefaultObject : IntlBase4.defaultObject);
    if (isNumber) {
      ret.numericObject = getValue("numbers", ret.parserObject);
    } else {
      var dateString = isBlazor() ? "dates" : "dates.calendars." + calendartype;
      ret.dateObject = getValue(dateString, ret.parserObject);
    }
    return ret;
  }
  IntlBase4.getDependables = getDependables;
  function getSymbolPattern(type, numSystem, obj, isAccount) {
    return getValue(type + "Formats-numberSystem-" + numSystem + (isAccount ? ".accounting" : ".standard"), obj) || (isAccount ? getValue(type + "Formats-numberSystem-" + numSystem + ".standard", obj) : "");
  }
  IntlBase4.getSymbolPattern = getSymbolPattern;
  function ConvertDateToWeekFormat(format) {
    var convertMapper = format.match(IntlBase4.dateConverterMapper);
    if (convertMapper && isBlazor()) {
      var tempString = convertMapper[0].length === 3 ? "EEE" : "EEEE";
      return format.replace(IntlBase4.dateConverterMapper, tempString);
    }
    return format;
  }
  IntlBase4.ConvertDateToWeekFormat = ConvertDateToWeekFormat;
  function compareBlazorDateFormats(formatOptions, culture) {
    var format = formatOptions.format || formatOptions.skeleton;
    var curFormatMapper = getValue((culture || "en-US") + "." + format, blazorCultureFormats);
    if (!curFormatMapper) {
      curFormatMapper = getValue("en-US." + format, blazorCultureFormats);
    }
    if (curFormatMapper) {
      curFormatMapper = ConvertDateToWeekFormat(curFormatMapper);
      formatOptions.format = curFormatMapper.replace(/tt/, "a");
    }
    return formatOptions;
  }
  IntlBase4.compareBlazorDateFormats = compareBlazorDateFormats;
  function getProperNumericSkeleton(skeleton) {
    var matches5 = skeleton.match(IntlBase4.formatRegex);
    var ret = {};
    var pattern = matches5[1].toUpperCase();
    ret.isAccount = pattern === "A";
    ret.type = IntlBase4.patternMatcher["" + pattern];
    if (skeleton.length > 1) {
      ret.fractionDigits = parseInt(matches5[2], 10);
    }
    return ret;
  }
  IntlBase4.getProperNumericSkeleton = getProperNumericSkeleton;
  function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {
    var nData = fractionOnly ? {} : {
      nlead: "",
      nend: ""
    };
    var match = pattern.match(IntlBase4.customRegex);
    if (match) {
      if (!fractionOnly) {
        nData.nlead = changeCurrencySymbol(match[1], cSymbol);
        nData.nend = changeCurrencySymbol(match[10], cSymbol);
        nData.groupPattern = match[4];
      }
      var fraction = match[7];
      if (fraction && needFraction) {
        var fmatch = fraction.match(fractionRegex);
        if (!isNullOrUndefined(fmatch)) {
          nData.minimumFraction = fmatch.length;
        } else {
          nData.minimumFraction = 0;
        }
        nData.maximumFraction = fraction.length - 1;
      }
    }
    return nData;
  }
  IntlBase4.getFormatData = getFormatData;
  function changeCurrencySymbol(val, sym) {
    if (val) {
      val = val.replace(IntlBase4.defaultCurrency, sym);
      return sym === "" ? val.trim() : val;
    }
    return "";
  }
  IntlBase4.changeCurrencySymbol = changeCurrencySymbol;
  function getCurrencySymbol(numericObject, currencyCode, altSymbol, ignoreCurrency) {
    var symbol = altSymbol ? "." + altSymbol : ".symbol";
    var getCurrency = ignoreCurrency ? "$" : getValue("currencies." + currencyCode + symbol, numericObject) || getValue("currencies." + currencyCode + ".symbol-alt-narrow", numericObject) || "$";
    return getCurrency;
  }
  IntlBase4.getCurrencySymbol = getCurrencySymbol;
  function customFormat(format, dOptions, obj) {
    var options = {};
    var formatSplit = format.split(";");
    var data = ["pData", "nData", "zeroData"];
    for (var i = 0; i < formatSplit.length; i++) {
      options["" + data[parseInt(i.toString(), 10)]] = customNumberFormat(formatSplit[parseInt(i.toString(), 10)], dOptions, obj);
    }
    if (isNullOrUndefined(options.nData)) {
      options.nData = extend({}, options.pData);
      options.nData.nlead = isNullOrUndefined(dOptions) ? "-" + options.nData.nlead : dOptions.minusSymbol + options.nData.nlead;
    }
    return options;
  }
  IntlBase4.customFormat = customFormat;
  function customNumberFormat(format, dOptions, numObject) {
    var cOptions = {
      type: "decimal",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    };
    var pattern = format.match(IntlBase4.customRegex);
    if (isNullOrUndefined(pattern) || pattern[5] === "" && format !== "N/A") {
      cOptions.type = void 0;
      return cOptions;
    }
    cOptions.nlead = pattern[1];
    cOptions.nend = pattern[10];
    var integerPart = pattern[6];
    var spaceCapture = integerPart.match(/ $/g) ? true : false;
    var spaceGrouping = integerPart.replace(/ $/g, "").indexOf(" ") !== -1;
    cOptions.useGrouping = integerPart.indexOf(",") !== -1 || spaceGrouping;
    integerPart = integerPart.replace(/,/g, "");
    var fractionPart = pattern[7];
    if (integerPart.indexOf("0") !== -1) {
      cOptions.minimumIntegerDigits = integerPart.length - integerPart.indexOf("0");
    }
    if (!isNullOrUndefined(fractionPart)) {
      cOptions.minimumFractionDigits = fractionPart.lastIndexOf("0");
      cOptions.maximumFractionDigits = fractionPart.lastIndexOf("#");
      if (cOptions.minimumFractionDigits === -1) {
        cOptions.minimumFractionDigits = 0;
      }
      if (cOptions.maximumFractionDigits === -1 || cOptions.maximumFractionDigits < cOptions.minimumFractionDigits) {
        cOptions.maximumFractionDigits = cOptions.minimumFractionDigits;
      }
    }
    if (!isNullOrUndefined(dOptions)) {
      dOptions.isCustomFormat = true;
      extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "$", dOptions.currencySymbol));
      if (!cOptions.isCurrency) {
        extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "%", dOptions.percentSymbol));
      }
    } else {
      extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "%", "%"));
    }
    if (!isNullOrUndefined(numObject)) {
      var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);
      if (cOptions.useGrouping) {
        cOptions.groupSeparator = spaceGrouping ? " " : dOptions.numberMapper.numberSymbols[mapper5[2]];
        cOptions.groupData = NumberFormat.getGroupingDetails(symbolPattern.split(";")[0]);
      }
      cOptions.nlead = cOptions.nlead.replace(/'/g, "");
      cOptions.nend = spaceCapture ? " " + cOptions.nend.replace(/'/g, "") : cOptions.nend.replace(/'/g, "");
    }
    return cOptions;
  }
  IntlBase4.customNumberFormat = customNumberFormat;
  function isCurrencyPercent(parts, actual, symbol) {
    var options = {
      nlead: parts[0],
      nend: parts[1]
    };
    for (var i = 0; i < 2; i++) {
      var part = parts[parseInt(i.toString(), 10)];
      var loc = part.indexOf(actual);
      if (loc !== -1 && (loc < part.indexOf("'") || loc > part.lastIndexOf("'"))) {
        options["" + typeMapper[parseInt(i.toString(), 10)]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
        options["" + typeMapper["" + actual]] = true;
        options.type = options.isCurrency ? "currency" : "percent";
        break;
      }
    }
    return options;
  }
  IntlBase4.isCurrencyPercent = isCurrencyPercent;
  function getDateSeparator(dateObj) {
    var value = (getValue("dateFormats.short", dateObj) || "").match(/[dM]([^dM])[dM]/i);
    return value ? value[1] : "/";
  }
  IntlBase4.getDateSeparator = getDateSeparator;
  function getActualDateTimeFormat(culture, options, cldr, isExcelFormat) {
    var dependable = getDependables(cldr, culture, options.calendar);
    if (isBlazor()) {
      options = compareBlazorDateFormats(options, culture);
    }
    var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
    if (isExcelFormat) {
      actualPattern = actualPattern.replace(patternRegex, function(pattern2) {
        return patternMatch["" + pattern2];
      });
      if (actualPattern.indexOf("z") !== -1) {
        var tLength = actualPattern.match(/z/g).length;
        var timeZonePattern = void 0;
        var options_1 = {
          "timeZone": {}
        };
        options_1.numMapper = ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
        options_1.timeZone = getValue("dates.timeZoneNames", dependable.parserObject);
        var value = /* @__PURE__ */ new Date();
        var timezone = value.getTimezoneOffset();
        var pattern = tLength < 4 ? "+H;-H" : options_1.timeZone.hourFormat;
        pattern = pattern.replace(/:/g, options_1.numMapper.timeSeparator);
        if (timezone === 0) {
          timeZonePattern = options_1.timeZone.gmtZeroFormat;
        } else {
          timeZonePattern = DateFormat.getTimeZoneValue(timezone, pattern);
          timeZonePattern = options_1.timeZone.gmtFormat.replace(/\{0\}/, timeZonePattern);
        }
        actualPattern = actualPattern.replace(/[z]+/, '"' + timeZonePattern + '"');
      }
      actualPattern = actualPattern.replace(/ $/, "");
    }
    return actualPattern;
  }
  IntlBase4.getActualDateTimeFormat = getActualDateTimeFormat;
  function processSymbol(actual, option) {
    if (actual.indexOf(",") !== -1) {
      var split = actual.split(",");
      actual = split[0] + getValue("numberMapper.numberSymbols.group", option) + split[1].replace(".", getValue("numberMapper.numberSymbols.decimal", option));
    } else {
      actual = actual.replace(".", getValue("numberMapper.numberSymbols.decimal", option));
    }
    return actual;
  }
  IntlBase4.processSymbol = processSymbol;
  function getActualNumberFormat(culture, options, cldr, isExcel) {
    var dependable = getDependables(cldr, culture, "", true);
    var parseOptions = {
      custom: true
    };
    var numrericObject = dependable.numericObject;
    var minFrac;
    var curObj = {};
    var curMatch = (options.format || "").match(IntlBase4.currencyFormatRegex);
    var type = IntlBase4.formatRegex.test(options.format) ? getProperNumericSkeleton(options.format || "N") : {};
    var dOptions = {};
    if (curMatch) {
      dOptions.numberMapper = isBlazor() ? extend({}, dependable.numericObject) : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true);
      var curCode = isBlazor() ? getValue("currencySymbol", dependable.numericObject) : getCurrencySymbol(dependable.numericObject, options.currency || defaultCurrencyCode, options.altSymbol);
      var symbolPattern = getSymbolPattern("currency", dOptions.numberMapper.numberSystem, dependable.numericObject, /a/i.test(options.format));
      symbolPattern = symbolPattern.replace(/\u00A4/g, curCode);
      var split = symbolPattern.split(";");
      curObj.hasNegativePattern = isBlazor() ? true : split.length > 1;
      curObj.nData = isBlazor() ? getValue(type.type + "nData", numrericObject) : getFormatData(split[1] || "-" + split[0], true, curCode);
      curObj.pData = isBlazor() ? getValue(type.type + "pData", numrericObject) : getFormatData(split[0], false, curCode);
      if (!curMatch[2] && !options.minimumFractionDigits && !options.maximumFractionDigits) {
        minFrac = getFormatData(symbolPattern.split(";")[0], true, "", true).minimumFraction;
      }
    }
    var actualPattern;
    if (IntlBase4.formatRegex.test(options.format) || !options.format) {
      extend(parseOptions, getProperNumericSkeleton(options.format || "N"));
      parseOptions.custom = false;
      actualPattern = "###0";
      if (parseOptions.fractionDigits || options.minimumFractionDigits || options.maximumFractionDigits || minFrac) {
        var defaultMinimum = 0;
        if (parseOptions.fractionDigits) {
          options.minimumFractionDigits = options.maximumFractionDigits = parseOptions.fractionDigits;
        }
        actualPattern = fractionDigitsPattern(actualPattern, minFrac || parseOptions.fractionDigits || options.minimumFractionDigits || defaultMinimum, options.maximumFractionDigits || defaultMinimum);
      }
      if (options.minimumIntegerDigits) {
        actualPattern = minimumIntegerPattern(actualPattern, options.minimumIntegerDigits);
      }
      if (options.useGrouping) {
        actualPattern = groupingPattern(actualPattern);
      }
      if (parseOptions.type === "currency" || parseOptions.type && isBlazor()) {
        if (isBlazor() && parseOptions.type !== "currency") {
          curObj.pData = getValue(parseOptions.type + "pData", numrericObject);
          curObj.nData = getValue(parseOptions.type + "nData", numrericObject);
        }
        var cPattern = actualPattern;
        actualPattern = curObj.pData.nlead + cPattern + curObj.pData.nend;
        if (curObj.hasNegativePattern || isBlazor()) {
          actualPattern += ";" + curObj.nData.nlead + cPattern + curObj.nData.nend;
        }
      }
      if (parseOptions.type === "percent" && !isBlazor()) {
        actualPattern += " %";
      }
    } else {
      actualPattern = options.format.replace(/'/g, '"');
    }
    if (Object.keys(dOptions).length > 0) {
      actualPattern = !isExcel ? processSymbol(actualPattern, dOptions) : actualPattern;
    }
    return actualPattern;
  }
  IntlBase4.getActualNumberFormat = getActualNumberFormat;
  function fractionDigitsPattern(pattern, minDigits, maxDigits) {
    pattern += ".";
    for (var a = 0; a < minDigits; a++) {
      pattern += "0";
    }
    if (minDigits < maxDigits) {
      var diff = maxDigits - minDigits;
      for (var b = 0; b < diff; b++) {
        pattern += "#";
      }
    }
    return pattern;
  }
  IntlBase4.fractionDigitsPattern = fractionDigitsPattern;
  function minimumIntegerPattern(pattern, digits) {
    var temp = pattern.split(".");
    var integer = "";
    for (var x = 0; x < digits; x++) {
      integer += "0";
    }
    return temp[1] ? integer + "." + temp[1] : integer;
  }
  IntlBase4.minimumIntegerPattern = minimumIntegerPattern;
  function groupingPattern(pattern) {
    var temp = pattern.split(".");
    var integer = temp[0];
    var no = 3 - integer.length % 3;
    var hash = no && no === 1 ? "#" : no === 2 ? "##" : "";
    integer = hash + integer;
    pattern = "";
    for (var x = integer.length - 1; x > 0; x = x - 3) {
      pattern = "," + integer[x - 2] + integer[x - 1] + integer[parseInt(x.toString(), 10)] + pattern;
    }
    pattern = pattern.slice(1);
    return temp[1] ? pattern + "." + temp[1] : pattern;
  }
  IntlBase4.groupingPattern = groupingPattern;
  function getWeekData(culture, cldr) {
    var firstDay = defaultFirstDay;
    var mapper6 = getValue("supplemental.weekData.firstDay", cldr);
    var iCulture = culture;
    if (/en-/.test(iCulture)) {
      iCulture = iCulture.slice(3);
    }
    iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);
    if (mapper6) {
      firstDay = mapper6["" + iCulture] || mapper6[iCulture.slice(0, 2)] || defaultFirstDay;
    }
    return firstDayMapper["" + firstDay];
  }
  IntlBase4.getWeekData = getWeekData;
  function replaceBlazorCurrency(pData, aCurrency, rCurrency) {
    var iCurrency = getBlazorCurrencySymbol(rCurrency);
    if (aCurrency !== iCurrency) {
      for (var _i = 0, pData_1 = pData; _i < pData_1.length; _i++) {
        var data = pData_1[_i];
        data.nend = data.nend.replace(aCurrency, iCurrency);
        data.nlead = data.nlead.replace(aCurrency, iCurrency);
      }
    }
  }
  IntlBase4.replaceBlazorCurrency = replaceBlazorCurrency;
  function getWeekOfYear(date) {
    var newYear = new Date(date.getFullYear(), 0, 1);
    var day = newYear.getDay();
    var weeknum;
    day = day >= 0 ? day : day + 7;
    var daynum = Math.floor((date.getTime() - newYear.getTime() - (date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 6e4) / 864e5) + 1;
    if (day < 4) {
      weeknum = Math.floor((daynum + day - 1) / 7) + 1;
      if (weeknum > 52) {
        var nYear = new Date(date.getFullYear() + 1, 0, 1);
        var nday = nYear.getDay();
        nday = nday >= 0 ? nday : nday + 7;
        weeknum = nday < 4 ? 1 : 53;
      }
    } else {
      weeknum = Math.floor((daynum + day - 1) / 7);
    }
    return weeknum;
  }
  IntlBase4.getWeekOfYear = getWeekOfYear;
})(IntlBase || (IntlBase = {}));

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/ajax.js
var headerRegex = /^(.*?):[ \t]*([^\r\n]*)$/gm;
var defaultType = "GET";
var Ajax = (
  /** @class */
  function() {
    function Ajax4(options, type, async, contentType) {
      this.mode = true;
      this.emitError = true;
      this.options = {};
      if (typeof options === "string") {
        this.url = options;
        this.type = type ? type.toUpperCase() : defaultType;
        this.mode = !isNullOrUndefined(async) ? async : true;
      } else if (typeof options === "object") {
        this.options = options;
        merge(this, this.options);
      }
      this.type = this.type ? this.type.toUpperCase() : defaultType;
      this.contentType = this.contentType !== void 0 ? this.contentType : contentType;
    }
    Ajax4.prototype.send = function(data) {
      var _this = this;
      this.data = isNullOrUndefined(data) ? this.data : data;
      var eventArgs = {
        cancel: false,
        httpRequest: null
      };
      var promise = new Promise(function(resolve, reject) {
        _this.httpRequest = new XMLHttpRequest();
        _this.httpRequest.onreadystatechange = function() {
          _this.stateChange(resolve, reject);
        };
        if (!isNullOrUndefined(_this.onLoad)) {
          _this.httpRequest.onload = _this.onLoad;
        }
        if (!isNullOrUndefined(_this.onProgress)) {
          _this.httpRequest.onprogress = _this.onProgress;
        }
        if (!isNullOrUndefined(_this.onAbort)) {
          _this.httpRequest.onabort = _this.onAbort;
        }
        if (!isNullOrUndefined(_this.onError)) {
          _this.httpRequest.onerror = _this.onError;
        }
        if (!isNullOrUndefined(_this.onUploadProgress)) {
          _this.httpRequest.upload.onprogress = _this.onUploadProgress;
        }
        _this.httpRequest.open(_this.type, _this.url, _this.mode);
        if (!isNullOrUndefined(_this.data) && _this.contentType !== null) {
          _this.httpRequest.setRequestHeader("Content-Type", _this.contentType || "application/json; charset=utf-8");
        }
        if (_this.beforeSend) {
          eventArgs.httpRequest = _this.httpRequest;
          _this.beforeSend(eventArgs);
        }
        if (!eventArgs.cancel) {
          _this.httpRequest.send(!isNullOrUndefined(_this.data) ? _this.data : null);
        }
      });
      return promise;
    };
    Ajax4.prototype.successHandler = function(data) {
      if (this.onSuccess) {
        this.onSuccess(data, this);
      }
      return data;
    };
    Ajax4.prototype.failureHandler = function(reason) {
      if (this.onFailure) {
        this.onFailure(this.httpRequest);
      }
      return reason;
    };
    Ajax4.prototype.stateChange = function(resolve, reject) {
      var data = this.httpRequest.responseText;
      if (this.dataType && this.dataType.toLowerCase() === "json") {
        if (data === "") {
          data = void 0;
        } else {
          try {
            data = JSON.parse(data);
          } catch (error) {
          }
        }
      }
      if (this.httpRequest.readyState === 4) {
        if (this.httpRequest.status >= 200 && this.httpRequest.status <= 299 || this.httpRequest.status === 304) {
          resolve(this.successHandler(data));
        } else {
          if (this.emitError) {
            reject(new Error(this.failureHandler(this.httpRequest.statusText)));
          } else {
            resolve();
          }
        }
      }
    };
    Ajax4.prototype.getResponseHeader = function(key) {
      var responseHeaders = {};
      var headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());
      while (headers) {
        responseHeaders[headers[1].toLowerCase()] = headers[2];
        headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());
      }
      var header = responseHeaders[key.toLowerCase()];
      return isNullOrUndefined(header) ? null : header;
    };
    return Ajax4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/fetch.js
var Fetch = (
  /** @class */
  function() {
    function Fetch4(options, type, contentType) {
      this.type = "GET";
      this.emitError = true;
      if (typeof options === "string") {
        this.url = options;
        this.type = !isNullOrUndefined(type) ? type.toUpperCase() : this.type;
        this.contentType = contentType;
      } else if (isObject(options) && Object.keys(options).length > 0) {
        merge(this, options);
      }
      this.contentType = !isNullOrUndefined(this.contentType) ? this.contentType : "application/json; charset=utf-8";
    }
    Fetch4.prototype.send = function(data) {
      var _this = this;
      var contentTypes = {
        "application/json": "json",
        "multipart/form-data": "formData",
        "application/octet-stream": "blob",
        "application/x-www-form-urlencoded": "formData"
      };
      try {
        if (isNullOrUndefined(this.fetchRequest) && this.type === "GET") {
          this.fetchRequest = new Request(this.url, {
            method: this.type
          });
        } else if (isNullOrUndefined(this.fetchRequest)) {
          this.data = !isNullOrUndefined(data) ? data : this.data;
          this.fetchRequest = new Request(this.url, {
            method: this.type,
            headers: {
              "Content-Type": this.contentType
            },
            body: this.data
          });
        }
        var eventArgs = {
          cancel: false,
          fetchRequest: this.fetchRequest
        };
        this.triggerEvent(this["beforeSend"], eventArgs);
        if (eventArgs.cancel) {
          return null;
        }
        this.fetchResponse = fetch(this.fetchRequest);
        return this.fetchResponse.then(function(response) {
          _this.triggerEvent(_this["onLoad"], response);
          if (!response.ok) {
            throw response;
          }
          var responseType = "text";
          for (var _i = 0, _a = Object.keys(contentTypes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf(key) !== -1) {
              responseType = contentTypes[key];
            }
          }
          return response[responseType]();
        }).then(function(data2) {
          _this.triggerEvent(_this["onSuccess"], data2, _this);
          return data2;
        }).catch(function(error) {
          var returnVal = {};
          if (_this.emitError) {
            _this.triggerEvent(_this["onFailure"], error);
            returnVal = Promise.reject(error);
          }
          return returnVal;
        });
      } catch (error) {
        return error;
      }
    };
    Fetch4.prototype.triggerEvent = function(callback, data, instance) {
      if (!isNullOrUndefined(callback) && typeof callback === "function") {
        callback(data, instance);
      }
    };
    return Fetch4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/browser.js
var REGX_MOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;
var REGX_IE = /msie|trident/i;
var REGX_IE11 = /Trident\/7\./;
var REGX_IOS = /(ipad|iphone|ipod touch)/i;
var REGX_IOS7 = /(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i;
var REGX_ANDROID = /android/i;
var REGX_WINDOWS = /trident|windows phone|edge/i;
var REGX_VERSION = /(version)[ /]([\w.]+)/i;
var REGX_BROWSER = {
  OPERA: /(opera|opr)(?:.*version|)[ /]([\w.]+)/i,
  EDGE: /(edge)(?:.*version|)[ /]([\w.]+)/i,
  CHROME: /(chrome|crios)[ /]([\w.]+)/i,
  PANTHOMEJS: /(phantomjs)[ /]([\w.]+)/i,
  SAFARI: /(safari)[ /]([\w.]+)/i,
  WEBKIT: /(webkit)[ /]([\w.]+)/i,
  MSIE: /(msie|trident) ([\w.]+)/i,
  MOZILLA: /(mozilla)(?:.*? rv:([\w.]+)|)/i
};
if (typeof window !== "undefined") {
  window.browserDetails = window.browserDetails || {};
}
var Browser = (
  /** @class */
  function() {
    function Browser4() {
    }
    Browser4.extractBrowserDetail = function() {
      var browserInfo = {
        culture: {}
      };
      var keys4 = Object.keys(REGX_BROWSER);
      var clientInfo = [];
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        clientInfo = Browser4.userAgent.match(REGX_BROWSER["" + key]);
        if (clientInfo) {
          browserInfo.name = clientInfo[1].toLowerCase() === "opr" ? "opera" : clientInfo[1].toLowerCase();
          browserInfo.name = clientInfo[1].toLowerCase() === "crios" ? "chrome" : browserInfo.name;
          browserInfo.version = clientInfo[2];
          browserInfo.culture.name = browserInfo.culture.language = navigator.language;
          if (Browser4.userAgent.match(REGX_IE11)) {
            browserInfo.name = "msie";
            break;
          }
          var version = Browser4.userAgent.match(REGX_VERSION);
          if (browserInfo.name === "safari" && version) {
            browserInfo.version = version[2];
          }
          break;
        }
      }
      return browserInfo;
    };
    Browser4.getEvent = function(event2) {
      var events = {
        start: {
          isPointer: "pointerdown",
          isTouch: "touchstart",
          isDevice: "mousedown"
        },
        move: {
          isPointer: "pointermove",
          isTouch: "touchmove",
          isDevice: "mousemove"
        },
        end: {
          isPointer: "pointerup",
          isTouch: "touchend",
          isDevice: "mouseup"
        },
        cancel: {
          isPointer: "pointercancel",
          isTouch: "touchcancel",
          isDevice: "mouseleave"
        }
      };
      return Browser4.isPointer ? events["" + event2].isPointer : Browser4.isTouch ? events["" + event2].isTouch + (!Browser4.isDevice ? " " + events["" + event2].isDevice : "") : events["" + event2].isDevice;
    };
    Browser4.getTouchStartEvent = function() {
      return Browser4.getEvent("start");
    };
    Browser4.getTouchEndEvent = function() {
      return Browser4.getEvent("end");
    };
    Browser4.getTouchMoveEvent = function() {
      return Browser4.getEvent("move");
    };
    Browser4.getTouchCancelEvent = function() {
      return Browser4.getEvent("cancel");
    };
    Browser4.isSafari = function() {
      return Browser4.isDevice && Browser4.isIos && Browser4.isTouch && typeof window !== "undefined" && window.navigator.userAgent.toLowerCase().indexOf("iphone") === -1 && window.navigator.userAgent.toLowerCase().indexOf("safari") > -1;
    };
    Browser4.getValue = function(key, regX) {
      var browserDetails = typeof window !== "undefined" ? window.browserDetails : {};
      if (typeof navigator !== "undefined" && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1 && Browser4.isTouch === true && !REGX_BROWSER.CHROME.test(navigator.userAgent)) {
        browserDetails["isIos"] = true;
        browserDetails["isDevice"] = true;
        browserDetails["isTouch"] = true;
        browserDetails["isPointer"] = true;
        browserDetails["isPointer"] = "pointerEnabled" in window.navigator;
      }
      if (typeof window !== "undefined" && window.Capacitor && window.Capacitor.getPlatform() === "ios") {
        browserDetails["isPointer"] = false;
      }
      if ("undefined" === typeof browserDetails["" + key]) {
        return browserDetails["" + key] = regX.test(Browser4.userAgent);
      }
      return browserDetails["" + key];
    };
    Object.defineProperty(Browser4, "userAgent", {
      get: function() {
        return Browser4.uA;
      },
      //Properties
      /**
       * Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
       * Also we can set our own userAgent.
       *
       * @param {string} uA ?
       */
      set: function(uA) {
        Browser4.uA = uA;
        window.browserDetails = {};
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "info", {
      //Read Only Properties
      /**
       * Property is to get the browser information like Name, Version and Language
       *
       * @returns {BrowserInfo} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.info)) {
          return window.browserDetails.info = Browser4.extractBrowserDetail();
        }
        return window.browserDetails.info;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIE", {
      /**
       * Property is to get whether the userAgent is based IE.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIE", REGX_IE);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isTouch", {
      /**
       * Property is to get whether the browser has touch support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.isTouch)) {
          return window.browserDetails.isTouch = "ontouchstart" in window.navigator || window && window.navigator && window.navigator.maxTouchPoints > 0 || "ontouchstart" in window;
        }
        return window.browserDetails.isTouch;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isPointer", {
      /**
       * Property is to get whether the browser has Pointer support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.isPointer)) {
          return window.browserDetails.isPointer = "pointerEnabled" in window.navigator;
        }
        return window.browserDetails.isPointer;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isMSPointer", {
      /**
       * Property is to get whether the browser has MSPointer support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.isMSPointer)) {
          return window.browserDetails.isMSPointer = "msPointerEnabled" in window.navigator;
        }
        return window.browserDetails.isMSPointer;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isDevice", {
      /**
       * Property is to get whether the userAgent is device based.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isDevice", REGX_MOBILE);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIos", {
      /**
       * Property is to get whether the userAgent is IOS.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIos", REGX_IOS);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIos7", {
      /**
       * Property is to get whether the userAgent is Ios7.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIos7", REGX_IOS7);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isAndroid", {
      /**
       * Property is to get whether the userAgent is Android.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isAndroid", REGX_ANDROID);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isWebView", {
      /**
       * Property is to identify whether application ran in web view.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.isWebView)) {
          window.browserDetails.isWebView = !(isUndefined(window.cordova) && isUndefined(window.PhoneGap) && isUndefined(window.phonegap) && window.forge !== "object");
          return window.browserDetails.isWebView;
        }
        return window.browserDetails.isWebView;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isWindows", {
      /**
       * Property is to get whether the userAgent is Windows.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isWindows", REGX_WINDOWS);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchStartEvent", {
      /**
       * Property is to get the touch start event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.touchStartEvent)) {
          return window.browserDetails.touchStartEvent = Browser4.getTouchStartEvent();
        }
        return window.browserDetails.touchStartEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchMoveEvent", {
      /**
       * Property is to get the touch move event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.touchMoveEvent)) {
          return window.browserDetails.touchMoveEvent = Browser4.getTouchMoveEvent();
        }
        return window.browserDetails.touchMoveEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchEndEvent", {
      /**
       * Property is to get the touch end event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.touchEndEvent)) {
          return window.browserDetails.touchEndEvent = Browser4.getTouchEndEvent();
        }
        return window.browserDetails.touchEndEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchCancelEvent", {
      /**
       * Property is to cancel the touch end event.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined(window.browserDetails.touchCancelEvent)) {
          return window.browserDetails.touchCancelEvent = Browser4.getTouchCancelEvent();
        }
        return window.browserDetails.touchCancelEvent;
      },
      enumerable: true,
      configurable: true
    });
    Browser4.uA = typeof navigator !== "undefined" ? navigator.userAgent : "";
    return Browser4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/event-handler.js
var EventHandler = (
  /** @class */
  function() {
    function EventHandler4() {
    }
    EventHandler4.addOrGetEventData = function(element2) {
      if ("__eventList" in element2) {
        return element2.__eventList.events;
      } else {
        element2.__eventList = {};
        return element2.__eventList.events = [];
      }
    };
    EventHandler4.add = function(element2, eventName, listener, bindTo, intDebounce) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var debounceListener;
      if (intDebounce) {
        debounceListener = debounce(listener, intDebounce);
      } else {
        debounceListener = listener;
      }
      if (bindTo) {
        debounceListener = debounceListener.bind(bindTo);
      }
      var event2 = eventName.split(" ");
      for (var i = 0; i < event2.length; i++) {
        eventData.push({
          name: event2[parseInt(i.toString(), 10)],
          listener,
          debounce: debounceListener
        });
        if (Browser.isIE) {
          element2.addEventListener(event2[parseInt(i.toString(), 10)], debounceListener);
        } else {
          element2.addEventListener(event2[parseInt(i.toString(), 10)], debounceListener, {
            passive: false
          });
        }
      }
      return debounceListener;
    };
    EventHandler4.remove = function(element2, eventName, listener) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var event2 = eventName.split(" ");
      var _loop_1 = function(j2) {
        var index = -1;
        var debounceListener;
        if (eventData && eventData.length !== 0) {
          eventData.some(function(x, i) {
            return x.name === event2[parseInt(j2.toString(), 10)] && x.listener === listener ? (index = i, debounceListener = x.debounce, true) : false;
          });
        }
        if (index !== -1) {
          eventData.splice(index, 1);
        }
        if (debounceListener) {
          element2.removeEventListener(event2[parseInt(j2.toString(), 10)], debounceListener);
        }
      };
      for (var j = 0; j < event2.length; j++) {
        _loop_1(j);
      }
    };
    EventHandler4.clearEvents = function(element2) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var copyData = extend([], void 0, eventData);
      for (var i = 0; i < copyData.length; i++) {
        var parseValue = copyData[parseInt(i.toString(), 10)];
        element2.removeEventListener(parseValue.name, parseValue.debounce);
        eventData.shift();
      }
    };
    EventHandler4.trigger = function(element2, eventName, eventProp) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      for (var _i = 0, eventData_1 = eventData; _i < eventData_1.length; _i++) {
        var event_1 = eventData_1[_i];
        if (event_1.name === eventName) {
          event_1.debounce.call(this, eventProp);
        }
      }
    };
    return EventHandler4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/dom.js
var SVG_REG = /^svg|^path|^g/;
function createElement(tagName, properties) {
  var element2 = SVG_REG.test(tagName) ? document.createElementNS("http://www.w3.org/2000/svg", tagName) : document.createElement(tagName);
  if (typeof properties === "undefined") {
    return element2;
  }
  element2.innerHTML = properties.innerHTML ? properties.innerHTML : "";
  if (properties.className !== void 0) {
    element2.className = properties.className;
  }
  if (properties.id !== void 0) {
    element2.id = properties.id;
  }
  if (properties.styles !== void 0) {
    element2.setAttribute("style", properties.styles);
  }
  if (properties.attrs !== void 0) {
    attributes(element2, properties.attrs);
  }
  return element2;
}
function addClass(elements, classes) {
  var classList2 = getClassList(classes);
  var regExp7 = RegExp;
  for (var _i = 0, _a = elements; _i < _a.length; _i++) {
    var ele = _a[_i];
    for (var _b = 0, classList_1 = classList2; _b < classList_1.length; _b++) {
      var className = classList_1[_b];
      if (isObject(ele)) {
        var curClass = getValue("attributes.className", ele);
        if (isNullOrUndefined(curClass)) {
          setValue("attributes.className", className, ele);
        } else if (!new regExp7("\\b" + className + "\\b", "i").test(curClass)) {
          setValue("attributes.className", curClass + " " + className, ele);
        }
      } else {
        if (!ele.classList.contains(className)) {
          ele.classList.add(className);
        }
      }
    }
  }
  return elements;
}
function removeClass(elements, classes) {
  var classList2 = getClassList(classes);
  for (var _i = 0, _a = elements; _i < _a.length; _i++) {
    var ele = _a[_i];
    var flag = isObject(ele);
    var canRemove = flag ? getValue("attributes.className", ele) : ele.className !== "";
    if (canRemove) {
      for (var _b = 0, classList_2 = classList2; _b < classList_2.length; _b++) {
        var className = classList_2[_b];
        if (flag) {
          var classes_1 = getValue("attributes.className", ele);
          var classArr = classes_1.split(" ");
          var index = classArr.indexOf(className);
          if (index !== -1) {
            classArr.splice(index, 1);
          }
          setValue("attributes.className", classArr.join(" "), ele);
        } else {
          ele.classList.remove(className);
        }
      }
    }
  }
  return elements;
}
function getClassList(classes) {
  var classList2 = [];
  if (typeof classes === "string") {
    classList2.push(classes);
  } else {
    classList2 = classes;
  }
  return classList2;
}
function isVisible(element2) {
  var ele = element2;
  return ele.style.visibility === "" && ele.offsetWidth > 0;
}
function detach(element2) {
  var parentNode = element2.parentNode;
  if (parentNode) {
    return parentNode.removeChild(element2);
  }
}
function attributes(element2, attributes4) {
  var keys4 = Object.keys(attributes4);
  var ele = element2;
  for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
    var key = keys_1[_i];
    if (isObject(ele)) {
      var iKey = key;
      if (key === "tabindex") {
        iKey = "tabIndex";
      }
      ele.attributes["" + iKey] = attributes4["" + key];
    } else {
      ele.setAttribute(key, attributes4["" + key]);
    }
  }
  return ele;
}
function select(selector, context, needsVDOM) {
  if (context === void 0) {
    context = document;
  }
  selector = querySelectId(selector);
  return context.querySelector(selector);
}
function selectAll(selector, context, needsVDOM) {
  if (context === void 0) {
    context = document;
  }
  selector = querySelectId(selector);
  var nodeList = context.querySelectorAll(selector);
  return nodeList;
}
function querySelectId(selector) {
  var charRegex = /(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;
  if (selector.match(/#[0-9]/g) || selector.match(charRegex)) {
    var idList = selector.split(",");
    for (var i = 0; i < idList.length; i++) {
      var list = idList[parseInt(i.toString(), 10)].split(" ");
      for (var j = 0; j < list.length; j++) {
        if (list[parseInt(j.toString(), 10)].indexOf("#") > -1) {
          if (!list[parseInt(j.toString(), 10)].match(/\[.*\]/)) {
            var splitId = list[parseInt(j.toString(), 10)].split("#");
            if (splitId[1].match(/^\d/) || splitId[1].match(charRegex)) {
              var setId = list[parseInt(j.toString(), 10)].split(".");
              setId[0] = setId[0].replace(/#/, "[id='") + "']";
              list[parseInt(j.toString(), 10)] = setId.join(".");
            }
          }
        }
      }
      idList[parseInt(i.toString(), 10)] = list.join(" ");
    }
    return idList.join(",");
  }
  return selector;
}
function closest(element2, selector) {
  var el = element2;
  if (typeof el.closest === "function") {
    return el.closest(selector);
  }
  while (el && el.nodeType === 1) {
    if (matches(el, selector)) {
      return el;
    }
    el = el.parentNode;
  }
  return null;
}
function setStyleAttribute(element2, attrs) {
  if (attrs !== void 0) {
    Object.keys(attrs).forEach(function(key) {
      element2.style["" + key] = attrs["" + key];
    });
  }
}
function matches(element2, selector) {
  var matches5 = element2.matches || element2.msMatchesSelector || element2.webkitMatchesSelector;
  if (matches5) {
    return matches5.call(element2, selector);
  } else {
    return [].indexOf.call(document.querySelectorAll(selector), element2) !== -1;
  }
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/observer.js
var Observer = (
  /** @class */
  function() {
    function Observer4(context) {
      this.ranArray = [];
      this.boundedEvents = {};
      if (isNullOrUndefined(context)) {
        return;
      }
      this.context = context;
    }
    Observer4.prototype.on = function(property, handler, context, id) {
      if (isNullOrUndefined(handler)) {
        return;
      }
      var cntxt = context || this.context;
      if (this.notExist(property)) {
        this.boundedEvents["" + property] = [{
          handler,
          context: cntxt,
          id
        }];
        return;
      }
      if (!isNullOrUndefined(id)) {
        if (this.ranArray.indexOf(id) === -1) {
          this.ranArray.push(id);
          this.boundedEvents["" + property].push({
            handler,
            context: cntxt,
            id
          });
        }
      } else if (!this.isHandlerPresent(this.boundedEvents["" + property], handler)) {
        this.boundedEvents["" + property].push({
          handler,
          context: cntxt
        });
      }
    };
    Observer4.prototype.off = function(property, handler, id) {
      if (this.notExist(property)) {
        return;
      }
      var curObject = getValue(property, this.boundedEvents);
      if (handler) {
        for (var i = 0; i < curObject.length; i++) {
          if (id) {
            if (curObject[parseInt(i.toString(), 10)].id === id) {
              curObject.splice(i, 1);
              var indexLocation = this.ranArray.indexOf(id);
              if (indexLocation !== -1) {
                this.ranArray.splice(indexLocation, 1);
              }
              break;
            }
          } else if (handler === curObject[parseInt(i.toString(), 10)].handler) {
            curObject.splice(i, 1);
            break;
          }
        }
      } else {
        delete this.boundedEvents["" + property];
      }
    };
    Observer4.prototype.notify = function(property, argument, successHandler, errorHandler) {
      if (this.notExist(property)) {
        if (successHandler) {
          successHandler.call(this, argument);
        }
        return;
      }
      if (argument) {
        argument.name = property;
      }
      var blazor = "Blazor";
      var curObject = getValue(property, this.boundedEvents).slice(0);
      if (window["" + blazor]) {
        return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);
      } else {
        for (var _i = 0, curObject_1 = curObject; _i < curObject_1.length; _i++) {
          var cur = curObject_1[_i];
          cur.handler.call(cur.context, argument);
        }
        if (successHandler) {
          successHandler.call(this, argument);
        }
      }
    };
    Observer4.prototype.blazorCallback = function(objs, argument, successHandler, errorHandler, index) {
      var _this = this;
      var isTrigger = index === objs.length - 1;
      if (index < objs.length) {
        var obj_1 = objs[parseInt(index.toString(), 10)];
        var promise = obj_1.handler.call(obj_1.context, argument);
        if (promise && typeof promise.then === "function") {
          if (!successHandler) {
            return promise;
          }
          promise.then(function(data) {
            data = typeof data === "string" && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data;
            extend(argument, argument, data, true);
            if (successHandler && isTrigger) {
              successHandler.call(obj_1.context, argument);
            } else {
              return _this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
            }
          }).catch(function(data) {
            if (errorHandler) {
              errorHandler.call(obj_1.context, typeof data === "string" && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data);
            }
          });
        } else if (successHandler && isTrigger) {
          successHandler.call(obj_1.context, argument);
        } else {
          return this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
        }
      }
    };
    Observer4.prototype.dateReviver = function(key, value) {
      var dPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
      if (isBlazor && typeof value === "string" && value.match(dPattern) !== null) {
        return new Date(value);
      }
      return value;
    };
    Observer4.prototype.isJson = function(value) {
      try {
        JSON.parse(value);
      } catch (e) {
        return false;
      }
      return true;
    };
    Observer4.prototype.destroy = function() {
      this.boundedEvents = this.context = void 0;
    };
    Observer4.prototype.offIntlEvents = function() {
      var eventsArr = this.boundedEvents["notifyExternalChange"];
      if (eventsArr) {
        for (var i = 0; i < eventsArr.length; i++) {
          var curContext = eventsArr[parseInt(i.toString(), 10)].context;
          if (curContext && curContext.detectFunction && curContext.randomId && curContext.isReactMock) {
            this.off("notifyExternalChange", curContext.detectFunction, curContext.randomId);
            i--;
          }
        }
        if (!this.boundedEvents["notifyExternalChange"].length) {
          delete this.boundedEvents["notifyExternalChange"];
        }
      }
    };
    Observer4.prototype.notExist = function(prop) {
      return Object.prototype.hasOwnProperty.call(this.boundedEvents, prop) === false || this.boundedEvents["" + prop].length <= 0;
    };
    Observer4.prototype.isHandlerPresent = function(boundedEvents, handler) {
      for (var _i = 0, boundedEvents_1 = boundedEvents; _i < boundedEvents_1.length; _i++) {
        var cur = boundedEvents_1[_i];
        if (cur.handler === handler) {
          return true;
        }
      }
      return false;
    };
    return Observer4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/base.js
var isColEName = new RegExp("]");
var Base = (
  /** @class */
  function() {
    function Base4(options, element2) {
      this.isRendered = false;
      this.isComplexArraySetter = false;
      this.isServerRendered = false;
      this.allowServerDataBinding = true;
      this.isProtectedOnChange = true;
      this.properties = {};
      this.changedProperties = {};
      this.oldProperties = {};
      this.bulkChanges = {};
      this.refreshing = false;
      this.ignoreCollectionWatch = false;
      this.finalUpdate = function() {
      };
      this.childChangedProperties = {};
      this.modelObserver = new Observer(this);
      if (!isUndefined(element2)) {
        if ("string" === typeof element2) {
          this.element = document.querySelector(element2);
        } else {
          this.element = element2;
        }
        if (!isNullOrUndefined(this.element)) {
          this.isProtectedOnChange = false;
          this.addInstance();
        }
      }
      if (!isUndefined(options)) {
        this.setProperties(options, true);
      }
      this.isDestroyed = false;
    }
    Base4.prototype.setProperties = function(prop, muteOnChange) {
      var prevDetection = this.isProtectedOnChange;
      this.isProtectedOnChange = !!muteOnChange;
      merge(this, prop);
      if (muteOnChange !== true) {
        merge(this.changedProperties, prop);
        this.dataBind();
      } else if (isBlazor() && this.isRendered) {
        this.serverDataBind(prop);
      }
      this.finalUpdate();
      this.changedProperties = {};
      this.oldProperties = {};
      this.isProtectedOnChange = prevDetection;
    };
    Base4.callChildDataBind = function(obj, parent) {
      var keys4 = Object.keys(obj);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        if (parent["" + key] instanceof Array) {
          for (var _a = 0, _b = parent["" + key]; _a < _b.length; _a++) {
            var obj_1 = _b[_a];
            if (obj_1.dataBind !== void 0) {
              obj_1.dataBind();
            }
          }
        } else {
          parent["" + key].dataBind();
        }
      }
    };
    Base4.prototype.clearChanges = function() {
      this.finalUpdate();
      this.changedProperties = {};
      this.oldProperties = {};
      this.childChangedProperties = {};
    };
    Base4.prototype.dataBind = function() {
      Base4.callChildDataBind(this.childChangedProperties, this);
      if (Object.getOwnPropertyNames(this.changedProperties).length) {
        var prevDetection = this.isProtectedOnChange;
        var newChanges = this.changedProperties;
        var oldChanges = this.oldProperties;
        this.clearChanges();
        this.isProtectedOnChange = true;
        this.onPropertyChanged(newChanges, oldChanges);
        this.isProtectedOnChange = prevDetection;
      }
    };
    Base4.prototype.serverDataBind = function(newChanges) {
      if (!isBlazor()) {
        return;
      }
      newChanges = newChanges ? newChanges : {};
      extend(this.bulkChanges, {}, newChanges, true);
      var sfBlazor = "sfBlazor";
      if (this.allowServerDataBinding && window["" + sfBlazor].updateModel) {
        window["" + sfBlazor].updateModel(this);
        this.bulkChanges = {};
      }
    };
    Base4.prototype.saveChanges = function(key, newValue, oldValue) {
      if (isBlazor()) {
        var newChanges = {};
        newChanges["" + key] = newValue;
        this.serverDataBind(newChanges);
      }
      if (this.isProtectedOnChange) {
        return;
      }
      this.oldProperties["" + key] = oldValue;
      this.changedProperties["" + key] = newValue;
      this.finalUpdate();
      this.finalUpdate = setImmediate(this.dataBind.bind(this));
    };
    Base4.prototype.addEventListener = function(eventName, handler) {
      this.modelObserver.on(eventName, handler);
    };
    Base4.prototype.removeEventListener = function(eventName, handler) {
      this.modelObserver.off(eventName, handler);
    };
    Base4.prototype.trigger = function(eventName, eventProp, successHandler, errorHandler) {
      var _this = this;
      if (this.isDestroyed !== true) {
        var prevDetection = this.isProtectedOnChange;
        this.isProtectedOnChange = false;
        var data = this.modelObserver.notify(eventName, eventProp, successHandler, errorHandler);
        if (isColEName.test(eventName)) {
          var handler = getValue(eventName, this);
          if (handler) {
            var blazor = "Blazor";
            if (window["" + blazor]) {
              var promise = handler.call(this, eventProp);
              if (promise && typeof promise.then === "function") {
                if (!successHandler) {
                  data = promise;
                } else {
                  promise.then(function(data2) {
                    if (successHandler) {
                      data2 = typeof data2 === "string" && _this.modelObserver.isJson(data2) ? JSON.parse(data2) : data2;
                      successHandler.call(_this, data2);
                    }
                  }).catch(function(data2) {
                    if (errorHandler) {
                      data2 = typeof data2 === "string" && _this.modelObserver.isJson(data2) ? JSON.parse(data2) : data2;
                      errorHandler.call(_this, data2);
                    }
                  });
                }
              } else if (successHandler) {
                successHandler.call(this, eventProp);
              }
            } else {
              handler.call(this, eventProp);
              if (successHandler) {
                successHandler.call(this, eventProp);
              }
            }
          } else if (successHandler) {
            successHandler.call(this, eventProp);
          }
        }
        this.isProtectedOnChange = prevDetection;
        return data;
      }
    };
    Base4.prototype.addInstance = function() {
      var moduleClass = "e-" + this.getModuleName().toLowerCase();
      addClass([this.element], ["e-lib", moduleClass]);
      if (!isNullOrUndefined(this.element.ej2_instances)) {
        this.element.ej2_instances.push(this);
      } else {
        setValue("ej2_instances", [this], this.element);
      }
    };
    Base4.prototype.destroy = function() {
      var _this = this;
      this.element.ej2_instances = this.element.ej2_instances ? this.element.ej2_instances.filter(function(i) {
        if (proxyToRaw) {
          return proxyToRaw(i) !== proxyToRaw(_this);
        }
        return i !== _this;
      }) : [];
      removeClass([this.element], ["e-" + this.getModuleName()]);
      if (this.element.ej2_instances.length === 0) {
        removeClass([this.element], ["e-lib"]);
      }
      this.clearChanges();
      this.modelObserver.destroy();
      this.isDestroyed = true;
    };
    return Base4;
  }()
);
var proxyToRaw;

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/notify-property-change.js
function getObject(instance, curKey, defaultValue, type) {
  if (!Object.prototype.hasOwnProperty.call(instance.properties, curKey) || !(instance.properties["" + curKey] instanceof type)) {
    instance.properties["" + curKey] = createInstance(type, [instance, curKey, defaultValue]);
  }
  return instance.properties["" + curKey];
}
function propertyGetter(defaultValue, curKey) {
  return function() {
    if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
      this.properties["" + curKey] = defaultValue;
    }
    return this.properties["" + curKey];
  };
}
function propertySetter(defaultValue, curKey) {
  return function(newValue) {
    if (this.properties["" + curKey] !== newValue) {
      var oldVal = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties["" + curKey] : defaultValue;
      this.saveChanges(curKey, newValue, oldVal);
      this.properties["" + curKey] = newValue;
    }
  };
}
function complexGetter(defaultValue, curKey, type) {
  return function() {
    return getObject(this, curKey, defaultValue, type);
  };
}
function complexSetter(defaultValue, curKey, type) {
  return function(newValue) {
    getObject(this, curKey, defaultValue, type).setProperties(newValue);
  };
}
function Property(defaultValue) {
  return function(target, key) {
    var propertyDescriptor = {
      set: propertySetter(defaultValue, key),
      get: propertyGetter(defaultValue, key),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection(target, key, "prop", defaultValue);
  };
}
function Complex(defaultValue, type) {
  return function(target, key) {
    var propertyDescriptor = {
      set: complexSetter(defaultValue, key, type),
      get: complexGetter(defaultValue, key, type),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection(target, key, "complexProp", defaultValue, type);
  };
}
function Event2() {
  return function(target, key) {
    var eventDescriptor = {
      set: function(newValue) {
        var oldValue = this.properties["" + key];
        if (oldValue !== newValue) {
          var finalContext = getParentContext(this, key);
          if (isUndefined(oldValue) === false) {
            finalContext.context.removeEventListener(finalContext.prefix, oldValue);
          }
          finalContext.context.addEventListener(finalContext.prefix, newValue);
          this.properties["" + key] = newValue;
        }
      },
      get: propertyGetter(void 0, key),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, eventDescriptor);
    addPropertyCollection(target, key, "event");
  };
}
function NotifyPropertyChanges(classConstructor) {
}
function addPropertyCollection(target, key, propertyType, defaultValue, type) {
  if (isUndefined(target.propList)) {
    target.propList = {
      props: [],
      complexProps: [],
      colProps: [],
      events: [],
      propNames: [],
      complexPropNames: [],
      colPropNames: [],
      eventNames: []
    };
  }
  target.propList[propertyType + "s"].push({
    propertyName: key,
    defaultValue,
    type
  });
  target.propList[propertyType + "Names"].push(key);
}
function getParentContext(context, prefix) {
  if (Object.prototype.hasOwnProperty.call(context, "parentObj") === false) {
    return {
      context,
      prefix
    };
  } else {
    var curText = getValue("propName", context);
    if (curText) {
      prefix = curText + "-" + prefix;
    }
    return getParentContext(getValue("parentObj", context), prefix);
  }
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/animation.js
var __extends = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate2 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Animation = (
  /** @class */
  function(_super) {
    __extends(Animation5, _super);
    function Animation5(options) {
      var _this = _super.call(this, options, void 0) || this;
      _this.easing = {
        ease: "cubic-bezier(0.250, 0.100, 0.250, 1.000)",
        linear: "cubic-bezier(0.250, 0.250, 0.750, 0.750)",
        easeIn: "cubic-bezier(0.420, 0.000, 1.000, 1.000)",
        easeOut: "cubic-bezier(0.000, 0.000, 0.580, 1.000)",
        easeInOut: "cubic-bezier(0.420, 0.000, 0.580, 1.000)",
        elasticInOut: "cubic-bezier(0.5,-0.58,0.38,1.81)",
        elasticIn: "cubic-bezier(0.17,0.67,0.59,1.81)",
        elasticOut: "cubic-bezier(0.7,-0.75,0.99,1.01)"
      };
      return _this;
    }
    Animation_1 = Animation5;
    Animation5.prototype.animate = function(element2, options) {
      options = !options ? {} : options;
      var model = this.getModel(options);
      if (typeof element2 === "string") {
        var elements = Array.prototype.slice.call(selectAll(element2, document));
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
          var element_1 = elements_1[_i];
          model.element = element_1;
          Animation_1.delayAnimation(model);
        }
      } else {
        model.element = element2;
        Animation_1.delayAnimation(model);
      }
    };
    Animation5.stop = function(element2, model) {
      element2.style.animation = "";
      element2.removeAttribute("e-animate");
      var animationId = element2.getAttribute("e-animation-id");
      if (animationId) {
        var frameId = parseInt(animationId, 10);
        cancelAnimationFrame(frameId);
        element2.removeAttribute("e-animation-id");
      }
      if (model && model.end) {
        model.end.call(this, model);
      }
    };
    Animation5.delayAnimation = function(model) {
      if (animationMode === "Disable" || animationMode === GlobalAnimationMode.Disable) {
        if (model.begin) {
          model.begin.call(this, model);
        }
        if (model.end) {
          model.end.call(this, model);
        }
      } else {
        if (model.delay) {
          setTimeout(function() {
            Animation_1.applyAnimation(model);
          }, model.delay);
        } else {
          Animation_1.applyAnimation(model);
        }
      }
    };
    Animation5.applyAnimation = function(model) {
      var _this = this;
      model.timeStamp = 0;
      var step = 0;
      var timerId = 0;
      var prevTimeStamp = 0;
      var duration = model.duration;
      model.element.setAttribute("e-animate", "true");
      var startAnimation = function(timeStamp) {
        try {
          if (timeStamp) {
            prevTimeStamp = prevTimeStamp === 0 ? timeStamp : prevTimeStamp;
            model.timeStamp = timeStamp + model.timeStamp - prevTimeStamp;
            prevTimeStamp = timeStamp;
            if (!step && model.begin) {
              model.begin.call(_this, model);
            }
            step = step + 1;
            var avg = model.timeStamp / step;
            if (model.timeStamp < duration && model.timeStamp + avg < duration && model.element.getAttribute("e-animate")) {
              model.element.style.animation = model.name + " " + model.duration + "ms " + model.timingFunction;
              if (model.progress) {
                model.progress.call(_this, model);
              }
              requestAnimationFrame(startAnimation);
            } else {
              cancelAnimationFrame(timerId);
              model.element.removeAttribute("e-animation-id");
              model.element.removeAttribute("e-animate");
              model.element.style.animation = "";
              if (model.end) {
                model.end.call(_this, model);
              }
            }
          } else {
            timerId = requestAnimationFrame(startAnimation);
            model.element.setAttribute("e-animation-id", timerId.toString());
          }
        } catch (e) {
          cancelAnimationFrame(timerId);
          model.element.removeAttribute("e-animation-id");
          if (model.fail) {
            model.fail.call(_this, e);
          }
        }
      };
      startAnimation();
    };
    Animation5.prototype.getModel = function(options) {
      return {
        name: options.name || this.name,
        delay: options.delay || this.delay,
        duration: options.duration !== void 0 ? options.duration : this.duration,
        begin: options.begin || this.begin,
        end: options.end || this.end,
        fail: options.fail || this.fail,
        progress: options.progress || this.progress,
        timingFunction: this.easing[options.timingFunction] ? this.easing[options.timingFunction] : options.timingFunction || this.easing[this.timingFunction]
      };
    };
    Animation5.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Animation5.prototype.getModuleName = function() {
      return "animation";
    };
    Animation5.prototype.destroy = function() {
    };
    var Animation_1;
    __decorate2([Property("FadeIn")], Animation5.prototype, "name", void 0);
    __decorate2([Property(400)], Animation5.prototype, "duration", void 0);
    __decorate2([Property("ease")], Animation5.prototype, "timingFunction", void 0);
    __decorate2([Property(0)], Animation5.prototype, "delay", void 0);
    __decorate2([Event2()], Animation5.prototype, "progress", void 0);
    __decorate2([Event2()], Animation5.prototype, "begin", void 0);
    __decorate2([Event2()], Animation5.prototype, "end", void 0);
    __decorate2([Event2()], Animation5.prototype, "fail", void 0);
    Animation5 = Animation_1 = __decorate2([NotifyPropertyChanges], Animation5);
    return Animation5;
  }(Base)
);
var animationMode;
var GlobalAnimationMode;
(function(GlobalAnimationMode4) {
  GlobalAnimationMode4["Default"] = "Default";
  GlobalAnimationMode4["Enable"] = "Enable";
  GlobalAnimationMode4["Disable"] = "Disable";
})(GlobalAnimationMode || (GlobalAnimationMode = {}));

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/module-loader.js
var MODULE_SUFFIX = "Module";
var ModuleLoader = (
  /** @class */
  function() {
    function ModuleLoader4(parent) {
      this.loadedModules = [];
      this.parent = parent;
    }
    ModuleLoader4.prototype.inject = function(requiredModules, moduleList) {
      var reqLength = requiredModules.length;
      if (reqLength === 0) {
        this.clean();
        return;
      }
      if (this.loadedModules.length) {
        this.clearUnusedModule(requiredModules);
      }
      for (var i = 0; i < reqLength; i++) {
        var modl = requiredModules[parseInt(i.toString(), 10)];
        for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
          var module = moduleList_1[_i];
          var modName = modl.member;
          if (module && module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
            var moduleObject = createInstance(module, modl.args);
            var memberName = this.getMemberName(modName);
            if (modl.isProperty) {
              setValue(memberName, module, this.parent);
            } else {
              setValue(memberName, moduleObject, this.parent);
            }
            var loadedModule = modl;
            loadedModule.member = memberName;
            this.loadedModules.push(loadedModule);
          }
        }
      }
    };
    ModuleLoader4.prototype.clean = function() {
      for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
        var modules = _a[_i];
        if (!modules.isProperty) {
          getValue(modules.member, this.parent).destroy();
        }
      }
      this.loadedModules = [];
    };
    ModuleLoader4.prototype.getNonInjectedModules = function(requiredModules) {
      var _this = this;
      return requiredModules.filter(function(module) {
        return !_this.isModuleLoaded(module.member);
      });
    };
    ModuleLoader4.prototype.clearUnusedModule = function(moduleList) {
      var _this = this;
      var usedModules = moduleList.map(function(arg) {
        return _this.getMemberName(arg.member);
      });
      var removableModule = this.loadedModules.filter(function(module) {
        return usedModules.indexOf(module.member) === -1;
      });
      for (var _i = 0, removableModule_1 = removableModule; _i < removableModule_1.length; _i++) {
        var mod = removableModule_1[_i];
        if (!mod.isProperty) {
          getValue(mod.member, this.parent).destroy();
        }
        this.loadedModules.splice(this.loadedModules.indexOf(mod), 1);
        deleteObject(this.parent, mod.member);
      }
    };
    ModuleLoader4.prototype.getMemberName = function(name) {
      return name[0].toLowerCase() + name.substring(1) + MODULE_SUFFIX;
    };
    ModuleLoader4.prototype.isModuleLoaded = function(modName) {
      for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
        var mod = _a[_i];
        if (mod.member === this.getMemberName(modName)) {
          return true;
        }
      }
      return false;
    };
    return ModuleLoader4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/child-property.js
var ChildProperty = (
  /** @class */
  function() {
    function ChildProperty4(parent, propName, defaultValue, isArray) {
      this.isComplexArraySetter = false;
      this.properties = {};
      this.changedProperties = {};
      this.childChangedProperties = {};
      this.oldProperties = {};
      this.finalUpdate = function() {
      };
      this.callChildDataBind = getValue("callChildDataBind", Base);
      this.parentObj = parent;
      this.controlParent = this.parentObj.controlParent || this.parentObj;
      this.propName = propName;
      this.isParentArray = isArray;
      this.setProperties(defaultValue, true);
    }
    ChildProperty4.prototype.updateChange = function(val, propName) {
      if (val === true) {
        this.parentObj.childChangedProperties["" + propName] = val;
      } else {
        delete this.parentObj.childChangedProperties["" + propName];
      }
      if (this.parentObj.updateChange) {
        this.parentObj.updateChange(val, this.parentObj.propName);
      }
    };
    ChildProperty4.prototype.updateTimeOut = function() {
      if (this.parentObj.updateTimeOut) {
        this.parentObj.finalUpdate();
        this.parentObj.updateTimeOut();
      } else {
        var changeTime_1 = setTimeout(this.parentObj.dataBind.bind(this.parentObj));
        var clearUpdate = function() {
          clearTimeout(changeTime_1);
        };
        this.finalUpdate = clearUpdate;
      }
    };
    ChildProperty4.prototype.clearChanges = function() {
      this.finalUpdate();
      this.updateChange(false, this.propName);
      this.oldProperties = {};
      this.changedProperties = {};
    };
    ChildProperty4.prototype.setProperties = function(prop, muteOnChange) {
      if (muteOnChange === true) {
        merge(this, prop);
        this.updateChange(false, this.propName);
        this.clearChanges();
      } else {
        merge(this, prop);
      }
    };
    ChildProperty4.prototype.dataBind = function() {
      this.callChildDataBind(this.childChangedProperties, this);
      if (this.isParentArray) {
        var curIndex = this.parentObj[this.propName].indexOf(this);
        if (Object.keys(this.changedProperties).length) {
          setValue(this.propName + "." + curIndex, this.changedProperties, this.parentObj.changedProperties);
          setValue(this.propName + "." + curIndex, this.oldProperties, this.parentObj.oldProperties);
        }
      } else {
        this.parentObj.changedProperties[this.propName] = this.changedProperties;
        this.parentObj.oldProperties[this.propName] = this.oldProperties;
      }
      this.clearChanges();
    };
    ChildProperty4.prototype.saveChanges = function(key, newValue, oldValue, restrictServerDataBind) {
      if (this.controlParent.isProtectedOnChange) {
        return;
      }
      if (!restrictServerDataBind) {
        this.serverDataBind(key, newValue, true);
      }
      this.oldProperties["" + key] = oldValue;
      this.changedProperties["" + key] = newValue;
      this.updateChange(true, this.propName);
      this.finalUpdate();
      this.updateTimeOut();
    };
    ChildProperty4.prototype.serverDataBind = function(key, value, isSaveChanges, action) {
      if (isBlazor() && !this.parentObj.isComplexArraySetter) {
        var parent_1;
        var newChanges = {};
        var parentKey = isSaveChanges ? this.getParentKey(true) + "." + key : key;
        if (parentKey.indexOf(".") !== -1) {
          var complexKeys = parentKey.split(".");
          parent_1 = newChanges;
          for (var i = 0; i < complexKeys.length; i++) {
            var isFinal = i === complexKeys.length - 1;
            parent_1[complexKeys[parseInt(i.toString(), 10)]] = isFinal ? value : {};
            parent_1 = isFinal ? parent_1 : parent_1[complexKeys[parseInt(i.toString(), 10)]];
          }
        } else {
          newChanges["" + parentKey] = {};
          parent_1 = newChanges["" + parentKey];
          newChanges["" + parentKey]["" + key] = value;
        }
        if (this.isParentArray) {
          var actionProperty = "ejsAction";
          parent_1["" + actionProperty] = action ? action : "none";
        }
        this.controlParent.serverDataBind(newChanges);
      }
    };
    ChildProperty4.prototype.getParentKey = function(isSaveChanges) {
      var index = "";
      var propName = this.propName;
      if (this.isParentArray) {
        index = this.parentObj[this.propName].indexOf(this);
        var valueLength = this.parentObj[this.propName].length;
        valueLength = isSaveChanges ? valueLength : valueLength > 0 ? valueLength - 1 : 0;
        index = index !== -1 ? "-" + index : "-" + valueLength;
        propName = propName + index;
      }
      if (this.controlParent !== this.parentObj) {
        propName = this.parentObj.getParentKey() + "." + this.propName + index;
      }
      return propName;
    };
    return ChildProperty4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/hijri-parser.js
var HijriParser;
(function(HijriParser4) {
  var dateCorrection = [28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348, 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939, 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530, 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120, 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711, 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302, 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893, 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483, 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074, 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665, 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254, 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845, 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436, 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027, 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617, 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208, 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798, 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389, 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980, 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570, 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161, 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751, 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342, 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932, 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523, 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114, 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704, 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295, 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885, 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476, 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066, 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657, 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248, 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838, 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429, 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019, 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611, 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200, 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792, 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383, 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973, 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564, 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154, 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745, 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335, 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926, 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517, 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107, 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698, 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288, 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879, 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469, 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061, 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651, 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242, 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832, 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423, 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014, 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603, 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195, 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785, 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376, 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967, 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557, 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68e3, 68030, 68060, 68089, 68119, 68148, 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738, 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330, 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919, 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510, 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101, 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691, 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282, 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872, 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464, 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053, 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645, 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235, 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826, 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416, 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007, 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598, 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188, 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779, 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369, 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960, 79990];
  function getHijriDate(gDate) {
    var day = gDate.getDate();
    var month4 = gDate.getMonth();
    var year = gDate.getFullYear();
    var tMonth = month4 + 1;
    var tYear = year;
    if (tMonth < 3) {
      tYear -= 1;
      tMonth += 12;
    }
    var yPrefix = Math.floor(tYear / 100);
    var julilanOffset = yPrefix - Math.floor(yPrefix / 4) - 2;
    var julianNumber = Math.floor(365.25 * (tYear + 4716)) + Math.floor(30.6001 * (tMonth + 1)) + day - julilanOffset - 1524;
    yPrefix = Math.floor((julianNumber - 186721625e-2) / 36524.25);
    julilanOffset = yPrefix - Math.floor(yPrefix / 4) + 1;
    var b = julianNumber + julilanOffset + 1524;
    var c = Math.floor((b - 122.1) / 365.25);
    var d = Math.floor(365.25 * c);
    var tempMonth = Math.floor((b - d) / 30.6001);
    day = b - d - Math.floor(30.6001 * tempMonth);
    month4 = Math.floor((b - d) / 20.6001);
    if (month4 > 13) {
      c += 1;
      month4 -= 12;
    }
    month4 -= 1;
    year = c - 4716;
    var modifiedJulianDate = julianNumber - 24e5;
    var iyear = 10631 / 30;
    var z = julianNumber - 1948084;
    var cyc = Math.floor(z / 10631);
    z = z - 10631 * cyc;
    var j = Math.floor((z - 0.1335) / iyear);
    var iy = 30 * cyc + j;
    z = z - Math.floor(j * iyear + 0.1335);
    var im = Math.floor((z + 28.5001) / 29.5);
    if (im === 13) {
      im = 12;
    }
    var tempDay = z - Math.floor(29.5001 * im - 29);
    var i = 0;
    for (; i < dateCorrection.length; i++) {
      if (dateCorrection[parseInt(i.toString(), 10)] > modifiedJulianDate) {
        break;
      }
    }
    var iln = i + 16260;
    var ii = Math.floor((iln - 1) / 12);
    var hYear = ii + 1;
    var hmonth = iln - 12 * ii;
    var hDate = modifiedJulianDate - dateCorrection[i - 1] + 1;
    if ((hDate + "").length > 2) {
      hDate = tempDay;
      hmonth = im;
      hYear = iy;
    }
    return {
      year: hYear,
      month: hmonth,
      date: hDate
    };
  }
  HijriParser4.getHijriDate = getHijriDate;
  function toGregorian(year, month4, day) {
    var iy = year;
    var im = month4;
    var id = day;
    var ii = iy - 1;
    var iln = ii * 12 + 1 + (im - 1);
    var i = iln - 16260;
    var mcjdn = id + dateCorrection[i - 1] - 1;
    var julianDate = mcjdn + 24e5;
    var z = Math.floor(julianDate + 0.5);
    var a = Math.floor((z - 186721625e-2) / 36524.25);
    a = z + 1 + a - Math.floor(a / 4);
    var b = a + 1524;
    var c = Math.floor((b - 122.1) / 365.25);
    var d = Math.floor(365.25 * c);
    var e = Math.floor((b - d) / 30.6001);
    var gDay = b - d - Math.floor(e * 30.6001);
    var gMonth = e - (e > 13.5 ? 13 : 1);
    var gYear = c - (gMonth > 2.5 ? 4716 : 4715);
    if (gYear <= 0) {
      gMonth--;
    }
    return /* @__PURE__ */ new Date(gYear + "/" + gMonth + "/" + gDay);
  }
  HijriParser4.toGregorian = toGregorian;
})(HijriParser || (HijriParser = {}));

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js
var abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
var standalone = "stand-alone";
var weekdayKey = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
var timeSetter = {
  m: "getMinutes",
  h: "getHours",
  H: "getHours",
  s: "getSeconds",
  d: "getDate",
  f: "getMilliseconds"
};
var datePartMatcher = {
  "M": "month",
  "d": "day",
  "E": "weekday",
  "c": "weekday",
  "y": "year",
  "m": "minute",
  "h": "hour",
  "H": "hour",
  "s": "second",
  "L": "month",
  "a": "designator",
  "z": "timeZone",
  "Z": "timeZone",
  "G": "era",
  "f": "milliseconds"
};
var timeSeparator = "timeSeparator";
var DateFormat2 = (
  /** @class */
  function() {
    function DateFormat7() {
    }
    DateFormat7.dateFormat = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase.getDependables(cldr, culture, option.calendar);
      var numObject = getValue("parserObject.numbers", dependable);
      var dateObject = dependable.dateObject;
      var formatOptions = {
        isIslamic: IntlBase.islamicRegex.test(option.calendar)
      };
      if (isBlazor() && option.isServerRendered) {
        option = IntlBase.compareBlazorDateFormats(option, culture);
      }
      var resPattern = option.format || IntlBase.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor() ? culture : "");
      formatOptions.dateSeperator = isBlazor() ? getValue("dateSeperator", dateObject) : IntlBase.getDateSeparator(dependable.dateObject);
      if (isUndefined(resPattern)) {
        throwError("Format options or type given must be invalid");
      } else {
        resPattern = IntlBase.ConvertDateToWeekFormat(resPattern);
        if (isBlazor()) {
          resPattern = resPattern.replace(/tt/, "a");
        }
        formatOptions.pattern = resPattern;
        formatOptions.numMapper = isBlazor() ? extend({}, numObject) : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
        var patternMatch = resPattern.match(abbreviateRegexGlobal) || [];
        for (var _i = 0, patternMatch_1 = patternMatch; _i < patternMatch_1.length; _i++) {
          var str = patternMatch_1[_i];
          var len = str.length;
          var char = str[0];
          if (char === "K") {
            char = "h";
          }
          switch (char) {
            case "E":
            case "c":
              if (isBlazor()) {
                formatOptions.weekday = getValue("days." + IntlBase.monthIndex["" + len], dateObject);
              } else {
                formatOptions.weekday = dependable.dateObject["" + IntlBase.days]["" + standalone][IntlBase.monthIndex["" + len]];
              }
              break;
            case "M":
            case "L":
              if (isBlazor()) {
                formatOptions.month = getValue("months." + IntlBase.monthIndex["" + len], dateObject);
              } else {
                formatOptions.month = dependable.dateObject["" + IntlBase.month]["" + standalone][IntlBase.monthIndex["" + len]];
              }
              break;
            case "a":
              formatOptions.designator = isBlazor() ? getValue("dayPeriods", dateObject) : getValue("dayPeriods.format.wide", dateObject);
              break;
            case "G": {
              var eText = len <= 3 ? "eraAbbr" : len === 4 ? "eraNames" : "eraNarrow";
              formatOptions.era = isBlazor() ? getValue("eras", dateObject) : getValue("eras." + eText, dependable.dateObject);
              break;
            }
            case "z":
              formatOptions.timeZone = getValue("dates.timeZoneNames", dependable.parserObject);
              break;
          }
        }
      }
      return function(value) {
        if (isNaN(value.getDate())) {
          return null;
        }
        return _this.intDateFormatter(value, formatOptions);
      };
    };
    DateFormat7.intDateFormatter = function(value, options) {
      var pattern = options.pattern;
      var ret = "";
      var matches5 = pattern.match(IntlBase.dateParseRegex);
      var dObject = this.getCurrentDateValue(value, options.isIslamic);
      for (var _i = 0, matches_1 = matches5; _i < matches_1.length; _i++) {
        var match = matches_1[_i];
        var length_1 = match.length;
        var char = match[0];
        if (char === "K") {
          char = "h";
        }
        var curval = void 0;
        var curvalstr = "";
        var isNumber = void 0;
        var processNumber = void 0;
        var curstr = "";
        switch (char) {
          case "M":
          case "L":
            curval = dObject.month;
            if (length_1 > 2) {
              ret += options.month["" + curval];
            } else {
              isNumber = true;
            }
            break;
          case "E":
          case "c":
            ret += options.weekday["" + weekdayKey[value.getDay()]];
            break;
          case "H":
          case "h":
          case "m":
          case "s":
          case "d":
          case "f":
            isNumber = true;
            if (char === "d") {
              curval = dObject.date;
            } else if (char === "f") {
              isNumber = false;
              processNumber = true;
              curvalstr = value["" + timeSetter["" + char]]().toString();
              curvalstr = curvalstr.substring(0, length_1);
              var curlength = curvalstr.length;
              if (length_1 !== curlength) {
                if (length_1 > 3) {
                  continue;
                }
                for (var i = 0; i < length_1 - curlength; i++) {
                  curvalstr = "0" + curvalstr.toString();
                }
              }
              curstr += curvalstr;
            } else {
              curval = value["" + timeSetter["" + char]]();
            }
            if (char === "h") {
              curval = curval % 12 || 12;
            }
            break;
          case "y":
            processNumber = true;
            curstr += dObject.year;
            if (length_1 === 2) {
              curstr = curstr.substr(curstr.length - 2);
            }
            break;
          case "a": {
            var desig = value.getHours() < 12 ? "am" : "pm";
            ret += options.designator["" + desig];
            break;
          }
          case "G": {
            var dec = value.getFullYear() < 0 ? 0 : 1;
            var retu = options.era["" + dec];
            if (isNullOrUndefined(retu)) {
              retu = options.era[dec ? 0 : 1];
            }
            ret += retu || "";
            break;
          }
          case "'":
            ret += match === "''" ? "'" : match.replace(/'/g, "");
            break;
          case "z": {
            var timezone = value.getTimezoneOffset();
            var pattern_1 = length_1 < 4 ? "+H;-H" : options.timeZone.hourFormat;
            pattern_1 = pattern_1.replace(/:/g, options.numMapper.timeSeparator);
            if (timezone === 0) {
              ret += options.timeZone.gmtZeroFormat;
            } else {
              processNumber = true;
              curstr = this.getTimeZoneValue(timezone, pattern_1);
            }
            curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
            break;
          }
          case ":":
            ret += options.numMapper.numberSymbols["" + timeSeparator];
            break;
          case "/":
            ret += options.dateSeperator;
            break;
          case "W":
            isNumber = true;
            curval = IntlBase.getWeekOfYear(value);
            break;
          default:
            ret += match;
        }
        if (isNumber) {
          processNumber = true;
          curstr = this.checkTwodigitNumber(curval, length_1);
        }
        if (processNumber) {
          ret += ParserBase.convertValueParts(curstr, IntlBase.latnParseRegex, options.numMapper.mapper);
        }
      }
      return ret;
    };
    DateFormat7.getCurrentDateValue = function(value, isIslamic) {
      if (isIslamic) {
        return HijriParser.getHijriDate(value);
      }
      return {
        year: value.getFullYear(),
        month: value.getMonth() + 1,
        date: value.getDate()
      };
    };
    DateFormat7.checkTwodigitNumber = function(val, len) {
      var ret = val + "";
      if (len === 2 && ret.length !== 2) {
        return "0" + ret;
      }
      return ret;
    };
    DateFormat7.getTimeZoneValue = function(tVal, pattern) {
      var _this = this;
      var splt = pattern.split(";");
      var curPattern = splt[tVal > 0 ? 1 : 0];
      var no = Math.abs(tVal);
      return curPattern = curPattern.replace(/HH?|mm/g, function(str) {
        var len = str.length;
        var ishour = str.indexOf("H") !== -1;
        return _this.checkTwodigitNumber(Math.floor(ishour ? no / 60 : no % 60), len);
      });
    };
    return DateFormat7;
  }()
);
setDateFormat(DateFormat2);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js
var errorText = {
  "ms": "minimumSignificantDigits",
  "ls": "maximumSignificantDigits",
  "mf": "minimumFractionDigits",
  "lf": "maximumFractionDigits"
};
var percentSign = "percentSign";
var minusSign = "minusSign";
var mapper = ["infinity", "nan", "group", "decimal", "exponential"];
var NumberFormat2 = (
  /** @class */
  function() {
    function NumberFormat7() {
    }
    NumberFormat7.numberFormatter = function(culture, option, cldr) {
      var _this = this;
      var fOptions = extend({}, option);
      var cOptions = {};
      var dOptions = {};
      var symbolPattern;
      var dependable = IntlBase.getDependables(cldr, culture, "", true);
      var numObject = dependable.numericObject;
      dOptions.numberMapper = isBlazor() ? extend({}, numObject) : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true);
      dOptions.currencySymbol = isBlazor() ? getValue("currencySymbol", numObject) : IntlBase.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol, option.ignoreCurrency);
      dOptions.percentSymbol = isBlazor() ? getValue("numberSymbols.percentSign", numObject) : dOptions.numberMapper.numberSymbols["" + percentSign];
      dOptions.minusSymbol = isBlazor() ? getValue("numberSymbols.minusSign", numObject) : dOptions.numberMapper.numberSymbols["" + minusSign];
      var symbols = dOptions.numberMapper.numberSymbols;
      if (option.format && !IntlBase.formatRegex.test(option.format)) {
        cOptions = IntlBase.customFormat(option.format, dOptions, dependable.numericObject);
        if (!isUndefined(fOptions.useGrouping) && fOptions.useGrouping) {
          fOptions.useGrouping = cOptions.pData.useGrouping;
        }
      } else {
        extend(fOptions, IntlBase.getProperNumericSkeleton(option.format || "N"));
        fOptions.isCurrency = fOptions.type === "currency";
        fOptions.isPercent = fOptions.type === "percent";
        if (!isBlazor()) {
          symbolPattern = IntlBase.getSymbolPattern(fOptions.type, dOptions.numberMapper.numberSystem, dependable.numericObject, fOptions.isAccount);
        }
        fOptions.groupOne = this.checkValueRange(fOptions.maximumSignificantDigits, fOptions.minimumSignificantDigits, true);
        this.checkValueRange(fOptions.maximumFractionDigits, fOptions.minimumFractionDigits, false, true);
        if (!isUndefined(fOptions.fractionDigits)) {
          fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits;
        }
        if (isUndefined(fOptions.useGrouping)) {
          fOptions.useGrouping = true;
        }
        if (fOptions.isCurrency && !isBlazor()) {
          symbolPattern = symbolPattern.replace(/\u00A4/g, IntlBase.defaultCurrency);
        }
        if (!isBlazor()) {
          var split = symbolPattern.split(";");
          cOptions.nData = IntlBase.getFormatData(split[1] || "-" + split[0], true, dOptions.currencySymbol);
          cOptions.pData = IntlBase.getFormatData(split[0], false, dOptions.currencySymbol);
          if (fOptions.useGrouping) {
            fOptions.groupSeparator = symbols[mapper[2]];
            fOptions.groupData = this.getGroupingDetails(split[0]);
          }
        } else {
          cOptions.nData = extend({}, {}, getValue(fOptions.type + "nData", numObject));
          cOptions.pData = extend({}, {}, getValue(fOptions.type + "pData", numObject));
          if (fOptions.type === "currency" && option.currency) {
            IntlBase.replaceBlazorCurrency([cOptions.pData, cOptions.nData], dOptions.currencySymbol, option.currency);
          }
        }
        var minFrac = isUndefined(fOptions.minimumFractionDigits);
        if (minFrac) {
          fOptions.minimumFractionDigits = cOptions.nData.minimumFraction;
        }
        if (isUndefined(fOptions.maximumFractionDigits)) {
          var mval = cOptions.nData.maximumFraction;
          fOptions.maximumFractionDigits = isUndefined(mval) && fOptions.isPercent ? 0 : mval;
        }
        var mfrac = fOptions.minimumFractionDigits;
        var lfrac = fOptions.maximumFractionDigits;
        if (!isUndefined(mfrac) && !isUndefined(lfrac)) {
          if (mfrac > lfrac) {
            fOptions.maximumFractionDigits = mfrac;
          }
        }
      }
      extend(cOptions.nData, fOptions);
      extend(cOptions.pData, fOptions);
      return function(value) {
        if (isNaN(value)) {
          return symbols[mapper[1]];
        } else if (!isFinite(value)) {
          return symbols[mapper[0]];
        }
        return _this.intNumberFormatter(value, cOptions, dOptions, option);
      };
    };
    NumberFormat7.getGroupingDetails = function(pattern) {
      var ret = {};
      var match = pattern.match(IntlBase.negativeDataRegex);
      if (match && match[4]) {
        var pattern_1 = match[4];
        var p = pattern_1.lastIndexOf(",");
        if (p !== -1) {
          var temp = pattern_1.split(".")[0];
          ret.primary = temp.length - p - 1;
          var s = pattern_1.lastIndexOf(",", p - 1);
          if (s !== -1) {
            ret.secondary = p - 1 - s;
          }
        }
      }
      return ret;
    };
    NumberFormat7.checkValueRange = function(val1, val2, checkbothExist, isFraction) {
      var decide = isFraction ? "f" : "s";
      var dint = 0;
      var str1 = errorText["l" + decide];
      var str2 = errorText["m" + decide];
      if (!isUndefined(val1)) {
        this.checkRange(val1, str1, isFraction);
        dint++;
      }
      if (!isUndefined(val2)) {
        this.checkRange(val2, str2, isFraction);
        dint++;
      }
      if (dint === 2) {
        if (val1 < val2) {
          throwError(str2 + "specified must be less than the" + str1);
        } else {
          return true;
        }
      } else if (checkbothExist && dint === 1) {
        throwError("Both" + str2 + "and" + str2 + "must be present");
      }
      return false;
    };
    NumberFormat7.checkRange = function(val, text, isFraction) {
      var range = isFraction ? [0, 20] : [1, 21];
      if (val < range[0] || val > range[1]) {
        throwError(text + "value must be within the range" + range[0] + "to" + range[1]);
      }
    };
    NumberFormat7.intNumberFormatter = function(value, fOptions, dOptions, option) {
      var curData;
      if (isUndefined(fOptions.nData.type)) {
        return void 0;
      } else {
        if (value < 0) {
          value = value * -1;
          curData = fOptions.nData;
        } else if (value === 0) {
          curData = fOptions.zeroData || fOptions.pData;
        } else {
          curData = fOptions.pData;
        }
        var fValue = "";
        if (curData.isPercent) {
          value = value * 100;
        }
        if (curData.groupOne) {
          fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits);
        } else {
          fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits, option);
          if (curData.minimumIntegerDigits) {
            fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);
          }
          if (dOptions.isCustomFormat && curData.minimumFractionDigits < curData.maximumFractionDigits && /\d+\.\d+/.test(fValue)) {
            var temp = fValue.split(".");
            var decimalPart = temp[1];
            var len = decimalPart.length;
            for (var i = len - 1; i >= 0; i--) {
              if (decimalPart[parseInt(i.toString(), 10)] === "0" && i >= curData.minimumFractionDigits) {
                decimalPart = decimalPart.slice(0, i);
              } else {
                break;
              }
            }
            fValue = temp[0] + "." + decimalPart;
          }
        }
        if (curData.type === "scientific") {
          fValue = value.toExponential(curData.maximumFractionDigits);
          fValue = fValue.replace("e", dOptions.numberMapper.numberSymbols[mapper[4]]);
        }
        fValue = fValue.replace(".", dOptions.numberMapper.numberSymbols[mapper[3]]);
        fValue = curData.format === "#,###,,;(#,###,,)" ? this.customPivotFormat(parseInt(fValue, 10)) : fValue;
        if (curData.useGrouping) {
          fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ",", dOptions.numberMapper.numberSymbols[mapper[3]] || ".", curData.groupData.secondary);
        }
        fValue = ParserBase.convertValueParts(fValue, IntlBase.latnParseRegex, dOptions.numberMapper.mapper);
        if (curData.nlead === "N/A") {
          return curData.nlead;
        } else {
          if (fValue === "0" && option && option.format === "0") {
            return fValue + curData.nend;
          }
          return curData.nlead + fValue + curData.nend;
        }
      }
    };
    NumberFormat7.processSignificantDigits = function(value, min, max) {
      var temp = value + "";
      var tn;
      var length = temp.length;
      if (length < min) {
        return value.toPrecision(min);
      } else {
        temp = value.toPrecision(max);
        tn = +temp;
        return tn + "";
      }
    };
    NumberFormat7.groupNumbers = function(val, level1, sep, decimalSymbol, level2) {
      var flag = !isNullOrUndefined(level2) && level2 !== 0;
      var split = val.split(decimalSymbol);
      var prefix = split[0];
      var length = prefix.length;
      var str = "";
      while (length > level1) {
        str = prefix.slice(length - level1, length) + (str.length ? sep + str : "");
        length -= level1;
        if (flag) {
          level1 = level2;
          flag = false;
        }
      }
      split[0] = prefix.slice(0, length) + (str.length ? sep : "") + str;
      return split.join(decimalSymbol);
    };
    NumberFormat7.processFraction = function(value, min, max, option) {
      var temp = (value + "").split(".")[1];
      var length = temp ? temp.length : 0;
      if (min && length < min) {
        var ret = "";
        if (length === 0) {
          ret = value.toFixed(min);
        } else {
          ret += value;
          for (var j = 0; j < min - length; j++) {
            ret += "0";
          }
          return ret;
        }
        return value.toFixed(min);
      } else if (!isNullOrUndefined(max) && (length > max || max === 0)) {
        return value.toFixed(max);
      }
      var str = value + "";
      if (str[0] === "0" && option && option.format === "###.00") {
        str = str.slice(1);
      }
      return str;
    };
    NumberFormat7.processMinimumIntegers = function(value, min) {
      var temp = value.split(".");
      var lead = temp[0];
      var len = lead.length;
      if (len < min) {
        for (var i = 0; i < min - len; i++) {
          lead = "0" + lead;
        }
        temp[0] = lead;
      }
      return temp.join(".");
    };
    NumberFormat7.customPivotFormat = function(value) {
      if (value >= 5e5) {
        value /= 1e6;
        var _a = value.toString().split("."), integer = _a[0], decimal = _a[1];
        return decimal && +decimal.substring(0, 1) >= 5 ? Math.ceil(value).toString() : Math.floor(value).toString();
      }
      return "";
    };
    return NumberFormat7;
  }()
);
setNumberFormat(NumberFormat2);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/intl/date-parser.js
var standalone2 = "stand-alone";
var latnRegex = /^[0-9]*$/;
var timeSetter2 = {
  minute: "setMinutes",
  hour: "setHours",
  second: "setSeconds",
  day: "setDate",
  month: "setMonth",
  milliseconds: "setMilliseconds"
};
var month = "months";
var DateParser = (
  /** @class */
  function() {
    function DateParser4() {
    }
    DateParser4.dateParser = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase.getDependables(cldr, culture, option.calendar);
      var numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), false, isBlazor());
      var parseOptions = {};
      if (isBlazor() && option.isServerRendered) {
        option = IntlBase.compareBlazorDateFormats(option, culture);
      }
      var resPattern = option.format || IntlBase.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor() ? culture : "");
      var regexString = "";
      var hourOnly;
      if (isUndefined(resPattern)) {
        throwError("Format options or type given must be invalid");
      } else {
        resPattern = IntlBase.ConvertDateToWeekFormat(resPattern);
        parseOptions = {
          isIslamic: IntlBase.islamicRegex.test(option.calendar),
          pattern: resPattern,
          evalposition: {},
          culture
        };
        var patternMatch = resPattern.match(IntlBase.dateParseRegex) || [];
        var length_1 = patternMatch.length;
        var gmtCorrection = 0;
        var zCorrectTemp = 0;
        var isgmtTraversed = false;
        var nRegx = numOptions.numericRegex;
        var numMapper = isBlazor() ? dependable.parserObject.numbers : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
        for (var i = 0; i < length_1; i++) {
          var str = patternMatch[parseInt(i.toString(), 10)];
          var len = str.length;
          var char = str[0] === "K" ? "h" : str[0];
          var isNumber = void 0;
          var canUpdate = void 0;
          var charKey = datePartMatcher["" + char];
          var optional = len === 2 ? "" : "?";
          if (isgmtTraversed) {
            gmtCorrection = zCorrectTemp;
            isgmtTraversed = false;
          }
          switch (char) {
            case "E":
            case "c": {
              var weekData = void 0;
              if (isBlazor()) {
                weekData = getValue("days." + IntlBase.monthIndex["" + len], dependable.dateObject);
              } else {
                weekData = dependable.dateObject["" + IntlBase.days]["" + standalone2][IntlBase.monthIndex["" + len]];
              }
              var weekObject = ParserBase.reverseObject(weekData);
              regexString += "(" + Object.keys(weekObject).join("|") + ")";
              break;
            }
            case "M":
            case "L":
            case "d":
            case "m":
            case "s":
            case "h":
            case "H":
            case "f":
              canUpdate = true;
              if ((char === "M" || char === "L") && len > 2) {
                var monthData = void 0;
                if (isBlazor()) {
                  monthData = getValue("months." + IntlBase.monthIndex["" + len], dependable.dateObject);
                } else {
                  monthData = dependable.dateObject["" + month]["" + standalone2][IntlBase.monthIndex["" + len]];
                }
                parseOptions["" + charKey] = ParserBase.reverseObject(monthData);
                regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + ")";
              } else if (char === "f") {
                if (len > 3) {
                  continue;
                }
                isNumber = true;
                regexString += "(" + nRegx + nRegx + "?" + nRegx + "?)";
              } else {
                isNumber = true;
                regexString += "(" + nRegx + nRegx + optional + ")";
              }
              if (char === "h") {
                parseOptions.hour12 = true;
              }
              break;
            case "W": {
              var opt = len === 1 ? "?" : "";
              regexString += "(" + nRegx + opt + nRegx + ")";
              break;
            }
            case "y":
              canUpdate = isNumber = true;
              if (len === 2) {
                regexString += "(" + nRegx + nRegx + ")";
              } else {
                regexString += "(" + nRegx + "{" + len + ",})";
              }
              break;
            case "a": {
              canUpdate = true;
              var periodValur = isBlazor() ? getValue("dayPeriods", dependable.dateObject) : getValue("dayPeriods.format.wide", dependable.dateObject);
              parseOptions["" + charKey] = ParserBase.reverseObject(periodValur);
              regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + ")";
              break;
            }
            case "G": {
              canUpdate = true;
              var eText = len <= 3 ? "eraAbbr" : len === 4 ? "eraNames" : "eraNarrow";
              parseOptions["" + charKey] = ParserBase.reverseObject(isBlazor() ? getValue("eras", dependable.dateObject) : getValue("eras." + eText, dependable.dateObject));
              regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + "?)";
              break;
            }
            case "z": {
              var tval = (/* @__PURE__ */ new Date()).getTimezoneOffset();
              canUpdate = tval !== 0;
              parseOptions["" + charKey] = getValue("dates.timeZoneNames", dependable.parserObject);
              var tzone = parseOptions["" + charKey];
              hourOnly = len < 4;
              var hpattern = hourOnly ? "+H;-H" : tzone.hourFormat;
              hpattern = hpattern.replace(/:/g, numMapper.timeSeparator);
              regexString += "(" + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ")?";
              isgmtTraversed = true;
              zCorrectTemp = hourOnly ? 6 : 12;
              break;
            }
            case "'": {
              var iString = str.replace(/'/g, "");
              regexString += "(" + iString + ")?";
              break;
            }
            default:
              regexString += "([\\D])";
              break;
          }
          if (canUpdate) {
            parseOptions.evalposition["" + charKey] = {
              isNumber,
              pos: i + 1 + gmtCorrection,
              hourOnly
            };
          }
          if (i === length_1 - 1 && !isNullOrUndefined(regexString)) {
            var regExp7 = RegExp;
            parseOptions.parserRegex = new regExp7("^" + regexString + "$", "i");
          }
        }
      }
      return function(value) {
        var parsedDateParts = _this.internalDateParse(value, parseOptions, numOptions);
        if (isNullOrUndefined(parsedDateParts) || !Object.keys(parsedDateParts).length) {
          return null;
        }
        if (parseOptions.isIslamic) {
          var dobj = {};
          var tYear = parsedDateParts.year;
          var tDate = parsedDateParts.day;
          var tMonth = parsedDateParts.month;
          var ystrig = tYear ? tYear + "" : "";
          var is2DigitYear = ystrig.length === 2;
          if (!tYear || !tMonth || !tDate || is2DigitYear) {
            dobj = HijriParser.getHijriDate(/* @__PURE__ */ new Date());
          }
          if (is2DigitYear) {
            tYear = parseInt((dobj.year + "").slice(0, 2) + ystrig, 10);
          }
          var dateObject = HijriParser.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);
          parsedDateParts.year = dateObject.getFullYear();
          parsedDateParts.month = dateObject.getMonth() + 1;
          parsedDateParts.day = dateObject.getDate();
        }
        return _this.getDateObject(parsedDateParts);
      };
    };
    DateParser4.getDateObject = function(options, value) {
      var res = value || /* @__PURE__ */ new Date();
      res.setMilliseconds(0);
      var tKeys = ["hour", "minute", "second", "milliseconds", "month", "day"];
      var y = options.year;
      var desig = options.designator;
      var tzone = options.timeZone;
      if (!isUndefined(y)) {
        var len = (y + "").length;
        if (len <= 2) {
          var century = Math.floor(res.getFullYear() / 100) * 100;
          y += century;
        }
        res.setFullYear(y);
      }
      for (var _i = 0, tKeys_1 = tKeys; _i < tKeys_1.length; _i++) {
        var key = tKeys_1[_i];
        var tValue = options["" + key];
        if (isUndefined(tValue) && key === "day") {
          res.setDate(1);
        }
        if (!isUndefined(tValue)) {
          if (key === "month") {
            tValue -= 1;
            if (tValue < 0 || tValue > 11) {
              return /* @__PURE__ */ new Date("invalid");
            }
            var pDate = res.getDate();
            res.setDate(1);
            res[timeSetter2["" + key]](tValue);
            var lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();
            res.setDate(pDate < lDate ? pDate : lDate);
          } else {
            if (key === "day") {
              var lastDay = new Date(res.getFullYear(), res.getMonth() + 1, 0).getDate();
              if (tValue < 1 || tValue > lastDay) {
                return null;
              }
            }
            res["" + timeSetter2["" + key]](tValue);
          }
        }
      }
      if (!isUndefined(desig)) {
        var hour = res.getHours();
        if (desig === "pm") {
          res.setHours(hour + (hour === 12 ? 0 : 12));
        } else if (hour === 12) {
          res.setHours(0);
        }
      }
      if (!isUndefined(tzone)) {
        var tzValue = tzone - res.getTimezoneOffset();
        if (tzValue !== 0) {
          res.setMinutes(res.getMinutes() + tzValue);
        }
      }
      return res;
    };
    DateParser4.internalDateParse = function(value, parseOptions, num) {
      var matches5 = value.match(parseOptions.parserRegex);
      var retOptions = {
        "hour": 0,
        "minute": 0,
        "second": 0
      };
      if (isNullOrUndefined(matches5)) {
        return null;
      } else {
        var props = Object.keys(parseOptions.evalposition);
        for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
          var prop = props_1[_i];
          var curObject = parseOptions.evalposition["" + prop];
          var matchString = matches5[curObject.pos];
          if (curObject.isNumber) {
            retOptions["" + prop] = this.internalNumberParser(matchString, num);
          } else {
            if (prop === "timeZone" && !isUndefined(matchString)) {
              var pos = curObject.pos;
              var val = void 0;
              var tmatch = matches5[pos + 1];
              var flag = !isUndefined(tmatch);
              if (curObject.hourOnly) {
                val = this.getZoneValue(flag, tmatch, matches5[pos + 4], num) * 60;
              } else {
                val = this.getZoneValue(flag, tmatch, matches5[pos + 7], num) * 60;
                val += this.getZoneValue(flag, matches5[pos + 4], matches5[pos + 10], num);
              }
              if (!isNullOrUndefined(val)) {
                retOptions["" + prop] = val;
              }
            } else {
              var cultureOptions = ["en-US", "en-MH", "en-MP"];
              matchString = prop === "month" && !parseOptions.isIslamic && (parseOptions.culture === "en" || parseOptions.culture === "en-GB" || parseOptions.culture === "en-US") ? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
              matchString = prop !== "month" && prop === "designator" && parseOptions.culture && parseOptions.culture.indexOf("en-") !== -1 && cultureOptions.indexOf(parseOptions.culture) === -1 ? matchString.toLowerCase() : matchString;
              retOptions["" + prop] = parseOptions["" + prop]["" + matchString];
            }
          }
        }
        if (parseOptions.hour12) {
          retOptions.hour12 = true;
        }
      }
      return retOptions;
    };
    DateParser4.internalNumberParser = function(value, option) {
      value = ParserBase.convertValueParts(value, option.numberParseRegex, option.numericPair);
      if (latnRegex.test(value)) {
        return +value;
      }
      return null;
    };
    DateParser4.parseTimeZoneRegx = function(hourFormat, tZone, nRegex) {
      var pattern = tZone.gmtFormat;
      var ret;
      var cRegex = "(" + nRegex + ")(" + nRegex + ")";
      ret = hourFormat.replace("+", "\\+");
      if (hourFormat.indexOf("HH") !== -1) {
        ret = ret.replace(/HH|mm/g, "(" + cRegex + ")");
      } else {
        ret = ret.replace(/H|m/g, "(" + cRegex + "?)");
      }
      var splitStr = ret.split(";").map(function(str) {
        return pattern.replace("{0}", str);
      });
      ret = splitStr.join("|") + "|" + tZone.gmtZeroFormat;
      return ret;
    };
    DateParser4.getZoneValue = function(flag, val1, val2, num) {
      var ival = flag ? val1 : val2;
      if (!ival) {
        return 0;
      }
      var value = this.internalNumberParser(ival, num);
      if (flag) {
        return -value;
      }
      return value;
    };
    return DateParser4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/intl/number-parser.js
var regExp2 = RegExp;
var parseRegex = new regExp2("^([^0-9]*)(([0-9,]*[0-9]+)(.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$");
var groupRegex = /,/g;
var keys = ["minusSign", "infinity"];
var NumberParser = (
  /** @class */
  function() {
    function NumberParser4() {
    }
    NumberParser4.numberParser = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase.getDependables(cldr, culture, "", true);
      var parseOptions = {
        custom: true
      };
      if (IntlBase.formatRegex.test(option.format) || !option.format) {
        extend(parseOptions, IntlBase.getProperNumericSkeleton(option.format || "N"));
        parseOptions.custom = false;
        if (!parseOptions.fractionDigits) {
          if (option.maximumFractionDigits) {
            parseOptions.maximumFractionDigits = option.maximumFractionDigits;
          }
        }
      } else {
        extend(parseOptions, IntlBase.customFormat(option.format, null, null));
      }
      var numbers = getValue("numbers", dependable.parserObject);
      var numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true, isBlazor());
      parseOptions.symbolRegex = ParserBase.getSymbolRegex(Object.keys(numOptions.symbolMatch));
      parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];
      var symbolpattern;
      if (!isBlazor()) {
        symbolpattern = IntlBase.getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);
        if (symbolpattern) {
          symbolpattern = symbolpattern.replace(/\u00A4/g, IntlBase.defaultCurrency);
          var split = symbolpattern.split(";");
          parseOptions.nData = IntlBase.getFormatData(split[1] || "-" + split[0], true, "");
          parseOptions.pData = IntlBase.getFormatData(split[0], true, "");
        }
      } else {
        parseOptions.nData = extend({}, {}, getValue(parseOptions.type + "nData", numbers));
        parseOptions.pData = extend({}, {}, getValue(parseOptions.type + "pData", numbers));
        if (parseOptions.type === "currency" && option.currency) {
          IntlBase.replaceBlazorCurrency([parseOptions.pData, parseOptions.nData], getValue("currencySymbol", numbers), option.currency);
        }
      }
      return function(value) {
        return _this.getParsedNumber(value, parseOptions, numOptions);
      };
    };
    NumberParser4.getParsedNumber = function(value, options, numOptions) {
      var isNegative;
      var isPercent;
      var tempValue;
      var lead;
      var end;
      var ret;
      if (value.indexOf(options.infinity) !== -1) {
        return Infinity;
      } else {
        value = ParserBase.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
        value = ParserBase.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);
        value = value.indexOf("-") !== -1 ? value.replace("-.", "-0.") : value;
        if (value.indexOf(".") === 0) {
          value = "0" + value;
        }
        var matches5 = value.match(parseRegex);
        if (isNullOrUndefined(matches5)) {
          return NaN;
        }
        lead = matches5[1];
        tempValue = matches5[2];
        var exponent = matches5[5];
        end = matches5[6];
        isNegative = options.custom ? lead === options.nData.nlead && end === options.nData.nend : lead.indexOf(options.nData.nlead) !== -1 && end.indexOf(options.nData.nend) !== -1;
        isPercent = isNegative ? options.nData.isPercent : options.pData.isPercent;
        tempValue = tempValue.replace(groupRegex, "");
        if (exponent) {
          tempValue += exponent;
        }
        ret = +tempValue;
        if (options.type === "percent" || isPercent) {
          ret = ret / 100;
        }
        if (options.custom || options.fractionDigits) {
          ret = parseFloat(ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.fractionDigits));
        }
        if (options.maximumFractionDigits) {
          ret = this.convertMaxFracDigits(tempValue, options, ret, isNegative);
        }
        if (isNegative) {
          ret *= -1;
        }
        return ret;
      }
    };
    NumberParser4.convertMaxFracDigits = function(value, options, ret, isNegative) {
      var decimalSplitValue = value.split(".");
      if (decimalSplitValue[1] && decimalSplitValue[1].length > options.maximumFractionDigits) {
        ret = +ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.maximumFractionDigits);
      }
      return ret;
    };
    return NumberParser4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/internationalization.js
var onIntlChange = new Observer();
var rightToLeft = false;
var cldrData = {};
var defaultCulture = "en-US";
var Internationalization = (
  /** @class */
  function() {
    function Internationalization4(cultureName) {
      if (cultureName) {
        this.culture = cultureName;
      }
    }
    Internationalization4.prototype.getDateFormat = function(options) {
      return DateFormat2.dateFormat(this.getCulture(), options || {
        type: "date",
        skeleton: "short"
      }, cldrData);
    };
    Internationalization4.prototype.getNumberFormat = function(options) {
      if (options && !options.currency) {
        options.currency = defaultCurrencyCode;
      }
      if (isBlazor() && options && !options.format) {
        options.minimumFractionDigits = 0;
      }
      return NumberFormat2.numberFormatter(this.getCulture(), options || {}, cldrData);
    };
    Internationalization4.prototype.getDateParser = function(options) {
      return DateParser.dateParser(this.getCulture(), options || {
        skeleton: "short",
        type: "date"
      }, cldrData);
    };
    Internationalization4.prototype.getNumberParser = function(options) {
      if (isBlazor() && options && !options.format) {
        options.minimumFractionDigits = 0;
      }
      return NumberParser.numberParser(this.getCulture(), options || {
        format: "N"
      }, cldrData);
    };
    Internationalization4.prototype.formatNumber = function(value, option) {
      return this.getNumberFormat(option)(value);
    };
    Internationalization4.prototype.formatDate = function(value, option) {
      return this.getDateFormat(option)(value);
    };
    Internationalization4.prototype.parseDate = function(value, option) {
      return this.getDateParser(option)(value);
    };
    Internationalization4.prototype.parseNumber = function(value, option) {
      return this.getNumberParser(option)(value);
    };
    Internationalization4.prototype.getDatePattern = function(option, isExcelFormat) {
      return IntlBase.getActualDateTimeFormat(this.getCulture(), option, cldrData, isExcelFormat);
    };
    Internationalization4.prototype.getNumberPattern = function(option, isExcel) {
      return IntlBase.getActualNumberFormat(this.getCulture(), option, cldrData, isExcel);
    };
    Internationalization4.prototype.getFirstDayOfWeek = function() {
      return IntlBase.getWeekData(this.getCulture(), cldrData);
    };
    Internationalization4.prototype.getCulture = function() {
      return this.culture || defaultCulture;
    };
    return Internationalization4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/validate-lic.js
var componentList = ["grid", "pivotview", "treegrid", "spreadsheet", "rangeNavigator", "DocumentEditor", "listbox", "inplaceeditor", "PdfViewer", "richtexteditor", "DashboardLayout", "chart", "stockChart", "circulargauge", "diagram", "heatmap", "lineargauge", "maps", "slider", "smithchart", "barcode", "sparkline", "treemap", "bulletChart", "kanban", "daterangepicker", "schedule", "gantt", "signature", "query-builder", "drop-down-tree", "carousel", "filemanager", "uploader", "accordion", "tab", "treeview"];
var bypassKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 105, 115, 76, 105, 99, 86, 97, 108, 105, 100, 97, 116, 101, 100];
var accountURL;
var LicenseValidator = (
  /** @class */
  function() {
    function LicenseValidator4(key) {
      this.isValidated = false;
      this.isLicensed = true;
      this.version = "28";
      this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i;
      this.errors = {
        noLicense: "<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",
        trailExpired: "<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",
        versionMismatched: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",
        platformMismatched: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",
        invalidKey: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>"
      };
      this.manager = /* @__PURE__ */ function() {
        var licKey = null;
        function set(key2) {
          licKey = key2;
        }
        function get() {
          return licKey;
        }
        return {
          setKey: set,
          getKey: get
        };
      }();
      this.npxManager = /* @__PURE__ */ function() {
        var npxLicKey = "npxKeyReplace";
        function get() {
          return npxLicKey;
        }
        return {
          getKey: get
        };
      }();
      this.manager.setKey(key);
    }
    LicenseValidator4.prototype.validate = function() {
      var contentKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 108, 105, 99, 101, 110, 115, 101, 67, 111, 110, 116, 101, 110, 116];
      var URLKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 99, 108, 97, 105, 109, 65, 99, 99, 111, 117, 110, 116, 85, 82, 76];
      if (!this.isValidated && containerObject && !getValue(convertToChar(bypassKey), containerObject) && !getValue("Blazor", containerObject)) {
        var validateMsg = void 0;
        var validateURL = void 0;
        if (this.manager && this.manager.getKey() || this.npxManager && this.npxManager.getKey() !== "npxKeyReplace") {
          var result = this.getInfoFromKey();
          if (result && result.length) {
            for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
              var res = result_1[_i];
              if (!this.platform.test(res.platform) || res.invalidPlatform) {
                validateMsg = this.errors.platformMismatched;
              } else if (res.version.indexOf(this.version) === -1) {
                validateMsg = this.errors.versionMismatched;
                validateMsg = validateMsg.replace("##LicenseVersion", res.version);
                validateMsg = validateMsg.replace("##Requireversion", this.version + ".x");
              } else if (res.expiryDate) {
                var expDate = new Date(res.expiryDate);
                var currDate = /* @__PURE__ */ new Date();
                if (expDate !== currDate && expDate < currDate) {
                  validateMsg = this.errors.trailExpired;
                } else {
                  break;
                }
              }
            }
          } else {
            validateMsg = this.errors.invalidKey;
          }
        } else {
          var licenseContent = getValue(convertToChar(contentKey), containerObject);
          validateURL = getValue(convertToChar(URLKey), containerObject);
          if (licenseContent && licenseContent !== "") {
            validateMsg = licenseContent;
          } else {
            validateMsg = this.errors.noLicense;
          }
        }
        if (validateMsg && typeof document !== "undefined" && !isNullOrUndefined(document)) {
          accountURL = validateURL && validateURL !== "" ? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=Mjg=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information";
          var errorDiv = createElement("div", {
            innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
                    position: absolute;
                    left: 16px;
                    width: 24px;
                    height: 24px;"/>` + validateMsg + ' <a style="text-decoration: none;color: #0D6EFD;font-weight: 500;" href=' + accountURL + ">Claim your free account</a>"
          });
          errorDiv.setAttribute("style", "position: fixed;\n                top: 10px;\n                left: 10px;\n                right: 10px;\n                font-size: 14px;\n                background: #EEF2FF;\n                color: #222222;\n                z-index: 999999999;\n                text-align: left;\n                border: 1px solid #EEEEEE;\n                padding: 10px 11px 10px 50px;\n                border-radius: 8px;\n                font-family: Helvetica Neue, Helvetica, Arial;");
          document.body.appendChild(errorDiv);
          this.isLicensed = false;
        }
        this.isValidated = true;
        setValue(convertToChar(bypassKey), this.isValidated, containerObject);
      }
      return this.isLicensed;
    };
    LicenseValidator4.prototype.getDecryptedData = function(key) {
      try {
        return atob(key);
      } catch (error) {
        return "";
      }
    };
    LicenseValidator4.prototype.getInfoFromKey = function() {
      try {
        var licKey = "";
        var pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488, 6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888, 6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
        var decryptedStr = [];
        var resultArray = [];
        var invalidPlatform = false;
        var isNpxKey = false;
        if (this.manager.getKey()) {
          licKey = this.manager.getKey();
        } else {
          isNpxKey = true;
          licKey = this.npxManager.getKey().split("npxKeyReplace")[1];
        }
        var licKeySplit = licKey.split(";");
        for (var _i = 0, licKeySplit_1 = licKeySplit; _i < licKeySplit_1.length; _i++) {
          var lKey = licKeySplit_1[_i];
          var decodeStr = this.getDecryptedData(lKey);
          if (!decodeStr) {
            continue;
          }
          var k = 0;
          var buffr = "";
          if (!isNpxKey) {
            for (var i = 0; i < decodeStr.length; i++, k++) {
              if (k === pkey.length) {
                k = 0;
              }
              var c = decodeStr.charCodeAt(i);
              buffr += String.fromCharCode(c ^ pkey[parseInt(k.toString(), 10)] >> 16);
            }
          } else {
            var charKey = decodeStr[decodeStr.length - 1];
            var decryptedKey = [];
            for (var i = 0; i < decodeStr.length; i++) {
              decryptedKey[parseInt(i.toString(), 10)] = decodeStr[parseInt(i.toString(), 10)].charCodeAt(0) - charKey.charCodeAt(0);
            }
            for (var i = 0; i < decryptedKey.length; i++) {
              buffr += String.fromCharCode(decryptedKey[parseInt(i.toString(), 10)]);
            }
          }
          if (this.platform.test(buffr)) {
            decryptedStr = buffr.split(";");
            invalidPlatform = false;
            if (decryptedStr.length > 3) {
              resultArray.push({
                platform: decryptedStr[0],
                version: decryptedStr[1],
                expiryDate: decryptedStr[2]
              });
            }
          } else if (buffr && buffr.split(";").length > 3) {
            invalidPlatform = true;
          }
        }
        if (invalidPlatform && !resultArray.length) {
          return [{
            invalidPlatform
          }];
        } else {
          return resultArray.length ? resultArray : null;
        }
      } catch (error) {
        return null;
      }
    };
    return LicenseValidator4;
  }()
);
var licenseValidator = new LicenseValidator();
function convertToChar(cArr) {
  var ret = "";
  for (var _i = 0, cArr_1 = cArr; _i < cArr_1.length; _i++) {
    var arr = cArr_1[_i];
    ret += String.fromCharCode(arr);
  }
  return ret;
}
function registerLicense(key) {
  licenseValidator = new LicenseValidator(key);
}
var validateLicense = function(key) {
  if (key) {
    registerLicense(key);
  }
  return licenseValidator.validate();
};
var createLicenseOverlay = function() {
  var bannerTemplate = '\n    <div style="\n    position: fixed;\n    width: 100%;\n    height: 100%;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background-color: rgba(0, 0, 0, 0.5);\n    z-index: 99999;\n    ">\n        <div style="\n    background: #FFFFFF;\n    height: 455px;\n    width: 840px;\n    font-family: Helvetica Neue, Helvetica, Arial;\n    color: #000000;\n    box-shadow: 0px 4.8px 14.4px rgb(0 0 0 / 18%), 0px 25.6px 57.6px rgb(0 0 0 / 22%);\n    display: block;\n    margin: 8% auto;\n    border-radius: 20px;\n    ">\n            <div style="\n    position: absolute;\nwidth: 838px;\nheight: 62px;\nbackground-color: #F9F9F9;\nborder: 1px solid #EEEEEE;\nborder-top-left-radius: 20px;\nborder-top-right-radius: 20px;\n">\n                <img src="data:image/svg+xml;base64, " style="\n    text-align: left;\n    width: 146px;\n    position: absolute;\n    top: 14px;\n    left: 31px;\n">\n            </div>\n            <div style="\n    position: relative;\n    top: 80px;\n    left: 32px;\n    font-size: 20px;\n    text-align: left;\n    font-weight: 700;\n    letter-spacing: 0.02em;\n    font-style: normal;\n    line-height: 125%;\n    ">Claim your FREE account and get a key in less than a minute</div>\n            <ul style="\n        font-size: 15px;\n        font-weight: 400;\n        color: #333333;\n        letter-spacing: 0.01em;\n        position: relative;\n        left: 32px;\n        top: 88px;\n        line-height: 180%;\n        ">\n                <li><span>Access to a 30-day free trial of any of our products.</span></li>\n                <li><span>Access to 24x5 support by developers via the <a href="https://support.syncfusion.com/create?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">support tickets</a>, <a href="https://www.syncfusion.com/forums?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">forum</a>, <a href="https://www.syncfusion.com/feedback?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">feature &amp; feedback page</a> and chat.</span></li>\n                <li><span>200+ <a href="https://www.syncfusion.com/succinctly-free-ebooks?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">ebooks </a>on the latest technologies, industry trends, and research topics.</span>\n                </li>\n                <li><span>Largest collection of over 7,000 flat and wireframe icons for free with Syncfusion<sup>®</sup> <a href="https://www.syncfusion.com/downloads/metrostudio?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">Metro Studio.</a></span></li>\n                <li><span>Free and unlimited access to Syncfusion<sup>®</sup> technical <a href="https://www.syncfusion.com/blogs/?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">blogs</a> and <a href="https://www.syncfusion.com/resources/techportal/whitepapers?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">whitepapers.</a></span></li>\n            </ul>\n            <div style="\n            font-size: 18px;\n            font-weight: 700;\n            position: relative;\n            line-height: 125%;\n            letter-spacing: 0.02em;\n            top: 90px;\n            left: 32px;\n    ">Syncfusion is trusted by 29,000+ businesses worldwide</div>\n            <img src="data:image/svg+xml;base64, " style="\n            width: 742.5px;\n            position: relative;\n            top: 107px;\n            left: 32px;\n            ">\n            <a href=' + accountURL + ' style="\n        float: left;\n        border-radius: 56px;\n        background: #0D6EFD;\n        padding-top: 8px;\n        width: 280px;\n        height: 38px;\n        text-align: center;\n        position: relative;\n        top: 127px;\n        left: 274px;\n        font-size: 16px;\n        color: white;\n        text-decoration: none;\n        letter-spacing: 0.02em;\n    ">Claim your FREE account</a>\n            <div style="\n    font-size: 14px;\n    position: relative;\n    top: 180px;\n    left: 19px;\n    letter-spacing: 0.02em;\n    font-weight: 500;\n    line-height: 125%;\n">have a Syncfusion<sup>®</sup> account? <a href="https://www.syncfusion.com/account/login?ReturnUrl=/account/login" style="text-decoration: none;\ncolor: #0D6EFD;\nfont-weight: 500;">Sign In</a></div>\n        </div>\n    </div>';
  if (typeof document !== "undefined" && !isNullOrUndefined(document)) {
    var errorBackground = createElement("div", {
      innerHTML: bannerTemplate
    });
    document.body.appendChild(errorBackground);
  }
};

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/component.js
var __extends2 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate3 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var componentCount = 0;
var lastPageID;
var lastHistoryLen = 0;
var instancecount = 0;
var isvalid = true;
var isBannerAdded = false;
var versionBasedStatePersistence = false;
var Component2 = (
  /** @class */
  function(_super) {
    __extends2(Component5, _super);
    function Component5(options, selector) {
      var _this = _super.call(this, options, selector) || this;
      _this.randomId = uniqueID();
      _this.isStringTemplate = false;
      _this.needsID = false;
      _this.isReactHybrid = false;
      _this.isAngular = false;
      _this.isReact = false;
      _this.isVue = false;
      if (isNullOrUndefined(_this.enableRtl)) {
        _this.setProperties({
          "enableRtl": rightToLeft
        }, true);
      }
      if (isNullOrUndefined(_this.locale)) {
        _this.setProperties({
          "locale": defaultCulture
        }, true);
      }
      _this.moduleLoader = new ModuleLoader(_this);
      _this.localObserver = new Observer(_this);
      onIntlChange.on("notifyExternalChange", _this.detectFunction, _this, _this.randomId);
      if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense()) {
        if (componentList.indexOf(_this.getModuleName()) !== -1) {
          instancecount = instancecount + 1;
          if (instancecount > 5) {
            isvalid = false;
          }
        }
      }
      if (!isUndefined(selector)) {
        _this.appendTo();
      }
      return _this;
    }
    Component5.prototype.requiredModules = function() {
      return [];
    };
    Component5.prototype.destroy = function() {
      if (this.isDestroyed) {
        return;
      }
      if (this.enablePersistence) {
        this.setPersistData();
        this.detachUnloadEvent();
      }
      this.localObserver.destroy();
      if (this.refreshing) {
        return;
      }
      removeClass([this.element], ["e-control"]);
      this.trigger("destroyed", {
        cancel: false
      });
      _super.prototype.destroy.call(this);
      this.moduleLoader.clean();
      onIntlChange.off("notifyExternalChange", this.detectFunction, this.randomId);
    };
    Component5.prototype.refresh = function() {
      this.refreshing = true;
      this.moduleLoader.clean();
      this.destroy();
      this.clearChanges();
      this.localObserver = new Observer(this);
      this.preRender();
      this.injectModules();
      this.render();
      this.refreshing = false;
    };
    Component5.prototype.accessMount = function() {
      if (this.mount && !this.isReactHybrid) {
        this.mount();
      }
    };
    Component5.prototype.getRootElement = function() {
      if (this.isReactHybrid) {
        return this.actualElement;
      } else {
        return this.element;
      }
    };
    Component5.prototype.getLocalData = function() {
      var eleId = this.getModuleName() + this.element.id;
      if (versionBasedStatePersistence) {
        return window.localStorage.getItem(eleId + this.ej2StatePersistenceVersion);
      } else {
        return window.localStorage.getItem(eleId);
      }
    };
    Component5.prototype.attachUnloadEvent = function() {
      this.handleUnload = this.handleUnload.bind(this);
      window.addEventListener("pagehide", this.handleUnload);
    };
    Component5.prototype.handleUnload = function() {
      this.setPersistData();
    };
    Component5.prototype.detachUnloadEvent = function() {
      window.removeEventListener("pagehide", this.handleUnload);
    };
    Component5.prototype.appendTo = function(selector) {
      if (!isNullOrUndefined(selector) && typeof selector === "string") {
        this.element = select(selector, document);
      } else if (!isNullOrUndefined(selector)) {
        this.element = selector;
      }
      if (!isNullOrUndefined(this.element)) {
        var moduleClass = "e-" + this.getModuleName().toLowerCase();
        addClass([this.element], ["e-control", moduleClass]);
        this.isProtectedOnChange = false;
        if (this.needsID && !this.element.id) {
          this.element.id = this.getUniqueID(this.getModuleName());
        }
        if (this.enablePersistence) {
          this.mergePersistData();
          this.attachUnloadEvent();
        }
        var inst = getValue("ej2_instances", this.element);
        if (!inst || inst.indexOf(this) === -1) {
          _super.prototype.addInstance.call(this);
        }
        this.preRender();
        this.injectModules();
        var ignoredComponents = {
          schedule: "all",
          diagram: "all",
          PdfViewer: "all",
          grid: ["logger"],
          richtexteditor: ["link", "table", "image", "audio", "video", "formatPainter", "emojiPicker", "pasteCleanup", "htmlEditor", "toolbar", "importExport"],
          treegrid: ["filter"],
          gantt: ["tooltip"],
          chart: ["Export", "Zoom"],
          accumulationchart: ["Export"],
          "query-builder": "all"
        };
        var component = this.getModuleName();
        if (this.requiredModules && (!ignoredComponents["" + component] || ignoredComponents["" + component] !== "all")) {
          var modulesRequired = this.requiredModules();
          for (var _i = 0, _a = this.moduleLoader.getNonInjectedModules(modulesRequired); _i < _a.length; _i++) {
            var module = _a[_i];
            var moduleName = module.name ? module.name : module.member;
            if (ignoredComponents["" + component] && ignoredComponents["" + component].indexOf(module.member) !== -1) {
              continue;
            }
            var componentName = component.charAt(0).toUpperCase() + component.slice(1);
            console.warn('[WARNING] :: Module "' + moduleName + '" is not available in ' + componentName + " component! You either misspelled the module name or forgot to load it.");
          }
        }
        if (!isvalid && !isBannerAdded) {
          createLicenseOverlay();
          isBannerAdded = true;
        }
        this.render();
        if (!this.mount) {
          this.trigger("created");
        } else {
          this.accessMount();
        }
      }
    };
    Component5.prototype.renderComplete = function(wrapperElement) {
      if (isBlazor()) {
        var sfBlazor = "sfBlazor";
        window["" + sfBlazor].renderComplete(this.element, wrapperElement);
      }
      this.isRendered = true;
    };
    Component5.prototype.dataBind = function() {
      this.injectModules();
      _super.prototype.dataBind.call(this);
    };
    Component5.prototype.on = function(event2, handler, context) {
      if (typeof event2 === "string") {
        this.localObserver.on(event2, handler, context);
      } else {
        for (var _i = 0, event_1 = event2; _i < event_1.length; _i++) {
          var arg = event_1[_i];
          this.localObserver.on(arg.event, arg.handler, arg.context);
        }
      }
    };
    Component5.prototype.off = function(event2, handler) {
      if (typeof event2 === "string") {
        this.localObserver.off(event2, handler);
      } else {
        for (var _i = 0, event_2 = event2; _i < event_2.length; _i++) {
          var arg = event_2[_i];
          this.localObserver.off(arg.event, arg.handler);
        }
      }
    };
    Component5.prototype.notify = function(property, argument) {
      if (this.isDestroyed !== true) {
        this.localObserver.notify(property, argument);
      }
    };
    Component5.prototype.getInjectedModules = function() {
      return this.injectedModules;
    };
    Component5.Inject = function() {
      var moduleList = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        moduleList[_i] = arguments[_i];
      }
      if (!this.prototype.injectedModules) {
        this.prototype.injectedModules = [];
      }
      for (var i = 0; i < moduleList.length; i++) {
        if (this.prototype.injectedModules.indexOf(moduleList[parseInt(i.toString(), 10)]) === -1) {
          this.prototype.injectedModules.push(moduleList[parseInt(i.toString(), 10)]);
        }
      }
    };
    Component5.prototype.createElement = function(tagName, prop, isVDOM) {
      return createElement(tagName, prop);
    };
    Component5.prototype.triggerStateChange = function(handler, argument) {
      if (this.isReactHybrid) {
        this.setState();
        this.currentContext = {
          calls: handler,
          args: argument
        };
      }
    };
    Component5.prototype.injectModules = function() {
      if (this.injectedModules && this.injectedModules.length) {
        this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
      }
    };
    Component5.prototype.detectFunction = function(args) {
      var prop = Object.keys(args);
      if (prop.length) {
        this[prop[0]] = args[prop[0]];
      }
    };
    Component5.prototype.mergePersistData = function() {
      var data;
      if (versionBasedStatePersistence) {
        data = window.localStorage.getItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion);
      } else {
        data = window.localStorage.getItem(this.getModuleName() + this.element.id);
      }
      if (!(isNullOrUndefined(data) || data === "")) {
        this.setProperties(JSON.parse(data), true);
      }
    };
    Component5.prototype.setPersistData = function() {
      if (!this.isDestroyed) {
        if (versionBasedStatePersistence) {
          window.localStorage.setItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion, this.getPersistData());
        } else {
          window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
        }
      }
    };
    Component5.prototype.renderReactTemplates = function(callback) {
      if (!isNullOrUndefined(callback)) {
        callback();
      }
    };
    Component5.prototype.clearTemplate = function(templateName, index) {
    };
    Component5.prototype.getUniqueID = function(definedName) {
      if (this.isHistoryChanged()) {
        componentCount = 0;
      }
      lastPageID = this.pageID(location.href);
      lastHistoryLen = history.length;
      return definedName + "_" + lastPageID + "_" + componentCount++;
    };
    Component5.prototype.pageID = function(url) {
      var hash = 0;
      if (url.length === 0) {
        return hash;
      }
      for (var i = 0; i < url.length; i++) {
        var char = url.charCodeAt(i);
        hash = (hash << 5) - hash + char;
        hash = hash & hash;
      }
      return Math.abs(hash);
    };
    Component5.prototype.isHistoryChanged = function() {
      return lastPageID !== this.pageID(location.href) || lastHistoryLen !== history.length;
    };
    Component5.prototype.addOnPersist = function(options) {
      var _this = this;
      var persistObj = {};
      for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
        var key = options_1[_i];
        var objValue = getValue(key, this);
        if (!isUndefined(objValue)) {
          setValue(key, this.getActualProperties(objValue), persistObj);
        }
      }
      return JSON.stringify(persistObj, function(key2, value) {
        return _this.getActualProperties(value);
      });
    };
    Component5.prototype.getActualProperties = function(obj) {
      if (obj instanceof ChildProperty) {
        return getValue("properties", obj);
      } else {
        return obj;
      }
    };
    Component5.prototype.ignoreOnPersist = function(options) {
      return JSON.stringify(this.iterateJsonProperties(this.properties, options));
    };
    Component5.prototype.iterateJsonProperties = function(obj, ignoreList) {
      var newObj = {};
      var _loop_1 = function(key2) {
        if (ignoreList.indexOf(key2) === -1) {
          var value = obj["" + key2];
          if (typeof value === "object" && !(value instanceof Array)) {
            var newList = ignoreList.filter(function(str) {
              var regExp7 = RegExp;
              return new regExp7(key2 + ".").test(str);
            }).map(function(str) {
              return str.replace(key2 + ".", "");
            });
            newObj["" + key2] = this_1.iterateJsonProperties(this_1.getActualProperties(value), newList);
          } else {
            newObj["" + key2] = value;
          }
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
        var key = _a[_i];
        _loop_1(key);
      }
      return newObj;
    };
    __decorate3([Property(false)], Component5.prototype, "enablePersistence", void 0);
    __decorate3([Property()], Component5.prototype, "enableRtl", void 0);
    __decorate3([Property()], Component5.prototype, "locale", void 0);
    Component5 = __decorate3([NotifyPropertyChanges], Component5);
    return Component5;
  }(Base)
);
(function() {
  if (typeof window !== "undefined") {
    window.addEventListener(
      "popstate",
      /* istanbul ignore next */
      function() {
        componentCount = 0;
      }
    );
  }
})();

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/draggable.js
var __extends3 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate4 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var defaultPosition = {
  left: 0,
  top: 0,
  bottom: 0,
  right: 0
};
var isDraggedObject = {
  isDragged: false
};
var Position = (
  /** @class */
  function(_super) {
    __extends3(Position4, _super);
    function Position4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate4([Property(0)], Position4.prototype, "left", void 0);
    __decorate4([Property(0)], Position4.prototype, "top", void 0);
    return Position4;
  }(ChildProperty)
);
var Draggable = (
  /** @class */
  function(_super) {
    __extends3(Draggable4, _super);
    function Draggable4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.dragLimit = Draggable_1.getDefaultPosition();
      _this.borderWidth = Draggable_1.getDefaultPosition();
      _this.padding = Draggable_1.getDefaultPosition();
      _this.diffX = 0;
      _this.prevLeft = 0;
      _this.prevTop = 0;
      _this.dragProcessStarted = false;
      _this.eleTop = 0;
      _this.tapHoldTimer = 0;
      _this.externalInitialize = false;
      _this.diffY = 0;
      _this.parentScrollX = 0;
      _this.parentScrollY = 0;
      _this.droppables = {};
      _this.bind();
      return _this;
    }
    Draggable_1 = Draggable4;
    Draggable4.prototype.bind = function() {
      this.toggleEvents();
      if (Browser.isIE) {
        addClass([this.element], "e-block-touch");
      }
      this.droppables[this.scope] = {};
    };
    Draggable4.getDefaultPosition = function() {
      return extend({}, defaultPosition);
    };
    Draggable4.prototype.toggleEvents = function(isUnWire) {
      var ele;
      if (!isUndefined(this.handle)) {
        ele = select(this.handle, this.element);
      }
      var handler = this.enableTapHold && Browser.isDevice && Browser.isTouch ? this.mobileInitialize : this.initialize;
      if (isUnWire) {
        EventHandler.remove(ele || this.element, Browser.isSafari() ? "touchstart" : Browser.touchStartEvent, handler);
      } else {
        EventHandler.add(ele || this.element, Browser.isSafari() ? "touchstart" : Browser.touchStartEvent, handler, this);
      }
    };
    Draggable4.prototype.mobileInitialize = function(evt) {
      var _this = this;
      var target = evt.currentTarget;
      this.tapHoldTimer = setTimeout(function() {
        _this.externalInitialize = true;
        _this.removeTapholdTimer();
        _this.initialize(evt, target);
      }, this.tapHoldThreshold);
      EventHandler.add(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.removeTapholdTimer, this);
      EventHandler.add(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.removeTapholdTimer, this);
    };
    Draggable4.prototype.removeTapholdTimer = function() {
      clearTimeout(this.tapHoldTimer);
      EventHandler.remove(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.removeTapholdTimer);
      EventHandler.remove(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.removeTapholdTimer);
    };
    Draggable4.prototype.getScrollableParent = function(element2, axis) {
      var scroll = {
        "vertical": "scrollHeight",
        "horizontal": "scrollWidth"
      };
      var client = {
        "vertical": "clientHeight",
        "horizontal": "clientWidth"
      };
      if (isNullOrUndefined(element2)) {
        return null;
      }
      if (element2[scroll["" + axis]] > element2[client["" + axis]]) {
        if (axis === "vertical" ? element2.scrollTop > 0 : element2.scrollLeft > 0) {
          if (axis === "vertical") {
            this.parentScrollY = this.parentScrollY + (this.parentScrollY === 0 ? element2.scrollTop : element2.scrollTop - this.parentScrollY);
            this.tempScrollHeight = element2.scrollHeight;
          } else {
            this.parentScrollX = this.parentScrollX + (this.parentScrollX === 0 ? element2.scrollLeft : element2.scrollLeft - this.parentScrollX);
            this.tempScrollWidth = element2.scrollWidth;
          }
          if (!isNullOrUndefined(element2)) {
            return this.getScrollableParent(element2.parentNode, axis);
          } else {
            return element2;
          }
        } else {
          return this.getScrollableParent(element2.parentNode, axis);
        }
      } else {
        return this.getScrollableParent(element2.parentNode, axis);
      }
    };
    Draggable4.prototype.getScrollableValues = function() {
      this.parentScrollX = 0;
      this.parentScrollY = 0;
      var isModalDialog = this.element.classList.contains("e-dialog") && this.element.classList.contains("e-dlg-modal");
      var verticalScrollParent = this.getScrollableParent(this.element.parentNode, "vertical");
      var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, "horizontal");
    };
    Draggable4.prototype.initialize = function(evt, curTarget) {
      this.currentStateTarget = evt.target;
      if (this.isDragStarted()) {
        return;
      } else {
        this.isDragStarted(true);
        this.externalInitialize = false;
      }
      this.target = evt.currentTarget || curTarget;
      this.dragProcessStarted = false;
      if (this.abort) {
        var abortSelectors = this.abort;
        if (typeof abortSelectors === "string") {
          abortSelectors = [abortSelectors];
        }
        for (var i = 0; i < abortSelectors.length; i++) {
          if (!isNullOrUndefined(closest(evt.target, abortSelectors[parseInt(i.toString(), 10)]))) {
            if (this.isDragStarted()) {
              this.isDragStarted(true);
            }
            return;
          }
        }
      }
      if (this.preventDefault && !isUndefined(evt.changedTouches) && evt.type !== "touchstart") {
        evt.preventDefault();
      }
      this.element.setAttribute("aria-grabbed", "true");
      var intCoord = this.getCoordinates(evt);
      this.initialPosition = {
        x: intCoord.pageX,
        y: intCoord.pageY
      };
      if (!this.clone) {
        var pos = this.element.getBoundingClientRect();
        this.getScrollableValues();
        if (evt.clientX === evt.pageX) {
          this.parentScrollX = 0;
        }
        if (evt.clientY === evt.pageY) {
          this.parentScrollY = 0;
        }
        this.relativeXPosition = intCoord.pageX - (pos.left + this.parentScrollX);
        this.relativeYPosition = intCoord.pageY - (pos.top + this.parentScrollY);
      }
      if (this.externalInitialize) {
        this.intDragStart(evt);
      } else {
        EventHandler.add(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.intDragStart, this);
        EventHandler.add(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDestroy, this);
      }
      this.toggleEvents(true);
      if (evt.type !== "touchstart" && this.isPreventSelect) {
        document.body.classList.add("e-prevent-select");
      }
      this.externalInitialize = false;
      EventHandler.trigger(document.documentElement, Browser.isSafari() ? "touchstart" : Browser.touchStartEvent, evt);
    };
    Draggable4.prototype.intDragStart = function(evt) {
      this.removeTapholdTimer();
      var isChangeTouch = !isUndefined(evt.changedTouches);
      if (isChangeTouch && evt.changedTouches.length !== 1) {
        return;
      }
      var intCordinate = this.getCoordinates(evt);
      var pos;
      var styleProp = getComputedStyle(this.element);
      this.margin = {
        left: parseInt(styleProp.marginLeft, 10),
        top: parseInt(styleProp.marginTop, 10),
        right: parseInt(styleProp.marginRight, 10),
        bottom: parseInt(styleProp.marginBottom, 10)
      };
      var element2 = this.element;
      if (this.clone && this.dragTarget) {
        var intClosest = closest(evt.target, this.dragTarget);
        if (!isNullOrUndefined(intClosest)) {
          element2 = intClosest;
        }
      }
      if (this.isReplaceDragEle) {
        element2 = this.currentStateCheck(evt.target, element2);
      }
      this.offset = this.calculateParentPosition(element2);
      this.position = this.getMousePosition(evt, this.isDragScroll);
      var x = this.initialPosition.x - intCordinate.pageX;
      var y = this.initialPosition.y - intCordinate.pageY;
      var distance = Math.sqrt(x * x + y * y);
      if (distance >= this.distance || this.externalInitialize) {
        var ele = this.getHelperElement(evt);
        if (!ele || isNullOrUndefined(ele)) {
          return;
        }
        if (isChangeTouch) {
          evt.preventDefault();
        }
        var dragTargetElement = this.helperElement = ele;
        this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);
        if (this.dragStart) {
          var curTarget = this.getProperTargetElement(evt);
          var args = {
            event: evt,
            element: element2,
            target: curTarget,
            bindEvents: isBlazor() ? this.bindDragEvents.bind(this) : null,
            dragElement: dragTargetElement
          };
          this.trigger("dragStart", args);
        }
        if (this.dragArea) {
          this.setDragArea();
        } else {
          this.dragLimit = {
            left: 0,
            right: 0,
            bottom: 0,
            top: 0
          };
          this.borderWidth = {
            top: 0,
            left: 0
          };
        }
        pos = {
          left: this.position.left - this.parentClientRect.left,
          top: this.position.top - this.parentClientRect.top
        };
        if (this.clone && !this.enableTailMode) {
          this.diffX = this.position.left - this.offset.left;
          this.diffY = this.position.top - this.offset.top;
        }
        this.getScrollableValues();
        var styles = getComputedStyle(element2);
        var marginTop = parseFloat(styles.marginTop);
        if (this.clone && marginTop !== 0) {
          pos.top += marginTop;
        }
        this.eleTop = !isNaN(parseFloat(styles.top)) ? parseFloat(styles.top) - this.offset.top : 0;
        if (this.enableScrollHandler && !this.clone) {
          pos.top -= this.parentScrollY;
          pos.left -= this.parentScrollX;
        }
        var posValue = this.getProcessedPositionValue({
          top: pos.top - this.diffY + "px",
          left: pos.left - this.diffX + "px"
        });
        if (this.dragArea && typeof this.dragArea !== "string" && this.dragArea.classList.contains("e-kanban-content") && this.dragArea.style.position === "relative") {
          pos.top += this.dragArea.scrollTop;
        }
        this.dragElePosition = {
          top: pos.top,
          left: pos.left
        };
        setStyleAttribute(dragTargetElement, this.getDragPosition({
          position: "absolute",
          left: posValue.left,
          top: posValue.top
        }));
        EventHandler.remove(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.intDragStart);
        EventHandler.remove(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDestroy);
        if (!isBlazor()) {
          this.bindDragEvents(dragTargetElement);
        }
      }
    };
    Draggable4.prototype.bindDragEvents = function(dragTargetElement) {
      if (isVisible(dragTargetElement)) {
        EventHandler.add(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.intDrag, this);
        EventHandler.add(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDragStop, this);
        this.setGlobalDroppables(false, this.element, dragTargetElement);
      } else {
        this.toggleEvents();
        document.body.classList.remove("e-prevent-select");
      }
    };
    Draggable4.prototype.elementInViewport = function(el) {
      this.top = el.offsetTop;
      this.left = el.offsetLeft;
      this.width = el.offsetWidth;
      this.height = el.offsetHeight;
      while (el.offsetParent) {
        el = el.offsetParent;
        this.top += el.offsetTop;
        this.left += el.offsetLeft;
      }
      return this.top >= window.pageYOffset && this.left >= window.pageXOffset && this.top + this.height <= window.pageYOffset + window.innerHeight && this.left + this.width <= window.pageXOffset + window.innerWidth;
    };
    Draggable4.prototype.getProcessedPositionValue = function(value) {
      if (this.queryPositionInfo) {
        return this.queryPositionInfo(value);
      }
      return value;
    };
    Draggable4.prototype.calculateParentPosition = function(ele) {
      if (isNullOrUndefined(ele)) {
        return {
          left: 0,
          top: 0
        };
      }
      var rect = ele.getBoundingClientRect();
      var style = getComputedStyle(ele);
      return {
        left: rect.left + window.pageXOffset - parseInt(style.marginLeft, 10),
        top: rect.top + window.pageYOffset - parseInt(style.marginTop, 10)
      };
    };
    Draggable4.prototype.intDrag = function(evt) {
      if (!isUndefined(evt.changedTouches) && evt.changedTouches.length !== 1) {
        return;
      }
      if (this.clone && evt.changedTouches && Browser.isDevice && Browser.isTouch) {
        evt.preventDefault();
      }
      var left;
      var top;
      this.position = this.getMousePosition(evt, this.isDragScroll);
      var docHeight = this.getDocumentWidthHeight("Height");
      if (docHeight < this.position.top) {
        this.position.top = docHeight;
      }
      var docWidth = this.getDocumentWidthHeight("Width");
      if (docWidth < this.position.left) {
        this.position.left = docWidth;
      }
      if (this.drag) {
        var curTarget = this.getProperTargetElement(evt);
        this.trigger("drag", {
          event: evt,
          element: this.element,
          target: curTarget
        });
      }
      var eleObj = this.checkTargetElement(evt);
      if (eleObj.target && eleObj.instance) {
        var flag = true;
        if (this.hoverObject) {
          if (this.hoverObject.instance !== eleObj.instance) {
            this.triggerOutFunction(evt, eleObj);
          } else {
            flag = false;
          }
        }
        if (flag) {
          eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
          eleObj.instance.intOver(evt, eleObj.target);
          this.hoverObject = eleObj;
        }
      } else if (this.hoverObject) {
        this.triggerOutFunction(evt, eleObj);
      }
      var helperElement = this.droppables[this.scope].helper;
      this.parentClientRect = this.calculateParentPosition(this.helperElement.offsetParent);
      var tLeft = this.parentClientRect.left;
      var tTop = this.parentClientRect.top;
      var intCoord = this.getCoordinates(evt);
      var pagex = intCoord.pageX;
      var pagey = intCoord.pageY;
      var dLeft = this.position.left - this.diffX;
      var dTop = this.position.top - this.diffY;
      var styles = getComputedStyle(helperElement);
      if (this.dragArea) {
        if (this.enableAutoScroll) {
          this.setDragArea();
        }
        if (this.pageX !== pagex || this.skipDistanceCheck) {
          var helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft) + parseFloat(styles.marginRight));
          if (this.dragLimit.left > dLeft && dLeft > 0) {
            left = this.dragLimit.left;
          } else if (this.dragLimit.right + window.pageXOffset < dLeft + helperWidth && dLeft > 0) {
            left = dLeft - (dLeft - this.dragLimit.right) + window.pageXOffset - helperWidth;
          } else {
            left = dLeft < 0 ? this.dragLimit.left : dLeft;
          }
        }
        if (this.pageY !== pagey || this.skipDistanceCheck) {
          var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
          if (this.dragLimit.top > dTop && dTop > 0) {
            top = this.dragLimit.top;
          } else if (this.dragLimit.bottom + window.pageYOffset < dTop + helperHeight && dTop > 0) {
            top = dTop - (dTop - this.dragLimit.bottom) + window.pageYOffset - helperHeight;
          } else {
            top = dTop < 0 ? this.dragLimit.top : dTop;
          }
        }
      } else {
        left = dLeft;
        top = dTop;
      }
      var iTop = tTop + this.borderWidth.top;
      var iLeft = tLeft + this.borderWidth.left;
      if (this.dragProcessStarted) {
        if (isNullOrUndefined(top)) {
          top = this.prevTop;
        }
        if (isNullOrUndefined(left)) {
          left = this.prevLeft;
        }
      }
      var draEleTop;
      var draEleLeft;
      if (this.helperElement.classList.contains("e-treeview")) {
        if (this.dragArea) {
          this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
          draEleTop = top - iTop < 0 ? this.dragLimit.top : top - this.borderWidth.top;
          draEleLeft = left - iLeft < 0 ? this.dragLimit.left : left - this.borderWidth.left;
        } else {
          draEleTop = top - this.borderWidth.top;
          draEleLeft = left - this.borderWidth.left;
        }
      } else {
        if (this.dragArea) {
          var isDialogEle = this.helperElement.classList.contains("e-dialog");
          this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
          draEleTop = top - iTop < 0 ? this.dragLimit.top : top - iTop;
          draEleLeft = left - iLeft < 0 ? isDialogEle ? left - (iLeft - this.borderWidth.left) : this.dragElePosition.left : left - iLeft;
        } else {
          draEleTop = top - iTop;
          draEleLeft = left - iLeft;
        }
      }
      var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
      if (marginTop > 0) {
        if (this.clone) {
          draEleTop += marginTop;
          if (dTop < 0) {
            if (marginTop + dTop >= 0) {
              draEleTop = marginTop + dTop;
            } else {
              draEleTop -= marginTop;
            }
          }
          if (this.dragArea) {
            draEleTop = this.dragLimit.bottom < draEleTop ? this.dragLimit.bottom : draEleTop;
          }
        }
        if (top - iTop < 0) {
          if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
            var tempDraEleTop = this.dragLimit.top + dTop - iTop;
            if (tempDraEleTop + marginTop + iTop < 0) {
              draEleTop -= marginTop + iTop;
            } else {
              draEleTop = tempDraEleTop;
            }
          } else {
            draEleTop -= marginTop + iTop;
          }
        }
      }
      if (this.dragArea && this.helperElement.classList.contains("e-treeview")) {
        var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
        draEleTop = draEleTop + helperHeight > this.dragLimit.bottom ? this.dragLimit.bottom - helperHeight : draEleTop;
      }
      if (this.enableScrollHandler && !this.clone) {
        draEleTop -= this.parentScrollY;
        draEleLeft -= this.parentScrollX;
      }
      if (this.dragArea && typeof this.dragArea !== "string" && this.dragArea.classList.contains("e-kanban-content") && this.dragArea.style.position === "relative") {
        draEleTop += this.dragArea.scrollTop;
      }
      var dragValue = this.getProcessedPositionValue({
        top: draEleTop + "px",
        left: draEleLeft + "px"
      });
      if (this.isPreventScroll) {
        dragValue = this.getProcessedPositionValue({
          top: this.position.top - this.parentClientRect.top - 2 + "px",
          left: this.position.left - this.parentClientRect.left - 2 + "px"
        });
      }
      setStyleAttribute(helperElement, this.getDragPosition(dragValue));
      if (!this.elementInViewport(helperElement) && this.enableAutoScroll && !this.helperElement.classList.contains("e-treeview")) {
        this.helperElement.scrollIntoView();
      }
      var elements = document.querySelectorAll(":hover");
      if (this.enableAutoScroll && this.helperElement.classList.contains("e-treeview")) {
        if (elements.length === 0) {
          elements = this.getPathElements(evt);
        }
        var scrollParent = this.getScrollParent(elements, false);
        if (this.elementInViewport(this.helperElement)) {
          this.getScrollPosition(scrollParent, draEleTop);
        } else if (!this.elementInViewport(this.helperElement)) {
          elements = [].slice.call(document.querySelectorAll(":hover"));
          if (elements.length === 0) {
            elements = this.getPathElements(evt);
          }
          scrollParent = this.getScrollParent(elements, true);
          this.getScrollPosition(scrollParent, draEleTop);
        }
      }
      this.dragProcessStarted = true;
      this.prevLeft = left;
      this.prevTop = top;
      this.position.left = left;
      this.position.top = top;
      this.pageX = pagex;
      this.pageY = pagey;
    };
    Draggable4.prototype.getScrollParent = function(node, reverse) {
      var nodeEl = reverse ? node.reverse() : node;
      var hasScroll;
      for (var i = nodeEl.length - 1; i >= 0; i--) {
        hasScroll = window.getComputedStyle(nodeEl[parseInt(i.toString(), 10)])["overflow-y"];
        if ((hasScroll === "auto" || hasScroll === "scroll") && nodeEl[parseInt(i.toString(), 10)].scrollHeight > nodeEl[parseInt(i.toString(), 10)].clientHeight) {
          return nodeEl[parseInt(i.toString(), 10)];
        }
      }
      hasScroll = window.getComputedStyle(document.scrollingElement)["overflow-y"];
      if (hasScroll === "visible") {
        document.scrollingElement.style.overflow = "auto";
        return document.scrollingElement;
      }
    };
    Draggable4.prototype.getScrollPosition = function(nodeEle, draEleTop) {
      if (nodeEle && nodeEle === document.scrollingElement) {
        if (nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight < draEleTop && nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
          nodeEle.scrollTop += this.helperElement.clientHeight;
        } else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
          nodeEle.scrollTop -= this.helperElement.clientHeight;
        }
      } else if (nodeEle && nodeEle !== document.scrollingElement) {
        var docScrollTop = document.scrollingElement.scrollTop;
        var helperClientHeight = this.helperElement.clientHeight;
        if (nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - helperClientHeight + docScrollTop < draEleTop) {
          nodeEle.scrollTop += this.helperElement.clientHeight;
        } else if (nodeEle.getBoundingClientRect().top > draEleTop - helperClientHeight - docScrollTop) {
          nodeEle.scrollTop -= this.helperElement.clientHeight;
        }
      }
    };
    Draggable4.prototype.getPathElements = function(evt) {
      var elementTop = evt.clientX > 0 ? evt.clientX : 0;
      var elementLeft = evt.clientY > 0 ? evt.clientY : 0;
      return document.elementsFromPoint(elementTop, elementLeft);
    };
    Draggable4.prototype.triggerOutFunction = function(evt, eleObj) {
      this.hoverObject.instance.intOut(evt, eleObj.target);
      this.hoverObject.instance.dragData[this.scope] = null;
      this.hoverObject = null;
    };
    Draggable4.prototype.getDragPosition = function(dragValue) {
      var temp = extend({}, dragValue);
      if (this.axis) {
        if (this.axis === "x") {
          delete temp.top;
        } else if (this.axis === "y") {
          delete temp.left;
        }
      }
      return temp;
    };
    Draggable4.prototype.getDocumentWidthHeight = function(str) {
      var docBody = document.body;
      var docEle = document.documentElement;
      var returnValue = Math.max(docBody["scroll" + str], docEle["scroll" + str], docBody["offset" + str], docEle["offset" + str], docEle["client" + str]);
      return returnValue;
    };
    Draggable4.prototype.intDragStop = function(evt) {
      this.dragProcessStarted = false;
      if (!isUndefined(evt.changedTouches) && evt.changedTouches.length !== 1) {
        return;
      }
      var type = ["touchend", "pointerup", "mouseup"];
      if (type.indexOf(evt.type) !== -1) {
        if (this.dragStop) {
          var curTarget = this.getProperTargetElement(evt);
          this.trigger("dragStop", {
            event: evt,
            element: this.element,
            target: curTarget,
            helper: this.helperElement
          });
        }
        this.intDestroy(evt);
      } else {
        this.element.setAttribute("aria-grabbed", "false");
      }
      var eleObj = this.checkTargetElement(evt);
      if (eleObj.target && eleObj.instance) {
        eleObj.instance.dragStopCalled = true;
        eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
        eleObj.instance.intDrop(evt, eleObj.target);
      }
      this.setGlobalDroppables(true);
      document.body.classList.remove("e-prevent-select");
    };
    Draggable4.prototype.intDestroy = function(evt) {
      this.dragProcessStarted = false;
      this.toggleEvents();
      document.body.classList.remove("e-prevent-select");
      this.element.setAttribute("aria-grabbed", "false");
      EventHandler.remove(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.intDragStart);
      EventHandler.remove(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDragStop);
      EventHandler.remove(document, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDestroy);
      EventHandler.remove(document, Browser.isSafari() ? "touchmove" : Browser.touchMoveEvent, this.intDrag);
      if (this.isDragStarted()) {
        this.isDragStarted(true);
      }
    };
    Draggable4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Draggable4.prototype.getModuleName = function() {
      return "draggable";
    };
    Draggable4.prototype.isDragStarted = function(change) {
      if (change) {
        isDraggedObject.isDragged = !isDraggedObject.isDragged;
      }
      return isDraggedObject.isDragged;
    };
    Draggable4.prototype.setDragArea = function() {
      var eleWidthBound;
      var eleHeightBound;
      var top = 0;
      var left = 0;
      var ele;
      var type = typeof this.dragArea;
      if (type === "string") {
        ele = select(this.dragArea);
      } else {
        ele = this.dragArea;
      }
      if (ele) {
        var elementArea = ele.getBoundingClientRect();
        eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
        eleHeightBound = ele.scrollHeight ? this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains("e-treeview") ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
        var keys4 = ["Top", "Left", "Bottom", "Right"];
        var styles = getComputedStyle(ele);
        for (var i = 0; i < keys4.length; i++) {
          var key = keys4[parseInt(i.toString(), 10)];
          var tborder = styles["border" + key + "Width"];
          var tpadding = styles["padding" + key];
          var lowerKey = key.toLowerCase();
          this.borderWidth["" + lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
          this.padding["" + lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
        }
        if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains("e-treeview")) {
          top = elementArea.top + document.scrollingElement.scrollTop;
        } else {
          top = elementArea.top;
        }
        left = elementArea.left;
        this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
        this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;
        this.dragLimit.right = left + eleWidthBound - (this.borderWidth.right + this.padding.right);
        this.dragLimit.bottom = top + eleHeightBound - (this.borderWidth.bottom + this.padding.bottom);
      }
    };
    Draggable4.prototype.getProperTargetElement = function(evt) {
      var intCoord = this.getCoordinates(evt);
      var ele;
      var prevStyle = this.helperElement.style.pointerEvents || "";
      var isPointer = evt.type.indexOf("pointer") !== -1 && Browser.info.name === "safari" && parseInt(Browser.info.version, 10) > 12;
      if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf("touch") !== -1 || isPointer) {
        this.helperElement.style.pointerEvents = "none";
        ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
        this.helperElement.style.pointerEvents = prevStyle;
      } else {
        ele = evt.target;
      }
      return ele;
    };
    Draggable4.prototype.currentStateCheck = function(ele, oldEle) {
      var elem;
      if (!isNullOrUndefined(this.currentStateTarget) && this.currentStateTarget !== ele) {
        elem = this.currentStateTarget;
      } else {
        elem = !isNullOrUndefined(oldEle) ? oldEle : ele;
      }
      return elem;
    };
    Draggable4.prototype.getMousePosition = function(evt, isdragscroll) {
      var dragEle = evt.srcElement !== void 0 ? evt.srcElement : evt.target;
      var intCoord = this.getCoordinates(evt);
      var pageX;
      var pageY;
      var isOffsetParent = isNullOrUndefined(dragEle.offsetParent);
      if (isdragscroll) {
        pageX = this.clone ? intCoord.pageX : intCoord.pageX + (isOffsetParent ? 0 : dragEle.offsetParent.scrollLeft) - this.relativeXPosition;
        pageY = this.clone ? intCoord.pageY : intCoord.pageY + (isOffsetParent ? 0 : dragEle.offsetParent.scrollTop) - this.relativeYPosition;
      } else {
        pageX = this.clone ? intCoord.pageX : intCoord.pageX + window.pageXOffset - this.relativeXPosition;
        pageY = this.clone ? intCoord.pageY : intCoord.pageY + window.pageYOffset - this.relativeYPosition;
      }
      if (document.scrollingElement && !isdragscroll && !this.clone) {
        var ele = document.scrollingElement;
        var isVerticalScroll = ele.scrollHeight > 0 && ele.scrollHeight > ele.clientHeight && ele.scrollTop > 0;
        var isHorrizontalScroll = ele.scrollWidth > 0 && ele.scrollWidth > ele.clientWidth && ele.scrollLeft > 0;
        pageX = isHorrizontalScroll ? pageX - ele.scrollLeft : pageX;
        pageY = isVerticalScroll ? pageY - ele.scrollTop : pageY;
      }
      return {
        left: pageX - (this.margin.left + this.cursorAt.left),
        top: pageY - (this.margin.top + this.cursorAt.top)
      };
    };
    Draggable4.prototype.getCoordinates = function(evt) {
      if (evt.type.indexOf("touch") > -1) {
        return evt.changedTouches[0];
      }
      return evt;
    };
    Draggable4.prototype.getHelperElement = function(evt) {
      var element2;
      if (this.clone) {
        if (this.helper) {
          element2 = this.helper({
            sender: evt,
            element: this.target
          });
        } else {
          element2 = createElement("div", {
            className: "e-drag-helper e-block-touch",
            innerHTML: "Draggable"
          });
          document.body.appendChild(element2);
        }
      } else {
        element2 = this.element;
      }
      return element2;
    };
    Draggable4.prototype.setGlobalDroppables = function(reset, drag2, helper) {
      this.droppables[this.scope] = reset ? null : {
        draggable: drag2,
        helper,
        draggedElement: this.element
      };
    };
    Draggable4.prototype.checkTargetElement = function(evt) {
      var target = this.getProperTargetElement(evt);
      var dropIns = this.getDropInstance(target);
      if (!dropIns && target && !isNullOrUndefined(target.parentNode)) {
        var parent_1 = closest(target.parentNode, ".e-droppable") || target.parentElement;
        if (parent_1) {
          dropIns = this.getDropInstance(parent_1);
        }
      }
      return {
        target,
        instance: dropIns
      };
    };
    Draggable4.prototype.getDropInstance = function(ele) {
      var name = "getModuleName";
      var drop;
      var eleInst = ele && ele.ej2_instances;
      if (eleInst) {
        for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {
          var inst = eleInst_1[_i];
          if (inst["" + name]() === "droppable") {
            drop = inst;
            break;
          }
        }
      }
      return drop;
    };
    Draggable4.prototype.destroy = function() {
      this.toggleEvents(true);
      _super.prototype.destroy.call(this);
    };
    var Draggable_1;
    __decorate4([Complex({}, Position)], Draggable4.prototype, "cursorAt", void 0);
    __decorate4([Property(true)], Draggable4.prototype, "clone", void 0);
    __decorate4([Property()], Draggable4.prototype, "dragArea", void 0);
    __decorate4([Property()], Draggable4.prototype, "isDragScroll", void 0);
    __decorate4([Property()], Draggable4.prototype, "isReplaceDragEle", void 0);
    __decorate4([Property(true)], Draggable4.prototype, "isPreventSelect", void 0);
    __decorate4([Property(false)], Draggable4.prototype, "isPreventScroll", void 0);
    __decorate4([Event2()], Draggable4.prototype, "drag", void 0);
    __decorate4([Event2()], Draggable4.prototype, "dragStart", void 0);
    __decorate4([Event2()], Draggable4.prototype, "dragStop", void 0);
    __decorate4([Property(1)], Draggable4.prototype, "distance", void 0);
    __decorate4([Property()], Draggable4.prototype, "handle", void 0);
    __decorate4([Property()], Draggable4.prototype, "abort", void 0);
    __decorate4([Property()], Draggable4.prototype, "helper", void 0);
    __decorate4([Property("default")], Draggable4.prototype, "scope", void 0);
    __decorate4([Property("")], Draggable4.prototype, "dragTarget", void 0);
    __decorate4([Property()], Draggable4.prototype, "axis", void 0);
    __decorate4([Property()], Draggable4.prototype, "queryPositionInfo", void 0);
    __decorate4([Property(false)], Draggable4.prototype, "enableTailMode", void 0);
    __decorate4([Property(false)], Draggable4.prototype, "skipDistanceCheck", void 0);
    __decorate4([Property(true)], Draggable4.prototype, "preventDefault", void 0);
    __decorate4([Property(false)], Draggable4.prototype, "enableAutoScroll", void 0);
    __decorate4([Property(false)], Draggable4.prototype, "enableTapHold", void 0);
    __decorate4([Property(750)], Draggable4.prototype, "tapHoldThreshold", void 0);
    __decorate4([Property(false)], Draggable4.prototype, "enableScrollHandler", void 0);
    Draggable4 = Draggable_1 = __decorate4([NotifyPropertyChanges], Draggable4);
    return Draggable4;
  }(Base)
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/droppable.js
var __extends4 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate5 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Droppable = (
  /** @class */
  function(_super) {
    __extends4(Droppable4, _super);
    function Droppable4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.mouseOver = false;
      _this.dragData = {};
      _this.dragStopCalled = false;
      _this.bind();
      return _this;
    }
    Droppable4.prototype.bind = function() {
      this.wireEvents();
    };
    Droppable4.prototype.wireEvents = function() {
      EventHandler.add(this.element, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDrop, this);
    };
    Droppable4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Droppable4.prototype.getModuleName = function() {
      return "droppable";
    };
    Droppable4.prototype.intOver = function(event2, element2) {
      if (!this.mouseOver) {
        var drag2 = this.dragData[this.scope];
        this.trigger("over", {
          event: event2,
          target: element2,
          dragData: drag2
        });
        this.mouseOver = true;
      }
    };
    Droppable4.prototype.intOut = function(event2, element2) {
      if (this.mouseOver) {
        this.trigger("out", {
          evt: event2,
          target: element2
        });
        this.mouseOver = false;
      }
    };
    Droppable4.prototype.intDrop = function(evt, element2) {
      if (!this.dragStopCalled) {
        return;
      } else {
        this.dragStopCalled = false;
      }
      var accept = true;
      var drag2 = this.dragData[this.scope];
      var isDrag = drag2 ? drag2.helper && isVisible(drag2.helper) : false;
      var area;
      if (isDrag) {
        area = this.isDropArea(evt, drag2.helper, element2);
        if (this.accept) {
          accept = matches(drag2.helper, this.accept);
        }
      }
      if (isDrag && this.drop && area.canDrop && accept) {
        this.trigger("drop", {
          event: evt,
          target: area.target,
          droppedElement: drag2.helper,
          dragData: drag2
        });
      }
      this.mouseOver = false;
    };
    Droppable4.prototype.isDropArea = function(evt, helper, element2) {
      var area = {
        canDrop: true,
        target: element2 || evt.target
      };
      var isTouch = evt.type === "touchend";
      if (isTouch || area.target === helper) {
        helper.style.display = "none";
        var coord = isTouch ? evt.changedTouches[0] : evt;
        var ele = document.elementFromPoint(coord.clientX, coord.clientY);
        area.canDrop = false;
        area.canDrop = compareElementParent(ele, this.element);
        if (area.canDrop) {
          area.target = ele;
        }
        helper.style.display = "";
      }
      return area;
    };
    Droppable4.prototype.destroy = function() {
      EventHandler.remove(this.element, Browser.isSafari() ? "touchend" : Browser.touchEndEvent, this.intDrop);
      _super.prototype.destroy.call(this);
    };
    __decorate5([Property()], Droppable4.prototype, "accept", void 0);
    __decorate5([Property("default")], Droppable4.prototype, "scope", void 0);
    __decorate5([Event2()], Droppable4.prototype, "drop", void 0);
    __decorate5([Event2()], Droppable4.prototype, "over", void 0);
    __decorate5([Event2()], Droppable4.prototype, "out", void 0);
    Droppable4 = __decorate5([NotifyPropertyChanges], Droppable4);
    return Droppable4;
  }(Base)
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/keyboard.js
var __extends5 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate6 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var keyCode = {
  "backspace": 8,
  "tab": 9,
  "enter": 13,
  "shift": 16,
  "control": 17,
  "alt": 18,
  "pause": 19,
  "capslock": 20,
  "space": 32,
  "escape": 27,
  "pageup": 33,
  "pagedown": 34,
  "end": 35,
  "home": 36,
  "leftarrow": 37,
  "uparrow": 38,
  "rightarrow": 39,
  "downarrow": 40,
  "insert": 45,
  "delete": 46,
  "f1": 112,
  "f2": 113,
  "f3": 114,
  "f4": 115,
  "f5": 116,
  "f6": 117,
  "f7": 118,
  "f8": 119,
  "f9": 120,
  "f10": 121,
  "f11": 122,
  "f12": 123,
  "semicolon": 186,
  "plus": 187,
  "comma": 188,
  "minus": 189,
  "dot": 190,
  "forwardslash": 191,
  "graveaccent": 192,
  "openbracket": 219,
  "backslash": 220,
  "closebracket": 221,
  "singlequote": 222
};
var KeyboardEvents = (
  /** @class */
  function(_super) {
    __extends5(KeyboardEvents4, _super);
    function KeyboardEvents4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.keyPressHandler = function(e) {
        var isAltKey = e.altKey;
        var isCtrlKey = e.ctrlKey;
        var isShiftKey = e.shiftKey;
        var curkeyCode = e.which;
        var keys4 = Object.keys(_this.keyConfigs);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var key = keys_1[_i];
          var configCollection = _this.keyConfigs["" + key].split(",");
          for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
            var rconfig = configCollection_1[_a];
            var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
            if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey && isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
              e.action = key;
              if (_this.keyAction) {
                _this.keyAction(e);
              }
            }
          }
        }
      };
      _this.bind();
      return _this;
    }
    KeyboardEvents_1 = KeyboardEvents4;
    KeyboardEvents4.prototype.destroy = function() {
      this.unwireEvents();
      _super.prototype.destroy.call(this);
    };
    KeyboardEvents4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    KeyboardEvents4.prototype.bind = function() {
      this.wireEvents();
    };
    KeyboardEvents4.prototype.getModuleName = function() {
      return "keyboard";
    };
    KeyboardEvents4.prototype.wireEvents = function() {
      this.element.addEventListener(this.eventName, this.keyPressHandler);
    };
    KeyboardEvents4.prototype.unwireEvents = function() {
      this.element.removeEventListener(this.eventName, this.keyPressHandler);
    };
    KeyboardEvents4.getKeyConfigData = function(config) {
      if (config in this.configCache) {
        return this.configCache["" + config];
      }
      var keys4 = config.toLowerCase().split("+");
      var keyData = {
        altKey: keys4.indexOf("alt") !== -1 ? true : false,
        ctrlKey: keys4.indexOf("ctrl") !== -1 ? true : false,
        shiftKey: keys4.indexOf("shift") !== -1 ? true : false,
        keyCode: null
      };
      if (keys4[keys4.length - 1].length > 1 && !!Number(keys4[keys4.length - 1])) {
        keyData.keyCode = Number(keys4[keys4.length - 1]);
      } else {
        keyData.keyCode = KeyboardEvents_1.getKeyCode(keys4[keys4.length - 1]);
      }
      KeyboardEvents_1.configCache["" + config] = keyData;
      return keyData;
    };
    KeyboardEvents4.getKeyCode = function(keyVal) {
      return keyCode["" + keyVal] || keyVal.toUpperCase().charCodeAt(0);
    };
    var KeyboardEvents_1;
    KeyboardEvents4.configCache = {};
    __decorate6([Property({})], KeyboardEvents4.prototype, "keyConfigs", void 0);
    __decorate6([Property("keyup")], KeyboardEvents4.prototype, "eventName", void 0);
    __decorate6([Event2()], KeyboardEvents4.prototype, "keyAction", void 0);
    KeyboardEvents4 = KeyboardEvents_1 = __decorate6([NotifyPropertyChanges], KeyboardEvents4);
    return KeyboardEvents4;
  }(Base)
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/l10n.js
var L10n = (
  /** @class */
  function() {
    function L10n4(controlName, localeStrings, locale) {
      this.controlName = controlName;
      this.localeStrings = localeStrings;
      this.setLocale(locale || defaultCulture);
    }
    L10n4.prototype.setLocale = function(locale) {
      var intLocale = this.intGetControlConstant(L10n4.locale, locale);
      this.currentLocale = intLocale || this.localeStrings;
    };
    L10n4.load = function(localeObject) {
      this.locale = extend(this.locale, localeObject, {}, true);
    };
    L10n4.prototype.getConstant = function(prop) {
      if (!isNullOrUndefined(this.currentLocale["" + prop])) {
        return this.currentLocale["" + prop];
      } else {
        return this.localeStrings["" + prop] || "";
      }
    };
    L10n4.prototype.intGetControlConstant = function(curObject, locale) {
      if (curObject["" + locale]) {
        return curObject["" + locale][this.controlName];
      }
      return null;
    };
    L10n4.locale = {};
    return L10n4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/touch.js
var __extends6 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate7 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SwipeSettings = (
  /** @class */
  function(_super) {
    __extends6(SwipeSettings4, _super);
    function SwipeSettings4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate7([Property(50)], SwipeSettings4.prototype, "swipeThresholdDistance", void 0);
    return SwipeSettings4;
  }(ChildProperty)
);
var swipeRegex = /(Up|Down)/;
var Touch = (
  /** @class */
  function(_super) {
    __extends6(Touch4, _super);
    function Touch4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.touchAction = true;
      _this.tapCount = 0;
      _this.startEvent = function(evt) {
        if (_this.touchAction === true) {
          var point = _this.updateChangeTouches(evt);
          if (evt.changedTouches !== void 0) {
            _this.touchAction = false;
          }
          _this.isTouchMoved = false;
          _this.movedDirection = "";
          _this.startPoint = _this.lastMovedPoint = {
            clientX: point.clientX,
            clientY: point.clientY
          };
          _this.startEventData = point;
          _this.hScrollLocked = _this.vScrollLocked = false;
          _this.tStampStart = Date.now();
          _this.timeOutTapHold = setTimeout(function() {
            _this.tapHoldEvent(evt);
          }, _this.tapHoldThreshold);
          EventHandler.add(_this.element, Browser.touchMoveEvent, _this.moveEvent, _this);
          EventHandler.add(_this.element, Browser.touchEndEvent, _this.endEvent, _this);
          EventHandler.add(_this.element, Browser.touchCancelEvent, _this.cancelEvent, _this);
        }
      };
      _this.moveEvent = function(evt) {
        var point = _this.updateChangeTouches(evt);
        _this.movedPoint = point;
        _this.isTouchMoved = !(point.clientX === _this.startPoint.clientX && point.clientY === _this.startPoint.clientY);
        var eScrollArgs = {};
        if (_this.isTouchMoved) {
          clearTimeout(_this.timeOutTapHold);
          _this.calcScrollPoints(evt);
          var scrollArg = {
            startEvents: _this.startEventData,
            originalEvent: evt,
            startX: _this.startPoint.clientX,
            startY: _this.startPoint.clientY,
            distanceX: _this.distanceX,
            distanceY: _this.distanceY,
            scrollDirection: _this.scrollDirection,
            velocity: _this.getVelocity(point)
          };
          eScrollArgs = extend(eScrollArgs, {}, scrollArg);
          _this.trigger("scroll", eScrollArgs);
          _this.lastMovedPoint = {
            clientX: point.clientX,
            clientY: point.clientY
          };
        }
      };
      _this.cancelEvent = function(evt) {
        clearTimeout(_this.timeOutTapHold);
        clearTimeout(_this.timeOutTap);
        _this.tapCount = 0;
        _this.swipeFn(evt);
        EventHandler.remove(_this.element, Browser.touchCancelEvent, _this.cancelEvent);
      };
      _this.endEvent = function(evt) {
        _this.swipeFn(evt);
        if (!_this.isTouchMoved) {
          if (typeof _this.tap === "function") {
            _this.trigger("tap", {
              originalEvent: evt,
              tapCount: ++_this.tapCount
            });
            _this.timeOutTap = setTimeout(function() {
              _this.tapCount = 0;
            }, _this.tapThreshold);
          }
        }
        _this.modeclear();
      };
      _this.swipeFn = function(evt) {
        clearTimeout(_this.timeOutTapHold);
        clearTimeout(_this.timeOutTap);
        var point = _this.updateChangeTouches(evt);
        var diffX = point.clientX - _this.startPoint.clientX;
        var diffY = point.clientY - _this.startPoint.clientY;
        diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
        diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
        _this.isTouchMoved = diffX > 1 || diffY > 1;
        var isFirefox = /Firefox/.test(Browser.userAgent);
        if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === "mouseup") {
          _this.isTouchMoved = false;
        }
        _this.endPoint = point;
        _this.calcPoints(evt);
        var swipeArgs = {
          originalEvent: evt,
          startEvents: _this.startEventData,
          startX: _this.startPoint.clientX,
          startY: _this.startPoint.clientY,
          distanceX: _this.distanceX,
          distanceY: _this.distanceY,
          swipeDirection: _this.movedDirection,
          velocity: _this.getVelocity(point)
        };
        if (_this.isTouchMoved) {
          var tDistance = _this.swipeSettings.swipeThresholdDistance;
          var eSwipeArgs = extend(void 0, _this.defaultArgs, swipeArgs);
          var canTrigger = false;
          var ele = _this.element;
          var scrollBool = _this.isScrollable(ele);
          var moved = swipeRegex.test(_this.movedDirection);
          if (tDistance < _this.distanceX && !moved || tDistance < _this.distanceY && moved) {
            if (!scrollBool) {
              canTrigger = true;
            } else {
              canTrigger = _this.checkSwipe(ele, moved);
            }
          }
          if (canTrigger) {
            _this.trigger("swipe", eSwipeArgs);
          }
        }
        _this.modeclear();
      };
      _this.modeclear = function() {
        _this.modeClear = setTimeout(function() {
          _this.touchAction = true;
        }, typeof _this.tap !== "function" ? 0 : 20);
        _this.lastTapTime = (/* @__PURE__ */ new Date()).getTime();
        EventHandler.remove(_this.element, Browser.touchMoveEvent, _this.moveEvent);
        EventHandler.remove(_this.element, Browser.touchEndEvent, _this.endEvent);
        EventHandler.remove(_this.element, Browser.touchCancelEvent, _this.cancelEvent);
      };
      _this.bind();
      return _this;
    }
    Touch4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Touch4.prototype.bind = function() {
      this.wireEvents();
      if (Browser.isIE) {
        this.element.classList.add("e-block-touch");
      }
    };
    Touch4.prototype.destroy = function() {
      this.unwireEvents();
      _super.prototype.destroy.call(this);
    };
    Touch4.prototype.wireEvents = function() {
      EventHandler.add(this.element, Browser.touchStartEvent, this.startEvent, this);
    };
    Touch4.prototype.unwireEvents = function() {
      EventHandler.remove(this.element, Browser.touchStartEvent, this.startEvent);
    };
    Touch4.prototype.getModuleName = function() {
      return "touch";
    };
    Touch4.prototype.isScrollable = function(element2) {
      var eleStyle = getComputedStyle(element2);
      var style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;
      if (/(auto|scroll)/.test(style)) {
        return true;
      }
      return false;
    };
    Touch4.prototype.tapHoldEvent = function(evt) {
      this.tapCount = 0;
      this.touchAction = true;
      EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent);
      EventHandler.remove(this.element, Browser.touchEndEvent, this.endEvent);
      var eTapArgs = {
        originalEvent: evt
      };
      this.trigger("tapHold", eTapArgs);
      EventHandler.remove(this.element, Browser.touchCancelEvent, this.cancelEvent);
    };
    Touch4.prototype.calcPoints = function(evt) {
      var point = this.updateChangeTouches(evt);
      this.defaultArgs = {
        originalEvent: evt
      };
      this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.startPoint.clientX));
      this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.startPoint.clientY));
      if (this.distanceX > this.distanceY) {
        this.movedDirection = point.clientX > this.startPoint.clientX ? "Right" : "Left";
      } else {
        this.movedDirection = point.clientY < this.startPoint.clientY ? "Up" : "Down";
      }
    };
    Touch4.prototype.calcScrollPoints = function(evt) {
      var point = this.updateChangeTouches(evt);
      this.defaultArgs = {
        originalEvent: evt
      };
      this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.lastMovedPoint.clientX));
      this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.lastMovedPoint.clientY));
      if ((this.distanceX > this.distanceY || this.hScrollLocked === true) && this.vScrollLocked === false) {
        this.scrollDirection = point.clientX > this.lastMovedPoint.clientX ? "Right" : "Left";
        this.hScrollLocked = true;
      } else {
        this.scrollDirection = point.clientY < this.lastMovedPoint.clientY ? "Up" : "Down";
        this.vScrollLocked = true;
      }
    };
    Touch4.prototype.getVelocity = function(pnt) {
      var newX = pnt.clientX;
      var newY = pnt.clientY;
      var newT = Date.now();
      var xDist = newX - this.startPoint.clientX;
      var yDist = newY - this.startPoint.clientX;
      var interval = newT - this.tStampStart;
      return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
    };
    Touch4.prototype.checkSwipe = function(ele, flag) {
      var keys4 = ["scroll", "offset"];
      var temp = flag ? ["Height", "Top"] : ["Width", "Left"];
      if (ele[keys4[0] + temp[0]] <= ele[keys4[1] + temp[0]]) {
        return true;
      }
      return ele[keys4[0] + temp[1]] === 0 || ele[keys4[1] + temp[0]] + ele[keys4[0] + temp[1]] >= ele[keys4[0] + temp[0]];
    };
    Touch4.prototype.updateChangeTouches = function(evt) {
      var point = evt.changedTouches && evt.changedTouches.length !== 0 ? evt.changedTouches[0] : evt;
      return point;
    };
    __decorate7([Event2()], Touch4.prototype, "tap", void 0);
    __decorate7([Event2()], Touch4.prototype, "tapHold", void 0);
    __decorate7([Event2()], Touch4.prototype, "swipe", void 0);
    __decorate7([Event2()], Touch4.prototype, "scroll", void 0);
    __decorate7([Property(350)], Touch4.prototype, "tapThreshold", void 0);
    __decorate7([Property(750)], Touch4.prototype, "tapHoldThreshold", void 0);
    __decorate7([Complex({}, SwipeSettings)], Touch4.prototype, "swipeSettings", void 0);
    Touch4 = __decorate7([NotifyPropertyChanges], Touch4);
    return Touch4;
  }(Base)
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/template.js
var LINES = new RegExp("\\n|\\r|\\s\\s+", "g");
var QUOTES = new RegExp(/'|"/g);
var IF_STMT = new RegExp("if ?\\(");
var ELSEIF_STMT = new RegExp("else if ?\\(");
var ELSE_STMT = new RegExp("else");
var FOR_STMT = new RegExp("for ?\\(");
var IF_OR_FOR = new RegExp("(/if|/for)");
var CALL_FUNCTION = new RegExp("\\((.*)\\)", "");
var NOT_NUMBER = new RegExp("^[0-9]+$", "g");
var WORD = new RegExp(`[\\w"'.\\s+]+`, "g");
var DBL_QUOTED_STR = new RegExp('"(.*?)"', "g");
var WORDIF = new RegExp(`[\\w"'@#$.\\s-+]+`, "g");
var exp = new RegExp("\\${([^}]*)}", "g");
var ARR_OBJ = /^\..*/gm;
var SINGLE_SLASH = /\\/gi;
var DOUBLE_SLASH = /\\\\/gi;
var WORDFUNC = new RegExp(`[\\w"'@#$.\\s+]+`, "g");
var WINDOWFUNC = /\window\./gm;
function compile(template, helper, ignorePrefix) {
  if (typeof template === "function") {
    return template;
  } else {
    var argName = "data";
    var evalExpResult = evalExp(template, argName, helper, ignorePrefix);
    var condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
        var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
        if(str.match(valueRegEx)){
            var check = str.match(valueRegEx);
            var str1 = str;
            for (var i=0; i < check.length; i++) {
                var check1 = str.match(valueRegEx)[i].split('value=')[1];
                var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
                change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
                str1 = str1.replace(check1, change);
            }
            str = str.replace(str, str1);
        }
        else if (str.match(/(?:href='')/) === null) {
            if(str.match(hrefRegex)) {
                var check = str.match(hrefRegex);
                var str1 = str;
                for (var i=0; i < check.length; i++) {
                    var check1 = str.match(hrefRegex)[i].split('href=')[1];
                    if (check1) {
                        var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
                        change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
                        str1 = str1.replace(check1, change);
                    }
                }
                str = str.replace(str, str1);
            }
        }
        `;
    var fnCode = 'var str="' + evalExpResult + '";' + condtion + " return str;";
    var fn = new Function(argName, fnCode);
    return fn.bind(helper);
  }
}
function evalExp(str, nameSpace, helper, ignorePrefix) {
  var varCOunt = 0;
  var localKeys = [];
  var isClass = str.match(/class="([^"]+|)\s{2}/g);
  var singleSpace = "";
  if (isClass) {
    isClass.forEach(function(value) {
      singleSpace = value.replace(/\s\s+/g, " ");
      str = str.replace(value, singleSpace);
    });
  }
  if (exp.test(str)) {
    var insideBraces = false;
    var outputString = "";
    for (var i = 0; i < str.length; i++) {
      if (str[i + ""] === "$" && str[i + 1] === "{") {
        insideBraces = true;
      } else if (str[i + ""] === "}") {
        insideBraces = false;
      }
      outputString += str[i + ""] === '"' && !insideBraces ? '\\"' : str[i + ""];
    }
    str = outputString;
  } else {
    str = str.replace(/\\?"/g, '\\"');
  }
  return str.replace(LINES, "").replace(DBL_QUOTED_STR, "'$1'").replace(exp, function(match, cnt, offset, matchStr) {
    var SPECIAL_CHAR = /@|#|\$/gm;
    var matches5 = cnt.match(CALL_FUNCTION);
    if (matches5) {
      var rlStr = matches5[1];
      if (ELSEIF_STMT.test(cnt)) {
        cnt = '";} ' + cnt.replace(matches5[1], rlStr.replace(WORD, function(str2) {
          str2 = str2.trim();
          return addNameSpace(str2, !QUOTES.test(str2) && localKeys.indexOf(str2) === -1, nameSpace, localKeys, ignorePrefix);
        })) + '{ \n str = str + "';
      } else if (IF_STMT.test(cnt)) {
        cnt = '"; ' + cnt.replace(matches5[1], rlStr.replace(WORDIF, function(strs) {
          return HandleSpecialCharArrObj(strs, nameSpace, localKeys, ignorePrefix);
        })) + '{ \n str = str + "';
      } else if (FOR_STMT.test(cnt)) {
        var rlStr_1 = matches5[1].split(" of ");
        cnt = '"; ' + cnt.replace(matches5[1], function(mtc) {
          localKeys.push(rlStr_1[0]);
          localKeys.push(rlStr_1[0] + "Index");
          varCOunt = varCOunt + 1;
          return "var i" + varCOunt + "=0; i" + varCOunt + " < " + addNameSpace(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + ".length; i" + varCOunt + "++";
        }) + "{ \n " + rlStr_1[0] + "= " + addNameSpace(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + "[i" + varCOunt + "]; \n var " + rlStr_1[0] + "Index=i" + varCOunt + '; \n str = str + "';
      } else {
        var fnStr = cnt.split("(");
        var fNameSpace = helper && Object.prototype.hasOwnProperty.call(helper, fnStr[0]) ? "this." : "global";
        fNameSpace = /\./.test(fnStr[0]) ? "" : fNameSpace;
        var ftArray = matches5[1].split(",");
        if (matches5[1].length !== 0 && !/data/.test(ftArray[0]) && !/window./.test(ftArray[0])) {
          matches5[1] = fNameSpace === "global" ? nameSpace + "." + matches5[1] : matches5[1];
        }
        var splRegexp = /@|\$|#/gm;
        var arrObj = /\]\./gm;
        if (WINDOWFUNC.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
          var splArrRegexp = /@|\$|#|\]\./gm;
          if (splArrRegexp.test(cnt)) {
            cnt = '"+ ' + (fNameSpace === "global" ? "" : fNameSpace) + cnt.replace(matches5[1], rlStr.replace(WORDFUNC, function(strs) {
              return HandleSpecialCharArrObj(strs, nameSpace, localKeys, ignorePrefix);
            })) + '+ "';
          }
        } else {
          cnt = '" + ' + (fNameSpace === "global" ? "" : fNameSpace) + cnt.replace(rlStr, addNameSpace(matches5[1].replace(/,( |)data.|,/gi, "," + nameSpace + ".").replace(/,( |)data.window/gi, ",window"), fNameSpace === "global" ? false : true, nameSpace, localKeys, ignorePrefix)) + '+"';
        }
      }
    } else if (ELSE_STMT.test(cnt)) {
      cnt = '"; ' + cnt.replace(ELSE_STMT, '} else { \n str = str + "');
    } else if (cnt.match(IF_OR_FOR)) {
      cnt = cnt.replace(IF_OR_FOR, '"; \n } \n str = str + "');
    } else if (SPECIAL_CHAR.test(cnt)) {
      if (cnt.match(SINGLE_SLASH)) {
        cnt = SlashReplace(cnt);
      }
      cnt = '"+' + NameSpaceForspecialChar(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
    } else {
      if (cnt.match(SINGLE_SLASH)) {
        cnt = SlashReplace(cnt);
        cnt = '"+' + NameSpaceForspecialChar(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
      } else {
        cnt = cnt !== "" ? '"+' + addNameSpace(cnt.replace(/,/gi, "+" + nameSpace + "."), localKeys.indexOf(cnt) === -1, nameSpace, localKeys, ignorePrefix) + '+"' : "${}";
      }
    }
    return cnt;
  });
}
function addNameSpace(str, addNS, nameSpace, ignoreList, ignorePrefix) {
  return addNS && !NOT_NUMBER.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 && !ignorePrefix && str !== "true" && str !== "false" ? nameSpace + "." + str : str;
}
function NameSpaceArrObj(str, addNS, nameSpace, ignoreList) {
  var arrObjReg = /^\..*/gm;
  return addNS && !NOT_NUMBER.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 && !arrObjReg.test(str) ? nameSpace + "." + str : str;
}
function NameSpaceForspecialChar(str, addNS, nameSpace, ignoreList) {
  return addNS && !NOT_NUMBER.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 ? nameSpace + '["' + str : str;
}
function SlashReplace(tempStr) {
  var double = "\\\\";
  if (tempStr.match(DOUBLE_SLASH)) {
    return tempStr;
  } else {
    return tempStr.replace(SINGLE_SLASH, double);
  }
}
function HandleSpecialCharArrObj(str, nameSpaceNew, keys4, ignorePrefix) {
  str = str.trim();
  var windowFunc = /\window\./gm;
  if (!windowFunc.test(str)) {
    var quotes = /'|"/gm;
    var splRegexp = /@|\$|#/gm;
    if (splRegexp.test(str)) {
      str = NameSpaceForspecialChar(str, keys4.indexOf(str) === -1, nameSpaceNew, keys4) + '"]';
    }
    if (ARR_OBJ.test(str)) {
      return NameSpaceArrObj(str, !quotes.test(str) && keys4.indexOf(str) === -1, nameSpaceNew, keys4);
    } else {
      return addNameSpace(str, !quotes.test(str) && keys4.indexOf(str) === -1, nameSpaceNew, keys4, ignorePrefix);
    }
  } else {
    return str;
  }
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/template-engine.js
function setTemplateEngine(classObj) {
  engineObj.compile = classObj.compile;
}
function getTemplateEngine() {
  return engineObj.compile;
}
var Engine = (
  /** @class */
  function() {
    function Engine4() {
    }
    Engine4.prototype.compile = function(templateString, helper, ignorePrefix) {
      if (helper === void 0) {
        helper = {};
      }
      return compile(templateString, helper);
    };
    return Engine4;
  }()
);
var engineObj = {
  compile: new Engine().compile
};

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-base/src/sanitize-helper.js
var removeTags = ["script", "style", "iframe[src]", 'link[href*="javascript:"]', 'object[type="text/x-scriptlet"]', 'object[data^="data:text/html;base64"]', 'img[src^="data:text/html;base64"]', '[src^="javascript:"]', '[dynsrc^="javascript:"]', '[lowsrc^="javascript:"]', '[type^="application/x-shockwave-flash"]'];
var removeAttrs = [{
  attribute: "href",
  selector: '[href*="javascript:"]'
}, {
  attribute: "href",
  selector: "a[href]"
}, {
  attribute: "background",
  selector: '[background^="javascript:"]'
}, {
  attribute: "style",
  selector: '[style*="javascript:"]'
}, {
  attribute: "style",
  selector: '[style*="expression("]'
}, {
  attribute: "href",
  selector: 'a[href^="data:text/html;base64"]'
}];
var jsEvents = ["onchange", "onclick", "onmouseover", "onmouseout", "onkeydown", "onload", "onerror", "onblur", "onfocus", "onbeforeload", "onbeforeunload", "onkeyup", "onsubmit", "onafterprint", "onbeforeonload", "onbeforeprint", "oncanplay", "oncanplaythrough", "oncontextmenu", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onformchange", "onforminput", "onhaschange", "oninput", "oninvalid", "onkeypress", "onloadeddata", "onloadedmetadata", "onloadstart", "onmessage", "onmousedown", "onmousemove", "onmouseup", "onmousewheel", "onoffline", "onoine", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpopstate", "onprogress", "onratechange", "onreadystatechange", "onredo", "onresize", "onscroll", "onseeked", "onseeking", "onselect", "onstalled", "onstorage", "onsuspend", "ontimeupdate", "onundo", "onunload", "onvolumechange", "onwaiting", "onmouseenter", "onmouseleave", "onstart", "onpropertychange", "oncopy", "ontoggle", "onpointerout", "onpointermove", "onpointerleave", "onpointerenter", "onpointerrawupdate", "onpointerover", "onbeforecopy", "onbeforecut", "onbeforeinput"];
var SanitizeHtmlHelper = (
  /** @class */
  function() {
    function SanitizeHtmlHelper4() {
    }
    SanitizeHtmlHelper4.beforeSanitize = function() {
      return {
        selectors: {
          tags: removeTags,
          attributes: removeAttrs
        }
      };
    };
    SanitizeHtmlHelper4.sanitize = function(value) {
      if (isNullOrUndefined(value)) {
        return value;
      }
      var item = this.beforeSanitize();
      var output = this.serializeValue(item, value);
      return output;
    };
    SanitizeHtmlHelper4.serializeValue = function(item, value) {
      this.removeAttrs = item.selectors.attributes;
      this.removeTags = item.selectors.tags;
      this.wrapElement = document.createElement("div");
      this.wrapElement.innerHTML = value;
      this.removeXssTags();
      this.removeJsEvents();
      this.removeXssAttrs();
      var tempEleValue = this.wrapElement.innerHTML;
      this.removeElement();
      this.wrapElement = null;
      return tempEleValue.replace(/&amp;/g, "&");
    };
    SanitizeHtmlHelper4.removeElement = function() {
      var nodes = this.wrapElement.children;
      for (var j = 0; j < nodes.length; j++) {
        var attribute = nodes[parseInt(j.toString(), 10)].attributes;
        for (var i = 0; i < attribute.length; i++) {
          this.wrapElement.children[parseInt(j.toString(), 10)].removeAttribute(attribute[parseInt(i.toString(), 10)].localName);
        }
      }
    };
    SanitizeHtmlHelper4.removeXssTags = function() {
      var elements = this.wrapElement.querySelectorAll(this.removeTags.join(","));
      if (elements.length > 0) {
        elements.forEach(function(element2) {
          detach(element2);
        });
      } else {
        return;
      }
    };
    SanitizeHtmlHelper4.removeJsEvents = function() {
      var elements = this.wrapElement.querySelectorAll("[" + jsEvents.join("],[") + "]");
      if (elements.length > 0) {
        elements.forEach(function(element2) {
          jsEvents.forEach(function(attr) {
            if (element2.hasAttribute(attr)) {
              element2.removeAttribute(attr);
            }
          });
        });
      } else {
        return;
      }
    };
    SanitizeHtmlHelper4.removeXssAttrs = function() {
      var _this = this;
      this.removeAttrs.forEach(function(item, index) {
        var elements = _this.wrapElement.querySelectorAll(item.selector);
        if (elements.length > 0) {
          if (item.selector === "a[href]") {
            elements.forEach(function(element2) {
              if (element2.getAttribute(item.attribute).replace(/\t|\s|&/, "").indexOf("javascript:alert") !== -1) {
                element2.removeAttribute(item.attribute);
              }
            });
          } else {
            elements.forEach(function(element2) {
              element2.removeAttribute(item.attribute);
            });
          }
        }
      });
    };
    return SanitizeHtmlHelper4;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-angular-base/src/util.js
function applyMixins(derivedClass, baseClass) {
  baseClass.forEach(function(baseClass2) {
    Object.getOwnPropertyNames(baseClass2.prototype).forEach(function(name) {
      if (!Object.prototype.hasOwnProperty.call(derivedClass.prototype, name) || baseClass2.isFormBase && name !== "constructor") {
        derivedClass.prototype["".concat(name)] = baseClass2.prototype["".concat(name)];
      }
    });
  });
}
function ComponentMixins(baseClass) {
  return function(derivedClass) {
    applyMixins(derivedClass, baseClass);
  };
}
function registerEvents(eventList, obj, direct) {
  var ngEventsEmitter = {};
  if (eventList && eventList.length) {
    for (var _i = 0, eventList_1 = eventList; _i < eventList_1.length; _i++) {
      var event_1 = eventList_1[_i];
      if (direct === true) {
        obj.propCollection["".concat(event_1)] = new EventEmitter(false);
        obj["".concat(event_1)] = obj.propCollection["".concat(event_1)];
      } else {
        ngEventsEmitter["".concat(event_1)] = new EventEmitter(false);
      }
    }
    if (direct !== true) {
      obj.setProperties(ngEventsEmitter, true);
    }
  }
}
function clearTemplate(_this, templateNames, index) {
  var regTemplates = Object.keys(_this.registeredTemplate);
  if (regTemplates.length) {
    var regProperties = templateNames && templateNames.filter(function(val) {
      return /\./g.test(val) ? false : true;
    });
    var tabaccordionTemp = /tab|accordion|toolbar/.test(_this.getModuleName());
    for (var _i = 0, _a = regProperties && regProperties || regTemplates; _i < _a.length; _i++) {
      var registeredTemplate = _a[_i];
      if (index && index.length) {
        for (var e = 0; e < index.length; e++) {
          if (tabaccordionTemp) {
            for (var m = 0; m < _this.registeredTemplate["".concat(registeredTemplate)].length; m++) {
              var value = _this.registeredTemplate["".concat(registeredTemplate)][parseInt(m.toString(), 10)];
              if (value && value === index["".concat(e)]) {
                value.destroy();
                _this.registeredTemplate["".concat(registeredTemplate)].splice(m, 1);
              }
            }
          } else {
            for (var m = 0; m < _this.registeredTemplate.template.length; m++) {
              var value = _this.registeredTemplate.template[parseInt(m.toString(), 10)].rootNodes[0];
              if (value === index["".concat(e)]) {
                var rt = _this.registeredTemplate["".concat(registeredTemplate)];
                rt[parseInt(m.toString(), 10)].destroy();
              }
            }
          }
        }
      } else {
        if (_this.registeredTemplate["".concat(registeredTemplate)]) {
          for (var _b = 0, _c = _this.registeredTemplate["".concat(registeredTemplate)]; _b < _c.length; _b++) {
            var rt = _c[_b];
            if (!rt.destroyed) {
              if (rt._view) {
                var pNode = rt._view.renderer.parentNode(rt.rootNodes[0]);
                if (!isNullOrUndefined(pNode)) {
                  for (var m = 0; m < rt.rootNodes.length; m++) {
                    pNode.appendChild(rt.rootNodes[parseInt(m.toString(), 10)]);
                  }
                }
              }
              rt.destroy();
            }
          }
        }
      }
      if (!tabaccordionTemp || !index) {
        delete _this.registeredTemplate["".concat(registeredTemplate)];
      }
    }
  }
  var _loop_1 = function(tagObject2) {
    if (tagObject2.instance) {
      tagObject2.instance.clearTemplate(templateNames && templateNames.filter(function(val) {
        var regExp7 = RegExp;
        return new regExp7(tagObject2.name).test(val) ? true : false;
      }));
    }
  };
  for (var _d = 0, _e = _this.tagObjects; _d < _e.length; _d++) {
    var tagObject = _e[_d];
    _loop_1(tagObject);
  }
}
function setValue2(nameSpace, value, object) {
  var keys4 = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  var fromObj = object || {};
  for (var i = 0; i < keys4.length; i++) {
    var key = keys4[parseInt(i.toString(), 10)];
    if (i + 1 === keys4.length) {
      fromObj["".concat(key)] = value === void 0 ? {} : value;
    } else if (fromObj["".concat(key)] === void 0) {
      fromObj["".concat(key)] = {};
    }
    fromObj = fromObj["".concat(key)];
  }
  return fromObj;
}

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-angular-base/src/complex-array-base.js
var refRegex = /Ref$/;
var ComplexBase = (
  /** @class */
  function() {
    function ComplexBase2() {
      this.hasChanges = false;
      this.propCollection = {};
      this.dataSource = {};
      this.tags = [];
      this.tagObjects = [];
    }
    ComplexBase2.prototype.ngOnInit = function() {
      this.registeredTemplate = {};
      for (var _i = 0, _a = this.tags; _i < _a.length; _i++) {
        var tag = _a[_i];
        var objInstance = getValue("child" + tag.substring(0, 1).toUpperCase() + tag.substring(1), this);
        if (objInstance) {
          this.tagObjects.push({
            instance: objInstance,
            name: tag
          });
        }
      }
      var templateProperties = Object.keys(this);
      for (var i = 0; i < templateProperties.length; i++) {
        var tempProp = getValue(templateProperties[parseInt(i.toString(), 10)], this);
        if (typeof tempProp === "object" && tempProp && tempProp.elementRef) {
          if (!getValue(templateProperties[parseInt(i.toString(), 10)].indexOf("Ref") !== -1 ? templateProperties[parseInt(i.toString(), 10)] : templateProperties[parseInt(i.toString(), 10)] + "Ref", this)) {
            setValue(templateProperties[parseInt(i.toString(), 10)].indexOf("Ref") !== -1 ? templateProperties[parseInt(i.toString(), 10)] : templateProperties[parseInt(i.toString(), 10)] + "Ref", tempProp, this);
          }
          if (getValue("viewContainerRef", this) && !getValue("_viewContainerRef", tempProp.elementRef.nativeElement) && !getValue("propName", tempProp.elementRef.nativeElement)) {
            setValue("_viewContainerRef", getValue("viewContainerRef", this), tempProp.elementRef.nativeElement);
            setValue("propName", templateProperties[parseInt(i.toString(), 10)].replace("Ref", ""), tempProp.elementRef.nativeElement);
          }
        }
      }
      templateProperties = Object.keys(this);
      templateProperties = templateProperties.filter(function(val) {
        return /Ref$/i.test(val);
      });
      for (var _b = 0, templateProperties_1 = templateProperties; _b < templateProperties_1.length; _b++) {
        var tempName = templateProperties_1[_b];
        var propName = tempName.replace("Ref", "");
        setValue(propName.replace("_", "."), getValue(propName, this), this.propCollection);
      }
      var propList = Object.keys(this);
      if (this.directivePropList) {
        for (var k = 0; k < this.directivePropList.length; k++) {
          var dirPropName = this.directivePropList[parseInt(k.toString(), 10)];
          if (propList.indexOf(dirPropName) !== -1 && (getValue(dirPropName, this) === false || getValue(dirPropName, this))) {
            setValue(dirPropName, getValue(dirPropName, this), this.propCollection);
          }
        }
        this.hasChanges = true;
      }
      this.isInitChanges = true;
    };
    ComplexBase2.prototype.registerEvents = function(eventList) {
      registerEvents(eventList, this, true);
    };
    ComplexBase2.prototype.ngOnChanges = function(changes) {
      for (var _i = 0, _a = Object.keys(changes); _i < _a.length; _i++) {
        var propName = _a[_i];
        var changedVal = changes["".concat(propName)];
        this.propCollection["".concat(propName)] = changedVal.currentValue;
      }
      this.isUpdated = false;
      this.hasChanges = true;
    };
    ComplexBase2.prototype.clearTemplate = function(templateNames) {
      clearTemplate(this, templateNames);
    };
    ComplexBase2.prototype.getProperties = function() {
      for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {
        var tagObject = _a[_i];
        this.propCollection[tagObject.name] = tagObject.instance.getProperties();
      }
      return this.propCollection;
    };
    ComplexBase2.prototype.isChanged = function() {
      var result = this.hasChanges;
      if (!isNullOrUndefined(this.propCollection[this.property])) {
        var tempProps = this.propCollection[this.property];
        var props = Object.keys(tempProps[0]);
        for (var d = 0; d < props.length; d++) {
          if (!isNullOrUndefined(this.propCollection[props[parseInt(d.toString(), 10)]])) {
            var val = getValue(props[parseInt(d.toString(), 10)], this);
            var propVal = this.propCollection[this.property][0][props[parseInt(d.toString(), 10)]];
            if (!isNullOrUndefined(val) && this.propCollection[props[parseInt(d.toString(), 10)]] !== val && propVal !== val) {
              setValue(props[parseInt(d.toString(), 10)], val, this.propCollection[this.property][0]);
              setValue(props[parseInt(d.toString(), 10)], val, this.propCollection);
              this.hasChanges = true;
              this.isUpdated = false;
            }
          }
        }
      }
      for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {
        var item = _a[_i];
        result = result || item.instance.hasChanges;
      }
      return result || this.hasChanges;
    };
    ComplexBase2.prototype.ngAfterContentChecked = function() {
      this.hasChanges = this.isChanged();
      if (this.isInitChanges || this.hasChanges) {
        var templateProperties = Object.keys(this);
        templateProperties = templateProperties.filter(function(val) {
          return refRegex.test(val);
        });
        for (var _i = 0, templateProperties_2 = templateProperties; _i < templateProperties_2.length; _i++) {
          var tempName = templateProperties_2[_i];
          var propName = tempName.replace("Ref", "");
          setValue(propName.replace("_", "."), getValue(propName, this), this.propCollection);
        }
      }
    };
    ComplexBase2.prototype.ngAfterViewChecked = function() {
      if (this.isUpdated) {
        this.hasChanges = false;
      }
    };
    ComplexBase2.prototype.ngAfterViewInit = function() {
      this.isInitChanges = false;
    };
    ComplexBase2.prototype.ngOnDestroy = function() {
      this.directivePropList = [];
    };
    return ComplexBase2;
  }()
);
var ArrayBase = (
  /** @class */
  function() {
    function ArrayBase2(propertyName) {
      this.list = [];
      this.hasChanges = false;
      this.propertyName = propertyName;
    }
    ArrayBase2.prototype.ngOnInit = function() {
      this.isInitChanges = true;
    };
    ArrayBase2.prototype.ngAfterContentInit = function() {
      var _this = this;
      var index = 0;
      this.list = this.children.map(function(child) {
        child.dirIndex = index++;
        child.property = _this.propertyName;
        return child;
      });
      this.hasChanges = true;
    };
    ArrayBase2.prototype.getProperties = function() {
      var onlyProp = [];
      for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
        var item = _a[_i];
        onlyProp.push(item.getProperties());
      }
      return onlyProp;
    };
    ArrayBase2.prototype.isChanged = function() {
      var _this = this;
      var result = false;
      var index = 0;
      var isSourceChanged = false;
      var childrenDataSource = this.children.map(function(child) {
        return child;
      });
      if (this.list.length === this.children.length) {
        for (var i = 0; i < this.list.length; i++) {
          if (this.list[parseInt(i.toString(), 10)].propCollection.dataSource) {
            if (this.list[parseInt(i.toString(), 10)].dataSource && this.list[parseInt(i.toString(), 10)].propCollection.dataSource !== this.list[parseInt(i.toString(), 10)].dataSource) {
              this.list[parseInt(i.toString(), 10)].propCollection.dataSource = this.list[parseInt(i.toString(), 10)].dataSource;
              this.list[parseInt(i.toString(), 10)].hasChanges = true;
            }
            if (this.list[parseInt(i.toString(), 10)].property !== "series") {
              isSourceChanged = JSON.stringify(this.list[parseInt(i.toString(), 10)].propCollection.dataSource) !== JSON.stringify(childrenDataSource[parseInt(i.toString(), 10)].propCollection.dataSource);
            }
          }
          isSourceChanged = this.list[parseInt(i.toString(), 10)].hasChanges !== childrenDataSource[parseInt(i.toString(), 10)].hasChanges;
        }
      }
      this.hasNewChildren = this.list.length !== this.children.length || isSourceChanged ? true : null;
      if (this.hasNewChildren) {
        this.list = this.children.map(function(child) {
          child.dirIndex = index++;
          child.property = _this.propertyName;
          return child;
        });
      }
      for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
        var item = _a[_i];
        result = result || item.hasChanges;
      }
      return !!this.list.length && result;
    };
    ArrayBase2.prototype.clearTemplate = function(templateNames) {
      var _this = this;
      for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
        var item = _a[_i];
        item.clearTemplate(templateNames && templateNames.map(function(val) {
          var regExp7 = RegExp;
          return new regExp7(_this.propertyName).test(val) ? val.replace(_this.propertyName + ".", "") : val;
        }));
      }
    };
    ArrayBase2.prototype.ngAfterContentChecked = function() {
      this.hasChanges = this.isChanged();
      for (var i = 0; i < this.list.length; i++) {
        if (getValue("childColumns", this.list[parseInt(i.toString(), 10)]) && getValue("property", this.list[parseInt(i.toString(), 10)]) === "columns") {
          setValue("columns", getValue("childColumns", this.list[parseInt(i.toString(), 10)]).getProperties(), this.list[parseInt(i.toString(), 10)].propCollection);
        }
        this.list[parseInt(i.toString(), 10)].isUpdated = true;
      }
    };
    ArrayBase2.prototype.ngAfterViewInit = function() {
      this.isInitChanges = false;
    };
    ArrayBase2.prototype.ngOnDestroy = function() {
      this.list = [];
    };
    return ArrayBase2;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-angular-base/src/component-base.js
var ComponentBase = (
  /** @class */
  function() {
    function ComponentBase2() {
      this.isProtectedOnChange = true;
      this.isFormInit = true;
    }
    ComponentBase2.prototype.saveChanges = function(key, newValue, oldValue) {
      if (this.isProtectedOnChange) {
        return;
      }
      this.oldProperties["".concat(key)] = oldValue;
      this.changedProperties["".concat(key)] = newValue;
      this.finalUpdate();
      var changeTime = setTimeout(this.dataBind.bind(this));
      var clearUpdate = function() {
        clearTimeout(changeTime);
      };
      this.finalUpdate = clearUpdate;
    };
    ComponentBase2.prototype.ngOnInit = function(isTempRef) {
      var tempOnThis = isTempRef || this;
      tempOnThis.registeredTemplate = {};
      tempOnThis.ngBoundedEvents = {};
      tempOnThis.isAngular = true;
      tempOnThis.isFormInit = true;
      if (isTempRef) {
        this.tags = isTempRef.tags;
      }
      tempOnThis.tags = this.tags || [];
      tempOnThis.complexTemplate = this.complexTemplate || [];
      tempOnThis.tagObjects = [];
      tempOnThis.ngAttr = this.getAngularAttr(tempOnThis.element);
      tempOnThis.createElement = function(tagName, prop) {
        var ele = tempOnThis.srenderer ? tempOnThis.srenderer.createElement(tagName) : createElement(tagName);
        if (typeof prop === "undefined") {
          return ele;
        }
        ele.innerHTML = prop.innerHTML ? prop.innerHTML : "";
        if (prop.className !== void 0) {
          ele.className = prop.className;
        }
        if (prop.id !== void 0) {
          ele.id = prop.id;
        }
        if (prop.styles !== void 0) {
          ele.setAttribute("style", prop.styles);
        }
        if (tempOnThis.ngAttr !== void 0) {
          ele.setAttribute(tempOnThis.ngAttr, "");
        }
        if (prop.attrs !== void 0) {
          attributes(ele, prop.attrs);
        }
        return ele;
      };
      for (var _i = 0, _a = tempOnThis.tags; _i < _a.length; _i++) {
        var tag = _a[_i];
        var tagObject = {
          instance: getValue("child" + tag.substring(0, 1).toUpperCase() + tag.substring(1), tempOnThis),
          name: tag
        };
        tempOnThis.tagObjects.push(tagObject);
      }
      var complexTemplates = Object.keys(tempOnThis);
      for (var i = 0; i < complexTemplates.length; i++) {
        var compProp = getValue(complexTemplates[parseInt(i.toString(), 10)], tempOnThis);
        if (typeof compProp === "object" && compProp && compProp.elementRef) {
          if (typeof compProp === "object" && compProp && compProp.elementRef && complexTemplates[parseInt(i.toString(), 10)].indexOf("_") !== -1 && complexTemplates[parseInt(i.toString(), 10)].indexOf("Ref") === -1) {
            setValue(complexTemplates[parseInt(i.toString(), 10)] + "Ref", compProp, tempOnThis);
          }
          if (tempOnThis.viewContainerRef && !getValue("_viewContainerRef", compProp.elementRef.nativeElement) && !getValue("propName", compProp.elementRef.nativeElement)) {
            setValue("_viewContainerRef", tempOnThis.viewContainerRef, compProp.elementRef.nativeElement);
            setValue("propName", complexTemplates[parseInt(i.toString(), 10)].replace("Ref", ""), compProp.elementRef.nativeElement);
          }
        }
      }
      complexTemplates = Object.keys(tempOnThis);
      complexTemplates = complexTemplates.filter(function(val2) {
        return /Ref$/i.test(val2) && /_/i.test(val2);
      });
      for (var _b = 0, complexTemplates_1 = complexTemplates; _b < complexTemplates_1.length; _b++) {
        var tempName = complexTemplates_1[_b];
        var propName = tempName.replace("Ref", "");
        var val = {};
        setValue(propName.replace("_", "."), getValue(propName, tempOnThis), val);
        tempOnThis.setProperties(val, true);
      }
    };
    ComponentBase2.prototype.getAngularAttr = function(ele) {
      var attributes4 = ele.attributes;
      var length = attributes4.length;
      var ngAr;
      for (var i = 0; i < length; i++) {
        if (/_ngcontent/g.test(attributes4[parseInt(i.toString(), 10)].name)) {
          ngAr = attributes4[parseInt(i.toString(), 10)].name;
        }
      }
      return ngAr;
    };
    ComponentBase2.prototype.ngAfterViewInit = function(isTempRef) {
      var tempAfterViewThis = isTempRef || this;
      var regExp7 = /ejs-tab|ejs-accordion/g;
      if (regExp7.test(tempAfterViewThis.ngEle.nativeElement.outerHTML)) {
        tempAfterViewThis.ngEle.nativeElement.style.visibility = "hidden";
      }
      var templateProperties = Object.keys(tempAfterViewThis);
      templateProperties = templateProperties.filter(function(val) {
        return /Ref$/i.test(val);
      });
      var ngtempRef = tempAfterViewThis.getModuleName() === "DocumentEditor";
      for (var _i = 0, templateProperties_1 = templateProperties; _i < templateProperties_1.length; _i++) {
        var tempName = templateProperties_1[_i];
        var propName = tempName.replace("Ref", "");
        setValue(propName.replace("_", "."), getValue(propName + "Ref", tempAfterViewThis), tempAfterViewThis);
      }
      var appendToComponent = function(tempAfterViewThis2) {
        if (typeof window !== "undefined" && tempAfterViewThis2.element || tempAfterViewThis2.getModuleName().includes("btn")) {
          tempAfterViewThis2.appendTo(tempAfterViewThis2.element);
          tempAfterViewThis2.ngEle.nativeElement.style.visibility = "";
        }
      };
      if (!ngtempRef) {
        setTimeout(function() {
          appendToComponent(tempAfterViewThis);
        });
      } else {
        appendToComponent(tempAfterViewThis);
      }
    };
    ComponentBase2.prototype.ngOnDestroy = function(isTempRef) {
      var tempOnDestroyThis = isTempRef || this;
      setTimeout(function() {
        if (typeof window !== "undefined" && tempOnDestroyThis.element.classList.contains("e-control")) {
          if (tempOnDestroyThis.ngOnFocus !== void 0 && tempOnDestroyThis.ngOnBlur !== void 0) {
            var ele = tempOnDestroyThis.inputElement || tempOnDestroyThis.element;
            ele.removeEventListener("focus", tempOnDestroyThis.ngOnFocusBound);
            ele.removeEventListener("blur", tempOnDestroyThis.ngOnBlurBound);
            tempOnDestroyThis.ngOnFocusBound = null;
            tempOnDestroyThis.ngOnBlurBound = null;
          }
          tempOnDestroyThis.destroy();
          tempOnDestroyThis.clearTemplate(null);
          setTimeout(function() {
            for (var _i = 0, _a = Object.keys(tempOnDestroyThis); _i < _a.length; _i++) {
              var key = _a[_i];
              var value = tempOnDestroyThis["".concat(key)];
              if (value && /object/.test(typeof value) && Object.keys(value).length !== 0) {
                if (/properties|changedProperties|childChangedProperties|oldProperties|moduleLoader/.test(key)) {
                  for (var _b = 0, _c = Object.keys(tempOnDestroyThis["".concat(key)]); _b < _c.length; _b++) {
                    var propKey = _c[_b];
                    var propValue = value["".concat(propKey)];
                    if (propValue && /object/.test(typeof propValue) && Object.keys(propValue).length !== 0 && (propValue.parent || propValue.parentObj)) {
                      tempOnDestroyThis["".concat(key)]["".concat(propKey)] = null;
                    }
                  }
                } else {
                  if (value.parent || value.parentObj) {
                    tempOnDestroyThis["".concat(key)] = null;
                  }
                }
              }
            }
          });
        }
      });
    };
    ComponentBase2.prototype.clearTemplate = function(templateNames, index) {
      clearTemplate(this, templateNames, index);
    };
    ComponentBase2.prototype.ngAfterContentChecked = function(isTempRef) {
      var tempAfterContentThis = isTempRef || this;
      for (var _i = 0, _a = tempAfterContentThis.tagObjects; _i < _a.length; _i++) {
        var tagObject = _a[_i];
        if (!isUndefined(tagObject.instance) && (tagObject.instance.isInitChanges || tagObject.instance.hasChanges || tagObject.instance.hasNewChildren)) {
          var propObj = {};
          if (tagObject.instance.isInitChanges) {
            var complexDirProps = void 0;
            var list = getValue("instance.list", tagObject);
            if (list && list.length) {
              complexDirProps = list[0].directivePropList;
            }
            var skip = true;
            if (tempAfterContentThis.getModuleName && tempAfterContentThis.getModuleName() === "gantt") {
              skip = false;
            }
            if (complexDirProps && skip && complexDirProps.indexOf(tagObject.instance.propertyName) === -1) {
              var compDirPropList = Object.keys(tagObject.instance.list[0].propCollection);
              for (var h = 0; h < tagObject.instance.list.length; h++) {
                tagObject.instance.list["".concat(h)].propCollection[tagObject.instance.propertyName] = [];
                var obj = {};
                for (var k = 0; k < compDirPropList.length; k++) {
                  var complexPropName = compDirPropList[parseInt(k.toString(), 10)];
                  obj["".concat(complexPropName)] = tagObject.instance.list["".concat(h)].propCollection["".concat(complexPropName)];
                }
                var _loop_1 = function(i2) {
                  var tag = tagObject.instance.list["".concat(h)].tags[parseInt(i2.toString(), 10)];
                  var childObj = getValue("child" + tag.substring(0, 1).toUpperCase() + tag.substring(1), tagObject.instance.list["".concat(h)]);
                  if (childObj) {
                    var innerchildObj = tagObject.instance.list["".concat(h)]["child" + tag.substring(0, 1).toUpperCase() + tag.substring(1)];
                    var updateChildTag_1 = function(innerchild) {
                      var innerLevelTag = [];
                      if (innerchild) {
                        for (var j = 0; j < innerchild.list.length; j++) {
                          var innerTag = innerchild.list[0].tags[0];
                          if (innerTag) {
                            var innerchildTag = getValue("child" + innerTag.substring(0, 1).toUpperCase() + innerTag.substring(1), innerchild.list[parseInt(j.toString(), 10)]);
                            if (innerchildTag) {
                              innerchild.list[parseInt(j.toString(), 10)].tagObjects.push({
                                instance: innerchildTag,
                                name: innerTag
                              });
                              innerLevelTag.push(innerchildTag);
                            }
                          }
                        }
                      }
                      if (innerLevelTag.length !== 0) {
                        for (var l = 0; l < innerLevelTag.length; l++) {
                          updateChildTag_1(innerLevelTag[parseInt(l.toString(), 10)]);
                        }
                      }
                    };
                    updateChildTag_1(innerchildObj);
                    tagObject.instance.list["".concat(h)].tagObjects.push({
                      instance: childObj,
                      name: tag
                    });
                  }
                };
                for (var i = 0; i < tagObject.instance.list["".concat(h)].tags.length; i++) {
                  _loop_1(i);
                }
                tagObject.instance.list["".concat(h)].propCollection[tagObject.instance.propertyName].push(obj);
              }
            }
            propObj[tagObject.name] = tagObject.instance.getProperties();
            tempAfterContentThis.setProperties(propObj, tagObject.instance.isInitChanges);
          } else {
            var hasDiffLength = false;
            if (tempAfterContentThis[tagObject.name].length !== tagObject.instance.list.length || /diagram|DashboardLayout/.test(tempAfterContentThis.getModuleName())) {
              tempAfterContentThis[tagObject.name] = tagObject.instance.list;
              hasDiffLength = true;
            }
            for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {
              var list = _c[_b];
              var curIndex = tagObject.instance.list.indexOf(list);
              var curChild = getValue(tagObject.name, tempAfterContentThis)["".concat(curIndex)];
              var complexTemplates = Object.keys(curChild);
              complexTemplates = complexTemplates.filter(function(val) {
                return /Ref$/i.test(val);
              });
              if (curChild.properties && Object.keys(curChild.properties).length !== 0) {
                for (var _d = 0, complexTemplates_2 = complexTemplates; _d < complexTemplates_2.length; _d++) {
                  var complexPropName = complexTemplates_2[_d];
                  complexPropName = complexPropName.replace(/Ref/, "");
                  curChild.properties["".concat(complexPropName)] = !curChild.properties["".concat(complexPropName)] ? curChild.propCollection["".concat(complexPropName)] : curChild.properties["".concat(complexPropName)];
                }
              }
              if (!isUndefined(curChild) && !isUndefined(curChild.setProperties)) {
                if (/diagram|DashboardLayout/.test(tempAfterContentThis.getModuleName())) {
                  curChild.setProperties(list.getProperties(), true);
                } else {
                  curChild.setProperties(list.getProperties());
                }
              }
              list.isUpdated = true;
            }
            if (/grid/.test(tempAfterContentThis.getModuleName()) && hasDiffLength || /chart/.test(tempAfterContentThis.getModuleName())) {
              propObj[tagObject.name] = tagObject.instance.getProperties();
              tempAfterContentThis.setProperties(propObj, tagObject.instance.isInitChanges);
            }
          }
        }
      }
    };
    ComponentBase2.prototype.registerEvents = function(eventList) {
      registerEvents(eventList, this);
    };
    ComponentBase2.prototype.twoWaySetter = function(newVal, prop) {
      var oldVal = getValue(prop, this.properties);
      if (oldVal === newVal) {
        return;
      }
      this.saveChanges(prop, newVal, oldVal);
      setValue(prop, isNullOrUndefined(newVal) ? null : newVal, this.properties);
      getValue(prop + "Change", this).emit(newVal);
    };
    ComponentBase2.prototype.addTwoWay = function(propList) {
      var _this = this;
      var _loop_2 = function(prop2) {
        getValue(prop2, this_1);
        Object.defineProperty(this_1, prop2, {
          get: function() {
            return getValue(prop2, _this.properties);
          },
          set: function(newVal) {
            return _this.twoWaySetter(newVal, prop2);
          }
        });
        setValue(prop2 + "Change", new EventEmitter(), this_1);
      };
      var this_1 = this;
      for (var _i = 0, propList_1 = propList; _i < propList_1.length; _i++) {
        var prop = propList_1[_i];
        _loop_2(prop);
      }
    };
    ComponentBase2.prototype.addEventListener = function(eventName, handler) {
      var eventObj = getValue(eventName, this);
      if (!isUndefined(eventObj)) {
        if (!this.ngBoundedEvents["".concat(eventName)]) {
          this.ngBoundedEvents["".concat(eventName)] = /* @__PURE__ */ new Map();
        }
        this.ngBoundedEvents["".concat(eventName)].set(handler, eventObj.subscribe(handler));
      }
    };
    ComponentBase2.prototype.removeEventListener = function(eventName, handler) {
      var eventObj = getValue(eventName, this);
      if (!isUndefined(eventObj)) {
        this.ngBoundedEvents["".concat(eventName)].get(handler).unsubscribe();
      }
    };
    ComponentBase2.prototype.trigger = function(eventName, eventArgs, success) {
      var eventObj = getValue(eventName, this);
      var prevDetection = this.isProtectedOnChange;
      this.isProtectedOnChange = false;
      if (eventArgs) {
        eventArgs.name = eventName;
      }
      if (!isUndefined(eventObj)) {
        eventObj.next(eventArgs);
      }
      var localEventObj = getValue("local" + eventName.charAt(0).toUpperCase() + eventName.slice(1), this);
      if (!isUndefined(localEventObj)) {
        localEventObj.call(this, eventArgs);
      }
      this.isProtectedOnChange = prevDetection;
      if (success) {
        this.preventChange = this.isPreventChange;
        success.call(this, eventArgs);
      }
      this.isPreventChange = false;
    };
    return ComponentBase2;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-angular-base/src/form-base.js
var FormBase = (
  /** @class */
  function() {
    function FormBase2() {
    }
    FormBase2.prototype.propagateChange = function(_) {
      return;
    };
    FormBase2.prototype.propagateTouch = function() {
      return;
    };
    FormBase2.prototype.localChange = function(e) {
      var value = e.checked === void 0 ? e.value : e.checked;
      this.objCheck = isObject(value);
      if (this.isUpdated === true) {
        this.angularValue = this.oldValue;
      }
      if (this.objCheck === true) {
        this.duplicateValue = JSON.stringify(value);
        this.duplicateAngularValue = JSON.stringify(this.angularValue);
        if (this.duplicateValue !== this.duplicateAngularValue && this.propagateChange !== void 0 && value !== void 0) {
          this.propagateChange(value);
          this.angularValue = value;
        }
      } else {
        if (value !== this.angularValue && this.propagateChange !== void 0 && value !== void 0) {
          if (value !== "" && value !== null) {
            this.propagateChange(value);
            this.angularValue = value;
          } else {
            var optionalValue = value;
            this.propagateChange(optionalValue);
            this.angularValue = value;
          }
        }
      }
      this.cdr.markForCheck();
    };
    FormBase2.prototype.registerOnChange = function(registerFunction) {
      this.propagateChange = registerFunction;
    };
    FormBase2.prototype.registerOnTouched = function(registerFunction) {
      this.propagateTouch = registerFunction;
    };
    FormBase2.prototype.twoWaySetter = function(newVal, prop) {
      var oldVal = this.oldValue || getValue(prop, this.properties);
      var ele = this.inputElement || this.element;
      if (ele && oldVal === newVal && this.value === newVal && (ele.value === void 0 || ele.value === "")) {
        return;
      }
      this.saveChanges(prop, newVal, oldVal);
      setValue(prop, isNullOrUndefined(newVal) ? null : newVal, this.properties);
      getValue(prop + "Change", this).emit(newVal);
    };
    FormBase2.prototype.ngAfterViewInit = function(isTempRef) {
      var tempFormAfterViewThis = isTempRef || this;
      tempFormAfterViewThis.ngOnBlurBound = this.ngOnBlur.bind(this);
      tempFormAfterViewThis.ngOnFocusBound = this.ngOnFocus.bind(this);
      if (typeof window !== "undefined") {
        if (tempFormAfterViewThis.getModuleName().includes("dropdowntree")) {
          setTimeout(function() {
            tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);
          });
        } else {
          tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);
        }
        var ele = tempFormAfterViewThis.inputElement || tempFormAfterViewThis.element;
        ele.addEventListener("focus", tempFormAfterViewThis.ngOnFocusBound);
        ele.addEventListener("blur", tempFormAfterViewThis.ngOnBlurBound);
      }
      this.isFormInit = false;
    };
    FormBase2.prototype.setDisabledState = function(disabled) {
      this.enabled = !disabled;
      this.disabled = disabled;
    };
    FormBase2.prototype.writeValue = function(value) {
      var regExp7 = /ejs-radiobutton/g;
      if (this.checked === void 0) {
        this.value = value;
      } else {
        if (this.ngEle) {
          if (typeof value === "boolean") {
            if (regExp7.test(this.ngEle.nativeElement.outerHTML)) {
              this.checked = value === this.value;
            } else {
              this.checked = value;
            }
          } else {
            this.checked = value === this.value;
          }
        }
      }
      this.angularValue = value;
      this.isUpdated = true;
      this.preventChange = this.isFormInit ? false : true;
      this.cdr.markForCheck();
      if (value === null) {
        return;
      }
    };
    FormBase2.prototype.ngOnFocus = function(e) {
      if (this.skipFromEvent !== true) {
        this.focus.emit(e);
      }
      this.cdr.markForCheck();
    };
    FormBase2.prototype.ngOnBlur = function(e) {
      this.propagateTouch();
      if (this.skipFromEvent !== true) {
        this.blur.emit(e);
      }
      this.cdr.markForCheck();
    };
    FormBase2.isFormBase = true;
    return FormBase2;
  }()
);

// node_modules/@syncfusion/ej2-angular-kanban/node_modules/@syncfusion/ej2-angular-base/src/template.js
var stringCompiler = getTemplateEngine();
function compile2(templateEle, helper) {
  if (typeof templateEle === "string" || typeof templateEle === "function" && templateEle.prototype && templateEle.prototype.CSPTemplate) {
    return stringCompiler(templateEle, helper);
  } else {
    var contRef_1 = templateEle.elementRef.nativeElement._viewContainerRef;
    var pName_1 = templateEle.elementRef.nativeElement.propName;
    return function(data, component, propName) {
      var context = {
        $implicit: data
      };
      var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;
      var viewRef = conRef.createEmbeddedView(templateEle, context);
      if (/EJS-MENTION|EJS-DROPDOWNLIST/.test(getValue("currentInstance.element.nodeName", conRef)) || /E-TABITEM/.test(getValue("element.nativeElement.nodeName", conRef)) && getValue("currentInstance.headerTemplateRef", conRef)) {
        viewRef.detectChanges();
      } else {
        viewRef.markForCheck();
      }
      var viewCollection = component && component.registeredTemplate ? component.registeredTemplate : getValue("currentInstance.registeredTemplate", conRef);
      propName = propName && component.registeredTemplate ? propName : pName_1;
      if (typeof viewCollection["".concat(propName)] === "undefined") {
        viewCollection["".concat(propName)] = [];
      }
      viewCollection["".concat(propName)].push(viewRef);
      return viewRef.rootNodes;
    };
  }
}
function Template(defaultValue) {
  return function(target, key) {
    var propertyDescriptor = {
      set: setter(key),
      get: getter(key, defaultValue),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
  };
}
function setter(key) {
  return function(val) {
    if (val === void 0) {
      return;
    }
    setValue(key + "Ref", val, this);
    if (typeof val !== "string") {
      val.elementRef.nativeElement._viewContainerRef = this.viewContainerRef;
      val.elementRef.nativeElement.propName = key;
    } else {
      if (this.saveChanges) {
        this.saveChanges(key, val, void 0);
        this.dataBind();
      }
    }
  };
}
function getter(key, defaultValue) {
  return function() {
    return getValue(key + "Ref", this) || defaultValue;
  };
}
setTemplateEngine({
  compile: compile2
});

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/util.js
var instances = "ej2_instances";
var uid = 0;
var isBlazorPlatform2 = false;
function createInstance2(classFunction, params) {
  var arrayParam = params;
  arrayParam.unshift(void 0);
  return new (Function.prototype.bind.apply(classFunction, arrayParam))();
}
function setImmediate2(handler) {
  var unbind;
  var num = new Uint16Array(5);
  var intCrypto = window.msCrypto || window.crypto;
  intCrypto.getRandomValues(num);
  var secret = "ej2" + combineArray2(num);
  var messageHandler = function(event2) {
    if (event2.source === window && typeof event2.data === "string" && event2.data.length <= 32 && event2.data === secret) {
      handler();
      unbind();
    }
  };
  window.addEventListener("message", messageHandler, false);
  window.postMessage(secret, "*");
  return unbind = function() {
    window.removeEventListener("message", messageHandler);
    handler = messageHandler = secret = void 0;
  };
}
function getValue2(nameSpace, obj) {
  var value = obj;
  var splits = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  for (var i = 0; i < splits.length && !isUndefined2(value); i++) {
    value = value[splits[parseInt(i.toString(), 10)]];
  }
  return value;
}
function setValue3(nameSpace, value, obj) {
  var keys4 = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  var start = obj || {};
  var fromObj = start;
  var i;
  var length = keys4.length;
  var key;
  for (i = 0; i < length; i++) {
    key = keys4[parseInt(i.toString(), 10)];
    if (i + 1 === length) {
      fromObj["" + key] = value === void 0 ? {} : value;
    } else if (isNullOrUndefined2(fromObj["" + key])) {
      fromObj["" + key] = {};
    }
    fromObj = fromObj["" + key];
  }
  return start;
}
function deleteObject2(obj, key) {
  delete obj["" + key];
}
var containerObject2 = typeof window !== "undefined" ? window : {};
function isObject2(obj) {
  var objCon = {};
  return !isNullOrUndefined2(obj) && obj.constructor === objCon.constructor;
}
function merge2(source, destination) {
  if (!isNullOrUndefined2(destination)) {
    var temrObj = source;
    var tempProp = destination;
    var keys4 = Object.keys(destination);
    var deepmerge = "deepMerge";
    for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
      var key = keys_1[_i];
      if (!isNullOrUndefined2(temrObj["" + deepmerge]) && temrObj["" + deepmerge].indexOf(key) !== -1 && (isObject2(tempProp["" + key]) || Array.isArray(tempProp["" + key]))) {
        extend2(temrObj["" + key], temrObj["" + key], tempProp["" + key], true);
      } else {
        temrObj["" + key] = tempProp["" + key];
      }
    }
  }
}
function extend2(copied, first, second, deep) {
  var result = copied && typeof copied === "object" ? copied : {};
  var length = arguments.length;
  var args = [copied, first, second, deep];
  if (deep) {
    length = length - 1;
  }
  var _loop_1 = function(i2) {
    if (!args[parseInt(i2.toString(), 10)]) {
      return "continue";
    }
    var obj1 = args[parseInt(i2.toString(), 10)];
    Object.keys(obj1).forEach(function(key) {
      var src = result["" + key];
      var copy = obj1["" + key];
      var clone;
      var isArrayChanged = Array.isArray(copy) && Array.isArray(src) && copy.length !== src.length;
      var blazorEventExtend = isBlazor2() ? !(src instanceof Event) && !isArrayChanged : true;
      if (deep && blazorEventExtend && (isObject2(copy) || Array.isArray(copy))) {
        if (isObject2(copy)) {
          clone = src ? src : {};
          if (Array.isArray(clone) && Object.prototype.hasOwnProperty.call(clone, "isComplexArray")) {
            extend2(clone, {}, copy, deep);
          } else {
            result["" + key] = extend2(clone, {}, copy, deep);
          }
        } else {
          clone = isBlazor2() ? src && Object.keys(copy).length : src ? src : [];
          result["" + key] = extend2([], clone, copy, clone && clone.length || copy && copy.length);
        }
      } else {
        result["" + key] = copy;
      }
    });
  };
  for (var i = 1; i < length; i++) {
    _loop_1(i);
  }
  return result;
}
function isNullOrUndefined2(value) {
  return value === void 0 || value === null;
}
function isUndefined2(value) {
  return "undefined" === typeof value;
}
function getUniqueID(definedName) {
  return definedName + "_" + uid++;
}
function debounce2(eventFunction, delay) {
  var out;
  return function() {
    var _this = this;
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      args[_i] = arguments[_i];
    }
    var later = function() {
      out = null;
      return eventFunction.apply(_this, args);
    };
    clearTimeout(out);
    out = setTimeout(later, delay);
  };
}
function compareElementParent2(child, parent) {
  var node = child;
  if (node === parent) {
    return true;
  } else if (node === document || !node) {
    return false;
  } else {
    return compareElementParent2(node.parentNode, parent);
  }
}
function throwError2(message) {
  try {
    throw new Error(message);
  } catch (e) {
    throw new Error(e.message + "\n" + e.stack);
  }
}
function formatUnit(value) {
  var result = value + "";
  if (result.match(/auto|cm|mm|in|px|pt|pc|%|em|ex|ch|rem|vw|vh|vmin|vmax/)) {
    return result;
  }
  return result + "px";
}
function isBlazor2() {
  return isBlazorPlatform2;
}
function getElement(element2) {
  var xPath = "xPath";
  if (!(element2 instanceof Node) && isBlazor2() && !isNullOrUndefined2(element2["" + xPath])) {
    return document.evaluate(element2["" + xPath], document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  }
  return element2;
}
function getInstance(element2, component) {
  var elem = typeof element2 === "string" ? document.querySelector(element2) : element2;
  if (elem["" + instances]) {
    for (var _i = 0, _a = elem["" + instances]; _i < _a.length; _i++) {
      var inst = _a[_i];
      if (inst instanceof component) {
        return inst;
      }
    }
  }
  return null;
}
function uniqueID2() {
  if (typeof window === "undefined") {
    return;
  }
  var num = new Uint16Array(5);
  var intCrypto = window.msCrypto || window.crypto;
  return intCrypto.getRandomValues(num);
}
function combineArray2(num) {
  var ret = "";
  for (var i = 0; i < 5; i++) {
    ret += (i ? "," : "") + num[parseInt(i.toString(), 10)];
  }
  return ret;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/intl/parser-base.js
var defaultNumberingSystem2 = {
  "latn": {
    "_digits": "0123456789",
    "_type": "numeric"
  }
};
var defaultNumberSymbols2 = {
  "decimal": ".",
  "group": ",",
  "percentSign": "%",
  "plusSign": "+",
  "minusSign": "-",
  "infinity": "∞",
  "nan": "NaN",
  "exponential": "E"
};
var latnNumberSystem2 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var ParserBase2 = (
  /** @class */
  function() {
    function ParserBase4() {
    }
    ParserBase4.getMainObject = function(obj, cName) {
      var value = isBlazor2() ? cName : "main." + cName;
      return getValue2(value, obj);
    };
    ParserBase4.getNumberingSystem = function(obj) {
      return getValue2("supplemental.numberingSystems", obj) || this.numberingSystems;
    };
    ParserBase4.reverseObject = function(prop, keys4) {
      var propKeys = keys4 || Object.keys(prop);
      var res = {};
      for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
        var key = propKeys_1[_i];
        if (!Object.prototype.hasOwnProperty.call(res, prop["" + key])) {
          res[prop["" + key]] = key;
        }
      }
      return res;
    };
    ParserBase4.getSymbolRegex = function(props) {
      var regexStr = props.map(function(str) {
        return str.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
      }).join("|");
      var regExp7 = RegExp;
      return new regExp7(regexStr, "g");
    };
    ParserBase4.getSymbolMatch = function(prop) {
      var matchKeys = Object.keys(defaultNumberSymbols2);
      var ret = {};
      for (var _i = 0, matchKeys_1 = matchKeys; _i < matchKeys_1.length; _i++) {
        var key = matchKeys_1[_i];
        ret[prop["" + key]] = defaultNumberSymbols2["" + key];
      }
      return ret;
    };
    ParserBase4.constructRegex = function(val) {
      var len = val.length;
      var ret = "";
      for (var i = 0; i < len; i++) {
        if (i !== len - 1) {
          ret += val[parseInt(i.toString(), 10)] + "|";
        } else {
          ret += val[parseInt(i.toString(), 10)];
        }
      }
      return ret;
    };
    ParserBase4.convertValueParts = function(value, regex2, obj) {
      return value.replace(regex2, function(str) {
        return obj["" + str];
      });
    };
    ParserBase4.getDefaultNumberingSystem = function(obj) {
      var ret = {};
      ret.obj = getValue2("numbers", obj);
      ret.nSystem = getValue2("defaultNumberingSystem", ret.obj);
      return ret;
    };
    ParserBase4.getCurrentNumericOptions = function(curObj, numberSystem, needSymbols, blazorMode) {
      var ret = {};
      var cur = this.getDefaultNumberingSystem(curObj);
      if (!isUndefined2(cur.nSystem) || blazorMode) {
        var digits = blazorMode ? getValue2("obj.mapperDigits", cur) : getValue2(cur.nSystem + "._digits", numberSystem);
        if (!isUndefined2(digits)) {
          ret.numericPair = this.reverseObject(digits, latnNumberSystem2);
          var regExp7 = RegExp;
          ret.numberParseRegex = new regExp7(this.constructRegex(digits), "g");
          ret.numericRegex = "[" + digits[0] + "-" + digits[9] + "]";
          if (needSymbols) {
            ret.numericRegex = digits[0] + "-" + digits[9];
            ret.symbolNumberSystem = getValue2(blazorMode ? "numberSymbols" : "symbols-numberSystem-" + cur.nSystem, cur.obj);
            ret.symbolMatch = this.getSymbolMatch(ret.symbolNumberSystem);
            ret.numberSystem = cur.nSystem;
          }
        }
      }
      return ret;
    };
    ParserBase4.getNumberMapper = function(curObj, numberSystem, isNumber) {
      var ret = {
        mapper: {}
      };
      var cur = this.getDefaultNumberingSystem(curObj);
      if (!isUndefined2(cur.nSystem)) {
        ret.numberSystem = cur.nSystem;
        ret.numberSymbols = getValue2("symbols-numberSystem-" + cur.nSystem, cur.obj);
        ret.timeSeparator = getValue2("timeSeparator", ret.numberSymbols);
        var digits = getValue2(cur.nSystem + "._digits", numberSystem);
        if (!isUndefined2(digits)) {
          for (var _i = 0, latnNumberSystem_1 = latnNumberSystem2; _i < latnNumberSystem_1.length; _i++) {
            var i = latnNumberSystem_1[_i];
            ret.mapper[parseInt(i.toString(), 10)] = digits[parseInt(i.toString(), 10)];
          }
        }
      }
      return ret;
    };
    ParserBase4.nPair = "numericPair";
    ParserBase4.nRegex = "numericRegex";
    ParserBase4.numberingSystems = defaultNumberingSystem2;
    return ParserBase4;
  }()
);
var blazorCurrencyData2 = {
  "DJF": "Fdj",
  "ERN": "Nfk",
  "ETB": "Br",
  "NAD": "$",
  "ZAR": "R",
  "XAF": "FCFA",
  "GHS": "GH₵",
  "XDR": "XDR",
  "AED": "د.إ.",
  "BHD": "د.ب.",
  "DZD": "د.ج.",
  "EGP": "ج.م.",
  "ILS": "₪",
  "IQD": "د.ع.",
  "JOD": "د.ا.",
  "KMF": "CF",
  "KWD": "د.ك.",
  "LBP": "ل.ل.",
  "LYD": "د.ل.",
  "MAD": "د.م.",
  "MRU": "أ.م.",
  "OMR": "ر.ع.",
  "QAR": "ر.ق.",
  "SAR": "ر.س.",
  "SDG": "ج.س.",
  "SOS": "S",
  "SSP": "£",
  "SYP": "ل.س.",
  "TND": "د.ت.",
  "YER": "ر.ي.",
  "CLP": "$",
  "INR": "₹",
  "TZS": "TSh",
  "EUR": "€",
  "AZN": "₼",
  "RUB": "₽",
  "BYN": "Br",
  "ZMW": "K",
  "BGN": "лв.",
  "NGN": "₦",
  "XOF": "CFA",
  "BDT": "৳",
  "CNY": "¥",
  "BAM": "КМ",
  "UGX": "USh",
  "USD": "$",
  "CZK": "Kč",
  "GBP": "£",
  "DKK": "kr.",
  "KES": "Ksh",
  "CHF": "CHF",
  "MVR": "ރ.",
  "BTN": "Nu.",
  "XCD": "EC$",
  "AUD": "$",
  "BBD": "$",
  "BIF": "FBu",
  "BMD": "$",
  "BSD": "$",
  "BWP": "P",
  "BZD": "$",
  "CAD": "$",
  "NZD": "$",
  "FJD": "$",
  "FKP": "£",
  "GIP": "£",
  "GMD": "D",
  "GYD": "$",
  "HKD": "$",
  "IDR": "Rp",
  "JMD": "$",
  "KYD": "$",
  "LRD": "$",
  "MGA": "Ar",
  "MOP": "MOP$",
  "MUR": "Rs",
  "MWK": "MK",
  "MYR": "RM",
  "PGK": "K",
  "PHP": "₱",
  "PKR": "Rs",
  "RWF": "RF",
  "SBD": "$",
  "SCR": "SR",
  "SEK": "kr",
  "SGD": "$",
  "SHP": "£",
  "SLL": "Le",
  "ANG": "NAf.",
  "SZL": "E",
  "TOP": "T$",
  "TTD": "$",
  "VUV": "VT",
  "WST": "WS$",
  "ARS": "$",
  "BOB": "Bs",
  "BRL": "R$",
  "COP": "$",
  "CRC": "₡",
  "CUP": "$",
  "DOP": "$",
  "GTQ": "Q",
  "HNL": "L",
  "MXN": "$",
  "NIO": "C$",
  "PAB": "B/.",
  "PEN": "S/",
  "PYG": "₲",
  "UYU": "$",
  "VES": "Bs.S",
  "IRR": "ريال",
  "GNF": "FG",
  "CDF": "FC",
  "HTG": "G",
  "XPF": "FCFP",
  "HRK": "kn",
  "HUF": "Ft",
  "AMD": "֏",
  "ISK": "kr",
  "JPY": "¥",
  "GEL": "₾",
  "CVE": "​",
  "KZT": "₸",
  "KHR": "៛",
  "KPW": "₩",
  "KRW": "₩",
  "KGS": "сом",
  "AOA": "Kz",
  "LAK": "₭",
  "MZN": "MTn",
  "MKD": "ден",
  "MNT": "₮",
  "BND": "$",
  "MMK": "K",
  "NOK": "kr",
  "NPR": "रु",
  "AWG": "Afl.",
  "SRD": "$",
  "PLN": "zł",
  "AFN": "؋",
  "STN": "Db",
  "MDL": "L",
  "RON": "lei",
  "UAH": "₴",
  "LKR": "රු.",
  "ALL": "Lekë",
  "RSD": "дин.",
  "TJS": "смн",
  "THB": "฿",
  "TMT": "m.",
  "TRY": "₺",
  "UZS": "сўм",
  "VND": "₫",
  "TWD": "NT$"
};
function getBlazorCurrencySymbol2(currencyCode) {
  return getValue2(currencyCode || "", blazorCurrencyData2);
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/intl/intl-base.js
var defaultCurrencyCode2 = "USD";
var NumberFormat3 = null;
var DateFormat3 = null;
function setNumberFormat2(value) {
  NumberFormat3 = value;
}
function setDateFormat2(value) {
  DateFormat3 = value;
}
var regExp3 = RegExp;
var blazorCultureFormats2 = {
  "en-US": {
    "d": "M/d/y",
    "D": "EEEE, MMMM d, y",
    "f": "EEEE, MMMM d, y h:mm a",
    "F": "EEEE, MMMM d, y h:mm:s a",
    "g": "M/d/y h:mm a",
    "G": "M/d/yyyy h:mm:ss tt",
    "m": "MMMM d",
    "M": "MMMM d",
    "r": "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
    "R": "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
    "s": "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
    "t": "h:mm tt",
    "T": "h:m:s tt",
    "u": "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
    "U": "dddd, MMMM d, yyyy h:mm:ss tt",
    "y": "MMMM yyyy",
    "Y": "MMMM yyyy"
  }
};
var IntlBase2;
(function(IntlBase4) {
  IntlBase4.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
  IntlBase4.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0# ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
  IntlBase4.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
  var fractionRegex = /[0-9]/g;
  IntlBase4.defaultCurrency = "$";
  var mapper5 = ["infinity", "nan", "group", "decimal"];
  var patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g;
  var patternMatch = {
    "G": "",
    "M": "m",
    "L": "m",
    "H": "h",
    "c": "d",
    "'": '"',
    " a": " AM/PM",
    "yy": "yy",
    "y": "yyyy",
    "EEEE": "dddd",
    "E": "ddd"
  };
  IntlBase4.dateConverterMapper = /dddd|ddd/ig;
  var defaultFirstDay = "sun";
  IntlBase4.islamicRegex = /^islamic/;
  var firstDayMapper = {
    "sun": 0,
    "mon": 1,
    "tue": 2,
    "wed": 3,
    "thu": 4,
    "fri": 5,
    "sat": 6
  };
  IntlBase4.formatRegex = new regExp3("(^[ncpae]{1})([0-1]?[0-9]|20)?$", "i");
  IntlBase4.currencyFormatRegex = new regExp3("(^[ca]{1})([0-1]?[0-9]|20)?$", "i");
  IntlBase4.curWithoutNumberRegex = /(c|a)$/ig;
  var typeMapper = {
    "$": "isCurrency",
    "%": "isPercent",
    "-": "isNegative",
    0: "nlead",
    1: "nend"
  };
  IntlBase4.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi;
  IntlBase4.basicPatterns = ["short", "medium", "long", "full"];
  IntlBase4.defaultObject = {
    "dates": {
      "calendars": {
        "gregorian": {
          "months": {
            "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": {
            "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"
              }
            }
          },
          "dayPeriods": {
            "format": {
              "wide": {
                "am": "AM",
                "pm": "PM"
              }
            }
          },
          "eras": {
            "eraNames": {
              "0": "Before Christ",
              "0-alt-variant": "Before Common Era",
              "1": "Anno Domini",
              "1-alt-variant": "Common Era"
            },
            "eraAbbr": {
              "0": "BC",
              "0-alt-variant": "BCE",
              "1": "AD",
              "1-alt-variant": "CE"
            },
            "eraNarrow": {
              "0": "B",
              "0-alt-variant": "BCE",
              "1": "A",
              "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": {
              "d": "d",
              "E": "ccc",
              "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",
              "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"
            }
          }
        },
        "islamic": {
          "months": {
            "stand-alone": {
              "abbreviated": {
                "1": "Muh.",
                "2": "Saf.",
                "3": "Rab. I",
                "4": "Rab. II",
                "5": "Jum. I",
                "6": "Jum. II",
                "7": "Raj.",
                "8": "Sha.",
                "9": "Ram.",
                "10": "Shaw.",
                "11": "Dhuʻl-Q.",
                "12": "Dhuʻl-H."
              },
              "narrow": {
                "1": "1",
                "2": "2",
                "3": "3",
                "4": "4",
                "5": "5",
                "6": "6",
                "7": "7",
                "8": "8",
                "9": "9",
                "10": "10",
                "11": "11",
                "12": "12"
              },
              "wide": {
                "1": "Muharram",
                "2": "Safar",
                "3": "Rabiʻ I",
                "4": "Rabiʻ II",
                "5": "Jumada I",
                "6": "Jumada II",
                "7": "Rajab",
                "8": "Shaʻban",
                "9": "Ramadan",
                "10": "Shawwal",
                "11": "Dhuʻl-Qiʻdah",
                "12": "Dhuʻl-Hijjah"
              }
            }
          },
          "days": {
            "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"
              }
            }
          },
          "dayPeriods": {
            "format": {
              "wide": {
                "am": "AM",
                "pm": "PM"
              }
            }
          },
          "eras": {
            "eraNames": {
              "0": "AH"
            },
            "eraAbbr": {
              "0": "AH"
            },
            "eraNarrow": {
              "0": "AH"
            }
          },
          "dateFormats": {
            "full": "EEEE, MMMM d, y G",
            "long": "MMMM d, y G",
            "medium": "MMM d, y G",
            "short": "M/d/y GGGGG"
          },
          "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": {
              "d": "d",
              "E": "ccc",
              "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",
              "M": "L",
              "Md": "M/d",
              "MEd": "E, M/d",
              "MMM": "LLL",
              "MMMd": "MMM d",
              "MMMEd": "E, MMM d",
              "MMMMd": "MMMM d",
              "ms": "mm:ss",
              "y": "y G",
              "yyyy": "y G",
              "yyyyM": "M/y GGGGG",
              "yyyyMd": "M/d/y GGGGG",
              "yyyyMEd": "E, M/d/y GGGGG",
              "yyyyMMM": "MMM y G",
              "yyyyMMMd": "MMM d, y G",
              "yyyyMMMEd": "E, MMM d, y G",
              "yyyyMMMM": "MMMM y G",
              "yyyyQQQ": "QQQ y G",
              "yyyyQQQQ": "QQQQ y G"
            }
          }
        }
      },
      "timeZoneNames": {
        "hourFormat": "+HH:mm;-HH:mm",
        "gmtFormat": "GMT{0}",
        "gmtZeroFormat": "GMT"
      }
    },
    "numbers": {
      "currencies": {
        "USD": {
          "displayName": "US Dollar",
          "symbol": "$",
          "symbol-alt-narrow": "$"
        },
        "EUR": {
          "displayName": "Euro",
          "symbol": "€",
          "symbol-alt-narrow": "€"
        },
        "GBP": {
          "displayName": "British Pound",
          "symbol-alt-narrow": "£"
        }
      },
      "defaultNumberingSystem": "latn",
      "minimumGroupingDigits": "1",
      "symbols-numberSystem-latn": {
        "decimal": ".",
        "group": ",",
        "list": ";",
        "percentSign": "%",
        "plusSign": "+",
        "minusSign": "-",
        "exponential": "E",
        "superscriptingExponent": "×",
        "perMille": "‰",
        "infinity": "∞",
        "nan": "NaN",
        "timeSeparator": ":"
      },
      "decimalFormats-numberSystem-latn": {
        "standard": "#,##0.###"
      },
      "percentFormats-numberSystem-latn": {
        "standard": "#,##0%"
      },
      "currencyFormats-numberSystem-latn": {
        "standard": "¤#,##0.00",
        "accounting": "¤#,##0.00;(¤#,##0.00)"
      },
      "scientificFormats-numberSystem-latn": {
        "standard": "#E0"
      }
    }
  };
  IntlBase4.blazorDefaultObject = {
    "numbers": {
      "mapper": {
        "0": "0",
        "1": "1",
        "2": "2",
        "3": "3",
        "4": "4",
        "5": "5",
        "6": "6",
        "7": "7",
        "8": "8",
        "9": "9"
      },
      "mapperDigits": "0123456789",
      "numberSymbols": {
        "decimal": ".",
        "group": ",",
        "plusSign": "+",
        "minusSign": "-",
        "percentSign": "%",
        "nan": "NaN",
        "timeSeparator": ":",
        "infinity": "∞"
      },
      "timeSeparator": ":",
      "currencySymbol": "$",
      "currencypData": {
        "nlead": "$",
        "nend": "",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "percentpData": {
        "nlead": "",
        "nend": "%",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "percentnData": {
        "nlead": "-",
        "nend": "%",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "currencynData": {
        "nlead": "($",
        "nend": ")",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "decimalnData": {
        "nlead": "-",
        "nend": "",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "decimalpData": {
        "nlead": "",
        "nend": "",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      }
    },
    "dates": {
      "dayPeriods": {
        "am": "AM",
        "pm": "PM"
      },
      "dateSeperator": "/",
      "days": {
        "abbreviated": {
          "sun": "Sun",
          "mon": "Mon",
          "tue": "Tue",
          "wed": "Wed",
          "thu": "Thu",
          "fri": "Fri",
          "sat": "Sat"
        },
        "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"
        }
      },
      "months": {
        "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"
        },
        "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"
        }
      },
      "eras": {
        "1": "AD"
      }
    }
  };
  IntlBase4.monthIndex = {
    3: "abbreviated",
    4: "wide",
    5: "narrow",
    1: "abbreviated"
  };
  IntlBase4.month = "months";
  IntlBase4.days = "days";
  IntlBase4.patternMatcher = {
    C: "currency",
    P: "percent",
    N: "decimal",
    A: "currency",
    E: "scientific"
  };
  function getResultantPattern(skeleton, dateObject, type, isIslamic, blazorCulture) {
    var resPattern;
    var iType = type || "date";
    if (blazorCulture) {
      resPattern = compareBlazorDateFormats({
        skeleton
      }, blazorCulture).format || compareBlazorDateFormats({
        skeleton: "d"
      }, "en-US").format;
    } else {
      if (IntlBase4.basicPatterns.indexOf(skeleton) !== -1) {
        resPattern = getValue2(iType + "Formats." + skeleton, dateObject);
        if (iType === "dateTime") {
          var dPattern = getValue2("dateFormats." + skeleton, dateObject);
          var tPattern = getValue2("timeFormats." + skeleton, dateObject);
          resPattern = resPattern.replace("{1}", dPattern).replace("{0}", tPattern);
        }
      } else {
        resPattern = getValue2("dateTimeFormats.availableFormats." + skeleton, dateObject);
      }
      if (isUndefined2(resPattern) && skeleton === "yMd") {
        resPattern = "M/d/y";
      }
    }
    return resPattern;
  }
  IntlBase4.getResultantPattern = getResultantPattern;
  function getDependables(cldr, culture, mode, isNumber) {
    var ret = {};
    var calendartype = mode || "gregorian";
    ret.parserObject = ParserBase2.getMainObject(cldr, culture) || (isBlazor2() ? IntlBase4.blazorDefaultObject : IntlBase4.defaultObject);
    if (isNumber) {
      ret.numericObject = getValue2("numbers", ret.parserObject);
    } else {
      var dateString = isBlazor2() ? "dates" : "dates.calendars." + calendartype;
      ret.dateObject = getValue2(dateString, ret.parserObject);
    }
    return ret;
  }
  IntlBase4.getDependables = getDependables;
  function getSymbolPattern(type, numSystem, obj, isAccount) {
    return getValue2(type + "Formats-numberSystem-" + numSystem + (isAccount ? ".accounting" : ".standard"), obj) || (isAccount ? getValue2(type + "Formats-numberSystem-" + numSystem + ".standard", obj) : "");
  }
  IntlBase4.getSymbolPattern = getSymbolPattern;
  function ConvertDateToWeekFormat(format) {
    var convertMapper = format.match(IntlBase4.dateConverterMapper);
    if (convertMapper && isBlazor2()) {
      var tempString = convertMapper[0].length === 3 ? "EEE" : "EEEE";
      return format.replace(IntlBase4.dateConverterMapper, tempString);
    }
    return format;
  }
  IntlBase4.ConvertDateToWeekFormat = ConvertDateToWeekFormat;
  function compareBlazorDateFormats(formatOptions, culture) {
    var format = formatOptions.format || formatOptions.skeleton;
    var curFormatMapper = getValue2((culture || "en-US") + "." + format, blazorCultureFormats2);
    if (!curFormatMapper) {
      curFormatMapper = getValue2("en-US." + format, blazorCultureFormats2);
    }
    if (curFormatMapper) {
      curFormatMapper = ConvertDateToWeekFormat(curFormatMapper);
      formatOptions.format = curFormatMapper.replace(/tt/, "a");
    }
    return formatOptions;
  }
  IntlBase4.compareBlazorDateFormats = compareBlazorDateFormats;
  function getProperNumericSkeleton(skeleton) {
    var matches5 = skeleton.match(IntlBase4.formatRegex);
    var ret = {};
    var pattern = matches5[1].toUpperCase();
    ret.isAccount = pattern === "A";
    ret.type = IntlBase4.patternMatcher["" + pattern];
    if (skeleton.length > 1) {
      ret.fractionDigits = parseInt(matches5[2], 10);
    }
    return ret;
  }
  IntlBase4.getProperNumericSkeleton = getProperNumericSkeleton;
  function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {
    var nData = fractionOnly ? {} : {
      nlead: "",
      nend: ""
    };
    var match = pattern.match(IntlBase4.customRegex);
    if (match) {
      if (!fractionOnly) {
        nData.nlead = changeCurrencySymbol(match[1], cSymbol);
        nData.nend = changeCurrencySymbol(match[10], cSymbol);
        nData.groupPattern = match[4];
      }
      var fraction = match[7];
      if (fraction && needFraction) {
        var fmatch = fraction.match(fractionRegex);
        if (!isNullOrUndefined2(fmatch)) {
          nData.minimumFraction = fmatch.length;
        } else {
          nData.minimumFraction = 0;
        }
        nData.maximumFraction = fraction.length - 1;
      }
    }
    return nData;
  }
  IntlBase4.getFormatData = getFormatData;
  function changeCurrencySymbol(val, sym) {
    if (val) {
      val = val.replace(IntlBase4.defaultCurrency, sym);
      return sym === "" ? val.trim() : val;
    }
    return "";
  }
  IntlBase4.changeCurrencySymbol = changeCurrencySymbol;
  function getCurrencySymbol(numericObject, currencyCode, altSymbol, ignoreCurrency) {
    var symbol = altSymbol ? "." + altSymbol : ".symbol";
    var getCurrency = ignoreCurrency ? "$" : getValue2("currencies." + currencyCode + symbol, numericObject) || getValue2("currencies." + currencyCode + ".symbol-alt-narrow", numericObject) || "$";
    return getCurrency;
  }
  IntlBase4.getCurrencySymbol = getCurrencySymbol;
  function customFormat(format, dOptions, obj) {
    var options = {};
    var formatSplit = format.split(";");
    var data = ["pData", "nData", "zeroData"];
    for (var i = 0; i < formatSplit.length; i++) {
      options["" + data[parseInt(i.toString(), 10)]] = customNumberFormat(formatSplit[parseInt(i.toString(), 10)], dOptions, obj);
    }
    if (isNullOrUndefined2(options.nData)) {
      options.nData = extend2({}, options.pData);
      options.nData.nlead = isNullOrUndefined2(dOptions) ? "-" + options.nData.nlead : dOptions.minusSymbol + options.nData.nlead;
    }
    return options;
  }
  IntlBase4.customFormat = customFormat;
  function customNumberFormat(format, dOptions, numObject) {
    var cOptions = {
      type: "decimal",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    };
    var pattern = format.match(IntlBase4.customRegex);
    if (isNullOrUndefined2(pattern) || pattern[5] === "" && format !== "N/A") {
      cOptions.type = void 0;
      return cOptions;
    }
    cOptions.nlead = pattern[1];
    cOptions.nend = pattern[10];
    var integerPart = pattern[6];
    var spaceCapture = integerPart.match(/ $/g) ? true : false;
    var spaceGrouping = integerPart.replace(/ $/g, "").indexOf(" ") !== -1;
    cOptions.useGrouping = integerPart.indexOf(",") !== -1 || spaceGrouping;
    integerPart = integerPart.replace(/,/g, "");
    var fractionPart = pattern[7];
    if (integerPart.indexOf("0") !== -1) {
      cOptions.minimumIntegerDigits = integerPart.length - integerPart.indexOf("0");
    }
    if (!isNullOrUndefined2(fractionPart)) {
      cOptions.minimumFractionDigits = fractionPart.lastIndexOf("0");
      cOptions.maximumFractionDigits = fractionPart.lastIndexOf("#");
      if (cOptions.minimumFractionDigits === -1) {
        cOptions.minimumFractionDigits = 0;
      }
      if (cOptions.maximumFractionDigits === -1 || cOptions.maximumFractionDigits < cOptions.minimumFractionDigits) {
        cOptions.maximumFractionDigits = cOptions.minimumFractionDigits;
      }
    }
    if (!isNullOrUndefined2(dOptions)) {
      dOptions.isCustomFormat = true;
      extend2(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "$", dOptions.currencySymbol));
      if (!cOptions.isCurrency) {
        extend2(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "%", dOptions.percentSymbol));
      }
    } else {
      extend2(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "%", "%"));
    }
    if (!isNullOrUndefined2(numObject)) {
      var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);
      if (cOptions.useGrouping) {
        cOptions.groupSeparator = spaceGrouping ? " " : dOptions.numberMapper.numberSymbols[mapper5[2]];
        cOptions.groupData = NumberFormat3.getGroupingDetails(symbolPattern.split(";")[0]);
      }
      cOptions.nlead = cOptions.nlead.replace(/'/g, "");
      cOptions.nend = spaceCapture ? " " + cOptions.nend.replace(/'/g, "") : cOptions.nend.replace(/'/g, "");
    }
    return cOptions;
  }
  IntlBase4.customNumberFormat = customNumberFormat;
  function isCurrencyPercent(parts, actual, symbol) {
    var options = {
      nlead: parts[0],
      nend: parts[1]
    };
    for (var i = 0; i < 2; i++) {
      var part = parts[parseInt(i.toString(), 10)];
      var loc = part.indexOf(actual);
      if (loc !== -1 && (loc < part.indexOf("'") || loc > part.lastIndexOf("'"))) {
        options["" + typeMapper[parseInt(i.toString(), 10)]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
        options["" + typeMapper["" + actual]] = true;
        options.type = options.isCurrency ? "currency" : "percent";
        break;
      }
    }
    return options;
  }
  IntlBase4.isCurrencyPercent = isCurrencyPercent;
  function getDateSeparator(dateObj) {
    var value = (getValue2("dateFormats.short", dateObj) || "").match(/[dM]([^dM])[dM]/i);
    return value ? value[1] : "/";
  }
  IntlBase4.getDateSeparator = getDateSeparator;
  function getActualDateTimeFormat(culture, options, cldr, isExcelFormat) {
    var dependable = getDependables(cldr, culture, options.calendar);
    if (isBlazor2()) {
      options = compareBlazorDateFormats(options, culture);
    }
    var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
    if (isExcelFormat) {
      actualPattern = actualPattern.replace(patternRegex, function(pattern2) {
        return patternMatch["" + pattern2];
      });
      if (actualPattern.indexOf("z") !== -1) {
        var tLength = actualPattern.match(/z/g).length;
        var timeZonePattern = void 0;
        var options_1 = {
          "timeZone": {}
        };
        options_1.numMapper = ParserBase2.getNumberMapper(dependable.parserObject, ParserBase2.getNumberingSystem(cldr));
        options_1.timeZone = getValue2("dates.timeZoneNames", dependable.parserObject);
        var value = /* @__PURE__ */ new Date();
        var timezone = value.getTimezoneOffset();
        var pattern = tLength < 4 ? "+H;-H" : options_1.timeZone.hourFormat;
        pattern = pattern.replace(/:/g, options_1.numMapper.timeSeparator);
        if (timezone === 0) {
          timeZonePattern = options_1.timeZone.gmtZeroFormat;
        } else {
          timeZonePattern = DateFormat3.getTimeZoneValue(timezone, pattern);
          timeZonePattern = options_1.timeZone.gmtFormat.replace(/\{0\}/, timeZonePattern);
        }
        actualPattern = actualPattern.replace(/[z]+/, '"' + timeZonePattern + '"');
      }
      actualPattern = actualPattern.replace(/ $/, "");
    }
    return actualPattern;
  }
  IntlBase4.getActualDateTimeFormat = getActualDateTimeFormat;
  function processSymbol(actual, option) {
    if (actual.indexOf(",") !== -1) {
      var split = actual.split(",");
      actual = split[0] + getValue2("numberMapper.numberSymbols.group", option) + split[1].replace(".", getValue2("numberMapper.numberSymbols.decimal", option));
    } else {
      actual = actual.replace(".", getValue2("numberMapper.numberSymbols.decimal", option));
    }
    return actual;
  }
  IntlBase4.processSymbol = processSymbol;
  function getActualNumberFormat(culture, options, cldr, isExcel) {
    var dependable = getDependables(cldr, culture, "", true);
    var parseOptions = {
      custom: true
    };
    var numrericObject = dependable.numericObject;
    var minFrac;
    var curObj = {};
    var curMatch = (options.format || "").match(IntlBase4.currencyFormatRegex);
    var type = IntlBase4.formatRegex.test(options.format) ? getProperNumericSkeleton(options.format || "N") : {};
    var dOptions = {};
    if (curMatch) {
      dOptions.numberMapper = isBlazor2() ? extend2({}, dependable.numericObject) : ParserBase2.getNumberMapper(dependable.parserObject, ParserBase2.getNumberingSystem(cldr), true);
      var curCode = isBlazor2() ? getValue2("currencySymbol", dependable.numericObject) : getCurrencySymbol(dependable.numericObject, options.currency || defaultCurrencyCode2, options.altSymbol);
      var symbolPattern = getSymbolPattern("currency", dOptions.numberMapper.numberSystem, dependable.numericObject, /a/i.test(options.format));
      symbolPattern = symbolPattern.replace(/\u00A4/g, curCode);
      var split = symbolPattern.split(";");
      curObj.hasNegativePattern = isBlazor2() ? true : split.length > 1;
      curObj.nData = isBlazor2() ? getValue2(type.type + "nData", numrericObject) : getFormatData(split[1] || "-" + split[0], true, curCode);
      curObj.pData = isBlazor2() ? getValue2(type.type + "pData", numrericObject) : getFormatData(split[0], false, curCode);
      if (!curMatch[2] && !options.minimumFractionDigits && !options.maximumFractionDigits) {
        minFrac = getFormatData(symbolPattern.split(";")[0], true, "", true).minimumFraction;
      }
    }
    var actualPattern;
    if (IntlBase4.formatRegex.test(options.format) || !options.format) {
      extend2(parseOptions, getProperNumericSkeleton(options.format || "N"));
      parseOptions.custom = false;
      actualPattern = "###0";
      if (parseOptions.fractionDigits || options.minimumFractionDigits || options.maximumFractionDigits || minFrac) {
        var defaultMinimum = 0;
        if (parseOptions.fractionDigits) {
          options.minimumFractionDigits = options.maximumFractionDigits = parseOptions.fractionDigits;
        }
        actualPattern = fractionDigitsPattern(actualPattern, minFrac || parseOptions.fractionDigits || options.minimumFractionDigits || defaultMinimum, options.maximumFractionDigits || defaultMinimum);
      }
      if (options.minimumIntegerDigits) {
        actualPattern = minimumIntegerPattern(actualPattern, options.minimumIntegerDigits);
      }
      if (options.useGrouping) {
        actualPattern = groupingPattern(actualPattern);
      }
      if (parseOptions.type === "currency" || parseOptions.type && isBlazor2()) {
        if (isBlazor2() && parseOptions.type !== "currency") {
          curObj.pData = getValue2(parseOptions.type + "pData", numrericObject);
          curObj.nData = getValue2(parseOptions.type + "nData", numrericObject);
        }
        var cPattern = actualPattern;
        actualPattern = curObj.pData.nlead + cPattern + curObj.pData.nend;
        if (curObj.hasNegativePattern || isBlazor2()) {
          actualPattern += ";" + curObj.nData.nlead + cPattern + curObj.nData.nend;
        }
      }
      if (parseOptions.type === "percent" && !isBlazor2()) {
        actualPattern += " %";
      }
    } else {
      actualPattern = options.format.replace(/'/g, '"');
    }
    if (Object.keys(dOptions).length > 0) {
      actualPattern = !isExcel ? processSymbol(actualPattern, dOptions) : actualPattern;
    }
    return actualPattern;
  }
  IntlBase4.getActualNumberFormat = getActualNumberFormat;
  function fractionDigitsPattern(pattern, minDigits, maxDigits) {
    pattern += ".";
    for (var a = 0; a < minDigits; a++) {
      pattern += "0";
    }
    if (minDigits < maxDigits) {
      var diff = maxDigits - minDigits;
      for (var b = 0; b < diff; b++) {
        pattern += "#";
      }
    }
    return pattern;
  }
  IntlBase4.fractionDigitsPattern = fractionDigitsPattern;
  function minimumIntegerPattern(pattern, digits) {
    var temp = pattern.split(".");
    var integer = "";
    for (var x = 0; x < digits; x++) {
      integer += "0";
    }
    return temp[1] ? integer + "." + temp[1] : integer;
  }
  IntlBase4.minimumIntegerPattern = minimumIntegerPattern;
  function groupingPattern(pattern) {
    var temp = pattern.split(".");
    var integer = temp[0];
    var no = 3 - integer.length % 3;
    var hash = no && no === 1 ? "#" : no === 2 ? "##" : "";
    integer = hash + integer;
    pattern = "";
    for (var x = integer.length - 1; x > 0; x = x - 3) {
      pattern = "," + integer[x - 2] + integer[x - 1] + integer[parseInt(x.toString(), 10)] + pattern;
    }
    pattern = pattern.slice(1);
    return temp[1] ? pattern + "." + temp[1] : pattern;
  }
  IntlBase4.groupingPattern = groupingPattern;
  function getWeekData(culture, cldr) {
    var firstDay = defaultFirstDay;
    var mapper6 = getValue2("supplemental.weekData.firstDay", cldr);
    var iCulture = culture;
    if (/en-/.test(iCulture)) {
      iCulture = iCulture.slice(3);
    }
    iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);
    if (mapper6) {
      firstDay = mapper6["" + iCulture] || mapper6[iCulture.slice(0, 2)] || defaultFirstDay;
    }
    return firstDayMapper["" + firstDay];
  }
  IntlBase4.getWeekData = getWeekData;
  function replaceBlazorCurrency(pData, aCurrency, rCurrency) {
    var iCurrency = getBlazorCurrencySymbol2(rCurrency);
    if (aCurrency !== iCurrency) {
      for (var _i = 0, pData_1 = pData; _i < pData_1.length; _i++) {
        var data = pData_1[_i];
        data.nend = data.nend.replace(aCurrency, iCurrency);
        data.nlead = data.nlead.replace(aCurrency, iCurrency);
      }
    }
  }
  IntlBase4.replaceBlazorCurrency = replaceBlazorCurrency;
  function getWeekOfYear(date) {
    var newYear = new Date(date.getFullYear(), 0, 1);
    var day = newYear.getDay();
    var weeknum;
    day = day >= 0 ? day : day + 7;
    var daynum = Math.floor((date.getTime() - newYear.getTime() - (date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 6e4) / 864e5) + 1;
    if (day < 4) {
      weeknum = Math.floor((daynum + day - 1) / 7) + 1;
      if (weeknum > 52) {
        var nYear = new Date(date.getFullYear() + 1, 0, 1);
        var nday = nYear.getDay();
        nday = nday >= 0 ? nday : nday + 7;
        weeknum = nday < 4 ? 1 : 53;
      }
    } else {
      weeknum = Math.floor((daynum + day - 1) / 7);
    }
    return weeknum;
  }
  IntlBase4.getWeekOfYear = getWeekOfYear;
})(IntlBase2 || (IntlBase2 = {}));

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/ajax.js
var headerRegex2 = /^(.*?):[ \t]*([^\r\n]*)$/gm;
var defaultType2 = "GET";
var Ajax2 = (
  /** @class */
  function() {
    function Ajax4(options, type, async, contentType) {
      this.mode = true;
      this.emitError = true;
      this.options = {};
      if (typeof options === "string") {
        this.url = options;
        this.type = type ? type.toUpperCase() : defaultType2;
        this.mode = !isNullOrUndefined2(async) ? async : true;
      } else if (typeof options === "object") {
        this.options = options;
        merge2(this, this.options);
      }
      this.type = this.type ? this.type.toUpperCase() : defaultType2;
      this.contentType = this.contentType !== void 0 ? this.contentType : contentType;
    }
    Ajax4.prototype.send = function(data) {
      var _this = this;
      this.data = isNullOrUndefined2(data) ? this.data : data;
      var eventArgs = {
        cancel: false,
        httpRequest: null
      };
      var promise = new Promise(function(resolve, reject) {
        _this.httpRequest = new XMLHttpRequest();
        _this.httpRequest.onreadystatechange = function() {
          _this.stateChange(resolve, reject);
        };
        if (!isNullOrUndefined2(_this.onLoad)) {
          _this.httpRequest.onload = _this.onLoad;
        }
        if (!isNullOrUndefined2(_this.onProgress)) {
          _this.httpRequest.onprogress = _this.onProgress;
        }
        if (!isNullOrUndefined2(_this.onAbort)) {
          _this.httpRequest.onabort = _this.onAbort;
        }
        if (!isNullOrUndefined2(_this.onError)) {
          _this.httpRequest.onerror = _this.onError;
        }
        if (!isNullOrUndefined2(_this.onUploadProgress)) {
          _this.httpRequest.upload.onprogress = _this.onUploadProgress;
        }
        _this.httpRequest.open(_this.type, _this.url, _this.mode);
        if (!isNullOrUndefined2(_this.data) && _this.contentType !== null) {
          _this.httpRequest.setRequestHeader("Content-Type", _this.contentType || "application/json; charset=utf-8");
        }
        if (_this.beforeSend) {
          eventArgs.httpRequest = _this.httpRequest;
          _this.beforeSend(eventArgs);
        }
        if (!eventArgs.cancel) {
          _this.httpRequest.send(!isNullOrUndefined2(_this.data) ? _this.data : null);
        }
      });
      return promise;
    };
    Ajax4.prototype.successHandler = function(data) {
      if (this.onSuccess) {
        this.onSuccess(data, this);
      }
      return data;
    };
    Ajax4.prototype.failureHandler = function(reason) {
      if (this.onFailure) {
        this.onFailure(this.httpRequest);
      }
      return reason;
    };
    Ajax4.prototype.stateChange = function(resolve, reject) {
      var data = this.httpRequest.responseText;
      if (this.dataType && this.dataType.toLowerCase() === "json") {
        if (data === "") {
          data = void 0;
        } else {
          try {
            data = JSON.parse(data);
          } catch (error) {
          }
        }
      }
      if (this.httpRequest.readyState === 4) {
        if (this.httpRequest.status >= 200 && this.httpRequest.status <= 299 || this.httpRequest.status === 304) {
          resolve(this.successHandler(data));
        } else {
          if (this.emitError) {
            reject(new Error(this.failureHandler(this.httpRequest.statusText)));
          } else {
            resolve();
          }
        }
      }
    };
    Ajax4.prototype.getResponseHeader = function(key) {
      var responseHeaders = {};
      var headers = headerRegex2.exec(this.httpRequest.getAllResponseHeaders());
      while (headers) {
        responseHeaders[headers[1].toLowerCase()] = headers[2];
        headers = headerRegex2.exec(this.httpRequest.getAllResponseHeaders());
      }
      var header = responseHeaders[key.toLowerCase()];
      return isNullOrUndefined2(header) ? null : header;
    };
    return Ajax4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/fetch.js
var Fetch2 = (
  /** @class */
  function() {
    function Fetch4(options, type, contentType) {
      this.type = "GET";
      this.emitError = true;
      if (typeof options === "string") {
        this.url = options;
        this.type = !isNullOrUndefined2(type) ? type.toUpperCase() : this.type;
        this.contentType = contentType;
      } else if (isObject2(options) && Object.keys(options).length > 0) {
        merge2(this, options);
      }
      this.contentType = !isNullOrUndefined2(this.contentType) ? this.contentType : "application/json; charset=utf-8";
    }
    Fetch4.prototype.send = function(data) {
      var _this = this;
      var contentTypes = {
        "application/json": "json",
        "multipart/form-data": "formData",
        "application/octet-stream": "blob",
        "application/x-www-form-urlencoded": "formData"
      };
      try {
        if (isNullOrUndefined2(this.fetchRequest) && this.type === "GET") {
          this.fetchRequest = new Request(this.url, {
            method: this.type
          });
        } else if (isNullOrUndefined2(this.fetchRequest)) {
          this.data = !isNullOrUndefined2(data) ? data : this.data;
          this.fetchRequest = new Request(this.url, {
            method: this.type,
            headers: {
              "Content-Type": this.contentType
            },
            body: this.data
          });
        }
        var eventArgs = {
          cancel: false,
          fetchRequest: this.fetchRequest
        };
        this.triggerEvent(this["beforeSend"], eventArgs);
        if (eventArgs.cancel) {
          return null;
        }
        this.fetchResponse = fetch(this.fetchRequest);
        return this.fetchResponse.then(function(response) {
          _this.triggerEvent(_this["onLoad"], response);
          if (!response.ok) {
            throw response;
          }
          var responseType = "text";
          for (var _i = 0, _a = Object.keys(contentTypes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf(key) !== -1) {
              responseType = contentTypes[key];
            }
          }
          return response[responseType]();
        }).then(function(data2) {
          _this.triggerEvent(_this["onSuccess"], data2, _this);
          return data2;
        }).catch(function(error) {
          var returnVal = {};
          if (_this.emitError) {
            _this.triggerEvent(_this["onFailure"], error);
            returnVal = Promise.reject(error);
          }
          return returnVal;
        });
      } catch (error) {
        return error;
      }
    };
    Fetch4.prototype.triggerEvent = function(callback, data, instance) {
      if (!isNullOrUndefined2(callback) && typeof callback === "function") {
        callback(data, instance);
      }
    };
    return Fetch4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/browser.js
var REGX_MOBILE2 = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;
var REGX_IE2 = /msie|trident/i;
var REGX_IE112 = /Trident\/7\./;
var REGX_IOS2 = /(ipad|iphone|ipod touch)/i;
var REGX_IOS72 = /(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i;
var REGX_ANDROID2 = /android/i;
var REGX_WINDOWS2 = /trident|windows phone|edge/i;
var REGX_VERSION2 = /(version)[ /]([\w.]+)/i;
var REGX_BROWSER2 = {
  OPERA: /(opera|opr)(?:.*version|)[ /]([\w.]+)/i,
  EDGE: /(edge)(?:.*version|)[ /]([\w.]+)/i,
  CHROME: /(chrome|crios)[ /]([\w.]+)/i,
  PANTHOMEJS: /(phantomjs)[ /]([\w.]+)/i,
  SAFARI: /(safari)[ /]([\w.]+)/i,
  WEBKIT: /(webkit)[ /]([\w.]+)/i,
  MSIE: /(msie|trident) ([\w.]+)/i,
  MOZILLA: /(mozilla)(?:.*? rv:([\w.]+)|)/i
};
if (typeof window !== "undefined") {
  window.browserDetails = window.browserDetails || {};
}
var Browser2 = (
  /** @class */
  function() {
    function Browser4() {
    }
    Browser4.extractBrowserDetail = function() {
      var browserInfo = {
        culture: {}
      };
      var keys4 = Object.keys(REGX_BROWSER2);
      var clientInfo = [];
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        clientInfo = Browser4.userAgent.match(REGX_BROWSER2["" + key]);
        if (clientInfo) {
          browserInfo.name = clientInfo[1].toLowerCase() === "opr" ? "opera" : clientInfo[1].toLowerCase();
          browserInfo.name = clientInfo[1].toLowerCase() === "crios" ? "chrome" : browserInfo.name;
          browserInfo.version = clientInfo[2];
          browserInfo.culture.name = browserInfo.culture.language = navigator.language;
          if (Browser4.userAgent.match(REGX_IE112)) {
            browserInfo.name = "msie";
            break;
          }
          var version = Browser4.userAgent.match(REGX_VERSION2);
          if (browserInfo.name === "safari" && version) {
            browserInfo.version = version[2];
          }
          break;
        }
      }
      return browserInfo;
    };
    Browser4.getEvent = function(event2) {
      var events = {
        start: {
          isPointer: "pointerdown",
          isTouch: "touchstart",
          isDevice: "mousedown"
        },
        move: {
          isPointer: "pointermove",
          isTouch: "touchmove",
          isDevice: "mousemove"
        },
        end: {
          isPointer: "pointerup",
          isTouch: "touchend",
          isDevice: "mouseup"
        },
        cancel: {
          isPointer: "pointercancel",
          isTouch: "touchcancel",
          isDevice: "mouseleave"
        }
      };
      return Browser4.isPointer ? events["" + event2].isPointer : Browser4.isTouch ? events["" + event2].isTouch + (!Browser4.isDevice ? " " + events["" + event2].isDevice : "") : events["" + event2].isDevice;
    };
    Browser4.getTouchStartEvent = function() {
      return Browser4.getEvent("start");
    };
    Browser4.getTouchEndEvent = function() {
      return Browser4.getEvent("end");
    };
    Browser4.getTouchMoveEvent = function() {
      return Browser4.getEvent("move");
    };
    Browser4.getTouchCancelEvent = function() {
      return Browser4.getEvent("cancel");
    };
    Browser4.isSafari = function() {
      return Browser4.isDevice && Browser4.isIos && Browser4.isTouch && typeof window !== "undefined" && window.navigator.userAgent.toLowerCase().indexOf("iphone") === -1 && window.navigator.userAgent.toLowerCase().indexOf("safari") > -1;
    };
    Browser4.getValue = function(key, regX) {
      var browserDetails = typeof window !== "undefined" ? window.browserDetails : {};
      if (typeof navigator !== "undefined" && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1 && Browser4.isTouch === true && !REGX_BROWSER2.CHROME.test(navigator.userAgent)) {
        browserDetails["isIos"] = true;
        browserDetails["isDevice"] = true;
        browserDetails["isTouch"] = true;
        browserDetails["isPointer"] = true;
        browserDetails["isPointer"] = "pointerEnabled" in window.navigator;
      }
      if (typeof window !== "undefined" && window.Capacitor && window.Capacitor.getPlatform() === "ios") {
        browserDetails["isPointer"] = false;
      }
      if ("undefined" === typeof browserDetails["" + key]) {
        return browserDetails["" + key] = regX.test(Browser4.userAgent);
      }
      return browserDetails["" + key];
    };
    Object.defineProperty(Browser4, "userAgent", {
      get: function() {
        return Browser4.uA;
      },
      //Properties
      /**
       * Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
       * Also we can set our own userAgent.
       *
       * @param {string} uA ?
       */
      set: function(uA) {
        Browser4.uA = uA;
        window.browserDetails = {};
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "info", {
      //Read Only Properties
      /**
       * Property is to get the browser information like Name, Version and Language
       *
       * @returns {BrowserInfo} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.info)) {
          return window.browserDetails.info = Browser4.extractBrowserDetail();
        }
        return window.browserDetails.info;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIE", {
      /**
       * Property is to get whether the userAgent is based IE.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIE", REGX_IE2);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isTouch", {
      /**
       * Property is to get whether the browser has touch support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.isTouch)) {
          return window.browserDetails.isTouch = "ontouchstart" in window.navigator || window && window.navigator && window.navigator.maxTouchPoints > 0 || "ontouchstart" in window;
        }
        return window.browserDetails.isTouch;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isPointer", {
      /**
       * Property is to get whether the browser has Pointer support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.isPointer)) {
          return window.browserDetails.isPointer = "pointerEnabled" in window.navigator;
        }
        return window.browserDetails.isPointer;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isMSPointer", {
      /**
       * Property is to get whether the browser has MSPointer support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.isMSPointer)) {
          return window.browserDetails.isMSPointer = "msPointerEnabled" in window.navigator;
        }
        return window.browserDetails.isMSPointer;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isDevice", {
      /**
       * Property is to get whether the userAgent is device based.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isDevice", REGX_MOBILE2);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIos", {
      /**
       * Property is to get whether the userAgent is IOS.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIos", REGX_IOS2);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIos7", {
      /**
       * Property is to get whether the userAgent is Ios7.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIos7", REGX_IOS72);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isAndroid", {
      /**
       * Property is to get whether the userAgent is Android.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isAndroid", REGX_ANDROID2);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isWebView", {
      /**
       * Property is to identify whether application ran in web view.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.isWebView)) {
          window.browserDetails.isWebView = !(isUndefined2(window.cordova) && isUndefined2(window.PhoneGap) && isUndefined2(window.phonegap) && window.forge !== "object");
          return window.browserDetails.isWebView;
        }
        return window.browserDetails.isWebView;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isWindows", {
      /**
       * Property is to get whether the userAgent is Windows.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isWindows", REGX_WINDOWS2);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchStartEvent", {
      /**
       * Property is to get the touch start event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.touchStartEvent)) {
          return window.browserDetails.touchStartEvent = Browser4.getTouchStartEvent();
        }
        return window.browserDetails.touchStartEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchMoveEvent", {
      /**
       * Property is to get the touch move event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.touchMoveEvent)) {
          return window.browserDetails.touchMoveEvent = Browser4.getTouchMoveEvent();
        }
        return window.browserDetails.touchMoveEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchEndEvent", {
      /**
       * Property is to get the touch end event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.touchEndEvent)) {
          return window.browserDetails.touchEndEvent = Browser4.getTouchEndEvent();
        }
        return window.browserDetails.touchEndEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchCancelEvent", {
      /**
       * Property is to cancel the touch end event.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined2(window.browserDetails.touchCancelEvent)) {
          return window.browserDetails.touchCancelEvent = Browser4.getTouchCancelEvent();
        }
        return window.browserDetails.touchCancelEvent;
      },
      enumerable: true,
      configurable: true
    });
    Browser4.uA = typeof navigator !== "undefined" ? navigator.userAgent : "";
    return Browser4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/event-handler.js
var EventHandler2 = (
  /** @class */
  function() {
    function EventHandler4() {
    }
    EventHandler4.addOrGetEventData = function(element2) {
      if ("__eventList" in element2) {
        return element2.__eventList.events;
      } else {
        element2.__eventList = {};
        return element2.__eventList.events = [];
      }
    };
    EventHandler4.add = function(element2, eventName, listener, bindTo, intDebounce) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var debounceListener;
      if (intDebounce) {
        debounceListener = debounce2(listener, intDebounce);
      } else {
        debounceListener = listener;
      }
      if (bindTo) {
        debounceListener = debounceListener.bind(bindTo);
      }
      var event2 = eventName.split(" ");
      for (var i = 0; i < event2.length; i++) {
        eventData.push({
          name: event2[parseInt(i.toString(), 10)],
          listener,
          debounce: debounceListener
        });
        if (Browser2.isIE) {
          element2.addEventListener(event2[parseInt(i.toString(), 10)], debounceListener);
        } else {
          element2.addEventListener(event2[parseInt(i.toString(), 10)], debounceListener, {
            passive: false
          });
        }
      }
      return debounceListener;
    };
    EventHandler4.remove = function(element2, eventName, listener) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var event2 = eventName.split(" ");
      var _loop_1 = function(j2) {
        var index = -1;
        var debounceListener;
        if (eventData && eventData.length !== 0) {
          eventData.some(function(x, i) {
            return x.name === event2[parseInt(j2.toString(), 10)] && x.listener === listener ? (index = i, debounceListener = x.debounce, true) : false;
          });
        }
        if (index !== -1) {
          eventData.splice(index, 1);
        }
        if (debounceListener) {
          element2.removeEventListener(event2[parseInt(j2.toString(), 10)], debounceListener);
        }
      };
      for (var j = 0; j < event2.length; j++) {
        _loop_1(j);
      }
    };
    EventHandler4.clearEvents = function(element2) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var copyData = extend2([], void 0, eventData);
      for (var i = 0; i < copyData.length; i++) {
        var parseValue = copyData[parseInt(i.toString(), 10)];
        element2.removeEventListener(parseValue.name, parseValue.debounce);
        eventData.shift();
      }
    };
    EventHandler4.trigger = function(element2, eventName, eventProp) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      for (var _i = 0, eventData_1 = eventData; _i < eventData_1.length; _i++) {
        var event_1 = eventData_1[_i];
        if (event_1.name === eventName) {
          event_1.debounce.call(this, eventProp);
        }
      }
    };
    return EventHandler4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/dom.js
var SVG_REG2 = /^svg|^path|^g/;
function createElement2(tagName, properties) {
  var element2 = SVG_REG2.test(tagName) ? document.createElementNS("http://www.w3.org/2000/svg", tagName) : document.createElement(tagName);
  if (typeof properties === "undefined") {
    return element2;
  }
  element2.innerHTML = properties.innerHTML ? properties.innerHTML : "";
  if (properties.className !== void 0) {
    element2.className = properties.className;
  }
  if (properties.id !== void 0) {
    element2.id = properties.id;
  }
  if (properties.styles !== void 0) {
    element2.setAttribute("style", properties.styles);
  }
  if (properties.attrs !== void 0) {
    attributes2(element2, properties.attrs);
  }
  return element2;
}
function addClass2(elements, classes) {
  var classList2 = getClassList2(classes);
  var regExp7 = RegExp;
  for (var _i = 0, _a = elements; _i < _a.length; _i++) {
    var ele = _a[_i];
    for (var _b = 0, classList_1 = classList2; _b < classList_1.length; _b++) {
      var className = classList_1[_b];
      if (isObject2(ele)) {
        var curClass = getValue2("attributes.className", ele);
        if (isNullOrUndefined2(curClass)) {
          setValue3("attributes.className", className, ele);
        } else if (!new regExp7("\\b" + className + "\\b", "i").test(curClass)) {
          setValue3("attributes.className", curClass + " " + className, ele);
        }
      } else {
        if (!ele.classList.contains(className)) {
          ele.classList.add(className);
        }
      }
    }
  }
  return elements;
}
function removeClass2(elements, classes) {
  var classList2 = getClassList2(classes);
  for (var _i = 0, _a = elements; _i < _a.length; _i++) {
    var ele = _a[_i];
    var flag = isObject2(ele);
    var canRemove = flag ? getValue2("attributes.className", ele) : ele.className !== "";
    if (canRemove) {
      for (var _b = 0, classList_2 = classList2; _b < classList_2.length; _b++) {
        var className = classList_2[_b];
        if (flag) {
          var classes_1 = getValue2("attributes.className", ele);
          var classArr = classes_1.split(" ");
          var index = classArr.indexOf(className);
          if (index !== -1) {
            classArr.splice(index, 1);
          }
          setValue3("attributes.className", classArr.join(" "), ele);
        } else {
          ele.classList.remove(className);
        }
      }
    }
  }
  return elements;
}
function getClassList2(classes) {
  var classList2 = [];
  if (typeof classes === "string") {
    classList2.push(classes);
  } else {
    classList2 = classes;
  }
  return classList2;
}
function isVisible2(element2) {
  var ele = element2;
  return ele.style.visibility === "" && ele.offsetWidth > 0;
}
function prepend(fromElements, toElement, isEval) {
  var docFrag = document.createDocumentFragment();
  for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {
    var ele = _a[_i];
    docFrag.appendChild(ele);
  }
  toElement.insertBefore(docFrag, toElement.firstElementChild);
  if (isEval) {
    executeScript(toElement);
  }
  return fromElements;
}
function append(fromElements, toElement, isEval) {
  var docFrag = document.createDocumentFragment();
  if (fromElements instanceof NodeList) {
    while (fromElements.length > 0) {
      docFrag.appendChild(fromElements[0]);
    }
  } else {
    for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {
      var ele = _a[_i];
      docFrag.appendChild(ele);
    }
  }
  toElement.appendChild(docFrag);
  if (isEval) {
    executeScript(toElement);
  }
  return fromElements;
}
function executeScript(ele) {
  var eleArray = ele.querySelectorAll("script");
  eleArray.forEach(function(element2) {
    var script = document.createElement("script");
    script.text = element2.innerHTML;
    document.head.appendChild(script);
    detach2(script);
  });
}
function detach2(element2) {
  var parentNode = element2.parentNode;
  if (parentNode) {
    return parentNode.removeChild(element2);
  }
}
function remove(element2) {
  var parentNode = element2.parentNode;
  EventHandler2.clearEvents(element2);
  parentNode.removeChild(element2);
}
function attributes2(element2, attributes4) {
  var keys4 = Object.keys(attributes4);
  var ele = element2;
  for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
    var key = keys_1[_i];
    if (isObject2(ele)) {
      var iKey = key;
      if (key === "tabindex") {
        iKey = "tabIndex";
      }
      ele.attributes["" + iKey] = attributes4["" + key];
    } else {
      ele.setAttribute(key, attributes4["" + key]);
    }
  }
  return ele;
}
function select2(selector, context, needsVDOM) {
  if (context === void 0) {
    context = document;
  }
  selector = querySelectId2(selector);
  return context.querySelector(selector);
}
function selectAll2(selector, context, needsVDOM) {
  if (context === void 0) {
    context = document;
  }
  selector = querySelectId2(selector);
  var nodeList = context.querySelectorAll(selector);
  return nodeList;
}
function querySelectId2(selector) {
  var charRegex = /(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;
  if (selector.match(/#[0-9]/g) || selector.match(charRegex)) {
    var idList = selector.split(",");
    for (var i = 0; i < idList.length; i++) {
      var list = idList[parseInt(i.toString(), 10)].split(" ");
      for (var j = 0; j < list.length; j++) {
        if (list[parseInt(j.toString(), 10)].indexOf("#") > -1) {
          if (!list[parseInt(j.toString(), 10)].match(/\[.*\]/)) {
            var splitId = list[parseInt(j.toString(), 10)].split("#");
            if (splitId[1].match(/^\d/) || splitId[1].match(charRegex)) {
              var setId = list[parseInt(j.toString(), 10)].split(".");
              setId[0] = setId[0].replace(/#/, "[id='") + "']";
              list[parseInt(j.toString(), 10)] = setId.join(".");
            }
          }
        }
      }
      idList[parseInt(i.toString(), 10)] = list.join(" ");
    }
    return idList.join(",");
  }
  return selector;
}
function closest2(element2, selector) {
  var el = element2;
  if (typeof el.closest === "function") {
    return el.closest(selector);
  }
  while (el && el.nodeType === 1) {
    if (matches2(el, selector)) {
      return el;
    }
    el = el.parentNode;
  }
  return null;
}
function setStyleAttribute2(element2, attrs) {
  if (attrs !== void 0) {
    Object.keys(attrs).forEach(function(key) {
      element2.style["" + key] = attrs["" + key];
    });
  }
}
function classList(element2, addClasses, removeClasses) {
  addClass2([element2], addClasses);
  removeClass2([element2], removeClasses);
}
function matches2(element2, selector) {
  var matches5 = element2.matches || element2.msMatchesSelector || element2.webkitMatchesSelector;
  if (matches5) {
    return matches5.call(element2, selector);
  } else {
    return [].indexOf.call(document.querySelectorAll(selector), element2) !== -1;
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/observer.js
var Observer2 = (
  /** @class */
  function() {
    function Observer4(context) {
      this.ranArray = [];
      this.boundedEvents = {};
      if (isNullOrUndefined2(context)) {
        return;
      }
      this.context = context;
    }
    Observer4.prototype.on = function(property, handler, context, id) {
      if (isNullOrUndefined2(handler)) {
        return;
      }
      var cntxt = context || this.context;
      if (this.notExist(property)) {
        this.boundedEvents["" + property] = [{
          handler,
          context: cntxt,
          id
        }];
        return;
      }
      if (!isNullOrUndefined2(id)) {
        if (this.ranArray.indexOf(id) === -1) {
          this.ranArray.push(id);
          this.boundedEvents["" + property].push({
            handler,
            context: cntxt,
            id
          });
        }
      } else if (!this.isHandlerPresent(this.boundedEvents["" + property], handler)) {
        this.boundedEvents["" + property].push({
          handler,
          context: cntxt
        });
      }
    };
    Observer4.prototype.off = function(property, handler, id) {
      if (this.notExist(property)) {
        return;
      }
      var curObject = getValue2(property, this.boundedEvents);
      if (handler) {
        for (var i = 0; i < curObject.length; i++) {
          if (id) {
            if (curObject[parseInt(i.toString(), 10)].id === id) {
              curObject.splice(i, 1);
              var indexLocation = this.ranArray.indexOf(id);
              if (indexLocation !== -1) {
                this.ranArray.splice(indexLocation, 1);
              }
              break;
            }
          } else if (handler === curObject[parseInt(i.toString(), 10)].handler) {
            curObject.splice(i, 1);
            break;
          }
        }
      } else {
        delete this.boundedEvents["" + property];
      }
    };
    Observer4.prototype.notify = function(property, argument, successHandler, errorHandler) {
      if (this.notExist(property)) {
        if (successHandler) {
          successHandler.call(this, argument);
        }
        return;
      }
      if (argument) {
        argument.name = property;
      }
      var blazor = "Blazor";
      var curObject = getValue2(property, this.boundedEvents).slice(0);
      if (window["" + blazor]) {
        return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);
      } else {
        for (var _i = 0, curObject_1 = curObject; _i < curObject_1.length; _i++) {
          var cur = curObject_1[_i];
          cur.handler.call(cur.context, argument);
        }
        if (successHandler) {
          successHandler.call(this, argument);
        }
      }
    };
    Observer4.prototype.blazorCallback = function(objs, argument, successHandler, errorHandler, index) {
      var _this = this;
      var isTrigger = index === objs.length - 1;
      if (index < objs.length) {
        var obj_1 = objs[parseInt(index.toString(), 10)];
        var promise = obj_1.handler.call(obj_1.context, argument);
        if (promise && typeof promise.then === "function") {
          if (!successHandler) {
            return promise;
          }
          promise.then(function(data) {
            data = typeof data === "string" && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data;
            extend2(argument, argument, data, true);
            if (successHandler && isTrigger) {
              successHandler.call(obj_1.context, argument);
            } else {
              return _this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
            }
          }).catch(function(data) {
            if (errorHandler) {
              errorHandler.call(obj_1.context, typeof data === "string" && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data);
            }
          });
        } else if (successHandler && isTrigger) {
          successHandler.call(obj_1.context, argument);
        } else {
          return this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
        }
      }
    };
    Observer4.prototype.dateReviver = function(key, value) {
      var dPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
      if (isBlazor2 && typeof value === "string" && value.match(dPattern) !== null) {
        return new Date(value);
      }
      return value;
    };
    Observer4.prototype.isJson = function(value) {
      try {
        JSON.parse(value);
      } catch (e) {
        return false;
      }
      return true;
    };
    Observer4.prototype.destroy = function() {
      this.boundedEvents = this.context = void 0;
    };
    Observer4.prototype.offIntlEvents = function() {
      var eventsArr = this.boundedEvents["notifyExternalChange"];
      if (eventsArr) {
        for (var i = 0; i < eventsArr.length; i++) {
          var curContext = eventsArr[parseInt(i.toString(), 10)].context;
          if (curContext && curContext.detectFunction && curContext.randomId && curContext.isReactMock) {
            this.off("notifyExternalChange", curContext.detectFunction, curContext.randomId);
            i--;
          }
        }
        if (!this.boundedEvents["notifyExternalChange"].length) {
          delete this.boundedEvents["notifyExternalChange"];
        }
      }
    };
    Observer4.prototype.notExist = function(prop) {
      return Object.prototype.hasOwnProperty.call(this.boundedEvents, prop) === false || this.boundedEvents["" + prop].length <= 0;
    };
    Observer4.prototype.isHandlerPresent = function(boundedEvents, handler) {
      for (var _i = 0, boundedEvents_1 = boundedEvents; _i < boundedEvents_1.length; _i++) {
        var cur = boundedEvents_1[_i];
        if (cur.handler === handler) {
          return true;
        }
      }
      return false;
    };
    return Observer4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/base.js
var isColEName2 = new RegExp("]");
var Base2 = (
  /** @class */
  function() {
    function Base4(options, element2) {
      this.isRendered = false;
      this.isComplexArraySetter = false;
      this.isServerRendered = false;
      this.allowServerDataBinding = true;
      this.isProtectedOnChange = true;
      this.properties = {};
      this.changedProperties = {};
      this.oldProperties = {};
      this.bulkChanges = {};
      this.refreshing = false;
      this.ignoreCollectionWatch = false;
      this.finalUpdate = function() {
      };
      this.childChangedProperties = {};
      this.modelObserver = new Observer2(this);
      if (!isUndefined2(element2)) {
        if ("string" === typeof element2) {
          this.element = document.querySelector(element2);
        } else {
          this.element = element2;
        }
        if (!isNullOrUndefined2(this.element)) {
          this.isProtectedOnChange = false;
          this.addInstance();
        }
      }
      if (!isUndefined2(options)) {
        this.setProperties(options, true);
      }
      this.isDestroyed = false;
    }
    Base4.prototype.setProperties = function(prop, muteOnChange) {
      var prevDetection = this.isProtectedOnChange;
      this.isProtectedOnChange = !!muteOnChange;
      merge2(this, prop);
      if (muteOnChange !== true) {
        merge2(this.changedProperties, prop);
        this.dataBind();
      } else if (isBlazor2() && this.isRendered) {
        this.serverDataBind(prop);
      }
      this.finalUpdate();
      this.changedProperties = {};
      this.oldProperties = {};
      this.isProtectedOnChange = prevDetection;
    };
    Base4.callChildDataBind = function(obj, parent) {
      var keys4 = Object.keys(obj);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        if (parent["" + key] instanceof Array) {
          for (var _a = 0, _b = parent["" + key]; _a < _b.length; _a++) {
            var obj_1 = _b[_a];
            if (obj_1.dataBind !== void 0) {
              obj_1.dataBind();
            }
          }
        } else {
          parent["" + key].dataBind();
        }
      }
    };
    Base4.prototype.clearChanges = function() {
      this.finalUpdate();
      this.changedProperties = {};
      this.oldProperties = {};
      this.childChangedProperties = {};
    };
    Base4.prototype.dataBind = function() {
      Base4.callChildDataBind(this.childChangedProperties, this);
      if (Object.getOwnPropertyNames(this.changedProperties).length) {
        var prevDetection = this.isProtectedOnChange;
        var newChanges = this.changedProperties;
        var oldChanges = this.oldProperties;
        this.clearChanges();
        this.isProtectedOnChange = true;
        this.onPropertyChanged(newChanges, oldChanges);
        this.isProtectedOnChange = prevDetection;
      }
    };
    Base4.prototype.serverDataBind = function(newChanges) {
      if (!isBlazor2()) {
        return;
      }
      newChanges = newChanges ? newChanges : {};
      extend2(this.bulkChanges, {}, newChanges, true);
      var sfBlazor = "sfBlazor";
      if (this.allowServerDataBinding && window["" + sfBlazor].updateModel) {
        window["" + sfBlazor].updateModel(this);
        this.bulkChanges = {};
      }
    };
    Base4.prototype.saveChanges = function(key, newValue, oldValue) {
      if (isBlazor2()) {
        var newChanges = {};
        newChanges["" + key] = newValue;
        this.serverDataBind(newChanges);
      }
      if (this.isProtectedOnChange) {
        return;
      }
      this.oldProperties["" + key] = oldValue;
      this.changedProperties["" + key] = newValue;
      this.finalUpdate();
      this.finalUpdate = setImmediate2(this.dataBind.bind(this));
    };
    Base4.prototype.addEventListener = function(eventName, handler) {
      this.modelObserver.on(eventName, handler);
    };
    Base4.prototype.removeEventListener = function(eventName, handler) {
      this.modelObserver.off(eventName, handler);
    };
    Base4.prototype.trigger = function(eventName, eventProp, successHandler, errorHandler) {
      var _this = this;
      if (this.isDestroyed !== true) {
        var prevDetection = this.isProtectedOnChange;
        this.isProtectedOnChange = false;
        var data = this.modelObserver.notify(eventName, eventProp, successHandler, errorHandler);
        if (isColEName2.test(eventName)) {
          var handler = getValue2(eventName, this);
          if (handler) {
            var blazor = "Blazor";
            if (window["" + blazor]) {
              var promise = handler.call(this, eventProp);
              if (promise && typeof promise.then === "function") {
                if (!successHandler) {
                  data = promise;
                } else {
                  promise.then(function(data2) {
                    if (successHandler) {
                      data2 = typeof data2 === "string" && _this.modelObserver.isJson(data2) ? JSON.parse(data2) : data2;
                      successHandler.call(_this, data2);
                    }
                  }).catch(function(data2) {
                    if (errorHandler) {
                      data2 = typeof data2 === "string" && _this.modelObserver.isJson(data2) ? JSON.parse(data2) : data2;
                      errorHandler.call(_this, data2);
                    }
                  });
                }
              } else if (successHandler) {
                successHandler.call(this, eventProp);
              }
            } else {
              handler.call(this, eventProp);
              if (successHandler) {
                successHandler.call(this, eventProp);
              }
            }
          } else if (successHandler) {
            successHandler.call(this, eventProp);
          }
        }
        this.isProtectedOnChange = prevDetection;
        return data;
      }
    };
    Base4.prototype.addInstance = function() {
      var moduleClass = "e-" + this.getModuleName().toLowerCase();
      addClass2([this.element], ["e-lib", moduleClass]);
      if (!isNullOrUndefined2(this.element.ej2_instances)) {
        this.element.ej2_instances.push(this);
      } else {
        setValue3("ej2_instances", [this], this.element);
      }
    };
    Base4.prototype.destroy = function() {
      var _this = this;
      this.element.ej2_instances = this.element.ej2_instances ? this.element.ej2_instances.filter(function(i) {
        if (proxyToRaw2) {
          return proxyToRaw2(i) !== proxyToRaw2(_this);
        }
        return i !== _this;
      }) : [];
      removeClass2([this.element], ["e-" + this.getModuleName()]);
      if (this.element.ej2_instances.length === 0) {
        removeClass2([this.element], ["e-lib"]);
      }
      this.clearChanges();
      this.modelObserver.destroy();
      this.isDestroyed = true;
    };
    return Base4;
  }()
);
function getComponent(elem, comp) {
  var instance;
  var i;
  var ele = typeof elem === "string" ? document.getElementById(elem) : elem;
  for (i = 0; i < ele.ej2_instances.length; i++) {
    instance = ele.ej2_instances[parseInt(i.toString(), 10)];
    if (typeof comp === "string") {
      var compName = instance.getModuleName();
      if (comp === compName) {
        return instance;
      }
    } else {
      if (instance instanceof comp) {
        return instance;
      }
    }
  }
  return void 0;
}
var proxyToRaw2;

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/notify-property-change.js
function getObject2(instance, curKey, defaultValue, type) {
  if (!Object.prototype.hasOwnProperty.call(instance.properties, curKey) || !(instance.properties["" + curKey] instanceof type)) {
    instance.properties["" + curKey] = createInstance2(type, [instance, curKey, defaultValue]);
  }
  return instance.properties["" + curKey];
}
function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
  var result = [];
  var len = defaultValue ? defaultValue.length : 0;
  for (var i = 0; i < len; i++) {
    var curType = type;
    if (isFactory) {
      curType = type(defaultValue[parseInt(i.toString(), 10)], instance);
    }
    if (isSetter) {
      var inst = createInstance2(curType, [instance, curKey, {}, true]);
      inst.setProperties(defaultValue[parseInt(i.toString(), 10)], true);
      result.push(inst);
    } else {
      result.push(createInstance2(curType, [instance, curKey, defaultValue[parseInt(i.toString(), 10)], false]));
    }
  }
  return result;
}
function propertyGetter2(defaultValue, curKey) {
  return function() {
    if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
      this.properties["" + curKey] = defaultValue;
    }
    return this.properties["" + curKey];
  };
}
function propertySetter2(defaultValue, curKey) {
  return function(newValue) {
    if (this.properties["" + curKey] !== newValue) {
      var oldVal = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties["" + curKey] : defaultValue;
      this.saveChanges(curKey, newValue, oldVal);
      this.properties["" + curKey] = newValue;
    }
  };
}
function complexGetter2(defaultValue, curKey, type) {
  return function() {
    return getObject2(this, curKey, defaultValue, type);
  };
}
function complexSetter2(defaultValue, curKey, type) {
  return function(newValue) {
    getObject2(this, curKey, defaultValue, type).setProperties(newValue);
  };
}
function complexArrayGetter(defaultValue, curKey, type) {
  return function() {
    var _this = this;
    if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
      var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
      this.properties["" + curKey] = defCollection;
    }
    var ignore = this.controlParent !== void 0 && this.controlParent.ignoreCollectionWatch || this.ignoreCollectionWatch;
    if (!Object.prototype.hasOwnProperty.call(this.properties["" + curKey], "push") && !ignore) {
      ["push", "pop"].forEach(function(extendFunc) {
        var descriptor = {
          value: complexArrayDefinedCallback(extendFunc, curKey, type, _this.properties["" + curKey]).bind(_this),
          configurable: true
        };
        Object.defineProperty(_this.properties["" + curKey], extendFunc, descriptor);
      });
    }
    if (!Object.prototype.hasOwnProperty.call(this.properties["" + curKey], "isComplexArray")) {
      Object.defineProperty(this.properties["" + curKey], "isComplexArray", {
        value: true
      });
    }
    return this.properties["" + curKey];
  };
}
function complexArraySetter(defaultValue, curKey, type) {
  return function(newValue) {
    this.isComplexArraySetter = true;
    var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false);
    var newValCollection = getObjectArray(this, curKey, newValue, type, true);
    this.isComplexArraySetter = false;
    this.saveChanges(curKey, newValCollection, oldValueCollection);
    this.properties["" + curKey] = newValCollection;
  };
}
function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
  return function() {
    var newValue = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      newValue[_i] = arguments[_i];
    }
    var keyString = this.propName ? this.getParentKey() + "." + curKey + "-" : curKey + "-";
    switch (dFunc) {
      case "push":
        for (var i = 0; i < newValue.length; i++) {
          var newValueParse = newValue[parseInt(i.toString(), 10)];
          Array.prototype["" + dFunc].apply(prop, [newValueParse]);
          var model = getArrayModel(keyString + (prop.length - 1), newValueParse, !this.controlParent, dFunc);
          this.serverDataBind(model, newValue[parseInt(i.toString(), 10)], false, dFunc);
        }
        break;
      case "pop": {
        Array.prototype["" + dFunc].apply(prop);
        var model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);
        this.serverDataBind(model, {
          ejsAction: "pop"
        }, false, dFunc);
        break;
      }
    }
    return prop;
  };
}
function getArrayModel(keyString, value, isControlParent, arrayFunction) {
  var modelObject = keyString;
  if (isControlParent) {
    modelObject = {};
    modelObject["" + keyString] = value;
    if (value && typeof value === "object") {
      var action = "ejsAction";
      modelObject["" + keyString]["" + action] = arrayFunction;
    }
  }
  return modelObject;
}
function Property2(defaultValue) {
  return function(target, key) {
    var propertyDescriptor = {
      set: propertySetter2(defaultValue, key),
      get: propertyGetter2(defaultValue, key),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection2(target, key, "prop", defaultValue);
  };
}
function Complex2(defaultValue, type) {
  return function(target, key) {
    var propertyDescriptor = {
      set: complexSetter2(defaultValue, key, type),
      get: complexGetter2(defaultValue, key, type),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection2(target, key, "complexProp", defaultValue, type);
  };
}
function Collection(defaultValue, type) {
  return function(target, key) {
    var propertyDescriptor = {
      set: complexArraySetter(defaultValue, key, type),
      get: complexArrayGetter(defaultValue, key, type),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection2(target, key, "colProp", defaultValue, type);
  };
}
function Event3() {
  return function(target, key) {
    var eventDescriptor = {
      set: function(newValue) {
        var oldValue = this.properties["" + key];
        if (oldValue !== newValue) {
          var finalContext = getParentContext2(this, key);
          if (isUndefined2(oldValue) === false) {
            finalContext.context.removeEventListener(finalContext.prefix, oldValue);
          }
          finalContext.context.addEventListener(finalContext.prefix, newValue);
          this.properties["" + key] = newValue;
        }
      },
      get: propertyGetter2(void 0, key),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, eventDescriptor);
    addPropertyCollection2(target, key, "event");
  };
}
function NotifyPropertyChanges2(classConstructor) {
}
function addPropertyCollection2(target, key, propertyType, defaultValue, type) {
  if (isUndefined2(target.propList)) {
    target.propList = {
      props: [],
      complexProps: [],
      colProps: [],
      events: [],
      propNames: [],
      complexPropNames: [],
      colPropNames: [],
      eventNames: []
    };
  }
  target.propList[propertyType + "s"].push({
    propertyName: key,
    defaultValue,
    type
  });
  target.propList[propertyType + "Names"].push(key);
}
function getParentContext2(context, prefix) {
  if (Object.prototype.hasOwnProperty.call(context, "parentObj") === false) {
    return {
      context,
      prefix
    };
  } else {
    var curText = getValue2("propName", context);
    if (curText) {
      prefix = curText + "-" + prefix;
    }
    return getParentContext2(getValue2("parentObj", context), prefix);
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/animation.js
var __extends7 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate8 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Animation2 = (
  /** @class */
  function(_super) {
    __extends7(Animation5, _super);
    function Animation5(options) {
      var _this = _super.call(this, options, void 0) || this;
      _this.easing = {
        ease: "cubic-bezier(0.250, 0.100, 0.250, 1.000)",
        linear: "cubic-bezier(0.250, 0.250, 0.750, 0.750)",
        easeIn: "cubic-bezier(0.420, 0.000, 1.000, 1.000)",
        easeOut: "cubic-bezier(0.000, 0.000, 0.580, 1.000)",
        easeInOut: "cubic-bezier(0.420, 0.000, 0.580, 1.000)",
        elasticInOut: "cubic-bezier(0.5,-0.58,0.38,1.81)",
        elasticIn: "cubic-bezier(0.17,0.67,0.59,1.81)",
        elasticOut: "cubic-bezier(0.7,-0.75,0.99,1.01)"
      };
      return _this;
    }
    Animation_1 = Animation5;
    Animation5.prototype.animate = function(element2, options) {
      options = !options ? {} : options;
      var model = this.getModel(options);
      if (typeof element2 === "string") {
        var elements = Array.prototype.slice.call(selectAll2(element2, document));
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
          var element_1 = elements_1[_i];
          model.element = element_1;
          Animation_1.delayAnimation(model);
        }
      } else {
        model.element = element2;
        Animation_1.delayAnimation(model);
      }
    };
    Animation5.stop = function(element2, model) {
      element2.style.animation = "";
      element2.removeAttribute("e-animate");
      var animationId = element2.getAttribute("e-animation-id");
      if (animationId) {
        var frameId = parseInt(animationId, 10);
        cancelAnimationFrame(frameId);
        element2.removeAttribute("e-animation-id");
      }
      if (model && model.end) {
        model.end.call(this, model);
      }
    };
    Animation5.delayAnimation = function(model) {
      if (animationMode2 === "Disable" || animationMode2 === GlobalAnimationMode2.Disable) {
        if (model.begin) {
          model.begin.call(this, model);
        }
        if (model.end) {
          model.end.call(this, model);
        }
      } else {
        if (model.delay) {
          setTimeout(function() {
            Animation_1.applyAnimation(model);
          }, model.delay);
        } else {
          Animation_1.applyAnimation(model);
        }
      }
    };
    Animation5.applyAnimation = function(model) {
      var _this = this;
      model.timeStamp = 0;
      var step = 0;
      var timerId = 0;
      var prevTimeStamp = 0;
      var duration = model.duration;
      model.element.setAttribute("e-animate", "true");
      var startAnimation = function(timeStamp) {
        try {
          if (timeStamp) {
            prevTimeStamp = prevTimeStamp === 0 ? timeStamp : prevTimeStamp;
            model.timeStamp = timeStamp + model.timeStamp - prevTimeStamp;
            prevTimeStamp = timeStamp;
            if (!step && model.begin) {
              model.begin.call(_this, model);
            }
            step = step + 1;
            var avg = model.timeStamp / step;
            if (model.timeStamp < duration && model.timeStamp + avg < duration && model.element.getAttribute("e-animate")) {
              model.element.style.animation = model.name + " " + model.duration + "ms " + model.timingFunction;
              if (model.progress) {
                model.progress.call(_this, model);
              }
              requestAnimationFrame(startAnimation);
            } else {
              cancelAnimationFrame(timerId);
              model.element.removeAttribute("e-animation-id");
              model.element.removeAttribute("e-animate");
              model.element.style.animation = "";
              if (model.end) {
                model.end.call(_this, model);
              }
            }
          } else {
            timerId = requestAnimationFrame(startAnimation);
            model.element.setAttribute("e-animation-id", timerId.toString());
          }
        } catch (e) {
          cancelAnimationFrame(timerId);
          model.element.removeAttribute("e-animation-id");
          if (model.fail) {
            model.fail.call(_this, e);
          }
        }
      };
      startAnimation();
    };
    Animation5.prototype.getModel = function(options) {
      return {
        name: options.name || this.name,
        delay: options.delay || this.delay,
        duration: options.duration !== void 0 ? options.duration : this.duration,
        begin: options.begin || this.begin,
        end: options.end || this.end,
        fail: options.fail || this.fail,
        progress: options.progress || this.progress,
        timingFunction: this.easing[options.timingFunction] ? this.easing[options.timingFunction] : options.timingFunction || this.easing[this.timingFunction]
      };
    };
    Animation5.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Animation5.prototype.getModuleName = function() {
      return "animation";
    };
    Animation5.prototype.destroy = function() {
    };
    var Animation_1;
    __decorate8([Property2("FadeIn")], Animation5.prototype, "name", void 0);
    __decorate8([Property2(400)], Animation5.prototype, "duration", void 0);
    __decorate8([Property2("ease")], Animation5.prototype, "timingFunction", void 0);
    __decorate8([Property2(0)], Animation5.prototype, "delay", void 0);
    __decorate8([Event3()], Animation5.prototype, "progress", void 0);
    __decorate8([Event3()], Animation5.prototype, "begin", void 0);
    __decorate8([Event3()], Animation5.prototype, "end", void 0);
    __decorate8([Event3()], Animation5.prototype, "fail", void 0);
    Animation5 = Animation_1 = __decorate8([NotifyPropertyChanges2], Animation5);
    return Animation5;
  }(Base2)
);
function rippleEffect(element2, rippleOptions, done) {
  var rippleModel = getRippleModel(rippleOptions);
  if (rippleModel.rippleFlag === false || rippleModel.rippleFlag === void 0 && !isRippleEnabled) {
    return function() {
    };
  }
  element2.setAttribute("data-ripple", "true");
  EventHandler2.add(element2, "mousedown", rippleHandler, {
    parent: element2,
    rippleOptions: rippleModel
  });
  EventHandler2.add(element2, "mouseup", rippleUpHandler, {
    parent: element2,
    rippleOptions: rippleModel,
    done
  });
  EventHandler2.add(element2, "mouseleave", rippleLeaveHandler, {
    parent: element2,
    rippleOptions: rippleModel
  });
  if (Browser2.isPointer) {
    EventHandler2.add(element2, "transitionend", rippleLeaveHandler, {
      parent: element2,
      rippleOptions: rippleModel
    });
  }
  return function() {
    element2.removeAttribute("data-ripple");
    EventHandler2.remove(element2, "mousedown", rippleHandler);
    EventHandler2.remove(element2, "mouseup", rippleUpHandler);
    EventHandler2.remove(element2, "mouseleave", rippleLeaveHandler);
    EventHandler2.remove(element2, "transitionend", rippleLeaveHandler);
  };
}
function getRippleModel(rippleOptions) {
  var rippleModel = {
    selector: rippleOptions && rippleOptions.selector ? rippleOptions.selector : null,
    ignore: rippleOptions && rippleOptions.ignore ? rippleOptions.ignore : null,
    rippleFlag: rippleOptions && rippleOptions.rippleFlag,
    isCenterRipple: rippleOptions && rippleOptions.isCenterRipple,
    duration: rippleOptions && rippleOptions.duration ? rippleOptions.duration : 350
  };
  return rippleModel;
}
function rippleHandler(e) {
  var target = e.target;
  var selector = this.rippleOptions.selector;
  var element2 = selector ? closest2(target, selector) : target;
  if (!element2 || this.rippleOptions && closest2(target, this.rippleOptions.ignore)) {
    return;
  }
  var offset = element2.getBoundingClientRect();
  var offsetX = e.pageX - document.body.scrollLeft;
  var offsetY = e.pageY - (!document.body.scrollTop && document.documentElement ? document.documentElement.scrollTop : document.body.scrollTop);
  var pageX = Math.max(Math.abs(offsetX - offset.left), Math.abs(offsetX - offset.right));
  var pageY = Math.max(Math.abs(offsetY - offset.top), Math.abs(offsetY - offset.bottom));
  var radius = Math.sqrt(pageX * pageX + pageY * pageY);
  var diameter = radius * 2 + "px";
  var x = offsetX - offset.left - radius;
  var y = offsetY - offset.top - radius;
  if (this.rippleOptions && this.rippleOptions.isCenterRipple) {
    x = 0;
    y = 0;
    diameter = "100%";
  }
  element2.classList.add("e-ripple");
  var duration = this.rippleOptions.duration.toString();
  var styles = "width: " + diameter + ";height: " + diameter + ";left: " + x + "px;top: " + y + "px;transition-duration: " + duration + "ms;";
  var rippleElement = createElement2("div", {
    className: "e-ripple-element",
    styles
  });
  element2.appendChild(rippleElement);
  window.getComputedStyle(rippleElement).getPropertyValue("opacity");
  rippleElement.style.transform = "scale(1)";
  if (element2 !== this.parent) {
    EventHandler2.add(element2, "mouseleave", rippleLeaveHandler, {
      parent: this.parent,
      rippleOptions: this.rippleOptions
    });
  }
}
function rippleUpHandler(e) {
  removeRipple(e, this);
}
function rippleLeaveHandler(e) {
  removeRipple(e, this);
}
function removeRipple(e, eventArgs) {
  var duration = eventArgs.rippleOptions.duration;
  var target = e.target;
  var selector = eventArgs.rippleOptions.selector;
  var element2 = selector ? closest2(target, selector) : target;
  if (!element2 || element2 && element2.className.indexOf("e-ripple") === -1) {
    return;
  }
  var rippleElements = selectAll2(".e-ripple-element", element2);
  var rippleElement = rippleElements[rippleElements.length - 1];
  if (rippleElement) {
    rippleElement.style.opacity = "0.5";
  }
  if (eventArgs.parent !== element2) {
    EventHandler2.remove(element2, "mouseleave", rippleLeaveHandler);
  }
  setTimeout(function() {
    if (rippleElement && rippleElement.parentNode) {
      rippleElement.parentNode.removeChild(rippleElement);
    }
    if (!element2.getElementsByClassName("e-ripple-element").length) {
      element2.classList.remove("e-ripple");
    }
    if (eventArgs.done) {
      eventArgs.done(e);
    }
  }, duration);
}
var isRippleEnabled = false;
var animationMode2;
var GlobalAnimationMode2;
(function(GlobalAnimationMode4) {
  GlobalAnimationMode4["Default"] = "Default";
  GlobalAnimationMode4["Enable"] = "Enable";
  GlobalAnimationMode4["Disable"] = "Disable";
})(GlobalAnimationMode2 || (GlobalAnimationMode2 = {}));

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/module-loader.js
var MODULE_SUFFIX2 = "Module";
var ModuleLoader2 = (
  /** @class */
  function() {
    function ModuleLoader4(parent) {
      this.loadedModules = [];
      this.parent = parent;
    }
    ModuleLoader4.prototype.inject = function(requiredModules, moduleList) {
      var reqLength = requiredModules.length;
      if (reqLength === 0) {
        this.clean();
        return;
      }
      if (this.loadedModules.length) {
        this.clearUnusedModule(requiredModules);
      }
      for (var i = 0; i < reqLength; i++) {
        var modl = requiredModules[parseInt(i.toString(), 10)];
        for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
          var module = moduleList_1[_i];
          var modName = modl.member;
          if (module && module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
            var moduleObject = createInstance2(module, modl.args);
            var memberName = this.getMemberName(modName);
            if (modl.isProperty) {
              setValue3(memberName, module, this.parent);
            } else {
              setValue3(memberName, moduleObject, this.parent);
            }
            var loadedModule = modl;
            loadedModule.member = memberName;
            this.loadedModules.push(loadedModule);
          }
        }
      }
    };
    ModuleLoader4.prototype.clean = function() {
      for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
        var modules = _a[_i];
        if (!modules.isProperty) {
          getValue2(modules.member, this.parent).destroy();
        }
      }
      this.loadedModules = [];
    };
    ModuleLoader4.prototype.getNonInjectedModules = function(requiredModules) {
      var _this = this;
      return requiredModules.filter(function(module) {
        return !_this.isModuleLoaded(module.member);
      });
    };
    ModuleLoader4.prototype.clearUnusedModule = function(moduleList) {
      var _this = this;
      var usedModules = moduleList.map(function(arg) {
        return _this.getMemberName(arg.member);
      });
      var removableModule = this.loadedModules.filter(function(module) {
        return usedModules.indexOf(module.member) === -1;
      });
      for (var _i = 0, removableModule_1 = removableModule; _i < removableModule_1.length; _i++) {
        var mod = removableModule_1[_i];
        if (!mod.isProperty) {
          getValue2(mod.member, this.parent).destroy();
        }
        this.loadedModules.splice(this.loadedModules.indexOf(mod), 1);
        deleteObject2(this.parent, mod.member);
      }
    };
    ModuleLoader4.prototype.getMemberName = function(name) {
      return name[0].toLowerCase() + name.substring(1) + MODULE_SUFFIX2;
    };
    ModuleLoader4.prototype.isModuleLoaded = function(modName) {
      for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
        var mod = _a[_i];
        if (mod.member === this.getMemberName(modName)) {
          return true;
        }
      }
      return false;
    };
    return ModuleLoader4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/child-property.js
var ChildProperty2 = (
  /** @class */
  function() {
    function ChildProperty4(parent, propName, defaultValue, isArray) {
      this.isComplexArraySetter = false;
      this.properties = {};
      this.changedProperties = {};
      this.childChangedProperties = {};
      this.oldProperties = {};
      this.finalUpdate = function() {
      };
      this.callChildDataBind = getValue2("callChildDataBind", Base2);
      this.parentObj = parent;
      this.controlParent = this.parentObj.controlParent || this.parentObj;
      this.propName = propName;
      this.isParentArray = isArray;
      this.setProperties(defaultValue, true);
    }
    ChildProperty4.prototype.updateChange = function(val, propName) {
      if (val === true) {
        this.parentObj.childChangedProperties["" + propName] = val;
      } else {
        delete this.parentObj.childChangedProperties["" + propName];
      }
      if (this.parentObj.updateChange) {
        this.parentObj.updateChange(val, this.parentObj.propName);
      }
    };
    ChildProperty4.prototype.updateTimeOut = function() {
      if (this.parentObj.updateTimeOut) {
        this.parentObj.finalUpdate();
        this.parentObj.updateTimeOut();
      } else {
        var changeTime_1 = setTimeout(this.parentObj.dataBind.bind(this.parentObj));
        var clearUpdate = function() {
          clearTimeout(changeTime_1);
        };
        this.finalUpdate = clearUpdate;
      }
    };
    ChildProperty4.prototype.clearChanges = function() {
      this.finalUpdate();
      this.updateChange(false, this.propName);
      this.oldProperties = {};
      this.changedProperties = {};
    };
    ChildProperty4.prototype.setProperties = function(prop, muteOnChange) {
      if (muteOnChange === true) {
        merge2(this, prop);
        this.updateChange(false, this.propName);
        this.clearChanges();
      } else {
        merge2(this, prop);
      }
    };
    ChildProperty4.prototype.dataBind = function() {
      this.callChildDataBind(this.childChangedProperties, this);
      if (this.isParentArray) {
        var curIndex = this.parentObj[this.propName].indexOf(this);
        if (Object.keys(this.changedProperties).length) {
          setValue3(this.propName + "." + curIndex, this.changedProperties, this.parentObj.changedProperties);
          setValue3(this.propName + "." + curIndex, this.oldProperties, this.parentObj.oldProperties);
        }
      } else {
        this.parentObj.changedProperties[this.propName] = this.changedProperties;
        this.parentObj.oldProperties[this.propName] = this.oldProperties;
      }
      this.clearChanges();
    };
    ChildProperty4.prototype.saveChanges = function(key, newValue, oldValue, restrictServerDataBind) {
      if (this.controlParent.isProtectedOnChange) {
        return;
      }
      if (!restrictServerDataBind) {
        this.serverDataBind(key, newValue, true);
      }
      this.oldProperties["" + key] = oldValue;
      this.changedProperties["" + key] = newValue;
      this.updateChange(true, this.propName);
      this.finalUpdate();
      this.updateTimeOut();
    };
    ChildProperty4.prototype.serverDataBind = function(key, value, isSaveChanges, action) {
      if (isBlazor2() && !this.parentObj.isComplexArraySetter) {
        var parent_1;
        var newChanges = {};
        var parentKey = isSaveChanges ? this.getParentKey(true) + "." + key : key;
        if (parentKey.indexOf(".") !== -1) {
          var complexKeys = parentKey.split(".");
          parent_1 = newChanges;
          for (var i = 0; i < complexKeys.length; i++) {
            var isFinal = i === complexKeys.length - 1;
            parent_1[complexKeys[parseInt(i.toString(), 10)]] = isFinal ? value : {};
            parent_1 = isFinal ? parent_1 : parent_1[complexKeys[parseInt(i.toString(), 10)]];
          }
        } else {
          newChanges["" + parentKey] = {};
          parent_1 = newChanges["" + parentKey];
          newChanges["" + parentKey]["" + key] = value;
        }
        if (this.isParentArray) {
          var actionProperty = "ejsAction";
          parent_1["" + actionProperty] = action ? action : "none";
        }
        this.controlParent.serverDataBind(newChanges);
      }
    };
    ChildProperty4.prototype.getParentKey = function(isSaveChanges) {
      var index = "";
      var propName = this.propName;
      if (this.isParentArray) {
        index = this.parentObj[this.propName].indexOf(this);
        var valueLength = this.parentObj[this.propName].length;
        valueLength = isSaveChanges ? valueLength : valueLength > 0 ? valueLength - 1 : 0;
        index = index !== -1 ? "-" + index : "-" + valueLength;
        propName = propName + index;
      }
      if (this.controlParent !== this.parentObj) {
        propName = this.parentObj.getParentKey() + "." + this.propName + index;
      }
      return propName;
    };
    return ChildProperty4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/hijri-parser.js
var HijriParser2;
(function(HijriParser4) {
  var dateCorrection = [28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348, 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939, 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530, 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120, 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711, 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302, 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893, 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483, 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074, 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665, 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254, 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845, 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436, 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027, 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617, 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208, 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798, 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389, 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980, 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570, 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161, 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751, 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342, 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932, 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523, 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114, 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704, 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295, 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885, 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476, 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066, 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657, 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248, 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838, 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429, 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019, 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611, 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200, 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792, 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383, 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973, 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564, 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154, 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745, 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335, 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926, 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517, 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107, 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698, 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288, 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879, 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469, 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061, 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651, 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242, 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832, 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423, 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014, 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603, 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195, 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785, 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376, 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967, 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557, 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68e3, 68030, 68060, 68089, 68119, 68148, 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738, 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330, 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919, 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510, 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101, 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691, 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282, 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872, 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464, 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053, 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645, 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235, 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826, 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416, 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007, 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598, 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188, 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779, 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369, 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960, 79990];
  function getHijriDate(gDate) {
    var day = gDate.getDate();
    var month4 = gDate.getMonth();
    var year = gDate.getFullYear();
    var tMonth = month4 + 1;
    var tYear = year;
    if (tMonth < 3) {
      tYear -= 1;
      tMonth += 12;
    }
    var yPrefix = Math.floor(tYear / 100);
    var julilanOffset = yPrefix - Math.floor(yPrefix / 4) - 2;
    var julianNumber = Math.floor(365.25 * (tYear + 4716)) + Math.floor(30.6001 * (tMonth + 1)) + day - julilanOffset - 1524;
    yPrefix = Math.floor((julianNumber - 186721625e-2) / 36524.25);
    julilanOffset = yPrefix - Math.floor(yPrefix / 4) + 1;
    var b = julianNumber + julilanOffset + 1524;
    var c = Math.floor((b - 122.1) / 365.25);
    var d = Math.floor(365.25 * c);
    var tempMonth = Math.floor((b - d) / 30.6001);
    day = b - d - Math.floor(30.6001 * tempMonth);
    month4 = Math.floor((b - d) / 20.6001);
    if (month4 > 13) {
      c += 1;
      month4 -= 12;
    }
    month4 -= 1;
    year = c - 4716;
    var modifiedJulianDate = julianNumber - 24e5;
    var iyear = 10631 / 30;
    var z = julianNumber - 1948084;
    var cyc = Math.floor(z / 10631);
    z = z - 10631 * cyc;
    var j = Math.floor((z - 0.1335) / iyear);
    var iy = 30 * cyc + j;
    z = z - Math.floor(j * iyear + 0.1335);
    var im = Math.floor((z + 28.5001) / 29.5);
    if (im === 13) {
      im = 12;
    }
    var tempDay = z - Math.floor(29.5001 * im - 29);
    var i = 0;
    for (; i < dateCorrection.length; i++) {
      if (dateCorrection[parseInt(i.toString(), 10)] > modifiedJulianDate) {
        break;
      }
    }
    var iln = i + 16260;
    var ii = Math.floor((iln - 1) / 12);
    var hYear = ii + 1;
    var hmonth = iln - 12 * ii;
    var hDate = modifiedJulianDate - dateCorrection[i - 1] + 1;
    if ((hDate + "").length > 2) {
      hDate = tempDay;
      hmonth = im;
      hYear = iy;
    }
    return {
      year: hYear,
      month: hmonth,
      date: hDate
    };
  }
  HijriParser4.getHijriDate = getHijriDate;
  function toGregorian(year, month4, day) {
    var iy = year;
    var im = month4;
    var id = day;
    var ii = iy - 1;
    var iln = ii * 12 + 1 + (im - 1);
    var i = iln - 16260;
    var mcjdn = id + dateCorrection[i - 1] - 1;
    var julianDate = mcjdn + 24e5;
    var z = Math.floor(julianDate + 0.5);
    var a = Math.floor((z - 186721625e-2) / 36524.25);
    a = z + 1 + a - Math.floor(a / 4);
    var b = a + 1524;
    var c = Math.floor((b - 122.1) / 365.25);
    var d = Math.floor(365.25 * c);
    var e = Math.floor((b - d) / 30.6001);
    var gDay = b - d - Math.floor(e * 30.6001);
    var gMonth = e - (e > 13.5 ? 13 : 1);
    var gYear = c - (gMonth > 2.5 ? 4716 : 4715);
    if (gYear <= 0) {
      gMonth--;
    }
    return /* @__PURE__ */ new Date(gYear + "/" + gMonth + "/" + gDay);
  }
  HijriParser4.toGregorian = toGregorian;
})(HijriParser2 || (HijriParser2 = {}));

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js
var abbreviateRegexGlobal2 = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
var standalone3 = "stand-alone";
var weekdayKey2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
var timeSetter3 = {
  m: "getMinutes",
  h: "getHours",
  H: "getHours",
  s: "getSeconds",
  d: "getDate",
  f: "getMilliseconds"
};
var datePartMatcher2 = {
  "M": "month",
  "d": "day",
  "E": "weekday",
  "c": "weekday",
  "y": "year",
  "m": "minute",
  "h": "hour",
  "H": "hour",
  "s": "second",
  "L": "month",
  "a": "designator",
  "z": "timeZone",
  "Z": "timeZone",
  "G": "era",
  "f": "milliseconds"
};
var timeSeparator2 = "timeSeparator";
var DateFormat4 = (
  /** @class */
  function() {
    function DateFormat7() {
    }
    DateFormat7.dateFormat = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase2.getDependables(cldr, culture, option.calendar);
      var numObject = getValue2("parserObject.numbers", dependable);
      var dateObject = dependable.dateObject;
      var formatOptions = {
        isIslamic: IntlBase2.islamicRegex.test(option.calendar)
      };
      if (isBlazor2() && option.isServerRendered) {
        option = IntlBase2.compareBlazorDateFormats(option, culture);
      }
      var resPattern = option.format || IntlBase2.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor2() ? culture : "");
      formatOptions.dateSeperator = isBlazor2() ? getValue2("dateSeperator", dateObject) : IntlBase2.getDateSeparator(dependable.dateObject);
      if (isUndefined2(resPattern)) {
        throwError2("Format options or type given must be invalid");
      } else {
        resPattern = IntlBase2.ConvertDateToWeekFormat(resPattern);
        if (isBlazor2()) {
          resPattern = resPattern.replace(/tt/, "a");
        }
        formatOptions.pattern = resPattern;
        formatOptions.numMapper = isBlazor2() ? extend2({}, numObject) : ParserBase2.getNumberMapper(dependable.parserObject, ParserBase2.getNumberingSystem(cldr));
        var patternMatch = resPattern.match(abbreviateRegexGlobal2) || [];
        for (var _i = 0, patternMatch_1 = patternMatch; _i < patternMatch_1.length; _i++) {
          var str = patternMatch_1[_i];
          var len = str.length;
          var char = str[0];
          if (char === "K") {
            char = "h";
          }
          switch (char) {
            case "E":
            case "c":
              if (isBlazor2()) {
                formatOptions.weekday = getValue2("days." + IntlBase2.monthIndex["" + len], dateObject);
              } else {
                formatOptions.weekday = dependable.dateObject["" + IntlBase2.days]["" + standalone3][IntlBase2.monthIndex["" + len]];
              }
              break;
            case "M":
            case "L":
              if (isBlazor2()) {
                formatOptions.month = getValue2("months." + IntlBase2.monthIndex["" + len], dateObject);
              } else {
                formatOptions.month = dependable.dateObject["" + IntlBase2.month]["" + standalone3][IntlBase2.monthIndex["" + len]];
              }
              break;
            case "a":
              formatOptions.designator = isBlazor2() ? getValue2("dayPeriods", dateObject) : getValue2("dayPeriods.format.wide", dateObject);
              break;
            case "G": {
              var eText = len <= 3 ? "eraAbbr" : len === 4 ? "eraNames" : "eraNarrow";
              formatOptions.era = isBlazor2() ? getValue2("eras", dateObject) : getValue2("eras." + eText, dependable.dateObject);
              break;
            }
            case "z":
              formatOptions.timeZone = getValue2("dates.timeZoneNames", dependable.parserObject);
              break;
          }
        }
      }
      return function(value) {
        if (isNaN(value.getDate())) {
          return null;
        }
        return _this.intDateFormatter(value, formatOptions);
      };
    };
    DateFormat7.intDateFormatter = function(value, options) {
      var pattern = options.pattern;
      var ret = "";
      var matches5 = pattern.match(IntlBase2.dateParseRegex);
      var dObject = this.getCurrentDateValue(value, options.isIslamic);
      for (var _i = 0, matches_1 = matches5; _i < matches_1.length; _i++) {
        var match = matches_1[_i];
        var length_1 = match.length;
        var char = match[0];
        if (char === "K") {
          char = "h";
        }
        var curval = void 0;
        var curvalstr = "";
        var isNumber = void 0;
        var processNumber = void 0;
        var curstr = "";
        switch (char) {
          case "M":
          case "L":
            curval = dObject.month;
            if (length_1 > 2) {
              ret += options.month["" + curval];
            } else {
              isNumber = true;
            }
            break;
          case "E":
          case "c":
            ret += options.weekday["" + weekdayKey2[value.getDay()]];
            break;
          case "H":
          case "h":
          case "m":
          case "s":
          case "d":
          case "f":
            isNumber = true;
            if (char === "d") {
              curval = dObject.date;
            } else if (char === "f") {
              isNumber = false;
              processNumber = true;
              curvalstr = value["" + timeSetter3["" + char]]().toString();
              curvalstr = curvalstr.substring(0, length_1);
              var curlength = curvalstr.length;
              if (length_1 !== curlength) {
                if (length_1 > 3) {
                  continue;
                }
                for (var i = 0; i < length_1 - curlength; i++) {
                  curvalstr = "0" + curvalstr.toString();
                }
              }
              curstr += curvalstr;
            } else {
              curval = value["" + timeSetter3["" + char]]();
            }
            if (char === "h") {
              curval = curval % 12 || 12;
            }
            break;
          case "y":
            processNumber = true;
            curstr += dObject.year;
            if (length_1 === 2) {
              curstr = curstr.substr(curstr.length - 2);
            }
            break;
          case "a": {
            var desig = value.getHours() < 12 ? "am" : "pm";
            ret += options.designator["" + desig];
            break;
          }
          case "G": {
            var dec = value.getFullYear() < 0 ? 0 : 1;
            var retu = options.era["" + dec];
            if (isNullOrUndefined2(retu)) {
              retu = options.era[dec ? 0 : 1];
            }
            ret += retu || "";
            break;
          }
          case "'":
            ret += match === "''" ? "'" : match.replace(/'/g, "");
            break;
          case "z": {
            var timezone = value.getTimezoneOffset();
            var pattern_1 = length_1 < 4 ? "+H;-H" : options.timeZone.hourFormat;
            pattern_1 = pattern_1.replace(/:/g, options.numMapper.timeSeparator);
            if (timezone === 0) {
              ret += options.timeZone.gmtZeroFormat;
            } else {
              processNumber = true;
              curstr = this.getTimeZoneValue(timezone, pattern_1);
            }
            curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
            break;
          }
          case ":":
            ret += options.numMapper.numberSymbols["" + timeSeparator2];
            break;
          case "/":
            ret += options.dateSeperator;
            break;
          case "W":
            isNumber = true;
            curval = IntlBase2.getWeekOfYear(value);
            break;
          default:
            ret += match;
        }
        if (isNumber) {
          processNumber = true;
          curstr = this.checkTwodigitNumber(curval, length_1);
        }
        if (processNumber) {
          ret += ParserBase2.convertValueParts(curstr, IntlBase2.latnParseRegex, options.numMapper.mapper);
        }
      }
      return ret;
    };
    DateFormat7.getCurrentDateValue = function(value, isIslamic) {
      if (isIslamic) {
        return HijriParser2.getHijriDate(value);
      }
      return {
        year: value.getFullYear(),
        month: value.getMonth() + 1,
        date: value.getDate()
      };
    };
    DateFormat7.checkTwodigitNumber = function(val, len) {
      var ret = val + "";
      if (len === 2 && ret.length !== 2) {
        return "0" + ret;
      }
      return ret;
    };
    DateFormat7.getTimeZoneValue = function(tVal, pattern) {
      var _this = this;
      var splt = pattern.split(";");
      var curPattern = splt[tVal > 0 ? 1 : 0];
      var no = Math.abs(tVal);
      return curPattern = curPattern.replace(/HH?|mm/g, function(str) {
        var len = str.length;
        var ishour = str.indexOf("H") !== -1;
        return _this.checkTwodigitNumber(Math.floor(ishour ? no / 60 : no % 60), len);
      });
    };
    return DateFormat7;
  }()
);
setDateFormat2(DateFormat4);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js
var errorText2 = {
  "ms": "minimumSignificantDigits",
  "ls": "maximumSignificantDigits",
  "mf": "minimumFractionDigits",
  "lf": "maximumFractionDigits"
};
var percentSign2 = "percentSign";
var minusSign2 = "minusSign";
var mapper2 = ["infinity", "nan", "group", "decimal", "exponential"];
var NumberFormat4 = (
  /** @class */
  function() {
    function NumberFormat7() {
    }
    NumberFormat7.numberFormatter = function(culture, option, cldr) {
      var _this = this;
      var fOptions = extend2({}, option);
      var cOptions = {};
      var dOptions = {};
      var symbolPattern;
      var dependable = IntlBase2.getDependables(cldr, culture, "", true);
      var numObject = dependable.numericObject;
      dOptions.numberMapper = isBlazor2() ? extend2({}, numObject) : ParserBase2.getNumberMapper(dependable.parserObject, ParserBase2.getNumberingSystem(cldr), true);
      dOptions.currencySymbol = isBlazor2() ? getValue2("currencySymbol", numObject) : IntlBase2.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode2, option.altSymbol, option.ignoreCurrency);
      dOptions.percentSymbol = isBlazor2() ? getValue2("numberSymbols.percentSign", numObject) : dOptions.numberMapper.numberSymbols["" + percentSign2];
      dOptions.minusSymbol = isBlazor2() ? getValue2("numberSymbols.minusSign", numObject) : dOptions.numberMapper.numberSymbols["" + minusSign2];
      var symbols = dOptions.numberMapper.numberSymbols;
      if (option.format && !IntlBase2.formatRegex.test(option.format)) {
        cOptions = IntlBase2.customFormat(option.format, dOptions, dependable.numericObject);
        if (!isUndefined2(fOptions.useGrouping) && fOptions.useGrouping) {
          fOptions.useGrouping = cOptions.pData.useGrouping;
        }
      } else {
        extend2(fOptions, IntlBase2.getProperNumericSkeleton(option.format || "N"));
        fOptions.isCurrency = fOptions.type === "currency";
        fOptions.isPercent = fOptions.type === "percent";
        if (!isBlazor2()) {
          symbolPattern = IntlBase2.getSymbolPattern(fOptions.type, dOptions.numberMapper.numberSystem, dependable.numericObject, fOptions.isAccount);
        }
        fOptions.groupOne = this.checkValueRange(fOptions.maximumSignificantDigits, fOptions.minimumSignificantDigits, true);
        this.checkValueRange(fOptions.maximumFractionDigits, fOptions.minimumFractionDigits, false, true);
        if (!isUndefined2(fOptions.fractionDigits)) {
          fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits;
        }
        if (isUndefined2(fOptions.useGrouping)) {
          fOptions.useGrouping = true;
        }
        if (fOptions.isCurrency && !isBlazor2()) {
          symbolPattern = symbolPattern.replace(/\u00A4/g, IntlBase2.defaultCurrency);
        }
        if (!isBlazor2()) {
          var split = symbolPattern.split(";");
          cOptions.nData = IntlBase2.getFormatData(split[1] || "-" + split[0], true, dOptions.currencySymbol);
          cOptions.pData = IntlBase2.getFormatData(split[0], false, dOptions.currencySymbol);
          if (fOptions.useGrouping) {
            fOptions.groupSeparator = symbols[mapper2[2]];
            fOptions.groupData = this.getGroupingDetails(split[0]);
          }
        } else {
          cOptions.nData = extend2({}, {}, getValue2(fOptions.type + "nData", numObject));
          cOptions.pData = extend2({}, {}, getValue2(fOptions.type + "pData", numObject));
          if (fOptions.type === "currency" && option.currency) {
            IntlBase2.replaceBlazorCurrency([cOptions.pData, cOptions.nData], dOptions.currencySymbol, option.currency);
          }
        }
        var minFrac = isUndefined2(fOptions.minimumFractionDigits);
        if (minFrac) {
          fOptions.minimumFractionDigits = cOptions.nData.minimumFraction;
        }
        if (isUndefined2(fOptions.maximumFractionDigits)) {
          var mval = cOptions.nData.maximumFraction;
          fOptions.maximumFractionDigits = isUndefined2(mval) && fOptions.isPercent ? 0 : mval;
        }
        var mfrac = fOptions.minimumFractionDigits;
        var lfrac = fOptions.maximumFractionDigits;
        if (!isUndefined2(mfrac) && !isUndefined2(lfrac)) {
          if (mfrac > lfrac) {
            fOptions.maximumFractionDigits = mfrac;
          }
        }
      }
      extend2(cOptions.nData, fOptions);
      extend2(cOptions.pData, fOptions);
      return function(value) {
        if (isNaN(value)) {
          return symbols[mapper2[1]];
        } else if (!isFinite(value)) {
          return symbols[mapper2[0]];
        }
        return _this.intNumberFormatter(value, cOptions, dOptions, option);
      };
    };
    NumberFormat7.getGroupingDetails = function(pattern) {
      var ret = {};
      var match = pattern.match(IntlBase2.negativeDataRegex);
      if (match && match[4]) {
        var pattern_1 = match[4];
        var p = pattern_1.lastIndexOf(",");
        if (p !== -1) {
          var temp = pattern_1.split(".")[0];
          ret.primary = temp.length - p - 1;
          var s = pattern_1.lastIndexOf(",", p - 1);
          if (s !== -1) {
            ret.secondary = p - 1 - s;
          }
        }
      }
      return ret;
    };
    NumberFormat7.checkValueRange = function(val1, val2, checkbothExist, isFraction) {
      var decide = isFraction ? "f" : "s";
      var dint = 0;
      var str1 = errorText2["l" + decide];
      var str2 = errorText2["m" + decide];
      if (!isUndefined2(val1)) {
        this.checkRange(val1, str1, isFraction);
        dint++;
      }
      if (!isUndefined2(val2)) {
        this.checkRange(val2, str2, isFraction);
        dint++;
      }
      if (dint === 2) {
        if (val1 < val2) {
          throwError2(str2 + "specified must be less than the" + str1);
        } else {
          return true;
        }
      } else if (checkbothExist && dint === 1) {
        throwError2("Both" + str2 + "and" + str2 + "must be present");
      }
      return false;
    };
    NumberFormat7.checkRange = function(val, text, isFraction) {
      var range = isFraction ? [0, 20] : [1, 21];
      if (val < range[0] || val > range[1]) {
        throwError2(text + "value must be within the range" + range[0] + "to" + range[1]);
      }
    };
    NumberFormat7.intNumberFormatter = function(value, fOptions, dOptions, option) {
      var curData;
      if (isUndefined2(fOptions.nData.type)) {
        return void 0;
      } else {
        if (value < 0) {
          value = value * -1;
          curData = fOptions.nData;
        } else if (value === 0) {
          curData = fOptions.zeroData || fOptions.pData;
        } else {
          curData = fOptions.pData;
        }
        var fValue = "";
        if (curData.isPercent) {
          value = value * 100;
        }
        if (curData.groupOne) {
          fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits);
        } else {
          fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits, option);
          if (curData.minimumIntegerDigits) {
            fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);
          }
          if (dOptions.isCustomFormat && curData.minimumFractionDigits < curData.maximumFractionDigits && /\d+\.\d+/.test(fValue)) {
            var temp = fValue.split(".");
            var decimalPart = temp[1];
            var len = decimalPart.length;
            for (var i = len - 1; i >= 0; i--) {
              if (decimalPart[parseInt(i.toString(), 10)] === "0" && i >= curData.minimumFractionDigits) {
                decimalPart = decimalPart.slice(0, i);
              } else {
                break;
              }
            }
            fValue = temp[0] + "." + decimalPart;
          }
        }
        if (curData.type === "scientific") {
          fValue = value.toExponential(curData.maximumFractionDigits);
          fValue = fValue.replace("e", dOptions.numberMapper.numberSymbols[mapper2[4]]);
        }
        fValue = fValue.replace(".", dOptions.numberMapper.numberSymbols[mapper2[3]]);
        fValue = curData.format === "#,###,,;(#,###,,)" ? this.customPivotFormat(parseInt(fValue, 10)) : fValue;
        if (curData.useGrouping) {
          fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ",", dOptions.numberMapper.numberSymbols[mapper2[3]] || ".", curData.groupData.secondary);
        }
        fValue = ParserBase2.convertValueParts(fValue, IntlBase2.latnParseRegex, dOptions.numberMapper.mapper);
        if (curData.nlead === "N/A") {
          return curData.nlead;
        } else {
          if (fValue === "0" && option && option.format === "0") {
            return fValue + curData.nend;
          }
          return curData.nlead + fValue + curData.nend;
        }
      }
    };
    NumberFormat7.processSignificantDigits = function(value, min, max) {
      var temp = value + "";
      var tn;
      var length = temp.length;
      if (length < min) {
        return value.toPrecision(min);
      } else {
        temp = value.toPrecision(max);
        tn = +temp;
        return tn + "";
      }
    };
    NumberFormat7.groupNumbers = function(val, level1, sep, decimalSymbol, level2) {
      var flag = !isNullOrUndefined2(level2) && level2 !== 0;
      var split = val.split(decimalSymbol);
      var prefix = split[0];
      var length = prefix.length;
      var str = "";
      while (length > level1) {
        str = prefix.slice(length - level1, length) + (str.length ? sep + str : "");
        length -= level1;
        if (flag) {
          level1 = level2;
          flag = false;
        }
      }
      split[0] = prefix.slice(0, length) + (str.length ? sep : "") + str;
      return split.join(decimalSymbol);
    };
    NumberFormat7.processFraction = function(value, min, max, option) {
      var temp = (value + "").split(".")[1];
      var length = temp ? temp.length : 0;
      if (min && length < min) {
        var ret = "";
        if (length === 0) {
          ret = value.toFixed(min);
        } else {
          ret += value;
          for (var j = 0; j < min - length; j++) {
            ret += "0";
          }
          return ret;
        }
        return value.toFixed(min);
      } else if (!isNullOrUndefined2(max) && (length > max || max === 0)) {
        return value.toFixed(max);
      }
      var str = value + "";
      if (str[0] === "0" && option && option.format === "###.00") {
        str = str.slice(1);
      }
      return str;
    };
    NumberFormat7.processMinimumIntegers = function(value, min) {
      var temp = value.split(".");
      var lead = temp[0];
      var len = lead.length;
      if (len < min) {
        for (var i = 0; i < min - len; i++) {
          lead = "0" + lead;
        }
        temp[0] = lead;
      }
      return temp.join(".");
    };
    NumberFormat7.customPivotFormat = function(value) {
      if (value >= 5e5) {
        value /= 1e6;
        var _a = value.toString().split("."), integer = _a[0], decimal = _a[1];
        return decimal && +decimal.substring(0, 1) >= 5 ? Math.ceil(value).toString() : Math.floor(value).toString();
      }
      return "";
    };
    return NumberFormat7;
  }()
);
setNumberFormat2(NumberFormat4);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/intl/date-parser.js
var standalone4 = "stand-alone";
var latnRegex2 = /^[0-9]*$/;
var timeSetter4 = {
  minute: "setMinutes",
  hour: "setHours",
  second: "setSeconds",
  day: "setDate",
  month: "setMonth",
  milliseconds: "setMilliseconds"
};
var month2 = "months";
var DateParser2 = (
  /** @class */
  function() {
    function DateParser4() {
    }
    DateParser4.dateParser = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase2.getDependables(cldr, culture, option.calendar);
      var numOptions = ParserBase2.getCurrentNumericOptions(dependable.parserObject, ParserBase2.getNumberingSystem(cldr), false, isBlazor2());
      var parseOptions = {};
      if (isBlazor2() && option.isServerRendered) {
        option = IntlBase2.compareBlazorDateFormats(option, culture);
      }
      var resPattern = option.format || IntlBase2.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor2() ? culture : "");
      var regexString = "";
      var hourOnly;
      if (isUndefined2(resPattern)) {
        throwError2("Format options or type given must be invalid");
      } else {
        resPattern = IntlBase2.ConvertDateToWeekFormat(resPattern);
        parseOptions = {
          isIslamic: IntlBase2.islamicRegex.test(option.calendar),
          pattern: resPattern,
          evalposition: {},
          culture
        };
        var patternMatch = resPattern.match(IntlBase2.dateParseRegex) || [];
        var length_1 = patternMatch.length;
        var gmtCorrection = 0;
        var zCorrectTemp = 0;
        var isgmtTraversed = false;
        var nRegx = numOptions.numericRegex;
        var numMapper = isBlazor2() ? dependable.parserObject.numbers : ParserBase2.getNumberMapper(dependable.parserObject, ParserBase2.getNumberingSystem(cldr));
        for (var i = 0; i < length_1; i++) {
          var str = patternMatch[parseInt(i.toString(), 10)];
          var len = str.length;
          var char = str[0] === "K" ? "h" : str[0];
          var isNumber = void 0;
          var canUpdate = void 0;
          var charKey = datePartMatcher2["" + char];
          var optional = len === 2 ? "" : "?";
          if (isgmtTraversed) {
            gmtCorrection = zCorrectTemp;
            isgmtTraversed = false;
          }
          switch (char) {
            case "E":
            case "c": {
              var weekData = void 0;
              if (isBlazor2()) {
                weekData = getValue2("days." + IntlBase2.monthIndex["" + len], dependable.dateObject);
              } else {
                weekData = dependable.dateObject["" + IntlBase2.days]["" + standalone4][IntlBase2.monthIndex["" + len]];
              }
              var weekObject = ParserBase2.reverseObject(weekData);
              regexString += "(" + Object.keys(weekObject).join("|") + ")";
              break;
            }
            case "M":
            case "L":
            case "d":
            case "m":
            case "s":
            case "h":
            case "H":
            case "f":
              canUpdate = true;
              if ((char === "M" || char === "L") && len > 2) {
                var monthData = void 0;
                if (isBlazor2()) {
                  monthData = getValue2("months." + IntlBase2.monthIndex["" + len], dependable.dateObject);
                } else {
                  monthData = dependable.dateObject["" + month2]["" + standalone4][IntlBase2.monthIndex["" + len]];
                }
                parseOptions["" + charKey] = ParserBase2.reverseObject(monthData);
                regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + ")";
              } else if (char === "f") {
                if (len > 3) {
                  continue;
                }
                isNumber = true;
                regexString += "(" + nRegx + nRegx + "?" + nRegx + "?)";
              } else {
                isNumber = true;
                regexString += "(" + nRegx + nRegx + optional + ")";
              }
              if (char === "h") {
                parseOptions.hour12 = true;
              }
              break;
            case "W": {
              var opt = len === 1 ? "?" : "";
              regexString += "(" + nRegx + opt + nRegx + ")";
              break;
            }
            case "y":
              canUpdate = isNumber = true;
              if (len === 2) {
                regexString += "(" + nRegx + nRegx + ")";
              } else {
                regexString += "(" + nRegx + "{" + len + ",})";
              }
              break;
            case "a": {
              canUpdate = true;
              var periodValur = isBlazor2() ? getValue2("dayPeriods", dependable.dateObject) : getValue2("dayPeriods.format.wide", dependable.dateObject);
              parseOptions["" + charKey] = ParserBase2.reverseObject(periodValur);
              regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + ")";
              break;
            }
            case "G": {
              canUpdate = true;
              var eText = len <= 3 ? "eraAbbr" : len === 4 ? "eraNames" : "eraNarrow";
              parseOptions["" + charKey] = ParserBase2.reverseObject(isBlazor2() ? getValue2("eras", dependable.dateObject) : getValue2("eras." + eText, dependable.dateObject));
              regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + "?)";
              break;
            }
            case "z": {
              var tval = (/* @__PURE__ */ new Date()).getTimezoneOffset();
              canUpdate = tval !== 0;
              parseOptions["" + charKey] = getValue2("dates.timeZoneNames", dependable.parserObject);
              var tzone = parseOptions["" + charKey];
              hourOnly = len < 4;
              var hpattern = hourOnly ? "+H;-H" : tzone.hourFormat;
              hpattern = hpattern.replace(/:/g, numMapper.timeSeparator);
              regexString += "(" + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ")?";
              isgmtTraversed = true;
              zCorrectTemp = hourOnly ? 6 : 12;
              break;
            }
            case "'": {
              var iString = str.replace(/'/g, "");
              regexString += "(" + iString + ")?";
              break;
            }
            default:
              regexString += "([\\D])";
              break;
          }
          if (canUpdate) {
            parseOptions.evalposition["" + charKey] = {
              isNumber,
              pos: i + 1 + gmtCorrection,
              hourOnly
            };
          }
          if (i === length_1 - 1 && !isNullOrUndefined2(regexString)) {
            var regExp7 = RegExp;
            parseOptions.parserRegex = new regExp7("^" + regexString + "$", "i");
          }
        }
      }
      return function(value) {
        var parsedDateParts = _this.internalDateParse(value, parseOptions, numOptions);
        if (isNullOrUndefined2(parsedDateParts) || !Object.keys(parsedDateParts).length) {
          return null;
        }
        if (parseOptions.isIslamic) {
          var dobj = {};
          var tYear = parsedDateParts.year;
          var tDate = parsedDateParts.day;
          var tMonth = parsedDateParts.month;
          var ystrig = tYear ? tYear + "" : "";
          var is2DigitYear = ystrig.length === 2;
          if (!tYear || !tMonth || !tDate || is2DigitYear) {
            dobj = HijriParser2.getHijriDate(/* @__PURE__ */ new Date());
          }
          if (is2DigitYear) {
            tYear = parseInt((dobj.year + "").slice(0, 2) + ystrig, 10);
          }
          var dateObject = HijriParser2.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);
          parsedDateParts.year = dateObject.getFullYear();
          parsedDateParts.month = dateObject.getMonth() + 1;
          parsedDateParts.day = dateObject.getDate();
        }
        return _this.getDateObject(parsedDateParts);
      };
    };
    DateParser4.getDateObject = function(options, value) {
      var res = value || /* @__PURE__ */ new Date();
      res.setMilliseconds(0);
      var tKeys = ["hour", "minute", "second", "milliseconds", "month", "day"];
      var y = options.year;
      var desig = options.designator;
      var tzone = options.timeZone;
      if (!isUndefined2(y)) {
        var len = (y + "").length;
        if (len <= 2) {
          var century = Math.floor(res.getFullYear() / 100) * 100;
          y += century;
        }
        res.setFullYear(y);
      }
      for (var _i = 0, tKeys_1 = tKeys; _i < tKeys_1.length; _i++) {
        var key = tKeys_1[_i];
        var tValue = options["" + key];
        if (isUndefined2(tValue) && key === "day") {
          res.setDate(1);
        }
        if (!isUndefined2(tValue)) {
          if (key === "month") {
            tValue -= 1;
            if (tValue < 0 || tValue > 11) {
              return /* @__PURE__ */ new Date("invalid");
            }
            var pDate = res.getDate();
            res.setDate(1);
            res[timeSetter4["" + key]](tValue);
            var lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();
            res.setDate(pDate < lDate ? pDate : lDate);
          } else {
            if (key === "day") {
              var lastDay = new Date(res.getFullYear(), res.getMonth() + 1, 0).getDate();
              if (tValue < 1 || tValue > lastDay) {
                return null;
              }
            }
            res["" + timeSetter4["" + key]](tValue);
          }
        }
      }
      if (!isUndefined2(desig)) {
        var hour = res.getHours();
        if (desig === "pm") {
          res.setHours(hour + (hour === 12 ? 0 : 12));
        } else if (hour === 12) {
          res.setHours(0);
        }
      }
      if (!isUndefined2(tzone)) {
        var tzValue = tzone - res.getTimezoneOffset();
        if (tzValue !== 0) {
          res.setMinutes(res.getMinutes() + tzValue);
        }
      }
      return res;
    };
    DateParser4.internalDateParse = function(value, parseOptions, num) {
      var matches5 = value.match(parseOptions.parserRegex);
      var retOptions = {
        "hour": 0,
        "minute": 0,
        "second": 0
      };
      if (isNullOrUndefined2(matches5)) {
        return null;
      } else {
        var props = Object.keys(parseOptions.evalposition);
        for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
          var prop = props_1[_i];
          var curObject = parseOptions.evalposition["" + prop];
          var matchString = matches5[curObject.pos];
          if (curObject.isNumber) {
            retOptions["" + prop] = this.internalNumberParser(matchString, num);
          } else {
            if (prop === "timeZone" && !isUndefined2(matchString)) {
              var pos = curObject.pos;
              var val = void 0;
              var tmatch = matches5[pos + 1];
              var flag = !isUndefined2(tmatch);
              if (curObject.hourOnly) {
                val = this.getZoneValue(flag, tmatch, matches5[pos + 4], num) * 60;
              } else {
                val = this.getZoneValue(flag, tmatch, matches5[pos + 7], num) * 60;
                val += this.getZoneValue(flag, matches5[pos + 4], matches5[pos + 10], num);
              }
              if (!isNullOrUndefined2(val)) {
                retOptions["" + prop] = val;
              }
            } else {
              var cultureOptions = ["en-US", "en-MH", "en-MP"];
              matchString = prop === "month" && !parseOptions.isIslamic && (parseOptions.culture === "en" || parseOptions.culture === "en-GB" || parseOptions.culture === "en-US") ? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
              matchString = prop !== "month" && prop === "designator" && parseOptions.culture && parseOptions.culture.indexOf("en-") !== -1 && cultureOptions.indexOf(parseOptions.culture) === -1 ? matchString.toLowerCase() : matchString;
              retOptions["" + prop] = parseOptions["" + prop]["" + matchString];
            }
          }
        }
        if (parseOptions.hour12) {
          retOptions.hour12 = true;
        }
      }
      return retOptions;
    };
    DateParser4.internalNumberParser = function(value, option) {
      value = ParserBase2.convertValueParts(value, option.numberParseRegex, option.numericPair);
      if (latnRegex2.test(value)) {
        return +value;
      }
      return null;
    };
    DateParser4.parseTimeZoneRegx = function(hourFormat, tZone, nRegex) {
      var pattern = tZone.gmtFormat;
      var ret;
      var cRegex = "(" + nRegex + ")(" + nRegex + ")";
      ret = hourFormat.replace("+", "\\+");
      if (hourFormat.indexOf("HH") !== -1) {
        ret = ret.replace(/HH|mm/g, "(" + cRegex + ")");
      } else {
        ret = ret.replace(/H|m/g, "(" + cRegex + "?)");
      }
      var splitStr = ret.split(";").map(function(str) {
        return pattern.replace("{0}", str);
      });
      ret = splitStr.join("|") + "|" + tZone.gmtZeroFormat;
      return ret;
    };
    DateParser4.getZoneValue = function(flag, val1, val2, num) {
      var ival = flag ? val1 : val2;
      if (!ival) {
        return 0;
      }
      var value = this.internalNumberParser(ival, num);
      if (flag) {
        return -value;
      }
      return value;
    };
    return DateParser4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/intl/number-parser.js
var regExp4 = RegExp;
var parseRegex2 = new regExp4("^([^0-9]*)(([0-9,]*[0-9]+)(.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$");
var groupRegex2 = /,/g;
var keys2 = ["minusSign", "infinity"];
var NumberParser2 = (
  /** @class */
  function() {
    function NumberParser4() {
    }
    NumberParser4.numberParser = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase2.getDependables(cldr, culture, "", true);
      var parseOptions = {
        custom: true
      };
      if (IntlBase2.formatRegex.test(option.format) || !option.format) {
        extend2(parseOptions, IntlBase2.getProperNumericSkeleton(option.format || "N"));
        parseOptions.custom = false;
        if (!parseOptions.fractionDigits) {
          if (option.maximumFractionDigits) {
            parseOptions.maximumFractionDigits = option.maximumFractionDigits;
          }
        }
      } else {
        extend2(parseOptions, IntlBase2.customFormat(option.format, null, null));
      }
      var numbers = getValue2("numbers", dependable.parserObject);
      var numOptions = ParserBase2.getCurrentNumericOptions(dependable.parserObject, ParserBase2.getNumberingSystem(cldr), true, isBlazor2());
      parseOptions.symbolRegex = ParserBase2.getSymbolRegex(Object.keys(numOptions.symbolMatch));
      parseOptions.infinity = numOptions.symbolNumberSystem[keys2[1]];
      var symbolpattern;
      if (!isBlazor2()) {
        symbolpattern = IntlBase2.getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);
        if (symbolpattern) {
          symbolpattern = symbolpattern.replace(/\u00A4/g, IntlBase2.defaultCurrency);
          var split = symbolpattern.split(";");
          parseOptions.nData = IntlBase2.getFormatData(split[1] || "-" + split[0], true, "");
          parseOptions.pData = IntlBase2.getFormatData(split[0], true, "");
        }
      } else {
        parseOptions.nData = extend2({}, {}, getValue2(parseOptions.type + "nData", numbers));
        parseOptions.pData = extend2({}, {}, getValue2(parseOptions.type + "pData", numbers));
        if (parseOptions.type === "currency" && option.currency) {
          IntlBase2.replaceBlazorCurrency([parseOptions.pData, parseOptions.nData], getValue2("currencySymbol", numbers), option.currency);
        }
      }
      return function(value) {
        return _this.getParsedNumber(value, parseOptions, numOptions);
      };
    };
    NumberParser4.getParsedNumber = function(value, options, numOptions) {
      var isNegative;
      var isPercent;
      var tempValue;
      var lead;
      var end;
      var ret;
      if (value.indexOf(options.infinity) !== -1) {
        return Infinity;
      } else {
        value = ParserBase2.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
        value = ParserBase2.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);
        value = value.indexOf("-") !== -1 ? value.replace("-.", "-0.") : value;
        if (value.indexOf(".") === 0) {
          value = "0" + value;
        }
        var matches5 = value.match(parseRegex2);
        if (isNullOrUndefined2(matches5)) {
          return NaN;
        }
        lead = matches5[1];
        tempValue = matches5[2];
        var exponent = matches5[5];
        end = matches5[6];
        isNegative = options.custom ? lead === options.nData.nlead && end === options.nData.nend : lead.indexOf(options.nData.nlead) !== -1 && end.indexOf(options.nData.nend) !== -1;
        isPercent = isNegative ? options.nData.isPercent : options.pData.isPercent;
        tempValue = tempValue.replace(groupRegex2, "");
        if (exponent) {
          tempValue += exponent;
        }
        ret = +tempValue;
        if (options.type === "percent" || isPercent) {
          ret = ret / 100;
        }
        if (options.custom || options.fractionDigits) {
          ret = parseFloat(ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.fractionDigits));
        }
        if (options.maximumFractionDigits) {
          ret = this.convertMaxFracDigits(tempValue, options, ret, isNegative);
        }
        if (isNegative) {
          ret *= -1;
        }
        return ret;
      }
    };
    NumberParser4.convertMaxFracDigits = function(value, options, ret, isNegative) {
      var decimalSplitValue = value.split(".");
      if (decimalSplitValue[1] && decimalSplitValue[1].length > options.maximumFractionDigits) {
        ret = +ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.maximumFractionDigits);
      }
      return ret;
    };
    return NumberParser4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/internationalization.js
var onIntlChange2 = new Observer2();
var rightToLeft2 = false;
var cldrData2 = {};
var defaultCulture2 = "en-US";
var mapper3 = ["numericObject", "dateObject"];
var Internationalization2 = (
  /** @class */
  function() {
    function Internationalization4(cultureName) {
      if (cultureName) {
        this.culture = cultureName;
      }
    }
    Internationalization4.prototype.getDateFormat = function(options) {
      return DateFormat4.dateFormat(this.getCulture(), options || {
        type: "date",
        skeleton: "short"
      }, cldrData2);
    };
    Internationalization4.prototype.getNumberFormat = function(options) {
      if (options && !options.currency) {
        options.currency = defaultCurrencyCode2;
      }
      if (isBlazor2() && options && !options.format) {
        options.minimumFractionDigits = 0;
      }
      return NumberFormat4.numberFormatter(this.getCulture(), options || {}, cldrData2);
    };
    Internationalization4.prototype.getDateParser = function(options) {
      return DateParser2.dateParser(this.getCulture(), options || {
        skeleton: "short",
        type: "date"
      }, cldrData2);
    };
    Internationalization4.prototype.getNumberParser = function(options) {
      if (isBlazor2() && options && !options.format) {
        options.minimumFractionDigits = 0;
      }
      return NumberParser2.numberParser(this.getCulture(), options || {
        format: "N"
      }, cldrData2);
    };
    Internationalization4.prototype.formatNumber = function(value, option) {
      return this.getNumberFormat(option)(value);
    };
    Internationalization4.prototype.formatDate = function(value, option) {
      return this.getDateFormat(option)(value);
    };
    Internationalization4.prototype.parseDate = function(value, option) {
      return this.getDateParser(option)(value);
    };
    Internationalization4.prototype.parseNumber = function(value, option) {
      return this.getNumberParser(option)(value);
    };
    Internationalization4.prototype.getDatePattern = function(option, isExcelFormat) {
      return IntlBase2.getActualDateTimeFormat(this.getCulture(), option, cldrData2, isExcelFormat);
    };
    Internationalization4.prototype.getNumberPattern = function(option, isExcel) {
      return IntlBase2.getActualNumberFormat(this.getCulture(), option, cldrData2, isExcel);
    };
    Internationalization4.prototype.getFirstDayOfWeek = function() {
      return IntlBase2.getWeekData(this.getCulture(), cldrData2);
    };
    Internationalization4.prototype.getCulture = function() {
      return this.culture || defaultCulture2;
    };
    return Internationalization4;
  }()
);
function getNumericObject(locale, type) {
  var numObject = IntlBase2.getDependables(cldrData2, locale, "", true)[mapper3[0]];
  var dateObject = IntlBase2.getDependables(cldrData2, locale, "")[mapper3[1]];
  var numSystem = getValue2("defaultNumberingSystem", numObject);
  var symbPattern = isBlazor2() ? getValue2("numberSymbols", numObject) : getValue2("symbols-numberSystem-" + numSystem, numObject);
  var pattern = IntlBase2.getSymbolPattern(type || "decimal", numSystem, numObject, false);
  return extend2(symbPattern, IntlBase2.getFormatData(pattern, true, "", true), {
    "dateSeparator": IntlBase2.getDateSeparator(dateObject)
  });
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/validate-lic.js
var componentList2 = ["grid", "pivotview", "treegrid", "spreadsheet", "rangeNavigator", "DocumentEditor", "listbox", "inplaceeditor", "PdfViewer", "richtexteditor", "DashboardLayout", "chart", "stockChart", "circulargauge", "diagram", "heatmap", "lineargauge", "maps", "slider", "smithchart", "barcode", "sparkline", "treemap", "bulletChart", "kanban", "daterangepicker", "schedule", "gantt", "signature", "query-builder", "drop-down-tree", "carousel", "filemanager", "uploader", "accordion", "tab", "treeview"];
var bypassKey2 = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 105, 115, 76, 105, 99, 86, 97, 108, 105, 100, 97, 116, 101, 100];
var accountURL2;
var LicenseValidator2 = (
  /** @class */
  function() {
    function LicenseValidator4(key) {
      this.isValidated = false;
      this.isLicensed = true;
      this.version = "28";
      this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i;
      this.errors = {
        noLicense: "<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",
        trailExpired: "<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",
        versionMismatched: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",
        platformMismatched: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",
        invalidKey: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>"
      };
      this.manager = /* @__PURE__ */ function() {
        var licKey = null;
        function set(key2) {
          licKey = key2;
        }
        function get() {
          return licKey;
        }
        return {
          setKey: set,
          getKey: get
        };
      }();
      this.npxManager = /* @__PURE__ */ function() {
        var npxLicKey = "npxKeyReplace";
        function get() {
          return npxLicKey;
        }
        return {
          getKey: get
        };
      }();
      this.manager.setKey(key);
    }
    LicenseValidator4.prototype.validate = function() {
      var contentKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 108, 105, 99, 101, 110, 115, 101, 67, 111, 110, 116, 101, 110, 116];
      var URLKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 99, 108, 97, 105, 109, 65, 99, 99, 111, 117, 110, 116, 85, 82, 76];
      if (!this.isValidated && containerObject2 && !getValue2(convertToChar2(bypassKey2), containerObject2) && !getValue2("Blazor", containerObject2)) {
        var validateMsg = void 0;
        var validateURL = void 0;
        if (this.manager && this.manager.getKey() || this.npxManager && this.npxManager.getKey() !== "npxKeyReplace") {
          var result = this.getInfoFromKey();
          if (result && result.length) {
            for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
              var res = result_1[_i];
              if (!this.platform.test(res.platform) || res.invalidPlatform) {
                validateMsg = this.errors.platformMismatched;
              } else if (res.version.indexOf(this.version) === -1) {
                validateMsg = this.errors.versionMismatched;
                validateMsg = validateMsg.replace("##LicenseVersion", res.version);
                validateMsg = validateMsg.replace("##Requireversion", this.version + ".x");
              } else if (res.expiryDate) {
                var expDate = new Date(res.expiryDate);
                var currDate = /* @__PURE__ */ new Date();
                if (expDate !== currDate && expDate < currDate) {
                  validateMsg = this.errors.trailExpired;
                } else {
                  break;
                }
              }
            }
          } else {
            validateMsg = this.errors.invalidKey;
          }
        } else {
          var licenseContent = getValue2(convertToChar2(contentKey), containerObject2);
          validateURL = getValue2(convertToChar2(URLKey), containerObject2);
          if (licenseContent && licenseContent !== "") {
            validateMsg = licenseContent;
          } else {
            validateMsg = this.errors.noLicense;
          }
        }
        if (validateMsg && typeof document !== "undefined" && !isNullOrUndefined2(document)) {
          accountURL2 = validateURL && validateURL !== "" ? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=Mjg=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information";
          var errorDiv = createElement2("div", {
            innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
                    position: absolute;
                    left: 16px;
                    width: 24px;
                    height: 24px;"/>` + validateMsg + ' <a style="text-decoration: none;color: #0D6EFD;font-weight: 500;" href=' + accountURL2 + ">Claim your free account</a>"
          });
          errorDiv.setAttribute("style", "position: fixed;\n                top: 10px;\n                left: 10px;\n                right: 10px;\n                font-size: 14px;\n                background: #EEF2FF;\n                color: #222222;\n                z-index: 999999999;\n                text-align: left;\n                border: 1px solid #EEEEEE;\n                padding: 10px 11px 10px 50px;\n                border-radius: 8px;\n                font-family: Helvetica Neue, Helvetica, Arial;");
          document.body.appendChild(errorDiv);
          this.isLicensed = false;
        }
        this.isValidated = true;
        setValue3(convertToChar2(bypassKey2), this.isValidated, containerObject2);
      }
      return this.isLicensed;
    };
    LicenseValidator4.prototype.getDecryptedData = function(key) {
      try {
        return atob(key);
      } catch (error) {
        return "";
      }
    };
    LicenseValidator4.prototype.getInfoFromKey = function() {
      try {
        var licKey = "";
        var pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488, 6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888, 6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
        var decryptedStr = [];
        var resultArray = [];
        var invalidPlatform = false;
        var isNpxKey = false;
        if (this.manager.getKey()) {
          licKey = this.manager.getKey();
        } else {
          isNpxKey = true;
          licKey = this.npxManager.getKey().split("npxKeyReplace")[1];
        }
        var licKeySplit = licKey.split(";");
        for (var _i = 0, licKeySplit_1 = licKeySplit; _i < licKeySplit_1.length; _i++) {
          var lKey = licKeySplit_1[_i];
          var decodeStr = this.getDecryptedData(lKey);
          if (!decodeStr) {
            continue;
          }
          var k = 0;
          var buffr = "";
          if (!isNpxKey) {
            for (var i = 0; i < decodeStr.length; i++, k++) {
              if (k === pkey.length) {
                k = 0;
              }
              var c = decodeStr.charCodeAt(i);
              buffr += String.fromCharCode(c ^ pkey[parseInt(k.toString(), 10)] >> 16);
            }
          } else {
            var charKey = decodeStr[decodeStr.length - 1];
            var decryptedKey = [];
            for (var i = 0; i < decodeStr.length; i++) {
              decryptedKey[parseInt(i.toString(), 10)] = decodeStr[parseInt(i.toString(), 10)].charCodeAt(0) - charKey.charCodeAt(0);
            }
            for (var i = 0; i < decryptedKey.length; i++) {
              buffr += String.fromCharCode(decryptedKey[parseInt(i.toString(), 10)]);
            }
          }
          if (this.platform.test(buffr)) {
            decryptedStr = buffr.split(";");
            invalidPlatform = false;
            if (decryptedStr.length > 3) {
              resultArray.push({
                platform: decryptedStr[0],
                version: decryptedStr[1],
                expiryDate: decryptedStr[2]
              });
            }
          } else if (buffr && buffr.split(";").length > 3) {
            invalidPlatform = true;
          }
        }
        if (invalidPlatform && !resultArray.length) {
          return [{
            invalidPlatform
          }];
        } else {
          return resultArray.length ? resultArray : null;
        }
      } catch (error) {
        return null;
      }
    };
    return LicenseValidator4;
  }()
);
var licenseValidator2 = new LicenseValidator2();
function convertToChar2(cArr) {
  var ret = "";
  for (var _i = 0, cArr_1 = cArr; _i < cArr_1.length; _i++) {
    var arr = cArr_1[_i];
    ret += String.fromCharCode(arr);
  }
  return ret;
}
function registerLicense2(key) {
  licenseValidator2 = new LicenseValidator2(key);
}
var validateLicense2 = function(key) {
  if (key) {
    registerLicense2(key);
  }
  return licenseValidator2.validate();
};
var createLicenseOverlay2 = function() {
  var bannerTemplate = '\n    <div style="\n    position: fixed;\n    width: 100%;\n    height: 100%;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background-color: rgba(0, 0, 0, 0.5);\n    z-index: 99999;\n    ">\n        <div style="\n    background: #FFFFFF;\n    height: 455px;\n    width: 840px;\n    font-family: Helvetica Neue, Helvetica, Arial;\n    color: #000000;\n    box-shadow: 0px 4.8px 14.4px rgb(0 0 0 / 18%), 0px 25.6px 57.6px rgb(0 0 0 / 22%);\n    display: block;\n    margin: 8% auto;\n    border-radius: 20px;\n    ">\n            <div style="\n    position: absolute;\nwidth: 838px;\nheight: 62px;\nbackground-color: #F9F9F9;\nborder: 1px solid #EEEEEE;\nborder-top-left-radius: 20px;\nborder-top-right-radius: 20px;\n">\n                <img src="data:image/svg+xml;base64, " style="\n    text-align: left;\n    width: 146px;\n    position: absolute;\n    top: 14px;\n    left: 31px;\n">\n            </div>\n            <div style="\n    position: relative;\n    top: 80px;\n    left: 32px;\n    font-size: 20px;\n    text-align: left;\n    font-weight: 700;\n    letter-spacing: 0.02em;\n    font-style: normal;\n    line-height: 125%;\n    ">Claim your FREE account and get a key in less than a minute</div>\n            <ul style="\n        font-size: 15px;\n        font-weight: 400;\n        color: #333333;\n        letter-spacing: 0.01em;\n        position: relative;\n        left: 32px;\n        top: 88px;\n        line-height: 180%;\n        ">\n                <li><span>Access to a 30-day free trial of any of our products.</span></li>\n                <li><span>Access to 24x5 support by developers via the <a href="https://support.syncfusion.com/create?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">support tickets</a>, <a href="https://www.syncfusion.com/forums?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">forum</a>, <a href="https://www.syncfusion.com/feedback?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">feature &amp; feedback page</a> and chat.</span></li>\n                <li><span>200+ <a href="https://www.syncfusion.com/succinctly-free-ebooks?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">ebooks </a>on the latest technologies, industry trends, and research topics.</span>\n                </li>\n                <li><span>Largest collection of over 7,000 flat and wireframe icons for free with Syncfusion<sup>®</sup> <a href="https://www.syncfusion.com/downloads/metrostudio?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">Metro Studio.</a></span></li>\n                <li><span>Free and unlimited access to Syncfusion<sup>®</sup> technical <a href="https://www.syncfusion.com/blogs/?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">blogs</a> and <a href="https://www.syncfusion.com/resources/techportal/whitepapers?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">whitepapers.</a></span></li>\n            </ul>\n            <div style="\n            font-size: 18px;\n            font-weight: 700;\n            position: relative;\n            line-height: 125%;\n            letter-spacing: 0.02em;\n            top: 90px;\n            left: 32px;\n    ">Syncfusion is trusted by 29,000+ businesses worldwide</div>\n            <img src="data:image/svg+xml;base64, " style="\n            width: 742.5px;\n            position: relative;\n            top: 107px;\n            left: 32px;\n            ">\n            <a href=' + accountURL2 + ' style="\n        float: left;\n        border-radius: 56px;\n        background: #0D6EFD;\n        padding-top: 8px;\n        width: 280px;\n        height: 38px;\n        text-align: center;\n        position: relative;\n        top: 127px;\n        left: 274px;\n        font-size: 16px;\n        color: white;\n        text-decoration: none;\n        letter-spacing: 0.02em;\n    ">Claim your FREE account</a>\n            <div style="\n    font-size: 14px;\n    position: relative;\n    top: 180px;\n    left: 19px;\n    letter-spacing: 0.02em;\n    font-weight: 500;\n    line-height: 125%;\n">have a Syncfusion<sup>®</sup> account? <a href="https://www.syncfusion.com/account/login?ReturnUrl=/account/login" style="text-decoration: none;\ncolor: #0D6EFD;\nfont-weight: 500;">Sign In</a></div>\n        </div>\n    </div>';
  if (typeof document !== "undefined" && !isNullOrUndefined2(document)) {
    var errorBackground = createElement2("div", {
      innerHTML: bannerTemplate
    });
    document.body.appendChild(errorBackground);
  }
};

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/component.js
var __extends8 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate9 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var componentCount2 = 0;
var lastPageID2;
var lastHistoryLen2 = 0;
var instancecount2 = 0;
var isvalid2 = true;
var isBannerAdded2 = false;
var versionBasedStatePersistence2 = false;
var Component3 = (
  /** @class */
  function(_super) {
    __extends8(Component5, _super);
    function Component5(options, selector) {
      var _this = _super.call(this, options, selector) || this;
      _this.randomId = uniqueID2();
      _this.isStringTemplate = false;
      _this.needsID = false;
      _this.isReactHybrid = false;
      _this.isAngular = false;
      _this.isReact = false;
      _this.isVue = false;
      if (isNullOrUndefined2(_this.enableRtl)) {
        _this.setProperties({
          "enableRtl": rightToLeft2
        }, true);
      }
      if (isNullOrUndefined2(_this.locale)) {
        _this.setProperties({
          "locale": defaultCulture2
        }, true);
      }
      _this.moduleLoader = new ModuleLoader2(_this);
      _this.localObserver = new Observer2(_this);
      onIntlChange2.on("notifyExternalChange", _this.detectFunction, _this, _this.randomId);
      if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense2()) {
        if (componentList2.indexOf(_this.getModuleName()) !== -1) {
          instancecount2 = instancecount2 + 1;
          if (instancecount2 > 5) {
            isvalid2 = false;
          }
        }
      }
      if (!isUndefined2(selector)) {
        _this.appendTo();
      }
      return _this;
    }
    Component5.prototype.requiredModules = function() {
      return [];
    };
    Component5.prototype.destroy = function() {
      if (this.isDestroyed) {
        return;
      }
      if (this.enablePersistence) {
        this.setPersistData();
        this.detachUnloadEvent();
      }
      this.localObserver.destroy();
      if (this.refreshing) {
        return;
      }
      removeClass2([this.element], ["e-control"]);
      this.trigger("destroyed", {
        cancel: false
      });
      _super.prototype.destroy.call(this);
      this.moduleLoader.clean();
      onIntlChange2.off("notifyExternalChange", this.detectFunction, this.randomId);
    };
    Component5.prototype.refresh = function() {
      this.refreshing = true;
      this.moduleLoader.clean();
      this.destroy();
      this.clearChanges();
      this.localObserver = new Observer2(this);
      this.preRender();
      this.injectModules();
      this.render();
      this.refreshing = false;
    };
    Component5.prototype.accessMount = function() {
      if (this.mount && !this.isReactHybrid) {
        this.mount();
      }
    };
    Component5.prototype.getRootElement = function() {
      if (this.isReactHybrid) {
        return this.actualElement;
      } else {
        return this.element;
      }
    };
    Component5.prototype.getLocalData = function() {
      var eleId = this.getModuleName() + this.element.id;
      if (versionBasedStatePersistence2) {
        return window.localStorage.getItem(eleId + this.ej2StatePersistenceVersion);
      } else {
        return window.localStorage.getItem(eleId);
      }
    };
    Component5.prototype.attachUnloadEvent = function() {
      this.handleUnload = this.handleUnload.bind(this);
      window.addEventListener("pagehide", this.handleUnload);
    };
    Component5.prototype.handleUnload = function() {
      this.setPersistData();
    };
    Component5.prototype.detachUnloadEvent = function() {
      window.removeEventListener("pagehide", this.handleUnload);
    };
    Component5.prototype.appendTo = function(selector) {
      if (!isNullOrUndefined2(selector) && typeof selector === "string") {
        this.element = select2(selector, document);
      } else if (!isNullOrUndefined2(selector)) {
        this.element = selector;
      }
      if (!isNullOrUndefined2(this.element)) {
        var moduleClass = "e-" + this.getModuleName().toLowerCase();
        addClass2([this.element], ["e-control", moduleClass]);
        this.isProtectedOnChange = false;
        if (this.needsID && !this.element.id) {
          this.element.id = this.getUniqueID(this.getModuleName());
        }
        if (this.enablePersistence) {
          this.mergePersistData();
          this.attachUnloadEvent();
        }
        var inst = getValue2("ej2_instances", this.element);
        if (!inst || inst.indexOf(this) === -1) {
          _super.prototype.addInstance.call(this);
        }
        this.preRender();
        this.injectModules();
        var ignoredComponents = {
          schedule: "all",
          diagram: "all",
          PdfViewer: "all",
          grid: ["logger"],
          richtexteditor: ["link", "table", "image", "audio", "video", "formatPainter", "emojiPicker", "pasteCleanup", "htmlEditor", "toolbar", "importExport"],
          treegrid: ["filter"],
          gantt: ["tooltip"],
          chart: ["Export", "Zoom"],
          accumulationchart: ["Export"],
          "query-builder": "all"
        };
        var component = this.getModuleName();
        if (this.requiredModules && (!ignoredComponents["" + component] || ignoredComponents["" + component] !== "all")) {
          var modulesRequired = this.requiredModules();
          for (var _i = 0, _a = this.moduleLoader.getNonInjectedModules(modulesRequired); _i < _a.length; _i++) {
            var module = _a[_i];
            var moduleName = module.name ? module.name : module.member;
            if (ignoredComponents["" + component] && ignoredComponents["" + component].indexOf(module.member) !== -1) {
              continue;
            }
            var componentName = component.charAt(0).toUpperCase() + component.slice(1);
            console.warn('[WARNING] :: Module "' + moduleName + '" is not available in ' + componentName + " component! You either misspelled the module name or forgot to load it.");
          }
        }
        if (!isvalid2 && !isBannerAdded2) {
          createLicenseOverlay2();
          isBannerAdded2 = true;
        }
        this.render();
        if (!this.mount) {
          this.trigger("created");
        } else {
          this.accessMount();
        }
      }
    };
    Component5.prototype.renderComplete = function(wrapperElement) {
      if (isBlazor2()) {
        var sfBlazor = "sfBlazor";
        window["" + sfBlazor].renderComplete(this.element, wrapperElement);
      }
      this.isRendered = true;
    };
    Component5.prototype.dataBind = function() {
      this.injectModules();
      _super.prototype.dataBind.call(this);
    };
    Component5.prototype.on = function(event2, handler, context) {
      if (typeof event2 === "string") {
        this.localObserver.on(event2, handler, context);
      } else {
        for (var _i = 0, event_1 = event2; _i < event_1.length; _i++) {
          var arg = event_1[_i];
          this.localObserver.on(arg.event, arg.handler, arg.context);
        }
      }
    };
    Component5.prototype.off = function(event2, handler) {
      if (typeof event2 === "string") {
        this.localObserver.off(event2, handler);
      } else {
        for (var _i = 0, event_2 = event2; _i < event_2.length; _i++) {
          var arg = event_2[_i];
          this.localObserver.off(arg.event, arg.handler);
        }
      }
    };
    Component5.prototype.notify = function(property, argument) {
      if (this.isDestroyed !== true) {
        this.localObserver.notify(property, argument);
      }
    };
    Component5.prototype.getInjectedModules = function() {
      return this.injectedModules;
    };
    Component5.Inject = function() {
      var moduleList = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        moduleList[_i] = arguments[_i];
      }
      if (!this.prototype.injectedModules) {
        this.prototype.injectedModules = [];
      }
      for (var i = 0; i < moduleList.length; i++) {
        if (this.prototype.injectedModules.indexOf(moduleList[parseInt(i.toString(), 10)]) === -1) {
          this.prototype.injectedModules.push(moduleList[parseInt(i.toString(), 10)]);
        }
      }
    };
    Component5.prototype.createElement = function(tagName, prop, isVDOM) {
      return createElement2(tagName, prop);
    };
    Component5.prototype.triggerStateChange = function(handler, argument) {
      if (this.isReactHybrid) {
        this.setState();
        this.currentContext = {
          calls: handler,
          args: argument
        };
      }
    };
    Component5.prototype.injectModules = function() {
      if (this.injectedModules && this.injectedModules.length) {
        this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
      }
    };
    Component5.prototype.detectFunction = function(args) {
      var prop = Object.keys(args);
      if (prop.length) {
        this[prop[0]] = args[prop[0]];
      }
    };
    Component5.prototype.mergePersistData = function() {
      var data;
      if (versionBasedStatePersistence2) {
        data = window.localStorage.getItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion);
      } else {
        data = window.localStorage.getItem(this.getModuleName() + this.element.id);
      }
      if (!(isNullOrUndefined2(data) || data === "")) {
        this.setProperties(JSON.parse(data), true);
      }
    };
    Component5.prototype.setPersistData = function() {
      if (!this.isDestroyed) {
        if (versionBasedStatePersistence2) {
          window.localStorage.setItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion, this.getPersistData());
        } else {
          window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
        }
      }
    };
    Component5.prototype.renderReactTemplates = function(callback) {
      if (!isNullOrUndefined2(callback)) {
        callback();
      }
    };
    Component5.prototype.clearTemplate = function(templateName, index) {
    };
    Component5.prototype.getUniqueID = function(definedName) {
      if (this.isHistoryChanged()) {
        componentCount2 = 0;
      }
      lastPageID2 = this.pageID(location.href);
      lastHistoryLen2 = history.length;
      return definedName + "_" + lastPageID2 + "_" + componentCount2++;
    };
    Component5.prototype.pageID = function(url) {
      var hash = 0;
      if (url.length === 0) {
        return hash;
      }
      for (var i = 0; i < url.length; i++) {
        var char = url.charCodeAt(i);
        hash = (hash << 5) - hash + char;
        hash = hash & hash;
      }
      return Math.abs(hash);
    };
    Component5.prototype.isHistoryChanged = function() {
      return lastPageID2 !== this.pageID(location.href) || lastHistoryLen2 !== history.length;
    };
    Component5.prototype.addOnPersist = function(options) {
      var _this = this;
      var persistObj = {};
      for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
        var key = options_1[_i];
        var objValue = getValue2(key, this);
        if (!isUndefined2(objValue)) {
          setValue3(key, this.getActualProperties(objValue), persistObj);
        }
      }
      return JSON.stringify(persistObj, function(key2, value) {
        return _this.getActualProperties(value);
      });
    };
    Component5.prototype.getActualProperties = function(obj) {
      if (obj instanceof ChildProperty2) {
        return getValue2("properties", obj);
      } else {
        return obj;
      }
    };
    Component5.prototype.ignoreOnPersist = function(options) {
      return JSON.stringify(this.iterateJsonProperties(this.properties, options));
    };
    Component5.prototype.iterateJsonProperties = function(obj, ignoreList) {
      var newObj = {};
      var _loop_1 = function(key2) {
        if (ignoreList.indexOf(key2) === -1) {
          var value = obj["" + key2];
          if (typeof value === "object" && !(value instanceof Array)) {
            var newList = ignoreList.filter(function(str) {
              var regExp7 = RegExp;
              return new regExp7(key2 + ".").test(str);
            }).map(function(str) {
              return str.replace(key2 + ".", "");
            });
            newObj["" + key2] = this_1.iterateJsonProperties(this_1.getActualProperties(value), newList);
          } else {
            newObj["" + key2] = value;
          }
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
        var key = _a[_i];
        _loop_1(key);
      }
      return newObj;
    };
    __decorate9([Property2(false)], Component5.prototype, "enablePersistence", void 0);
    __decorate9([Property2()], Component5.prototype, "enableRtl", void 0);
    __decorate9([Property2()], Component5.prototype, "locale", void 0);
    Component5 = __decorate9([NotifyPropertyChanges2], Component5);
    return Component5;
  }(Base2)
);
(function() {
  if (typeof window !== "undefined") {
    window.addEventListener(
      "popstate",
      /* istanbul ignore next */
      function() {
        componentCount2 = 0;
      }
    );
  }
})();

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/draggable.js
var __extends9 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate10 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var defaultPosition2 = {
  left: 0,
  top: 0,
  bottom: 0,
  right: 0
};
var isDraggedObject2 = {
  isDragged: false
};
var Position2 = (
  /** @class */
  function(_super) {
    __extends9(Position4, _super);
    function Position4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate10([Property2(0)], Position4.prototype, "left", void 0);
    __decorate10([Property2(0)], Position4.prototype, "top", void 0);
    return Position4;
  }(ChildProperty2)
);
var Draggable2 = (
  /** @class */
  function(_super) {
    __extends9(Draggable4, _super);
    function Draggable4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.dragLimit = Draggable_1.getDefaultPosition();
      _this.borderWidth = Draggable_1.getDefaultPosition();
      _this.padding = Draggable_1.getDefaultPosition();
      _this.diffX = 0;
      _this.prevLeft = 0;
      _this.prevTop = 0;
      _this.dragProcessStarted = false;
      _this.eleTop = 0;
      _this.tapHoldTimer = 0;
      _this.externalInitialize = false;
      _this.diffY = 0;
      _this.parentScrollX = 0;
      _this.parentScrollY = 0;
      _this.droppables = {};
      _this.bind();
      return _this;
    }
    Draggable_1 = Draggable4;
    Draggable4.prototype.bind = function() {
      this.toggleEvents();
      if (Browser2.isIE) {
        addClass2([this.element], "e-block-touch");
      }
      this.droppables[this.scope] = {};
    };
    Draggable4.getDefaultPosition = function() {
      return extend2({}, defaultPosition2);
    };
    Draggable4.prototype.toggleEvents = function(isUnWire) {
      var ele;
      if (!isUndefined2(this.handle)) {
        ele = select2(this.handle, this.element);
      }
      var handler = this.enableTapHold && Browser2.isDevice && Browser2.isTouch ? this.mobileInitialize : this.initialize;
      if (isUnWire) {
        EventHandler2.remove(ele || this.element, Browser2.isSafari() ? "touchstart" : Browser2.touchStartEvent, handler);
      } else {
        EventHandler2.add(ele || this.element, Browser2.isSafari() ? "touchstart" : Browser2.touchStartEvent, handler, this);
      }
    };
    Draggable4.prototype.mobileInitialize = function(evt) {
      var _this = this;
      var target = evt.currentTarget;
      this.tapHoldTimer = setTimeout(function() {
        _this.externalInitialize = true;
        _this.removeTapholdTimer();
        _this.initialize(evt, target);
      }, this.tapHoldThreshold);
      EventHandler2.add(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.removeTapholdTimer, this);
      EventHandler2.add(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.removeTapholdTimer, this);
    };
    Draggable4.prototype.removeTapholdTimer = function() {
      clearTimeout(this.tapHoldTimer);
      EventHandler2.remove(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.removeTapholdTimer);
      EventHandler2.remove(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.removeTapholdTimer);
    };
    Draggable4.prototype.getScrollableParent = function(element2, axis) {
      var scroll = {
        "vertical": "scrollHeight",
        "horizontal": "scrollWidth"
      };
      var client = {
        "vertical": "clientHeight",
        "horizontal": "clientWidth"
      };
      if (isNullOrUndefined2(element2)) {
        return null;
      }
      if (element2[scroll["" + axis]] > element2[client["" + axis]]) {
        if (axis === "vertical" ? element2.scrollTop > 0 : element2.scrollLeft > 0) {
          if (axis === "vertical") {
            this.parentScrollY = this.parentScrollY + (this.parentScrollY === 0 ? element2.scrollTop : element2.scrollTop - this.parentScrollY);
            this.tempScrollHeight = element2.scrollHeight;
          } else {
            this.parentScrollX = this.parentScrollX + (this.parentScrollX === 0 ? element2.scrollLeft : element2.scrollLeft - this.parentScrollX);
            this.tempScrollWidth = element2.scrollWidth;
          }
          if (!isNullOrUndefined2(element2)) {
            return this.getScrollableParent(element2.parentNode, axis);
          } else {
            return element2;
          }
        } else {
          return this.getScrollableParent(element2.parentNode, axis);
        }
      } else {
        return this.getScrollableParent(element2.parentNode, axis);
      }
    };
    Draggable4.prototype.getScrollableValues = function() {
      this.parentScrollX = 0;
      this.parentScrollY = 0;
      var isModalDialog = this.element.classList.contains("e-dialog") && this.element.classList.contains("e-dlg-modal");
      var verticalScrollParent = this.getScrollableParent(this.element.parentNode, "vertical");
      var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, "horizontal");
    };
    Draggable4.prototype.initialize = function(evt, curTarget) {
      this.currentStateTarget = evt.target;
      if (this.isDragStarted()) {
        return;
      } else {
        this.isDragStarted(true);
        this.externalInitialize = false;
      }
      this.target = evt.currentTarget || curTarget;
      this.dragProcessStarted = false;
      if (this.abort) {
        var abortSelectors = this.abort;
        if (typeof abortSelectors === "string") {
          abortSelectors = [abortSelectors];
        }
        for (var i = 0; i < abortSelectors.length; i++) {
          if (!isNullOrUndefined2(closest2(evt.target, abortSelectors[parseInt(i.toString(), 10)]))) {
            if (this.isDragStarted()) {
              this.isDragStarted(true);
            }
            return;
          }
        }
      }
      if (this.preventDefault && !isUndefined2(evt.changedTouches) && evt.type !== "touchstart") {
        evt.preventDefault();
      }
      this.element.setAttribute("aria-grabbed", "true");
      var intCoord = this.getCoordinates(evt);
      this.initialPosition = {
        x: intCoord.pageX,
        y: intCoord.pageY
      };
      if (!this.clone) {
        var pos = this.element.getBoundingClientRect();
        this.getScrollableValues();
        if (evt.clientX === evt.pageX) {
          this.parentScrollX = 0;
        }
        if (evt.clientY === evt.pageY) {
          this.parentScrollY = 0;
        }
        this.relativeXPosition = intCoord.pageX - (pos.left + this.parentScrollX);
        this.relativeYPosition = intCoord.pageY - (pos.top + this.parentScrollY);
      }
      if (this.externalInitialize) {
        this.intDragStart(evt);
      } else {
        EventHandler2.add(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.intDragStart, this);
        EventHandler2.add(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDestroy, this);
      }
      this.toggleEvents(true);
      if (evt.type !== "touchstart" && this.isPreventSelect) {
        document.body.classList.add("e-prevent-select");
      }
      this.externalInitialize = false;
      EventHandler2.trigger(document.documentElement, Browser2.isSafari() ? "touchstart" : Browser2.touchStartEvent, evt);
    };
    Draggable4.prototype.intDragStart = function(evt) {
      this.removeTapholdTimer();
      var isChangeTouch = !isUndefined2(evt.changedTouches);
      if (isChangeTouch && evt.changedTouches.length !== 1) {
        return;
      }
      var intCordinate = this.getCoordinates(evt);
      var pos;
      var styleProp = getComputedStyle(this.element);
      this.margin = {
        left: parseInt(styleProp.marginLeft, 10),
        top: parseInt(styleProp.marginTop, 10),
        right: parseInt(styleProp.marginRight, 10),
        bottom: parseInt(styleProp.marginBottom, 10)
      };
      var element2 = this.element;
      if (this.clone && this.dragTarget) {
        var intClosest = closest2(evt.target, this.dragTarget);
        if (!isNullOrUndefined2(intClosest)) {
          element2 = intClosest;
        }
      }
      if (this.isReplaceDragEle) {
        element2 = this.currentStateCheck(evt.target, element2);
      }
      this.offset = this.calculateParentPosition(element2);
      this.position = this.getMousePosition(evt, this.isDragScroll);
      var x = this.initialPosition.x - intCordinate.pageX;
      var y = this.initialPosition.y - intCordinate.pageY;
      var distance = Math.sqrt(x * x + y * y);
      if (distance >= this.distance || this.externalInitialize) {
        var ele = this.getHelperElement(evt);
        if (!ele || isNullOrUndefined2(ele)) {
          return;
        }
        if (isChangeTouch) {
          evt.preventDefault();
        }
        var dragTargetElement = this.helperElement = ele;
        this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);
        if (this.dragStart) {
          var curTarget = this.getProperTargetElement(evt);
          var args = {
            event: evt,
            element: element2,
            target: curTarget,
            bindEvents: isBlazor2() ? this.bindDragEvents.bind(this) : null,
            dragElement: dragTargetElement
          };
          this.trigger("dragStart", args);
        }
        if (this.dragArea) {
          this.setDragArea();
        } else {
          this.dragLimit = {
            left: 0,
            right: 0,
            bottom: 0,
            top: 0
          };
          this.borderWidth = {
            top: 0,
            left: 0
          };
        }
        pos = {
          left: this.position.left - this.parentClientRect.left,
          top: this.position.top - this.parentClientRect.top
        };
        if (this.clone && !this.enableTailMode) {
          this.diffX = this.position.left - this.offset.left;
          this.diffY = this.position.top - this.offset.top;
        }
        this.getScrollableValues();
        var styles = getComputedStyle(element2);
        var marginTop = parseFloat(styles.marginTop);
        if (this.clone && marginTop !== 0) {
          pos.top += marginTop;
        }
        this.eleTop = !isNaN(parseFloat(styles.top)) ? parseFloat(styles.top) - this.offset.top : 0;
        if (this.enableScrollHandler && !this.clone) {
          pos.top -= this.parentScrollY;
          pos.left -= this.parentScrollX;
        }
        var posValue = this.getProcessedPositionValue({
          top: pos.top - this.diffY + "px",
          left: pos.left - this.diffX + "px"
        });
        if (this.dragArea && typeof this.dragArea !== "string" && this.dragArea.classList.contains("e-kanban-content") && this.dragArea.style.position === "relative") {
          pos.top += this.dragArea.scrollTop;
        }
        this.dragElePosition = {
          top: pos.top,
          left: pos.left
        };
        setStyleAttribute2(dragTargetElement, this.getDragPosition({
          position: "absolute",
          left: posValue.left,
          top: posValue.top
        }));
        EventHandler2.remove(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.intDragStart);
        EventHandler2.remove(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDestroy);
        if (!isBlazor2()) {
          this.bindDragEvents(dragTargetElement);
        }
      }
    };
    Draggable4.prototype.bindDragEvents = function(dragTargetElement) {
      if (isVisible2(dragTargetElement)) {
        EventHandler2.add(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.intDrag, this);
        EventHandler2.add(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDragStop, this);
        this.setGlobalDroppables(false, this.element, dragTargetElement);
      } else {
        this.toggleEvents();
        document.body.classList.remove("e-prevent-select");
      }
    };
    Draggable4.prototype.elementInViewport = function(el) {
      this.top = el.offsetTop;
      this.left = el.offsetLeft;
      this.width = el.offsetWidth;
      this.height = el.offsetHeight;
      while (el.offsetParent) {
        el = el.offsetParent;
        this.top += el.offsetTop;
        this.left += el.offsetLeft;
      }
      return this.top >= window.pageYOffset && this.left >= window.pageXOffset && this.top + this.height <= window.pageYOffset + window.innerHeight && this.left + this.width <= window.pageXOffset + window.innerWidth;
    };
    Draggable4.prototype.getProcessedPositionValue = function(value) {
      if (this.queryPositionInfo) {
        return this.queryPositionInfo(value);
      }
      return value;
    };
    Draggable4.prototype.calculateParentPosition = function(ele) {
      if (isNullOrUndefined2(ele)) {
        return {
          left: 0,
          top: 0
        };
      }
      var rect = ele.getBoundingClientRect();
      var style = getComputedStyle(ele);
      return {
        left: rect.left + window.pageXOffset - parseInt(style.marginLeft, 10),
        top: rect.top + window.pageYOffset - parseInt(style.marginTop, 10)
      };
    };
    Draggable4.prototype.intDrag = function(evt) {
      if (!isUndefined2(evt.changedTouches) && evt.changedTouches.length !== 1) {
        return;
      }
      if (this.clone && evt.changedTouches && Browser2.isDevice && Browser2.isTouch) {
        evt.preventDefault();
      }
      var left;
      var top;
      this.position = this.getMousePosition(evt, this.isDragScroll);
      var docHeight = this.getDocumentWidthHeight("Height");
      if (docHeight < this.position.top) {
        this.position.top = docHeight;
      }
      var docWidth = this.getDocumentWidthHeight("Width");
      if (docWidth < this.position.left) {
        this.position.left = docWidth;
      }
      if (this.drag) {
        var curTarget = this.getProperTargetElement(evt);
        this.trigger("drag", {
          event: evt,
          element: this.element,
          target: curTarget
        });
      }
      var eleObj = this.checkTargetElement(evt);
      if (eleObj.target && eleObj.instance) {
        var flag = true;
        if (this.hoverObject) {
          if (this.hoverObject.instance !== eleObj.instance) {
            this.triggerOutFunction(evt, eleObj);
          } else {
            flag = false;
          }
        }
        if (flag) {
          eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
          eleObj.instance.intOver(evt, eleObj.target);
          this.hoverObject = eleObj;
        }
      } else if (this.hoverObject) {
        this.triggerOutFunction(evt, eleObj);
      }
      var helperElement = this.droppables[this.scope].helper;
      this.parentClientRect = this.calculateParentPosition(this.helperElement.offsetParent);
      var tLeft = this.parentClientRect.left;
      var tTop = this.parentClientRect.top;
      var intCoord = this.getCoordinates(evt);
      var pagex = intCoord.pageX;
      var pagey = intCoord.pageY;
      var dLeft = this.position.left - this.diffX;
      var dTop = this.position.top - this.diffY;
      var styles = getComputedStyle(helperElement);
      if (this.dragArea) {
        if (this.enableAutoScroll) {
          this.setDragArea();
        }
        if (this.pageX !== pagex || this.skipDistanceCheck) {
          var helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft) + parseFloat(styles.marginRight));
          if (this.dragLimit.left > dLeft && dLeft > 0) {
            left = this.dragLimit.left;
          } else if (this.dragLimit.right + window.pageXOffset < dLeft + helperWidth && dLeft > 0) {
            left = dLeft - (dLeft - this.dragLimit.right) + window.pageXOffset - helperWidth;
          } else {
            left = dLeft < 0 ? this.dragLimit.left : dLeft;
          }
        }
        if (this.pageY !== pagey || this.skipDistanceCheck) {
          var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
          if (this.dragLimit.top > dTop && dTop > 0) {
            top = this.dragLimit.top;
          } else if (this.dragLimit.bottom + window.pageYOffset < dTop + helperHeight && dTop > 0) {
            top = dTop - (dTop - this.dragLimit.bottom) + window.pageYOffset - helperHeight;
          } else {
            top = dTop < 0 ? this.dragLimit.top : dTop;
          }
        }
      } else {
        left = dLeft;
        top = dTop;
      }
      var iTop = tTop + this.borderWidth.top;
      var iLeft = tLeft + this.borderWidth.left;
      if (this.dragProcessStarted) {
        if (isNullOrUndefined2(top)) {
          top = this.prevTop;
        }
        if (isNullOrUndefined2(left)) {
          left = this.prevLeft;
        }
      }
      var draEleTop;
      var draEleLeft;
      if (this.helperElement.classList.contains("e-treeview")) {
        if (this.dragArea) {
          this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
          draEleTop = top - iTop < 0 ? this.dragLimit.top : top - this.borderWidth.top;
          draEleLeft = left - iLeft < 0 ? this.dragLimit.left : left - this.borderWidth.left;
        } else {
          draEleTop = top - this.borderWidth.top;
          draEleLeft = left - this.borderWidth.left;
        }
      } else {
        if (this.dragArea) {
          var isDialogEle = this.helperElement.classList.contains("e-dialog");
          this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
          draEleTop = top - iTop < 0 ? this.dragLimit.top : top - iTop;
          draEleLeft = left - iLeft < 0 ? isDialogEle ? left - (iLeft - this.borderWidth.left) : this.dragElePosition.left : left - iLeft;
        } else {
          draEleTop = top - iTop;
          draEleLeft = left - iLeft;
        }
      }
      var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
      if (marginTop > 0) {
        if (this.clone) {
          draEleTop += marginTop;
          if (dTop < 0) {
            if (marginTop + dTop >= 0) {
              draEleTop = marginTop + dTop;
            } else {
              draEleTop -= marginTop;
            }
          }
          if (this.dragArea) {
            draEleTop = this.dragLimit.bottom < draEleTop ? this.dragLimit.bottom : draEleTop;
          }
        }
        if (top - iTop < 0) {
          if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
            var tempDraEleTop = this.dragLimit.top + dTop - iTop;
            if (tempDraEleTop + marginTop + iTop < 0) {
              draEleTop -= marginTop + iTop;
            } else {
              draEleTop = tempDraEleTop;
            }
          } else {
            draEleTop -= marginTop + iTop;
          }
        }
      }
      if (this.dragArea && this.helperElement.classList.contains("e-treeview")) {
        var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
        draEleTop = draEleTop + helperHeight > this.dragLimit.bottom ? this.dragLimit.bottom - helperHeight : draEleTop;
      }
      if (this.enableScrollHandler && !this.clone) {
        draEleTop -= this.parentScrollY;
        draEleLeft -= this.parentScrollX;
      }
      if (this.dragArea && typeof this.dragArea !== "string" && this.dragArea.classList.contains("e-kanban-content") && this.dragArea.style.position === "relative") {
        draEleTop += this.dragArea.scrollTop;
      }
      var dragValue = this.getProcessedPositionValue({
        top: draEleTop + "px",
        left: draEleLeft + "px"
      });
      if (this.isPreventScroll) {
        dragValue = this.getProcessedPositionValue({
          top: this.position.top - this.parentClientRect.top - 2 + "px",
          left: this.position.left - this.parentClientRect.left - 2 + "px"
        });
      }
      setStyleAttribute2(helperElement, this.getDragPosition(dragValue));
      if (!this.elementInViewport(helperElement) && this.enableAutoScroll && !this.helperElement.classList.contains("e-treeview")) {
        this.helperElement.scrollIntoView();
      }
      var elements = document.querySelectorAll(":hover");
      if (this.enableAutoScroll && this.helperElement.classList.contains("e-treeview")) {
        if (elements.length === 0) {
          elements = this.getPathElements(evt);
        }
        var scrollParent = this.getScrollParent(elements, false);
        if (this.elementInViewport(this.helperElement)) {
          this.getScrollPosition(scrollParent, draEleTop);
        } else if (!this.elementInViewport(this.helperElement)) {
          elements = [].slice.call(document.querySelectorAll(":hover"));
          if (elements.length === 0) {
            elements = this.getPathElements(evt);
          }
          scrollParent = this.getScrollParent(elements, true);
          this.getScrollPosition(scrollParent, draEleTop);
        }
      }
      this.dragProcessStarted = true;
      this.prevLeft = left;
      this.prevTop = top;
      this.position.left = left;
      this.position.top = top;
      this.pageX = pagex;
      this.pageY = pagey;
    };
    Draggable4.prototype.getScrollParent = function(node, reverse) {
      var nodeEl = reverse ? node.reverse() : node;
      var hasScroll;
      for (var i = nodeEl.length - 1; i >= 0; i--) {
        hasScroll = window.getComputedStyle(nodeEl[parseInt(i.toString(), 10)])["overflow-y"];
        if ((hasScroll === "auto" || hasScroll === "scroll") && nodeEl[parseInt(i.toString(), 10)].scrollHeight > nodeEl[parseInt(i.toString(), 10)].clientHeight) {
          return nodeEl[parseInt(i.toString(), 10)];
        }
      }
      hasScroll = window.getComputedStyle(document.scrollingElement)["overflow-y"];
      if (hasScroll === "visible") {
        document.scrollingElement.style.overflow = "auto";
        return document.scrollingElement;
      }
    };
    Draggable4.prototype.getScrollPosition = function(nodeEle, draEleTop) {
      if (nodeEle && nodeEle === document.scrollingElement) {
        if (nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight < draEleTop && nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
          nodeEle.scrollTop += this.helperElement.clientHeight;
        } else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
          nodeEle.scrollTop -= this.helperElement.clientHeight;
        }
      } else if (nodeEle && nodeEle !== document.scrollingElement) {
        var docScrollTop = document.scrollingElement.scrollTop;
        var helperClientHeight = this.helperElement.clientHeight;
        if (nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - helperClientHeight + docScrollTop < draEleTop) {
          nodeEle.scrollTop += this.helperElement.clientHeight;
        } else if (nodeEle.getBoundingClientRect().top > draEleTop - helperClientHeight - docScrollTop) {
          nodeEle.scrollTop -= this.helperElement.clientHeight;
        }
      }
    };
    Draggable4.prototype.getPathElements = function(evt) {
      var elementTop = evt.clientX > 0 ? evt.clientX : 0;
      var elementLeft = evt.clientY > 0 ? evt.clientY : 0;
      return document.elementsFromPoint(elementTop, elementLeft);
    };
    Draggable4.prototype.triggerOutFunction = function(evt, eleObj) {
      this.hoverObject.instance.intOut(evt, eleObj.target);
      this.hoverObject.instance.dragData[this.scope] = null;
      this.hoverObject = null;
    };
    Draggable4.prototype.getDragPosition = function(dragValue) {
      var temp = extend2({}, dragValue);
      if (this.axis) {
        if (this.axis === "x") {
          delete temp.top;
        } else if (this.axis === "y") {
          delete temp.left;
        }
      }
      return temp;
    };
    Draggable4.prototype.getDocumentWidthHeight = function(str) {
      var docBody = document.body;
      var docEle = document.documentElement;
      var returnValue = Math.max(docBody["scroll" + str], docEle["scroll" + str], docBody["offset" + str], docEle["offset" + str], docEle["client" + str]);
      return returnValue;
    };
    Draggable4.prototype.intDragStop = function(evt) {
      this.dragProcessStarted = false;
      if (!isUndefined2(evt.changedTouches) && evt.changedTouches.length !== 1) {
        return;
      }
      var type = ["touchend", "pointerup", "mouseup"];
      if (type.indexOf(evt.type) !== -1) {
        if (this.dragStop) {
          var curTarget = this.getProperTargetElement(evt);
          this.trigger("dragStop", {
            event: evt,
            element: this.element,
            target: curTarget,
            helper: this.helperElement
          });
        }
        this.intDestroy(evt);
      } else {
        this.element.setAttribute("aria-grabbed", "false");
      }
      var eleObj = this.checkTargetElement(evt);
      if (eleObj.target && eleObj.instance) {
        eleObj.instance.dragStopCalled = true;
        eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
        eleObj.instance.intDrop(evt, eleObj.target);
      }
      this.setGlobalDroppables(true);
      document.body.classList.remove("e-prevent-select");
    };
    Draggable4.prototype.intDestroy = function(evt) {
      this.dragProcessStarted = false;
      this.toggleEvents();
      document.body.classList.remove("e-prevent-select");
      this.element.setAttribute("aria-grabbed", "false");
      EventHandler2.remove(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.intDragStart);
      EventHandler2.remove(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDragStop);
      EventHandler2.remove(document, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDestroy);
      EventHandler2.remove(document, Browser2.isSafari() ? "touchmove" : Browser2.touchMoveEvent, this.intDrag);
      if (this.isDragStarted()) {
        this.isDragStarted(true);
      }
    };
    Draggable4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Draggable4.prototype.getModuleName = function() {
      return "draggable";
    };
    Draggable4.prototype.isDragStarted = function(change) {
      if (change) {
        isDraggedObject2.isDragged = !isDraggedObject2.isDragged;
      }
      return isDraggedObject2.isDragged;
    };
    Draggable4.prototype.setDragArea = function() {
      var eleWidthBound;
      var eleHeightBound;
      var top = 0;
      var left = 0;
      var ele;
      var type = typeof this.dragArea;
      if (type === "string") {
        ele = select2(this.dragArea);
      } else {
        ele = this.dragArea;
      }
      if (ele) {
        var elementArea = ele.getBoundingClientRect();
        eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
        eleHeightBound = ele.scrollHeight ? this.dragArea && !isNullOrUndefined2(this.helperElement) && this.helperElement.classList.contains("e-treeview") ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
        var keys4 = ["Top", "Left", "Bottom", "Right"];
        var styles = getComputedStyle(ele);
        for (var i = 0; i < keys4.length; i++) {
          var key = keys4[parseInt(i.toString(), 10)];
          var tborder = styles["border" + key + "Width"];
          var tpadding = styles["padding" + key];
          var lowerKey = key.toLowerCase();
          this.borderWidth["" + lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
          this.padding["" + lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
        }
        if (this.dragArea && !isNullOrUndefined2(this.helperElement) && this.helperElement.classList.contains("e-treeview")) {
          top = elementArea.top + document.scrollingElement.scrollTop;
        } else {
          top = elementArea.top;
        }
        left = elementArea.left;
        this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
        this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;
        this.dragLimit.right = left + eleWidthBound - (this.borderWidth.right + this.padding.right);
        this.dragLimit.bottom = top + eleHeightBound - (this.borderWidth.bottom + this.padding.bottom);
      }
    };
    Draggable4.prototype.getProperTargetElement = function(evt) {
      var intCoord = this.getCoordinates(evt);
      var ele;
      var prevStyle = this.helperElement.style.pointerEvents || "";
      var isPointer = evt.type.indexOf("pointer") !== -1 && Browser2.info.name === "safari" && parseInt(Browser2.info.version, 10) > 12;
      if (compareElementParent2(evt.target, this.helperElement) || evt.type.indexOf("touch") !== -1 || isPointer) {
        this.helperElement.style.pointerEvents = "none";
        ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
        this.helperElement.style.pointerEvents = prevStyle;
      } else {
        ele = evt.target;
      }
      return ele;
    };
    Draggable4.prototype.currentStateCheck = function(ele, oldEle) {
      var elem;
      if (!isNullOrUndefined2(this.currentStateTarget) && this.currentStateTarget !== ele) {
        elem = this.currentStateTarget;
      } else {
        elem = !isNullOrUndefined2(oldEle) ? oldEle : ele;
      }
      return elem;
    };
    Draggable4.prototype.getMousePosition = function(evt, isdragscroll) {
      var dragEle = evt.srcElement !== void 0 ? evt.srcElement : evt.target;
      var intCoord = this.getCoordinates(evt);
      var pageX;
      var pageY;
      var isOffsetParent = isNullOrUndefined2(dragEle.offsetParent);
      if (isdragscroll) {
        pageX = this.clone ? intCoord.pageX : intCoord.pageX + (isOffsetParent ? 0 : dragEle.offsetParent.scrollLeft) - this.relativeXPosition;
        pageY = this.clone ? intCoord.pageY : intCoord.pageY + (isOffsetParent ? 0 : dragEle.offsetParent.scrollTop) - this.relativeYPosition;
      } else {
        pageX = this.clone ? intCoord.pageX : intCoord.pageX + window.pageXOffset - this.relativeXPosition;
        pageY = this.clone ? intCoord.pageY : intCoord.pageY + window.pageYOffset - this.relativeYPosition;
      }
      if (document.scrollingElement && !isdragscroll && !this.clone) {
        var ele = document.scrollingElement;
        var isVerticalScroll = ele.scrollHeight > 0 && ele.scrollHeight > ele.clientHeight && ele.scrollTop > 0;
        var isHorrizontalScroll = ele.scrollWidth > 0 && ele.scrollWidth > ele.clientWidth && ele.scrollLeft > 0;
        pageX = isHorrizontalScroll ? pageX - ele.scrollLeft : pageX;
        pageY = isVerticalScroll ? pageY - ele.scrollTop : pageY;
      }
      return {
        left: pageX - (this.margin.left + this.cursorAt.left),
        top: pageY - (this.margin.top + this.cursorAt.top)
      };
    };
    Draggable4.prototype.getCoordinates = function(evt) {
      if (evt.type.indexOf("touch") > -1) {
        return evt.changedTouches[0];
      }
      return evt;
    };
    Draggable4.prototype.getHelperElement = function(evt) {
      var element2;
      if (this.clone) {
        if (this.helper) {
          element2 = this.helper({
            sender: evt,
            element: this.target
          });
        } else {
          element2 = createElement2("div", {
            className: "e-drag-helper e-block-touch",
            innerHTML: "Draggable"
          });
          document.body.appendChild(element2);
        }
      } else {
        element2 = this.element;
      }
      return element2;
    };
    Draggable4.prototype.setGlobalDroppables = function(reset, drag2, helper) {
      this.droppables[this.scope] = reset ? null : {
        draggable: drag2,
        helper,
        draggedElement: this.element
      };
    };
    Draggable4.prototype.checkTargetElement = function(evt) {
      var target = this.getProperTargetElement(evt);
      var dropIns = this.getDropInstance(target);
      if (!dropIns && target && !isNullOrUndefined2(target.parentNode)) {
        var parent_1 = closest2(target.parentNode, ".e-droppable") || target.parentElement;
        if (parent_1) {
          dropIns = this.getDropInstance(parent_1);
        }
      }
      return {
        target,
        instance: dropIns
      };
    };
    Draggable4.prototype.getDropInstance = function(ele) {
      var name = "getModuleName";
      var drop;
      var eleInst = ele && ele.ej2_instances;
      if (eleInst) {
        for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {
          var inst = eleInst_1[_i];
          if (inst["" + name]() === "droppable") {
            drop = inst;
            break;
          }
        }
      }
      return drop;
    };
    Draggable4.prototype.destroy = function() {
      this.toggleEvents(true);
      _super.prototype.destroy.call(this);
    };
    var Draggable_1;
    __decorate10([Complex2({}, Position2)], Draggable4.prototype, "cursorAt", void 0);
    __decorate10([Property2(true)], Draggable4.prototype, "clone", void 0);
    __decorate10([Property2()], Draggable4.prototype, "dragArea", void 0);
    __decorate10([Property2()], Draggable4.prototype, "isDragScroll", void 0);
    __decorate10([Property2()], Draggable4.prototype, "isReplaceDragEle", void 0);
    __decorate10([Property2(true)], Draggable4.prototype, "isPreventSelect", void 0);
    __decorate10([Property2(false)], Draggable4.prototype, "isPreventScroll", void 0);
    __decorate10([Event3()], Draggable4.prototype, "drag", void 0);
    __decorate10([Event3()], Draggable4.prototype, "dragStart", void 0);
    __decorate10([Event3()], Draggable4.prototype, "dragStop", void 0);
    __decorate10([Property2(1)], Draggable4.prototype, "distance", void 0);
    __decorate10([Property2()], Draggable4.prototype, "handle", void 0);
    __decorate10([Property2()], Draggable4.prototype, "abort", void 0);
    __decorate10([Property2()], Draggable4.prototype, "helper", void 0);
    __decorate10([Property2("default")], Draggable4.prototype, "scope", void 0);
    __decorate10([Property2("")], Draggable4.prototype, "dragTarget", void 0);
    __decorate10([Property2()], Draggable4.prototype, "axis", void 0);
    __decorate10([Property2()], Draggable4.prototype, "queryPositionInfo", void 0);
    __decorate10([Property2(false)], Draggable4.prototype, "enableTailMode", void 0);
    __decorate10([Property2(false)], Draggable4.prototype, "skipDistanceCheck", void 0);
    __decorate10([Property2(true)], Draggable4.prototype, "preventDefault", void 0);
    __decorate10([Property2(false)], Draggable4.prototype, "enableAutoScroll", void 0);
    __decorate10([Property2(false)], Draggable4.prototype, "enableTapHold", void 0);
    __decorate10([Property2(750)], Draggable4.prototype, "tapHoldThreshold", void 0);
    __decorate10([Property2(false)], Draggable4.prototype, "enableScrollHandler", void 0);
    Draggable4 = Draggable_1 = __decorate10([NotifyPropertyChanges2], Draggable4);
    return Draggable4;
  }(Base2)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/droppable.js
var __extends10 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate11 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Droppable2 = (
  /** @class */
  function(_super) {
    __extends10(Droppable4, _super);
    function Droppable4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.mouseOver = false;
      _this.dragData = {};
      _this.dragStopCalled = false;
      _this.bind();
      return _this;
    }
    Droppable4.prototype.bind = function() {
      this.wireEvents();
    };
    Droppable4.prototype.wireEvents = function() {
      EventHandler2.add(this.element, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDrop, this);
    };
    Droppable4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Droppable4.prototype.getModuleName = function() {
      return "droppable";
    };
    Droppable4.prototype.intOver = function(event2, element2) {
      if (!this.mouseOver) {
        var drag2 = this.dragData[this.scope];
        this.trigger("over", {
          event: event2,
          target: element2,
          dragData: drag2
        });
        this.mouseOver = true;
      }
    };
    Droppable4.prototype.intOut = function(event2, element2) {
      if (this.mouseOver) {
        this.trigger("out", {
          evt: event2,
          target: element2
        });
        this.mouseOver = false;
      }
    };
    Droppable4.prototype.intDrop = function(evt, element2) {
      if (!this.dragStopCalled) {
        return;
      } else {
        this.dragStopCalled = false;
      }
      var accept = true;
      var drag2 = this.dragData[this.scope];
      var isDrag = drag2 ? drag2.helper && isVisible2(drag2.helper) : false;
      var area;
      if (isDrag) {
        area = this.isDropArea(evt, drag2.helper, element2);
        if (this.accept) {
          accept = matches2(drag2.helper, this.accept);
        }
      }
      if (isDrag && this.drop && area.canDrop && accept) {
        this.trigger("drop", {
          event: evt,
          target: area.target,
          droppedElement: drag2.helper,
          dragData: drag2
        });
      }
      this.mouseOver = false;
    };
    Droppable4.prototype.isDropArea = function(evt, helper, element2) {
      var area = {
        canDrop: true,
        target: element2 || evt.target
      };
      var isTouch = evt.type === "touchend";
      if (isTouch || area.target === helper) {
        helper.style.display = "none";
        var coord = isTouch ? evt.changedTouches[0] : evt;
        var ele = document.elementFromPoint(coord.clientX, coord.clientY);
        area.canDrop = false;
        area.canDrop = compareElementParent2(ele, this.element);
        if (area.canDrop) {
          area.target = ele;
        }
        helper.style.display = "";
      }
      return area;
    };
    Droppable4.prototype.destroy = function() {
      EventHandler2.remove(this.element, Browser2.isSafari() ? "touchend" : Browser2.touchEndEvent, this.intDrop);
      _super.prototype.destroy.call(this);
    };
    __decorate11([Property2()], Droppable4.prototype, "accept", void 0);
    __decorate11([Property2("default")], Droppable4.prototype, "scope", void 0);
    __decorate11([Event3()], Droppable4.prototype, "drop", void 0);
    __decorate11([Event3()], Droppable4.prototype, "over", void 0);
    __decorate11([Event3()], Droppable4.prototype, "out", void 0);
    Droppable4 = __decorate11([NotifyPropertyChanges2], Droppable4);
    return Droppable4;
  }(Base2)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/keyboard.js
var __extends11 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate12 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var keyCode2 = {
  "backspace": 8,
  "tab": 9,
  "enter": 13,
  "shift": 16,
  "control": 17,
  "alt": 18,
  "pause": 19,
  "capslock": 20,
  "space": 32,
  "escape": 27,
  "pageup": 33,
  "pagedown": 34,
  "end": 35,
  "home": 36,
  "leftarrow": 37,
  "uparrow": 38,
  "rightarrow": 39,
  "downarrow": 40,
  "insert": 45,
  "delete": 46,
  "f1": 112,
  "f2": 113,
  "f3": 114,
  "f4": 115,
  "f5": 116,
  "f6": 117,
  "f7": 118,
  "f8": 119,
  "f9": 120,
  "f10": 121,
  "f11": 122,
  "f12": 123,
  "semicolon": 186,
  "plus": 187,
  "comma": 188,
  "minus": 189,
  "dot": 190,
  "forwardslash": 191,
  "graveaccent": 192,
  "openbracket": 219,
  "backslash": 220,
  "closebracket": 221,
  "singlequote": 222
};
var KeyboardEvents2 = (
  /** @class */
  function(_super) {
    __extends11(KeyboardEvents4, _super);
    function KeyboardEvents4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.keyPressHandler = function(e) {
        var isAltKey = e.altKey;
        var isCtrlKey = e.ctrlKey;
        var isShiftKey = e.shiftKey;
        var curkeyCode = e.which;
        var keys4 = Object.keys(_this.keyConfigs);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var key = keys_1[_i];
          var configCollection = _this.keyConfigs["" + key].split(",");
          for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
            var rconfig = configCollection_1[_a];
            var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
            if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey && isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
              e.action = key;
              if (_this.keyAction) {
                _this.keyAction(e);
              }
            }
          }
        }
      };
      _this.bind();
      return _this;
    }
    KeyboardEvents_1 = KeyboardEvents4;
    KeyboardEvents4.prototype.destroy = function() {
      this.unwireEvents();
      _super.prototype.destroy.call(this);
    };
    KeyboardEvents4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    KeyboardEvents4.prototype.bind = function() {
      this.wireEvents();
    };
    KeyboardEvents4.prototype.getModuleName = function() {
      return "keyboard";
    };
    KeyboardEvents4.prototype.wireEvents = function() {
      this.element.addEventListener(this.eventName, this.keyPressHandler);
    };
    KeyboardEvents4.prototype.unwireEvents = function() {
      this.element.removeEventListener(this.eventName, this.keyPressHandler);
    };
    KeyboardEvents4.getKeyConfigData = function(config) {
      if (config in this.configCache) {
        return this.configCache["" + config];
      }
      var keys4 = config.toLowerCase().split("+");
      var keyData = {
        altKey: keys4.indexOf("alt") !== -1 ? true : false,
        ctrlKey: keys4.indexOf("ctrl") !== -1 ? true : false,
        shiftKey: keys4.indexOf("shift") !== -1 ? true : false,
        keyCode: null
      };
      if (keys4[keys4.length - 1].length > 1 && !!Number(keys4[keys4.length - 1])) {
        keyData.keyCode = Number(keys4[keys4.length - 1]);
      } else {
        keyData.keyCode = KeyboardEvents_1.getKeyCode(keys4[keys4.length - 1]);
      }
      KeyboardEvents_1.configCache["" + config] = keyData;
      return keyData;
    };
    KeyboardEvents4.getKeyCode = function(keyVal) {
      return keyCode2["" + keyVal] || keyVal.toUpperCase().charCodeAt(0);
    };
    var KeyboardEvents_1;
    KeyboardEvents4.configCache = {};
    __decorate12([Property2({})], KeyboardEvents4.prototype, "keyConfigs", void 0);
    __decorate12([Property2("keyup")], KeyboardEvents4.prototype, "eventName", void 0);
    __decorate12([Event3()], KeyboardEvents4.prototype, "keyAction", void 0);
    KeyboardEvents4 = KeyboardEvents_1 = __decorate12([NotifyPropertyChanges2], KeyboardEvents4);
    return KeyboardEvents4;
  }(Base2)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/l10n.js
var L10n2 = (
  /** @class */
  function() {
    function L10n4(controlName, localeStrings, locale) {
      this.controlName = controlName;
      this.localeStrings = localeStrings;
      this.setLocale(locale || defaultCulture2);
    }
    L10n4.prototype.setLocale = function(locale) {
      var intLocale = this.intGetControlConstant(L10n4.locale, locale);
      this.currentLocale = intLocale || this.localeStrings;
    };
    L10n4.load = function(localeObject) {
      this.locale = extend2(this.locale, localeObject, {}, true);
    };
    L10n4.prototype.getConstant = function(prop) {
      if (!isNullOrUndefined2(this.currentLocale["" + prop])) {
        return this.currentLocale["" + prop];
      } else {
        return this.localeStrings["" + prop] || "";
      }
    };
    L10n4.prototype.intGetControlConstant = function(curObject, locale) {
      if (curObject["" + locale]) {
        return curObject["" + locale][this.controlName];
      }
      return null;
    };
    L10n4.locale = {};
    return L10n4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/touch.js
var __extends12 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate13 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SwipeSettings2 = (
  /** @class */
  function(_super) {
    __extends12(SwipeSettings4, _super);
    function SwipeSettings4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate13([Property2(50)], SwipeSettings4.prototype, "swipeThresholdDistance", void 0);
    return SwipeSettings4;
  }(ChildProperty2)
);
var swipeRegex2 = /(Up|Down)/;
var Touch2 = (
  /** @class */
  function(_super) {
    __extends12(Touch4, _super);
    function Touch4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.touchAction = true;
      _this.tapCount = 0;
      _this.startEvent = function(evt) {
        if (_this.touchAction === true) {
          var point = _this.updateChangeTouches(evt);
          if (evt.changedTouches !== void 0) {
            _this.touchAction = false;
          }
          _this.isTouchMoved = false;
          _this.movedDirection = "";
          _this.startPoint = _this.lastMovedPoint = {
            clientX: point.clientX,
            clientY: point.clientY
          };
          _this.startEventData = point;
          _this.hScrollLocked = _this.vScrollLocked = false;
          _this.tStampStart = Date.now();
          _this.timeOutTapHold = setTimeout(function() {
            _this.tapHoldEvent(evt);
          }, _this.tapHoldThreshold);
          EventHandler2.add(_this.element, Browser2.touchMoveEvent, _this.moveEvent, _this);
          EventHandler2.add(_this.element, Browser2.touchEndEvent, _this.endEvent, _this);
          EventHandler2.add(_this.element, Browser2.touchCancelEvent, _this.cancelEvent, _this);
        }
      };
      _this.moveEvent = function(evt) {
        var point = _this.updateChangeTouches(evt);
        _this.movedPoint = point;
        _this.isTouchMoved = !(point.clientX === _this.startPoint.clientX && point.clientY === _this.startPoint.clientY);
        var eScrollArgs = {};
        if (_this.isTouchMoved) {
          clearTimeout(_this.timeOutTapHold);
          _this.calcScrollPoints(evt);
          var scrollArg = {
            startEvents: _this.startEventData,
            originalEvent: evt,
            startX: _this.startPoint.clientX,
            startY: _this.startPoint.clientY,
            distanceX: _this.distanceX,
            distanceY: _this.distanceY,
            scrollDirection: _this.scrollDirection,
            velocity: _this.getVelocity(point)
          };
          eScrollArgs = extend2(eScrollArgs, {}, scrollArg);
          _this.trigger("scroll", eScrollArgs);
          _this.lastMovedPoint = {
            clientX: point.clientX,
            clientY: point.clientY
          };
        }
      };
      _this.cancelEvent = function(evt) {
        clearTimeout(_this.timeOutTapHold);
        clearTimeout(_this.timeOutTap);
        _this.tapCount = 0;
        _this.swipeFn(evt);
        EventHandler2.remove(_this.element, Browser2.touchCancelEvent, _this.cancelEvent);
      };
      _this.endEvent = function(evt) {
        _this.swipeFn(evt);
        if (!_this.isTouchMoved) {
          if (typeof _this.tap === "function") {
            _this.trigger("tap", {
              originalEvent: evt,
              tapCount: ++_this.tapCount
            });
            _this.timeOutTap = setTimeout(function() {
              _this.tapCount = 0;
            }, _this.tapThreshold);
          }
        }
        _this.modeclear();
      };
      _this.swipeFn = function(evt) {
        clearTimeout(_this.timeOutTapHold);
        clearTimeout(_this.timeOutTap);
        var point = _this.updateChangeTouches(evt);
        var diffX = point.clientX - _this.startPoint.clientX;
        var diffY = point.clientY - _this.startPoint.clientY;
        diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
        diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
        _this.isTouchMoved = diffX > 1 || diffY > 1;
        var isFirefox = /Firefox/.test(Browser2.userAgent);
        if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === "mouseup") {
          _this.isTouchMoved = false;
        }
        _this.endPoint = point;
        _this.calcPoints(evt);
        var swipeArgs = {
          originalEvent: evt,
          startEvents: _this.startEventData,
          startX: _this.startPoint.clientX,
          startY: _this.startPoint.clientY,
          distanceX: _this.distanceX,
          distanceY: _this.distanceY,
          swipeDirection: _this.movedDirection,
          velocity: _this.getVelocity(point)
        };
        if (_this.isTouchMoved) {
          var tDistance = _this.swipeSettings.swipeThresholdDistance;
          var eSwipeArgs = extend2(void 0, _this.defaultArgs, swipeArgs);
          var canTrigger = false;
          var ele = _this.element;
          var scrollBool = _this.isScrollable(ele);
          var moved = swipeRegex2.test(_this.movedDirection);
          if (tDistance < _this.distanceX && !moved || tDistance < _this.distanceY && moved) {
            if (!scrollBool) {
              canTrigger = true;
            } else {
              canTrigger = _this.checkSwipe(ele, moved);
            }
          }
          if (canTrigger) {
            _this.trigger("swipe", eSwipeArgs);
          }
        }
        _this.modeclear();
      };
      _this.modeclear = function() {
        _this.modeClear = setTimeout(function() {
          _this.touchAction = true;
        }, typeof _this.tap !== "function" ? 0 : 20);
        _this.lastTapTime = (/* @__PURE__ */ new Date()).getTime();
        EventHandler2.remove(_this.element, Browser2.touchMoveEvent, _this.moveEvent);
        EventHandler2.remove(_this.element, Browser2.touchEndEvent, _this.endEvent);
        EventHandler2.remove(_this.element, Browser2.touchCancelEvent, _this.cancelEvent);
      };
      _this.bind();
      return _this;
    }
    Touch4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Touch4.prototype.bind = function() {
      this.wireEvents();
      if (Browser2.isIE) {
        this.element.classList.add("e-block-touch");
      }
    };
    Touch4.prototype.destroy = function() {
      this.unwireEvents();
      _super.prototype.destroy.call(this);
    };
    Touch4.prototype.wireEvents = function() {
      EventHandler2.add(this.element, Browser2.touchStartEvent, this.startEvent, this);
    };
    Touch4.prototype.unwireEvents = function() {
      EventHandler2.remove(this.element, Browser2.touchStartEvent, this.startEvent);
    };
    Touch4.prototype.getModuleName = function() {
      return "touch";
    };
    Touch4.prototype.isScrollable = function(element2) {
      var eleStyle = getComputedStyle(element2);
      var style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;
      if (/(auto|scroll)/.test(style)) {
        return true;
      }
      return false;
    };
    Touch4.prototype.tapHoldEvent = function(evt) {
      this.tapCount = 0;
      this.touchAction = true;
      EventHandler2.remove(this.element, Browser2.touchMoveEvent, this.moveEvent);
      EventHandler2.remove(this.element, Browser2.touchEndEvent, this.endEvent);
      var eTapArgs = {
        originalEvent: evt
      };
      this.trigger("tapHold", eTapArgs);
      EventHandler2.remove(this.element, Browser2.touchCancelEvent, this.cancelEvent);
    };
    Touch4.prototype.calcPoints = function(evt) {
      var point = this.updateChangeTouches(evt);
      this.defaultArgs = {
        originalEvent: evt
      };
      this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.startPoint.clientX));
      this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.startPoint.clientY));
      if (this.distanceX > this.distanceY) {
        this.movedDirection = point.clientX > this.startPoint.clientX ? "Right" : "Left";
      } else {
        this.movedDirection = point.clientY < this.startPoint.clientY ? "Up" : "Down";
      }
    };
    Touch4.prototype.calcScrollPoints = function(evt) {
      var point = this.updateChangeTouches(evt);
      this.defaultArgs = {
        originalEvent: evt
      };
      this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.lastMovedPoint.clientX));
      this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.lastMovedPoint.clientY));
      if ((this.distanceX > this.distanceY || this.hScrollLocked === true) && this.vScrollLocked === false) {
        this.scrollDirection = point.clientX > this.lastMovedPoint.clientX ? "Right" : "Left";
        this.hScrollLocked = true;
      } else {
        this.scrollDirection = point.clientY < this.lastMovedPoint.clientY ? "Up" : "Down";
        this.vScrollLocked = true;
      }
    };
    Touch4.prototype.getVelocity = function(pnt) {
      var newX = pnt.clientX;
      var newY = pnt.clientY;
      var newT = Date.now();
      var xDist = newX - this.startPoint.clientX;
      var yDist = newY - this.startPoint.clientX;
      var interval = newT - this.tStampStart;
      return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
    };
    Touch4.prototype.checkSwipe = function(ele, flag) {
      var keys4 = ["scroll", "offset"];
      var temp = flag ? ["Height", "Top"] : ["Width", "Left"];
      if (ele[keys4[0] + temp[0]] <= ele[keys4[1] + temp[0]]) {
        return true;
      }
      return ele[keys4[0] + temp[1]] === 0 || ele[keys4[1] + temp[0]] + ele[keys4[0] + temp[1]] >= ele[keys4[0] + temp[0]];
    };
    Touch4.prototype.updateChangeTouches = function(evt) {
      var point = evt.changedTouches && evt.changedTouches.length !== 0 ? evt.changedTouches[0] : evt;
      return point;
    };
    __decorate13([Event3()], Touch4.prototype, "tap", void 0);
    __decorate13([Event3()], Touch4.prototype, "tapHold", void 0);
    __decorate13([Event3()], Touch4.prototype, "swipe", void 0);
    __decorate13([Event3()], Touch4.prototype, "scroll", void 0);
    __decorate13([Property2(350)], Touch4.prototype, "tapThreshold", void 0);
    __decorate13([Property2(750)], Touch4.prototype, "tapHoldThreshold", void 0);
    __decorate13([Complex2({}, SwipeSettings2)], Touch4.prototype, "swipeSettings", void 0);
    Touch4 = __decorate13([NotifyPropertyChanges2], Touch4);
    return Touch4;
  }(Base2)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/template.js
var LINES2 = new RegExp("\\n|\\r|\\s\\s+", "g");
var QUOTES2 = new RegExp(/'|"/g);
var IF_STMT2 = new RegExp("if ?\\(");
var ELSEIF_STMT2 = new RegExp("else if ?\\(");
var ELSE_STMT2 = new RegExp("else");
var FOR_STMT2 = new RegExp("for ?\\(");
var IF_OR_FOR2 = new RegExp("(/if|/for)");
var CALL_FUNCTION2 = new RegExp("\\((.*)\\)", "");
var NOT_NUMBER2 = new RegExp("^[0-9]+$", "g");
var WORD2 = new RegExp(`[\\w"'.\\s+]+`, "g");
var DBL_QUOTED_STR2 = new RegExp('"(.*?)"', "g");
var WORDIF2 = new RegExp(`[\\w"'@#$.\\s-+]+`, "g");
var exp2 = new RegExp("\\${([^}]*)}", "g");
var ARR_OBJ2 = /^\..*/gm;
var SINGLE_SLASH2 = /\\/gi;
var DOUBLE_SLASH2 = /\\\\/gi;
var WORDFUNC2 = new RegExp(`[\\w"'@#$.\\s+]+`, "g");
var WINDOWFUNC2 = /\window\./gm;
function compile3(template, helper, ignorePrefix) {
  if (typeof template === "function") {
    return template;
  } else {
    var argName = "data";
    var evalExpResult = evalExp2(template, argName, helper, ignorePrefix);
    var condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
        var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
        if(str.match(valueRegEx)){
            var check = str.match(valueRegEx);
            var str1 = str;
            for (var i=0; i < check.length; i++) {
                var check1 = str.match(valueRegEx)[i].split('value=')[1];
                var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
                change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
                str1 = str1.replace(check1, change);
            }
            str = str.replace(str, str1);
        }
        else if (str.match(/(?:href='')/) === null) {
            if(str.match(hrefRegex)) {
                var check = str.match(hrefRegex);
                var str1 = str;
                for (var i=0; i < check.length; i++) {
                    var check1 = str.match(hrefRegex)[i].split('href=')[1];
                    if (check1) {
                        var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
                        change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
                        str1 = str1.replace(check1, change);
                    }
                }
                str = str.replace(str, str1);
            }
        }
        `;
    var fnCode = 'var str="' + evalExpResult + '";' + condtion + " return str;";
    var fn = new Function(argName, fnCode);
    return fn.bind(helper);
  }
}
function evalExp2(str, nameSpace, helper, ignorePrefix) {
  var varCOunt = 0;
  var localKeys = [];
  var isClass = str.match(/class="([^"]+|)\s{2}/g);
  var singleSpace = "";
  if (isClass) {
    isClass.forEach(function(value) {
      singleSpace = value.replace(/\s\s+/g, " ");
      str = str.replace(value, singleSpace);
    });
  }
  if (exp2.test(str)) {
    var insideBraces = false;
    var outputString = "";
    for (var i = 0; i < str.length; i++) {
      if (str[i + ""] === "$" && str[i + 1] === "{") {
        insideBraces = true;
      } else if (str[i + ""] === "}") {
        insideBraces = false;
      }
      outputString += str[i + ""] === '"' && !insideBraces ? '\\"' : str[i + ""];
    }
    str = outputString;
  } else {
    str = str.replace(/\\?"/g, '\\"');
  }
  return str.replace(LINES2, "").replace(DBL_QUOTED_STR2, "'$1'").replace(exp2, function(match, cnt, offset, matchStr) {
    var SPECIAL_CHAR = /@|#|\$/gm;
    var matches5 = cnt.match(CALL_FUNCTION2);
    if (matches5) {
      var rlStr = matches5[1];
      if (ELSEIF_STMT2.test(cnt)) {
        cnt = '";} ' + cnt.replace(matches5[1], rlStr.replace(WORD2, function(str2) {
          str2 = str2.trim();
          return addNameSpace2(str2, !QUOTES2.test(str2) && localKeys.indexOf(str2) === -1, nameSpace, localKeys, ignorePrefix);
        })) + '{ \n str = str + "';
      } else if (IF_STMT2.test(cnt)) {
        cnt = '"; ' + cnt.replace(matches5[1], rlStr.replace(WORDIF2, function(strs) {
          return HandleSpecialCharArrObj2(strs, nameSpace, localKeys, ignorePrefix);
        })) + '{ \n str = str + "';
      } else if (FOR_STMT2.test(cnt)) {
        var rlStr_1 = matches5[1].split(" of ");
        cnt = '"; ' + cnt.replace(matches5[1], function(mtc) {
          localKeys.push(rlStr_1[0]);
          localKeys.push(rlStr_1[0] + "Index");
          varCOunt = varCOunt + 1;
          return "var i" + varCOunt + "=0; i" + varCOunt + " < " + addNameSpace2(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + ".length; i" + varCOunt + "++";
        }) + "{ \n " + rlStr_1[0] + "= " + addNameSpace2(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + "[i" + varCOunt + "]; \n var " + rlStr_1[0] + "Index=i" + varCOunt + '; \n str = str + "';
      } else {
        var fnStr = cnt.split("(");
        var fNameSpace = helper && Object.prototype.hasOwnProperty.call(helper, fnStr[0]) ? "this." : "global";
        fNameSpace = /\./.test(fnStr[0]) ? "" : fNameSpace;
        var ftArray = matches5[1].split(",");
        if (matches5[1].length !== 0 && !/data/.test(ftArray[0]) && !/window./.test(ftArray[0])) {
          matches5[1] = fNameSpace === "global" ? nameSpace + "." + matches5[1] : matches5[1];
        }
        var splRegexp = /@|\$|#/gm;
        var arrObj = /\]\./gm;
        if (WINDOWFUNC2.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
          var splArrRegexp = /@|\$|#|\]\./gm;
          if (splArrRegexp.test(cnt)) {
            cnt = '"+ ' + (fNameSpace === "global" ? "" : fNameSpace) + cnt.replace(matches5[1], rlStr.replace(WORDFUNC2, function(strs) {
              return HandleSpecialCharArrObj2(strs, nameSpace, localKeys, ignorePrefix);
            })) + '+ "';
          }
        } else {
          cnt = '" + ' + (fNameSpace === "global" ? "" : fNameSpace) + cnt.replace(rlStr, addNameSpace2(matches5[1].replace(/,( |)data.|,/gi, "," + nameSpace + ".").replace(/,( |)data.window/gi, ",window"), fNameSpace === "global" ? false : true, nameSpace, localKeys, ignorePrefix)) + '+"';
        }
      }
    } else if (ELSE_STMT2.test(cnt)) {
      cnt = '"; ' + cnt.replace(ELSE_STMT2, '} else { \n str = str + "');
    } else if (cnt.match(IF_OR_FOR2)) {
      cnt = cnt.replace(IF_OR_FOR2, '"; \n } \n str = str + "');
    } else if (SPECIAL_CHAR.test(cnt)) {
      if (cnt.match(SINGLE_SLASH2)) {
        cnt = SlashReplace2(cnt);
      }
      cnt = '"+' + NameSpaceForspecialChar2(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
    } else {
      if (cnt.match(SINGLE_SLASH2)) {
        cnt = SlashReplace2(cnt);
        cnt = '"+' + NameSpaceForspecialChar2(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
      } else {
        cnt = cnt !== "" ? '"+' + addNameSpace2(cnt.replace(/,/gi, "+" + nameSpace + "."), localKeys.indexOf(cnt) === -1, nameSpace, localKeys, ignorePrefix) + '+"' : "${}";
      }
    }
    return cnt;
  });
}
function addNameSpace2(str, addNS, nameSpace, ignoreList, ignorePrefix) {
  return addNS && !NOT_NUMBER2.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 && !ignorePrefix && str !== "true" && str !== "false" ? nameSpace + "." + str : str;
}
function NameSpaceArrObj2(str, addNS, nameSpace, ignoreList) {
  var arrObjReg = /^\..*/gm;
  return addNS && !NOT_NUMBER2.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 && !arrObjReg.test(str) ? nameSpace + "." + str : str;
}
function NameSpaceForspecialChar2(str, addNS, nameSpace, ignoreList) {
  return addNS && !NOT_NUMBER2.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 ? nameSpace + '["' + str : str;
}
function SlashReplace2(tempStr) {
  var double = "\\\\";
  if (tempStr.match(DOUBLE_SLASH2)) {
    return tempStr;
  } else {
    return tempStr.replace(SINGLE_SLASH2, double);
  }
}
function HandleSpecialCharArrObj2(str, nameSpaceNew, keys4, ignorePrefix) {
  str = str.trim();
  var windowFunc = /\window\./gm;
  if (!windowFunc.test(str)) {
    var quotes = /'|"/gm;
    var splRegexp = /@|\$|#/gm;
    if (splRegexp.test(str)) {
      str = NameSpaceForspecialChar2(str, keys4.indexOf(str) === -1, nameSpaceNew, keys4) + '"]';
    }
    if (ARR_OBJ2.test(str)) {
      return NameSpaceArrObj2(str, !quotes.test(str) && keys4.indexOf(str) === -1, nameSpaceNew, keys4);
    } else {
      return addNameSpace2(str, !quotes.test(str) && keys4.indexOf(str) === -1, nameSpaceNew, keys4, ignorePrefix);
    }
  } else {
    return str;
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/template-engine.js
var HAS_ROW = /^[\n\r.]+<tr|^<tr/;
var HAS_SVG = /^[\n\r.]+<svg|^<path|^<g/;
var blazorTemplates = {};
function getRandomId() {
  return "-" + Math.random().toString(36).substr(2, 5);
}
function compile4(templateString, helper, ignorePrefix) {
  var compiler = engineObj2.compile(templateString, helper, ignorePrefix);
  return function(data, component, propName, templateId, isStringTemplate, index, element2, root) {
    var result = compiler(data, component, propName, element2, root);
    var blazorTemplateId = "BlazorTemplateId";
    if (isBlazor2() && !isStringTemplate) {
      var randomId = getRandomId();
      var blazorId = templateId + randomId;
      if (!blazorTemplates["" + templateId]) {
        blazorTemplates["" + templateId] = [];
      }
      if (!isNullOrUndefined2(index)) {
        var keys4 = Object.keys(blazorTemplates["" + templateId][parseInt(index.toString(), 10)]);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var key = keys_1[_i];
          if (key !== blazorTemplateId && data["" + key]) {
            blazorTemplates["" + templateId][parseInt(index.toString(), 10)]["" + key] = data["" + key];
          }
          if (key === blazorTemplateId) {
            blazorId = blazorTemplates["" + templateId][parseInt(index.toString(), 10)]["" + key];
          }
        }
      } else {
        data["" + blazorTemplateId] = blazorId;
        blazorTemplates["" + templateId].push(data);
      }
      return propName === "rowTemplate" ? [createElement2("tr", {
        id: blazorId,
        className: "e-blazor-template"
      })] : [createElement2("div", {
        id: blazorId,
        className: "e-blazor-template"
      })];
    }
    if (typeof result === "string") {
      if (HAS_SVG.test(result)) {
        var ele = createElement2("svg", {
          innerHTML: result
        });
        return ele.childNodes;
      } else {
        var ele = createElement2(HAS_ROW.test(result) ? "table" : "div", {
          innerHTML: result
        });
        return ele.childNodes;
      }
    } else {
      return result;
    }
  };
}
function initializeCSPTemplate(template, helper) {
  var boundFunc;
  template.prototype.CSPTemplate = true;
  if (!isNullOrUndefined2(helper)) {
    boundFunc = template.bind(helper);
    boundFunc.prototype = Object.create(template.prototype);
  } else {
    boundFunc = template;
  }
  return boundFunc;
}
var Engine2 = (
  /** @class */
  function() {
    function Engine4() {
    }
    Engine4.prototype.compile = function(templateString, helper, ignorePrefix) {
      if (helper === void 0) {
        helper = {};
      }
      return compile3(templateString, helper);
    };
    return Engine4;
  }()
);
var engineObj2 = {
  compile: new Engine2().compile
};

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-base/src/sanitize-helper.js
var removeTags2 = ["script", "style", "iframe[src]", 'link[href*="javascript:"]', 'object[type="text/x-scriptlet"]', 'object[data^="data:text/html;base64"]', 'img[src^="data:text/html;base64"]', '[src^="javascript:"]', '[dynsrc^="javascript:"]', '[lowsrc^="javascript:"]', '[type^="application/x-shockwave-flash"]'];
var removeAttrs2 = [{
  attribute: "href",
  selector: '[href*="javascript:"]'
}, {
  attribute: "href",
  selector: "a[href]"
}, {
  attribute: "background",
  selector: '[background^="javascript:"]'
}, {
  attribute: "style",
  selector: '[style*="javascript:"]'
}, {
  attribute: "style",
  selector: '[style*="expression("]'
}, {
  attribute: "href",
  selector: 'a[href^="data:text/html;base64"]'
}];
var jsEvents2 = ["onchange", "onclick", "onmouseover", "onmouseout", "onkeydown", "onload", "onerror", "onblur", "onfocus", "onbeforeload", "onbeforeunload", "onkeyup", "onsubmit", "onafterprint", "onbeforeonload", "onbeforeprint", "oncanplay", "oncanplaythrough", "oncontextmenu", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onformchange", "onforminput", "onhaschange", "oninput", "oninvalid", "onkeypress", "onloadeddata", "onloadedmetadata", "onloadstart", "onmessage", "onmousedown", "onmousemove", "onmouseup", "onmousewheel", "onoffline", "onoine", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpopstate", "onprogress", "onratechange", "onreadystatechange", "onredo", "onresize", "onscroll", "onseeked", "onseeking", "onselect", "onstalled", "onstorage", "onsuspend", "ontimeupdate", "onundo", "onunload", "onvolumechange", "onwaiting", "onmouseenter", "onmouseleave", "onstart", "onpropertychange", "oncopy", "ontoggle", "onpointerout", "onpointermove", "onpointerleave", "onpointerenter", "onpointerrawupdate", "onpointerover", "onbeforecopy", "onbeforecut", "onbeforeinput"];
var SanitizeHtmlHelper2 = (
  /** @class */
  function() {
    function SanitizeHtmlHelper4() {
    }
    SanitizeHtmlHelper4.beforeSanitize = function() {
      return {
        selectors: {
          tags: removeTags2,
          attributes: removeAttrs2
        }
      };
    };
    SanitizeHtmlHelper4.sanitize = function(value) {
      if (isNullOrUndefined2(value)) {
        return value;
      }
      var item = this.beforeSanitize();
      var output = this.serializeValue(item, value);
      return output;
    };
    SanitizeHtmlHelper4.serializeValue = function(item, value) {
      this.removeAttrs = item.selectors.attributes;
      this.removeTags = item.selectors.tags;
      this.wrapElement = document.createElement("div");
      this.wrapElement.innerHTML = value;
      this.removeXssTags();
      this.removeJsEvents();
      this.removeXssAttrs();
      var tempEleValue = this.wrapElement.innerHTML;
      this.removeElement();
      this.wrapElement = null;
      return tempEleValue.replace(/&amp;/g, "&");
    };
    SanitizeHtmlHelper4.removeElement = function() {
      var nodes = this.wrapElement.children;
      for (var j = 0; j < nodes.length; j++) {
        var attribute = nodes[parseInt(j.toString(), 10)].attributes;
        for (var i = 0; i < attribute.length; i++) {
          this.wrapElement.children[parseInt(j.toString(), 10)].removeAttribute(attribute[parseInt(i.toString(), 10)].localName);
        }
      }
    };
    SanitizeHtmlHelper4.removeXssTags = function() {
      var elements = this.wrapElement.querySelectorAll(this.removeTags.join(","));
      if (elements.length > 0) {
        elements.forEach(function(element2) {
          detach2(element2);
        });
      } else {
        return;
      }
    };
    SanitizeHtmlHelper4.removeJsEvents = function() {
      var elements = this.wrapElement.querySelectorAll("[" + jsEvents2.join("],[") + "]");
      if (elements.length > 0) {
        elements.forEach(function(element2) {
          jsEvents2.forEach(function(attr) {
            if (element2.hasAttribute(attr)) {
              element2.removeAttribute(attr);
            }
          });
        });
      } else {
        return;
      }
    };
    SanitizeHtmlHelper4.removeXssAttrs = function() {
      var _this = this;
      this.removeAttrs.forEach(function(item, index) {
        var elements = _this.wrapElement.querySelectorAll(item.selector);
        if (elements.length > 0) {
          if (item.selector === "a[href]") {
            elements.forEach(function(element2) {
              if (element2.getAttribute(item.attribute).replace(/\t|\s|&/, "").indexOf("javascript:alert") !== -1) {
                element2.removeAttribute(item.attribute);
              }
            });
          } else {
            elements.forEach(function(element2) {
              element2.removeAttribute(item.attribute);
            });
          }
        }
      });
    };
    return SanitizeHtmlHelper4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/common/position.js
var elementRect;
var popupRect;
var element;
var parentDocument;
var fixedParent = false;
function calculateRelativeBasedPosition(anchor, element2) {
  var fixedElement = false;
  var anchorPos = {
    left: 0,
    top: 0
  };
  var tempAnchor = anchor;
  if (!anchor || !element2) {
    return anchorPos;
  }
  if (isNullOrUndefined2(element2.offsetParent) && element2.style.position === "fixed") {
    fixedElement = true;
  }
  while ((element2.offsetParent || fixedElement) && anchor && element2.offsetParent !== anchor) {
    anchorPos.left += anchor.offsetLeft;
    anchorPos.top += anchor.offsetTop;
    anchor = anchor.offsetParent;
  }
  anchor = tempAnchor;
  while ((element2.offsetParent || fixedElement) && anchor && element2.offsetParent !== anchor) {
    anchorPos.left -= anchor.scrollLeft;
    anchorPos.top -= anchor.scrollTop;
    anchor = anchor.parentElement;
  }
  return anchorPos;
}
function calculatePosition(currentElement, positionX, positionY, parentElement, targetValues) {
  popupRect = void 0;
  popupRect = targetValues;
  fixedParent = parentElement ? true : false;
  if (!currentElement) {
    return {
      left: 0,
      top: 0
    };
  }
  if (!positionX) {
    positionX = "left";
  }
  if (!positionY) {
    positionY = "top";
  }
  parentDocument = currentElement.ownerDocument;
  element = currentElement;
  var pos = {
    left: 0,
    top: 0
  };
  return updatePosition(positionX.toLowerCase(), positionY.toLowerCase(), pos);
}
function setPosx(value, pos) {
  pos.left = value;
}
function setPosy(value, pos) {
  pos.top = value;
}
function updatePosition(posX, posY, pos) {
  elementRect = element.getBoundingClientRect();
  switch (posY + posX) {
    case "topcenter":
      setPosx(getElementHCenter(), pos);
      setPosy(getElementTop(), pos);
      break;
    case "topright":
      setPosx(getElementRight(), pos);
      setPosy(getElementTop(), pos);
      break;
    case "centercenter":
      setPosx(getElementHCenter(), pos);
      setPosy(getElementVCenter(), pos);
      break;
    case "centerright":
      setPosx(getElementRight(), pos);
      setPosy(getElementVCenter(), pos);
      break;
    case "centerleft":
      setPosx(getElementLeft(), pos);
      setPosy(getElementVCenter(), pos);
      break;
    case "bottomcenter":
      setPosx(getElementHCenter(), pos);
      setPosy(getElementBottom(), pos);
      break;
    case "bottomright":
      setPosx(getElementRight(), pos);
      setPosy(getElementBottom(), pos);
      break;
    case "bottomleft":
      setPosx(getElementLeft(), pos);
      setPosy(getElementBottom(), pos);
      break;
    default:
    case "topleft":
      setPosx(getElementLeft(), pos);
      setPosy(getElementTop(), pos);
      break;
  }
  element = null;
  return pos;
}
function getBodyScrollTop() {
  return parentDocument.documentElement.scrollTop || parentDocument.body.scrollTop;
}
function getBodyScrollLeft() {
  return parentDocument.documentElement.scrollLeft || parentDocument.body.scrollLeft;
}
function getElementBottom() {
  return fixedParent ? elementRect.bottom : elementRect.bottom + getBodyScrollTop();
}
function getElementVCenter() {
  return getElementTop() + elementRect.height / 2;
}
function getElementTop() {
  return fixedParent ? elementRect.top : elementRect.top + getBodyScrollTop();
}
function getElementLeft() {
  return elementRect.left + getBodyScrollLeft();
}
function getElementRight() {
  var popupWidth = element && ((element.classList.contains("e-date-wrapper") || element.classList.contains("e-datetime-wrapper")) && element.classList.contains("e-rtl") || element.classList.contains("e-ddl") && element.classList.contains("e-rtl") || element.classList.contains("e-date-range-wrapper")) ? popupRect ? popupRect.width : 0 : popupRect && elementRect.width >= popupRect.width ? popupRect.width : 0;
  return elementRect.right + getBodyScrollLeft() - popupWidth;
}
function getElementHCenter() {
  return getElementLeft() + elementRect.width / 2;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/common/collision.js
var parentDocument2;
var targetContainer;
function fit(element2, viewPortElement, axis, position) {
  if (viewPortElement === void 0) {
    viewPortElement = null;
  }
  if (axis === void 0) {
    axis = {
      X: false,
      Y: false
    };
  }
  if (!axis.Y && !axis.X) {
    return {
      left: 0,
      top: 0
    };
  }
  var elemData = element2.getBoundingClientRect();
  targetContainer = viewPortElement;
  parentDocument2 = element2.ownerDocument;
  if (!position) {
    position = calculatePosition(element2, "left", "top");
  }
  if (axis.X) {
    var containerWidth = targetContainer ? getTargetContainerWidth() : getViewPortWidth();
    var containerLeft = ContainerLeft();
    var containerRight = ContainerRight();
    var overLeft = containerLeft - position.left;
    var overRight = position.left + elemData.width - containerRight;
    if (elemData.width > containerWidth) {
      if (overLeft > 0 && overRight <= 0) {
        position.left = containerRight - elemData.width;
      } else if (overRight > 0 && overLeft <= 0) {
        position.left = containerLeft;
      } else {
        position.left = overLeft > overRight ? containerRight - elemData.width : containerLeft;
      }
    } else if (overLeft > 0) {
      position.left += overLeft;
    } else if (overRight > 0) {
      position.left -= overRight;
    }
  }
  if (axis.Y) {
    var containerHeight = targetContainer ? getTargetContainerHeight() : getViewPortHeight();
    var containerTop = ContainerTop();
    var containerBottom = ContainerBottom();
    var overTop = containerTop - position.top;
    var overBottom = position.top + elemData.height - containerBottom;
    if (elemData.height > containerHeight) {
      if (overTop > 0 && overBottom <= 0) {
        position.top = containerBottom - elemData.height;
      } else if (overBottom > 0 && overTop <= 0) {
        position.top = containerTop;
      } else {
        position.top = overTop > overBottom ? containerBottom - elemData.height : containerTop;
      }
    } else if (overTop > 0) {
      position.top += overTop;
    } else if (overBottom > 0) {
      position.top -= overBottom;
    }
  }
  return position;
}
function isCollide(element2, viewPortElement, x, y) {
  if (viewPortElement === void 0) {
    viewPortElement = null;
  }
  var elemOffset = calculatePosition(element2, "left", "top");
  if (x) {
    elemOffset.left = x;
  }
  if (y) {
    elemOffset.top = y;
  }
  var data = [];
  targetContainer = viewPortElement;
  parentDocument2 = element2.ownerDocument;
  var elementRect2 = element2.getBoundingClientRect();
  var top = elemOffset.top;
  var left = elemOffset.left;
  var right = elemOffset.left + elementRect2.width;
  var bottom = elemOffset.top + elementRect2.height;
  var yAxis = topCollideCheck(top, bottom);
  var xAxis = leftCollideCheck(left, right);
  if (yAxis.topSide) {
    data.push("top");
  }
  if (xAxis.rightSide) {
    data.push("right");
  }
  if (xAxis.leftSide) {
    data.push("left");
  }
  if (yAxis.bottomSide) {
    data.push("bottom");
  }
  return data;
}
function flip(element2, target, offsetX, offsetY, positionX, positionY, viewPortElement, axis, fixedParent2) {
  if (viewPortElement === void 0) {
    viewPortElement = null;
  }
  if (axis === void 0) {
    axis = {
      X: true,
      Y: true
    };
  }
  if (!target || !element2 || !positionX || !positionY || !axis.X && !axis.Y) {
    return;
  }
  var tEdge = {
    TL: null,
    TR: null,
    BL: null,
    BR: null
  }, eEdge = {
    TL: null,
    TR: null,
    BL: null,
    BR: null
    /* eslint-enable */
  };
  var elementRect2;
  if (window.getComputedStyle(element2).display === "none") {
    var oldVisibility = element2.style.visibility;
    element2.style.visibility = "hidden";
    element2.style.display = "block";
    elementRect2 = element2.getBoundingClientRect();
    element2.style.removeProperty("display");
    element2.style.visibility = oldVisibility;
  } else {
    elementRect2 = element2.getBoundingClientRect();
  }
  var pos = {
    posX: positionX,
    posY: positionY,
    offsetX,
    offsetY,
    position: {
      left: 0,
      top: 0
    }
  };
  targetContainer = viewPortElement;
  parentDocument2 = target.ownerDocument;
  updateElementData(target, tEdge, pos, fixedParent2, elementRect2);
  setPosition(eEdge, pos, elementRect2);
  if (axis.X) {
    leftFlip(target, eEdge, tEdge, pos, elementRect2, true);
  }
  if (axis.Y && tEdge.TL.top > -1) {
    topFlip(target, eEdge, tEdge, pos, elementRect2, true);
  }
  setPopup(element2, pos, elementRect2);
}
function setPopup(element2, pos, elementRect2) {
  var left = 0;
  var top = 0;
  if (element2.offsetParent != null && (getComputedStyle(element2.offsetParent).position === "absolute" || getComputedStyle(element2.offsetParent).position === "relative")) {
    var data = calculatePosition(element2.offsetParent, "left", "top", false, elementRect2);
    left = data.left;
    top = data.top;
  }
  var scaleX = 1;
  var scaleY = 1;
  var tranformElement = getTransformElement(element2);
  if (tranformElement) {
    var transformStyle = getComputedStyle(tranformElement).transform;
    if (transformStyle !== "none") {
      var matrix = new DOMMatrix(transformStyle);
      scaleX = matrix.a;
      scaleY = matrix.d;
    }
    var zoomStyle = getComputedStyle(tranformElement).zoom;
    if (zoomStyle !== "none") {
      var bodyZoom = getZoomValue(document.body);
      scaleX = bodyZoom * scaleX;
      scaleY = bodyZoom * scaleY;
    }
  }
  element2.style.top = pos.position.top / scaleY + pos.offsetY - top / scaleY + "px";
  element2.style.left = pos.position.left / scaleX + pos.offsetX - left / scaleX + "px";
}
function getZoomValue(element2) {
  var zoomValue = getComputedStyle(element2).zoom;
  return parseFloat(zoomValue) || 1;
}
function getTransformElement(element2) {
  while (element2) {
    var transform = window.getComputedStyle(element2).transform;
    var zoom = getZoomValue(document.body);
    if (transform && transform !== "none" || zoom && zoom !== 1) {
      return element2;
    }
    if (element2 === document.body) {
      return null;
    }
    element2 = element2.offsetParent || element2.parentElement;
  }
  return null;
}
function updateElementData(target, edge, pos, fixedParent2, elementRect2) {
  pos.position = calculatePosition(target, pos.posX, pos.posY, fixedParent2, elementRect2);
  edge.TL = calculatePosition(target, "left", "top", fixedParent2, elementRect2);
  edge.TR = calculatePosition(target, "right", "top", fixedParent2, elementRect2);
  edge.BR = calculatePosition(target, "left", "bottom", fixedParent2, elementRect2);
  edge.BL = calculatePosition(target, "right", "bottom", fixedParent2, elementRect2);
}
function setPosition(eStatus, pos, elementRect2) {
  eStatus.TL = {
    top: pos.position.top + pos.offsetY,
    left: pos.position.left + pos.offsetX
  };
  eStatus.TR = {
    top: eStatus.TL.top,
    left: eStatus.TL.left + elementRect2.width
  };
  eStatus.BL = {
    top: eStatus.TL.top + elementRect2.height,
    left: eStatus.TL.left
  };
  eStatus.BR = {
    top: eStatus.TL.top + elementRect2.height,
    left: eStatus.TL.left + elementRect2.width
  };
}
function leftCollideCheck(left, right) {
  var leftSide = false, rightSide = false;
  if (left - getBodyScrollLeft2() < ContainerLeft()) {
    leftSide = true;
  }
  if (right > ContainerRight()) {
    rightSide = true;
  }
  return {
    leftSide,
    rightSide
  };
}
function leftFlip(target, edge, tEdge, pos, elementRect2, deepCheck) {
  var collideSide = leftCollideCheck(edge.TL.left, edge.TR.left);
  if (tEdge.TL.left - getBodyScrollLeft2() <= ContainerLeft()) {
    collideSide.leftSide = false;
  }
  if (tEdge.TR.left > ContainerRight()) {
    collideSide.rightSide = false;
  }
  if (collideSide.leftSide && !collideSide.rightSide || !collideSide.leftSide && collideSide.rightSide) {
    if (pos.posX === "right") {
      pos.posX = "left";
    } else {
      pos.posX = "right";
    }
    pos.offsetX = pos.offsetX + elementRect2.width;
    pos.offsetX = -1 * pos.offsetX;
    pos.position = calculatePosition(target, pos.posX, pos.posY, false);
    setPosition(edge, pos, elementRect2);
    if (deepCheck) {
      leftFlip(target, edge, tEdge, pos, elementRect2, false);
    }
  }
}
function topFlip(target, edge, tEdge, pos, elementRect2, deepCheck) {
  var collideSide = topCollideCheck(edge.TL.top, edge.BL.top);
  if (tEdge.TL.top - getBodyScrollTop2() <= ContainerTop()) {
    collideSide.topSide = false;
  }
  if (tEdge.BL.top >= ContainerBottom() && target.getBoundingClientRect().bottom < window.innerHeight) {
    collideSide.bottomSide = false;
  }
  if (collideSide.topSide && !collideSide.bottomSide || !collideSide.topSide && collideSide.bottomSide) {
    if (pos.posY === "top") {
      pos.posY = "bottom";
    } else {
      pos.posY = "top";
    }
    pos.offsetY = pos.offsetY + elementRect2.height;
    pos.offsetY = -1 * pos.offsetY;
    pos.position = calculatePosition(target, pos.posX, pos.posY, false, elementRect2);
    setPosition(edge, pos, elementRect2);
    if (deepCheck) {
      topFlip(target, edge, tEdge, pos, elementRect2, false);
    }
  }
}
function topCollideCheck(top, bottom) {
  var topSide = false, bottomSide = false;
  if (top - getBodyScrollTop2() < ContainerTop()) {
    topSide = true;
  }
  if (bottom > ContainerBottom()) {
    bottomSide = true;
  }
  return {
    topSide,
    bottomSide
  };
}
function getTargetContainerWidth() {
  return targetContainer.getBoundingClientRect().width;
}
function getTargetContainerHeight() {
  return targetContainer.getBoundingClientRect().height;
}
function getTargetContainerLeft() {
  return targetContainer.getBoundingClientRect().left;
}
function getTargetContainerTop() {
  return targetContainer.getBoundingClientRect().top;
}
function ContainerTop() {
  if (targetContainer) {
    return getTargetContainerTop();
  }
  return 0;
}
function ContainerLeft() {
  if (targetContainer) {
    return getTargetContainerLeft();
  }
  return 0;
}
function ContainerRight() {
  if (targetContainer) {
    return getBodyScrollLeft2() + getTargetContainerLeft() + getTargetContainerWidth();
  }
  return getBodyScrollLeft2() + getViewPortWidth();
}
function ContainerBottom() {
  if (targetContainer) {
    return getBodyScrollTop2() + getTargetContainerTop() + getTargetContainerHeight();
  }
  return getBodyScrollTop2() + getViewPortHeight();
}
function getBodyScrollTop2() {
  return parentDocument2.documentElement.scrollTop || parentDocument2.body.scrollTop;
}
function getBodyScrollLeft2() {
  return parentDocument2.documentElement.scrollLeft || parentDocument2.body.scrollLeft;
}
function getViewPortHeight() {
  return window.innerHeight;
}
function getViewPortWidth() {
  var windowWidth = window.innerWidth;
  var documentReact = document.documentElement.getBoundingClientRect();
  var offsetWidth = isNullOrUndefined2(document.documentElement) ? 0 : documentReact.width;
  return windowWidth - (windowWidth - offsetWidth);
}
function destroy() {
  targetContainer = null;
  parentDocument2 = null;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/popup/popup.js
var __extends13 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate14 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var PositionData = (
  /** @class */
  function(_super) {
    __extends13(PositionData2, _super);
    function PositionData2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate14([Property2("left")], PositionData2.prototype, "X", void 0);
    __decorate14([Property2("top")], PositionData2.prototype, "Y", void 0);
    return PositionData2;
  }(ChildProperty2)
);
var CLASSNAMES = {
  ROOT: "e-popup",
  RTL: "e-rtl",
  OPEN: "e-popup-open",
  CLOSE: "e-popup-close"
};
var Popup = (
  /** @class */
  function(_super) {
    __extends13(Popup2, _super);
    function Popup2(element2, options) {
      return _super.call(this, options, element2) || this;
    }
    Popup2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "width":
            setStyleAttribute2(this.element, {
              "width": formatUnit(newProp.width)
            });
            break;
          case "height":
            setStyleAttribute2(this.element, {
              "height": formatUnit(newProp.height)
            });
            break;
          case "zIndex":
            setStyleAttribute2(this.element, {
              "zIndex": newProp.zIndex
            });
            break;
          case "enableRtl":
            this.setEnableRtl();
            break;
          case "position":
          case "relateTo":
            this.refreshPosition();
            break;
          case "offsetX": {
            var x = newProp.offsetX - oldProp.offsetX;
            this.element.style.left = (parseInt(this.element.style.left, 10) + x).toString() + "px";
            break;
          }
          case "offsetY": {
            var y = newProp.offsetY - oldProp.offsetY;
            this.element.style.top = (parseInt(this.element.style.top, 10) + y).toString() + "px";
            break;
          }
          case "content":
            this.setContent();
            break;
          case "actionOnScroll":
            if (newProp.actionOnScroll !== "none") {
              this.wireScrollEvents();
            } else {
              this.unwireScrollEvents();
            }
            break;
        }
      }
    };
    Popup2.prototype.getModuleName = function() {
      return "popup";
    };
    Popup2.prototype.resolveCollision = function() {
      this.checkCollision();
    };
    Popup2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Popup2.prototype.destroy = function() {
      if (this.element.classList.contains("e-popup-open")) {
        this.unwireEvents();
      }
      this.element.classList.remove(CLASSNAMES.ROOT, CLASSNAMES.RTL, CLASSNAMES.OPEN, CLASSNAMES.CLOSE);
      this.content = null;
      this.relateTo = null;
      destroy();
      _super.prototype.destroy.call(this);
    };
    Popup2.prototype.render = function() {
      this.element.classList.add(CLASSNAMES.ROOT);
      var styles = {};
      if (this.zIndex !== 1e3) {
        styles.zIndex = this.zIndex;
      }
      if (this.width !== "auto") {
        styles.width = formatUnit(this.width);
      }
      if (this.height !== "auto") {
        styles.height = formatUnit(this.height);
      }
      setStyleAttribute2(this.element, styles);
      this.fixedParent = false;
      this.setEnableRtl();
      this.setContent();
    };
    Popup2.prototype.wireEvents = function() {
      if (Browser2.isDevice) {
        EventHandler2.add(window, "orientationchange", this.orientationOnChange, this);
      }
      if (this.actionOnScroll !== "none") {
        this.wireScrollEvents();
      }
    };
    Popup2.prototype.wireScrollEvents = function() {
      if (this.getRelateToElement()) {
        for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
          var parent_1 = _a[_i];
          EventHandler2.add(parent_1, "scroll", this.scrollRefresh, this);
        }
      }
    };
    Popup2.prototype.unwireEvents = function() {
      if (Browser2.isDevice) {
        EventHandler2.remove(window, "orientationchange", this.orientationOnChange);
      }
      if (this.actionOnScroll !== "none") {
        this.unwireScrollEvents();
      }
    };
    Popup2.prototype.unwireScrollEvents = function() {
      if (this.getRelateToElement()) {
        for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
          var parent_2 = _a[_i];
          EventHandler2.remove(parent_2, "scroll", this.scrollRefresh);
        }
      }
    };
    Popup2.prototype.getRelateToElement = function() {
      var relateToElement = this.relateTo === "" || isNullOrUndefined2(this.relateTo) ? document.body : this.relateTo;
      this.setProperties({
        relateTo: relateToElement
      }, true);
      return typeof this.relateTo === "string" ? document.querySelector(this.relateTo) : this.relateTo;
    };
    Popup2.prototype.scrollRefresh = function(e) {
      if (this.actionOnScroll === "reposition") {
        if (!isNullOrUndefined2(this.element) && !(this.element.offsetParent === e.target || this.element.offsetParent && this.element.offsetParent.tagName === "BODY" && e.target.parentElement == null)) {
          this.refreshPosition();
        }
      } else if (this.actionOnScroll === "hide") {
        this.hide();
      }
      if (this.actionOnScroll !== "none") {
        if (this.getRelateToElement()) {
          var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);
          if (!targetVisible && !this.targetInvisibleStatus) {
            this.trigger("targetExitViewport");
            this.targetInvisibleStatus = true;
          } else if (targetVisible) {
            this.targetInvisibleStatus = false;
          }
        }
      }
    };
    Popup2.prototype.isElementOnViewport = function(relateToElement, scrollElement) {
      var scrollParents = this.getScrollableParent(relateToElement);
      for (var parent_3 = 0; parent_3 < scrollParents.length; parent_3++) {
        if (this.isElementVisible(relateToElement, scrollParents[parent_3])) {
          continue;
        } else {
          return false;
        }
      }
      return true;
    };
    Popup2.prototype.isElementVisible = function(relateToElement, scrollElement) {
      var rect = this.checkGetBoundingClientRect(relateToElement);
      if (!rect.height || !rect.width) {
        return false;
      }
      if (!isNullOrUndefined2(this.checkGetBoundingClientRect(scrollElement))) {
        var parent_4 = scrollElement.getBoundingClientRect();
        return !(rect.bottom < parent_4.top) && !(rect.bottom > parent_4.bottom) && !(rect.right > parent_4.right) && !(rect.left < parent_4.left);
      } else {
        var win = window;
        var windowView = {
          top: win.scrollY,
          left: win.scrollX,
          right: win.scrollX + win.outerWidth,
          bottom: win.scrollY + win.outerHeight
        };
        var off = calculatePosition(relateToElement);
        var ele = {
          top: off.top,
          left: off.left,
          right: off.left + rect.width,
          bottom: off.top + rect.height
        };
        var elementView = {
          top: windowView.bottom - ele.top,
          left: windowView.right - ele.left,
          bottom: ele.bottom - windowView.top,
          right: ele.right - windowView.left
        };
        return elementView.top > 0 && elementView.left > 0 && elementView.right > 0 && elementView.bottom > 0;
      }
    };
    Popup2.prototype.preRender = function() {
    };
    Popup2.prototype.setEnableRtl = function() {
      this.reposition();
      if (this.enableRtl) {
        this.element.classList.add(CLASSNAMES.RTL);
      } else {
        this.element.classList.remove(CLASSNAMES.RTL);
      }
    };
    Popup2.prototype.setContent = function() {
      if (!isNullOrUndefined2(this.content)) {
        this.element.innerHTML = "";
        if (typeof this.content === "string") {
          this.element.textContent = this.content;
        } else {
          var relateToElem = this.getRelateToElement();
          var props = this.content.props;
          if (!relateToElem.classList.contains("e-dropdown-btn") || isNullOrUndefined2(props)) {
            this.element.appendChild(this.content);
          }
        }
      }
    };
    Popup2.prototype.orientationOnChange = function() {
      var _this = this;
      setTimeout(function() {
        _this.refreshPosition();
      }, 200);
    };
    Popup2.prototype.refreshPosition = function(target, collision) {
      if (!isNullOrUndefined2(target)) {
        this.checkFixedParent(target);
      }
      this.reposition();
      if (!collision) {
        this.checkCollision();
      }
    };
    Popup2.prototype.reposition = function() {
      var pos;
      var position;
      var relateToElement = this.getRelateToElement();
      if (typeof this.position.X === "number" && typeof this.position.Y === "number") {
        pos = {
          left: this.position.X,
          top: this.position.Y
        };
      } else if (typeof this.position.X === "string" && typeof this.position.Y === "number" || typeof this.position.X === "number" && typeof this.position.Y === "string") {
        var parentDisplay = void 0;
        var display = this.element.style.display;
        this.element.style.display = "block";
        if (this.element.classList.contains("e-dlg-modal")) {
          parentDisplay = this.element.parentElement.style.display;
          this.element.parentElement.style.display = "block";
        }
        position = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY);
        if (typeof this.position.X === "string") {
          pos = {
            left: position.left,
            top: this.position.Y
          };
        } else {
          pos = {
            left: this.position.X,
            top: position.top
          };
        }
        this.element.style.display = display;
        if (this.element.classList.contains("e-dlg-modal")) {
          this.element.parentElement.style.display = parentDisplay;
        }
      } else if (relateToElement) {
        var height = this.element.clientHeight;
        var display = this.element.style.display;
        this.element.style.display = "block";
        pos = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY, height);
        this.element.style.display = display;
      } else {
        pos = {
          left: 0,
          top: 0
        };
      }
      if (!isNullOrUndefined2(pos)) {
        this.element.style.left = pos.left + "px";
        this.element.style.top = pos.top + "px";
      }
    };
    Popup2.prototype.checkGetBoundingClientRect = function(ele) {
      var eleRect;
      try {
        eleRect = ele.getBoundingClientRect();
        return eleRect;
      } catch (error) {
        return null;
      }
    };
    Popup2.prototype.getAnchorPosition = function(anchorEle, ele, position, offsetX, offsetY, height) {
      if (height === void 0) {
        height = 0;
      }
      var eleRect = this.checkGetBoundingClientRect(ele);
      var anchorRect = this.checkGetBoundingClientRect(anchorEle);
      if (isNullOrUndefined2(eleRect) || isNullOrUndefined2(anchorRect)) {
        return null;
      }
      var anchor = anchorEle;
      var anchorPos = {
        left: 0,
        top: 0
      };
      if (ele.offsetParent && ele.offsetParent.tagName === "BODY" && anchorEle.tagName === "BODY") {
        anchorPos = calculatePosition(anchorEle);
      } else {
        if (ele.classList.contains("e-dlg-modal") && anchor.tagName !== "BODY") {
          ele = ele.parentElement;
        }
        anchorPos = calculateRelativeBasedPosition(anchor, ele);
      }
      switch (position.X) {
        default:
        case "left":
          break;
        case "center":
          if (ele.classList.contains("e-dlg-modal") && anchor.tagName === "BODY" && this.targetType === "container") {
            anchorPos.left += window.innerWidth / 2 - eleRect.width / 2;
          } else if (this.targetType === "container") {
            anchorPos.left += anchorRect.width / 2 - eleRect.width / 2;
          } else {
            anchorPos.left += anchorRect.width / 2;
          }
          break;
        case "right":
          if (ele.classList.contains("e-dlg-modal") && anchor.tagName === "BODY" && this.targetType === "container") {
            anchorPos.left += window.innerWidth - eleRect.width;
          } else if (this.targetType === "container") {
            var scaleX = 1;
            var tranformElement = getTransformElement(ele);
            if (tranformElement) {
              var transformStyle = getComputedStyle(tranformElement).transform;
              if (transformStyle !== "none") {
                var matrix = new DOMMatrix(transformStyle);
                scaleX = matrix.a;
              }
              var zoomStyle = getComputedStyle(tranformElement).zoom;
              if (zoomStyle !== "none") {
                var bodyZoom = getZoomValue(document.body);
                scaleX = bodyZoom * scaleX;
              }
            }
            anchorPos.left += (anchorRect.width - eleRect.width) / scaleX;
          } else {
            anchorPos.left += anchorRect.width;
          }
          break;
      }
      switch (position.Y) {
        default:
        case "top":
          break;
        case "center":
          if (ele.classList.contains("e-dlg-modal") && anchor.tagName === "BODY" && this.targetType === "container") {
            anchorPos.top += window.innerHeight / 2 - eleRect.height / 2;
          } else if (this.targetType === "container") {
            anchorPos.top += anchorRect.height / 2 - eleRect.height / 2;
          } else {
            anchorPos.top += anchorRect.height / 2;
          }
          break;
        case "bottom":
          if (ele.classList.contains("e-dlg-modal") && anchor.tagName === "BODY" && this.targetType === "container") {
            anchorPos.top += window.innerHeight - eleRect.height;
          } else if (this.targetType === "container" && !ele.classList.contains("e-dialog")) {
            anchorPos.top += anchorRect.height - eleRect.height;
          } else if (this.targetType === "container" && ele.classList.contains("e-dialog")) {
            anchorPos.top += anchorRect.height - height;
          } else {
            anchorPos.top += anchorRect.height;
          }
          break;
      }
      anchorPos.left += offsetX;
      anchorPos.top += offsetY;
      return anchorPos;
    };
    Popup2.prototype.callFlip = function(param) {
      var relateToElement = this.getRelateToElement();
      flip(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);
    };
    Popup2.prototype.callFit = function(param) {
      if (isCollide(this.element, this.viewPortElement).length !== 0) {
        if (isNullOrUndefined2(this.viewPortElement)) {
          var data = fit(this.element, this.viewPortElement, param);
          if (param.X) {
            this.element.style.left = data.left + "px";
          }
          if (param.Y) {
            this.element.style.top = data.top + "px";
          }
        } else {
          var elementRect2 = this.checkGetBoundingClientRect(this.element);
          var viewPortRect = this.checkGetBoundingClientRect(this.viewPortElement);
          if (isNullOrUndefined2(elementRect2) || isNullOrUndefined2(viewPortRect)) {
            return null;
          }
          if (param && param.Y === true) {
            if (viewPortRect.top > elementRect2.top) {
              this.element.style.top = "0px";
            } else if (viewPortRect.bottom < elementRect2.bottom) {
              this.element.style.top = parseInt(this.element.style.top, 10) - (elementRect2.bottom - viewPortRect.bottom) + "px";
            }
          }
          if (param && param.X === true) {
            if (viewPortRect.right < elementRect2.right) {
              this.element.style.left = parseInt(this.element.style.left, 10) - (elementRect2.right - viewPortRect.right) + "px";
            } else if (viewPortRect.left > elementRect2.left) {
              this.element.style.left = parseInt(this.element.style.left, 10) + (viewPortRect.left - elementRect2.left) + "px";
            }
          }
        }
      }
    };
    Popup2.prototype.checkCollision = function() {
      var horz = this.collision.X;
      var vert = this.collision.Y;
      if (horz === "none" && vert === "none") {
        return;
      }
      if (horz === "flip" && vert === "flip") {
        this.callFlip({
          X: true,
          Y: true
        });
      } else if (horz === "fit" && vert === "fit") {
        this.callFit({
          X: true,
          Y: true
        });
      } else {
        if (horz === "flip") {
          this.callFlip({
            X: true,
            Y: false
          });
        } else if (vert === "flip") {
          this.callFlip({
            Y: true,
            X: false
          });
        }
        if (horz === "fit") {
          this.callFit({
            X: true,
            Y: false
          });
        } else if (vert === "fit") {
          this.callFit({
            X: false,
            Y: true
          });
        }
      }
    };
    Popup2.prototype.show = function(animationOptions, relativeElement) {
      var _this = this;
      var relateToElement = this.getRelateToElement();
      if (relateToElement.classList.contains("e-filemanager")) {
        this.fmDialogContainer = this.element.getElementsByClassName("e-file-select-wrap")[0];
      }
      this.wireEvents();
      if (!isNullOrUndefined2(this.fmDialogContainer) && Browser2.isIos) {
        this.fmDialogContainer.style.display = "block";
      }
      if (this.zIndex === 1e3 || !isNullOrUndefined2(relativeElement)) {
        var zIndexElement = isNullOrUndefined2(relativeElement) ? this.element : relativeElement;
        this.zIndex = getZindexPartial(zIndexElement);
        setStyleAttribute2(this.element, {
          "zIndex": this.zIndex
        });
      }
      animationOptions = !isNullOrUndefined2(animationOptions) && typeof animationOptions === "object" ? animationOptions : this.showAnimation;
      if (this.collision.X !== "none" || this.collision.Y !== "none") {
        removeClass2([this.element], CLASSNAMES.CLOSE);
        addClass2([this.element], CLASSNAMES.OPEN);
        this.checkCollision();
        removeClass2([this.element], CLASSNAMES.OPEN);
        addClass2([this.element], CLASSNAMES.CLOSE);
      }
      if (!isNullOrUndefined2(animationOptions)) {
        animationOptions.begin = function() {
          if (!_this.isDestroyed) {
            removeClass2([_this.element], CLASSNAMES.CLOSE);
            addClass2([_this.element], CLASSNAMES.OPEN);
          }
        };
        animationOptions.end = function() {
          if (!_this.isDestroyed) {
            _this.trigger("open");
          }
        };
        new Animation2(animationOptions).animate(this.element);
      } else {
        removeClass2([this.element], CLASSNAMES.CLOSE);
        addClass2([this.element], CLASSNAMES.OPEN);
        this.trigger("open");
      }
    };
    Popup2.prototype.hide = function(animationOptions) {
      var _this = this;
      animationOptions = !isNullOrUndefined2(animationOptions) && typeof animationOptions === "object" ? animationOptions : this.hideAnimation;
      if (!isNullOrUndefined2(animationOptions)) {
        animationOptions.end = function() {
          if (!_this.isDestroyed) {
            removeClass2([_this.element], CLASSNAMES.OPEN);
            addClass2([_this.element], CLASSNAMES.CLOSE);
            _this.trigger("close");
          }
        };
        new Animation2(animationOptions).animate(this.element);
      } else {
        removeClass2([this.element], CLASSNAMES.OPEN);
        addClass2([this.element], CLASSNAMES.CLOSE);
        this.trigger("close");
      }
      this.unwireEvents();
    };
    Popup2.prototype.getScrollableParent = function(element2) {
      this.checkFixedParent(element2);
      return getScrollableParent(element2, this.fixedParent);
    };
    Popup2.prototype.checkFixedParent = function(element2) {
      var parent = element2.parentElement;
      while (parent && parent.tagName !== "HTML") {
        var parentStyle = getComputedStyle(parent);
        if ((parentStyle.position === "fixed" || parentStyle.position === "sticky") && !isNullOrUndefined2(this.element) && this.element.offsetParent && this.element.offsetParent.tagName === "BODY" && getComputedStyle(this.element.offsetParent).overflow !== "hidden") {
          this.element.style.top = window.scrollY > parseInt(this.element.style.top, 10) ? formatUnit(window.scrollY - parseInt(this.element.style.top, 10)) : formatUnit(parseInt(this.element.style.top, 10) - window.scrollY);
          this.element.style.position = "fixed";
          this.fixedParent = true;
        }
        parent = parent.parentElement;
        if (!isNullOrUndefined2(this.element) && isNullOrUndefined2(this.element.offsetParent) && parentStyle.position === "fixed" && this.element.style.position === "fixed") {
          this.fixedParent = true;
        }
      }
    };
    __decorate14([Property2("auto")], Popup2.prototype, "height", void 0);
    __decorate14([Property2("auto")], Popup2.prototype, "width", void 0);
    __decorate14([Property2(null)], Popup2.prototype, "content", void 0);
    __decorate14([Property2("container")], Popup2.prototype, "targetType", void 0);
    __decorate14([Property2(null)], Popup2.prototype, "viewPortElement", void 0);
    __decorate14([Property2({
      X: "none",
      Y: "none"
    })], Popup2.prototype, "collision", void 0);
    __decorate14([Property2("")], Popup2.prototype, "relateTo", void 0);
    __decorate14([Complex2({}, PositionData)], Popup2.prototype, "position", void 0);
    __decorate14([Property2(0)], Popup2.prototype, "offsetX", void 0);
    __decorate14([Property2(0)], Popup2.prototype, "offsetY", void 0);
    __decorate14([Property2(1e3)], Popup2.prototype, "zIndex", void 0);
    __decorate14([Property2(false)], Popup2.prototype, "enableRtl", void 0);
    __decorate14([Property2("reposition")], Popup2.prototype, "actionOnScroll", void 0);
    __decorate14([Property2(null)], Popup2.prototype, "showAnimation", void 0);
    __decorate14([Property2(null)], Popup2.prototype, "hideAnimation", void 0);
    __decorate14([Event3()], Popup2.prototype, "open", void 0);
    __decorate14([Event3()], Popup2.prototype, "close", void 0);
    __decorate14([Event3()], Popup2.prototype, "targetExitViewport", void 0);
    Popup2 = __decorate14([NotifyPropertyChanges2], Popup2);
    return Popup2;
  }(Component3)
);
function getScrollableParent(element2, fixedParent2) {
  var eleStyle = getComputedStyle(element2);
  var scrollParents = [];
  var overflowRegex = /(auto|scroll)/;
  var parent = element2.parentElement;
  while (parent && parent.tagName !== "HTML") {
    var parentStyle = getComputedStyle(parent);
    if (!(eleStyle.position === "absolute" && parentStyle.position === "static") && overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {
      scrollParents.push(parent);
    }
    parent = parent.parentElement;
  }
  if (!fixedParent2) {
    scrollParents.push(document);
  }
  return scrollParents;
}
function getZindexPartial(element2) {
  var parent = element2.parentElement;
  var parentZindex = [];
  while (parent) {
    if (parent.tagName !== "BODY") {
      var index = document.defaultView.getComputedStyle(parent, null).getPropertyValue("z-index");
      var position = document.defaultView.getComputedStyle(parent, null).getPropertyValue("position");
      if (index !== "auto" && position !== "static") {
        parentZindex.push(index);
      }
      parent = parent.parentElement;
    } else {
      break;
    }
  }
  var childrenZindex = [];
  for (var i = 0; i < document.body.children.length; i++) {
    if (!element2.isEqualNode(document.body.children[i])) {
      var index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue("z-index");
      var position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue("position");
      if (index !== "auto" && position !== "static") {
        childrenZindex.push(index);
      }
    }
  }
  childrenZindex.push("999");
  var siblingsZindex = [];
  if (!isNullOrUndefined2(element2.parentElement) && element2.parentElement.tagName !== "BODY") {
    var childNodes = [].slice.call(element2.parentElement.children);
    for (var i = 0; i < childNodes.length; i++) {
      if (!element2.isEqualNode(childNodes[i])) {
        var index = document.defaultView.getComputedStyle(childNodes[i], null).getPropertyValue("z-index");
        var position = document.defaultView.getComputedStyle(childNodes[i], null).getPropertyValue("position");
        if (index !== "auto" && position !== "static") {
          siblingsZindex.push(index);
        }
      }
    }
  }
  var finalValue = parentZindex.concat(childrenZindex, siblingsZindex);
  var currentZindexValue = Math.max.apply(Math, finalValue) + 1;
  return currentZindexValue > 2147483647 ? 2147483647 : currentZindexValue;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/common/common.js
function wrapperInitialize(createElement4, tag, type, element2, WRAPPER7, role) {
  var input2 = element2;
  if (element2.tagName === tag) {
    var ejInstance = getValue2("ej2_instances", element2);
    input2 = createElement4("input", {
      attrs: {
        "type": type
      }
    });
    var props = ["change", "cssClass", "label", "labelPosition", "id"];
    for (var index = 0, len = element2.attributes.length; index < len; index++) {
      if (props.indexOf(element2.attributes[index].nodeName) === -1) {
        input2.setAttribute(element2.attributes[index].nodeName, element2.attributes[index].nodeValue);
      }
    }
    attributes2(element2, {
      "class": WRAPPER7
    });
    element2.appendChild(input2);
    element2.classList.add(role);
    element2.classList.remove(role);
    setValue3("ej2_instances", ejInstance, input2);
    deleteObject2(element2, "ej2_instances");
  }
  return input2;
}
function getTextNode(element2) {
  var node;
  var childnode = element2.childNodes;
  for (var i = 0; i < childnode.length; i++) {
    node = childnode[i];
    if (node.nodeType === 3) {
      return node;
    }
  }
  return null;
}
function destroy2(ejInst, wrapper, tagName) {
  if (tagName === "INPUT") {
    wrapper.parentNode.insertBefore(ejInst.element, wrapper);
    detach2(wrapper);
    ejInst.element.checked = false;
    ["name", "value", "disabled"].forEach(function(key) {
      ejInst.element.removeAttribute(key);
    });
  } else {
    ["role", "aria-checked", "class"].forEach(function(key) {
      wrapper.removeAttribute(key);
    });
    wrapper.innerHTML = "";
    ejInst.element = wrapper;
  }
}
function preRender(proxy, control, wrapper, element2, moduleName) {
  element2 = wrapperInitialize(proxy.createElement, control, "checkbox", element2, wrapper, moduleName);
  proxy.element = element2;
  if (proxy.element.getAttribute("type") !== "checkbox") {
    proxy.element.setAttribute("type", "checkbox");
  }
  if (!proxy.element.id) {
    proxy.element.id = getUniqueID("e-" + moduleName);
  }
}
function createCheckBox(createElement4, enableRipple, options) {
  if (enableRipple === void 0) {
    enableRipple = false;
  }
  if (options === void 0) {
    options = {};
  }
  var wrapper = createElement4("div", {
    className: "e-checkbox-wrapper e-css"
  });
  if (options.cssClass) {
    addClass2([wrapper], options.cssClass.split(" "));
  }
  if (options.enableRtl) {
    wrapper.classList.add("e-rtl");
  }
  if (enableRipple) {
    var rippleSpan = createElement4("span", {
      className: "e-ripple-container"
    });
    rippleEffect(rippleSpan, {
      isCenterRipple: true,
      duration: 400
    });
    wrapper.appendChild(rippleSpan);
  }
  var frameSpan = createElement4("span", {
    className: "e-frame e-icons"
  });
  if (options.checked) {
    frameSpan.classList.add("e-check");
  }
  wrapper.appendChild(frameSpan);
  if (options.label) {
    var labelSpan = createElement4("span", {
      className: "e-label"
    });
    if (options.disableHtmlEncode) {
      labelSpan.textContent = options.label;
    } else {
      labelSpan.innerHTML = options.label;
    }
    wrapper.appendChild(labelSpan);
  }
  return wrapper;
}
function rippleMouseHandler(e, rippleSpan) {
  if (rippleSpan) {
    var event_1 = document.createEvent("MouseEvents");
    event_1.initEvent(e.type, false, true);
    rippleSpan.dispatchEvent(event_1);
  }
}
function setHiddenInput(proxy, wrap) {
  if (proxy.element.getAttribute("ejs-for")) {
    wrap.appendChild(proxy.createElement("input", {
      attrs: {
        "name": proxy.name || proxy.element.name,
        "value": "false",
        "type": "hidden"
      }
    }));
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/button/button.js
var __extends14 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate15 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var IconPosition;
(function(IconPosition3) {
  IconPosition3["Left"] = "Left";
  IconPosition3["Right"] = "Right";
  IconPosition3["Top"] = "Top";
  IconPosition3["Bottom"] = "Bottom";
})(IconPosition || (IconPosition = {}));
var buttonObserver = new Observer2();
var cssClassName = {
  RTL: "e-rtl",
  BUTTON: "e-btn",
  PRIMARY: "e-primary",
  ICONBTN: "e-icon-btn"
};
var Button = (
  /** @class */
  function(_super) {
    __extends14(Button3, _super);
    function Button3(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Button3.prototype.preRender = function() {
    };
    Button3.prototype.render = function() {
      this.initialize();
      this.removeRippleEffect = rippleEffect(this.element, {
        selector: "." + cssClassName.BUTTON
      });
      this.renderComplete();
    };
    Button3.prototype.initialize = function() {
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.isPrimary) {
        this.element.classList.add(cssClassName.PRIMARY);
      }
      if (!isBlazor2() || isBlazor2() && this.getModuleName() !== "progress-btn") {
        if (this.content) {
          var tempContent = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(this.content) : this.content;
          this.element.innerHTML = tempContent;
        }
        this.setIconCss();
      }
      if (this.enableRtl) {
        this.element.classList.add(cssClassName.RTL);
      }
      if (this.disabled) {
        this.controlStatus(this.disabled);
      } else {
        this.wireEvents();
      }
    };
    Button3.prototype.controlStatus = function(disabled) {
      this.element.disabled = disabled;
    };
    Button3.prototype.setIconCss = function() {
      if (this.iconCss) {
        var span = this.createElement("span", {
          className: "e-btn-icon " + this.iconCss
        });
        if (!this.element.textContent.trim()) {
          this.element.classList.add(cssClassName.ICONBTN);
        } else {
          span.classList.add("e-icon-" + this.iconPosition.toLowerCase());
          if (this.iconPosition === "Top" || this.iconPosition === "Bottom") {
            this.element.classList.add("e-" + this.iconPosition.toLowerCase() + "-icon-btn");
          }
        }
        var node = this.element.childNodes[0];
        if (node && (this.iconPosition === "Left" || this.iconPosition === "Top")) {
          this.element.insertBefore(span, node);
        } else {
          this.element.appendChild(span);
        }
      }
    };
    Button3.prototype.wireEvents = function() {
      if (this.isToggle) {
        EventHandler2.add(this.element, "click", this.btnClickHandler, this);
      }
    };
    Button3.prototype.unWireEvents = function() {
      if (this.isToggle) {
        EventHandler2.remove(this.element, "click", this.btnClickHandler);
      }
    };
    Button3.prototype.btnClickHandler = function() {
      if (this.element.classList.contains("e-active")) {
        this.element.classList.remove("e-active");
      } else {
        this.element.classList.add("e-active");
      }
    };
    Button3.prototype.destroy = function() {
      var classList2 = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, "e-success", "e-info", "e-danger", "e-warning", "e-flat", "e-outline", "e-small", "e-bigger", "e-active", "e-round", "e-top-icon-btn", "e-bottom-icon-btn"];
      if (this.cssClass) {
        classList2 = classList2.concat(this.cssClass.split(" "));
      }
      _super.prototype.destroy.call(this);
      removeClass2([this.element], classList2);
      if (!this.element.getAttribute("class")) {
        this.element.removeAttribute("class");
      }
      if (this.disabled) {
        this.element.removeAttribute("disabled");
      }
      if (this.content) {
        this.element.innerHTML = this.element.innerHTML.replace(this.content, "");
      }
      var span = this.element.querySelector("span.e-btn-icon");
      if (span) {
        detach2(span);
      }
      this.unWireEvents();
      if (isRippleEnabled) {
        this.removeRippleEffect();
      }
    };
    Button3.prototype.getModuleName = function() {
      return "btn";
    };
    Button3.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Button3.Inject = function() {
    };
    Button3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var span = this.element.querySelector("span.e-btn-icon");
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "isPrimary":
            if (newProp.isPrimary) {
              this.element.classList.add(cssClassName.PRIMARY);
            } else {
              this.element.classList.remove(cssClassName.PRIMARY);
            }
            break;
          case "disabled":
            this.controlStatus(newProp.disabled);
            break;
          case "iconCss": {
            span = this.element.querySelector("span.e-btn-icon");
            if (span) {
              if (newProp.iconCss) {
                span.className = "e-btn-icon " + newProp.iconCss;
                if (this.element.textContent.trim()) {
                  if (this.iconPosition === "Left") {
                    span.classList.add("e-icon-left");
                  } else {
                    span.classList.add("e-icon-right");
                  }
                }
              } else {
                detach2(span);
              }
            } else {
              this.setIconCss();
            }
            break;
          }
          case "iconPosition":
            removeClass2([this.element], ["e-top-icon-btn", "e-bottom-icon-btn"]);
            span = this.element.querySelector("span.e-btn-icon");
            if (span) {
              detach2(span);
            }
            this.setIconCss();
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.element], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([this.element], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              this.element.classList.add(cssClassName.RTL);
            } else {
              this.element.classList.remove(cssClassName.RTL);
            }
            break;
          case "content": {
            var node = getTextNode(this.element);
            if (!node) {
              this.element.classList.remove(cssClassName.ICONBTN);
            }
            if (!isBlazor2() || isBlazor2() && !this.isServerRendered && this.getModuleName() !== "progress-btn") {
              if (this.enableHtmlSanitizer) {
                newProp.content = SanitizeHtmlHelper2.sanitize(newProp.content);
              }
              this.element.innerHTML = newProp.content;
              this.setIconCss();
            }
            break;
          }
          case "isToggle":
            if (newProp.isToggle) {
              EventHandler2.add(this.element, "click", this.btnClickHandler, this);
            } else {
              EventHandler2.remove(this.element, "click", this.btnClickHandler);
              removeClass2([this.element], ["e-active"]);
            }
            break;
        }
      }
    };
    Button3.prototype.click = function() {
      this.element.click();
    };
    Button3.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate15([Property2("Left")], Button3.prototype, "iconPosition", void 0);
    __decorate15([Property2("")], Button3.prototype, "iconCss", void 0);
    __decorate15([Property2(false)], Button3.prototype, "disabled", void 0);
    __decorate15([Property2(false)], Button3.prototype, "isPrimary", void 0);
    __decorate15([Property2("")], Button3.prototype, "cssClass", void 0);
    __decorate15([Property2("")], Button3.prototype, "content", void 0);
    __decorate15([Property2(false)], Button3.prototype, "isToggle", void 0);
    __decorate15([Property2()], Button3.prototype, "locale", void 0);
    __decorate15([Property2(true)], Button3.prototype, "enableHtmlSanitizer", void 0);
    __decorate15([Event3()], Button3.prototype, "created", void 0);
    Button3 = __decorate15([NotifyPropertyChanges2], Button3);
    return Button3;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/check-box/check-box.js
var __extends15 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate16 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CHECK = "e-check";
var DISABLED = "e-checkbox-disabled";
var FRAME = "e-frame";
var INDETERMINATE = "e-stop";
var LABEL = "e-label";
var RIPPLE = "e-ripple-container";
var RIPPLECHECK = "e-ripple-check";
var RIPPLEINDETERMINATE = "e-ripple-stop";
var RTL = "e-rtl";
var WRAPPER = "e-checkbox-wrapper";
var containerAttr = ["title", "class", "style", "disabled", "readonly", "name", "value", "id", "tabindex", "aria-label", "required"];
var CheckBox = (
  /** @class */
  function(_super) {
    __extends15(CheckBox3, _super);
    function CheckBox3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isFocused = false;
      _this.isMouseClick = false;
      _this.clickTriggered = false;
      _this.validCheck = true;
      _this.type = "checkbox";
      return _this;
    }
    CheckBox3.prototype.changeState = function(state, isInitialize, isInterAction) {
      var wrapper = this.getWrapper();
      var rippleSpan = null;
      var frameSpan = null;
      if (wrapper) {
        frameSpan = wrapper.getElementsByClassName(FRAME)[0];
        if (isRippleEnabled) {
          rippleSpan = wrapper.getElementsByClassName(RIPPLE)[0];
        }
      }
      if (state === "check") {
        if (frameSpan) {
          frameSpan.classList.remove(INDETERMINATE);
          frameSpan.classList.add(CHECK);
        }
        if (rippleSpan) {
          rippleSpan.classList.remove(RIPPLEINDETERMINATE);
          rippleSpan.classList.add(RIPPLECHECK);
        }
        this.element.checked = true;
        if ((this.element.required || closest2(this.element, "form") && closest2(this.element, "form").classList.contains("e-formvalidator")) && this.validCheck && !isInitialize && isInterAction) {
          this.element.checked = false;
          this.validCheck = false;
        } else if (this.element.required || closest2(this.element, "form") && closest2(this.element, "form").classList.contains("e-formvalidator")) {
          this.validCheck = true;
        }
      } else if (state === "uncheck") {
        if (frameSpan) {
          removeClass2([frameSpan], [CHECK, INDETERMINATE]);
        }
        if (rippleSpan) {
          removeClass2([rippleSpan], [RIPPLECHECK, RIPPLEINDETERMINATE]);
        }
        this.element.checked = false;
        if ((this.element.required || closest2(this.element, "form") && closest2(this.element, "form").classList.contains("e-formvalidator")) && this.validCheck && !isInitialize && isInterAction) {
          this.element.checked = true;
          this.validCheck = false;
        } else if (this.element.required || closest2(this.element, "form") && closest2(this.element, "form").classList.contains("e-formvalidator")) {
          this.validCheck = true;
        }
      } else {
        if (frameSpan) {
          frameSpan.classList.remove(CHECK);
          frameSpan.classList.add(INDETERMINATE);
        }
        if (rippleSpan) {
          rippleSpan.classList.remove(RIPPLECHECK);
          rippleSpan.classList.add(RIPPLEINDETERMINATE);
        }
        this.element.indeterminate = true;
        this.indeterminate = true;
      }
    };
    CheckBox3.prototype.clickHandler = function(event2) {
      if (event2.target.tagName === "INPUT" && this.clickTriggered) {
        this.changeState(this.checked ? "check" : "uncheck");
        this.clickTriggered = false;
        return;
      }
      if (event2.target.tagName === "SPAN" || event2.target.tagName === "LABEL" || closest2(event2.target, ".e-label")) {
        this.clickTriggered = true;
      }
      if (this.isMouseClick) {
        this.focusOutHandler();
        this.isMouseClick = false;
      }
      if (this.indeterminate) {
        this.changeState(this.checked ? "check" : "uncheck", false, true);
        this.indeterminate = false;
        this.element.indeterminate = false;
      } else if (this.checked) {
        this.changeState("uncheck", false, true);
        this.checked = false;
      } else {
        this.changeState("check", false, true);
        this.checked = true;
      }
      var changeEventArgs = {
        checked: this.updateVueArrayModel(false),
        event: event2
      };
      this.trigger("change", changeEventArgs);
      event2.stopPropagation();
    };
    CheckBox3.prototype.destroy = function() {
      var _this = this;
      var wrapper = this.getWrapper();
      _super.prototype.destroy.call(this);
      if (this.wrapper) {
        wrapper = this.wrapper;
        if (!this.disabled) {
          this.unWireEvents();
        }
        if (this.tagName === "INPUT") {
          if (this.getWrapper() && wrapper.parentNode) {
            wrapper.parentNode.insertBefore(this.element, wrapper);
          }
          detach2(wrapper);
          this.element.checked = false;
          if (this.indeterminate) {
            this.element.indeterminate = false;
          }
          ["name", "value", "disabled"].forEach(function(key) {
            _this.element.removeAttribute(key);
          });
        } else {
          ["class"].forEach(function(key) {
            wrapper.removeAttribute(key);
          });
          wrapper.innerHTML = "";
          this.element = wrapper;
          if (this.refreshing) {
            ["e-control", "e-checkbox", "e-lib"].forEach(function(key) {
              _this.element.classList.add(key);
            });
            setValue3("ej2_instances", [this], this.element);
          }
        }
      }
    };
    CheckBox3.prototype.focusHandler = function() {
      this.isFocused = true;
    };
    CheckBox3.prototype.focusOutHandler = function() {
      var wrapper = this.getWrapper();
      if (wrapper) {
        wrapper.classList.remove("e-focus");
      }
      this.isFocused = false;
    };
    CheckBox3.prototype.getModuleName = function() {
      return "checkbox";
    };
    CheckBox3.prototype.getPersistData = function() {
      return this.addOnPersist(["checked", "indeterminate"]);
    };
    CheckBox3.prototype.getWrapper = function() {
      if (this.element && this.element.parentElement) {
        return this.element.parentElement.parentElement;
      } else {
        return null;
      }
    };
    CheckBox3.prototype.getLabel = function() {
      if (this.element) {
        return this.element.parentElement;
      } else {
        return null;
      }
    };
    CheckBox3.prototype.initialize = function() {
      if (isNullOrUndefined2(this.initialCheckedValue)) {
        this.initialCheckedValue = this.checked;
      }
      if (this.name) {
        this.element.setAttribute("name", this.name);
      }
      if (this.value) {
        this.element.setAttribute("value", this.value);
        if (this.isVue && typeof this.value === "boolean" && this.value === true) {
          this.setProperties({
            "checked": true
          }, true);
        }
      }
      if (this.checked) {
        this.changeState("check", true);
      }
      if (this.indeterminate) {
        this.changeState();
      }
      if (this.disabled) {
        this.setDisabled();
      }
    };
    CheckBox3.prototype.initWrapper = function() {
      var wrapper = this.element.parentElement;
      if (!wrapper.classList.contains(WRAPPER)) {
        wrapper = this.createElement("div", {
          className: WRAPPER
        });
        if (this.element.parentNode) {
          this.element.parentNode.insertBefore(wrapper, this.element);
        }
      }
      var label = this.createElement("label", {
        attrs: {
          for: this.htmlAttributes.id ? this.htmlAttributes.id : this.element.id
        }
      });
      var frameSpan = this.createElement("span", {
        className: "e-icons " + FRAME
      });
      wrapper.classList.add("e-wrapper");
      if (this.enableRtl) {
        wrapper.classList.add(RTL);
      }
      if (this.cssClass) {
        addClass2([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      wrapper.appendChild(label);
      label.appendChild(this.element);
      setHiddenInput(this, label);
      label.appendChild(frameSpan);
      if (isRippleEnabled) {
        var rippleSpan = this.createElement("span", {
          className: RIPPLE
        });
        if (this.labelPosition === "Before") {
          label.appendChild(rippleSpan);
        } else {
          label.insertBefore(rippleSpan, frameSpan);
        }
        rippleEffect(rippleSpan, {
          duration: 400,
          isCenterRipple: true
        });
      }
      if (this.label) {
        this.setText(this.label);
      }
    };
    CheckBox3.prototype.keyUpHandler = function() {
      if (this.isFocused) {
        this.getWrapper().classList.add("e-focus");
      }
    };
    CheckBox3.prototype.labelMouseDownHandler = function(e) {
      this.isMouseClick = true;
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
      rippleMouseHandler(e, rippleSpan);
    };
    CheckBox3.prototype.labelMouseLeaveHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler(e, rippleSpan);
      }
    };
    CheckBox3.prototype.labelMouseUpHandler = function(e) {
      this.isMouseClick = true;
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = 0; i < rippleElem.length - 1; i++) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler(e, rippleSpan);
      }
    };
    CheckBox3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrapper = this.getWrapper();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "checked":
            this.indeterminate = false;
            this.element.indeterminate = false;
            this.changeState(newProp.checked ? "check" : "uncheck");
            break;
          case "indeterminate":
            if (newProp.indeterminate) {
              this.changeState();
            } else {
              this.element.indeterminate = false;
              this.changeState(this.checked ? "check" : "uncheck");
            }
            break;
          case "disabled":
            if (newProp.disabled) {
              this.setDisabled();
              this.wrapper = this.getWrapper();
              this.unWireEvents();
            } else {
              this.element.disabled = false;
              wrapper.classList.remove(DISABLED);
              wrapper.setAttribute("aria-disabled", "false");
              this.wireEvents();
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([wrapper], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([wrapper], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              wrapper.classList.add(RTL);
            } else {
              wrapper.classList.remove(RTL);
            }
            break;
          case "label":
            this.setText(newProp.label);
            break;
          case "labelPosition": {
            var label = wrapper.getElementsByClassName(LABEL)[0];
            var labelWrap = wrapper.getElementsByTagName("label")[0];
            detach2(label);
            if (newProp.labelPosition === "After") {
              labelWrap.appendChild(label);
            } else {
              labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);
            }
            break;
          }
          case "name":
            this.element.setAttribute("name", newProp.name);
            break;
          case "value":
            if (this.isVue && typeof newProp.value === "object") {
              break;
            }
            this.element.setAttribute("value", newProp.value);
            break;
          case "htmlAttributes":
            this.updateHtmlAttributeToWrapper();
            break;
        }
      }
    };
    CheckBox3.prototype.preRender = function() {
      var element2 = this.element;
      this.tagName = this.element.tagName;
      element2 = wrapperInitialize(this.createElement, "EJS-CHECKBOX", "checkbox", element2, WRAPPER, "checkbox");
      this.element = element2;
      if (this.element.getAttribute("type") !== "checkbox") {
        this.element.setAttribute("type", "checkbox");
      }
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
    };
    CheckBox3.prototype.render = function() {
      this.initWrapper();
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      this.updateHtmlAttributeToWrapper();
      this.updateVueArrayModel(true);
      this.renderComplete();
      this.wrapper = this.getWrapper();
    };
    CheckBox3.prototype.setDisabled = function() {
      var wrapper = this.getWrapper();
      this.element.disabled = true;
      wrapper.classList.add(DISABLED);
      wrapper.setAttribute("aria-disabled", "true");
    };
    CheckBox3.prototype.setText = function(text) {
      var wrapper = this.getWrapper();
      if (!wrapper) {
        return;
      }
      var label = wrapper.getElementsByClassName(LABEL)[0];
      if (label) {
        label.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(text) : text;
      } else {
        text = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(text) : text;
        label = this.createElement("span", {
          className: LABEL,
          innerHTML: text
        });
        var labelWrap = wrapper.getElementsByTagName("label")[0];
        if (this.labelPosition === "Before") {
          labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);
        } else {
          labelWrap.appendChild(label);
        }
      }
    };
    CheckBox3.prototype.changeHandler = function(e) {
      e.stopPropagation();
    };
    CheckBox3.prototype.formResetHandler = function() {
      this.checked = this.initialCheckedValue;
      this.element.checked = this.initialCheckedValue;
    };
    CheckBox3.prototype.unWireEvents = function() {
      var wrapper = this.wrapper;
      EventHandler2.remove(wrapper, "click", this.clickHandler);
      EventHandler2.remove(this.element, "keyup", this.keyUpHandler);
      EventHandler2.remove(this.element, "focus", this.focusHandler);
      EventHandler2.remove(this.element, "focusout", this.focusOutHandler);
      var label = wrapper.getElementsByTagName("label")[0];
      if (label) {
        EventHandler2.remove(label, "mousedown", this.labelMouseDownHandler);
        EventHandler2.remove(label, "mouseup", this.labelMouseUpHandler);
        EventHandler2.remove(label, "mouseleave", this.labelMouseLeaveHandler);
      }
      var formElem = closest2(this.element, "form");
      if (formElem) {
        EventHandler2.remove(formElem, "reset", this.formResetHandler);
      }
      if (this.tagName === "EJS-CHECKBOX") {
        EventHandler2.remove(this.element, "change", this.changeHandler);
      }
    };
    CheckBox3.prototype.wireEvents = function() {
      var wrapper = this.getWrapper();
      EventHandler2.add(wrapper, "click", this.clickHandler, this);
      EventHandler2.add(this.element, "keyup", this.keyUpHandler, this);
      EventHandler2.add(this.element, "focus", this.focusHandler, this);
      EventHandler2.add(this.element, "focusout", this.focusOutHandler, this);
      var label = wrapper.getElementsByTagName("label")[0];
      EventHandler2.add(label, "mousedown", this.labelMouseDownHandler, this);
      EventHandler2.add(label, "mouseup", this.labelMouseUpHandler, this);
      EventHandler2.add(label, "mouseleave", this.labelMouseLeaveHandler, this);
      var formElem = closest2(this.element, "form");
      if (formElem) {
        EventHandler2.add(formElem, "reset", this.formResetHandler, this);
      }
      if (this.tagName === "EJS-CHECKBOX") {
        EventHandler2.add(this.element, "change", this.changeHandler, this);
      }
    };
    CheckBox3.prototype.updateVueArrayModel = function(init) {
      if (this.isVue && typeof this.value === "object") {
        var value = this.element.value;
        if (value && this.value) {
          if (init) {
            for (var i = 0; i < this.value.length; i++) {
              if (value === this.value[i]) {
                this.changeState("check");
                this.setProperties({
                  "checked": true
                }, true);
              }
            }
          } else {
            var index = this.value.indexOf(value);
            if (this.checked) {
              if (index < 0) {
                this.value.push(value);
              }
            } else {
              if (index > -1) {
                this.value.splice(index, 1);
              }
            }
            return this.value;
          }
        }
      }
      return this.validCheck ? this.element.checked : !this.element.checked;
    };
    CheckBox3.prototype.updateHtmlAttributeToWrapper = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          var wrapper = this.getWrapper();
          if (containerAttr.indexOf(key) > -1) {
            if (key === "class") {
              addClass2([wrapper], this.htmlAttributes["" + key].split(" "));
            } else if (key === "title") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "style") {
              var frameSpan = this.getWrapper().getElementsByClassName(FRAME)[0];
              frameSpan.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "disabled") {
              if (this.htmlAttributes["" + key] === "true") {
                this.setDisabled();
              }
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            } else {
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            }
          } else {
            wrapper.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    CheckBox3.prototype.click = function() {
      this.element.click();
    };
    CheckBox3.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate16([Event3()], CheckBox3.prototype, "change", void 0);
    __decorate16([Event3()], CheckBox3.prototype, "created", void 0);
    __decorate16([Property2(false)], CheckBox3.prototype, "checked", void 0);
    __decorate16([Property2("")], CheckBox3.prototype, "cssClass", void 0);
    __decorate16([Property2(false)], CheckBox3.prototype, "disabled", void 0);
    __decorate16([Property2(false)], CheckBox3.prototype, "indeterminate", void 0);
    __decorate16([Property2("")], CheckBox3.prototype, "label", void 0);
    __decorate16([Property2("After")], CheckBox3.prototype, "labelPosition", void 0);
    __decorate16([Property2("")], CheckBox3.prototype, "name", void 0);
    __decorate16([Property2("")], CheckBox3.prototype, "value", void 0);
    __decorate16([Property2(true)], CheckBox3.prototype, "enableHtmlSanitizer", void 0);
    __decorate16([Property2({})], CheckBox3.prototype, "htmlAttributes", void 0);
    CheckBox3 = __decorate16([NotifyPropertyChanges2], CheckBox3);
    return CheckBox3;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/radio-button/radio-button.js
var __extends16 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate17 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var LABEL2 = "e-label";
var RIPPLE2 = "e-ripple-container";
var RTL2 = "e-rtl";
var WRAPPER2 = "e-radio-wrapper";
var ATTRIBUTES = ["title", "class", "style", "disabled", "readonly", "name", "value", "id"];
var RadioButton = (
  /** @class */
  function(_super) {
    __extends16(RadioButton3, _super);
    function RadioButton3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isFocused = false;
      _this.type = "radio";
      return _this;
    }
    RadioButton_1 = RadioButton3;
    RadioButton3.prototype.changeHandler = function(event2) {
      this.checked = true;
      this.dataBind();
      var value = this.element.getAttribute("value");
      value = this.isVue && value ? this.element.value : this.value;
      var type = typeof this.value;
      if (this.isVue && type === "boolean") {
        value = value === "true" ? true : false;
      }
      this.trigger("change", {
        value,
        event: event2
      });
      if (this.isAngular) {
        event2.stopPropagation();
      }
    };
    RadioButton3.prototype.updateChange = function() {
      var input2;
      var instance;
      var radioGrp = this.getRadioGroup();
      for (var i = 0; i < radioGrp.length; i++) {
        input2 = radioGrp[i];
        if (input2 !== this.element) {
          instance = getInstance(input2, RadioButton_1);
          instance.checked = false;
          if (this.tagName === "EJS-RADIOBUTTON") {
            instance.angularValue = this.value;
          }
        }
      }
    };
    RadioButton3.prototype.destroy = function() {
      var _this = this;
      var radioWrap = this.wrapper;
      _super.prototype.destroy.call(this);
      if (radioWrap) {
        if (!this.disabled) {
          this.unWireEvents();
        }
        if (this.tagName === "INPUT") {
          if (radioWrap.parentNode) {
            radioWrap.parentNode.insertBefore(this.element, radioWrap);
          }
          detach2(radioWrap);
          this.element.checked = false;
          ["name", "value", "disabled"].forEach(function(key) {
            _this.element.removeAttribute(key);
          });
        } else {
          ["role", "aria-checked", "class"].forEach(function(key) {
            radioWrap.removeAttribute(key);
          });
          radioWrap.innerHTML = "";
          this.element = this.wrapper;
          if (this.refreshing) {
            ["e-control", "e-radio", "e-lib"].forEach(function(key) {
              _this.element.classList.add(key);
            });
            setValue3("ej2_instances", [this], this.element);
          }
        }
      }
    };
    RadioButton3.prototype.focusHandler = function() {
      this.isFocused = true;
    };
    RadioButton3.prototype.focusOutHandler = function() {
      var label = this.getLabel();
      if (label) {
        label.classList.remove("e-focus");
      }
    };
    RadioButton3.prototype.getModuleName = function() {
      return "radio";
    };
    RadioButton3.prototype.getSelectedValue = function() {
      var input2;
      var radioGrp = this.getRadioGroup();
      for (var i = 0, len = radioGrp.length; i < len; i++) {
        input2 = radioGrp[i];
        if (input2.checked) {
          return input2.value;
        }
      }
      return "";
    };
    RadioButton3.prototype.getRadioGroup = function() {
      return document.querySelectorAll('input.e-radio[name="' + this.element.getAttribute("name") + '"]');
    };
    RadioButton3.prototype.getPersistData = function() {
      return this.addOnPersist(["checked"]);
    };
    RadioButton3.prototype.getWrapper = function() {
      if (this.element.parentElement) {
        return this.element.parentElement;
      } else {
        return null;
      }
    };
    RadioButton3.prototype.getLabel = function() {
      if (this.element.nextElementSibling) {
        return this.element.nextElementSibling;
      } else {
        return null;
      }
    };
    RadioButton3.prototype.initialize = function() {
      if (isNullOrUndefined2(this.initialCheckedValue)) {
        this.initialCheckedValue = this.checked;
      }
      this.initWrapper();
      this.updateHtmlAttribute();
      if (this.name) {
        this.element.setAttribute("name", this.name);
      }
      var value = this.element.getAttribute("value");
      var type = typeof this.value;
      if (this.isVue && type === "boolean") {
        value = value === "true" ? true : false;
      }
      if (this.isVue ? this.value && type !== "boolean" && !value : this.value) {
        this.element.setAttribute("value", this.value);
      }
      if (this.checked) {
        this.element.checked = true;
      }
      if (this.disabled) {
        this.setDisabled();
      }
    };
    RadioButton3.prototype.initWrapper = function() {
      var rippleSpan;
      var wrapper = this.element.parentElement;
      if (!wrapper.classList.contains(WRAPPER2)) {
        wrapper = this.createElement("div", {
          className: WRAPPER2
        });
        if (this.element.parentNode) {
          this.element.parentNode.insertBefore(wrapper, this.element);
        }
      }
      var label = this.createElement("label", {
        attrs: {
          for: this.element.id
        }
      });
      wrapper.appendChild(this.element);
      wrapper.appendChild(label);
      if (isRippleEnabled) {
        rippleSpan = this.createElement("span", {
          className: RIPPLE2
        });
        label.appendChild(rippleSpan);
        rippleEffect(rippleSpan, {
          duration: 400,
          isCenterRipple: true
        });
      }
      wrapper.classList.add("e-wrapper");
      if (this.enableRtl) {
        label.classList.add(RTL2);
      }
      if (this.cssClass) {
        addClass2([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.label) {
        this.setText(this.label);
      }
    };
    RadioButton3.prototype.keyUpHandler = function() {
      if (this.isFocused) {
        this.getLabel().classList.add("e-focus");
      }
    };
    RadioButton3.prototype.labelMouseDownHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE2)[0];
      rippleMouseHandler(e, rippleSpan);
    };
    RadioButton3.prototype.labelMouseLeaveHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE2)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler(e, rippleSpan);
      }
    };
    RadioButton3.prototype.labelMouseUpHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE2)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler(e, rippleSpan);
      }
    };
    RadioButton3.prototype.formResetHandler = function() {
      this.checked = this.initialCheckedValue;
      if (this.initialCheckedValue) {
        attributes2(this.element, {
          "checked": "true"
        });
      }
    };
    RadioButton3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrap = this.getWrapper();
      var label = this.getLabel();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "checked":
            if (newProp.checked) {
              this.updateChange();
            }
            this.element.checked = newProp.checked;
            break;
          case "disabled":
            if (newProp.disabled) {
              this.setDisabled();
              this.unWireEvents();
            } else {
              this.element.disabled = false;
              this.wireEvents();
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([wrap], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([wrap], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              label.classList.add(RTL2);
            } else {
              label.classList.remove(RTL2);
            }
            break;
          case "label":
            this.setText(newProp.label);
            break;
          case "labelPosition":
            if (newProp.labelPosition === "Before") {
              label.classList.add("e-right");
            } else {
              label.classList.remove("e-right");
            }
            break;
          case "name":
            this.element.setAttribute("name", newProp.name);
            break;
          case "value":
            var type = typeof this.htmlAttributes.value;
            if (!isNullOrUndefined2(this.htmlAttributes) && (this.htmlAttributes.value || type === "boolean" && !this.htmlAttributes.value)) {
              break;
            }
            this.element.setAttribute("value", newProp.value);
            break;
          case "htmlAttributes":
            this.updateHtmlAttribute();
            break;
        }
      }
    };
    RadioButton3.prototype.preRender = function() {
      var element2 = this.element;
      this.formElement = closest2(this.element, "form");
      this.tagName = this.element.tagName;
      element2 = wrapperInitialize(this.createElement, "EJS-RADIOBUTTON", "radio", element2, WRAPPER2, "radio");
      this.element = element2;
      if (this.element.getAttribute("type") !== "radio") {
        this.element.setAttribute("type", "radio");
      }
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
      if (this.tagName === "EJS-RADIOBUTTON") {
        var formControlName = this.element.getAttribute("formcontrolname");
        if (formControlName) {
          this.setProperties({
            "name": formControlName
          }, true);
          this.element.setAttribute("name", formControlName);
        }
      }
    };
    RadioButton3.prototype.render = function() {
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      this.renderComplete();
      this.wrapper = this.getWrapper();
    };
    RadioButton3.prototype.setDisabled = function() {
      this.element.disabled = true;
    };
    RadioButton3.prototype.setText = function(text) {
      var label = this.getLabel();
      var textLabel = label.getElementsByClassName(LABEL2)[0];
      if (textLabel) {
        textLabel.textContent = text;
      } else {
        text = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(text) : text;
        textLabel = this.createElement("span", {
          className: LABEL2,
          innerHTML: text
        });
        label.appendChild(textLabel);
      }
      if (this.labelPosition === "Before") {
        this.getLabel().classList.add("e-right");
      } else {
        this.getLabel().classList.remove("e-right");
      }
    };
    RadioButton3.prototype.updateHtmlAttribute = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          var wrapper = this.element.parentElement;
          if (ATTRIBUTES.indexOf(key) > -1) {
            if (key === "class") {
              addClass2([wrapper], this.htmlAttributes["" + key].replace(/\s+/g, " ").trim().split(" "));
            } else if (key === "title" || key === "style") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else {
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            }
          } else {
            wrapper.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    RadioButton3.prototype.unWireEvents = function() {
      var label = this.wrapper;
      EventHandler2.remove(this.element, "change", this.changeHandler);
      EventHandler2.remove(this.element, "focus", this.focusHandler);
      EventHandler2.remove(this.element, "focusout", this.focusOutHandler);
      EventHandler2.remove(this.element, "keyup", this.keyUpHandler);
      var rippleLabel = label.getElementsByTagName("label")[0];
      if (rippleLabel) {
        EventHandler2.remove(rippleLabel, "mousedown", this.labelMouseDownHandler);
        EventHandler2.remove(rippleLabel, "mouseup", this.labelMouseUpHandler);
        EventHandler2.remove(rippleLabel, "mouseleave", this.labelMouseLeaveHandler);
      }
      if (this.formElement) {
        EventHandler2.remove(this.formElement, "reset", this.formResetHandler);
      }
    };
    RadioButton3.prototype.wireEvents = function() {
      var label = this.getLabel();
      EventHandler2.add(this.element, "change", this.changeHandler, this);
      EventHandler2.add(this.element, "keyup", this.keyUpHandler, this);
      EventHandler2.add(this.element, "focus", this.focusHandler, this);
      EventHandler2.add(this.element, "focusout", this.focusOutHandler, this);
      var rippleLabel = label.getElementsByClassName(LABEL2)[0];
      if (rippleLabel) {
        EventHandler2.add(rippleLabel, "mousedown", this.labelMouseDownHandler, this);
        EventHandler2.add(rippleLabel, "mouseup", this.labelMouseUpHandler, this);
        EventHandler2.add(rippleLabel, "mouseleave", this.labelMouseLeaveHandler, this);
      }
      if (this.formElement) {
        EventHandler2.add(this.formElement, "reset", this.formResetHandler, this);
      }
    };
    RadioButton3.prototype.click = function() {
      this.element.click();
    };
    RadioButton3.prototype.focusIn = function() {
      this.element.focus();
    };
    var RadioButton_1;
    __decorate17([Event3()], RadioButton3.prototype, "change", void 0);
    __decorate17([Event3()], RadioButton3.prototype, "created", void 0);
    __decorate17([Property2(false)], RadioButton3.prototype, "checked", void 0);
    __decorate17([Property2("")], RadioButton3.prototype, "cssClass", void 0);
    __decorate17([Property2(false)], RadioButton3.prototype, "disabled", void 0);
    __decorate17([Property2("")], RadioButton3.prototype, "label", void 0);
    __decorate17([Property2("After")], RadioButton3.prototype, "labelPosition", void 0);
    __decorate17([Property2("")], RadioButton3.prototype, "name", void 0);
    __decorate17([Property2("")], RadioButton3.prototype, "value", void 0);
    __decorate17([Property2(true)], RadioButton3.prototype, "enableHtmlSanitizer", void 0);
    __decorate17([Property2({})], RadioButton3.prototype, "htmlAttributes", void 0);
    RadioButton3 = RadioButton_1 = __decorate17([NotifyPropertyChanges2], RadioButton3);
    return RadioButton3;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/switch/switch.js
var __extends17 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate18 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var DISABLED2 = "e-switch-disabled";
var RIPPLE3 = "e-ripple-container";
var RIPPLE_CHECK = "e-ripple-check";
var RTL3 = "e-rtl";
var WRAPPER3 = "e-switch-wrapper";
var ACTIVE = "e-switch-active";
var ATTRIBUTES2 = ["title", "class", "style", "disabled", "readonly", "name", "value", "aria-label", "id", "role", "tabindex"];
var Switch = (
  /** @class */
  function(_super) {
    __extends17(Switch3, _super);
    function Switch3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isFocused = false;
      _this.isDrag = false;
      _this.isWireEvents = false;
      return _this;
    }
    Switch3.prototype.changeState = function(state) {
      var rippleSpan = null;
      var wrapper = this.getWrapper();
      var bar = wrapper.querySelector(".e-switch-inner");
      var handle = wrapper.querySelector(".e-switch-handle");
      if (isRippleEnabled) {
        rippleSpan = wrapper.getElementsByClassName(RIPPLE3)[0];
      }
      if (state) {
        addClass2([bar, handle], ACTIVE);
        this.element.checked = true;
        this.checked = true;
        if (rippleSpan) {
          addClass2([rippleSpan], [RIPPLE_CHECK]);
        }
      } else {
        removeClass2([bar, handle], ACTIVE);
        this.element.checked = false;
        this.checked = false;
        if (rippleSpan) {
          removeClass2([rippleSpan], [RIPPLE_CHECK]);
        }
      }
    };
    Switch3.prototype.clickHandler = function(evt) {
      this.isDrag = false;
      this.focusOutHandler();
      var beforeChangeEventArgs = {
        event: evt,
        cancel: false,
        checked: this.checked
      };
      this.trigger("beforeChange", beforeChangeEventArgs);
      if (!beforeChangeEventArgs.cancel) {
        this.changeState(!beforeChangeEventArgs.checked);
        this.element.focus();
        var changeEventArgs = {
          checked: this.element.checked,
          event: evt
        };
        this.trigger("change", changeEventArgs);
      }
    };
    Switch3.prototype.destroy = function() {
      var _this = this;
      _super.prototype.destroy.call(this);
      if (!this.disabled) {
        this.unWireEvents();
      }
      if (this.formElement) {
        EventHandler2.remove(this.formElement, "reset", this.formResetHandler);
      }
      destroy2(this, this.getWrapper(), this.tagName);
      if (this.refreshing) {
        ["e-control", "e-switch", "e-lib"].forEach(function(key) {
          _this.element.classList.add(key);
        });
        setValue3("ej2_instances", [this], this.element);
      }
    };
    Switch3.prototype.focusHandler = function() {
      this.isFocused = true;
    };
    Switch3.prototype.focusOutHandler = function() {
      this.getWrapper().classList.remove("e-focus");
    };
    Switch3.prototype.getModuleName = function() {
      return "switch";
    };
    Switch3.prototype.getPersistData = function() {
      return this.addOnPersist(["checked"]);
    };
    Switch3.prototype.getWrapper = function() {
      if (this.element.parentElement) {
        return this.element.parentElement;
      } else {
        return null;
      }
    };
    Switch3.prototype.initialize = function() {
      this.element.setAttribute("role", "switch");
      if (isNullOrUndefined2(this.initialSwitchCheckedValue)) {
        this.initialSwitchCheckedValue = this.checked;
      }
      if (this.name) {
        this.element.setAttribute("name", this.name);
      }
      if (this.value) {
        this.element.setAttribute("value", this.value);
      }
      if (this.checked) {
        this.changeState(true);
      }
      if (this.disabled) {
        this.setDisabled();
      }
      if (this.onLabel || this.offLabel) {
        this.setLabel(this.onLabel, this.offLabel);
      }
    };
    Switch3.prototype.initWrapper = function() {
      var wrapper = this.element.parentElement;
      if (!wrapper.classList.contains(WRAPPER3)) {
        wrapper = this.createElement("div", {
          className: WRAPPER3
        });
        this.element.parentNode.insertBefore(wrapper, this.element);
      }
      var switchInner = this.createElement("span", {
        className: "e-switch-inner"
      });
      var onLabel = this.createElement("span", {
        className: "e-switch-on"
      });
      var offLabel = this.createElement("span", {
        className: "e-switch-off"
      });
      var handle = this.createElement("span", {
        className: "e-switch-handle"
      });
      wrapper.appendChild(this.element);
      setHiddenInput(this, wrapper);
      switchInner.appendChild(onLabel);
      switchInner.appendChild(offLabel);
      wrapper.appendChild(switchInner);
      wrapper.appendChild(handle);
      if (isRippleEnabled) {
        var rippleSpan = this.createElement("span", {
          className: RIPPLE3
        });
        handle.appendChild(rippleSpan);
        rippleEffect(rippleSpan, {
          duration: 400,
          isCenterRipple: true
        });
      }
      wrapper.classList.add("e-wrapper");
      if (this.enableRtl) {
        wrapper.classList.add(RTL3);
      }
      if (this.cssClass) {
        addClass2([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
    };
    Switch3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrapper = this.getWrapper();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "checked":
            this.changeState(newProp.checked);
            break;
          case "disabled":
            if (newProp.disabled) {
              this.setDisabled();
              this.unWireEvents();
              this.isWireEvents = false;
            } else {
              this.element.disabled = false;
              wrapper.classList.remove(DISABLED2);
              wrapper.setAttribute("aria-disabled", "false");
              if (!this.isWireEvents) {
                this.wireEvents();
                this.isWireEvents = true;
              }
            }
            break;
          case "value":
            this.element.setAttribute("value", newProp.value);
            break;
          case "name":
            this.element.setAttribute("name", newProp.name);
            break;
          case "onLabel":
          case "offLabel":
            this.setLabel(newProp.onLabel, newProp.offLabel);
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              wrapper.classList.add(RTL3);
            } else {
              wrapper.classList.remove(RTL3);
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([wrapper], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([wrapper], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "htmlAttributes":
            this.updateHtmlAttribute();
            break;
        }
      }
    };
    Switch3.prototype.preRender = function() {
      var element2 = this.element;
      this.formElement = closest2(this.element, "form");
      this.tagName = this.element.tagName;
      preRender(this, "EJS-SWITCH", WRAPPER3, element2, this.getModuleName());
    };
    Switch3.prototype.render = function() {
      this.initWrapper();
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      if (this.formElement) {
        EventHandler2.add(this.formElement, "reset", this.formResetHandler, this);
      }
      this.renderComplete();
      this.updateHtmlAttribute();
    };
    Switch3.prototype.rippleHandler = function(e) {
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE3)[0];
      rippleMouseHandler(e, rippleSpan);
      if (e.type === "mousedown" && e.currentTarget.classList.contains("e-switch-wrapper") && e.which === 1) {
        this.isDrag = true;
        this.isFocused = false;
      }
    };
    Switch3.prototype.mouseLeaveHandler = function(e) {
      var rippleSpan = this.element.parentElement.getElementsByClassName(RIPPLE3)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler(e, rippleSpan);
      }
    };
    Switch3.prototype.rippleTouchHandler = function(eventType) {
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE3)[0];
      if (rippleSpan) {
        var event_1 = document.createEvent("MouseEvents");
        event_1.initEvent(eventType, false, true);
        rippleSpan.dispatchEvent(event_1);
      }
    };
    Switch3.prototype.setDisabled = function() {
      var wrapper = this.getWrapper();
      this.element.disabled = true;
      wrapper.classList.add(DISABLED2);
      wrapper.setAttribute("aria-disabled", "true");
    };
    Switch3.prototype.setLabel = function(onText, offText) {
      var wrapper = this.getWrapper();
      if (onText) {
        wrapper.querySelector(".e-switch-on").textContent = onText;
      }
      if (offText) {
        wrapper.querySelector(".e-switch-off").textContent = offText;
      }
    };
    Switch3.prototype.updateHtmlAttribute = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          var wrapper = this.getWrapper();
          if (ATTRIBUTES2.indexOf(key) > -1) {
            if (key === "class") {
              addClass2([wrapper], this.htmlAttributes["" + key].split(" "));
            } else if (key === "title") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "style") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "disabled") {
              if (this.htmlAttributes["" + key] === "true") {
                this.setDisabled();
              }
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            } else {
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            }
          } else {
            wrapper.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    Switch3.prototype.switchFocusHandler = function(e) {
      if (this.isFocused) {
        this.getWrapper().classList.add("e-focus");
      }
      if (e && e.type === "keyup" && e.code === "Space" && this.isAngular) {
        this.clickHandler(e);
        e.stopPropagation();
        e.preventDefault();
      }
    };
    Switch3.prototype.switchMouseUp = function(e) {
      var aTouchY = 0;
      var yDiff = 0;
      var aTouchX = 0;
      var xDiff = 0;
      var target = e.target;
      if (e.type === "touchmove") {
        e.preventDefault();
        aTouchX = e.changedTouches[0].clientX;
        aTouchY = e.changedTouches[0].clientY;
        xDiff = this.bTouchX - aTouchX;
        yDiff = this.bTouchY - aTouchY;
        if (Math.abs(xDiff) < Math.abs(yDiff)) {
          this.isDrag = false;
          this.rippleTouchHandler("mouseup");
        } else {
          this.isDrag = true;
        }
      }
      if (e.type === "touchstart") {
        this.bTouchX = e.changedTouches[0].clientX;
        this.bTouchY = e.changedTouches[0].clientY;
        this.isDrag = true;
        this.rippleTouchHandler("mousedown");
      }
      if (this.isDrag) {
        if (e.type === "mouseup" && target.className.indexOf("e-switch") < 0 || e.type === "touchend") {
          xDiff = this.bTouchX - e.changedTouches[0].clientX;
          yDiff = this.bTouchY - e.changedTouches[0].clientY;
          if (Math.abs(xDiff) >= Math.abs(yDiff)) {
            this.clickHandler(e);
            this.rippleTouchHandler("mouseup");
            e.preventDefault();
          }
        }
      }
    };
    Switch3.prototype.formResetHandler = function() {
      this.checked = this.initialSwitchCheckedValue;
      this.element.checked = this.initialSwitchCheckedValue;
    };
    Switch3.prototype.toggle = function() {
      this.clickHandler();
    };
    Switch3.prototype.wireEvents = function() {
      var wrapper = this.getWrapper();
      this.delegateMouseUpHandler = this.switchMouseUp.bind(this);
      this.delegateKeyUpHandler = this.switchFocusHandler.bind(this);
      EventHandler2.add(wrapper, "click", this.clickHandler, this);
      EventHandler2.add(this.element, "focus", this.focusHandler, this);
      EventHandler2.add(this.element, "focusout", this.focusOutHandler, this);
      EventHandler2.add(this.element, "mouseup", this.delegateMouseUpHandler, this);
      EventHandler2.add(this.element, "keyup", this.delegateKeyUpHandler, this);
      EventHandler2.add(wrapper, "mousedown mouseup", this.rippleHandler, this);
      EventHandler2.add(wrapper, "mouseleave", this.mouseLeaveHandler, this);
      EventHandler2.add(wrapper, "touchstart touchmove touchend", this.switchMouseUp, this);
    };
    Switch3.prototype.unWireEvents = function() {
      var wrapper = this.getWrapper();
      EventHandler2.remove(wrapper, "click", this.clickHandler);
      EventHandler2.remove(this.element, "focus", this.focusHandler);
      EventHandler2.remove(this.element, "focusout", this.focusOutHandler);
      EventHandler2.remove(this.element, "mouseup", this.delegateMouseUpHandler);
      EventHandler2.remove(this.element, "keyup", this.delegateKeyUpHandler);
      EventHandler2.remove(wrapper, "mousedown mouseup", this.rippleHandler);
      EventHandler2.remove(wrapper, "mouseleave", this.mouseLeaveHandler);
      EventHandler2.remove(wrapper, "touchstart touchmove touchend", this.switchMouseUp);
    };
    Switch3.prototype.click = function() {
      this.element.click();
    };
    Switch3.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate18([Event3()], Switch3.prototype, "beforeChange", void 0);
    __decorate18([Event3()], Switch3.prototype, "change", void 0);
    __decorate18([Event3()], Switch3.prototype, "created", void 0);
    __decorate18([Property2(false)], Switch3.prototype, "checked", void 0);
    __decorate18([Property2("")], Switch3.prototype, "cssClass", void 0);
    __decorate18([Property2(false)], Switch3.prototype, "disabled", void 0);
    __decorate18([Property2("")], Switch3.prototype, "name", void 0);
    __decorate18([Property2("")], Switch3.prototype, "onLabel", void 0);
    __decorate18([Property2("")], Switch3.prototype, "offLabel", void 0);
    __decorate18([Property2("")], Switch3.prototype, "value", void 0);
    __decorate18([Property2({})], Switch3.prototype, "htmlAttributes", void 0);
    Switch3 = __decorate18([NotifyPropertyChanges2], Switch3);
    return Switch3;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/chips/chip-list.js
var __extends18 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate19 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var classNames = {
  chipSet: "e-chip-set",
  chip: "e-chip",
  avatar: "e-chip-avatar",
  text: "e-chip-text",
  icon: "e-chip-icon",
  delete: "e-chip-delete",
  deleteIcon: "e-dlt-btn",
  multiSelection: "e-multi-selection",
  singleSelection: "e-selection",
  active: "e-active",
  chipWrapper: "e-chip-avatar-wrap",
  iconWrapper: "e-chip-icon-wrap",
  focused: "e-focused",
  disabled: "e-disabled",
  rtl: "e-rtl",
  template: "e-chip-template"
};
var ChipList = (
  /** @class */
  function(_super) {
    __extends18(ChipList3, _super);
    function ChipList3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.multiSelectedChip = [];
      return _this;
    }
    ChipList3.prototype.preRender = function() {
    };
    ChipList3.prototype.chipType = function() {
      return this.chips && this.chips.length && this.chips.length > 0;
    };
    ChipList3.prototype.render = function() {
      this.type = !isNullOrUndefined2(this.chips) && this.chips.length ? "chipset" : this.text || this.element.innerText ? "chip" : "chipset";
      this.setAttributes();
      this.createChip();
      this.setRtl();
      this.select(this.selectedChips);
      this.wireEvent(false);
      this.rippleFunction = rippleEffect(this.element, {
        selector: ".e-chip"
      });
      this.renderComplete();
    };
    ChipList3.prototype.createChip = function() {
      this.innerText = this.element.innerText && this.element.innerText.length !== 0 ? this.element.innerText.trim() : this.element.innerText;
      this.element.innerHTML = "";
      this.chipCreation(this.type === "chip" ? [this.innerText ? this.innerText : this.text] : this.chips);
    };
    ChipList3.prototype.setAttributes = function() {
      if (this.type === "chip") {
        if (this.enabled) {
          this.element.tabIndex = 0;
        }
        this.element.setAttribute("role", "button");
      } else {
        this.element.classList.add(classNames.chipSet);
        this.element.setAttribute("role", "listbox");
        if (this.selection === "Multiple") {
          this.element.classList.add(classNames.multiSelection);
          this.element.setAttribute("aria-multiselectable", "true");
        } else if (this.selection === "Single") {
          this.element.classList.add(classNames.singleSelection);
          this.element.setAttribute("aria-multiselectable", "false");
        } else {
          this.element.setAttribute("aria-multiselectable", "false");
        }
      }
    };
    ChipList3.prototype.setRtl = function() {
      this.element.classList[this.enableRtl ? "add" : "remove"](classNames.rtl);
    };
    ChipList3.prototype.renderTemplates = function() {
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    ChipList3.prototype.templateParser = function(template) {
      if (template) {
        try {
          if (typeof template !== "function" && document.querySelectorAll(template).length) {
            return compile4(document.querySelector(template).innerHTML.trim());
          } else {
            return compile4(template);
          }
        } catch (error) {
          return compile4(template);
        }
      }
      return void 0;
    };
    ChipList3.prototype.chipCreation = function(data) {
      if (isNullOrUndefined2(data)) {
        return;
      }
      var chipListArray = [];
      var attributeArray = [];
      for (var i = 0; i < data.length; i++) {
        var fieldsData = this.getFieldValues(data[i]);
        var attributesValue = fieldsData.htmlAttributes;
        attributeArray.push(attributesValue);
        var chipArray = this.elementCreation(fieldsData);
        var className = (classNames.chip + " " + (fieldsData.enabled ? " " : classNames.disabled) + " " + (fieldsData.avatarIconCss || fieldsData.avatarText ? classNames.chipWrapper : fieldsData.leadingIconCss ? classNames.iconWrapper : " ") + " " + fieldsData.cssClass).split(" ").filter(function(css) {
          return css;
        });
        if (!this.chipType() || this.type === "chip") {
          chipListArray = chipArray;
          addClass2([this.element], className);
          this.element.setAttribute("aria-label", fieldsData.text);
          if (fieldsData.value) {
            this.element.setAttribute("data-value", fieldsData.value.toString());
          }
        } else {
          var wrapper = this.createElement("DIV", {
            className: className.join(" "),
            attrs: {
              tabIndex: "0",
              role: "option",
              "aria-label": fieldsData.text,
              "aria-selected": "false"
            }
          });
          if (this.enableDelete) {
            wrapper.setAttribute("aria-keyshortcuts", "Press delete or backspace key to delete");
          }
          if (fieldsData.value) {
            wrapper.setAttribute("data-value", fieldsData.value.toString());
          }
          if (fieldsData.enabled) {
            wrapper.setAttribute("aria-disabled", "false");
          } else {
            wrapper.removeAttribute("tabindex");
            wrapper.setAttribute("aria-disabled", "true");
          }
          if (!isNullOrUndefined2(attributeArray[i])) {
            if (attributeArray.length > i && Object.keys(attributeArray[i]).length) {
              var htmlAttr = [];
              htmlAttr = Object.keys(attributeArray[i]);
              for (var j = 0; j < htmlAttr.length; j++) {
                wrapper.setAttribute(htmlAttr[j], attributeArray[i][htmlAttr[j]]);
              }
            }
          }
          append(chipArray, wrapper);
          chipListArray.push(wrapper);
        }
      }
      append(chipListArray, this.element);
    };
    ChipList3.prototype.getFieldValues = function(data) {
      var chipEnabled = !(this.enabled.toString() === "false");
      var fields = {
        text: typeof data === "object" ? data.text ? data.text.toString() : this.text.toString() : !this.chipType() ? this.innerText ? this.innerText : this.text.toString() : data.toString(),
        cssClass: typeof data === "object" ? data.cssClass ? data.cssClass.toString() : this.cssClass.toString() : this.cssClass.toString(),
        leadingIconCss: typeof data === "object" ? data.leadingIconCss ? data.leadingIconCss.toString() : this.leadingIconCss.toString() : this.leadingIconCss.toString(),
        avatarIconCss: typeof data === "object" ? data.avatarIconCss ? data.avatarIconCss.toString() : this.avatarIconCss.toString() : this.avatarIconCss.toString(),
        avatarText: typeof data === "object" ? data.avatarText ? data.avatarText.toString() : this.avatarText.toString() : this.avatarText.toString(),
        trailingIconCss: typeof data === "object" ? data.trailingIconCss ? data.trailingIconCss.toString() : this.trailingIconCss.toString() : this.trailingIconCss.toString(),
        enabled: typeof data === "object" ? data.enabled !== void 0 ? data.enabled.toString() === "false" ? false : true : chipEnabled : chipEnabled,
        value: typeof data === "object" ? data.value ? data.value.toString() : null : null,
        leadingIconUrl: typeof data === "object" ? data.leadingIconUrl ? data.leadingIconUrl.toString() : this.leadingIconUrl : this.leadingIconUrl,
        trailingIconUrl: typeof data === "object" ? data.trailingIconUrl ? data.trailingIconUrl.toString() : this.trailingIconUrl : this.trailingIconUrl,
        htmlAttributes: typeof data === "object" ? data.htmlAttributes ? data.htmlAttributes : this.htmlAttributes : this.htmlAttributes,
        template: typeof data === "object" ? data.template ? data.template : null : null
      };
      return fields;
    };
    ChipList3.prototype.elementCreation = function(fields) {
      var chipArray = [];
      if (fields.avatarText || fields.avatarIconCss) {
        var className = (classNames.avatar + " " + fields.avatarIconCss).trim();
        var chipAvatarElement = this.createElement("span", {
          className
        });
        chipAvatarElement.innerText = fields.avatarText;
        chipArray.push(chipAvatarElement);
      } else if (fields.leadingIconCss) {
        var className = (classNames.icon + " " + fields.leadingIconCss).trim();
        var chipIconElement = this.createElement("span", {
          className
        });
        chipArray.push(chipIconElement);
      } else if (fields.leadingIconUrl) {
        var className = (classNames.avatar + " image-url").trim();
        var chipIconElement = this.createElement("span", {
          className
        });
        chipIconElement.style.backgroundImage = "url(" + fields.leadingIconUrl + ")";
        chipArray.push(chipIconElement);
      }
      var chipTextElement = this.createElement("span", {
        className: classNames.text
      });
      chipTextElement.innerText = fields.text;
      chipArray.push(chipTextElement);
      if (fields.template) {
        var templateWrapper = this.createElement("div", {
          className: classNames.template
        });
        var templateContent = this.templateParser(fields.template)(fields, this, "template", this.element.id + "_template", false);
        append(templateContent, templateWrapper);
        chipArray.push(templateWrapper);
        this.renderTemplates();
      }
      if (fields.trailingIconCss || this.chipType() && this.enableDelete) {
        var className = (classNames.delete + " " + (fields.trailingIconCss ? fields.trailingIconCss : classNames.deleteIcon)).trim();
        var chipdeleteElement = this.createElement("span", {
          className
        });
        chipArray.push(chipdeleteElement);
      } else if (fields.trailingIconUrl) {
        var className = "trailing-icon-url".trim();
        var chipIconsElement = this.createElement("span", {
          className
        });
        chipIconsElement.style.backgroundImage = "url(" + fields.trailingIconUrl + ")";
        chipArray.push(chipIconsElement);
      }
      return chipArray;
    };
    ChipList3.prototype.find = function(fields) {
      var chipData = {
        text: "",
        index: -1,
        element: this.element,
        data: ""
      };
      var chipElement = fields instanceof HTMLElement ? fields : this.element.querySelectorAll("." + classNames.chip)[fields];
      if (chipElement && this.chipType()) {
        chipData.index = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames.chip)).indexOf(chipElement);
        var chip = this.chips[chipData.index];
        if (typeof chip === "object" && chip !== null) {
          var chipModel = chip;
          if (chipModel.text !== void 0) {
            chipData.text = chipModel.text.toString();
          }
        } else if (chip !== void 0) {
          chipData.text = chip.toString();
        }
        chipData.data = chip;
        chipData.element = chipElement;
      }
      return chipData;
    };
    ChipList3.prototype.add = function(chipsData) {
      var _a;
      if (this.type !== "chip") {
        var fieldData = chipsData instanceof Array ? chipsData : [chipsData];
        this.chips = (_a = [].slice.call(this.chips)).concat.apply(_a, fieldData);
        this.chipCreation(fieldData);
      }
    };
    ChipList3.prototype.select = function(fields, selectionType) {
      this.onSelect(fields, false, selectionType);
    };
    ChipList3.prototype.multiSelection = function(newProp) {
      var items = this.element.querySelectorAll(".e-chip");
      for (var j = 0; j < newProp.length; j++) {
        if (typeof newProp[j] === "string") {
          for (var k = 0; k < items.length; k++) {
            if (newProp[j] !== k) {
              if (newProp[j] === items[k].attributes[5].value) {
                this.multiSelectedChip.push(k);
                break;
              }
            }
          }
        } else {
          this.multiSelectedChip.push(newProp[j]);
        }
      }
    };
    ChipList3.prototype.onSelect = function(fields, callFromProperty, selectionType) {
      var index;
      var chipNodes;
      var chipValue = null;
      if (this.chipType() && this.selection !== "None") {
        if (callFromProperty) {
          var chipElements = this.element.querySelectorAll("." + classNames.chip);
          for (var i = 0; i < chipElements.length; i++) {
            chipElements[i].setAttribute("aria-selected", "false");
            chipElements[i].classList.remove(classNames.active);
          }
        }
        var fieldData = fields instanceof Array ? fields : [fields];
        for (var i = 0; i < fieldData.length; i++) {
          var chipElement = fieldData[i] instanceof HTMLElement ? fieldData[i] : this.element.querySelectorAll("." + classNames.chip)[fieldData[i]];
          if (selectionType !== "index") {
            for (var j = 0; j < this.chips.length; j++) {
              chipNodes = this.element.querySelectorAll("." + classNames.chip)[j];
              var fieldsData = this.getFieldValues(this.chips[j]);
              if (selectionType === "value") {
                if (fieldsData.value !== null) {
                  chipValue = chipNodes.dataset.value;
                }
              } else if (selectionType === "text") {
                chipValue = chipNodes.innerText;
              }
              if (chipValue === fieldData[i].toString()) {
                index = j;
                chipElement = this.element.querySelectorAll("." + classNames.chip)[index];
              }
            }
          }
          if (chipElement instanceof HTMLElement) {
            this.selectionHandler(chipElement);
          }
        }
      }
    };
    ChipList3.prototype.remove = function(fields) {
      var _this = this;
      if (this.chipType()) {
        var fieldData = fields instanceof Array ? fields : [fields];
        var chipElements_1 = [];
        var chipCollection_1 = this.element.querySelectorAll("." + classNames.chip);
        fieldData.forEach(function(data) {
          var chipElement = data instanceof HTMLElement ? data : chipCollection_1[data];
          if (chipElement instanceof HTMLElement) {
            chipElements_1.push(chipElement);
          }
        });
        chipElements_1.forEach(function(element2) {
          var chips = _this.element.querySelectorAll("." + classNames.chip);
          var index = Array.prototype.slice.call(chips).indexOf(element2);
          _this.deleteHandler(element2, index);
        });
      }
    };
    ChipList3.prototype.getSelectedChips = function() {
      var selectedChips;
      if (this.chipType() && this.selection !== "None") {
        var selectedItems = {
          texts: [],
          Indexes: [],
          data: [],
          elements: []
        };
        var items = this.element.querySelectorAll("." + classNames.active);
        for (var i = 0; i < items.length; i++) {
          var chip = items[i];
          selectedItems.elements.push(chip);
          var index = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames.chip)).indexOf(chip);
          selectedItems.Indexes.push(index);
          selectedItems.data.push(this.chips[index]);
          var text = typeof this.chips[index] === "object" ? this.chips[index].text ? this.chips[index].text : null : this.chips[index].toString();
          selectedItems.texts.push(text);
        }
        var selectedItem = {
          text: selectedItems.texts[0],
          index: selectedItems.Indexes[0],
          data: selectedItems.data[0],
          element: selectedItems.elements[0]
        };
        selectedChips = !isNullOrUndefined2(selectedItem.index) ? this.selection === "Multiple" ? selectedItems : selectedItem : void 0;
      }
      return selectedChips;
    };
    ChipList3.prototype.wireEvent = function(unWireEvent) {
      if (!unWireEvent) {
        EventHandler2.add(this.element, "click", this.clickHandler, this);
        EventHandler2.add(this.element, "focusout", this.focusOutHandler, this);
        EventHandler2.add(this.element, "keydown", this.keyHandler, this);
        EventHandler2.add(this.element, "keyup", this.keyHandler, this);
      } else {
        EventHandler2.remove(this.element, "click", this.clickHandler);
        EventHandler2.remove(this.element, "focusout", this.focusOutHandler);
        EventHandler2.remove(this.element, "keydown", this.keyHandler);
        EventHandler2.remove(this.element, "keyup", this.keyHandler);
      }
    };
    ChipList3.prototype.keyHandler = function(e) {
      if (e.target.classList.contains(classNames.chip)) {
        if (e.type === "keydown") {
          if (e.keyCode === 13 || e.keyCode === 32) {
            this.clickHandler(e);
          } else if ((e.keyCode === 46 || e.keyCode === 8) && this.enableDelete) {
            this.clickHandler(e, true);
          }
        } else if (e.keyCode === 9) {
          this.focusInHandler(e.target);
        }
      }
    };
    ChipList3.prototype.focusInHandler = function(chipWrapper) {
      if (!chipWrapper.classList.contains(classNames.focused)) {
        chipWrapper.classList.add(classNames.focused);
      }
    };
    ChipList3.prototype.focusOutHandler = function(e) {
      var chipWrapper = closest2(e.target, "." + classNames.chip);
      var focusedElement = !this.chipType() ? this.element.classList.contains(classNames.focused) ? this.element : null : this.element.querySelector("." + classNames.focused);
      if (chipWrapper && focusedElement) {
        focusedElement.classList.remove(classNames.focused);
      }
    };
    ChipList3.prototype.clickHandler = function(e, del) {
      var _this = this;
      if (del === void 0) {
        del = false;
      }
      var chipWrapper = closest2(e.target, "." + classNames.chip);
      if (chipWrapper) {
        var chipDataArgs = void 0;
        if (this.chipType()) {
          chipDataArgs = this.find(chipWrapper);
        } else {
          var index = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames.chip)).indexOf(chipWrapper);
          chipDataArgs = {
            text: this.innerText ? this.innerText : this.text,
            element: chipWrapper,
            data: this.text,
            index
          };
        }
        chipDataArgs.event = e;
        chipDataArgs.cancel = false;
        this.trigger("beforeClick", chipDataArgs, function(observedArgs) {
          if (!observedArgs.cancel) {
            _this.clickEventHandler(observedArgs.element, e, del);
          }
        });
      }
    };
    ChipList3.prototype.clickEventHandler = function(chipWrapper, e, del) {
      var _this = this;
      if (this.chipType()) {
        var chipData_1 = this.find(chipWrapper);
        chipData_1.event = e;
        var deleteElement = e.target.classList.contains(classNames.deleteIcon) ? e.target : del ? chipWrapper.querySelector("." + classNames.deleteIcon) : void 0;
        if (deleteElement && this.enableDelete) {
          chipData_1.cancel = false;
          var deletedItemArgs = chipData_1;
          this.trigger("delete", deletedItemArgs, function(observedArgs) {
            if (!observedArgs.cancel) {
              _this.deleteHandler(observedArgs.element, observedArgs.index);
              _this.selectionHandler(chipWrapper);
              chipData_1.selected = observedArgs.element.classList.contains(classNames.active);
              var selectedItemArgs2 = chipData_1;
              _this.trigger("click", selectedItemArgs2);
              var chipElement = _this.element.querySelectorAll("." + classNames.chip)[observedArgs.index];
              if (chipElement) {
                chipElement.focus();
                _this.focusInHandler(chipElement);
              }
            }
          });
        } else if (this.selection !== "None") {
          this.selectionHandler(chipWrapper);
          chipData_1.selected = chipWrapper.classList.contains(classNames.active);
          var selectedItemArgs = chipData_1;
          this.trigger("click", selectedItemArgs);
        } else {
          this.focusInHandler(chipWrapper);
          var clickedItemArgs = chipData_1;
          this.trigger("click", clickedItemArgs);
        }
      } else {
        this.focusInHandler(chipWrapper);
        var clickedItemArgs = {
          text: this.innerText ? this.innerText : this.text,
          element: chipWrapper,
          data: this.text,
          event: e
        };
        this.trigger("click", clickedItemArgs);
      }
    };
    ChipList3.prototype.selectionHandler = function(chipWrapper) {
      if (this.selection === "Single") {
        var activeElement = this.element.querySelector("." + classNames.active);
        if (activeElement && activeElement !== chipWrapper) {
          activeElement.classList.remove(classNames.active);
          activeElement.setAttribute("aria-selected", "false");
        }
        this.setProperties({
          selectedChips: null
        }, true);
      } else {
        this.setProperties({
          selectedChips: []
        }, true);
      }
      if (chipWrapper.classList.contains(classNames.active)) {
        chipWrapper.classList.remove(classNames.active);
        chipWrapper.setAttribute("aria-selected", "false");
      } else {
        chipWrapper.classList.add(classNames.active);
        chipWrapper.setAttribute("aria-selected", "true");
      }
      this.updateSelectedChips();
    };
    ChipList3.prototype.updateSelectedChips = function() {
      var chipListEle = this.element.querySelectorAll(".e-chip");
      var chipCollIndex = [];
      var chipCollValue = [];
      var chip = null;
      var value = null;
      for (var i = 0; i < chipListEle.length; i++) {
        var selectedEle = this.element.querySelectorAll(".e-chip")[i];
        if (selectedEle.getAttribute("aria-selected") === "true") {
          value = selectedEle.getAttribute("data-value");
          if (this.selection === "Single" && selectedEle.classList.contains("e-active")) {
            chip = value ? value : i;
            break;
          } else {
            chip = value ? chipCollValue.push(value) : chipCollIndex.push(i);
          }
        }
      }
      this.setProperties({
        selectedChips: this.selection === "Single" ? chip : value ? chipCollValue : chipCollIndex
      }, true);
    };
    ChipList3.prototype.deleteHandler = function(chipWrapper, index) {
      var deletedChipData = this.find(chipWrapper);
      this.chips.splice(index, 1);
      this.setProperties({
        chips: this.chips
      }, true);
      detach2(chipWrapper);
      this.trigger("deleted", deletedChipData);
    };
    ChipList3.prototype.destroy = function() {
      this.clearTemplate();
      removeClass2([this.element], [classNames.chipSet, classNames.chip, classNames.rtl, classNames.multiSelection, classNames.singleSelection, classNames.disabled, classNames.chipWrapper, classNames.iconWrapper, classNames.active, classNames.focused].concat(this.cssClass ? this.cssClass.toString().split(" ").filter(function(css) {
        return css;
      }) : []));
      this.removeMultipleAttributes(["tabindex", "role", "aria-label", "aria-multiselectable"], this.element);
      this.wireEvent(true);
      this.rippleFunction();
      _super.prototype.destroy.call(this);
      this.element.innerHTML = "";
      this.element.innerText = this.innerText;
    };
    ChipList3.prototype.removeMultipleAttributes = function(attributes4, element2) {
      attributes4.forEach(function(attr) {
        element2.removeAttribute(attr);
      });
    };
    ChipList3.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    ChipList3.prototype.getModuleName = function() {
      return "chip-list";
    };
    ChipList3.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "chips":
          case "text":
          case "avatarText":
          case "avatarIconCss":
          case "leadingIconCss":
          case "trailingIconCss":
          case "selection":
          case "enableDelete":
          case "enabled":
            this.refresh();
            break;
          case "cssClass":
            if (!this.chipType()) {
              removeClass2([this.element], oldProp.cssClass.toString().split(" ").filter(function(css) {
                return css;
              }));
              addClass2([this.element], newProp.cssClass.toString().split(" ").filter(function(css) {
                return css;
              }));
            } else {
              this.refresh();
            }
            break;
          case "selectedChips":
            removeClass2(this.element.querySelectorAll(".e-active"), "e-active");
            if (this.selection === "Multiple") {
              this.multiSelectedChip = [];
              this.multiSelection(newProp.selectedChips);
              this.onSelect(this.multiSelectedChip, true);
              this.updateSelectedChips();
            } else {
              this.onSelect(newProp.selectedChips, true);
            }
            break;
          case "enableRtl":
            this.setRtl();
            break;
        }
      }
    };
    __decorate19([Property2([])], ChipList3.prototype, "chips", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "text", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "avatarText", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "avatarIconCss", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "htmlAttributes", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "leadingIconCss", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "trailingIconCss", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "leadingIconUrl", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "trailingIconUrl", void 0);
    __decorate19([Property2("")], ChipList3.prototype, "cssClass", void 0);
    __decorate19([Property2(true)], ChipList3.prototype, "enabled", void 0);
    __decorate19([Property2([])], ChipList3.prototype, "selectedChips", void 0);
    __decorate19([Property2("None")], ChipList3.prototype, "selection", void 0);
    __decorate19([Property2(false)], ChipList3.prototype, "enableDelete", void 0);
    __decorate19([Event3()], ChipList3.prototype, "created", void 0);
    __decorate19([Event3()], ChipList3.prototype, "click", void 0);
    __decorate19([Event3()], ChipList3.prototype, "beforeClick", void 0);
    __decorate19([Event3()], ChipList3.prototype, "delete", void 0);
    __decorate19([Event3()], ChipList3.prototype, "deleted", void 0);
    ChipList3 = __decorate19([NotifyPropertyChanges2], ChipList3);
    return ChipList3;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/floating-action-button/floating-action-button.js
var __extends19 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate20 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var FABHIDDEN = "e-fab-hidden";
var FIXEDFAB = "e-fab-fixed";
var FABTOP = "e-fab-top";
var FABBOTTOM = "e-fab-bottom";
var FABRIGHT = "e-fab-right";
var FABLEFT = "e-fab-left";
var FABMIDDLE = "e-fab-middle";
var FABCENTER = "e-fab-center";
var FabPosition;
(function(FabPosition3) {
  FabPosition3["TopLeft"] = "TopLeft";
  FabPosition3["TopCenter"] = "TopCenter";
  FabPosition3["TopRight"] = "TopRight";
  FabPosition3["MiddleLeft"] = "MiddleLeft";
  FabPosition3["MiddleCenter"] = "MiddleCenter";
  FabPosition3["MiddleRight"] = "MiddleRight";
  FabPosition3["BottomLeft"] = "BottomLeft";
  FabPosition3["BottomCenter"] = "BottomCenter";
  FabPosition3["BottomRight"] = "BottomRight";
})(FabPosition || (FabPosition = {}));
var Fab = (
  /** @class */
  function(_super) {
    __extends19(Fab3, _super);
    function Fab3(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Fab3.prototype.render = function() {
      _super.prototype.render.call(this);
      this.initializeFab();
    };
    Fab3.prototype.preRender = function() {
      _super.prototype.preRender.call(this);
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
    };
    Fab3.prototype.getPersistData = function() {
      _super.prototype.getPersistData.call(this);
      return this.addOnPersist([]);
    };
    Fab3.prototype.getModuleName = function() {
      return "fab";
    };
    Fab3.prototype.initializeFab = function() {
      this.element.classList.add("e-" + _super.prototype.getModuleName.call(this));
      this.checkTarget();
      this.setPosition();
      this.setVisibility();
    };
    Fab3.prototype.checkTarget = function() {
      this.isFixed = true;
      if (this.target) {
        this.targetEle = typeof this.target === "string" ? select2(this.target) : this.target;
        if (this.targetEle) {
          this.isFixed = false;
          this.targetEle.appendChild(this.element);
        }
      }
      this.element.classList[this.isFixed ? "add" : "remove"](FIXEDFAB);
    };
    Fab3.prototype.setVisibility = function() {
      this.element.classList[this.visible ? "remove" : "add"](FABHIDDEN);
    };
    Fab3.prototype.setPosition = function() {
      this.element.classList.add(["BottomLeft", "BottomCenter", "BottomRight"].indexOf(this.position) !== -1 ? FABBOTTOM : FABTOP);
      var isRight = ["TopRight", "MiddleRight", "BottomRight"].indexOf(this.position) !== -1;
      this.element.classList.add(!(this.enableRtl || isRight) || this.enableRtl && isRight ? FABLEFT : FABRIGHT);
      if (["MiddleLeft", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.element.classList.add(FABMIDDLE);
      }
      if (["TopCenter", "BottomCenter", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.element.classList.add(FABCENTER);
      }
    };
    Fab3.prototype.clearPosition = function() {
      this.element.classList.remove(FABTOP, FABBOTTOM, FABMIDDLE);
      this.element.classList.remove(FABRIGHT, FABLEFT, FABCENTER);
    };
    Fab3.prototype.refreshPosition = function() {
    };
    Fab3.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.element.classList.remove("e-" + _super.prototype.getModuleName.call(this), FIXEDFAB);
      this.clearPosition();
    };
    Fab3.prototype.onPropertyChanged = function(newProp, oldProp) {
      _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "enableRtl":
          case "position":
            this.clearPosition();
            this.setPosition();
            break;
          case "visible":
            this.setVisibility();
            break;
          case "target":
            this.checkTarget();
            this.setPosition();
            break;
          case "currencyCode":
            this.refresh();
            break;
        }
      }
    };
    __decorate20([Property2("BottomRight")], Fab3.prototype, "position", void 0);
    __decorate20([Property2("")], Fab3.prototype, "target", void 0);
    __decorate20([Property2(true)], Fab3.prototype, "visible", void 0);
    __decorate20([Property2(true)], Fab3.prototype, "isPrimary", void 0);
    Fab3 = __decorate20([NotifyPropertyChanges2], Fab3);
    return Fab3;
  }(Button)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/speed-dial/speed-dial.js
var __extends20 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate21 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var topPosition = ["TopLeft", "TopCenter", "TopRight"];
var bottomPosition = ["BottomLeft", "BottomCenter", "BottomRight"];
var leftPosition = ["TopLeft", "MiddleLeft", "BottomLeft"];
var rightPosition = ["TopRight", "MiddleRight", "BottomRight"];
var SDHIDDEN = "e-speeddial-hidden";
var FIXEDSD = "e-speeddial-fixed";
var SPEEDDIAL = "e-speeddial";
var RTLCLASS = "e-rtl";
var HOVERSD = "e-speeddial-hover-open";
var RADIALSD = "e-speeddial-radial";
var LINEARSD = "e-speeddial-linear";
var TEMPLATESD = "e-speeddial-template";
var SDTEMPLATECONTAINER = "e-speeddial-template-container";
var SDOVERLAY = "e-speeddial-overlay";
var SDPOPUP = "e-speeddial-popup";
var SDUL = "e-speeddial-ul";
var SDLI = "e-speeddial-li";
var SDACTIVELI = "e-speeddial-li-active";
var SDLIICON = "e-speeddial-li-icon";
var SDLITEXT = "e-speeddial-li-text";
var SDLITEXTONLY = "e-speeddial-text-li";
var DISABLED3 = "e-disabled";
var SDVERTICALBOTTOM = "e-speeddial-vert-bottom";
var SDVERTICALRIGHT = "e-speeddial-vert-right";
var SDHORIZONTALTOP = "e-speeddial-horz-top";
var SDHORIZONTALLEFT = "e-speeddial-horz-left";
var SDHORIZONTALRIGHT = "e-speeddial-horz-right";
var SDOVERFLOW = "e-speeddial-overflow";
var SDVERTOVERFLOW = "e-speeddial-vert-overflow";
var SDHORZOVERFLOW = "e-speeddial-horz-overflow";
var SDTOP = "e-speeddial-top";
var SDBOTTOM = "e-speeddial-bottom";
var SDRIGHT = "e-speeddial-right";
var SDLEFT = "e-speeddial-left";
var SDMIDDLE = "e-speeddial-middle";
var SDCENTER = "e-speeddial-center";
var SDTOPLEFT = "e-speeddial-top-left";
var SDBOTTOMRIGHT = "e-speeddial-bottom-right";
var SDTOPRIGHT = "e-speeddial-top-right";
var SDBOTTOMLEFT = "e-speeddial-bottom-left";
var SDVERTDIST = "--speeddialVertDist";
var SDHORZDIST = "--speeddialHorzDist";
var SDRADICALANGLE = "--speeddialRadialAngle";
var SDRADICALOFFSET = "--speeddialRadialOffset";
var SDRADICALMINHEIGHT = "--speeddialRadialMinHeight";
var SDRADICALMINWIDTH = "--speeddialRadialMinWidth";
var SDOVERFLOWLIMIT = "--speeddialOverflowLimit";
var SDRADICALHORZDIST = "--speeddialRadialHorzDist";
var SpeedDialMode;
(function(SpeedDialMode3) {
  SpeedDialMode3["Linear"] = "Linear";
  SpeedDialMode3["Radial"] = "Radial";
})(SpeedDialMode || (SpeedDialMode = {}));
var LinearDirection;
(function(LinearDirection3) {
  LinearDirection3["Up"] = "Up";
  LinearDirection3["Down"] = "Down";
  LinearDirection3["Right"] = "Right";
  LinearDirection3["Left"] = "Left";
  LinearDirection3["Auto"] = "Auto";
})(LinearDirection || (LinearDirection = {}));
var RadialDirection;
(function(RadialDirection3) {
  RadialDirection3["Clockwise"] = "Clockwise";
  RadialDirection3["AntiClockwise"] = "AntiClockwise";
  RadialDirection3["Auto"] = "Auto";
})(RadialDirection || (RadialDirection = {}));
var SpeedDialAnimationEffect;
(function(SpeedDialAnimationEffect3) {
  SpeedDialAnimationEffect3["Fade"] = "Fade";
  SpeedDialAnimationEffect3["FadeZoom"] = "FadeZoom";
  SpeedDialAnimationEffect3["FlipLeftDown"] = "FlipLeftDown";
  SpeedDialAnimationEffect3["FlipLeftUp"] = "FlipLeftUp";
  SpeedDialAnimationEffect3["FlipRightDown"] = "FlipRightDown";
  SpeedDialAnimationEffect3["FlipRightUp"] = "FlipRightUp";
  SpeedDialAnimationEffect3["FlipXDown"] = "FlipXDown";
  SpeedDialAnimationEffect3["FlipXUp"] = "FlipXUp";
  SpeedDialAnimationEffect3["FlipYLeft"] = "FlipYLeft";
  SpeedDialAnimationEffect3["FlipYRight"] = "FlipYRight";
  SpeedDialAnimationEffect3["SlideBottom"] = "SlideBottom";
  SpeedDialAnimationEffect3["SlideLeft"] = "SlideLeft";
  SpeedDialAnimationEffect3["SlideRight"] = "SlideRight";
  SpeedDialAnimationEffect3["SlideTop"] = "SlideTop";
  SpeedDialAnimationEffect3["Zoom"] = "Zoom";
  SpeedDialAnimationEffect3["None"] = "None";
})(SpeedDialAnimationEffect || (SpeedDialAnimationEffect = {}));
var SpeedDialAnimationSettings = (
  /** @class */
  function(_super) {
    __extends20(SpeedDialAnimationSettings3, _super);
    function SpeedDialAnimationSettings3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate21([Property2("Fade")], SpeedDialAnimationSettings3.prototype, "effect", void 0);
    __decorate21([Property2(400)], SpeedDialAnimationSettings3.prototype, "duration", void 0);
    __decorate21([Property2(0)], SpeedDialAnimationSettings3.prototype, "delay", void 0);
    return SpeedDialAnimationSettings3;
  }(ChildProperty2)
);
var RadialSettings = (
  /** @class */
  function(_super) {
    __extends20(RadialSettings3, _super);
    function RadialSettings3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate21([Property2("Auto")], RadialSettings3.prototype, "direction", void 0);
    __decorate21([Property2(-1)], RadialSettings3.prototype, "endAngle", void 0);
    __decorate21([Property2("100px")], RadialSettings3.prototype, "offset", void 0);
    __decorate21([Property2(-1)], RadialSettings3.prototype, "startAngle", void 0);
    return RadialSettings3;
  }(ChildProperty2)
);
var SpeedDialItem = (
  /** @class */
  function(_super) {
    __extends20(SpeedDialItem3, _super);
    function SpeedDialItem3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate21([Property2("")], SpeedDialItem3.prototype, "iconCss", void 0);
    __decorate21([Property2("")], SpeedDialItem3.prototype, "id", void 0);
    __decorate21([Property2("")], SpeedDialItem3.prototype, "text", void 0);
    __decorate21([Property2("")], SpeedDialItem3.prototype, "title", void 0);
    __decorate21([Property2(false)], SpeedDialItem3.prototype, "disabled", void 0);
    return SpeedDialItem3;
  }(ChildProperty2)
);
var SpeedDial = (
  /** @class */
  function(_super) {
    __extends20(SpeedDial3, _super);
    function SpeedDial3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isMenuOpen = false;
      _this.isClock = true;
      _this.isVertical = true;
      _this.isControl = false;
      _this.focusedIndex = -1;
      return _this;
    }
    SpeedDial3.prototype.render = function() {
      this.initialize();
    };
    SpeedDial3.prototype.preRender = function() {
      this.keyConfigs = {
        space: "space",
        enter: "enter",
        end: "end",
        home: "home",
        moveDown: "downarrow",
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        esc: "escape"
      };
      this.validateDirection();
    };
    SpeedDial3.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    SpeedDial3.prototype.getModuleName = function() {
      return "speed-dial";
    };
    SpeedDial3.prototype.initialize = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
      this.fab = new Fab({
        content: this.content,
        cssClass: this.cssClass ? SPEEDDIAL + " " + this.cssClass : SPEEDDIAL,
        disabled: this.disabled,
        enablePersistence: this.enablePersistence,
        enableRtl: this.enableRtl,
        iconCss: this.openIconCss,
        iconPosition: this.iconPosition,
        position: this.position,
        target: this.target,
        visible: this.visible,
        isPrimary: this.isPrimary
      });
      this.fab.appendTo(this.element);
      if (this.items.length > 0 || this.popupTemplate) {
        this.createPopup();
      }
      this.wireEvents();
    };
    SpeedDial3.prototype.wireEvents = function() {
      EventHandler2.add(window, "resize", this.resizeHandler, this);
      EventHandler2.add(document.body, "click", this.bodyClickHandler, this);
      if (this.opensOnHover) {
        this.wireFabHover();
      } else {
        this.wireFabClick();
      }
    };
    SpeedDial3.prototype.wirePopupEvents = function() {
      this.removeRippleEffect = rippleEffect(this.popupEle, {
        selector: "." + SDLIICON
      });
      this.keyboardModule = new KeyboardEvents2(this.element, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
      this.popupKeyboardModule = new KeyboardEvents2(this.popupEle, {
        keyAction: this.popupKeyActionHandler.bind(this),
        keyConfigs: {
          esc: "escape"
        },
        eventName: "keydown"
      });
      this.documentKeyboardModule = new KeyboardEvents2(document.body, {
        keyAction: this.popupKeyActionHandler.bind(this),
        keyConfigs: {
          enter: "enter",
          space: "space"
        },
        eventName: "keydown"
      });
      EventHandler2.add(this.popupEle, "click", this.popupClick, this);
      EventHandler2.add(this.popupEle, "mouseleave", this.popupMouseLeaveHandle, this);
    };
    SpeedDial3.prototype.wireFabClick = function() {
      EventHandler2.add(this.fab.element, "click", this.fabClick, this);
    };
    SpeedDial3.prototype.wireFabHover = function() {
      this.popupEle.classList.add(HOVERSD);
      EventHandler2.add(this.fab.element, "mouseover", this.mouseOverHandle, this);
      EventHandler2.add(this.element, "mouseleave", this.mouseLeaveHandle, this);
    };
    SpeedDial3.prototype.createPopup = function() {
      var className = SDPOPUP + " " + SDHIDDEN;
      className = this.enableRtl ? className + " " + RTLCLASS : className;
      className = this.cssClass ? className + " " + this.cssClass : className;
      this.popupEle = this.createElement("div", {
        className,
        id: this.element.id + "_popup"
      });
      this.element.insertAdjacentElement("afterend", this.popupEle);
      attributes2(this.element, {
        "aria-expanded": "false",
        "aria-haspopup": "true",
        "aria-controls": this.popupEle.id
      });
      this.setPopupContent();
      if (this.modal) {
        this.createOverlay();
      }
      this.checkTarget();
      this.setPositionProps();
      this.wirePopupEvents();
    };
    SpeedDial3.prototype.createOverlay = function() {
      this.overlayEle = this.createElement("div", {
        id: this.element.id + "_overlay",
        className: (SDOVERLAY + (this.isMenuOpen ? "" : " " + SDHIDDEN) + " " + this.cssClass).trim()
      });
      this.element.insertAdjacentElement("beforebegin", this.overlayEle);
    };
    SpeedDial3.prototype.popupClick = function() {
      this.isControl = true;
    };
    SpeedDial3.prototype.bodyClickHandler = function(e) {
      if (this.isControl) {
        this.isControl = false;
        return;
      }
      if (this.isMenuOpen) {
        this.hidePopupEle(e);
      }
    };
    SpeedDial3.prototype.fabClick = function(e) {
      this.isControl = true;
      if (this.isMenuOpen) {
        this.hidePopupEle(e);
      } else {
        this.showPopupEle(e);
      }
    };
    SpeedDial3.prototype.setPopupContent = function() {
      this.popupEle.classList.remove(RADIALSD, LINEARSD, TEMPLATESD);
      if (!this.popupTemplate) {
        this.popupEle.classList.add(this.mode === "Radial" ? RADIALSD : LINEARSD);
        this.createUl();
        this.createItems();
      } else {
        this.popupEle.classList.add(TEMPLATESD);
        this.appendTemplate();
      }
      this.renderReactTemplates();
    };
    SpeedDial3.prototype.appendTemplate = function() {
      var templateContainer = this.createElement("div", {
        className: SDTEMPLATECONTAINER
      });
      append([templateContainer], this.popupEle);
      var templateFunction = this.getTemplateString(this.popupTemplate);
      append(templateFunction({}, this, "fabPopupTemplate", this.element.id + "popupTemplate", this.isStringTemplate), templateContainer);
    };
    SpeedDial3.prototype.getTemplateString = function(template) {
      var stringContent = "";
      try {
        var tempEle = select2(template);
        if (typeof template !== "function" && tempEle) {
          stringContent = tempEle.tagName === "SCRIPT" ? tempEle.innerHTML : tempEle.outerHTML;
        } else {
          stringContent = template;
        }
      } catch (e) {
        stringContent = template;
      }
      return compile4(stringContent);
    };
    SpeedDial3.prototype.updatePopupTemplate = function() {
      if (this.popupEle) {
        if (this.popupEle.querySelector("." + SDLI)) {
          this.clearItems();
          this.popupEle.classList.remove(RADIALSD, LINEARSD);
          this.popupEle.classList.add(TEMPLATESD);
        }
        while (this.popupEle.firstElementChild) {
          remove(this.popupEle.firstElementChild);
        }
        this.setPopupContent();
        this.updatePositionProperties();
      } else {
        this.createPopup();
      }
    };
    SpeedDial3.prototype.createUl = function() {
      var popupUlEle = this.createElement("ul", {
        className: SDUL,
        id: this.element.id + "_ul",
        attrs: {
          "role": "menu"
        }
      });
      this.popupEle.appendChild(popupUlEle);
    };
    SpeedDial3.prototype.createItems = function() {
      var _this = this;
      this.focusedIndex = -1;
      var ul = this.popupEle.querySelector("." + SDUL);
      var _loop_1 = function(index2) {
        var item = this_1.items[parseInt(index2.toString(), 10)];
        var li = this_1.createElement("li", {
          className: SDLI + " " + SDHIDDEN,
          id: item.id ? item.id : this_1.element.id + "_li_" + index2,
          attrs: {
            "role": "menuitem"
          }
        });
        if (item.text) {
          li.setAttribute("aria-label", item.text);
        }
        if (this_1.itemTemplate) {
          var templateFunction = this_1.getTemplateString(this_1.itemTemplate);
          append(templateFunction(item, this_1, "fabItemTemplate", this_1.element.id + "itemTemplate", this_1.isStringTemplate), li);
        } else {
          if (item.iconCss) {
            var iconSpan = this_1.createElement("span", {
              className: SDLIICON + " " + item.iconCss
            });
            li.appendChild(iconSpan);
          }
          if (item.text) {
            var textSpan = this_1.createElement("span", {
              className: SDLITEXT
            });
            textSpan.innerText = item.text;
            li.appendChild(textSpan);
            if (!item.iconCss) {
              li.classList.add(SDLITEXTONLY);
            }
          }
        }
        if (item.disabled) {
          li.classList.add(DISABLED3);
          li.setAttribute("aria-disabled", "true");
        } else {
          EventHandler2.add(li, "click", function(e) {
            return _this.triggerItemClick(e, item);
          }, this_1);
        }
        if (item.title) {
          li.setAttribute("title", item.title);
        }
        var eventArgs = {
          element: li,
          item
        };
        this_1.trigger("beforeItemRender", eventArgs, function(args) {
          ul.appendChild(args.element);
        });
      };
      var this_1 = this;
      for (var index = 0; index < this.items.length; index++) {
        _loop_1(index);
      }
    };
    SpeedDial3.prototype.setRTL = function() {
      this.popupEle.classList[this.enableRtl ? "add" : "remove"](RTLCLASS);
      this.clearHorizontalPosition();
      if (!(this.popupTemplate || this.mode === "Radial")) {
        this.setLinearHorizontalPosition();
      } else {
        if (!this.popupTemplate && this.mode === "Radial") {
          this.setRadialPosition();
        }
        this.setHorizontalPosition();
      }
    };
    SpeedDial3.prototype.checkTarget = function() {
      this.isFixed = true;
      if (this.target) {
        this.targetEle = typeof this.target === "string" ? select2(this.target) : this.target;
        if (this.targetEle) {
          this.targetEle.appendChild(this.element);
          this.isFixed = false;
        }
      }
      if (this.isFixed) {
        if (this.popupEle) {
          this.popupEle.classList.add(FIXEDSD);
        }
        if (this.overlayEle) {
          this.overlayEle.classList.add(FIXEDSD);
        }
      } else {
        if (this.popupEle) {
          this.popupEle.classList.remove(FIXEDSD);
        }
        if (this.overlayEle) {
          this.overlayEle.classList.remove(FIXEDSD);
        }
      }
    };
    SpeedDial3.prototype.setVisibility = function(val) {
      this.setProperties({
        visible: val
      }, true);
      this.fab.setProperties({
        visible: val
      });
    };
    SpeedDial3.prototype.popupMouseLeaveHandle = function(e) {
      var target = e.relatedTarget;
      if (this.opensOnHover && !(target.classList.contains(SPEEDDIAL) || closest2(target, "." + SPEEDDIAL))) {
        this.hidePopupEle(e);
      }
    };
    SpeedDial3.prototype.mouseOverHandle = function(e) {
      this.showPopupEle(e);
    };
    SpeedDial3.prototype.mouseLeaveHandle = function(e) {
      var target = e.relatedTarget;
      if (!(target.classList.contains(SDPOPUP) || closest2(target, "." + SDPOPUP))) {
        this.hidePopupEle(e);
      }
    };
    SpeedDial3.prototype.popupKeyActionHandler = function(e) {
      switch (e.action) {
        case "esc":
          this.hidePopupEle(e);
          break;
        case "enter":
        case "space":
          if (this.isMenuOpen && e.target !== this.element) {
            this.hidePopupEle(e);
          }
          break;
      }
    };
    SpeedDial3.prototype.keyActionHandler = function(e) {
      e.preventDefault();
      switch (e.action) {
        case "enter":
        case "space":
          if (this.isMenuOpen) {
            if (this.focusedIndex !== -1) {
              this.triggerItemClick(e, this.items[this.focusedIndex]);
            } else {
              this.hidePopupEle(e);
            }
          } else {
            this.showPopupEle(e);
          }
          break;
        case "esc":
          this.hidePopupEle(e);
          break;
        default:
          if (this.popupTemplate || !this.isMenuOpen) {
            break;
          }
          switch (e.action) {
            case "end":
              this.focusLastElement();
              break;
            case "home":
              this.focusFirstElement();
              break;
            case "moveRight":
              if (this.mode === "Radial") {
                this.focusLeftRightElement(false);
              } else {
                this.focusLinearElement(false);
              }
              break;
            case "moveDown":
              if (this.mode === "Radial") {
                this.focusUpDownElement(false);
              } else {
                this.focusLinearElement(false);
              }
              break;
            case "moveLeft":
              if (this.mode === "Radial") {
                this.focusLeftRightElement(true);
              } else {
                this.focusLinearElement(true);
              }
              break;
            case "moveUp":
              if (this.mode === "Radial") {
                this.focusUpDownElement(true);
              } else {
                this.focusLinearElement(true);
              }
              break;
          }
          break;
      }
    };
    SpeedDial3.prototype.focusFirstElement = function() {
      var ele = selectAll2("." + SDLI, this.popupEle);
      var index = 0;
      while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED3)) {
        index++;
        if (index > ele.length - 1) {
          return;
        }
      }
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.focusLastElement = function() {
      var ele = selectAll2("." + SDLI, this.popupEle);
      var index = ele.length - 1;
      while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED3)) {
        index--;
        if (index < 0) {
          return;
        }
      }
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.focusLinearElement = function(isLeftUp) {
      var isReversed = this.popupEle.classList.contains(SDVERTICALBOTTOM) || this.popupEle.classList.contains(SDHORIZONTALRIGHT);
      if (isReversed !== isLeftUp) {
        this.focusPrevElement();
      } else {
        this.focusNextElement();
      }
    };
    SpeedDial3.prototype.focusLeftRightElement = function(isLeft) {
      var isradialTop = ["TopLeft", "TopCenter", "TopRight", "MiddleLeft"].indexOf(this.position) !== -1;
      if (isradialTop && isLeft !== this.isClock || !isradialTop && isLeft === this.isClock) {
        this.focusPrevElement();
      } else {
        this.focusNextElement();
      }
    };
    SpeedDial3.prototype.focusUpDownElement = function(isUp) {
      var isradialRight = ["TopRight", "MiddleRight", "BottomRight", "BottomCenter"].indexOf(this.position) !== -1;
      if (isradialRight && isUp !== this.isClock || !isradialRight && isUp === this.isClock) {
        this.focusPrevElement();
      } else {
        this.focusNextElement();
      }
    };
    SpeedDial3.prototype.focusPrevElement = function() {
      var ele = selectAll2("." + SDLI, this.popupEle);
      var index = this.focusedIndex;
      do {
        index--;
        if (index < 0) {
          this.setFocus(-1);
          return;
        }
      } while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED3));
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.focusNextElement = function() {
      var ele = selectAll2("." + SDLI, this.popupEle);
      var index = this.focusedIndex;
      do {
        index++;
        if (index > ele.length - 1) {
          return;
        }
      } while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED3));
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.setFocus = function(index, ele) {
      this.removeFocus();
      if (ele) {
        ele.classList.add(SDACTIVELI);
      }
      this.focusedIndex = index;
    };
    SpeedDial3.prototype.removeFocus = function() {
      var preEle = select2("." + SDACTIVELI, this.popupEle);
      if (preEle) {
        preEle.classList.remove(SDACTIVELI);
      }
    };
    SpeedDial3.prototype.updatePositionProperties = function() {
      this.hidePopupEle();
      this.clearPosition();
      this.validateDirection();
      this.setPositionProps();
    };
    SpeedDial3.prototype.setPositionProps = function() {
      if (this.popupTemplate) {
        this.setPosition();
      } else if (this.mode === "Radial") {
        this.setRadialPosition();
        this.setPosition();
      } else {
        this.setLinearPosition();
        this.setMaxSize();
      }
    };
    SpeedDial3.prototype.validateDirection = function() {
      switch (this.direction) {
        case "Up":
          this.actualLinDirection = topPosition.indexOf(this.position) !== -1 ? "Auto" : "Up";
          break;
        case "Down":
          this.actualLinDirection = bottomPosition.indexOf(this.position) !== -1 ? "Auto" : "Down";
          break;
        case "Right":
          this.actualLinDirection = rightPosition.indexOf(this.position) !== -1 ? "Auto" : "Right";
          break;
        case "Left":
          this.actualLinDirection = leftPosition.indexOf(this.position) !== -1 ? "Auto" : "Left";
          break;
        case "Auto":
        default:
          this.actualLinDirection = "Auto";
          break;
      }
      this.isVertical = !(this.actualLinDirection === "Left" || this.actualLinDirection === "Right");
    };
    SpeedDial3.prototype.setMaxSize = function() {
      var top = this.element.offsetTop;
      var left = this.element.offsetLeft;
      var bottom = (this.isFixed ? window.innerHeight : this.targetEle.clientHeight) - this.element.offsetTop - this.element.offsetHeight;
      var right = (this.isFixed ? window.innerWidth : this.targetEle.clientWidth) - this.element.offsetLeft - this.element.offsetWidth;
      var limit = 0;
      var popupUlEle = this.popupEle.querySelector("." + SDUL);
      if (this.isVertical) {
        limit = this.actualLinDirection === "Up" || this.actualLinDirection === "Auto" && topPosition.indexOf(this.position) === -1 ? top : bottom;
        if (limit < popupUlEle.offsetHeight) {
          this.popupEle.classList.add(SDOVERFLOW, SDVERTOVERFLOW);
          popupUlEle.style.setProperty(SDOVERFLOWLIMIT, limit + "px");
        }
      } else {
        limit = this.enableRtl ? this.direction === "Right" ? left : right : this.direction === "Right" ? right : left;
        if (limit < popupUlEle.offsetWidth) {
          this.popupEle.classList.add(SDOVERFLOW, SDHORZOVERFLOW);
          popupUlEle.style.setProperty(SDOVERFLOWLIMIT, limit + "px");
        }
      }
    };
    SpeedDial3.prototype.setLinearPosition = function() {
      var vertDist = 0;
      var isTop = this.actualLinDirection === "Down" || this.actualLinDirection === "Auto" && topPosition.indexOf(this.position) !== -1 || !this.isVertical && bottomPosition.indexOf(this.position) === -1;
      var elementOffSetHeight = this.element.offsetHeight / 2;
      var isMiddle = ["MiddleRight", "MiddleCenter", "MiddleLeft"].indexOf(this.position) !== -1;
      if (isTop) {
        vertDist = this.element.offsetTop + (this.isVertical ? this.element.offsetHeight : 0);
        if (isMiddle) {
          if (this.actualLinDirection === "Right" || this.actualLinDirection === "Left") {
            vertDist = this.element.offsetTop - elementOffSetHeight;
          }
          if (this.actualLinDirection === "Down") {
            vertDist = vertDist - elementOffSetHeight;
          }
        }
        if (!this.isVertical) {
          this.popupEle.classList.add(SDHORIZONTALTOP);
        }
      } else {
        vertDist = this.isFixed ? window.document.documentElement.clientHeight : this.targetEle.clientHeight;
        vertDist = vertDist - this.element.offsetTop - (this.isVertical ? 0 : this.element.offsetHeight);
        if (isMiddle) {
          if (this.actualLinDirection === "Auto" || this.actualLinDirection === "Up") {
            vertDist = vertDist + elementOffSetHeight;
          }
        }
        if (this.isVertical) {
          this.popupEle.classList.add(SDVERTICALBOTTOM);
        }
      }
      this.popupEle.classList.add(isTop ? SDTOP : SDBOTTOM);
      this.popupEle.style.setProperty(SDVERTDIST, vertDist + "px");
      this.setLinearHorizontalPosition();
    };
    SpeedDial3.prototype.setLinearHorizontalPosition = function() {
      if (this.actualLinDirection === "Right" || this.isVertical && rightPosition.indexOf(this.position) === -1) {
        if (this.enableRtl) {
          this.setRight();
        } else {
          this.setLeft();
        }
        if (!this.isVertical) {
          this.popupEle.classList.add(SDHORIZONTALLEFT);
        }
      } else {
        if (this.enableRtl) {
          this.setLeft();
        } else {
          this.setRight();
        }
        this.popupEle.classList.add(this.isVertical ? SDVERTICALRIGHT : SDHORIZONTALRIGHT);
      }
    };
    SpeedDial3.prototype.setLeft = function() {
      var elementOffSetWidth = this.element.offsetWidth / 2;
      var isCenter = ["TopCenter", "MiddleCenter", "BottomCenter"].indexOf(this.position) !== -1;
      var horzDist = this.element.offsetLeft + (this.isVertical ? 0 : this.element.offsetWidth);
      if (isCenter) {
        if (this.actualLinDirection === "Auto" || this.actualLinDirection === "Down" || this.actualLinDirection === "Up") {
          horzDist = this.element.offsetLeft - elementOffSetWidth;
        } else {
          horzDist = this.actualLinDirection === "Right" ? this.element.offsetLeft + elementOffSetWidth : horzDist + elementOffSetWidth;
        }
      }
      this.popupEle.style.setProperty(SDHORZDIST, horzDist + "px");
      this.popupEle.classList.add(SDLEFT);
    };
    SpeedDial3.prototype.setRight = function() {
      var elementOffSetWidth = this.element.offsetWidth / 2;
      var isCenter = ["TopCenter", "MiddleCenter", "BottomCenter"].indexOf(this.position) !== -1;
      var horzDist = this.isFixed ? window.document.documentElement.clientWidth : this.targetEle.clientWidth;
      horzDist = horzDist - this.element.offsetLeft - (this.isVertical ? this.element.offsetWidth : 0);
      if (isCenter && this.actualLinDirection === "Left") {
        horzDist = horzDist + elementOffSetWidth;
      }
      if (this.popupEle.classList.contains("e-rtl") && isCenter) {
        horzDist = horzDist - elementOffSetWidth;
      }
      this.popupEle.style.setProperty(SDHORZDIST, horzDist + "px");
      this.popupEle.classList.add(SDRIGHT);
    };
    SpeedDial3.prototype.setPosition = function() {
      if (["MiddleLeft", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(SDMIDDLE);
        var yoffset = ((this.isFixed ? window.innerHeight : this.targetEle.clientHeight) - this.popupEle.offsetHeight) / 2;
        this.popupEle.style.setProperty(SDVERTDIST, yoffset + "px");
      }
      this.popupEle.classList.add(bottomPosition.indexOf(this.position) === -1 ? SDTOP : SDBOTTOM);
      this.setHorizontalPosition();
    };
    SpeedDial3.prototype.setHorizontalPosition = function() {
      if (["TopCenter", "BottomCenter", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(SDCENTER);
        var xoffset = ((this.isFixed ? window.innerWidth : this.targetEle.clientWidth) - this.popupEle.offsetWidth) / 2;
        this.popupEle.style.setProperty(SDHORZDIST, xoffset + "px");
      }
      var isRight = rightPosition.indexOf(this.position) !== -1;
      this.popupEle.classList.add(!(this.enableRtl || isRight) || this.enableRtl && isRight ? SDLEFT : SDRIGHT);
    };
    SpeedDial3.prototype.setCustomRadialPosition = function() {
      var viewportWidth = document.documentElement.clientWidth;
      var viewportHeight = document.documentElement.clientHeight;
      if (["TopLeft", "BottomLeft", "MiddleLeft"].indexOf(this.position) !== -1) {
        var horzDist = void 0;
        if (this.enableRtl) {
          if (this.isFixed) {
            horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth);
          } else {
            horzDist = this.targetEle.clientWidth - (this.element.offsetLeft + this.element.offsetWidth);
          }
        } else {
          horzDist = this.element.offsetLeft;
        }
        this.popupEle.style.setProperty(SDRADICALHORZDIST, horzDist + "px");
      }
      if (["TopLeft", "TopCenter", "TopRight"].indexOf(this.position) !== -1) {
        this.popupEle.style.top = this.element.offsetTop + "px";
      }
      if (["TopRight", "BottomRight", "MiddleRight"].indexOf(this.position) !== -1) {
        var horzDist = void 0;
        if (this.enableRtl) {
          horzDist = this.element.offsetLeft;
        } else {
          if (this.isFixed) {
            horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth);
          } else {
            horzDist = this.targetEle.clientWidth - (this.element.offsetLeft + this.element.offsetWidth);
          }
        }
        this.popupEle.style.setProperty(SDRADICALHORZDIST, horzDist + "px");
      }
      if (["BottomLeft", "BottomCenter", "BottomRight"].indexOf(this.position) !== -1) {
        if (this.isFixed) {
          this.popupEle.style.bottom = viewportHeight - (this.element.offsetTop + this.element.offsetHeight) + "px";
        } else {
          this.popupEle.style.bottom = this.targetEle.clientHeight - (this.element.offsetTop + this.element.offsetHeight) + "px";
        }
      }
      if (["TopCenter", "MiddleCenter", "BottomCenter"].indexOf(this.position) !== -1) {
        var horzDist = void 0;
        if (this.enableRtl) {
          if (this.isFixed) {
            horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth) - this.popupEle.offsetWidth / 2;
          } else {
            var targetEleWidth = this.targetEle.clientWidth;
            var popupEleWidth = this.popupEle.offsetWidth;
            horzDist = targetEleWidth - (this.element.offsetLeft + this.element.offsetWidth) - popupEleWidth / 2;
          }
        } else {
          horzDist = this.element.offsetLeft - this.popupEle.offsetWidth / 2;
        }
        this.popupEle.style.setProperty(SDRADICALHORZDIST, horzDist + "px");
      }
      if (["MiddleLeft", "MiddleCenter", "MiddleRight"].indexOf(this.position) !== -1) {
        this.popupEle.style.top = this.element.offsetTop - this.popupEle.offsetHeight / 2 + "px";
      }
    };
    SpeedDial3.prototype.setRadialPosition = function() {
      this.setRadialCorner();
      var range = this.getActualRange();
      this.isClock = range.direction === "Clockwise";
      var offset = formatUnit(range.offset);
      var li = selectAll2("." + SDLI, this.popupEle);
      this.popupEle.style.setProperty(SDRADICALOFFSET, offset);
      this.popupEle.style.setProperty(SDRADICALMINHEIGHT, li[0].offsetHeight + "px");
      this.popupEle.style.setProperty(SDRADICALMINWIDTH, li[0].offsetWidth + "px");
      var availableAngle = Math.abs(range.endAngle - range.startAngle);
      var gaps = availableAngle === 360 || availableAngle === 0 ? li.length : li.length - 1;
      var perAngle = availableAngle / gaps;
      for (var i = 0; i < li.length; i++) {
        var ele = li[parseInt(i.toString(), 10)];
        var startAngle = range.startAngle;
        var angle = this.isClock ? startAngle + perAngle * i : startAngle - perAngle * i;
        angle = angle % 360;
        ele.style.setProperty(SDRADICALANGLE, angle + "deg");
      }
    };
    SpeedDial3.prototype.setRadialCorner = function() {
      if (["TopLeft", "TopCenter", "MiddleLeft", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDTOPRIGHT : SDTOPLEFT);
      }
      if (["TopRight", "TopCenter", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDTOPLEFT : SDTOPRIGHT);
      }
      if (["BottomLeft", "BottomCenter", "MiddleLeft", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDBOTTOMRIGHT : SDBOTTOMLEFT);
      }
      if (["BottomRight", "BottomCenter", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDBOTTOMLEFT : SDBOTTOMRIGHT);
      }
    };
    SpeedDial3.prototype.getActualRange = function() {
      var range = {
        offset: this.radialSettings.offset
      };
      var start = this.radialSettings.startAngle;
      var end = this.radialSettings.endAngle;
      var isClockwise = false;
      switch (this.position) {
        case "TopLeft":
        case "TopRight":
          if ("TopLeft" === this.position !== this.enableRtl) {
            isClockwise = this.radialSettings.direction === "Clockwise";
            this.checkAngleRange(start, end, range, isClockwise, 0, 90, false);
          } else {
            isClockwise = this.radialSettings.direction !== "AntiClockwise";
            this.checkAngleRange(start, end, range, isClockwise, 90, 180, false);
          }
          break;
        case "TopCenter":
          isClockwise = this.radialSettings.direction === "Clockwise";
          this.checkAngleRange(start, end, range, isClockwise, 0, 180, false);
          break;
        case "MiddleLeft":
        case "MiddleRight":
          if ("MiddleLeft" === this.position !== this.enableRtl) {
            isClockwise = this.radialSettings.direction === "Clockwise";
            start = isNullOrUndefined2(start) || start < 0 || start > 360 || start > 90 && start < 270 ? isClockwise ? 270 : 90 : start;
            end = isNullOrUndefined2(end) || end < 0 || end > 360 || end > 90 && end < 270 ? isClockwise ? 90 : 270 : end;
            start = start < 91 ? start + 360 : start;
            end = end < 91 ? end + 360 : end;
            var switchVal = isClockwise && end < start || !isClockwise && end > start;
            range.startAngle = switchVal ? end : start;
            range.endAngle = switchVal ? start : end;
          } else {
            isClockwise = this.radialSettings.direction !== "AntiClockwise";
            this.checkAngleRange(start, end, range, isClockwise, 90, 270, false);
          }
          break;
        case "MiddleCenter":
          isClockwise = this.radialSettings.direction !== "AntiClockwise";
          start = isNullOrUndefined2(start) || start < 0 || start > 360 ? isClockwise ? 0 : 360 : start;
          end = isNullOrUndefined2(end) || end < 0 || end > 360 ? isClockwise ? 360 : 0 : end;
          range.startAngle = !isClockwise && start <= end ? start + 360 : start;
          range.endAngle = isClockwise && end <= start ? end + 360 : end;
          break;
        case "BottomLeft":
        case "BottomRight":
          if ("BottomLeft" === this.position !== this.enableRtl) {
            isClockwise = this.radialSettings.direction === "Clockwise";
            this.checkAngleRange(start, end, range, isClockwise, 270, 360, true);
          } else {
            isClockwise = this.radialSettings.direction !== "AntiClockwise";
            this.checkAngleRange(start, end, range, isClockwise, 180, 270, true);
          }
          break;
        case "BottomCenter":
          isClockwise = this.radialSettings.direction !== "AntiClockwise";
          this.checkAngleRange(start, end, range, isClockwise, 180, 360, true);
          break;
      }
      range.direction = isClockwise ? "Clockwise" : "AntiClockwise";
      return range;
    };
    SpeedDial3.prototype.checkAngleRange = function(start, end, range, isClockwise, min, max, check0) {
      start = this.checkAngle(start, isClockwise, min, max, check0);
      end = this.checkAngle(end, !isClockwise, min, max, check0);
      var switchVal = isClockwise && end < start || !isClockwise && end > start;
      range.startAngle = switchVal ? end : start;
      range.endAngle = switchVal ? start : end;
    };
    SpeedDial3.prototype.checkAngle = function(val, isStart, min, max, check0) {
      if (isNullOrUndefined2(val) || val < 0 || val > 360) {
        return isStart ? min : max;
      } else {
        val = check0 ? val === 0 ? 360 : val : val === 360 ? 0 : val;
        return val >= min && val <= max ? val : isStart ? min : max;
      }
    };
    SpeedDial3.prototype.clearPosition = function() {
      this.popupEle.style.removeProperty(SDRADICALOFFSET);
      this.popupEle.style.removeProperty(SDRADICALMINHEIGHT);
      this.popupEle.style.removeProperty(SDRADICALMINWIDTH);
      this.popupEle.classList.remove(SDTOPLEFT, SDTOPRIGHT, SDBOTTOMLEFT, SDBOTTOMRIGHT);
      this.popupEle.classList.remove(SDTOP, SDBOTTOM, SDMIDDLE);
      this.popupEle.classList.remove(SDHORIZONTALTOP, SDVERTICALBOTTOM);
      this.popupEle.style.removeProperty(SDVERTDIST);
      this.clearHorizontalPosition();
      this.clearOverflow();
    };
    SpeedDial3.prototype.clearHorizontalPosition = function() {
      this.popupEle.style.removeProperty(SDHORZDIST);
      this.popupEle.style.removeProperty(SDRADICALHORZDIST);
      this.popupEle.style.removeProperty("top");
      this.popupEle.style.removeProperty("bottom");
      this.popupEle.classList.remove(SDRIGHT, SDLEFT, SDCENTER);
      this.popupEle.classList.remove(SDVERTICALRIGHT, SDHORIZONTALLEFT, SDHORIZONTALRIGHT);
    };
    SpeedDial3.prototype.clearOverflow = function() {
      this.popupEle.classList.remove(SDOVERFLOW, SDVERTOVERFLOW, SDHORZOVERFLOW);
      this.popupEle.style.removeProperty(SDOVERFLOWLIMIT);
    };
    SpeedDial3.prototype.hidePopupEle = function(e) {
      var _this = this;
      if (!this.popupEle || !this.isMenuOpen) {
        return;
      }
      var eventArgs = {
        element: this.popupEle,
        event: e,
        cancel: false
      };
      this.trigger("beforeClose", eventArgs, function(args) {
        if (args.cancel) {
          return;
        }
        if (_this.animation.effect !== "None") {
          var closeAnimation_1 = {
            name: _this.animation.effect + "Out",
            timingFunction: "easeOut"
          };
          var eleArray_1 = _this.popupTemplate ? [_this.popupEle.firstElementChild] : selectAll2("." + SDLI, _this.popupEle);
          var timeOutInterval_1 = _this.animation.duration / (eleArray_1.length + 1);
          closeAnimation_1.duration = 2 * timeOutInterval_1;
          var animateElement_1 = function(curIndex) {
            var ele2 = eleArray_1[parseInt(curIndex.toString(), 10)];
            closeAnimation_1.delay = curIndex === eleArray_1.length - 1 ? _this.animation.delay : 0;
            closeAnimation_1.begin = function() {
              if (curIndex === eleArray_1.length - 1) {
                _this.startHide();
              }
            };
            closeAnimation_1.end = function() {
              ele2.classList.add(SDHIDDEN);
              if (curIndex === 0) {
                _this.endHide();
              }
            };
            new Animation2(closeAnimation_1).animate(ele2);
            if (curIndex !== 0) {
              var index_1 = curIndex - 1;
              setTimeout(function() {
                animateElement_1(index_1);
              }, timeOutInterval_1);
            }
          };
          animateElement_1(eleArray_1.length - 1);
        } else {
          _this.startHide();
          if (!_this.popupTemplate) {
            var ele = selectAll2("." + SDLI, _this.popupEle);
            ele.forEach(function(element2) {
              element2.classList.add(SDHIDDEN);
            });
          }
          _this.endHide();
        }
      });
    };
    SpeedDial3.prototype.startHide = function() {
      this.element.setAttribute("aria-expanded", "false");
      this.removeFocus();
      this.isMenuOpen = false;
    };
    SpeedDial3.prototype.endHide = function() {
      this.fab.setProperties({
        iconCss: this.openIconCss
      });
      this.popupEle.classList.add(SDHIDDEN);
      if (this.popupTemplate) {
        this.setVisibility(true);
      }
      this.toggleOverlay();
      if (this.popupTemplate) {
        this.popupEle.removeAttribute("tabindex");
      }
      this.trigger("onClose", {
        element: this.popupEle
      });
    };
    SpeedDial3.prototype.showPopupEle = function(e) {
      var _this = this;
      if (!this.popupEle || this.isMenuOpen) {
        return;
      }
      if (this.popupTemplate || this.mode === "Radial") {
        this.setCustomRadialPosition();
      } else {
        this.setLinearPosition();
      }
      var eventArgs = {
        element: this.popupEle,
        event: e,
        cancel: false
      };
      this.trigger("beforeOpen", eventArgs, function(args) {
        if (args.cancel) {
          return;
        }
        if (_this.animation.effect !== "None" || animationMode2 === "Enable" && _this.animation.effect === "None") {
          if (animationMode2 === "Enable" && _this.animation.effect === "None") {
            _this.animation.effect = "Fade";
          }
          if (animationMode2 === "Enable" && _this.animation.duration === 0) {
            _this.animation.duration = 400;
          }
          var openAnimation_1 = {
            name: _this.animation.effect + "In",
            timingFunction: "easeIn"
          };
          var eleArray_2 = _this.popupTemplate ? [_this.popupEle.firstElementChild] : selectAll2("." + SDLI, _this.popupEle);
          var timeOutInterval_2 = _this.animation.duration / (eleArray_2.length + 1);
          openAnimation_1.duration = 2 * timeOutInterval_2;
          var animateElement_2 = function(curIndex) {
            var ele2 = eleArray_2[parseInt(curIndex.toString(), 10)];
            openAnimation_1.delay = curIndex === 0 ? _this.animation.delay : 0;
            openAnimation_1.begin = function() {
              if (curIndex === 0) {
                _this.startShow();
              }
              ele2.classList.remove(SDHIDDEN);
            };
            openAnimation_1.end = function() {
              if (curIndex === eleArray_2.length - 1) {
                _this.endShow();
              }
            };
            new Animation2(openAnimation_1).animate(ele2);
            if (curIndex !== eleArray_2.length - 1) {
              var index_2 = curIndex + 1;
              setTimeout(function() {
                animateElement_2(index_2);
              }, timeOutInterval_2);
            }
          };
          animateElement_2(0);
        } else {
          _this.startShow();
          if (!_this.popupTemplate) {
            var ele = selectAll2("." + SDLI, _this.popupEle);
            ele.forEach(function(element2) {
              element2.classList.remove(SDHIDDEN);
            });
          }
          _this.endShow();
        }
      });
    };
    SpeedDial3.prototype.startShow = function() {
      this.element.setAttribute("aria-expanded", "true");
      this.isMenuOpen = true;
      this.toggleOverlay();
      this.popupEle.classList.remove(SDHIDDEN);
      if (this.popupTemplate) {
        this.setVisibility(false);
      }
    };
    SpeedDial3.prototype.endShow = function() {
      if (this.closeIconCss) {
        this.fab.setProperties({
          iconCss: this.closeIconCss
        });
      }
      if (this.popupTemplate) {
        this.popupEle.setAttribute("tabindex", "1");
        this.popupEle.focus();
      }
      this.trigger("onOpen", {
        element: this.popupEle
      });
    };
    SpeedDial3.prototype.toggleOverlay = function() {
      if (!this.overlayEle) {
        return;
      }
      this.overlayEle.classList[this.isMenuOpen ? "remove" : "add"](SDHIDDEN);
    };
    SpeedDial3.prototype.removeOverlayEle = function() {
      if (!this.overlayEle) {
        return;
      }
      remove(this.overlayEle);
      this.overlayEle = void 0;
    };
    SpeedDial3.prototype.updatePopupItems = function() {
      if (this.popupEle) {
        this.hidePopupEle();
        this.clearItems();
        this.createItems();
        this.updatePositionProperties();
      } else {
        this.createPopup();
      }
    };
    SpeedDial3.prototype.handleResize = function(e) {
      if (!this.popupEle) {
        return;
      }
      this.hidePopupEle(e);
      this.clearOverflow();
      this.setPositionProps();
    };
    SpeedDial3.prototype.triggerItemClick = function(e, item) {
      var target = e.target;
      target = target.classList.contains(SDLI) ? target : closest2(target, "." + SDLI);
      var eventArgs = {
        element: target,
        item,
        event: e
      };
      this.trigger("clicked", eventArgs);
      this.hidePopupEle(e);
    };
    SpeedDial3.prototype.show = function() {
      this.showPopupEle();
    };
    SpeedDial3.prototype.hide = function() {
      this.hidePopupEle();
    };
    SpeedDial3.prototype.refreshPosition = function() {
      this.resizeHandler();
    };
    SpeedDial3.prototype.resizeHandler = function(e) {
      this.handleResize(e);
    };
    SpeedDial3.prototype.clearItems = function() {
      var liList = selectAll2("." + SDLI, this.popupEle);
      liList.forEach(function(element2) {
        remove(element2);
      });
    };
    SpeedDial3.prototype.unwireEvents = function() {
      EventHandler2.remove(window, "resize", this.resizeHandler);
      EventHandler2.remove(document.body, "click", this.bodyClickHandler);
      if (this.opensOnHover) {
        this.unwireFabHover();
      } else {
        this.unwireFabClick();
      }
    };
    SpeedDial3.prototype.unwireFabClick = function() {
      EventHandler2.remove(this.fab.element, "click", this.fabClick);
    };
    SpeedDial3.prototype.unwireFabHover = function() {
      this.popupEle.classList.remove(HOVERSD);
      EventHandler2.remove(this.fab.element, "mouseover", this.mouseOverHandle);
      EventHandler2.remove(this.element, "mouseleave", this.mouseLeaveHandle);
    };
    SpeedDial3.prototype.unwirePopupEvents = function() {
      if (isRippleEnabled) {
        this.removeRippleEffect();
      }
      this.removeRippleEffect = null;
      this.keyboardModule.destroy();
      this.popupKeyboardModule.destroy();
      this.documentKeyboardModule.destroy();
      this.keyboardModule = null;
      this.popupKeyboardModule = null;
      this.documentKeyboardModule = null;
      EventHandler2.remove(this.popupEle, "click", this.popupClick);
      EventHandler2.remove(this.popupEle, "mouseleave", this.popupMouseLeaveHandle);
    };
    SpeedDial3.prototype.destroy = function() {
      var _this = this;
      _super.prototype.destroy.call(this);
      this.unwireEvents();
      ["aria-expanded", "aria-haspopup", "aria-controls"].forEach(function(attr) {
        _this.element.removeAttribute(attr);
      });
      if (this.popupEle) {
        this.unwirePopupEvents();
        remove(this.popupEle);
        this.popupEle = void 0;
      }
      this.removeOverlayEle();
      this.fab.destroy();
      this.fab = void 0;
    };
    SpeedDial3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var fabProplist = ["content", "cssClass", "disabled", "enablePersistence", "enableRtl", "iconPosition", "position", "target", "template", "title", "visible", "isPrimary"];
      var fabModel = extend2({}, newProp);
      for (var _i = 0, _a = Object.keys(fabModel); _i < _a.length; _i++) {
        var prop = _a[_i];
        if (fabProplist.indexOf(prop) < 0) {
          deleteObject2(fabModel, prop);
        }
      }
      this.fab.setProperties(fabModel);
      for (var _b = 0, _c = Object.keys(newProp); _b < _c.length; _b++) {
        var prop = _c[_b];
        switch (prop) {
          case "cssClass":
            if (!this.popupEle) {
              break;
            }
            if (oldProp.cssClass) {
              removeClass2(this.overlayEle ? [this.popupEle, this.overlayEle] : [this.popupEle], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2(this.overlayEle ? [this.popupEle, this.overlayEle] : [this.popupEle], newProp.cssClass.split(" "));
            }
            break;
          case "visible":
          case "disabled":
            this.hide();
            break;
          case "enableRtl":
            if (!this.popupEle) {
              break;
            }
            this.setRTL();
            break;
          case "openIconCss":
            if (!this.isMenuOpen) {
              this.fab.setProperties({
                iconCss: this.openIconCss
              });
            }
            break;
          case "closeIconCss":
            if (this.isMenuOpen) {
              this.fab.setProperties({
                iconCss: this.closeIconCss
              });
            }
            break;
          case "position":
            if (!this.popupEle) {
              break;
            }
            this.updatePositionProperties();
            break;
          case "direction":
            if (!this.popupEle || this.popupTemplate) {
              break;
            }
            this.updatePositionProperties();
            break;
          case "popupTemplate":
            this.updatePopupTemplate();
            break;
          case "target":
            this.hidePopupEle();
            this.checkTarget();
            if (this.overlayEle) {
              this.element.insertAdjacentElement("beforebegin", this.overlayEle);
            }
            if (!this.popupEle) {
              break;
            }
            this.element.insertAdjacentElement("afterend", this.popupEle);
            this.updatePositionProperties();
            break;
          case "items":
          case "itemTemplate":
            if (this.popupTemplate) {
              break;
            }
            this.updatePopupItems();
            break;
          case "modal":
            if (newProp.modal) {
              this.createOverlay();
            } else {
              this.removeOverlayEle();
            }
            break;
          case "mode":
            if (!this.popupEle || this.popupTemplate) {
              break;
            }
            this.popupEle.classList.remove(RADIALSD, LINEARSD);
            this.popupEle.classList.add(this.mode === "Radial" ? RADIALSD : LINEARSD);
            this.updatePositionProperties();
            break;
          case "radialSettings":
            if (this.popupEle && this.mode === "Radial" && !this.popupTemplate) {
              this.setRadialPosition();
            }
            break;
          case "opensOnHover":
            if (this.opensOnHover) {
              this.unwireFabClick();
              this.wireFabHover();
            } else {
              this.unwireFabHover();
              this.wireFabClick();
            }
            break;
        }
      }
    };
    __decorate21([Complex2({}, SpeedDialAnimationSettings)], SpeedDial3.prototype, "animation", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "content", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "closeIconCss", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "cssClass", void 0);
    __decorate21([Property2("Auto")], SpeedDial3.prototype, "direction", void 0);
    __decorate21([Property2(false)], SpeedDial3.prototype, "disabled", void 0);
    __decorate21([Property2("Left")], SpeedDial3.prototype, "iconPosition", void 0);
    __decorate21([Collection([], SpeedDialItem)], SpeedDial3.prototype, "items", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "itemTemplate", void 0);
    __decorate21([Property2("Linear")], SpeedDial3.prototype, "mode", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "openIconCss", void 0);
    __decorate21([Property2(false)], SpeedDial3.prototype, "opensOnHover", void 0);
    __decorate21([Property2("BottomRight")], SpeedDial3.prototype, "position", void 0);
    __decorate21([Property2(false)], SpeedDial3.prototype, "modal", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "popupTemplate", void 0);
    __decorate21([Complex2({}, RadialSettings)], SpeedDial3.prototype, "radialSettings", void 0);
    __decorate21([Property2("")], SpeedDial3.prototype, "target", void 0);
    __decorate21([Property2(true)], SpeedDial3.prototype, "visible", void 0);
    __decorate21([Property2(true)], SpeedDial3.prototype, "isPrimary", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "beforeClose", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "beforeItemRender", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "beforeOpen", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "created", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "clicked", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "onClose", void 0);
    __decorate21([Event3()], SpeedDial3.prototype, "onOpen", void 0);
    SpeedDial3 = __decorate21([NotifyPropertyChanges2], SpeedDial3);
    return SpeedDial3;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-buttons/src/smart-paste-button/smart-paste-button.js
var __extends21 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate22 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = function(thisArg, _arguments, P, generator) {
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : new P(function(resolve2) {
        resolve2(result.value);
      }).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
var __generator = function(thisArg, body) {
  var _ = {
    label: 0,
    sent: function() {
      if (t[0] & 1) throw t[1];
      return t[1];
    },
    trys: [],
    ops: []
  }, f, y, t, g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (_) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
};
var SmartPasteButton = (
  /** @class */
  function(_super) {
    __extends21(SmartPasteButton3, _super);
    function SmartPasteButton3(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    SmartPasteButton3.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "click", this.smartPasteBtnClickHandler, this);
    };
    SmartPasteButton3.prototype.unWireEvents = function() {
      EventHandler2.remove(this.element, "click", this.smartPasteBtnClickHandler);
    };
    SmartPasteButton3.prototype.smartPasteBtnClickHandler = function(args) {
      return __awaiter(this, void 0, void 0, function() {
        var target, formElement, formFields, clipboardContent, fieldsData, systemRole, userRole, settings, response;
        return __generator(this, function(_a) {
          switch (_a.label) {
            case 0:
              target = args.target;
              formElement = target.closest("form");
              if (!formElement) {
                return [
                  2
                  /*return*/
                ];
              }
              formFields = this.getFormFields(formElement);
              if (formFields.length === 0) {
                return [
                  2
                  /*return*/
                ];
              }
              return [4, this.getClipboardContent().then(function(text) {
                return text;
              })];
            case 1:
              clipboardContent = _a.sent();
              if (!(clipboardContent !== "Clipboard API not supported" && clipboardContent !== "Clipboard access failed")) return [3, 6];
              _a.label = 2;
            case 2:
              _a.trys.push([2, , 5, 6]);
              this.disabled = true;
              fieldsData = formFields.map(function(field) {
                return {
                  fieldName: field.fieldName,
                  description: field.description,
                  allowedValues: field.allowedValues,
                  type: field.type
                };
              });
              systemRole = "\nCurrent date: " + (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
                year: "numeric",
                month: "long",
                day: "numeric"
              }) + "\n\nEach response line matches the following format:\nFIELD identifier^^^value\n\nGive a response with the following lines only, with values inferred from USER_DATA:\n" + this.formatFields(fieldsData) + "\nEND_RESPONSE\n\nDo not explain how the values were determined.\nFor fields without any corresponding information in USER_DATA, use value NO_DATA.";
              userRole = "\nUSER_DATA: " + clipboardContent + "\n                    ";
              settings = {
                messages: [{
                  role: "system",
                  content: systemRole
                }, {
                  role: "user",
                  content: userRole
                }],
                temperature: 0,
                topP: 1,
                maxTokens: 2e3,
                frequencyPenalty: 0.1,
                presencePenalty: 0,
                stop: ["END_RESPONSE"]
              };
              if (!(typeof this.aiAssistHandler === "function")) return [3, 4];
              return [4, this.aiAssistHandler(settings)];
            case 3:
              response = _a.sent();
              if (typeof response === "string" && response !== "") {
                this.setFormFields(formElement, formFields, response);
              }
              _a.label = 4;
            case 4:
              return [3, 6];
            case 5:
              this.disabled = false;
              return [
                7
                /*endfinally*/
              ];
            case 6:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    SmartPasteButton3.prototype.formatFields = function(fields) {
      var result = [];
      fields.forEach(function(field) {
        var fieldOutput = [];
        fieldOutput.push("\nFIELD " + field.fieldName + "^^^");
        if (field.description) {
          fieldOutput.push("The " + field.description);
        }
        if (field.allowedValues && field.allowedValues.length > 0) {
          fieldOutput.push(" (multiple choice, with allowed values: ");
          fieldOutput.push(field.allowedValues.map(function(val) {
            return "" + val;
          }).join(","));
          fieldOutput.push(")");
        } else {
          fieldOutput.push(" of type " + field.type);
        }
        result.push(fieldOutput.join(""));
      });
      return result.join("");
    };
    SmartPasteButton3.prototype.setFormFields = function(form, formFields, response) {
      var _this = this;
      var responseData = {};
      var fieldPrefix = "FIELD ";
      var currentField = null;
      response.split("\n").forEach(function(line) {
        if (line.startsWith(fieldPrefix)) {
          var parts = line.substring(fieldPrefix.length).split("^^^");
          if (parts.length === 2) {
            responseData["" + parts[0]] = parts[1];
            currentField = parts[0];
          }
        } else if (currentField) {
          responseData["" + currentField] += "\n" + line;
        }
      });
      formFields.forEach(function(field) {
        var value = responseData[field.fieldName];
        if (value !== void 0) {
          value = value.trim();
          if (value === "NO_DATA") {
            return;
          }
          if (field.element instanceof HTMLInputElement && field.element.type === "radio") {
            var radioButton = _this.findRadioButton(form, field.element.name, value);
            if (radioButton) {
              _this.updateElementValue(radioButton, "true");
            }
          } else {
            _this.updateElementValue(field.element, value);
          }
        }
      });
    };
    SmartPasteButton3.prototype.findRadioButton = function(form, name, value) {
      var _this = this;
      var radioButtons = Array.from(form.querySelectorAll("input[type=radio]")).filter(function(radio) {
        return radio instanceof HTMLInputElement && radio.name === name;
      }).map(function(radio) {
        return {
          elem: radio,
          text: _this.getElementDescription(form, radio)
        };
      });
      var exactMatch = radioButtons.find(function(radio) {
        return radio.text === value;
      });
      if (exactMatch) {
        return exactMatch.elem;
      }
      var partialMatch = radioButtons.filter(function(radio) {
        return radio.text && radio.text.includes(value);
      });
      if (partialMatch.length === 1) {
        return partialMatch[0].elem;
      }
      return null;
    };
    SmartPasteButton3.prototype.triggerBeforeChange = function(element2) {
      element2.dispatchEvent(new CustomEvent("beforeinput", {
        bubbles: true,
        detail: {
          fromSmartComponents: true
        }
      }));
    };
    SmartPasteButton3.prototype.triggerAfterChange = function(element2) {
      element2.dispatchEvent(new CustomEvent("input", {
        bubbles: true,
        detail: {
          fromSmartComponents: true
        }
      }));
      element2.dispatchEvent(new CustomEvent("change", {
        bubbles: true,
        detail: {
          fromSmartComponents: true
        }
      }));
    };
    SmartPasteButton3.prototype.updateElementValue = function(element2, value) {
      var isEjsControl = element2.classList.contains("e-control");
      if (element2 instanceof HTMLInputElement && (element2.type === "radio" || element2.type === "checkbox")) {
        var responseValue = value == null ? void 0 : value.toString().toLowerCase();
        var isResponseValue = responseValue === "true" || responseValue === "yes" || responseValue === "on";
        if (element2.checked !== isResponseValue) {
          this.triggerBeforeChange(element2);
          if (isEjsControl) {
            element2["ej2_instances"][0].checked = isResponseValue;
          } else {
            element2.checked = isResponseValue;
          }
          this.triggerAfterChange(element2);
        }
      } else if (element2 instanceof HTMLSelectElement) {
        var optionText_1 = value.toString();
        var index = null;
        var options = Array.from(element2.querySelectorAll("option"));
        var exactMatch = options.filter(function(option) {
          return option.textContent === optionText_1;
        });
        if (exactMatch.length > 0) {
          index = options.indexOf(exactMatch[0]);
        } else {
          var partialMatch = options.filter(function(option) {
            return option.textContent && option.textContent.indexOf(optionText_1) >= 0;
          });
          if (partialMatch.length === 1) {
            index = options.indexOf(partialMatch[0]);
          }
        }
        if (index !== null && element2.selectedIndex !== index) {
          this.triggerBeforeChange(element2);
          if (isEjsControl) {
            element2["ej2_instances"][0].index = index;
          } else {
            element2.selectedIndex = index;
          }
          this.triggerAfterChange(element2);
        }
      } else {
        this.triggerBeforeChange(element2);
        if (element2.classList.contains("e-rating") || element2.classList.contains("e-colorpicker")) {
          element2["ej2_instances"][0].value = value;
        } else {
          element2.value = value;
        }
        this.triggerAfterChange(element2);
      }
      element2.focus();
    };
    SmartPasteButton3.prototype.getFormFields = function(form) {
      var _this = this;
      var fields = [];
      var uniqueCount = 0;
      form.querySelectorAll("input, select, textarea").forEach(function(element2) {
        if (!(element2 instanceof HTMLInputElement || element2 instanceof HTMLSelectElement || element2 instanceof HTMLTextAreaElement)) {
          return;
        }
        if (element2.type === "hidden" || _this.isFieldIgnore(element2)) {
          return;
        }
        var isRadioButton = element2.type === "radio";
        var identifier = isRadioButton ? element2.name : element2.id || element2.name || "unidentified_" + ++uniqueCount;
        if (isRadioButton && fields.find(function(field) {
          return field.fieldName === identifier;
        })) {
          return;
        }
        var FieldDescription = null;
        if (!isRadioButton) {
          FieldDescription = _this.getElementDescription(form, element2);
          if (!FieldDescription) {
            return;
          }
        }
        var fieldInfo = {
          fieldName: element2.name,
          description: FieldDescription,
          element: element2,
          type: element2.type === "checkbox" ? "boolean" : element2.type === "number" ? "number" : "string"
        };
        if (element2 instanceof HTMLSelectElement) {
          var options = Array.from(element2.querySelectorAll("option")).filter(function(option) {
            return option.value;
          });
          fieldInfo.allowedValues = options.map(function(option) {
            return option.textContent;
          });
          fieldInfo.type = "fixed-choices";
        } else if (isRadioButton) {
          fieldInfo.allowedValues = [];
          fieldInfo.type = "fixed-choices";
          Array.from(form.querySelectorAll("input[type=radio]")).forEach(function(radio) {
            if (radio.name === identifier) {
              var radioDescription = _this.getElementDescription(form, radio);
              if (radioDescription) {
                fieldInfo.allowedValues.push(radioDescription);
              }
            }
          });
        }
        fields.push(fieldInfo);
      });
      return fields;
    };
    SmartPasteButton3.prototype.isFieldIgnore = function(element2) {
      return element2.hasAttribute("data-smartpaste-ignore") || element2.hasAttribute("aria-disabled") && element2.getAttribute("aria-disabled") === "true" || element2.hasAttribute("disabled") || element2.hasAttribute("readonly") || element2.hasAttribute("aria-readonly") && element2.getAttribute("aria-readonly") === "true" || element2.hasAttribute("aria-hidden") && element2.getAttribute("aria-hidden") === "true";
    };
    SmartPasteButton3.prototype.getElementDescription = function(form, element2) {
      if (element2.hasAttribute("data-smartpaste-description")) {
        return element2.getAttribute("data-smartpaste-description");
      }
      if ((element2 instanceof HTMLInputElement || element2 instanceof HTMLTextAreaElement) && element2.placeholder) {
        return element2.placeholder;
      }
      var label = form.querySelector('label[for="' + element2.id + '"]');
      if (label) {
        return label.textContent.trim();
      }
      return element2.name || element2.id;
    };
    SmartPasteButton3.prototype.getClipboardContent = function() {
      return __awaiter(this, void 0, void 0, function() {
        var navigatorObj, customClipboard, error_1;
        return __generator(this, function(_a) {
          switch (_a.label) {
            case 0:
              navigatorObj = navigator;
              customClipboard = document.getElementById("custom-clipboard");
              if (!(customClipboard && customClipboard.value)) return [3, 1];
              return [2, customClipboard.value];
            case 1:
              if (!(typeof window !== "undefined" && navigatorObj.clipboard && navigatorObj.clipboard.readText)) return [3, 6];
              _a.label = 2;
            case 2:
              _a.trys.push([2, 4, , 5]);
              return [4, navigatorObj.clipboard.readText()];
            case 3:
              return [2, _a.sent()];
            case 4:
              error_1 = _a.sent();
              return [2, "Clipboard access failed"];
            case 5:
              return [3, 7];
            case 6:
              return [2, "Clipboard API not supported"];
            case 7:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    __decorate22([Property2()], SmartPasteButton3.prototype, "aiAssistHandler", void 0);
    return SmartPasteButton3;
  }(Button)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/common/resize.js
var elementClass = ["north-west", "north", "north-east", "west", "east", "south-west", "south", "south-east"];
var RESIZE_HANDLER = "e-resize-handle";
var FOCUSED_HANDLER = "e-focused-handle";
var DIALOG_RESIZABLE = "e-dlg-resizable";
var RESTRICT_LEFT = ["e-restrict-left"];
var RESIZE_WITHIN_VIEWPORT = "e-resize-viewport";
var dialogBorderResize = ["north", "west", "east", "south"];
var targetElement;
var selectedHandler;
var originalWidth = 0;
var originalHeight = 0;
var originalX = 0;
var originalY = 0;
var originalMouseX = 0;
var originalMouseY = 0;
var minHeight;
var maxHeight;
var minWidth;
var maxWidth;
var containerElement;
var resizeStart = null;
var resize = null;
var resizeEnd = null;
var resizeWestWidth;
var setLeft = true;
var previousWidth = 0;
var setWidth = true;
function createResize(args) {
  resizeStart = args.resizeBegin;
  resize = args.resizing;
  resizeEnd = args.resizeComplete;
  targetElement = getDOMElement(args.element);
  containerElement = getDOMElement(args.boundary);
  var directions = args.direction.split(" ");
  for (var i = 0; i < directions.length; i++) {
    if (dialogBorderResize.indexOf(directions[i]) >= 0 && directions[i]) {
      setBorderResizeElm(directions[i]);
    } else if (directions[i].trim() !== "") {
      var resizeHandler = createElement2("div", {
        className: "e-icons " + RESIZE_HANDLER + " e-" + directions[i]
      });
      targetElement.appendChild(resizeHandler);
    }
  }
  minHeight = args.minHeight;
  minWidth = args.minWidth;
  maxWidth = args.maxWidth;
  maxHeight = args.maxHeight;
  if (args.proxy && args.proxy.element && args.proxy.element.classList.contains("e-dialog")) {
    wireEvents(args.proxy);
  } else {
    wireEvents();
  }
}
function setBorderResizeElm(direction) {
  calculateValues();
  var borderBottom = createElement2("span", {
    attrs: {
      "unselectable": "on",
      "contenteditable": "false"
    }
  });
  borderBottom.setAttribute("class", "e-dialog-border-resize e-" + direction);
  if (direction === "south") {
    borderBottom.style.height = "2px";
    borderBottom.style.width = "100%";
    borderBottom.style.bottom = "0px";
    borderBottom.style.left = "0px";
  }
  if (direction === "north") {
    borderBottom.style.height = "2px";
    borderBottom.style.width = "100%";
    borderBottom.style.top = "0px";
    borderBottom.style.left = "0px";
  }
  if (direction === "east") {
    borderBottom.style.height = "100%";
    borderBottom.style.width = "2px";
    borderBottom.style.right = "0px";
    borderBottom.style.top = "0px";
  }
  if (direction === "west") {
    borderBottom.style.height = "100%";
    borderBottom.style.width = "2px";
    borderBottom.style.left = "0px";
    borderBottom.style.top = "0px";
  }
  targetElement.appendChild(borderBottom);
}
function getDOMElement(element2) {
  var domElement;
  if (!isNullOrUndefined2(element2)) {
    if (typeof element2 === "string") {
      domElement = document.querySelector(element2);
    } else {
      domElement = element2;
    }
  }
  return domElement;
}
function wireEvents(args) {
  var context = args || this;
  var resizers = targetElement.querySelectorAll("." + RESIZE_HANDLER);
  for (var i = 0; i < resizers.length; i++) {
    selectedHandler = resizers[i];
    EventHandler2.add(selectedHandler, "mousedown", onMouseDown, context);
    var eventName = Browser2.info.name === "msie" ? "pointerdown" : "touchstart";
    EventHandler2.add(selectedHandler, eventName, onTouchStart, context);
  }
  var borderResizers = targetElement.querySelectorAll(".e-dialog-border-resize");
  if (!isNullOrUndefined2(borderResizers)) {
    for (var i = 0; i < borderResizers.length; i++) {
      selectedHandler = borderResizers[i];
      EventHandler2.add(selectedHandler, "mousedown", onMouseDown, context);
      var eventName = Browser2.info.name === "msie" ? "pointerdown" : "touchstart";
      EventHandler2.add(selectedHandler, eventName, onTouchStart, context);
    }
  }
}
function getEventType(e) {
  return e.indexOf("mouse") > -1 ? "mouse" : "touch";
}
function onMouseDown(e) {
  e.preventDefault();
  targetElement = e.target.parentElement;
  calculateValues();
  originalMouseX = e.pageX;
  originalMouseY = e.pageY;
  e.target.classList.add(FOCUSED_HANDLER);
  if (!isNullOrUndefined2(resizeStart)) {
    var proxy_1 = this;
    if (resizeStart(e, proxy_1) === true) {
      return;
    }
  }
  if (this.targetEle && targetElement && targetElement.querySelector("." + DIALOG_RESIZABLE)) {
    containerElement = this.target === "body" ? null : this.targetEle;
    maxWidth = this.targetEle.clientWidth;
    maxHeight = this.targetEle.clientHeight;
  }
  var target = isNullOrUndefined2(containerElement) ? document : containerElement;
  EventHandler2.add(target, "mousemove", onMouseMove, this);
  EventHandler2.add(document, "mouseup", onMouseUp, this);
  for (var i = 0; i < RESTRICT_LEFT.length; i++) {
    if (targetElement.classList.contains(RESTRICT_LEFT[i])) {
      setLeft = false;
    } else {
      setLeft = true;
    }
  }
}
function onMouseUp(e) {
  var touchMoveEvent = Browser2.info.name === "msie" ? "pointermove" : "touchmove";
  var touchEndEvent = Browser2.info.name === "msie" ? "pointerup" : "touchend";
  var target = isNullOrUndefined2(containerElement) ? document : containerElement;
  var eventName = Browser2.info.name === "msie" ? "pointerdown" : "touchstart";
  EventHandler2.remove(target, "mousemove", onMouseMove);
  EventHandler2.remove(target, touchMoveEvent, onMouseMove);
  EventHandler2.remove(target, eventName, onMouseMove);
  if (!isNullOrUndefined2(document.body.querySelector("." + FOCUSED_HANDLER))) {
    document.body.querySelector("." + FOCUSED_HANDLER).classList.remove(FOCUSED_HANDLER);
  }
  if (!isNullOrUndefined2(resizeEnd)) {
    var proxy_2 = this;
    resizeEnd(e, proxy_2);
  }
  EventHandler2.remove(document, "mouseup", onMouseUp);
  EventHandler2.remove(document, touchEndEvent, onMouseUp);
}
function calculateValues() {
  originalWidth = parseFloat(getComputedStyle(targetElement, null).getPropertyValue("width").replace("px", ""));
  originalHeight = parseFloat(getComputedStyle(targetElement, null).getPropertyValue("height").replace("px", ""));
  originalX = targetElement.getBoundingClientRect().left;
  originalY = targetElement.getBoundingClientRect().top;
}
function onTouchStart(e) {
  targetElement = e.target.parentElement;
  calculateValues();
  var dialogResizeElement = targetElement.classList.contains("e-dialog");
  if ((e.target.classList.contains(RESIZE_HANDLER) || e.target.classList.contains("e-dialog-border-resize")) && dialogResizeElement) {
    e.target.classList.add(FOCUSED_HANDLER);
  }
  var coordinates = e.touches ? e.changedTouches[0] : e;
  originalMouseX = coordinates.pageX;
  originalMouseY = coordinates.pageY;
  if (!isNullOrUndefined2(resizeStart)) {
    var proxy_3 = this;
    if (resizeStart(e, proxy_3) === true) {
      return;
    }
  }
  var touchMoveEvent = Browser2.info.name === "msie" ? "pointermove" : "touchmove";
  var touchEndEvent = Browser2.info.name === "msie" ? "pointerup" : "touchend";
  var target = isNullOrUndefined2(containerElement) ? document : containerElement;
  EventHandler2.add(target, touchMoveEvent, onMouseMove, this);
  EventHandler2.add(document, touchEndEvent, onMouseUp, this);
}
function onMouseMove(e) {
  if (e.target.classList.contains(RESIZE_HANDLER) && e.target.classList.contains(FOCUSED_HANDLER)) {
    selectedHandler = e.target;
  } else if (!isNullOrUndefined2(document.body.querySelector("." + FOCUSED_HANDLER))) {
    selectedHandler = document.body.querySelector("." + FOCUSED_HANDLER);
  }
  if (!isNullOrUndefined2(selectedHandler)) {
    var resizeTowards = "";
    for (var i = 0; i < elementClass.length; i++) {
      if (selectedHandler.classList.contains("e-" + elementClass[i])) {
        resizeTowards = elementClass[i];
      }
    }
    if (!isNullOrUndefined2(resize)) {
      var proxy_4 = this;
      resize(e, proxy_4);
    }
    switch (resizeTowards) {
      case "south":
        resizeSouth(e);
        break;
      case "north":
        resizeNorth(e);
        break;
      case "west":
        resizeWest(e);
        break;
      case "east":
        resizeEast(e);
        break;
      case "south-east":
        resizeSouth(e);
        resizeEast(e);
        break;
      case "south-west":
        resizeSouth(e);
        resizeWest(e);
        break;
      case "north-east":
        resizeNorth(e);
        resizeEast(e);
        break;
      case "north-west":
        resizeNorth(e);
        resizeWest(e);
        break;
      default:
        break;
    }
  }
}
function getClientRectValues(element2) {
  return element2.getBoundingClientRect();
}
function resizeSouth(e) {
  var documentHeight = document.documentElement.clientHeight;
  var calculateValue = false;
  var coordinates = e.touches ? e.changedTouches[0] : e;
  var currentpageY = coordinates.pageY;
  var targetRectValues = getClientRectValues(targetElement);
  var containerRectValues;
  if (!isNullOrUndefined2(containerElement)) {
    containerRectValues = getClientRectValues(containerElement);
  }
  if (!isNullOrUndefined2(containerElement)) {
    calculateValue = true;
  } else if (isNullOrUndefined2(containerElement) && (documentHeight - currentpageY >= 0 || targetRectValues.top < 0)) {
    calculateValue = true;
  }
  var calculatedHeight = originalHeight + (currentpageY - originalMouseY);
  calculatedHeight = calculatedHeight > minHeight ? calculatedHeight : minHeight;
  var containerTop = 0;
  if (!isNullOrUndefined2(containerElement)) {
    containerTop = containerRectValues.top;
  }
  var borderValue = isNullOrUndefined2(containerElement) ? 0 : containerElement.offsetHeight - containerElement.clientHeight;
  var topWithoutborder = targetRectValues.top - containerTop - borderValue / 2;
  topWithoutborder = topWithoutborder < 0 ? 0 : topWithoutborder;
  if (targetRectValues.top > 0 && topWithoutborder + calculatedHeight > maxHeight) {
    calculateValue = false;
    if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {
      return;
    }
    targetElement.style.height = maxHeight - parseInt(topWithoutborder.toString(), 10) + "px";
    return;
  }
  var targetTop = 0;
  if (calculateValue) {
    if (targetRectValues.top < 0 && documentHeight + (targetRectValues.height + targetRectValues.top) > 0) {
      targetTop = targetRectValues.top;
      if (calculatedHeight + targetTop <= 30) {
        calculatedHeight = targetRectValues.height - (targetRectValues.height + targetRectValues.top) + 30;
      }
    }
    if (calculatedHeight + targetRectValues.top >= maxHeight) {
      targetElement.style.height = targetRectValues.height + (documentHeight - (targetRectValues.height + targetRectValues.top)) + "px";
    }
    var calculatedTop = isNullOrUndefined2(containerElement) ? targetTop : topWithoutborder;
    if (calculatedHeight >= minHeight && calculatedHeight + calculatedTop <= maxHeight) {
      targetElement.style.height = calculatedHeight + "px";
    }
  }
}
function resizeNorth(e) {
  var calculateValue = false;
  var boundaryRectValues;
  var pageY = getEventType(e.type) === "mouse" ? e.pageY : e.touches[0].pageY;
  var targetRectValues = getClientRectValues(targetElement);
  var borderValue = isNullOrUndefined2(containerElement) ? 0 : containerElement.offsetHeight - containerElement.clientHeight;
  if (!isNullOrUndefined2(containerElement)) {
    boundaryRectValues = getClientRectValues(containerElement);
  }
  if (!isNullOrUndefined2(containerElement) && targetRectValues.top - boundaryRectValues.top > 0) {
    calculateValue = true;
  } else if (isNullOrUndefined2(containerElement) && pageY > 0) {
    calculateValue = true;
  } else if (!isNullOrUndefined2(containerElement) && Math.floor(targetRectValues.top - boundaryRectValues.top + targetRectValues.height + (boundaryRectValues.bottom - targetRectValues.bottom)) - borderValue <= maxHeight) {
    calculateValue = true;
  }
  var currentHeight = originalHeight - (pageY - originalMouseY);
  if (calculateValue) {
    if (currentHeight >= minHeight && currentHeight <= maxHeight) {
      var containerTop = 0;
      if (!isNullOrUndefined2(containerElement)) {
        containerTop = boundaryRectValues.top;
      }
      var top_1 = originalY - containerTop + (pageY - originalMouseY);
      top_1 = top_1 > 0 ? top_1 : 1;
      targetElement.style.height = currentHeight + "px";
      targetElement.style.top = top_1 + "px";
    }
  }
}
function resizeWest(e) {
  var documentWidth = document.documentElement.clientWidth;
  var calculateValue = false;
  var rectValues;
  if (!isNullOrUndefined2(containerElement)) {
    rectValues = getClientRectValues(containerElement);
  }
  var pageX = getEventType(e.type) === "mouse" ? e.pageX : e.touches[0].pageX;
  var targetRectValues = getClientRectValues(targetElement);
  var borderValue = isNullOrUndefined2(containerElement) ? 0 : containerElement.offsetWidth - containerElement.clientWidth;
  var left = isNullOrUndefined2(containerElement) ? 0 : rectValues.left;
  var containerWidth = isNullOrUndefined2(containerElement) ? 0 : rectValues.width;
  if (isNullOrUndefined2(resizeWestWidth)) {
    if (!isNullOrUndefined2(containerElement)) {
      resizeWestWidth = targetRectValues.left - left - borderValue / 2 + targetRectValues.width;
      resizeWestWidth = resizeWestWidth + (containerWidth - borderValue - resizeWestWidth);
    } else {
      resizeWestWidth = documentWidth;
    }
  }
  if (!isNullOrUndefined2(containerElement) && Math.floor(targetRectValues.left - rectValues.left + targetRectValues.width + (rectValues.right - targetRectValues.right)) - borderValue <= maxWidth) {
    calculateValue = true;
  } else if (isNullOrUndefined2(containerElement) && pageX >= 0) {
    calculateValue = true;
  }
  var calculatedWidth = originalWidth - (pageX - originalMouseX);
  if (setLeft) {
    calculatedWidth = calculatedWidth > resizeWestWidth ? resizeWestWidth : calculatedWidth;
  }
  if (calculateValue) {
    if (calculatedWidth >= minWidth && calculatedWidth <= maxWidth) {
      var containerLeft = 0;
      if (!isNullOrUndefined2(containerElement)) {
        containerLeft = rectValues.left;
      }
      var left_1 = originalX - containerLeft + (pageX - originalMouseX);
      left_1 = left_1 > 0 ? left_1 : 1;
      if (calculatedWidth !== previousWidth && setWidth) {
        targetElement.style.width = calculatedWidth + "px";
      }
      if (setLeft) {
        targetElement.style.left = left_1 + "px";
        if (left_1 === 1) {
          setWidth = false;
        } else {
          setWidth = true;
        }
      }
    }
  }
  previousWidth = calculatedWidth;
}
function resizeEast(e) {
  var documentWidth = document.documentElement.clientWidth;
  var calculateValue = false;
  var containerRectValues;
  if (!isNullOrUndefined2(containerElement)) {
    containerRectValues = getClientRectValues(containerElement);
  }
  var coordinates = e.touches ? e.changedTouches[0] : e;
  var pageX = coordinates.pageX;
  var targetRectValues = getClientRectValues(targetElement);
  if (!isNullOrUndefined2(containerElement) && (targetRectValues.left - containerRectValues.left + targetRectValues.width <= maxWidth || targetRectValues.right - containerRectValues.left >= targetRectValues.width)) {
    calculateValue = true;
  } else if (isNullOrUndefined2(containerElement) && documentWidth - pageX > 0) {
    calculateValue = true;
  }
  var calculatedWidth = originalWidth + (pageX - originalMouseX);
  var containerLeft = 0;
  if (!isNullOrUndefined2(containerElement)) {
    containerLeft = containerRectValues.left;
  }
  if (targetRectValues.left - containerLeft + calculatedWidth > maxWidth) {
    calculateValue = false;
    if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {
      return;
    }
    targetElement.style.width = maxWidth - (targetRectValues.left - containerLeft) + "px";
  }
  if (calculateValue) {
    if (calculatedWidth >= minWidth && calculatedWidth <= maxWidth) {
      targetElement.style.width = calculatedWidth + "px";
    }
  }
}
function setMinHeight(minimumHeight) {
  minHeight = minimumHeight;
}
function setMaxWidth(value) {
  maxWidth = value;
}
function setMaxHeight(value) {
  maxHeight = value;
}
function removeResize() {
  var handlers = targetElement.querySelectorAll("." + RESIZE_HANDLER);
  for (var i = 0; i < handlers.length; i++) {
    detach2(handlers[i]);
  }
  var borderResizers = targetElement.querySelectorAll(".e-dialog-border-resize");
  if (!isNullOrUndefined2(borderResizers)) {
    for (var i = 0; i < borderResizers.length; i++) {
      detach2(borderResizers[i]);
    }
  }
}
function resizeDestroy() {
  targetElement = null;
  selectedHandler = null;
  containerElement = null;
  resizeWestWidth = null;
  resizeStart = null;
  resize = null;
  resizeEnd = null;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/dialog/dialog.js
var __extends22 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate23 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ButtonProps = (
  /** @class */
  function(_super) {
    __extends22(ButtonProps2, _super);
    function ButtonProps2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate23([Property2(true)], ButtonProps2.prototype, "isFlat", void 0);
    __decorate23([Property2()], ButtonProps2.prototype, "buttonModel", void 0);
    __decorate23([Property2("Button")], ButtonProps2.prototype, "type", void 0);
    __decorate23([Event3()], ButtonProps2.prototype, "click", void 0);
    return ButtonProps2;
  }(ChildProperty2)
);
var AnimationSettings = (
  /** @class */
  function(_super) {
    __extends22(AnimationSettings3, _super);
    function AnimationSettings3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate23([Property2("Fade")], AnimationSettings3.prototype, "effect", void 0);
    __decorate23([Property2(400)], AnimationSettings3.prototype, "duration", void 0);
    __decorate23([Property2(0)], AnimationSettings3.prototype, "delay", void 0);
    return AnimationSettings3;
  }(ChildProperty2)
);
var ROOT = "e-dialog";
var RTL4 = "e-rtl";
var DLG_HEADER_CONTENT = "e-dlg-header-content";
var DLG_HEADER = "e-dlg-header";
var DLG_FOOTER_CONTENT = "e-footer-content";
var MODAL_DLG = "e-dlg-modal";
var DLG_CONTENT = "e-dlg-content";
var DLG_CLOSE_ICON = "e-icon-dlg-close";
var DLG_OVERLAY = "e-dlg-overlay";
var DLG_TARGET = "e-dlg-target";
var DLG_CONTAINER = "e-dlg-container";
var SCROLL_DISABLED = "e-scroll-disabled";
var DLG_PRIMARY_BUTTON = "e-primary";
var ICON = "e-icons";
var POPUP_ROOT = "e-popup";
var DEVICE = "e-device";
var FULLSCREEN = "e-dlg-fullscreen";
var DLG_CLOSE_ICON_BTN = "e-dlg-closeicon-btn";
var DLG_HIDE = "e-popup-close";
var DLG_SHOW = "e-popup-open";
var DLG_UTIL_DEFAULT_TITLE = "Information";
var DLG_UTIL_ROOT = "e-scroll-disabled";
var DLG_UTIL_ALERT = "e-alert-dialog";
var DLG_UTIL_CONFIRM = "e-confirm-dialog";
var DLG_RESIZABLE = "e-dlg-resizable";
var DLG_RESTRICT_LEFT_VALUE = "e-restrict-left";
var DLG_RESTRICT_WIDTH_VALUE = "e-resize-viewport";
var DLG_REF_ELEMENT = "e-dlg-ref-element";
var DLG_USER_ACTION_CLOSED = "user action";
var DLG_CLOSE_ICON_CLOSED = "close icon";
var DLG_ESCAPE_CLOSED = "escape";
var DLG_OVERLAYCLICK_CLOSED = "overlayClick";
var DLG_DRAG = "e-draggable";
var Dialog = (
  /** @class */
  function(_super) {
    __extends22(Dialog2, _super);
    function Dialog2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.needsID = true;
      return _this;
    }
    Dialog2.prototype.render = function() {
      this.initialize();
      this.initRender();
      this.wireEvents();
      if (this.width === "100%") {
        this.element.style.width = "";
      }
      if (this.minHeight !== "") {
        this.element.style.minHeight = formatUnit(this.minHeight);
      }
      if (this.enableResize) {
        this.setResize();
        if (this.isModal) {
          this.isModelResize = true;
        }
        if (this.animationSettings.effect === "None") {
          this.getMinHeight();
        }
      }
      this.renderComplete();
    };
    Dialog2.prototype.initializeValue = function() {
      this.dlgClosedBy = DLG_USER_ACTION_CLOSED;
    };
    Dialog2.prototype.preRender = function() {
      var _this = this;
      this.initializeValue();
      this.headerContent = null;
      this.allowMaxHeight = true;
      this.preventVisibility = true;
      this.clonedEle = this.element.cloneNode(true);
      this.closeIconClickEventHandler = function(event2) {
        _this.dlgClosedBy = DLG_CLOSE_ICON_CLOSED;
        _this.hide(event2);
      };
      this.dlgOverlayClickEventHandler = function(event2) {
        _this.dlgClosedBy = DLG_OVERLAYCLICK_CLOSED;
        event2.preventFocus = false;
        _this.trigger("overlayClick", event2, function(overlayClickEventArgs) {
          if (!overlayClickEventArgs.preventFocus) {
            _this.focusContent();
          }
          _this.dlgClosedBy = DLG_USER_ACTION_CLOSED;
        });
      };
      var localeText = {
        close: "Close"
      };
      this.l10n = new L10n2("dialog", localeText, this.locale);
      this.checkPositionData();
      if (isNullOrUndefined2(this.target)) {
        var prevOnChange = this.isProtectedOnChange;
        this.isProtectedOnChange = true;
        this.target = document.body;
        this.isProtectedOnChange = prevOnChange;
      }
    };
    Dialog2.prototype.updatePersistData = function() {
      if (this.enablePersistence) {
        this.setProperties({
          width: parseFloat(this.element.style.width),
          height: parseFloat(this.element.style.height),
          position: {
            X: parseFloat(this.dragObj.element.style.left),
            Y: parseFloat(this.dragObj.element.style.top)
          }
        }, true);
      }
    };
    Dialog2.prototype.isNumberValue = function(value) {
      var isNumber = /^[-+]?\d*\.?\d+$/.test(value);
      return isNumber;
    };
    Dialog2.prototype.checkPositionData = function() {
      if (!isNullOrUndefined2(this.position)) {
        if (!isNullOrUndefined2(this.position.X) && typeof this.position.X !== "number") {
          var isNumber = this.isNumberValue(this.position.X);
          if (isNumber) {
            var prevOnChange = this.isProtectedOnChange;
            this.isProtectedOnChange = true;
            this.position.X = parseFloat(this.position.X);
            this.isProtectedOnChange = prevOnChange;
          }
        }
        if (!isNullOrUndefined2(this.position.Y) && typeof this.position.Y !== "number") {
          var isNumber = this.isNumberValue(this.position.Y);
          if (isNumber) {
            var prevOnChange = this.isProtectedOnChange;
            this.isProtectedOnChange = true;
            this.position.Y = parseFloat(this.position.Y);
            this.isProtectedOnChange = prevOnChange;
          }
        }
      }
    };
    Dialog2.prototype.getEle = function(list, selector) {
      var element2 = void 0;
      for (var i = 0; i < list.length; i++) {
        if (list[i].classList.contains(selector)) {
          element2 = list[i];
          break;
        }
      }
      return element2;
    };
    Dialog2.prototype.getMinHeight = function() {
      var computedHeaderHeight = "0px";
      var computedFooterHeight = "0px";
      if (!isNullOrUndefined2(this.element.querySelector("." + DLG_HEADER_CONTENT))) {
        computedHeaderHeight = getComputedStyle(this.headerContent).height;
      }
      var footerEle = this.getEle(this.element.children, DLG_FOOTER_CONTENT);
      if (!isNullOrUndefined2(footerEle)) {
        computedFooterHeight = getComputedStyle(footerEle).height;
      }
      var headerHeight = parseInt(computedHeaderHeight.slice(0, computedHeaderHeight.indexOf("p")), 10);
      var footerHeight = parseInt(computedFooterHeight.slice(0, computedFooterHeight.indexOf("p")), 10);
      setMinHeight(headerHeight + 30 + (isNaN(footerHeight) ? 0 : footerHeight));
      return headerHeight + 30 + footerHeight;
    };
    Dialog2.prototype.onResizeStart = function(args, dialogObj) {
      dialogObj.trigger("resizeStart", args);
      if (!args.cancel && this.isModelResize && !isNullOrUndefined2(this.dlgContainer) && this.dlgContainer.classList.contains("e-dlg-" + this.position.X + "-" + this.position.Y)) {
        this.setPopupPosition();
        this.dlgContainer.classList.remove("e-dlg-" + this.position.X + "-" + this.position.Y);
        var targetType = this.getTargetContainer(this.target);
        if (targetType instanceof Element) {
          var computedStyle = window.getComputedStyle(targetType);
          if (computedStyle.getPropertyValue("direction") === "rtl") {
            this.element.style.position = "absolute";
          } else {
            this.element.style.position = "relative";
          }
        } else {
          this.element.style.position = "relative";
        }
        if (this.element.classList.contains(DLG_RESTRICT_LEFT_VALUE)) {
          this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);
        }
        this.isModelResize = false;
      }
      return args.cancel;
    };
    Dialog2.prototype.onResizing = function(args, dialogObj) {
      dialogObj.trigger("resizing", args);
    };
    Dialog2.prototype.onResizeComplete = function(args, dialogObj) {
      dialogObj.trigger("resizeStop", args);
      this.updatePersistData();
    };
    Dialog2.prototype.setResize = function() {
      if (this.enableResize) {
        this.element.classList.add(DLG_RESIZABLE);
        var computedHeight = getComputedStyle(this.element).minHeight;
        var computedWidth = getComputedStyle(this.element).minWidth;
        var direction = "";
        for (var i = 0; i < this.resizeHandles.length; i++) {
          if (this.resizeHandles[i] === "All") {
            direction = "south north east west north-east north-west south-east south-west";
            break;
          } else {
            var directionValue = "";
            switch (this.resizeHandles[i].toString()) {
              case "SouthEast":
                directionValue = "south-east";
                break;
              case "SouthWest":
                directionValue = "south-west";
                break;
              case "NorthEast":
                directionValue = "north-east";
                break;
              case "NorthWest":
                directionValue = "north-west";
                break;
              default:
                directionValue = this.resizeHandles[i].toString();
                break;
            }
            direction += directionValue.toLocaleLowerCase() + " ";
          }
        }
        if (this.enableRtl && direction.trim() === "south-east") {
          direction = "south-west";
        } else if (this.enableRtl && direction.trim() === "south-west") {
          direction = "south-east";
        }
        if (this.isModal && this.enableRtl) {
          this.element.classList.add(DLG_RESTRICT_LEFT_VALUE);
        } else if (this.isModal && this.target === document.body) {
          this.element.classList.add(DLG_RESTRICT_WIDTH_VALUE);
        }
        createResize({
          element: this.element,
          direction,
          minHeight: parseInt(computedHeight.slice(0, computedWidth.indexOf("p")), 10),
          maxHeight: this.targetEle.clientHeight,
          minWidth: parseInt(computedWidth.slice(0, computedWidth.indexOf("p")), 10),
          maxWidth: this.targetEle.clientWidth,
          boundary: this.target === document.body ? null : this.targetEle,
          resizeBegin: this.onResizeStart.bind(this),
          resizeComplete: this.onResizeComplete.bind(this),
          resizing: this.onResizing.bind(this),
          proxy: this
        });
        this.wireWindowResizeEvent();
      } else {
        removeResize();
        this.unWireWindowResizeEvent();
        if (this.isModal) {
          this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);
        } else {
          this.element.classList.remove(DLG_RESTRICT_WIDTH_VALUE);
        }
        this.element.classList.remove(DLG_RESIZABLE);
      }
    };
    Dialog2.prototype.getFocusElement = function(target) {
      var value = 'input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]';
      var items = target.querySelectorAll(value);
      return {
        element: items[items.length - 1]
      };
    };
    Dialog2.prototype.keyDown = function(event2) {
      var _this = this;
      if (event2.keyCode === 9) {
        if (this.isModal) {
          var buttonObj = void 0;
          if (!isNullOrUndefined2(this.btnObj)) {
            buttonObj = this.btnObj[this.btnObj.length - 1];
          }
          if (isNullOrUndefined2(this.btnObj) && !isNullOrUndefined2(this.ftrTemplateContent)) {
            buttonObj = this.getFocusElement(this.ftrTemplateContent);
          }
          if (isNullOrUndefined2(this.btnObj) && isNullOrUndefined2(this.ftrTemplateContent) && !isNullOrUndefined2(this.contentEle)) {
            buttonObj = this.getFocusElement(this.contentEle);
          }
          if (!isNullOrUndefined2(buttonObj) && document.activeElement === buttonObj.element && !event2.shiftKey) {
            event2.preventDefault();
            this.focusableElements(this.element).focus();
          }
          if (document.activeElement === this.focusableElements(this.element) && event2.shiftKey) {
            event2.preventDefault();
            if (!isNullOrUndefined2(buttonObj)) {
              buttonObj.element.focus();
            }
          }
        }
      }
      var element2 = document.activeElement;
      var isTagName = ["input", "textarea"].indexOf(element2.tagName.toLowerCase()) > -1;
      var isContentEdit = false;
      if (!isTagName) {
        isContentEdit = element2.hasAttribute("contenteditable") && element2.getAttribute("contenteditable") === "true";
      }
      if (event2.keyCode === 27 && this.closeOnEscape) {
        this.dlgClosedBy = DLG_ESCAPE_CLOSED;
        var query = document.querySelector(".e-popup-open:not(.e-dialog)");
        if (!(!isNullOrUndefined2(query) && !query.classList.contains("e-toolbar-pop") && !query.classList.contains("e-slider-tooltip"))) {
          this.hide(event2);
        }
      }
      if (event2.keyCode === 13 && !event2.ctrlKey && element2.tagName.toLowerCase() !== "textarea" && isTagName && !isNullOrUndefined2(this.primaryButtonEle) || event2.keyCode === 13 && event2.ctrlKey && (element2.tagName.toLowerCase() === "textarea" || isContentEdit) && !isNullOrUndefined2(this.primaryButtonEle)) {
        var buttonIndex_1;
        var firstPrimary = this.buttons.some(function(data, index) {
          buttonIndex_1 = index;
          var buttonModel = data.buttonModel;
          return !isNullOrUndefined2(buttonModel) && buttonModel.isPrimary === true;
        });
        if (firstPrimary && typeof this.buttons[buttonIndex_1].click === "function" && !this.primaryButtonEle.disabled) {
          setTimeout(function() {
            _this.buttons[buttonIndex_1].click.call(_this, event2);
          });
        }
      }
    };
    Dialog2.prototype.initialize = function() {
      if (!isNullOrUndefined2(this.target)) {
        this.targetEle = typeof this.target === "string" ? document.querySelector(this.target) : this.target;
      }
      if (!this.isBlazorServerRender()) {
        addClass2([this.element], ROOT);
      }
      if (Browser2.isDevice) {
        addClass2([this.element], DEVICE);
      }
      if (!this.isBlazorServerRender()) {
        this.setCSSClass();
      }
      this.setMaxHeight();
    };
    Dialog2.prototype.initRender = function() {
      var _this = this;
      this.initialRender = true;
      if (!this.isBlazorServerRender()) {
        attributes2(this.element, {
          role: "dialog"
        });
      }
      if (this.zIndex === 1e3) {
        this.setzIndex(this.element, false);
        this.calculatezIndex = true;
      } else {
        this.calculatezIndex = false;
      }
      this.setTargetContent();
      if (this.header !== "" && !isNullOrUndefined2(this.header)) {
        this.setHeader();
      }
      this.renderCloseIcon();
      this.setContent();
      if (this.footerTemplate !== "" && !isNullOrUndefined2(this.footerTemplate)) {
        this.setFooterTemplate();
      } else if (!isNullOrUndefined2(this.buttons[0]) && !isNullOrUndefined2(this.buttons[0].buttonModel)) {
        this.setButton();
      }
      if (this.allowDragging && !isNullOrUndefined2(this.headerContent)) {
        this.setAllowDragging();
      }
      attributes2(this.element, {
        "aria-modal": this.isModal ? "true" : "false"
      });
      if (this.isModal) {
        this.setIsModal();
      }
      if (this.element.classList.contains(DLG_UTIL_ALERT) !== true && this.element.classList.contains(DLG_UTIL_CONFIRM) !== true && !isNullOrUndefined2(this.element.parentElement)) {
        var parentEle = this.isModal ? this.dlgContainer.parentElement : this.element.parentElement;
        this.refElement = this.createElement("div", {
          className: DLG_REF_ELEMENT
        });
        parentEle.insertBefore(this.refElement, this.isModal ? this.dlgContainer : this.element);
      }
      if (!isNullOrUndefined2(this.targetEle)) {
        if (this.isModal) {
          this.targetEle.appendChild(this.dlgContainer);
        } else {
          this.targetEle.appendChild(this.element);
        }
      }
      this.popupObj = new Popup(this.element, {
        height: this.height,
        width: this.width,
        zIndex: this.zIndex,
        relateTo: this.target,
        actionOnScroll: "none",
        enableRtl: this.enableRtl,
        // eslint-disable-next-line
        open: function(event2) {
          var eventArgs = {
            container: _this.isModal ? _this.dlgContainer : _this.element,
            element: _this.element,
            target: _this.target,
            preventFocus: false
          };
          if (_this.enableResize) {
            _this.resetResizeIcon();
          }
          _this.trigger("open", eventArgs, function(openEventArgs) {
            if (!openEventArgs.preventFocus) {
              _this.focusContent();
            }
          });
        },
        // eslint-disable-next-line
        close: function(event2) {
          if (_this.isModal) {
            addClass2([_this.dlgOverlay], "e-fade");
          }
          _this.unBindEvent(_this.element);
          if (_this.isModal) {
            _this.dlgContainer.style.display = "none";
          }
          _this.trigger("close", _this.closeArgs);
          var activeEle = document.activeElement;
          if (!isNullOrUndefined2(activeEle) && !isNullOrUndefined2(activeEle.blur)) {
            activeEle.blur();
          }
          if (!isNullOrUndefined2(_this.storeActiveElement) && !isNullOrUndefined2(_this.storeActiveElement.focus)) {
            _this.storeActiveElement.focus();
          }
        }
      });
      this.positionChange();
      this.setEnableRTL();
      if (!this.isBlazorServerRender()) {
        addClass2([this.element], DLG_HIDE);
        if (this.isModal) {
          this.setOverlayZindex();
        }
      }
      if (this.visible) {
        this.show();
        if (this.isModal) {
          var targetType = this.getTargetContainer(this.target);
          if (targetType instanceof Element) {
            var computedStyle = window.getComputedStyle(targetType);
            if (computedStyle.getPropertyValue("direction") === "rtl") {
              this.setPopupPosition();
            }
          }
        }
      } else {
        if (this.isModal) {
          this.dlgOverlay.style.display = "none";
        }
      }
      this.initialRender = false;
    };
    Dialog2.prototype.getTargetContainer = function(targetValue) {
      var targetElement2 = null;
      if (typeof targetValue === "string") {
        if (targetValue.startsWith("#")) {
          targetElement2 = document.getElementById(targetValue.substring(1));
        } else if (targetValue.startsWith(".")) {
          var elements = document.getElementsByClassName(targetValue.substring(1));
          targetElement2 = elements.length > 0 ? elements[0] : null;
        } else {
          if (!(targetValue instanceof HTMLElement) && targetValue !== document.body) {
            targetElement2 = document.querySelector(targetValue);
          }
        }
      } else if (targetValue instanceof HTMLElement) {
        targetElement2 = targetValue;
      }
      return targetElement2;
    };
    Dialog2.prototype.resetResizeIcon = function() {
      var dialogConHeight = this.getMinHeight();
      if (this.targetEle.offsetHeight < dialogConHeight) {
        var className = this.enableRtl ? "e-south-west" : "e-south-east";
        var resizeIcon = this.element.querySelector("." + className);
        if (!isNullOrUndefined2(resizeIcon)) {
          resizeIcon.style.bottom = "-" + dialogConHeight.toString() + "px";
        }
      }
    };
    Dialog2.prototype.setOverlayZindex = function(zIndexValue) {
      var zIndex;
      if (isNullOrUndefined2(zIndexValue)) {
        zIndex = parseInt(this.element.style.zIndex, 10) ? parseInt(this.element.style.zIndex, 10) : this.zIndex;
      } else {
        zIndex = zIndexValue;
      }
      this.dlgOverlay.style.zIndex = (zIndex - 1).toString();
      this.dlgContainer.style.zIndex = zIndex.toString();
    };
    Dialog2.prototype.positionChange = function() {
      if (this.isModal) {
        if (!isNaN(parseFloat(this.position.X)) && !isNaN(parseFloat(this.position.Y))) {
          this.setPopupPosition();
        } else if (!isNaN(parseFloat(this.position.X)) && isNaN(parseFloat(this.position.Y)) || isNaN(parseFloat(this.position.X)) && !isNaN(parseFloat(this.position.Y))) {
          this.setPopupPosition();
        } else {
          this.element.style.top = "0px";
          this.element.style.left = "0px";
          this.dlgContainer.classList.add("e-dlg-" + this.position.X + "-" + this.position.Y);
        }
      } else {
        this.setPopupPosition();
      }
    };
    Dialog2.prototype.setPopupPosition = function() {
      this.popupObj.setProperties({
        position: {
          X: this.position.X,
          Y: this.position.Y
        }
      });
    };
    Dialog2.prototype.setAllowDragging = function() {
      var _this = this;
      var handleContent = "." + DLG_HEADER_CONTENT;
      if (!this.element.classList.contains(DLG_DRAG)) {
        this.dragObj = new Draggable2(this.element, {
          clone: false,
          isDragScroll: true,
          abort: ".e-dlg-closeicon-btn",
          handle: handleContent,
          dragStart: function(event2) {
            _this.trigger("dragStart", event2, function(dragEventArgs) {
              if (isBlazor2()) {
                dragEventArgs.bindEvents(event2.dragElement);
              }
            });
          },
          dragStop: function(event2) {
            if (_this.isModal) {
              _this.IsDragStop = true;
              if (!isNullOrUndefined2(_this.position)) {
                _this.dlgContainer.classList.remove("e-dlg-" + _this.position.X + "-" + _this.position.Y);
              }
              var targetType = _this.getTargetContainer(_this.target);
              if (targetType instanceof Element) {
                var computedStyle = window.getComputedStyle(targetType);
                if (computedStyle.getPropertyValue("direction") === "rtl") {
                  _this.element.style.position = "absolute";
                } else {
                  _this.element.style.position = "relative";
                }
              } else {
                _this.element.style.position = "relative";
              }
            }
            _this.trigger("dragStop", event2);
            _this.isModelResize = false;
            _this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);
            _this.updatePersistData();
          },
          drag: function(event2) {
            _this.trigger("drag", event2);
          }
        });
        if (!isNullOrUndefined2(this.targetEle)) {
          this.dragObj.dragArea = this.targetEle;
        }
      }
    };
    Dialog2.prototype.setButton = function() {
      if (!this.isBlazorServerRender()) {
        this.buttonContent = [];
        this.btnObj = [];
        for (var i = 0; i < this.buttons.length; i++) {
          if (isNullOrUndefined2(this.buttons[i].buttonModel)) {
            continue;
          }
          var buttonType = !isNullOrUndefined2(this.buttons[i].type) ? this.buttons[i].type.toLowerCase() : "button";
          var btn = this.createElement("button", {
            className: this.cssClass,
            attrs: {
              type: buttonType
            }
          });
          this.buttonContent.push(btn.outerHTML);
        }
        this.setFooterTemplate();
      }
      var footerBtn;
      for (var i = 0, childNodes = this.element.children; i < childNodes.length; i++) {
        if (childNodes[i].classList.contains(DLG_FOOTER_CONTENT)) {
          footerBtn = childNodes[i].querySelectorAll("button");
        }
      }
      for (var i = 0; i < this.buttons.length; i++) {
        if (isNullOrUndefined2(this.buttons[i].buttonModel)) {
          continue;
        }
        if (!this.isBlazorServerRender()) {
          this.btnObj[i] = new Button(this.buttons[i].buttonModel);
        }
        if (!isNullOrUndefined2(this.ftrTemplateContent) && footerBtn.length > 0) {
          if (typeof this.buttons[i].click === "function") {
            EventHandler2.add(footerBtn[i], "click", this.buttons[i].click, this);
          }
          if (typeof this.buttons[i].click === "object") {
            EventHandler2.add(footerBtn[i], "click", this.buttonClickHandler.bind(this, i), this);
          }
        }
        if (!this.isBlazorServerRender() && !isNullOrUndefined2(this.ftrTemplateContent)) {
          this.btnObj[i].appendTo(this.ftrTemplateContent.children[i]);
          if (this.buttons[i].isFlat) {
            this.btnObj[i].element.classList.add("e-flat");
          }
          this.primaryButtonEle = this.element.getElementsByClassName("e-primary")[0];
        }
      }
    };
    Dialog2.prototype.buttonClickHandler = function(index) {
      this.trigger("buttons[" + index + "].click", {});
    };
    Dialog2.prototype.setContent = function() {
      this.contentEle = this.createElement("div", {
        className: DLG_CONTENT,
        id: this.element.id + "_dialog-content"
      });
      if (this.headerEle) {
        attributes2(this.element, {
          "aria-describedby": this.element.id + "_title " + this.element.id + "_dialog-content"
        });
      } else {
        attributes2(this.element, {
          "aria-describedby": this.element.id + "_dialog-content"
        });
      }
      if (this.innerContentElement) {
        this.contentEle.appendChild(this.innerContentElement);
      } else if (!isNullOrUndefined2(this.content) && this.content !== "" || !this.initialRender) {
        if (typeof this.content === "string" && !isBlazor2()) {
          this.setTemplate(this.content, this.contentEle, "content");
        } else if (this.content instanceof HTMLElement) {
          this.contentEle.appendChild(this.content);
        } else {
          this.setTemplate(this.content, this.contentEle, "content");
        }
      }
      if (!isNullOrUndefined2(this.headerContent)) {
        this.element.insertBefore(this.contentEle, this.element.children[1]);
      } else {
        this.element.insertBefore(this.contentEle, this.element.children[0]);
      }
      if (this.height === "auto") {
        if (!this.isBlazorServerRender() && Browser2.isIE && this.element.style.width === "" && !isNullOrUndefined2(this.width)) {
          this.element.style.width = formatUnit(this.width);
        }
        this.setMaxHeight();
      }
    };
    Dialog2.prototype.setTemplate = function(template, toElement, prop) {
      var templateFn;
      var templateProps;
      if (toElement.classList.contains(DLG_HEADER)) {
        templateProps = this.element.id + "header";
      } else if (toElement.classList.contains(DLG_FOOTER_CONTENT)) {
        templateProps = this.element.id + "footerTemplate";
      } else {
        templateProps = this.element.id + "content";
      }
      var templateValue;
      if (!isNullOrUndefined2(template.outerHTML)) {
        toElement.appendChild(template);
      } else if (typeof template === "string" || typeof template !== "string" || isBlazor2() && !this.isStringTemplate) {
        if (typeof template === "string") {
          template = this.sanitizeHelper(template);
        }
        if (this.isVue || typeof template !== "string") {
          templateFn = compile4(template);
          templateValue = template;
        } else {
          toElement.innerHTML = template;
        }
      }
      var fromElements = [];
      if (!isNullOrUndefined2(templateFn)) {
        var isString = isBlazor2() && !this.isStringTemplate && templateValue.indexOf("<div>Blazor") === 0 ? this.isStringTemplate : true;
        for (var _i = 0, _a = templateFn({}, this, prop, templateProps, isString); _i < _a.length; _i++) {
          var item = _a[_i];
          fromElements.push(item);
        }
        append([].slice.call(fromElements), toElement);
      }
    };
    Dialog2.prototype.sanitizeHelper = function(value) {
      if (this.enableHtmlSanitizer) {
        var dialogItem = SanitizeHtmlHelper2.beforeSanitize();
        var beforeEvent = {
          cancel: false,
          helper: null
        };
        extend2(dialogItem, dialogItem, beforeEvent);
        this.trigger("beforeSanitizeHtml", dialogItem);
        if (dialogItem.cancel && !isNullOrUndefined2(dialogItem.helper)) {
          value = dialogItem.helper(value);
        } else if (!dialogItem.cancel) {
          value = SanitizeHtmlHelper2.serializeValue(dialogItem, value);
        }
      }
      return value;
    };
    Dialog2.prototype.setMaxHeight = function() {
      if (!this.allowMaxHeight) {
        return;
      }
      var display = this.element.style.display;
      this.element.style.display = "none";
      this.element.style.maxHeight = !isNullOrUndefined2(this.target) && this.targetEle.offsetHeight < window.innerHeight ? this.targetEle.offsetHeight - 20 + "px" : window.innerHeight - 20 + "px";
      this.element.style.display = display;
      if (Browser2.isIE && this.height === "auto" && !isNullOrUndefined2(this.contentEle) && this.element.offsetHeight < this.contentEle.offsetHeight) {
        this.element.style.height = "inherit";
      }
    };
    Dialog2.prototype.setEnableRTL = function() {
      if (!this.isBlazorServerRender()) {
        if (this.enableRtl) {
          addClass2([this.element], RTL4);
        } else {
          removeClass2([this.element], RTL4);
        }
      }
      if (!isNullOrUndefined2(this.element.querySelector(".e-resize-handle"))) {
        removeResize();
        this.setResize();
      }
    };
    Dialog2.prototype.setTargetContent = function() {
      var _this = this;
      if (isNullOrUndefined2(this.content) || this.content === "") {
        var isContent = this.element.innerHTML.replace(/\s|<(\/?|\/?)(!--!--)>/g, "") !== "";
        if (this.element.children.length > 0 || isContent) {
          this.innerContentElement = document.createDocumentFragment();
          [].slice.call(this.element.childNodes).forEach(function(el) {
            if (el.nodeType !== 8) {
              _this.innerContentElement.appendChild(el);
            }
          });
        }
      }
    };
    Dialog2.prototype.setHeader = function() {
      if (this.headerEle) {
        this.headerEle.innerHTML = "";
      } else {
        this.headerEle = this.createElement("div", {
          id: this.element.id + "_title",
          className: DLG_HEADER
        });
      }
      this.createHeaderContent();
      this.headerContent.appendChild(this.headerEle);
      this.setTemplate(this.header, this.headerEle, "header");
      attributes2(this.element, {
        "aria-describedby": this.element.id + "_title"
      });
      attributes2(this.element, {
        "aria-labelledby": this.element.id + "_dialog-header"
      });
      this.element.insertBefore(this.headerContent, this.element.children[0]);
      if (this.allowDragging && !isNullOrUndefined2(this.headerContent)) {
        this.setAllowDragging();
      }
    };
    Dialog2.prototype.setFooterTemplate = function() {
      if (this.ftrTemplateContent) {
        this.ftrTemplateContent.innerHTML = "";
      } else {
        this.ftrTemplateContent = this.createElement("div", {
          className: DLG_FOOTER_CONTENT
        });
      }
      if (this.footerTemplate !== "" && !isNullOrUndefined2(this.footerTemplate)) {
        this.setTemplate(this.footerTemplate, this.ftrTemplateContent, "footerTemplate");
      } else {
        this.ftrTemplateContent.innerHTML = this.buttonContent.join("");
      }
      this.element.appendChild(this.ftrTemplateContent);
    };
    Dialog2.prototype.createHeaderContent = function() {
      if (isNullOrUndefined2(this.headerContent)) {
        this.headerContent = this.createElement("div", {
          id: this.element.id + "_dialog-header",
          className: DLG_HEADER_CONTENT
        });
      }
    };
    Dialog2.prototype.renderCloseIcon = function() {
      if (this.showCloseIcon) {
        this.closeIcon = this.createElement("button", {
          className: DLG_CLOSE_ICON_BTN,
          attrs: {
            type: "button"
          }
        });
        this.closeIconBtnObj = new Button({
          cssClass: "e-flat",
          iconCss: DLG_CLOSE_ICON + " " + ICON
        });
        this.closeIconTitle();
        if (!isNullOrUndefined2(this.headerContent)) {
          prepend([this.closeIcon], this.headerContent);
        } else {
          this.createHeaderContent();
          prepend([this.closeIcon], this.headerContent);
          this.element.insertBefore(this.headerContent, this.element.children[0]);
        }
        this.closeIconBtnObj.appendTo(this.closeIcon);
      }
    };
    Dialog2.prototype.closeIconTitle = function() {
      this.l10n.setLocale(this.locale);
      var closeIconTitle = this.l10n.getConstant("close");
      this.closeIcon.setAttribute("title", closeIconTitle);
      this.closeIcon.setAttribute("aria-label", closeIconTitle);
    };
    Dialog2.prototype.setCSSClass = function(oldCSSClass) {
      if (oldCSSClass) {
        removeClass2([this.element], oldCSSClass.split(" "));
        if (this.isModal && !isNullOrUndefined2(this.dlgContainer)) {
          removeClass2([this.dlgContainer], oldCSSClass.split(" "));
        }
      }
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.split(" "));
        if (this.isModal && !isNullOrUndefined2(this.dlgContainer)) {
          addClass2([this.dlgContainer], this.cssClass.split(" "));
        }
      }
    };
    Dialog2.prototype.setIsModal = function() {
      this.dlgContainer = this.createElement("div", {
        className: DLG_CONTAINER
      });
      this.setCSSClass();
      this.element.classList.remove(DLG_SHOW);
      this.element.parentNode.insertBefore(this.dlgContainer, this.element);
      this.dlgContainer.appendChild(this.element);
      addClass2([this.element], MODAL_DLG);
      this.dlgOverlay = this.createElement("div", {
        className: DLG_OVERLAY
      });
      this.dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
      this.dlgContainer.appendChild(this.dlgOverlay);
    };
    Dialog2.prototype.getValidFocusNode = function(items) {
      var node;
      for (var u = 0; u < items.length; u++) {
        node = items[u];
        if ((node.clientHeight > 0 || node.tagName.toLowerCase() === "a" && node.hasAttribute("href")) && node.tabIndex > -1 && !node.disabled && !this.disableElement(node, '[disabled],[aria-disabled="true"],[type="hidden"]')) {
          return node;
        } else {
          node = null;
        }
      }
      return node;
    };
    Dialog2.prototype.focusableElements = function(content) {
      if (!isNullOrUndefined2(content)) {
        var value = 'input,select,textarea,button,a,[contenteditable="true"],[tabindex]';
        var items = content.querySelectorAll(value);
        return this.getValidFocusNode(items);
      }
      return null;
    };
    Dialog2.prototype.getAutoFocusNode = function(container) {
      var node = container.querySelector("." + DLG_CLOSE_ICON_BTN);
      var value = "[autofocus]";
      var items = container.querySelectorAll(value);
      var validNode = this.getValidFocusNode(items);
      if (isBlazor2()) {
        this.primaryButtonEle = this.element.getElementsByClassName("e-primary")[0];
      }
      if (!isNullOrUndefined2(validNode)) {
        node = validNode;
      } else {
        validNode = this.focusableElements(this.contentEle);
        if (!isNullOrUndefined2(validNode)) {
          return node = validNode;
        } else if (!isNullOrUndefined2(this.primaryButtonEle)) {
          return this.element.querySelector("." + DLG_PRIMARY_BUTTON);
        }
      }
      return node;
    };
    Dialog2.prototype.disableElement = function(element2, t) {
      var elementMatch = element2 ? element2.matches || element2.webkitMatchesSelector || element2.msGetRegionContent : null;
      if (elementMatch) {
        for (; element2; element2 = element2.parentNode) {
          if (element2 instanceof Element && elementMatch.call(element2, t)) {
            return element2;
          }
        }
      }
      return null;
    };
    Dialog2.prototype.focusContent = function() {
      var element2 = this.getAutoFocusNode(this.element);
      var node = !isNullOrUndefined2(element2) ? element2 : this.element;
      var userAgent = Browser2.userAgent;
      if (userAgent.indexOf("MSIE ") > 0 || userAgent.indexOf("Trident/") > 0) {
        this.element.focus();
      }
      node.focus();
      this.unBindEvent(this.element);
      this.bindEvent(this.element);
    };
    Dialog2.prototype.bindEvent = function(element2) {
      EventHandler2.add(element2, "keydown", this.keyDown, this);
    };
    Dialog2.prototype.unBindEvent = function(element2) {
      EventHandler2.remove(element2, "keydown", this.keyDown);
    };
    Dialog2.prototype.updateSanitizeContent = function() {
      if (!this.isBlazorServerRender()) {
        this.contentEle.innerHTML = this.sanitizeHelper(this.content);
      }
    };
    Dialog2.prototype.isBlazorServerRender = function() {
      return isBlazor2() && this.isServerRendered;
    };
    Dialog2.prototype.getModuleName = function() {
      return "dialog";
    };
    Dialog2.prototype.onPropertyChanged = function(newProp, oldProp) {
      if (!this.element.classList.contains(ROOT)) {
        return;
      }
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "content":
            if (!isNullOrUndefined2(this.content) && this.content !== "") {
              if (this.isBlazorServerRender()) {
                this.contentEle = this.element.querySelector(".e-dlg-content");
              }
              if (!isNullOrUndefined2(this.contentEle) && this.contentEle.getAttribute("role") !== "dialog") {
                if (!this.isBlazorServerRender()) {
                  this.contentEle.innerHTML = "";
                }
                if (typeof this.content === "function") {
                  this.clearTemplate(["content"]);
                  detach2(this.contentEle);
                  this.contentEle = null;
                  this.setContent();
                } else {
                  if (typeof this.content === "string") {
                    this.updateSanitizeContent();
                  } else {
                    this.contentEle.appendChild(this.content);
                  }
                }
                this.setMaxHeight();
              } else {
                this.setContent();
              }
            } else if (!isNullOrUndefined2(this.contentEle)) {
              detach2(this.contentEle);
              this.contentEle = null;
            }
            break;
          case "header":
            if (this.header === "" || isNullOrUndefined2(this.header)) {
              if (this.headerEle) {
                detach2(this.headerEle);
                this.headerEle = null;
              }
            } else {
              this.setHeader();
            }
            break;
          case "footerTemplate":
            if (this.footerTemplate === "" || isNullOrUndefined2(this.footerTemplate)) {
              if (!this.ftrTemplateContent) {
                return;
              }
              detach2(this.ftrTemplateContent);
              this.ftrTemplateContent = null;
              this.buttons = [{}];
            } else {
              this.setFooterTemplate();
              this.buttons = [{}];
            }
            break;
          case "showCloseIcon":
            if (this.element.getElementsByClassName(DLG_CLOSE_ICON).length > 0) {
              if (!this.showCloseIcon && (this.header === "" || isNullOrUndefined2(this.header))) {
                detach2(this.headerContent);
                this.headerContent = null;
              } else if (!this.showCloseIcon) {
                detach2(this.closeIcon);
              }
            } else {
              this.renderCloseIcon();
              this.wireEvents();
            }
            break;
          case "locale":
            if (this.showCloseIcon) {
              this.closeIconTitle();
            }
            break;
          case "visible":
            if (this.visible) {
              this.show();
            } else {
              this.hide();
            }
            break;
          case "isModal":
            this.updateIsModal();
            break;
          case "height":
            setStyleAttribute2(this.element, {
              "height": formatUnit(newProp.height)
            });
            this.updatePersistData();
            break;
          case "width":
            setStyleAttribute2(this.element, {
              "width": formatUnit(newProp.width)
            });
            this.updatePersistData();
            break;
          case "zIndex":
            this.popupObj.zIndex = this.zIndex;
            if (this.isModal) {
              this.setOverlayZindex(this.zIndex);
            }
            if (this.element.style.zIndex !== this.zIndex.toString()) {
              this.calculatezIndex = false;
            }
            break;
          case "cssClass":
            this.setCSSClass(oldProp.cssClass);
            break;
          case "buttons": {
            this.unWireButtonEvents();
            this.destroyButtons();
            if (!isNullOrUndefined2(this.ftrTemplateContent)) {
              detach2(this.ftrTemplateContent);
              this.ftrTemplateContent = null;
            }
            this.footerTemplate = "";
            this.setButton();
            break;
          }
          case "allowDragging":
            if (this.allowDragging && !isNullOrUndefined2(this.headerContent)) {
              this.setAllowDragging();
            } else {
              this.dragObj.destroy();
            }
            break;
          case "target":
            this.setTarget(newProp.target);
            break;
          case "position":
            this.checkPositionData();
            if (this.isModal) {
              var positionX = this.position.X;
              var positionY = this.position.Y;
              if (!isNullOrUndefined2(oldProp.position)) {
                if (!isNullOrUndefined2(oldProp.position.X)) {
                  positionX = oldProp.position.X;
                }
                if (!isNullOrUndefined2(oldProp.position.Y)) {
                  positionY = oldProp.position.Y;
                }
              }
              if (this.dlgContainer.classList.contains("e-dlg-" + positionX + "-" + positionY)) {
                this.dlgContainer.classList.remove("e-dlg-" + positionX + "-" + positionY);
              }
            }
            this.positionChange();
            this.updatePersistData();
            break;
          case "enableRtl":
            this.setEnableRTL();
            break;
          case "enableResize":
            this.setResize();
            this.isModelResize = this.enableResize && this.isModal;
            if (this.enableResize && this.dialogOpen) {
              this.resetResizeIcon();
            }
            break;
          case "minHeight":
            if (this.minHeight !== "") {
              this.element.style.minHeight = formatUnit(this.minHeight);
            }
            break;
        }
      }
    };
    Dialog2.prototype.setTarget = function(target) {
      this.popupObj.relateTo = target;
      this.target = target;
      this.targetEle = typeof this.target === "string" ? document.querySelector(this.target) : this.target;
      if (this.dragObj) {
        this.dragObj.dragArea = this.targetEle;
      }
      this.setMaxHeight();
      if (this.isModal) {
        this.updateIsModal();
      }
      if (this.enableResize) {
        this.setResize();
      }
      if (!isNullOrUndefined2(this.targetEle)) {
        if (this.isModal && !isNullOrUndefined2(this.dlgContainer)) {
          this.targetEle.appendChild(this.dlgContainer);
        } else if (!isNullOrUndefined2(this.element)) {
          this.targetEle.appendChild(this.element);
        }
      }
    };
    Dialog2.prototype.updateIsModal = function() {
      this.element.setAttribute("aria-modal", this.isModal ? "true" : "false");
      if (this.isModal) {
        if (isNullOrUndefined2(this.dlgOverlay)) {
          this.setIsModal();
          this.element.style.top = "0px";
          this.element.style.left = "0px";
          if (!isNullOrUndefined2(this.targetEle)) {
            this.targetEle.appendChild(this.dlgContainer);
          }
        }
      } else {
        removeClass2([this.element], MODAL_DLG);
        removeClass2([document.body], [DLG_TARGET, SCROLL_DISABLED]);
        detach2(this.dlgOverlay);
        while (this.dlgContainer.firstChild) {
          this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild, this.dlgContainer);
        }
        this.dlgContainer.parentElement.removeChild(this.dlgContainer);
      }
      if (this.visible) {
        this.show();
      }
      this.positionChange();
      if (this.isModal && this.dlgOverlay) {
        EventHandler2.add(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler, this);
      }
    };
    Dialog2.prototype.setzIndex = function(zIndexElement, setPopupZindex) {
      var prevOnChange = this.isProtectedOnChange;
      this.isProtectedOnChange = true;
      var currentzIndex = getZindexPartial(zIndexElement);
      this.zIndex = currentzIndex > this.zIndex ? currentzIndex : this.zIndex;
      this.isProtectedOnChange = prevOnChange;
      if (setPopupZindex) {
        this.popupObj.zIndex = this.zIndex;
      }
    };
    Dialog2.prototype.windowResizeHandler = function() {
      setMaxWidth(this.targetEle.clientWidth);
      setMaxHeight(this.targetEle.clientHeight);
      this.setMaxHeight();
    };
    Dialog2.prototype.getPersistData = function() {
      return this.addOnPersist(["width", "height", "position"]);
    };
    Dialog2.prototype.removeAllChildren = function(element2) {
      while (element2.children[0]) {
        this.removeAllChildren(element2.children[0]);
        element2.removeChild(element2.children[0]);
      }
    };
    Dialog2.prototype.destroy = function() {
      if (this.isDestroyed) {
        return;
      }
      var classArray = [RTL4, MODAL_DLG, DLG_RESIZABLE, DLG_RESTRICT_LEFT_VALUE, FULLSCREEN, DEVICE];
      var attrs = ["role", "aria-modal", "aria-labelledby", "aria-describedby", "aria-grabbed", "tabindex", "style"];
      removeClass2([this.targetEle], [DLG_TARGET, SCROLL_DISABLED]);
      if (!isNullOrUndefined2(this.element) && this.element.classList.contains(FULLSCREEN)) {
        removeClass2([document.body], [DLG_TARGET, SCROLL_DISABLED]);
      }
      if (this.isModal) {
        removeClass2([!isNullOrUndefined2(this.targetEle) ? this.targetEle : document.body], SCROLL_DISABLED);
      }
      this.unWireEvents();
      this.unWireButtonEvents();
      this.destroyButtons();
      if (!isNullOrUndefined2(this.closeIconBtnObj)) {
        this.closeIconBtnObj.destroy();
      }
      if (!isNullOrUndefined2(this.dragObj)) {
        this.dragObj.destroy();
      }
      if (!isNullOrUndefined2(this.popupObj.element) && this.popupObj.element.classList.contains(POPUP_ROOT)) {
        this.popupObj.destroy();
      }
      removeClass2([this.element], classArray);
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        removeClass2([this.element], this.cssClass.split(" "));
      }
      if (!isNullOrUndefined2(this.refElement) && !isNullOrUndefined2(this.refElement.parentElement)) {
        this.refElement.parentElement.insertBefore(this.isModal ? this.dlgContainer : this.element, this.refElement);
        detach2(this.refElement);
        this.refElement = void 0;
      }
      if (this.isModal) {
        detach2(this.dlgOverlay);
        this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer);
        detach2(this.dlgContainer);
      }
      this.element.innerHTML = this.clonedEle.innerHTML;
      for (var i = 0; i < attrs.length; i++) {
        this.element.removeAttribute(attrs[i]);
      }
      this.ftrTemplateContent = null;
      this.headerContent = null;
      if (!this.isReact && !this.isVue && !isNullOrUndefined2(this.contentEle)) {
        this.removeAllChildren(this.contentEle);
      }
      this.contentEle = null;
      resizeDestroy();
      _super.prototype.destroy.call(this);
      if (this.isReact) {
        this.clearTemplate();
      }
    };
    Dialog2.prototype.wireWindowResizeEvent = function() {
      this.boundWindowResizeHandler = this.windowResizeHandler.bind(this);
      window.addEventListener("resize", this.boundWindowResizeHandler);
    };
    Dialog2.prototype.unWireWindowResizeEvent = function() {
      window.removeEventListener("resize", this.boundWindowResizeHandler);
      this.boundWindowResizeHandler = null;
    };
    Dialog2.prototype.wireEvents = function() {
      if (this.showCloseIcon) {
        EventHandler2.add(this.closeIcon, "click", this.closeIconClickEventHandler, this);
      }
      if (this.isModal && this.dlgOverlay) {
        EventHandler2.add(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler, this);
      }
    };
    Dialog2.prototype.unWireEvents = function() {
      if (this.showCloseIcon) {
        EventHandler2.remove(this.closeIcon, "click", this.closeIconClickEventHandler);
      }
      if (this.isModal) {
        EventHandler2.remove(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler);
      }
    };
    Dialog2.prototype.refreshPosition = function() {
      this.popupObj.refreshPosition();
      if (this.element.classList.contains(MODAL_DLG)) {
        this.positionChange();
      }
    };
    Dialog2.prototype.getDimension = function() {
      var dialogWidth = this.element.offsetWidth;
      var dialogHeight = this.element.offsetHeight;
      return {
        width: dialogWidth,
        height: dialogHeight
      };
    };
    Dialog2.prototype.show = function(isFullScreen) {
      var _this = this;
      if (!this.element.classList.contains(ROOT)) {
        return;
      }
      if (!this.element.classList.contains(DLG_SHOW) || !isNullOrUndefined2(isFullScreen)) {
        if (!isNullOrUndefined2(isFullScreen)) {
          this.fullScreen(isFullScreen);
        }
        var eventArgs_1 = isBlazor2() ? {
          cancel: false,
          element: this.element,
          container: this.isModal ? this.dlgContainer : this.element,
          maxHeight: this.element.style.maxHeight
        } : {
          cancel: false,
          element: this.element,
          container: this.isModal ? this.dlgContainer : this.element,
          target: this.target,
          maxHeight: this.element.style.maxHeight
        };
        this.trigger("beforeOpen", eventArgs_1, function(beforeOpenArgs) {
          if (!beforeOpenArgs.cancel) {
            if (_this.element.style.maxHeight !== eventArgs_1.maxHeight) {
              _this.allowMaxHeight = false;
              _this.element.style.maxHeight = eventArgs_1.maxHeight;
            }
            if (_this.enableResize && _this.boundWindowResizeHandler == null && !_this.initialRender) {
              _this.wireWindowResizeEvent();
            }
            _this.storeActiveElement = document.activeElement;
            _this.element.tabIndex = -1;
            if (_this.isModal && !isNullOrUndefined2(_this.dlgOverlay)) {
              _this.dlgOverlay.style.display = "block";
              _this.dlgContainer.style.display = "flex";
              removeClass2([_this.dlgOverlay], "e-fade");
              if (!isNullOrUndefined2(_this.targetEle)) {
                if (_this.targetEle === document.body) {
                  _this.dlgContainer.style.position = "fixed";
                } else {
                  _this.dlgContainer.style.position = "absolute";
                }
                _this.dlgOverlay.style.position = "absolute";
                var targetType = _this.getTargetContainer(_this.target);
                if (targetType instanceof Element) {
                  var computedStyle = window.getComputedStyle(targetType);
                  if (computedStyle.getPropertyValue("direction") === "rtl") {
                    _this.element.style.position = "absolute";
                  } else {
                    _this.element.style.position = "relative";
                  }
                } else {
                  _this.element.style.position = "relative";
                }
                addClass2([_this.targetEle], [DLG_TARGET, SCROLL_DISABLED]);
              } else {
                addClass2([document.body], [DLG_TARGET, SCROLL_DISABLED]);
              }
            }
            var openAnimation = {
              name: _this.animationSettings.effect === "None" && animationMode2 === "Enable" ? "ZoomIn" : _this.animationSettings.effect + "In",
              duration: _this.animationSettings.duration,
              delay: _this.animationSettings.delay
            };
            var zIndexElement = _this.isModal ? _this.element.parentElement : _this.element;
            if (_this.calculatezIndex) {
              _this.setzIndex(zIndexElement, true);
              setStyleAttribute2(_this.element, {
                "zIndex": _this.zIndex
              });
              if (_this.isModal) {
                _this.setOverlayZindex(_this.zIndex);
              }
            }
            _this.animationSettings.effect === "None" && animationMode2 === "Enable" ? _this.popupObj.show(openAnimation) : _this.animationSettings.effect === "None" ? _this.popupObj.show() : _this.popupObj.show(openAnimation);
            if (_this.isModal) {
              var targetType = _this.getTargetContainer(_this.target);
              if (targetType instanceof Element) {
                var computedStyle = window.getComputedStyle(targetType);
                if (computedStyle.getPropertyValue("direction") === "rtl" && !_this.IsDragStop) {
                  _this.setPopupPosition();
                }
              }
            }
            _this.dialogOpen = true;
            var prevOnChange = _this.isProtectedOnChange;
            _this.isProtectedOnChange = true;
            _this.visible = true;
            _this.preventVisibility = true;
            _this.isProtectedOnChange = prevOnChange;
          }
        });
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Dialog2.prototype.hide = function(event2) {
      var _this = this;
      if (!this.element.classList.contains(ROOT)) {
        return;
      }
      if (this.preventVisibility) {
        var eventArgs = isBlazor2() ? {
          cancel: false,
          isInteracted: event2 ? true : false,
          element: this.element,
          container: this.isModal ? this.dlgContainer : this.element,
          event: event2
        } : {
          cancel: false,
          isInteracted: event2 ? true : false,
          element: this.element,
          target: this.target,
          container: this.isModal ? this.dlgContainer : this.element,
          event: event2,
          closedBy: this.dlgClosedBy
        };
        this.closeArgs = eventArgs;
        this.trigger("beforeClose", eventArgs, function(beforeCloseArgs) {
          if (!beforeCloseArgs.cancel) {
            if (_this.enableResize) {
              _this.unWireWindowResizeEvent();
            }
            var closeAnimation = {
              name: _this.animationSettings.effect === "None" && animationMode2 === "Enable" ? "ZoomOut" : _this.animationSettings.effect + "Out",
              duration: _this.animationSettings.duration,
              delay: _this.animationSettings.delay
            };
            if (_this.animationSettings.effect === "None" && animationMode2 === "Enable") {
              _this.popupObj.hide(closeAnimation);
            } else if (_this.animationSettings.effect === "None") {
              _this.popupObj.hide();
            } else {
              _this.popupObj.hide(closeAnimation);
            }
            setTimeout(function() {
              if (_this.isModal) {
                if (!isNullOrUndefined2(_this.targetEle) && _this.targetEle.classList.contains(DLG_TARGET) && _this.targetEle.classList.contains(SCROLL_DISABLED)) {
                  removeClass2([_this.targetEle], [DLG_TARGET, SCROLL_DISABLED]);
                }
              }
              if (document.body.classList.contains(DLG_TARGET) && document.body.classList.contains(SCROLL_DISABLED)) {
                removeClass2([document.body], [DLG_TARGET, SCROLL_DISABLED]);
              }
            }, _this.animationSettings.duration + _this.animationSettings.delay);
            _this.dialogOpen = false;
            var prevOnChange = _this.isProtectedOnChange;
            _this.isProtectedOnChange = true;
            _this.visible = false;
            _this.preventVisibility = false;
            _this.isProtectedOnChange = prevOnChange;
          }
          _this.dlgClosedBy = DLG_USER_ACTION_CLOSED;
        });
      }
    };
    Dialog2.prototype.fullScreen = function(args) {
      var top = this.element.offsetTop;
      var left = this.element.offsetLeft;
      if (args) {
        if (!this.isModal) {
          this.element.style.top = document.scrollingElement.scrollTop + "px";
        }
        addClass2([this.element], FULLSCREEN);
        var display = this.element.style.display;
        this.element.style.display = "none";
        this.element.style.maxHeight = !isNullOrUndefined2(this.target) ? this.targetEle.offsetHeight + "px" : window.innerHeight + "px";
        this.element.style.display = display;
        addClass2([document.body], [DLG_TARGET, SCROLL_DISABLED]);
        if (this.allowDragging && !isNullOrUndefined2(this.dragObj)) {
          this.dragObj.destroy();
        }
      } else {
        removeClass2([this.element], FULLSCREEN);
        removeClass2([document.body], [DLG_TARGET, SCROLL_DISABLED]);
        if (this.allowDragging && !isNullOrUndefined2(this.headerContent)) {
          this.setAllowDragging();
        }
      }
      return args;
    };
    Dialog2.prototype.getButtons = function(index) {
      if (!isNullOrUndefined2(index)) {
        return this.btnObj[index];
      }
      return this.btnObj;
    };
    Dialog2.prototype.unWireButtonEvents = function() {
      if (this.buttons.length > 0 && this.footerTemplate === "" && this.ftrTemplateContent) {
        for (var i = 0; i < this.buttons.length; i++) {
          if (this.buttons[i].click && typeof this.buttons[i].click === "function" && this.ftrTemplateContent.children[i]) {
            EventHandler2.remove(this.ftrTemplateContent.children[i], "click", this.buttons[i].click);
          }
        }
      }
    };
    Dialog2.prototype.destroyButtons = function() {
      if (!isNullOrUndefined2(this.btnObj)) {
        for (var i = 0; i < this.btnObj.length; i++) {
          if (this.btnObj[i] && !this.btnObj[i].isDestroyed) {
            this.btnObj[i].destroy();
          }
        }
      }
    };
    __decorate23([Property2("")], Dialog2.prototype, "content", void 0);
    __decorate23([Property2(true)], Dialog2.prototype, "enableHtmlSanitizer", void 0);
    __decorate23([Property2(false)], Dialog2.prototype, "enablePersistence", void 0);
    __decorate23([Property2(false)], Dialog2.prototype, "showCloseIcon", void 0);
    __decorate23([Property2(false)], Dialog2.prototype, "isModal", void 0);
    __decorate23([Property2("")], Dialog2.prototype, "header", void 0);
    __decorate23([Property2(true)], Dialog2.prototype, "visible", void 0);
    __decorate23([Property2(false)], Dialog2.prototype, "enableResize", void 0);
    __decorate23([Property2(["South-East"])], Dialog2.prototype, "resizeHandles", void 0);
    __decorate23([Property2("auto")], Dialog2.prototype, "height", void 0);
    __decorate23([Property2("")], Dialog2.prototype, "minHeight", void 0);
    __decorate23([Property2("100%")], Dialog2.prototype, "width", void 0);
    __decorate23([Property2("")], Dialog2.prototype, "cssClass", void 0);
    __decorate23([Property2(1e3)], Dialog2.prototype, "zIndex", void 0);
    __decorate23([Property2(null)], Dialog2.prototype, "target", void 0);
    __decorate23([Property2("")], Dialog2.prototype, "footerTemplate", void 0);
    __decorate23([Property2(false)], Dialog2.prototype, "allowDragging", void 0);
    __decorate23([Collection([{}], ButtonProps)], Dialog2.prototype, "buttons", void 0);
    __decorate23([Property2(true)], Dialog2.prototype, "closeOnEscape", void 0);
    __decorate23([Complex2({}, AnimationSettings)], Dialog2.prototype, "animationSettings", void 0);
    __decorate23([Complex2({
      X: "center",
      Y: "center"
    }, PositionData)], Dialog2.prototype, "position", void 0);
    __decorate23([Event3()], Dialog2.prototype, "created", void 0);
    __decorate23([Event3()], Dialog2.prototype, "open", void 0);
    __decorate23([Event3()], Dialog2.prototype, "beforeSanitizeHtml", void 0);
    __decorate23([Event3()], Dialog2.prototype, "beforeOpen", void 0);
    __decorate23([Event3()], Dialog2.prototype, "close", void 0);
    __decorate23([Event3()], Dialog2.prototype, "beforeClose", void 0);
    __decorate23([Event3()], Dialog2.prototype, "dragStart", void 0);
    __decorate23([Event3()], Dialog2.prototype, "dragStop", void 0);
    __decorate23([Event3()], Dialog2.prototype, "drag", void 0);
    __decorate23([Event3()], Dialog2.prototype, "overlayClick", void 0);
    __decorate23([Event3()], Dialog2.prototype, "resizeStart", void 0);
    __decorate23([Event3()], Dialog2.prototype, "resizing", void 0);
    __decorate23([Event3()], Dialog2.prototype, "resizeStop", void 0);
    __decorate23([Event3()], Dialog2.prototype, "destroyed", void 0);
    Dialog2 = __decorate23([NotifyPropertyChanges2], Dialog2);
    return Dialog2;
  }(Component3)
);
var DialogUtility;
(function(DialogUtility2) {
  function alert(args) {
    var dialogElement = createElement2("div", {
      "className": DLG_UTIL_ALERT
    });
    document.body.appendChild(dialogElement);
    var alertDialogObj;
    var okButtonModel = [{
      buttonModel: {
        isPrimary: true,
        content: "OK"
      },
      click: function() {
        this.hide();
      }
    }];
    if (typeof args === "string") {
      alertDialogObj = createDialog({
        content: args,
        position: {
          X: "center",
          Y: "top"
        },
        isModal: true,
        header: DLG_UTIL_DEFAULT_TITLE,
        buttons: okButtonModel
      }, dialogElement);
    } else {
      alertDialogObj = createDialog(alertOptions(args), dialogElement);
    }
    alertDialogObj.close = function() {
      if (args && args.close) {
        args.close.apply(alertDialogObj);
      }
      alertDialogObj.destroy();
      if (alertDialogObj.element.classList.contains("e-dlg-modal")) {
        alertDialogObj.element.parentElement.remove();
        alertDialogObj.target.classList.remove(DLG_UTIL_ROOT);
      } else {
        alertDialogObj.element.remove();
      }
    };
    return alertDialogObj;
  }
  DialogUtility2.alert = alert;
  function confirm(args) {
    var dialogElement = createElement2("div", {
      "className": DLG_UTIL_CONFIRM
    });
    document.body.appendChild(dialogElement);
    var confirmDialogObj;
    var okCancelButtonModel = [{
      buttonModel: {
        isPrimary: true,
        content: "OK"
      },
      click: function() {
        this.hide();
      }
    }, {
      buttonModel: {
        content: "Cancel"
      },
      click: function() {
        this.hide();
      }
    }];
    if (typeof args === "string") {
      confirmDialogObj = createDialog({
        position: {
          X: "center",
          Y: "top"
        },
        content: args,
        isModal: true,
        header: DLG_UTIL_DEFAULT_TITLE,
        buttons: okCancelButtonModel
      }, dialogElement);
    } else {
      confirmDialogObj = createDialog(confirmOptions(args), dialogElement);
    }
    confirmDialogObj.close = function() {
      if (args && args.close) {
        args.close.apply(confirmDialogObj);
      }
      confirmDialogObj.destroy();
      if (confirmDialogObj.element.classList.contains("e-dlg-modal")) {
        confirmDialogObj.element.parentElement.remove();
        confirmDialogObj.target.classList.remove(DLG_UTIL_ROOT);
      } else {
        confirmDialogObj.element.remove();
      }
    };
    return confirmDialogObj;
  }
  DialogUtility2.confirm = confirm;
  function createDialog(options, element2) {
    var dialogObject = new Dialog(options);
    dialogObject.appendTo(element2);
    return dialogObject;
  }
  function alertOptions(option) {
    var options = {};
    options.buttons = [];
    options = formOptions(options, option);
    options = setAlertButtonModel(options, option);
    return options;
  }
  function confirmOptions(option) {
    var options = {};
    options.buttons = [];
    options = formOptions(options, option);
    options = setConfirmButtonModel(options, option);
    return options;
  }
  function formOptions(options, option) {
    options.header = !isNullOrUndefined2(option.title) ? option.title : null;
    options.content = !isNullOrUndefined2(option.content) ? option.content : "";
    options.isModal = !isNullOrUndefined2(option.isModal) ? option.isModal : true;
    options.showCloseIcon = !isNullOrUndefined2(option.showCloseIcon) ? option.showCloseIcon : false;
    options.allowDragging = !isNullOrUndefined2(option.isDraggable) ? option.isDraggable : false;
    options.closeOnEscape = !isNullOrUndefined2(option.closeOnEscape) ? option.closeOnEscape : false;
    options.position = !isNullOrUndefined2(option.position) ? option.position : {
      X: "center",
      Y: "top"
    };
    options.animationSettings = !isNullOrUndefined2(option.animationSettings) ? option.animationSettings : {
      effect: "Fade",
      duration: 400,
      delay: 0
    };
    options.cssClass = !isNullOrUndefined2(option.cssClass) ? option.cssClass : "";
    options.zIndex = !isNullOrUndefined2(option.zIndex) ? option.zIndex : 1e3;
    options.open = !isNullOrUndefined2(option.open) ? option.open : null;
    options.width = !isNullOrUndefined2(option.width) ? option.width : "auto";
    options.height = !isNullOrUndefined2(option.height) ? option.height : "auto";
    return options;
  }
  function setAlertButtonModel(options, option) {
    var alertButtonModel = [{
      buttonModel: {
        isPrimary: true,
        content: "OK"
      },
      click: function() {
        this.hide();
      }
    }];
    if (!isNullOrUndefined2(option.okButton)) {
      options.buttons[0] = formButtonModel(options.buttons[0], option.okButton, alertButtonModel[0]);
    } else {
      options.buttons = alertButtonModel;
    }
    return options;
  }
  function setConfirmButtonModel(options, option) {
    var okButtonModel = {
      buttonModel: {
        isPrimary: true,
        content: "OK"
      },
      click: function() {
        this.hide();
      }
    };
    var cancelButtonModel = {
      buttonModel: {
        content: "Cancel"
      },
      click: function() {
        this.hide();
      }
    };
    if (!isNullOrUndefined2(option.okButton)) {
      options.buttons[0] = formButtonModel(options.buttons[0], option.okButton, okButtonModel);
    } else {
      options.buttons[0] = okButtonModel;
    }
    if (!isNullOrUndefined2(option.cancelButton)) {
      options.buttons[1] = formButtonModel(options.buttons[1], option.cancelButton, cancelButtonModel);
    } else {
      options.buttons[1] = cancelButtonModel;
    }
    return options;
  }
  function formButtonModel(buttonModel, option, buttonPropModel) {
    var buttonProps = buttonPropModel;
    if (!isNullOrUndefined2(option.text)) {
      buttonProps.buttonModel.content = option.text;
    }
    if (!isNullOrUndefined2(option.icon)) {
      buttonProps.buttonModel.iconCss = option.icon;
    }
    if (!isNullOrUndefined2(option.cssClass)) {
      buttonProps.buttonModel.cssClass = option.cssClass;
    }
    if (!isNullOrUndefined2(option.click)) {
      buttonProps.click = option.click;
    }
    if (!isNullOrUndefined2(option.isFlat)) {
      buttonProps.isFlat = option.isFlat;
    }
    return buttonProps;
  }
})(DialogUtility || (DialogUtility = {}));

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/tooltip/tooltip.js
var __extends23 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate24 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var TOUCHEND_HIDE_DELAY = 1500;
var TAPHOLD_THRESHOLD = 500;
var SHOW_POINTER_TIP_GAP = 0;
var HIDE_POINTER_TIP_GAP = 8;
var MOUSE_TRAIL_GAP = 2;
var POINTER_ADJUST = 2;
var ROOT2 = "e-tooltip";
var RTL5 = "e-rtl";
var DEVICE2 = "e-bigger";
var ICON2 = "e-icons";
var CLOSE = "e-tooltip-close";
var TOOLTIP_WRAP = "e-tooltip-wrap";
var CONTENT = "e-tip-content";
var ARROW_TIP = "e-arrow-tip";
var ARROW_TIP_OUTER = "e-arrow-tip-outer";
var ARROW_TIP_INNER = "e-arrow-tip-inner";
var TIP_BOTTOM = "e-tip-bottom";
var TIP_TOP = "e-tip-top";
var TIP_LEFT = "e-tip-left";
var TIP_RIGHT = "e-tip-right";
var POPUP_ROOT2 = "e-popup";
var POPUP_OPEN = "e-popup-open";
var POPUP_CLOSE = "e-popup-close";
var POPUP_LIB = "e-lib";
var HIDE_POPUP = "e-hidden";
var POPUP_CONTAINER = "e-tooltip-popup-container";
var Animation3 = (
  /** @class */
  function(_super) {
    __extends23(Animation5, _super);
    function Animation5() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate24([Property2({
      effect: "FadeIn",
      duration: 150,
      delay: 0
    })], Animation5.prototype, "open", void 0);
    __decorate24([Property2({
      effect: "FadeOut",
      duration: 150,
      delay: 0
    })], Animation5.prototype, "close", void 0);
    return Animation5;
  }(ChildProperty2)
);
var Tooltip = (
  /** @class */
  function(_super) {
    __extends23(Tooltip2, _super);
    function Tooltip2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.mouseMoveEvent = null;
      _this.mouseMoveTarget = null;
      _this.containerElement = null;
      _this.isBodyContainer = true;
      return _this;
    }
    Tooltip2.prototype.initialize = function() {
      this.formatPosition();
      addClass2([this.element], ROOT2);
    };
    Tooltip2.prototype.formatPosition = function() {
      var _a, _b;
      if (!this.position) {
        return;
      }
      if (this.position.indexOf("Top") === 0 || this.position.indexOf("Bottom") === 0) {
        _a = this.position.split(/(?=[A-Z])/), this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1];
      } else {
        _b = this.position.split(/(?=[A-Z])/), this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1];
      }
    };
    Tooltip2.prototype.renderArrow = function() {
      this.setTipClass(this.position);
      var tip = this.createElement("div", {
        className: ARROW_TIP + " " + this.tipClass
      });
      tip.appendChild(this.createElement("div", {
        className: ARROW_TIP_OUTER + " " + this.tipClass
      }));
      tip.appendChild(this.createElement("div", {
        className: ARROW_TIP_INNER + " " + this.tipClass
      }));
      this.tooltipEle.appendChild(tip);
    };
    Tooltip2.prototype.setTipClass = function(position) {
      if (position.indexOf("Right") === 0) {
        this.tipClass = TIP_LEFT;
      } else if (position.indexOf("Bottom") === 0) {
        this.tipClass = TIP_TOP;
      } else if (position.indexOf("Left") === 0) {
        this.tipClass = TIP_RIGHT;
      } else {
        this.tipClass = TIP_BOTTOM;
      }
    };
    Tooltip2.prototype.renderPopup = function(target) {
      var elePos = this.mouseTrail ? {
        top: 0,
        left: 0
      } : this.getTooltipPosition(target);
      this.tooltipEle.classList.remove(POPUP_LIB);
      this.popupObj = new Popup(this.tooltipEle, {
        height: this.height,
        width: this.width,
        position: {
          X: elePos.left,
          Y: elePos.top
        },
        enableRtl: this.enableRtl,
        open: this.openPopupHandler.bind(this),
        close: this.closePopupHandler.bind(this)
      });
    };
    Tooltip2.prototype.getScalingFactor = function(target) {
      if (!target) {
        return {
          x: 1,
          y: 1
        };
      }
      var scalingFactors = {
        x: 1,
        y: 1
      };
      var elementsWithTransform = target.closest('[style*="transform: scale"]');
      if (elementsWithTransform && elementsWithTransform !== this.tooltipEle && elementsWithTransform.contains(this.tooltipEle)) {
        var computedStyle = window.getComputedStyle(elementsWithTransform);
        var transformValue = computedStyle.getPropertyValue("transform");
        var matrixValues = transformValue.match(/matrix\(([^)]+)\)/)[1].split(",").map(parseFloat);
        scalingFactors.x = matrixValues[0];
        scalingFactors.y = matrixValues[3];
      }
      return scalingFactors;
    };
    Tooltip2.prototype.getTooltipPosition = function(target) {
      this.tooltipEle.style.display = "block";
      var parentWithZoomStyle = this.element.closest('[style*="zoom"]');
      if (parentWithZoomStyle) {
        if (!parentWithZoomStyle.contains(this.tooltipEle)) {
          this.tooltipEle.style.zoom = getComputedStyle(parentWithZoomStyle).zoom;
        }
      }
      var pos = calculatePosition(target, this.tooltipPositionX, this.tooltipPositionY, !this.isBodyContainer, this.isBodyContainer ? null : this.containerElement.getBoundingClientRect());
      var scalingFactors = this.getScalingFactor(target);
      var offsetPos = this.calculateTooltipOffset(this.position, scalingFactors.x, scalingFactors.y);
      var collisionPosition = this.calculateElementPosition(pos, offsetPos);
      var collisionLeft = collisionPosition[0];
      var collisionTop = collisionPosition[1];
      var elePos = this.collisionFlipFit(target, collisionLeft, collisionTop);
      elePos.left = elePos.left / scalingFactors.x;
      elePos.top = elePos.top / scalingFactors.y;
      this.tooltipEle.style.display = "";
      return elePos;
    };
    Tooltip2.prototype.windowResize = function() {
      this.reposition(this.findTarget());
    };
    Tooltip2.prototype.reposition = function(target) {
      if (this.popupObj && target) {
        var elePos = this.getTooltipPosition(target);
        this.popupObj.position = {
          X: elePos.left,
          Y: elePos.top
        };
        this.popupObj.dataBind();
      }
    };
    Tooltip2.prototype.openPopupHandler = function() {
      if (!this.mouseTrail && this.needTemplateReposition()) {
        this.reposition(this.findTarget());
      }
      this.trigger("afterOpen", this.tooltipEventArgs);
      this.tooltipEventArgs = null;
    };
    Tooltip2.prototype.closePopupHandler = function() {
      if (this.isReact && !(this.opensOn === "Click" || typeof this.content === "function")) {
        this.clearTemplate(["content"]);
      }
      this.clear();
      var tooltipAfterCloseEventArgs = {
        type: this.tooltipEventArgs.event ? this.tooltipEventArgs.event.type : null,
        cancel: false,
        target: this.tooltipEventArgs.target,
        event: this.tooltipEventArgs.event ? this.tooltipEventArgs.event : null,
        element: this.tooltipEle,
        isInteracted: !isNullOrUndefined2(this.tooltipEventArgs.event)
      };
      this.trigger("afterClose", tooltipAfterCloseEventArgs);
      tooltipAfterCloseEventArgs = null;
    };
    Tooltip2.prototype.calculateTooltipOffset = function(position, xScalingFactor, yScalingFactor) {
      if (xScalingFactor === void 0) {
        xScalingFactor = 1;
      }
      if (yScalingFactor === void 0) {
        yScalingFactor = 1;
      }
      var pos = {
        top: 0,
        left: 0
      };
      var tipWidth;
      var tipHeight;
      var tooltipEleWidth;
      var tooltipEleHeight;
      var arrowEle;
      var tipAdjust;
      var tipHeightAdjust;
      var tipWidthAdjust;
      if (xScalingFactor !== 1 || yScalingFactor !== 1) {
        var tooltipEleRect = this.tooltipEle.getBoundingClientRect();
        var arrowEleRect = void 0;
        tooltipEleWidth = Math.round(tooltipEleRect.width);
        tooltipEleHeight = Math.round(tooltipEleRect.height);
        arrowEle = select2("." + ARROW_TIP, this.tooltipEle);
        if (arrowEle) {
          arrowEleRect = arrowEle.getBoundingClientRect();
        }
        tipWidth = arrowEle ? Math.round(arrowEleRect.width) : 0;
        tipHeight = arrowEle ? Math.round(arrowEleRect.height) : 0;
        tipAdjust = this.showTipPointer ? SHOW_POINTER_TIP_GAP : HIDE_POINTER_TIP_GAP;
        tipHeightAdjust = tipHeight / 2 + POINTER_ADJUST + (tooltipEleHeight - this.tooltipEle.clientHeight * yScalingFactor);
        tipWidthAdjust = tipWidth / 2 + POINTER_ADJUST + (tooltipEleWidth - this.tooltipEle.clientWidth * xScalingFactor);
      } else {
        tooltipEleWidth = this.tooltipEle.offsetWidth;
        tooltipEleHeight = this.tooltipEle.offsetHeight;
        arrowEle = select2("." + ARROW_TIP, this.tooltipEle);
        tipWidth = arrowEle ? arrowEle.offsetWidth : 0;
        tipHeight = arrowEle ? arrowEle.offsetHeight : 0;
        tipAdjust = this.showTipPointer ? SHOW_POINTER_TIP_GAP : HIDE_POINTER_TIP_GAP;
        tipHeightAdjust = tipHeight / 2 + POINTER_ADJUST + (this.tooltipEle.offsetHeight - this.tooltipEle.clientHeight);
        tipWidthAdjust = tipWidth / 2 + POINTER_ADJUST + (this.tooltipEle.offsetWidth - this.tooltipEle.clientWidth);
      }
      if (this.mouseTrail) {
        tipAdjust += MOUSE_TRAIL_GAP;
      }
      switch (position) {
        case "RightTop":
          pos.left += tipWidth + tipAdjust;
          pos.top -= tooltipEleHeight - tipHeightAdjust;
          break;
        case "RightCenter":
          pos.left += tipWidth + tipAdjust;
          pos.top -= tooltipEleHeight / 2;
          break;
        case "RightBottom":
          pos.left += tipWidth + tipAdjust;
          pos.top -= tipHeightAdjust;
          break;
        case "BottomRight":
          pos.top += tipHeight + tipAdjust;
          pos.left -= tipWidthAdjust;
          break;
        case "BottomCenter":
          pos.top += tipHeight + tipAdjust;
          pos.left -= tooltipEleWidth / 2;
          break;
        case "BottomLeft":
          pos.top += tipHeight + tipAdjust;
          pos.left -= tooltipEleWidth - tipWidthAdjust;
          break;
        case "LeftBottom":
          pos.left -= tipWidth + tooltipEleWidth + tipAdjust;
          pos.top -= tipHeightAdjust;
          break;
        case "LeftCenter":
          pos.left -= tipWidth + tooltipEleWidth + tipAdjust;
          pos.top -= tooltipEleHeight / 2;
          break;
        case "LeftTop":
          pos.left -= tipWidth + tooltipEleWidth + tipAdjust;
          pos.top -= tooltipEleHeight - tipHeightAdjust;
          break;
        case "TopLeft":
          pos.top -= tooltipEleHeight + tipHeight + tipAdjust;
          pos.left -= tooltipEleWidth - tipWidthAdjust;
          break;
        case "TopRight":
          pos.top -= tooltipEleHeight + tipHeight + tipAdjust;
          pos.left -= tipWidthAdjust;
          break;
        default:
          pos.top -= tooltipEleHeight + tipHeight + tipAdjust;
          pos.left -= tooltipEleWidth / 2;
          break;
      }
      pos.left += this.offsetX;
      pos.top += this.offsetY;
      return pos;
    };
    Tooltip2.prototype.updateTipPosition = function(position) {
      var selEle = selectAll2("." + ARROW_TIP + ",." + ARROW_TIP_OUTER + ",." + ARROW_TIP_INNER, this.tooltipEle);
      var removeList = [TIP_BOTTOM, TIP_TOP, TIP_LEFT, TIP_RIGHT];
      removeClass2(selEle, removeList);
      this.setTipClass(position);
      addClass2(selEle, this.tipClass);
    };
    Tooltip2.prototype.adjustArrow = function(target, position, tooltipPositionX, tooltipPositionY) {
      var arrowEle = select2("." + ARROW_TIP, this.tooltipEle);
      if (this.showTipPointer === false || arrowEle === null) {
        return;
      }
      this.updateTipPosition(position);
      var leftValue;
      var topValue;
      this.tooltipEle.style.display = "block";
      var tooltipWidth = this.tooltipEle.clientWidth;
      var tooltipHeight = this.tooltipEle.clientHeight;
      var arrowInnerELe = select2("." + ARROW_TIP_INNER, this.tooltipEle);
      var tipWidth = arrowEle.offsetWidth;
      var tipHeight = arrowEle.offsetHeight;
      this.tooltipEle.style.display = "";
      if (this.tipClass === TIP_BOTTOM || this.tipClass === TIP_TOP) {
        if (this.tipClass === TIP_BOTTOM) {
          topValue = "99.9%";
          arrowInnerELe.style.top = "-" + (tipHeight - 2) + "px";
        } else {
          topValue = -(tipHeight - 1) + "px";
          arrowInnerELe.style.top = "-" + (tipHeight - 6) + "px";
        }
        if (target) {
          var tipPosExclude = tooltipPositionX !== "Center" || tooltipWidth > target.offsetWidth || this.mouseTrail;
          if (tipPosExclude && tooltipPositionX === "Left" || !tipPosExclude && this.tipPointerPosition === "End") {
            leftValue = tooltipWidth - tipWidth - POINTER_ADJUST + "px";
          } else if (tipPosExclude && tooltipPositionX === "Right" || !tipPosExclude && this.tipPointerPosition === "Start") {
            leftValue = POINTER_ADJUST + "px";
          } else if (tipPosExclude && (this.tipPointerPosition === "End" || this.tipPointerPosition === "Start")) {
            leftValue = this.tipPointerPosition === "End" ? target.offsetWidth + (this.tooltipEle.offsetWidth - target.offsetWidth) / 2 - tipWidth / 2 - POINTER_ADJUST + "px" : (this.tooltipEle.offsetWidth - target.offsetWidth) / 2 - tipWidth / 2 + POINTER_ADJUST + "px";
          } else {
            leftValue = tooltipWidth / 2 - tipWidth / 2 + "px";
          }
        }
      } else {
        if (this.tipClass === TIP_RIGHT) {
          leftValue = "99.9%";
          arrowInnerELe.style.left = "-" + (tipWidth - 2) + "px";
        } else {
          leftValue = -(tipWidth - 1) + "px";
          arrowInnerELe.style.left = -tipWidth + (tipWidth - 2) + "px";
        }
        var tipPosExclude = tooltipPositionY !== "Center" || tooltipHeight > target.offsetHeight || this.mouseTrail;
        if (tipPosExclude && tooltipPositionY === "Top" || !tipPosExclude && this.tipPointerPosition === "End") {
          topValue = tooltipHeight - tipHeight - POINTER_ADJUST + "px";
        } else if (tipPosExclude && tooltipPositionY === "Bottom" || !tipPosExclude && this.tipPointerPosition === "Start") {
          topValue = POINTER_ADJUST + "px";
        } else {
          topValue = tooltipHeight / 2 - tipHeight / 2 + "px";
        }
      }
      arrowEle.style.top = topValue;
      arrowEle.style.left = leftValue;
    };
    Tooltip2.prototype.renderContent = function(target) {
      var _this = this;
      var tooltipContent = select2("." + CONTENT, this.tooltipEle);
      if (this.cssClass) {
        addClass2([this.tooltipEle], this.cssClass.split(" "));
      }
      if (target && !isNullOrUndefined2(target.getAttribute("title"))) {
        target.setAttribute("data-content", target.getAttribute("title"));
        target.removeAttribute("title");
      }
      if (!isNullOrUndefined2(this.content)) {
        tooltipContent.innerHTML = "";
        if (this.content instanceof HTMLElement) {
          tooltipContent.appendChild(this.content);
        } else if (typeof this.content === "string") {
          if (this.isAngular) {
            this.setProperties({
              content: SanitizeHtmlHelper2.sanitize(this.content)
            }, true);
          } else {
            this.content = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(this.content) : this.content;
          }
          if (this.enableHtmlParse) {
            var tempFunction = compile4(this.content);
            var tempArr = tempFunction({}, this, "content", this.element.id + "content", void 0, void 0, tooltipContent, this.root);
            if (tempArr) {
              append(tempArr, tooltipContent);
            }
          } else {
            tooltipContent["textContent"] = this.content;
          }
        } else {
          var templateFunction = compile4(this.content);
          var tempArr = templateFunction({}, this, "content", this.element.id + "content", void 0, void 0, tooltipContent);
          if (tempArr) {
            if (this.isAngular) {
              setTimeout(function() {
                _this.reposition(target);
              }, 1);
            }
            append(tempArr, tooltipContent);
          }
          this.renderReactTemplates();
        }
      } else {
        if (target && !isNullOrUndefined2(target.getAttribute("data-content"))) {
          tooltipContent.innerHTML = target.getAttribute("data-content");
        }
      }
    };
    Tooltip2.prototype.renderCloseIcon = function() {
      if (!this.isSticky) {
        var existingCloseIcon = this.tooltipEle.querySelector("." + ICON2 + "." + CLOSE);
        if (existingCloseIcon) {
          remove(existingCloseIcon);
        }
        return;
      }
      var tipClose = this.createElement("div", {
        className: ICON2 + " " + CLOSE,
        attrs: {
          role: "button",
          "aria-label": "Press escape to close the Tooltip"
        }
      });
      this.tooltipEle.appendChild(tipClose);
      EventHandler2.add(tipClose, Browser2.touchStartEvent, this.onStickyClose, this);
    };
    Tooltip2.prototype.addDescribedBy = function(target, id) {
      var describedby = (target.getAttribute("aria-describedby") || "").split(/\s+/);
      if (describedby.indexOf(id) < 0) {
        describedby.push(id);
      }
      attributes2(target, {
        "aria-describedby": describedby.join(" ").trim(),
        "data-tooltip-id": id
      });
    };
    Tooltip2.prototype.removeDescribedBy = function(target) {
      var id = target.getAttribute("data-tooltip-id");
      var describedby = (target.getAttribute("aria-describedby") || "").split(/\s+/);
      var index = describedby.indexOf(id);
      if (index !== -1) {
        describedby.splice(index, 1);
      }
      target.removeAttribute("data-tooltip-id");
      var orgdescribedby = describedby.join(" ").trim();
      if (orgdescribedby) {
        target.setAttribute("aria-describedby", orgdescribedby);
      } else {
        target.removeAttribute("aria-describedby");
      }
    };
    Tooltip2.prototype.tapHoldHandler = function(evt) {
      clearTimeout(this.autoCloseTimer);
      this.targetHover(evt.originalEvent);
    };
    Tooltip2.prototype.touchEndHandler = function() {
      var _this = this;
      if (this.isSticky) {
        return;
      }
      var close = function() {
        _this.close();
      };
      this.autoCloseTimer = setTimeout(close, TOUCHEND_HIDE_DELAY);
    };
    Tooltip2.prototype.targetClick = function(e) {
      var target;
      if (this.target) {
        target = closest2(e.target, this.target);
      } else {
        target = this.element;
      }
      if (isNullOrUndefined2(target)) {
        return;
      }
      var mouseEvent = e;
      if (target.getAttribute("data-tooltip-id") === null) {
        if (!(mouseEvent.type === "mousedown" && mouseEvent.button === 2)) {
          this.targetHover(e);
        }
      } else if (!this.isSticky) {
        this.hideTooltip(this.animation.close, e, target);
      }
    };
    Tooltip2.prototype.targetHover = function(e) {
      var target;
      if (this.target) {
        target = closest2(e.target, this.target);
      } else {
        target = this.element;
      }
      if (isNullOrUndefined2(target) || target.getAttribute("data-tooltip-id") !== null && this.closeDelay === 0) {
        return;
      }
      var targetList = [].slice.call(selectAll2('[data-tooltip-id= "' + this.ctrlId + '_content"]', document));
      for (var _i = 0, targetList_1 = targetList; _i < targetList_1.length; _i++) {
        var target_1 = targetList_1[_i];
        this.restoreElement(target_1);
      }
      this.showTooltip(target, this.animation.open, e);
    };
    Tooltip2.prototype.mouseMoveBeforeOpen = function(e) {
      this.mouseMoveEvent = e;
    };
    Tooltip2.prototype.mouseMoveBeforeRemove = function() {
      if (this.mouseMoveTarget) {
        EventHandler2.remove(this.mouseMoveTarget, "mousemove touchstart", this.mouseMoveBeforeOpen);
      }
    };
    Tooltip2.prototype.showTooltip = function(target, showAnimation, e) {
      var _this = this;
      clearTimeout(this.showTimer);
      clearTimeout(this.hideTimer);
      if (this.openDelay && this.mouseTrail) {
        this.mouseMoveBeforeRemove();
        this.mouseMoveTarget = target;
        EventHandler2.add(this.mouseMoveTarget, "mousemove touchstart", this.mouseMoveBeforeOpen, this);
      }
      this.tooltipEventArgs = {
        type: e ? e.type : null,
        cancel: false,
        target,
        event: e ? e : null,
        element: this.tooltipEle,
        isInteracted: !isNullOrUndefined2(e)
      };
      var observeCallback = function(beforeRenderArgs) {
        _this.beforeRenderCallback(beforeRenderArgs, target, e, showAnimation);
      };
      this.trigger("beforeRender", this.tooltipEventArgs, observeCallback.bind(this));
    };
    Tooltip2.prototype.beforeRenderCallback = function(beforeRenderArgs, target, e, showAnimation) {
      if (beforeRenderArgs.cancel) {
        this.isHidden = true;
        this.clear();
        this.mouseMoveBeforeRemove();
      } else {
        this.isHidden = false;
        if (isNullOrUndefined2(this.tooltipEle)) {
          this.ctrlId = this.element.getAttribute("id") ? getUniqueID(this.element.getAttribute("id")) : getUniqueID("tooltip");
          this.tooltipEle = this.createElement("div", {
            className: TOOLTIP_WRAP + " " + POPUP_ROOT2 + " " + POPUP_LIB,
            attrs: {
              role: "tooltip",
              "aria-hidden": "false",
              "id": this.ctrlId + "_content"
            },
            styles: "width:" + formatUnit(this.width) + ";height:" + formatUnit(this.height) + ";position:absolute;"
          });
          this.tooltipBeforeRender(target, this);
          this.tooltipAfterRender(target, e, showAnimation, this);
        } else {
          if (target) {
            this.adjustArrow(target, this.position, this.tooltipPositionX, this.tooltipPositionY);
            this.addDescribedBy(target, this.ctrlId + "_content");
            this.renderContent(target);
            Animation2.stop(this.tooltipEle);
            this.reposition(target);
            this.tooltipAfterRender(target, e, showAnimation, this);
          }
        }
      }
    };
    Tooltip2.prototype.appendContainer = function(ctrlObj) {
      if (typeof this.container == "string") {
        if (this.container === "body") {
          this.containerElement = document.body;
        } else {
          this.isBodyContainer = false;
          this.containerElement = select2(this.container, document);
        }
      } else if (this.container instanceof HTMLElement) {
        this.containerElement = this.container;
        this.isBodyContainer = this.containerElement.tagName === "BODY";
      }
      if (!this.isBodyContainer) {
        addClass2([this.containerElement], POPUP_CONTAINER);
      }
      this.containerElement.appendChild(ctrlObj.tooltipEle);
    };
    Tooltip2.prototype.tooltipBeforeRender = function(target, ctrlObj) {
      if (target) {
        if (Browser2.isDevice) {
          addClass2([ctrlObj.tooltipEle], DEVICE2);
        }
        if (ctrlObj.width !== "auto") {
          ctrlObj.tooltipEle.style.maxWidth = formatUnit(ctrlObj.width);
        }
        ctrlObj.tooltipEle.appendChild(ctrlObj.createElement("div", {
          className: CONTENT
        }));
        this.appendContainer(ctrlObj);
        removeClass2([ctrlObj.tooltipEle], HIDE_POPUP);
        ctrlObj.addDescribedBy(target, ctrlObj.ctrlId + "_content");
        ctrlObj.renderContent(target);
        addClass2([ctrlObj.tooltipEle], POPUP_OPEN);
        if (ctrlObj.showTipPointer) {
          ctrlObj.renderArrow();
        }
        ctrlObj.renderCloseIcon();
        ctrlObj.renderPopup(target);
        ctrlObj.adjustArrow(target, ctrlObj.position, ctrlObj.tooltipPositionX, ctrlObj.tooltipPositionY);
        Animation2.stop(ctrlObj.tooltipEle);
        ctrlObj.reposition(target);
      }
    };
    Tooltip2.prototype.tooltipAfterRender = function(target, e, showAnimation, ctrlObj) {
      if (target) {
        removeClass2([ctrlObj.tooltipEle], POPUP_OPEN);
        addClass2([ctrlObj.tooltipEle], POPUP_CLOSE);
        ctrlObj.tooltipEventArgs = {
          type: e ? e.type : null,
          cancel: false,
          target,
          event: e ? e : null,
          element: ctrlObj.tooltipEle,
          isInteracted: !isNullOrUndefined2(e)
        };
        if (ctrlObj.needTemplateReposition() && !ctrlObj.mouseTrail && (showAnimation.effect === "None" || showAnimation.effect === "FadeIn" || // eslint-disable-next-line @typescript-eslint/no-explicit-any
        this.isReact && typeof ctrlObj.content != "string")) {
          ctrlObj.tooltipEle.style.display = "none";
        }
        var observeCallback = function(observedArgs) {
          ctrlObj.beforeOpenCallback(observedArgs, target, showAnimation, e);
        };
        ctrlObj.trigger("beforeOpen", ctrlObj.tooltipEventArgs, observeCallback.bind(ctrlObj));
      }
    };
    Tooltip2.prototype.beforeOpenCallback = function(observedArgs, target, showAnimation, e) {
      var _this = this;
      if (observedArgs.cancel) {
        this.isHidden = true;
        this.clear();
        this.mouseMoveBeforeRemove();
        this.restoreElement(target);
      } else {
        var openAnimation_1 = {
          name: showAnimation.effect === "None" && animationMode2 === "Enable" ? "FadeIn" : this.animation.open.effect,
          duration: showAnimation.duration,
          delay: showAnimation.delay,
          timingFunction: "easeOut"
        };
        if (showAnimation.effect === "None") {
          openAnimation_1 = void 0;
        }
        if (this.openDelay > 0) {
          var show = function() {
            if (_this.mouseTrail) {
              EventHandler2.add(target, "mousemove touchstart mouseenter", _this.onMouseMove, _this);
            }
            if (_this.popupObj) {
              _this.popupObj.show(openAnimation_1, target);
              if (_this.mouseMoveEvent && _this.mouseTrail) {
                _this.onMouseMove(_this.mouseMoveEvent);
              }
            }
          };
          this.showTimer = setTimeout(show, this.openDelay);
        } else {
          if (this.popupObj) {
            this.popupObj.show(openAnimation_1, target);
          }
        }
      }
      if (e) {
        this.wireMouseEvents(e, target);
      }
    };
    Tooltip2.prototype.needTemplateReposition = function() {
      var tooltip = this;
      return !isNullOrUndefined2(tooltip.viewContainerRef) && typeof tooltip.viewContainerRef !== "string" || this.isReact;
    };
    Tooltip2.prototype.checkCollision = function(target, x, y) {
      var elePos = {
        left: x,
        top: y,
        position: this.position,
        horizontal: this.tooltipPositionX,
        vertical: this.tooltipPositionY
      };
      var affectedPos = isCollide(this.tooltipEle, this.checkCollideTarget(), x, y);
      if (affectedPos.length > 0) {
        elePos.horizontal = affectedPos.indexOf("left") >= 0 ? "Right" : affectedPos.indexOf("right") >= 0 ? "Left" : this.tooltipPositionX;
        elePos.vertical = affectedPos.indexOf("top") >= 0 ? "Bottom" : affectedPos.indexOf("bottom") >= 0 ? "Top" : this.tooltipPositionY;
      }
      return elePos;
    };
    Tooltip2.prototype.calculateElementPosition = function(pos, offsetPos) {
      return [this.isBodyContainer ? pos.left + offsetPos.left : pos.left - this.containerElement.getBoundingClientRect().left + offsetPos.left + window.pageXOffset + this.containerElement.scrollLeft, this.isBodyContainer ? pos.top + offsetPos.top : pos.top - this.containerElement.getBoundingClientRect().top + offsetPos.top + window.pageYOffset + this.containerElement.scrollTop];
    };
    Tooltip2.prototype.collisionFlipFit = function(target, x, y) {
      var elePos = this.checkCollision(target, x, y);
      var newpos = elePos.position;
      if (this.tooltipPositionY !== elePos.vertical) {
        newpos = this.position.indexOf("Bottom") === 0 || this.position.indexOf("Top") === 0 ? elePos.vertical + this.tooltipPositionX : this.tooltipPositionX + elePos.vertical;
      }
      if (this.tooltipPositionX !== elePos.horizontal) {
        if (newpos.indexOf("Left") === 0) {
          elePos.vertical = newpos === "LeftTop" || newpos === "LeftCenter" ? "Top" : "Bottom";
          newpos = elePos.vertical + "Left";
        }
        if (newpos.indexOf("Right") === 0) {
          elePos.vertical = newpos === "RightTop" || newpos === "RightCenter" ? "Top" : "Bottom";
          newpos = elePos.vertical + "Right";
        }
        elePos.horizontal = this.tooltipPositionX;
      }
      this.tooltipEventArgs = {
        type: null,
        cancel: false,
        target,
        event: null,
        element: this.tooltipEle,
        collidedPosition: newpos
      };
      this.trigger("beforeCollision", this.tooltipEventArgs);
      if (this.tooltipEventArgs.cancel) {
        newpos = this.position;
      } else {
        var elePosVertical = elePos.vertical;
        var elePosHorizontal = elePos.horizontal;
        if (elePos.position !== newpos) {
          var pos = calculatePosition(target, elePosHorizontal, elePosVertical, !this.isBodyContainer, this.isBodyContainer ? null : this.containerElement.getBoundingClientRect());
          this.adjustArrow(target, newpos, elePosHorizontal, elePosVertical);
          var scalingFactors = this.getScalingFactor(target);
          var offsetPos = this.calculateTooltipOffset(newpos, scalingFactors.x, scalingFactors.y);
          offsetPos.top -= this.getOffSetPosition("TopBottom", newpos, this.offsetY);
          offsetPos.left -= this.getOffSetPosition("RightLeft", newpos, this.offsetX);
          elePos.position = newpos;
          var elePosition = this.calculateElementPosition(pos, offsetPos);
          elePos.left = elePosition[0];
          elePos.top = elePosition[1];
        } else {
          this.adjustArrow(target, newpos, elePosHorizontal, elePosVertical);
        }
      }
      var eleOffset = {
        left: elePos.left,
        top: elePos.top
      };
      var position = this.isBodyContainer ? fit(this.tooltipEle, this.checkCollideTarget(), {
        X: true,
        Y: this.windowCollision
      }, eleOffset) : eleOffset;
      this.tooltipEle.style.display = "block";
      var arrowEle = select2("." + ARROW_TIP, this.tooltipEle);
      if (this.showTipPointer && arrowEle != null && (newpos.indexOf("Bottom") === 0 || newpos.indexOf("Top") === 0)) {
        var arrowleft = parseInt(arrowEle.style.left, 10) - (position.left - elePos.left);
        if (arrowleft < 0) {
          arrowleft = 0;
        } else if (arrowleft + arrowEle.offsetWidth > this.tooltipEle.clientWidth) {
          arrowleft = this.tooltipEle.clientWidth - arrowEle.offsetWidth;
        }
        arrowEle.style.left = arrowleft.toString() + "px";
      }
      this.tooltipEle.style.display = "";
      eleOffset.left = position.left;
      eleOffset.top = position.top;
      return eleOffset;
    };
    Tooltip2.prototype.getOffSetPosition = function(positionString, newPos, offsetType) {
      return positionString.indexOf(this.position.split(/(?=[A-Z])/)[0]) !== -1 && positionString.indexOf(newPos.split(/(?=[A-Z])/)[0]) !== -1 ? 2 * offsetType : 0;
    };
    Tooltip2.prototype.checkCollideTarget = function() {
      return !this.windowCollision && this.target ? this.element : null;
    };
    Tooltip2.prototype.hideTooltip = function(hideAnimation, e, targetElement2) {
      var _this = this;
      if (this.closeDelay > 0) {
        clearTimeout(this.hideTimer);
        clearTimeout(this.showTimer);
        var hide = function() {
          if (_this.closeDelay && _this.tooltipEle && _this.isTooltipOpen) {
            return;
          }
          _this.tooltipHide(hideAnimation, e, targetElement2);
        };
        this.hideTimer = setTimeout(hide, this.closeDelay);
      } else {
        this.tooltipHide(hideAnimation, e, targetElement2);
      }
    };
    Tooltip2.prototype.tooltipHide = function(hideAnimation, e, targetElement2) {
      var _this = this;
      var target;
      if (e) {
        target = this.target ? targetElement2 || e.target : this.element;
      } else {
        target = select2('[data-tooltip-id= "' + this.ctrlId + '_content"]', document);
      }
      this.tooltipEventArgs = {
        type: e ? e.type : null,
        cancel: false,
        target,
        event: e ? e : null,
        element: this.tooltipEle,
        isInteracted: !isNullOrUndefined2(e)
      };
      this.trigger("beforeClose", this.tooltipEventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          _this.mouseMoveBeforeRemove();
          _this.popupHide(hideAnimation, target, e);
        } else {
          _this.isHidden = false;
        }
      });
    };
    Tooltip2.prototype.popupHide = function(hideAnimation, target, e) {
      if (target && e) {
        this.restoreElement(target);
      }
      this.isHidden = true;
      var closeAnimation = {
        name: hideAnimation.effect === "None" && animationMode2 === "Enable" ? "FadeOut" : this.animation.close.effect,
        duration: hideAnimation.duration,
        delay: hideAnimation.delay,
        timingFunction: "easeIn"
      };
      if (hideAnimation.effect === "None") {
        closeAnimation = void 0;
      }
      if (this.popupObj) {
        this.popupObj.hide(closeAnimation);
      }
    };
    Tooltip2.prototype.restoreElement = function(target) {
      this.unwireMouseEvents(target);
      if (!isNullOrUndefined2(target.getAttribute("data-content"))) {
        target.setAttribute("title", target.getAttribute("data-content"));
        target.removeAttribute("data-content");
      }
      this.removeDescribedBy(target);
    };
    Tooltip2.prototype.clear = function() {
      var target = this.findTarget();
      if (target) {
        this.restoreElement(target);
      }
      if (this.tooltipEle) {
        removeClass2([this.tooltipEle], POPUP_CLOSE);
        addClass2([this.tooltipEle], POPUP_OPEN);
      }
      if (this.isHidden) {
        if (this.popupObj) {
          this.popupObj.destroy();
        }
        if (this.tooltipEle) {
          remove(this.tooltipEle);
        }
        this.tooltipEle = null;
        this.popupObj = null;
      }
    };
    Tooltip2.prototype.tooltipHover = function() {
      if (this.tooltipEle) {
        this.isTooltipOpen = true;
      }
    };
    Tooltip2.prototype.tooltipMouseOut = function(e) {
      this.isTooltipOpen = false;
      this.hideTooltip(this.animation.close, e, this.findTarget());
    };
    Tooltip2.prototype.onMouseOut = function(e) {
      var enteredElement = e.relatedTarget;
      if (enteredElement && !this.mouseTrail) {
        var checkForTooltipElement = closest2(enteredElement, "." + TOOLTIP_WRAP + "." + POPUP_LIB + "." + POPUP_ROOT2);
        if (checkForTooltipElement) {
          EventHandler2.add(checkForTooltipElement, "mouseleave", this.tooltipElementMouseOut, this);
        } else {
          this.hideTooltip(this.animation.close, e, this.findTarget());
          if (this.closeDelay === 0 && (this.animation.close.effect === "None" || this.isReact && typeof this.content != "string")) {
            this.clear();
          }
        }
      } else {
        this.hideTooltip(this.animation.close, e, this.findTarget());
        this.clear();
      }
      if (this.popupObj && !this.popupObj.element.classList.contains(POPUP_OPEN)) {
        this.clear();
      }
    };
    Tooltip2.prototype.tooltipElementMouseOut = function(e) {
      this.hideTooltip(this.animation.close, e, this.findTarget());
      EventHandler2.remove(this.element, "mouseleave", this.tooltipElementMouseOut);
      this.clear();
    };
    Tooltip2.prototype.onStickyClose = function() {
      this.close();
    };
    Tooltip2.prototype.onMouseMove = function(event2) {
      var eventPageX = 0;
      var eventPageY = 0;
      if (event2.type.indexOf("touch") > -1) {
        event2.preventDefault();
        eventPageX = event2.touches[0].pageX;
        eventPageY = event2.touches[0].pageY;
      } else {
        eventPageX = event2.pageX;
        eventPageY = event2.pageY;
      }
      if (isNullOrUndefined2(this.tooltipEle)) {
        return;
      }
      Animation2.stop(this.tooltipEle);
      removeClass2([this.tooltipEle], POPUP_CLOSE);
      addClass2([this.tooltipEle], POPUP_OPEN);
      this.adjustArrow(event2.target, this.position, this.tooltipPositionX, this.tooltipPositionY);
      var scalingFactors = this.getScalingFactor(event2.target);
      var pos = this.calculateTooltipOffset(this.position, scalingFactors.x, scalingFactors.y);
      var x = eventPageX + pos.left + this.offsetX;
      var y = eventPageY + pos.top + this.offsetY;
      var elePos = this.checkCollision(event2.target, x, y);
      if (this.tooltipPositionX !== elePos.horizontal || this.tooltipPositionY !== elePos.vertical) {
        var newpos = this.position.indexOf("Bottom") === 0 || this.position.indexOf("Top") === 0 ? elePos.vertical + elePos.horizontal : elePos.horizontal + elePos.vertical;
        elePos.position = newpos;
        this.adjustArrow(event2.target, elePos.position, elePos.horizontal, elePos.vertical);
        var colpos = this.calculateTooltipOffset(elePos.position, scalingFactors.x, scalingFactors.y);
        elePos.left = eventPageX + colpos.left - this.offsetX;
        elePos.top = eventPageY + colpos.top - this.offsetY;
      }
      this.tooltipEle.style.left = elePos.left + "px";
      this.tooltipEle.style.top = elePos.top + "px";
    };
    Tooltip2.prototype.keyDown = function(event2) {
      if (this.tooltipEle && event2.keyCode === 27) {
        this.close();
      }
    };
    Tooltip2.prototype.touchEnd = function(e) {
      if (this.tooltipEle && closest2(e.target, "." + ROOT2) === null && !this.isSticky) {
        this.close();
      }
    };
    Tooltip2.prototype.scrollHandler = function(e) {
      if (this.tooltipEle && !this.isSticky) {
        if (!closest2(e.target, "." + TOOLTIP_WRAP + "." + POPUP_LIB + "." + POPUP_ROOT2) && !this.isSticky) {
          this.close();
        }
      }
    };
    Tooltip2.prototype.render = function() {
      this.initialize();
      this.wireEvents(this.opensOn);
      this.renderComplete();
    };
    Tooltip2.prototype.preRender = function() {
      this.tipClass = TIP_BOTTOM;
      this.tooltipPositionX = "Center";
      this.tooltipPositionY = "Top";
      this.isHidden = true;
    };
    Tooltip2.prototype.wireEvents = function(trigger) {
      var triggerList = this.getTriggerList(trigger);
      for (var _i = 0, triggerList_1 = triggerList; _i < triggerList_1.length; _i++) {
        var opensOn = triggerList_1[_i];
        if (opensOn === "Custom") {
          return;
        }
        if (opensOn === "Focus") {
          this.wireFocusEvents();
        }
        if (opensOn === "Click") {
          EventHandler2.add(this.element, Browser2.touchStartEvent, this.targetClick, this);
        }
        if (opensOn === "Hover") {
          if (Browser2.isDevice) {
            this.touchModule = new Touch2(this.element, {
              tapHoldThreshold: TAPHOLD_THRESHOLD,
              tapHold: this.tapHoldHandler.bind(this)
            });
            EventHandler2.add(this.element, Browser2.touchEndEvent, this.touchEndHandler, this);
          } else {
            EventHandler2.add(this.element, "mouseover", this.targetHover, this);
          }
        }
      }
      this.windowResizeBound = this.windowResize.bind(this);
      this.keyDownBound = this.keyDown.bind(this);
      this.touchEndBound = this.touchEnd.bind(this);
      this.scrollWheelBound = this.scrollHandler.bind(this);
      document.addEventListener("wheel", this.scrollWheelBound);
      document.addEventListener("scroll", this.scrollWheelBound);
      document.addEventListener("touchend", this.touchEndBound);
      document.addEventListener("keydown", this.keyDownBound);
      window.addEventListener("resize", this.windowResizeBound);
    };
    Tooltip2.prototype.getTriggerList = function(trigger) {
      if (!trigger) {
        return [];
      }
      if (trigger === "Auto") {
        trigger = Browser2.isDevice ? "Hover" : "Hover Focus";
      }
      return trigger.split(" ");
    };
    Tooltip2.prototype.wireFocusEvents = function() {
      if (!isNullOrUndefined2(this.target)) {
        var targetList = [].slice.call(selectAll2(this.target, this.element));
        this.targetsList = targetList;
        if (!isNullOrUndefined2(this.targetsList) && this.targetsList.length > 0) {
          for (var _i = 0, targetList_2 = targetList; _i < targetList_2.length; _i++) {
            var target = targetList_2[_i];
            EventHandler2.add(target, "focus", this.targetHover, this);
          }
        } else {
          EventHandler2.add(this.element, "focusin", this.targetHover, this);
        }
      } else {
        EventHandler2.add(this.element, "focusin", this.targetHover, this);
      }
    };
    Tooltip2.prototype.wireMouseEvents = function(e, target) {
      if (this.tooltipEle) {
        if (!this.isSticky) {
          if (e.type === "focus") {
            EventHandler2.add(target, "blur", this.onMouseOut, this);
          }
          if (e.type === "focusin") {
            EventHandler2.add(target, "focusout", this.onMouseOut, this);
          }
          if (e.type === "mouseover") {
            EventHandler2.add(target, "mouseleave", this.onMouseOut, this);
          }
          if (this.closeDelay) {
            EventHandler2.add(this.tooltipEle, "mouseenter", this.tooltipHover, this);
            EventHandler2.add(this.tooltipEle, "mouseleave", this.tooltipMouseOut, this);
          }
        }
        if (this.mouseTrail && this.openDelay === 0) {
          EventHandler2.add(target, "mousemove touchstart mouseenter", this.onMouseMove, this);
        }
      }
    };
    Tooltip2.prototype.unwireEvents = function(trigger) {
      var triggerList = this.getTriggerList(trigger);
      for (var _i = 0, triggerList_2 = triggerList; _i < triggerList_2.length; _i++) {
        var opensOn = triggerList_2[_i];
        if (opensOn === "Custom") {
          return;
        }
        if (opensOn === "Focus") {
          this.unwireFocusEvents();
        }
        if (opensOn === "Click") {
          EventHandler2.remove(this.element, Browser2.touchStartEvent, this.targetClick);
        }
        if (opensOn === "Hover") {
          if (Browser2.isDevice) {
            if (this.touchModule) {
              this.touchModule.destroy();
            }
            EventHandler2.remove(this.element, Browser2.touchEndEvent, this.touchEndHandler);
          } else {
            EventHandler2.remove(this.element, "mouseover", this.targetHover);
          }
        }
      }
      document.removeEventListener("touchend", this.touchEndBound);
      this.touchEndBound = null;
      document.removeEventListener("wheel", this.scrollWheelBound);
      document.removeEventListener("scroll", this.scrollWheelBound);
      this.scrollWheelBound = null;
      window.removeEventListener("resize", this.windowResizeBound);
      this.windowResizeBound = null;
      document.removeEventListener("keydown", this.keyDownBound);
      this.keyDownBound = null;
    };
    Tooltip2.prototype.unwireFocusEvents = function() {
      if (!isNullOrUndefined2(this.target)) {
        var targetList = [].slice.call(selectAll2(this.target, this.element));
        if (!isNullOrUndefined2(this.targetsList) && this.targetsList.length > 0) {
          for (var _i = 0, targetList_3 = targetList; _i < targetList_3.length; _i++) {
            var target = targetList_3[_i];
            EventHandler2.remove(target, "focus", this.targetHover);
          }
        } else {
          EventHandler2.remove(this.element, "focusin", this.targetHover);
        }
      } else {
        EventHandler2.remove(this.element, "focusin", this.targetHover);
      }
    };
    Tooltip2.prototype.unwireMouseEvents = function(target) {
      if (!this.isSticky) {
        var triggerList = this.getTriggerList(this.opensOn);
        for (var _i = 0, triggerList_3 = triggerList; _i < triggerList_3.length; _i++) {
          var opensOn = triggerList_3[_i];
          if (opensOn === "Focus") {
            EventHandler2.remove(target, "blur", this.onMouseOut);
            EventHandler2.remove(target, "focusout", this.onMouseOut);
          }
          if (opensOn === "Hover" && !Browser2.isDevice) {
            EventHandler2.remove(target, "mouseleave", this.onMouseOut);
          }
        }
        if (this.closeDelay) {
          EventHandler2.remove(target, "mouseenter", this.tooltipHover);
          EventHandler2.remove(target, "mouseleave", this.tooltipMouseOut);
        }
      }
      if (this.mouseTrail) {
        EventHandler2.remove(target, "mousemove touchstart mouseenter", this.onMouseMove);
      }
    };
    Tooltip2.prototype.findTarget = function() {
      var target = select2('[data-tooltip-id= "' + this.ctrlId + '_content"]', document);
      return target;
    };
    Tooltip2.prototype.getModuleName = function() {
      return "tooltip";
    };
    Tooltip2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Tooltip2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var targetElement2 = this.findTarget();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "width":
            if (this.tooltipEle && targetElement2) {
              this.tooltipEle.style.width = this.tooltipEle.style.maxWidth = formatUnit(newProp.width);
              this.reposition(targetElement2);
            }
            break;
          case "height":
            if (this.tooltipEle && targetElement2) {
              this.tooltipEle.style.height = formatUnit(newProp.height);
              this.reposition(targetElement2);
            }
            break;
          case "content":
            if (this.tooltipEle) {
              this.renderContent();
            }
            break;
          case "opensOn":
            this.unwireEvents(oldProp.opensOn);
            this.wireEvents(newProp.opensOn);
            break;
          case "position":
            this.formatPosition();
            if (this.tooltipEle && targetElement2) {
              var arrowInnerELe = select2("." + ARROW_TIP_INNER, this.tooltipEle);
              if (arrowInnerELe) {
                arrowInnerELe.style.top = arrowInnerELe.style.left = null;
              }
              this.reposition(targetElement2);
            }
            break;
          case "tipPointerPosition":
            if (this.tooltipEle && targetElement2) {
              this.reposition(targetElement2);
            }
            break;
          case "offsetX":
            if (this.tooltipEle) {
              var x = newProp.offsetX - oldProp.offsetX;
              this.tooltipEle.style.left = (parseInt(this.tooltipEle.style.left, 10) + x).toString() + "px";
            }
            break;
          case "offsetY":
            if (this.tooltipEle) {
              var y = newProp.offsetY - oldProp.offsetY;
              this.tooltipEle.style.top = (parseInt(this.tooltipEle.style.top, 10) + y).toString() + "px";
            }
            break;
          case "cssClass":
            if (this.tooltipEle) {
              if (oldProp.cssClass) {
                removeClass2([this.tooltipEle], oldProp.cssClass.split(" "));
              }
              if (newProp.cssClass) {
                addClass2([this.tooltipEle], newProp.cssClass.split(" "));
              }
            }
            break;
          case "enableRtl":
            if (this.tooltipEle) {
              if (this.enableRtl) {
                addClass2([this.tooltipEle], RTL5);
              } else {
                removeClass2([this.tooltipEle], RTL5);
              }
            }
            break;
          case "isSticky":
            if (this.tooltipEle && targetElement2) {
              this.renderCloseIcon();
              this.reposition(targetElement2);
            }
            break;
          case "container":
            if (!isNullOrUndefined2(this.containerElement)) {
              removeClass2([this.containerElement], POPUP_CONTAINER);
            }
            this.container = newProp.container;
            if (this.tooltipEle && targetElement2) {
              this.appendContainer(this);
              this.reposition(targetElement2);
            }
        }
      }
    };
    Tooltip2.prototype.open = function(element2, animation) {
      if (isNullOrUndefined2(animation)) {
        animation = this.animation.open;
      }
      if (isNullOrUndefined2(element2)) {
        element2 = this.element;
      }
      if (element2.style.display === "none") {
        return;
      }
      this.showTooltip(element2, animation);
    };
    Tooltip2.prototype.close = function(animation) {
      if (!animation) {
        animation = this.animation.close;
      }
      this.hideTooltip(animation);
    };
    Tooltip2.prototype.refresh = function(target) {
      if (this.tooltipEle) {
        this.renderContent(target);
      }
      if (this.popupObj && target) {
        this.reposition(target);
      }
      if (!isNullOrUndefined2(this.targetsList) && !isNullOrUndefined2(this.target)) {
        var target_2 = selectAll2(this.target, this.element);
        if (target_2.length !== this.targetsList.length) {
          this.unwireEvents(this.opensOn);
          this.wireEvents(this.opensOn);
        }
      }
    };
    Tooltip2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      if (this.tooltipEle) {
        remove(this.tooltipEle);
      }
      if (this.popupObj) {
        this.popupObj.destroy();
      }
      destroy();
      removeClass2([this.element], ROOT2);
      this.unwireEvents(this.opensOn);
      this.unwireMouseEvents(this.element);
      this.tooltipEle = null;
      this.popupObj = null;
      var currentTarget = selectAll2('[data-tooltip-id= "' + this.ctrlId + '_content"]', this.element);
      for (var _i = 0, currentTarget_1 = currentTarget; _i < currentTarget_1.length; _i++) {
        var target = currentTarget_1[_i];
        this.restoreElement(target);
      }
      this.containerElement = null;
      this.tipClass = null;
      this.tooltipPositionX = null;
      this.tooltipPositionY = null;
      this.ctrlId = null;
      this.tooltipEventArgs = null;
      this.touchModule = null;
      this.mouseMoveEvent = null;
      this.mouseMoveTarget = null;
      this.containerElement = null;
      this.targetsList = null;
    };
    __decorate24([Property2("auto")], Tooltip2.prototype, "width", void 0);
    __decorate24([Property2("auto")], Tooltip2.prototype, "height", void 0);
    __decorate24([Property2()], Tooltip2.prototype, "content", void 0);
    __decorate24([Property2("body")], Tooltip2.prototype, "container", void 0);
    __decorate24([Property2()], Tooltip2.prototype, "target", void 0);
    __decorate24([Property2("TopCenter")], Tooltip2.prototype, "position", void 0);
    __decorate24([Property2(0)], Tooltip2.prototype, "offsetX", void 0);
    __decorate24([Property2(0)], Tooltip2.prototype, "offsetY", void 0);
    __decorate24([Property2(true)], Tooltip2.prototype, "showTipPointer", void 0);
    __decorate24([Property2(true)], Tooltip2.prototype, "enableHtmlParse", void 0);
    __decorate24([Property2(false)], Tooltip2.prototype, "windowCollision", void 0);
    __decorate24([Property2("Auto")], Tooltip2.prototype, "tipPointerPosition", void 0);
    __decorate24([Property2("Auto")], Tooltip2.prototype, "opensOn", void 0);
    __decorate24([Property2(false)], Tooltip2.prototype, "mouseTrail", void 0);
    __decorate24([Property2(false)], Tooltip2.prototype, "isSticky", void 0);
    __decorate24([Complex2({}, Animation3)], Tooltip2.prototype, "animation", void 0);
    __decorate24([Property2(0)], Tooltip2.prototype, "openDelay", void 0);
    __decorate24([Property2(0)], Tooltip2.prototype, "closeDelay", void 0);
    __decorate24([Property2()], Tooltip2.prototype, "cssClass", void 0);
    __decorate24([Property2(true)], Tooltip2.prototype, "enableHtmlSanitizer", void 0);
    __decorate24([Property2("")], Tooltip2.prototype, "htmlAttributes", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "beforeRender", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "beforeOpen", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "afterOpen", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "beforeClose", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "afterClose", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "beforeCollision", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "created", void 0);
    __decorate24([Event3()], Tooltip2.prototype, "destroyed", void 0);
    Tooltip2 = __decorate24([NotifyPropertyChanges2], Tooltip2);
    return Tooltip2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-popups/src/spinner/spinner.js
var globalTimeOut = {};
var DEFT_MAT_WIDTH = 30;
var DEFT_MAT3_WIDTH = 30;
var DEFT_FAB_WIDTH = 30;
var DEFT_FLUENT_WIDTH = 30;
var DEFT_FLUENT2_WIDTH = 30;
var DEFT_BOOT_WIDTH = 30;
var DEFT_BOOT4_WIDTH = 36;
var DEFT_BOOT5_WIDTH = 36;
var CLS_SHOWSPIN = "e-spin-show";
var CLS_HIDESPIN = "e-spin-hide";
var CLS_MATERIALSPIN = "e-spin-material";
var CLS_MATERIAL3SPIN = "e-spin-material3";
var CLS_TAILWIND3SPIN = "e-spin-tailwind3";
var CLS_FABRICSPIN = "e-spin-fabric";
var CLS_FLUENTSPIN = "e-spin-fluent";
var CLS_FLUENT2SPIN = "e-spin-fluent2";
var CLS_TAILWINDSPIN = "e-spin-tailwind";
var CLS_BOOTSPIN = "e-spin-bootstrap";
var CLS_BOOT4SPIN = "e-spin-bootstrap4";
var CLS_BOOT5SPIN = "e-spin-bootstrap5";
var CLS_HIGHCONTRASTSPIN = "e-spin-high-contrast";
var CLS_SPINWRAP = "e-spinner-pane";
var CLS_SPININWRAP = "e-spinner-inner";
var CLS_SPINCIRCLE = "e-path-circle";
var CLS_SPINARC = "e-path-arc";
var CLS_SPINLABEL = "e-spin-label";
var CLS_SPINTEMPLATE = "e-spin-template";
var spinTemplate = null;
var spinCSSClass = null;
function createSpinner(args, internalCreateElement) {
  var _a;
  if (!args.target) {
    return;
  }
  var radius;
  var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
  var container = create_spinner_container(args.target, makeElement);
  if (!isNullOrUndefined2(args.cssClass)) {
    var classNames6 = args.cssClass.split(" ").filter(function(className) {
      return className.trim() !== "";
    });
    (_a = container.wrap.classList).add.apply(_a, classNames6);
  }
  if (!isNullOrUndefined2(args.template) || !isNullOrUndefined2(spinTemplate)) {
    var template = !isNullOrUndefined2(args.template) ? args.template : spinTemplate;
    container.wrap.classList.add(CLS_SPINTEMPLATE);
    replaceContent(container.wrap, template, spinCSSClass);
  } else {
    var theme = !isNullOrUndefined2(args.type) ? args.type : getTheme(container.wrap);
    var width = !isNullOrUndefined2(args.width) ? args.width : void 0;
    radius = calculateRadius(width, theme);
    setTheme(theme, container.wrap, radius, makeElement);
    if (!isNullOrUndefined2(args.label)) {
      createLabel(container.inner_wrap, args.label, makeElement);
    }
  }
  container.wrap.classList.add(CLS_HIDESPIN);
  container = null;
}
function createLabel(container, label, makeElement) {
  var labelEle = makeElement("div", {});
  labelEle.classList.add(CLS_SPINLABEL);
  labelEle.innerHTML = label;
  container.appendChild(labelEle);
  return labelEle;
}
function createMaterialSpinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Material",
    radius
  };
  create_material_element(container, uniqueID4, makeElement, CLS_MATERIALSPIN);
  mat_calculate_attributes(radius, container, "Material", CLS_MATERIALSPIN);
}
function createTailwind3Spinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Tailwind3",
    radius
  };
  create_material_element(container, uniqueID4, makeElement, CLS_TAILWIND3SPIN);
  mat_calculate_attributes(radius, container, "Tailwind3", CLS_TAILWIND3SPIN);
}
function createMaterial3Spinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Material3",
    radius
  };
  create_material_element(container, uniqueID4, makeElement, CLS_MATERIAL3SPIN);
  mat_calculate_attributes(radius, container, "Material3", CLS_MATERIAL3SPIN);
}
function createBootstrap4Spinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Bootstrap4",
    radius
  };
  create_material_element(container, uniqueID4, makeElement, CLS_BOOT4SPIN);
  mat_calculate_attributes(radius, container, "Bootstrap4", CLS_BOOT4SPIN);
}
function createBootstrap5Spinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Bootstrap5",
    radius
  };
  create_material_element(container, uniqueID4, makeElement, CLS_BOOT5SPIN);
  mat_calculate_attributes(radius, container, "Bootstrap5", CLS_BOOT5SPIN);
}
function startMatAnimate(container, uniqueID4, radius) {
  var globalObject = {};
  var timeOutVar = 0;
  globalTimeOut["" + uniqueID4].timeOut = 0;
  globalObject["" + uniqueID4] = globalVariables(uniqueID4, radius, 0, 0);
  var spinnerInfo = {
    uniqueID: uniqueID4,
    container,
    globalInfo: globalObject,
    timeOutVar
  };
  animateMaterial(spinnerInfo);
}
function createFabricSpinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Fabric",
    radius
  };
  create_fabric_element(container, uniqueID4, CLS_FABRICSPIN, makeElement);
  fb_calculate_attributes(radius, container, CLS_FABRICSPIN);
}
function createFluentSpinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Fluent",
    radius
  };
  create_fabric_element(container, uniqueID4, CLS_FLUENTSPIN, makeElement);
  fb_calculate_attributes(radius, container, CLS_FLUENTSPIN);
}
function createFluent2Spinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Fluent2",
    radius
  };
  create_fabric_element(container, uniqueID4, CLS_FLUENT2SPIN, makeElement);
  fb_calculate_attributes(radius, container, CLS_FLUENT2SPIN);
}
function createTailwindSpinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Tailwind",
    radius
  };
  create_fabric_element(container, uniqueID4, CLS_TAILWINDSPIN, makeElement);
  fb_calculate_attributes(radius, container, CLS_TAILWINDSPIN);
}
function createHighContrastSpinner(container, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "HighContrast",
    radius
  };
  create_fabric_element(container, uniqueID4, CLS_HIGHCONTRASTSPIN, makeElement);
  fb_calculate_attributes(radius, container, CLS_HIGHCONTRASTSPIN);
}
function getTheme(container) {
  var theme = window.getComputedStyle(container, ":after").getPropertyValue("content");
  return theme.replace(/['"]+/g, "");
}
function setTheme(theme, container, radius, makeElement) {
  var innerContainer = container.querySelector("." + CLS_SPININWRAP);
  var svg = innerContainer.querySelector("svg");
  if (!isNullOrUndefined2(svg)) {
    innerContainer.removeChild(svg);
  }
  switch (theme) {
    case "Material":
      createMaterialSpinner(innerContainer, radius, makeElement);
      break;
    case "Material3":
      createMaterial3Spinner(innerContainer, radius, makeElement);
      break;
    case "Fabric":
      createFabricSpinner(innerContainer, radius, makeElement);
      break;
    case "Fluent":
      createFluentSpinner(innerContainer, radius, makeElement);
      break;
    case "Fluent2":
      createFluent2Spinner(innerContainer, radius, makeElement);
      break;
    case "Bootstrap":
      createBootstrapSpinner(innerContainer, radius, makeElement);
      break;
    case "HighContrast":
      createHighContrastSpinner(innerContainer, radius, makeElement);
      break;
    case "Bootstrap4":
      createBootstrap4Spinner(innerContainer, radius, makeElement);
      break;
    case "Bootstrap5":
      createBootstrap5Spinner(innerContainer, radius, makeElement);
      break;
    case "Tailwind":
    case "Tailwind-dark":
      createTailwindSpinner(innerContainer, radius, makeElement);
      break;
    case "Tailwind3":
      createTailwind3Spinner(innerContainer, radius, makeElement);
      break;
  }
}
function createBootstrapSpinner(innerContainer, radius, makeElement) {
  var uniqueID4 = random_generator();
  globalTimeOut["" + uniqueID4] = {
    timeOut: 0,
    type: "Bootstrap",
    radius
  };
  create_bootstrap_element(innerContainer, uniqueID4, makeElement);
  boot_calculate_attributes(innerContainer, radius);
}
function create_bootstrap_element(innerContainer, uniqueID4, makeElement) {
  var svgBoot = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  var viewBoxValue = 64;
  var trans = 32;
  var defaultRadius = 2;
  svgBoot.setAttribute("id", uniqueID4);
  svgBoot.setAttribute("class", CLS_BOOTSPIN);
  svgBoot.setAttribute("viewBox", "0 0 " + viewBoxValue + " " + viewBoxValue);
  innerContainer.insertBefore(svgBoot, innerContainer.firstChild);
  for (var item = 0; item <= 7; item++) {
    var bootCircle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    bootCircle.setAttribute("class", CLS_SPINCIRCLE + "_" + item);
    bootCircle.setAttribute("r", defaultRadius + "");
    bootCircle.setAttribute("transform", "translate(" + trans + "," + trans + ")");
    svgBoot.appendChild(bootCircle);
  }
}
function boot_calculate_attributes(innerContainer, radius) {
  var svg = innerContainer.querySelector("svg.e-spin-bootstrap");
  var x = 0;
  var y = 0;
  var rad = 24;
  svg.style.width = svg.style.height = radius + "px";
  var startArc = 90;
  for (var item = 0; item <= 7; item++) {
    var start = defineArcPoints(x, y, rad, startArc);
    var circleEle = svg.querySelector("." + CLS_SPINCIRCLE + "_" + item);
    circleEle.setAttribute("cx", start.x + "");
    circleEle.setAttribute("cy", start.y + "");
    startArc = startArc >= 360 ? 0 : startArc;
    startArc = startArc + 45;
  }
}
function generateSeries(begin, stop) {
  var series = [];
  var start = begin;
  var end = stop;
  var increment = false;
  var count = 1;
  formSeries(start);
  function formSeries(i) {
    series.push(i);
    if (i !== end || count === 1) {
      if (i <= start && i > 1 && !increment) {
        i = parseFloat((i - 0.2).toFixed(2));
      } else if (i === 1) {
        i = 7;
        i = parseFloat((i + 0.2).toFixed(2));
        increment = true;
      } else if (i < 8 && increment) {
        i = parseFloat((i + 0.2).toFixed(2));
        if (i === 8) {
          increment = false;
        }
      } else if (i <= 8 && !increment) {
        i = parseFloat((i - 0.2).toFixed(2));
      }
      ++count;
      formSeries(i);
    }
  }
  return series;
}
function animateBootstrap(innerContainer) {
  var svg = innerContainer.querySelector("svg.e-spin-bootstrap");
  var id = svg.getAttribute("id");
  for (var i = 1; i <= 8; i++) {
    var circleEle = innerContainer.getElementsByClassName("e-path-circle_" + (i === 8 ? 0 : i))[0];
    rotation(circleEle, i, i, generateSeries(i, i), id);
  }
  function rotation(circle, start, end, series, id2) {
    var count = 0;
    boot_animate(start);
    function boot_animate(radius) {
      if (globalTimeOut["" + id2].isAnimate) {
        ++count;
        circle.setAttribute("r", radius + "");
        if (count >= series.length) {
          count = 0;
        }
        globalTimeOut[id2].timeOut = setTimeout(boot_animate.bind(null, series[count]), 18);
      }
    }
  }
}
function replaceContent(container, template, cssClass2) {
  if (!isNullOrUndefined2(cssClass2)) {
    container.classList.add(cssClass2);
  }
  var inner = container.querySelector(".e-spinner-inner");
  inner.innerHTML = template;
}
function calculateRadius(width, theme) {
  var defaultSize;
  switch (theme) {
    case "Material":
      defaultSize = DEFT_MAT_WIDTH;
      break;
    case "Material3":
      defaultSize = DEFT_MAT3_WIDTH;
      break;
    case "Fabric":
      defaultSize = DEFT_FAB_WIDTH;
      break;
    case "Tailwind":
    case "Tailwind-dark":
    case "Tailwind3":
      defaultSize = DEFT_FAB_WIDTH;
      break;
    case "Fluent":
      defaultSize = DEFT_FLUENT_WIDTH;
      break;
    case "Fluent2":
      defaultSize = DEFT_FLUENT2_WIDTH;
      break;
    case "Bootstrap4":
      defaultSize = DEFT_BOOT4_WIDTH;
      break;
    case "Bootstrap5":
      defaultSize = DEFT_BOOT5_WIDTH;
      break;
    default:
      defaultSize = DEFT_BOOT_WIDTH;
  }
  width = width ? parseFloat(width + "") : defaultSize;
  return theme === "Bootstrap" ? width : width / 2;
}
function globalVariables(id, radius, count, previousId) {
  return {
    radius,
    count,
    previousId
  };
}
function random_generator() {
  var random = "";
  var combine = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  for (var i = 0; i < 5; i++) {
    random += combine.charAt(Math.floor(Math.random() * combine.length));
  }
  return random;
}
function create_fabric_element(innerCon, uniqueID4, themeClass, makeElement) {
  var svgFabric = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  svgFabric.setAttribute("id", uniqueID4);
  svgFabric.setAttribute("class", themeClass);
  var fabricCirclePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
  fabricCirclePath.setAttribute("class", CLS_SPINCIRCLE);
  var fabricCircleArc = document.createElementNS("http://www.w3.org/2000/svg", "path");
  fabricCircleArc.setAttribute("class", CLS_SPINARC);
  innerCon.insertBefore(svgFabric, innerCon.firstChild);
  svgFabric.appendChild(fabricCirclePath);
  svgFabric.appendChild(fabricCircleArc);
}
function create_material_element(innerContainer, uniqueID4, makeElement, cls) {
  var svgMaterial = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  var matCirclePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
  svgMaterial.setAttribute("class", cls);
  svgMaterial.setAttribute("id", uniqueID4);
  matCirclePath.setAttribute("class", CLS_SPINCIRCLE);
  innerContainer.insertBefore(svgMaterial, innerContainer.firstChild);
  svgMaterial.appendChild(matCirclePath);
}
function create_spinner_container(target, makeElement) {
  var spinnerContainer = makeElement("div", {});
  var spinnerInnerContainer = makeElement("div", {});
  spinnerContainer.classList.add(CLS_SPINWRAP);
  spinnerInnerContainer.classList.add(CLS_SPININWRAP);
  spinnerInnerContainer.setAttribute("aria-disabled", "true");
  target.appendChild(spinnerContainer);
  spinnerContainer.appendChild(spinnerInnerContainer);
  return {
    wrap: spinnerContainer,
    inner_wrap: spinnerInnerContainer
  };
}
function animateMaterial(spinnerInfo) {
  var start = 1;
  var end = 149;
  var duration = 1333;
  var max = 75;
  createCircle(start, end, easeAnimation, duration, spinnerInfo.globalInfo[spinnerInfo.uniqueID].count, max, spinnerInfo);
  spinnerInfo.globalInfo[spinnerInfo.uniqueID].count = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].count % 4;
}
function createCircle(start, end, easing, duration, count, max, spinnerInfo) {
  var id = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId;
  var startTime = (/* @__PURE__ */ new Date()).getTime();
  var change = end - start;
  var diameter = getSize(spinnerInfo.globalInfo[spinnerInfo.uniqueID].radius * 2 + "");
  var strokeSize = getStrokeSize(diameter);
  var rotate = -90 * (spinnerInfo.globalInfo[spinnerInfo.uniqueID].count || 0);
  mat_animation(spinnerInfo);
  function mat_animation(spinnerInfo2) {
    var currentTime = Math.max(0, Math.min((/* @__PURE__ */ new Date()).getTime() - startTime, duration));
    updatePath(easing(currentTime, start, change, duration), spinnerInfo2.container);
    if (id === spinnerInfo2.globalInfo[spinnerInfo2.uniqueID].previousId && currentTime < duration) {
      globalTimeOut[spinnerInfo2.uniqueID].timeOut = setTimeout(mat_animation.bind(null, spinnerInfo2), 1);
    } else {
      animateMaterial(spinnerInfo2);
    }
  }
  function updatePath(value, container) {
    if (!isNullOrUndefined2(container.querySelector("svg.e-spin-material")) || !isNullOrUndefined2(container.querySelector("svg.e-spin-material3")) || !isNullOrUndefined2(container.querySelector("svg.e-spin-tailwind3"))) {
      var svg = void 0;
      if (!isNullOrUndefined2(container.querySelector("svg.e-spin-material")) && !isNullOrUndefined2(container.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))) {
        svg = container.querySelector("svg.e-spin-material");
      } else if (!isNullOrUndefined2(container.querySelector("svg.e-spin-material3")) && !isNullOrUndefined2(container.querySelector("svg.e-spin-material3").querySelector("path.e-path-circle"))) {
        svg = container.querySelector("svg.e-spin-material3");
      } else if (!isNullOrUndefined2(container.querySelector("svg.e-spin-tailwind3")) && !isNullOrUndefined2(container.querySelector("svg.e-spin-tailwind3").querySelector("path.e-path-circle"))) {
        svg = container.querySelector("svg.e-spin-tailwind3");
      }
      if (!isNullOrUndefined2(svg)) {
        var path = svg.querySelector("path.e-path-circle");
        path.setAttribute("stroke-dashoffset", getDashOffset(diameter, strokeSize, value, max) + "");
        path.setAttribute("transform", "rotate(" + rotate + " " + diameter / 2 + " " + diameter / 2 + ")");
      }
    }
  }
}
function mat_calculate_attributes(radius, container, type, cls) {
  var diameter = radius * 2;
  var svg = container.querySelector("svg." + cls);
  var path = svg.querySelector("path.e-path-circle");
  var strokeSize = getStrokeSize(diameter);
  var transformOrigin = diameter / 2 + "px";
  svg.setAttribute("viewBox", "0 0 " + diameter + " " + diameter);
  svg.style.width = svg.style.height = diameter + "px";
  svg.style.transformOrigin = transformOrigin + " " + transformOrigin + " " + transformOrigin;
  path.setAttribute("d", drawArc(diameter, strokeSize));
  if (type === "Material" || type === "Material3" || type === "Fluent2" || type === "Tailwind3") {
    path.setAttribute("stroke-width", strokeSize + "");
    path.setAttribute("stroke-dasharray", (diameter - strokeSize) * Math.PI * 0.75 + "");
    path.setAttribute("stroke-dashoffset", getDashOffset(diameter, strokeSize, 1, 75) + "");
  }
}
function getSize(value) {
  var parsed = parseFloat(value);
  return parsed;
}
function drawArc(diameter, strokeSize) {
  var radius = diameter / 2;
  var offset = strokeSize / 2;
  return "M" + radius + "," + offset + "A" + (radius - offset) + "," + (radius - offset) + " 0 1 1 " + offset + "," + radius;
}
function getStrokeSize(diameter) {
  return 10 / 100 * diameter;
}
function getDashOffset(diameter, strokeSize, value, max) {
  return (diameter - strokeSize) * Math.PI * (3 * max / 100 - value / 100);
}
function easeAnimation(current, start, change, duration) {
  var timestamp = (current /= duration) * current;
  var timecount = timestamp * current;
  return start + change * (6 * timecount * timestamp + -15 * timestamp * timestamp + 10 * timecount);
}
function fb_calculate_attributes(radius, innerConainer, trgClass) {
  var centerX = radius;
  var centerY = radius;
  var diameter = radius * 2;
  var startArc = 315;
  var endArc = 45;
  var svg = innerConainer.querySelector("." + trgClass);
  var circle = svg.querySelector(".e-path-circle");
  var path = svg.querySelector(".e-path-arc");
  var transformOrigin = diameter / 2 + "px";
  circle.setAttribute("d", defineCircle(centerX, centerY, radius));
  path.setAttribute("d", defineArc(centerX, centerY, radius, startArc, endArc));
  svg.setAttribute("viewBox", "0 0 " + diameter + " " + diameter);
  svg.style.transformOrigin = transformOrigin + " " + transformOrigin + " " + transformOrigin;
  svg.style.width = svg.style.height = diameter + "px";
}
function defineArcPoints(centerX, centerY, radius, angle) {
  var radians = (angle - 90) * Math.PI / 180;
  return {
    x: centerX + radius * Math.cos(radians),
    y: centerY + radius * Math.sin(radians)
  };
}
function defineArc(x, y, radius, startArc, endArc) {
  var start = defineArcPoints(x, y, radius, endArc);
  var end = defineArcPoints(x, y, radius, startArc);
  var d = ["M", start.x, start.y, "A", radius, radius, 0, 0, 0, end.x, end.y].join(" ");
  return d;
}
function defineCircle(x, y, radius) {
  var d = ["M", x, y, "m", -radius, 0, "a", radius, radius, 0, 1, 0, radius * 2, 0, "a", radius, radius, 0, 1, 0, -radius * 2, 0].join(" ");
  return d;
}
function showSpinner(container) {
  showHideSpinner(container, false);
  container = null;
}
function showHideSpinner(container, isHide) {
  var spinnerWrap;
  if (container) {
    if (container.classList.contains(CLS_SPINWRAP)) {
      spinnerWrap = container;
    } else {
      var spinWrapCollection = container.querySelectorAll("." + CLS_SPINWRAP);
      if (Browser2.isIE) {
        for (var i = 0; i < spinWrapCollection.length; i++) {
          if (spinWrapCollection[i].parentElement && spinWrapCollection[i].parentElement === container) {
            spinnerWrap = spinWrapCollection[i];
            break;
          }
        }
      } else {
        spinnerWrap = Array.from(spinWrapCollection).find(function(wrap) {
          return wrap.parentElement === container;
        }) || null;
      }
    }
  }
  if (container && spinnerWrap) {
    var inner = spinnerWrap.querySelector("." + CLS_SPININWRAP);
    var spinCheck = isHide ? !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_HIDESPIN) : !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_SHOWSPIN);
    if (spinCheck) {
      var svgEle = spinnerWrap.querySelector("svg");
      if (isNullOrUndefined2(svgEle)) {
        return;
      }
      var id = svgEle.getAttribute("id");
      globalTimeOut["" + id].isAnimate = !isHide;
      switch (globalTimeOut["" + id].type) {
        case "Material":
        case "Material3":
        case "Tailwind3":
          if (isHide) {
            clearTimeout(globalTimeOut[id].timeOut);
          } else {
            startMatAnimate(inner, id, globalTimeOut[id].radius);
          }
          break;
        case "Bootstrap":
          if (isHide) {
            clearTimeout(globalTimeOut[id].timeOut);
          } else {
            animateBootstrap(inner);
          }
          break;
      }
    }
    if (isHide) {
      classList(spinnerWrap, [CLS_HIDESPIN], [CLS_SHOWSPIN]);
    } else {
      classList(spinnerWrap, [CLS_SHOWSPIN], [CLS_HIDESPIN]);
    }
    container = null;
  }
}
function hideSpinner(container) {
  showHideSpinner(container, true);
  container = null;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-data/src/query.js
var Query = (
  /** @class */
  function() {
    function Query3(from) {
      this.subQuery = null;
      this.isChild = false;
      this.distincts = [];
      this.queries = [];
      this.key = "";
      this.fKey = "";
      if (typeof from === "string") {
        this.fromTable = from;
      } else if (from && from instanceof Array) {
        this.lookups = from;
      }
      this.expands = [];
      this.sortedColumns = [];
      this.groupedColumns = [];
      this.subQuery = null;
      this.isChild = false;
      this.params = [];
      this.lazyLoad = [];
      return this;
    }
    Object.defineProperty(Query3.prototype, "moduleName", {
      /** @hidden */
      get: function() {
        return "query";
      },
      enumerable: true,
      configurable: true
    });
    ;
    Query3.prototype.setKey = function(field) {
      this.key = field;
      return this;
    };
    Query3.prototype.using = function(dataManager) {
      this.dataManager = dataManager;
      return this;
    };
    Query3.prototype.execute = function(dataManager, done, fail, always) {
      dataManager = dataManager || this.dataManager;
      if (dataManager) {
        return dataManager.executeQuery(this, done, fail, always);
      }
      return DataUtil.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument');
    };
    Query3.prototype.executeLocal = function(dataManager) {
      dataManager = dataManager || this.dataManager;
      if (dataManager) {
        return dataManager.executeLocal(this);
      }
      return DataUtil.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument');
    };
    Query3.prototype.clone = function() {
      var cloned = new Query3();
      cloned.queries = this.queries.slice(0);
      cloned.key = this.key;
      cloned.isChild = this.isChild;
      cloned.dataManager = this.dataManager;
      cloned.fromTable = this.fromTable;
      cloned.params = this.params.slice(0);
      cloned.expands = this.expands.slice(0);
      cloned.sortedColumns = this.sortedColumns.slice(0);
      cloned.groupedColumns = this.groupedColumns.slice(0);
      cloned.subQuerySelector = this.subQuerySelector;
      cloned.subQuery = this.subQuery;
      cloned.fKey = this.fKey;
      cloned.isCountRequired = this.isCountRequired;
      cloned.distincts = this.distincts.slice(0);
      cloned.lazyLoad = this.lazyLoad.slice(0);
      return cloned;
    };
    Query3.prototype.from = function(tableName) {
      this.fromTable = tableName;
      return this;
    };
    Query3.prototype.addParams = function(key, value) {
      if (typeof value === "function") {
        this.params.push({
          key,
          fn: value
        });
      } else {
        this.params.push({
          key,
          value
        });
      }
      return this;
    };
    Query3.prototype.distinct = function(fields) {
      if (typeof fields === "string") {
        this.distincts = [].slice.call([fields], 0);
      } else {
        this.distincts = fields.slice(0);
      }
      return this;
    };
    Query3.prototype.expand = function(tables) {
      if (typeof tables === "string") {
        this.expands = [].slice.call([tables], 0);
      } else {
        this.expands = tables.slice(0);
      }
      return this;
    };
    Query3.prototype.where = function(fieldName, operator, value, ignoreCase, ignoreAccent, matchCase) {
      operator = operator ? operator.toLowerCase() : null;
      var predicate = null;
      if (typeof fieldName === "string") {
        predicate = new Predicate(fieldName, operator, value, ignoreCase, ignoreAccent, matchCase);
      } else if (fieldName instanceof Predicate) {
        predicate = fieldName;
      }
      this.queries.push({
        fn: "onWhere",
        e: predicate
      });
      return this;
    };
    Query3.prototype.search = function(searchKey, fieldNames, operator, ignoreCase, ignoreAccent) {
      if (typeof fieldNames === "string") {
        fieldNames = [fieldNames];
      }
      if (!operator || operator === "none") {
        operator = "contains";
      }
      var comparer = DataUtil.fnOperators[operator];
      this.queries.push({
        fn: "onSearch",
        e: {
          fieldNames,
          operator,
          searchKey,
          ignoreCase,
          ignoreAccent,
          comparer
        }
      });
      return this;
    };
    Query3.prototype.sortBy = function(fieldName, comparer, isFromGroup) {
      return this.sortByForeignKey(fieldName, comparer, isFromGroup);
    };
    Query3.prototype.sortByForeignKey = function(fieldName, comparer, isFromGroup, direction) {
      var order = !isNullOrUndefined2(direction) ? direction : "ascending";
      var sorts;
      var temp;
      if (typeof fieldName === "string" && DataUtil.endsWith(fieldName.toLowerCase(), " desc")) {
        fieldName = fieldName.replace(/ desc$/i, "");
        comparer = "descending";
      }
      if (!comparer || typeof comparer === "string") {
        order = comparer ? comparer.toLowerCase() : "ascending";
        comparer = DataUtil.fnSort(comparer);
      }
      if (isFromGroup) {
        sorts = Query3.filterQueries(this.queries, "onSortBy");
        for (var i = 0; i < sorts.length; i++) {
          temp = sorts[i].e.fieldName;
          if (typeof temp === "string") {
            if (temp === fieldName) {
              return this;
            }
          } else if (temp instanceof Array) {
            for (var j = 0; j < temp.length; j++) {
              if (temp[j] === fieldName || fieldName.toLowerCase() === temp[j] + " desc") {
                return this;
              }
            }
          }
        }
      }
      this.queries.push({
        fn: "onSortBy",
        e: {
          fieldName,
          comparer,
          direction: order
        }
      });
      return this;
    };
    Query3.prototype.sortByDesc = function(fieldName) {
      return this.sortBy(fieldName, "descending");
    };
    Query3.prototype.group = function(fieldName, fn, format) {
      this.sortBy(fieldName, null, true);
      this.queries.push({
        fn: "onGroup",
        e: {
          fieldName,
          comparer: fn ? fn : null,
          format: format ? format : null
        }
      });
      return this;
    };
    Query3.prototype.page = function(pageIndex, pageSize) {
      this.queries.push({
        fn: "onPage",
        e: {
          pageIndex,
          pageSize
        }
      });
      return this;
    };
    Query3.prototype.range = function(start, end) {
      this.queries.push({
        fn: "onRange",
        e: {
          start,
          end
        }
      });
      return this;
    };
    Query3.prototype.take = function(nos) {
      this.queries.push({
        fn: "onTake",
        e: {
          nos
        }
      });
      return this;
    };
    Query3.prototype.skip = function(nos) {
      this.queries.push({
        fn: "onSkip",
        e: {
          nos
        }
      });
      return this;
    };
    Query3.prototype.select = function(fieldNames) {
      if (typeof fieldNames === "string") {
        fieldNames = [].slice.call([fieldNames], 0);
      }
      this.queries.push({
        fn: "onSelect",
        e: {
          fieldNames
        }
      });
      return this;
    };
    Query3.prototype.hierarchy = function(query, selectorFn) {
      this.subQuerySelector = selectorFn;
      this.subQuery = query;
      return this;
    };
    Query3.prototype.foreignKey = function(key) {
      this.fKey = key;
      return this;
    };
    Query3.prototype.requiresCount = function() {
      this.isCountRequired = true;
      return this;
    };
    Query3.prototype.aggregate = function(type, field) {
      this.queries.push({
        fn: "onAggregates",
        e: {
          field,
          type
        }
      });
      return this;
    };
    Query3.filterQueries = function(queries, name) {
      return queries.filter(function(q) {
        return q.fn === name;
      });
    };
    Query3.filterQueryLists = function(queries, singles) {
      var filtered = queries.filter(function(q) {
        return singles.indexOf(q.fn) !== -1;
      });
      var res = {};
      for (var i = 0; i < filtered.length; i++) {
        if (!res[filtered[i].fn]) {
          res[filtered[i].fn] = filtered[i].e;
        }
      }
      return res;
    };
    return Query3;
  }()
);
var Predicate = (
  /** @class */
  function() {
    function Predicate3(field, operator, value, ignoreCase, ignoreAccent, matchCase) {
      if (ignoreCase === void 0) {
        ignoreCase = false;
      }
      this.ignoreAccent = false;
      this.isComplex = false;
      if (typeof field === "string") {
        this.field = field;
        this.operator = operator.toLowerCase();
        this.value = value;
        this.matchCase = matchCase;
        this.ignoreCase = ignoreCase;
        this.ignoreAccent = ignoreAccent;
        this.isComplex = false;
        this.comparer = DataUtil.fnOperators.processOperator(this.operator);
      } else if (field instanceof Predicate3 && value instanceof Predicate3 || value instanceof Array) {
        this.isComplex = true;
        this.condition = operator.toLowerCase();
        this.predicates = [field];
        this.matchCase = field.matchCase;
        this.ignoreCase = field.ignoreCase;
        this.ignoreAccent = field.ignoreAccent;
        if (value instanceof Array) {
          [].push.apply(this.predicates, value);
        } else {
          this.predicates.push(value);
        }
      }
      return this;
    }
    Predicate3.and = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "and");
    };
    Predicate3.prototype.and = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "and", ignoreCase, ignoreAccent);
    };
    Predicate3.or = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "or");
    };
    Predicate3.prototype.or = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "or", ignoreCase, ignoreAccent);
    };
    Predicate3.ornot = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "or not");
    };
    Predicate3.prototype.ornot = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "ornot", ignoreCase, ignoreAccent);
    };
    Predicate3.andnot = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "and not");
    };
    Predicate3.prototype.andnot = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "andnot", ignoreCase, ignoreAccent);
    };
    Predicate3.fromJson = function(json) {
      if (json instanceof Array) {
        var res = [];
        for (var i = 0, len = json.length; i < len; i++) {
          res.push(this.fromJSONData(json[i]));
        }
        return res;
      }
      var pred = json;
      return this.fromJSONData(pred);
    };
    Predicate3.prototype.validate = function(record) {
      var predicate = this.predicates ? this.predicates : [];
      var ret;
      var isAnd;
      if (!this.isComplex && this.comparer) {
        if (this.condition && this.condition.indexOf("not") !== -1) {
          this.condition = this.condition.split("not")[0] === "" ? void 0 : this.condition.split("not")[0];
          return !this.comparer.call(this, DataUtil.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);
        } else {
          return this.comparer.call(this, DataUtil.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);
        }
      }
      if (this.condition && this.condition.indexOf("not") !== -1) {
        isAnd = this.condition.indexOf("and") !== -1;
      } else {
        isAnd = this.condition === "and";
      }
      for (var i = 0; i < predicate.length; i++) {
        if (i > 0 && this.condition && this.condition.indexOf("not") !== -1) {
          predicate[i].condition = predicate[i].condition ? predicate[i].condition + "not" : "not";
        }
        ret = predicate[i].validate(record);
        if (isAnd) {
          if (!ret) {
            return false;
          }
        } else {
          if (ret) {
            return true;
          }
        }
      }
      return isAnd;
    };
    Predicate3.prototype.toJson = function() {
      var predicates;
      var p;
      if (this.isComplex) {
        predicates = [];
        p = this.predicates;
        for (var i = 0; i < p.length; i++) {
          predicates.push(p[i].toJson());
        }
      }
      return {
        isComplex: this.isComplex,
        field: this.field,
        operator: this.operator,
        value: this.value,
        ignoreCase: this.ignoreCase,
        ignoreAccent: this.ignoreAccent,
        condition: this.condition,
        predicates,
        matchCase: this.matchCase
      };
    };
    Predicate3.combinePredicates = function(predicates, operator) {
      if (predicates.length === 1) {
        if (!(predicates[0] instanceof Array)) {
          return predicates[0];
        }
        predicates = predicates[0];
      }
      return new Predicate3(predicates[0], operator, predicates.slice(1));
    };
    Predicate3.combine = function(pred, field, operator, value, condition, ignoreCase, ignoreAccent) {
      if (field instanceof Predicate3) {
        return Predicate3[condition](pred, field);
      }
      if (typeof field === "string") {
        return Predicate3[condition](pred, new Predicate3(field, operator, value, ignoreCase, ignoreAccent));
      }
      return DataUtil.throwError("Predicate - " + condition + " : invalid arguments");
    };
    Predicate3.fromJSONData = function(json) {
      var preds = json.predicates || [];
      var len = preds.length;
      var predicates = [];
      var result;
      for (var i = 0; i < len; i++) {
        predicates.push(this.fromJSONData(preds[i]));
      }
      if (!json.isComplex) {
        result = new Predicate3(json.field, json.operator, json.value, json.ignoreCase, json.ignoreAccent);
      } else {
        result = new Predicate3(predicates[0], json.condition, predicates.slice(1));
      }
      return result;
    };
    return Predicate3;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-data/src/util.js
var consts = {
  GroupGuid: "{271bbba0-1ee7}"
};
var DataUtil = (
  /** @class */
  function() {
    function DataUtil3() {
    }
    DataUtil3.getValue = function(value, inst) {
      if (typeof value === "function") {
        return value.call(inst || {});
      }
      return value;
    };
    DataUtil3.endsWith = function(input2, substr) {
      return input2.slice && input2.slice(-substr.length) === substr;
    };
    DataUtil3.notEndsWith = function(input2, substr) {
      return input2.slice && input2.slice(-substr.length) !== substr;
    };
    DataUtil3.startsWith = function(input2, start) {
      return input2.slice(0, start.length) === start;
    };
    DataUtil3.notStartsWith = function(input2, start) {
      return input2.slice(0, start.length) !== start;
    };
    DataUtil3.wildCard = function(input2, pattern) {
      var asteriskSplit;
      var optionalSplit;
      if (pattern.indexOf("[") !== -1) {
        pattern = pattern.split("[").join("[[]");
      }
      if (pattern.indexOf("(") !== -1) {
        pattern = pattern.split("(").join("[(]");
      }
      if (pattern.indexOf(")") !== -1) {
        pattern = pattern.split(")").join("[)]");
      }
      if (pattern.indexOf("\\") !== -1) {
        pattern = pattern.split("\\").join("[\\\\]");
      }
      if (pattern.indexOf("*") !== -1) {
        if (pattern.charAt(0) !== "*") {
          pattern = "^" + pattern;
        }
        if (pattern.charAt(pattern.length - 1) !== "*") {
          pattern = pattern + "$";
        }
        asteriskSplit = pattern.split("*");
        for (var i = 0; i < asteriskSplit.length; i++) {
          if (asteriskSplit[i].indexOf(".") === -1) {
            asteriskSplit[i] = asteriskSplit[i] + ".*";
          } else {
            asteriskSplit[i] = asteriskSplit[i] + "*";
          }
        }
        pattern = asteriskSplit.join("");
      }
      if (pattern.indexOf("%3f") !== -1 || pattern.indexOf("?") !== -1) {
        optionalSplit = pattern.indexOf("%3f") !== -1 ? pattern.split("%3f") : pattern.split("?");
        pattern = optionalSplit.join(".");
      }
      var regexPattern = new RegExp(pattern, "g");
      return regexPattern.test(input2);
    };
    DataUtil3.like = function(input2, pattern) {
      if (pattern.indexOf("%") !== -1) {
        if (pattern.charAt(0) === "%" && pattern.lastIndexOf("%") < 2) {
          pattern = pattern.substring(1, pattern.length);
          return DataUtil3.startsWith(DataUtil3.toLowerCase(input2), DataUtil3.toLowerCase(pattern));
        } else if (pattern.charAt(pattern.length - 1) === "%" && pattern.indexOf("%") > pattern.length - 3) {
          pattern = pattern.substring(0, pattern.length - 1);
          return DataUtil3.endsWith(DataUtil3.toLowerCase(input2), DataUtil3.toLowerCase(pattern));
        } else if (pattern.lastIndexOf("%") !== pattern.indexOf("%") && pattern.lastIndexOf("%") > pattern.indexOf("%") + 1) {
          pattern = pattern.substring(pattern.indexOf("%") + 1, pattern.lastIndexOf("%"));
          return input2.indexOf(pattern) !== -1;
        } else {
          return input2.indexOf(pattern) !== -1;
        }
      } else {
        return false;
      }
    };
    DataUtil3.fnSort = function(order) {
      order = order ? DataUtil3.toLowerCase(order) : "ascending";
      if (order === "ascending") {
        return this.fnAscending;
      }
      return this.fnDescending;
    };
    DataUtil3.fnAscending = function(x, y) {
      if (isNullOrUndefined2(x) && isNullOrUndefined2(y)) {
        return -1;
      }
      if (y === null || y === void 0) {
        return -1;
      }
      if (typeof x === "string") {
        return x.localeCompare(y);
      }
      if (x === null || x === void 0) {
        return 1;
      }
      return x - y;
    };
    DataUtil3.fnDescending = function(x, y) {
      if (isNullOrUndefined2(x) && isNullOrUndefined2(y)) {
        return -1;
      }
      if (y === null || y === void 0) {
        return 1;
      }
      if (typeof x === "string") {
        return x.localeCompare(y) * -1;
      }
      if (x === null || x === void 0) {
        return -1;
      }
      return y - x;
    };
    DataUtil3.extractFields = function(obj, fields) {
      var newObj = {};
      for (var i = 0; i < fields.length; i++) {
        newObj = this.setValue(fields[i], this.getObject(fields[i], obj), newObj);
      }
      return newObj;
    };
    DataUtil3.select = function(jsonArray, fields) {
      var newData = [];
      for (var i = 0; i < jsonArray.length; i++) {
        newData.push(this.extractFields(jsonArray[i], fields));
      }
      return newData;
    };
    DataUtil3.group = function(jsonArray, field, aggregates, level, groupDs, format, isLazyLoad) {
      level = level || 1;
      var jsonData = jsonArray;
      var guid = "GroupGuid";
      if (jsonData.GroupGuid === consts[guid]) {
        var _loop_1 = function(j2) {
          if (!isNullOrUndefined2(groupDs)) {
            var indx = -1;
            var temp = groupDs.filter(function(e) {
              return e.key === jsonData[j2].key;
            });
            indx = groupDs.indexOf(temp[0]);
            jsonData[j2].items = this_1.group(jsonData[j2].items, field, aggregates, jsonData.level + 1, groupDs[indx].items, format, isLazyLoad);
            jsonData[j2].count = groupDs[indx].count;
          } else {
            jsonData[j2].items = this_1.group(jsonData[j2].items, field, aggregates, jsonData.level + 1, null, format, isLazyLoad);
            jsonData[j2].count = jsonData[j2].items.length;
          }
        };
        var this_1 = this;
        for (var j = 0; j < jsonData.length; j++) {
          _loop_1(j);
        }
        jsonData.childLevels += 1;
        return jsonData;
      }
      var grouped = {};
      var groupedArray = [];
      groupedArray.GroupGuid = consts[guid];
      groupedArray.level = level;
      groupedArray.childLevels = 0;
      groupedArray.records = jsonData;
      var _loop_2 = function(i2) {
        var val = this_2.getVal(jsonData, i2, field);
        if (!isNullOrUndefined2(format)) {
          val = format(val, field);
        }
        if (!grouped[val]) {
          grouped[val] = {
            key: val,
            count: 0,
            items: [],
            aggregates: {},
            field
          };
          groupedArray.push(grouped[val]);
          if (!isNullOrUndefined2(groupDs)) {
            var tempObj = groupDs.filter(function(e) {
              return e.key === grouped[val].key;
            });
            grouped[val].count = tempObj[0].count;
          }
        }
        grouped[val].count = !isNullOrUndefined2(groupDs) ? grouped[val].count : grouped[val].count += 1;
        if (!isLazyLoad || isLazyLoad && aggregates.length) {
          grouped[val].items.push(jsonData[i2]);
        }
      };
      var this_2 = this;
      for (var i = 0; i < jsonData.length; i++) {
        _loop_2(i);
      }
      if (aggregates && aggregates.length) {
        var _loop_3 = function(i2) {
          var res = {};
          var fn = void 0;
          var aggs = aggregates;
          for (var j2 = 0; j2 < aggregates.length; j2++) {
            fn = DataUtil3.aggregates[aggregates[j2].type];
            if (!isNullOrUndefined2(groupDs)) {
              var temp = groupDs.filter(function(e) {
                return e.key === groupedArray[i2].key;
              });
              if (fn) {
                res[aggs[j2].field + " - " + aggs[j2].type] = fn(temp[0].items, aggs[j2].field);
              }
            } else {
              if (fn) {
                res[aggs[j2].field + " - " + aggs[j2].type] = fn(groupedArray[i2].items, aggs[j2].field);
              }
            }
          }
          groupedArray[i2].aggregates = res;
        };
        for (var i = 0; i < groupedArray.length; i++) {
          _loop_3(i);
        }
      }
      if (isLazyLoad && groupedArray.length && aggregates.length) {
        for (var i = 0; i < groupedArray.length; i++) {
          groupedArray[i].items = [];
        }
      }
      return jsonData.length && groupedArray || jsonData;
    };
    DataUtil3.buildHierarchy = function(fKey, from, source, lookup, pKey) {
      var i;
      var grp = {};
      var temp;
      if (lookup.result) {
        lookup = lookup.result;
      }
      if (lookup.GroupGuid) {
        this.throwError("DataManager: Do not have support Grouping in hierarchy");
      }
      for (i = 0; i < lookup.length; i++) {
        var fKeyData = this.getObject(fKey, lookup[i]);
        temp = grp[fKeyData] || (grp[fKeyData] = []);
        temp.push(lookup[i]);
      }
      for (i = 0; i < source.length; i++) {
        var fKeyData = this.getObject(pKey || fKey, source[i]);
        source[i][from] = grp[fKeyData];
      }
    };
    DataUtil3.getFieldList = function(obj, fields, prefix) {
      if (prefix === void 0) {
        prefix = "";
      }
      if (fields === void 0 || fields === null) {
        return this.getFieldList(obj, [], prefix);
      }
      var copyObj = obj;
      var keys4 = Object.keys(obj);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var prop = keys_1[_i];
        if (typeof copyObj[prop] === "object" && !(copyObj[prop] instanceof Array)) {
          this.getFieldList(copyObj[prop], fields, prefix + prop + ".");
        } else {
          fields.push(prefix + prop);
        }
      }
      return fields;
    };
    DataUtil3.getObject = function(nameSpace, from) {
      if (!nameSpace) {
        return from;
      }
      if (!from) {
        return void 0;
      }
      if (nameSpace.indexOf(".") === -1) {
        var lowerCaseNameSpace = nameSpace.charAt(0).toLowerCase() + nameSpace.slice(1);
        var upperCaseNameSpace = nameSpace.charAt(0).toUpperCase() + nameSpace.slice(1);
        if (!isNullOrUndefined2(from[nameSpace])) {
          return from[nameSpace];
        } else {
          if (!isNullOrUndefined2(from[lowerCaseNameSpace])) {
            return from[lowerCaseNameSpace];
          } else if (!isNullOrUndefined2(from[upperCaseNameSpace])) {
            return from[upperCaseNameSpace];
          } else {
            return null;
          }
        }
      }
      var value = from;
      var splits = nameSpace.split(".");
      for (var i = 0; i < splits.length; i++) {
        if (value == null) {
          break;
        }
        value = value[splits[i]];
        if (value === void 0) {
          var casing = splits[i].charAt(0).toUpperCase() + splits[i].slice(1);
          value = from[casing] || from[casing.charAt(0).toLowerCase() + casing.slice(1)] || null;
        }
        from = value;
      }
      return value;
    };
    DataUtil3.setValue = function(nameSpace, value, obj) {
      var keys4 = nameSpace.toString().split(".");
      var start = obj || {};
      var fromObj = start;
      var i;
      var length = keys4.length;
      var key;
      for (i = 0; i < length; i++) {
        key = keys4[i];
        if (i + 1 === length) {
          fromObj[key] = value === void 0 ? void 0 : value;
        } else if (isNullOrUndefined2(fromObj[key])) {
          fromObj[key] = {};
        }
        fromObj = fromObj[key];
      }
      return start;
    };
    DataUtil3.sort = function(ds, field, comparer) {
      if (ds.length <= 1) {
        return ds;
      }
      var middle = parseInt((ds.length / 2).toString(), 10);
      var left = ds.slice(0, middle);
      var right = ds.slice(middle);
      left = this.sort(left, field, comparer);
      right = this.sort(right, field, comparer);
      return this.merge(left, right, field, comparer);
    };
    DataUtil3.ignoreDiacritics = function(value) {
      if (typeof value !== "string") {
        return value;
      }
      var result = value.split("");
      var newValue = result.map(function(temp) {
        return temp in DataUtil3.diacritics ? DataUtil3.diacritics[temp] : temp;
      });
      return newValue.join("");
    };
    DataUtil3.merge = function(left, right, fieldName, comparer) {
      var result = [];
      var current;
      while (left.length > 0 || right.length > 0) {
        if (left.length > 0 && right.length > 0) {
          if (comparer) {
            current = comparer(this.getVal(left, 0, fieldName), this.getVal(right, 0, fieldName), left[0], right[0]) <= 0 ? left : right;
          } else {
            current = left[0][fieldName] < left[0][fieldName] ? left : right;
          }
        } else {
          current = left.length > 0 ? left : right;
        }
        result.push(current.shift());
      }
      return result;
    };
    DataUtil3.getVal = function(array, index, field) {
      return field ? this.getObject(field, array[index]) : array[index];
    };
    DataUtil3.toLowerCase = function(val) {
      return val ? typeof val === "string" ? val.toLowerCase() : val.toString() : val === 0 || val === false ? val.toString() : "";
    };
    DataUtil3.callAdaptorFunction = function(adaptor, fnName, param1, param2) {
      if (fnName in adaptor) {
        var res = adaptor[fnName](param1, param2);
        if (!isNullOrUndefined2(res)) {
          param1 = res;
        }
      }
      return param1;
    };
    DataUtil3.getAddParams = function(adp, dm, query) {
      var req = {};
      DataUtil3.callAdaptorFunction(adp, "addParams", {
        dm,
        query,
        params: query ? query.params : [],
        reqParams: req
      });
      return req;
    };
    DataUtil3.isPlainObject = function(obj) {
      return !!obj && obj.constructor === Object;
    };
    DataUtil3.isCors = function() {
      var xhr = null;
      var request = "XMLHttpRequest";
      try {
        xhr = new window[request]();
      } catch (e) {
      }
      return !!xhr && "withCredentials" in xhr;
    };
    DataUtil3.getGuid = function(prefix) {
      var hexs = "0123456789abcdef";
      var rand;
      return (prefix || "") + "00000000-0000-4000-0000-000000000000".replace(/0/g, function(val, i) {
        if ("crypto" in window && "getRandomValues" in crypto) {
          var arr = new Uint8Array(1);
          window.crypto.getRandomValues(arr);
          rand = arr[0] % 16 | 0;
        } else {
          rand = Math.random() * 16 | 0;
        }
        return hexs[i === 19 ? rand & 3 | 8 : rand];
      });
    };
    DataUtil3.isNull = function(val) {
      return val === void 0 || val === null;
    };
    DataUtil3.getItemFromComparer = function(array, field, comparer) {
      var keyVal;
      var current;
      var key;
      var i = 0;
      var castRequired = typeof DataUtil3.getVal(array, 0, field) === "string";
      if (array.length) {
        while (isNullOrUndefined2(keyVal) && i < array.length) {
          keyVal = DataUtil3.getVal(array, i, field);
          key = array[i++];
        }
      }
      for (; i < array.length; i++) {
        current = DataUtil3.getVal(array, i, field);
        if (isNullOrUndefined2(current)) {
          continue;
        }
        if (castRequired) {
          keyVal = +keyVal;
          current = +current;
        }
        if (comparer(keyVal, current) > 0) {
          keyVal = current;
          key = array[i];
        }
      }
      return key;
    };
    DataUtil3.distinct = function(json, fieldName, requiresCompleteRecord) {
      requiresCompleteRecord = isNullOrUndefined2(requiresCompleteRecord) ? false : requiresCompleteRecord;
      var result = [];
      var val;
      var tmp = {};
      json.forEach(function(data, index) {
        val = typeof json[index] === "object" ? DataUtil3.getVal(json, index, fieldName) : json[index];
        if (!(val in tmp)) {
          result.push(!requiresCompleteRecord ? val : json[index]);
          tmp[val] = 1;
        }
      });
      return result;
    };
    DataUtil3.processData = function(dm, records) {
      var query = this.prepareQuery(dm);
      var sampledata = new DataManager(records);
      if (dm.requiresCounts) {
        query.requiresCount();
      }
      var result = sampledata.executeLocal(query);
      var returnValue = {
        result: dm.requiresCounts ? result.result : result,
        count: result.count,
        aggregates: JSON.stringify(result.aggregates)
      };
      return dm.requiresCounts ? returnValue : result;
    };
    DataUtil3.prepareQuery = function(dm) {
      var _this = this;
      var query = new Query();
      if (dm.select) {
        query.select(dm.select);
      }
      if (dm.where) {
        var where = DataUtil3.parse.parseJson(dm.where);
        where.filter(function(pred) {
          if (isNullOrUndefined2(pred.condition)) {
            query.where(pred.field, pred.operator, pred.value, pred.ignoreCase, pred.ignoreAccent);
          } else {
            var predicateList = [];
            if (pred.field) {
              predicateList.push(new Predicate(pred.field, pred.operator, pred.value, pred.ignoreCase, pred.ignoreAccent));
            } else {
              predicateList = predicateList.concat(_this.getPredicate(pred.predicates));
            }
            if (pred.condition === "or") {
              query.where(Predicate.or(predicateList));
            } else if (pred.condition === "and") {
              query.where(Predicate.and(predicateList));
            }
          }
        });
      }
      if (dm.search) {
        var search = DataUtil3.parse.parseJson(dm.search);
        search.filter(function(e) {
          return query.search(
            e.key,
            e.fields,
            e["operator"],
            // tslint:disable-next-line:no-string-literal
            e["ignoreCase"],
            e["ignoreAccent"]
          );
        });
      }
      if (dm.aggregates) {
        dm.aggregates.filter(function(e) {
          return query.aggregate(e.type, e.field);
        });
      }
      if (dm.sorted) {
        dm.sorted.filter(function(e) {
          return query.sortBy(e.name, e.direction);
        });
      }
      if (dm.skip) {
        query.skip(dm.skip);
      }
      if (dm.take) {
        query.take(dm.take);
      }
      if (dm.group) {
        dm.group.filter(function(grp) {
          return query.group(grp);
        });
      }
      return query;
    };
    DataUtil3.getPredicate = function(pred) {
      var mainPred = [];
      for (var i = 0; i < pred.length; i++) {
        var e = pred[i];
        if (e.field) {
          mainPred.push(new Predicate(e.field, e.operator, e.value, e.ignoreCase, e.ignoreAccent));
        } else {
          var childPred = [];
          var cpre = this.getPredicate(e.predicates);
          for (var _i = 0, _a = Object.keys(cpre); _i < _a.length; _i++) {
            var prop = _a[_i];
            childPred.push(cpre[prop]);
          }
          mainPred.push(e.condition === "or" ? Predicate.or(childPred) : Predicate.and(childPred));
        }
      }
      return mainPred;
    };
    DataUtil3.serverTimezoneOffset = null;
    DataUtil3.timeZoneHandling = true;
    DataUtil3.throwError = function(error) {
      try {
        throw new Error(error);
      } catch (e) {
        throw e.message + "\n" + e.stack;
      }
    };
    DataUtil3.aggregates = {
      /**
       * Calculate sum of the given field in the data.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      sum: function(ds, field) {
        var result = 0;
        var val;
        var castRequired = typeof DataUtil3.getVal(ds, 0, field) !== "number";
        for (var i = 0; i < ds.length; i++) {
          val = DataUtil3.getVal(ds, i, field);
          if (!isNaN(val) && val !== null) {
            if (castRequired) {
              val = +val;
            }
            result += val;
          }
        }
        return result;
      },
      /**
       * Calculate average value of the given field in the data.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      average: function(ds, field) {
        return DataUtil3.aggregates.sum(ds, field) / ds.length;
      },
      /**
       * Returns the min value of the data based on the field.
       *
       * @param  {Object[]} ds
       * @param  {string|Function} field
       */
      min: function(ds, field) {
        var comparer;
        if (typeof field === "function") {
          comparer = field;
          field = null;
        }
        return DataUtil3.getObject(field, DataUtil3.getItemFromComparer(ds, field, comparer || DataUtil3.fnAscending));
      },
      /**
       * Returns the max value of the data based on the field.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       * @returns number
       */
      max: function(ds, field) {
        var comparer;
        if (typeof field === "function") {
          comparer = field;
          field = null;
        }
        return DataUtil3.getObject(field, DataUtil3.getItemFromComparer(ds, field, comparer || DataUtil3.fnDescending));
      },
      /**
       * Returns the total number of true value present in the data based on the given boolean field name.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      truecount: function(ds, field) {
        return new DataManager(ds).executeLocal(new Query().where(field, "equal", true, true)).length;
      },
      /**
       * Returns the total number of false value present in the data based on the given boolean field name.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      falsecount: function(ds, field) {
        return new DataManager(ds).executeLocal(new Query().where(field, "equal", false, true)).length;
      },
      /**
       * Returns the length of the given data.
       *
       * @param {Object[]} ds
       * @param {string} field?
       * @param field
       * @returns number
       */
      count: function(ds, field) {
        return ds.length;
      }
    };
    DataUtil3.operatorSymbols = {
      "<": "lessthan",
      ">": "greaterthan",
      "<=": "lessthanorequal",
      ">=": "greaterthanorequal",
      "==": "equal",
      "!=": "notequal",
      "*=": "contains",
      "$=": "endswith",
      "^=": "startswith"
    };
    DataUtil3.odBiOperator = {
      "<": " lt ",
      ">": " gt ",
      "<=": " le ",
      ">=": " ge ",
      "==": " eq ",
      "!=": " ne ",
      "lessthan": " lt ",
      "lessthanorequal": " le ",
      "greaterthan": " gt ",
      "greaterthanorequal": " ge ",
      "equal": " eq ",
      "notequal": " ne "
    };
    DataUtil3.odUniOperator = {
      "$=": "endswith",
      "^=": "startswith",
      "*=": "substringof",
      "endswith": "endswith",
      "startswith": "startswith",
      "contains": "substringof",
      "doesnotendwith": "not endswith",
      "doesnotstartwith": "not startswith",
      "doesnotcontain": "not substringof",
      "wildcard": "wildcard",
      "like": "like"
    };
    DataUtil3.odv4UniOperator = {
      "$=": "endswith",
      "^=": "startswith",
      "*=": "contains",
      "endswith": "endswith",
      "startswith": "startswith",
      "contains": "contains",
      "doesnotendwith": "not endswith",
      "doesnotstartwith": "not startswith",
      "doesnotcontain": "not contains",
      "wildcard": "wildcard",
      "like": "like"
    };
    DataUtil3.diacritics = {
      "Ⓐ": "A",
      "Ａ": "A",
      "À": "A",
      "Á": "A",
      "Â": "A",
      "Ầ": "A",
      "Ấ": "A",
      "Ẫ": "A",
      "Ẩ": "A",
      "Ã": "A",
      "Ā": "A",
      "Ă": "A",
      "Ằ": "A",
      "Ắ": "A",
      "Ẵ": "A",
      "Ẳ": "A",
      "Ȧ": "A",
      "Ǡ": "A",
      "Ä": "A",
      "Ǟ": "A",
      "Ả": "A",
      "Å": "A",
      "Ǻ": "A",
      "Ǎ": "A",
      "Ȁ": "A",
      "Ȃ": "A",
      "Ạ": "A",
      "Ậ": "A",
      "Ặ": "A",
      "Ḁ": "A",
      "Ą": "A",
      "Ⱥ": "A",
      "Ɐ": "A",
      "Ꜳ": "AA",
      "Æ": "AE",
      "Ǽ": "AE",
      "Ǣ": "AE",
      "Ꜵ": "AO",
      "Ꜷ": "AU",
      "Ꜹ": "AV",
      "Ꜻ": "AV",
      "Ꜽ": "AY",
      "Ⓑ": "B",
      "Ｂ": "B",
      "Ḃ": "B",
      "Ḅ": "B",
      "Ḇ": "B",
      "Ƀ": "B",
      "Ƃ": "B",
      "Ɓ": "B",
      "Ⓒ": "C",
      "Ｃ": "C",
      "Ć": "C",
      "Ĉ": "C",
      "Ċ": "C",
      "Č": "C",
      "Ç": "C",
      "Ḉ": "C",
      "Ƈ": "C",
      "Ȼ": "C",
      "Ꜿ": "C",
      "Ⓓ": "D",
      "Ｄ": "D",
      "Ḋ": "D",
      "Ď": "D",
      "Ḍ": "D",
      "Ḑ": "D",
      "Ḓ": "D",
      "Ḏ": "D",
      "Đ": "D",
      "Ƌ": "D",
      "Ɗ": "D",
      "Ɖ": "D",
      "Ꝺ": "D",
      "Ǳ": "DZ",
      "Ǆ": "DZ",
      "ǲ": "Dz",
      "ǅ": "Dz",
      "Ⓔ": "E",
      "Ｅ": "E",
      "È": "E",
      "É": "E",
      "Ê": "E",
      "Ề": "E",
      "Ế": "E",
      "Ễ": "E",
      "Ể": "E",
      "Ẽ": "E",
      "Ē": "E",
      "Ḕ": "E",
      "Ḗ": "E",
      "Ĕ": "E",
      "Ė": "E",
      "Ë": "E",
      "Ẻ": "E",
      "Ě": "E",
      "Ȅ": "E",
      "Ȇ": "E",
      "Ẹ": "E",
      "Ệ": "E",
      "Ȩ": "E",
      "Ḝ": "E",
      "Ę": "E",
      "Ḙ": "E",
      "Ḛ": "E",
      "Ɛ": "E",
      "Ǝ": "E",
      "Ⓕ": "F",
      "Ｆ": "F",
      "Ḟ": "F",
      "Ƒ": "F",
      "Ꝼ": "F",
      "Ⓖ": "G",
      "Ｇ": "G",
      "Ǵ": "G",
      "Ĝ": "G",
      "Ḡ": "G",
      "Ğ": "G",
      "Ġ": "G",
      "Ǧ": "G",
      "Ģ": "G",
      "Ǥ": "G",
      "Ɠ": "G",
      "Ꞡ": "G",
      "Ᵹ": "G",
      "Ꝿ": "G",
      "Ⓗ": "H",
      "Ｈ": "H",
      "Ĥ": "H",
      "Ḣ": "H",
      "Ḧ": "H",
      "Ȟ": "H",
      "Ḥ": "H",
      "Ḩ": "H",
      "Ḫ": "H",
      "Ħ": "H",
      "Ⱨ": "H",
      "Ⱶ": "H",
      "Ɥ": "H",
      "Ⓘ": "I",
      "Ｉ": "I",
      "Ì": "I",
      "Í": "I",
      "Î": "I",
      "Ĩ": "I",
      "Ī": "I",
      "Ĭ": "I",
      "İ": "I",
      "Ï": "I",
      "Ḯ": "I",
      "Ỉ": "I",
      "Ǐ": "I",
      "Ȉ": "I",
      "Ȋ": "I",
      "Ị": "I",
      "Į": "I",
      "Ḭ": "I",
      "Ɨ": "I",
      "Ⓙ": "J",
      "Ｊ": "J",
      "Ĵ": "J",
      "Ɉ": "J",
      "Ⓚ": "K",
      "Ｋ": "K",
      "Ḱ": "K",
      "Ǩ": "K",
      "Ḳ": "K",
      "Ķ": "K",
      "Ḵ": "K",
      "Ƙ": "K",
      "Ⱪ": "K",
      "Ꝁ": "K",
      "Ꝃ": "K",
      "Ꝅ": "K",
      "Ꞣ": "K",
      "Ⓛ": "L",
      "Ｌ": "L",
      "Ŀ": "L",
      "Ĺ": "L",
      "Ľ": "L",
      "Ḷ": "L",
      "Ḹ": "L",
      "Ļ": "L",
      "Ḽ": "L",
      "Ḻ": "L",
      "Ł": "L",
      "Ƚ": "L",
      "Ɫ": "L",
      "Ⱡ": "L",
      "Ꝉ": "L",
      "Ꝇ": "L",
      "Ꞁ": "L",
      "Ǉ": "LJ",
      "ǈ": "Lj",
      "Ⓜ": "M",
      "Ｍ": "M",
      "Ḿ": "M",
      "Ṁ": "M",
      "Ṃ": "M",
      "Ɱ": "M",
      "Ɯ": "M",
      "Ⓝ": "N",
      "Ｎ": "N",
      "Ǹ": "N",
      "Ń": "N",
      "Ñ": "N",
      "Ṅ": "N",
      "Ň": "N",
      "Ṇ": "N",
      "Ņ": "N",
      "Ṋ": "N",
      "Ṉ": "N",
      "Ƞ": "N",
      "Ɲ": "N",
      "Ꞑ": "N",
      "Ꞥ": "N",
      "Ǌ": "NJ",
      "ǋ": "Nj",
      "Ⓞ": "O",
      "Ｏ": "O",
      "Ò": "O",
      "Ó": "O",
      "Ô": "O",
      "Ồ": "O",
      "Ố": "O",
      "Ỗ": "O",
      "Ổ": "O",
      "Õ": "O",
      "Ṍ": "O",
      "Ȭ": "O",
      "Ṏ": "O",
      "Ō": "O",
      "Ṑ": "O",
      "Ṓ": "O",
      "Ŏ": "O",
      "Ȯ": "O",
      "Ȱ": "O",
      "Ö": "O",
      "Ȫ": "O",
      "Ỏ": "O",
      "Ő": "O",
      "Ǒ": "O",
      "Ȍ": "O",
      "Ȏ": "O",
      "Ơ": "O",
      "Ờ": "O",
      "Ớ": "O",
      "Ỡ": "O",
      "Ở": "O",
      "Ợ": "O",
      "Ọ": "O",
      "Ộ": "O",
      "Ǫ": "O",
      "Ǭ": "O",
      "Ø": "O",
      "Ǿ": "O",
      "Ɔ": "O",
      "Ɵ": "O",
      "Ꝋ": "O",
      "Ꝍ": "O",
      "Ƣ": "OI",
      "Ꝏ": "OO",
      "Ȣ": "OU",
      "Ⓟ": "P",
      "Ｐ": "P",
      "Ṕ": "P",
      "Ṗ": "P",
      "Ƥ": "P",
      "Ᵽ": "P",
      "Ꝑ": "P",
      "Ꝓ": "P",
      "Ꝕ": "P",
      "Ⓠ": "Q",
      "Ｑ": "Q",
      "Ꝗ": "Q",
      "Ꝙ": "Q",
      "Ɋ": "Q",
      "Ⓡ": "R",
      "Ｒ": "R",
      "Ŕ": "R",
      "Ṙ": "R",
      "Ř": "R",
      "Ȑ": "R",
      "Ȓ": "R",
      "Ṛ": "R",
      "Ṝ": "R",
      "Ŗ": "R",
      "Ṟ": "R",
      "Ɍ": "R",
      "Ɽ": "R",
      "Ꝛ": "R",
      "Ꞧ": "R",
      "Ꞃ": "R",
      "Ⓢ": "S",
      "Ｓ": "S",
      "ẞ": "S",
      "Ś": "S",
      "Ṥ": "S",
      "Ŝ": "S",
      "Ṡ": "S",
      "Š": "S",
      "Ṧ": "S",
      "Ṣ": "S",
      "Ṩ": "S",
      "Ș": "S",
      "Ş": "S",
      "Ȿ": "S",
      "Ꞩ": "S",
      "Ꞅ": "S",
      "Ⓣ": "T",
      "Ｔ": "T",
      "Ṫ": "T",
      "Ť": "T",
      "Ṭ": "T",
      "Ț": "T",
      "Ţ": "T",
      "Ṱ": "T",
      "Ṯ": "T",
      "Ŧ": "T",
      "Ƭ": "T",
      "Ʈ": "T",
      "Ⱦ": "T",
      "Ꞇ": "T",
      "Ꜩ": "TZ",
      "Ⓤ": "U",
      "Ｕ": "U",
      "Ù": "U",
      "Ú": "U",
      "Û": "U",
      "Ũ": "U",
      "Ṹ": "U",
      "Ū": "U",
      "Ṻ": "U",
      "Ŭ": "U",
      "Ü": "U",
      "Ǜ": "U",
      "Ǘ": "U",
      "Ǖ": "U",
      "Ǚ": "U",
      "Ủ": "U",
      "Ů": "U",
      "Ű": "U",
      "Ǔ": "U",
      "Ȕ": "U",
      "Ȗ": "U",
      "Ư": "U",
      "Ừ": "U",
      "Ứ": "U",
      "Ữ": "U",
      "Ử": "U",
      "Ự": "U",
      "Ụ": "U",
      "Ṳ": "U",
      "Ų": "U",
      "Ṷ": "U",
      "Ṵ": "U",
      "Ʉ": "U",
      "Ⓥ": "V",
      "Ｖ": "V",
      "Ṽ": "V",
      "Ṿ": "V",
      "Ʋ": "V",
      "Ꝟ": "V",
      "Ʌ": "V",
      "Ꝡ": "VY",
      "Ⓦ": "W",
      "Ｗ": "W",
      "Ẁ": "W",
      "Ẃ": "W",
      "Ŵ": "W",
      "Ẇ": "W",
      "Ẅ": "W",
      "Ẉ": "W",
      "Ⱳ": "W",
      "Ⓧ": "X",
      "Ｘ": "X",
      "Ẋ": "X",
      "Ẍ": "X",
      "Ⓨ": "Y",
      "Ｙ": "Y",
      "Ỳ": "Y",
      "Ý": "Y",
      "Ŷ": "Y",
      "Ỹ": "Y",
      "Ȳ": "Y",
      "Ẏ": "Y",
      "Ÿ": "Y",
      "Ỷ": "Y",
      "Ỵ": "Y",
      "Ƴ": "Y",
      "Ɏ": "Y",
      "Ỿ": "Y",
      "Ⓩ": "Z",
      "Ｚ": "Z",
      "Ź": "Z",
      "Ẑ": "Z",
      "Ż": "Z",
      "Ž": "Z",
      "Ẓ": "Z",
      "Ẕ": "Z",
      "Ƶ": "Z",
      "Ȥ": "Z",
      "Ɀ": "Z",
      "Ⱬ": "Z",
      "Ꝣ": "Z",
      "ⓐ": "a",
      "ａ": "a",
      "ẚ": "a",
      "à": "a",
      "á": "a",
      "â": "a",
      "ầ": "a",
      "ấ": "a",
      "ẫ": "a",
      "ẩ": "a",
      "ã": "a",
      "ā": "a",
      "ă": "a",
      "ằ": "a",
      "ắ": "a",
      "ẵ": "a",
      "ẳ": "a",
      "ȧ": "a",
      "ǡ": "a",
      "ä": "a",
      "ǟ": "a",
      "ả": "a",
      "å": "a",
      "ǻ": "a",
      "ǎ": "a",
      "ȁ": "a",
      "ȃ": "a",
      "ạ": "a",
      "ậ": "a",
      "ặ": "a",
      "ḁ": "a",
      "ą": "a",
      "ⱥ": "a",
      "ɐ": "a",
      "ꜳ": "aa",
      "æ": "ae",
      "ǽ": "ae",
      "ǣ": "ae",
      "ꜵ": "ao",
      "ꜷ": "au",
      "ꜹ": "av",
      "ꜻ": "av",
      "ꜽ": "ay",
      "ⓑ": "b",
      "ｂ": "b",
      "ḃ": "b",
      "ḅ": "b",
      "ḇ": "b",
      "ƀ": "b",
      "ƃ": "b",
      "ɓ": "b",
      "ⓒ": "c",
      "ｃ": "c",
      "ć": "c",
      "ĉ": "c",
      "ċ": "c",
      "č": "c",
      "ç": "c",
      "ḉ": "c",
      "ƈ": "c",
      "ȼ": "c",
      "ꜿ": "c",
      "ↄ": "c",
      "ⓓ": "d",
      "ｄ": "d",
      "ḋ": "d",
      "ď": "d",
      "ḍ": "d",
      "ḑ": "d",
      "ḓ": "d",
      "ḏ": "d",
      "đ": "d",
      "ƌ": "d",
      "ɖ": "d",
      "ɗ": "d",
      "ꝺ": "d",
      "ǳ": "dz",
      "ǆ": "dz",
      "ⓔ": "e",
      "ｅ": "e",
      "è": "e",
      "é": "e",
      "ê": "e",
      "ề": "e",
      "ế": "e",
      "ễ": "e",
      "ể": "e",
      "ẽ": "e",
      "ē": "e",
      "ḕ": "e",
      "ḗ": "e",
      "ĕ": "e",
      "ė": "e",
      "ë": "e",
      "ẻ": "e",
      "ě": "e",
      "ȅ": "e",
      "ȇ": "e",
      "ẹ": "e",
      "ệ": "e",
      "ȩ": "e",
      "ḝ": "e",
      "ę": "e",
      "ḙ": "e",
      "ḛ": "e",
      "ɇ": "e",
      "ɛ": "e",
      "ǝ": "e",
      "ⓕ": "f",
      "ｆ": "f",
      "ḟ": "f",
      "ƒ": "f",
      "ꝼ": "f",
      "ⓖ": "g",
      "ｇ": "g",
      "ǵ": "g",
      "ĝ": "g",
      "ḡ": "g",
      "ğ": "g",
      "ġ": "g",
      "ǧ": "g",
      "ģ": "g",
      "ǥ": "g",
      "ɠ": "g",
      "ꞡ": "g",
      "ᵹ": "g",
      "ꝿ": "g",
      "ⓗ": "h",
      "ｈ": "h",
      "ĥ": "h",
      "ḣ": "h",
      "ḧ": "h",
      "ȟ": "h",
      "ḥ": "h",
      "ḩ": "h",
      "ḫ": "h",
      "ẖ": "h",
      "ħ": "h",
      "ⱨ": "h",
      "ⱶ": "h",
      "ɥ": "h",
      "ƕ": "hv",
      "ⓘ": "i",
      "ｉ": "i",
      "ì": "i",
      "í": "i",
      "î": "i",
      "ĩ": "i",
      "ī": "i",
      "ĭ": "i",
      "ï": "i",
      "ḯ": "i",
      "ỉ": "i",
      "ǐ": "i",
      "ȉ": "i",
      "ȋ": "i",
      "ị": "i",
      "į": "i",
      "ḭ": "i",
      "ɨ": "i",
      "ı": "i",
      "ⓙ": "j",
      "ｊ": "j",
      "ĵ": "j",
      "ǰ": "j",
      "ɉ": "j",
      "ⓚ": "k",
      "ｋ": "k",
      "ḱ": "k",
      "ǩ": "k",
      "ḳ": "k",
      "ķ": "k",
      "ḵ": "k",
      "ƙ": "k",
      "ⱪ": "k",
      "ꝁ": "k",
      "ꝃ": "k",
      "ꝅ": "k",
      "ꞣ": "k",
      "ⓛ": "l",
      "ｌ": "l",
      "ŀ": "l",
      "ĺ": "l",
      "ľ": "l",
      "ḷ": "l",
      "ḹ": "l",
      "ļ": "l",
      "ḽ": "l",
      "ḻ": "l",
      "ſ": "l",
      "ł": "l",
      "ƚ": "l",
      "ɫ": "l",
      "ⱡ": "l",
      "ꝉ": "l",
      "ꞁ": "l",
      "ꝇ": "l",
      "ǉ": "lj",
      "ⓜ": "m",
      "ｍ": "m",
      "ḿ": "m",
      "ṁ": "m",
      "ṃ": "m",
      "ɱ": "m",
      "ɯ": "m",
      "ⓝ": "n",
      "ｎ": "n",
      "ǹ": "n",
      "ń": "n",
      "ñ": "n",
      "ṅ": "n",
      "ň": "n",
      "ṇ": "n",
      "ņ": "n",
      "ṋ": "n",
      "ṉ": "n",
      "ƞ": "n",
      "ɲ": "n",
      "ŉ": "n",
      "ꞑ": "n",
      "ꞥ": "n",
      "ǌ": "nj",
      "ⓞ": "o",
      "ｏ": "o",
      "ò": "o",
      "ó": "o",
      "ô": "o",
      "ồ": "o",
      "ố": "o",
      "ỗ": "o",
      "ổ": "o",
      "õ": "o",
      "ṍ": "o",
      "ȭ": "o",
      "ṏ": "o",
      "ō": "o",
      "ṑ": "o",
      "ṓ": "o",
      "ŏ": "o",
      "ȯ": "o",
      "ȱ": "o",
      "ö": "o",
      "ȫ": "o",
      "ỏ": "o",
      "ő": "o",
      "ǒ": "o",
      "ȍ": "o",
      "ȏ": "o",
      "ơ": "o",
      "ờ": "o",
      "ớ": "o",
      "ỡ": "o",
      "ở": "o",
      "ợ": "o",
      "ọ": "o",
      "ộ": "o",
      "ǫ": "o",
      "ǭ": "o",
      "ø": "o",
      "ǿ": "o",
      "ɔ": "o",
      "ꝋ": "o",
      "ꝍ": "o",
      "ɵ": "o",
      "ƣ": "oi",
      "ȣ": "ou",
      "ꝏ": "oo",
      "ⓟ": "p",
      "ｐ": "p",
      "ṕ": "p",
      "ṗ": "p",
      "ƥ": "p",
      "ᵽ": "p",
      "ꝑ": "p",
      "ꝓ": "p",
      "ꝕ": "p",
      "ⓠ": "q",
      "ｑ": "q",
      "ɋ": "q",
      "ꝗ": "q",
      "ꝙ": "q",
      "ⓡ": "r",
      "ｒ": "r",
      "ŕ": "r",
      "ṙ": "r",
      "ř": "r",
      "ȑ": "r",
      "ȓ": "r",
      "ṛ": "r",
      "ṝ": "r",
      "ŗ": "r",
      "ṟ": "r",
      "ɍ": "r",
      "ɽ": "r",
      "ꝛ": "r",
      "ꞧ": "r",
      "ꞃ": "r",
      "ⓢ": "s",
      "ｓ": "s",
      "ß": "s",
      "ś": "s",
      "ṥ": "s",
      "ŝ": "s",
      "ṡ": "s",
      "š": "s",
      "ṧ": "s",
      "ṣ": "s",
      "ṩ": "s",
      "ș": "s",
      "ş": "s",
      "ȿ": "s",
      "ꞩ": "s",
      "ꞅ": "s",
      "ẛ": "s",
      "ⓣ": "t",
      "ｔ": "t",
      "ṫ": "t",
      "ẗ": "t",
      "ť": "t",
      "ṭ": "t",
      "ț": "t",
      "ţ": "t",
      "ṱ": "t",
      "ṯ": "t",
      "ŧ": "t",
      "ƭ": "t",
      "ʈ": "t",
      "ⱦ": "t",
      "ꞇ": "t",
      "ꜩ": "tz",
      "ⓤ": "u",
      "ｕ": "u",
      "ù": "u",
      "ú": "u",
      "û": "u",
      "ũ": "u",
      "ṹ": "u",
      "ū": "u",
      "ṻ": "u",
      "ŭ": "u",
      "ü": "u",
      "ǜ": "u",
      "ǘ": "u",
      "ǖ": "u",
      "ǚ": "u",
      "ủ": "u",
      "ů": "u",
      "ű": "u",
      "ǔ": "u",
      "ȕ": "u",
      "ȗ": "u",
      "ư": "u",
      "ừ": "u",
      "ứ": "u",
      "ữ": "u",
      "ử": "u",
      "ự": "u",
      "ụ": "u",
      "ṳ": "u",
      "ų": "u",
      "ṷ": "u",
      "ṵ": "u",
      "ʉ": "u",
      "ⓥ": "v",
      "ｖ": "v",
      "ṽ": "v",
      "ṿ": "v",
      "ʋ": "v",
      "ꝟ": "v",
      "ʌ": "v",
      "ꝡ": "vy",
      "ⓦ": "w",
      "ｗ": "w",
      "ẁ": "w",
      "ẃ": "w",
      "ŵ": "w",
      "ẇ": "w",
      "ẅ": "w",
      "ẘ": "w",
      "ẉ": "w",
      "ⱳ": "w",
      "ⓧ": "x",
      "ｘ": "x",
      "ẋ": "x",
      "ẍ": "x",
      "ⓨ": "y",
      "ｙ": "y",
      "ỳ": "y",
      "ý": "y",
      "ŷ": "y",
      "ỹ": "y",
      "ȳ": "y",
      "ẏ": "y",
      "ÿ": "y",
      "ỷ": "y",
      "ẙ": "y",
      "ỵ": "y",
      "ƴ": "y",
      "ɏ": "y",
      "ỿ": "y",
      "ⓩ": "z",
      "ｚ": "z",
      "ź": "z",
      "ẑ": "z",
      "ż": "z",
      "ž": "z",
      "ẓ": "z",
      "ẕ": "z",
      "ƶ": "z",
      "ȥ": "z",
      "ɀ": "z",
      "ⱬ": "z",
      "ꝣ": "z",
      "Ά": "Α",
      "Έ": "Ε",
      "Ή": "Η",
      "Ί": "Ι",
      "Ϊ": "Ι",
      "Ό": "Ο",
      "Ύ": "Υ",
      "Ϋ": "Υ",
      "Ώ": "Ω",
      "ά": "α",
      "έ": "ε",
      "ή": "η",
      "ί": "ι",
      "ϊ": "ι",
      "ΐ": "ι",
      "ό": "ο",
      "ύ": "υ",
      "ϋ": "υ",
      "ΰ": "υ",
      "ω": "ω",
      "ς": "σ"
    };
    DataUtil3.fnOperators = {
      /**
       * Returns true when the actual input is equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param {boolean} ignoreAccent?
       * @param ignoreCase
       * @param ignoreAccent
       */
      equal: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) === DataUtil3.toLowerCase(expected);
        }
        return actual === expected;
      },
      /**
       * Returns true when the actual input is not equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      notequal: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        return !DataUtil3.fnOperators.equal(actual, expected, ignoreCase);
      },
      /**
       * Returns true when the actual input is less than to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      lessthan: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) < DataUtil3.toLowerCase(expected);
        }
        if (isNullOrUndefined2(actual)) {
          actual = void 0;
        }
        return actual < expected;
      },
      /**
       * Returns true when the actual input is greater than to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      greaterthan: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) > DataUtil3.toLowerCase(expected);
        }
        return actual > expected;
      },
      /**
       * Returns true when the actual input is less than or equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      lessthanorequal: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) <= DataUtil3.toLowerCase(expected);
        }
        if (isNullOrUndefined2(actual)) {
          actual = void 0;
        }
        return actual <= expected;
      },
      /**
       * Returns true when the actual input is greater than or equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      greaterthanorequal: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) >= DataUtil3.toLowerCase(expected);
        }
        return actual >= expected;
      },
      /**
       * Returns true when the actual input contains the given string.
       *
       * @param {string|number} actual
       * @param {string|number} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      contains: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return !isNullOrUndefined2(actual) && !isNullOrUndefined2(expected) && DataUtil3.toLowerCase(actual).indexOf(DataUtil3.toLowerCase(expected)) !== -1;
        }
        return !isNullOrUndefined2(actual) && !isNullOrUndefined2(expected) && actual.toString().indexOf(expected) !== -1;
      },
      /**
       * Returns true when the actual input not contains the given string.
       *
       * @param  {string|number} actual
       * @param  {string|number} expected
       * @param  {boolean} ignoreCase?
       */
      doesnotcontain: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return !isNullOrUndefined2(actual) && !isNullOrUndefined2(expected) && DataUtil3.toLowerCase(actual).indexOf(DataUtil3.toLowerCase(expected)) === -1;
        }
        return !isNullOrUndefined2(actual) && !isNullOrUndefined2(expected) && actual.toString().indexOf(expected) === -1;
      },
      /**
       * Returns true when the given input value is not null.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isnotnull: function(actual) {
        return actual !== null && actual !== void 0;
      },
      /**
       * Returns true when the given input value is null.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isnull: function(actual) {
        return actual === null || actual === void 0;
      },
      /**
       * Returns true when the actual input starts with the given string
       *
       * @param {string} actual
       * @param {string} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      startswith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.startsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.startsWith(actual, expected);
      },
      /**
       * Returns true when the actual input not starts with the given string
       *
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      doesnotstartwith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.notStartsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.notStartsWith(actual, expected);
      },
      /**
       * Returns true when the actual input like with the given string.
       *
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      like: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.like(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.like(actual, expected);
      },
      /**
       * Returns true when the given input value is empty.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isempty: function(actual) {
        return actual === void 0 || actual === "";
      },
      /**
       * Returns true when the given input value is not empty.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isnotempty: function(actual) {
        return actual !== void 0 && actual !== "";
      },
      /**
       * Returns true when the actual input pattern(wildcard) matches with the given string.
       *
       * @param  {string|Date} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      wildcard: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return (actual || typeof actual === "boolean") && expected && typeof actual !== "object" && DataUtil3.wildCard(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return (actual || typeof actual === "boolean") && expected && DataUtil3.wildCard(actual, expected);
      },
      /**
       * Returns true when the actual input ends with the given string.
       *
       * @param {string} actual
       * @param {string} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      endswith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.endsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.endsWith(actual, expected);
      },
      /**
       * Returns true when the actual input not ends with the given string.
       *
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      doesnotendwith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.notEndsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.notEndsWith(actual, expected);
      },
      /**
       * It will return the filter operator based on the filter symbol.
       *
       * @param  {string} operator
       * @hidden
       */
      processSymbols: function(operator) {
        var fnName = DataUtil3.operatorSymbols[operator];
        if (fnName) {
          var fn = DataUtil3.fnOperators[fnName];
          return fn;
        }
        return DataUtil3.throwError("Query - Process Operator : Invalid operator");
      },
      /**
       * It will return the valid filter operator based on the specified operators.
       *
       * @param  {string} operator
       * @hidden
       */
      processOperator: function(operator) {
        var fn = DataUtil3.fnOperators[operator];
        if (fn) {
          return fn;
        }
        return DataUtil3.fnOperators.processSymbols(operator);
      }
    };
    DataUtil3.parse = {
      /**
       * Parse the given string to the plain JavaScript object.
       *
       * @param  {string|Object|Object[]} jsonText
       */
      parseJson: function(jsonText) {
        if (typeof jsonText === "string" && (/^[\s]*\[|^[\s]*\{(.)+:/g.test(jsonText) || jsonText.indexOf('"') === -1)) {
          jsonText = JSON.parse(jsonText, DataUtil3.parse.jsonReviver);
        } else if (jsonText instanceof Array) {
          DataUtil3.parse.iterateAndReviveArray(jsonText);
        } else if (typeof jsonText === "object" && jsonText !== null) {
          DataUtil3.parse.iterateAndReviveJson(jsonText);
        }
        return jsonText;
      },
      /**
       * It will perform on array of values.
       *
       * @param  {string[]|Object[]} array
       * @hidden
       */
      iterateAndReviveArray: function(array) {
        for (var i = 0; i < array.length; i++) {
          if (typeof array[i] === "object" && array[i] !== null) {
            DataUtil3.parse.iterateAndReviveJson(array[i]);
          } else if (typeof array[i] === "string" && (!/^[\s]*\[|^[\s]*\{(.)+:|\"/g.test(array[i]) || array[i].toString().indexOf('"') === -1)) {
            array[i] = DataUtil3.parse.jsonReviver("", array[i]);
          } else {
            array[i] = DataUtil3.parse.parseJson(array[i]);
          }
        }
      },
      /**
       * It will perform on JSON values
       *
       * @param  {JSON} json
       * @hidden
       */
      iterateAndReviveJson: function(json) {
        var value;
        var keys4 = Object.keys(json);
        for (var _i = 0, keys_2 = keys4; _i < keys_2.length; _i++) {
          var prop = keys_2[_i];
          if (DataUtil3.startsWith(prop, "__")) {
            continue;
          }
          value = json[prop];
          if (typeof value === "object") {
            if (value instanceof Array) {
              DataUtil3.parse.iterateAndReviveArray(value);
            } else if (value) {
              DataUtil3.parse.iterateAndReviveJson(value);
            }
          } else {
            json[prop] = DataUtil3.parse.jsonReviver(json[prop], value);
          }
        }
      },
      /**
       * It will perform on JSON values
       *
       * @param  {string} field
       * @param  {string|Date} value
       * @hidden
       */
      jsonReviver: function(field, value) {
        if (typeof value === "string") {
          var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
          var offSet = DataUtil3.timeZoneHandling ? DataUtil3.serverTimezoneOffset : null;
          if (ms) {
            return DataUtil3.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), offSet, true);
          } else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
            var isUTC = value.indexOf("Z") > -1 || value.indexOf("z") > -1;
            var arr = value.split(/[^0-9.]/);
            if (isUTC) {
              if (arr[5].indexOf(".") > -1) {
                var secondsMs = arr[5].split(".");
                arr[5] = secondsMs[0];
                arr[6] = new Date(value).getUTCMilliseconds().toString();
              } else {
                arr[6] = "00";
              }
              value = DataUtil3.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5] ? arr[5] : "00", 10), parseInt(arr[6], 10)), DataUtil3.serverTimezoneOffset, false);
            } else {
              var utcFormat = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5] ? arr[5] : "00", 10));
              var hrs = parseInt(arr[6], 10);
              var mins = parseInt(arr[7], 10);
              if (isNaN(hrs) && isNaN(mins)) {
                return utcFormat;
              }
              if (value.indexOf("+") > -1) {
                utcFormat.setHours(utcFormat.getHours() - hrs, utcFormat.getMinutes() - mins);
              } else {
                utcFormat.setHours(utcFormat.getHours() + hrs, utcFormat.getMinutes() + mins);
              }
              value = DataUtil3.dateParse.toTimeZone(utcFormat, DataUtil3.serverTimezoneOffset, false);
            }
            if (DataUtil3.serverTimezoneOffset == null) {
              value = DataUtil3.dateParse.addSelfOffset(value);
            }
          }
        }
        return value;
      },
      /**
       * Check wheather the given value is JSON or not.
       *
       * @param  {Object[]} jsonData
       */
      isJson: function(jsonData) {
        if (typeof jsonData[0] === "string") {
          return jsonData;
        }
        return DataUtil3.parse.parseJson(jsonData);
      },
      /**
       * Checks wheather the given value is GUID or not.
       *
       * @param  {string} value
       */
      isGuid: function(value) {
        var regex2 = /[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i;
        var match = regex2.exec(value);
        return match != null;
      },
      /**
       * The method used to replace the value based on the type.
       *
       * @param  {Object} value
       * @param  {boolean} stringify
       * @hidden
       */
      replacer: function(value, stringify) {
        if (DataUtil3.isPlainObject(value)) {
          return DataUtil3.parse.jsonReplacer(value, stringify);
        }
        if (value instanceof Array) {
          return DataUtil3.parse.arrayReplacer(value);
        }
        if (value instanceof Date) {
          return DataUtil3.parse.jsonReplacer({
            val: value
          }, stringify).val;
        }
        return value;
      },
      /**
       * It will replace the JSON value.
       *
       * @param {string} key
       * @param {Object} val
       * @param stringify
       * @hidden
       */
      jsonReplacer: function(val, stringify) {
        var value;
        var keys4 = Object.keys(val);
        for (var _i = 0, keys_3 = keys4; _i < keys_3.length; _i++) {
          var prop = keys_3[_i];
          value = val[prop];
          if (!(value instanceof Date)) {
            continue;
          }
          var d = value;
          if (DataUtil3.serverTimezoneOffset == null) {
            val[prop] = DataUtil3.dateParse.toTimeZone(d, null).toJSON();
          } else {
            d = new Date(+d + DataUtil3.serverTimezoneOffset * 36e5);
            val[prop] = DataUtil3.dateParse.toTimeZone(DataUtil3.dateParse.addSelfOffset(d), null).toJSON();
          }
        }
        return val;
      },
      /**
       * It will replace the Array of value.
       *
       * @param  {string} key
       * @param  {Object[]} val
       * @hidden
       */
      arrayReplacer: function(val) {
        for (var i = 0; i < val.length; i++) {
          if (DataUtil3.isPlainObject(val[i])) {
            val[i] = DataUtil3.parse.jsonReplacer(val[i]);
          } else if (val[i] instanceof Date) {
            val[i] = DataUtil3.parse.jsonReplacer({
              date: val[i]
            }).date;
          }
        }
        return val;
      },
      /**
       * It will replace the Date object with respective to UTC format value.
       *
       * @param  {string} key
       * @param  {any} value
       * @hidden
       */
      /* eslint-disable @typescript-eslint/no-explicit-any */
      /* tslint:disable-next-line:no-any */
      jsonDateReplacer: function(key, value) {
        if (key === "value" && value) {
          if (typeof value === "string") {
            var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
            if (ms) {
              value = DataUtil3.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), null, true);
            } else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
              var arr = value.split(/[^0-9]/);
              value = DataUtil3.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), null, true);
            }
          }
          if (value instanceof Date) {
            value = DataUtil3.dateParse.addSelfOffset(value);
            if (DataUtil3.serverTimezoneOffset === null) {
              return DataUtil3.dateParse.toTimeZone(DataUtil3.dateParse.addSelfOffset(value), null).toJSON();
            } else {
              value = DataUtil3.dateParse.toTimeZone(value, value.getTimezoneOffset() / 60 - DataUtil3.serverTimezoneOffset, false);
              return value.toJSON();
            }
          }
        }
        return value;
      }
    };
    DataUtil3.dateParse = {
      addSelfOffset: function(input2) {
        return new Date(+input2 - input2.getTimezoneOffset() * 6e4);
      },
      toUTC: function(input2) {
        return new Date(+input2 + input2.getTimezoneOffset() * 6e4);
      },
      toTimeZone: function(input2, offset, utc) {
        if (offset === null) {
          return input2;
        }
        var unix = utc ? DataUtil3.dateParse.toUTC(input2) : input2;
        return new Date(+unix - offset * 36e5);
      },
      toLocalTime: function(input2) {
        var datefn = input2;
        var timeZone = -datefn.getTimezoneOffset();
        var differenceString = timeZone >= 0 ? "+" : "-";
        var localtimefn = function(num) {
          var norm = Math.floor(Math.abs(num));
          return (norm < 10 ? "0" : "") + norm;
        };
        var val = datefn.getFullYear() + "-" + localtimefn(datefn.getMonth() + 1) + "-" + localtimefn(datefn.getDate()) + "T" + localtimefn(datefn.getHours()) + ":" + localtimefn(datefn.getMinutes()) + ":" + localtimefn(datefn.getSeconds()) + differenceString + localtimefn(timeZone / 60) + ":" + localtimefn(timeZone % 60);
        return val;
      }
    };
    return DataUtil3;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-data/src/adaptors.js
var __extends24 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var consts2 = {
  GroupGuid: "{271bbba0-1ee7}"
};
var Adaptor = (
  /** @class */
  function() {
    function Adaptor3(ds) {
      this.options = {
        from: "table",
        requestType: "json",
        sortBy: "sorted",
        select: "select",
        skip: "skip",
        group: "group",
        take: "take",
        search: "search",
        count: "requiresCounts",
        where: "where",
        aggregates: "aggregates",
        expand: "expand"
      };
      this.type = Adaptor3;
      this.dataSource = ds;
      this.pvt = {};
    }
    Adaptor3.prototype.processResponse = function(data, ds, query, xhr) {
      return data;
    };
    return Adaptor3;
  }()
);
var JsonAdaptor = (
  /** @class */
  function(_super) {
    __extends24(JsonAdaptor3, _super);
    function JsonAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    JsonAdaptor3.prototype.processQuery = function(dataManager, query) {
      var result = dataManager.dataSource.json.slice(0);
      var count = result.length;
      var countFlg = true;
      var ret;
      var key;
      var lazyLoad = {};
      var keyCount = 0;
      var group = [];
      var sort = [];
      var page;
      for (var i = 0; i < query.lazyLoad.length; i++) {
        keyCount++;
        lazyLoad[query.lazyLoad[i].key] = query.lazyLoad[i].value;
      }
      var agg = {};
      var isGroupByFormat = false;
      if (query.lazyLoad.length) {
        for (var i = 0; i < query.queries.length; i++) {
          key = query.queries[i];
          if (key.fn === "onGroup" && !isNullOrUndefined2(key.e.format)) {
            isGroupByFormat = true;
            break;
          }
        }
      }
      for (var i = 0; i < query.queries.length; i++) {
        key = query.queries[i];
        if ((key.fn === "onPage" || key.fn === "onGroup" || key.fn === "onSortBy" && !isGroupByFormat) && query.lazyLoad.length) {
          if (key.fn === "onGroup") {
            group.push(key.e);
          }
          if (key.fn === "onPage") {
            page = key.e;
          }
          if (key.fn === "onSortBy") {
            sort.unshift(key.e);
          }
          continue;
        }
        ret = this[key.fn].call(this, result, key.e, query);
        if (key.fn === "onAggregates") {
          agg[key.e.field + " - " + key.e.type] = ret;
        } else {
          result = ret !== void 0 ? ret : result;
        }
        if (key.fn === "onPage" || key.fn === "onSkip" || key.fn === "onTake" || key.fn === "onRange") {
          countFlg = false;
        }
        if (countFlg) {
          count = result.length;
        }
      }
      if (keyCount) {
        var args = {
          query,
          lazyLoad,
          result,
          group,
          page,
          sort
        };
        var lazyLoadData = this.lazyLoadGroup(args);
        result = lazyLoadData.result;
        count = lazyLoadData.count;
      }
      if (query.isCountRequired) {
        result = {
          result,
          count,
          aggregates: agg
        };
      }
      return result;
    };
    JsonAdaptor3.prototype.lazyLoadGroup = function(args) {
      var count = 0;
      var agg = this.getAggregate(args.query);
      var result = args.result;
      if (!isNullOrUndefined2(args.lazyLoad.onDemandGroupInfo)) {
        var req = args.lazyLoad.onDemandGroupInfo;
        for (var i = req.where.length - 1; i >= 0; i--) {
          result = this.onWhere(result, req.where[i]);
        }
        if (args.group.length !== req.level) {
          var field = args.group[req.level].fieldName;
          result = DataUtil.group(result, field, agg, null, null, args.group[req.level].comparer, true);
          if (args.sort.length) {
            result = this.onSortBy(result, args.sort[parseInt(req.level.toString(), 10)], args.query, true);
          }
        } else {
          for (var i = args.sort.length - 1; i >= req.level; i--) {
            result = this.onSortBy(result, args.sort[parseInt(i.toString(), 10)], args.query, false);
          }
        }
        count = result.length;
        var data = result;
        result = result.slice(req.skip);
        result = result.slice(0, req.take);
        if (args.group.length !== req.level) {
          this.formGroupResult(result, data);
        }
      } else {
        var field_1 = args.group[0].fieldName;
        result = DataUtil.group(result, field_1, agg, null, null, args.group[0].comparer, true);
        count = result.length;
        var data = result;
        if (args.sort.length) {
          var sort = args.sort.length > 1 ? args.sort.filter(function(x) {
            return x.fieldName === field_1;
          })[0] : args.sort[0];
          result = this.onSortBy(result, sort, args.query, true);
        }
        if (args.page) {
          result = this.onPage(result, args.page, args.query);
        }
        this.formGroupResult(result, data);
      }
      return {
        result,
        count
      };
    };
    JsonAdaptor3.prototype.formGroupResult = function(result, data) {
      if (result.length && data.length) {
        var uid3 = "GroupGuid";
        var childLevel = "childLevels";
        var level = "level";
        var records = "records";
        result[uid3] = data[uid3];
        result[childLevel] = data[childLevel];
        result[level] = data[level];
        result[records] = data[records];
      }
      return result;
    };
    JsonAdaptor3.prototype.getAggregate = function(query) {
      var aggQuery = Query.filterQueries(query.queries, "onAggregates");
      var agg = [];
      if (aggQuery.length) {
        var tmp = void 0;
        for (var i = 0; i < aggQuery.length; i++) {
          tmp = aggQuery[i].e;
          agg.push({
            type: tmp.type,
            field: DataUtil.getValue(tmp.field, query)
          });
        }
      }
      return agg;
    };
    JsonAdaptor3.prototype.batchRequest = function(dm, changes, e) {
      var i;
      var deletedRecordsLen = changes.deletedRecords.length;
      for (i = 0; i < changes.addedRecords.length; i++) {
        this.insert(dm, changes.addedRecords[i]);
      }
      for (i = 0; i < changes.changedRecords.length; i++) {
        this.update(dm, e.key, changes.changedRecords[i]);
      }
      for (i = 0; i < deletedRecordsLen; i++) {
        this.remove(dm, e.key, changes.deletedRecords[i]);
      }
      return changes;
    };
    JsonAdaptor3.prototype.onWhere = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.filter(function(obj) {
        if (e) {
          return e.validate(obj);
        }
      });
    };
    JsonAdaptor3.prototype.onAggregates = function(ds, e) {
      var fn = DataUtil.aggregates[e.type];
      if (!ds || !fn || ds.length === 0) {
        return null;
      }
      return fn(ds, e.field);
    };
    JsonAdaptor3.prototype.onSearch = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      if (e.fieldNames.length === 0) {
        DataUtil.getFieldList(ds[0], e.fieldNames);
      }
      return ds.filter(function(obj) {
        for (var j = 0; j < e.fieldNames.length; j++) {
          if (e.comparer.call(obj, DataUtil.getObject(e.fieldNames[j], obj), e.searchKey, e.ignoreCase, e.ignoreAccent)) {
            return true;
          }
        }
        return false;
      });
    };
    JsonAdaptor3.prototype.onSortBy = function(ds, e, query, isLazyLoadGroupSort) {
      if (!ds || !ds.length) {
        return ds;
      }
      var fnCompare;
      var field = DataUtil.getValue(e.fieldName, query);
      if (!field) {
        return ds.sort(e.comparer);
      }
      if (field instanceof Array) {
        field = field.slice(0);
        for (var i = field.length - 1; i >= 0; i--) {
          if (!field[i]) {
            continue;
          }
          fnCompare = e.comparer;
          if (DataUtil.endsWith(field[i], " desc")) {
            fnCompare = DataUtil.fnSort("descending");
            field[i] = field[i].replace(" desc", "");
          }
          ds = DataUtil.sort(ds, field[i], fnCompare);
        }
        return ds;
      }
      return DataUtil.sort(ds, isLazyLoadGroupSort ? "key" : field, e.comparer);
    };
    JsonAdaptor3.prototype.onGroup = function(ds, e, query) {
      if (!ds || !ds.length) {
        return ds;
      }
      var agg = this.getAggregate(query);
      return DataUtil.group(ds, DataUtil.getValue(e.fieldName, query), agg, null, null, e.comparer);
    };
    JsonAdaptor3.prototype.onPage = function(ds, e, query) {
      var size = DataUtil.getValue(e.pageSize, query);
      var start = (DataUtil.getValue(e.pageIndex, query) - 1) * size;
      var end = start + size;
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(start, end);
    };
    JsonAdaptor3.prototype.onRange = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(DataUtil.getValue(e.start), DataUtil.getValue(e.end));
    };
    JsonAdaptor3.prototype.onTake = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(0, DataUtil.getValue(e.nos));
    };
    JsonAdaptor3.prototype.onSkip = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(DataUtil.getValue(e.nos));
    };
    JsonAdaptor3.prototype.onSelect = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return DataUtil.select(ds, DataUtil.getValue(e.fieldNames));
    };
    JsonAdaptor3.prototype.insert = function(dm, data, tableName, query, position) {
      if (isNullOrUndefined2(position)) {
        return dm.dataSource.json.push(data);
      } else {
        return dm.dataSource.json.splice(position, 0, data);
      }
    };
    JsonAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      var ds = dm.dataSource.json;
      var i;
      if (typeof value === "object" && !(value instanceof Date)) {
        value = DataUtil.getObject(keyField, value);
      }
      for (i = 0; i < ds.length; i++) {
        if (DataUtil.getObject(keyField, ds[i]) === value) {
          break;
        }
      }
      return i !== ds.length ? ds.splice(i, 1) : null;
    };
    JsonAdaptor3.prototype.update = function(dm, keyField, value, tableName) {
      var ds = dm.dataSource.json;
      var i;
      var key;
      if (!isNullOrUndefined2(keyField)) {
        key = getValue2(keyField, value);
      }
      for (i = 0; i < ds.length; i++) {
        if (!isNullOrUndefined2(keyField) && getValue2(keyField, ds[i]) === key) {
          break;
        }
      }
      return i < ds.length ? merge2(ds[i], value) : null;
    };
    return JsonAdaptor3;
  }(Adaptor)
);
var UrlAdaptor = (
  /** @class */
  function(_super) {
    __extends24(UrlAdaptor3, _super);
    function UrlAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    UrlAdaptor3.prototype.processQuery = function(dm, query, hierarchyFilters) {
      var queries = this.getQueryRequest(query);
      var singles = Query.filterQueryLists(query.queries, ["onSelect", "onPage", "onSkip", "onTake", "onRange"]);
      var params = query.params;
      var url = dm.dataSource.url;
      var temp;
      var skip;
      var take = null;
      var options = this.options;
      var request = {
        sorts: [],
        groups: [],
        filters: [],
        searches: [],
        aggregates: []
      };
      if ("onPage" in singles) {
        temp = singles.onPage;
        skip = DataUtil.getValue(temp.pageIndex, query);
        take = DataUtil.getValue(temp.pageSize, query);
        skip = (skip - 1) * take;
      } else if ("onRange" in singles) {
        temp = singles.onRange;
        skip = temp.start;
        take = temp.end - temp.start;
      }
      for (var i = 0; i < queries.sorts.length; i++) {
        temp = DataUtil.getValue(queries.sorts[i].e.fieldName, query);
        request.sorts.push(DataUtil.callAdaptorFunction(this, "onEachSort", {
          name: temp,
          direction: queries.sorts[i].e.direction
        }, query));
      }
      if (hierarchyFilters) {
        temp = this.getFiltersFrom(hierarchyFilters, query);
        if (temp) {
          request.filters.push(DataUtil.callAdaptorFunction(this, "onEachWhere", temp.toJson(), query));
        }
      }
      for (var i = 0; i < queries.filters.length; i++) {
        var res = DataUtil.callAdaptorFunction(this, "onEachWhere", queries.filters[i].e.toJson(), query);
        if (this.getModuleName && this.getModuleName() === "ODataV4Adaptor" && !isNullOrUndefined2(queries.filters[i].e.key) && queries.filters.length > 1) {
          res = "(" + res + ")";
        }
        request.filters.push(res);
        var keys_3 = typeof request.filters[i] === "object" ? Object.keys(request.filters[i]) : [];
        for (var _i = 0, keys_1 = keys_3; _i < keys_1.length; _i++) {
          var prop = keys_1[_i];
          if (DataUtil.isNull(request[prop])) {
            delete request[prop];
          }
        }
      }
      for (var i = 0; i < queries.searches.length; i++) {
        temp = queries.searches[i].e;
        request.searches.push(DataUtil.callAdaptorFunction(this, "onEachSearch", {
          fields: temp.fieldNames,
          operator: temp.operator,
          key: temp.searchKey,
          ignoreCase: temp.ignoreCase
        }, query));
      }
      for (var i = 0; i < queries.groups.length; i++) {
        request.groups.push(DataUtil.getValue(queries.groups[i].e.fieldName, query));
      }
      for (var i = 0; i < queries.aggregates.length; i++) {
        temp = queries.aggregates[i].e;
        request.aggregates.push({
          type: temp.type,
          field: DataUtil.getValue(temp.field, query)
        });
      }
      var req = {};
      this.getRequestQuery(options, query, singles, request, req);
      DataUtil.callAdaptorFunction(this, "addParams", {
        dm,
        query,
        params,
        reqParams: req
      });
      if (query.lazyLoad.length) {
        for (var i = 0; i < query.lazyLoad.length; i++) {
          req[query.lazyLoad[i].key] = query.lazyLoad[i].value;
        }
      }
      var keys4 = Object.keys(req);
      for (var _a = 0, keys_2 = keys4; _a < keys_2.length; _a++) {
        var prop = keys_2[_a];
        if (DataUtil.isNull(req[prop]) || req[prop] === "" || req[prop].length === 0) {
          delete req[prop];
        }
      }
      if (!(options.skip in req && options.take in req) && take !== null) {
        req[options.skip] = DataUtil.callAdaptorFunction(this, "onSkip", skip, query);
        req[options.take] = DataUtil.callAdaptorFunction(this, "onTake", take, query);
      }
      var p = this.pvt;
      this.pvt = {};
      if (this.options.requestType === "json") {
        return {
          data: JSON.stringify(req, DataUtil.parse.jsonDateReplacer),
          url,
          pvtData: p,
          type: "POST",
          contentType: "application/json; charset=utf-8"
        };
      }
      temp = this.convertToQueryString(req, query, dm);
      temp = (dm.dataSource.url.indexOf("?") !== -1 ? "&" : "/") + temp;
      return {
        type: "GET",
        url: temp.length ? url.replace(/\/*$/, temp) : url,
        pvtData: p
      };
    };
    UrlAdaptor3.prototype.getRequestQuery = function(options, query, singles, request, request1) {
      var param = "param";
      var req = request1;
      req[options.from] = query.fromTable;
      if (options.apply && query.distincts.length) {
        req[options.apply] = "onDistinct" in this ? DataUtil.callAdaptorFunction(this, "onDistinct", query.distincts) : "";
      }
      if (!query.distincts.length && options.expand) {
        req[options.expand] = "onExpand" in this && "onSelect" in singles ? DataUtil.callAdaptorFunction(this, "onExpand", {
          selects: DataUtil.getValue(singles.onSelect.fieldNames, query),
          expands: query.expands
        }, query) : query.expands;
      }
      req[options.select] = "onSelect" in singles && !query.distincts.length ? DataUtil.callAdaptorFunction(this, "onSelect", DataUtil.getValue(singles.onSelect.fieldNames, query), query) : "";
      req[options.count] = query.isCountRequired ? DataUtil.callAdaptorFunction(this, "onCount", query.isCountRequired, query) : "";
      req[options.search] = request.searches.length ? DataUtil.callAdaptorFunction(this, "onSearch", request.searches, query) : "";
      req[options.skip] = "onSkip" in singles ? DataUtil.callAdaptorFunction(this, "onSkip", DataUtil.getValue(singles.onSkip.nos, query), query) : "";
      req[options.take] = "onTake" in singles ? DataUtil.callAdaptorFunction(this, "onTake", DataUtil.getValue(singles.onTake.nos, query), query) : "";
      req[options.where] = request.filters.length || request.searches.length ? DataUtil.callAdaptorFunction(this, "onWhere", request.filters, query) : "";
      req[options.sortBy] = request.sorts.length ? DataUtil.callAdaptorFunction(this, "onSortBy", request.sorts, query) : "";
      req[options.group] = request.groups.length ? DataUtil.callAdaptorFunction(this, "onGroup", request.groups, query) : "";
      req[options.aggregates] = request.aggregates.length ? DataUtil.callAdaptorFunction(this, "onAggregates", request.aggregates, query) : "";
      req[param] = [];
    };
    UrlAdaptor3.prototype.convertToQueryString = function(request, query, dm) {
      return "";
    };
    UrlAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      if (xhr && xhr.headers.get("Content-Type") && xhr.headers.get("Content-Type").indexOf("application/json") !== -1) {
        var handleTimeZone = DataUtil.timeZoneHandling;
        if (ds && !ds.timeZoneHandling) {
          DataUtil.timeZoneHandling = false;
        }
        data = DataUtil.parse.parseJson(data);
        DataUtil.timeZoneHandling = handleTimeZone;
      }
      var requests = request;
      var pvt = requests.pvtData || {};
      var groupDs = data ? data.groupDs : [];
      if (xhr && xhr.headers.get("Content-Type") && xhr.headers.get("Content-Type").indexOf("xml") !== -1) {
        return query.isCountRequired ? {
          result: [],
          count: 0
        } : [];
      }
      var d = JSON.parse(requests.data);
      if (d && d.action === "batch" && data && data.addedRecords && !isNullOrUndefined2(changes)) {
        changes.addedRecords = data.addedRecords;
        return changes;
      }
      if (data && data.d) {
        data = data.d;
      }
      var args = {};
      if (data && "count" in data) {
        args.count = data.count;
      }
      args.result = data && data.result ? data.result : data;
      var isExpand = false;
      if (Array.isArray(data.result) && data.result.length) {
        var key = "key";
        var val = "value";
        var level = "level";
        if (!isNullOrUndefined2(data.result[0][key])) {
          args.result = this.formRemoteGroupedData(args.result, 1, pvt.groups.length - 1);
        }
        if (query && query.lazyLoad.length && pvt.groups.length) {
          for (var i = 0; i < query.lazyLoad.length; i++) {
            if (query.lazyLoad[i][key] === "onDemandGroupInfo") {
              var value = query.lazyLoad[i][val][level];
              if (pvt.groups.length === value) {
                isExpand = true;
              }
            }
          }
        }
      }
      if (!isExpand) {
        this.getAggregateResult(pvt, data, args, groupDs, query);
      }
      return DataUtil.isNull(args.count) ? args.result : {
        result: args.result,
        count: args.count,
        aggregates: args.aggregates
      };
    };
    UrlAdaptor3.prototype.formRemoteGroupedData = function(data, level, childLevel) {
      for (var i = 0; i < data.length; i++) {
        if (data[i].items.length && Object.keys(data[i].items[0]).indexOf("key") > -1) {
          this.formRemoteGroupedData(data[i].items, level + 1, childLevel - 1);
        }
      }
      var uid3 = "GroupGuid";
      var childLvl = "childLevels";
      var lvl = "level";
      var records = "records";
      data[uid3] = consts2[uid3];
      data[lvl] = level;
      data[childLvl] = childLevel;
      data[records] = data[0].items.length ? this.getGroupedRecords(data, !isNullOrUndefined2(data[0].items[records])) : [];
      return data;
    };
    UrlAdaptor3.prototype.getGroupedRecords = function(data, hasRecords) {
      var childGroupedRecords = [];
      var records = "records";
      for (var i = 0; i < data.length; i++) {
        if (!hasRecords) {
          for (var j = 0; j < data[i].items.length; j++) {
            childGroupedRecords.push(data[i].items[j]);
          }
        } else {
          childGroupedRecords = childGroupedRecords.concat(data[i].items[records]);
        }
      }
      return childGroupedRecords;
    };
    UrlAdaptor3.prototype.onGroup = function(e) {
      this.pvt.groups = e;
      return e;
    };
    UrlAdaptor3.prototype.onAggregates = function(e) {
      this.pvt.aggregates = e;
    };
    UrlAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      var url;
      var key;
      return {
        type: "POST",
        url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.removeUrl || dm.dataSource.url,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: JSON.stringify(extend2({}, {
          changed: changes.changedRecords,
          added: changes.addedRecords,
          deleted: changes.deletedRecords,
          action: "batch",
          table: e[url],
          key: e[key]
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.beforeSend = function(dm, request, settings) {
    };
    UrlAdaptor3.prototype.insert = function(dm, data, tableName, query) {
      return {
        url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend2({}, {
          value: data,
          table: tableName,
          action: "insert"
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.remove = function(dm, keyField, value, tableName, query) {
      return {
        type: "POST",
        url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend2({}, {
          key: value,
          keyColumn: keyField,
          table: tableName,
          action: "remove"
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.update = function(dm, keyField, value, tableName, query) {
      return {
        type: "POST",
        url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend2({}, {
          value,
          action: "update",
          keyColumn: keyField,
          key: DataUtil.getObject(keyField, value),
          table: tableName
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.getFiltersFrom = function(data, query) {
      var key = query.fKey;
      var value;
      var prop = key;
      var pKey = query.key;
      var predicats = [];
      if (typeof data[0] !== "object") {
        prop = null;
      }
      for (var i = 0; i < data.length; i++) {
        if (typeof data[0] === "object") {
          value = DataUtil.getObject(pKey || prop, data[i]);
        } else {
          value = data[i];
        }
        predicats.push(new Predicate(key, "equal", value));
      }
      return Predicate.or(predicats);
    };
    UrlAdaptor3.prototype.getAggregateResult = function(pvt, data, args, groupDs, query) {
      var pData = data;
      if (data && data.result) {
        pData = data.result;
      }
      if (pvt && pvt.aggregates && pvt.aggregates.length) {
        var agg = pvt.aggregates;
        var fn = void 0;
        var aggregateData = pData;
        var res = {};
        if (data.aggregate) {
          aggregateData = data.aggregate;
        }
        for (var i = 0; i < agg.length; i++) {
          fn = DataUtil.aggregates[agg[i].type];
          if (fn) {
            res[agg[i].field + " - " + agg[i].type] = fn(aggregateData, agg[i].field);
          }
        }
        args.aggregates = res;
      }
      var key = "key";
      var isServerGrouping = Array.isArray(data.result) && data.result.length && !isNullOrUndefined2(data.result[0][key]);
      if (pvt && pvt.groups && pvt.groups.length && !isServerGrouping) {
        var groups = pvt.groups;
        for (var i = 0; i < groups.length; i++) {
          var level = null;
          if (!isNullOrUndefined2(groupDs)) {
            groupDs = DataUtil.group(groupDs, groups[i]);
          }
          var groupQuery = Query.filterQueries(query.queries, "onGroup")[i].e;
          pData = DataUtil.group(pData, groups[i], pvt.aggregates, level, groupDs, groupQuery.comparer);
        }
        args.result = pData;
      }
      return args;
    };
    UrlAdaptor3.prototype.getQueryRequest = function(query) {
      var req = {
        sorts: [],
        groups: [],
        filters: [],
        searches: [],
        aggregates: []
      };
      req.sorts = Query.filterQueries(query.queries, "onSortBy");
      req.groups = Query.filterQueries(query.queries, "onGroup");
      req.filters = Query.filterQueries(query.queries, "onWhere");
      req.searches = Query.filterQueries(query.queries, "onSearch");
      req.aggregates = Query.filterQueries(query.queries, "onAggregates");
      return req;
    };
    UrlAdaptor3.prototype.addParams = function(options) {
      var req = options.reqParams;
      if (options.params.length) {
        req.params = {};
      }
      for (var _i = 0, _a = options.params; _i < _a.length; _i++) {
        var tmp = _a[_i];
        if (req[tmp.key]) {
          throw new Error("Query() - addParams: Custom Param is conflicting other request arguments");
        }
        req[tmp.key] = tmp.value;
        if (tmp.fn) {
          req[tmp.key] = tmp.fn.call(options.query, tmp.key, options.query, options.dm);
        }
        req.params[tmp.key] = req[tmp.key];
      }
    };
    return UrlAdaptor3;
  }(Adaptor)
);
var ODataAdaptor = (
  /** @class */
  function(_super) {
    __extends24(ODataAdaptor3, _super);
    function ODataAdaptor3(props) {
      var _this = _super.call(this) || this;
      _this.options = extend2({}, _this.options, {
        requestType: "get",
        accept: "application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",
        multipartAccept: "multipart/mixed",
        sortBy: "$orderby",
        select: "$select",
        skip: "$skip",
        take: "$top",
        count: "$inlinecount",
        where: "$filter",
        expand: "$expand",
        batch: "$batch",
        changeSet: "--changeset_",
        batchPre: "batch_",
        contentId: "Content-Id: ",
        batchContent: "Content-Type: multipart/mixed; boundary=",
        changeSetContent: "Content-Type: application/http\nContent-Transfer-Encoding: binary ",
        batchChangeSetContentType: "Content-Type: application/json; charset=utf-8 ",
        updateType: "PUT"
      });
      extend2(_this.options, props || {});
      return _this;
    }
    ODataAdaptor3.prototype.getModuleName = function() {
      return "ODataAdaptor";
    };
    ODataAdaptor3.prototype.onPredicate = function(predicate, query, requiresCast) {
      var returnValue = "";
      var operator;
      var guid;
      var val = predicate.value;
      var type = typeof val;
      var field = predicate.field ? ODataAdaptor3.getField(predicate.field) : null;
      if (val instanceof Date) {
        val = "datetime'" + DataUtil.parse.replacer(val) + "'";
      }
      if (type === "string") {
        val = val.replace(/'/g, "''");
        if (predicate.ignoreCase) {
          val = val.toLowerCase();
        }
        if (predicate.operator !== "like") {
          val = encodeURIComponent(val);
        }
        if (predicate.operator !== "wildcard" && predicate.operator !== "like") {
          val = "'" + val + "'";
        }
        if (requiresCast) {
          field = "cast(" + field + ", 'Edm.String')";
        }
        if (DataUtil.parse.isGuid(val)) {
          guid = "guid";
        }
        if (predicate.ignoreCase) {
          if (!guid) {
            field = "tolower(" + field + ")";
          }
          val = val.toLowerCase();
        }
      }
      if (predicate.operator === "isempty" || predicate.operator === "isnull" || predicate.operator === "isnotempty" || predicate.operator === "isnotnull") {
        operator = predicate.operator.indexOf("isnot") !== -1 ? DataUtil.odBiOperator["notequal"] : DataUtil.odBiOperator["equal"];
        val = predicate.operator === "isnull" || predicate.operator === "isnotnull" ? null : "''";
      } else {
        operator = DataUtil.odBiOperator[predicate.operator];
      }
      if (operator) {
        returnValue += field;
        returnValue += operator;
        if (guid) {
          returnValue += guid;
        }
        return returnValue + val;
      }
      if (!isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor") {
        operator = DataUtil.odv4UniOperator[predicate.operator];
      } else {
        operator = DataUtil.odUniOperator[predicate.operator];
      }
      if (operator === "like") {
        val = val;
        if (val.indexOf("%") !== -1) {
          if (val.charAt(0) === "%" && val.lastIndexOf("%") < 2) {
            val = val.substring(1, val.length);
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["startswith"] : DataUtil.odUniOperator["startswith"];
          } else if (val.charAt(val.length - 1) === "%" && val.indexOf("%") > val.length - 3) {
            val = val.substring(0, val.length - 1);
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["endswith"] : DataUtil.odUniOperator["endswith"];
          } else if (val.lastIndexOf("%") !== val.indexOf("%") && val.lastIndexOf("%") > val.indexOf("%") + 1) {
            val = val.substring(val.indexOf("%") + 1, val.lastIndexOf("%"));
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["contains"] : DataUtil.odUniOperator["contains"];
          } else {
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["contains"] : DataUtil.odUniOperator["contains"];
          }
        }
        val = encodeURIComponent(val);
        val = "'" + val + "'";
      } else if (operator === "wildcard") {
        val = val;
        if (val.indexOf("*") !== -1) {
          var splittedStringValue = val.split("*");
          var splittedValue = void 0;
          var count = 0;
          if (val.indexOf("*") !== 0 && splittedStringValue[0].indexOf("%3f") === -1 && splittedStringValue[0].indexOf("?") === -1) {
            splittedValue = splittedStringValue[0];
            splittedValue = "'" + splittedValue + "'";
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["startswith"] : DataUtil.odUniOperator["startswith"];
            returnValue += operator + "(";
            returnValue += field + ",";
            if (guid) {
              returnValue += guid;
            }
            returnValue += splittedValue + ")";
            count++;
          }
          if (val.lastIndexOf("*") !== val.length - 1 && splittedStringValue[splittedStringValue.length - 1].indexOf("%3f") === -1 && splittedStringValue[splittedStringValue.length - 1].indexOf("?") === -1) {
            splittedValue = splittedStringValue[splittedStringValue.length - 1];
            splittedValue = "'" + splittedValue + "'";
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["endswith"] : DataUtil.odUniOperator["endswith"];
            if (count > 0) {
              returnValue += " and ";
            }
            returnValue += operator + "(";
            returnValue += field + ",";
            if (guid) {
              returnValue += guid;
            }
            returnValue += splittedValue + ")";
            count++;
          }
          if (splittedStringValue.length > 2) {
            for (var i = 1; i < splittedStringValue.length - 1; i++) {
              if (splittedStringValue[i].indexOf("%3f") === -1 && splittedStringValue[i].indexOf("?") === -1) {
                splittedValue = splittedStringValue[i];
                splittedValue = "'" + splittedValue + "'";
                operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["contains"] : DataUtil.odUniOperator["contains"];
                if (count > 0) {
                  returnValue += " and ";
                }
                if (operator === "substringof" || operator === "not substringof") {
                  var temp = splittedValue;
                  splittedValue = field;
                  field = temp;
                }
                returnValue += operator + "(";
                returnValue += field + ",";
                if (guid) {
                  returnValue += guid;
                }
                returnValue += splittedValue + ")";
                count++;
              }
            }
          }
          if (count === 0) {
            operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["contains"] : DataUtil.odUniOperator["contains"];
            if (val.indexOf("?") !== -1 || val.indexOf("%3f") !== -1) {
              val = val.indexOf("?") !== -1 ? val.split("?").join("") : val.split("%3f").join("");
            }
            val = "'" + val + "'";
          } else {
            operator = "wildcard";
          }
        } else {
          operator = !isNullOrUndefined2(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil.odv4UniOperator["contains"] : DataUtil.odUniOperator["contains"];
          if (val.indexOf("?") !== -1 || val.indexOf("%3f") !== -1) {
            val = val.indexOf("?") !== -1 ? val.split("?").join("") : val.split("%3f").join("");
          }
          val = "'" + val + "'";
        }
      }
      if (operator === "substringof" || operator === "not substringof") {
        var temp = val;
        val = field;
        field = temp;
      }
      if (operator !== "wildcard") {
        returnValue += operator + "(";
        returnValue += field + ",";
        if (guid) {
          returnValue += guid;
        }
        returnValue += val + ")";
      }
      return returnValue;
    };
    ODataAdaptor3.prototype.addParams = function(options) {
      _super.prototype.addParams.call(this, options);
      delete options.reqParams.params;
    };
    ODataAdaptor3.prototype.onComplexPredicate = function(predicate, query, requiresCast) {
      var res = [];
      for (var i = 0; i < predicate.predicates.length; i++) {
        res.push("(" + this.onEachWhere(predicate.predicates[i], query, requiresCast) + ")");
      }
      return res.join(" " + predicate.condition + " ");
    };
    ODataAdaptor3.prototype.onEachWhere = function(filter, query, requiresCast) {
      return filter.isComplex ? this.onComplexPredicate(filter, query, requiresCast) : this.onPredicate(filter, query, requiresCast);
    };
    ODataAdaptor3.prototype.onWhere = function(filters) {
      if (this.pvt.search) {
        filters.push(this.onEachWhere(this.pvt.search, null, true));
      }
      return filters.join(" and ");
    };
    ODataAdaptor3.prototype.onEachSearch = function(e) {
      if (e.fields && e.fields.length === 0) {
        DataUtil.throwError("Query() - Search : oData search requires list of field names to search");
      }
      var filter = this.pvt.search || [];
      for (var i = 0; i < e.fields.length; i++) {
        filter.push(new Predicate(e.fields[i], e.operator, e.key, e.ignoreCase));
      }
      this.pvt.search = filter;
    };
    ODataAdaptor3.prototype.onSearch = function(e) {
      this.pvt.search = Predicate.or(this.pvt.search);
      return "";
    };
    ODataAdaptor3.prototype.onEachSort = function(e) {
      var res = [];
      if (e.name instanceof Array) {
        for (var i = 0; i < e.name.length; i++) {
          res.push(ODataAdaptor3.getField(e.name[i]) + (e.direction === "descending" ? " desc" : ""));
        }
      } else {
        res.push(ODataAdaptor3.getField(e.name) + (e.direction === "descending" ? " desc" : ""));
      }
      return res.join(",");
    };
    ODataAdaptor3.prototype.onSortBy = function(e) {
      return e.reverse().join(",");
    };
    ODataAdaptor3.prototype.onGroup = function(e) {
      this.pvt.groups = e;
      return [];
    };
    ODataAdaptor3.prototype.onSelect = function(e) {
      for (var i = 0; i < e.length; i++) {
        e[i] = ODataAdaptor3.getField(e[i]);
      }
      return e.join(",");
    };
    ODataAdaptor3.prototype.onAggregates = function(e) {
      this.pvt.aggregates = e;
      return "";
    };
    ODataAdaptor3.prototype.onCount = function(e) {
      return e === true ? "allpages" : "";
    };
    ODataAdaptor3.prototype.beforeSend = function(dm, request, settings) {
      if (DataUtil.endsWith(settings.url, this.options.batch) && settings.type.toLowerCase() === "post") {
        request.headers.set("Accept", this.options.multipartAccept);
        request.headers.set("DataServiceVersion", "2.0");
      } else {
        request.headers.set("Accept", this.options.accept);
      }
      request.headers.set("DataServiceVersion", "2.0");
      request.headers.set("MaxDataServiceVersion", "2.0");
    };
    ODataAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      var metaCheck = "odata.metadata";
      if (request && request.type === "GET" && !this.rootUrl && data[metaCheck]) {
        var dataUrls = data[metaCheck].split("/$metadata#");
        this.rootUrl = dataUrls[0];
        this.resourceTableName = dataUrls[1];
      }
      var pvtData = "pvtData";
      if (!isNullOrUndefined2(data.d)) {
        var dataCopy = query && query.isCountRequired ? data.d.results : data.d;
        var metaData = "__metadata";
        if (!isNullOrUndefined2(dataCopy)) {
          for (var i = 0; i < dataCopy.length; i++) {
            if (!isNullOrUndefined2(dataCopy[i][metaData])) {
              delete dataCopy[i][metaData];
            }
          }
        }
      }
      var pvt = request && request[pvtData];
      var emptyAndBatch = this.processBatchResponse(data, query, xhr, request, changes);
      if (emptyAndBatch) {
        return emptyAndBatch;
      }
      var versionCheck = xhr && request.fetchRequest.headers.get("DataServiceVersion");
      var count = null;
      var version = versionCheck && parseInt(versionCheck, 10) || 2;
      if (query && query.isCountRequired) {
        var oDataCount = "__count";
        if (data[oDataCount] || data["odata.count"]) {
          count = data[oDataCount] || data["odata.count"];
        }
        if (data.d) {
          data = data.d;
        }
        if (data[oDataCount] || data["odata.count"]) {
          count = data[oDataCount] || data["odata.count"];
        }
      }
      if (version === 3 && data.value) {
        data = data.value;
      }
      if (data.d) {
        data = data.d;
      }
      if (version < 3 && data.results) {
        data = data.results;
      }
      var args = {};
      args.count = count;
      args.result = data;
      this.getAggregateResult(pvt, data, args, null, query);
      return DataUtil.isNull(count) ? args.result : {
        result: args.result,
        count: args.count,
        aggregates: args.aggregates
      };
    };
    ODataAdaptor3.prototype.convertToQueryString = function(request, query, dm) {
      var res = [];
      var table = "table";
      var tableName = request[table] || "";
      var format = "$format";
      delete request[table];
      if (dm.dataSource.requiresFormat) {
        request[format] = "json";
      }
      var keys4 = Object.keys(request);
      for (var _i = 0, keys_4 = keys4; _i < keys_4.length; _i++) {
        var prop = keys_4[_i];
        res.push(prop + "=" + request[prop]);
      }
      res = res.join("&");
      if (dm.dataSource.url && dm.dataSource.url.indexOf("?") !== -1 && !tableName) {
        return res;
      }
      return res.length ? tableName + "?" + res : tableName || "";
    };
    ODataAdaptor3.prototype.localTimeReplacer = function(key, convertObj) {
      for (var _i = 0, _a = !isNullOrUndefined2(convertObj) ? Object.keys(convertObj) : []; _i < _a.length; _i++) {
        var prop = _a[_i];
        if (convertObj[prop] instanceof Date) {
          convertObj[prop] = DataUtil.dateParse.toLocalTime(convertObj[prop]);
        }
      }
      return convertObj;
    };
    ODataAdaptor3.prototype.insert = function(dm, data, tableName) {
      return {
        url: (dm.dataSource.insertUrl || dm.dataSource.url).replace(/\/*$/, tableName ? "/" + tableName : ""),
        data: JSON.stringify(data, this.options.localTime ? this.localTimeReplacer : null)
      };
    };
    ODataAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      var url;
      if (typeof value === "string" && !DataUtil.parse.isGuid(value)) {
        url = "('" + value + "')";
      } else {
        url = "(" + value + ")";
      }
      return {
        type: "DELETE",
        url: (dm.dataSource.removeUrl || dm.dataSource.url).replace(/\/*$/, tableName ? "/" + tableName : "") + url
      };
    };
    ODataAdaptor3.prototype.update = function(dm, keyField, value, tableName, query, original) {
      if (this.options.updateType === "PATCH" && !isNullOrUndefined2(original)) {
        value = this.compareAndRemove(value, original, keyField);
      }
      var url;
      if (typeof value[keyField] === "string" && !DataUtil.parse.isGuid(value[keyField])) {
        url = "('" + value[keyField] + "')";
      } else {
        url = "(" + value[keyField] + ")";
      }
      return {
        type: this.options.updateType,
        url: (dm.dataSource.updateUrl || dm.dataSource.url).replace(/\/*$/, tableName ? "/" + tableName : "") + url,
        data: JSON.stringify(value, this.options.localTime ? this.localTimeReplacer : null),
        accept: this.options.accept
      };
    };
    ODataAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre);
      var url = dm.dataSource.batchUrl || this.rootUrl ? (dm.dataSource.batchUrl || this.rootUrl) + "/" + this.options.batch : (dm.dataSource.batchUrl || dm.dataSource.url).replace(/\/*$/, "/" + this.options.batch);
      e.url = this.resourceTableName ? this.resourceTableName : e.url;
      var args = {
        url: e.url,
        key: e.key,
        cid: 1,
        cSet: DataUtil.getGuid(this.options.changeSet)
      };
      var req = "--" + initialGuid + "\n";
      req += "Content-Type: multipart/mixed; boundary=" + args.cSet.replace("--", "") + "\n";
      this.pvt.changeSet = 0;
      req += this.generateInsertRequest(changes.addedRecords, args, dm);
      req += this.generateUpdateRequest(changes.changedRecords, args, dm, original ? original.changedRecords : []);
      req += this.generateDeleteRequest(changes.deletedRecords, args, dm);
      req += args.cSet + "--\n";
      req += "--" + initialGuid + "--";
      return {
        type: "POST",
        url,
        dataType: "json",
        contentType: "multipart/mixed; charset=UTF-8;boundary=" + initialGuid,
        data: req
      };
    };
    ODataAdaptor3.prototype.generateDeleteRequest = function(arr, e, dm) {
      if (!arr) {
        return "";
      }
      var req = "";
      var stat = {
        "method": "DELETE ",
        "url": function(data, i, key) {
          var url = DataUtil.getObject(key, data[i]);
          if (typeof url === "number" || DataUtil.parse.isGuid(url)) {
            return "(" + url + ")";
          } else if (url instanceof Date) {
            var dateTime = data[i][key];
            return "(" + dateTime.toJSON() + ")";
          } else {
            return "('" + url + "')";
          }
        },
        "data": function(data, i) {
          return "";
        }
      };
      req = this.generateBodyContent(arr, e, stat, dm);
      return req + "\n";
    };
    ODataAdaptor3.prototype.generateInsertRequest = function(arr, e, dm) {
      if (!arr) {
        return "";
      }
      var req = "";
      var stat = {
        "method": "POST ",
        "url": function(data, i, key) {
          return "";
        },
        "data": function(data, i) {
          return JSON.stringify(data[i]) + "\n\n";
        }
      };
      req = this.generateBodyContent(arr, e, stat, dm);
      return req;
    };
    ODataAdaptor3.prototype.generateUpdateRequest = function(arr, e, dm, org) {
      var _this = this;
      if (!arr) {
        return "";
      }
      var req = "";
      arr.forEach(function(change) {
        return change = _this.compareAndRemove(change, org.filter(function(o) {
          return DataUtil.getObject(e.key, o) === DataUtil.getObject(e.key, change);
        })[0], e.key);
      });
      var stat = {
        "method": this.options.updateType + " ",
        "url": function(data, i, key) {
          if (typeof data[i][key] === "number" || DataUtil.parse.isGuid(data[i][key])) {
            return "(" + data[i][key] + ")";
          } else if (data[i][key] instanceof Date) {
            var date = data[i][key];
            return "(" + date.toJSON() + ")";
          } else {
            return "('" + data[i][key] + "')";
          }
        },
        "data": function(data, i) {
          return JSON.stringify(data[i]) + "\n\n";
        }
      };
      req = this.generateBodyContent(arr, e, stat, dm);
      return req;
    };
    ODataAdaptor3.getField = function(prop) {
      return prop.replace(/\./g, "/");
    };
    ODataAdaptor3.prototype.generateBodyContent = function(arr, e, stat, dm) {
      var req = "";
      for (var i = 0; i < arr.length; i++) {
        req += "\n" + e.cSet + "\n";
        req += this.options.changeSetContent + "\n\n";
        req += stat.method;
        if (stat.method === "POST ") {
          req += (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + " HTTP/1.1\n";
        } else if (stat.method === "PUT " || stat.method === "PATCH ") {
          req += (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + " HTTP/1.1\n";
        } else if (stat.method === "DELETE ") {
          req += (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + " HTTP/1.1\n";
        }
        req += "Accept: " + this.options.accept + "\n";
        req += "Content-Id: " + this.pvt.changeSet++ + "\n";
        req += this.options.batchChangeSetContentType + "\n";
        if (!isNullOrUndefined2(arr[i]["@odata.etag"])) {
          req += "If-Match: " + arr[i]["@odata.etag"] + "\n\n";
          delete arr[i]["@odata.etag"];
        } else {
          req += "\n";
        }
        req += stat.data(arr, i);
      }
      return req;
    };
    ODataAdaptor3.prototype.processBatchResponse = function(data, query, xhr, request, changes) {
      if (xhr && xhr.headers.get("Content-Type") && xhr.headers.get("Content-Type").indexOf("xml") !== -1) {
        return query.isCountRequired ? {
          result: [],
          count: 0
        } : [];
      }
      if (request && this.options.batch && DataUtil.endsWith(request.url, this.options.batch) && request.type.toLowerCase() === "post") {
        var guid = xhr.headers.get("Content-Type");
        var cIdx = void 0;
        var jsonObj = void 0;
        var d = data + "";
        guid = guid.substring(guid.indexOf("=batchresponse") + 1);
        d = d.split(guid);
        if (d.length < 2) {
          return {};
        }
        d = d[1];
        var exVal = /(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(d);
        if (exVal) {
          d.replace(exVal[0], "");
        }
        var changeGuid = exVal ? exVal[1] : "";
        d = d.split(changeGuid);
        for (var i = d.length; i > -1; i--) {
          if (!/\bContent-ID:/i.test(d[i]) || !/\bHTTP.+201/.test(d[i])) {
            continue;
          }
          cIdx = parseInt(/\bContent-ID: (\d+)/i.exec(d[i])[1], 10);
          if (changes.addedRecords[cIdx]) {
            jsonObj = DataUtil.parse.parseJson(/^\{.+\}/m.exec(d[i])[0]);
            extend2({}, changes.addedRecords[cIdx], this.processResponse(jsonObj));
          }
        }
        return changes;
      }
      return null;
    };
    ODataAdaptor3.prototype.compareAndRemove = function(data, original, key) {
      var _this = this;
      if (isNullOrUndefined2(original)) {
        return data;
      }
      Object.keys(data).forEach(function(prop) {
        if (prop !== key && prop !== "@odata.etag") {
          if (DataUtil.isPlainObject(data[prop])) {
            _this.compareAndRemove(data[prop], original[prop]);
            var final = Object.keys(data[prop]).filter(function(data2) {
              return data2 !== "@odata.etag";
            });
            if (final.length === 0) {
              delete data[prop];
            }
          } else if (data[prop] === original[prop]) {
            delete data[prop];
          } else if (data[prop] && original[prop] && data[prop].valueOf() === original[prop].valueOf()) {
            delete data[prop];
          }
        }
      });
      return data;
    };
    return ODataAdaptor3;
  }(UrlAdaptor)
);
var ODataV4Adaptor = (
  /** @class */
  function(_super) {
    __extends24(ODataV4Adaptor3, _super);
    function ODataV4Adaptor3(props) {
      var _this = _super.call(this, props) || this;
      _this.options = extend2({}, _this.options, {
        requestType: "get",
        accept: "application/json, text/javascript, */*; q=0.01",
        multipartAccept: "multipart/mixed",
        sortBy: "$orderby",
        select: "$select",
        skip: "$skip",
        take: "$top",
        count: "$count",
        search: "$search",
        where: "$filter",
        expand: "$expand",
        batch: "$batch",
        changeSet: "--changeset_",
        batchPre: "batch_",
        contentId: "Content-Id: ",
        batchContent: "Content-Type: multipart/mixed; boundary=",
        changeSetContent: "Content-Type: application/http\nContent-Transfer-Encoding: binary ",
        batchChangeSetContentType: "Content-Type: application/json; charset=utf-8 ",
        updateType: "PATCH",
        localTime: false,
        apply: "$apply"
      });
      extend2(_this.options, props || {});
      return _this;
    }
    ODataV4Adaptor3.prototype.getModuleName = function() {
      return "ODataV4Adaptor";
    };
    ODataV4Adaptor3.prototype.onCount = function(e) {
      return e === true ? "true" : "";
    };
    ODataV4Adaptor3.prototype.onPredicate = function(predicate, query, requiresCast) {
      var returnValue = "";
      var val = predicate.value;
      var isDate = val instanceof Date;
      if (query instanceof Query) {
        var queries = this.getQueryRequest(query);
        for (var i = 0; i < queries.filters.length; i++) {
          if (queries.filters[i].e.key === predicate.value) {
            requiresCast = true;
          }
        }
      }
      returnValue = _super.prototype.onPredicate.call(this, predicate, query, requiresCast);
      if (isDate) {
        returnValue = returnValue.replace(/datetime'(.*)'$/, "$1");
      }
      if (DataUtil.parse.isGuid(val)) {
        returnValue = returnValue.replace("guid", "").replace(/'/g, "");
      }
      return returnValue;
    };
    ODataV4Adaptor3.prototype.onEachSearch = function(e) {
      var search = this.pvt.searches || [];
      search.push(e.key);
      this.pvt.searches = search;
    };
    ODataV4Adaptor3.prototype.onSearch = function(e) {
      return this.pvt.searches.join(" OR ");
    };
    ODataV4Adaptor3.prototype.onExpand = function(e) {
      var _this = this;
      var selected = {};
      var expanded = {};
      var expands = e.expands.slice();
      var exArr = [];
      var selects = e.selects.filter(function(item) {
        return item.indexOf(".") > -1;
      });
      selects.forEach(function(select4) {
        var splits = select4.split(".");
        if (!(splits[0] in selected)) {
          selected[splits[0]] = [];
        }
        if (splits.length === 2) {
          if (selected[splits[0]].length && Object.keys(selected).indexOf(splits[0]) !== -1) {
            if (selected[splits[0]][0].indexOf("$expand") !== -1 && selected[splits[0]][0].indexOf(";$select=") === -1) {
              selected[splits[0]][0] = selected[splits[0]][0] + ";$select=" + splits[1];
            } else {
              selected[splits[0]][0] = selected[splits[0]][0] + "," + splits[1];
            }
          } else {
            selected[splits[0]].push("$select=" + splits[1]);
          }
        } else {
          var sel = "$select=" + splits[splits.length - 1];
          var exp4 = "";
          var close_1 = "";
          for (var i = 1; i < splits.length - 1; i++) {
            exp4 = exp4 + "$expand=" + splits[i] + "(";
            close_1 = close_1 + ")";
          }
          var combineVal = exp4 + sel + close_1;
          if (selected[splits[0]].length && Object.keys(selected).indexOf(splits[0]) !== -1 && _this.expandQueryIndex(selected[splits[0]], true)) {
            var idx = _this.expandQueryIndex(selected[splits[0]]);
            selected[splits[0]][idx] = selected[splits[0]][idx] + combineVal.replace("$expand=", ",");
          } else {
            selected[splits[0]].push(combineVal);
          }
        }
      });
      Object.keys(selected).forEach(function(expand) {
        if (expands.indexOf(expand) === -1) {
          expands.push(expand);
        }
      });
      expands.forEach(function(expand) {
        expanded[expand] = expand in selected ? expand + "(" + selected[expand].join(";") + ")" : expand;
      });
      Object.keys(expanded).forEach(function(ex) {
        return exArr.push(expanded[ex]);
      });
      return exArr.join(",");
    };
    ODataV4Adaptor3.prototype.expandQueryIndex = function(query, isExpand) {
      for (var i = 0; i < query.length; i++) {
        if (query[i].indexOf("$expand") !== -1) {
          return isExpand ? true : i;
        }
      }
      return isExpand ? false : 0;
    };
    ODataV4Adaptor3.prototype.onDistinct = function(distinctFields) {
      var fields = distinctFields.map(function(field) {
        return ODataAdaptor.getField(field);
      }).join(",");
      return "groupby((" + fields + "))";
    };
    ODataV4Adaptor3.prototype.onSelect = function(e) {
      return _super.prototype.onSelect.call(this, e.filter(function(item) {
        return item.indexOf(".") === -1;
      }));
    };
    ODataV4Adaptor3.prototype.beforeSend = function(dm, request, settings) {
      if (settings.type === "POST" || settings.type === "PUT" || settings.type === "PATCH") {
        request.headers.set("Prefer", "return=representation");
      }
      request.headers.set("Accept", this.options.accept);
    };
    ODataV4Adaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      var metaName = "@odata.context";
      var metaV4Name = "@context";
      if (request && request.type === "GET" && !this.rootUrl && (data[metaName] || data[metaV4Name])) {
        var dataUrl = data[metaName] ? data[metaName].split("/$metadata#") : data[metaV4Name].split("/$metadata#");
        this.rootUrl = dataUrl[0];
        this.resourceTableName = dataUrl[1];
      }
      var pvtData = "pvtData";
      var pvt = request && request[pvtData];
      var emptyAndBatch = _super.prototype.processBatchResponse.call(this, data, query, xhr, request, changes);
      if (emptyAndBatch) {
        return emptyAndBatch;
      }
      var count = null;
      var dataCount = "@odata.count";
      var dataV4Count = "@count";
      if (query && query.isCountRequired) {
        if (dataCount in data) {
          count = data[dataCount];
        } else if (dataV4Count in data) {
          count = data[dataV4Count];
        }
      }
      data = !isNullOrUndefined2(data.value) ? data.value : data;
      var args = {};
      args.count = count;
      args.result = data;
      this.getAggregateResult(pvt, data, args, null, query);
      return DataUtil.isNull(count) ? args.result : {
        result: args.result,
        count,
        aggregates: args.aggregates
      };
    };
    return ODataV4Adaptor3;
  }(ODataAdaptor)
);
var WebApiAdaptor = (
  /** @class */
  function(_super) {
    __extends24(WebApiAdaptor3, _super);
    function WebApiAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    WebApiAdaptor3.prototype.getModuleName = function() {
      return "WebApiAdaptor";
    };
    WebApiAdaptor3.prototype.insert = function(dm, data, tableName) {
      return {
        type: "POST",
        url: dm.dataSource.url,
        data: JSON.stringify(data)
      };
    };
    WebApiAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      return {
        type: "DELETE",
        url: dm.dataSource.url + "/" + value,
        data: JSON.stringify(value)
      };
    };
    WebApiAdaptor3.prototype.update = function(dm, keyField, value, tableName) {
      return {
        type: "PUT",
        url: dm.dataSource.url,
        data: JSON.stringify(value)
      };
    };
    WebApiAdaptor3.prototype.batchRequest = function(dm, changes, e) {
      var _this = this;
      var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre);
      var url = dm.dataSource.url.replace(/\/*$/, "/" + this.options.batch);
      e.url = this.resourceTableName ? this.resourceTableName : e.url;
      var req = [];
      var _loop_1 = function(i2, x2) {
        changes.addedRecords.forEach(function(j, d) {
          var stat = {
            "method": "POST ",
            "url": function(data, i3, key) {
              return "";
            },
            "data": function(data, i3) {
              return JSON.stringify(data[i3]) + "\n\n";
            }
          };
          req.push("--" + initialGuid);
          req.push("Content-Type: application/http; msgtype=request", "");
          req.push("POST /api/" + (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(changes.addedRecords, i2, e.key) + " HTTP/1.1");
          req.push("Content-Type: application/json; charset=utf-8");
          req.push("Host: " + location.host);
          req.push("", j ? JSON.stringify(j) : "");
        });
      };
      for (var i = 0, x = changes.addedRecords.length; i < x; i++) {
        _loop_1(i, x);
      }
      var _loop_2 = function(i2, x2) {
        changes.changedRecords.forEach(function(j, d) {
          var stat = {
            "method": _this.options.updateType + " ",
            "url": function(data, i3, key) {
              return "";
            },
            "data": function(data, i3) {
              return JSON.stringify(data[i3]) + "\n\n";
            }
          };
          req.push("--" + initialGuid);
          req.push("Content-Type: application/http; msgtype=request", "");
          req.push("PUT /api/" + (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(changes.changedRecords, i2, e.key) + " HTTP/1.1");
          req.push("Content-Type: application/json; charset=utf-8");
          req.push("Host: " + location.host);
          req.push("", j ? JSON.stringify(j) : "");
        });
      };
      for (var i = 0, x = changes.changedRecords.length; i < x; i++) {
        _loop_2(i, x);
      }
      var _loop_3 = function(i2, x2) {
        changes.deletedRecords.forEach(function(j, d) {
          var state = {
            "mtd": "DELETE ",
            "url": function(data, i3, key) {
              var url2 = DataUtil.getObject(key, data[i3]);
              if (typeof url2 === "number" || DataUtil.parse.isGuid(url2)) {
                return "/" + url2;
              } else if (url2 instanceof Date) {
                var datTime = data[i3][key];
                return "/" + datTime.toJSON();
              } else {
                return "/'" + url2 + "'";
              }
            },
            "data": function(data, i3) {
              return "";
            }
          };
          req.push("--" + initialGuid);
          req.push("Content-Type: application/http; msgtype=request", "");
          req.push("DELETE /api/" + (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + state.url(changes.deletedRecords, i2, e.key) + " HTTP/1.1");
          req.push("Content-Type: application/json; charset=utf-8");
          req.push("Host: " + location.host);
          req.push("", j ? JSON.stringify(j) : "");
        });
      };
      for (var i = 0, x = changes.deletedRecords.length; i < x; i++) {
        _loop_3(i, x);
      }
      req.push("--" + initialGuid + "--", "");
      return {
        type: "POST",
        url,
        contentType: "multipart/mixed; boundary=" + initialGuid,
        data: req.join("\r\n")
      };
    };
    WebApiAdaptor3.prototype.beforeSend = function(dm, request, settings) {
      request.headers.set("Accept", "application/json, text/javascript, */*; q=0.01");
    };
    WebApiAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      var pvtData = "pvtData";
      var pvt = request && request[pvtData];
      var count = null;
      var args = {};
      if (request && request.type.toLowerCase() !== "post") {
        var versionCheck = xhr && request.fetchRequest.headers.get("DataServiceVersion");
        var version = versionCheck && parseInt(versionCheck, 10) || 2;
        if (query && query.isCountRequired) {
          if (!DataUtil.isNull(data.Count)) {
            count = data.Count;
          }
        }
        if (version < 3 && data.Items) {
          data = data.Items;
        }
        args.count = count;
        args.result = data;
        this.getAggregateResult(pvt, data, args, null, query);
      }
      args.result = args.result || data;
      return DataUtil.isNull(count) ? args.result : {
        result: args.result,
        count: args.count,
        aggregates: args.aggregates
      };
    };
    return WebApiAdaptor3;
  }(ODataAdaptor)
);
var WebMethodAdaptor = (
  /** @class */
  function(_super) {
    __extends24(WebMethodAdaptor3, _super);
    function WebMethodAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    WebMethodAdaptor3.prototype.processQuery = function(dm, query, hierarchyFilters) {
      var obj = new UrlAdaptor().processQuery(dm, query, hierarchyFilters);
      var getData = "data";
      var data = DataUtil.parse.parseJson(obj[getData]);
      var result = {};
      var value = "value";
      if (data.param) {
        for (var i = 0; i < data.param.length; i++) {
          var param = data.param[i];
          var key = Object.keys(param)[0];
          result[key] = param[key];
        }
      }
      result[value] = data;
      var pvtData = "pvtData";
      var url = "url";
      return {
        data: JSON.stringify(result, DataUtil.parse.jsonDateReplacer),
        url: obj[url],
        pvtData: obj[pvtData],
        type: "POST",
        contentType: "application/json; charset=utf-8"
      };
    };
    return WebMethodAdaptor3;
  }(UrlAdaptor)
);
var RemoteSaveAdaptor = (
  /** @class */
  function(_super) {
    __extends24(RemoteSaveAdaptor3, _super);
    function RemoteSaveAdaptor3() {
      var _this = _super.call(this) || this;
      setValue3("beforeSend", UrlAdaptor.prototype.beforeSend, _this);
      return _this;
    }
    RemoteSaveAdaptor3.prototype.insert = function(dm, data, tableName, query, position) {
      this.pvt.position = position;
      this.updateType = "add";
      return {
        url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend2({}, {
          value: data,
          table: tableName,
          action: "insert"
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.remove = function(dm, keyField, val, tableName, query) {
      _super.prototype.remove.call(this, dm, keyField, val);
      return {
        type: "POST",
        url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend2({}, {
          key: val,
          keyColumn: keyField,
          table: tableName,
          action: "remove"
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.update = function(dm, keyField, val, tableName, query) {
      this.updateType = "update";
      this.updateKey = keyField;
      return {
        type: "POST",
        url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend2({}, {
          value: val,
          action: "update",
          keyColumn: keyField,
          key: val[keyField],
          table: tableName
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes, e) {
      var i;
      var newData = request ? JSON.parse(request.data) : data;
      data = newData.action === "batch" ? DataUtil.parse.parseJson(data) : data;
      if (this.updateType === "add") {
        _super.prototype.insert.call(this, ds, data, null, null, this.pvt.position);
      }
      if (this.updateType === "update") {
        _super.prototype.update.call(this, ds, this.updateKey, data);
      }
      this.updateType = void 0;
      if (data.added) {
        for (i = 0; i < data.added.length; i++) {
          _super.prototype.insert.call(this, ds, data.added[i]);
        }
      }
      if (data.changed) {
        for (i = 0; i < data.changed.length; i++) {
          _super.prototype.update.call(this, ds, e.key, data.changed[i]);
        }
      }
      if (data.deleted) {
        for (i = 0; i < data.deleted.length; i++) {
          _super.prototype.remove.call(this, ds, e.key, data.deleted[i]);
        }
      }
      return data;
    };
    RemoteSaveAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      return {
        type: "POST",
        url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: JSON.stringify(extend2({}, {
          changed: changes.changedRecords,
          added: changes.addedRecords,
          deleted: changes.deletedRecords,
          action: "batch",
          table: e.url,
          key: e.key
        }, DataUtil.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.addParams = function(options) {
      var urlParams = new UrlAdaptor();
      urlParams.addParams(options);
    };
    return RemoteSaveAdaptor3;
  }(JsonAdaptor)
);
var CustomDataAdaptor = (
  /** @class */
  function(_super) {
    __extends24(CustomDataAdaptor3, _super);
    function CustomDataAdaptor3(props) {
      var _this = _super.call(this) || this;
      _this.options = extend2({}, _this.options, {
        getData: function() {
        },
        addRecord: function() {
        },
        updateRecord: function() {
        },
        deleteRecord: function() {
        },
        batchUpdate: function() {
        }
      });
      extend2(_this.options, props || {});
      return _this;
    }
    CustomDataAdaptor3.prototype.getModuleName = function() {
      return "CustomDataAdaptor";
    };
    return CustomDataAdaptor3;
  }(UrlAdaptor)
);
var GraphQLAdaptor = (
  /** @class */
  function(_super) {
    __extends24(GraphQLAdaptor3, _super);
    function GraphQLAdaptor3(options) {
      var _this = _super.call(this) || this;
      _this.opt = options;
      _this.schema = _this.opt.response;
      _this.query = _this.opt.query;
      _this.getVariables = _this.opt.getVariables ? _this.opt.getVariables : function() {
      };
      _this.getQuery = function() {
        return _this.query;
      };
      return _this;
    }
    GraphQLAdaptor3.prototype.getModuleName = function() {
      return "GraphQLAdaptor";
    };
    GraphQLAdaptor3.prototype.processQuery = function(datamanager, query) {
      var urlQuery = _super.prototype.processQuery.apply(this, arguments);
      var dm = JSON.parse(urlQuery.data);
      var keys4 = ["skip", "take", "sorted", "table", "select", "where", "search", "requiresCounts", "aggregates", "params"];
      var temp = {};
      var str = "searchwhereparams";
      keys4.filter(function(e) {
        temp[e] = str.indexOf(e) > -1 ? JSON.stringify(dm[e]) : dm[e];
      });
      var vars = this.getVariables() || {};
      vars["datamanager"] = temp;
      var data = JSON.stringify({
        query: this.getQuery(),
        variables: vars
      });
      urlQuery.data = data;
      return urlQuery;
    };
    GraphQLAdaptor3.prototype.processResponse = function(resData, ds, query, xhr, request) {
      var res = resData;
      var count;
      var aggregates;
      var result = getValue2(this.schema.result, res.data);
      if (this.schema.count) {
        count = getValue2(this.schema.count, res.data);
      }
      if (this.schema.aggregates) {
        aggregates = getValue2(this.schema.aggregates, res.data);
        aggregates = !isNullOrUndefined2(aggregates) ? DataUtil.parse.parseJson(aggregates) : aggregates;
      }
      var pvt = request.pvtData || {};
      var args = {
        result,
        aggregates
      };
      var data = args;
      if (pvt && pvt.groups && pvt.groups.length) {
        this.getAggregateResult(pvt, data, args, null, query);
      }
      return !isNullOrUndefined2(count) ? {
        result: args.result,
        count,
        aggregates
      } : args.result;
    };
    GraphQLAdaptor3.prototype.insert = function() {
      var inserted = _super.prototype.insert.apply(this, arguments);
      return this.generateCrudData(inserted, "insert");
    };
    GraphQLAdaptor3.prototype.update = function() {
      var inserted = _super.prototype.update.apply(this, arguments);
      return this.generateCrudData(inserted, "update");
    };
    GraphQLAdaptor3.prototype.remove = function() {
      var inserted = _super.prototype.remove.apply(this, arguments);
      return this.generateCrudData(inserted, "remove");
    };
    GraphQLAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      var batch = _super.prototype.batchRequest.apply(this, arguments);
      var bData = JSON.parse(batch.data);
      bData.key = e.key;
      batch.data = JSON.stringify(bData);
      return this.generateCrudData(batch, "batch");
    };
    GraphQLAdaptor3.prototype.generateCrudData = function(crudData, action) {
      var parsed = JSON.parse(crudData.data);
      crudData.data = JSON.stringify({
        query: this.opt.getMutation(action),
        variables: parsed
      });
      return crudData;
    };
    return GraphQLAdaptor3;
  }(UrlAdaptor)
);
var CacheAdaptor = (
  /** @class */
  function(_super) {
    __extends24(CacheAdaptor3, _super);
    function CacheAdaptor3(adaptor, timeStamp, pageSize) {
      var _this = _super.call(this) || this;
      _this.isCrudAction = false;
      _this.isInsertAction = false;
      if (!isNullOrUndefined2(adaptor)) {
        _this.cacheAdaptor = adaptor;
      }
      _this.pageSize = pageSize;
      _this.guidId = DataUtil.getGuid("cacheAdaptor");
      var obj = {
        keys: [],
        results: []
      };
      window.localStorage.setItem(_this.guidId, JSON.stringify(obj));
      var guid = _this.guidId;
      if (!isNullOrUndefined2(timeStamp)) {
        setInterval(function() {
          var data = DataUtil.parse.parseJson(window.localStorage.getItem(guid));
          var forDel = [];
          for (var i = 0; i < data.results.length; i++) {
            var currentTime = +/* @__PURE__ */ new Date();
            var requestTime = +new Date(data.results[i].timeStamp);
            data.results[i].timeStamp = currentTime - requestTime;
            if (currentTime - requestTime > timeStamp) {
              forDel.push(i);
            }
          }
          for (var i = 0; i < forDel.length; i++) {
            data.results.splice(forDel[i], 1);
            data.keys.splice(forDel[i], 1);
          }
          window.localStorage.removeItem(guid);
          window.localStorage.setItem(guid, JSON.stringify(data));
        }, timeStamp);
      }
      return _this;
    }
    CacheAdaptor3.prototype.generateKey = function(url, query) {
      var queries = this.getQueryRequest(query);
      var singles = Query.filterQueryLists(query.queries, ["onSelect", "onPage", "onSkip", "onTake", "onRange"]);
      var key = url;
      var page = "onPage";
      if (page in singles) {
        key += singles[page].pageIndex;
      }
      queries.sorts.forEach(function(obj) {
        key += obj.e.direction + obj.e.fieldName;
      });
      queries.groups.forEach(function(obj) {
        key += obj.e.fieldName;
      });
      queries.searches.forEach(function(obj) {
        key += obj.e.searchKey;
      });
      for (var filter = 0; filter < queries.filters.length; filter++) {
        var currentFilter = queries.filters[filter];
        if (currentFilter.e.isComplex) {
          var newQuery = query.clone();
          newQuery.queries = [];
          for (var i = 0; i < currentFilter.e.predicates.length; i++) {
            newQuery.queries.push({
              fn: "onWhere",
              e: currentFilter.e.predicates[i],
              filter: query.queries.filter
            });
          }
          key += currentFilter.e.condition + this.generateKey(url, newQuery);
        } else {
          key += currentFilter.e.field + currentFilter.e.operator + currentFilter.e.value;
        }
      }
      return key;
    };
    CacheAdaptor3.prototype.processQuery = function(dm, query, hierarchyFilters) {
      var key = this.generateKey(dm.dataSource.url, query);
      var cachedItems = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId));
      var data = cachedItems ? cachedItems.results[cachedItems.keys.indexOf(key)] : null;
      if (data != null && !this.isCrudAction && !this.isInsertAction) {
        return data;
      }
      this.isCrudAction = null;
      this.isInsertAction = null;
      return this.cacheAdaptor.processQuery.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
    };
    CacheAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      if (this.isInsertAction || request && this.cacheAdaptor.options.batch && DataUtil.endsWith(request.url, this.cacheAdaptor.options.batch) && request.type.toLowerCase() === "post") {
        return this.cacheAdaptor.processResponse(data, ds, query, xhr, request, changes);
      }
      data = this.cacheAdaptor.processResponse.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
      var key = query ? this.generateKey(ds.dataSource.url, query) : ds.dataSource.url;
      var obj = {};
      obj = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId));
      var index = obj.keys.indexOf(key);
      if (index !== -1) {
        obj.results.splice(index, 1);
        obj.keys.splice(index, 1);
      }
      obj.results[obj.keys.push(key) - 1] = {
        keys: key,
        result: data.result,
        timeStamp: /* @__PURE__ */ new Date(),
        count: data.count
      };
      while (obj.results.length > this.pageSize) {
        obj.results.splice(0, 1);
        obj.keys.splice(0, 1);
      }
      window.localStorage.setItem(this.guidId, JSON.stringify(obj));
      return data;
    };
    CacheAdaptor3.prototype.beforeSend = function(dm, request, settings) {
      if (!isNullOrUndefined2(this.cacheAdaptor.options.batch) && DataUtil.endsWith(settings.url, this.cacheAdaptor.options.batch) && settings.type.toLowerCase() === "post") {
        request.headers.set("Accept", this.cacheAdaptor.options.multipartAccept);
      }
      if (!dm.dataSource.crossDomain) {
        request.headers.set("Accept", this.cacheAdaptor.options.accept);
      }
    };
    CacheAdaptor3.prototype.update = function(dm, keyField, value, tableName) {
      this.isCrudAction = true;
      return this.cacheAdaptor.update(dm, keyField, value, tableName);
    };
    CacheAdaptor3.prototype.insert = function(dm, data, tableName) {
      this.isInsertAction = true;
      return this.cacheAdaptor.insert(dm, data, tableName);
    };
    CacheAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      this.isCrudAction = true;
      return this.cacheAdaptor.remove(dm, keyField, value, tableName);
    };
    CacheAdaptor3.prototype.batchRequest = function(dm, changes, e) {
      return this.cacheAdaptor.batchRequest(dm, changes, e);
    };
    return CacheAdaptor3;
  }(UrlAdaptor)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-data/src/manager.js
var DataManager = (
  /** @class */
  function() {
    function DataManager3(dataSource, query, adaptor) {
      var _this = this;
      this.dateParse = true;
      this.timeZoneHandling = true;
      this.persistQuery = {};
      this.isInitialLoad = false;
      this.requests = [];
      this.isInitialLoad = true;
      if (!dataSource && !this.dataSource) {
        dataSource = [];
      }
      adaptor = adaptor || dataSource.adaptor;
      if (dataSource && dataSource.timeZoneHandling === false) {
        this.timeZoneHandling = dataSource.timeZoneHandling;
      }
      var data;
      if (dataSource instanceof Array) {
        data = {
          json: dataSource,
          offline: true
        };
      } else if (typeof dataSource === "object") {
        if (!dataSource.json) {
          dataSource.json = [];
        }
        if (!dataSource.enablePersistence) {
          dataSource.enablePersistence = false;
        }
        if (!dataSource.id) {
          dataSource.id = "";
        }
        if (!dataSource.ignoreOnPersist) {
          dataSource.ignoreOnPersist = [];
        }
        data = {
          url: dataSource.url,
          insertUrl: dataSource.insertUrl,
          removeUrl: dataSource.removeUrl,
          updateUrl: dataSource.updateUrl,
          crudUrl: dataSource.crudUrl,
          batchUrl: dataSource.batchUrl,
          json: dataSource.json,
          headers: dataSource.headers,
          accept: dataSource.accept,
          data: dataSource.data,
          timeTillExpiration: dataSource.timeTillExpiration,
          cachingPageSize: dataSource.cachingPageSize,
          enableCaching: dataSource.enableCaching,
          requestType: dataSource.requestType,
          key: dataSource.key,
          crossDomain: dataSource.crossDomain,
          jsonp: dataSource.jsonp,
          dataType: dataSource.dataType,
          offline: dataSource.offline !== void 0 ? dataSource.offline : dataSource.adaptor instanceof RemoteSaveAdaptor || dataSource.adaptor instanceof CustomDataAdaptor ? false : dataSource.url ? false : true,
          requiresFormat: dataSource.requiresFormat,
          enablePersistence: dataSource.enablePersistence,
          id: dataSource.id,
          ignoreOnPersist: dataSource.ignoreOnPersist
        };
      } else {
        DataUtil.throwError("DataManager: Invalid arguments");
      }
      if (data.requiresFormat === void 0 && !DataUtil.isCors()) {
        data.requiresFormat = isNullOrUndefined2(data.crossDomain) ? true : data.crossDomain;
      }
      if (data.dataType === void 0) {
        data.dataType = "json";
      }
      this.dataSource = data;
      this.defaultQuery = query;
      if (this.dataSource.enablePersistence && this.dataSource.id) {
        window.addEventListener("unload", this.setPersistData.bind(this));
      }
      if (data.url && data.offline && !data.json.length) {
        this.isDataAvailable = false;
        this.adaptor = adaptor || new ODataAdaptor();
        this.dataSource.offline = false;
        this.ready = this.executeQuery(query || new Query());
        this.ready.then(function(e) {
          _this.dataSource.offline = true;
          _this.isDataAvailable = true;
          data.json = e.result;
          _this.adaptor = new JsonAdaptor();
        });
      } else {
        this.adaptor = data.offline ? new JsonAdaptor() : new ODataAdaptor();
      }
      if (!data.jsonp && this.adaptor instanceof ODataAdaptor) {
        data.jsonp = "callback";
      }
      this.adaptor = adaptor || this.adaptor;
      if (data.enableCaching) {
        this.adaptor = new CacheAdaptor(this.adaptor, data.timeTillExpiration, data.cachingPageSize);
      }
      return this;
    }
    Object.defineProperty(DataManager3.prototype, "moduleName", {
      /** @hidden */
      get: function() {
        return "datamanager";
      },
      enumerable: true,
      configurable: true
    });
    ;
    DataManager3.prototype.getPersistedData = function(id) {
      var persistedData = localStorage.getItem(id || this.dataSource.id);
      return JSON.parse(persistedData);
    };
    DataManager3.prototype.setPersistData = function(e, id, persistData) {
      localStorage.setItem(id || this.dataSource.id, JSON.stringify(persistData || this.persistQuery));
    };
    DataManager3.prototype.setPersistQuery = function(query) {
      var _this = this;
      var persistedQuery = this.getPersistedData();
      if (this.isInitialLoad && persistedQuery && Object.keys(persistedQuery).length) {
        this.persistQuery = persistedQuery;
        this.persistQuery.queries = this.persistQuery.queries.filter(function(query2) {
          if (_this.dataSource.ignoreOnPersist && _this.dataSource.ignoreOnPersist.length) {
            if (query2.fn && _this.dataSource.ignoreOnPersist.some(function(keyword) {
              return query2.fn === keyword;
            })) {
              return false;
            }
          }
          if (query2.fn === "onWhere") {
            var e = query2.e;
            if (e && e.isComplex && e.predicates instanceof Array) {
              var allPredicates = e.predicates.map(function(predicateObj) {
                if (predicateObj.predicates && predicateObj.predicates instanceof Array) {
                  var nestedPredicates = predicateObj.predicates.map(function(nestedPredicate) {
                    var field2 = nestedPredicate.field, operator2 = nestedPredicate.operator, value2 = nestedPredicate.value, ignoreCase2 = nestedPredicate.ignoreCase, ignoreAccent2 = nestedPredicate.ignoreAccent, matchCase2 = nestedPredicate.matchCase;
                    return new Predicate(field2, operator2, value2, ignoreCase2, ignoreAccent2, matchCase2);
                  });
                  return predicateObj.condition === "and" ? Predicate.and(nestedPredicates) : Predicate.or(nestedPredicates);
                } else {
                  var field = predicateObj.field, operator = predicateObj.operator, value = predicateObj.value, ignoreCase = predicateObj.ignoreCase, ignoreAccent = predicateObj.ignoreAccent, matchCase = predicateObj.matchCase;
                  return new Predicate(field, operator, value, ignoreCase, ignoreAccent, matchCase);
                }
              });
              query2.e = new Predicate(allPredicates[0], e.condition, allPredicates.slice(1));
            }
          }
          return true;
        });
        var newQuery = extend2(new Query(), this.persistQuery);
        this.isInitialLoad = false;
        return newQuery;
      } else {
        this.persistQuery = query;
        this.isInitialLoad = false;
        return query;
      }
    };
    DataManager3.prototype.setDefaultQuery = function(query) {
      this.defaultQuery = query;
      return this;
    };
    DataManager3.prototype.executeLocal = function(query) {
      if (!this.defaultQuery && !(query instanceof Query)) {
        DataUtil.throwError("DataManager - executeLocal() : A query is required to execute");
      }
      if (!this.dataSource.json) {
        DataUtil.throwError("DataManager - executeLocal() : Json data is required to execute");
      }
      if (this.dataSource.enablePersistence && this.dataSource.id) {
        query = this.setPersistQuery(query);
      }
      query = query || this.defaultQuery;
      var result = this.adaptor.processQuery(this, query);
      if (query.subQuery) {
        var from = query.subQuery.fromTable;
        var lookup = query.subQuery.lookups;
        var res = query.isCountRequired ? result.result : result;
        if (lookup && lookup instanceof Array) {
          DataUtil.buildHierarchy(query.subQuery.fKey, from, res, lookup, query.subQuery.key);
        }
        for (var j = 0; j < res.length; j++) {
          if (res[j][from] instanceof Array) {
            res[j] = extend2({}, {}, res[j]);
            res[j][from] = this.adaptor.processResponse(query.subQuery.using(new DataManager3(res[j][from].slice(0))).executeLocal(), this, query);
          }
        }
      }
      return this.adaptor.processResponse(result, this, query);
    };
    DataManager3.prototype.executeQuery = function(query, done, fail, always) {
      var _this = this;
      var makeRequest = "makeRequest";
      if (this.dataSource.enablePersistence && this.dataSource.id) {
        query = this.setPersistQuery(query);
      }
      if (typeof query === "function") {
        always = fail;
        fail = done;
        done = query;
        query = null;
      }
      if (!query) {
        query = this.defaultQuery;
      }
      if (!(query instanceof Query)) {
        DataUtil.throwError("DataManager - executeQuery() : A query is required to execute");
      }
      var deffered = new Deferred();
      var args = {
        query
      };
      if (!this.dataSource.offline && this.dataSource.url !== void 0 && this.dataSource.url !== "" || !isNullOrUndefined2(this.adaptor[makeRequest]) || this.isCustomDataAdaptor(this.adaptor)) {
        var result = this.adaptor.processQuery(this, query);
        if (!isNullOrUndefined2(this.adaptor[makeRequest])) {
          this.adaptor[makeRequest](result, deffered, args, query);
        } else if (!isNullOrUndefined2(result.url) || this.isCustomDataAdaptor(this.adaptor)) {
          this.requests = [];
          this.makeRequest(result, deffered, args, query);
        } else {
          args = DataManager3.getDeferedArgs(query, result, args);
          deffered.resolve(args);
        }
      } else {
        DataManager3.nextTick(function() {
          var res = _this.executeLocal(query);
          args = DataManager3.getDeferedArgs(query, res, args);
          deffered.resolve(args);
        });
      }
      if (done || fail) {
        deffered.promise.then(done, fail);
      }
      if (always) {
        deffered.promise.then(always, always);
      }
      return deffered.promise;
    };
    DataManager3.getDeferedArgs = function(query, result, args) {
      if (query.isCountRequired) {
        args.result = result.result;
        args.count = result.count;
        args.aggregates = result.aggregates;
      } else {
        args.result = result;
      }
      return args;
    };
    DataManager3.nextTick = function(fn) {
      (window.setImmediate || window.setTimeout)(fn, 0);
    };
    DataManager3.prototype.extendRequest = function(url, fnSuccess, fnFail) {
      return extend2({}, {
        type: "GET",
        dataType: this.dataSource.dataType,
        crossDomain: this.dataSource.crossDomain,
        jsonp: this.dataSource.jsonp,
        cache: true,
        processData: false,
        onSuccess: fnSuccess,
        onFailure: fnFail
      }, url);
    };
    DataManager3.prototype.makeRequest = function(url, deffered, args, query) {
      var _this = this;
      var isSelector = !!query.subQuerySelector;
      var fnFail = function(e) {
        args.error = e;
        deffered.reject(args);
      };
      var process = function(data, count, xhr, request2, actual, aggregates, virtualSelectRecords) {
        args.xhr = xhr;
        args.count = count ? parseInt(count.toString(), 10) : 0;
        args.result = data;
        args.request = request2;
        args.aggregates = aggregates;
        args.actual = actual;
        args.virtualSelectRecords = virtualSelectRecords;
        deffered.resolve(args);
      };
      var fnQueryChild = function(data, selector) {
        var subDeffer = new Deferred();
        var childArgs = {
          parent: args
        };
        query.subQuery.isChild = true;
        var subUrl = _this.adaptor.processQuery(_this, query.subQuery, data ? _this.adaptor.processResponse(data) : selector);
        var childReq = _this.makeRequest(subUrl, subDeffer, childArgs, query.subQuery);
        if (!isSelector) {
          subDeffer.then(function(subData) {
            if (data) {
              DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, data, subData, query.subQuery.key);
              process(data, subData.count, subData.xhr);
            }
          }, fnFail);
        }
        return childReq;
      };
      var fnSuccess = function(data, request2) {
        if (_this.isGraphQLAdaptor(_this.adaptor)) {
          if (!isNullOrUndefined2(data["errors"])) {
            return fnFail(data["errors"], request2);
          }
        }
        if (_this.isCustomDataAdaptor(_this.adaptor)) {
          request2 = extend2({}, _this.fetchReqOption, request2);
        }
        if (request2.contentType.indexOf("xml") === -1 && _this.dateParse) {
          data = DataUtil.parse.parseJson(data);
        }
        var result = _this.adaptor.processResponse(data, _this, query, request2.fetchRequest, request2);
        var count = 0;
        var aggregates = null;
        var virtualSelectRecords = "virtualSelectRecords";
        var virtualRecords = data[virtualSelectRecords];
        if (query.isCountRequired) {
          count = result.count;
          aggregates = result.aggregates;
          result = result.result;
        }
        if (!query.subQuery) {
          process(result, count, request2.fetchRequest, request2.type, data, aggregates, virtualRecords);
          return;
        }
        if (!isSelector) {
          fnQueryChild(result, request2);
        }
      };
      var req = this.extendRequest(url, fnSuccess, fnFail);
      if (!this.isCustomDataAdaptor(this.adaptor)) {
        var fetch_1 = new Fetch2(req);
        fetch_1.beforeSend = function() {
          _this.beforeSend(fetch_1.fetchRequest, fetch_1);
        };
        req = fetch_1.send();
        req.catch(function(e) {
          return true;
        });
        this.requests.push(fetch_1);
      } else {
        this.fetchReqOption = req;
        var request = req;
        this.adaptor.options.getData({
          data: request.data,
          onSuccess: request.onSuccess,
          onFailure: request.onFailure
        });
      }
      if (isSelector) {
        var promise = void 0;
        var res = query.subQuerySelector.call(this, {
          query: query.subQuery,
          parent: query
        });
        if (res && res.length) {
          promise = Promise.all([req, fnQueryChild(null, res)]);
          promise.then(function() {
            var args2 = [];
            for (var _i = 0; _i < arguments.length; _i++) {
              args2[_i] = arguments[_i];
            }
            var result = args2[0];
            var pResult = _this.adaptor.processResponse(result[0], _this, query, _this.requests[0].fetchRequest, _this.requests[0]);
            var count = 0;
            if (query.isCountRequired) {
              count = pResult.count;
              pResult = pResult.result;
            }
            var cResult = _this.adaptor.processResponse(result[1], _this, query.subQuery, _this.requests[1].fetchRequest, _this.requests[1]);
            count = 0;
            if (query.subQuery.isCountRequired) {
              count = cResult.count;
              cResult = cResult.result;
            }
            DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, pResult, cResult, query.subQuery.key);
            isSelector = false;
            process(pResult, count, _this.requests[0].fetchRequest);
          });
        } else {
          isSelector = false;
        }
      }
      return req;
    };
    DataManager3.prototype.beforeSend = function(request, settings) {
      this.adaptor.beforeSend(this, request, settings);
      var headers = this.dataSource.headers;
      var props;
      for (var i = 0; headers && i < headers.length; i++) {
        props = [];
        var keys4 = Object.keys(headers[i]);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var prop = keys_1[_i];
          props.push(prop);
          request.headers.set(prop, headers[i][prop]);
        }
      }
    };
    DataManager3.prototype.saveChanges = function(changes, key, tableName, query, original) {
      var _this = this;
      if (tableName instanceof Query) {
        query = tableName;
        tableName = null;
      }
      var args = {
        url: tableName,
        key: key || this.dataSource.key
      };
      var req = this.adaptor.batchRequest(this, changes, args, query || new Query(), original);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return req;
      }
      if (!isNullOrUndefined2(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](req);
      } else if (!this.isCustomDataAdaptor(this.adaptor)) {
        var deff_1 = new Deferred();
        var fetch_2 = new Fetch2(req);
        fetch_2.beforeSend = function() {
          _this.beforeSend(fetch_2.fetchRequest, fetch_2);
        };
        fetch_2.onSuccess = function(data, request) {
          if (_this.isGraphQLAdaptor(_this.adaptor)) {
            if (!isNullOrUndefined2(data["errors"])) {
              fetch_2.onFailure(JSON.stringify(data["errors"]));
            }
          }
          deff_1.resolve(_this.adaptor.processResponse(data, _this, null, request.fetchRequest, request, changes, args));
        };
        fetch_2.onFailure = function(e) {
          deff_1.reject([{
            error: e
          }]);
        };
        fetch_2.send().catch(function(e) {
          return true;
        });
        return deff_1.promise;
      } else {
        return this.dofetchRequest(req, this.adaptor.options.batchUpdate, changes);
      }
    };
    DataManager3.prototype.insert = function(data, tableName, query, position) {
      if (tableName instanceof Query) {
        query = tableName;
        tableName = null;
      }
      var req = this.adaptor.insert(this, data, tableName, query, position);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return req;
      }
      if (!isNullOrUndefined2(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](req);
      } else {
        return this.dofetchRequest(req, this.adaptor.options.addRecord);
      }
    };
    DataManager3.prototype.remove = function(keyField, value, tableName, query) {
      if (typeof value === "object") {
        value = DataUtil.getObject(keyField, value);
      }
      if (tableName instanceof Query) {
        query = tableName;
        tableName = null;
      }
      var res = this.adaptor.remove(this, keyField, value, tableName, query);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return res;
      }
      if (!isNullOrUndefined2(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](res);
      } else {
        var remove3 = this.adaptor.options.deleteRecord;
        return this.dofetchRequest(res, remove3);
      }
    };
    DataManager3.prototype.update = function(keyField, value, tableName, query, original) {
      if (tableName instanceof Query) {
        query = tableName;
        tableName = null;
      }
      var res = this.adaptor.update(this, keyField, value, tableName, query, original);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return res;
      }
      if (!isNullOrUndefined2(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](res);
      } else {
        var update = this.adaptor.options.updateRecord;
        return this.dofetchRequest(res, update);
      }
    };
    DataManager3.prototype.isCustomDataAdaptor = function(dataSource) {
      return this.adaptor.getModuleName && this.adaptor.getModuleName() === "CustomDataAdaptor";
    };
    DataManager3.prototype.isGraphQLAdaptor = function(dataSource) {
      return this.adaptor.getModuleName && this.adaptor.getModuleName() === "GraphQLAdaptor";
    };
    DataManager3.prototype.successFunc = function(record, request, changes) {
      if (this.isGraphQLAdaptor(this.adaptor)) {
        var data = typeof record === "object" ? record : JSON.parse(record);
        if (!isNullOrUndefined2(data["errors"])) {
          this.failureFunc(JSON.stringify(data["errors"]));
        }
      }
      if (this.isCustomDataAdaptor(this.adaptor)) {
        request = extend2({}, this.fetchReqOption, request);
      }
      try {
        DataUtil.parse.parseJson(record);
      } catch (e) {
        record = [];
      }
      record = this.adaptor.processResponse(DataUtil.parse.parseJson(record), this, null, request.fetchRequest, request, changes);
      this.fetchDeffered.resolve(record);
    };
    DataManager3.prototype.failureFunc = function(e) {
      this.fetchDeffered.reject([{
        error: e
      }]);
    };
    DataManager3.prototype.dofetchRequest = function(res, fetchFunc, changes) {
      var _this = this;
      res = extend2({}, {
        type: "POST",
        contentType: "application/json; charset=utf-8",
        processData: false
      }, res);
      this.fetchDeffered = new Deferred();
      if (!this.isCustomDataAdaptor(this.adaptor)) {
        var fetch_3 = new Fetch2(res);
        fetch_3.beforeSend = function() {
          _this.beforeSend(fetch_3.fetchRequest, fetch_3);
        };
        fetch_3.onSuccess = this.successFunc.bind(this);
        fetch_3.onFailure = this.failureFunc.bind(this);
        fetch_3.send().catch(function(e) {
          return true;
        });
      } else {
        this.fetchReqOption = res;
        fetchFunc.call(this, {
          data: res.data,
          onSuccess: this.successFunc.bind(this),
          onFailure: this.failureFunc.bind(this),
          changes
        });
      }
      return this.fetchDeffered.promise;
    };
    DataManager3.prototype.clearPersistence = function() {
      window.removeEventListener("unload", this.setPersistData.bind(this));
      this.dataSource.enablePersistence = false;
      this.persistQuery = {};
      window.localStorage.setItem(this.dataSource.id, "[]");
    };
    return DataManager3;
  }()
);
var Deferred = (
  /** @class */
  /* @__PURE__ */ function() {
    function Deferred4() {
      var _this = this;
      this.promise = new Promise(function(resolve, reject) {
        _this.resolve = resolve;
        _this.reject = reject;
      });
      this.then = this.promise.then.bind(this.promise);
      this.catch = this.promise.catch.bind(this.promise);
    }
    return Deferred4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/constant.js
var actionBegin = "actionBegin";
var actionComplete = "actionComplete";
var actionFailure = "actionFailure";
var cardClick = "cardClick";
var cardDoubleClick = "cardDoubleClick";
var cardRendered = "cardRendered";
var queryCellInfo = "queryCellInfo";
var dataBinding = "dataBinding";
var dataBound = "dataBound";
var dragStart = "dragStart";
var drag = "drag";
var dragStop = "dragStop";
var documentClick = "document-click";
var dialogOpen = "dialogOpen";
var dialogClose = "dialogClose";
var contentReady = "content-ready";
var dataReady = "data-ready";
var bottomSpace = 25;
var cardSpace = 16;
var toggleWidth = 50;
var dataSourceChanged = "dataSourceChanged";
var dataStateChange = "dataStateChange";

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/data.js
var Data = (
  /** @class */
  function() {
    function Data2(parent) {
      this.initload = false;
      this.dataState = {
        isPending: false,
        resolver: null,
        isDataChanged: false
      };
      this.parent = parent;
      this.keyField = this.parent.cardSettings.headerField;
      this.dataState = {
        isDataChanged: false
      };
      this.isObservable = false;
      this.initDataManager(parent.dataSource, parent.query);
      this.refreshDataManager();
    }
    Data2.prototype.initDataManager = function(dataSource, query) {
      this.dataManager = dataSource instanceof DataManager ? dataSource : new DataManager(dataSource);
      this.query = query instanceof Query ? query : new Query();
      this.kanbanData = new DataManager(this.parent.kanbanData);
    };
    Data2.prototype.isRemote = function() {
      return this.dataManager.dataSource.offline !== true && this.dataManager.dataSource.url !== void 0 && this.dataManager.dataSource.url !== "";
    };
    Data2.prototype.columnKeyFields = function() {
      var columns = [];
      for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
        var column = _a[_i];
        if (column.keyField.toString().split(",").length > 1) {
          for (var _b = 0, _c = column.keyField.toString().split(","); _b < _c.length; _b++) {
            var innerColumns = _c[_b];
            columns.push(innerColumns.trim());
          }
        } else {
          columns.push(column.keyField.toString());
        }
      }
      return columns;
    };
    Data2.prototype.getQuery = function(parameter) {
      var query = this.query.clone();
      if (this.isRemote() && this.parent.enableVirtualization) {
        var cardHeight = this.parent.cardHeight === "auto" ? 100 : parseInt(formatUnit(this.parent.cardHeight).split("px")[0], 10);
        var take = this.parent.height === "auto" ? Math.ceil(window.innerHeight / cardHeight) * 2 : Math.ceil(parseInt(formatUnit(this.parent.height).split("px")[0], 10) / cardHeight) * 2;
        var columns = this.columnKeyFields();
        for (var i = 0; i < columns.length; i++) {
          query.where(this.parent.keyField, "equal", columns[i]);
        }
        query.take(take);
        if (isNullOrUndefined2(parameter)) {
          parameter = "KanbanVirtualization";
        }
        query.addParams("KanbanVirtualization", parameter);
      }
      return query;
    };
    Data2.prototype.getData = function(query) {
      if (this.parent.dataSource && "result" in this.parent.dataSource) {
        var def = this.eventPromise({
          requestType: ""
        }, query);
        this.isObservable = true;
        return def.promise;
      }
      return this.dataManager.executeQuery(query);
    };
    Data2.prototype.setState = function(state) {
      return this.dataState = state;
    };
    Data2.prototype.getStateEventArgument = function(query) {
      var adaptr = new UrlAdaptor();
      var dm = new DataManager({
        url: "",
        adaptor: new UrlAdaptor()
      });
      var state = adaptr.processQuery(dm, query);
      var data = JSON.parse(state.data);
      return extend2(data, state.pvtData);
    };
    Data2.prototype.eventPromise = function(args, query, index) {
      var _this = this;
      var dataArgs = args;
      var state = this.getStateEventArgument(query);
      var def = new Deferred();
      var deff = new Deferred();
      if (args.requestType !== void 0 && this.dataState.isDataChanged !== false) {
        state.action = args;
        if (args.requestType === "cardChanged" || args.requestType === "cardRemoved" || args.requestType === "cardCreated") {
          var editArgs_1 = args;
          editArgs_1.promise = deff.promise;
          editArgs_1.state = state;
          editArgs_1.index = index;
          this.setState({
            isPending: true,
            resolver: deff.resolve
          });
          dataArgs.endEdit = deff.resolve;
          dataArgs.cancelEdit = deff.reject;
          this.parent.trigger(dataSourceChanged, editArgs_1);
          deff.promise.then(function() {
            _this.setState({
              isPending: true,
              resolver: def.resolve
            });
            _this.parent.trigger(dataStateChange, state);
            editArgs_1.addedRecords.forEach(function(data) {
              _this.parent.kanbanData.push(data);
            });
            editArgs_1.changedRecords.forEach(function(changedRecord) {
              var cardObj = _this.parent.kanbanData.filter(function(data) {
                return data[_this.parent.cardSettings.headerField] === changedRecord[_this.parent.cardSettings.headerField];
              })[0];
              extend2(cardObj, changedRecord);
            });
            editArgs_1.deletedRecords.forEach(function(deletedRecord) {
              var index2 = _this.parent.kanbanData.findIndex(function(data) {
                return data[_this.parent.cardSettings.headerField] === deletedRecord[_this.parent.cardSettings.headerField];
              });
              _this.parent.kanbanData.splice(index2, 1);
            });
          }).catch(function() {
            _this.parent.hideSpinner();
          });
        } else {
          this.setState({
            isPending: true,
            resolver: def.resolve
          });
          this.parent.trigger(dataStateChange, state);
        }
      } else {
        this.setState({});
        def.resolve(this.parent.dataSource);
      }
      return def;
    };
    Data2.prototype.getTable = function() {
      if (this.parent.query) {
        var query = this.getQuery();
        return query.fromTable;
      } else {
        return null;
      }
    };
    Data2.prototype.refreshDataManager = function() {
      var _this = this;
      var dataManager = this.getData(this.getQuery());
      dataManager.then(function(e) {
        return _this.dataManagerSuccess(e);
      }).catch(function(e) {
        return _this.dataManagerFailure(e);
      });
    };
    Data2.prototype.dataManagerSuccess = function(e, type, offlineArgs, index) {
      var _this = this;
      if (this.parent.isDestroyed) {
        return;
      }
      if (type) {
        this.updateKanbanData(e);
        if (this.parent.enableVirtualization && this.isRemote()) {
          this.parent.virtualLayoutModule.refresh();
        }
      } else {
        this.parent.trigger(dataBinding, e, function(args) {
          _this.updateKanbanData(args);
          _this.parent.notify(dataReady, {
            processedData: _this.parent.kanbanData
          });
          _this.parent.trigger(dataBound, null, function() {
            return _this.parent.hideSpinner();
          });
        });
      }
      if (this.initload) {
        this.parent.layoutModule.refresh();
        this.parent.renderTemplates();
      }
      this.initload = true;
    };
    Data2.prototype.updateKanbanData = function(args) {
      var resultData = extend2([], !isNullOrUndefined2(args.result.result) ? args.result.result : args.result, null, true);
      if (this.isRemote() && this.parent.enableVirtualization && resultData.length > 0 && !isNullOrUndefined2(args.result.count)) {
        var columnsKeyFields = this.columnKeyFields();
        for (var i = 0; i < columnsKeyFields.length; i++) {
          if (args.result.count[i].Key === columnsKeyFields[i]) {
            this.parent.columnDataCount[columnsKeyFields[i]] = args.result.count[i].Value;
          }
        }
      }
      this.parent.kanbanData = resultData;
      this.kanbanData = new DataManager(this.parent.kanbanData);
    };
    Data2.prototype.dataManagerFailure = function(e) {
      var _this = this;
      if (this.parent.isDestroyed) {
        return;
      }
      this.parent.trigger(actionFailure, {
        error: e
      }, function() {
        return _this.parent.hideSpinner();
      });
    };
    Data2.prototype.updateDataManager = function(updateType, params, type, data, index, isDropped, dataDropIndexKeyFieldValue, draggedKey, droppedKey, isMultipleDrag) {
      var _this = this;
      this.parent.showSpinner();
      var promise;
      var actionArgs = {
        requestType: type,
        cancel: false,
        addedRecords: params.addedRecords,
        changedRecords: params.changedRecords,
        deletedRecords: params.deletedRecords
      };
      this.setState({
        isDataChanged: true
      });
      this.eventPromise(actionArgs, this.query, index);
      this.parent.trigger(actionComplete, actionArgs, function(offlineArgs) {
        if (!offlineArgs.cancel) {
          promise = _this.syncDataSource(_this.dataManager, updateType, params, data, isDropped, dataDropIndexKeyFieldValue);
          if (_this.dataManager.dataSource.offline) {
            if (!_this.isObservable) {
              _this.syncDataSource(_this.kanbanData, updateType, params, data, isDropped, dataDropIndexKeyFieldValue);
              index = draggedKey === droppedKey && isMultipleDrag ? index - 1 : index;
              _this.refreshUI(offlineArgs, index, isDropped);
              if (_this.parent.enableVirtualization) {
                _this.parent.virtualLayoutModule.refreshColumnData(draggedKey, droppedKey, offlineArgs.requestType, data[_this.parent.keyField]);
              }
            }
          } else {
            promise.then(function(args) {
              if (_this.parent.isDestroyed) {
                return;
              }
              var dataManager = _this.getData(_this.getQuery());
              dataManager.then(function(e) {
                return _this.dataManagerSuccess(e, "DataSourceChange", offlineArgs, index);
              }).catch(function(e) {
                return _this.dataManagerFailure(e);
              });
              if (offlineArgs.requestType === "cardCreated") {
                if (!Array.isArray(args)) {
                  offlineArgs.addedRecords[0] = extend2(offlineArgs.addedRecords[0], args);
                } else {
                  _this.modifyArrayData(offlineArgs.addedRecords, args);
                }
              } else if (offlineArgs.requestType === "cardChanged") {
                if (!Array.isArray(args)) {
                  offlineArgs.changedRecords[0] = extend2(offlineArgs.changedRecords[0], args);
                } else {
                  _this.modifyArrayData(offlineArgs.changedRecords, args);
                }
              } else if (offlineArgs.requestType === "cardRemoved") {
                if (!Array.isArray(args)) {
                  offlineArgs.deletedRecords[0] = extend2(offlineArgs.deletedRecords[0], args);
                } else {
                  _this.modifyArrayData(offlineArgs.deletedRecords, args);
                }
              }
              index = draggedKey === droppedKey && isMultipleDrag ? index - 1 : index;
              _this.refreshUI(offlineArgs, index, isDropped);
              if (_this.parent.enableVirtualization) {
                _this.parent.virtualLayoutModule.refreshColumnData(draggedKey, droppedKey, offlineArgs.requestType, data[_this.parent.keyField]);
              }
            }).catch(function(e) {
              _this.dataManagerFailure(e);
            });
          }
        }
      });
    };
    Data2.prototype.syncDataSource = function(dataManager, updateType, params, data, isDropped, dataDropIndexKeyFieldValue) {
      var _this = this;
      var promise;
      switch (updateType) {
        case "insert":
          return dataManager.insert(data, this.getTable(), this.getQuery());
        case "update":
          if (this.parent.enableVirtualization && !this.parent.dataModule.isRemote() && isDropped) {
            promise = dataManager.remove(this.keyField, data, this.getTable(), this.getQuery());
            promise = dataManager.insert(data, this.getTable(), this.getQuery(), dataManager.dataSource.json.findIndex(function(data2) {
              return data2[_this.parent.cardSettings.headerField] === dataDropIndexKeyFieldValue;
            }));
            return promise;
          } else {
            return dataManager.update(this.keyField, data, this.getTable(), this.getQuery());
          }
        case "delete":
          return dataManager.remove(this.keyField, data, this.getTable(), this.getQuery());
        case "batch":
          if (!this.parent.dataModule.isRemote() && isDropped && this.parent.enableVirtualization && data) {
            for (var i = 0; i < data.length; i++) {
              promise = dataManager.remove(this.keyField, data[i], this.getTable(), this.getQuery());
            }
            var currentIndex = dataManager.dataSource.json.findIndex(function(data2) {
              return data2[_this.parent.cardSettings.headerField] === dataDropIndexKeyFieldValue;
            });
            for (var i = 0; i < data.length; i++, currentIndex++) {
              promise = dataManager.insert(data[i], this.getTable(), this.getQuery(), currentIndex);
            }
            return promise;
          } else {
            return dataManager.saveChanges(params, this.keyField, this.getTable(), this.getQuery());
          }
        default:
          return promise;
      }
    };
    Data2.prototype.modifyArrayData = function(onLineData, e) {
      if (onLineData.length === e.length) {
        for (var i = 0; i < e.length; i++) {
          onLineData[i] = extend2(onLineData[i], e[i]);
        }
      }
      return onLineData;
    };
    Data2.prototype.refreshUI = function(args, position, isDropped) {
      var _this = this;
      if (this.parent.enableVirtualization) {
        this.parent.virtualLayoutModule.columnData = this.parent.virtualLayoutModule.getColumnCards();
        args.addedRecords.forEach(function(data, index) {
          _this.parent.virtualLayoutModule.renderCardBasedOnIndex(data, position + index, isDropped, args.requestType);
        });
        args.changedRecords.forEach(function(data) {
          _this.parent.virtualLayoutModule.removeCard(data);
          _this.parent.virtualLayoutModule.renderCardBasedOnIndex(data, position, isDropped, args.requestType);
          if (_this.parent.virtualLayoutModule.isSelectedCard) {
            _this.parent.actionModule.SingleCardSelection(data);
          }
          if (_this.parent.sortSettings.field && _this.parent.sortSettings.sortBy === "Index" && _this.parent.sortSettings.direction === "Descending" && position > 0) {
            --position;
          } else {
            position++;
          }
        });
        args.deletedRecords.forEach(function(data) {
          _this.parent.virtualLayoutModule.removeCard(data);
        });
        this.parent.virtualLayoutModule.refresh();
      } else {
        this.parent.layoutModule.columnData = this.parent.layoutModule.getColumnCards();
        if (this.parent.swimlaneSettings.keyField) {
          this.parent.layoutModule.kanbanRows = this.parent.layoutModule.getRows();
          this.parent.layoutModule.swimlaneData = this.parent.layoutModule.getSwimlaneCards();
        }
        args.addedRecords.forEach(function(data, index) {
          if (_this.parent.swimlaneSettings.keyField && !data[_this.parent.swimlaneSettings.keyField]) {
            data[_this.parent.swimlaneSettings.keyField] = "";
          }
          _this.parent.layoutModule.renderCardBasedOnIndex(data, position + index);
        });
        args.changedRecords.forEach(function(data) {
          if (_this.parent.swimlaneSettings.keyField && !data[_this.parent.swimlaneSettings.keyField]) {
            data[_this.parent.swimlaneSettings.keyField] = "";
          }
          _this.parent.layoutModule.removeCard(data);
          _this.parent.layoutModule.renderCardBasedOnIndex(data, position);
          if (_this.parent.layoutModule.isSelectedCard) {
            _this.parent.actionModule.SingleCardSelection(data);
          }
          if (_this.parent.sortSettings.field && _this.parent.sortSettings.sortBy === "Index" && _this.parent.sortSettings.direction === "Descending" && position > 0) {
            --position;
          } else {
            position++;
          }
        });
        args.deletedRecords.forEach(function(data) {
          _this.parent.layoutModule.removeCard(data);
        });
        this.parent.layoutModule.refresh();
      }
      this.parent.renderTemplates();
      this.parent.notify(contentReady, {});
      this.parent.trigger(dataBound, args, function() {
        return _this.parent.hideSpinner();
      });
    };
    return Data2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/models/swimlane-settings.js
var __extends25 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate25 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SwimlaneSettings = (
  /** @class */
  function(_super) {
    __extends25(SwimlaneSettings2, _super);
    function SwimlaneSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate25([Property2()], SwimlaneSettings2.prototype, "keyField", void 0);
    __decorate25([Property2()], SwimlaneSettings2.prototype, "textField", void 0);
    __decorate25([Property2(false)], SwimlaneSettings2.prototype, "showEmptyRow", void 0);
    __decorate25([Property2(true)], SwimlaneSettings2.prototype, "showItemCount", void 0);
    __decorate25([Property2(false)], SwimlaneSettings2.prototype, "allowDragAndDrop", void 0);
    __decorate25([Property2()], SwimlaneSettings2.prototype, "template", void 0);
    __decorate25([Property2("Ascending")], SwimlaneSettings2.prototype, "sortDirection", void 0);
    __decorate25([Property2()], SwimlaneSettings2.prototype, "sortComparer", void 0);
    __decorate25([Property2(true)], SwimlaneSettings2.prototype, "showUnassignedRow", void 0);
    __decorate25([Property2(false)], SwimlaneSettings2.prototype, "enableFrozenRows", void 0);
    return SwimlaneSettings2;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/models/card-settings.js
var __extends26 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate26 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CardSettings = (
  /** @class */
  function(_super) {
    __extends26(CardSettings2, _super);
    function CardSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate26([Property2(true)], CardSettings2.prototype, "showHeader", void 0);
    __decorate26([Property2()], CardSettings2.prototype, "headerField", void 0);
    __decorate26([Property2()], CardSettings2.prototype, "contentField", void 0);
    __decorate26([Property2()], CardSettings2.prototype, "tagsField", void 0);
    __decorate26([Property2()], CardSettings2.prototype, "grabberField", void 0);
    __decorate26([Property2()], CardSettings2.prototype, "footerCssField", void 0);
    __decorate26([Property2()], CardSettings2.prototype, "template", void 0);
    __decorate26([Property2("Single")], CardSettings2.prototype, "selectionType", void 0);
    return CardSettings2;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/models/dialog-settings.js
var __extends27 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate27 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var DialogSettings = (
  /** @class */
  function(_super) {
    __extends27(DialogSettings2, _super);
    function DialogSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate27([Property2()], DialogSettings2.prototype, "template", void 0);
    __decorate27([Property2([])], DialogSettings2.prototype, "fields", void 0);
    __decorate27([Property2(null)], DialogSettings2.prototype, "model", void 0);
    return DialogSettings2;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/models/columns.js
var __extends28 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate28 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Columns = (
  /** @class */
  function(_super) {
    __extends28(Columns2, _super);
    function Columns2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate28([Property2()], Columns2.prototype, "keyField", void 0);
    __decorate28([Property2()], Columns2.prototype, "headerText", void 0);
    __decorate28([Property2()], Columns2.prototype, "template", void 0);
    __decorate28([Property2(false)], Columns2.prototype, "allowToggle", void 0);
    __decorate28([Property2(true)], Columns2.prototype, "isExpanded", void 0);
    __decorate28([Property2()], Columns2.prototype, "minCount", void 0);
    __decorate28([Property2()], Columns2.prototype, "maxCount", void 0);
    __decorate28([Property2(true)], Columns2.prototype, "showItemCount", void 0);
    __decorate28([Property2(false)], Columns2.prototype, "showAddButton", void 0);
    __decorate28([Property2(true)], Columns2.prototype, "allowDrag", void 0);
    __decorate28([Property2(true)], Columns2.prototype, "allowDrop", void 0);
    __decorate28([Property2([])], Columns2.prototype, "transitionColumns", void 0);
    return Columns2;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/models/stacked-headers.js
var __extends29 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate29 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var StackedHeaders = (
  /** @class */
  function(_super) {
    __extends29(StackedHeaders2, _super);
    function StackedHeaders2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate29([Property2()], StackedHeaders2.prototype, "text", void 0);
    __decorate29([Property2()], StackedHeaders2.prototype, "keyFields", void 0);
    return StackedHeaders2;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/models/sort-settings.js
var __extends30 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate30 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SortSettings = (
  /** @class */
  function(_super) {
    __extends30(SortSettings2, _super);
    function SortSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate30([Property2("Index")], SortSettings2.prototype, "sortBy", void 0);
    __decorate30([Property2()], SortSettings2.prototype, "field", void 0);
    __decorate30([Property2("Ascending")], SortSettings2.prototype, "direction", void 0);
    return SortSettings2;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/css-constant.js
var ROOT_CLASS = "e-kanban";
var RTL_CLASS = "e-rtl";
var DEVICE_CLASS = "e-device";
var ICON_CLASS = "e-icons";
var TEMPLATE_CLASS = "e-template";
var SWIMLANE_CLASS = "e-swimlane";
var TABLE_CLASS = "e-kanban-table";
var HEADER_CLASS = "e-kanban-header";
var HEADER_TABLE_CLASS = "e-header-table";
var HEADER_CELLS_CLASS = "e-header-cells";
var HEADER_WRAP_CLASS = "e-header-wrap";
var HEADER_TITLE_CLASS = "e-header-title";
var HEADER_TEXT_CLASS = "e-header-text";
var HEADER_ICON_CLASS = "e-header-icon";
var STACKED_HEADER_ROW_CLASS = "e-stacked-header-row";
var STACKED_HEADER_CELL_CLASS = "e-stacked-header-cell";
var CONTENT_CELLS_CLASS = "e-content-cells";
var CONTENT_CLASS = "e-kanban-content";
var CONTENT_TABLE_CLASS = "e-content-table";
var HEADER_ROW_TOGGLE_CLASS = "e-toggle-header";
var HEADER_ROW_CLASS = "e-header-row";
var CONTENT_ROW_CLASS = "e-content-row";
var SWIMLANE_ROW_CLASS = "e-swimlane-row";
var SWIMLANE_ROW_EXPAND_CLASS = "e-swimlane-row-expand";
var SWIMLANE_ROW_COLLAPSE_CLASS = "e-swimlane-row-collapse";
var SWIMLANE_ROW_TEXT_CLASS = "e-swimlane-text";
var CARD_ITEM_COUNT_CLASS = "e-item-count";
var CARD_WRAPPER_CLASS = "e-card-wrapper";
var CARD_VIRTUAL_WRAPPER_CLASS = "e-card-virtual-wrapper";
var CARD_CLASS = "e-card";
var DROPPABLE_CLASS = "e-droppable";
var DRAG_CLASS = "e-drag";
var DROP_CLASS = "e-drop";
var DISABLED_CLASS = "e-disabled";
var CARD_HEADER_CLASS = "e-card-header";
var CARD_CONTENT_CLASS = "e-card-content";
var CARD_HEADER_TEXT_CLASS = "e-card-header-caption";
var CARD_HEADER_TITLE_CLASS = "e-card-header-title";
var CARD_TAGS_CLASS = "e-card-tags";
var CARD_TAG_CLASS = "e-card-tag";
var CARD_COLOR_CLASS = "e-card-color";
var CARD_LABEL_CLASS = "e-card-label";
var CARD_FOOTER_CLASS = "e-card-footer";
var EMPTY_CARD_CLASS = "e-empty-card";
var CARD_FOOTER_CSS_CLASS = "e-card-footer-css";
var COLUMN_EXPAND_CLASS = "e-column-expand";
var COLUMN_COLLAPSE_CLASS = "e-column-collapse";
var COLLAPSE_HEADER_TEXT_CLASS = "e-collapse-header-text";
var COLLAPSED_CLASS = "e-collapsed";
var DIALOG_CLASS = "e-kanban-dialog";
var FORM_CLASS = "e-kanban-form";
var FORM_WRAPPER_CLASS = "e-kanban-form-wrapper";
var ERROR_VALIDATION_CLASS = "e-kanban-error";
var FIELD_CLASS = "e-field";
var DRAGGED_CLONE_CLASS = "e-target-dragged-clone";
var CLONED_CARD_CLASS = "e-cloned-card";
var DRAGGED_CARD_CLASS = "e-kanban-dragged-card";
var DROPPED_CLONE_CLASS = "e-target-dropped-clone";
var DROPPING_CLASS = "e-dropping";
var BORDER_CLASS = "e-kanban-border";
var TOGGLE_VISIBLE_CLASS = "e-toggle-visible";
var MULTI_CARD_WRAPPER_CLASS = "e-multi-card-wrapper";
var MULTI_ACTIVE_CLASS = "e-multi-active";
var TARGET_MULTI_CLONE_CLASS = "e-target-multi-clone";
var MULTI_COLUMN_KEY_CLASS = "e-column-key";
var CARD_SELECTION_CLASS = "e-selection";
var TOOLTIP_CLASS = "e-kanban-tooltip";
var TOOLTIP_TEXT_CLASS = "e-tooltip-text";
var SWIMLANE_HEADER_CLASS = "e-swimlane-header";
var SWIMLANE_HEADER_TOOLBAR_CLASS = "e-swimlane-header-toolbar";
var TOOLBAR_MENU_CLASS = "e-toolbar-menu";
var TOOLBAR_MENU_ICON_CLASS = "e-icon-menu";
var TOOLBAR_LEVEL_TITLE_CLASS = "e-toolbar-level-title";
var TOOLBAR_SWIMLANE_NAME_CLASS = "e-toolbar-swimlane-name";
var SWIMLANE_OVERLAY_CLASS = "e-swimlane-overlay";
var SWIMLANE_CONTENT_CLASS = "e-swimlane-content";
var SWIMLANE_RESOURCE_CLASS = "e-swimlane-resource";
var SWIMLANE_TREE_CLASS = "e-swimlane-tree";
var LIMITS_CLASS = "e-limits";
var MAX_COUNT_CLASS = "e-max-count";
var MIN_COUNT_CLASS = "e-min-count";
var MAX_COLOR_CLASS = "e-max-color";
var MIN_COLOR_CLASS = "e-min-color";
var POPUP_HEADER_CLASS = "e-popup-header";
var CLOSE_CLASS = "e-close";
var POPUP_CONTENT_CLASS = "e-popup-content";
var POPUP_WRAPPER_CLASS = "e-mobile-popup-wrapper";
var CLOSE_ICON_CLASS = "e-close-icon";
var POPUP_OPEN_CLASS = "e-popup-open";
var DIALOG_CONTENT_CONTAINER = "e-kanban-dialog-content";
var SHOW_ADD_BUTTON = "e-show-add-button";
var SHOW_ADD_ICON = "e-show-add-icon";
var SHOW_ADD_FOCUS = "e-show-add-focus";
var FROZEN_SWIMLANE_ROW_CLASS = "e-frozen-swimlane-row";
var FROZEN_ROW_CLASS = "e-frozen-row";

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/action.js
var Action = (
  /** @class */
  function() {
    function Action2(parent) {
      this.parent = parent;
      this.columnToggleArray = [];
      this.selectionArray = [];
      this.lastCardSelection = null;
      this.lastSelectionRow = null;
      this.lastCard = null;
      this.selectedCardsElement = [];
      this.selectedCardsData = [];
      this.hideColumnKeys = [];
    }
    Action2.prototype.clickHandler = function(e) {
      var elementSelector = "." + CARD_CLASS + ",." + HEADER_ICON_CLASS + ",." + CONTENT_ROW_CLASS + "." + SWIMLANE_ROW_CLASS + ",." + SHOW_ADD_BUTTON + ",." + FROZEN_SWIMLANE_ROW_CLASS + ",." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + ") ." + CONTENT_CELLS_CLASS;
      var target = closest2(e.target, elementSelector);
      if (!target) {
        return;
      }
      if (target.classList.contains(CARD_CLASS)) {
        if (this.parent.allowKeyboard) {
          this.parent.keyboardModule.cardTabIndexRemove();
        }
        this.cardClick(e);
      } else if (target.classList.contains(HEADER_ICON_CLASS)) {
        this.columnExpandCollapse(e);
      } else if (target.classList.contains(CONTENT_ROW_CLASS) && target.classList.contains(SWIMLANE_ROW_CLASS)) {
        this.rowExpandCollapse(e);
      } else if (target.classList.contains(SHOW_ADD_BUTTON)) {
        this.addButtonClick(target);
      } else if (target.classList.contains(FROZEN_SWIMLANE_ROW_CLASS)) {
        var swimlaneRows = [].slice.call(this.parent.element.querySelectorAll("." + SWIMLANE_ROW_CLASS));
        var targetIcon = this.parent.layoutModule.frozenSwimlaneRow.querySelector("." + ICON_CLASS);
        this.rowExpandCollapse(e, swimlaneRows[this.parent.layoutModule.frozenOrder]);
        var isCollapsed = targetIcon.classList.contains(SWIMLANE_ROW_COLLAPSE_CLASS) ? true : false;
        if (isCollapsed) {
          classList(targetIcon, [SWIMLANE_ROW_EXPAND_CLASS], [SWIMLANE_ROW_COLLAPSE_CLASS]);
        } else {
          classList(targetIcon, [SWIMLANE_ROW_COLLAPSE_CLASS], [SWIMLANE_ROW_EXPAND_CLASS]);
        }
      }
    };
    Action2.prototype.addButtonClick = function(target) {
      var _this = this;
      var newData = {};
      if (this.parent.kanbanData.length === 0) {
        newData[this.parent.cardSettings.headerField] = 1;
      } else if (typeof this.parent.kanbanData[0][this.parent.cardSettings.headerField] === "number") {
        var id = this.parent.kanbanData.map(function(obj) {
          return parseInt(obj[_this.parent.cardSettings.headerField], 10);
        });
        newData[this.parent.cardSettings.headerField] = Math.max.apply(Math, id) + 1;
      }
      newData[this.parent.keyField] = closest2(target, "." + CONTENT_CELLS_CLASS).getAttribute("data-key");
      if (this.parent.sortSettings.sortBy === "Index") {
        newData[this.parent.sortSettings.field] = 1;
        if (closest2(target, "." + CONTENT_CELLS_CLASS).querySelector("." + CARD_CLASS)) {
          var card = this.parent.sortSettings.direction === "Ascending" ? target.nextElementSibling.classList.contains(BORDER_CLASS) ? target.nextElementSibling.nextElementSibling.lastElementChild : target.nextElementSibling.lastElementChild : target.nextElementSibling.classList.contains(BORDER_CLASS) ? target.nextElementSibling.nextElementSibling.firstElementChild : target.nextElementSibling.firstElementChild;
          var data = this.parent.getCardDetails(card);
          newData[this.parent.sortSettings.field] = data[this.parent.sortSettings.field] + 1;
        }
      }
      if (this.parent.kanbanData.length !== 0 && this.parent.swimlaneSettings.keyField && closest2(target, "." + CONTENT_ROW_CLASS).previousElementSibling) {
        newData[this.parent.swimlaneSettings.keyField] = closest2(target, "." + CONTENT_ROW_CLASS).previousElementSibling.getAttribute("data-key");
      }
      this.parent.openDialog("Add", newData);
    };
    Action2.prototype.doubleClickHandler = function(e) {
      var target = closest2(e.target, "." + CARD_CLASS);
      if (target) {
        this.cardDoubleClick(e);
      }
    };
    Action2.prototype.cardClick = function(e, selectedCard) {
      var _this = this;
      var target = closest2(selectedCard ? selectedCard : e.target, "." + CARD_CLASS);
      var cardClickObj = this.parent.getCardDetails(target);
      if (cardClickObj) {
        this.parent.activeCardData = {
          data: cardClickObj,
          element: target
        };
        var args = {
          data: cardClickObj,
          element: target,
          cancel: false,
          event: e
        };
        this.parent.trigger(cardClick, args, function(clickArgs) {
          if (!clickArgs.cancel) {
            if (target.classList.contains(CARD_SELECTION_CLASS) && e.type === "click") {
              removeClass2([target], CARD_SELECTION_CLASS);
              if (_this.parent.enableVirtualization) {
                _this.parent.virtualLayoutModule.disableAttributeSelection(target);
              } else {
                _this.parent.layoutModule.disableAttributeSelection(target);
              }
            } else {
              var isCtrlKey = e.ctrlKey;
              if (_this.parent.isAdaptive && _this.parent.touchModule) {
                isCtrlKey = _this.parent.touchModule.mobilePopup && _this.parent.touchModule.tabHold || isCtrlKey;
              }
              _this.cardSelection(target, isCtrlKey, e.shiftKey);
            }
            if (_this.parent.isAdaptive && _this.parent.touchModule) {
              _this.parent.touchModule.updatePopupContent();
            }
            var cell = closest2(target, "." + CONTENT_CELLS_CLASS);
            if (_this.parent.allowKeyboard) {
              var element2 = [].slice.call(cell.querySelectorAll("." + CARD_CLASS));
              element2.forEach(function(e2) {
                e2.setAttribute("tabindex", "0");
              });
              _this.parent.keyboardModule.addRemoveTabIndex("Remove");
            }
          }
        });
      }
    };
    Action2.prototype.cardDoubleClick = function(e) {
      var _this = this;
      var target = closest2(e.target, "." + CARD_CLASS);
      var cardDoubleClickObj = this.parent.getCardDetails(target);
      this.parent.activeCardData = {
        data: cardDoubleClickObj,
        element: target
      };
      this.cardSelection(target, false, false);
      var args = {
        data: cardDoubleClickObj,
        element: target,
        cancel: false,
        event: e
      };
      this.parent.trigger(cardDoubleClick, args, function(doubleClickArgs) {
        if (!doubleClickArgs.cancel) {
          _this.parent.dialogModule.openDialog("Edit", args.data);
        }
      });
    };
    Action2.prototype.rowExpandCollapse = function(e, isFrozenElem) {
      var _this = this;
      var headerTarget = e instanceof HTMLElement ? e : e.target;
      var currentSwimlaneHeader = !isNullOrUndefined2(isFrozenElem) ? isFrozenElem : headerTarget;
      var args = {
        cancel: false,
        target: headerTarget,
        requestType: "rowExpandCollapse"
      };
      this.parent.trigger(actionBegin, args, function(actionArgs) {
        if (!actionArgs.cancel) {
          var target = closest2(currentSwimlaneHeader, "." + SWIMLANE_ROW_CLASS);
          var key = target.getAttribute("data-key");
          var tgtRow = _this.parent.element.querySelector("." + CONTENT_ROW_CLASS + (":nth-child(" + (target.rowIndex + 2) + ")"));
          var targetIcon = target.querySelector("." + SWIMLANE_ROW_EXPAND_CLASS + ",." + SWIMLANE_ROW_COLLAPSE_CLASS);
          var isCollapsed = target.classList.contains(COLLAPSED_CLASS) ? true : false;
          var tabIndex_1;
          if (isCollapsed) {
            removeClass2([tgtRow, target], COLLAPSED_CLASS);
            classList(targetIcon, [SWIMLANE_ROW_EXPAND_CLASS], [SWIMLANE_ROW_COLLAPSE_CLASS]);
            _this.parent.swimlaneToggleArray.splice(_this.parent.swimlaneToggleArray.indexOf(key), 1);
            tabIndex_1 = "0";
          } else {
            addClass2([tgtRow, target], COLLAPSED_CLASS);
            classList(targetIcon, [SWIMLANE_ROW_COLLAPSE_CLASS], [SWIMLANE_ROW_EXPAND_CLASS]);
            _this.parent.swimlaneToggleArray.push(key);
            tabIndex_1 = "-1";
          }
          targetIcon.setAttribute("aria-label", isCollapsed ? key + " Expand" : key + " Collapse");
          target.setAttribute("aria-expanded", isCollapsed.toString());
          tgtRow.setAttribute("aria-expanded", isCollapsed.toString());
          var rows = [].slice.call(tgtRow.querySelectorAll("." + CONTENT_CELLS_CLASS));
          rows.forEach(function(cell) {
            cell.setAttribute("tabindex", tabIndex_1);
          });
          _this.parent.notify(contentReady, {});
          _this.parent.trigger(actionComplete, {
            target: headerTarget,
            requestType: "rowExpandCollapse"
          });
        }
      });
    };
    Action2.prototype.columnExpandCollapse = function(e) {
      var _this = this;
      var headerTarget = e instanceof HTMLElement ? e : e.target;
      var args = {
        cancel: false,
        target: headerTarget,
        requestType: "columnExpandCollapse"
      };
      this.parent.trigger(actionBegin, args, function(actionArgs) {
        if (!actionArgs.cancel) {
          var target = closest2(headerTarget, "." + HEADER_CELLS_CLASS);
          var colIndex = target.cellIndex;
          _this.columnToggle(target);
          var collapsed = _this.parent.element.querySelectorAll("." + HEADER_CELLS_CLASS + "." + COLLAPSED_CLASS).length;
          if (collapsed === _this.parent.columns.length - _this.hideColumnKeys.length) {
            var index = colIndex + 1 === collapsed ? 1 : colIndex + 2;
            var headerSelector = "." + HEADER_CELLS_CLASS + ":not(." + STACKED_HEADER_CELL_CLASS + "):nth-child(" + index + ")";
            var nextCol = _this.parent.element.querySelector(headerSelector);
            addClass2([nextCol], COLLAPSED_CLASS);
            _this.columnToggle(nextCol);
          }
          _this.parent.notify(contentReady, {});
          _this.parent.trigger(actionComplete, {
            target: headerTarget,
            requestType: "columnExpandCollapse"
          });
        }
      });
    };
    Action2.prototype.columnToggle = function(target) {
      var _this = this;
      var colIndex = target.cellIndex;
      var elementSelector = "." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + ")";
      var targetRow = [].slice.call(this.parent.element.querySelectorAll(elementSelector));
      var colSelector = "." + TABLE_CLASS + " col:nth-child(" + (colIndex + 1) + ")";
      var targetIcon = target.querySelector("." + COLUMN_EXPAND_CLASS + ",." + COLUMN_COLLAPSE_CLASS);
      var colGroup = [].slice.call(this.parent.element.querySelectorAll(colSelector));
      if (target.classList.contains(COLLAPSED_CLASS)) {
        removeClass2(colGroup, COLLAPSED_CLASS);
        if (this.parent.isAdaptive) {
          if (this.parent.enableVirtualization) {
            colGroup.forEach(function(col) {
              return col.style.width = formatUnit(_this.parent.virtualLayoutModule.getWidth());
            });
          } else {
            colGroup.forEach(function(col) {
              return col.style.width = formatUnit(_this.parent.layoutModule.getWidth());
            });
          }
        }
        classList(targetIcon, [COLUMN_EXPAND_CLASS], [COLUMN_COLLAPSE_CLASS]);
        var _loop_1 = function(row2) {
          var targetCol = row2.querySelector("." + CONTENT_CELLS_CLASS + ":nth-child(" + (colIndex + 1) + ")");
          removeClass2([targetCol, target], COLLAPSED_CLASS);
          remove(targetCol.querySelector("." + COLLAPSE_HEADER_TEXT_CLASS));
          target.setAttribute("aria-expanded", "true");
          targetCol.setAttribute("aria-expanded", "true");
          var collapsedCell = [].slice.call(targetCol.parentElement.querySelectorAll("." + COLLAPSED_CLASS));
          collapsedCell.forEach(function(cell) {
            var collapasedText = cell.querySelector("." + COLLAPSE_HEADER_TEXT_CLASS);
            collapasedText.style.height = "auto";
            if (collapasedText && targetCol.getBoundingClientRect().height < collapasedText.getBoundingClientRect().height + 10) {
              collapasedText.style.height = targetCol.getBoundingClientRect().height - 4 + "px";
            }
          });
        };
        for (var _i = 0, targetRow_1 = targetRow; _i < targetRow_1.length; _i++) {
          var row = targetRow_1[_i];
          _loop_1(row);
        }
        if (this.parent.kanbanData.length === 0 && targetRow.length === 0) {
          removeClass2([target], COLLAPSED_CLASS);
          target.setAttribute("aria-expanded", "true");
        }
        this.columnToggleArray.splice(this.columnToggleArray.indexOf(target.getAttribute("data-key")), 1);
        this.parent.columns[colIndex].setProperties({
          isExpanded: true
        }, true);
        target.querySelector(".e-header-icon").setAttribute("aria-label", target.getAttribute("data-key") + " Expand");
      } else {
        addClass2(colGroup, COLLAPSED_CLASS);
        if (this.parent.isAdaptive) {
          colGroup.forEach(function(col) {
            return col.style.width = formatUnit(toggleWidth);
          });
        }
        classList(targetIcon, [COLUMN_COLLAPSE_CLASS], [COLUMN_EXPAND_CLASS]);
        var key = target.getAttribute("data-key");
        var _loop_2 = function(row2) {
          var targetCol = row2.querySelector("." + CONTENT_CELLS_CLASS + '[data-key="' + key + '"]');
          var index = targetCol.cellIndex;
          var text = void 0;
          if (!this_1.parent.enableVirtualization) {
            text = (this_1.parent.columns[index].showItemCount ? "[" + targetCol.querySelectorAll("." + CARD_CLASS).length + "] " : "") + this_1.parent.columns[index].headerText;
          } else {
            var value = this_1.parent.dataModule.isRemote() ? this_1.parent.columnDataCount[this_1.parent.columns[index].keyField] : this_1.parent.virtualLayoutModule.columnData[this_1.parent.columns[index].keyField].length;
            text = (this_1.parent.columns[index].showItemCount ? "[" + value + "] " : "") + this_1.parent.columns[index].headerText;
          }
          targetCol.appendChild(createElement2("div", {
            className: COLLAPSE_HEADER_TEXT_CLASS,
            innerHTML: text
          }));
          addClass2([targetCol, target], COLLAPSED_CLASS);
          target.setAttribute("aria-expanded", "false");
          targetCol.setAttribute("aria-expanded", "false");
          var collapsedCell = [].slice.call(targetCol.parentElement.querySelectorAll("." + COLLAPSED_CLASS));
          collapsedCell.forEach(function(cell) {
            var collapasedText = cell.querySelector("." + COLLAPSE_HEADER_TEXT_CLASS);
            if (collapasedText && targetCol.getBoundingClientRect().height < collapasedText.getBoundingClientRect().height + 10) {
              collapasedText.style.height = targetCol.getBoundingClientRect().height - 4 + "px";
            }
          });
        };
        var this_1 = this;
        for (var _a = 0, targetRow_2 = targetRow; _a < targetRow_2.length; _a++) {
          var row = targetRow_2[_a];
          _loop_2(row);
        }
        if (this.parent.kanbanData.length === 0 && targetRow.length === 0) {
          addClass2([target], COLLAPSED_CLASS);
          target.setAttribute("aria-expanded", "false");
        }
        this.columnToggleArray.push(target.getAttribute("data-key"));
        this.parent.columns[colIndex].setProperties({
          isExpanded: false
        }, true);
        target.querySelector(".e-header-icon").setAttribute("aria-label", key + " Collapse");
      }
    };
    Action2.prototype.cardSelection = function(target, isCtrl, isShift) {
      var _this = this;
      if (!target) {
        return;
      }
      var cards = this.parent.getSelectedCards();
      if (this.parent.cardSettings.selectionType !== "None") {
        var contentRow = closest2(target, "." + CONTENT_ROW_CLASS);
        var index = !isNullOrUndefined2(this.lastSelectionRow) ? this.lastSelectionRow.rowIndex : contentRow.rowIndex;
        if (index !== contentRow.rowIndex && (isCtrl || isShift) && this.parent.cardSettings.selectionType === "Multiple") {
          return;
        }
        if (cards.length !== 0 && (!isCtrl || this.parent.cardSettings.selectionType === "Single")) {
          removeClass2(cards, CARD_SELECTION_CLASS);
          if (this.parent.enableVirtualization) {
            this.parent.virtualLayoutModule.disableAttributeSelection(cards);
          } else {
            this.parent.layoutModule.disableAttributeSelection(cards);
          }
          cards.forEach(function(el) {
            _this.selectionArray.splice(_this.selectionArray.indexOf(el.getAttribute("data-id")), 1);
            _this.selectedCardsElement.splice(_this.selectedCardsElement.indexOf(el), 1);
            _this.selectedCardsData.splice(_this.selectedCardsData.indexOf(_this.parent.getCardDetails(el), 1));
          });
        }
        if (cards.length > 0 && isShift && this.parent.cardSettings.selectionType === "Multiple") {
          var curCards_1 = [];
          var start = void 0;
          var end = void 0;
          var i = void 0;
          var allCards = [].slice.call(contentRow.querySelectorAll("." + CARD_CLASS));
          allCards.forEach(function(el) {
            return curCards_1.push(el.getAttribute("data-id"));
          });
          var curId = target.getAttribute("data-id");
          var lastId = this.lastCard.getAttribute("data-id");
          var curIndex = end = curCards_1.indexOf(curId);
          var lastIndex = start = curCards_1.indexOf(lastId);
          var select4 = curIndex > lastIndex ? "next" : "prev";
          if (select4 === "prev") {
            start = curIndex;
            end = lastIndex;
          }
          for (i = start; i <= end; i++) {
            var card = allCards[i];
            addClass2([card], CARD_SELECTION_CLASS);
            card.setAttribute("aria-selected", "true");
            card.setAttribute("tabindex", "0");
            this.selectionArray.push(card.getAttribute("data-id"));
            this.selectedCardsElement.push(card);
            this.selectedCardsData.push(this.parent.getCardDetails(card));
            this.lastCardSelection = card;
            if (select4 === "prev") {
              this.lastCardSelection = allCards[start];
            }
          }
        } else {
          addClass2([target], CARD_SELECTION_CLASS);
          target.setAttribute("aria-selected", "true");
          target.setAttribute("tabindex", "0");
          this.selectionArray.push(target.getAttribute("data-id"));
          this.selectedCardsElement.push(target);
          this.selectedCardsData.push(this.parent.getCardDetails(target));
          this.lastCard = this.lastCardSelection = target;
          this.lastSelectionRow = closest2(target, "." + CONTENT_ROW_CLASS);
          if (this.lastSelectionRow.previousElementSibling) {
            var elementSelector = "." + SWIMLANE_ROW_EXPAND_CLASS + ",." + SWIMLANE_ROW_COLLAPSE_CLASS;
            var parentEle = this.lastSelectionRow.previousElementSibling.querySelector(elementSelector);
            if (parentEle && parentEle.classList.contains(SWIMLANE_ROW_COLLAPSE_CLASS)) {
              this.rowExpandCollapse(parentEle);
            }
          }
        }
      }
    };
    Action2.prototype.addColumn = function(columnOptions, index) {
      var addColumn = createInstance2(Columns, [this.parent, "columns", columnOptions, true]);
      this.parent.columns.splice(index, 0, addColumn);
      this.parent.notify(dataReady, {
        processedData: this.parent.kanbanData
      });
    };
    Action2.prototype.deleteColumn = function(index) {
      var listKey = this.parent.element.querySelectorAll("." + HEADER_CELLS_CLASS).item(index);
      if (listKey && listKey.classList.contains(HEADER_ROW_TOGGLE_CLASS)) {
        this.columnToggleArray.splice(this.columnToggleArray.indexOf(listKey.getAttribute("data-key"), 0));
      }
      this.parent.columns.splice(index, 1);
      if (this.parent.columns.length === 0) {
        detach2(this.parent.element.querySelector("." + HEADER_CLASS));
        detach2(this.parent.element.querySelector("." + CONTENT_CLASS));
      } else {
        this.parent.notify(dataReady, {
          processedData: this.parent.kanbanData
        });
      }
    };
    Action2.prototype.showColumn = function(key) {
      var index = this.hideColumnKeys.indexOf(key.toString());
      if (index !== -1) {
        this.hideColumnKeys.splice(index, 1);
        this.parent.notify(dataReady, {
          processedData: this.parent.kanbanData
        });
      }
    };
    Action2.prototype.hideColumn = function(key) {
      this.hideColumnKeys.push(key.toString());
      this.parent.notify(dataReady, {
        processedData: this.parent.kanbanData
      });
    };
    Action2.prototype.SingleCardSelection = function(data) {
      if (this.parent.cardSettings.selectionType !== "None" && data[this.parent.cardSettings.headerField]) {
        var card = this.parent.element.querySelector('.e-card[data-id="' + // eslint-disable-next-line no-useless-escape
        data[this.parent.cardSettings.headerField].toString() + '"]');
        if (card) {
          addClass2([card], CARD_SELECTION_CLASS);
          card.setAttribute("aria-selected", "true");
          card.setAttribute("tabindex", "0");
        }
      }
    };
    return Action2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/crud.js
var Crud = (
  /** @class */
  function() {
    function Crud2(parent) {
      this.parent = parent;
    }
    Crud2.prototype.addCard = function(cardData, index) {
      var _this = this;
      var args = {
        cancel: false,
        requestType: "cardCreate",
        addedRecords: cardData instanceof Array ? cardData : [cardData],
        changedRecords: [],
        deletedRecords: []
      };
      this.parent.trigger(actionBegin, args, function(addArgs) {
        if (!addArgs.cancel) {
          var modifiedData_1 = [];
          if (_this.parent.sortSettings.field && _this.parent.sortSettings.sortBy === "Index") {
            if (cardData instanceof Array) {
              modifiedData_1 = cardData;
            } else {
              modifiedData_1.push(cardData);
            }
            modifiedData_1.forEach(function(data, index2) {
              if (!data[_this.parent.sortSettings.field]) {
                var columnData = _this.parent.getColumnData(data[_this.parent.keyField]);
                if (_this.parent.sortSettings.direction === "Ascending" && columnData.length > 0) {
                  data[_this.parent.sortSettings.field] = columnData[columnData.length - 1][_this.parent.sortSettings.field] + index2 + 1;
                } else if (_this.parent.sortSettings.direction === "Descending" && columnData.length > 0) {
                  data[_this.parent.sortSettings.field] = columnData[0][_this.parent.sortSettings.field] + index2 + 1;
                }
                if (columnData.length === 0) {
                  data[_this.parent.sortSettings.field] = 1;
                }
              }
            });
            if (!(cardData instanceof Array)) {
              if (!index && _this.parent.sortSettings.direction === "Descending") {
                _this.parent.getColumnData(modifiedData_1[0][_this.parent.keyField]).filter(function(obj, count) {
                  if (obj[_this.parent.sortSettings.field] === modifiedData_1[0][_this.parent.sortSettings.field]) {
                    index = count + 1;
                  }
                });
              }
            }
            if (index !== 0 && !index && _this.parent.sortSettings.direction === "Descending") {
              index = 0;
            }
            modifiedData_1 = _this.priorityOrder(modifiedData_1, index);
          }
          var addedRecords = cardData instanceof Array ? cardData : [cardData];
          var changedRecords = _this.parent.sortSettings.field && _this.parent.sortSettings.sortBy === "Index" ? modifiedData_1 : [];
          var editParms = {
            addedRecords,
            changedRecords,
            deletedRecords: []
          };
          var type = cardData instanceof Array || modifiedData_1.length > 0 ? "batch" : "insert";
          _this.parent.dataModule.updateDataManager(type, editParms, "cardCreated", cardData, index);
        }
      });
    };
    Crud2.prototype.getIndexFromData = function(data) {
      var cardElement = this.parent.element.querySelector("." + CARD_CLASS + '[data-id="' + data[this.parent.cardSettings.headerField] + '"]');
      var element2 = closest2(cardElement, "." + CONTENT_CELLS_CLASS);
      var index = [].slice.call(element2.querySelectorAll("." + CARD_CLASS)).indexOf(cardElement);
      return index;
    };
    Crud2.prototype.updateCard = function(cardData, index, isDropped, dataDropIndexKeyFieldValue, draggedKey, droppedKey, isMultipleDrag) {
      var _this = this;
      var args = {
        requestType: "cardChange",
        cancel: false,
        addedRecords: [],
        changedRecords: cardData instanceof Array ? cardData : [cardData],
        deletedRecords: []
      };
      index = isNullOrUndefined2(index) ? this.getIndexFromData(args.changedRecords[0]) : index;
      this.parent.trigger(actionBegin, args, function(updateArgs) {
        if (!updateArgs.cancel) {
          if (_this.parent.sortSettings.field && _this.parent.sortSettings.sortBy === "Index") {
            var modifiedData = [];
            if (cardData instanceof Array) {
              modifiedData = cardData;
            } else {
              modifiedData.push(cardData);
            }
            cardData = _this.priorityOrder(modifiedData, index);
          }
          var editParms = {
            addedRecords: [],
            changedRecords: cardData instanceof Array ? cardData : [cardData],
            deletedRecords: []
          };
          var type = cardData instanceof Array ? "batch" : "update";
          _this.parent.dataModule.updateDataManager(type, editParms, "cardChanged", cardData, index, isDropped, dataDropIndexKeyFieldValue, draggedKey, droppedKey, isMultipleDrag);
        }
      });
    };
    Crud2.prototype.deleteCard = function(cardData) {
      var _this = this;
      var editParms = {
        addedRecords: [],
        changedRecords: [],
        deletedRecords: []
      };
      if (typeof cardData === "string" || typeof cardData === "number") {
        editParms.deletedRecords = this.parent.kanbanData.filter(function(data) {
          return data[_this.parent.cardSettings.headerField] === cardData;
        });
      } else {
        editParms.deletedRecords = cardData instanceof Array ? cardData : [cardData];
      }
      var args = {
        requestType: "cardRemove",
        cancel: false,
        addedRecords: [],
        changedRecords: [],
        deletedRecords: editParms.deletedRecords
      };
      this.parent.trigger(actionBegin, args, function(deleteArgs) {
        if (!deleteArgs.cancel) {
          var type = editParms.deletedRecords.length > 1 ? "batch" : "delete";
          var cardData_1 = editParms.deletedRecords;
          _this.parent.dataModule.updateDataManager(type, editParms, "cardRemoved", cardData_1[0]);
        }
      });
    };
    Crud2.prototype.priorityOrder = function(cardData, cardIndex) {
      var _this = this;
      var cardsId = cardData.map(function(obj) {
        return obj[_this.parent.cardSettings.headerField];
      });
      var num = cardData[cardData.length - 1][this.parent.sortSettings.field];
      var allModifiedKeys = cardData.map(function(obj) {
        return obj[_this.parent.keyField];
      });
      var modifiedKey = allModifiedKeys.filter(function(key, index) {
        return allModifiedKeys.indexOf(key) === index;
      }).sort();
      var columnAllDatas;
      var finalData = [];
      var originalIndex = [];
      var _loop_1 = function(columnKey2) {
        var keyData = cardData.filter(function(cardObj) {
          return cardObj[_this.parent.keyField] === columnKey2;
        });
        columnAllDatas = this_1.parent.enableVirtualization ? this_1.parent.virtualLayoutModule.getColumnData(columnKey2) : this_1.parent.layoutModule.getColumnData(columnKey2);
        for (var _i2 = 0, _a = keyData; _i2 < _a.length; _i2++) {
          var data = _a[_i2];
          if (this_1.parent.swimlaneSettings.keyField) {
            var swimlaneDatas = this_1.parent.getSwimlaneData(data[this_1.parent.swimlaneSettings.keyField]);
            columnAllDatas = this_1.parent.getColumnData(columnKey2, swimlaneDatas);
          }
        }
        keyData.forEach(function(key) {
          return finalData.push(key);
        });
        if (!isNullOrUndefined2(cardIndex)) {
          var _loop_2 = function(j2) {
            columnAllDatas.filter(function(data2, index) {
              if (data2[_this.parent.cardSettings.headerField] === cardsId[j2] && index <= cardIndex) {
                originalIndex.push(index);
              }
            });
          };
          for (var j = 0; j < cardsId.length; j++) {
            _loop_2(j);
          }
          if (originalIndex.length > 0) {
            cardIndex = cardIndex + originalIndex.length;
          }
          if (this_1.parent.sortSettings.direction === "Ascending") {
            for (var i = cardIndex; i < columnAllDatas.length; i++) {
              if (cardsId.indexOf(columnAllDatas[i][this_1.parent.cardSettings.headerField]) === -1) {
                columnAllDatas[i][this_1.parent.sortSettings.field] = ++num;
                finalData.push(columnAllDatas[i]);
              }
            }
          } else {
            for (var i = cardIndex - 1; i >= 0; i--) {
              if (cardsId.indexOf(columnAllDatas[i][this_1.parent.cardSettings.headerField]) === -1) {
                columnAllDatas[i][this_1.parent.sortSettings.field] = ++num;
                finalData.push(columnAllDatas[i]);
              }
            }
          }
        }
      };
      var this_1 = this;
      for (var _i = 0, modifiedKey_1 = modifiedKey; _i < modifiedKey_1.length; _i++) {
        var columnKey = modifiedKey_1[_i];
        _loop_1(columnKey);
      }
      return finalData;
    };
    return Crud2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/drag.js
var DragAndDrop = (
  /** @class */
  function() {
    function DragAndDrop2(parent) {
      this.insertClone = "afterend";
      this.parent = parent;
      this.dragObj = {
        element: null,
        cloneElement: null,
        instance: null,
        targetClone: null,
        draggedClone: null,
        targetCloneMulti: null,
        selectedCards: [],
        pageX: 0,
        pageY: 0,
        navigationInterval: null,
        cardDetails: [],
        modifiedData: []
      };
      this.dragEdges = {
        left: false,
        right: false,
        top: false,
        bottom: false
      };
      this.isDragging = false;
      this.isExternalDrop = false;
    }
    DragAndDrop2.prototype.wireDragEvents = function(element2) {
      var dragContainment;
      if (!this.parent.element != null && this.parent.externalDropId.length === 0) {
        dragContainment = this.parent.element.querySelector("." + CONTENT_CLASS);
      }
      this.dragObj.instance = new Draggable2(element2, {
        clone: true,
        enableTapHold: this.parent.isAdaptive,
        enableTailMode: true,
        cursorAt: {
          top: -10,
          left: -10
        },
        dragArea: dragContainment,
        dragStart: this.dragStart.bind(this),
        drag: this.drag.bind(this),
        dragStop: this.dragStop.bind(this),
        enableAutoScroll: false,
        helper: this.dragHelper.bind(this)
      });
    };
    DragAndDrop2.prototype.dragHelper = function(e) {
      if (this.parent.isAdaptive && this.parent.touchModule.mobilePopup && this.parent.touchModule.mobilePopup.element.classList.contains(POPUP_OPEN_CLASS)) {
        this.parent.touchModule.mobilePopup.hide();
      }
      this.dragObj.element = closest2(e.sender.target, "." + CARD_CLASS);
      if (isNullOrUndefined2(this.dragObj.element)) {
        return null;
      }
      this.dragObj.element.style.width = formatUnit(this.dragObj.element.offsetWidth);
      var cloneWrapper = createElement2("div", {
        innerHTML: this.dragObj.element.outerHTML
      });
      this.dragObj.cloneElement = cloneWrapper.children.item(0);
      addClass2([this.dragObj.cloneElement], CLONED_CARD_CLASS);
      this.dragObj.element.parentElement.appendChild(this.dragObj.cloneElement);
      this.dragObj.targetCloneMulti = createElement2("div", {
        className: TARGET_MULTI_CLONE_CLASS
      });
      this.dragObj.targetClone = createElement2("div", {
        className: DROPPED_CLONE_CLASS,
        styles: "width:100%;height:" + formatUnit(this.dragObj.element.offsetHeight)
      });
      this.dragObj.modifiedData = [];
      return this.dragObj.cloneElement;
    };
    DragAndDrop2.prototype.dragStart = function(e) {
      var _this = this;
      this.dragObj.selectedCards = this.dragObj.element;
      this.borderElm = this.parent.element.querySelectorAll("." + BORDER_CLASS);
      if (this.dragObj.element.classList.contains(CARD_SELECTION_CLASS)) {
        var className = "." + CARD_CLASS + "." + CARD_SELECTION_CLASS + ":not(." + CLONED_CARD_CLASS + ")";
        var closestEle = closest2(this.dragObj.element, "." + CONTENT_ROW_CLASS);
        this.dragObj.selectedCards = [].slice.call(closestEle.querySelectorAll(className));
        this.dragObj.selectedCards.forEach(function(element2) {
          _this.dragObj.cardDetails.push(_this.parent.getCardDetails(element2));
        });
      } else {
        this.dragObj.cardDetails = [this.parent.getCardDetails(this.dragObj.element)];
      }
      if (!isNullOrUndefined2(this.dragObj.selectedCards) && !isNullOrUndefined2(this.dragObj.selectedCards.length) && this.dragObj.selectedCards.length >= 1) {
        this.dragObj.selectedCards[0].closest(".e-content-cells").classList.add("e-dragged-column");
      } else if (!isNullOrUndefined2(this.dragObj.selectedCards) && !isNullOrUndefined2(this.dragObj.selectedCards.closest(".e-content-cells"))) {
        this.dragObj.selectedCards.closest(".e-content-cells").classList.add("e-dragged-column");
      }
      var dragArgs = {
        cancel: false,
        data: this.dragObj.cardDetails,
        event: e,
        element: this.dragObj.selectedCards
      };
      this.parent.trigger(dragStart, dragArgs, function(dragEventArgs) {
        if (dragEventArgs.cancel) {
          _this.removeElement(_this.dragObj.cloneElement);
          _this.dragObj.instance.intDestroy(e);
          _this.dragObj.element = null;
          _this.dragObj.targetClone = null;
          _this.dragObj.draggedClone = null;
          _this.dragObj.cloneElement = null;
          _this.dragObj.targetCloneMulti = null;
          return;
        }
        if (_this.dragObj.element.classList.contains(CARD_SELECTION_CLASS)) {
          _this.dragObj.selectedCards.forEach(function(element2) {
            _this.draggedClone(element2);
          });
          if (_this.dragObj.selectedCards.length > 1) {
            _this.dragObj.cloneElement.innerHTML = "";
            var drag2 = createElement2("div", {
              className: "e-multi-card-text",
              innerHTML: _this.dragObj.selectedCards.length + " " + _this.parent.localeObj.getConstant("cards")
            });
            _this.dragObj.cloneElement.appendChild(drag2);
            classList(_this.dragObj.cloneElement, ["e-multi-card-clone"], [CARD_SELECTION_CLASS]);
            if (_this.parent.enableVirtualization) {
              _this.parent.virtualLayoutModule.disableAttributeSelection(_this.dragObj.cloneElement);
            } else {
              _this.parent.layoutModule.disableAttributeSelection(_this.dragObj.cloneElement);
            }
            _this.dragObj.cloneElement.style.width = "90px";
          }
        } else {
          _this.draggedClone(_this.dragObj.element);
        }
        EventHandler2.add(document.body, "keydown", _this.keydownHandler, _this);
        _this.parent.notify(contentReady, {});
      });
    };
    DragAndDrop2.prototype.draggedClone = function(element2) {
      this.dragObj.draggedClone = createElement2("div", {
        className: DRAGGED_CLONE_CLASS,
        styles: "width:" + formatUnit(element2.offsetWidth - 1) + ";height:" + formatUnit(element2.offsetHeight)
      });
      element2.insertAdjacentElement("afterend", this.dragObj.draggedClone);
      addClass2([element2], DRAGGED_CARD_CLASS);
    };
    DragAndDrop2.prototype.drag = function(e) {
      var _this = this;
      if (!e.target) {
        return;
      }
      var cardElement = closest2(e.target, "." + ROOT_CLASS + " ." + CARD_CLASS);
      if (!isNullOrUndefined2(cardElement) && this.parent.enableVirtualization && !isNullOrUndefined2(e.target.previousElementSibling) && !isNullOrUndefined2(e.target.previousElementSibling.querySelector(".e-target-dropped-clone"))) {
        cardElement = e.target.previousElementSibling.querySelector(".e-target-dropped-clone").nextElementSibling;
      }
      var targetEle = e.target;
      if (!isNullOrUndefined2(e.target.parentElement)) {
        if (e.target.nodeName === "SPAN" && e.target.classList.contains("e-empty-card")) {
          targetEle = e.target.parentElement;
        } else if (e.target.nodeName === "DIV" && e.target.classList.contains("e-kanban-border")) {
          if (!(this.parent.element.querySelector(".e-target-dropped-clone") === e.target.nextElementSibling.firstChild)) {
            targetEle = e.target.parentElement;
          }
        }
      }
      var target = cardElement || targetEle;
      var selector = "." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + ") ." + CONTENT_CELLS_CLASS + "." + DROPPABLE_CLASS;
      var contentCell = closest2(target, selector);
      var cellDimension;
      var borderElem;
      var dropElement;
      if (target.nextElementSibling && target.nextElementSibling.lastChild) {
        dropElement = target.nextElementSibling.lastChild.previousElementSibling;
      }
      this.externalDrop(target);
      this.kanbanObj = this.parent.isExternalKanbanDrop ? this.parent.externalDropObj : this.parent;
      this.calculateArgs(e);
      if (contentCell && document.body.style.cursor !== "not-allowed") {
        var targetKey = this.getColumnKey(contentCell);
        var keys4 = targetKey.split(",");
        this.multiCloneRemove();
        var isDrag = targetKey === this.getColumnKey(closest2(this.dragObj.draggedClone, "." + CONTENT_CELLS_CLASS)) ? true : false;
        if (keys4.length === 1 || isDrag) {
          if (target.classList.contains(DRAGGED_CLONE_CLASS)) {
            this.removeElement(this.dragObj.targetClone, this.kanbanObj);
          }
          if (target.classList.contains(CARD_CLASS) || this.insertClone === "beforebegin") {
            var element2 = target.classList.contains(DRAGGED_CLONE_CLASS) ? target.previousElementSibling.classList.contains(DRAGGED_CARD_CLASS) ? null : target.previousElementSibling : target.previousElementSibling;
            this.insertClone = "afterend";
            if (isNullOrUndefined2(element2)) {
              var pageY = target.classList.contains(DRAGGED_CLONE_CLASS) ? this.dragObj.pageY / 2 : this.dragObj.pageY;
              var height = target.classList.contains(DRAGGED_CLONE_CLASS) ? target.offsetHeight : target.offsetHeight / 2;
              if (pageY - (this.kanbanObj.element.getBoundingClientRect().top + target.offsetTop) < height) {
                this.insertClone = "beforebegin";
              }
            }
            if (target.classList.contains(CARD_CLASS)) {
              if (this.parent.enableVirtualization) {
                this.insertClone = this.isTargetElementVisible(target) ? this.insertClone : "beforebegin";
              }
              target.insertAdjacentElement(this.insertClone, this.dragObj.targetClone);
            }
          } else if (target.classList.contains(CONTENT_CELLS_CLASS) && !closest2(target, "." + SWIMLANE_ROW_CLASS)) {
            if (target.querySelectorAll("." + DRAGGED_CARD_CLASS).length !== 0 && target.querySelectorAll("." + CARD_CLASS + ":not(.e-kanban-dragged-card):not(.e-cloned-card)").length === 0) {
              return;
            } else {
              target.querySelector("." + CARD_WRAPPER_CLASS).appendChild(this.dragObj.targetClone);
            }
          } else if ((target.classList.contains(CARD_WRAPPER_CLASS) || target.classList.contains(CARD_VIRTUAL_WRAPPER_CLASS)) && !closest2(target, "." + SWIMLANE_ROW_CLASS) && contentCell.querySelectorAll("." + CARD_CLASS).length === 0) {
            target.appendChild(this.dragObj.targetClone);
          } else if (target.classList.contains(BORDER_CLASS) && !closest2(target, "." + SWIMLANE_ROW_CLASS) && target.nextElementSibling && target.nextElementSibling.classList.contains(CARD_WRAPPER_CLASS) && this.dragObj.targetClone && (!dropElement || !dropElement.classList.contains(DROPPED_CLONE_CLASS))) {
            if (!this.parent.enableVirtualization && !this.isTargetElementVisible(target.nextElementSibling)) {
              target.nextElementSibling.appendChild(this.dragObj.targetClone);
            }
          }
        } else if (keys4.length > 1 && (contentCell.classList.contains(DROPPING_CLASS) || contentCell.firstChild && contentCell.firstChild.classList.contains(DROPPING_CLASS))) {
          this.multiCloneCreate(keys4, contentCell);
        }
        this.kanbanObj.notify(contentReady, {});
      }
      if (this.kanbanObj.element.querySelectorAll("." + DROPPING_CLASS).length === 0) {
        this.cellDropping();
      }
      var isCollapsed = false;
      if (contentCell) {
        isCollapsed = contentCell.classList.contains(COLLAPSED_CLASS) && contentCell.classList.contains(DROPPING_CLASS);
        if (contentCell.getAttribute("aria-expanded") === "true" || !contentCell.parentElement.hasAttribute("aria-expanded")) {
          cellDimension = contentCell.getBoundingClientRect();
          this.updateDimension(cellDimension);
        }
        borderElem = contentCell.querySelector("." + BORDER_CLASS);
      }
      if (target && target.tagName === "TABLE" && !isNullOrUndefined2(target.querySelector("." + CONTENT_ROW_CLASS))) {
        cellDimension = target.querySelector("." + CONTENT_ROW_CLASS).getBoundingClientRect();
        this.updateDimension(cellDimension, target);
      }
      if (isCollapsed) {
        this.toggleVisible(target);
        addClass2([contentCell], TOGGLE_VISIBLE_CLASS);
      }
      var tColumn = [].slice.call(this.kanbanObj.element.querySelectorAll("." + TOGGLE_VISIBLE_CLASS));
      if (tColumn.length > 0 && !target.classList.contains(TOGGLE_VISIBLE_CLASS) && !closest2(target, "." + TOGGLE_VISIBLE_CLASS)) {
        this.toggleVisible(target, tColumn.slice(-1)[0]);
        removeClass2(tColumn, TOGGLE_VISIBLE_CLASS);
      }
      this.kanbanObj.notify(contentReady, {});
      var multiKeyTarget = closest2(target, "." + MULTI_COLUMN_KEY_CLASS);
      if (multiKeyTarget) {
        var columnKeys = [].slice.call(this.kanbanObj.element.querySelectorAll("." + MULTI_COLUMN_KEY_CLASS + ":not(." + DISABLED_CLASS + ")")).filter(function(element3) {
          return _this.getColumnKey(element3) === _this.getColumnKey(multiKeyTarget);
        });
        if (columnKeys.length > 0) {
          addClass2(columnKeys, MULTI_ACTIVE_CLASS);
          if (columnKeys[0].previousElementSibling) {
            addClass2([columnKeys[0].previousElementSibling], "e-multi-bottom-border");
          }
        }
      }
      document.body.style.cursor = contentCell && contentCell.classList.contains(DROPPING_CLASS) || contentCell && borderElem && borderElem.classList.contains(DROPPING_CLASS) ? "" : "not-allowed";
      if (cardElement && !closest2(cardElement, "." + CONTENT_CELLS_CLASS).classList.contains(DROPPING_CLASS) && !(contentCell && borderElem && borderElem.classList.contains(DROPPING_CLASS))) {
        cardElement.style.cursor = "not-allowed";
        document.body.style.cursor = "not-allowed";
      }
      if (this.isExternalDrop && document.body.style.cursor === "not-allowed") {
        document.body.style.cursor = "";
      }
      if (document.body.style.cursor === "not-allowed") {
        this.removeElement(this.dragObj.targetClone, this.kanbanObj);
        this.multiCloneRemove();
      }
      this.updateScrollPosition();
      var dragArgs = {
        data: this.dragObj.cardDetails,
        event: e,
        element: this.dragObj.selectedCards
      };
      this.kanbanObj.trigger(drag, dragArgs);
      this.parent.isExternalKanbanDrop = false;
      this.isExternalDrop = false;
    };
    DragAndDrop2.prototype.removeElement = function(element2, kanbanObj) {
      kanbanObj = kanbanObj ? kanbanObj : this.parent;
      if (kanbanObj.element.getElementsByClassName(element2.className).length > 0) {
        remove(element2);
      }
    };
    DragAndDrop2.prototype.isTargetElementVisible = function(targetElem) {
      var wrapperElem = closest2(targetElem, "." + CARD_WRAPPER_CLASS);
      if (!isNullOrUndefined2(wrapperElem)) {
        var wrapperElemBottom = wrapperElem.getBoundingClientRect().bottom;
        var targetElemBottom = targetElem.getBoundingClientRect().bottom;
        if (targetElemBottom > wrapperElemBottom) {
          return false;
        }
        return true;
      }
      return true;
    };
    DragAndDrop2.prototype.externalDrop = function(target) {
      var _this = this;
      this.parent.externalDropId.forEach(function(externalDropId) {
        var targetRootElement = closest2(target, externalDropId);
        if (targetRootElement) {
          if (targetRootElement.classList.contains("e-kanban")) {
            _this.parent.externalDropObj = document.querySelector(externalDropId).ej2_instances[0];
            _this.parent.isExternalKanbanDrop = true;
            var className = "." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + "):not(." + COLLAPSED_CLASS + ") ." + CONTENT_CELLS_CLASS;
            var cells = [].slice.call(_this.parent.externalDropObj.element.querySelectorAll(className));
            addClass2(cells, DROPPING_CLASS);
          } else {
            _this.isExternalDrop = true;
          }
        }
      });
    };
    DragAndDrop2.prototype.multiCloneCreate = function(keys4, contentCell) {
      var offsetHeight = contentCell.offsetHeight;
      var limitEle = contentCell.querySelector("." + LIMITS_CLASS);
      if (limitEle) {
        offsetHeight -= limitEle.offsetHeight;
      }
      this.dragObj.targetCloneMulti.style.height = formatUnit(offsetHeight);
      if (contentCell.querySelector("." + SHOW_ADD_BUTTON)) {
        addClass2([contentCell.querySelector("." + SHOW_ADD_BUTTON)], MULTI_CARD_WRAPPER_CLASS);
      }
      addClass2([contentCell.querySelector("." + CARD_WRAPPER_CLASS)], MULTI_CARD_WRAPPER_CLASS);
      contentCell.querySelector("." + CARD_WRAPPER_CLASS).style.height = "auto";
      contentCell.style.borderStyle = "none";
      this.removeElement(this.dragObj.targetClone);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        var dragCell = closest2(this.dragObj.draggedClone, "." + CONTENT_CELLS_CLASS);
        var transition = this.kanbanObj.columns[dragCell.cellIndex].transitionColumns;
        var allowTransition = this.allowedTransition(this.dragObj.element.getAttribute("data-key"), key, transition);
        var name_1 = allowTransition ? "" : " " + DISABLED_CLASS;
        var colKey = createElement2("div", {
          className: MULTI_COLUMN_KEY_CLASS + name_1,
          attrs: {
            "data-key": key.trim()
          }
        });
        var text = createElement2("div", {
          className: "e-text",
          innerHTML: key.trim()
        });
        contentCell.appendChild(this.dragObj.targetCloneMulti).appendChild(colKey).appendChild(text);
        colKey.style.cursor = allowTransition ? "" : "not-allowed";
        colKey.style.lineHeight = colKey.style.height = formatUnit(offsetHeight / keys4.length);
        text.style.top = formatUnit(offsetHeight / 2 - text.offsetHeight / 2);
      }
    };
    DragAndDrop2.prototype.allowedTransition = function(currentCardKey, targetCardKey, allowedKey) {
      var allowTransition = true;
      var targetKey = targetCardKey.split(",");
      for (var i = 0; i < targetKey.length; i++) {
        if (currentCardKey === targetKey[i].trim()) {
          return true;
        }
        if (allowedKey) {
          if (allowedKey.length === 1 && allowedKey[0].length === 0) {
            return true;
          }
          for (var j = 0; j < allowedKey.length; j++) {
            if (targetKey[i].trim() === allowedKey[j].trim()) {
              return true;
            } else {
              allowTransition = false;
            }
          }
        }
      }
      return allowTransition;
    };
    DragAndDrop2.prototype.cellDropping = function() {
      var _this = this;
      var dragCell = closest2(this.dragObj.draggedClone, "." + CONTENT_CELLS_CLASS);
      var dragRow = closest2(this.dragObj.draggedClone, "." + CONTENT_ROW_CLASS);
      if (dragCell && dragCell.classList.contains(DROP_CLASS)) {
        addClass2([dragCell], DROPPING_CLASS);
      }
      this.addDropping(dragRow, dragCell);
      if (this.kanbanObj.swimlaneSettings.keyField && this.kanbanObj.swimlaneSettings.allowDragAndDrop) {
        var className = "." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + "):not(." + COLLAPSED_CLASS + ")";
        var rows = [].slice.call(this.kanbanObj.element.querySelectorAll(className));
        [].slice.call(rows).forEach(function(row) {
          if (dragRow !== row) {
            _this.addDropping(row, dragCell);
          }
        });
      }
    };
    DragAndDrop2.prototype.addDropping = function(dragRow, dragCell) {
      var _this = this;
      if (dragCell && this.borderElm && this.borderElm.length !== 0) {
        if (dragCell.classList.contains(DROPPING_CLASS)) {
          removeClass2([dragCell], DROPPING_CLASS);
        }
        var cellDimension = dragCell.getBoundingClientRect();
        this.updateDimension(cellDimension);
      } else if (dragCell && dragRow) {
        [].slice.call(dragRow.children).forEach(function(cell) {
          var transition = _this.kanbanObj.columns[dragCell.cellIndex].transitionColumns;
          if (cell !== dragCell && cell.classList.contains(DROP_CLASS) && _this.allowedTransition(dragCell.getAttribute("data-key"), cell.getAttribute("data-key"), transition)) {
            addClass2([cell], DROPPING_CLASS);
          }
        });
      }
    };
    DragAndDrop2.prototype.updateDimension = function(dimensions, target) {
      [].slice.call(this.borderElm).forEach(function(element2) {
        if (element2.parentElement && (element2.parentElement.getAttribute("aria-expanded") === "true" || !element2.parentElement.hasAttribute("aria-expanded"))) {
          addClass2([element2], DROPPING_CLASS);
        }
        var hasAddButton = element2.previousElementSibling;
        element2.style.height = parseInt(dimensions.height.toString(), 10) - (hasAddButton && hasAddButton.classList.contains(SHOW_ADD_BUTTON) ? hasAddButton.offsetHeight + hasAddButton.offsetTop : 0) + "px";
        if (!target || target.tagName !== "TABLE") {
          element2.style.width = parseInt(dimensions.width.toString(), 10) + "px";
        }
        element2.style.left = element2.parentElement.getBoundingClientRect().left - closest2(element2, ".e-kanban").getBoundingClientRect().left + "px";
      });
    };
    DragAndDrop2.prototype.keydownHandler = function(e) {
      if (e.code === "Escape" && this.dragObj.cloneElement) {
        EventHandler2.remove(this.dragObj.cloneElement, "keydown", this.keydownHandler);
        this.dragObj.element.removeAttribute("aria-grabbed");
        this.dragStopClear();
        this.dragStopPostClear();
      }
    };
    DragAndDrop2.prototype.dragStop = function(e) {
      var _this = this;
      var contentCell = closest2(this.dragObj.targetClone, "." + CONTENT_CELLS_CLASS);
      if (this.parent.enableVirtualization && !isNullOrUndefined2(contentCell)) {
        contentCell.classList.add("e-dropped-column");
      }
      var columnKey;
      var dropIndex;
      var dataDropIndexKeyfieldValue;
      var isMultipleDrag;
      EventHandler2.remove(document.body, "keydown", this.keydownHandler);
      [].slice.call(this.borderElm).forEach(function(element3) {
        element3.classList.remove(DROPPING_CLASS);
      });
      if (this.dragObj.targetClone.parentElement) {
        isMultipleDrag = this.dragObj.selectedCards && this.dragObj.selectedCards.length > 1 && this.parent.sortSettings.sortBy === "Index";
        var className = !isMultipleDrag ? "." + CARD_CLASS + ":not(." + DRAGGED_CARD_CLASS + ", ." + CLONED_CARD_CLASS + "),." + DROPPED_CLONE_CLASS : "." + CARD_CLASS + ":not(." + CLONED_CARD_CLASS + "),." + DROPPED_CLONE_CLASS;
        var element2 = [].slice.call(this.dragObj.targetClone.parentElement.querySelectorAll(className));
        dropIndex = element2.indexOf(this.dragObj.targetClone);
        if (this.parent.enableVirtualization && !isNullOrUndefined2(this.dragObj.targetClone.nextElementSibling)) {
          dataDropIndexKeyfieldValue = this.dragObj.targetClone.nextElementSibling.getAttribute("data-id");
        }
      }
      if (!isNullOrUndefined2(this.kanbanObj) && this.kanbanObj.element.querySelector("." + TARGET_MULTI_CLONE_CLASS)) {
        columnKey = closest2(e.target, "." + MULTI_COLUMN_KEY_CLASS + ":not(." + DISABLED_CLASS + ")");
      }
      if (contentCell || columnKey) {
        var cardStatus_1;
        if (contentCell) {
          cardStatus_1 = this.getColumnKey(contentCell);
        } else {
          cardStatus_1 = this.getColumnKey(columnKey);
          contentCell = closest2(columnKey, "." + CONTENT_CELLS_CLASS);
        }
        if (this.dragObj.selectedCards instanceof HTMLElement) {
          this.updateDroppedData(this.dragObj.selectedCards, cardStatus_1, contentCell);
        } else {
          this.dragObj.selectedCards.forEach(function(element3) {
            _this.updateDroppedData(element3, cardStatus_1, contentCell);
          });
        }
        if (this.parent.sortSettings.field && this.parent.sortSettings.sortBy === "Index") {
          this.changeOrder(this.dragObj.modifiedData, e.helper);
        }
      }
      if (this.dragObj.modifiedData.length === 0) {
        this.dragObj.modifiedData = this.dragObj.cardDetails;
      }
      var dragArgs = {
        cancel: false,
        data: this.dragObj.modifiedData,
        event: e,
        element: this.dragObj.selectedCards,
        dropIndex
      };
      this.parent.trigger(dragStop, dragArgs, function(dragEventArgs) {
        _this.dragStopClear();
        if (!dragEventArgs.cancel) {
          if (contentCell || columnKey) {
            var updateCard = dragEventArgs.data instanceof Array && dragEventArgs.data.length > 1 ? dragEventArgs.data : dragEventArgs.data[0];
            var draggedColumnKey = void 0;
            var droppedColumnKey = void 0;
            if (_this.parent.enableVirtualization) {
              draggedColumnKey = contentCell.closest(".e-kanban").querySelector(".e-dragged-column").getAttribute("data-key");
              droppedColumnKey = contentCell.getAttribute("data-key");
            }
            _this.parent.crudModule.updateCard(updateCard, dragEventArgs.dropIndex, true, dataDropIndexKeyfieldValue, draggedColumnKey, droppedColumnKey, isMultipleDrag);
            if (_this.parent.enableVirtualization) {
              _this.parent.virtualLayoutModule.refreshColumnData(draggedColumnKey, droppedColumnKey);
              _this.parent.virtualLayoutModule.ensureColumnNotEmpty(draggedColumnKey);
            }
          }
        }
        _this.removeEmptyTrElement();
        _this.dragStopPostClear();
      });
    };
    DragAndDrop2.prototype.removeEmptyTrElement = function() {
      if (!this.parent.swimlaneSettings.showEmptyRow) {
        var swimlaneRowList = this.parent.element.querySelectorAll(".e-content-row.e-swimlane-row");
        for (var j = 0; j < swimlaneRowList.length; j++) {
          var cardRowData = swimlaneRowList[j].nextElementSibling.querySelectorAll(".e-card-wrapper .e-card");
          if (!isNullOrUndefined2(swimlaneRowList[j].nextElementSibling) && cardRowData.length === 0) {
            detach2(swimlaneRowList[j].nextElementSibling);
            detach2(swimlaneRowList[j]);
          }
        }
      }
    };
    DragAndDrop2.prototype.dragStopClear = function() {
      this.removeElement(this.dragObj.draggedClone);
      this.removeElement(this.dragObj.targetClone, this.kanbanObj);
      this.removeElement(this.dragObj.cloneElement);
      var dragMultiClone = [].slice.call(this.parent.element.querySelectorAll("." + DRAGGED_CLONE_CLASS));
      dragMultiClone.forEach(function(clone) {
        remove(clone);
      });
      this.dragObj.element.style.removeProperty("width");
      this.multiCloneRemove();
      if (this.dragObj.selectedCards instanceof HTMLElement) {
        removeClass2([this.dragObj.selectedCards], DRAGGED_CARD_CLASS);
      } else {
        removeClass2(this.dragObj.selectedCards, DRAGGED_CARD_CLASS);
      }
      clearInterval(this.dragObj.navigationInterval);
      this.dragObj.navigationInterval = null;
      if (document.body.style.cursor === "not-allowed") {
        document.body.style.cursor = "";
      }
      var styleCards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_CLASS + "[style]"));
      styleCards.forEach(function(styleCard) {
        styleCard.style.cursor = "";
      });
      var className = "." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + ")";
      var cells = [].slice.call(this.parent.element.querySelectorAll(className + " ." + CONTENT_CELLS_CLASS));
      cells.forEach(function(cell) {
        return removeClass2([cell], DROPPING_CLASS);
      });
      if (this.parent.externalDropObj) {
        var externalCells = [].slice.call(this.parent.externalDropObj.element.querySelectorAll(className + " ." + CONTENT_CELLS_CLASS));
        externalCells.forEach(function(externalCell) {
          return removeClass2([externalCell], DROPPING_CLASS);
        });
      }
    };
    DragAndDrop2.prototype.dragStopPostClear = function() {
      if (this.parent.isAdaptive) {
        this.parent.touchModule.tabHold = false;
      }
      if (this.parent.element.querySelector(".e-dragged-column")) {
        this.parent.element.querySelector(".e-dragged-column").classList.remove("e-dragged-column");
      }
      if (this.parent.element.querySelector(".e-dropped-column")) {
        this.parent.element.querySelector(".e-dropped-column").classList.remove("e-dropped-column");
      }
      this.dragObj.cardDetails = this.dragObj.modifiedData = [];
      this.isDragging = false;
      this.parent.isExternalKanbanDrop = false;
      this.parent.externalDropObj = null;
    };
    DragAndDrop2.prototype.updateDroppedData = function(element2, cardStatus, contentCell) {
      var crudObj = this.parent.getCardDetails(element2);
      var crudData = extend2({}, crudObj, null, true);
      if (cardStatus.split(",").length === 1) {
        crudData[this.parent.keyField] = cardStatus;
      }
      if (this.parent.swimlaneSettings.keyField && this.parent.swimlaneSettings.allowDragAndDrop) {
        var prev = closest2(contentCell, "." + CONTENT_ROW_CLASS).previousElementSibling;
        if (this.parent.isAdaptive) {
          var keyField = this.parent.layoutModule.kanbanRows[this.parent.layoutModule.swimlaneIndex].keyField;
          crudData[this.parent.swimlaneSettings.keyField] = keyField;
        } else {
          crudData[this.parent.swimlaneSettings.keyField] = this.getColumnKey(prev);
        }
      }
      this.dragObj.modifiedData.push(crudData);
    };
    DragAndDrop2.prototype.changeOrder = function(modifieddata, draggedCard) {
      var _this = this;
      var prevele = false;
      var element2;
      if (this.kanbanObj.sortSettings.direction === "Ascending") {
        element2 = draggedCard === this.dragObj.targetClone.previousElementSibling && this.dragObj.targetClone.previousElementSibling && this.dragObj.targetClone.previousElementSibling.previousElementSibling ? this.dragObj.targetClone.previousElementSibling.previousElementSibling : this.dragObj.targetClone.previousElementSibling;
      } else {
        element2 = this.dragObj.targetClone.nextElementSibling;
      }
      if (element2 && !element2.classList.contains(DRAGGED_CARD_CLASS) && !element2.classList.contains(CLONED_CARD_CLASS) && !element2.classList.contains(DRAGGED_CLONE_CLASS)) {
        prevele = true;
      } else if (this.dragObj.targetClone.nextElementSibling && this.kanbanObj.sortSettings.direction === "Ascending") {
        element2 = this.dragObj.targetClone.nextElementSibling;
      } else if (this.dragObj.targetClone.previousElementSibling && this.kanbanObj.sortSettings.direction === "Descending") {
        element2 = this.dragObj.targetClone.previousElementSibling;
      } else {
        return;
      }
      if (element2.classList.contains(CARD_CLASS)) {
        var obj = this.kanbanObj.getCardDetails(element2);
        var keyIndex_1 = obj[this.kanbanObj.sortSettings.field];
        if (modifieddata.length > 1 && this.kanbanObj.sortSettings.direction === "Descending") {
          modifieddata = modifieddata.reverse();
        }
        modifieddata.forEach(function(data, index) {
          if (prevele) {
            data[_this.kanbanObj.sortSettings.field] = ++keyIndex_1;
          } else if (keyIndex_1 !== 1 && index <= data[_this.kanbanObj.sortSettings.field]) {
            data[_this.kanbanObj.sortSettings.field] = --keyIndex_1;
          } else if (keyIndex_1 === 1) {
            data[_this.kanbanObj.sortSettings.field] = index + 1;
          }
        });
      }
    };
    DragAndDrop2.prototype.toggleVisible = function(target, tColumn) {
      var _this = this;
      var headerCells = "." + HEADER_CELLS_CLASS + ":not(." + STACKED_HEADER_CELL_CLASS + ")";
      var lists = [].slice.call(this.kanbanObj.element.querySelectorAll(headerCells));
      lists.forEach(function(list) {
        if (_this.getColumnKey(list) === _this.getColumnKey(tColumn || target)) {
          _this.kanbanObj.actionModule.columnToggle(list);
        }
      });
      var cloneTarget = closest2(this.dragObj.draggedClone, "." + CONTENT_CELLS_CLASS);
      if (cloneTarget) {
        var width = formatUnit(cloneTarget.offsetWidth - cardSpace);
        this.dragObj.draggedClone.style.width = width;
        this.dragObj.cloneElement.style.width = width;
      }
    };
    DragAndDrop2.prototype.multiCloneRemove = function() {
      var cloneMulti = !isNullOrUndefined2(this.kanbanObj) ? [].slice.call(this.kanbanObj.element.querySelectorAll("." + TARGET_MULTI_CLONE_CLASS)) : [];
      if (cloneMulti.length > 0) {
        var columnKey = [].slice.call(this.kanbanObj.element.querySelectorAll("." + MULTI_COLUMN_KEY_CLASS));
        columnKey.forEach(function(node) {
          return remove(node);
        });
        cloneMulti.forEach(function(node) {
          var cell = closest2(node, "." + CONTENT_CELLS_CLASS);
          if (cell) {
            cell.style.borderStyle = "";
            if (cell.querySelector("." + SHOW_ADD_BUTTON)) {
              removeClass2([cell.querySelector("." + SHOW_ADD_BUTTON)], MULTI_CARD_WRAPPER_CLASS);
            }
            removeClass2([cell.querySelector("." + CARD_WRAPPER_CLASS)], MULTI_CARD_WRAPPER_CLASS);
          }
        });
        this.removeElement(this.dragObj.targetCloneMulti, this.kanbanObj);
      }
    };
    DragAndDrop2.prototype.calculateArgs = function(e) {
      var eventArgs = this.getPageCoordinates(e);
      this.dragObj.pageY = eventArgs.pageY;
      this.dragObj.pageX = eventArgs.pageX;
      this.isDragging = true;
      if (this.kanbanObj.isAdaptive && this.kanbanObj.tooltipModule) {
        this.kanbanObj.tooltipModule.tooltipObj.close();
      }
    };
    DragAndDrop2.prototype.getPageCoordinates = function(e) {
      var eventArgs = e.event;
      return eventArgs && eventArgs.changedTouches ? eventArgs.changedTouches[0] : e.changedTouches ? e.changedTouches[0] : eventArgs || e;
    };
    DragAndDrop2.prototype.getColumnKey = function(target) {
      if (target && target.getAttribute("data-key")) {
        return target.getAttribute("data-key").trim();
      }
      return "";
    };
    DragAndDrop2.prototype.updateScrollPosition = function() {
      var _this = this;
      if (isNullOrUndefined2(this.dragObj.navigationInterval)) {
        this.dragObj.navigationInterval = window.setInterval(function() {
          _this.autoScroll();
        }, 100);
      }
    };
    DragAndDrop2.prototype.autoScrollValidation = function() {
      var pageY = this.dragObj.pageY;
      var pageX = this.dragObj.pageX;
      var autoScrollDistance = 30;
      var dragEdges = {
        left: false,
        right: false,
        top: false,
        bottom: false
      };
      var viewBoundaries = this.kanbanObj.element.querySelector("." + CONTENT_CLASS).getBoundingClientRect();
      if (pageY < viewBoundaries.top + autoScrollDistance + window.pageYOffset && pageY > viewBoundaries.top + window.pageYOffset) {
        dragEdges.top = true;
      }
      if (pageY > viewBoundaries.bottom - autoScrollDistance + window.pageYOffset && pageY < viewBoundaries.bottom + window.pageYOffset) {
        dragEdges.bottom = true;
      }
      if (pageX < viewBoundaries.left + autoScrollDistance + window.pageXOffset && pageX > viewBoundaries.left + window.pageXOffset) {
        dragEdges.left = true;
      }
      if (pageX > viewBoundaries.right - autoScrollDistance + window.pageXOffset && pageX < viewBoundaries.right + window.pageXOffset) {
        dragEdges.right = true;
      }
      this.dragEdges = dragEdges;
    };
    DragAndDrop2.prototype.autoScroll = function() {
      this.autoScrollValidation();
      var scrollSensitivity = 30;
      if (this.kanbanObj.isAdaptive) {
        var parent_1;
        if (this.dragEdges.top || this.dragEdges.bottom) {
          if (this.dragObj.targetClone) {
            parent_1 = closest2(this.dragObj.targetClone, "." + CARD_WRAPPER_CLASS);
          } else {
            parent_1 = closest2(this.dragObj.draggedClone, "." + CARD_WRAPPER_CLASS);
          }
        } else if (this.dragEdges.right || this.dragEdges.left) {
          parent_1 = this.kanbanObj.element.querySelector("." + CONTENT_CLASS);
        }
        if (parent_1) {
          var yIsScrollable = parent_1.offsetHeight <= parent_1.scrollHeight;
          var xIsScrollable = parent_1.offsetWidth <= parent_1.scrollWidth;
          var yInBounds = parent_1.scrollTop >= 0 && parent_1.scrollTop + parent_1.offsetHeight <= parent_1.scrollHeight;
          var xInBounds = parent_1.scrollLeft >= 0 && parent_1.scrollLeft + parent_1.offsetWidth <= parent_1.scrollWidth;
          if (yIsScrollable && yInBounds && (this.dragEdges.top || this.dragEdges.bottom)) {
            parent_1.scrollTop += this.dragEdges.top ? -(scrollSensitivity + 36) : scrollSensitivity;
          }
          if (xIsScrollable && xInBounds && (this.dragEdges.left || this.dragEdges.right)) {
            var width = this.parent.enableVirtualization ? this.kanbanObj.virtualLayoutModule.getWidth() : this.kanbanObj.layoutModule.getWidth();
            var scroll_1 = width * (this.kanbanObj.columns.length - 1) > parent_1.scrollLeft;
            if (scroll_1 || this.dragEdges.left) {
              parent_1.scrollLeft += this.dragEdges.left ? -scrollSensitivity : scrollSensitivity;
            }
          }
        }
      } else {
        var parent_2 = this.kanbanObj.element.querySelector("." + CONTENT_CLASS);
        var column = this.dragObj.targetClone.parentElement;
        var yScrollable = parent_2.offsetHeight <= parent_2.scrollHeight;
        var xScrollable = parent_2.offsetWidth <= parent_2.scrollWidth;
        var yBounds = yScrollable && parent_2.scrollTop >= 0 && parent_2.scrollTop + parent_2.offsetHeight <= parent_2.scrollHeight;
        var xBounds = xScrollable && parent_2.scrollLeft >= 0 && parent_2.scrollLeft + parent_2.offsetWidth <= parent_2.scrollWidth;
        if (yBounds && (this.dragEdges.top || this.dragEdges.bottom)) {
          parent_2.scrollTop += this.dragEdges.top ? -scrollSensitivity : scrollSensitivity;
          if (this.parent.swimlaneSettings.enableFrozenRows) {
            this.dragObj.cloneElement.style.top = !this.dragEdges.top ? parseInt(this.dragObj.cloneElement.style.top, 10) + scrollSensitivity + "px" : parseInt(this.dragObj.cloneElement.style.top, 10) - scrollSensitivity + "px";
          }
          if (column) {
            column.scrollTop += this.dragEdges.top ? -scrollSensitivity : scrollSensitivity;
          }
        }
        if (xBounds && (this.dragEdges.left || this.dragEdges.right)) {
          parent_2.scrollLeft += this.dragEdges.left ? -scrollSensitivity : scrollSensitivity;
          if (column) {
            column.scrollLeft += this.dragEdges.left ? -scrollSensitivity : scrollSensitivity;
          }
        }
        if (this.dragObj.pageY - window.scrollY < scrollSensitivity) {
          window.scrollTo(window.scrollX, window.scrollY - scrollSensitivity);
        } else if (window.innerHeight - (this.dragObj.pageY - window.scrollY) < scrollSensitivity) {
          window.scrollTo(window.scrollX, window.scrollY + scrollSensitivity);
        }
      }
    };
    DragAndDrop2.prototype.unWireDragEvents = function(element2) {
      if (!isNullOrUndefined2(element2) && !isNullOrUndefined2(element2.ej2_instances[0])) {
        var dragInstance = element2.ej2_instances[0];
        if (dragInstance && !dragInstance.isDestroyed) {
          dragInstance.destroy();
        }
      }
    };
    return DragAndDrop2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/common/incremental-search.js
var queryString = "";
var prevString = "";
var tempQueryString = "";
var matches3 = [];
var activeClass = "e-active";
var prevElementId = "";
function incrementalSearch(keyCode4, items, selectedIndex, ignoreCase, elementId, queryStringUpdated, currentValue, isVirtual, refresh) {
  if (!queryStringUpdated || queryString === "") {
    if (tempQueryString !== "") {
      queryString = tempQueryString + String.fromCharCode(keyCode4);
      tempQueryString = "";
    } else {
      queryString += String.fromCharCode(keyCode4);
    }
  } else if (queryString === prevString) {
    tempQueryString = String.fromCharCode(keyCode4);
  }
  if (isVirtual) {
    setTimeout(function() {
      tempQueryString = "";
    }, 700);
    setTimeout(function() {
      queryString = "";
    }, 3e3);
  } else {
    setTimeout(function() {
      queryString = "";
    }, 1e3);
  }
  var index;
  queryString = ignoreCase ? queryString.toLowerCase() : queryString;
  if (prevElementId === elementId && prevString === queryString && !refresh) {
    for (var i = 0; i < matches3.length; i++) {
      if (matches3[i].classList.contains(activeClass)) {
        index = i;
        break;
      }
      if (currentValue && matches3[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
        index = i;
        break;
      }
    }
    index = index + 1;
    if (isVirtual) {
      return matches3[index] && matches3.length - 1 !== index ? matches3[index] : matches3[matches3.length];
    }
    return matches3[index] ? matches3[index] : matches3[0];
  } else {
    var listItems = items;
    var strLength = queryString.length;
    var text = void 0;
    var item = void 0;
    selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
    var i = selectedIndex;
    matches3 = [];
    do {
      if (i === listItems.length) {
        i = -1;
      }
      if (i === -1) {
        index = 0;
      } else {
        index = i;
      }
      item = listItems[index];
      text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;
      if (text.substr(0, strLength) === queryString) {
        matches3.push(listItems[index]);
      }
      i++;
    } while (i !== selectedIndex);
    prevString = queryString;
    prevElementId = elementId;
    if (isVirtual) {
      var indexUpdated = false;
      for (var i_1 = 0; i_1 < matches3.length; i_1++) {
        if (currentValue && matches3[i_1].textContent.toLowerCase() === currentValue.toLowerCase()) {
          index = i_1;
          indexUpdated = true;
          break;
        }
      }
      if (currentValue && indexUpdated) {
        index = index + 1;
      }
      return matches3[index] ? matches3[index] : matches3[0];
    }
    return matches3[0];
  }
}
function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, type, ignoreAccent) {
  var listItems = items;
  ignoreCase = ignoreCase !== void 0 && ignoreCase !== null ? ignoreCase : true;
  var itemData = {
    item: null,
    index: null
  };
  if (inputVal && inputVal.length) {
    var strLength = inputVal.length;
    var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;
    queryStr = escapeCharRegExp(queryStr);
    var _loop_1 = function(i2, itemsData2) {
      var item = itemsData2[i2];
      var filterValue;
      if (items && dataSource) {
        var checkField_1 = item;
        var fieldValue_1 = fields.text.split(".");
        dataSource.filter(function(data) {
          Array.prototype.slice.call(fieldValue_1).forEach(function(value) {
            if (type === "object" && !data.isHeader && checkField_1.textContent.toString().indexOf(data[value]) !== -1 && checkField_1.getAttribute("data-value") === data[fields.value].toString() || type === "string" && checkField_1.textContent.toString().indexOf(data) !== -1) {
              filterValue = type === "object" ? data[value] : data;
            }
          });
        });
      }
      var text = dataSource && filterValue ? (ignoreCase ? filterValue.toString().toLocaleLowerCase() : filterValue).replace(/^\s+|\s+$/g, "") : (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, "");
      if (ignoreAccent && text && queryStr) {
        text = text.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
        queryStr = queryStr.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
      }
      if (searchType === "Equal" && text === queryStr || searchType === "StartsWith" && text.substr(0, strLength) === queryStr || searchType === "EndsWith" && text.substr(text.length - queryStr.length) === queryStr || searchType === "Contains" && new RegExp(queryStr, "g").test(text)) {
        itemData.item = item;
        itemData.index = i2;
        return {
          value: {
            item,
            index: i2
          }
        };
      }
    };
    for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
      var state_1 = _loop_1(i, itemsData);
      if (typeof state_1 === "object") return state_1.value;
    }
    return itemData;
  }
  return itemData;
}
function escapeCharRegExp(value) {
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function resetIncrementalSearchValues(elementId) {
  if (prevElementId === elementId) {
    prevElementId = "";
    prevString = "";
    queryString = "";
    matches3 = [];
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/common/highlight-search.js
function highlightSearch(element2, query, ignoreCase, type) {
  var isHtmlElement = /<[^>]*>/g.test(element2.innerText);
  if (isHtmlElement) {
    element2.innerText = element2.innerText.replace(/[\u00A0-\u9999<>&]/g, function(match) {
      return "&#" + match.charCodeAt(0) + ";";
    });
  }
  if (query === "") {
    return;
  } else {
    var ignoreRegex = ignoreCase ? "gim" : "gm";
    query = /^[a-zA-Z0-9- ]*$/.test(query) ? query : query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
    var replaceQuery = type === "StartsWith" ? "^(" + query + ")" : type === "EndsWith" ? "(" + query + ")$" : "(" + query + ")";
    findTextNode(element2, new RegExp(replaceQuery, ignoreRegex));
  }
}
function findTextNode(element2, pattern) {
  for (var index = 0; element2.childNodes && index < element2.childNodes.length; index++) {
    if (element2.childNodes[index].nodeType === 3 && element2.childNodes[index].textContent.trim() !== "") {
      var value = element2.childNodes[index].nodeValue.trim().replace(pattern, '<span class="e-highlight">$1</span>');
      element2.childNodes[index].nodeValue = "";
      element2.innerHTML = element2.innerHTML.trim() + value;
      break;
    } else {
      findTextNode(element2.childNodes[index], pattern);
    }
  }
}
function revertHighlightSearch(content) {
  var contentElement = content.querySelectorAll(".e-highlight");
  for (var i = contentElement.length - 1; i >= 0; i--) {
    var parent_1 = contentElement[i].parentNode;
    var text = document.createTextNode(contentElement[i].textContent);
    parent_1.replaceChild(text, contentElement[i]);
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/common/virtual-scroll.js
var __assign = function() {
  __assign = Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
var __awaiter2 = function(thisArg, _arguments, P, generator) {
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : new P(function(resolve2) {
        resolve2(result.value);
      }).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
var __generator2 = function(thisArg, body) {
  var _ = {
    label: 0,
    sent: function() {
      if (t[0] & 1) throw t[1];
      return t[1];
    },
    trys: [],
    ops: []
  }, f, y, t, g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (_) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
};
var VirtualScroll = (
  /** @class */
  function() {
    function VirtualScroll2(parent) {
      var _this = this;
      this.sentinelInfo = {
        "up": {
          check: function(rect, info) {
            var top = rect.top - _this.containerElementRect.top;
            info.entered = top >= 0;
            return top + _this.parent.listItemHeight * _this.parent.virtualItemCount / 2 >= 0;
          },
          axis: "Y"
        },
        "down": {
          check: function(rect, info) {
            var top = rect.bottom;
            info.entered = rect.bottom <= _this.containerElementRect.bottom;
            return top - _this.parent.listItemHeight * _this.parent.virtualItemCount / 2 <= _this.parent.listItemHeight * _this.parent.virtualItemCount / 2;
          },
          axis: "Y"
        }
      };
      this.parent = parent;
      this.removeEventListener();
      this.addEventListener();
    }
    VirtualScroll2.prototype.addEventListener = function() {
      if (this.parent.isDestroyed) {
        return;
      }
      this.parent.on("observe", this.observe, this);
      this.parent.on("setGeneratedData", this.setGeneratedData, this);
      this.parent.on("dataProcessAsync", this.dataProcessAsync, this);
      this.parent.on("setCurrentViewDataAsync", this.setCurrentViewDataAsync, this);
      this.parent.on("bindScrollEvent", this.bindScrollEvent, this);
    };
    VirtualScroll2.prototype.removeEventListener = function() {
      if (this.parent.isDestroyed) {
        return;
      }
      this.parent.off("observe", this.observe);
      this.parent.off("setGeneratedData", this.setGeneratedData);
      this.parent.off("dataProcessAsync", this.dataProcessAsync);
      this.parent.off("setCurrentViewDataAsync", this.setCurrentViewDataAsync);
      this.parent.off("bindScrollEvent", this.bindScrollEvent);
    };
    VirtualScroll2.prototype.bindScrollEvent = function(component) {
      var _this = this;
      this.component = component.component;
      this.observe(function(scrollArgs) {
        return _this.scrollListener(scrollArgs);
      });
    };
    VirtualScroll2.prototype.observe = function(callback) {
      this.containerElementRect = this.parent.popupContentElement.getBoundingClientRect();
      EventHandler2.add(this.parent.popupContentElement, "wheel mousedown", this.popupScrollHandler, this);
      this.touchModule = new Touch2(this.parent.popupContentElement, {
        scroll: this.popupScrollHandler.bind(this)
      });
      EventHandler2.add(this.parent.popupContentElement, "scroll", this.virtualScrollHandler(callback), this);
    };
    VirtualScroll2.prototype.getModuleName = function() {
      return "VirtualScroll";
    };
    VirtualScroll2.prototype.popupScrollHandler = function() {
      this.parent.isMouseScrollAction = true;
      this.parent.isPreventScrollAction = false;
    };
    VirtualScroll2.prototype.getPageQuery = function(query, virtualStartIndex, virtualEndIndex) {
      if (virtualEndIndex !== 0 && !this.parent.allowFiltering && this.component !== "autocomplete") {
        query = query.skip(virtualStartIndex);
      }
      return query;
    };
    VirtualScroll2.prototype.setGeneratedData = function(qStartIndex, recentlyGeneratedData) {
      var loopIteration = 0;
      var endIndex = this.parent.listData.length + this.parent.virtualItemStartIndex;
      for (var i = this.parent.virtualItemStartIndex; i < endIndex; i++) {
        var alreadyAddedData = this.parent.generatedDataObject[i];
        if (!alreadyAddedData) {
          if (recentlyGeneratedData !== null && this.parent.listData.slice(loopIteration, loopIteration + 1).length > 0) {
            var slicedData = this.parent.listData.slice(loopIteration, loopIteration + 1);
            if (slicedData.length > 0) {
              this.parent.generatedDataObject[i] = slicedData;
            }
          }
        }
        loopIteration++;
      }
    };
    VirtualScroll2.prototype.generateAndExecuteQueryAsync = function(query, virtualItemStartIndex, virtualItemEndIndex, isQueryGenerated) {
      if (virtualItemStartIndex === void 0) {
        virtualItemStartIndex = 0;
      }
      if (virtualItemEndIndex === void 0) {
        virtualItemEndIndex = 0;
      }
      if (isQueryGenerated === void 0) {
        isQueryGenerated = false;
      }
      var dataSource = this.parent.dataSource;
      if (!isQueryGenerated) {
        if (!isNullOrUndefined2(this.parent.query)) {
          var newQuery = this.removeSkipAndTakeEvents(this.parent.query.clone());
          query = this.getPageQuery(newQuery, virtualItemStartIndex, virtualItemEndIndex);
        } else {
          query = this.getPageQuery(query, virtualItemStartIndex, virtualItemEndIndex);
        }
      }
      var tempCustomFilter = this.parent.isCustomFilter;
      if (this.component === "combobox") {
        var totalData = 0;
        if (this.parent.dataSource instanceof DataManager) {
          totalData = this.parent.dataSource.dataSource.json.length;
        } else if (this.parent.dataSource && this.parent.dataSource.length > 0) {
          totalData = this.parent.dataSource.length;
        }
        if (totalData > 0) {
          this.parent.isCustomFilter = totalData === this.parent.totalItemCount && this.parent.queryString !== this.parent.typedString ? true : this.parent.isCustomFilter;
        }
      }
      this.parent.resetList(dataSource, this.parent.fields, query);
      this.parent.isCustomFilter = tempCustomFilter;
    };
    VirtualScroll2.prototype.removeSkipAndTakeEvents = function(query) {
      query.queries = query.queries.filter(function(event2) {
        return event2.fn !== "onSkip" && event2.fn !== "onTake";
      });
      return query;
    };
    VirtualScroll2.prototype.setCurrentViewDataAsync = function(component) {
      var currentData = [];
      var isResetListCalled = false;
      var isListUpdated = true;
      if (isNullOrUndefined2(this.component)) {
        this.component = component.component;
      }
      var endIndex = this.parent.viewPortInfo.endIndex;
      if (this.component === "multiselect" && this.parent.mode === "CheckBox" && this.parent.value && Array.isArray(this.parent.value) && this.parent.value.length > 0 && this.parent.enableSelectionOrder && this.parent.targetElement().trim() === "") {
        if (this.parent.viewPortInfo.startIndex < this.parent.value.length) {
          endIndex = this.parent.viewPortInfo.endIndex - this.parent.value.length;
          if (this.parent.viewPortInfo.startIndex === 0) {
            this.parent.updateVirtualReOrderList(true);
            if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== this.parent.totalItemCount) {
              var oldUlElement = this.parent.list.querySelector(".e-list-parent:not(.e-reorder)");
              if (oldUlElement) {
                this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(oldUlElement);
              }
              var query = this.parent.getForQuery(this.parent.value).clone();
              query = query.skip(0).take(this.parent.itemCount - (this.parent.value.length - this.parent.viewPortInfo.startIndex));
              this.parent.appendUncheckList = true;
              this.parent.setCurrentView = false;
              this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
              isListUpdated = false;
              this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
              isListUpdated = false;
            } else {
              var oldUlElement = this.parent.list.querySelector(".e-list-parent:not(.e-reorder)");
              if (oldUlElement) {
                this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(oldUlElement);
              }
            }
            isListUpdated = false;
          } else if (this.parent.viewPortInfo.startIndex !== 0) {
            this.parent.updateVirtualReOrderList(true);
            var oldUlElement = this.parent.list.querySelector(".e-list-parent:not(.e-reorder)");
            if (oldUlElement) {
              this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(oldUlElement);
            }
            isListUpdated = false;
          }
          if (this.parent.viewPortInfo.startIndex !== 0 && this.parent.viewPortInfo.startIndex - this.parent.value.length !== this.parent.itemCount && this.parent.viewPortInfo.startIndex + this.parent.itemCount > this.parent.value.length) {
            var query = this.parent.getForQuery(this.parent.value).clone();
            query = query.skip(0).take(this.parent.itemCount - (this.parent.value.length - this.parent.viewPortInfo.startIndex));
            this.parent.appendUncheckList = true;
            this.parent.setCurrentView = false;
            this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
            isListUpdated = false;
            this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
          }
        } else {
          var reOrderList = this.parent.list.querySelectorAll(".e-reorder")[0];
          if (this.parent.list.querySelector(".e-virtual-ddl-content") && reOrderList) {
            this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(reOrderList);
          }
          var query = this.parent.getForQuery(this.parent.value).clone();
          var skipvalue = this.parent.viewPortInfo.startIndex - this.parent.value.length >= 0 ? this.parent.viewPortInfo.startIndex - this.parent.value.length : 0;
          query = query.skip(skipvalue);
          this.parent.setCurrentView = false;
          this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
          isListUpdated = false;
        }
        this.parent.totalItemsCount();
      }
      if (isListUpdated) {
        for (var i = this.parent.viewPortInfo.startIndex; i < endIndex; i++) {
          var index = i;
          if (this.component === "multiselect" && this.parent.mode === "CheckBox") {
            var oldUlElement = this.parent.list.querySelector(".e-list-parent.e-reorder");
            if (oldUlElement) {
              this.parent.list.querySelector(".e-virtual-ddl-content").removeChild(oldUlElement);
            }
          }
          var alreadyAddedData = this.parent.generatedDataObject[index];
          if (this.component === "multiselect" && this.parent.hideSelectedItem) {
            if (alreadyAddedData) {
              var value = getValue2(this.parent.fields.value, alreadyAddedData[0]);
              if (this.parent.value && value !== null && Array.isArray(this.parent.value) && this.parent.value.length > 0 && this.parent.value.indexOf(value) < 0) {
                var query = this.parent.getForQuery(this.parent.value).clone();
                if (this.parent.viewPortInfo.endIndex === this.parent.totalItemCount + this.parent.value.length && this.parent.hideSelectedItem) {
                  query = query.skip(this.parent.totalItemCount - this.parent.itemCount);
                } else {
                  query = query.skip(this.parent.viewPortInfo.startIndex);
                }
                this.parent.setCurrentView = false;
                this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
                isResetListCalled = true;
                break;
              } else if (this.parent.value === null || this.parent.value && this.parent.value.length === 0) {
                currentData.push(alreadyAddedData[0]);
              }
            }
            if (index === endIndex - 1) {
              if (currentData.length !== this.parent.itemCount) {
                if (this.parent.hideSelectedItem) {
                  var query = this.parent.value && this.parent.value.length > 0 ? this.parent.getForQuery(this.parent.value).clone() : new Query();
                  if (this.parent.value && this.parent.viewPortInfo.endIndex === this.parent.totalItemCount + this.parent.value.length && this.parent.hideSelectedItem) {
                    query = query.skip(this.parent.totalItemCount - this.parent.itemCount);
                  } else {
                    query = query.skip(this.parent.viewPortInfo.startIndex);
                  }
                  this.parent.setCurrentView = false;
                  this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
                  isResetListCalled = true;
                }
              }
            }
          } else {
            if (alreadyAddedData) {
              currentData.push(alreadyAddedData[0]);
            }
          }
          this.parent.setCurrentView = false;
        }
      }
      if (!isResetListCalled && isListUpdated) {
        if (this.component === "multiselect" && this.parent.allowCustomValue && this.parent.viewPortInfo.startIndex === 0 && this.parent.virtualCustomData) {
          currentData.splice(0, 0, this.parent.virtualCustomData);
        }
        var totalData = [];
        if (this.component === "multiselect" && this.parent.allowCustomValue && this.parent.viewPortInfo.endIndex === this.parent.totalItemCount) {
          if (this.parent.virtualCustomSelectData && this.parent.virtualCustomSelectData.length > 0) {
            totalData = currentData.concat(this.parent.virtualCustomSelectData);
            currentData = totalData;
          }
        }
        this.parent.renderItems(currentData, this.parent.fields, this.component === "multiselect" && this.parent.mode === "CheckBox");
      }
      if (this.component === "multiselect") {
        this.parent.updatevirtualizationList();
        this.parent.checkMaxSelection();
      }
      this.parent.getSkeletonCount();
      this.parent.skeletonCount = this.parent.totalItemCount !== 0 && this.parent.totalItemCount < this.parent.itemCount * 2 && (!(this.parent.dataSource instanceof DataManager) || this.parent.dataSource instanceof DataManager && this.parent.totalItemCount <= this.parent.itemCount) ? 0 : this.parent.skeletonCount;
      var virtualTrackElement = this.parent.list.getElementsByClassName("e-virtual-ddl")[0];
      if (virtualTrackElement) {
        virtualTrackElement.style = this.parent.GetVirtualTrackHeight();
      } else if (!virtualTrackElement && this.parent.skeletonCount > 0 && this.parent.popupWrapper) {
        var virualElement = this.parent.createElement("div", {
          id: this.parent.element.id + "_popup",
          className: "e-virtual-ddl",
          styles: this.parent.GetVirtualTrackHeight()
        });
        this.parent.popupWrapper.querySelector(".e-dropdownbase").appendChild(virualElement);
      }
      this.parent.UpdateSkeleton();
      this.parent.liCollections = this.parent.list.querySelectorAll(".e-list-item");
      var virtualContentElement = this.parent.list.getElementsByClassName("e-virtual-ddl-content")[0];
      if (virtualContentElement) {
        virtualContentElement.style = this.parent.getTransformValues();
      }
      if (this.parent.fields.groupBy) {
        this.parent.scrollStop();
      }
      if (this.parent.keyCode === 40 && this.parent.isScrollChanged && this.parent.hideSelectedItem && !isNullOrUndefined2(this.parent.currentFocuedListElement)) {
        var currentSelectElem = this.parent.getElementByValue(this.parent.currentFocuedListElement.getAttribute("data-value"));
        this.parent.addListFocus(currentSelectElem);
        this.parent.isScrollChanged = false;
      }
    };
    VirtualScroll2.prototype.generateQueryAndSetQueryIndexAsync = function(query, isPopupOpen) {
      var isStartIndexInitialised = false;
      var queryStartIndex = 0;
      var queryEndIndex = 0;
      var vEndIndex = this.parent.viewPortInfo.endIndex;
      if (!isPopupOpen && vEndIndex !== 0) {
        for (var i = this.parent.viewPortInfo.startIndex; i <= vEndIndex; i++) {
          if (!(i in this.parent.generatedDataObject)) {
            if (!isStartIndexInitialised) {
              isStartIndexInitialised = true;
              queryStartIndex = queryEndIndex = i;
            } else {
              queryEndIndex = i === vEndIndex ? i : i + 1;
            }
          }
        }
      }
      if (isStartIndexInitialised && !(this.parent.totalItemCount === queryStartIndex && this.parent.totalItemCount === queryEndIndex)) {
        this.parent.virtualItemStartIndex = queryStartIndex;
        this.parent.virtualItemEndIndex = queryEndIndex;
        this.parent.setCurrentView = true;
        this.generateAndExecuteQueryAsync(query, queryStartIndex, queryEndIndex);
        if (this.component === "multiselect" && this.parent.hideSelectedItem && this.parent.value && Array.isArray(this.parent.value) && this.parent.value.length > 0) {
          this.parent.totalItemsCount();
        }
        if (this.component === "multiselect" && this.parent.virtualItemStartIndex === this.parent.virtualItemEndIndex) {
          this.parent.virtualItemStartIndex = this.parent.viewPortInfo.startIndex;
          this.parent.virtualItemEndIndex = this.parent.viewPortInfo.endIndex;
        }
      }
      if (!(this.parent.dataSource instanceof DataManager) || this.parent.dataSource instanceof DataManager && !this.parent.isRequesting) {
        this.setCurrentViewDataAsync();
      }
    };
    VirtualScroll2.prototype.dataProcessAsync = function(isOpenPopup) {
      this.parent.selectedValueInfo = null;
      this.parent.virtualItemStartIndex = this.parent.viewPortInfo.startIndex;
      this.parent.virtualItemEndIndex = this.parent.viewPortInfo.endIndex;
      this.generateQueryAndSetQueryIndexAsync(new Query(), isOpenPopup);
    };
    VirtualScroll2.prototype.virtualScrollRefreshAsync = function() {
      return __awaiter2(this, void 0, void 0, function() {
        return __generator2(this, function(_a) {
          switch (_a.label) {
            case 0:
              this.parent.isCustomFilter = !(this.parent.isTyped || this.component === "combobox" && this.parent.allowFiltering && this.parent.queryString !== this.parent.typedString || !isNullOrUndefined2(this.parent.filterInput) && !isNullOrUndefined2(this.parent.filterInput.value) && this.parent.filterInput.value !== "" && this.component !== "combobox") && !(this.component === "autocomplete" && this.parent.value != null) || this.parent.isCustomFilter;
              if (this.parent.allowFiltering || this.component === "autocomplete") {
                if (!isNullOrUndefined2(this.parent.typedString) && !(this.component === "combobox" && !isNullOrUndefined2(this.parent.typedString) && this.parent.allowFiltering)) {
                  if (this.parent.viewPortInfo.endIndex >= this.parent.dataCount) {
                    this.parent.viewPortInfo.endIndex = this.parent.dataCount;
                  }
                  if (this.parent.viewPortInfo.startIndex >= this.parent.dataCount) {
                    this.parent.viewPortInfo.startIndex = this.parent.dataCount - this.parent.itemCount;
                  }
                } else {
                  this.parent.getSkeletonCount(true);
                  if (this.component === "combobox") {
                    this.parent.skeletonCount = this.parent.totalItemCount !== 0 && this.parent.totalItemCount < this.parent.itemCount * 2 && (!(this.parent.dataSource instanceof DataManager) || this.parent.dataSource instanceof DataManager && this.parent.totalItemCount <= this.parent.itemCount) ? 0 : this.parent.skeletonCount;
                  }
                }
              }
              return [4, this.dataProcessAsync()];
            case 1:
              _a.sent();
              if (this.parent.keyboardEvent != null && (!(this.parent.dataSource instanceof DataManager) || this.parent.dataSource instanceof DataManager && !this.parent.isRequesting)) {
                this.parent.handleVirtualKeyboardActions(this.parent.keyboardEvent, this.parent.pageCount);
              }
              if (!this.parent.customFilterQuery) {
                this.parent.isCustomFilter = false;
              }
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    VirtualScroll2.prototype.scrollListener = function(scrollArgs) {
      var _this = this;
      if (!this.parent.isPreventScrollAction && !this.parent.isVirtualTrackHeight) {
        this.parent.preventSetCurrentData = false;
        var info = scrollArgs.sentinel;
        var pStartIndex = this.parent.previousStartIndex;
        this.parent.viewPortInfo = this.getInfoFromView(scrollArgs.direction, info, scrollArgs.offset, false);
        this.parent.isUpwardScrolling = false;
        if (this.parent.previousStartIndex !== pStartIndex && !this.parent.isKeyBoardAction) {
          this.parent.isScrollActionTriggered = false;
          this.parent.currentPageNumber = this.parent.viewPortInfo.currentPageNumber;
          this.parent.virtualListInfo = __assign({}, this.parent.viewPortInfo);
          this.parent.isPreventKeyAction = true;
          this.parent.isVirtualScrolling = true;
          setTimeout(function() {
            _this.parent.pageCount = _this.parent.getPageCount();
            _this.virtualScrollRefreshAsync().then(function() {
              if (_this.parent.popupObj) {
                _this.parent.list = _this.parent.popupObj.element.querySelector(".e-content") || select2(".e-content");
                _this.parent.updateSelectionList();
                _this.parent.liCollections = _this.parent.getItems();
              }
              _this.parent.isKeyBoardAction = false;
              _this.parent.isVirtualScrolling = false;
              _this.parent.isPreventKeyAction = false;
            });
          }, 5);
        } else if (this.parent.isScrollActionTriggered) {
          this.parent.isPreventKeyAction = false;
          this.parent.isScrollActionTriggered = false;
          this.parent.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.parent.getTransformValues();
        }
        this.parent.previousInfo = this.parent.viewPortInfo;
      }
    };
    VirtualScroll2.prototype.getInfoFromView = function(direction, info, e, isscrollAction) {
      var infoType = {
        direction,
        sentinelInfo: info,
        offsets: e,
        startIndex: this.parent.previousStartIndex,
        endIndex: this.parent.previousEndIndex
      };
      var vHeight = this.parent.popupContentElement ? this.parent.popupContentElement.getBoundingClientRect().height : 0;
      var rowHeight = this.parent.listItemHeight;
      var exactTopIndex = e.top / rowHeight;
      var infoViewIndices = vHeight / rowHeight;
      var exactEndIndex = exactTopIndex + infoViewIndices;
      var pageSizeBy4 = this.parent.virtualItemCount / 4;
      var totalItemCount = this.parent.totalItemCount;
      if (infoType.direction === "down") {
        var sIndex = Math.round(exactEndIndex) - Math.round(pageSizeBy4);
        if (isNullOrUndefined2(infoType.startIndex) || exactEndIndex > infoType.startIndex + Math.round(this.parent.virtualItemCount / 2 + pageSizeBy4) && infoType.endIndex !== totalItemCount) {
          infoType.startIndex = sIndex >= 0 ? Math.round(sIndex) : 0;
          infoType.startIndex = infoType.startIndex > exactTopIndex ? Math.floor(exactTopIndex) : infoType.startIndex;
          var eIndex = infoType.startIndex + this.parent.virtualItemCount;
          infoType.startIndex = eIndex < exactEndIndex ? Math.ceil(exactEndIndex) - this.parent.virtualItemCount : infoType.startIndex;
          infoType.endIndex = eIndex < totalItemCount ? eIndex : totalItemCount;
          infoType.startIndex = eIndex >= totalItemCount ? infoType.endIndex - this.parent.virtualItemCount > 0 ? infoType.endIndex - this.parent.virtualItemCount : 0 : infoType.startIndex;
          infoType.currentPageNumber = Math.ceil(infoType.endIndex / this.parent.virtualItemCount);
        }
      } else if (infoType.direction === "up") {
        if (infoType.startIndex && infoType.endIndex || Math.ceil(exactTopIndex) > this.parent.previousStartIndex) {
          var loadAtIndex = Math.round((infoType.startIndex * rowHeight + pageSizeBy4 * rowHeight) / rowHeight);
          if (exactTopIndex < loadAtIndex || Math.ceil(exactTopIndex) > this.parent.previousStartIndex) {
            var idxAddedToExactTop = pageSizeBy4 > infoViewIndices ? pageSizeBy4 : infoViewIndices + infoViewIndices / 4;
            var eIndex = Math.round(exactTopIndex + idxAddedToExactTop);
            infoType.endIndex = eIndex < totalItemCount ? eIndex : totalItemCount;
            var sIndex = infoType.endIndex - this.parent.virtualItemCount;
            infoType.startIndex = sIndex > 0 ? sIndex : 0;
            infoType.endIndex = sIndex < 0 ? this.parent.virtualItemCount : infoType.endIndex;
            infoType.currentPageNumber = Math.ceil(infoType.startIndex / this.parent.virtualItemCount);
          }
        }
      }
      if (!isscrollAction) {
        this.parent.previousStartIndex = infoType.startIndex;
        this.parent.startIndex = infoType.startIndex;
        this.parent.previousEndIndex = infoType.endIndex;
      } else {
        this.parent.scrollPreStartIndex = infoType.startIndex;
      }
      return infoType;
    };
    VirtualScroll2.prototype.virtualScrollHandler = function(callback) {
      var _this = this;
      var delay = Browser2.info.name === "chrome" ? 200 : 100;
      var prevTop = 0;
      var debounced100 = debounce2(callback, delay);
      var debounced50 = debounce2(callback, 50);
      return function(e) {
        var top = e.target.scrollTop;
        var left = e.target.scrollLeft;
        var direction = prevTop < top && !_this.parent.isUpwardScrolling ? "down" : "up";
        prevTop = top;
        var current = _this.sentinelInfo[direction];
        var pstartIndex = _this.parent.scrollPreStartIndex;
        var scrollOffsetargs = {
          top,
          left
        };
        if (_this.parent.list && _this.parent.list.querySelectorAll(".e-virtual-list").length > 0) {
          _this.getInfoFromView(direction, current, scrollOffsetargs, true);
          if (_this.parent.scrollPreStartIndex !== pstartIndex && !_this.parent.isPreventScrollAction) {
            _this.parent.isScrollActionTriggered = true;
            var virtualPoup = _this.parent.list.querySelector(".e-virtual-ddl-content");
            virtualPoup.style.transform = "translate(0px," + top + "px)";
          }
        }
        var debounceFunction = debounced100;
        if (current.axis === "X") {
          debounceFunction = debounced50;
        }
        debounceFunction({
          direction,
          sentinel: current,
          offset: {
            top,
            left
          },
          focusElement: document.activeElement
        });
      };
    };
    VirtualScroll2.prototype.destroy = function() {
      this.removeEventListener();
    };
    return VirtualScroll2;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/util.js
var instances2 = "ej2_instances";
var uid2 = 0;
var isBlazorPlatform3 = false;
function createInstance3(classFunction, params) {
  var arrayParam = params;
  arrayParam.unshift(void 0);
  return new (Function.prototype.bind.apply(classFunction, arrayParam))();
}
function setImmediate3(handler) {
  var unbind;
  var num = new Uint16Array(5);
  var intCrypto = window.msCrypto || window.crypto;
  intCrypto.getRandomValues(num);
  var secret = "ej2" + combineArray3(num);
  var messageHandler = function(event2) {
    if (event2.source === window && typeof event2.data === "string" && event2.data.length <= 32 && event2.data === secret) {
      handler();
      unbind();
    }
  };
  window.addEventListener("message", messageHandler, false);
  window.postMessage(secret, "*");
  return unbind = function() {
    window.removeEventListener("message", messageHandler);
    handler = messageHandler = secret = void 0;
  };
}
function getValue3(nameSpace, obj) {
  var value = obj;
  var splits = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  for (var i = 0; i < splits.length && !isUndefined3(value); i++) {
    value = value[splits[parseInt(i.toString(), 10)]];
  }
  return value;
}
function setValue4(nameSpace, value, obj) {
  var keys4 = nameSpace.replace(/\[/g, ".").replace(/\]/g, "").split(".");
  var start = obj || {};
  var fromObj = start;
  var i;
  var length = keys4.length;
  var key;
  for (i = 0; i < length; i++) {
    key = keys4[parseInt(i.toString(), 10)];
    if (i + 1 === length) {
      fromObj["" + key] = value === void 0 ? {} : value;
    } else if (isNullOrUndefined3(fromObj["" + key])) {
      fromObj["" + key] = {};
    }
    fromObj = fromObj["" + key];
  }
  return start;
}
function deleteObject3(obj, key) {
  delete obj["" + key];
}
var containerObject3 = typeof window !== "undefined" ? window : {};
function isObject3(obj) {
  var objCon = {};
  return !isNullOrUndefined3(obj) && obj.constructor === objCon.constructor;
}
function merge3(source, destination) {
  if (!isNullOrUndefined3(destination)) {
    var temrObj = source;
    var tempProp = destination;
    var keys4 = Object.keys(destination);
    var deepmerge = "deepMerge";
    for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
      var key = keys_1[_i];
      if (!isNullOrUndefined3(temrObj["" + deepmerge]) && temrObj["" + deepmerge].indexOf(key) !== -1 && (isObject3(tempProp["" + key]) || Array.isArray(tempProp["" + key]))) {
        extend3(temrObj["" + key], temrObj["" + key], tempProp["" + key], true);
      } else {
        temrObj["" + key] = tempProp["" + key];
      }
    }
  }
}
function extend3(copied, first, second, deep) {
  var result = copied && typeof copied === "object" ? copied : {};
  var length = arguments.length;
  var args = [copied, first, second, deep];
  if (deep) {
    length = length - 1;
  }
  var _loop_1 = function(i2) {
    if (!args[parseInt(i2.toString(), 10)]) {
      return "continue";
    }
    var obj1 = args[parseInt(i2.toString(), 10)];
    Object.keys(obj1).forEach(function(key) {
      var src = result["" + key];
      var copy = obj1["" + key];
      var clone;
      var isArrayChanged = Array.isArray(copy) && Array.isArray(src) && copy.length !== src.length;
      var blazorEventExtend = isBlazor3() ? !(src instanceof Event) && !isArrayChanged : true;
      if (deep && blazorEventExtend && (isObject3(copy) || Array.isArray(copy))) {
        if (isObject3(copy)) {
          clone = src ? src : {};
          if (Array.isArray(clone) && Object.prototype.hasOwnProperty.call(clone, "isComplexArray")) {
            extend3(clone, {}, copy, deep);
          } else {
            result["" + key] = extend3(clone, {}, copy, deep);
          }
        } else {
          clone = isBlazor3() ? src && Object.keys(copy).length : src ? src : [];
          result["" + key] = extend3([], clone, copy, clone && clone.length || copy && copy.length);
        }
      } else {
        result["" + key] = copy;
      }
    });
  };
  for (var i = 1; i < length; i++) {
    _loop_1(i);
  }
  return result;
}
function isNullOrUndefined3(value) {
  return value === void 0 || value === null;
}
function isUndefined3(value) {
  return "undefined" === typeof value;
}
function getUniqueID2(definedName) {
  return definedName + "_" + uid2++;
}
function debounce3(eventFunction, delay) {
  var out;
  return function() {
    var _this = this;
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      args[_i] = arguments[_i];
    }
    var later = function() {
      out = null;
      return eventFunction.apply(_this, args);
    };
    clearTimeout(out);
    out = setTimeout(later, delay);
  };
}
function compareElementParent3(child, parent) {
  var node = child;
  if (node === parent) {
    return true;
  } else if (node === document || !node) {
    return false;
  } else {
    return compareElementParent3(node.parentNode, parent);
  }
}
function throwError3(message) {
  try {
    throw new Error(message);
  } catch (e) {
    throw new Error(e.message + "\n" + e.stack);
  }
}
function formatUnit2(value) {
  var result = value + "";
  if (result.match(/auto|cm|mm|in|px|pt|pc|%|em|ex|ch|rem|vw|vh|vmin|vmax/)) {
    return result;
  }
  return result + "px";
}
function isBlazor3() {
  return isBlazorPlatform3;
}
function getInstance2(element2, component) {
  var elem = typeof element2 === "string" ? document.querySelector(element2) : element2;
  if (elem["" + instances2]) {
    for (var _i = 0, _a = elem["" + instances2]; _i < _a.length; _i++) {
      var inst = _a[_i];
      if (inst instanceof component) {
        return inst;
      }
    }
  }
  return null;
}
function uniqueID3() {
  if (typeof window === "undefined") {
    return;
  }
  var num = new Uint16Array(5);
  var intCrypto = window.msCrypto || window.crypto;
  return intCrypto.getRandomValues(num);
}
function combineArray3(num) {
  var ret = "";
  for (var i = 0; i < 5; i++) {
    ret += (i ? "," : "") + num[parseInt(i.toString(), 10)];
  }
  return ret;
}

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/intl/parser-base.js
var defaultNumberingSystem3 = {
  "latn": {
    "_digits": "0123456789",
    "_type": "numeric"
  }
};
var defaultNumberSymbols3 = {
  "decimal": ".",
  "group": ",",
  "percentSign": "%",
  "plusSign": "+",
  "minusSign": "-",
  "infinity": "∞",
  "nan": "NaN",
  "exponential": "E"
};
var latnNumberSystem3 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var ParserBase3 = (
  /** @class */
  function() {
    function ParserBase4() {
    }
    ParserBase4.getMainObject = function(obj, cName) {
      var value = isBlazor3() ? cName : "main." + cName;
      return getValue3(value, obj);
    };
    ParserBase4.getNumberingSystem = function(obj) {
      return getValue3("supplemental.numberingSystems", obj) || this.numberingSystems;
    };
    ParserBase4.reverseObject = function(prop, keys4) {
      var propKeys = keys4 || Object.keys(prop);
      var res = {};
      for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
        var key = propKeys_1[_i];
        if (!Object.prototype.hasOwnProperty.call(res, prop["" + key])) {
          res[prop["" + key]] = key;
        }
      }
      return res;
    };
    ParserBase4.getSymbolRegex = function(props) {
      var regexStr = props.map(function(str) {
        return str.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
      }).join("|");
      var regExp7 = RegExp;
      return new regExp7(regexStr, "g");
    };
    ParserBase4.getSymbolMatch = function(prop) {
      var matchKeys = Object.keys(defaultNumberSymbols3);
      var ret = {};
      for (var _i = 0, matchKeys_1 = matchKeys; _i < matchKeys_1.length; _i++) {
        var key = matchKeys_1[_i];
        ret[prop["" + key]] = defaultNumberSymbols3["" + key];
      }
      return ret;
    };
    ParserBase4.constructRegex = function(val) {
      var len = val.length;
      var ret = "";
      for (var i = 0; i < len; i++) {
        if (i !== len - 1) {
          ret += val[parseInt(i.toString(), 10)] + "|";
        } else {
          ret += val[parseInt(i.toString(), 10)];
        }
      }
      return ret;
    };
    ParserBase4.convertValueParts = function(value, regex2, obj) {
      return value.replace(regex2, function(str) {
        return obj["" + str];
      });
    };
    ParserBase4.getDefaultNumberingSystem = function(obj) {
      var ret = {};
      ret.obj = getValue3("numbers", obj);
      ret.nSystem = getValue3("defaultNumberingSystem", ret.obj);
      return ret;
    };
    ParserBase4.getCurrentNumericOptions = function(curObj, numberSystem, needSymbols, blazorMode) {
      var ret = {};
      var cur = this.getDefaultNumberingSystem(curObj);
      if (!isUndefined3(cur.nSystem) || blazorMode) {
        var digits = blazorMode ? getValue3("obj.mapperDigits", cur) : getValue3(cur.nSystem + "._digits", numberSystem);
        if (!isUndefined3(digits)) {
          ret.numericPair = this.reverseObject(digits, latnNumberSystem3);
          var regExp7 = RegExp;
          ret.numberParseRegex = new regExp7(this.constructRegex(digits), "g");
          ret.numericRegex = "[" + digits[0] + "-" + digits[9] + "]";
          if (needSymbols) {
            ret.numericRegex = digits[0] + "-" + digits[9];
            ret.symbolNumberSystem = getValue3(blazorMode ? "numberSymbols" : "symbols-numberSystem-" + cur.nSystem, cur.obj);
            ret.symbolMatch = this.getSymbolMatch(ret.symbolNumberSystem);
            ret.numberSystem = cur.nSystem;
          }
        }
      }
      return ret;
    };
    ParserBase4.getNumberMapper = function(curObj, numberSystem, isNumber) {
      var ret = {
        mapper: {}
      };
      var cur = this.getDefaultNumberingSystem(curObj);
      if (!isUndefined3(cur.nSystem)) {
        ret.numberSystem = cur.nSystem;
        ret.numberSymbols = getValue3("symbols-numberSystem-" + cur.nSystem, cur.obj);
        ret.timeSeparator = getValue3("timeSeparator", ret.numberSymbols);
        var digits = getValue3(cur.nSystem + "._digits", numberSystem);
        if (!isUndefined3(digits)) {
          for (var _i = 0, latnNumberSystem_1 = latnNumberSystem3; _i < latnNumberSystem_1.length; _i++) {
            var i = latnNumberSystem_1[_i];
            ret.mapper[parseInt(i.toString(), 10)] = digits[parseInt(i.toString(), 10)];
          }
        }
      }
      return ret;
    };
    ParserBase4.nPair = "numericPair";
    ParserBase4.nRegex = "numericRegex";
    ParserBase4.numberingSystems = defaultNumberingSystem3;
    return ParserBase4;
  }()
);
var blazorCurrencyData3 = {
  "DJF": "Fdj",
  "ERN": "Nfk",
  "ETB": "Br",
  "NAD": "$",
  "ZAR": "R",
  "XAF": "FCFA",
  "GHS": "GH₵",
  "XDR": "XDR",
  "AED": "د.إ.",
  "BHD": "د.ب.",
  "DZD": "د.ج.",
  "EGP": "ج.م.",
  "ILS": "₪",
  "IQD": "د.ع.",
  "JOD": "د.ا.",
  "KMF": "CF",
  "KWD": "د.ك.",
  "LBP": "ل.ل.",
  "LYD": "د.ل.",
  "MAD": "د.م.",
  "MRU": "أ.م.",
  "OMR": "ر.ع.",
  "QAR": "ر.ق.",
  "SAR": "ر.س.",
  "SDG": "ج.س.",
  "SOS": "S",
  "SSP": "£",
  "SYP": "ل.س.",
  "TND": "د.ت.",
  "YER": "ر.ي.",
  "CLP": "$",
  "INR": "₹",
  "TZS": "TSh",
  "EUR": "€",
  "AZN": "₼",
  "RUB": "₽",
  "BYN": "Br",
  "ZMW": "K",
  "BGN": "лв.",
  "NGN": "₦",
  "XOF": "CFA",
  "BDT": "৳",
  "CNY": "¥",
  "BAM": "КМ",
  "UGX": "USh",
  "USD": "$",
  "CZK": "Kč",
  "GBP": "£",
  "DKK": "kr.",
  "KES": "Ksh",
  "CHF": "CHF",
  "MVR": "ރ.",
  "BTN": "Nu.",
  "XCD": "EC$",
  "AUD": "$",
  "BBD": "$",
  "BIF": "FBu",
  "BMD": "$",
  "BSD": "$",
  "BWP": "P",
  "BZD": "$",
  "CAD": "$",
  "NZD": "$",
  "FJD": "$",
  "FKP": "£",
  "GIP": "£",
  "GMD": "D",
  "GYD": "$",
  "HKD": "$",
  "IDR": "Rp",
  "JMD": "$",
  "KYD": "$",
  "LRD": "$",
  "MGA": "Ar",
  "MOP": "MOP$",
  "MUR": "Rs",
  "MWK": "MK",
  "MYR": "RM",
  "PGK": "K",
  "PHP": "₱",
  "PKR": "Rs",
  "RWF": "RF",
  "SBD": "$",
  "SCR": "SR",
  "SEK": "kr",
  "SGD": "$",
  "SHP": "£",
  "SLL": "Le",
  "ANG": "NAf.",
  "SZL": "E",
  "TOP": "T$",
  "TTD": "$",
  "VUV": "VT",
  "WST": "WS$",
  "ARS": "$",
  "BOB": "Bs",
  "BRL": "R$",
  "COP": "$",
  "CRC": "₡",
  "CUP": "$",
  "DOP": "$",
  "GTQ": "Q",
  "HNL": "L",
  "MXN": "$",
  "NIO": "C$",
  "PAB": "B/.",
  "PEN": "S/",
  "PYG": "₲",
  "UYU": "$",
  "VES": "Bs.S",
  "IRR": "ريال",
  "GNF": "FG",
  "CDF": "FC",
  "HTG": "G",
  "XPF": "FCFP",
  "HRK": "kn",
  "HUF": "Ft",
  "AMD": "֏",
  "ISK": "kr",
  "JPY": "¥",
  "GEL": "₾",
  "CVE": "​",
  "KZT": "₸",
  "KHR": "៛",
  "KPW": "₩",
  "KRW": "₩",
  "KGS": "сом",
  "AOA": "Kz",
  "LAK": "₭",
  "MZN": "MTn",
  "MKD": "ден",
  "MNT": "₮",
  "BND": "$",
  "MMK": "K",
  "NOK": "kr",
  "NPR": "रु",
  "AWG": "Afl.",
  "SRD": "$",
  "PLN": "zł",
  "AFN": "؋",
  "STN": "Db",
  "MDL": "L",
  "RON": "lei",
  "UAH": "₴",
  "LKR": "රු.",
  "ALL": "Lekë",
  "RSD": "дин.",
  "TJS": "смн",
  "THB": "฿",
  "TMT": "m.",
  "TRY": "₺",
  "UZS": "сўм",
  "VND": "₫",
  "TWD": "NT$"
};
function getBlazorCurrencySymbol3(currencyCode) {
  return getValue3(currencyCode || "", blazorCurrencyData3);
}

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/intl/intl-base.js
var defaultCurrencyCode3 = "USD";
var NumberFormat5 = null;
var DateFormat5 = null;
function setNumberFormat3(value) {
  NumberFormat5 = value;
}
function setDateFormat3(value) {
  DateFormat5 = value;
}
var regExp5 = RegExp;
var blazorCultureFormats3 = {
  "en-US": {
    "d": "M/d/y",
    "D": "EEEE, MMMM d, y",
    "f": "EEEE, MMMM d, y h:mm a",
    "F": "EEEE, MMMM d, y h:mm:s a",
    "g": "M/d/y h:mm a",
    "G": "M/d/yyyy h:mm:ss tt",
    "m": "MMMM d",
    "M": "MMMM d",
    "r": "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
    "R": "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
    "s": "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
    "t": "h:mm tt",
    "T": "h:m:s tt",
    "u": "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
    "U": "dddd, MMMM d, yyyy h:mm:ss tt",
    "y": "MMMM yyyy",
    "Y": "MMMM yyyy"
  }
};
var IntlBase3;
(function(IntlBase4) {
  IntlBase4.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
  IntlBase4.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0# ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
  IntlBase4.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
  var fractionRegex = /[0-9]/g;
  IntlBase4.defaultCurrency = "$";
  var mapper5 = ["infinity", "nan", "group", "decimal"];
  var patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g;
  var patternMatch = {
    "G": "",
    "M": "m",
    "L": "m",
    "H": "h",
    "c": "d",
    "'": '"',
    " a": " AM/PM",
    "yy": "yy",
    "y": "yyyy",
    "EEEE": "dddd",
    "E": "ddd"
  };
  IntlBase4.dateConverterMapper = /dddd|ddd/ig;
  var defaultFirstDay = "sun";
  IntlBase4.islamicRegex = /^islamic/;
  var firstDayMapper = {
    "sun": 0,
    "mon": 1,
    "tue": 2,
    "wed": 3,
    "thu": 4,
    "fri": 5,
    "sat": 6
  };
  IntlBase4.formatRegex = new regExp5("(^[ncpae]{1})([0-1]?[0-9]|20)?$", "i");
  IntlBase4.currencyFormatRegex = new regExp5("(^[ca]{1})([0-1]?[0-9]|20)?$", "i");
  IntlBase4.curWithoutNumberRegex = /(c|a)$/ig;
  var typeMapper = {
    "$": "isCurrency",
    "%": "isPercent",
    "-": "isNegative",
    0: "nlead",
    1: "nend"
  };
  IntlBase4.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi;
  IntlBase4.basicPatterns = ["short", "medium", "long", "full"];
  IntlBase4.defaultObject = {
    "dates": {
      "calendars": {
        "gregorian": {
          "months": {
            "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": {
            "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"
              }
            }
          },
          "dayPeriods": {
            "format": {
              "wide": {
                "am": "AM",
                "pm": "PM"
              }
            }
          },
          "eras": {
            "eraNames": {
              "0": "Before Christ",
              "0-alt-variant": "Before Common Era",
              "1": "Anno Domini",
              "1-alt-variant": "Common Era"
            },
            "eraAbbr": {
              "0": "BC",
              "0-alt-variant": "BCE",
              "1": "AD",
              "1-alt-variant": "CE"
            },
            "eraNarrow": {
              "0": "B",
              "0-alt-variant": "BCE",
              "1": "A",
              "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": {
              "d": "d",
              "E": "ccc",
              "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",
              "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"
            }
          }
        },
        "islamic": {
          "months": {
            "stand-alone": {
              "abbreviated": {
                "1": "Muh.",
                "2": "Saf.",
                "3": "Rab. I",
                "4": "Rab. II",
                "5": "Jum. I",
                "6": "Jum. II",
                "7": "Raj.",
                "8": "Sha.",
                "9": "Ram.",
                "10": "Shaw.",
                "11": "Dhuʻl-Q.",
                "12": "Dhuʻl-H."
              },
              "narrow": {
                "1": "1",
                "2": "2",
                "3": "3",
                "4": "4",
                "5": "5",
                "6": "6",
                "7": "7",
                "8": "8",
                "9": "9",
                "10": "10",
                "11": "11",
                "12": "12"
              },
              "wide": {
                "1": "Muharram",
                "2": "Safar",
                "3": "Rabiʻ I",
                "4": "Rabiʻ II",
                "5": "Jumada I",
                "6": "Jumada II",
                "7": "Rajab",
                "8": "Shaʻban",
                "9": "Ramadan",
                "10": "Shawwal",
                "11": "Dhuʻl-Qiʻdah",
                "12": "Dhuʻl-Hijjah"
              }
            }
          },
          "days": {
            "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"
              }
            }
          },
          "dayPeriods": {
            "format": {
              "wide": {
                "am": "AM",
                "pm": "PM"
              }
            }
          },
          "eras": {
            "eraNames": {
              "0": "AH"
            },
            "eraAbbr": {
              "0": "AH"
            },
            "eraNarrow": {
              "0": "AH"
            }
          },
          "dateFormats": {
            "full": "EEEE, MMMM d, y G",
            "long": "MMMM d, y G",
            "medium": "MMM d, y G",
            "short": "M/d/y GGGGG"
          },
          "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": {
              "d": "d",
              "E": "ccc",
              "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",
              "M": "L",
              "Md": "M/d",
              "MEd": "E, M/d",
              "MMM": "LLL",
              "MMMd": "MMM d",
              "MMMEd": "E, MMM d",
              "MMMMd": "MMMM d",
              "ms": "mm:ss",
              "y": "y G",
              "yyyy": "y G",
              "yyyyM": "M/y GGGGG",
              "yyyyMd": "M/d/y GGGGG",
              "yyyyMEd": "E, M/d/y GGGGG",
              "yyyyMMM": "MMM y G",
              "yyyyMMMd": "MMM d, y G",
              "yyyyMMMEd": "E, MMM d, y G",
              "yyyyMMMM": "MMMM y G",
              "yyyyQQQ": "QQQ y G",
              "yyyyQQQQ": "QQQQ y G"
            }
          }
        }
      },
      "timeZoneNames": {
        "hourFormat": "+HH:mm;-HH:mm",
        "gmtFormat": "GMT{0}",
        "gmtZeroFormat": "GMT"
      }
    },
    "numbers": {
      "currencies": {
        "USD": {
          "displayName": "US Dollar",
          "symbol": "$",
          "symbol-alt-narrow": "$"
        },
        "EUR": {
          "displayName": "Euro",
          "symbol": "€",
          "symbol-alt-narrow": "€"
        },
        "GBP": {
          "displayName": "British Pound",
          "symbol-alt-narrow": "£"
        }
      },
      "defaultNumberingSystem": "latn",
      "minimumGroupingDigits": "1",
      "symbols-numberSystem-latn": {
        "decimal": ".",
        "group": ",",
        "list": ";",
        "percentSign": "%",
        "plusSign": "+",
        "minusSign": "-",
        "exponential": "E",
        "superscriptingExponent": "×",
        "perMille": "‰",
        "infinity": "∞",
        "nan": "NaN",
        "timeSeparator": ":"
      },
      "decimalFormats-numberSystem-latn": {
        "standard": "#,##0.###"
      },
      "percentFormats-numberSystem-latn": {
        "standard": "#,##0%"
      },
      "currencyFormats-numberSystem-latn": {
        "standard": "¤#,##0.00",
        "accounting": "¤#,##0.00;(¤#,##0.00)"
      },
      "scientificFormats-numberSystem-latn": {
        "standard": "#E0"
      }
    }
  };
  IntlBase4.blazorDefaultObject = {
    "numbers": {
      "mapper": {
        "0": "0",
        "1": "1",
        "2": "2",
        "3": "3",
        "4": "4",
        "5": "5",
        "6": "6",
        "7": "7",
        "8": "8",
        "9": "9"
      },
      "mapperDigits": "0123456789",
      "numberSymbols": {
        "decimal": ".",
        "group": ",",
        "plusSign": "+",
        "minusSign": "-",
        "percentSign": "%",
        "nan": "NaN",
        "timeSeparator": ":",
        "infinity": "∞"
      },
      "timeSeparator": ":",
      "currencySymbol": "$",
      "currencypData": {
        "nlead": "$",
        "nend": "",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "percentpData": {
        "nlead": "",
        "nend": "%",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "percentnData": {
        "nlead": "-",
        "nend": "%",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "currencynData": {
        "nlead": "($",
        "nend": ")",
        "groupSeparator": ",",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "decimalnData": {
        "nlead": "-",
        "nend": "",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      },
      "decimalpData": {
        "nlead": "",
        "nend": "",
        "groupData": {
          "primary": 3
        },
        "maximumFraction": 2,
        "minimumFraction": 2
      }
    },
    "dates": {
      "dayPeriods": {
        "am": "AM",
        "pm": "PM"
      },
      "dateSeperator": "/",
      "days": {
        "abbreviated": {
          "sun": "Sun",
          "mon": "Mon",
          "tue": "Tue",
          "wed": "Wed",
          "thu": "Thu",
          "fri": "Fri",
          "sat": "Sat"
        },
        "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"
        }
      },
      "months": {
        "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"
        },
        "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"
        }
      },
      "eras": {
        "1": "AD"
      }
    }
  };
  IntlBase4.monthIndex = {
    3: "abbreviated",
    4: "wide",
    5: "narrow",
    1: "abbreviated"
  };
  IntlBase4.month = "months";
  IntlBase4.days = "days";
  IntlBase4.patternMatcher = {
    C: "currency",
    P: "percent",
    N: "decimal",
    A: "currency",
    E: "scientific"
  };
  function getResultantPattern(skeleton, dateObject, type, isIslamic, blazorCulture) {
    var resPattern;
    var iType = type || "date";
    if (blazorCulture) {
      resPattern = compareBlazorDateFormats({
        skeleton
      }, blazorCulture).format || compareBlazorDateFormats({
        skeleton: "d"
      }, "en-US").format;
    } else {
      if (IntlBase4.basicPatterns.indexOf(skeleton) !== -1) {
        resPattern = getValue3(iType + "Formats." + skeleton, dateObject);
        if (iType === "dateTime") {
          var dPattern = getValue3("dateFormats." + skeleton, dateObject);
          var tPattern = getValue3("timeFormats." + skeleton, dateObject);
          resPattern = resPattern.replace("{1}", dPattern).replace("{0}", tPattern);
        }
      } else {
        resPattern = getValue3("dateTimeFormats.availableFormats." + skeleton, dateObject);
      }
      if (isUndefined3(resPattern) && skeleton === "yMd") {
        resPattern = "M/d/y";
      }
    }
    return resPattern;
  }
  IntlBase4.getResultantPattern = getResultantPattern;
  function getDependables(cldr, culture, mode, isNumber) {
    var ret = {};
    var calendartype = mode || "gregorian";
    ret.parserObject = ParserBase3.getMainObject(cldr, culture) || (isBlazor3() ? IntlBase4.blazorDefaultObject : IntlBase4.defaultObject);
    if (isNumber) {
      ret.numericObject = getValue3("numbers", ret.parserObject);
    } else {
      var dateString = isBlazor3() ? "dates" : "dates.calendars." + calendartype;
      ret.dateObject = getValue3(dateString, ret.parserObject);
    }
    return ret;
  }
  IntlBase4.getDependables = getDependables;
  function getSymbolPattern(type, numSystem, obj, isAccount) {
    return getValue3(type + "Formats-numberSystem-" + numSystem + (isAccount ? ".accounting" : ".standard"), obj) || (isAccount ? getValue3(type + "Formats-numberSystem-" + numSystem + ".standard", obj) : "");
  }
  IntlBase4.getSymbolPattern = getSymbolPattern;
  function ConvertDateToWeekFormat(format) {
    var convertMapper = format.match(IntlBase4.dateConverterMapper);
    if (convertMapper && isBlazor3()) {
      var tempString = convertMapper[0].length === 3 ? "EEE" : "EEEE";
      return format.replace(IntlBase4.dateConverterMapper, tempString);
    }
    return format;
  }
  IntlBase4.ConvertDateToWeekFormat = ConvertDateToWeekFormat;
  function compareBlazorDateFormats(formatOptions, culture) {
    var format = formatOptions.format || formatOptions.skeleton;
    var curFormatMapper = getValue3((culture || "en-US") + "." + format, blazorCultureFormats3);
    if (!curFormatMapper) {
      curFormatMapper = getValue3("en-US." + format, blazorCultureFormats3);
    }
    if (curFormatMapper) {
      curFormatMapper = ConvertDateToWeekFormat(curFormatMapper);
      formatOptions.format = curFormatMapper.replace(/tt/, "a");
    }
    return formatOptions;
  }
  IntlBase4.compareBlazorDateFormats = compareBlazorDateFormats;
  function getProperNumericSkeleton(skeleton) {
    var matches5 = skeleton.match(IntlBase4.formatRegex);
    var ret = {};
    var pattern = matches5[1].toUpperCase();
    ret.isAccount = pattern === "A";
    ret.type = IntlBase4.patternMatcher["" + pattern];
    if (skeleton.length > 1) {
      ret.fractionDigits = parseInt(matches5[2], 10);
    }
    return ret;
  }
  IntlBase4.getProperNumericSkeleton = getProperNumericSkeleton;
  function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {
    var nData = fractionOnly ? {} : {
      nlead: "",
      nend: ""
    };
    var match = pattern.match(IntlBase4.customRegex);
    if (match) {
      if (!fractionOnly) {
        nData.nlead = changeCurrencySymbol(match[1], cSymbol);
        nData.nend = changeCurrencySymbol(match[10], cSymbol);
        nData.groupPattern = match[4];
      }
      var fraction = match[7];
      if (fraction && needFraction) {
        var fmatch = fraction.match(fractionRegex);
        if (!isNullOrUndefined3(fmatch)) {
          nData.minimumFraction = fmatch.length;
        } else {
          nData.minimumFraction = 0;
        }
        nData.maximumFraction = fraction.length - 1;
      }
    }
    return nData;
  }
  IntlBase4.getFormatData = getFormatData;
  function changeCurrencySymbol(val, sym) {
    if (val) {
      val = val.replace(IntlBase4.defaultCurrency, sym);
      return sym === "" ? val.trim() : val;
    }
    return "";
  }
  IntlBase4.changeCurrencySymbol = changeCurrencySymbol;
  function getCurrencySymbol(numericObject, currencyCode, altSymbol, ignoreCurrency) {
    var symbol = altSymbol ? "." + altSymbol : ".symbol";
    var getCurrency = ignoreCurrency ? "$" : getValue3("currencies." + currencyCode + symbol, numericObject) || getValue3("currencies." + currencyCode + ".symbol-alt-narrow", numericObject) || "$";
    return getCurrency;
  }
  IntlBase4.getCurrencySymbol = getCurrencySymbol;
  function customFormat(format, dOptions, obj) {
    var options = {};
    var formatSplit = format.split(";");
    var data = ["pData", "nData", "zeroData"];
    for (var i = 0; i < formatSplit.length; i++) {
      options["" + data[parseInt(i.toString(), 10)]] = customNumberFormat(formatSplit[parseInt(i.toString(), 10)], dOptions, obj);
    }
    if (isNullOrUndefined3(options.nData)) {
      options.nData = extend3({}, options.pData);
      options.nData.nlead = isNullOrUndefined3(dOptions) ? "-" + options.nData.nlead : dOptions.minusSymbol + options.nData.nlead;
    }
    return options;
  }
  IntlBase4.customFormat = customFormat;
  function customNumberFormat(format, dOptions, numObject) {
    var cOptions = {
      type: "decimal",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    };
    var pattern = format.match(IntlBase4.customRegex);
    if (isNullOrUndefined3(pattern) || pattern[5] === "" && format !== "N/A") {
      cOptions.type = void 0;
      return cOptions;
    }
    cOptions.nlead = pattern[1];
    cOptions.nend = pattern[10];
    var integerPart = pattern[6];
    var spaceCapture = integerPart.match(/ $/g) ? true : false;
    var spaceGrouping = integerPart.replace(/ $/g, "").indexOf(" ") !== -1;
    cOptions.useGrouping = integerPart.indexOf(",") !== -1 || spaceGrouping;
    integerPart = integerPart.replace(/,/g, "");
    var fractionPart = pattern[7];
    if (integerPart.indexOf("0") !== -1) {
      cOptions.minimumIntegerDigits = integerPart.length - integerPart.indexOf("0");
    }
    if (!isNullOrUndefined3(fractionPart)) {
      cOptions.minimumFractionDigits = fractionPart.lastIndexOf("0");
      cOptions.maximumFractionDigits = fractionPart.lastIndexOf("#");
      if (cOptions.minimumFractionDigits === -1) {
        cOptions.minimumFractionDigits = 0;
      }
      if (cOptions.maximumFractionDigits === -1 || cOptions.maximumFractionDigits < cOptions.minimumFractionDigits) {
        cOptions.maximumFractionDigits = cOptions.minimumFractionDigits;
      }
    }
    if (!isNullOrUndefined3(dOptions)) {
      dOptions.isCustomFormat = true;
      extend3(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "$", dOptions.currencySymbol));
      if (!cOptions.isCurrency) {
        extend3(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "%", dOptions.percentSymbol));
      }
    } else {
      extend3(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], "%", "%"));
    }
    if (!isNullOrUndefined3(numObject)) {
      var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);
      if (cOptions.useGrouping) {
        cOptions.groupSeparator = spaceGrouping ? " " : dOptions.numberMapper.numberSymbols[mapper5[2]];
        cOptions.groupData = NumberFormat5.getGroupingDetails(symbolPattern.split(";")[0]);
      }
      cOptions.nlead = cOptions.nlead.replace(/'/g, "");
      cOptions.nend = spaceCapture ? " " + cOptions.nend.replace(/'/g, "") : cOptions.nend.replace(/'/g, "");
    }
    return cOptions;
  }
  IntlBase4.customNumberFormat = customNumberFormat;
  function isCurrencyPercent(parts, actual, symbol) {
    var options = {
      nlead: parts[0],
      nend: parts[1]
    };
    for (var i = 0; i < 2; i++) {
      var part = parts[parseInt(i.toString(), 10)];
      var loc = part.indexOf(actual);
      if (loc !== -1 && (loc < part.indexOf("'") || loc > part.lastIndexOf("'"))) {
        options["" + typeMapper[parseInt(i.toString(), 10)]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
        options["" + typeMapper["" + actual]] = true;
        options.type = options.isCurrency ? "currency" : "percent";
        break;
      }
    }
    return options;
  }
  IntlBase4.isCurrencyPercent = isCurrencyPercent;
  function getDateSeparator(dateObj) {
    var value = (getValue3("dateFormats.short", dateObj) || "").match(/[dM]([^dM])[dM]/i);
    return value ? value[1] : "/";
  }
  IntlBase4.getDateSeparator = getDateSeparator;
  function getActualDateTimeFormat(culture, options, cldr, isExcelFormat) {
    var dependable = getDependables(cldr, culture, options.calendar);
    if (isBlazor3()) {
      options = compareBlazorDateFormats(options, culture);
    }
    var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
    if (isExcelFormat) {
      actualPattern = actualPattern.replace(patternRegex, function(pattern2) {
        return patternMatch["" + pattern2];
      });
      if (actualPattern.indexOf("z") !== -1) {
        var tLength = actualPattern.match(/z/g).length;
        var timeZonePattern = void 0;
        var options_1 = {
          "timeZone": {}
        };
        options_1.numMapper = ParserBase3.getNumberMapper(dependable.parserObject, ParserBase3.getNumberingSystem(cldr));
        options_1.timeZone = getValue3("dates.timeZoneNames", dependable.parserObject);
        var value = /* @__PURE__ */ new Date();
        var timezone = value.getTimezoneOffset();
        var pattern = tLength < 4 ? "+H;-H" : options_1.timeZone.hourFormat;
        pattern = pattern.replace(/:/g, options_1.numMapper.timeSeparator);
        if (timezone === 0) {
          timeZonePattern = options_1.timeZone.gmtZeroFormat;
        } else {
          timeZonePattern = DateFormat5.getTimeZoneValue(timezone, pattern);
          timeZonePattern = options_1.timeZone.gmtFormat.replace(/\{0\}/, timeZonePattern);
        }
        actualPattern = actualPattern.replace(/[z]+/, '"' + timeZonePattern + '"');
      }
      actualPattern = actualPattern.replace(/ $/, "");
    }
    return actualPattern;
  }
  IntlBase4.getActualDateTimeFormat = getActualDateTimeFormat;
  function processSymbol(actual, option) {
    if (actual.indexOf(",") !== -1) {
      var split = actual.split(",");
      actual = split[0] + getValue3("numberMapper.numberSymbols.group", option) + split[1].replace(".", getValue3("numberMapper.numberSymbols.decimal", option));
    } else {
      actual = actual.replace(".", getValue3("numberMapper.numberSymbols.decimal", option));
    }
    return actual;
  }
  IntlBase4.processSymbol = processSymbol;
  function getActualNumberFormat(culture, options, cldr, isExcel) {
    var dependable = getDependables(cldr, culture, "", true);
    var parseOptions = {
      custom: true
    };
    var numrericObject = dependable.numericObject;
    var minFrac;
    var curObj = {};
    var curMatch = (options.format || "").match(IntlBase4.currencyFormatRegex);
    var type = IntlBase4.formatRegex.test(options.format) ? getProperNumericSkeleton(options.format || "N") : {};
    var dOptions = {};
    if (curMatch) {
      dOptions.numberMapper = isBlazor3() ? extend3({}, dependable.numericObject) : ParserBase3.getNumberMapper(dependable.parserObject, ParserBase3.getNumberingSystem(cldr), true);
      var curCode = isBlazor3() ? getValue3("currencySymbol", dependable.numericObject) : getCurrencySymbol(dependable.numericObject, options.currency || defaultCurrencyCode3, options.altSymbol);
      var symbolPattern = getSymbolPattern("currency", dOptions.numberMapper.numberSystem, dependable.numericObject, /a/i.test(options.format));
      symbolPattern = symbolPattern.replace(/\u00A4/g, curCode);
      var split = symbolPattern.split(";");
      curObj.hasNegativePattern = isBlazor3() ? true : split.length > 1;
      curObj.nData = isBlazor3() ? getValue3(type.type + "nData", numrericObject) : getFormatData(split[1] || "-" + split[0], true, curCode);
      curObj.pData = isBlazor3() ? getValue3(type.type + "pData", numrericObject) : getFormatData(split[0], false, curCode);
      if (!curMatch[2] && !options.minimumFractionDigits && !options.maximumFractionDigits) {
        minFrac = getFormatData(symbolPattern.split(";")[0], true, "", true).minimumFraction;
      }
    }
    var actualPattern;
    if (IntlBase4.formatRegex.test(options.format) || !options.format) {
      extend3(parseOptions, getProperNumericSkeleton(options.format || "N"));
      parseOptions.custom = false;
      actualPattern = "###0";
      if (parseOptions.fractionDigits || options.minimumFractionDigits || options.maximumFractionDigits || minFrac) {
        var defaultMinimum = 0;
        if (parseOptions.fractionDigits) {
          options.minimumFractionDigits = options.maximumFractionDigits = parseOptions.fractionDigits;
        }
        actualPattern = fractionDigitsPattern(actualPattern, minFrac || parseOptions.fractionDigits || options.minimumFractionDigits || defaultMinimum, options.maximumFractionDigits || defaultMinimum);
      }
      if (options.minimumIntegerDigits) {
        actualPattern = minimumIntegerPattern(actualPattern, options.minimumIntegerDigits);
      }
      if (options.useGrouping) {
        actualPattern = groupingPattern(actualPattern);
      }
      if (parseOptions.type === "currency" || parseOptions.type && isBlazor3()) {
        if (isBlazor3() && parseOptions.type !== "currency") {
          curObj.pData = getValue3(parseOptions.type + "pData", numrericObject);
          curObj.nData = getValue3(parseOptions.type + "nData", numrericObject);
        }
        var cPattern = actualPattern;
        actualPattern = curObj.pData.nlead + cPattern + curObj.pData.nend;
        if (curObj.hasNegativePattern || isBlazor3()) {
          actualPattern += ";" + curObj.nData.nlead + cPattern + curObj.nData.nend;
        }
      }
      if (parseOptions.type === "percent" && !isBlazor3()) {
        actualPattern += " %";
      }
    } else {
      actualPattern = options.format.replace(/'/g, '"');
    }
    if (Object.keys(dOptions).length > 0) {
      actualPattern = !isExcel ? processSymbol(actualPattern, dOptions) : actualPattern;
    }
    return actualPattern;
  }
  IntlBase4.getActualNumberFormat = getActualNumberFormat;
  function fractionDigitsPattern(pattern, minDigits, maxDigits) {
    pattern += ".";
    for (var a = 0; a < minDigits; a++) {
      pattern += "0";
    }
    if (minDigits < maxDigits) {
      var diff = maxDigits - minDigits;
      for (var b = 0; b < diff; b++) {
        pattern += "#";
      }
    }
    return pattern;
  }
  IntlBase4.fractionDigitsPattern = fractionDigitsPattern;
  function minimumIntegerPattern(pattern, digits) {
    var temp = pattern.split(".");
    var integer = "";
    for (var x = 0; x < digits; x++) {
      integer += "0";
    }
    return temp[1] ? integer + "." + temp[1] : integer;
  }
  IntlBase4.minimumIntegerPattern = minimumIntegerPattern;
  function groupingPattern(pattern) {
    var temp = pattern.split(".");
    var integer = temp[0];
    var no = 3 - integer.length % 3;
    var hash = no && no === 1 ? "#" : no === 2 ? "##" : "";
    integer = hash + integer;
    pattern = "";
    for (var x = integer.length - 1; x > 0; x = x - 3) {
      pattern = "," + integer[x - 2] + integer[x - 1] + integer[parseInt(x.toString(), 10)] + pattern;
    }
    pattern = pattern.slice(1);
    return temp[1] ? pattern + "." + temp[1] : pattern;
  }
  IntlBase4.groupingPattern = groupingPattern;
  function getWeekData(culture, cldr) {
    var firstDay = defaultFirstDay;
    var mapper6 = getValue3("supplemental.weekData.firstDay", cldr);
    var iCulture = culture;
    if (/en-/.test(iCulture)) {
      iCulture = iCulture.slice(3);
    }
    iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);
    if (mapper6) {
      firstDay = mapper6["" + iCulture] || mapper6[iCulture.slice(0, 2)] || defaultFirstDay;
    }
    return firstDayMapper["" + firstDay];
  }
  IntlBase4.getWeekData = getWeekData;
  function replaceBlazorCurrency(pData, aCurrency, rCurrency) {
    var iCurrency = getBlazorCurrencySymbol3(rCurrency);
    if (aCurrency !== iCurrency) {
      for (var _i = 0, pData_1 = pData; _i < pData_1.length; _i++) {
        var data = pData_1[_i];
        data.nend = data.nend.replace(aCurrency, iCurrency);
        data.nlead = data.nlead.replace(aCurrency, iCurrency);
      }
    }
  }
  IntlBase4.replaceBlazorCurrency = replaceBlazorCurrency;
  function getWeekOfYear(date) {
    var newYear = new Date(date.getFullYear(), 0, 1);
    var day = newYear.getDay();
    var weeknum;
    day = day >= 0 ? day : day + 7;
    var daynum = Math.floor((date.getTime() - newYear.getTime() - (date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 6e4) / 864e5) + 1;
    if (day < 4) {
      weeknum = Math.floor((daynum + day - 1) / 7) + 1;
      if (weeknum > 52) {
        var nYear = new Date(date.getFullYear() + 1, 0, 1);
        var nday = nYear.getDay();
        nday = nday >= 0 ? nday : nday + 7;
        weeknum = nday < 4 ? 1 : 53;
      }
    } else {
      weeknum = Math.floor((daynum + day - 1) / 7);
    }
    return weeknum;
  }
  IntlBase4.getWeekOfYear = getWeekOfYear;
})(IntlBase3 || (IntlBase3 = {}));

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/ajax.js
var headerRegex3 = /^(.*?):[ \t]*([^\r\n]*)$/gm;
var defaultType3 = "GET";
var Ajax3 = (
  /** @class */
  function() {
    function Ajax4(options, type, async, contentType) {
      this.mode = true;
      this.emitError = true;
      this.options = {};
      if (typeof options === "string") {
        this.url = options;
        this.type = type ? type.toUpperCase() : defaultType3;
        this.mode = !isNullOrUndefined3(async) ? async : true;
      } else if (typeof options === "object") {
        this.options = options;
        merge3(this, this.options);
      }
      this.type = this.type ? this.type.toUpperCase() : defaultType3;
      this.contentType = this.contentType !== void 0 ? this.contentType : contentType;
    }
    Ajax4.prototype.send = function(data) {
      var _this = this;
      this.data = isNullOrUndefined3(data) ? this.data : data;
      var eventArgs = {
        cancel: false,
        httpRequest: null
      };
      var promise = new Promise(function(resolve, reject) {
        _this.httpRequest = new XMLHttpRequest();
        _this.httpRequest.onreadystatechange = function() {
          _this.stateChange(resolve, reject);
        };
        if (!isNullOrUndefined3(_this.onLoad)) {
          _this.httpRequest.onload = _this.onLoad;
        }
        if (!isNullOrUndefined3(_this.onProgress)) {
          _this.httpRequest.onprogress = _this.onProgress;
        }
        if (!isNullOrUndefined3(_this.onAbort)) {
          _this.httpRequest.onabort = _this.onAbort;
        }
        if (!isNullOrUndefined3(_this.onError)) {
          _this.httpRequest.onerror = _this.onError;
        }
        if (!isNullOrUndefined3(_this.onUploadProgress)) {
          _this.httpRequest.upload.onprogress = _this.onUploadProgress;
        }
        _this.httpRequest.open(_this.type, _this.url, _this.mode);
        if (!isNullOrUndefined3(_this.data) && _this.contentType !== null) {
          _this.httpRequest.setRequestHeader("Content-Type", _this.contentType || "application/json; charset=utf-8");
        }
        if (_this.beforeSend) {
          eventArgs.httpRequest = _this.httpRequest;
          _this.beforeSend(eventArgs);
        }
        if (!eventArgs.cancel) {
          _this.httpRequest.send(!isNullOrUndefined3(_this.data) ? _this.data : null);
        }
      });
      return promise;
    };
    Ajax4.prototype.successHandler = function(data) {
      if (this.onSuccess) {
        this.onSuccess(data, this);
      }
      return data;
    };
    Ajax4.prototype.failureHandler = function(reason) {
      if (this.onFailure) {
        this.onFailure(this.httpRequest);
      }
      return reason;
    };
    Ajax4.prototype.stateChange = function(resolve, reject) {
      var data = this.httpRequest.responseText;
      if (this.dataType && this.dataType.toLowerCase() === "json") {
        if (data === "") {
          data = void 0;
        } else {
          try {
            data = JSON.parse(data);
          } catch (error) {
          }
        }
      }
      if (this.httpRequest.readyState === 4) {
        if (this.httpRequest.status >= 200 && this.httpRequest.status <= 299 || this.httpRequest.status === 304) {
          resolve(this.successHandler(data));
        } else {
          if (this.emitError) {
            reject(new Error(this.failureHandler(this.httpRequest.statusText)));
          } else {
            resolve();
          }
        }
      }
    };
    Ajax4.prototype.getResponseHeader = function(key) {
      var responseHeaders = {};
      var headers = headerRegex3.exec(this.httpRequest.getAllResponseHeaders());
      while (headers) {
        responseHeaders[headers[1].toLowerCase()] = headers[2];
        headers = headerRegex3.exec(this.httpRequest.getAllResponseHeaders());
      }
      var header = responseHeaders[key.toLowerCase()];
      return isNullOrUndefined3(header) ? null : header;
    };
    return Ajax4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/fetch.js
var Fetch3 = (
  /** @class */
  function() {
    function Fetch4(options, type, contentType) {
      this.type = "GET";
      this.emitError = true;
      if (typeof options === "string") {
        this.url = options;
        this.type = !isNullOrUndefined3(type) ? type.toUpperCase() : this.type;
        this.contentType = contentType;
      } else if (isObject3(options) && Object.keys(options).length > 0) {
        merge3(this, options);
      }
      this.contentType = !isNullOrUndefined3(this.contentType) ? this.contentType : "application/json; charset=utf-8";
    }
    Fetch4.prototype.send = function(data) {
      var _this = this;
      var contentTypes = {
        "application/json": "json",
        "multipart/form-data": "formData",
        "application/octet-stream": "blob",
        "application/x-www-form-urlencoded": "formData"
      };
      try {
        if (isNullOrUndefined3(this.fetchRequest) && this.type === "GET") {
          this.fetchRequest = new Request(this.url, {
            method: this.type
          });
        } else if (isNullOrUndefined3(this.fetchRequest)) {
          this.data = !isNullOrUndefined3(data) ? data : this.data;
          this.fetchRequest = new Request(this.url, {
            method: this.type,
            headers: {
              "Content-Type": this.contentType
            },
            body: this.data
          });
        }
        var eventArgs = {
          cancel: false,
          fetchRequest: this.fetchRequest
        };
        this.triggerEvent(this["beforeSend"], eventArgs);
        if (eventArgs.cancel) {
          return null;
        }
        this.fetchResponse = fetch(this.fetchRequest);
        return this.fetchResponse.then(function(response) {
          _this.triggerEvent(_this["onLoad"], response);
          if (!response.ok) {
            throw response;
          }
          var responseType = "text";
          for (var _i = 0, _a = Object.keys(contentTypes); _i < _a.length; _i++) {
            var key = _a[_i];
            if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf(key) !== -1) {
              responseType = contentTypes[key];
            }
          }
          return response[responseType]();
        }).then(function(data2) {
          _this.triggerEvent(_this["onSuccess"], data2, _this);
          return data2;
        }).catch(function(error) {
          var returnVal = {};
          if (_this.emitError) {
            _this.triggerEvent(_this["onFailure"], error);
            returnVal = Promise.reject(error);
          }
          return returnVal;
        });
      } catch (error) {
        return error;
      }
    };
    Fetch4.prototype.triggerEvent = function(callback, data, instance) {
      if (!isNullOrUndefined3(callback) && typeof callback === "function") {
        callback(data, instance);
      }
    };
    return Fetch4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/browser.js
var REGX_MOBILE3 = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;
var REGX_IE3 = /msie|trident/i;
var REGX_IE113 = /Trident\/7\./;
var REGX_IOS3 = /(ipad|iphone|ipod touch)/i;
var REGX_IOS73 = /(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i;
var REGX_ANDROID3 = /android/i;
var REGX_WINDOWS3 = /trident|windows phone|edge/i;
var REGX_VERSION3 = /(version)[ /]([\w.]+)/i;
var REGX_BROWSER3 = {
  OPERA: /(opera|opr)(?:.*version|)[ /]([\w.]+)/i,
  EDGE: /(edge)(?:.*version|)[ /]([\w.]+)/i,
  CHROME: /(chrome|crios)[ /]([\w.]+)/i,
  PANTHOMEJS: /(phantomjs)[ /]([\w.]+)/i,
  SAFARI: /(safari)[ /]([\w.]+)/i,
  WEBKIT: /(webkit)[ /]([\w.]+)/i,
  MSIE: /(msie|trident) ([\w.]+)/i,
  MOZILLA: /(mozilla)(?:.*? rv:([\w.]+)|)/i
};
if (typeof window !== "undefined") {
  window.browserDetails = window.browserDetails || {};
}
var Browser3 = (
  /** @class */
  function() {
    function Browser4() {
    }
    Browser4.extractBrowserDetail = function() {
      var browserInfo = {
        culture: {}
      };
      var keys4 = Object.keys(REGX_BROWSER3);
      var clientInfo = [];
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        clientInfo = Browser4.userAgent.match(REGX_BROWSER3["" + key]);
        if (clientInfo) {
          browserInfo.name = clientInfo[1].toLowerCase() === "opr" ? "opera" : clientInfo[1].toLowerCase();
          browserInfo.name = clientInfo[1].toLowerCase() === "crios" ? "chrome" : browserInfo.name;
          browserInfo.version = clientInfo[2];
          browserInfo.culture.name = browserInfo.culture.language = navigator.language;
          if (Browser4.userAgent.match(REGX_IE113)) {
            browserInfo.name = "msie";
            break;
          }
          var version = Browser4.userAgent.match(REGX_VERSION3);
          if (browserInfo.name === "safari" && version) {
            browserInfo.version = version[2];
          }
          break;
        }
      }
      return browserInfo;
    };
    Browser4.getEvent = function(event2) {
      var events = {
        start: {
          isPointer: "pointerdown",
          isTouch: "touchstart",
          isDevice: "mousedown"
        },
        move: {
          isPointer: "pointermove",
          isTouch: "touchmove",
          isDevice: "mousemove"
        },
        end: {
          isPointer: "pointerup",
          isTouch: "touchend",
          isDevice: "mouseup"
        },
        cancel: {
          isPointer: "pointercancel",
          isTouch: "touchcancel",
          isDevice: "mouseleave"
        }
      };
      return Browser4.isPointer ? events["" + event2].isPointer : Browser4.isTouch ? events["" + event2].isTouch + (!Browser4.isDevice ? " " + events["" + event2].isDevice : "") : events["" + event2].isDevice;
    };
    Browser4.getTouchStartEvent = function() {
      return Browser4.getEvent("start");
    };
    Browser4.getTouchEndEvent = function() {
      return Browser4.getEvent("end");
    };
    Browser4.getTouchMoveEvent = function() {
      return Browser4.getEvent("move");
    };
    Browser4.getTouchCancelEvent = function() {
      return Browser4.getEvent("cancel");
    };
    Browser4.isSafari = function() {
      return Browser4.isDevice && Browser4.isIos && Browser4.isTouch && typeof window !== "undefined" && window.navigator.userAgent.toLowerCase().indexOf("iphone") === -1 && window.navigator.userAgent.toLowerCase().indexOf("safari") > -1;
    };
    Browser4.getValue = function(key, regX) {
      var browserDetails = typeof window !== "undefined" ? window.browserDetails : {};
      if (typeof navigator !== "undefined" && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1 && Browser4.isTouch === true && !REGX_BROWSER3.CHROME.test(navigator.userAgent)) {
        browserDetails["isIos"] = true;
        browserDetails["isDevice"] = true;
        browserDetails["isTouch"] = true;
        browserDetails["isPointer"] = true;
        browserDetails["isPointer"] = "pointerEnabled" in window.navigator;
      }
      if (typeof window !== "undefined" && window.Capacitor && window.Capacitor.getPlatform() === "ios") {
        browserDetails["isPointer"] = false;
      }
      if ("undefined" === typeof browserDetails["" + key]) {
        return browserDetails["" + key] = regX.test(Browser4.userAgent);
      }
      return browserDetails["" + key];
    };
    Object.defineProperty(Browser4, "userAgent", {
      get: function() {
        return Browser4.uA;
      },
      //Properties
      /**
       * Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
       * Also we can set our own userAgent.
       *
       * @param {string} uA ?
       */
      set: function(uA) {
        Browser4.uA = uA;
        window.browserDetails = {};
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "info", {
      //Read Only Properties
      /**
       * Property is to get the browser information like Name, Version and Language
       *
       * @returns {BrowserInfo} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.info)) {
          return window.browserDetails.info = Browser4.extractBrowserDetail();
        }
        return window.browserDetails.info;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIE", {
      /**
       * Property is to get whether the userAgent is based IE.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIE", REGX_IE3);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isTouch", {
      /**
       * Property is to get whether the browser has touch support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.isTouch)) {
          return window.browserDetails.isTouch = "ontouchstart" in window.navigator || window && window.navigator && window.navigator.maxTouchPoints > 0 || "ontouchstart" in window;
        }
        return window.browserDetails.isTouch;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isPointer", {
      /**
       * Property is to get whether the browser has Pointer support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.isPointer)) {
          return window.browserDetails.isPointer = "pointerEnabled" in window.navigator;
        }
        return window.browserDetails.isPointer;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isMSPointer", {
      /**
       * Property is to get whether the browser has MSPointer support.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.isMSPointer)) {
          return window.browserDetails.isMSPointer = "msPointerEnabled" in window.navigator;
        }
        return window.browserDetails.isMSPointer;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isDevice", {
      /**
       * Property is to get whether the userAgent is device based.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isDevice", REGX_MOBILE3);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIos", {
      /**
       * Property is to get whether the userAgent is IOS.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIos", REGX_IOS3);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isIos7", {
      /**
       * Property is to get whether the userAgent is Ios7.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isIos7", REGX_IOS73);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isAndroid", {
      /**
       * Property is to get whether the userAgent is Android.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isAndroid", REGX_ANDROID3);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isWebView", {
      /**
       * Property is to identify whether application ran in web view.
       *
       * @returns {boolean} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.isWebView)) {
          window.browserDetails.isWebView = !(isUndefined3(window.cordova) && isUndefined3(window.PhoneGap) && isUndefined3(window.phonegap) && window.forge !== "object");
          return window.browserDetails.isWebView;
        }
        return window.browserDetails.isWebView;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "isWindows", {
      /**
       * Property is to get whether the userAgent is Windows.
       *
       * @returns {boolean} ?
       */
      get: function() {
        return Browser4.getValue("isWindows", REGX_WINDOWS3);
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchStartEvent", {
      /**
       * Property is to get the touch start event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.touchStartEvent)) {
          return window.browserDetails.touchStartEvent = Browser4.getTouchStartEvent();
        }
        return window.browserDetails.touchStartEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchMoveEvent", {
      /**
       * Property is to get the touch move event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.touchMoveEvent)) {
          return window.browserDetails.touchMoveEvent = Browser4.getTouchMoveEvent();
        }
        return window.browserDetails.touchMoveEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchEndEvent", {
      /**
       * Property is to get the touch end event. It returns event name based on browser.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.touchEndEvent)) {
          return window.browserDetails.touchEndEvent = Browser4.getTouchEndEvent();
        }
        return window.browserDetails.touchEndEvent;
      },
      enumerable: true,
      configurable: true
    });
    Object.defineProperty(Browser4, "touchCancelEvent", {
      /**
       * Property is to cancel the touch end event.
       *
       * @returns {string} ?
       */
      get: function() {
        if (isUndefined3(window.browserDetails.touchCancelEvent)) {
          return window.browserDetails.touchCancelEvent = Browser4.getTouchCancelEvent();
        }
        return window.browserDetails.touchCancelEvent;
      },
      enumerable: true,
      configurable: true
    });
    Browser4.uA = typeof navigator !== "undefined" ? navigator.userAgent : "";
    return Browser4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/event-handler.js
var EventHandler3 = (
  /** @class */
  function() {
    function EventHandler4() {
    }
    EventHandler4.addOrGetEventData = function(element2) {
      if ("__eventList" in element2) {
        return element2.__eventList.events;
      } else {
        element2.__eventList = {};
        return element2.__eventList.events = [];
      }
    };
    EventHandler4.add = function(element2, eventName, listener, bindTo, intDebounce) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var debounceListener;
      if (intDebounce) {
        debounceListener = debounce3(listener, intDebounce);
      } else {
        debounceListener = listener;
      }
      if (bindTo) {
        debounceListener = debounceListener.bind(bindTo);
      }
      var event2 = eventName.split(" ");
      for (var i = 0; i < event2.length; i++) {
        eventData.push({
          name: event2[parseInt(i.toString(), 10)],
          listener,
          debounce: debounceListener
        });
        if (Browser3.isIE) {
          element2.addEventListener(event2[parseInt(i.toString(), 10)], debounceListener);
        } else {
          element2.addEventListener(event2[parseInt(i.toString(), 10)], debounceListener, {
            passive: false
          });
        }
      }
      return debounceListener;
    };
    EventHandler4.remove = function(element2, eventName, listener) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var event2 = eventName.split(" ");
      var _loop_1 = function(j2) {
        var index = -1;
        var debounceListener;
        if (eventData && eventData.length !== 0) {
          eventData.some(function(x, i) {
            return x.name === event2[parseInt(j2.toString(), 10)] && x.listener === listener ? (index = i, debounceListener = x.debounce, true) : false;
          });
        }
        if (index !== -1) {
          eventData.splice(index, 1);
        }
        if (debounceListener) {
          element2.removeEventListener(event2[parseInt(j2.toString(), 10)], debounceListener);
        }
      };
      for (var j = 0; j < event2.length; j++) {
        _loop_1(j);
      }
    };
    EventHandler4.clearEvents = function(element2) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      var copyData = extend3([], void 0, eventData);
      for (var i = 0; i < copyData.length; i++) {
        var parseValue = copyData[parseInt(i.toString(), 10)];
        element2.removeEventListener(parseValue.name, parseValue.debounce);
        eventData.shift();
      }
    };
    EventHandler4.trigger = function(element2, eventName, eventProp) {
      var eventData = EventHandler4.addOrGetEventData(element2);
      for (var _i = 0, eventData_1 = eventData; _i < eventData_1.length; _i++) {
        var event_1 = eventData_1[_i];
        if (event_1.name === eventName) {
          event_1.debounce.call(this, eventProp);
        }
      }
    };
    return EventHandler4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/dom.js
var SVG_REG3 = /^svg|^path|^g/;
function createElement3(tagName, properties) {
  var element2 = SVG_REG3.test(tagName) ? document.createElementNS("http://www.w3.org/2000/svg", tagName) : document.createElement(tagName);
  if (typeof properties === "undefined") {
    return element2;
  }
  element2.innerHTML = properties.innerHTML ? properties.innerHTML : "";
  if (properties.className !== void 0) {
    element2.className = properties.className;
  }
  if (properties.id !== void 0) {
    element2.id = properties.id;
  }
  if (properties.styles !== void 0) {
    element2.setAttribute("style", properties.styles);
  }
  if (properties.attrs !== void 0) {
    attributes3(element2, properties.attrs);
  }
  return element2;
}
function addClass3(elements, classes) {
  var classList2 = getClassList3(classes);
  var regExp7 = RegExp;
  for (var _i = 0, _a = elements; _i < _a.length; _i++) {
    var ele = _a[_i];
    for (var _b = 0, classList_1 = classList2; _b < classList_1.length; _b++) {
      var className = classList_1[_b];
      if (isObject3(ele)) {
        var curClass = getValue3("attributes.className", ele);
        if (isNullOrUndefined3(curClass)) {
          setValue4("attributes.className", className, ele);
        } else if (!new regExp7("\\b" + className + "\\b", "i").test(curClass)) {
          setValue4("attributes.className", curClass + " " + className, ele);
        }
      } else {
        if (!ele.classList.contains(className)) {
          ele.classList.add(className);
        }
      }
    }
  }
  return elements;
}
function removeClass3(elements, classes) {
  var classList2 = getClassList3(classes);
  for (var _i = 0, _a = elements; _i < _a.length; _i++) {
    var ele = _a[_i];
    var flag = isObject3(ele);
    var canRemove = flag ? getValue3("attributes.className", ele) : ele.className !== "";
    if (canRemove) {
      for (var _b = 0, classList_2 = classList2; _b < classList_2.length; _b++) {
        var className = classList_2[_b];
        if (flag) {
          var classes_1 = getValue3("attributes.className", ele);
          var classArr = classes_1.split(" ");
          var index = classArr.indexOf(className);
          if (index !== -1) {
            classArr.splice(index, 1);
          }
          setValue4("attributes.className", classArr.join(" "), ele);
        } else {
          ele.classList.remove(className);
        }
      }
    }
  }
  return elements;
}
function getClassList3(classes) {
  var classList2 = [];
  if (typeof classes === "string") {
    classList2.push(classes);
  } else {
    classList2 = classes;
  }
  return classList2;
}
function isVisible3(element2) {
  var ele = element2;
  return ele.style.visibility === "" && ele.offsetWidth > 0;
}
function prepend2(fromElements, toElement, isEval) {
  var docFrag = document.createDocumentFragment();
  for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {
    var ele = _a[_i];
    docFrag.appendChild(ele);
  }
  toElement.insertBefore(docFrag, toElement.firstElementChild);
  if (isEval) {
    executeScript2(toElement);
  }
  return fromElements;
}
function append2(fromElements, toElement, isEval) {
  var docFrag = document.createDocumentFragment();
  if (fromElements instanceof NodeList) {
    while (fromElements.length > 0) {
      docFrag.appendChild(fromElements[0]);
    }
  } else {
    for (var _i = 0, _a = fromElements; _i < _a.length; _i++) {
      var ele = _a[_i];
      docFrag.appendChild(ele);
    }
  }
  toElement.appendChild(docFrag);
  if (isEval) {
    executeScript2(toElement);
  }
  return fromElements;
}
function executeScript2(ele) {
  var eleArray = ele.querySelectorAll("script");
  eleArray.forEach(function(element2) {
    var script = document.createElement("script");
    script.text = element2.innerHTML;
    document.head.appendChild(script);
    detach3(script);
  });
}
function detach3(element2) {
  var parentNode = element2.parentNode;
  if (parentNode) {
    return parentNode.removeChild(element2);
  }
}
function remove2(element2) {
  var parentNode = element2.parentNode;
  EventHandler3.clearEvents(element2);
  parentNode.removeChild(element2);
}
function attributes3(element2, attributes4) {
  var keys4 = Object.keys(attributes4);
  var ele = element2;
  for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
    var key = keys_1[_i];
    if (isObject3(ele)) {
      var iKey = key;
      if (key === "tabindex") {
        iKey = "tabIndex";
      }
      ele.attributes["" + iKey] = attributes4["" + key];
    } else {
      ele.setAttribute(key, attributes4["" + key]);
    }
  }
  return ele;
}
function select3(selector, context, needsVDOM) {
  if (context === void 0) {
    context = document;
  }
  selector = querySelectId3(selector);
  return context.querySelector(selector);
}
function selectAll3(selector, context, needsVDOM) {
  if (context === void 0) {
    context = document;
  }
  selector = querySelectId3(selector);
  var nodeList = context.querySelectorAll(selector);
  return nodeList;
}
function querySelectId3(selector) {
  var charRegex = /(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;
  if (selector.match(/#[0-9]/g) || selector.match(charRegex)) {
    var idList = selector.split(",");
    for (var i = 0; i < idList.length; i++) {
      var list = idList[parseInt(i.toString(), 10)].split(" ");
      for (var j = 0; j < list.length; j++) {
        if (list[parseInt(j.toString(), 10)].indexOf("#") > -1) {
          if (!list[parseInt(j.toString(), 10)].match(/\[.*\]/)) {
            var splitId = list[parseInt(j.toString(), 10)].split("#");
            if (splitId[1].match(/^\d/) || splitId[1].match(charRegex)) {
              var setId = list[parseInt(j.toString(), 10)].split(".");
              setId[0] = setId[0].replace(/#/, "[id='") + "']";
              list[parseInt(j.toString(), 10)] = setId.join(".");
            }
          }
        }
      }
      idList[parseInt(i.toString(), 10)] = list.join(" ");
    }
    return idList.join(",");
  }
  return selector;
}
function closest3(element2, selector) {
  var el = element2;
  if (typeof el.closest === "function") {
    return el.closest(selector);
  }
  while (el && el.nodeType === 1) {
    if (matches4(el, selector)) {
      return el;
    }
    el = el.parentNode;
  }
  return null;
}
function setStyleAttribute3(element2, attrs) {
  if (attrs !== void 0) {
    Object.keys(attrs).forEach(function(key) {
      element2.style["" + key] = attrs["" + key];
    });
  }
}
function matches4(element2, selector) {
  var matches5 = element2.matches || element2.msMatchesSelector || element2.webkitMatchesSelector;
  if (matches5) {
    return matches5.call(element2, selector);
  } else {
    return [].indexOf.call(document.querySelectorAll(selector), element2) !== -1;
  }
}

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/observer.js
var Observer3 = (
  /** @class */
  function() {
    function Observer4(context) {
      this.ranArray = [];
      this.boundedEvents = {};
      if (isNullOrUndefined3(context)) {
        return;
      }
      this.context = context;
    }
    Observer4.prototype.on = function(property, handler, context, id) {
      if (isNullOrUndefined3(handler)) {
        return;
      }
      var cntxt = context || this.context;
      if (this.notExist(property)) {
        this.boundedEvents["" + property] = [{
          handler,
          context: cntxt,
          id
        }];
        return;
      }
      if (!isNullOrUndefined3(id)) {
        if (this.ranArray.indexOf(id) === -1) {
          this.ranArray.push(id);
          this.boundedEvents["" + property].push({
            handler,
            context: cntxt,
            id
          });
        }
      } else if (!this.isHandlerPresent(this.boundedEvents["" + property], handler)) {
        this.boundedEvents["" + property].push({
          handler,
          context: cntxt
        });
      }
    };
    Observer4.prototype.off = function(property, handler, id) {
      if (this.notExist(property)) {
        return;
      }
      var curObject = getValue3(property, this.boundedEvents);
      if (handler) {
        for (var i = 0; i < curObject.length; i++) {
          if (id) {
            if (curObject[parseInt(i.toString(), 10)].id === id) {
              curObject.splice(i, 1);
              var indexLocation = this.ranArray.indexOf(id);
              if (indexLocation !== -1) {
                this.ranArray.splice(indexLocation, 1);
              }
              break;
            }
          } else if (handler === curObject[parseInt(i.toString(), 10)].handler) {
            curObject.splice(i, 1);
            break;
          }
        }
      } else {
        delete this.boundedEvents["" + property];
      }
    };
    Observer4.prototype.notify = function(property, argument, successHandler, errorHandler) {
      if (this.notExist(property)) {
        if (successHandler) {
          successHandler.call(this, argument);
        }
        return;
      }
      if (argument) {
        argument.name = property;
      }
      var blazor = "Blazor";
      var curObject = getValue3(property, this.boundedEvents).slice(0);
      if (window["" + blazor]) {
        return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);
      } else {
        for (var _i = 0, curObject_1 = curObject; _i < curObject_1.length; _i++) {
          var cur = curObject_1[_i];
          cur.handler.call(cur.context, argument);
        }
        if (successHandler) {
          successHandler.call(this, argument);
        }
      }
    };
    Observer4.prototype.blazorCallback = function(objs, argument, successHandler, errorHandler, index) {
      var _this = this;
      var isTrigger = index === objs.length - 1;
      if (index < objs.length) {
        var obj_1 = objs[parseInt(index.toString(), 10)];
        var promise = obj_1.handler.call(obj_1.context, argument);
        if (promise && typeof promise.then === "function") {
          if (!successHandler) {
            return promise;
          }
          promise.then(function(data) {
            data = typeof data === "string" && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data;
            extend3(argument, argument, data, true);
            if (successHandler && isTrigger) {
              successHandler.call(obj_1.context, argument);
            } else {
              return _this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
            }
          }).catch(function(data) {
            if (errorHandler) {
              errorHandler.call(obj_1.context, typeof data === "string" && _this.isJson(data) ? JSON.parse(data, _this.dateReviver) : data);
            }
          });
        } else if (successHandler && isTrigger) {
          successHandler.call(obj_1.context, argument);
        } else {
          return this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
        }
      }
    };
    Observer4.prototype.dateReviver = function(key, value) {
      var dPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
      if (isBlazor3 && typeof value === "string" && value.match(dPattern) !== null) {
        return new Date(value);
      }
      return value;
    };
    Observer4.prototype.isJson = function(value) {
      try {
        JSON.parse(value);
      } catch (e) {
        return false;
      }
      return true;
    };
    Observer4.prototype.destroy = function() {
      this.boundedEvents = this.context = void 0;
    };
    Observer4.prototype.offIntlEvents = function() {
      var eventsArr = this.boundedEvents["notifyExternalChange"];
      if (eventsArr) {
        for (var i = 0; i < eventsArr.length; i++) {
          var curContext = eventsArr[parseInt(i.toString(), 10)].context;
          if (curContext && curContext.detectFunction && curContext.randomId && curContext.isReactMock) {
            this.off("notifyExternalChange", curContext.detectFunction, curContext.randomId);
            i--;
          }
        }
        if (!this.boundedEvents["notifyExternalChange"].length) {
          delete this.boundedEvents["notifyExternalChange"];
        }
      }
    };
    Observer4.prototype.notExist = function(prop) {
      return Object.prototype.hasOwnProperty.call(this.boundedEvents, prop) === false || this.boundedEvents["" + prop].length <= 0;
    };
    Observer4.prototype.isHandlerPresent = function(boundedEvents, handler) {
      for (var _i = 0, boundedEvents_1 = boundedEvents; _i < boundedEvents_1.length; _i++) {
        var cur = boundedEvents_1[_i];
        if (cur.handler === handler) {
          return true;
        }
      }
      return false;
    };
    return Observer4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/base.js
var isColEName3 = new RegExp("]");
var Base3 = (
  /** @class */
  function() {
    function Base4(options, element2) {
      this.isRendered = false;
      this.isComplexArraySetter = false;
      this.isServerRendered = false;
      this.allowServerDataBinding = true;
      this.isProtectedOnChange = true;
      this.properties = {};
      this.changedProperties = {};
      this.oldProperties = {};
      this.bulkChanges = {};
      this.refreshing = false;
      this.ignoreCollectionWatch = false;
      this.finalUpdate = function() {
      };
      this.childChangedProperties = {};
      this.modelObserver = new Observer3(this);
      if (!isUndefined3(element2)) {
        if ("string" === typeof element2) {
          this.element = document.querySelector(element2);
        } else {
          this.element = element2;
        }
        if (!isNullOrUndefined3(this.element)) {
          this.isProtectedOnChange = false;
          this.addInstance();
        }
      }
      if (!isUndefined3(options)) {
        this.setProperties(options, true);
      }
      this.isDestroyed = false;
    }
    Base4.prototype.setProperties = function(prop, muteOnChange) {
      var prevDetection = this.isProtectedOnChange;
      this.isProtectedOnChange = !!muteOnChange;
      merge3(this, prop);
      if (muteOnChange !== true) {
        merge3(this.changedProperties, prop);
        this.dataBind();
      } else if (isBlazor3() && this.isRendered) {
        this.serverDataBind(prop);
      }
      this.finalUpdate();
      this.changedProperties = {};
      this.oldProperties = {};
      this.isProtectedOnChange = prevDetection;
    };
    Base4.callChildDataBind = function(obj, parent) {
      var keys4 = Object.keys(obj);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        if (parent["" + key] instanceof Array) {
          for (var _a = 0, _b = parent["" + key]; _a < _b.length; _a++) {
            var obj_1 = _b[_a];
            if (obj_1.dataBind !== void 0) {
              obj_1.dataBind();
            }
          }
        } else {
          parent["" + key].dataBind();
        }
      }
    };
    Base4.prototype.clearChanges = function() {
      this.finalUpdate();
      this.changedProperties = {};
      this.oldProperties = {};
      this.childChangedProperties = {};
    };
    Base4.prototype.dataBind = function() {
      Base4.callChildDataBind(this.childChangedProperties, this);
      if (Object.getOwnPropertyNames(this.changedProperties).length) {
        var prevDetection = this.isProtectedOnChange;
        var newChanges = this.changedProperties;
        var oldChanges = this.oldProperties;
        this.clearChanges();
        this.isProtectedOnChange = true;
        this.onPropertyChanged(newChanges, oldChanges);
        this.isProtectedOnChange = prevDetection;
      }
    };
    Base4.prototype.serverDataBind = function(newChanges) {
      if (!isBlazor3()) {
        return;
      }
      newChanges = newChanges ? newChanges : {};
      extend3(this.bulkChanges, {}, newChanges, true);
      var sfBlazor = "sfBlazor";
      if (this.allowServerDataBinding && window["" + sfBlazor].updateModel) {
        window["" + sfBlazor].updateModel(this);
        this.bulkChanges = {};
      }
    };
    Base4.prototype.saveChanges = function(key, newValue, oldValue) {
      if (isBlazor3()) {
        var newChanges = {};
        newChanges["" + key] = newValue;
        this.serverDataBind(newChanges);
      }
      if (this.isProtectedOnChange) {
        return;
      }
      this.oldProperties["" + key] = oldValue;
      this.changedProperties["" + key] = newValue;
      this.finalUpdate();
      this.finalUpdate = setImmediate3(this.dataBind.bind(this));
    };
    Base4.prototype.addEventListener = function(eventName, handler) {
      this.modelObserver.on(eventName, handler);
    };
    Base4.prototype.removeEventListener = function(eventName, handler) {
      this.modelObserver.off(eventName, handler);
    };
    Base4.prototype.trigger = function(eventName, eventProp, successHandler, errorHandler) {
      var _this = this;
      if (this.isDestroyed !== true) {
        var prevDetection = this.isProtectedOnChange;
        this.isProtectedOnChange = false;
        var data = this.modelObserver.notify(eventName, eventProp, successHandler, errorHandler);
        if (isColEName3.test(eventName)) {
          var handler = getValue3(eventName, this);
          if (handler) {
            var blazor = "Blazor";
            if (window["" + blazor]) {
              var promise = handler.call(this, eventProp);
              if (promise && typeof promise.then === "function") {
                if (!successHandler) {
                  data = promise;
                } else {
                  promise.then(function(data2) {
                    if (successHandler) {
                      data2 = typeof data2 === "string" && _this.modelObserver.isJson(data2) ? JSON.parse(data2) : data2;
                      successHandler.call(_this, data2);
                    }
                  }).catch(function(data2) {
                    if (errorHandler) {
                      data2 = typeof data2 === "string" && _this.modelObserver.isJson(data2) ? JSON.parse(data2) : data2;
                      errorHandler.call(_this, data2);
                    }
                  });
                }
              } else if (successHandler) {
                successHandler.call(this, eventProp);
              }
            } else {
              handler.call(this, eventProp);
              if (successHandler) {
                successHandler.call(this, eventProp);
              }
            }
          } else if (successHandler) {
            successHandler.call(this, eventProp);
          }
        }
        this.isProtectedOnChange = prevDetection;
        return data;
      }
    };
    Base4.prototype.addInstance = function() {
      var moduleClass = "e-" + this.getModuleName().toLowerCase();
      addClass3([this.element], ["e-lib", moduleClass]);
      if (!isNullOrUndefined3(this.element.ej2_instances)) {
        this.element.ej2_instances.push(this);
      } else {
        setValue4("ej2_instances", [this], this.element);
      }
    };
    Base4.prototype.destroy = function() {
      var _this = this;
      this.element.ej2_instances = this.element.ej2_instances ? this.element.ej2_instances.filter(function(i) {
        if (proxyToRaw3) {
          return proxyToRaw3(i) !== proxyToRaw3(_this);
        }
        return i !== _this;
      }) : [];
      removeClass3([this.element], ["e-" + this.getModuleName()]);
      if (this.element.ej2_instances.length === 0) {
        removeClass3([this.element], ["e-lib"]);
      }
      this.clearChanges();
      this.modelObserver.destroy();
      this.isDestroyed = true;
    };
    return Base4;
  }()
);
function getComponent2(elem, comp) {
  var instance;
  var i;
  var ele = typeof elem === "string" ? document.getElementById(elem) : elem;
  for (i = 0; i < ele.ej2_instances.length; i++) {
    instance = ele.ej2_instances[parseInt(i.toString(), 10)];
    if (typeof comp === "string") {
      var compName = instance.getModuleName();
      if (comp === compName) {
        return instance;
      }
    } else {
      if (instance instanceof comp) {
        return instance;
      }
    }
  }
  return void 0;
}
var proxyToRaw3;

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/notify-property-change.js
function getObject3(instance, curKey, defaultValue, type) {
  if (!Object.prototype.hasOwnProperty.call(instance.properties, curKey) || !(instance.properties["" + curKey] instanceof type)) {
    instance.properties["" + curKey] = createInstance3(type, [instance, curKey, defaultValue]);
  }
  return instance.properties["" + curKey];
}
function getObjectArray2(instance, curKey, defaultValue, type, isSetter, isFactory) {
  var result = [];
  var len = defaultValue ? defaultValue.length : 0;
  for (var i = 0; i < len; i++) {
    var curType = type;
    if (isFactory) {
      curType = type(defaultValue[parseInt(i.toString(), 10)], instance);
    }
    if (isSetter) {
      var inst = createInstance3(curType, [instance, curKey, {}, true]);
      inst.setProperties(defaultValue[parseInt(i.toString(), 10)], true);
      result.push(inst);
    } else {
      result.push(createInstance3(curType, [instance, curKey, defaultValue[parseInt(i.toString(), 10)], false]));
    }
  }
  return result;
}
function propertyGetter3(defaultValue, curKey) {
  return function() {
    if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
      this.properties["" + curKey] = defaultValue;
    }
    return this.properties["" + curKey];
  };
}
function propertySetter3(defaultValue, curKey) {
  return function(newValue) {
    if (this.properties["" + curKey] !== newValue) {
      var oldVal = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties["" + curKey] : defaultValue;
      this.saveChanges(curKey, newValue, oldVal);
      this.properties["" + curKey] = newValue;
    }
  };
}
function complexGetter3(defaultValue, curKey, type) {
  return function() {
    return getObject3(this, curKey, defaultValue, type);
  };
}
function complexSetter3(defaultValue, curKey, type) {
  return function(newValue) {
    getObject3(this, curKey, defaultValue, type).setProperties(newValue);
  };
}
function complexArrayGetter2(defaultValue, curKey, type) {
  return function() {
    var _this = this;
    if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
      var defCollection = getObjectArray2(this, curKey, defaultValue, type, false);
      this.properties["" + curKey] = defCollection;
    }
    var ignore = this.controlParent !== void 0 && this.controlParent.ignoreCollectionWatch || this.ignoreCollectionWatch;
    if (!Object.prototype.hasOwnProperty.call(this.properties["" + curKey], "push") && !ignore) {
      ["push", "pop"].forEach(function(extendFunc) {
        var descriptor = {
          value: complexArrayDefinedCallback2(extendFunc, curKey, type, _this.properties["" + curKey]).bind(_this),
          configurable: true
        };
        Object.defineProperty(_this.properties["" + curKey], extendFunc, descriptor);
      });
    }
    if (!Object.prototype.hasOwnProperty.call(this.properties["" + curKey], "isComplexArray")) {
      Object.defineProperty(this.properties["" + curKey], "isComplexArray", {
        value: true
      });
    }
    return this.properties["" + curKey];
  };
}
function complexArraySetter2(defaultValue, curKey, type) {
  return function(newValue) {
    this.isComplexArraySetter = true;
    var oldValueCollection = getObjectArray2(this, curKey, defaultValue, type, false);
    var newValCollection = getObjectArray2(this, curKey, newValue, type, true);
    this.isComplexArraySetter = false;
    this.saveChanges(curKey, newValCollection, oldValueCollection);
    this.properties["" + curKey] = newValCollection;
  };
}
function complexArrayDefinedCallback2(dFunc, curKey, type, prop) {
  return function() {
    var newValue = [];
    for (var _i = 0; _i < arguments.length; _i++) {
      newValue[_i] = arguments[_i];
    }
    var keyString = this.propName ? this.getParentKey() + "." + curKey + "-" : curKey + "-";
    switch (dFunc) {
      case "push":
        for (var i = 0; i < newValue.length; i++) {
          var newValueParse = newValue[parseInt(i.toString(), 10)];
          Array.prototype["" + dFunc].apply(prop, [newValueParse]);
          var model = getArrayModel2(keyString + (prop.length - 1), newValueParse, !this.controlParent, dFunc);
          this.serverDataBind(model, newValue[parseInt(i.toString(), 10)], false, dFunc);
        }
        break;
      case "pop": {
        Array.prototype["" + dFunc].apply(prop);
        var model = getArrayModel2(keyString + prop.length, null, !this.controlParent, dFunc);
        this.serverDataBind(model, {
          ejsAction: "pop"
        }, false, dFunc);
        break;
      }
    }
    return prop;
  };
}
function getArrayModel2(keyString, value, isControlParent, arrayFunction) {
  var modelObject = keyString;
  if (isControlParent) {
    modelObject = {};
    modelObject["" + keyString] = value;
    if (value && typeof value === "object") {
      var action = "ejsAction";
      modelObject["" + keyString]["" + action] = arrayFunction;
    }
  }
  return modelObject;
}
function Property3(defaultValue) {
  return function(target, key) {
    var propertyDescriptor = {
      set: propertySetter3(defaultValue, key),
      get: propertyGetter3(defaultValue, key),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection3(target, key, "prop", defaultValue);
  };
}
function Complex3(defaultValue, type) {
  return function(target, key) {
    var propertyDescriptor = {
      set: complexSetter3(defaultValue, key, type),
      get: complexGetter3(defaultValue, key, type),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection3(target, key, "complexProp", defaultValue, type);
  };
}
function Collection2(defaultValue, type) {
  return function(target, key) {
    var propertyDescriptor = {
      set: complexArraySetter2(defaultValue, key, type),
      get: complexArrayGetter2(defaultValue, key, type),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, propertyDescriptor);
    addPropertyCollection3(target, key, "colProp", defaultValue, type);
  };
}
function Event4() {
  return function(target, key) {
    var eventDescriptor = {
      set: function(newValue) {
        var oldValue = this.properties["" + key];
        if (oldValue !== newValue) {
          var finalContext = getParentContext3(this, key);
          if (isUndefined3(oldValue) === false) {
            finalContext.context.removeEventListener(finalContext.prefix, oldValue);
          }
          finalContext.context.addEventListener(finalContext.prefix, newValue);
          this.properties["" + key] = newValue;
        }
      },
      get: propertyGetter3(void 0, key),
      enumerable: true,
      configurable: true
    };
    Object.defineProperty(target, key, eventDescriptor);
    addPropertyCollection3(target, key, "event");
  };
}
function NotifyPropertyChanges3(classConstructor) {
}
function addPropertyCollection3(target, key, propertyType, defaultValue, type) {
  if (isUndefined3(target.propList)) {
    target.propList = {
      props: [],
      complexProps: [],
      colProps: [],
      events: [],
      propNames: [],
      complexPropNames: [],
      colPropNames: [],
      eventNames: []
    };
  }
  target.propList[propertyType + "s"].push({
    propertyName: key,
    defaultValue,
    type
  });
  target.propList[propertyType + "Names"].push(key);
}
function getParentContext3(context, prefix) {
  if (Object.prototype.hasOwnProperty.call(context, "parentObj") === false) {
    return {
      context,
      prefix
    };
  } else {
    var curText = getValue3("propName", context);
    if (curText) {
      prefix = curText + "-" + prefix;
    }
    return getParentContext3(getValue3("parentObj", context), prefix);
  }
}

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/animation.js
var __extends31 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate31 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Animation4 = (
  /** @class */
  function(_super) {
    __extends31(Animation5, _super);
    function Animation5(options) {
      var _this = _super.call(this, options, void 0) || this;
      _this.easing = {
        ease: "cubic-bezier(0.250, 0.100, 0.250, 1.000)",
        linear: "cubic-bezier(0.250, 0.250, 0.750, 0.750)",
        easeIn: "cubic-bezier(0.420, 0.000, 1.000, 1.000)",
        easeOut: "cubic-bezier(0.000, 0.000, 0.580, 1.000)",
        easeInOut: "cubic-bezier(0.420, 0.000, 0.580, 1.000)",
        elasticInOut: "cubic-bezier(0.5,-0.58,0.38,1.81)",
        elasticIn: "cubic-bezier(0.17,0.67,0.59,1.81)",
        elasticOut: "cubic-bezier(0.7,-0.75,0.99,1.01)"
      };
      return _this;
    }
    Animation_1 = Animation5;
    Animation5.prototype.animate = function(element2, options) {
      options = !options ? {} : options;
      var model = this.getModel(options);
      if (typeof element2 === "string") {
        var elements = Array.prototype.slice.call(selectAll3(element2, document));
        for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
          var element_1 = elements_1[_i];
          model.element = element_1;
          Animation_1.delayAnimation(model);
        }
      } else {
        model.element = element2;
        Animation_1.delayAnimation(model);
      }
    };
    Animation5.stop = function(element2, model) {
      element2.style.animation = "";
      element2.removeAttribute("e-animate");
      var animationId = element2.getAttribute("e-animation-id");
      if (animationId) {
        var frameId = parseInt(animationId, 10);
        cancelAnimationFrame(frameId);
        element2.removeAttribute("e-animation-id");
      }
      if (model && model.end) {
        model.end.call(this, model);
      }
    };
    Animation5.delayAnimation = function(model) {
      if (animationMode3 === "Disable" || animationMode3 === GlobalAnimationMode3.Disable) {
        if (model.begin) {
          model.begin.call(this, model);
        }
        if (model.end) {
          model.end.call(this, model);
        }
      } else {
        if (model.delay) {
          setTimeout(function() {
            Animation_1.applyAnimation(model);
          }, model.delay);
        } else {
          Animation_1.applyAnimation(model);
        }
      }
    };
    Animation5.applyAnimation = function(model) {
      var _this = this;
      model.timeStamp = 0;
      var step = 0;
      var timerId = 0;
      var prevTimeStamp = 0;
      var duration = model.duration;
      model.element.setAttribute("e-animate", "true");
      var startAnimation = function(timeStamp) {
        try {
          if (timeStamp) {
            prevTimeStamp = prevTimeStamp === 0 ? timeStamp : prevTimeStamp;
            model.timeStamp = timeStamp + model.timeStamp - prevTimeStamp;
            prevTimeStamp = timeStamp;
            if (!step && model.begin) {
              model.begin.call(_this, model);
            }
            step = step + 1;
            var avg = model.timeStamp / step;
            if (model.timeStamp < duration && model.timeStamp + avg < duration && model.element.getAttribute("e-animate")) {
              model.element.style.animation = model.name + " " + model.duration + "ms " + model.timingFunction;
              if (model.progress) {
                model.progress.call(_this, model);
              }
              requestAnimationFrame(startAnimation);
            } else {
              cancelAnimationFrame(timerId);
              model.element.removeAttribute("e-animation-id");
              model.element.removeAttribute("e-animate");
              model.element.style.animation = "";
              if (model.end) {
                model.end.call(_this, model);
              }
            }
          } else {
            timerId = requestAnimationFrame(startAnimation);
            model.element.setAttribute("e-animation-id", timerId.toString());
          }
        } catch (e) {
          cancelAnimationFrame(timerId);
          model.element.removeAttribute("e-animation-id");
          if (model.fail) {
            model.fail.call(_this, e);
          }
        }
      };
      startAnimation();
    };
    Animation5.prototype.getModel = function(options) {
      return {
        name: options.name || this.name,
        delay: options.delay || this.delay,
        duration: options.duration !== void 0 ? options.duration : this.duration,
        begin: options.begin || this.begin,
        end: options.end || this.end,
        fail: options.fail || this.fail,
        progress: options.progress || this.progress,
        timingFunction: this.easing[options.timingFunction] ? this.easing[options.timingFunction] : options.timingFunction || this.easing[this.timingFunction]
      };
    };
    Animation5.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Animation5.prototype.getModuleName = function() {
      return "animation";
    };
    Animation5.prototype.destroy = function() {
    };
    var Animation_1;
    __decorate31([Property3("FadeIn")], Animation5.prototype, "name", void 0);
    __decorate31([Property3(400)], Animation5.prototype, "duration", void 0);
    __decorate31([Property3("ease")], Animation5.prototype, "timingFunction", void 0);
    __decorate31([Property3(0)], Animation5.prototype, "delay", void 0);
    __decorate31([Event4()], Animation5.prototype, "progress", void 0);
    __decorate31([Event4()], Animation5.prototype, "begin", void 0);
    __decorate31([Event4()], Animation5.prototype, "end", void 0);
    __decorate31([Event4()], Animation5.prototype, "fail", void 0);
    Animation5 = Animation_1 = __decorate31([NotifyPropertyChanges3], Animation5);
    return Animation5;
  }(Base3)
);
function rippleEffect2(element2, rippleOptions, done) {
  var rippleModel = getRippleModel2(rippleOptions);
  if (rippleModel.rippleFlag === false || rippleModel.rippleFlag === void 0 && !isRippleEnabled2) {
    return function() {
    };
  }
  element2.setAttribute("data-ripple", "true");
  EventHandler3.add(element2, "mousedown", rippleHandler2, {
    parent: element2,
    rippleOptions: rippleModel
  });
  EventHandler3.add(element2, "mouseup", rippleUpHandler2, {
    parent: element2,
    rippleOptions: rippleModel,
    done
  });
  EventHandler3.add(element2, "mouseleave", rippleLeaveHandler2, {
    parent: element2,
    rippleOptions: rippleModel
  });
  if (Browser3.isPointer) {
    EventHandler3.add(element2, "transitionend", rippleLeaveHandler2, {
      parent: element2,
      rippleOptions: rippleModel
    });
  }
  return function() {
    element2.removeAttribute("data-ripple");
    EventHandler3.remove(element2, "mousedown", rippleHandler2);
    EventHandler3.remove(element2, "mouseup", rippleUpHandler2);
    EventHandler3.remove(element2, "mouseleave", rippleLeaveHandler2);
    EventHandler3.remove(element2, "transitionend", rippleLeaveHandler2);
  };
}
function getRippleModel2(rippleOptions) {
  var rippleModel = {
    selector: rippleOptions && rippleOptions.selector ? rippleOptions.selector : null,
    ignore: rippleOptions && rippleOptions.ignore ? rippleOptions.ignore : null,
    rippleFlag: rippleOptions && rippleOptions.rippleFlag,
    isCenterRipple: rippleOptions && rippleOptions.isCenterRipple,
    duration: rippleOptions && rippleOptions.duration ? rippleOptions.duration : 350
  };
  return rippleModel;
}
function rippleHandler2(e) {
  var target = e.target;
  var selector = this.rippleOptions.selector;
  var element2 = selector ? closest3(target, selector) : target;
  if (!element2 || this.rippleOptions && closest3(target, this.rippleOptions.ignore)) {
    return;
  }
  var offset = element2.getBoundingClientRect();
  var offsetX = e.pageX - document.body.scrollLeft;
  var offsetY = e.pageY - (!document.body.scrollTop && document.documentElement ? document.documentElement.scrollTop : document.body.scrollTop);
  var pageX = Math.max(Math.abs(offsetX - offset.left), Math.abs(offsetX - offset.right));
  var pageY = Math.max(Math.abs(offsetY - offset.top), Math.abs(offsetY - offset.bottom));
  var radius = Math.sqrt(pageX * pageX + pageY * pageY);
  var diameter = radius * 2 + "px";
  var x = offsetX - offset.left - radius;
  var y = offsetY - offset.top - radius;
  if (this.rippleOptions && this.rippleOptions.isCenterRipple) {
    x = 0;
    y = 0;
    diameter = "100%";
  }
  element2.classList.add("e-ripple");
  var duration = this.rippleOptions.duration.toString();
  var styles = "width: " + diameter + ";height: " + diameter + ";left: " + x + "px;top: " + y + "px;transition-duration: " + duration + "ms;";
  var rippleElement = createElement3("div", {
    className: "e-ripple-element",
    styles
  });
  element2.appendChild(rippleElement);
  window.getComputedStyle(rippleElement).getPropertyValue("opacity");
  rippleElement.style.transform = "scale(1)";
  if (element2 !== this.parent) {
    EventHandler3.add(element2, "mouseleave", rippleLeaveHandler2, {
      parent: this.parent,
      rippleOptions: this.rippleOptions
    });
  }
}
function rippleUpHandler2(e) {
  removeRipple2(e, this);
}
function rippleLeaveHandler2(e) {
  removeRipple2(e, this);
}
function removeRipple2(e, eventArgs) {
  var duration = eventArgs.rippleOptions.duration;
  var target = e.target;
  var selector = eventArgs.rippleOptions.selector;
  var element2 = selector ? closest3(target, selector) : target;
  if (!element2 || element2 && element2.className.indexOf("e-ripple") === -1) {
    return;
  }
  var rippleElements = selectAll3(".e-ripple-element", element2);
  var rippleElement = rippleElements[rippleElements.length - 1];
  if (rippleElement) {
    rippleElement.style.opacity = "0.5";
  }
  if (eventArgs.parent !== element2) {
    EventHandler3.remove(element2, "mouseleave", rippleLeaveHandler2);
  }
  setTimeout(function() {
    if (rippleElement && rippleElement.parentNode) {
      rippleElement.parentNode.removeChild(rippleElement);
    }
    if (!element2.getElementsByClassName("e-ripple-element").length) {
      element2.classList.remove("e-ripple");
    }
    if (eventArgs.done) {
      eventArgs.done(e);
    }
  }, duration);
}
var isRippleEnabled2 = false;
var animationMode3;
var GlobalAnimationMode3;
(function(GlobalAnimationMode4) {
  GlobalAnimationMode4["Default"] = "Default";
  GlobalAnimationMode4["Enable"] = "Enable";
  GlobalAnimationMode4["Disable"] = "Disable";
})(GlobalAnimationMode3 || (GlobalAnimationMode3 = {}));

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/module-loader.js
var MODULE_SUFFIX3 = "Module";
var ModuleLoader3 = (
  /** @class */
  function() {
    function ModuleLoader4(parent) {
      this.loadedModules = [];
      this.parent = parent;
    }
    ModuleLoader4.prototype.inject = function(requiredModules, moduleList) {
      var reqLength = requiredModules.length;
      if (reqLength === 0) {
        this.clean();
        return;
      }
      if (this.loadedModules.length) {
        this.clearUnusedModule(requiredModules);
      }
      for (var i = 0; i < reqLength; i++) {
        var modl = requiredModules[parseInt(i.toString(), 10)];
        for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
          var module = moduleList_1[_i];
          var modName = modl.member;
          if (module && module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
            var moduleObject = createInstance3(module, modl.args);
            var memberName = this.getMemberName(modName);
            if (modl.isProperty) {
              setValue4(memberName, module, this.parent);
            } else {
              setValue4(memberName, moduleObject, this.parent);
            }
            var loadedModule = modl;
            loadedModule.member = memberName;
            this.loadedModules.push(loadedModule);
          }
        }
      }
    };
    ModuleLoader4.prototype.clean = function() {
      for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
        var modules = _a[_i];
        if (!modules.isProperty) {
          getValue3(modules.member, this.parent).destroy();
        }
      }
      this.loadedModules = [];
    };
    ModuleLoader4.prototype.getNonInjectedModules = function(requiredModules) {
      var _this = this;
      return requiredModules.filter(function(module) {
        return !_this.isModuleLoaded(module.member);
      });
    };
    ModuleLoader4.prototype.clearUnusedModule = function(moduleList) {
      var _this = this;
      var usedModules = moduleList.map(function(arg) {
        return _this.getMemberName(arg.member);
      });
      var removableModule = this.loadedModules.filter(function(module) {
        return usedModules.indexOf(module.member) === -1;
      });
      for (var _i = 0, removableModule_1 = removableModule; _i < removableModule_1.length; _i++) {
        var mod = removableModule_1[_i];
        if (!mod.isProperty) {
          getValue3(mod.member, this.parent).destroy();
        }
        this.loadedModules.splice(this.loadedModules.indexOf(mod), 1);
        deleteObject3(this.parent, mod.member);
      }
    };
    ModuleLoader4.prototype.getMemberName = function(name) {
      return name[0].toLowerCase() + name.substring(1) + MODULE_SUFFIX3;
    };
    ModuleLoader4.prototype.isModuleLoaded = function(modName) {
      for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
        var mod = _a[_i];
        if (mod.member === this.getMemberName(modName)) {
          return true;
        }
      }
      return false;
    };
    return ModuleLoader4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/child-property.js
var ChildProperty3 = (
  /** @class */
  function() {
    function ChildProperty4(parent, propName, defaultValue, isArray) {
      this.isComplexArraySetter = false;
      this.properties = {};
      this.changedProperties = {};
      this.childChangedProperties = {};
      this.oldProperties = {};
      this.finalUpdate = function() {
      };
      this.callChildDataBind = getValue3("callChildDataBind", Base3);
      this.parentObj = parent;
      this.controlParent = this.parentObj.controlParent || this.parentObj;
      this.propName = propName;
      this.isParentArray = isArray;
      this.setProperties(defaultValue, true);
    }
    ChildProperty4.prototype.updateChange = function(val, propName) {
      if (val === true) {
        this.parentObj.childChangedProperties["" + propName] = val;
      } else {
        delete this.parentObj.childChangedProperties["" + propName];
      }
      if (this.parentObj.updateChange) {
        this.parentObj.updateChange(val, this.parentObj.propName);
      }
    };
    ChildProperty4.prototype.updateTimeOut = function() {
      if (this.parentObj.updateTimeOut) {
        this.parentObj.finalUpdate();
        this.parentObj.updateTimeOut();
      } else {
        var changeTime_1 = setTimeout(this.parentObj.dataBind.bind(this.parentObj));
        var clearUpdate = function() {
          clearTimeout(changeTime_1);
        };
        this.finalUpdate = clearUpdate;
      }
    };
    ChildProperty4.prototype.clearChanges = function() {
      this.finalUpdate();
      this.updateChange(false, this.propName);
      this.oldProperties = {};
      this.changedProperties = {};
    };
    ChildProperty4.prototype.setProperties = function(prop, muteOnChange) {
      if (muteOnChange === true) {
        merge3(this, prop);
        this.updateChange(false, this.propName);
        this.clearChanges();
      } else {
        merge3(this, prop);
      }
    };
    ChildProperty4.prototype.dataBind = function() {
      this.callChildDataBind(this.childChangedProperties, this);
      if (this.isParentArray) {
        var curIndex = this.parentObj[this.propName].indexOf(this);
        if (Object.keys(this.changedProperties).length) {
          setValue4(this.propName + "." + curIndex, this.changedProperties, this.parentObj.changedProperties);
          setValue4(this.propName + "." + curIndex, this.oldProperties, this.parentObj.oldProperties);
        }
      } else {
        this.parentObj.changedProperties[this.propName] = this.changedProperties;
        this.parentObj.oldProperties[this.propName] = this.oldProperties;
      }
      this.clearChanges();
    };
    ChildProperty4.prototype.saveChanges = function(key, newValue, oldValue, restrictServerDataBind) {
      if (this.controlParent.isProtectedOnChange) {
        return;
      }
      if (!restrictServerDataBind) {
        this.serverDataBind(key, newValue, true);
      }
      this.oldProperties["" + key] = oldValue;
      this.changedProperties["" + key] = newValue;
      this.updateChange(true, this.propName);
      this.finalUpdate();
      this.updateTimeOut();
    };
    ChildProperty4.prototype.serverDataBind = function(key, value, isSaveChanges, action) {
      if (isBlazor3() && !this.parentObj.isComplexArraySetter) {
        var parent_1;
        var newChanges = {};
        var parentKey = isSaveChanges ? this.getParentKey(true) + "." + key : key;
        if (parentKey.indexOf(".") !== -1) {
          var complexKeys = parentKey.split(".");
          parent_1 = newChanges;
          for (var i = 0; i < complexKeys.length; i++) {
            var isFinal = i === complexKeys.length - 1;
            parent_1[complexKeys[parseInt(i.toString(), 10)]] = isFinal ? value : {};
            parent_1 = isFinal ? parent_1 : parent_1[complexKeys[parseInt(i.toString(), 10)]];
          }
        } else {
          newChanges["" + parentKey] = {};
          parent_1 = newChanges["" + parentKey];
          newChanges["" + parentKey]["" + key] = value;
        }
        if (this.isParentArray) {
          var actionProperty = "ejsAction";
          parent_1["" + actionProperty] = action ? action : "none";
        }
        this.controlParent.serverDataBind(newChanges);
      }
    };
    ChildProperty4.prototype.getParentKey = function(isSaveChanges) {
      var index = "";
      var propName = this.propName;
      if (this.isParentArray) {
        index = this.parentObj[this.propName].indexOf(this);
        var valueLength = this.parentObj[this.propName].length;
        valueLength = isSaveChanges ? valueLength : valueLength > 0 ? valueLength - 1 : 0;
        index = index !== -1 ? "-" + index : "-" + valueLength;
        propName = propName + index;
      }
      if (this.controlParent !== this.parentObj) {
        propName = this.parentObj.getParentKey() + "." + this.propName + index;
      }
      return propName;
    };
    return ChildProperty4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/hijri-parser.js
var HijriParser3;
(function(HijriParser4) {
  var dateCorrection = [28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348, 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939, 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530, 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120, 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711, 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302, 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893, 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483, 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074, 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665, 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254, 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845, 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436, 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027, 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617, 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208, 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798, 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389, 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980, 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570, 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161, 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751, 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342, 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932, 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523, 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114, 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704, 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295, 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885, 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476, 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066, 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657, 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248, 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838, 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429, 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019, 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611, 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200, 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792, 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383, 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973, 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564, 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154, 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745, 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335, 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926, 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517, 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107, 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698, 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288, 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879, 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469, 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061, 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651, 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242, 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832, 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423, 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014, 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603, 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195, 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785, 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376, 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967, 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557, 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68e3, 68030, 68060, 68089, 68119, 68148, 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738, 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330, 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919, 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510, 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101, 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691, 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282, 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872, 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464, 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053, 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645, 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235, 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826, 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416, 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007, 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598, 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188, 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779, 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369, 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960, 79990];
  function getHijriDate(gDate) {
    var day = gDate.getDate();
    var month4 = gDate.getMonth();
    var year = gDate.getFullYear();
    var tMonth = month4 + 1;
    var tYear = year;
    if (tMonth < 3) {
      tYear -= 1;
      tMonth += 12;
    }
    var yPrefix = Math.floor(tYear / 100);
    var julilanOffset = yPrefix - Math.floor(yPrefix / 4) - 2;
    var julianNumber = Math.floor(365.25 * (tYear + 4716)) + Math.floor(30.6001 * (tMonth + 1)) + day - julilanOffset - 1524;
    yPrefix = Math.floor((julianNumber - 186721625e-2) / 36524.25);
    julilanOffset = yPrefix - Math.floor(yPrefix / 4) + 1;
    var b = julianNumber + julilanOffset + 1524;
    var c = Math.floor((b - 122.1) / 365.25);
    var d = Math.floor(365.25 * c);
    var tempMonth = Math.floor((b - d) / 30.6001);
    day = b - d - Math.floor(30.6001 * tempMonth);
    month4 = Math.floor((b - d) / 20.6001);
    if (month4 > 13) {
      c += 1;
      month4 -= 12;
    }
    month4 -= 1;
    year = c - 4716;
    var modifiedJulianDate = julianNumber - 24e5;
    var iyear = 10631 / 30;
    var z = julianNumber - 1948084;
    var cyc = Math.floor(z / 10631);
    z = z - 10631 * cyc;
    var j = Math.floor((z - 0.1335) / iyear);
    var iy = 30 * cyc + j;
    z = z - Math.floor(j * iyear + 0.1335);
    var im = Math.floor((z + 28.5001) / 29.5);
    if (im === 13) {
      im = 12;
    }
    var tempDay = z - Math.floor(29.5001 * im - 29);
    var i = 0;
    for (; i < dateCorrection.length; i++) {
      if (dateCorrection[parseInt(i.toString(), 10)] > modifiedJulianDate) {
        break;
      }
    }
    var iln = i + 16260;
    var ii = Math.floor((iln - 1) / 12);
    var hYear = ii + 1;
    var hmonth = iln - 12 * ii;
    var hDate = modifiedJulianDate - dateCorrection[i - 1] + 1;
    if ((hDate + "").length > 2) {
      hDate = tempDay;
      hmonth = im;
      hYear = iy;
    }
    return {
      year: hYear,
      month: hmonth,
      date: hDate
    };
  }
  HijriParser4.getHijriDate = getHijriDate;
  function toGregorian(year, month4, day) {
    var iy = year;
    var im = month4;
    var id = day;
    var ii = iy - 1;
    var iln = ii * 12 + 1 + (im - 1);
    var i = iln - 16260;
    var mcjdn = id + dateCorrection[i - 1] - 1;
    var julianDate = mcjdn + 24e5;
    var z = Math.floor(julianDate + 0.5);
    var a = Math.floor((z - 186721625e-2) / 36524.25);
    a = z + 1 + a - Math.floor(a / 4);
    var b = a + 1524;
    var c = Math.floor((b - 122.1) / 365.25);
    var d = Math.floor(365.25 * c);
    var e = Math.floor((b - d) / 30.6001);
    var gDay = b - d - Math.floor(e * 30.6001);
    var gMonth = e - (e > 13.5 ? 13 : 1);
    var gYear = c - (gMonth > 2.5 ? 4716 : 4715);
    if (gYear <= 0) {
      gMonth--;
    }
    return /* @__PURE__ */ new Date(gYear + "/" + gMonth + "/" + gDay);
  }
  HijriParser4.toGregorian = toGregorian;
})(HijriParser3 || (HijriParser3 = {}));

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/intl/date-formatter.js
var abbreviateRegexGlobal3 = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
var standalone5 = "stand-alone";
var weekdayKey3 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
var timeSetter5 = {
  m: "getMinutes",
  h: "getHours",
  H: "getHours",
  s: "getSeconds",
  d: "getDate",
  f: "getMilliseconds"
};
var datePartMatcher3 = {
  "M": "month",
  "d": "day",
  "E": "weekday",
  "c": "weekday",
  "y": "year",
  "m": "minute",
  "h": "hour",
  "H": "hour",
  "s": "second",
  "L": "month",
  "a": "designator",
  "z": "timeZone",
  "Z": "timeZone",
  "G": "era",
  "f": "milliseconds"
};
var timeSeparator3 = "timeSeparator";
var DateFormat6 = (
  /** @class */
  function() {
    function DateFormat7() {
    }
    DateFormat7.dateFormat = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase3.getDependables(cldr, culture, option.calendar);
      var numObject = getValue3("parserObject.numbers", dependable);
      var dateObject = dependable.dateObject;
      var formatOptions = {
        isIslamic: IntlBase3.islamicRegex.test(option.calendar)
      };
      if (isBlazor3() && option.isServerRendered) {
        option = IntlBase3.compareBlazorDateFormats(option, culture);
      }
      var resPattern = option.format || IntlBase3.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor3() ? culture : "");
      formatOptions.dateSeperator = isBlazor3() ? getValue3("dateSeperator", dateObject) : IntlBase3.getDateSeparator(dependable.dateObject);
      if (isUndefined3(resPattern)) {
        throwError3("Format options or type given must be invalid");
      } else {
        resPattern = IntlBase3.ConvertDateToWeekFormat(resPattern);
        if (isBlazor3()) {
          resPattern = resPattern.replace(/tt/, "a");
        }
        formatOptions.pattern = resPattern;
        formatOptions.numMapper = isBlazor3() ? extend3({}, numObject) : ParserBase3.getNumberMapper(dependable.parserObject, ParserBase3.getNumberingSystem(cldr));
        var patternMatch = resPattern.match(abbreviateRegexGlobal3) || [];
        for (var _i = 0, patternMatch_1 = patternMatch; _i < patternMatch_1.length; _i++) {
          var str = patternMatch_1[_i];
          var len = str.length;
          var char = str[0];
          if (char === "K") {
            char = "h";
          }
          switch (char) {
            case "E":
            case "c":
              if (isBlazor3()) {
                formatOptions.weekday = getValue3("days." + IntlBase3.monthIndex["" + len], dateObject);
              } else {
                formatOptions.weekday = dependable.dateObject["" + IntlBase3.days]["" + standalone5][IntlBase3.monthIndex["" + len]];
              }
              break;
            case "M":
            case "L":
              if (isBlazor3()) {
                formatOptions.month = getValue3("months." + IntlBase3.monthIndex["" + len], dateObject);
              } else {
                formatOptions.month = dependable.dateObject["" + IntlBase3.month]["" + standalone5][IntlBase3.monthIndex["" + len]];
              }
              break;
            case "a":
              formatOptions.designator = isBlazor3() ? getValue3("dayPeriods", dateObject) : getValue3("dayPeriods.format.wide", dateObject);
              break;
            case "G": {
              var eText = len <= 3 ? "eraAbbr" : len === 4 ? "eraNames" : "eraNarrow";
              formatOptions.era = isBlazor3() ? getValue3("eras", dateObject) : getValue3("eras." + eText, dependable.dateObject);
              break;
            }
            case "z":
              formatOptions.timeZone = getValue3("dates.timeZoneNames", dependable.parserObject);
              break;
          }
        }
      }
      return function(value) {
        if (isNaN(value.getDate())) {
          return null;
        }
        return _this.intDateFormatter(value, formatOptions);
      };
    };
    DateFormat7.intDateFormatter = function(value, options) {
      var pattern = options.pattern;
      var ret = "";
      var matches5 = pattern.match(IntlBase3.dateParseRegex);
      var dObject = this.getCurrentDateValue(value, options.isIslamic);
      for (var _i = 0, matches_1 = matches5; _i < matches_1.length; _i++) {
        var match = matches_1[_i];
        var length_1 = match.length;
        var char = match[0];
        if (char === "K") {
          char = "h";
        }
        var curval = void 0;
        var curvalstr = "";
        var isNumber = void 0;
        var processNumber = void 0;
        var curstr = "";
        switch (char) {
          case "M":
          case "L":
            curval = dObject.month;
            if (length_1 > 2) {
              ret += options.month["" + curval];
            } else {
              isNumber = true;
            }
            break;
          case "E":
          case "c":
            ret += options.weekday["" + weekdayKey3[value.getDay()]];
            break;
          case "H":
          case "h":
          case "m":
          case "s":
          case "d":
          case "f":
            isNumber = true;
            if (char === "d") {
              curval = dObject.date;
            } else if (char === "f") {
              isNumber = false;
              processNumber = true;
              curvalstr = value["" + timeSetter5["" + char]]().toString();
              curvalstr = curvalstr.substring(0, length_1);
              var curlength = curvalstr.length;
              if (length_1 !== curlength) {
                if (length_1 > 3) {
                  continue;
                }
                for (var i = 0; i < length_1 - curlength; i++) {
                  curvalstr = "0" + curvalstr.toString();
                }
              }
              curstr += curvalstr;
            } else {
              curval = value["" + timeSetter5["" + char]]();
            }
            if (char === "h") {
              curval = curval % 12 || 12;
            }
            break;
          case "y":
            processNumber = true;
            curstr += dObject.year;
            if (length_1 === 2) {
              curstr = curstr.substr(curstr.length - 2);
            }
            break;
          case "a": {
            var desig = value.getHours() < 12 ? "am" : "pm";
            ret += options.designator["" + desig];
            break;
          }
          case "G": {
            var dec = value.getFullYear() < 0 ? 0 : 1;
            var retu = options.era["" + dec];
            if (isNullOrUndefined3(retu)) {
              retu = options.era[dec ? 0 : 1];
            }
            ret += retu || "";
            break;
          }
          case "'":
            ret += match === "''" ? "'" : match.replace(/'/g, "");
            break;
          case "z": {
            var timezone = value.getTimezoneOffset();
            var pattern_1 = length_1 < 4 ? "+H;-H" : options.timeZone.hourFormat;
            pattern_1 = pattern_1.replace(/:/g, options.numMapper.timeSeparator);
            if (timezone === 0) {
              ret += options.timeZone.gmtZeroFormat;
            } else {
              processNumber = true;
              curstr = this.getTimeZoneValue(timezone, pattern_1);
            }
            curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
            break;
          }
          case ":":
            ret += options.numMapper.numberSymbols["" + timeSeparator3];
            break;
          case "/":
            ret += options.dateSeperator;
            break;
          case "W":
            isNumber = true;
            curval = IntlBase3.getWeekOfYear(value);
            break;
          default:
            ret += match;
        }
        if (isNumber) {
          processNumber = true;
          curstr = this.checkTwodigitNumber(curval, length_1);
        }
        if (processNumber) {
          ret += ParserBase3.convertValueParts(curstr, IntlBase3.latnParseRegex, options.numMapper.mapper);
        }
      }
      return ret;
    };
    DateFormat7.getCurrentDateValue = function(value, isIslamic) {
      if (isIslamic) {
        return HijriParser3.getHijriDate(value);
      }
      return {
        year: value.getFullYear(),
        month: value.getMonth() + 1,
        date: value.getDate()
      };
    };
    DateFormat7.checkTwodigitNumber = function(val, len) {
      var ret = val + "";
      if (len === 2 && ret.length !== 2) {
        return "0" + ret;
      }
      return ret;
    };
    DateFormat7.getTimeZoneValue = function(tVal, pattern) {
      var _this = this;
      var splt = pattern.split(";");
      var curPattern = splt[tVal > 0 ? 1 : 0];
      var no = Math.abs(tVal);
      return curPattern = curPattern.replace(/HH?|mm/g, function(str) {
        var len = str.length;
        var ishour = str.indexOf("H") !== -1;
        return _this.checkTwodigitNumber(Math.floor(ishour ? no / 60 : no % 60), len);
      });
    };
    return DateFormat7;
  }()
);
setDateFormat3(DateFormat6);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/intl/number-formatter.js
var errorText3 = {
  "ms": "minimumSignificantDigits",
  "ls": "maximumSignificantDigits",
  "mf": "minimumFractionDigits",
  "lf": "maximumFractionDigits"
};
var percentSign3 = "percentSign";
var minusSign3 = "minusSign";
var mapper4 = ["infinity", "nan", "group", "decimal", "exponential"];
var NumberFormat6 = (
  /** @class */
  function() {
    function NumberFormat7() {
    }
    NumberFormat7.numberFormatter = function(culture, option, cldr) {
      var _this = this;
      var fOptions = extend3({}, option);
      var cOptions = {};
      var dOptions = {};
      var symbolPattern;
      var dependable = IntlBase3.getDependables(cldr, culture, "", true);
      var numObject = dependable.numericObject;
      dOptions.numberMapper = isBlazor3() ? extend3({}, numObject) : ParserBase3.getNumberMapper(dependable.parserObject, ParserBase3.getNumberingSystem(cldr), true);
      dOptions.currencySymbol = isBlazor3() ? getValue3("currencySymbol", numObject) : IntlBase3.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode3, option.altSymbol, option.ignoreCurrency);
      dOptions.percentSymbol = isBlazor3() ? getValue3("numberSymbols.percentSign", numObject) : dOptions.numberMapper.numberSymbols["" + percentSign3];
      dOptions.minusSymbol = isBlazor3() ? getValue3("numberSymbols.minusSign", numObject) : dOptions.numberMapper.numberSymbols["" + minusSign3];
      var symbols = dOptions.numberMapper.numberSymbols;
      if (option.format && !IntlBase3.formatRegex.test(option.format)) {
        cOptions = IntlBase3.customFormat(option.format, dOptions, dependable.numericObject);
        if (!isUndefined3(fOptions.useGrouping) && fOptions.useGrouping) {
          fOptions.useGrouping = cOptions.pData.useGrouping;
        }
      } else {
        extend3(fOptions, IntlBase3.getProperNumericSkeleton(option.format || "N"));
        fOptions.isCurrency = fOptions.type === "currency";
        fOptions.isPercent = fOptions.type === "percent";
        if (!isBlazor3()) {
          symbolPattern = IntlBase3.getSymbolPattern(fOptions.type, dOptions.numberMapper.numberSystem, dependable.numericObject, fOptions.isAccount);
        }
        fOptions.groupOne = this.checkValueRange(fOptions.maximumSignificantDigits, fOptions.minimumSignificantDigits, true);
        this.checkValueRange(fOptions.maximumFractionDigits, fOptions.minimumFractionDigits, false, true);
        if (!isUndefined3(fOptions.fractionDigits)) {
          fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits;
        }
        if (isUndefined3(fOptions.useGrouping)) {
          fOptions.useGrouping = true;
        }
        if (fOptions.isCurrency && !isBlazor3()) {
          symbolPattern = symbolPattern.replace(/\u00A4/g, IntlBase3.defaultCurrency);
        }
        if (!isBlazor3()) {
          var split = symbolPattern.split(";");
          cOptions.nData = IntlBase3.getFormatData(split[1] || "-" + split[0], true, dOptions.currencySymbol);
          cOptions.pData = IntlBase3.getFormatData(split[0], false, dOptions.currencySymbol);
          if (fOptions.useGrouping) {
            fOptions.groupSeparator = symbols[mapper4[2]];
            fOptions.groupData = this.getGroupingDetails(split[0]);
          }
        } else {
          cOptions.nData = extend3({}, {}, getValue3(fOptions.type + "nData", numObject));
          cOptions.pData = extend3({}, {}, getValue3(fOptions.type + "pData", numObject));
          if (fOptions.type === "currency" && option.currency) {
            IntlBase3.replaceBlazorCurrency([cOptions.pData, cOptions.nData], dOptions.currencySymbol, option.currency);
          }
        }
        var minFrac = isUndefined3(fOptions.minimumFractionDigits);
        if (minFrac) {
          fOptions.minimumFractionDigits = cOptions.nData.minimumFraction;
        }
        if (isUndefined3(fOptions.maximumFractionDigits)) {
          var mval = cOptions.nData.maximumFraction;
          fOptions.maximumFractionDigits = isUndefined3(mval) && fOptions.isPercent ? 0 : mval;
        }
        var mfrac = fOptions.minimumFractionDigits;
        var lfrac = fOptions.maximumFractionDigits;
        if (!isUndefined3(mfrac) && !isUndefined3(lfrac)) {
          if (mfrac > lfrac) {
            fOptions.maximumFractionDigits = mfrac;
          }
        }
      }
      extend3(cOptions.nData, fOptions);
      extend3(cOptions.pData, fOptions);
      return function(value) {
        if (isNaN(value)) {
          return symbols[mapper4[1]];
        } else if (!isFinite(value)) {
          return symbols[mapper4[0]];
        }
        return _this.intNumberFormatter(value, cOptions, dOptions, option);
      };
    };
    NumberFormat7.getGroupingDetails = function(pattern) {
      var ret = {};
      var match = pattern.match(IntlBase3.negativeDataRegex);
      if (match && match[4]) {
        var pattern_1 = match[4];
        var p = pattern_1.lastIndexOf(",");
        if (p !== -1) {
          var temp = pattern_1.split(".")[0];
          ret.primary = temp.length - p - 1;
          var s = pattern_1.lastIndexOf(",", p - 1);
          if (s !== -1) {
            ret.secondary = p - 1 - s;
          }
        }
      }
      return ret;
    };
    NumberFormat7.checkValueRange = function(val1, val2, checkbothExist, isFraction) {
      var decide = isFraction ? "f" : "s";
      var dint = 0;
      var str1 = errorText3["l" + decide];
      var str2 = errorText3["m" + decide];
      if (!isUndefined3(val1)) {
        this.checkRange(val1, str1, isFraction);
        dint++;
      }
      if (!isUndefined3(val2)) {
        this.checkRange(val2, str2, isFraction);
        dint++;
      }
      if (dint === 2) {
        if (val1 < val2) {
          throwError3(str2 + "specified must be less than the" + str1);
        } else {
          return true;
        }
      } else if (checkbothExist && dint === 1) {
        throwError3("Both" + str2 + "and" + str2 + "must be present");
      }
      return false;
    };
    NumberFormat7.checkRange = function(val, text, isFraction) {
      var range = isFraction ? [0, 20] : [1, 21];
      if (val < range[0] || val > range[1]) {
        throwError3(text + "value must be within the range" + range[0] + "to" + range[1]);
      }
    };
    NumberFormat7.intNumberFormatter = function(value, fOptions, dOptions, option) {
      var curData;
      if (isUndefined3(fOptions.nData.type)) {
        return void 0;
      } else {
        if (value < 0) {
          value = value * -1;
          curData = fOptions.nData;
        } else if (value === 0) {
          curData = fOptions.zeroData || fOptions.pData;
        } else {
          curData = fOptions.pData;
        }
        var fValue = "";
        if (curData.isPercent) {
          value = value * 100;
        }
        if (curData.groupOne) {
          fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits);
        } else {
          fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits, option);
          if (curData.minimumIntegerDigits) {
            fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);
          }
          if (dOptions.isCustomFormat && curData.minimumFractionDigits < curData.maximumFractionDigits && /\d+\.\d+/.test(fValue)) {
            var temp = fValue.split(".");
            var decimalPart = temp[1];
            var len = decimalPart.length;
            for (var i = len - 1; i >= 0; i--) {
              if (decimalPart[parseInt(i.toString(), 10)] === "0" && i >= curData.minimumFractionDigits) {
                decimalPart = decimalPart.slice(0, i);
              } else {
                break;
              }
            }
            fValue = temp[0] + "." + decimalPart;
          }
        }
        if (curData.type === "scientific") {
          fValue = value.toExponential(curData.maximumFractionDigits);
          fValue = fValue.replace("e", dOptions.numberMapper.numberSymbols[mapper4[4]]);
        }
        fValue = fValue.replace(".", dOptions.numberMapper.numberSymbols[mapper4[3]]);
        fValue = curData.format === "#,###,,;(#,###,,)" ? this.customPivotFormat(parseInt(fValue, 10)) : fValue;
        if (curData.useGrouping) {
          fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ",", dOptions.numberMapper.numberSymbols[mapper4[3]] || ".", curData.groupData.secondary);
        }
        fValue = ParserBase3.convertValueParts(fValue, IntlBase3.latnParseRegex, dOptions.numberMapper.mapper);
        if (curData.nlead === "N/A") {
          return curData.nlead;
        } else {
          if (fValue === "0" && option && option.format === "0") {
            return fValue + curData.nend;
          }
          return curData.nlead + fValue + curData.nend;
        }
      }
    };
    NumberFormat7.processSignificantDigits = function(value, min, max) {
      var temp = value + "";
      var tn;
      var length = temp.length;
      if (length < min) {
        return value.toPrecision(min);
      } else {
        temp = value.toPrecision(max);
        tn = +temp;
        return tn + "";
      }
    };
    NumberFormat7.groupNumbers = function(val, level1, sep, decimalSymbol, level2) {
      var flag = !isNullOrUndefined3(level2) && level2 !== 0;
      var split = val.split(decimalSymbol);
      var prefix = split[0];
      var length = prefix.length;
      var str = "";
      while (length > level1) {
        str = prefix.slice(length - level1, length) + (str.length ? sep + str : "");
        length -= level1;
        if (flag) {
          level1 = level2;
          flag = false;
        }
      }
      split[0] = prefix.slice(0, length) + (str.length ? sep : "") + str;
      return split.join(decimalSymbol);
    };
    NumberFormat7.processFraction = function(value, min, max, option) {
      var temp = (value + "").split(".")[1];
      var length = temp ? temp.length : 0;
      if (min && length < min) {
        var ret = "";
        if (length === 0) {
          ret = value.toFixed(min);
        } else {
          ret += value;
          for (var j = 0; j < min - length; j++) {
            ret += "0";
          }
          return ret;
        }
        return value.toFixed(min);
      } else if (!isNullOrUndefined3(max) && (length > max || max === 0)) {
        return value.toFixed(max);
      }
      var str = value + "";
      if (str[0] === "0" && option && option.format === "###.00") {
        str = str.slice(1);
      }
      return str;
    };
    NumberFormat7.processMinimumIntegers = function(value, min) {
      var temp = value.split(".");
      var lead = temp[0];
      var len = lead.length;
      if (len < min) {
        for (var i = 0; i < min - len; i++) {
          lead = "0" + lead;
        }
        temp[0] = lead;
      }
      return temp.join(".");
    };
    NumberFormat7.customPivotFormat = function(value) {
      if (value >= 5e5) {
        value /= 1e6;
        var _a = value.toString().split("."), integer = _a[0], decimal = _a[1];
        return decimal && +decimal.substring(0, 1) >= 5 ? Math.ceil(value).toString() : Math.floor(value).toString();
      }
      return "";
    };
    return NumberFormat7;
  }()
);
setNumberFormat3(NumberFormat6);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/intl/date-parser.js
var standalone6 = "stand-alone";
var latnRegex3 = /^[0-9]*$/;
var timeSetter6 = {
  minute: "setMinutes",
  hour: "setHours",
  second: "setSeconds",
  day: "setDate",
  month: "setMonth",
  milliseconds: "setMilliseconds"
};
var month3 = "months";
var DateParser3 = (
  /** @class */
  function() {
    function DateParser4() {
    }
    DateParser4.dateParser = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase3.getDependables(cldr, culture, option.calendar);
      var numOptions = ParserBase3.getCurrentNumericOptions(dependable.parserObject, ParserBase3.getNumberingSystem(cldr), false, isBlazor3());
      var parseOptions = {};
      if (isBlazor3() && option.isServerRendered) {
        option = IntlBase3.compareBlazorDateFormats(option, culture);
      }
      var resPattern = option.format || IntlBase3.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor3() ? culture : "");
      var regexString = "";
      var hourOnly;
      if (isUndefined3(resPattern)) {
        throwError3("Format options or type given must be invalid");
      } else {
        resPattern = IntlBase3.ConvertDateToWeekFormat(resPattern);
        parseOptions = {
          isIslamic: IntlBase3.islamicRegex.test(option.calendar),
          pattern: resPattern,
          evalposition: {},
          culture
        };
        var patternMatch = resPattern.match(IntlBase3.dateParseRegex) || [];
        var length_1 = patternMatch.length;
        var gmtCorrection = 0;
        var zCorrectTemp = 0;
        var isgmtTraversed = false;
        var nRegx = numOptions.numericRegex;
        var numMapper = isBlazor3() ? dependable.parserObject.numbers : ParserBase3.getNumberMapper(dependable.parserObject, ParserBase3.getNumberingSystem(cldr));
        for (var i = 0; i < length_1; i++) {
          var str = patternMatch[parseInt(i.toString(), 10)];
          var len = str.length;
          var char = str[0] === "K" ? "h" : str[0];
          var isNumber = void 0;
          var canUpdate = void 0;
          var charKey = datePartMatcher3["" + char];
          var optional = len === 2 ? "" : "?";
          if (isgmtTraversed) {
            gmtCorrection = zCorrectTemp;
            isgmtTraversed = false;
          }
          switch (char) {
            case "E":
            case "c": {
              var weekData = void 0;
              if (isBlazor3()) {
                weekData = getValue3("days." + IntlBase3.monthIndex["" + len], dependable.dateObject);
              } else {
                weekData = dependable.dateObject["" + IntlBase3.days]["" + standalone6][IntlBase3.monthIndex["" + len]];
              }
              var weekObject = ParserBase3.reverseObject(weekData);
              regexString += "(" + Object.keys(weekObject).join("|") + ")";
              break;
            }
            case "M":
            case "L":
            case "d":
            case "m":
            case "s":
            case "h":
            case "H":
            case "f":
              canUpdate = true;
              if ((char === "M" || char === "L") && len > 2) {
                var monthData = void 0;
                if (isBlazor3()) {
                  monthData = getValue3("months." + IntlBase3.monthIndex["" + len], dependable.dateObject);
                } else {
                  monthData = dependable.dateObject["" + month3]["" + standalone6][IntlBase3.monthIndex["" + len]];
                }
                parseOptions["" + charKey] = ParserBase3.reverseObject(monthData);
                regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + ")";
              } else if (char === "f") {
                if (len > 3) {
                  continue;
                }
                isNumber = true;
                regexString += "(" + nRegx + nRegx + "?" + nRegx + "?)";
              } else {
                isNumber = true;
                regexString += "(" + nRegx + nRegx + optional + ")";
              }
              if (char === "h") {
                parseOptions.hour12 = true;
              }
              break;
            case "W": {
              var opt = len === 1 ? "?" : "";
              regexString += "(" + nRegx + opt + nRegx + ")";
              break;
            }
            case "y":
              canUpdate = isNumber = true;
              if (len === 2) {
                regexString += "(" + nRegx + nRegx + ")";
              } else {
                regexString += "(" + nRegx + "{" + len + ",})";
              }
              break;
            case "a": {
              canUpdate = true;
              var periodValur = isBlazor3() ? getValue3("dayPeriods", dependable.dateObject) : getValue3("dayPeriods.format.wide", dependable.dateObject);
              parseOptions["" + charKey] = ParserBase3.reverseObject(periodValur);
              regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + ")";
              break;
            }
            case "G": {
              canUpdate = true;
              var eText = len <= 3 ? "eraAbbr" : len === 4 ? "eraNames" : "eraNarrow";
              parseOptions["" + charKey] = ParserBase3.reverseObject(isBlazor3() ? getValue3("eras", dependable.dateObject) : getValue3("eras." + eText, dependable.dateObject));
              regexString += "(" + Object.keys(parseOptions["" + charKey]).join("|") + "?)";
              break;
            }
            case "z": {
              var tval = (/* @__PURE__ */ new Date()).getTimezoneOffset();
              canUpdate = tval !== 0;
              parseOptions["" + charKey] = getValue3("dates.timeZoneNames", dependable.parserObject);
              var tzone = parseOptions["" + charKey];
              hourOnly = len < 4;
              var hpattern = hourOnly ? "+H;-H" : tzone.hourFormat;
              hpattern = hpattern.replace(/:/g, numMapper.timeSeparator);
              regexString += "(" + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ")?";
              isgmtTraversed = true;
              zCorrectTemp = hourOnly ? 6 : 12;
              break;
            }
            case "'": {
              var iString = str.replace(/'/g, "");
              regexString += "(" + iString + ")?";
              break;
            }
            default:
              regexString += "([\\D])";
              break;
          }
          if (canUpdate) {
            parseOptions.evalposition["" + charKey] = {
              isNumber,
              pos: i + 1 + gmtCorrection,
              hourOnly
            };
          }
          if (i === length_1 - 1 && !isNullOrUndefined3(regexString)) {
            var regExp7 = RegExp;
            parseOptions.parserRegex = new regExp7("^" + regexString + "$", "i");
          }
        }
      }
      return function(value) {
        var parsedDateParts = _this.internalDateParse(value, parseOptions, numOptions);
        if (isNullOrUndefined3(parsedDateParts) || !Object.keys(parsedDateParts).length) {
          return null;
        }
        if (parseOptions.isIslamic) {
          var dobj = {};
          var tYear = parsedDateParts.year;
          var tDate = parsedDateParts.day;
          var tMonth = parsedDateParts.month;
          var ystrig = tYear ? tYear + "" : "";
          var is2DigitYear = ystrig.length === 2;
          if (!tYear || !tMonth || !tDate || is2DigitYear) {
            dobj = HijriParser3.getHijriDate(/* @__PURE__ */ new Date());
          }
          if (is2DigitYear) {
            tYear = parseInt((dobj.year + "").slice(0, 2) + ystrig, 10);
          }
          var dateObject = HijriParser3.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);
          parsedDateParts.year = dateObject.getFullYear();
          parsedDateParts.month = dateObject.getMonth() + 1;
          parsedDateParts.day = dateObject.getDate();
        }
        return _this.getDateObject(parsedDateParts);
      };
    };
    DateParser4.getDateObject = function(options, value) {
      var res = value || /* @__PURE__ */ new Date();
      res.setMilliseconds(0);
      var tKeys = ["hour", "minute", "second", "milliseconds", "month", "day"];
      var y = options.year;
      var desig = options.designator;
      var tzone = options.timeZone;
      if (!isUndefined3(y)) {
        var len = (y + "").length;
        if (len <= 2) {
          var century = Math.floor(res.getFullYear() / 100) * 100;
          y += century;
        }
        res.setFullYear(y);
      }
      for (var _i = 0, tKeys_1 = tKeys; _i < tKeys_1.length; _i++) {
        var key = tKeys_1[_i];
        var tValue = options["" + key];
        if (isUndefined3(tValue) && key === "day") {
          res.setDate(1);
        }
        if (!isUndefined3(tValue)) {
          if (key === "month") {
            tValue -= 1;
            if (tValue < 0 || tValue > 11) {
              return /* @__PURE__ */ new Date("invalid");
            }
            var pDate = res.getDate();
            res.setDate(1);
            res[timeSetter6["" + key]](tValue);
            var lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();
            res.setDate(pDate < lDate ? pDate : lDate);
          } else {
            if (key === "day") {
              var lastDay = new Date(res.getFullYear(), res.getMonth() + 1, 0).getDate();
              if (tValue < 1 || tValue > lastDay) {
                return null;
              }
            }
            res["" + timeSetter6["" + key]](tValue);
          }
        }
      }
      if (!isUndefined3(desig)) {
        var hour = res.getHours();
        if (desig === "pm") {
          res.setHours(hour + (hour === 12 ? 0 : 12));
        } else if (hour === 12) {
          res.setHours(0);
        }
      }
      if (!isUndefined3(tzone)) {
        var tzValue = tzone - res.getTimezoneOffset();
        if (tzValue !== 0) {
          res.setMinutes(res.getMinutes() + tzValue);
        }
      }
      return res;
    };
    DateParser4.internalDateParse = function(value, parseOptions, num) {
      var matches5 = value.match(parseOptions.parserRegex);
      var retOptions = {
        "hour": 0,
        "minute": 0,
        "second": 0
      };
      if (isNullOrUndefined3(matches5)) {
        return null;
      } else {
        var props = Object.keys(parseOptions.evalposition);
        for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
          var prop = props_1[_i];
          var curObject = parseOptions.evalposition["" + prop];
          var matchString = matches5[curObject.pos];
          if (curObject.isNumber) {
            retOptions["" + prop] = this.internalNumberParser(matchString, num);
          } else {
            if (prop === "timeZone" && !isUndefined3(matchString)) {
              var pos = curObject.pos;
              var val = void 0;
              var tmatch = matches5[pos + 1];
              var flag = !isUndefined3(tmatch);
              if (curObject.hourOnly) {
                val = this.getZoneValue(flag, tmatch, matches5[pos + 4], num) * 60;
              } else {
                val = this.getZoneValue(flag, tmatch, matches5[pos + 7], num) * 60;
                val += this.getZoneValue(flag, matches5[pos + 4], matches5[pos + 10], num);
              }
              if (!isNullOrUndefined3(val)) {
                retOptions["" + prop] = val;
              }
            } else {
              var cultureOptions = ["en-US", "en-MH", "en-MP"];
              matchString = prop === "month" && !parseOptions.isIslamic && (parseOptions.culture === "en" || parseOptions.culture === "en-GB" || parseOptions.culture === "en-US") ? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
              matchString = prop !== "month" && prop === "designator" && parseOptions.culture && parseOptions.culture.indexOf("en-") !== -1 && cultureOptions.indexOf(parseOptions.culture) === -1 ? matchString.toLowerCase() : matchString;
              retOptions["" + prop] = parseOptions["" + prop]["" + matchString];
            }
          }
        }
        if (parseOptions.hour12) {
          retOptions.hour12 = true;
        }
      }
      return retOptions;
    };
    DateParser4.internalNumberParser = function(value, option) {
      value = ParserBase3.convertValueParts(value, option.numberParseRegex, option.numericPair);
      if (latnRegex3.test(value)) {
        return +value;
      }
      return null;
    };
    DateParser4.parseTimeZoneRegx = function(hourFormat, tZone, nRegex) {
      var pattern = tZone.gmtFormat;
      var ret;
      var cRegex = "(" + nRegex + ")(" + nRegex + ")";
      ret = hourFormat.replace("+", "\\+");
      if (hourFormat.indexOf("HH") !== -1) {
        ret = ret.replace(/HH|mm/g, "(" + cRegex + ")");
      } else {
        ret = ret.replace(/H|m/g, "(" + cRegex + "?)");
      }
      var splitStr = ret.split(";").map(function(str) {
        return pattern.replace("{0}", str);
      });
      ret = splitStr.join("|") + "|" + tZone.gmtZeroFormat;
      return ret;
    };
    DateParser4.getZoneValue = function(flag, val1, val2, num) {
      var ival = flag ? val1 : val2;
      if (!ival) {
        return 0;
      }
      var value = this.internalNumberParser(ival, num);
      if (flag) {
        return -value;
      }
      return value;
    };
    return DateParser4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/intl/number-parser.js
var regExp6 = RegExp;
var parseRegex3 = new regExp6("^([^0-9]*)(([0-9,]*[0-9]+)(.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$");
var groupRegex3 = /,/g;
var keys3 = ["minusSign", "infinity"];
var NumberParser3 = (
  /** @class */
  function() {
    function NumberParser4() {
    }
    NumberParser4.numberParser = function(culture, option, cldr) {
      var _this = this;
      var dependable = IntlBase3.getDependables(cldr, culture, "", true);
      var parseOptions = {
        custom: true
      };
      if (IntlBase3.formatRegex.test(option.format) || !option.format) {
        extend3(parseOptions, IntlBase3.getProperNumericSkeleton(option.format || "N"));
        parseOptions.custom = false;
        if (!parseOptions.fractionDigits) {
          if (option.maximumFractionDigits) {
            parseOptions.maximumFractionDigits = option.maximumFractionDigits;
          }
        }
      } else {
        extend3(parseOptions, IntlBase3.customFormat(option.format, null, null));
      }
      var numbers = getValue3("numbers", dependable.parserObject);
      var numOptions = ParserBase3.getCurrentNumericOptions(dependable.parserObject, ParserBase3.getNumberingSystem(cldr), true, isBlazor3());
      parseOptions.symbolRegex = ParserBase3.getSymbolRegex(Object.keys(numOptions.symbolMatch));
      parseOptions.infinity = numOptions.symbolNumberSystem[keys3[1]];
      var symbolpattern;
      if (!isBlazor3()) {
        symbolpattern = IntlBase3.getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);
        if (symbolpattern) {
          symbolpattern = symbolpattern.replace(/\u00A4/g, IntlBase3.defaultCurrency);
          var split = symbolpattern.split(";");
          parseOptions.nData = IntlBase3.getFormatData(split[1] || "-" + split[0], true, "");
          parseOptions.pData = IntlBase3.getFormatData(split[0], true, "");
        }
      } else {
        parseOptions.nData = extend3({}, {}, getValue3(parseOptions.type + "nData", numbers));
        parseOptions.pData = extend3({}, {}, getValue3(parseOptions.type + "pData", numbers));
        if (parseOptions.type === "currency" && option.currency) {
          IntlBase3.replaceBlazorCurrency([parseOptions.pData, parseOptions.nData], getValue3("currencySymbol", numbers), option.currency);
        }
      }
      return function(value) {
        return _this.getParsedNumber(value, parseOptions, numOptions);
      };
    };
    NumberParser4.getParsedNumber = function(value, options, numOptions) {
      var isNegative;
      var isPercent;
      var tempValue;
      var lead;
      var end;
      var ret;
      if (value.indexOf(options.infinity) !== -1) {
        return Infinity;
      } else {
        value = ParserBase3.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
        value = ParserBase3.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);
        value = value.indexOf("-") !== -1 ? value.replace("-.", "-0.") : value;
        if (value.indexOf(".") === 0) {
          value = "0" + value;
        }
        var matches5 = value.match(parseRegex3);
        if (isNullOrUndefined3(matches5)) {
          return NaN;
        }
        lead = matches5[1];
        tempValue = matches5[2];
        var exponent = matches5[5];
        end = matches5[6];
        isNegative = options.custom ? lead === options.nData.nlead && end === options.nData.nend : lead.indexOf(options.nData.nlead) !== -1 && end.indexOf(options.nData.nend) !== -1;
        isPercent = isNegative ? options.nData.isPercent : options.pData.isPercent;
        tempValue = tempValue.replace(groupRegex3, "");
        if (exponent) {
          tempValue += exponent;
        }
        ret = +tempValue;
        if (options.type === "percent" || isPercent) {
          ret = ret / 100;
        }
        if (options.custom || options.fractionDigits) {
          ret = parseFloat(ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.fractionDigits));
        }
        if (options.maximumFractionDigits) {
          ret = this.convertMaxFracDigits(tempValue, options, ret, isNegative);
        }
        if (isNegative) {
          ret *= -1;
        }
        return ret;
      }
    };
    NumberParser4.convertMaxFracDigits = function(value, options, ret, isNegative) {
      var decimalSplitValue = value.split(".");
      if (decimalSplitValue[1] && decimalSplitValue[1].length > options.maximumFractionDigits) {
        ret = +ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.maximumFractionDigits);
      }
      return ret;
    };
    return NumberParser4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/internationalization.js
var onIntlChange3 = new Observer3();
var rightToLeft3 = false;
var cldrData3 = {};
var defaultCulture3 = "en-US";
var Internationalization3 = (
  /** @class */
  function() {
    function Internationalization4(cultureName) {
      if (cultureName) {
        this.culture = cultureName;
      }
    }
    Internationalization4.prototype.getDateFormat = function(options) {
      return DateFormat6.dateFormat(this.getCulture(), options || {
        type: "date",
        skeleton: "short"
      }, cldrData3);
    };
    Internationalization4.prototype.getNumberFormat = function(options) {
      if (options && !options.currency) {
        options.currency = defaultCurrencyCode3;
      }
      if (isBlazor3() && options && !options.format) {
        options.minimumFractionDigits = 0;
      }
      return NumberFormat6.numberFormatter(this.getCulture(), options || {}, cldrData3);
    };
    Internationalization4.prototype.getDateParser = function(options) {
      return DateParser3.dateParser(this.getCulture(), options || {
        skeleton: "short",
        type: "date"
      }, cldrData3);
    };
    Internationalization4.prototype.getNumberParser = function(options) {
      if (isBlazor3() && options && !options.format) {
        options.minimumFractionDigits = 0;
      }
      return NumberParser3.numberParser(this.getCulture(), options || {
        format: "N"
      }, cldrData3);
    };
    Internationalization4.prototype.formatNumber = function(value, option) {
      return this.getNumberFormat(option)(value);
    };
    Internationalization4.prototype.formatDate = function(value, option) {
      return this.getDateFormat(option)(value);
    };
    Internationalization4.prototype.parseDate = function(value, option) {
      return this.getDateParser(option)(value);
    };
    Internationalization4.prototype.parseNumber = function(value, option) {
      return this.getNumberParser(option)(value);
    };
    Internationalization4.prototype.getDatePattern = function(option, isExcelFormat) {
      return IntlBase3.getActualDateTimeFormat(this.getCulture(), option, cldrData3, isExcelFormat);
    };
    Internationalization4.prototype.getNumberPattern = function(option, isExcel) {
      return IntlBase3.getActualNumberFormat(this.getCulture(), option, cldrData3, isExcel);
    };
    Internationalization4.prototype.getFirstDayOfWeek = function() {
      return IntlBase3.getWeekData(this.getCulture(), cldrData3);
    };
    Internationalization4.prototype.getCulture = function() {
      return this.culture || defaultCulture3;
    };
    return Internationalization4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/validate-lic.js
var componentList3 = ["grid", "pivotview", "treegrid", "spreadsheet", "rangeNavigator", "DocumentEditor", "listbox", "inplaceeditor", "PdfViewer", "richtexteditor", "DashboardLayout", "chart", "stockChart", "circulargauge", "diagram", "heatmap", "lineargauge", "maps", "slider", "smithchart", "barcode", "sparkline", "treemap", "bulletChart", "kanban", "daterangepicker", "schedule", "gantt", "signature", "query-builder", "drop-down-tree", "carousel", "filemanager", "uploader", "accordion", "tab", "treeview"];
var bypassKey3 = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 105, 115, 76, 105, 99, 86, 97, 108, 105, 100, 97, 116, 101, 100];
var accountURL3;
var LicenseValidator3 = (
  /** @class */
  function() {
    function LicenseValidator4(key) {
      this.isValidated = false;
      this.isLicensed = true;
      this.version = "28";
      this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i;
      this.errors = {
        noLicense: "<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",
        trailExpired: "<span>This application was built using a trial version of Syncfusion<sup>®</sup> Essential Studio<sup>®</sup>. To remove the license validation message permanently, a valid license key must be included.</span>",
        versionMismatched: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",
        platformMismatched: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>",
        invalidKey: "<span>The included Syncfusion<sup>®</sup> license key is invalid.</span>"
      };
      this.manager = /* @__PURE__ */ function() {
        var licKey = null;
        function set(key2) {
          licKey = key2;
        }
        function get() {
          return licKey;
        }
        return {
          setKey: set,
          getKey: get
        };
      }();
      this.npxManager = /* @__PURE__ */ function() {
        var npxLicKey = "npxKeyReplace";
        function get() {
          return npxLicKey;
        }
        return {
          getKey: get
        };
      }();
      this.manager.setKey(key);
    }
    LicenseValidator4.prototype.validate = function() {
      var contentKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 108, 105, 99, 101, 110, 115, 101, 67, 111, 110, 116, 101, 110, 116];
      var URLKey = [115, 121, 110, 99, 102, 117, 115, 105, 111, 110, 46, 99, 108, 97, 105, 109, 65, 99, 99, 111, 117, 110, 116, 85, 82, 76];
      if (!this.isValidated && containerObject3 && !getValue3(convertToChar3(bypassKey3), containerObject3) && !getValue3("Blazor", containerObject3)) {
        var validateMsg = void 0;
        var validateURL = void 0;
        if (this.manager && this.manager.getKey() || this.npxManager && this.npxManager.getKey() !== "npxKeyReplace") {
          var result = this.getInfoFromKey();
          if (result && result.length) {
            for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
              var res = result_1[_i];
              if (!this.platform.test(res.platform) || res.invalidPlatform) {
                validateMsg = this.errors.platformMismatched;
              } else if (res.version.indexOf(this.version) === -1) {
                validateMsg = this.errors.versionMismatched;
                validateMsg = validateMsg.replace("##LicenseVersion", res.version);
                validateMsg = validateMsg.replace("##Requireversion", this.version + ".x");
              } else if (res.expiryDate) {
                var expDate = new Date(res.expiryDate);
                var currDate = /* @__PURE__ */ new Date();
                if (expDate !== currDate && expDate < currDate) {
                  validateMsg = this.errors.trailExpired;
                } else {
                  break;
                }
              }
            }
          } else {
            validateMsg = this.errors.invalidKey;
          }
        } else {
          var licenseContent = getValue3(convertToChar3(contentKey), containerObject3);
          validateURL = getValue3(convertToChar3(URLKey), containerObject3);
          if (licenseContent && licenseContent !== "") {
            validateMsg = licenseContent;
          } else {
            validateMsg = this.errors.noLicense;
          }
        }
        if (validateMsg && typeof document !== "undefined" && !isNullOrUndefined3(document)) {
          accountURL3 = validateURL && validateURL !== "" ? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=Mjg=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information";
          var errorDiv = createElement3("div", {
            innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
                    position: absolute;
                    left: 16px;
                    width: 24px;
                    height: 24px;"/>` + validateMsg + ' <a style="text-decoration: none;color: #0D6EFD;font-weight: 500;" href=' + accountURL3 + ">Claim your free account</a>"
          });
          errorDiv.setAttribute("style", "position: fixed;\n                top: 10px;\n                left: 10px;\n                right: 10px;\n                font-size: 14px;\n                background: #EEF2FF;\n                color: #222222;\n                z-index: 999999999;\n                text-align: left;\n                border: 1px solid #EEEEEE;\n                padding: 10px 11px 10px 50px;\n                border-radius: 8px;\n                font-family: Helvetica Neue, Helvetica, Arial;");
          document.body.appendChild(errorDiv);
          this.isLicensed = false;
        }
        this.isValidated = true;
        setValue4(convertToChar3(bypassKey3), this.isValidated, containerObject3);
      }
      return this.isLicensed;
    };
    LicenseValidator4.prototype.getDecryptedData = function(key) {
      try {
        return atob(key);
      } catch (error) {
        return "";
      }
    };
    LicenseValidator4.prototype.getInfoFromKey = function() {
      try {
        var licKey = "";
        var pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488, 6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888, 6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
        var decryptedStr = [];
        var resultArray = [];
        var invalidPlatform = false;
        var isNpxKey = false;
        if (this.manager.getKey()) {
          licKey = this.manager.getKey();
        } else {
          isNpxKey = true;
          licKey = this.npxManager.getKey().split("npxKeyReplace")[1];
        }
        var licKeySplit = licKey.split(";");
        for (var _i = 0, licKeySplit_1 = licKeySplit; _i < licKeySplit_1.length; _i++) {
          var lKey = licKeySplit_1[_i];
          var decodeStr = this.getDecryptedData(lKey);
          if (!decodeStr) {
            continue;
          }
          var k = 0;
          var buffr = "";
          if (!isNpxKey) {
            for (var i = 0; i < decodeStr.length; i++, k++) {
              if (k === pkey.length) {
                k = 0;
              }
              var c = decodeStr.charCodeAt(i);
              buffr += String.fromCharCode(c ^ pkey[parseInt(k.toString(), 10)] >> 16);
            }
          } else {
            var charKey = decodeStr[decodeStr.length - 1];
            var decryptedKey = [];
            for (var i = 0; i < decodeStr.length; i++) {
              decryptedKey[parseInt(i.toString(), 10)] = decodeStr[parseInt(i.toString(), 10)].charCodeAt(0) - charKey.charCodeAt(0);
            }
            for (var i = 0; i < decryptedKey.length; i++) {
              buffr += String.fromCharCode(decryptedKey[parseInt(i.toString(), 10)]);
            }
          }
          if (this.platform.test(buffr)) {
            decryptedStr = buffr.split(";");
            invalidPlatform = false;
            if (decryptedStr.length > 3) {
              resultArray.push({
                platform: decryptedStr[0],
                version: decryptedStr[1],
                expiryDate: decryptedStr[2]
              });
            }
          } else if (buffr && buffr.split(";").length > 3) {
            invalidPlatform = true;
          }
        }
        if (invalidPlatform && !resultArray.length) {
          return [{
            invalidPlatform
          }];
        } else {
          return resultArray.length ? resultArray : null;
        }
      } catch (error) {
        return null;
      }
    };
    return LicenseValidator4;
  }()
);
var licenseValidator3 = new LicenseValidator3();
function convertToChar3(cArr) {
  var ret = "";
  for (var _i = 0, cArr_1 = cArr; _i < cArr_1.length; _i++) {
    var arr = cArr_1[_i];
    ret += String.fromCharCode(arr);
  }
  return ret;
}
function registerLicense3(key) {
  licenseValidator3 = new LicenseValidator3(key);
}
var validateLicense3 = function(key) {
  if (key) {
    registerLicense3(key);
  }
  return licenseValidator3.validate();
};
var createLicenseOverlay3 = function() {
  var bannerTemplate = '\n    <div style="\n    position: fixed;\n    width: 100%;\n    height: 100%;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background-color: rgba(0, 0, 0, 0.5);\n    z-index: 99999;\n    ">\n        <div style="\n    background: #FFFFFF;\n    height: 455px;\n    width: 840px;\n    font-family: Helvetica Neue, Helvetica, Arial;\n    color: #000000;\n    box-shadow: 0px 4.8px 14.4px rgb(0 0 0 / 18%), 0px 25.6px 57.6px rgb(0 0 0 / 22%);\n    display: block;\n    margin: 8% auto;\n    border-radius: 20px;\n    ">\n            <div style="\n    position: absolute;\nwidth: 838px;\nheight: 62px;\nbackground-color: #F9F9F9;\nborder: 1px solid #EEEEEE;\nborder-top-left-radius: 20px;\nborder-top-right-radius: 20px;\n">\n                <img src="data:image/svg+xml;base64, " style="\n    text-align: left;\n    width: 146px;\n    position: absolute;\n    top: 14px;\n    left: 31px;\n">\n            </div>\n            <div style="\n    position: relative;\n    top: 80px;\n    left: 32px;\n    font-size: 20px;\n    text-align: left;\n    font-weight: 700;\n    letter-spacing: 0.02em;\n    font-style: normal;\n    line-height: 125%;\n    ">Claim your FREE account and get a key in less than a minute</div>\n            <ul style="\n        font-size: 15px;\n        font-weight: 400;\n        color: #333333;\n        letter-spacing: 0.01em;\n        position: relative;\n        left: 32px;\n        top: 88px;\n        line-height: 180%;\n        ">\n                <li><span>Access to a 30-day free trial of any of our products.</span></li>\n                <li><span>Access to 24x5 support by developers via the <a href="https://support.syncfusion.com/create?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">support tickets</a>, <a href="https://www.syncfusion.com/forums?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">forum</a>, <a href="https://www.syncfusion.com/feedback?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">feature &amp; feedback page</a> and chat.</span></li>\n                <li><span>200+ <a href="https://www.syncfusion.com/succinctly-free-ebooks?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">ebooks </a>on the latest technologies, industry trends, and research topics.</span>\n                </li>\n                <li><span>Largest collection of over 7,000 flat and wireframe icons for free with Syncfusion<sup>®</sup> <a href="https://www.syncfusion.com/downloads/metrostudio?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">Metro Studio.</a></span></li>\n                <li><span>Free and unlimited access to Syncfusion<sup>®</sup> technical <a href="https://www.syncfusion.com/blogs/?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information\n                " style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">blogs</a> and <a href="https://www.syncfusion.com/resources/techportal/whitepapers?utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information" style="text-decoration: none;\n                color: #0D6EFD;\n                font-weight: 500;">whitepapers.</a></span></li>\n            </ul>\n            <div style="\n            font-size: 18px;\n            font-weight: 700;\n            position: relative;\n            line-height: 125%;\n            letter-spacing: 0.02em;\n            top: 90px;\n            left: 32px;\n    ">Syncfusion is trusted by 29,000+ businesses worldwide</div>\n            <img src="data:image/svg+xml;base64, " style="\n            width: 742.5px;\n            position: relative;\n            top: 107px;\n            left: 32px;\n            ">\n            <a href=' + accountURL3 + ' style="\n        float: left;\n        border-radius: 56px;\n        background: #0D6EFD;\n        padding-top: 8px;\n        width: 280px;\n        height: 38px;\n        text-align: center;\n        position: relative;\n        top: 127px;\n        left: 274px;\n        font-size: 16px;\n        color: white;\n        text-decoration: none;\n        letter-spacing: 0.02em;\n    ">Claim your FREE account</a>\n            <div style="\n    font-size: 14px;\n    position: relative;\n    top: 180px;\n    left: 19px;\n    letter-spacing: 0.02em;\n    font-weight: 500;\n    line-height: 125%;\n">have a Syncfusion<sup>®</sup> account? <a href="https://www.syncfusion.com/account/login?ReturnUrl=/account/login" style="text-decoration: none;\ncolor: #0D6EFD;\nfont-weight: 500;">Sign In</a></div>\n        </div>\n    </div>';
  if (typeof document !== "undefined" && !isNullOrUndefined3(document)) {
    var errorBackground = createElement3("div", {
      innerHTML: bannerTemplate
    });
    document.body.appendChild(errorBackground);
  }
};

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/component.js
var __extends32 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate32 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var componentCount3 = 0;
var lastPageID3;
var lastHistoryLen3 = 0;
var instancecount3 = 0;
var isvalid3 = true;
var isBannerAdded3 = false;
var versionBasedStatePersistence3 = false;
var Component4 = (
  /** @class */
  function(_super) {
    __extends32(Component5, _super);
    function Component5(options, selector) {
      var _this = _super.call(this, options, selector) || this;
      _this.randomId = uniqueID3();
      _this.isStringTemplate = false;
      _this.needsID = false;
      _this.isReactHybrid = false;
      _this.isAngular = false;
      _this.isReact = false;
      _this.isVue = false;
      if (isNullOrUndefined3(_this.enableRtl)) {
        _this.setProperties({
          "enableRtl": rightToLeft3
        }, true);
      }
      if (isNullOrUndefined3(_this.locale)) {
        _this.setProperties({
          "locale": defaultCulture3
        }, true);
      }
      _this.moduleLoader = new ModuleLoader3(_this);
      _this.localObserver = new Observer3(_this);
      onIntlChange3.on("notifyExternalChange", _this.detectFunction, _this, _this.randomId);
      if (typeof window !== "undefined" && typeof document !== "undefined" && !validateLicense3()) {
        if (componentList3.indexOf(_this.getModuleName()) !== -1) {
          instancecount3 = instancecount3 + 1;
          if (instancecount3 > 5) {
            isvalid3 = false;
          }
        }
      }
      if (!isUndefined3(selector)) {
        _this.appendTo();
      }
      return _this;
    }
    Component5.prototype.requiredModules = function() {
      return [];
    };
    Component5.prototype.destroy = function() {
      if (this.isDestroyed) {
        return;
      }
      if (this.enablePersistence) {
        this.setPersistData();
        this.detachUnloadEvent();
      }
      this.localObserver.destroy();
      if (this.refreshing) {
        return;
      }
      removeClass3([this.element], ["e-control"]);
      this.trigger("destroyed", {
        cancel: false
      });
      _super.prototype.destroy.call(this);
      this.moduleLoader.clean();
      onIntlChange3.off("notifyExternalChange", this.detectFunction, this.randomId);
    };
    Component5.prototype.refresh = function() {
      this.refreshing = true;
      this.moduleLoader.clean();
      this.destroy();
      this.clearChanges();
      this.localObserver = new Observer3(this);
      this.preRender();
      this.injectModules();
      this.render();
      this.refreshing = false;
    };
    Component5.prototype.accessMount = function() {
      if (this.mount && !this.isReactHybrid) {
        this.mount();
      }
    };
    Component5.prototype.getRootElement = function() {
      if (this.isReactHybrid) {
        return this.actualElement;
      } else {
        return this.element;
      }
    };
    Component5.prototype.getLocalData = function() {
      var eleId = this.getModuleName() + this.element.id;
      if (versionBasedStatePersistence3) {
        return window.localStorage.getItem(eleId + this.ej2StatePersistenceVersion);
      } else {
        return window.localStorage.getItem(eleId);
      }
    };
    Component5.prototype.attachUnloadEvent = function() {
      this.handleUnload = this.handleUnload.bind(this);
      window.addEventListener("pagehide", this.handleUnload);
    };
    Component5.prototype.handleUnload = function() {
      this.setPersistData();
    };
    Component5.prototype.detachUnloadEvent = function() {
      window.removeEventListener("pagehide", this.handleUnload);
    };
    Component5.prototype.appendTo = function(selector) {
      if (!isNullOrUndefined3(selector) && typeof selector === "string") {
        this.element = select3(selector, document);
      } else if (!isNullOrUndefined3(selector)) {
        this.element = selector;
      }
      if (!isNullOrUndefined3(this.element)) {
        var moduleClass = "e-" + this.getModuleName().toLowerCase();
        addClass3([this.element], ["e-control", moduleClass]);
        this.isProtectedOnChange = false;
        if (this.needsID && !this.element.id) {
          this.element.id = this.getUniqueID(this.getModuleName());
        }
        if (this.enablePersistence) {
          this.mergePersistData();
          this.attachUnloadEvent();
        }
        var inst = getValue3("ej2_instances", this.element);
        if (!inst || inst.indexOf(this) === -1) {
          _super.prototype.addInstance.call(this);
        }
        this.preRender();
        this.injectModules();
        var ignoredComponents = {
          schedule: "all",
          diagram: "all",
          PdfViewer: "all",
          grid: ["logger"],
          richtexteditor: ["link", "table", "image", "audio", "video", "formatPainter", "emojiPicker", "pasteCleanup", "htmlEditor", "toolbar", "importExport"],
          treegrid: ["filter"],
          gantt: ["tooltip"],
          chart: ["Export", "Zoom"],
          accumulationchart: ["Export"],
          "query-builder": "all"
        };
        var component = this.getModuleName();
        if (this.requiredModules && (!ignoredComponents["" + component] || ignoredComponents["" + component] !== "all")) {
          var modulesRequired = this.requiredModules();
          for (var _i = 0, _a = this.moduleLoader.getNonInjectedModules(modulesRequired); _i < _a.length; _i++) {
            var module = _a[_i];
            var moduleName = module.name ? module.name : module.member;
            if (ignoredComponents["" + component] && ignoredComponents["" + component].indexOf(module.member) !== -1) {
              continue;
            }
            var componentName = component.charAt(0).toUpperCase() + component.slice(1);
            console.warn('[WARNING] :: Module "' + moduleName + '" is not available in ' + componentName + " component! You either misspelled the module name or forgot to load it.");
          }
        }
        if (!isvalid3 && !isBannerAdded3) {
          createLicenseOverlay3();
          isBannerAdded3 = true;
        }
        this.render();
        if (!this.mount) {
          this.trigger("created");
        } else {
          this.accessMount();
        }
      }
    };
    Component5.prototype.renderComplete = function(wrapperElement) {
      if (isBlazor3()) {
        var sfBlazor = "sfBlazor";
        window["" + sfBlazor].renderComplete(this.element, wrapperElement);
      }
      this.isRendered = true;
    };
    Component5.prototype.dataBind = function() {
      this.injectModules();
      _super.prototype.dataBind.call(this);
    };
    Component5.prototype.on = function(event2, handler, context) {
      if (typeof event2 === "string") {
        this.localObserver.on(event2, handler, context);
      } else {
        for (var _i = 0, event_1 = event2; _i < event_1.length; _i++) {
          var arg = event_1[_i];
          this.localObserver.on(arg.event, arg.handler, arg.context);
        }
      }
    };
    Component5.prototype.off = function(event2, handler) {
      if (typeof event2 === "string") {
        this.localObserver.off(event2, handler);
      } else {
        for (var _i = 0, event_2 = event2; _i < event_2.length; _i++) {
          var arg = event_2[_i];
          this.localObserver.off(arg.event, arg.handler);
        }
      }
    };
    Component5.prototype.notify = function(property, argument) {
      if (this.isDestroyed !== true) {
        this.localObserver.notify(property, argument);
      }
    };
    Component5.prototype.getInjectedModules = function() {
      return this.injectedModules;
    };
    Component5.Inject = function() {
      var moduleList = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        moduleList[_i] = arguments[_i];
      }
      if (!this.prototype.injectedModules) {
        this.prototype.injectedModules = [];
      }
      for (var i = 0; i < moduleList.length; i++) {
        if (this.prototype.injectedModules.indexOf(moduleList[parseInt(i.toString(), 10)]) === -1) {
          this.prototype.injectedModules.push(moduleList[parseInt(i.toString(), 10)]);
        }
      }
    };
    Component5.prototype.createElement = function(tagName, prop, isVDOM) {
      return createElement3(tagName, prop);
    };
    Component5.prototype.triggerStateChange = function(handler, argument) {
      if (this.isReactHybrid) {
        this.setState();
        this.currentContext = {
          calls: handler,
          args: argument
        };
      }
    };
    Component5.prototype.injectModules = function() {
      if (this.injectedModules && this.injectedModules.length) {
        this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
      }
    };
    Component5.prototype.detectFunction = function(args) {
      var prop = Object.keys(args);
      if (prop.length) {
        this[prop[0]] = args[prop[0]];
      }
    };
    Component5.prototype.mergePersistData = function() {
      var data;
      if (versionBasedStatePersistence3) {
        data = window.localStorage.getItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion);
      } else {
        data = window.localStorage.getItem(this.getModuleName() + this.element.id);
      }
      if (!(isNullOrUndefined3(data) || data === "")) {
        this.setProperties(JSON.parse(data), true);
      }
    };
    Component5.prototype.setPersistData = function() {
      if (!this.isDestroyed) {
        if (versionBasedStatePersistence3) {
          window.localStorage.setItem(this.getModuleName() + this.element.id + this.ej2StatePersistenceVersion, this.getPersistData());
        } else {
          window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
        }
      }
    };
    Component5.prototype.renderReactTemplates = function(callback) {
      if (!isNullOrUndefined3(callback)) {
        callback();
      }
    };
    Component5.prototype.clearTemplate = function(templateName, index) {
    };
    Component5.prototype.getUniqueID = function(definedName) {
      if (this.isHistoryChanged()) {
        componentCount3 = 0;
      }
      lastPageID3 = this.pageID(location.href);
      lastHistoryLen3 = history.length;
      return definedName + "_" + lastPageID3 + "_" + componentCount3++;
    };
    Component5.prototype.pageID = function(url) {
      var hash = 0;
      if (url.length === 0) {
        return hash;
      }
      for (var i = 0; i < url.length; i++) {
        var char = url.charCodeAt(i);
        hash = (hash << 5) - hash + char;
        hash = hash & hash;
      }
      return Math.abs(hash);
    };
    Component5.prototype.isHistoryChanged = function() {
      return lastPageID3 !== this.pageID(location.href) || lastHistoryLen3 !== history.length;
    };
    Component5.prototype.addOnPersist = function(options) {
      var _this = this;
      var persistObj = {};
      for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
        var key = options_1[_i];
        var objValue = getValue3(key, this);
        if (!isUndefined3(objValue)) {
          setValue4(key, this.getActualProperties(objValue), persistObj);
        }
      }
      return JSON.stringify(persistObj, function(key2, value) {
        return _this.getActualProperties(value);
      });
    };
    Component5.prototype.getActualProperties = function(obj) {
      if (obj instanceof ChildProperty3) {
        return getValue3("properties", obj);
      } else {
        return obj;
      }
    };
    Component5.prototype.ignoreOnPersist = function(options) {
      return JSON.stringify(this.iterateJsonProperties(this.properties, options));
    };
    Component5.prototype.iterateJsonProperties = function(obj, ignoreList) {
      var newObj = {};
      var _loop_1 = function(key2) {
        if (ignoreList.indexOf(key2) === -1) {
          var value = obj["" + key2];
          if (typeof value === "object" && !(value instanceof Array)) {
            var newList = ignoreList.filter(function(str) {
              var regExp7 = RegExp;
              return new regExp7(key2 + ".").test(str);
            }).map(function(str) {
              return str.replace(key2 + ".", "");
            });
            newObj["" + key2] = this_1.iterateJsonProperties(this_1.getActualProperties(value), newList);
          } else {
            newObj["" + key2] = value;
          }
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
        var key = _a[_i];
        _loop_1(key);
      }
      return newObj;
    };
    __decorate32([Property3(false)], Component5.prototype, "enablePersistence", void 0);
    __decorate32([Property3()], Component5.prototype, "enableRtl", void 0);
    __decorate32([Property3()], Component5.prototype, "locale", void 0);
    Component5 = __decorate32([NotifyPropertyChanges3], Component5);
    return Component5;
  }(Base3)
);
(function() {
  if (typeof window !== "undefined") {
    window.addEventListener(
      "popstate",
      /* istanbul ignore next */
      function() {
        componentCount3 = 0;
      }
    );
  }
})();

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/draggable.js
var __extends33 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate33 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var defaultPosition3 = {
  left: 0,
  top: 0,
  bottom: 0,
  right: 0
};
var isDraggedObject3 = {
  isDragged: false
};
var Position3 = (
  /** @class */
  function(_super) {
    __extends33(Position4, _super);
    function Position4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate33([Property3(0)], Position4.prototype, "left", void 0);
    __decorate33([Property3(0)], Position4.prototype, "top", void 0);
    return Position4;
  }(ChildProperty3)
);
var Draggable3 = (
  /** @class */
  function(_super) {
    __extends33(Draggable4, _super);
    function Draggable4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.dragLimit = Draggable_1.getDefaultPosition();
      _this.borderWidth = Draggable_1.getDefaultPosition();
      _this.padding = Draggable_1.getDefaultPosition();
      _this.diffX = 0;
      _this.prevLeft = 0;
      _this.prevTop = 0;
      _this.dragProcessStarted = false;
      _this.eleTop = 0;
      _this.tapHoldTimer = 0;
      _this.externalInitialize = false;
      _this.diffY = 0;
      _this.parentScrollX = 0;
      _this.parentScrollY = 0;
      _this.droppables = {};
      _this.bind();
      return _this;
    }
    Draggable_1 = Draggable4;
    Draggable4.prototype.bind = function() {
      this.toggleEvents();
      if (Browser3.isIE) {
        addClass3([this.element], "e-block-touch");
      }
      this.droppables[this.scope] = {};
    };
    Draggable4.getDefaultPosition = function() {
      return extend3({}, defaultPosition3);
    };
    Draggable4.prototype.toggleEvents = function(isUnWire) {
      var ele;
      if (!isUndefined3(this.handle)) {
        ele = select3(this.handle, this.element);
      }
      var handler = this.enableTapHold && Browser3.isDevice && Browser3.isTouch ? this.mobileInitialize : this.initialize;
      if (isUnWire) {
        EventHandler3.remove(ele || this.element, Browser3.isSafari() ? "touchstart" : Browser3.touchStartEvent, handler);
      } else {
        EventHandler3.add(ele || this.element, Browser3.isSafari() ? "touchstart" : Browser3.touchStartEvent, handler, this);
      }
    };
    Draggable4.prototype.mobileInitialize = function(evt) {
      var _this = this;
      var target = evt.currentTarget;
      this.tapHoldTimer = setTimeout(function() {
        _this.externalInitialize = true;
        _this.removeTapholdTimer();
        _this.initialize(evt, target);
      }, this.tapHoldThreshold);
      EventHandler3.add(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.removeTapholdTimer, this);
      EventHandler3.add(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.removeTapholdTimer, this);
    };
    Draggable4.prototype.removeTapholdTimer = function() {
      clearTimeout(this.tapHoldTimer);
      EventHandler3.remove(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.removeTapholdTimer);
      EventHandler3.remove(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.removeTapholdTimer);
    };
    Draggable4.prototype.getScrollableParent = function(element2, axis) {
      var scroll = {
        "vertical": "scrollHeight",
        "horizontal": "scrollWidth"
      };
      var client = {
        "vertical": "clientHeight",
        "horizontal": "clientWidth"
      };
      if (isNullOrUndefined3(element2)) {
        return null;
      }
      if (element2[scroll["" + axis]] > element2[client["" + axis]]) {
        if (axis === "vertical" ? element2.scrollTop > 0 : element2.scrollLeft > 0) {
          if (axis === "vertical") {
            this.parentScrollY = this.parentScrollY + (this.parentScrollY === 0 ? element2.scrollTop : element2.scrollTop - this.parentScrollY);
            this.tempScrollHeight = element2.scrollHeight;
          } else {
            this.parentScrollX = this.parentScrollX + (this.parentScrollX === 0 ? element2.scrollLeft : element2.scrollLeft - this.parentScrollX);
            this.tempScrollWidth = element2.scrollWidth;
          }
          if (!isNullOrUndefined3(element2)) {
            return this.getScrollableParent(element2.parentNode, axis);
          } else {
            return element2;
          }
        } else {
          return this.getScrollableParent(element2.parentNode, axis);
        }
      } else {
        return this.getScrollableParent(element2.parentNode, axis);
      }
    };
    Draggable4.prototype.getScrollableValues = function() {
      this.parentScrollX = 0;
      this.parentScrollY = 0;
      var isModalDialog = this.element.classList.contains("e-dialog") && this.element.classList.contains("e-dlg-modal");
      var verticalScrollParent = this.getScrollableParent(this.element.parentNode, "vertical");
      var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, "horizontal");
    };
    Draggable4.prototype.initialize = function(evt, curTarget) {
      this.currentStateTarget = evt.target;
      if (this.isDragStarted()) {
        return;
      } else {
        this.isDragStarted(true);
        this.externalInitialize = false;
      }
      this.target = evt.currentTarget || curTarget;
      this.dragProcessStarted = false;
      if (this.abort) {
        var abortSelectors = this.abort;
        if (typeof abortSelectors === "string") {
          abortSelectors = [abortSelectors];
        }
        for (var i = 0; i < abortSelectors.length; i++) {
          if (!isNullOrUndefined3(closest3(evt.target, abortSelectors[parseInt(i.toString(), 10)]))) {
            if (this.isDragStarted()) {
              this.isDragStarted(true);
            }
            return;
          }
        }
      }
      if (this.preventDefault && !isUndefined3(evt.changedTouches) && evt.type !== "touchstart") {
        evt.preventDefault();
      }
      this.element.setAttribute("aria-grabbed", "true");
      var intCoord = this.getCoordinates(evt);
      this.initialPosition = {
        x: intCoord.pageX,
        y: intCoord.pageY
      };
      if (!this.clone) {
        var pos = this.element.getBoundingClientRect();
        this.getScrollableValues();
        if (evt.clientX === evt.pageX) {
          this.parentScrollX = 0;
        }
        if (evt.clientY === evt.pageY) {
          this.parentScrollY = 0;
        }
        this.relativeXPosition = intCoord.pageX - (pos.left + this.parentScrollX);
        this.relativeYPosition = intCoord.pageY - (pos.top + this.parentScrollY);
      }
      if (this.externalInitialize) {
        this.intDragStart(evt);
      } else {
        EventHandler3.add(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.intDragStart, this);
        EventHandler3.add(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDestroy, this);
      }
      this.toggleEvents(true);
      if (evt.type !== "touchstart" && this.isPreventSelect) {
        document.body.classList.add("e-prevent-select");
      }
      this.externalInitialize = false;
      EventHandler3.trigger(document.documentElement, Browser3.isSafari() ? "touchstart" : Browser3.touchStartEvent, evt);
    };
    Draggable4.prototype.intDragStart = function(evt) {
      this.removeTapholdTimer();
      var isChangeTouch = !isUndefined3(evt.changedTouches);
      if (isChangeTouch && evt.changedTouches.length !== 1) {
        return;
      }
      var intCordinate = this.getCoordinates(evt);
      var pos;
      var styleProp = getComputedStyle(this.element);
      this.margin = {
        left: parseInt(styleProp.marginLeft, 10),
        top: parseInt(styleProp.marginTop, 10),
        right: parseInt(styleProp.marginRight, 10),
        bottom: parseInt(styleProp.marginBottom, 10)
      };
      var element2 = this.element;
      if (this.clone && this.dragTarget) {
        var intClosest = closest3(evt.target, this.dragTarget);
        if (!isNullOrUndefined3(intClosest)) {
          element2 = intClosest;
        }
      }
      if (this.isReplaceDragEle) {
        element2 = this.currentStateCheck(evt.target, element2);
      }
      this.offset = this.calculateParentPosition(element2);
      this.position = this.getMousePosition(evt, this.isDragScroll);
      var x = this.initialPosition.x - intCordinate.pageX;
      var y = this.initialPosition.y - intCordinate.pageY;
      var distance = Math.sqrt(x * x + y * y);
      if (distance >= this.distance || this.externalInitialize) {
        var ele = this.getHelperElement(evt);
        if (!ele || isNullOrUndefined3(ele)) {
          return;
        }
        if (isChangeTouch) {
          evt.preventDefault();
        }
        var dragTargetElement = this.helperElement = ele;
        this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);
        if (this.dragStart) {
          var curTarget = this.getProperTargetElement(evt);
          var args = {
            event: evt,
            element: element2,
            target: curTarget,
            bindEvents: isBlazor3() ? this.bindDragEvents.bind(this) : null,
            dragElement: dragTargetElement
          };
          this.trigger("dragStart", args);
        }
        if (this.dragArea) {
          this.setDragArea();
        } else {
          this.dragLimit = {
            left: 0,
            right: 0,
            bottom: 0,
            top: 0
          };
          this.borderWidth = {
            top: 0,
            left: 0
          };
        }
        pos = {
          left: this.position.left - this.parentClientRect.left,
          top: this.position.top - this.parentClientRect.top
        };
        if (this.clone && !this.enableTailMode) {
          this.diffX = this.position.left - this.offset.left;
          this.diffY = this.position.top - this.offset.top;
        }
        this.getScrollableValues();
        var styles = getComputedStyle(element2);
        var marginTop = parseFloat(styles.marginTop);
        if (this.clone && marginTop !== 0) {
          pos.top += marginTop;
        }
        this.eleTop = !isNaN(parseFloat(styles.top)) ? parseFloat(styles.top) - this.offset.top : 0;
        if (this.enableScrollHandler && !this.clone) {
          pos.top -= this.parentScrollY;
          pos.left -= this.parentScrollX;
        }
        var posValue = this.getProcessedPositionValue({
          top: pos.top - this.diffY + "px",
          left: pos.left - this.diffX + "px"
        });
        if (this.dragArea && typeof this.dragArea !== "string" && this.dragArea.classList.contains("e-kanban-content") && this.dragArea.style.position === "relative") {
          pos.top += this.dragArea.scrollTop;
        }
        this.dragElePosition = {
          top: pos.top,
          left: pos.left
        };
        setStyleAttribute3(dragTargetElement, this.getDragPosition({
          position: "absolute",
          left: posValue.left,
          top: posValue.top
        }));
        EventHandler3.remove(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.intDragStart);
        EventHandler3.remove(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDestroy);
        if (!isBlazor3()) {
          this.bindDragEvents(dragTargetElement);
        }
      }
    };
    Draggable4.prototype.bindDragEvents = function(dragTargetElement) {
      if (isVisible3(dragTargetElement)) {
        EventHandler3.add(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.intDrag, this);
        EventHandler3.add(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDragStop, this);
        this.setGlobalDroppables(false, this.element, dragTargetElement);
      } else {
        this.toggleEvents();
        document.body.classList.remove("e-prevent-select");
      }
    };
    Draggable4.prototype.elementInViewport = function(el) {
      this.top = el.offsetTop;
      this.left = el.offsetLeft;
      this.width = el.offsetWidth;
      this.height = el.offsetHeight;
      while (el.offsetParent) {
        el = el.offsetParent;
        this.top += el.offsetTop;
        this.left += el.offsetLeft;
      }
      return this.top >= window.pageYOffset && this.left >= window.pageXOffset && this.top + this.height <= window.pageYOffset + window.innerHeight && this.left + this.width <= window.pageXOffset + window.innerWidth;
    };
    Draggable4.prototype.getProcessedPositionValue = function(value) {
      if (this.queryPositionInfo) {
        return this.queryPositionInfo(value);
      }
      return value;
    };
    Draggable4.prototype.calculateParentPosition = function(ele) {
      if (isNullOrUndefined3(ele)) {
        return {
          left: 0,
          top: 0
        };
      }
      var rect = ele.getBoundingClientRect();
      var style = getComputedStyle(ele);
      return {
        left: rect.left + window.pageXOffset - parseInt(style.marginLeft, 10),
        top: rect.top + window.pageYOffset - parseInt(style.marginTop, 10)
      };
    };
    Draggable4.prototype.intDrag = function(evt) {
      if (!isUndefined3(evt.changedTouches) && evt.changedTouches.length !== 1) {
        return;
      }
      if (this.clone && evt.changedTouches && Browser3.isDevice && Browser3.isTouch) {
        evt.preventDefault();
      }
      var left;
      var top;
      this.position = this.getMousePosition(evt, this.isDragScroll);
      var docHeight = this.getDocumentWidthHeight("Height");
      if (docHeight < this.position.top) {
        this.position.top = docHeight;
      }
      var docWidth = this.getDocumentWidthHeight("Width");
      if (docWidth < this.position.left) {
        this.position.left = docWidth;
      }
      if (this.drag) {
        var curTarget = this.getProperTargetElement(evt);
        this.trigger("drag", {
          event: evt,
          element: this.element,
          target: curTarget
        });
      }
      var eleObj = this.checkTargetElement(evt);
      if (eleObj.target && eleObj.instance) {
        var flag = true;
        if (this.hoverObject) {
          if (this.hoverObject.instance !== eleObj.instance) {
            this.triggerOutFunction(evt, eleObj);
          } else {
            flag = false;
          }
        }
        if (flag) {
          eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
          eleObj.instance.intOver(evt, eleObj.target);
          this.hoverObject = eleObj;
        }
      } else if (this.hoverObject) {
        this.triggerOutFunction(evt, eleObj);
      }
      var helperElement = this.droppables[this.scope].helper;
      this.parentClientRect = this.calculateParentPosition(this.helperElement.offsetParent);
      var tLeft = this.parentClientRect.left;
      var tTop = this.parentClientRect.top;
      var intCoord = this.getCoordinates(evt);
      var pagex = intCoord.pageX;
      var pagey = intCoord.pageY;
      var dLeft = this.position.left - this.diffX;
      var dTop = this.position.top - this.diffY;
      var styles = getComputedStyle(helperElement);
      if (this.dragArea) {
        if (this.enableAutoScroll) {
          this.setDragArea();
        }
        if (this.pageX !== pagex || this.skipDistanceCheck) {
          var helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft) + parseFloat(styles.marginRight));
          if (this.dragLimit.left > dLeft && dLeft > 0) {
            left = this.dragLimit.left;
          } else if (this.dragLimit.right + window.pageXOffset < dLeft + helperWidth && dLeft > 0) {
            left = dLeft - (dLeft - this.dragLimit.right) + window.pageXOffset - helperWidth;
          } else {
            left = dLeft < 0 ? this.dragLimit.left : dLeft;
          }
        }
        if (this.pageY !== pagey || this.skipDistanceCheck) {
          var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
          if (this.dragLimit.top > dTop && dTop > 0) {
            top = this.dragLimit.top;
          } else if (this.dragLimit.bottom + window.pageYOffset < dTop + helperHeight && dTop > 0) {
            top = dTop - (dTop - this.dragLimit.bottom) + window.pageYOffset - helperHeight;
          } else {
            top = dTop < 0 ? this.dragLimit.top : dTop;
          }
        }
      } else {
        left = dLeft;
        top = dTop;
      }
      var iTop = tTop + this.borderWidth.top;
      var iLeft = tLeft + this.borderWidth.left;
      if (this.dragProcessStarted) {
        if (isNullOrUndefined3(top)) {
          top = this.prevTop;
        }
        if (isNullOrUndefined3(left)) {
          left = this.prevLeft;
        }
      }
      var draEleTop;
      var draEleLeft;
      if (this.helperElement.classList.contains("e-treeview")) {
        if (this.dragArea) {
          this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
          draEleTop = top - iTop < 0 ? this.dragLimit.top : top - this.borderWidth.top;
          draEleLeft = left - iLeft < 0 ? this.dragLimit.left : left - this.borderWidth.left;
        } else {
          draEleTop = top - this.borderWidth.top;
          draEleLeft = left - this.borderWidth.left;
        }
      } else {
        if (this.dragArea) {
          var isDialogEle = this.helperElement.classList.contains("e-dialog");
          this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
          draEleTop = top - iTop < 0 ? this.dragLimit.top : top - iTop;
          draEleLeft = left - iLeft < 0 ? isDialogEle ? left - (iLeft - this.borderWidth.left) : this.dragElePosition.left : left - iLeft;
        } else {
          draEleTop = top - iTop;
          draEleLeft = left - iLeft;
        }
      }
      var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
      if (marginTop > 0) {
        if (this.clone) {
          draEleTop += marginTop;
          if (dTop < 0) {
            if (marginTop + dTop >= 0) {
              draEleTop = marginTop + dTop;
            } else {
              draEleTop -= marginTop;
            }
          }
          if (this.dragArea) {
            draEleTop = this.dragLimit.bottom < draEleTop ? this.dragLimit.bottom : draEleTop;
          }
        }
        if (top - iTop < 0) {
          if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
            var tempDraEleTop = this.dragLimit.top + dTop - iTop;
            if (tempDraEleTop + marginTop + iTop < 0) {
              draEleTop -= marginTop + iTop;
            } else {
              draEleTop = tempDraEleTop;
            }
          } else {
            draEleTop -= marginTop + iTop;
          }
        }
      }
      if (this.dragArea && this.helperElement.classList.contains("e-treeview")) {
        var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
        draEleTop = draEleTop + helperHeight > this.dragLimit.bottom ? this.dragLimit.bottom - helperHeight : draEleTop;
      }
      if (this.enableScrollHandler && !this.clone) {
        draEleTop -= this.parentScrollY;
        draEleLeft -= this.parentScrollX;
      }
      if (this.dragArea && typeof this.dragArea !== "string" && this.dragArea.classList.contains("e-kanban-content") && this.dragArea.style.position === "relative") {
        draEleTop += this.dragArea.scrollTop;
      }
      var dragValue = this.getProcessedPositionValue({
        top: draEleTop + "px",
        left: draEleLeft + "px"
      });
      if (this.isPreventScroll) {
        dragValue = this.getProcessedPositionValue({
          top: this.position.top - this.parentClientRect.top - 2 + "px",
          left: this.position.left - this.parentClientRect.left - 2 + "px"
        });
      }
      setStyleAttribute3(helperElement, this.getDragPosition(dragValue));
      if (!this.elementInViewport(helperElement) && this.enableAutoScroll && !this.helperElement.classList.contains("e-treeview")) {
        this.helperElement.scrollIntoView();
      }
      var elements = document.querySelectorAll(":hover");
      if (this.enableAutoScroll && this.helperElement.classList.contains("e-treeview")) {
        if (elements.length === 0) {
          elements = this.getPathElements(evt);
        }
        var scrollParent = this.getScrollParent(elements, false);
        if (this.elementInViewport(this.helperElement)) {
          this.getScrollPosition(scrollParent, draEleTop);
        } else if (!this.elementInViewport(this.helperElement)) {
          elements = [].slice.call(document.querySelectorAll(":hover"));
          if (elements.length === 0) {
            elements = this.getPathElements(evt);
          }
          scrollParent = this.getScrollParent(elements, true);
          this.getScrollPosition(scrollParent, draEleTop);
        }
      }
      this.dragProcessStarted = true;
      this.prevLeft = left;
      this.prevTop = top;
      this.position.left = left;
      this.position.top = top;
      this.pageX = pagex;
      this.pageY = pagey;
    };
    Draggable4.prototype.getScrollParent = function(node, reverse) {
      var nodeEl = reverse ? node.reverse() : node;
      var hasScroll;
      for (var i = nodeEl.length - 1; i >= 0; i--) {
        hasScroll = window.getComputedStyle(nodeEl[parseInt(i.toString(), 10)])["overflow-y"];
        if ((hasScroll === "auto" || hasScroll === "scroll") && nodeEl[parseInt(i.toString(), 10)].scrollHeight > nodeEl[parseInt(i.toString(), 10)].clientHeight) {
          return nodeEl[parseInt(i.toString(), 10)];
        }
      }
      hasScroll = window.getComputedStyle(document.scrollingElement)["overflow-y"];
      if (hasScroll === "visible") {
        document.scrollingElement.style.overflow = "auto";
        return document.scrollingElement;
      }
    };
    Draggable4.prototype.getScrollPosition = function(nodeEle, draEleTop) {
      if (nodeEle && nodeEle === document.scrollingElement) {
        if (nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight < draEleTop && nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
          nodeEle.scrollTop += this.helperElement.clientHeight;
        } else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
          nodeEle.scrollTop -= this.helperElement.clientHeight;
        }
      } else if (nodeEle && nodeEle !== document.scrollingElement) {
        var docScrollTop = document.scrollingElement.scrollTop;
        var helperClientHeight = this.helperElement.clientHeight;
        if (nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - helperClientHeight + docScrollTop < draEleTop) {
          nodeEle.scrollTop += this.helperElement.clientHeight;
        } else if (nodeEle.getBoundingClientRect().top > draEleTop - helperClientHeight - docScrollTop) {
          nodeEle.scrollTop -= this.helperElement.clientHeight;
        }
      }
    };
    Draggable4.prototype.getPathElements = function(evt) {
      var elementTop = evt.clientX > 0 ? evt.clientX : 0;
      var elementLeft = evt.clientY > 0 ? evt.clientY : 0;
      return document.elementsFromPoint(elementTop, elementLeft);
    };
    Draggable4.prototype.triggerOutFunction = function(evt, eleObj) {
      this.hoverObject.instance.intOut(evt, eleObj.target);
      this.hoverObject.instance.dragData[this.scope] = null;
      this.hoverObject = null;
    };
    Draggable4.prototype.getDragPosition = function(dragValue) {
      var temp = extend3({}, dragValue);
      if (this.axis) {
        if (this.axis === "x") {
          delete temp.top;
        } else if (this.axis === "y") {
          delete temp.left;
        }
      }
      return temp;
    };
    Draggable4.prototype.getDocumentWidthHeight = function(str) {
      var docBody = document.body;
      var docEle = document.documentElement;
      var returnValue = Math.max(docBody["scroll" + str], docEle["scroll" + str], docBody["offset" + str], docEle["offset" + str], docEle["client" + str]);
      return returnValue;
    };
    Draggable4.prototype.intDragStop = function(evt) {
      this.dragProcessStarted = false;
      if (!isUndefined3(evt.changedTouches) && evt.changedTouches.length !== 1) {
        return;
      }
      var type = ["touchend", "pointerup", "mouseup"];
      if (type.indexOf(evt.type) !== -1) {
        if (this.dragStop) {
          var curTarget = this.getProperTargetElement(evt);
          this.trigger("dragStop", {
            event: evt,
            element: this.element,
            target: curTarget,
            helper: this.helperElement
          });
        }
        this.intDestroy(evt);
      } else {
        this.element.setAttribute("aria-grabbed", "false");
      }
      var eleObj = this.checkTargetElement(evt);
      if (eleObj.target && eleObj.instance) {
        eleObj.instance.dragStopCalled = true;
        eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
        eleObj.instance.intDrop(evt, eleObj.target);
      }
      this.setGlobalDroppables(true);
      document.body.classList.remove("e-prevent-select");
    };
    Draggable4.prototype.intDestroy = function(evt) {
      this.dragProcessStarted = false;
      this.toggleEvents();
      document.body.classList.remove("e-prevent-select");
      this.element.setAttribute("aria-grabbed", "false");
      EventHandler3.remove(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.intDragStart);
      EventHandler3.remove(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDragStop);
      EventHandler3.remove(document, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDestroy);
      EventHandler3.remove(document, Browser3.isSafari() ? "touchmove" : Browser3.touchMoveEvent, this.intDrag);
      if (this.isDragStarted()) {
        this.isDragStarted(true);
      }
    };
    Draggable4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Draggable4.prototype.getModuleName = function() {
      return "draggable";
    };
    Draggable4.prototype.isDragStarted = function(change) {
      if (change) {
        isDraggedObject3.isDragged = !isDraggedObject3.isDragged;
      }
      return isDraggedObject3.isDragged;
    };
    Draggable4.prototype.setDragArea = function() {
      var eleWidthBound;
      var eleHeightBound;
      var top = 0;
      var left = 0;
      var ele;
      var type = typeof this.dragArea;
      if (type === "string") {
        ele = select3(this.dragArea);
      } else {
        ele = this.dragArea;
      }
      if (ele) {
        var elementArea = ele.getBoundingClientRect();
        eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
        eleHeightBound = ele.scrollHeight ? this.dragArea && !isNullOrUndefined3(this.helperElement) && this.helperElement.classList.contains("e-treeview") ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
        var keys4 = ["Top", "Left", "Bottom", "Right"];
        var styles = getComputedStyle(ele);
        for (var i = 0; i < keys4.length; i++) {
          var key = keys4[parseInt(i.toString(), 10)];
          var tborder = styles["border" + key + "Width"];
          var tpadding = styles["padding" + key];
          var lowerKey = key.toLowerCase();
          this.borderWidth["" + lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
          this.padding["" + lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
        }
        if (this.dragArea && !isNullOrUndefined3(this.helperElement) && this.helperElement.classList.contains("e-treeview")) {
          top = elementArea.top + document.scrollingElement.scrollTop;
        } else {
          top = elementArea.top;
        }
        left = elementArea.left;
        this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
        this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;
        this.dragLimit.right = left + eleWidthBound - (this.borderWidth.right + this.padding.right);
        this.dragLimit.bottom = top + eleHeightBound - (this.borderWidth.bottom + this.padding.bottom);
      }
    };
    Draggable4.prototype.getProperTargetElement = function(evt) {
      var intCoord = this.getCoordinates(evt);
      var ele;
      var prevStyle = this.helperElement.style.pointerEvents || "";
      var isPointer = evt.type.indexOf("pointer") !== -1 && Browser3.info.name === "safari" && parseInt(Browser3.info.version, 10) > 12;
      if (compareElementParent3(evt.target, this.helperElement) || evt.type.indexOf("touch") !== -1 || isPointer) {
        this.helperElement.style.pointerEvents = "none";
        ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
        this.helperElement.style.pointerEvents = prevStyle;
      } else {
        ele = evt.target;
      }
      return ele;
    };
    Draggable4.prototype.currentStateCheck = function(ele, oldEle) {
      var elem;
      if (!isNullOrUndefined3(this.currentStateTarget) && this.currentStateTarget !== ele) {
        elem = this.currentStateTarget;
      } else {
        elem = !isNullOrUndefined3(oldEle) ? oldEle : ele;
      }
      return elem;
    };
    Draggable4.prototype.getMousePosition = function(evt, isdragscroll) {
      var dragEle = evt.srcElement !== void 0 ? evt.srcElement : evt.target;
      var intCoord = this.getCoordinates(evt);
      var pageX;
      var pageY;
      var isOffsetParent = isNullOrUndefined3(dragEle.offsetParent);
      if (isdragscroll) {
        pageX = this.clone ? intCoord.pageX : intCoord.pageX + (isOffsetParent ? 0 : dragEle.offsetParent.scrollLeft) - this.relativeXPosition;
        pageY = this.clone ? intCoord.pageY : intCoord.pageY + (isOffsetParent ? 0 : dragEle.offsetParent.scrollTop) - this.relativeYPosition;
      } else {
        pageX = this.clone ? intCoord.pageX : intCoord.pageX + window.pageXOffset - this.relativeXPosition;
        pageY = this.clone ? intCoord.pageY : intCoord.pageY + window.pageYOffset - this.relativeYPosition;
      }
      if (document.scrollingElement && !isdragscroll && !this.clone) {
        var ele = document.scrollingElement;
        var isVerticalScroll = ele.scrollHeight > 0 && ele.scrollHeight > ele.clientHeight && ele.scrollTop > 0;
        var isHorrizontalScroll = ele.scrollWidth > 0 && ele.scrollWidth > ele.clientWidth && ele.scrollLeft > 0;
        pageX = isHorrizontalScroll ? pageX - ele.scrollLeft : pageX;
        pageY = isVerticalScroll ? pageY - ele.scrollTop : pageY;
      }
      return {
        left: pageX - (this.margin.left + this.cursorAt.left),
        top: pageY - (this.margin.top + this.cursorAt.top)
      };
    };
    Draggable4.prototype.getCoordinates = function(evt) {
      if (evt.type.indexOf("touch") > -1) {
        return evt.changedTouches[0];
      }
      return evt;
    };
    Draggable4.prototype.getHelperElement = function(evt) {
      var element2;
      if (this.clone) {
        if (this.helper) {
          element2 = this.helper({
            sender: evt,
            element: this.target
          });
        } else {
          element2 = createElement3("div", {
            className: "e-drag-helper e-block-touch",
            innerHTML: "Draggable"
          });
          document.body.appendChild(element2);
        }
      } else {
        element2 = this.element;
      }
      return element2;
    };
    Draggable4.prototype.setGlobalDroppables = function(reset, drag2, helper) {
      this.droppables[this.scope] = reset ? null : {
        draggable: drag2,
        helper,
        draggedElement: this.element
      };
    };
    Draggable4.prototype.checkTargetElement = function(evt) {
      var target = this.getProperTargetElement(evt);
      var dropIns = this.getDropInstance(target);
      if (!dropIns && target && !isNullOrUndefined3(target.parentNode)) {
        var parent_1 = closest3(target.parentNode, ".e-droppable") || target.parentElement;
        if (parent_1) {
          dropIns = this.getDropInstance(parent_1);
        }
      }
      return {
        target,
        instance: dropIns
      };
    };
    Draggable4.prototype.getDropInstance = function(ele) {
      var name = "getModuleName";
      var drop;
      var eleInst = ele && ele.ej2_instances;
      if (eleInst) {
        for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {
          var inst = eleInst_1[_i];
          if (inst["" + name]() === "droppable") {
            drop = inst;
            break;
          }
        }
      }
      return drop;
    };
    Draggable4.prototype.destroy = function() {
      this.toggleEvents(true);
      _super.prototype.destroy.call(this);
    };
    var Draggable_1;
    __decorate33([Complex3({}, Position3)], Draggable4.prototype, "cursorAt", void 0);
    __decorate33([Property3(true)], Draggable4.prototype, "clone", void 0);
    __decorate33([Property3()], Draggable4.prototype, "dragArea", void 0);
    __decorate33([Property3()], Draggable4.prototype, "isDragScroll", void 0);
    __decorate33([Property3()], Draggable4.prototype, "isReplaceDragEle", void 0);
    __decorate33([Property3(true)], Draggable4.prototype, "isPreventSelect", void 0);
    __decorate33([Property3(false)], Draggable4.prototype, "isPreventScroll", void 0);
    __decorate33([Event4()], Draggable4.prototype, "drag", void 0);
    __decorate33([Event4()], Draggable4.prototype, "dragStart", void 0);
    __decorate33([Event4()], Draggable4.prototype, "dragStop", void 0);
    __decorate33([Property3(1)], Draggable4.prototype, "distance", void 0);
    __decorate33([Property3()], Draggable4.prototype, "handle", void 0);
    __decorate33([Property3()], Draggable4.prototype, "abort", void 0);
    __decorate33([Property3()], Draggable4.prototype, "helper", void 0);
    __decorate33([Property3("default")], Draggable4.prototype, "scope", void 0);
    __decorate33([Property3("")], Draggable4.prototype, "dragTarget", void 0);
    __decorate33([Property3()], Draggable4.prototype, "axis", void 0);
    __decorate33([Property3()], Draggable4.prototype, "queryPositionInfo", void 0);
    __decorate33([Property3(false)], Draggable4.prototype, "enableTailMode", void 0);
    __decorate33([Property3(false)], Draggable4.prototype, "skipDistanceCheck", void 0);
    __decorate33([Property3(true)], Draggable4.prototype, "preventDefault", void 0);
    __decorate33([Property3(false)], Draggable4.prototype, "enableAutoScroll", void 0);
    __decorate33([Property3(false)], Draggable4.prototype, "enableTapHold", void 0);
    __decorate33([Property3(750)], Draggable4.prototype, "tapHoldThreshold", void 0);
    __decorate33([Property3(false)], Draggable4.prototype, "enableScrollHandler", void 0);
    Draggable4 = Draggable_1 = __decorate33([NotifyPropertyChanges3], Draggable4);
    return Draggable4;
  }(Base3)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/droppable.js
var __extends34 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate34 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Droppable3 = (
  /** @class */
  function(_super) {
    __extends34(Droppable4, _super);
    function Droppable4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.mouseOver = false;
      _this.dragData = {};
      _this.dragStopCalled = false;
      _this.bind();
      return _this;
    }
    Droppable4.prototype.bind = function() {
      this.wireEvents();
    };
    Droppable4.prototype.wireEvents = function() {
      EventHandler3.add(this.element, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDrop, this);
    };
    Droppable4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Droppable4.prototype.getModuleName = function() {
      return "droppable";
    };
    Droppable4.prototype.intOver = function(event2, element2) {
      if (!this.mouseOver) {
        var drag2 = this.dragData[this.scope];
        this.trigger("over", {
          event: event2,
          target: element2,
          dragData: drag2
        });
        this.mouseOver = true;
      }
    };
    Droppable4.prototype.intOut = function(event2, element2) {
      if (this.mouseOver) {
        this.trigger("out", {
          evt: event2,
          target: element2
        });
        this.mouseOver = false;
      }
    };
    Droppable4.prototype.intDrop = function(evt, element2) {
      if (!this.dragStopCalled) {
        return;
      } else {
        this.dragStopCalled = false;
      }
      var accept = true;
      var drag2 = this.dragData[this.scope];
      var isDrag = drag2 ? drag2.helper && isVisible3(drag2.helper) : false;
      var area;
      if (isDrag) {
        area = this.isDropArea(evt, drag2.helper, element2);
        if (this.accept) {
          accept = matches4(drag2.helper, this.accept);
        }
      }
      if (isDrag && this.drop && area.canDrop && accept) {
        this.trigger("drop", {
          event: evt,
          target: area.target,
          droppedElement: drag2.helper,
          dragData: drag2
        });
      }
      this.mouseOver = false;
    };
    Droppable4.prototype.isDropArea = function(evt, helper, element2) {
      var area = {
        canDrop: true,
        target: element2 || evt.target
      };
      var isTouch = evt.type === "touchend";
      if (isTouch || area.target === helper) {
        helper.style.display = "none";
        var coord = isTouch ? evt.changedTouches[0] : evt;
        var ele = document.elementFromPoint(coord.clientX, coord.clientY);
        area.canDrop = false;
        area.canDrop = compareElementParent3(ele, this.element);
        if (area.canDrop) {
          area.target = ele;
        }
        helper.style.display = "";
      }
      return area;
    };
    Droppable4.prototype.destroy = function() {
      EventHandler3.remove(this.element, Browser3.isSafari() ? "touchend" : Browser3.touchEndEvent, this.intDrop);
      _super.prototype.destroy.call(this);
    };
    __decorate34([Property3()], Droppable4.prototype, "accept", void 0);
    __decorate34([Property3("default")], Droppable4.prototype, "scope", void 0);
    __decorate34([Event4()], Droppable4.prototype, "drop", void 0);
    __decorate34([Event4()], Droppable4.prototype, "over", void 0);
    __decorate34([Event4()], Droppable4.prototype, "out", void 0);
    Droppable4 = __decorate34([NotifyPropertyChanges3], Droppable4);
    return Droppable4;
  }(Base3)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/keyboard.js
var __extends35 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate35 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var keyCode3 = {
  "backspace": 8,
  "tab": 9,
  "enter": 13,
  "shift": 16,
  "control": 17,
  "alt": 18,
  "pause": 19,
  "capslock": 20,
  "space": 32,
  "escape": 27,
  "pageup": 33,
  "pagedown": 34,
  "end": 35,
  "home": 36,
  "leftarrow": 37,
  "uparrow": 38,
  "rightarrow": 39,
  "downarrow": 40,
  "insert": 45,
  "delete": 46,
  "f1": 112,
  "f2": 113,
  "f3": 114,
  "f4": 115,
  "f5": 116,
  "f6": 117,
  "f7": 118,
  "f8": 119,
  "f9": 120,
  "f10": 121,
  "f11": 122,
  "f12": 123,
  "semicolon": 186,
  "plus": 187,
  "comma": 188,
  "minus": 189,
  "dot": 190,
  "forwardslash": 191,
  "graveaccent": 192,
  "openbracket": 219,
  "backslash": 220,
  "closebracket": 221,
  "singlequote": 222
};
var KeyboardEvents3 = (
  /** @class */
  function(_super) {
    __extends35(KeyboardEvents4, _super);
    function KeyboardEvents4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.keyPressHandler = function(e) {
        var isAltKey = e.altKey;
        var isCtrlKey = e.ctrlKey;
        var isShiftKey = e.shiftKey;
        var curkeyCode = e.which;
        var keys4 = Object.keys(_this.keyConfigs);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var key = keys_1[_i];
          var configCollection = _this.keyConfigs["" + key].split(",");
          for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
            var rconfig = configCollection_1[_a];
            var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
            if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey && isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
              e.action = key;
              if (_this.keyAction) {
                _this.keyAction(e);
              }
            }
          }
        }
      };
      _this.bind();
      return _this;
    }
    KeyboardEvents_1 = KeyboardEvents4;
    KeyboardEvents4.prototype.destroy = function() {
      this.unwireEvents();
      _super.prototype.destroy.call(this);
    };
    KeyboardEvents4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    KeyboardEvents4.prototype.bind = function() {
      this.wireEvents();
    };
    KeyboardEvents4.prototype.getModuleName = function() {
      return "keyboard";
    };
    KeyboardEvents4.prototype.wireEvents = function() {
      this.element.addEventListener(this.eventName, this.keyPressHandler);
    };
    KeyboardEvents4.prototype.unwireEvents = function() {
      this.element.removeEventListener(this.eventName, this.keyPressHandler);
    };
    KeyboardEvents4.getKeyConfigData = function(config) {
      if (config in this.configCache) {
        return this.configCache["" + config];
      }
      var keys4 = config.toLowerCase().split("+");
      var keyData = {
        altKey: keys4.indexOf("alt") !== -1 ? true : false,
        ctrlKey: keys4.indexOf("ctrl") !== -1 ? true : false,
        shiftKey: keys4.indexOf("shift") !== -1 ? true : false,
        keyCode: null
      };
      if (keys4[keys4.length - 1].length > 1 && !!Number(keys4[keys4.length - 1])) {
        keyData.keyCode = Number(keys4[keys4.length - 1]);
      } else {
        keyData.keyCode = KeyboardEvents_1.getKeyCode(keys4[keys4.length - 1]);
      }
      KeyboardEvents_1.configCache["" + config] = keyData;
      return keyData;
    };
    KeyboardEvents4.getKeyCode = function(keyVal) {
      return keyCode3["" + keyVal] || keyVal.toUpperCase().charCodeAt(0);
    };
    var KeyboardEvents_1;
    KeyboardEvents4.configCache = {};
    __decorate35([Property3({})], KeyboardEvents4.prototype, "keyConfigs", void 0);
    __decorate35([Property3("keyup")], KeyboardEvents4.prototype, "eventName", void 0);
    __decorate35([Event4()], KeyboardEvents4.prototype, "keyAction", void 0);
    KeyboardEvents4 = KeyboardEvents_1 = __decorate35([NotifyPropertyChanges3], KeyboardEvents4);
    return KeyboardEvents4;
  }(Base3)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/l10n.js
var L10n3 = (
  /** @class */
  function() {
    function L10n4(controlName, localeStrings, locale) {
      this.controlName = controlName;
      this.localeStrings = localeStrings;
      this.setLocale(locale || defaultCulture3);
    }
    L10n4.prototype.setLocale = function(locale) {
      var intLocale = this.intGetControlConstant(L10n4.locale, locale);
      this.currentLocale = intLocale || this.localeStrings;
    };
    L10n4.load = function(localeObject) {
      this.locale = extend3(this.locale, localeObject, {}, true);
    };
    L10n4.prototype.getConstant = function(prop) {
      if (!isNullOrUndefined3(this.currentLocale["" + prop])) {
        return this.currentLocale["" + prop];
      } else {
        return this.localeStrings["" + prop] || "";
      }
    };
    L10n4.prototype.intGetControlConstant = function(curObject, locale) {
      if (curObject["" + locale]) {
        return curObject["" + locale][this.controlName];
      }
      return null;
    };
    L10n4.locale = {};
    return L10n4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/touch.js
var __extends36 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate36 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SwipeSettings3 = (
  /** @class */
  function(_super) {
    __extends36(SwipeSettings4, _super);
    function SwipeSettings4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate36([Property3(50)], SwipeSettings4.prototype, "swipeThresholdDistance", void 0);
    return SwipeSettings4;
  }(ChildProperty3)
);
var swipeRegex3 = /(Up|Down)/;
var Touch3 = (
  /** @class */
  function(_super) {
    __extends36(Touch4, _super);
    function Touch4(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.touchAction = true;
      _this.tapCount = 0;
      _this.startEvent = function(evt) {
        if (_this.touchAction === true) {
          var point = _this.updateChangeTouches(evt);
          if (evt.changedTouches !== void 0) {
            _this.touchAction = false;
          }
          _this.isTouchMoved = false;
          _this.movedDirection = "";
          _this.startPoint = _this.lastMovedPoint = {
            clientX: point.clientX,
            clientY: point.clientY
          };
          _this.startEventData = point;
          _this.hScrollLocked = _this.vScrollLocked = false;
          _this.tStampStart = Date.now();
          _this.timeOutTapHold = setTimeout(function() {
            _this.tapHoldEvent(evt);
          }, _this.tapHoldThreshold);
          EventHandler3.add(_this.element, Browser3.touchMoveEvent, _this.moveEvent, _this);
          EventHandler3.add(_this.element, Browser3.touchEndEvent, _this.endEvent, _this);
          EventHandler3.add(_this.element, Browser3.touchCancelEvent, _this.cancelEvent, _this);
        }
      };
      _this.moveEvent = function(evt) {
        var point = _this.updateChangeTouches(evt);
        _this.movedPoint = point;
        _this.isTouchMoved = !(point.clientX === _this.startPoint.clientX && point.clientY === _this.startPoint.clientY);
        var eScrollArgs = {};
        if (_this.isTouchMoved) {
          clearTimeout(_this.timeOutTapHold);
          _this.calcScrollPoints(evt);
          var scrollArg = {
            startEvents: _this.startEventData,
            originalEvent: evt,
            startX: _this.startPoint.clientX,
            startY: _this.startPoint.clientY,
            distanceX: _this.distanceX,
            distanceY: _this.distanceY,
            scrollDirection: _this.scrollDirection,
            velocity: _this.getVelocity(point)
          };
          eScrollArgs = extend3(eScrollArgs, {}, scrollArg);
          _this.trigger("scroll", eScrollArgs);
          _this.lastMovedPoint = {
            clientX: point.clientX,
            clientY: point.clientY
          };
        }
      };
      _this.cancelEvent = function(evt) {
        clearTimeout(_this.timeOutTapHold);
        clearTimeout(_this.timeOutTap);
        _this.tapCount = 0;
        _this.swipeFn(evt);
        EventHandler3.remove(_this.element, Browser3.touchCancelEvent, _this.cancelEvent);
      };
      _this.endEvent = function(evt) {
        _this.swipeFn(evt);
        if (!_this.isTouchMoved) {
          if (typeof _this.tap === "function") {
            _this.trigger("tap", {
              originalEvent: evt,
              tapCount: ++_this.tapCount
            });
            _this.timeOutTap = setTimeout(function() {
              _this.tapCount = 0;
            }, _this.tapThreshold);
          }
        }
        _this.modeclear();
      };
      _this.swipeFn = function(evt) {
        clearTimeout(_this.timeOutTapHold);
        clearTimeout(_this.timeOutTap);
        var point = _this.updateChangeTouches(evt);
        var diffX = point.clientX - _this.startPoint.clientX;
        var diffY = point.clientY - _this.startPoint.clientY;
        diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
        diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
        _this.isTouchMoved = diffX > 1 || diffY > 1;
        var isFirefox = /Firefox/.test(Browser3.userAgent);
        if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === "mouseup") {
          _this.isTouchMoved = false;
        }
        _this.endPoint = point;
        _this.calcPoints(evt);
        var swipeArgs = {
          originalEvent: evt,
          startEvents: _this.startEventData,
          startX: _this.startPoint.clientX,
          startY: _this.startPoint.clientY,
          distanceX: _this.distanceX,
          distanceY: _this.distanceY,
          swipeDirection: _this.movedDirection,
          velocity: _this.getVelocity(point)
        };
        if (_this.isTouchMoved) {
          var tDistance = _this.swipeSettings.swipeThresholdDistance;
          var eSwipeArgs = extend3(void 0, _this.defaultArgs, swipeArgs);
          var canTrigger = false;
          var ele = _this.element;
          var scrollBool = _this.isScrollable(ele);
          var moved = swipeRegex3.test(_this.movedDirection);
          if (tDistance < _this.distanceX && !moved || tDistance < _this.distanceY && moved) {
            if (!scrollBool) {
              canTrigger = true;
            } else {
              canTrigger = _this.checkSwipe(ele, moved);
            }
          }
          if (canTrigger) {
            _this.trigger("swipe", eSwipeArgs);
          }
        }
        _this.modeclear();
      };
      _this.modeclear = function() {
        _this.modeClear = setTimeout(function() {
          _this.touchAction = true;
        }, typeof _this.tap !== "function" ? 0 : 20);
        _this.lastTapTime = (/* @__PURE__ */ new Date()).getTime();
        EventHandler3.remove(_this.element, Browser3.touchMoveEvent, _this.moveEvent);
        EventHandler3.remove(_this.element, Browser3.touchEndEvent, _this.endEvent);
        EventHandler3.remove(_this.element, Browser3.touchCancelEvent, _this.cancelEvent);
      };
      _this.bind();
      return _this;
    }
    Touch4.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    Touch4.prototype.bind = function() {
      this.wireEvents();
      if (Browser3.isIE) {
        this.element.classList.add("e-block-touch");
      }
    };
    Touch4.prototype.destroy = function() {
      this.unwireEvents();
      _super.prototype.destroy.call(this);
    };
    Touch4.prototype.wireEvents = function() {
      EventHandler3.add(this.element, Browser3.touchStartEvent, this.startEvent, this);
    };
    Touch4.prototype.unwireEvents = function() {
      EventHandler3.remove(this.element, Browser3.touchStartEvent, this.startEvent);
    };
    Touch4.prototype.getModuleName = function() {
      return "touch";
    };
    Touch4.prototype.isScrollable = function(element2) {
      var eleStyle = getComputedStyle(element2);
      var style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;
      if (/(auto|scroll)/.test(style)) {
        return true;
      }
      return false;
    };
    Touch4.prototype.tapHoldEvent = function(evt) {
      this.tapCount = 0;
      this.touchAction = true;
      EventHandler3.remove(this.element, Browser3.touchMoveEvent, this.moveEvent);
      EventHandler3.remove(this.element, Browser3.touchEndEvent, this.endEvent);
      var eTapArgs = {
        originalEvent: evt
      };
      this.trigger("tapHold", eTapArgs);
      EventHandler3.remove(this.element, Browser3.touchCancelEvent, this.cancelEvent);
    };
    Touch4.prototype.calcPoints = function(evt) {
      var point = this.updateChangeTouches(evt);
      this.defaultArgs = {
        originalEvent: evt
      };
      this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.startPoint.clientX));
      this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.startPoint.clientY));
      if (this.distanceX > this.distanceY) {
        this.movedDirection = point.clientX > this.startPoint.clientX ? "Right" : "Left";
      } else {
        this.movedDirection = point.clientY < this.startPoint.clientY ? "Up" : "Down";
      }
    };
    Touch4.prototype.calcScrollPoints = function(evt) {
      var point = this.updateChangeTouches(evt);
      this.defaultArgs = {
        originalEvent: evt
      };
      this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.lastMovedPoint.clientX));
      this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.lastMovedPoint.clientY));
      if ((this.distanceX > this.distanceY || this.hScrollLocked === true) && this.vScrollLocked === false) {
        this.scrollDirection = point.clientX > this.lastMovedPoint.clientX ? "Right" : "Left";
        this.hScrollLocked = true;
      } else {
        this.scrollDirection = point.clientY < this.lastMovedPoint.clientY ? "Up" : "Down";
        this.vScrollLocked = true;
      }
    };
    Touch4.prototype.getVelocity = function(pnt) {
      var newX = pnt.clientX;
      var newY = pnt.clientY;
      var newT = Date.now();
      var xDist = newX - this.startPoint.clientX;
      var yDist = newY - this.startPoint.clientX;
      var interval = newT - this.tStampStart;
      return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
    };
    Touch4.prototype.checkSwipe = function(ele, flag) {
      var keys4 = ["scroll", "offset"];
      var temp = flag ? ["Height", "Top"] : ["Width", "Left"];
      if (ele[keys4[0] + temp[0]] <= ele[keys4[1] + temp[0]]) {
        return true;
      }
      return ele[keys4[0] + temp[1]] === 0 || ele[keys4[1] + temp[0]] + ele[keys4[0] + temp[1]] >= ele[keys4[0] + temp[0]];
    };
    Touch4.prototype.updateChangeTouches = function(evt) {
      var point = evt.changedTouches && evt.changedTouches.length !== 0 ? evt.changedTouches[0] : evt;
      return point;
    };
    __decorate36([Event4()], Touch4.prototype, "tap", void 0);
    __decorate36([Event4()], Touch4.prototype, "tapHold", void 0);
    __decorate36([Event4()], Touch4.prototype, "swipe", void 0);
    __decorate36([Event4()], Touch4.prototype, "scroll", void 0);
    __decorate36([Property3(350)], Touch4.prototype, "tapThreshold", void 0);
    __decorate36([Property3(750)], Touch4.prototype, "tapHoldThreshold", void 0);
    __decorate36([Complex3({}, SwipeSettings3)], Touch4.prototype, "swipeSettings", void 0);
    Touch4 = __decorate36([NotifyPropertyChanges3], Touch4);
    return Touch4;
  }(Base3)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/template.js
var LINES3 = new RegExp("\\n|\\r|\\s\\s+", "g");
var QUOTES3 = new RegExp(/'|"/g);
var IF_STMT3 = new RegExp("if ?\\(");
var ELSEIF_STMT3 = new RegExp("else if ?\\(");
var ELSE_STMT3 = new RegExp("else");
var FOR_STMT3 = new RegExp("for ?\\(");
var IF_OR_FOR3 = new RegExp("(/if|/for)");
var CALL_FUNCTION3 = new RegExp("\\((.*)\\)", "");
var NOT_NUMBER3 = new RegExp("^[0-9]+$", "g");
var WORD3 = new RegExp(`[\\w"'.\\s+]+`, "g");
var DBL_QUOTED_STR3 = new RegExp('"(.*?)"', "g");
var WORDIF3 = new RegExp(`[\\w"'@#$.\\s-+]+`, "g");
var exp3 = new RegExp("\\${([^}]*)}", "g");
var ARR_OBJ3 = /^\..*/gm;
var SINGLE_SLASH3 = /\\/gi;
var DOUBLE_SLASH3 = /\\\\/gi;
var WORDFUNC3 = new RegExp(`[\\w"'@#$.\\s+]+`, "g");
var WINDOWFUNC3 = /\window\./gm;
function compile5(template, helper, ignorePrefix) {
  if (typeof template === "function") {
    return template;
  } else {
    var argName = "data";
    var evalExpResult = evalExp3(template, argName, helper, ignorePrefix);
    var condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
        var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
        if(str.match(valueRegEx)){
            var check = str.match(valueRegEx);
            var str1 = str;
            for (var i=0; i < check.length; i++) {
                var check1 = str.match(valueRegEx)[i].split('value=')[1];
                var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
                change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
                str1 = str1.replace(check1, change);
            }
            str = str.replace(str, str1);
        }
        else if (str.match(/(?:href='')/) === null) {
            if(str.match(hrefRegex)) {
                var check = str.match(hrefRegex);
                var str1 = str;
                for (var i=0; i < check.length; i++) {
                    var check1 = str.match(hrefRegex)[i].split('href=')[1];
                    if (check1) {
                        var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '"') : check1;
                        change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'"') : change;
                        str1 = str1.replace(check1, change);
                    }
                }
                str = str.replace(str, str1);
            }
        }
        `;
    var fnCode = 'var str="' + evalExpResult + '";' + condtion + " return str;";
    var fn = new Function(argName, fnCode);
    return fn.bind(helper);
  }
}
function evalExp3(str, nameSpace, helper, ignorePrefix) {
  var varCOunt = 0;
  var localKeys = [];
  var isClass = str.match(/class="([^"]+|)\s{2}/g);
  var singleSpace = "";
  if (isClass) {
    isClass.forEach(function(value) {
      singleSpace = value.replace(/\s\s+/g, " ");
      str = str.replace(value, singleSpace);
    });
  }
  if (exp3.test(str)) {
    var insideBraces = false;
    var outputString = "";
    for (var i = 0; i < str.length; i++) {
      if (str[i + ""] === "$" && str[i + 1] === "{") {
        insideBraces = true;
      } else if (str[i + ""] === "}") {
        insideBraces = false;
      }
      outputString += str[i + ""] === '"' && !insideBraces ? '\\"' : str[i + ""];
    }
    str = outputString;
  } else {
    str = str.replace(/\\?"/g, '\\"');
  }
  return str.replace(LINES3, "").replace(DBL_QUOTED_STR3, "'$1'").replace(exp3, function(match, cnt, offset, matchStr) {
    var SPECIAL_CHAR = /@|#|\$/gm;
    var matches5 = cnt.match(CALL_FUNCTION3);
    if (matches5) {
      var rlStr = matches5[1];
      if (ELSEIF_STMT3.test(cnt)) {
        cnt = '";} ' + cnt.replace(matches5[1], rlStr.replace(WORD3, function(str2) {
          str2 = str2.trim();
          return addNameSpace3(str2, !QUOTES3.test(str2) && localKeys.indexOf(str2) === -1, nameSpace, localKeys, ignorePrefix);
        })) + '{ \n str = str + "';
      } else if (IF_STMT3.test(cnt)) {
        cnt = '"; ' + cnt.replace(matches5[1], rlStr.replace(WORDIF3, function(strs) {
          return HandleSpecialCharArrObj3(strs, nameSpace, localKeys, ignorePrefix);
        })) + '{ \n str = str + "';
      } else if (FOR_STMT3.test(cnt)) {
        var rlStr_1 = matches5[1].split(" of ");
        cnt = '"; ' + cnt.replace(matches5[1], function(mtc) {
          localKeys.push(rlStr_1[0]);
          localKeys.push(rlStr_1[0] + "Index");
          varCOunt = varCOunt + 1;
          return "var i" + varCOunt + "=0; i" + varCOunt + " < " + addNameSpace3(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + ".length; i" + varCOunt + "++";
        }) + "{ \n " + rlStr_1[0] + "= " + addNameSpace3(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + "[i" + varCOunt + "]; \n var " + rlStr_1[0] + "Index=i" + varCOunt + '; \n str = str + "';
      } else {
        var fnStr = cnt.split("(");
        var fNameSpace = helper && Object.prototype.hasOwnProperty.call(helper, fnStr[0]) ? "this." : "global";
        fNameSpace = /\./.test(fnStr[0]) ? "" : fNameSpace;
        var ftArray = matches5[1].split(",");
        if (matches5[1].length !== 0 && !/data/.test(ftArray[0]) && !/window./.test(ftArray[0])) {
          matches5[1] = fNameSpace === "global" ? nameSpace + "." + matches5[1] : matches5[1];
        }
        var splRegexp = /@|\$|#/gm;
        var arrObj = /\]\./gm;
        if (WINDOWFUNC3.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
          var splArrRegexp = /@|\$|#|\]\./gm;
          if (splArrRegexp.test(cnt)) {
            cnt = '"+ ' + (fNameSpace === "global" ? "" : fNameSpace) + cnt.replace(matches5[1], rlStr.replace(WORDFUNC3, function(strs) {
              return HandleSpecialCharArrObj3(strs, nameSpace, localKeys, ignorePrefix);
            })) + '+ "';
          }
        } else {
          cnt = '" + ' + (fNameSpace === "global" ? "" : fNameSpace) + cnt.replace(rlStr, addNameSpace3(matches5[1].replace(/,( |)data.|,/gi, "," + nameSpace + ".").replace(/,( |)data.window/gi, ",window"), fNameSpace === "global" ? false : true, nameSpace, localKeys, ignorePrefix)) + '+"';
        }
      }
    } else if (ELSE_STMT3.test(cnt)) {
      cnt = '"; ' + cnt.replace(ELSE_STMT3, '} else { \n str = str + "');
    } else if (cnt.match(IF_OR_FOR3)) {
      cnt = cnt.replace(IF_OR_FOR3, '"; \n } \n str = str + "');
    } else if (SPECIAL_CHAR.test(cnt)) {
      if (cnt.match(SINGLE_SLASH3)) {
        cnt = SlashReplace3(cnt);
      }
      cnt = '"+' + NameSpaceForspecialChar3(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
    } else {
      if (cnt.match(SINGLE_SLASH3)) {
        cnt = SlashReplace3(cnt);
        cnt = '"+' + NameSpaceForspecialChar3(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
      } else {
        cnt = cnt !== "" ? '"+' + addNameSpace3(cnt.replace(/,/gi, "+" + nameSpace + "."), localKeys.indexOf(cnt) === -1, nameSpace, localKeys, ignorePrefix) + '+"' : "${}";
      }
    }
    return cnt;
  });
}
function addNameSpace3(str, addNS, nameSpace, ignoreList, ignorePrefix) {
  return addNS && !NOT_NUMBER3.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 && !ignorePrefix && str !== "true" && str !== "false" ? nameSpace + "." + str : str;
}
function NameSpaceArrObj3(str, addNS, nameSpace, ignoreList) {
  var arrObjReg = /^\..*/gm;
  return addNS && !NOT_NUMBER3.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 && !arrObjReg.test(str) ? nameSpace + "." + str : str;
}
function NameSpaceForspecialChar3(str, addNS, nameSpace, ignoreList) {
  return addNS && !NOT_NUMBER3.test(str) && ignoreList.indexOf(str.split(".")[0]) === -1 ? nameSpace + '["' + str : str;
}
function SlashReplace3(tempStr) {
  var double = "\\\\";
  if (tempStr.match(DOUBLE_SLASH3)) {
    return tempStr;
  } else {
    return tempStr.replace(SINGLE_SLASH3, double);
  }
}
function HandleSpecialCharArrObj3(str, nameSpaceNew, keys4, ignorePrefix) {
  str = str.trim();
  var windowFunc = /\window\./gm;
  if (!windowFunc.test(str)) {
    var quotes = /'|"/gm;
    var splRegexp = /@|\$|#/gm;
    if (splRegexp.test(str)) {
      str = NameSpaceForspecialChar3(str, keys4.indexOf(str) === -1, nameSpaceNew, keys4) + '"]';
    }
    if (ARR_OBJ3.test(str)) {
      return NameSpaceArrObj3(str, !quotes.test(str) && keys4.indexOf(str) === -1, nameSpaceNew, keys4);
    } else {
      return addNameSpace3(str, !quotes.test(str) && keys4.indexOf(str) === -1, nameSpaceNew, keys4, ignorePrefix);
    }
  } else {
    return str;
  }
}

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/template-engine.js
var HAS_ROW2 = /^[\n\r.]+<tr|^<tr/;
var HAS_SVG2 = /^[\n\r.]+<svg|^<path|^<g/;
var blazorTemplates2 = {};
function getRandomId2() {
  return "-" + Math.random().toString(36).substr(2, 5);
}
function compile6(templateString, helper, ignorePrefix) {
  var compiler = engineObj3.compile(templateString, helper, ignorePrefix);
  return function(data, component, propName, templateId, isStringTemplate, index, element2, root) {
    var result = compiler(data, component, propName, element2, root);
    var blazorTemplateId = "BlazorTemplateId";
    if (isBlazor3() && !isStringTemplate) {
      var randomId = getRandomId2();
      var blazorId = templateId + randomId;
      if (!blazorTemplates2["" + templateId]) {
        blazorTemplates2["" + templateId] = [];
      }
      if (!isNullOrUndefined3(index)) {
        var keys4 = Object.keys(blazorTemplates2["" + templateId][parseInt(index.toString(), 10)]);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var key = keys_1[_i];
          if (key !== blazorTemplateId && data["" + key]) {
            blazorTemplates2["" + templateId][parseInt(index.toString(), 10)]["" + key] = data["" + key];
          }
          if (key === blazorTemplateId) {
            blazorId = blazorTemplates2["" + templateId][parseInt(index.toString(), 10)]["" + key];
          }
        }
      } else {
        data["" + blazorTemplateId] = blazorId;
        blazorTemplates2["" + templateId].push(data);
      }
      return propName === "rowTemplate" ? [createElement3("tr", {
        id: blazorId,
        className: "e-blazor-template"
      })] : [createElement3("div", {
        id: blazorId,
        className: "e-blazor-template"
      })];
    }
    if (typeof result === "string") {
      if (HAS_SVG2.test(result)) {
        var ele = createElement3("svg", {
          innerHTML: result
        });
        return ele.childNodes;
      } else {
        var ele = createElement3(HAS_ROW2.test(result) ? "table" : "div", {
          innerHTML: result
        });
        return ele.childNodes;
      }
    } else {
      return result;
    }
  };
}
var Engine3 = (
  /** @class */
  function() {
    function Engine4() {
    }
    Engine4.prototype.compile = function(templateString, helper, ignorePrefix) {
      if (helper === void 0) {
        helper = {};
      }
      return compile5(templateString, helper);
    };
    return Engine4;
  }()
);
var engineObj3 = {
  compile: new Engine3().compile
};

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-base/src/sanitize-helper.js
var removeTags3 = ["script", "style", "iframe[src]", 'link[href*="javascript:"]', 'object[type="text/x-scriptlet"]', 'object[data^="data:text/html;base64"]', 'img[src^="data:text/html;base64"]', '[src^="javascript:"]', '[dynsrc^="javascript:"]', '[lowsrc^="javascript:"]', '[type^="application/x-shockwave-flash"]'];
var removeAttrs3 = [{
  attribute: "href",
  selector: '[href*="javascript:"]'
}, {
  attribute: "href",
  selector: "a[href]"
}, {
  attribute: "background",
  selector: '[background^="javascript:"]'
}, {
  attribute: "style",
  selector: '[style*="javascript:"]'
}, {
  attribute: "style",
  selector: '[style*="expression("]'
}, {
  attribute: "href",
  selector: 'a[href^="data:text/html;base64"]'
}];
var jsEvents3 = ["onchange", "onclick", "onmouseover", "onmouseout", "onkeydown", "onload", "onerror", "onblur", "onfocus", "onbeforeload", "onbeforeunload", "onkeyup", "onsubmit", "onafterprint", "onbeforeonload", "onbeforeprint", "oncanplay", "oncanplaythrough", "oncontextmenu", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onformchange", "onforminput", "onhaschange", "oninput", "oninvalid", "onkeypress", "onloadeddata", "onloadedmetadata", "onloadstart", "onmessage", "onmousedown", "onmousemove", "onmouseup", "onmousewheel", "onoffline", "onoine", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpopstate", "onprogress", "onratechange", "onreadystatechange", "onredo", "onresize", "onscroll", "onseeked", "onseeking", "onselect", "onstalled", "onstorage", "onsuspend", "ontimeupdate", "onundo", "onunload", "onvolumechange", "onwaiting", "onmouseenter", "onmouseleave", "onstart", "onpropertychange", "oncopy", "ontoggle", "onpointerout", "onpointermove", "onpointerleave", "onpointerenter", "onpointerrawupdate", "onpointerover", "onbeforecopy", "onbeforecut", "onbeforeinput"];
var SanitizeHtmlHelper3 = (
  /** @class */
  function() {
    function SanitizeHtmlHelper4() {
    }
    SanitizeHtmlHelper4.beforeSanitize = function() {
      return {
        selectors: {
          tags: removeTags3,
          attributes: removeAttrs3
        }
      };
    };
    SanitizeHtmlHelper4.sanitize = function(value) {
      if (isNullOrUndefined3(value)) {
        return value;
      }
      var item = this.beforeSanitize();
      var output = this.serializeValue(item, value);
      return output;
    };
    SanitizeHtmlHelper4.serializeValue = function(item, value) {
      this.removeAttrs = item.selectors.attributes;
      this.removeTags = item.selectors.tags;
      this.wrapElement = document.createElement("div");
      this.wrapElement.innerHTML = value;
      this.removeXssTags();
      this.removeJsEvents();
      this.removeXssAttrs();
      var tempEleValue = this.wrapElement.innerHTML;
      this.removeElement();
      this.wrapElement = null;
      return tempEleValue.replace(/&amp;/g, "&");
    };
    SanitizeHtmlHelper4.removeElement = function() {
      var nodes = this.wrapElement.children;
      for (var j = 0; j < nodes.length; j++) {
        var attribute = nodes[parseInt(j.toString(), 10)].attributes;
        for (var i = 0; i < attribute.length; i++) {
          this.wrapElement.children[parseInt(j.toString(), 10)].removeAttribute(attribute[parseInt(i.toString(), 10)].localName);
        }
      }
    };
    SanitizeHtmlHelper4.removeXssTags = function() {
      var elements = this.wrapElement.querySelectorAll(this.removeTags.join(","));
      if (elements.length > 0) {
        elements.forEach(function(element2) {
          detach3(element2);
        });
      } else {
        return;
      }
    };
    SanitizeHtmlHelper4.removeJsEvents = function() {
      var elements = this.wrapElement.querySelectorAll("[" + jsEvents3.join("],[") + "]");
      if (elements.length > 0) {
        elements.forEach(function(element2) {
          jsEvents3.forEach(function(attr) {
            if (element2.hasAttribute(attr)) {
              element2.removeAttribute(attr);
            }
          });
        });
      } else {
        return;
      }
    };
    SanitizeHtmlHelper4.removeXssAttrs = function() {
      var _this = this;
      this.removeAttrs.forEach(function(item, index) {
        var elements = _this.wrapElement.querySelectorAll(item.selector);
        if (elements.length > 0) {
          if (item.selector === "a[href]") {
            elements.forEach(function(element2) {
              if (element2.getAttribute(item.attribute).replace(/\t|\s|&/, "").indexOf("javascript:alert") !== -1) {
                element2.removeAttribute(item.attribute);
              }
            });
          } else {
            elements.forEach(function(element2) {
              element2.removeAttribute(item.attribute);
            });
          }
        }
      });
    };
    return SanitizeHtmlHelper4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-data/src/query.js
var Query2 = (
  /** @class */
  function() {
    function Query3(from) {
      this.subQuery = null;
      this.isChild = false;
      this.distincts = [];
      this.queries = [];
      this.key = "";
      this.fKey = "";
      if (typeof from === "string") {
        this.fromTable = from;
      } else if (from && from instanceof Array) {
        this.lookups = from;
      }
      this.expands = [];
      this.sortedColumns = [];
      this.groupedColumns = [];
      this.subQuery = null;
      this.isChild = false;
      this.params = [];
      this.lazyLoad = [];
      return this;
    }
    Object.defineProperty(Query3.prototype, "moduleName", {
      /** @hidden */
      get: function() {
        return "query";
      },
      enumerable: true,
      configurable: true
    });
    ;
    Query3.prototype.setKey = function(field) {
      this.key = field;
      return this;
    };
    Query3.prototype.using = function(dataManager) {
      this.dataManager = dataManager;
      return this;
    };
    Query3.prototype.execute = function(dataManager, done, fail, always) {
      dataManager = dataManager || this.dataManager;
      if (dataManager) {
        return dataManager.executeQuery(this, done, fail, always);
      }
      return DataUtil2.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument');
    };
    Query3.prototype.executeLocal = function(dataManager) {
      dataManager = dataManager || this.dataManager;
      if (dataManager) {
        return dataManager.executeLocal(this);
      }
      return DataUtil2.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument');
    };
    Query3.prototype.clone = function() {
      var cloned = new Query3();
      cloned.queries = this.queries.slice(0);
      cloned.key = this.key;
      cloned.isChild = this.isChild;
      cloned.dataManager = this.dataManager;
      cloned.fromTable = this.fromTable;
      cloned.params = this.params.slice(0);
      cloned.expands = this.expands.slice(0);
      cloned.sortedColumns = this.sortedColumns.slice(0);
      cloned.groupedColumns = this.groupedColumns.slice(0);
      cloned.subQuerySelector = this.subQuerySelector;
      cloned.subQuery = this.subQuery;
      cloned.fKey = this.fKey;
      cloned.isCountRequired = this.isCountRequired;
      cloned.distincts = this.distincts.slice(0);
      cloned.lazyLoad = this.lazyLoad.slice(0);
      return cloned;
    };
    Query3.prototype.from = function(tableName) {
      this.fromTable = tableName;
      return this;
    };
    Query3.prototype.addParams = function(key, value) {
      if (typeof value === "function") {
        this.params.push({
          key,
          fn: value
        });
      } else {
        this.params.push({
          key,
          value
        });
      }
      return this;
    };
    Query3.prototype.distinct = function(fields) {
      if (typeof fields === "string") {
        this.distincts = [].slice.call([fields], 0);
      } else {
        this.distincts = fields.slice(0);
      }
      return this;
    };
    Query3.prototype.expand = function(tables) {
      if (typeof tables === "string") {
        this.expands = [].slice.call([tables], 0);
      } else {
        this.expands = tables.slice(0);
      }
      return this;
    };
    Query3.prototype.where = function(fieldName, operator, value, ignoreCase, ignoreAccent, matchCase) {
      operator = operator ? operator.toLowerCase() : null;
      var predicate = null;
      if (typeof fieldName === "string") {
        predicate = new Predicate2(fieldName, operator, value, ignoreCase, ignoreAccent, matchCase);
      } else if (fieldName instanceof Predicate2) {
        predicate = fieldName;
      }
      this.queries.push({
        fn: "onWhere",
        e: predicate
      });
      return this;
    };
    Query3.prototype.search = function(searchKey, fieldNames, operator, ignoreCase, ignoreAccent) {
      if (typeof fieldNames === "string") {
        fieldNames = [fieldNames];
      }
      if (!operator || operator === "none") {
        operator = "contains";
      }
      var comparer = DataUtil2.fnOperators[operator];
      this.queries.push({
        fn: "onSearch",
        e: {
          fieldNames,
          operator,
          searchKey,
          ignoreCase,
          ignoreAccent,
          comparer
        }
      });
      return this;
    };
    Query3.prototype.sortBy = function(fieldName, comparer, isFromGroup) {
      return this.sortByForeignKey(fieldName, comparer, isFromGroup);
    };
    Query3.prototype.sortByForeignKey = function(fieldName, comparer, isFromGroup, direction) {
      var order = !isNullOrUndefined3(direction) ? direction : "ascending";
      var sorts;
      var temp;
      if (typeof fieldName === "string" && DataUtil2.endsWith(fieldName.toLowerCase(), " desc")) {
        fieldName = fieldName.replace(/ desc$/i, "");
        comparer = "descending";
      }
      if (!comparer || typeof comparer === "string") {
        order = comparer ? comparer.toLowerCase() : "ascending";
        comparer = DataUtil2.fnSort(comparer);
      }
      if (isFromGroup) {
        sorts = Query3.filterQueries(this.queries, "onSortBy");
        for (var i = 0; i < sorts.length; i++) {
          temp = sorts[i].e.fieldName;
          if (typeof temp === "string") {
            if (temp === fieldName) {
              return this;
            }
          } else if (temp instanceof Array) {
            for (var j = 0; j < temp.length; j++) {
              if (temp[j] === fieldName || fieldName.toLowerCase() === temp[j] + " desc") {
                return this;
              }
            }
          }
        }
      }
      this.queries.push({
        fn: "onSortBy",
        e: {
          fieldName,
          comparer,
          direction: order
        }
      });
      return this;
    };
    Query3.prototype.sortByDesc = function(fieldName) {
      return this.sortBy(fieldName, "descending");
    };
    Query3.prototype.group = function(fieldName, fn, format) {
      this.sortBy(fieldName, null, true);
      this.queries.push({
        fn: "onGroup",
        e: {
          fieldName,
          comparer: fn ? fn : null,
          format: format ? format : null
        }
      });
      return this;
    };
    Query3.prototype.page = function(pageIndex, pageSize) {
      this.queries.push({
        fn: "onPage",
        e: {
          pageIndex,
          pageSize
        }
      });
      return this;
    };
    Query3.prototype.range = function(start, end) {
      this.queries.push({
        fn: "onRange",
        e: {
          start,
          end
        }
      });
      return this;
    };
    Query3.prototype.take = function(nos) {
      this.queries.push({
        fn: "onTake",
        e: {
          nos
        }
      });
      return this;
    };
    Query3.prototype.skip = function(nos) {
      this.queries.push({
        fn: "onSkip",
        e: {
          nos
        }
      });
      return this;
    };
    Query3.prototype.select = function(fieldNames) {
      if (typeof fieldNames === "string") {
        fieldNames = [].slice.call([fieldNames], 0);
      }
      this.queries.push({
        fn: "onSelect",
        e: {
          fieldNames
        }
      });
      return this;
    };
    Query3.prototype.hierarchy = function(query, selectorFn) {
      this.subQuerySelector = selectorFn;
      this.subQuery = query;
      return this;
    };
    Query3.prototype.foreignKey = function(key) {
      this.fKey = key;
      return this;
    };
    Query3.prototype.requiresCount = function() {
      this.isCountRequired = true;
      return this;
    };
    Query3.prototype.aggregate = function(type, field) {
      this.queries.push({
        fn: "onAggregates",
        e: {
          field,
          type
        }
      });
      return this;
    };
    Query3.filterQueries = function(queries, name) {
      return queries.filter(function(q) {
        return q.fn === name;
      });
    };
    Query3.filterQueryLists = function(queries, singles) {
      var filtered = queries.filter(function(q) {
        return singles.indexOf(q.fn) !== -1;
      });
      var res = {};
      for (var i = 0; i < filtered.length; i++) {
        if (!res[filtered[i].fn]) {
          res[filtered[i].fn] = filtered[i].e;
        }
      }
      return res;
    };
    return Query3;
  }()
);
var Predicate2 = (
  /** @class */
  function() {
    function Predicate3(field, operator, value, ignoreCase, ignoreAccent, matchCase) {
      if (ignoreCase === void 0) {
        ignoreCase = false;
      }
      this.ignoreAccent = false;
      this.isComplex = false;
      if (typeof field === "string") {
        this.field = field;
        this.operator = operator.toLowerCase();
        this.value = value;
        this.matchCase = matchCase;
        this.ignoreCase = ignoreCase;
        this.ignoreAccent = ignoreAccent;
        this.isComplex = false;
        this.comparer = DataUtil2.fnOperators.processOperator(this.operator);
      } else if (field instanceof Predicate3 && value instanceof Predicate3 || value instanceof Array) {
        this.isComplex = true;
        this.condition = operator.toLowerCase();
        this.predicates = [field];
        this.matchCase = field.matchCase;
        this.ignoreCase = field.ignoreCase;
        this.ignoreAccent = field.ignoreAccent;
        if (value instanceof Array) {
          [].push.apply(this.predicates, value);
        } else {
          this.predicates.push(value);
        }
      }
      return this;
    }
    Predicate3.and = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "and");
    };
    Predicate3.prototype.and = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "and", ignoreCase, ignoreAccent);
    };
    Predicate3.or = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "or");
    };
    Predicate3.prototype.or = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "or", ignoreCase, ignoreAccent);
    };
    Predicate3.ornot = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "or not");
    };
    Predicate3.prototype.ornot = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "ornot", ignoreCase, ignoreAccent);
    };
    Predicate3.andnot = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return Predicate3.combinePredicates([].slice.call(args, 0), "and not");
    };
    Predicate3.prototype.andnot = function(field, operator, value, ignoreCase, ignoreAccent) {
      return Predicate3.combine(this, field, operator, value, "andnot", ignoreCase, ignoreAccent);
    };
    Predicate3.fromJson = function(json) {
      if (json instanceof Array) {
        var res = [];
        for (var i = 0, len = json.length; i < len; i++) {
          res.push(this.fromJSONData(json[i]));
        }
        return res;
      }
      var pred = json;
      return this.fromJSONData(pred);
    };
    Predicate3.prototype.validate = function(record) {
      var predicate = this.predicates ? this.predicates : [];
      var ret;
      var isAnd;
      if (!this.isComplex && this.comparer) {
        if (this.condition && this.condition.indexOf("not") !== -1) {
          this.condition = this.condition.split("not")[0] === "" ? void 0 : this.condition.split("not")[0];
          return !this.comparer.call(this, DataUtil2.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);
        } else {
          return this.comparer.call(this, DataUtil2.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);
        }
      }
      if (this.condition && this.condition.indexOf("not") !== -1) {
        isAnd = this.condition.indexOf("and") !== -1;
      } else {
        isAnd = this.condition === "and";
      }
      for (var i = 0; i < predicate.length; i++) {
        if (i > 0 && this.condition && this.condition.indexOf("not") !== -1) {
          predicate[i].condition = predicate[i].condition ? predicate[i].condition + "not" : "not";
        }
        ret = predicate[i].validate(record);
        if (isAnd) {
          if (!ret) {
            return false;
          }
        } else {
          if (ret) {
            return true;
          }
        }
      }
      return isAnd;
    };
    Predicate3.prototype.toJson = function() {
      var predicates;
      var p;
      if (this.isComplex) {
        predicates = [];
        p = this.predicates;
        for (var i = 0; i < p.length; i++) {
          predicates.push(p[i].toJson());
        }
      }
      return {
        isComplex: this.isComplex,
        field: this.field,
        operator: this.operator,
        value: this.value,
        ignoreCase: this.ignoreCase,
        ignoreAccent: this.ignoreAccent,
        condition: this.condition,
        predicates,
        matchCase: this.matchCase
      };
    };
    Predicate3.combinePredicates = function(predicates, operator) {
      if (predicates.length === 1) {
        if (!(predicates[0] instanceof Array)) {
          return predicates[0];
        }
        predicates = predicates[0];
      }
      return new Predicate3(predicates[0], operator, predicates.slice(1));
    };
    Predicate3.combine = function(pred, field, operator, value, condition, ignoreCase, ignoreAccent) {
      if (field instanceof Predicate3) {
        return Predicate3[condition](pred, field);
      }
      if (typeof field === "string") {
        return Predicate3[condition](pred, new Predicate3(field, operator, value, ignoreCase, ignoreAccent));
      }
      return DataUtil2.throwError("Predicate - " + condition + " : invalid arguments");
    };
    Predicate3.fromJSONData = function(json) {
      var preds = json.predicates || [];
      var len = preds.length;
      var predicates = [];
      var result;
      for (var i = 0; i < len; i++) {
        predicates.push(this.fromJSONData(preds[i]));
      }
      if (!json.isComplex) {
        result = new Predicate3(json.field, json.operator, json.value, json.ignoreCase, json.ignoreAccent);
      } else {
        result = new Predicate3(predicates[0], json.condition, predicates.slice(1));
      }
      return result;
    };
    return Predicate3;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-data/src/util.js
var consts3 = {
  GroupGuid: "{271bbba0-1ee7}"
};
var DataUtil2 = (
  /** @class */
  function() {
    function DataUtil3() {
    }
    DataUtil3.getValue = function(value, inst) {
      if (typeof value === "function") {
        return value.call(inst || {});
      }
      return value;
    };
    DataUtil3.endsWith = function(input2, substr) {
      return input2.slice && input2.slice(-substr.length) === substr;
    };
    DataUtil3.notEndsWith = function(input2, substr) {
      return input2.slice && input2.slice(-substr.length) !== substr;
    };
    DataUtil3.startsWith = function(input2, start) {
      return input2.slice(0, start.length) === start;
    };
    DataUtil3.notStartsWith = function(input2, start) {
      return input2.slice(0, start.length) !== start;
    };
    DataUtil3.wildCard = function(input2, pattern) {
      var asteriskSplit;
      var optionalSplit;
      if (pattern.indexOf("[") !== -1) {
        pattern = pattern.split("[").join("[[]");
      }
      if (pattern.indexOf("(") !== -1) {
        pattern = pattern.split("(").join("[(]");
      }
      if (pattern.indexOf(")") !== -1) {
        pattern = pattern.split(")").join("[)]");
      }
      if (pattern.indexOf("\\") !== -1) {
        pattern = pattern.split("\\").join("[\\\\]");
      }
      if (pattern.indexOf("*") !== -1) {
        if (pattern.charAt(0) !== "*") {
          pattern = "^" + pattern;
        }
        if (pattern.charAt(pattern.length - 1) !== "*") {
          pattern = pattern + "$";
        }
        asteriskSplit = pattern.split("*");
        for (var i = 0; i < asteriskSplit.length; i++) {
          if (asteriskSplit[i].indexOf(".") === -1) {
            asteriskSplit[i] = asteriskSplit[i] + ".*";
          } else {
            asteriskSplit[i] = asteriskSplit[i] + "*";
          }
        }
        pattern = asteriskSplit.join("");
      }
      if (pattern.indexOf("%3f") !== -1 || pattern.indexOf("?") !== -1) {
        optionalSplit = pattern.indexOf("%3f") !== -1 ? pattern.split("%3f") : pattern.split("?");
        pattern = optionalSplit.join(".");
      }
      var regexPattern = new RegExp(pattern, "g");
      return regexPattern.test(input2);
    };
    DataUtil3.like = function(input2, pattern) {
      if (pattern.indexOf("%") !== -1) {
        if (pattern.charAt(0) === "%" && pattern.lastIndexOf("%") < 2) {
          pattern = pattern.substring(1, pattern.length);
          return DataUtil3.startsWith(DataUtil3.toLowerCase(input2), DataUtil3.toLowerCase(pattern));
        } else if (pattern.charAt(pattern.length - 1) === "%" && pattern.indexOf("%") > pattern.length - 3) {
          pattern = pattern.substring(0, pattern.length - 1);
          return DataUtil3.endsWith(DataUtil3.toLowerCase(input2), DataUtil3.toLowerCase(pattern));
        } else if (pattern.lastIndexOf("%") !== pattern.indexOf("%") && pattern.lastIndexOf("%") > pattern.indexOf("%") + 1) {
          pattern = pattern.substring(pattern.indexOf("%") + 1, pattern.lastIndexOf("%"));
          return input2.indexOf(pattern) !== -1;
        } else {
          return input2.indexOf(pattern) !== -1;
        }
      } else {
        return false;
      }
    };
    DataUtil3.fnSort = function(order) {
      order = order ? DataUtil3.toLowerCase(order) : "ascending";
      if (order === "ascending") {
        return this.fnAscending;
      }
      return this.fnDescending;
    };
    DataUtil3.fnAscending = function(x, y) {
      if (isNullOrUndefined3(x) && isNullOrUndefined3(y)) {
        return -1;
      }
      if (y === null || y === void 0) {
        return -1;
      }
      if (typeof x === "string") {
        return x.localeCompare(y);
      }
      if (x === null || x === void 0) {
        return 1;
      }
      return x - y;
    };
    DataUtil3.fnDescending = function(x, y) {
      if (isNullOrUndefined3(x) && isNullOrUndefined3(y)) {
        return -1;
      }
      if (y === null || y === void 0) {
        return 1;
      }
      if (typeof x === "string") {
        return x.localeCompare(y) * -1;
      }
      if (x === null || x === void 0) {
        return -1;
      }
      return y - x;
    };
    DataUtil3.extractFields = function(obj, fields) {
      var newObj = {};
      for (var i = 0; i < fields.length; i++) {
        newObj = this.setValue(fields[i], this.getObject(fields[i], obj), newObj);
      }
      return newObj;
    };
    DataUtil3.select = function(jsonArray, fields) {
      var newData = [];
      for (var i = 0; i < jsonArray.length; i++) {
        newData.push(this.extractFields(jsonArray[i], fields));
      }
      return newData;
    };
    DataUtil3.group = function(jsonArray, field, aggregates, level, groupDs, format, isLazyLoad) {
      level = level || 1;
      var jsonData = jsonArray;
      var guid = "GroupGuid";
      if (jsonData.GroupGuid === consts3[guid]) {
        var _loop_1 = function(j2) {
          if (!isNullOrUndefined3(groupDs)) {
            var indx = -1;
            var temp = groupDs.filter(function(e) {
              return e.key === jsonData[j2].key;
            });
            indx = groupDs.indexOf(temp[0]);
            jsonData[j2].items = this_1.group(jsonData[j2].items, field, aggregates, jsonData.level + 1, groupDs[indx].items, format, isLazyLoad);
            jsonData[j2].count = groupDs[indx].count;
          } else {
            jsonData[j2].items = this_1.group(jsonData[j2].items, field, aggregates, jsonData.level + 1, null, format, isLazyLoad);
            jsonData[j2].count = jsonData[j2].items.length;
          }
        };
        var this_1 = this;
        for (var j = 0; j < jsonData.length; j++) {
          _loop_1(j);
        }
        jsonData.childLevels += 1;
        return jsonData;
      }
      var grouped = {};
      var groupedArray = [];
      groupedArray.GroupGuid = consts3[guid];
      groupedArray.level = level;
      groupedArray.childLevels = 0;
      groupedArray.records = jsonData;
      var _loop_2 = function(i2) {
        var val = this_2.getVal(jsonData, i2, field);
        if (!isNullOrUndefined3(format)) {
          val = format(val, field);
        }
        if (!grouped[val]) {
          grouped[val] = {
            key: val,
            count: 0,
            items: [],
            aggregates: {},
            field
          };
          groupedArray.push(grouped[val]);
          if (!isNullOrUndefined3(groupDs)) {
            var tempObj = groupDs.filter(function(e) {
              return e.key === grouped[val].key;
            });
            grouped[val].count = tempObj[0].count;
          }
        }
        grouped[val].count = !isNullOrUndefined3(groupDs) ? grouped[val].count : grouped[val].count += 1;
        if (!isLazyLoad || isLazyLoad && aggregates.length) {
          grouped[val].items.push(jsonData[i2]);
        }
      };
      var this_2 = this;
      for (var i = 0; i < jsonData.length; i++) {
        _loop_2(i);
      }
      if (aggregates && aggregates.length) {
        var _loop_3 = function(i2) {
          var res = {};
          var fn = void 0;
          var aggs = aggregates;
          for (var j2 = 0; j2 < aggregates.length; j2++) {
            fn = DataUtil3.aggregates[aggregates[j2].type];
            if (!isNullOrUndefined3(groupDs)) {
              var temp = groupDs.filter(function(e) {
                return e.key === groupedArray[i2].key;
              });
              if (fn) {
                res[aggs[j2].field + " - " + aggs[j2].type] = fn(temp[0].items, aggs[j2].field);
              }
            } else {
              if (fn) {
                res[aggs[j2].field + " - " + aggs[j2].type] = fn(groupedArray[i2].items, aggs[j2].field);
              }
            }
          }
          groupedArray[i2].aggregates = res;
        };
        for (var i = 0; i < groupedArray.length; i++) {
          _loop_3(i);
        }
      }
      if (isLazyLoad && groupedArray.length && aggregates.length) {
        for (var i = 0; i < groupedArray.length; i++) {
          groupedArray[i].items = [];
        }
      }
      return jsonData.length && groupedArray || jsonData;
    };
    DataUtil3.buildHierarchy = function(fKey, from, source, lookup, pKey) {
      var i;
      var grp = {};
      var temp;
      if (lookup.result) {
        lookup = lookup.result;
      }
      if (lookup.GroupGuid) {
        this.throwError("DataManager: Do not have support Grouping in hierarchy");
      }
      for (i = 0; i < lookup.length; i++) {
        var fKeyData = this.getObject(fKey, lookup[i]);
        temp = grp[fKeyData] || (grp[fKeyData] = []);
        temp.push(lookup[i]);
      }
      for (i = 0; i < source.length; i++) {
        var fKeyData = this.getObject(pKey || fKey, source[i]);
        source[i][from] = grp[fKeyData];
      }
    };
    DataUtil3.getFieldList = function(obj, fields, prefix) {
      if (prefix === void 0) {
        prefix = "";
      }
      if (fields === void 0 || fields === null) {
        return this.getFieldList(obj, [], prefix);
      }
      var copyObj = obj;
      var keys4 = Object.keys(obj);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var prop = keys_1[_i];
        if (typeof copyObj[prop] === "object" && !(copyObj[prop] instanceof Array)) {
          this.getFieldList(copyObj[prop], fields, prefix + prop + ".");
        } else {
          fields.push(prefix + prop);
        }
      }
      return fields;
    };
    DataUtil3.getObject = function(nameSpace, from) {
      if (!nameSpace) {
        return from;
      }
      if (!from) {
        return void 0;
      }
      if (nameSpace.indexOf(".") === -1) {
        var lowerCaseNameSpace = nameSpace.charAt(0).toLowerCase() + nameSpace.slice(1);
        var upperCaseNameSpace = nameSpace.charAt(0).toUpperCase() + nameSpace.slice(1);
        if (!isNullOrUndefined3(from[nameSpace])) {
          return from[nameSpace];
        } else {
          if (!isNullOrUndefined3(from[lowerCaseNameSpace])) {
            return from[lowerCaseNameSpace];
          } else if (!isNullOrUndefined3(from[upperCaseNameSpace])) {
            return from[upperCaseNameSpace];
          } else {
            return null;
          }
        }
      }
      var value = from;
      var splits = nameSpace.split(".");
      for (var i = 0; i < splits.length; i++) {
        if (value == null) {
          break;
        }
        value = value[splits[i]];
        if (value === void 0) {
          var casing = splits[i].charAt(0).toUpperCase() + splits[i].slice(1);
          value = from[casing] || from[casing.charAt(0).toLowerCase() + casing.slice(1)] || null;
        }
        from = value;
      }
      return value;
    };
    DataUtil3.setValue = function(nameSpace, value, obj) {
      var keys4 = nameSpace.toString().split(".");
      var start = obj || {};
      var fromObj = start;
      var i;
      var length = keys4.length;
      var key;
      for (i = 0; i < length; i++) {
        key = keys4[i];
        if (i + 1 === length) {
          fromObj[key] = value === void 0 ? void 0 : value;
        } else if (isNullOrUndefined3(fromObj[key])) {
          fromObj[key] = {};
        }
        fromObj = fromObj[key];
      }
      return start;
    };
    DataUtil3.sort = function(ds, field, comparer) {
      if (ds.length <= 1) {
        return ds;
      }
      var middle = parseInt((ds.length / 2).toString(), 10);
      var left = ds.slice(0, middle);
      var right = ds.slice(middle);
      left = this.sort(left, field, comparer);
      right = this.sort(right, field, comparer);
      return this.merge(left, right, field, comparer);
    };
    DataUtil3.ignoreDiacritics = function(value) {
      if (typeof value !== "string") {
        return value;
      }
      var result = value.split("");
      var newValue = result.map(function(temp) {
        return temp in DataUtil3.diacritics ? DataUtil3.diacritics[temp] : temp;
      });
      return newValue.join("");
    };
    DataUtil3.merge = function(left, right, fieldName, comparer) {
      var result = [];
      var current;
      while (left.length > 0 || right.length > 0) {
        if (left.length > 0 && right.length > 0) {
          if (comparer) {
            current = comparer(this.getVal(left, 0, fieldName), this.getVal(right, 0, fieldName), left[0], right[0]) <= 0 ? left : right;
          } else {
            current = left[0][fieldName] < left[0][fieldName] ? left : right;
          }
        } else {
          current = left.length > 0 ? left : right;
        }
        result.push(current.shift());
      }
      return result;
    };
    DataUtil3.getVal = function(array, index, field) {
      return field ? this.getObject(field, array[index]) : array[index];
    };
    DataUtil3.toLowerCase = function(val) {
      return val ? typeof val === "string" ? val.toLowerCase() : val.toString() : val === 0 || val === false ? val.toString() : "";
    };
    DataUtil3.callAdaptorFunction = function(adaptor, fnName, param1, param2) {
      if (fnName in adaptor) {
        var res = adaptor[fnName](param1, param2);
        if (!isNullOrUndefined3(res)) {
          param1 = res;
        }
      }
      return param1;
    };
    DataUtil3.getAddParams = function(adp, dm, query) {
      var req = {};
      DataUtil3.callAdaptorFunction(adp, "addParams", {
        dm,
        query,
        params: query ? query.params : [],
        reqParams: req
      });
      return req;
    };
    DataUtil3.isPlainObject = function(obj) {
      return !!obj && obj.constructor === Object;
    };
    DataUtil3.isCors = function() {
      var xhr = null;
      var request = "XMLHttpRequest";
      try {
        xhr = new window[request]();
      } catch (e) {
      }
      return !!xhr && "withCredentials" in xhr;
    };
    DataUtil3.getGuid = function(prefix) {
      var hexs = "0123456789abcdef";
      var rand;
      return (prefix || "") + "00000000-0000-4000-0000-000000000000".replace(/0/g, function(val, i) {
        if ("crypto" in window && "getRandomValues" in crypto) {
          var arr = new Uint8Array(1);
          window.crypto.getRandomValues(arr);
          rand = arr[0] % 16 | 0;
        } else {
          rand = Math.random() * 16 | 0;
        }
        return hexs[i === 19 ? rand & 3 | 8 : rand];
      });
    };
    DataUtil3.isNull = function(val) {
      return val === void 0 || val === null;
    };
    DataUtil3.getItemFromComparer = function(array, field, comparer) {
      var keyVal;
      var current;
      var key;
      var i = 0;
      var castRequired = typeof DataUtil3.getVal(array, 0, field) === "string";
      if (array.length) {
        while (isNullOrUndefined3(keyVal) && i < array.length) {
          keyVal = DataUtil3.getVal(array, i, field);
          key = array[i++];
        }
      }
      for (; i < array.length; i++) {
        current = DataUtil3.getVal(array, i, field);
        if (isNullOrUndefined3(current)) {
          continue;
        }
        if (castRequired) {
          keyVal = +keyVal;
          current = +current;
        }
        if (comparer(keyVal, current) > 0) {
          keyVal = current;
          key = array[i];
        }
      }
      return key;
    };
    DataUtil3.distinct = function(json, fieldName, requiresCompleteRecord) {
      requiresCompleteRecord = isNullOrUndefined3(requiresCompleteRecord) ? false : requiresCompleteRecord;
      var result = [];
      var val;
      var tmp = {};
      json.forEach(function(data, index) {
        val = typeof json[index] === "object" ? DataUtil3.getVal(json, index, fieldName) : json[index];
        if (!(val in tmp)) {
          result.push(!requiresCompleteRecord ? val : json[index]);
          tmp[val] = 1;
        }
      });
      return result;
    };
    DataUtil3.processData = function(dm, records) {
      var query = this.prepareQuery(dm);
      var sampledata = new DataManager2(records);
      if (dm.requiresCounts) {
        query.requiresCount();
      }
      var result = sampledata.executeLocal(query);
      var returnValue = {
        result: dm.requiresCounts ? result.result : result,
        count: result.count,
        aggregates: JSON.stringify(result.aggregates)
      };
      return dm.requiresCounts ? returnValue : result;
    };
    DataUtil3.prepareQuery = function(dm) {
      var _this = this;
      var query = new Query2();
      if (dm.select) {
        query.select(dm.select);
      }
      if (dm.where) {
        var where = DataUtil3.parse.parseJson(dm.where);
        where.filter(function(pred) {
          if (isNullOrUndefined3(pred.condition)) {
            query.where(pred.field, pred.operator, pred.value, pred.ignoreCase, pred.ignoreAccent);
          } else {
            var predicateList = [];
            if (pred.field) {
              predicateList.push(new Predicate2(pred.field, pred.operator, pred.value, pred.ignoreCase, pred.ignoreAccent));
            } else {
              predicateList = predicateList.concat(_this.getPredicate(pred.predicates));
            }
            if (pred.condition === "or") {
              query.where(Predicate2.or(predicateList));
            } else if (pred.condition === "and") {
              query.where(Predicate2.and(predicateList));
            }
          }
        });
      }
      if (dm.search) {
        var search = DataUtil3.parse.parseJson(dm.search);
        search.filter(function(e) {
          return query.search(
            e.key,
            e.fields,
            e["operator"],
            // tslint:disable-next-line:no-string-literal
            e["ignoreCase"],
            e["ignoreAccent"]
          );
        });
      }
      if (dm.aggregates) {
        dm.aggregates.filter(function(e) {
          return query.aggregate(e.type, e.field);
        });
      }
      if (dm.sorted) {
        dm.sorted.filter(function(e) {
          return query.sortBy(e.name, e.direction);
        });
      }
      if (dm.skip) {
        query.skip(dm.skip);
      }
      if (dm.take) {
        query.take(dm.take);
      }
      if (dm.group) {
        dm.group.filter(function(grp) {
          return query.group(grp);
        });
      }
      return query;
    };
    DataUtil3.getPredicate = function(pred) {
      var mainPred = [];
      for (var i = 0; i < pred.length; i++) {
        var e = pred[i];
        if (e.field) {
          mainPred.push(new Predicate2(e.field, e.operator, e.value, e.ignoreCase, e.ignoreAccent));
        } else {
          var childPred = [];
          var cpre = this.getPredicate(e.predicates);
          for (var _i = 0, _a = Object.keys(cpre); _i < _a.length; _i++) {
            var prop = _a[_i];
            childPred.push(cpre[prop]);
          }
          mainPred.push(e.condition === "or" ? Predicate2.or(childPred) : Predicate2.and(childPred));
        }
      }
      return mainPred;
    };
    DataUtil3.serverTimezoneOffset = null;
    DataUtil3.timeZoneHandling = true;
    DataUtil3.throwError = function(error) {
      try {
        throw new Error(error);
      } catch (e) {
        throw e.message + "\n" + e.stack;
      }
    };
    DataUtil3.aggregates = {
      /**
       * Calculate sum of the given field in the data.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      sum: function(ds, field) {
        var result = 0;
        var val;
        var castRequired = typeof DataUtil3.getVal(ds, 0, field) !== "number";
        for (var i = 0; i < ds.length; i++) {
          val = DataUtil3.getVal(ds, i, field);
          if (!isNaN(val) && val !== null) {
            if (castRequired) {
              val = +val;
            }
            result += val;
          }
        }
        return result;
      },
      /**
       * Calculate average value of the given field in the data.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      average: function(ds, field) {
        return DataUtil3.aggregates.sum(ds, field) / ds.length;
      },
      /**
       * Returns the min value of the data based on the field.
       *
       * @param  {Object[]} ds
       * @param  {string|Function} field
       */
      min: function(ds, field) {
        var comparer;
        if (typeof field === "function") {
          comparer = field;
          field = null;
        }
        return DataUtil3.getObject(field, DataUtil3.getItemFromComparer(ds, field, comparer || DataUtil3.fnAscending));
      },
      /**
       * Returns the max value of the data based on the field.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       * @returns number
       */
      max: function(ds, field) {
        var comparer;
        if (typeof field === "function") {
          comparer = field;
          field = null;
        }
        return DataUtil3.getObject(field, DataUtil3.getItemFromComparer(ds, field, comparer || DataUtil3.fnDescending));
      },
      /**
       * Returns the total number of true value present in the data based on the given boolean field name.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      truecount: function(ds, field) {
        return new DataManager2(ds).executeLocal(new Query2().where(field, "equal", true, true)).length;
      },
      /**
       * Returns the total number of false value present in the data based on the given boolean field name.
       *
       * @param  {Object[]} ds
       * @param  {string} field
       */
      falsecount: function(ds, field) {
        return new DataManager2(ds).executeLocal(new Query2().where(field, "equal", false, true)).length;
      },
      /**
       * Returns the length of the given data.
       *
       * @param {Object[]} ds
       * @param {string} field?
       * @param field
       * @returns number
       */
      count: function(ds, field) {
        return ds.length;
      }
    };
    DataUtil3.operatorSymbols = {
      "<": "lessthan",
      ">": "greaterthan",
      "<=": "lessthanorequal",
      ">=": "greaterthanorequal",
      "==": "equal",
      "!=": "notequal",
      "*=": "contains",
      "$=": "endswith",
      "^=": "startswith"
    };
    DataUtil3.odBiOperator = {
      "<": " lt ",
      ">": " gt ",
      "<=": " le ",
      ">=": " ge ",
      "==": " eq ",
      "!=": " ne ",
      "lessthan": " lt ",
      "lessthanorequal": " le ",
      "greaterthan": " gt ",
      "greaterthanorequal": " ge ",
      "equal": " eq ",
      "notequal": " ne "
    };
    DataUtil3.odUniOperator = {
      "$=": "endswith",
      "^=": "startswith",
      "*=": "substringof",
      "endswith": "endswith",
      "startswith": "startswith",
      "contains": "substringof",
      "doesnotendwith": "not endswith",
      "doesnotstartwith": "not startswith",
      "doesnotcontain": "not substringof",
      "wildcard": "wildcard",
      "like": "like"
    };
    DataUtil3.odv4UniOperator = {
      "$=": "endswith",
      "^=": "startswith",
      "*=": "contains",
      "endswith": "endswith",
      "startswith": "startswith",
      "contains": "contains",
      "doesnotendwith": "not endswith",
      "doesnotstartwith": "not startswith",
      "doesnotcontain": "not contains",
      "wildcard": "wildcard",
      "like": "like"
    };
    DataUtil3.diacritics = {
      "Ⓐ": "A",
      "Ａ": "A",
      "À": "A",
      "Á": "A",
      "Â": "A",
      "Ầ": "A",
      "Ấ": "A",
      "Ẫ": "A",
      "Ẩ": "A",
      "Ã": "A",
      "Ā": "A",
      "Ă": "A",
      "Ằ": "A",
      "Ắ": "A",
      "Ẵ": "A",
      "Ẳ": "A",
      "Ȧ": "A",
      "Ǡ": "A",
      "Ä": "A",
      "Ǟ": "A",
      "Ả": "A",
      "Å": "A",
      "Ǻ": "A",
      "Ǎ": "A",
      "Ȁ": "A",
      "Ȃ": "A",
      "Ạ": "A",
      "Ậ": "A",
      "Ặ": "A",
      "Ḁ": "A",
      "Ą": "A",
      "Ⱥ": "A",
      "Ɐ": "A",
      "Ꜳ": "AA",
      "Æ": "AE",
      "Ǽ": "AE",
      "Ǣ": "AE",
      "Ꜵ": "AO",
      "Ꜷ": "AU",
      "Ꜹ": "AV",
      "Ꜻ": "AV",
      "Ꜽ": "AY",
      "Ⓑ": "B",
      "Ｂ": "B",
      "Ḃ": "B",
      "Ḅ": "B",
      "Ḇ": "B",
      "Ƀ": "B",
      "Ƃ": "B",
      "Ɓ": "B",
      "Ⓒ": "C",
      "Ｃ": "C",
      "Ć": "C",
      "Ĉ": "C",
      "Ċ": "C",
      "Č": "C",
      "Ç": "C",
      "Ḉ": "C",
      "Ƈ": "C",
      "Ȼ": "C",
      "Ꜿ": "C",
      "Ⓓ": "D",
      "Ｄ": "D",
      "Ḋ": "D",
      "Ď": "D",
      "Ḍ": "D",
      "Ḑ": "D",
      "Ḓ": "D",
      "Ḏ": "D",
      "Đ": "D",
      "Ƌ": "D",
      "Ɗ": "D",
      "Ɖ": "D",
      "Ꝺ": "D",
      "Ǳ": "DZ",
      "Ǆ": "DZ",
      "ǲ": "Dz",
      "ǅ": "Dz",
      "Ⓔ": "E",
      "Ｅ": "E",
      "È": "E",
      "É": "E",
      "Ê": "E",
      "Ề": "E",
      "Ế": "E",
      "Ễ": "E",
      "Ể": "E",
      "Ẽ": "E",
      "Ē": "E",
      "Ḕ": "E",
      "Ḗ": "E",
      "Ĕ": "E",
      "Ė": "E",
      "Ë": "E",
      "Ẻ": "E",
      "Ě": "E",
      "Ȅ": "E",
      "Ȇ": "E",
      "Ẹ": "E",
      "Ệ": "E",
      "Ȩ": "E",
      "Ḝ": "E",
      "Ę": "E",
      "Ḙ": "E",
      "Ḛ": "E",
      "Ɛ": "E",
      "Ǝ": "E",
      "Ⓕ": "F",
      "Ｆ": "F",
      "Ḟ": "F",
      "Ƒ": "F",
      "Ꝼ": "F",
      "Ⓖ": "G",
      "Ｇ": "G",
      "Ǵ": "G",
      "Ĝ": "G",
      "Ḡ": "G",
      "Ğ": "G",
      "Ġ": "G",
      "Ǧ": "G",
      "Ģ": "G",
      "Ǥ": "G",
      "Ɠ": "G",
      "Ꞡ": "G",
      "Ᵹ": "G",
      "Ꝿ": "G",
      "Ⓗ": "H",
      "Ｈ": "H",
      "Ĥ": "H",
      "Ḣ": "H",
      "Ḧ": "H",
      "Ȟ": "H",
      "Ḥ": "H",
      "Ḩ": "H",
      "Ḫ": "H",
      "Ħ": "H",
      "Ⱨ": "H",
      "Ⱶ": "H",
      "Ɥ": "H",
      "Ⓘ": "I",
      "Ｉ": "I",
      "Ì": "I",
      "Í": "I",
      "Î": "I",
      "Ĩ": "I",
      "Ī": "I",
      "Ĭ": "I",
      "İ": "I",
      "Ï": "I",
      "Ḯ": "I",
      "Ỉ": "I",
      "Ǐ": "I",
      "Ȉ": "I",
      "Ȋ": "I",
      "Ị": "I",
      "Į": "I",
      "Ḭ": "I",
      "Ɨ": "I",
      "Ⓙ": "J",
      "Ｊ": "J",
      "Ĵ": "J",
      "Ɉ": "J",
      "Ⓚ": "K",
      "Ｋ": "K",
      "Ḱ": "K",
      "Ǩ": "K",
      "Ḳ": "K",
      "Ķ": "K",
      "Ḵ": "K",
      "Ƙ": "K",
      "Ⱪ": "K",
      "Ꝁ": "K",
      "Ꝃ": "K",
      "Ꝅ": "K",
      "Ꞣ": "K",
      "Ⓛ": "L",
      "Ｌ": "L",
      "Ŀ": "L",
      "Ĺ": "L",
      "Ľ": "L",
      "Ḷ": "L",
      "Ḹ": "L",
      "Ļ": "L",
      "Ḽ": "L",
      "Ḻ": "L",
      "Ł": "L",
      "Ƚ": "L",
      "Ɫ": "L",
      "Ⱡ": "L",
      "Ꝉ": "L",
      "Ꝇ": "L",
      "Ꞁ": "L",
      "Ǉ": "LJ",
      "ǈ": "Lj",
      "Ⓜ": "M",
      "Ｍ": "M",
      "Ḿ": "M",
      "Ṁ": "M",
      "Ṃ": "M",
      "Ɱ": "M",
      "Ɯ": "M",
      "Ⓝ": "N",
      "Ｎ": "N",
      "Ǹ": "N",
      "Ń": "N",
      "Ñ": "N",
      "Ṅ": "N",
      "Ň": "N",
      "Ṇ": "N",
      "Ņ": "N",
      "Ṋ": "N",
      "Ṉ": "N",
      "Ƞ": "N",
      "Ɲ": "N",
      "Ꞑ": "N",
      "Ꞥ": "N",
      "Ǌ": "NJ",
      "ǋ": "Nj",
      "Ⓞ": "O",
      "Ｏ": "O",
      "Ò": "O",
      "Ó": "O",
      "Ô": "O",
      "Ồ": "O",
      "Ố": "O",
      "Ỗ": "O",
      "Ổ": "O",
      "Õ": "O",
      "Ṍ": "O",
      "Ȭ": "O",
      "Ṏ": "O",
      "Ō": "O",
      "Ṑ": "O",
      "Ṓ": "O",
      "Ŏ": "O",
      "Ȯ": "O",
      "Ȱ": "O",
      "Ö": "O",
      "Ȫ": "O",
      "Ỏ": "O",
      "Ő": "O",
      "Ǒ": "O",
      "Ȍ": "O",
      "Ȏ": "O",
      "Ơ": "O",
      "Ờ": "O",
      "Ớ": "O",
      "Ỡ": "O",
      "Ở": "O",
      "Ợ": "O",
      "Ọ": "O",
      "Ộ": "O",
      "Ǫ": "O",
      "Ǭ": "O",
      "Ø": "O",
      "Ǿ": "O",
      "Ɔ": "O",
      "Ɵ": "O",
      "Ꝋ": "O",
      "Ꝍ": "O",
      "Ƣ": "OI",
      "Ꝏ": "OO",
      "Ȣ": "OU",
      "Ⓟ": "P",
      "Ｐ": "P",
      "Ṕ": "P",
      "Ṗ": "P",
      "Ƥ": "P",
      "Ᵽ": "P",
      "Ꝑ": "P",
      "Ꝓ": "P",
      "Ꝕ": "P",
      "Ⓠ": "Q",
      "Ｑ": "Q",
      "Ꝗ": "Q",
      "Ꝙ": "Q",
      "Ɋ": "Q",
      "Ⓡ": "R",
      "Ｒ": "R",
      "Ŕ": "R",
      "Ṙ": "R",
      "Ř": "R",
      "Ȑ": "R",
      "Ȓ": "R",
      "Ṛ": "R",
      "Ṝ": "R",
      "Ŗ": "R",
      "Ṟ": "R",
      "Ɍ": "R",
      "Ɽ": "R",
      "Ꝛ": "R",
      "Ꞧ": "R",
      "Ꞃ": "R",
      "Ⓢ": "S",
      "Ｓ": "S",
      "ẞ": "S",
      "Ś": "S",
      "Ṥ": "S",
      "Ŝ": "S",
      "Ṡ": "S",
      "Š": "S",
      "Ṧ": "S",
      "Ṣ": "S",
      "Ṩ": "S",
      "Ș": "S",
      "Ş": "S",
      "Ȿ": "S",
      "Ꞩ": "S",
      "Ꞅ": "S",
      "Ⓣ": "T",
      "Ｔ": "T",
      "Ṫ": "T",
      "Ť": "T",
      "Ṭ": "T",
      "Ț": "T",
      "Ţ": "T",
      "Ṱ": "T",
      "Ṯ": "T",
      "Ŧ": "T",
      "Ƭ": "T",
      "Ʈ": "T",
      "Ⱦ": "T",
      "Ꞇ": "T",
      "Ꜩ": "TZ",
      "Ⓤ": "U",
      "Ｕ": "U",
      "Ù": "U",
      "Ú": "U",
      "Û": "U",
      "Ũ": "U",
      "Ṹ": "U",
      "Ū": "U",
      "Ṻ": "U",
      "Ŭ": "U",
      "Ü": "U",
      "Ǜ": "U",
      "Ǘ": "U",
      "Ǖ": "U",
      "Ǚ": "U",
      "Ủ": "U",
      "Ů": "U",
      "Ű": "U",
      "Ǔ": "U",
      "Ȕ": "U",
      "Ȗ": "U",
      "Ư": "U",
      "Ừ": "U",
      "Ứ": "U",
      "Ữ": "U",
      "Ử": "U",
      "Ự": "U",
      "Ụ": "U",
      "Ṳ": "U",
      "Ų": "U",
      "Ṷ": "U",
      "Ṵ": "U",
      "Ʉ": "U",
      "Ⓥ": "V",
      "Ｖ": "V",
      "Ṽ": "V",
      "Ṿ": "V",
      "Ʋ": "V",
      "Ꝟ": "V",
      "Ʌ": "V",
      "Ꝡ": "VY",
      "Ⓦ": "W",
      "Ｗ": "W",
      "Ẁ": "W",
      "Ẃ": "W",
      "Ŵ": "W",
      "Ẇ": "W",
      "Ẅ": "W",
      "Ẉ": "W",
      "Ⱳ": "W",
      "Ⓧ": "X",
      "Ｘ": "X",
      "Ẋ": "X",
      "Ẍ": "X",
      "Ⓨ": "Y",
      "Ｙ": "Y",
      "Ỳ": "Y",
      "Ý": "Y",
      "Ŷ": "Y",
      "Ỹ": "Y",
      "Ȳ": "Y",
      "Ẏ": "Y",
      "Ÿ": "Y",
      "Ỷ": "Y",
      "Ỵ": "Y",
      "Ƴ": "Y",
      "Ɏ": "Y",
      "Ỿ": "Y",
      "Ⓩ": "Z",
      "Ｚ": "Z",
      "Ź": "Z",
      "Ẑ": "Z",
      "Ż": "Z",
      "Ž": "Z",
      "Ẓ": "Z",
      "Ẕ": "Z",
      "Ƶ": "Z",
      "Ȥ": "Z",
      "Ɀ": "Z",
      "Ⱬ": "Z",
      "Ꝣ": "Z",
      "ⓐ": "a",
      "ａ": "a",
      "ẚ": "a",
      "à": "a",
      "á": "a",
      "â": "a",
      "ầ": "a",
      "ấ": "a",
      "ẫ": "a",
      "ẩ": "a",
      "ã": "a",
      "ā": "a",
      "ă": "a",
      "ằ": "a",
      "ắ": "a",
      "ẵ": "a",
      "ẳ": "a",
      "ȧ": "a",
      "ǡ": "a",
      "ä": "a",
      "ǟ": "a",
      "ả": "a",
      "å": "a",
      "ǻ": "a",
      "ǎ": "a",
      "ȁ": "a",
      "ȃ": "a",
      "ạ": "a",
      "ậ": "a",
      "ặ": "a",
      "ḁ": "a",
      "ą": "a",
      "ⱥ": "a",
      "ɐ": "a",
      "ꜳ": "aa",
      "æ": "ae",
      "ǽ": "ae",
      "ǣ": "ae",
      "ꜵ": "ao",
      "ꜷ": "au",
      "ꜹ": "av",
      "ꜻ": "av",
      "ꜽ": "ay",
      "ⓑ": "b",
      "ｂ": "b",
      "ḃ": "b",
      "ḅ": "b",
      "ḇ": "b",
      "ƀ": "b",
      "ƃ": "b",
      "ɓ": "b",
      "ⓒ": "c",
      "ｃ": "c",
      "ć": "c",
      "ĉ": "c",
      "ċ": "c",
      "č": "c",
      "ç": "c",
      "ḉ": "c",
      "ƈ": "c",
      "ȼ": "c",
      "ꜿ": "c",
      "ↄ": "c",
      "ⓓ": "d",
      "ｄ": "d",
      "ḋ": "d",
      "ď": "d",
      "ḍ": "d",
      "ḑ": "d",
      "ḓ": "d",
      "ḏ": "d",
      "đ": "d",
      "ƌ": "d",
      "ɖ": "d",
      "ɗ": "d",
      "ꝺ": "d",
      "ǳ": "dz",
      "ǆ": "dz",
      "ⓔ": "e",
      "ｅ": "e",
      "è": "e",
      "é": "e",
      "ê": "e",
      "ề": "e",
      "ế": "e",
      "ễ": "e",
      "ể": "e",
      "ẽ": "e",
      "ē": "e",
      "ḕ": "e",
      "ḗ": "e",
      "ĕ": "e",
      "ė": "e",
      "ë": "e",
      "ẻ": "e",
      "ě": "e",
      "ȅ": "e",
      "ȇ": "e",
      "ẹ": "e",
      "ệ": "e",
      "ȩ": "e",
      "ḝ": "e",
      "ę": "e",
      "ḙ": "e",
      "ḛ": "e",
      "ɇ": "e",
      "ɛ": "e",
      "ǝ": "e",
      "ⓕ": "f",
      "ｆ": "f",
      "ḟ": "f",
      "ƒ": "f",
      "ꝼ": "f",
      "ⓖ": "g",
      "ｇ": "g",
      "ǵ": "g",
      "ĝ": "g",
      "ḡ": "g",
      "ğ": "g",
      "ġ": "g",
      "ǧ": "g",
      "ģ": "g",
      "ǥ": "g",
      "ɠ": "g",
      "ꞡ": "g",
      "ᵹ": "g",
      "ꝿ": "g",
      "ⓗ": "h",
      "ｈ": "h",
      "ĥ": "h",
      "ḣ": "h",
      "ḧ": "h",
      "ȟ": "h",
      "ḥ": "h",
      "ḩ": "h",
      "ḫ": "h",
      "ẖ": "h",
      "ħ": "h",
      "ⱨ": "h",
      "ⱶ": "h",
      "ɥ": "h",
      "ƕ": "hv",
      "ⓘ": "i",
      "ｉ": "i",
      "ì": "i",
      "í": "i",
      "î": "i",
      "ĩ": "i",
      "ī": "i",
      "ĭ": "i",
      "ï": "i",
      "ḯ": "i",
      "ỉ": "i",
      "ǐ": "i",
      "ȉ": "i",
      "ȋ": "i",
      "ị": "i",
      "į": "i",
      "ḭ": "i",
      "ɨ": "i",
      "ı": "i",
      "ⓙ": "j",
      "ｊ": "j",
      "ĵ": "j",
      "ǰ": "j",
      "ɉ": "j",
      "ⓚ": "k",
      "ｋ": "k",
      "ḱ": "k",
      "ǩ": "k",
      "ḳ": "k",
      "ķ": "k",
      "ḵ": "k",
      "ƙ": "k",
      "ⱪ": "k",
      "ꝁ": "k",
      "ꝃ": "k",
      "ꝅ": "k",
      "ꞣ": "k",
      "ⓛ": "l",
      "ｌ": "l",
      "ŀ": "l",
      "ĺ": "l",
      "ľ": "l",
      "ḷ": "l",
      "ḹ": "l",
      "ļ": "l",
      "ḽ": "l",
      "ḻ": "l",
      "ſ": "l",
      "ł": "l",
      "ƚ": "l",
      "ɫ": "l",
      "ⱡ": "l",
      "ꝉ": "l",
      "ꞁ": "l",
      "ꝇ": "l",
      "ǉ": "lj",
      "ⓜ": "m",
      "ｍ": "m",
      "ḿ": "m",
      "ṁ": "m",
      "ṃ": "m",
      "ɱ": "m",
      "ɯ": "m",
      "ⓝ": "n",
      "ｎ": "n",
      "ǹ": "n",
      "ń": "n",
      "ñ": "n",
      "ṅ": "n",
      "ň": "n",
      "ṇ": "n",
      "ņ": "n",
      "ṋ": "n",
      "ṉ": "n",
      "ƞ": "n",
      "ɲ": "n",
      "ŉ": "n",
      "ꞑ": "n",
      "ꞥ": "n",
      "ǌ": "nj",
      "ⓞ": "o",
      "ｏ": "o",
      "ò": "o",
      "ó": "o",
      "ô": "o",
      "ồ": "o",
      "ố": "o",
      "ỗ": "o",
      "ổ": "o",
      "õ": "o",
      "ṍ": "o",
      "ȭ": "o",
      "ṏ": "o",
      "ō": "o",
      "ṑ": "o",
      "ṓ": "o",
      "ŏ": "o",
      "ȯ": "o",
      "ȱ": "o",
      "ö": "o",
      "ȫ": "o",
      "ỏ": "o",
      "ő": "o",
      "ǒ": "o",
      "ȍ": "o",
      "ȏ": "o",
      "ơ": "o",
      "ờ": "o",
      "ớ": "o",
      "ỡ": "o",
      "ở": "o",
      "ợ": "o",
      "ọ": "o",
      "ộ": "o",
      "ǫ": "o",
      "ǭ": "o",
      "ø": "o",
      "ǿ": "o",
      "ɔ": "o",
      "ꝋ": "o",
      "ꝍ": "o",
      "ɵ": "o",
      "ƣ": "oi",
      "ȣ": "ou",
      "ꝏ": "oo",
      "ⓟ": "p",
      "ｐ": "p",
      "ṕ": "p",
      "ṗ": "p",
      "ƥ": "p",
      "ᵽ": "p",
      "ꝑ": "p",
      "ꝓ": "p",
      "ꝕ": "p",
      "ⓠ": "q",
      "ｑ": "q",
      "ɋ": "q",
      "ꝗ": "q",
      "ꝙ": "q",
      "ⓡ": "r",
      "ｒ": "r",
      "ŕ": "r",
      "ṙ": "r",
      "ř": "r",
      "ȑ": "r",
      "ȓ": "r",
      "ṛ": "r",
      "ṝ": "r",
      "ŗ": "r",
      "ṟ": "r",
      "ɍ": "r",
      "ɽ": "r",
      "ꝛ": "r",
      "ꞧ": "r",
      "ꞃ": "r",
      "ⓢ": "s",
      "ｓ": "s",
      "ß": "s",
      "ś": "s",
      "ṥ": "s",
      "ŝ": "s",
      "ṡ": "s",
      "š": "s",
      "ṧ": "s",
      "ṣ": "s",
      "ṩ": "s",
      "ș": "s",
      "ş": "s",
      "ȿ": "s",
      "ꞩ": "s",
      "ꞅ": "s",
      "ẛ": "s",
      "ⓣ": "t",
      "ｔ": "t",
      "ṫ": "t",
      "ẗ": "t",
      "ť": "t",
      "ṭ": "t",
      "ț": "t",
      "ţ": "t",
      "ṱ": "t",
      "ṯ": "t",
      "ŧ": "t",
      "ƭ": "t",
      "ʈ": "t",
      "ⱦ": "t",
      "ꞇ": "t",
      "ꜩ": "tz",
      "ⓤ": "u",
      "ｕ": "u",
      "ù": "u",
      "ú": "u",
      "û": "u",
      "ũ": "u",
      "ṹ": "u",
      "ū": "u",
      "ṻ": "u",
      "ŭ": "u",
      "ü": "u",
      "ǜ": "u",
      "ǘ": "u",
      "ǖ": "u",
      "ǚ": "u",
      "ủ": "u",
      "ů": "u",
      "ű": "u",
      "ǔ": "u",
      "ȕ": "u",
      "ȗ": "u",
      "ư": "u",
      "ừ": "u",
      "ứ": "u",
      "ữ": "u",
      "ử": "u",
      "ự": "u",
      "ụ": "u",
      "ṳ": "u",
      "ų": "u",
      "ṷ": "u",
      "ṵ": "u",
      "ʉ": "u",
      "ⓥ": "v",
      "ｖ": "v",
      "ṽ": "v",
      "ṿ": "v",
      "ʋ": "v",
      "ꝟ": "v",
      "ʌ": "v",
      "ꝡ": "vy",
      "ⓦ": "w",
      "ｗ": "w",
      "ẁ": "w",
      "ẃ": "w",
      "ŵ": "w",
      "ẇ": "w",
      "ẅ": "w",
      "ẘ": "w",
      "ẉ": "w",
      "ⱳ": "w",
      "ⓧ": "x",
      "ｘ": "x",
      "ẋ": "x",
      "ẍ": "x",
      "ⓨ": "y",
      "ｙ": "y",
      "ỳ": "y",
      "ý": "y",
      "ŷ": "y",
      "ỹ": "y",
      "ȳ": "y",
      "ẏ": "y",
      "ÿ": "y",
      "ỷ": "y",
      "ẙ": "y",
      "ỵ": "y",
      "ƴ": "y",
      "ɏ": "y",
      "ỿ": "y",
      "ⓩ": "z",
      "ｚ": "z",
      "ź": "z",
      "ẑ": "z",
      "ż": "z",
      "ž": "z",
      "ẓ": "z",
      "ẕ": "z",
      "ƶ": "z",
      "ȥ": "z",
      "ɀ": "z",
      "ⱬ": "z",
      "ꝣ": "z",
      "Ά": "Α",
      "Έ": "Ε",
      "Ή": "Η",
      "Ί": "Ι",
      "Ϊ": "Ι",
      "Ό": "Ο",
      "Ύ": "Υ",
      "Ϋ": "Υ",
      "Ώ": "Ω",
      "ά": "α",
      "έ": "ε",
      "ή": "η",
      "ί": "ι",
      "ϊ": "ι",
      "ΐ": "ι",
      "ό": "ο",
      "ύ": "υ",
      "ϋ": "υ",
      "ΰ": "υ",
      "ω": "ω",
      "ς": "σ"
    };
    DataUtil3.fnOperators = {
      /**
       * Returns true when the actual input is equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param {boolean} ignoreAccent?
       * @param ignoreCase
       * @param ignoreAccent
       */
      equal: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) === DataUtil3.toLowerCase(expected);
        }
        return actual === expected;
      },
      /**
       * Returns true when the actual input is not equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      notequal: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        return !DataUtil3.fnOperators.equal(actual, expected, ignoreCase);
      },
      /**
       * Returns true when the actual input is less than to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      lessthan: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) < DataUtil3.toLowerCase(expected);
        }
        if (isNullOrUndefined3(actual)) {
          actual = void 0;
        }
        return actual < expected;
      },
      /**
       * Returns true when the actual input is greater than to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      greaterthan: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) > DataUtil3.toLowerCase(expected);
        }
        return actual > expected;
      },
      /**
       * Returns true when the actual input is less than or equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      lessthanorequal: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) <= DataUtil3.toLowerCase(expected);
        }
        if (isNullOrUndefined3(actual)) {
          actual = void 0;
        }
        return actual <= expected;
      },
      /**
       * Returns true when the actual input is greater than or equal to the given input.
       *
       * @param {string|number|boolean} actual
       * @param {string|number|boolean} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       */
      greaterthanorequal: function(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil3.toLowerCase(actual) >= DataUtil3.toLowerCase(expected);
        }
        return actual >= expected;
      },
      /**
       * Returns true when the actual input contains the given string.
       *
       * @param {string|number} actual
       * @param {string|number} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      contains: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return !isNullOrUndefined3(actual) && !isNullOrUndefined3(expected) && DataUtil3.toLowerCase(actual).indexOf(DataUtil3.toLowerCase(expected)) !== -1;
        }
        return !isNullOrUndefined3(actual) && !isNullOrUndefined3(expected) && actual.toString().indexOf(expected) !== -1;
      },
      /**
       * Returns true when the actual input not contains the given string.
       *
       * @param  {string|number} actual
       * @param  {string|number} expected
       * @param  {boolean} ignoreCase?
       */
      doesnotcontain: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return !isNullOrUndefined3(actual) && !isNullOrUndefined3(expected) && DataUtil3.toLowerCase(actual).indexOf(DataUtil3.toLowerCase(expected)) === -1;
        }
        return !isNullOrUndefined3(actual) && !isNullOrUndefined3(expected) && actual.toString().indexOf(expected) === -1;
      },
      /**
       * Returns true when the given input value is not null.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isnotnull: function(actual) {
        return actual !== null && actual !== void 0;
      },
      /**
       * Returns true when the given input value is null.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isnull: function(actual) {
        return actual === null || actual === void 0;
      },
      /**
       * Returns true when the actual input starts with the given string
       *
       * @param {string} actual
       * @param {string} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      startswith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.startsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.startsWith(actual, expected);
      },
      /**
       * Returns true when the actual input not starts with the given string
       *
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      doesnotstartwith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.notStartsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.notStartsWith(actual, expected);
      },
      /**
       * Returns true when the actual input like with the given string.
       *
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      like: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.like(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.like(actual, expected);
      },
      /**
       * Returns true when the given input value is empty.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isempty: function(actual) {
        return actual === void 0 || actual === "";
      },
      /**
       * Returns true when the given input value is not empty.
       *
       * @param  {string|number} actual
       * @returns boolean
       */
      isnotempty: function(actual) {
        return actual !== void 0 && actual !== "";
      },
      /**
       * Returns true when the actual input pattern(wildcard) matches with the given string.
       *
       * @param  {string|Date} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      wildcard: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return (actual || typeof actual === "boolean") && expected && typeof actual !== "object" && DataUtil3.wildCard(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return (actual || typeof actual === "boolean") && expected && DataUtil3.wildCard(actual, expected);
      },
      /**
       * Returns true when the actual input ends with the given string.
       *
       * @param {string} actual
       * @param {string} expected
       * @param {boolean} ignoreCase?
       * @param ignoreCase
       * @param ignoreAccent
       */
      endswith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.endsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.endsWith(actual, expected);
      },
      /**
       * Returns true when the actual input not ends with the given string.
       *
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      doesnotendwith: function(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil3.ignoreDiacritics(actual);
          expected = DataUtil3.ignoreDiacritics(expected);
        }
        if (ignoreCase) {
          return actual && expected && DataUtil3.notEndsWith(DataUtil3.toLowerCase(actual), DataUtil3.toLowerCase(expected));
        }
        return actual && expected && DataUtil3.notEndsWith(actual, expected);
      },
      /**
       * It will return the filter operator based on the filter symbol.
       *
       * @param  {string} operator
       * @hidden
       */
      processSymbols: function(operator) {
        var fnName = DataUtil3.operatorSymbols[operator];
        if (fnName) {
          var fn = DataUtil3.fnOperators[fnName];
          return fn;
        }
        return DataUtil3.throwError("Query - Process Operator : Invalid operator");
      },
      /**
       * It will return the valid filter operator based on the specified operators.
       *
       * @param  {string} operator
       * @hidden
       */
      processOperator: function(operator) {
        var fn = DataUtil3.fnOperators[operator];
        if (fn) {
          return fn;
        }
        return DataUtil3.fnOperators.processSymbols(operator);
      }
    };
    DataUtil3.parse = {
      /**
       * Parse the given string to the plain JavaScript object.
       *
       * @param  {string|Object|Object[]} jsonText
       */
      parseJson: function(jsonText) {
        if (typeof jsonText === "string" && (/^[\s]*\[|^[\s]*\{(.)+:/g.test(jsonText) || jsonText.indexOf('"') === -1)) {
          jsonText = JSON.parse(jsonText, DataUtil3.parse.jsonReviver);
        } else if (jsonText instanceof Array) {
          DataUtil3.parse.iterateAndReviveArray(jsonText);
        } else if (typeof jsonText === "object" && jsonText !== null) {
          DataUtil3.parse.iterateAndReviveJson(jsonText);
        }
        return jsonText;
      },
      /**
       * It will perform on array of values.
       *
       * @param  {string[]|Object[]} array
       * @hidden
       */
      iterateAndReviveArray: function(array) {
        for (var i = 0; i < array.length; i++) {
          if (typeof array[i] === "object" && array[i] !== null) {
            DataUtil3.parse.iterateAndReviveJson(array[i]);
          } else if (typeof array[i] === "string" && (!/^[\s]*\[|^[\s]*\{(.)+:|\"/g.test(array[i]) || array[i].toString().indexOf('"') === -1)) {
            array[i] = DataUtil3.parse.jsonReviver("", array[i]);
          } else {
            array[i] = DataUtil3.parse.parseJson(array[i]);
          }
        }
      },
      /**
       * It will perform on JSON values
       *
       * @param  {JSON} json
       * @hidden
       */
      iterateAndReviveJson: function(json) {
        var value;
        var keys4 = Object.keys(json);
        for (var _i = 0, keys_2 = keys4; _i < keys_2.length; _i++) {
          var prop = keys_2[_i];
          if (DataUtil3.startsWith(prop, "__")) {
            continue;
          }
          value = json[prop];
          if (typeof value === "object") {
            if (value instanceof Array) {
              DataUtil3.parse.iterateAndReviveArray(value);
            } else if (value) {
              DataUtil3.parse.iterateAndReviveJson(value);
            }
          } else {
            json[prop] = DataUtil3.parse.jsonReviver(json[prop], value);
          }
        }
      },
      /**
       * It will perform on JSON values
       *
       * @param  {string} field
       * @param  {string|Date} value
       * @hidden
       */
      jsonReviver: function(field, value) {
        if (typeof value === "string") {
          var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
          var offSet = DataUtil3.timeZoneHandling ? DataUtil3.serverTimezoneOffset : null;
          if (ms) {
            return DataUtil3.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), offSet, true);
          } else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
            var isUTC = value.indexOf("Z") > -1 || value.indexOf("z") > -1;
            var arr = value.split(/[^0-9.]/);
            if (isUTC) {
              if (arr[5].indexOf(".") > -1) {
                var secondsMs = arr[5].split(".");
                arr[5] = secondsMs[0];
                arr[6] = new Date(value).getUTCMilliseconds().toString();
              } else {
                arr[6] = "00";
              }
              value = DataUtil3.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5] ? arr[5] : "00", 10), parseInt(arr[6], 10)), DataUtil3.serverTimezoneOffset, false);
            } else {
              var utcFormat = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5] ? arr[5] : "00", 10));
              var hrs = parseInt(arr[6], 10);
              var mins = parseInt(arr[7], 10);
              if (isNaN(hrs) && isNaN(mins)) {
                return utcFormat;
              }
              if (value.indexOf("+") > -1) {
                utcFormat.setHours(utcFormat.getHours() - hrs, utcFormat.getMinutes() - mins);
              } else {
                utcFormat.setHours(utcFormat.getHours() + hrs, utcFormat.getMinutes() + mins);
              }
              value = DataUtil3.dateParse.toTimeZone(utcFormat, DataUtil3.serverTimezoneOffset, false);
            }
            if (DataUtil3.serverTimezoneOffset == null) {
              value = DataUtil3.dateParse.addSelfOffset(value);
            }
          }
        }
        return value;
      },
      /**
       * Check wheather the given value is JSON or not.
       *
       * @param  {Object[]} jsonData
       */
      isJson: function(jsonData) {
        if (typeof jsonData[0] === "string") {
          return jsonData;
        }
        return DataUtil3.parse.parseJson(jsonData);
      },
      /**
       * Checks wheather the given value is GUID or not.
       *
       * @param  {string} value
       */
      isGuid: function(value) {
        var regex2 = /[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i;
        var match = regex2.exec(value);
        return match != null;
      },
      /**
       * The method used to replace the value based on the type.
       *
       * @param  {Object} value
       * @param  {boolean} stringify
       * @hidden
       */
      replacer: function(value, stringify) {
        if (DataUtil3.isPlainObject(value)) {
          return DataUtil3.parse.jsonReplacer(value, stringify);
        }
        if (value instanceof Array) {
          return DataUtil3.parse.arrayReplacer(value);
        }
        if (value instanceof Date) {
          return DataUtil3.parse.jsonReplacer({
            val: value
          }, stringify).val;
        }
        return value;
      },
      /**
       * It will replace the JSON value.
       *
       * @param {string} key
       * @param {Object} val
       * @param stringify
       * @hidden
       */
      jsonReplacer: function(val, stringify) {
        var value;
        var keys4 = Object.keys(val);
        for (var _i = 0, keys_3 = keys4; _i < keys_3.length; _i++) {
          var prop = keys_3[_i];
          value = val[prop];
          if (!(value instanceof Date)) {
            continue;
          }
          var d = value;
          if (DataUtil3.serverTimezoneOffset == null) {
            val[prop] = DataUtil3.dateParse.toTimeZone(d, null).toJSON();
          } else {
            d = new Date(+d + DataUtil3.serverTimezoneOffset * 36e5);
            val[prop] = DataUtil3.dateParse.toTimeZone(DataUtil3.dateParse.addSelfOffset(d), null).toJSON();
          }
        }
        return val;
      },
      /**
       * It will replace the Array of value.
       *
       * @param  {string} key
       * @param  {Object[]} val
       * @hidden
       */
      arrayReplacer: function(val) {
        for (var i = 0; i < val.length; i++) {
          if (DataUtil3.isPlainObject(val[i])) {
            val[i] = DataUtil3.parse.jsonReplacer(val[i]);
          } else if (val[i] instanceof Date) {
            val[i] = DataUtil3.parse.jsonReplacer({
              date: val[i]
            }).date;
          }
        }
        return val;
      },
      /**
       * It will replace the Date object with respective to UTC format value.
       *
       * @param  {string} key
       * @param  {any} value
       * @hidden
       */
      /* eslint-disable @typescript-eslint/no-explicit-any */
      /* tslint:disable-next-line:no-any */
      jsonDateReplacer: function(key, value) {
        if (key === "value" && value) {
          if (typeof value === "string") {
            var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
            if (ms) {
              value = DataUtil3.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), null, true);
            } else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
              var arr = value.split(/[^0-9]/);
              value = DataUtil3.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), null, true);
            }
          }
          if (value instanceof Date) {
            value = DataUtil3.dateParse.addSelfOffset(value);
            if (DataUtil3.serverTimezoneOffset === null) {
              return DataUtil3.dateParse.toTimeZone(DataUtil3.dateParse.addSelfOffset(value), null).toJSON();
            } else {
              value = DataUtil3.dateParse.toTimeZone(value, value.getTimezoneOffset() / 60 - DataUtil3.serverTimezoneOffset, false);
              return value.toJSON();
            }
          }
        }
        return value;
      }
    };
    DataUtil3.dateParse = {
      addSelfOffset: function(input2) {
        return new Date(+input2 - input2.getTimezoneOffset() * 6e4);
      },
      toUTC: function(input2) {
        return new Date(+input2 + input2.getTimezoneOffset() * 6e4);
      },
      toTimeZone: function(input2, offset, utc) {
        if (offset === null) {
          return input2;
        }
        var unix = utc ? DataUtil3.dateParse.toUTC(input2) : input2;
        return new Date(+unix - offset * 36e5);
      },
      toLocalTime: function(input2) {
        var datefn = input2;
        var timeZone = -datefn.getTimezoneOffset();
        var differenceString = timeZone >= 0 ? "+" : "-";
        var localtimefn = function(num) {
          var norm = Math.floor(Math.abs(num));
          return (norm < 10 ? "0" : "") + norm;
        };
        var val = datefn.getFullYear() + "-" + localtimefn(datefn.getMonth() + 1) + "-" + localtimefn(datefn.getDate()) + "T" + localtimefn(datefn.getHours()) + ":" + localtimefn(datefn.getMinutes()) + ":" + localtimefn(datefn.getSeconds()) + differenceString + localtimefn(timeZone / 60) + ":" + localtimefn(timeZone % 60);
        return val;
      }
    };
    return DataUtil3;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-data/src/adaptors.js
var __extends37 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var consts4 = {
  GroupGuid: "{271bbba0-1ee7}"
};
var Adaptor2 = (
  /** @class */
  function() {
    function Adaptor3(ds) {
      this.options = {
        from: "table",
        requestType: "json",
        sortBy: "sorted",
        select: "select",
        skip: "skip",
        group: "group",
        take: "take",
        search: "search",
        count: "requiresCounts",
        where: "where",
        aggregates: "aggregates",
        expand: "expand"
      };
      this.type = Adaptor3;
      this.dataSource = ds;
      this.pvt = {};
    }
    Adaptor3.prototype.processResponse = function(data, ds, query, xhr) {
      return data;
    };
    return Adaptor3;
  }()
);
var JsonAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(JsonAdaptor3, _super);
    function JsonAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    JsonAdaptor3.prototype.processQuery = function(dataManager, query) {
      var result = dataManager.dataSource.json.slice(0);
      var count = result.length;
      var countFlg = true;
      var ret;
      var key;
      var lazyLoad = {};
      var keyCount = 0;
      var group = [];
      var sort = [];
      var page;
      for (var i = 0; i < query.lazyLoad.length; i++) {
        keyCount++;
        lazyLoad[query.lazyLoad[i].key] = query.lazyLoad[i].value;
      }
      var agg = {};
      var isGroupByFormat = false;
      if (query.lazyLoad.length) {
        for (var i = 0; i < query.queries.length; i++) {
          key = query.queries[i];
          if (key.fn === "onGroup" && !isNullOrUndefined3(key.e.format)) {
            isGroupByFormat = true;
            break;
          }
        }
      }
      for (var i = 0; i < query.queries.length; i++) {
        key = query.queries[i];
        if ((key.fn === "onPage" || key.fn === "onGroup" || key.fn === "onSortBy" && !isGroupByFormat) && query.lazyLoad.length) {
          if (key.fn === "onGroup") {
            group.push(key.e);
          }
          if (key.fn === "onPage") {
            page = key.e;
          }
          if (key.fn === "onSortBy") {
            sort.unshift(key.e);
          }
          continue;
        }
        ret = this[key.fn].call(this, result, key.e, query);
        if (key.fn === "onAggregates") {
          agg[key.e.field + " - " + key.e.type] = ret;
        } else {
          result = ret !== void 0 ? ret : result;
        }
        if (key.fn === "onPage" || key.fn === "onSkip" || key.fn === "onTake" || key.fn === "onRange") {
          countFlg = false;
        }
        if (countFlg) {
          count = result.length;
        }
      }
      if (keyCount) {
        var args = {
          query,
          lazyLoad,
          result,
          group,
          page,
          sort
        };
        var lazyLoadData = this.lazyLoadGroup(args);
        result = lazyLoadData.result;
        count = lazyLoadData.count;
      }
      if (query.isCountRequired) {
        result = {
          result,
          count,
          aggregates: agg
        };
      }
      return result;
    };
    JsonAdaptor3.prototype.lazyLoadGroup = function(args) {
      var count = 0;
      var agg = this.getAggregate(args.query);
      var result = args.result;
      if (!isNullOrUndefined3(args.lazyLoad.onDemandGroupInfo)) {
        var req = args.lazyLoad.onDemandGroupInfo;
        for (var i = req.where.length - 1; i >= 0; i--) {
          result = this.onWhere(result, req.where[i]);
        }
        if (args.group.length !== req.level) {
          var field = args.group[req.level].fieldName;
          result = DataUtil2.group(result, field, agg, null, null, args.group[req.level].comparer, true);
          if (args.sort.length) {
            result = this.onSortBy(result, args.sort[parseInt(req.level.toString(), 10)], args.query, true);
          }
        } else {
          for (var i = args.sort.length - 1; i >= req.level; i--) {
            result = this.onSortBy(result, args.sort[parseInt(i.toString(), 10)], args.query, false);
          }
        }
        count = result.length;
        var data = result;
        result = result.slice(req.skip);
        result = result.slice(0, req.take);
        if (args.group.length !== req.level) {
          this.formGroupResult(result, data);
        }
      } else {
        var field_1 = args.group[0].fieldName;
        result = DataUtil2.group(result, field_1, agg, null, null, args.group[0].comparer, true);
        count = result.length;
        var data = result;
        if (args.sort.length) {
          var sort = args.sort.length > 1 ? args.sort.filter(function(x) {
            return x.fieldName === field_1;
          })[0] : args.sort[0];
          result = this.onSortBy(result, sort, args.query, true);
        }
        if (args.page) {
          result = this.onPage(result, args.page, args.query);
        }
        this.formGroupResult(result, data);
      }
      return {
        result,
        count
      };
    };
    JsonAdaptor3.prototype.formGroupResult = function(result, data) {
      if (result.length && data.length) {
        var uid3 = "GroupGuid";
        var childLevel = "childLevels";
        var level = "level";
        var records = "records";
        result[uid3] = data[uid3];
        result[childLevel] = data[childLevel];
        result[level] = data[level];
        result[records] = data[records];
      }
      return result;
    };
    JsonAdaptor3.prototype.getAggregate = function(query) {
      var aggQuery = Query2.filterQueries(query.queries, "onAggregates");
      var agg = [];
      if (aggQuery.length) {
        var tmp = void 0;
        for (var i = 0; i < aggQuery.length; i++) {
          tmp = aggQuery[i].e;
          agg.push({
            type: tmp.type,
            field: DataUtil2.getValue(tmp.field, query)
          });
        }
      }
      return agg;
    };
    JsonAdaptor3.prototype.batchRequest = function(dm, changes, e) {
      var i;
      var deletedRecordsLen = changes.deletedRecords.length;
      for (i = 0; i < changes.addedRecords.length; i++) {
        this.insert(dm, changes.addedRecords[i]);
      }
      for (i = 0; i < changes.changedRecords.length; i++) {
        this.update(dm, e.key, changes.changedRecords[i]);
      }
      for (i = 0; i < deletedRecordsLen; i++) {
        this.remove(dm, e.key, changes.deletedRecords[i]);
      }
      return changes;
    };
    JsonAdaptor3.prototype.onWhere = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.filter(function(obj) {
        if (e) {
          return e.validate(obj);
        }
      });
    };
    JsonAdaptor3.prototype.onAggregates = function(ds, e) {
      var fn = DataUtil2.aggregates[e.type];
      if (!ds || !fn || ds.length === 0) {
        return null;
      }
      return fn(ds, e.field);
    };
    JsonAdaptor3.prototype.onSearch = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      if (e.fieldNames.length === 0) {
        DataUtil2.getFieldList(ds[0], e.fieldNames);
      }
      return ds.filter(function(obj) {
        for (var j = 0; j < e.fieldNames.length; j++) {
          if (e.comparer.call(obj, DataUtil2.getObject(e.fieldNames[j], obj), e.searchKey, e.ignoreCase, e.ignoreAccent)) {
            return true;
          }
        }
        return false;
      });
    };
    JsonAdaptor3.prototype.onSortBy = function(ds, e, query, isLazyLoadGroupSort) {
      if (!ds || !ds.length) {
        return ds;
      }
      var fnCompare;
      var field = DataUtil2.getValue(e.fieldName, query);
      if (!field) {
        return ds.sort(e.comparer);
      }
      if (field instanceof Array) {
        field = field.slice(0);
        for (var i = field.length - 1; i >= 0; i--) {
          if (!field[i]) {
            continue;
          }
          fnCompare = e.comparer;
          if (DataUtil2.endsWith(field[i], " desc")) {
            fnCompare = DataUtil2.fnSort("descending");
            field[i] = field[i].replace(" desc", "");
          }
          ds = DataUtil2.sort(ds, field[i], fnCompare);
        }
        return ds;
      }
      return DataUtil2.sort(ds, isLazyLoadGroupSort ? "key" : field, e.comparer);
    };
    JsonAdaptor3.prototype.onGroup = function(ds, e, query) {
      if (!ds || !ds.length) {
        return ds;
      }
      var agg = this.getAggregate(query);
      return DataUtil2.group(ds, DataUtil2.getValue(e.fieldName, query), agg, null, null, e.comparer);
    };
    JsonAdaptor3.prototype.onPage = function(ds, e, query) {
      var size = DataUtil2.getValue(e.pageSize, query);
      var start = (DataUtil2.getValue(e.pageIndex, query) - 1) * size;
      var end = start + size;
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(start, end);
    };
    JsonAdaptor3.prototype.onRange = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(DataUtil2.getValue(e.start), DataUtil2.getValue(e.end));
    };
    JsonAdaptor3.prototype.onTake = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(0, DataUtil2.getValue(e.nos));
    };
    JsonAdaptor3.prototype.onSkip = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return ds.slice(DataUtil2.getValue(e.nos));
    };
    JsonAdaptor3.prototype.onSelect = function(ds, e) {
      if (!ds || !ds.length) {
        return ds;
      }
      return DataUtil2.select(ds, DataUtil2.getValue(e.fieldNames));
    };
    JsonAdaptor3.prototype.insert = function(dm, data, tableName, query, position) {
      if (isNullOrUndefined3(position)) {
        return dm.dataSource.json.push(data);
      } else {
        return dm.dataSource.json.splice(position, 0, data);
      }
    };
    JsonAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      var ds = dm.dataSource.json;
      var i;
      if (typeof value === "object" && !(value instanceof Date)) {
        value = DataUtil2.getObject(keyField, value);
      }
      for (i = 0; i < ds.length; i++) {
        if (DataUtil2.getObject(keyField, ds[i]) === value) {
          break;
        }
      }
      return i !== ds.length ? ds.splice(i, 1) : null;
    };
    JsonAdaptor3.prototype.update = function(dm, keyField, value, tableName) {
      var ds = dm.dataSource.json;
      var i;
      var key;
      if (!isNullOrUndefined3(keyField)) {
        key = getValue3(keyField, value);
      }
      for (i = 0; i < ds.length; i++) {
        if (!isNullOrUndefined3(keyField) && getValue3(keyField, ds[i]) === key) {
          break;
        }
      }
      return i < ds.length ? merge3(ds[i], value) : null;
    };
    return JsonAdaptor3;
  }(Adaptor2)
);
var UrlAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(UrlAdaptor3, _super);
    function UrlAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    UrlAdaptor3.prototype.processQuery = function(dm, query, hierarchyFilters) {
      var queries = this.getQueryRequest(query);
      var singles = Query2.filterQueryLists(query.queries, ["onSelect", "onPage", "onSkip", "onTake", "onRange"]);
      var params = query.params;
      var url = dm.dataSource.url;
      var temp;
      var skip;
      var take = null;
      var options = this.options;
      var request = {
        sorts: [],
        groups: [],
        filters: [],
        searches: [],
        aggregates: []
      };
      if ("onPage" in singles) {
        temp = singles.onPage;
        skip = DataUtil2.getValue(temp.pageIndex, query);
        take = DataUtil2.getValue(temp.pageSize, query);
        skip = (skip - 1) * take;
      } else if ("onRange" in singles) {
        temp = singles.onRange;
        skip = temp.start;
        take = temp.end - temp.start;
      }
      for (var i = 0; i < queries.sorts.length; i++) {
        temp = DataUtil2.getValue(queries.sorts[i].e.fieldName, query);
        request.sorts.push(DataUtil2.callAdaptorFunction(this, "onEachSort", {
          name: temp,
          direction: queries.sorts[i].e.direction
        }, query));
      }
      if (hierarchyFilters) {
        temp = this.getFiltersFrom(hierarchyFilters, query);
        if (temp) {
          request.filters.push(DataUtil2.callAdaptorFunction(this, "onEachWhere", temp.toJson(), query));
        }
      }
      for (var i = 0; i < queries.filters.length; i++) {
        var res = DataUtil2.callAdaptorFunction(this, "onEachWhere", queries.filters[i].e.toJson(), query);
        if (this.getModuleName && this.getModuleName() === "ODataV4Adaptor" && !isNullOrUndefined3(queries.filters[i].e.key) && queries.filters.length > 1) {
          res = "(" + res + ")";
        }
        request.filters.push(res);
        var keys_3 = typeof request.filters[i] === "object" ? Object.keys(request.filters[i]) : [];
        for (var _i = 0, keys_1 = keys_3; _i < keys_1.length; _i++) {
          var prop = keys_1[_i];
          if (DataUtil2.isNull(request[prop])) {
            delete request[prop];
          }
        }
      }
      for (var i = 0; i < queries.searches.length; i++) {
        temp = queries.searches[i].e;
        request.searches.push(DataUtil2.callAdaptorFunction(this, "onEachSearch", {
          fields: temp.fieldNames,
          operator: temp.operator,
          key: temp.searchKey,
          ignoreCase: temp.ignoreCase
        }, query));
      }
      for (var i = 0; i < queries.groups.length; i++) {
        request.groups.push(DataUtil2.getValue(queries.groups[i].e.fieldName, query));
      }
      for (var i = 0; i < queries.aggregates.length; i++) {
        temp = queries.aggregates[i].e;
        request.aggregates.push({
          type: temp.type,
          field: DataUtil2.getValue(temp.field, query)
        });
      }
      var req = {};
      this.getRequestQuery(options, query, singles, request, req);
      DataUtil2.callAdaptorFunction(this, "addParams", {
        dm,
        query,
        params,
        reqParams: req
      });
      if (query.lazyLoad.length) {
        for (var i = 0; i < query.lazyLoad.length; i++) {
          req[query.lazyLoad[i].key] = query.lazyLoad[i].value;
        }
      }
      var keys4 = Object.keys(req);
      for (var _a = 0, keys_2 = keys4; _a < keys_2.length; _a++) {
        var prop = keys_2[_a];
        if (DataUtil2.isNull(req[prop]) || req[prop] === "" || req[prop].length === 0) {
          delete req[prop];
        }
      }
      if (!(options.skip in req && options.take in req) && take !== null) {
        req[options.skip] = DataUtil2.callAdaptorFunction(this, "onSkip", skip, query);
        req[options.take] = DataUtil2.callAdaptorFunction(this, "onTake", take, query);
      }
      var p = this.pvt;
      this.pvt = {};
      if (this.options.requestType === "json") {
        return {
          data: JSON.stringify(req, DataUtil2.parse.jsonDateReplacer),
          url,
          pvtData: p,
          type: "POST",
          contentType: "application/json; charset=utf-8"
        };
      }
      temp = this.convertToQueryString(req, query, dm);
      temp = (dm.dataSource.url.indexOf("?") !== -1 ? "&" : "/") + temp;
      return {
        type: "GET",
        url: temp.length ? url.replace(/\/*$/, temp) : url,
        pvtData: p
      };
    };
    UrlAdaptor3.prototype.getRequestQuery = function(options, query, singles, request, request1) {
      var param = "param";
      var req = request1;
      req[options.from] = query.fromTable;
      if (options.apply && query.distincts.length) {
        req[options.apply] = "onDistinct" in this ? DataUtil2.callAdaptorFunction(this, "onDistinct", query.distincts) : "";
      }
      if (!query.distincts.length && options.expand) {
        req[options.expand] = "onExpand" in this && "onSelect" in singles ? DataUtil2.callAdaptorFunction(this, "onExpand", {
          selects: DataUtil2.getValue(singles.onSelect.fieldNames, query),
          expands: query.expands
        }, query) : query.expands;
      }
      req[options.select] = "onSelect" in singles && !query.distincts.length ? DataUtil2.callAdaptorFunction(this, "onSelect", DataUtil2.getValue(singles.onSelect.fieldNames, query), query) : "";
      req[options.count] = query.isCountRequired ? DataUtil2.callAdaptorFunction(this, "onCount", query.isCountRequired, query) : "";
      req[options.search] = request.searches.length ? DataUtil2.callAdaptorFunction(this, "onSearch", request.searches, query) : "";
      req[options.skip] = "onSkip" in singles ? DataUtil2.callAdaptorFunction(this, "onSkip", DataUtil2.getValue(singles.onSkip.nos, query), query) : "";
      req[options.take] = "onTake" in singles ? DataUtil2.callAdaptorFunction(this, "onTake", DataUtil2.getValue(singles.onTake.nos, query), query) : "";
      req[options.where] = request.filters.length || request.searches.length ? DataUtil2.callAdaptorFunction(this, "onWhere", request.filters, query) : "";
      req[options.sortBy] = request.sorts.length ? DataUtil2.callAdaptorFunction(this, "onSortBy", request.sorts, query) : "";
      req[options.group] = request.groups.length ? DataUtil2.callAdaptorFunction(this, "onGroup", request.groups, query) : "";
      req[options.aggregates] = request.aggregates.length ? DataUtil2.callAdaptorFunction(this, "onAggregates", request.aggregates, query) : "";
      req[param] = [];
    };
    UrlAdaptor3.prototype.convertToQueryString = function(request, query, dm) {
      return "";
    };
    UrlAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      if (xhr && xhr.headers.get("Content-Type") && xhr.headers.get("Content-Type").indexOf("application/json") !== -1) {
        var handleTimeZone = DataUtil2.timeZoneHandling;
        if (ds && !ds.timeZoneHandling) {
          DataUtil2.timeZoneHandling = false;
        }
        data = DataUtil2.parse.parseJson(data);
        DataUtil2.timeZoneHandling = handleTimeZone;
      }
      var requests = request;
      var pvt = requests.pvtData || {};
      var groupDs = data ? data.groupDs : [];
      if (xhr && xhr.headers.get("Content-Type") && xhr.headers.get("Content-Type").indexOf("xml") !== -1) {
        return query.isCountRequired ? {
          result: [],
          count: 0
        } : [];
      }
      var d = JSON.parse(requests.data);
      if (d && d.action === "batch" && data && data.addedRecords && !isNullOrUndefined3(changes)) {
        changes.addedRecords = data.addedRecords;
        return changes;
      }
      if (data && data.d) {
        data = data.d;
      }
      var args = {};
      if (data && "count" in data) {
        args.count = data.count;
      }
      args.result = data && data.result ? data.result : data;
      var isExpand = false;
      if (Array.isArray(data.result) && data.result.length) {
        var key = "key";
        var val = "value";
        var level = "level";
        if (!isNullOrUndefined3(data.result[0][key])) {
          args.result = this.formRemoteGroupedData(args.result, 1, pvt.groups.length - 1);
        }
        if (query && query.lazyLoad.length && pvt.groups.length) {
          for (var i = 0; i < query.lazyLoad.length; i++) {
            if (query.lazyLoad[i][key] === "onDemandGroupInfo") {
              var value = query.lazyLoad[i][val][level];
              if (pvt.groups.length === value) {
                isExpand = true;
              }
            }
          }
        }
      }
      if (!isExpand) {
        this.getAggregateResult(pvt, data, args, groupDs, query);
      }
      return DataUtil2.isNull(args.count) ? args.result : {
        result: args.result,
        count: args.count,
        aggregates: args.aggregates
      };
    };
    UrlAdaptor3.prototype.formRemoteGroupedData = function(data, level, childLevel) {
      for (var i = 0; i < data.length; i++) {
        if (data[i].items.length && Object.keys(data[i].items[0]).indexOf("key") > -1) {
          this.formRemoteGroupedData(data[i].items, level + 1, childLevel - 1);
        }
      }
      var uid3 = "GroupGuid";
      var childLvl = "childLevels";
      var lvl = "level";
      var records = "records";
      data[uid3] = consts4[uid3];
      data[lvl] = level;
      data[childLvl] = childLevel;
      data[records] = data[0].items.length ? this.getGroupedRecords(data, !isNullOrUndefined3(data[0].items[records])) : [];
      return data;
    };
    UrlAdaptor3.prototype.getGroupedRecords = function(data, hasRecords) {
      var childGroupedRecords = [];
      var records = "records";
      for (var i = 0; i < data.length; i++) {
        if (!hasRecords) {
          for (var j = 0; j < data[i].items.length; j++) {
            childGroupedRecords.push(data[i].items[j]);
          }
        } else {
          childGroupedRecords = childGroupedRecords.concat(data[i].items[records]);
        }
      }
      return childGroupedRecords;
    };
    UrlAdaptor3.prototype.onGroup = function(e) {
      this.pvt.groups = e;
      return e;
    };
    UrlAdaptor3.prototype.onAggregates = function(e) {
      this.pvt.aggregates = e;
    };
    UrlAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      var url;
      var key;
      return {
        type: "POST",
        url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.removeUrl || dm.dataSource.url,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: JSON.stringify(extend3({}, {
          changed: changes.changedRecords,
          added: changes.addedRecords,
          deleted: changes.deletedRecords,
          action: "batch",
          table: e[url],
          key: e[key]
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.beforeSend = function(dm, request, settings) {
    };
    UrlAdaptor3.prototype.insert = function(dm, data, tableName, query) {
      return {
        url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend3({}, {
          value: data,
          table: tableName,
          action: "insert"
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.remove = function(dm, keyField, value, tableName, query) {
      return {
        type: "POST",
        url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend3({}, {
          key: value,
          keyColumn: keyField,
          table: tableName,
          action: "remove"
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.update = function(dm, keyField, value, tableName, query) {
      return {
        type: "POST",
        url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend3({}, {
          value,
          action: "update",
          keyColumn: keyField,
          key: DataUtil2.getObject(keyField, value),
          table: tableName
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    UrlAdaptor3.prototype.getFiltersFrom = function(data, query) {
      var key = query.fKey;
      var value;
      var prop = key;
      var pKey = query.key;
      var predicats = [];
      if (typeof data[0] !== "object") {
        prop = null;
      }
      for (var i = 0; i < data.length; i++) {
        if (typeof data[0] === "object") {
          value = DataUtil2.getObject(pKey || prop, data[i]);
        } else {
          value = data[i];
        }
        predicats.push(new Predicate2(key, "equal", value));
      }
      return Predicate2.or(predicats);
    };
    UrlAdaptor3.prototype.getAggregateResult = function(pvt, data, args, groupDs, query) {
      var pData = data;
      if (data && data.result) {
        pData = data.result;
      }
      if (pvt && pvt.aggregates && pvt.aggregates.length) {
        var agg = pvt.aggregates;
        var fn = void 0;
        var aggregateData = pData;
        var res = {};
        if (data.aggregate) {
          aggregateData = data.aggregate;
        }
        for (var i = 0; i < agg.length; i++) {
          fn = DataUtil2.aggregates[agg[i].type];
          if (fn) {
            res[agg[i].field + " - " + agg[i].type] = fn(aggregateData, agg[i].field);
          }
        }
        args.aggregates = res;
      }
      var key = "key";
      var isServerGrouping = Array.isArray(data.result) && data.result.length && !isNullOrUndefined3(data.result[0][key]);
      if (pvt && pvt.groups && pvt.groups.length && !isServerGrouping) {
        var groups = pvt.groups;
        for (var i = 0; i < groups.length; i++) {
          var level = null;
          if (!isNullOrUndefined3(groupDs)) {
            groupDs = DataUtil2.group(groupDs, groups[i]);
          }
          var groupQuery = Query2.filterQueries(query.queries, "onGroup")[i].e;
          pData = DataUtil2.group(pData, groups[i], pvt.aggregates, level, groupDs, groupQuery.comparer);
        }
        args.result = pData;
      }
      return args;
    };
    UrlAdaptor3.prototype.getQueryRequest = function(query) {
      var req = {
        sorts: [],
        groups: [],
        filters: [],
        searches: [],
        aggregates: []
      };
      req.sorts = Query2.filterQueries(query.queries, "onSortBy");
      req.groups = Query2.filterQueries(query.queries, "onGroup");
      req.filters = Query2.filterQueries(query.queries, "onWhere");
      req.searches = Query2.filterQueries(query.queries, "onSearch");
      req.aggregates = Query2.filterQueries(query.queries, "onAggregates");
      return req;
    };
    UrlAdaptor3.prototype.addParams = function(options) {
      var req = options.reqParams;
      if (options.params.length) {
        req.params = {};
      }
      for (var _i = 0, _a = options.params; _i < _a.length; _i++) {
        var tmp = _a[_i];
        if (req[tmp.key]) {
          throw new Error("Query() - addParams: Custom Param is conflicting other request arguments");
        }
        req[tmp.key] = tmp.value;
        if (tmp.fn) {
          req[tmp.key] = tmp.fn.call(options.query, tmp.key, options.query, options.dm);
        }
        req.params[tmp.key] = req[tmp.key];
      }
    };
    return UrlAdaptor3;
  }(Adaptor2)
);
var ODataAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(ODataAdaptor3, _super);
    function ODataAdaptor3(props) {
      var _this = _super.call(this) || this;
      _this.options = extend3({}, _this.options, {
        requestType: "get",
        accept: "application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",
        multipartAccept: "multipart/mixed",
        sortBy: "$orderby",
        select: "$select",
        skip: "$skip",
        take: "$top",
        count: "$inlinecount",
        where: "$filter",
        expand: "$expand",
        batch: "$batch",
        changeSet: "--changeset_",
        batchPre: "batch_",
        contentId: "Content-Id: ",
        batchContent: "Content-Type: multipart/mixed; boundary=",
        changeSetContent: "Content-Type: application/http\nContent-Transfer-Encoding: binary ",
        batchChangeSetContentType: "Content-Type: application/json; charset=utf-8 ",
        updateType: "PUT"
      });
      extend3(_this.options, props || {});
      return _this;
    }
    ODataAdaptor3.prototype.getModuleName = function() {
      return "ODataAdaptor";
    };
    ODataAdaptor3.prototype.onPredicate = function(predicate, query, requiresCast) {
      var returnValue = "";
      var operator;
      var guid;
      var val = predicate.value;
      var type = typeof val;
      var field = predicate.field ? ODataAdaptor3.getField(predicate.field) : null;
      if (val instanceof Date) {
        val = "datetime'" + DataUtil2.parse.replacer(val) + "'";
      }
      if (type === "string") {
        val = val.replace(/'/g, "''");
        if (predicate.ignoreCase) {
          val = val.toLowerCase();
        }
        if (predicate.operator !== "like") {
          val = encodeURIComponent(val);
        }
        if (predicate.operator !== "wildcard" && predicate.operator !== "like") {
          val = "'" + val + "'";
        }
        if (requiresCast) {
          field = "cast(" + field + ", 'Edm.String')";
        }
        if (DataUtil2.parse.isGuid(val)) {
          guid = "guid";
        }
        if (predicate.ignoreCase) {
          if (!guid) {
            field = "tolower(" + field + ")";
          }
          val = val.toLowerCase();
        }
      }
      if (predicate.operator === "isempty" || predicate.operator === "isnull" || predicate.operator === "isnotempty" || predicate.operator === "isnotnull") {
        operator = predicate.operator.indexOf("isnot") !== -1 ? DataUtil2.odBiOperator["notequal"] : DataUtil2.odBiOperator["equal"];
        val = predicate.operator === "isnull" || predicate.operator === "isnotnull" ? null : "''";
      } else {
        operator = DataUtil2.odBiOperator[predicate.operator];
      }
      if (operator) {
        returnValue += field;
        returnValue += operator;
        if (guid) {
          returnValue += guid;
        }
        return returnValue + val;
      }
      if (!isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor") {
        operator = DataUtil2.odv4UniOperator[predicate.operator];
      } else {
        operator = DataUtil2.odUniOperator[predicate.operator];
      }
      if (operator === "like") {
        val = val;
        if (val.indexOf("%") !== -1) {
          if (val.charAt(0) === "%" && val.lastIndexOf("%") < 2) {
            val = val.substring(1, val.length);
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["startswith"] : DataUtil2.odUniOperator["startswith"];
          } else if (val.charAt(val.length - 1) === "%" && val.indexOf("%") > val.length - 3) {
            val = val.substring(0, val.length - 1);
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["endswith"] : DataUtil2.odUniOperator["endswith"];
          } else if (val.lastIndexOf("%") !== val.indexOf("%") && val.lastIndexOf("%") > val.indexOf("%") + 1) {
            val = val.substring(val.indexOf("%") + 1, val.lastIndexOf("%"));
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["contains"] : DataUtil2.odUniOperator["contains"];
          } else {
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["contains"] : DataUtil2.odUniOperator["contains"];
          }
        }
        val = encodeURIComponent(val);
        val = "'" + val + "'";
      } else if (operator === "wildcard") {
        val = val;
        if (val.indexOf("*") !== -1) {
          var splittedStringValue = val.split("*");
          var splittedValue = void 0;
          var count = 0;
          if (val.indexOf("*") !== 0 && splittedStringValue[0].indexOf("%3f") === -1 && splittedStringValue[0].indexOf("?") === -1) {
            splittedValue = splittedStringValue[0];
            splittedValue = "'" + splittedValue + "'";
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["startswith"] : DataUtil2.odUniOperator["startswith"];
            returnValue += operator + "(";
            returnValue += field + ",";
            if (guid) {
              returnValue += guid;
            }
            returnValue += splittedValue + ")";
            count++;
          }
          if (val.lastIndexOf("*") !== val.length - 1 && splittedStringValue[splittedStringValue.length - 1].indexOf("%3f") === -1 && splittedStringValue[splittedStringValue.length - 1].indexOf("?") === -1) {
            splittedValue = splittedStringValue[splittedStringValue.length - 1];
            splittedValue = "'" + splittedValue + "'";
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["endswith"] : DataUtil2.odUniOperator["endswith"];
            if (count > 0) {
              returnValue += " and ";
            }
            returnValue += operator + "(";
            returnValue += field + ",";
            if (guid) {
              returnValue += guid;
            }
            returnValue += splittedValue + ")";
            count++;
          }
          if (splittedStringValue.length > 2) {
            for (var i = 1; i < splittedStringValue.length - 1; i++) {
              if (splittedStringValue[i].indexOf("%3f") === -1 && splittedStringValue[i].indexOf("?") === -1) {
                splittedValue = splittedStringValue[i];
                splittedValue = "'" + splittedValue + "'";
                operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["contains"] : DataUtil2.odUniOperator["contains"];
                if (count > 0) {
                  returnValue += " and ";
                }
                if (operator === "substringof" || operator === "not substringof") {
                  var temp = splittedValue;
                  splittedValue = field;
                  field = temp;
                }
                returnValue += operator + "(";
                returnValue += field + ",";
                if (guid) {
                  returnValue += guid;
                }
                returnValue += splittedValue + ")";
                count++;
              }
            }
          }
          if (count === 0) {
            operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["contains"] : DataUtil2.odUniOperator["contains"];
            if (val.indexOf("?") !== -1 || val.indexOf("%3f") !== -1) {
              val = val.indexOf("?") !== -1 ? val.split("?").join("") : val.split("%3f").join("");
            }
            val = "'" + val + "'";
          } else {
            operator = "wildcard";
          }
        } else {
          operator = !isNullOrUndefined3(this.getModuleName) && this.getModuleName() === "ODataV4Adaptor" ? DataUtil2.odv4UniOperator["contains"] : DataUtil2.odUniOperator["contains"];
          if (val.indexOf("?") !== -1 || val.indexOf("%3f") !== -1) {
            val = val.indexOf("?") !== -1 ? val.split("?").join("") : val.split("%3f").join("");
          }
          val = "'" + val + "'";
        }
      }
      if (operator === "substringof" || operator === "not substringof") {
        var temp = val;
        val = field;
        field = temp;
      }
      if (operator !== "wildcard") {
        returnValue += operator + "(";
        returnValue += field + ",";
        if (guid) {
          returnValue += guid;
        }
        returnValue += val + ")";
      }
      return returnValue;
    };
    ODataAdaptor3.prototype.addParams = function(options) {
      _super.prototype.addParams.call(this, options);
      delete options.reqParams.params;
    };
    ODataAdaptor3.prototype.onComplexPredicate = function(predicate, query, requiresCast) {
      var res = [];
      for (var i = 0; i < predicate.predicates.length; i++) {
        res.push("(" + this.onEachWhere(predicate.predicates[i], query, requiresCast) + ")");
      }
      return res.join(" " + predicate.condition + " ");
    };
    ODataAdaptor3.prototype.onEachWhere = function(filter, query, requiresCast) {
      return filter.isComplex ? this.onComplexPredicate(filter, query, requiresCast) : this.onPredicate(filter, query, requiresCast);
    };
    ODataAdaptor3.prototype.onWhere = function(filters) {
      if (this.pvt.search) {
        filters.push(this.onEachWhere(this.pvt.search, null, true));
      }
      return filters.join(" and ");
    };
    ODataAdaptor3.prototype.onEachSearch = function(e) {
      if (e.fields && e.fields.length === 0) {
        DataUtil2.throwError("Query() - Search : oData search requires list of field names to search");
      }
      var filter = this.pvt.search || [];
      for (var i = 0; i < e.fields.length; i++) {
        filter.push(new Predicate2(e.fields[i], e.operator, e.key, e.ignoreCase));
      }
      this.pvt.search = filter;
    };
    ODataAdaptor3.prototype.onSearch = function(e) {
      this.pvt.search = Predicate2.or(this.pvt.search);
      return "";
    };
    ODataAdaptor3.prototype.onEachSort = function(e) {
      var res = [];
      if (e.name instanceof Array) {
        for (var i = 0; i < e.name.length; i++) {
          res.push(ODataAdaptor3.getField(e.name[i]) + (e.direction === "descending" ? " desc" : ""));
        }
      } else {
        res.push(ODataAdaptor3.getField(e.name) + (e.direction === "descending" ? " desc" : ""));
      }
      return res.join(",");
    };
    ODataAdaptor3.prototype.onSortBy = function(e) {
      return e.reverse().join(",");
    };
    ODataAdaptor3.prototype.onGroup = function(e) {
      this.pvt.groups = e;
      return [];
    };
    ODataAdaptor3.prototype.onSelect = function(e) {
      for (var i = 0; i < e.length; i++) {
        e[i] = ODataAdaptor3.getField(e[i]);
      }
      return e.join(",");
    };
    ODataAdaptor3.prototype.onAggregates = function(e) {
      this.pvt.aggregates = e;
      return "";
    };
    ODataAdaptor3.prototype.onCount = function(e) {
      return e === true ? "allpages" : "";
    };
    ODataAdaptor3.prototype.beforeSend = function(dm, request, settings) {
      if (DataUtil2.endsWith(settings.url, this.options.batch) && settings.type.toLowerCase() === "post") {
        request.headers.set("Accept", this.options.multipartAccept);
        request.headers.set("DataServiceVersion", "2.0");
      } else {
        request.headers.set("Accept", this.options.accept);
      }
      request.headers.set("DataServiceVersion", "2.0");
      request.headers.set("MaxDataServiceVersion", "2.0");
    };
    ODataAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      var metaCheck = "odata.metadata";
      if (request && request.type === "GET" && !this.rootUrl && data[metaCheck]) {
        var dataUrls = data[metaCheck].split("/$metadata#");
        this.rootUrl = dataUrls[0];
        this.resourceTableName = dataUrls[1];
      }
      var pvtData = "pvtData";
      if (!isNullOrUndefined3(data.d)) {
        var dataCopy = query && query.isCountRequired ? data.d.results : data.d;
        var metaData = "__metadata";
        if (!isNullOrUndefined3(dataCopy)) {
          for (var i = 0; i < dataCopy.length; i++) {
            if (!isNullOrUndefined3(dataCopy[i][metaData])) {
              delete dataCopy[i][metaData];
            }
          }
        }
      }
      var pvt = request && request[pvtData];
      var emptyAndBatch = this.processBatchResponse(data, query, xhr, request, changes);
      if (emptyAndBatch) {
        return emptyAndBatch;
      }
      var versionCheck = xhr && request.fetchRequest.headers.get("DataServiceVersion");
      var count = null;
      var version = versionCheck && parseInt(versionCheck, 10) || 2;
      if (query && query.isCountRequired) {
        var oDataCount = "__count";
        if (data[oDataCount] || data["odata.count"]) {
          count = data[oDataCount] || data["odata.count"];
        }
        if (data.d) {
          data = data.d;
        }
        if (data[oDataCount] || data["odata.count"]) {
          count = data[oDataCount] || data["odata.count"];
        }
      }
      if (version === 3 && data.value) {
        data = data.value;
      }
      if (data.d) {
        data = data.d;
      }
      if (version < 3 && data.results) {
        data = data.results;
      }
      var args = {};
      args.count = count;
      args.result = data;
      this.getAggregateResult(pvt, data, args, null, query);
      return DataUtil2.isNull(count) ? args.result : {
        result: args.result,
        count: args.count,
        aggregates: args.aggregates
      };
    };
    ODataAdaptor3.prototype.convertToQueryString = function(request, query, dm) {
      var res = [];
      var table = "table";
      var tableName = request[table] || "";
      var format = "$format";
      delete request[table];
      if (dm.dataSource.requiresFormat) {
        request[format] = "json";
      }
      var keys4 = Object.keys(request);
      for (var _i = 0, keys_4 = keys4; _i < keys_4.length; _i++) {
        var prop = keys_4[_i];
        res.push(prop + "=" + request[prop]);
      }
      res = res.join("&");
      if (dm.dataSource.url && dm.dataSource.url.indexOf("?") !== -1 && !tableName) {
        return res;
      }
      return res.length ? tableName + "?" + res : tableName || "";
    };
    ODataAdaptor3.prototype.localTimeReplacer = function(key, convertObj) {
      for (var _i = 0, _a = !isNullOrUndefined3(convertObj) ? Object.keys(convertObj) : []; _i < _a.length; _i++) {
        var prop = _a[_i];
        if (convertObj[prop] instanceof Date) {
          convertObj[prop] = DataUtil2.dateParse.toLocalTime(convertObj[prop]);
        }
      }
      return convertObj;
    };
    ODataAdaptor3.prototype.insert = function(dm, data, tableName) {
      return {
        url: (dm.dataSource.insertUrl || dm.dataSource.url).replace(/\/*$/, tableName ? "/" + tableName : ""),
        data: JSON.stringify(data, this.options.localTime ? this.localTimeReplacer : null)
      };
    };
    ODataAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      var url;
      if (typeof value === "string" && !DataUtil2.parse.isGuid(value)) {
        url = "('" + value + "')";
      } else {
        url = "(" + value + ")";
      }
      return {
        type: "DELETE",
        url: (dm.dataSource.removeUrl || dm.dataSource.url).replace(/\/*$/, tableName ? "/" + tableName : "") + url
      };
    };
    ODataAdaptor3.prototype.update = function(dm, keyField, value, tableName, query, original) {
      if (this.options.updateType === "PATCH" && !isNullOrUndefined3(original)) {
        value = this.compareAndRemove(value, original, keyField);
      }
      var url;
      if (typeof value[keyField] === "string" && !DataUtil2.parse.isGuid(value[keyField])) {
        url = "('" + value[keyField] + "')";
      } else {
        url = "(" + value[keyField] + ")";
      }
      return {
        type: this.options.updateType,
        url: (dm.dataSource.updateUrl || dm.dataSource.url).replace(/\/*$/, tableName ? "/" + tableName : "") + url,
        data: JSON.stringify(value, this.options.localTime ? this.localTimeReplacer : null),
        accept: this.options.accept
      };
    };
    ODataAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      var initialGuid = e.guid = DataUtil2.getGuid(this.options.batchPre);
      var url = dm.dataSource.batchUrl || this.rootUrl ? (dm.dataSource.batchUrl || this.rootUrl) + "/" + this.options.batch : (dm.dataSource.batchUrl || dm.dataSource.url).replace(/\/*$/, "/" + this.options.batch);
      e.url = this.resourceTableName ? this.resourceTableName : e.url;
      var args = {
        url: e.url,
        key: e.key,
        cid: 1,
        cSet: DataUtil2.getGuid(this.options.changeSet)
      };
      var req = "--" + initialGuid + "\n";
      req += "Content-Type: multipart/mixed; boundary=" + args.cSet.replace("--", "") + "\n";
      this.pvt.changeSet = 0;
      req += this.generateInsertRequest(changes.addedRecords, args, dm);
      req += this.generateUpdateRequest(changes.changedRecords, args, dm, original ? original.changedRecords : []);
      req += this.generateDeleteRequest(changes.deletedRecords, args, dm);
      req += args.cSet + "--\n";
      req += "--" + initialGuid + "--";
      return {
        type: "POST",
        url,
        dataType: "json",
        contentType: "multipart/mixed; charset=UTF-8;boundary=" + initialGuid,
        data: req
      };
    };
    ODataAdaptor3.prototype.generateDeleteRequest = function(arr, e, dm) {
      if (!arr) {
        return "";
      }
      var req = "";
      var stat = {
        "method": "DELETE ",
        "url": function(data, i, key) {
          var url = DataUtil2.getObject(key, data[i]);
          if (typeof url === "number" || DataUtil2.parse.isGuid(url)) {
            return "(" + url + ")";
          } else if (url instanceof Date) {
            var dateTime = data[i][key];
            return "(" + dateTime.toJSON() + ")";
          } else {
            return "('" + url + "')";
          }
        },
        "data": function(data, i) {
          return "";
        }
      };
      req = this.generateBodyContent(arr, e, stat, dm);
      return req + "\n";
    };
    ODataAdaptor3.prototype.generateInsertRequest = function(arr, e, dm) {
      if (!arr) {
        return "";
      }
      var req = "";
      var stat = {
        "method": "POST ",
        "url": function(data, i, key) {
          return "";
        },
        "data": function(data, i) {
          return JSON.stringify(data[i]) + "\n\n";
        }
      };
      req = this.generateBodyContent(arr, e, stat, dm);
      return req;
    };
    ODataAdaptor3.prototype.generateUpdateRequest = function(arr, e, dm, org) {
      var _this = this;
      if (!arr) {
        return "";
      }
      var req = "";
      arr.forEach(function(change) {
        return change = _this.compareAndRemove(change, org.filter(function(o) {
          return DataUtil2.getObject(e.key, o) === DataUtil2.getObject(e.key, change);
        })[0], e.key);
      });
      var stat = {
        "method": this.options.updateType + " ",
        "url": function(data, i, key) {
          if (typeof data[i][key] === "number" || DataUtil2.parse.isGuid(data[i][key])) {
            return "(" + data[i][key] + ")";
          } else if (data[i][key] instanceof Date) {
            var date = data[i][key];
            return "(" + date.toJSON() + ")";
          } else {
            return "('" + data[i][key] + "')";
          }
        },
        "data": function(data, i) {
          return JSON.stringify(data[i]) + "\n\n";
        }
      };
      req = this.generateBodyContent(arr, e, stat, dm);
      return req;
    };
    ODataAdaptor3.getField = function(prop) {
      return prop.replace(/\./g, "/");
    };
    ODataAdaptor3.prototype.generateBodyContent = function(arr, e, stat, dm) {
      var req = "";
      for (var i = 0; i < arr.length; i++) {
        req += "\n" + e.cSet + "\n";
        req += this.options.changeSetContent + "\n\n";
        req += stat.method;
        if (stat.method === "POST ") {
          req += (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + " HTTP/1.1\n";
        } else if (stat.method === "PUT " || stat.method === "PATCH ") {
          req += (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + " HTTP/1.1\n";
        } else if (stat.method === "DELETE ") {
          req += (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + " HTTP/1.1\n";
        }
        req += "Accept: " + this.options.accept + "\n";
        req += "Content-Id: " + this.pvt.changeSet++ + "\n";
        req += this.options.batchChangeSetContentType + "\n";
        if (!isNullOrUndefined3(arr[i]["@odata.etag"])) {
          req += "If-Match: " + arr[i]["@odata.etag"] + "\n\n";
          delete arr[i]["@odata.etag"];
        } else {
          req += "\n";
        }
        req += stat.data(arr, i);
      }
      return req;
    };
    ODataAdaptor3.prototype.processBatchResponse = function(data, query, xhr, request, changes) {
      if (xhr && xhr.headers.get("Content-Type") && xhr.headers.get("Content-Type").indexOf("xml") !== -1) {
        return query.isCountRequired ? {
          result: [],
          count: 0
        } : [];
      }
      if (request && this.options.batch && DataUtil2.endsWith(request.url, this.options.batch) && request.type.toLowerCase() === "post") {
        var guid = xhr.headers.get("Content-Type");
        var cIdx = void 0;
        var jsonObj = void 0;
        var d = data + "";
        guid = guid.substring(guid.indexOf("=batchresponse") + 1);
        d = d.split(guid);
        if (d.length < 2) {
          return {};
        }
        d = d[1];
        var exVal = /(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(d);
        if (exVal) {
          d.replace(exVal[0], "");
        }
        var changeGuid = exVal ? exVal[1] : "";
        d = d.split(changeGuid);
        for (var i = d.length; i > -1; i--) {
          if (!/\bContent-ID:/i.test(d[i]) || !/\bHTTP.+201/.test(d[i])) {
            continue;
          }
          cIdx = parseInt(/\bContent-ID: (\d+)/i.exec(d[i])[1], 10);
          if (changes.addedRecords[cIdx]) {
            jsonObj = DataUtil2.parse.parseJson(/^\{.+\}/m.exec(d[i])[0]);
            extend3({}, changes.addedRecords[cIdx], this.processResponse(jsonObj));
          }
        }
        return changes;
      }
      return null;
    };
    ODataAdaptor3.prototype.compareAndRemove = function(data, original, key) {
      var _this = this;
      if (isNullOrUndefined3(original)) {
        return data;
      }
      Object.keys(data).forEach(function(prop) {
        if (prop !== key && prop !== "@odata.etag") {
          if (DataUtil2.isPlainObject(data[prop])) {
            _this.compareAndRemove(data[prop], original[prop]);
            var final = Object.keys(data[prop]).filter(function(data2) {
              return data2 !== "@odata.etag";
            });
            if (final.length === 0) {
              delete data[prop];
            }
          } else if (data[prop] === original[prop]) {
            delete data[prop];
          } else if (data[prop] && original[prop] && data[prop].valueOf() === original[prop].valueOf()) {
            delete data[prop];
          }
        }
      });
      return data;
    };
    return ODataAdaptor3;
  }(UrlAdaptor2)
);
var ODataV4Adaptor2 = (
  /** @class */
  function(_super) {
    __extends37(ODataV4Adaptor3, _super);
    function ODataV4Adaptor3(props) {
      var _this = _super.call(this, props) || this;
      _this.options = extend3({}, _this.options, {
        requestType: "get",
        accept: "application/json, text/javascript, */*; q=0.01",
        multipartAccept: "multipart/mixed",
        sortBy: "$orderby",
        select: "$select",
        skip: "$skip",
        take: "$top",
        count: "$count",
        search: "$search",
        where: "$filter",
        expand: "$expand",
        batch: "$batch",
        changeSet: "--changeset_",
        batchPre: "batch_",
        contentId: "Content-Id: ",
        batchContent: "Content-Type: multipart/mixed; boundary=",
        changeSetContent: "Content-Type: application/http\nContent-Transfer-Encoding: binary ",
        batchChangeSetContentType: "Content-Type: application/json; charset=utf-8 ",
        updateType: "PATCH",
        localTime: false,
        apply: "$apply"
      });
      extend3(_this.options, props || {});
      return _this;
    }
    ODataV4Adaptor3.prototype.getModuleName = function() {
      return "ODataV4Adaptor";
    };
    ODataV4Adaptor3.prototype.onCount = function(e) {
      return e === true ? "true" : "";
    };
    ODataV4Adaptor3.prototype.onPredicate = function(predicate, query, requiresCast) {
      var returnValue = "";
      var val = predicate.value;
      var isDate = val instanceof Date;
      if (query instanceof Query2) {
        var queries = this.getQueryRequest(query);
        for (var i = 0; i < queries.filters.length; i++) {
          if (queries.filters[i].e.key === predicate.value) {
            requiresCast = true;
          }
        }
      }
      returnValue = _super.prototype.onPredicate.call(this, predicate, query, requiresCast);
      if (isDate) {
        returnValue = returnValue.replace(/datetime'(.*)'$/, "$1");
      }
      if (DataUtil2.parse.isGuid(val)) {
        returnValue = returnValue.replace("guid", "").replace(/'/g, "");
      }
      return returnValue;
    };
    ODataV4Adaptor3.prototype.onEachSearch = function(e) {
      var search = this.pvt.searches || [];
      search.push(e.key);
      this.pvt.searches = search;
    };
    ODataV4Adaptor3.prototype.onSearch = function(e) {
      return this.pvt.searches.join(" OR ");
    };
    ODataV4Adaptor3.prototype.onExpand = function(e) {
      var _this = this;
      var selected = {};
      var expanded = {};
      var expands = e.expands.slice();
      var exArr = [];
      var selects = e.selects.filter(function(item) {
        return item.indexOf(".") > -1;
      });
      selects.forEach(function(select4) {
        var splits = select4.split(".");
        if (!(splits[0] in selected)) {
          selected[splits[0]] = [];
        }
        if (splits.length === 2) {
          if (selected[splits[0]].length && Object.keys(selected).indexOf(splits[0]) !== -1) {
            if (selected[splits[0]][0].indexOf("$expand") !== -1 && selected[splits[0]][0].indexOf(";$select=") === -1) {
              selected[splits[0]][0] = selected[splits[0]][0] + ";$select=" + splits[1];
            } else {
              selected[splits[0]][0] = selected[splits[0]][0] + "," + splits[1];
            }
          } else {
            selected[splits[0]].push("$select=" + splits[1]);
          }
        } else {
          var sel = "$select=" + splits[splits.length - 1];
          var exp4 = "";
          var close_1 = "";
          for (var i = 1; i < splits.length - 1; i++) {
            exp4 = exp4 + "$expand=" + splits[i] + "(";
            close_1 = close_1 + ")";
          }
          var combineVal = exp4 + sel + close_1;
          if (selected[splits[0]].length && Object.keys(selected).indexOf(splits[0]) !== -1 && _this.expandQueryIndex(selected[splits[0]], true)) {
            var idx = _this.expandQueryIndex(selected[splits[0]]);
            selected[splits[0]][idx] = selected[splits[0]][idx] + combineVal.replace("$expand=", ",");
          } else {
            selected[splits[0]].push(combineVal);
          }
        }
      });
      Object.keys(selected).forEach(function(expand) {
        if (expands.indexOf(expand) === -1) {
          expands.push(expand);
        }
      });
      expands.forEach(function(expand) {
        expanded[expand] = expand in selected ? expand + "(" + selected[expand].join(";") + ")" : expand;
      });
      Object.keys(expanded).forEach(function(ex) {
        return exArr.push(expanded[ex]);
      });
      return exArr.join(",");
    };
    ODataV4Adaptor3.prototype.expandQueryIndex = function(query, isExpand) {
      for (var i = 0; i < query.length; i++) {
        if (query[i].indexOf("$expand") !== -1) {
          return isExpand ? true : i;
        }
      }
      return isExpand ? false : 0;
    };
    ODataV4Adaptor3.prototype.onDistinct = function(distinctFields) {
      var fields = distinctFields.map(function(field) {
        return ODataAdaptor2.getField(field);
      }).join(",");
      return "groupby((" + fields + "))";
    };
    ODataV4Adaptor3.prototype.onSelect = function(e) {
      return _super.prototype.onSelect.call(this, e.filter(function(item) {
        return item.indexOf(".") === -1;
      }));
    };
    ODataV4Adaptor3.prototype.beforeSend = function(dm, request, settings) {
      if (settings.type === "POST" || settings.type === "PUT" || settings.type === "PATCH") {
        request.headers.set("Prefer", "return=representation");
      }
      request.headers.set("Accept", this.options.accept);
    };
    ODataV4Adaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      var metaName = "@odata.context";
      var metaV4Name = "@context";
      if (request && request.type === "GET" && !this.rootUrl && (data[metaName] || data[metaV4Name])) {
        var dataUrl = data[metaName] ? data[metaName].split("/$metadata#") : data[metaV4Name].split("/$metadata#");
        this.rootUrl = dataUrl[0];
        this.resourceTableName = dataUrl[1];
      }
      var pvtData = "pvtData";
      var pvt = request && request[pvtData];
      var emptyAndBatch = _super.prototype.processBatchResponse.call(this, data, query, xhr, request, changes);
      if (emptyAndBatch) {
        return emptyAndBatch;
      }
      var count = null;
      var dataCount = "@odata.count";
      var dataV4Count = "@count";
      if (query && query.isCountRequired) {
        if (dataCount in data) {
          count = data[dataCount];
        } else if (dataV4Count in data) {
          count = data[dataV4Count];
        }
      }
      data = !isNullOrUndefined3(data.value) ? data.value : data;
      var args = {};
      args.count = count;
      args.result = data;
      this.getAggregateResult(pvt, data, args, null, query);
      return DataUtil2.isNull(count) ? args.result : {
        result: args.result,
        count,
        aggregates: args.aggregates
      };
    };
    return ODataV4Adaptor3;
  }(ODataAdaptor2)
);
var WebApiAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(WebApiAdaptor3, _super);
    function WebApiAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    WebApiAdaptor3.prototype.getModuleName = function() {
      return "WebApiAdaptor";
    };
    WebApiAdaptor3.prototype.insert = function(dm, data, tableName) {
      return {
        type: "POST",
        url: dm.dataSource.url,
        data: JSON.stringify(data)
      };
    };
    WebApiAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      return {
        type: "DELETE",
        url: dm.dataSource.url + "/" + value,
        data: JSON.stringify(value)
      };
    };
    WebApiAdaptor3.prototype.update = function(dm, keyField, value, tableName) {
      return {
        type: "PUT",
        url: dm.dataSource.url,
        data: JSON.stringify(value)
      };
    };
    WebApiAdaptor3.prototype.batchRequest = function(dm, changes, e) {
      var _this = this;
      var initialGuid = e.guid = DataUtil2.getGuid(this.options.batchPre);
      var url = dm.dataSource.url.replace(/\/*$/, "/" + this.options.batch);
      e.url = this.resourceTableName ? this.resourceTableName : e.url;
      var req = [];
      var _loop_1 = function(i2, x2) {
        changes.addedRecords.forEach(function(j, d) {
          var stat = {
            "method": "POST ",
            "url": function(data, i3, key) {
              return "";
            },
            "data": function(data, i3) {
              return JSON.stringify(data[i3]) + "\n\n";
            }
          };
          req.push("--" + initialGuid);
          req.push("Content-Type: application/http; msgtype=request", "");
          req.push("POST /api/" + (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(changes.addedRecords, i2, e.key) + " HTTP/1.1");
          req.push("Content-Type: application/json; charset=utf-8");
          req.push("Host: " + location.host);
          req.push("", j ? JSON.stringify(j) : "");
        });
      };
      for (var i = 0, x = changes.addedRecords.length; i < x; i++) {
        _loop_1(i, x);
      }
      var _loop_2 = function(i2, x2) {
        changes.changedRecords.forEach(function(j, d) {
          var stat = {
            "method": _this.options.updateType + " ",
            "url": function(data, i3, key) {
              return "";
            },
            "data": function(data, i3) {
              return JSON.stringify(data[i3]) + "\n\n";
            }
          };
          req.push("--" + initialGuid);
          req.push("Content-Type: application/http; msgtype=request", "");
          req.push("PUT /api/" + (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(changes.changedRecords, i2, e.key) + " HTTP/1.1");
          req.push("Content-Type: application/json; charset=utf-8");
          req.push("Host: " + location.host);
          req.push("", j ? JSON.stringify(j) : "");
        });
      };
      for (var i = 0, x = changes.changedRecords.length; i < x; i++) {
        _loop_2(i, x);
      }
      var _loop_3 = function(i2, x2) {
        changes.deletedRecords.forEach(function(j, d) {
          var state = {
            "mtd": "DELETE ",
            "url": function(data, i3, key) {
              var url2 = DataUtil2.getObject(key, data[i3]);
              if (typeof url2 === "number" || DataUtil2.parse.isGuid(url2)) {
                return "/" + url2;
              } else if (url2 instanceof Date) {
                var datTime = data[i3][key];
                return "/" + datTime.toJSON();
              } else {
                return "/'" + url2 + "'";
              }
            },
            "data": function(data, i3) {
              return "";
            }
          };
          req.push("--" + initialGuid);
          req.push("Content-Type: application/http; msgtype=request", "");
          req.push("DELETE /api/" + (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + state.url(changes.deletedRecords, i2, e.key) + " HTTP/1.1");
          req.push("Content-Type: application/json; charset=utf-8");
          req.push("Host: " + location.host);
          req.push("", j ? JSON.stringify(j) : "");
        });
      };
      for (var i = 0, x = changes.deletedRecords.length; i < x; i++) {
        _loop_3(i, x);
      }
      req.push("--" + initialGuid + "--", "");
      return {
        type: "POST",
        url,
        contentType: "multipart/mixed; boundary=" + initialGuid,
        data: req.join("\r\n")
      };
    };
    WebApiAdaptor3.prototype.beforeSend = function(dm, request, settings) {
      request.headers.set("Accept", "application/json, text/javascript, */*; q=0.01");
    };
    WebApiAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      var pvtData = "pvtData";
      var pvt = request && request[pvtData];
      var count = null;
      var args = {};
      if (request && request.type.toLowerCase() !== "post") {
        var versionCheck = xhr && request.fetchRequest.headers.get("DataServiceVersion");
        var version = versionCheck && parseInt(versionCheck, 10) || 2;
        if (query && query.isCountRequired) {
          if (!DataUtil2.isNull(data.Count)) {
            count = data.Count;
          }
        }
        if (version < 3 && data.Items) {
          data = data.Items;
        }
        args.count = count;
        args.result = data;
        this.getAggregateResult(pvt, data, args, null, query);
      }
      args.result = args.result || data;
      return DataUtil2.isNull(count) ? args.result : {
        result: args.result,
        count: args.count,
        aggregates: args.aggregates
      };
    };
    return WebApiAdaptor3;
  }(ODataAdaptor2)
);
var WebMethodAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(WebMethodAdaptor3, _super);
    function WebMethodAdaptor3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    WebMethodAdaptor3.prototype.processQuery = function(dm, query, hierarchyFilters) {
      var obj = new UrlAdaptor2().processQuery(dm, query, hierarchyFilters);
      var getData = "data";
      var data = DataUtil2.parse.parseJson(obj[getData]);
      var result = {};
      var value = "value";
      if (data.param) {
        for (var i = 0; i < data.param.length; i++) {
          var param = data.param[i];
          var key = Object.keys(param)[0];
          result[key] = param[key];
        }
      }
      result[value] = data;
      var pvtData = "pvtData";
      var url = "url";
      return {
        data: JSON.stringify(result, DataUtil2.parse.jsonDateReplacer),
        url: obj[url],
        pvtData: obj[pvtData],
        type: "POST",
        contentType: "application/json; charset=utf-8"
      };
    };
    return WebMethodAdaptor3;
  }(UrlAdaptor2)
);
var RemoteSaveAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(RemoteSaveAdaptor3, _super);
    function RemoteSaveAdaptor3() {
      var _this = _super.call(this) || this;
      setValue4("beforeSend", UrlAdaptor2.prototype.beforeSend, _this);
      return _this;
    }
    RemoteSaveAdaptor3.prototype.insert = function(dm, data, tableName, query, position) {
      this.pvt.position = position;
      this.updateType = "add";
      return {
        url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend3({}, {
          value: data,
          table: tableName,
          action: "insert"
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.remove = function(dm, keyField, val, tableName, query) {
      _super.prototype.remove.call(this, dm, keyField, val);
      return {
        type: "POST",
        url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend3({}, {
          key: val,
          keyColumn: keyField,
          table: tableName,
          action: "remove"
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.update = function(dm, keyField, val, tableName, query) {
      this.updateType = "update";
      this.updateKey = keyField;
      return {
        type: "POST",
        url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        data: JSON.stringify(extend3({}, {
          value: val,
          action: "update",
          keyColumn: keyField,
          key: val[keyField],
          table: tableName
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes, e) {
      var i;
      var newData = request ? JSON.parse(request.data) : data;
      data = newData.action === "batch" ? DataUtil2.parse.parseJson(data) : data;
      if (this.updateType === "add") {
        _super.prototype.insert.call(this, ds, data, null, null, this.pvt.position);
      }
      if (this.updateType === "update") {
        _super.prototype.update.call(this, ds, this.updateKey, data);
      }
      this.updateType = void 0;
      if (data.added) {
        for (i = 0; i < data.added.length; i++) {
          _super.prototype.insert.call(this, ds, data.added[i]);
        }
      }
      if (data.changed) {
        for (i = 0; i < data.changed.length; i++) {
          _super.prototype.update.call(this, ds, e.key, data.changed[i]);
        }
      }
      if (data.deleted) {
        for (i = 0; i < data.deleted.length; i++) {
          _super.prototype.remove.call(this, ds, e.key, data.deleted[i]);
        }
      }
      return data;
    };
    RemoteSaveAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      return {
        type: "POST",
        url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.url,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: JSON.stringify(extend3({}, {
          changed: changes.changedRecords,
          added: changes.addedRecords,
          deleted: changes.deletedRecords,
          action: "batch",
          table: e.url,
          key: e.key
        }, DataUtil2.getAddParams(this, dm, query)))
      };
    };
    RemoteSaveAdaptor3.prototype.addParams = function(options) {
      var urlParams = new UrlAdaptor2();
      urlParams.addParams(options);
    };
    return RemoteSaveAdaptor3;
  }(JsonAdaptor2)
);
var CustomDataAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(CustomDataAdaptor3, _super);
    function CustomDataAdaptor3(props) {
      var _this = _super.call(this) || this;
      _this.options = extend3({}, _this.options, {
        getData: function() {
        },
        addRecord: function() {
        },
        updateRecord: function() {
        },
        deleteRecord: function() {
        },
        batchUpdate: function() {
        }
      });
      extend3(_this.options, props || {});
      return _this;
    }
    CustomDataAdaptor3.prototype.getModuleName = function() {
      return "CustomDataAdaptor";
    };
    return CustomDataAdaptor3;
  }(UrlAdaptor2)
);
var GraphQLAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(GraphQLAdaptor3, _super);
    function GraphQLAdaptor3(options) {
      var _this = _super.call(this) || this;
      _this.opt = options;
      _this.schema = _this.opt.response;
      _this.query = _this.opt.query;
      _this.getVariables = _this.opt.getVariables ? _this.opt.getVariables : function() {
      };
      _this.getQuery = function() {
        return _this.query;
      };
      return _this;
    }
    GraphQLAdaptor3.prototype.getModuleName = function() {
      return "GraphQLAdaptor";
    };
    GraphQLAdaptor3.prototype.processQuery = function(datamanager, query) {
      var urlQuery = _super.prototype.processQuery.apply(this, arguments);
      var dm = JSON.parse(urlQuery.data);
      var keys4 = ["skip", "take", "sorted", "table", "select", "where", "search", "requiresCounts", "aggregates", "params"];
      var temp = {};
      var str = "searchwhereparams";
      keys4.filter(function(e) {
        temp[e] = str.indexOf(e) > -1 ? JSON.stringify(dm[e]) : dm[e];
      });
      var vars = this.getVariables() || {};
      vars["datamanager"] = temp;
      var data = JSON.stringify({
        query: this.getQuery(),
        variables: vars
      });
      urlQuery.data = data;
      return urlQuery;
    };
    GraphQLAdaptor3.prototype.processResponse = function(resData, ds, query, xhr, request) {
      var res = resData;
      var count;
      var aggregates;
      var result = getValue3(this.schema.result, res.data);
      if (this.schema.count) {
        count = getValue3(this.schema.count, res.data);
      }
      if (this.schema.aggregates) {
        aggregates = getValue3(this.schema.aggregates, res.data);
        aggregates = !isNullOrUndefined3(aggregates) ? DataUtil2.parse.parseJson(aggregates) : aggregates;
      }
      var pvt = request.pvtData || {};
      var args = {
        result,
        aggregates
      };
      var data = args;
      if (pvt && pvt.groups && pvt.groups.length) {
        this.getAggregateResult(pvt, data, args, null, query);
      }
      return !isNullOrUndefined3(count) ? {
        result: args.result,
        count,
        aggregates
      } : args.result;
    };
    GraphQLAdaptor3.prototype.insert = function() {
      var inserted = _super.prototype.insert.apply(this, arguments);
      return this.generateCrudData(inserted, "insert");
    };
    GraphQLAdaptor3.prototype.update = function() {
      var inserted = _super.prototype.update.apply(this, arguments);
      return this.generateCrudData(inserted, "update");
    };
    GraphQLAdaptor3.prototype.remove = function() {
      var inserted = _super.prototype.remove.apply(this, arguments);
      return this.generateCrudData(inserted, "remove");
    };
    GraphQLAdaptor3.prototype.batchRequest = function(dm, changes, e, query, original) {
      var batch = _super.prototype.batchRequest.apply(this, arguments);
      var bData = JSON.parse(batch.data);
      bData.key = e.key;
      batch.data = JSON.stringify(bData);
      return this.generateCrudData(batch, "batch");
    };
    GraphQLAdaptor3.prototype.generateCrudData = function(crudData, action) {
      var parsed = JSON.parse(crudData.data);
      crudData.data = JSON.stringify({
        query: this.opt.getMutation(action),
        variables: parsed
      });
      return crudData;
    };
    return GraphQLAdaptor3;
  }(UrlAdaptor2)
);
var CacheAdaptor2 = (
  /** @class */
  function(_super) {
    __extends37(CacheAdaptor3, _super);
    function CacheAdaptor3(adaptor, timeStamp, pageSize) {
      var _this = _super.call(this) || this;
      _this.isCrudAction = false;
      _this.isInsertAction = false;
      if (!isNullOrUndefined3(adaptor)) {
        _this.cacheAdaptor = adaptor;
      }
      _this.pageSize = pageSize;
      _this.guidId = DataUtil2.getGuid("cacheAdaptor");
      var obj = {
        keys: [],
        results: []
      };
      window.localStorage.setItem(_this.guidId, JSON.stringify(obj));
      var guid = _this.guidId;
      if (!isNullOrUndefined3(timeStamp)) {
        setInterval(function() {
          var data = DataUtil2.parse.parseJson(window.localStorage.getItem(guid));
          var forDel = [];
          for (var i = 0; i < data.results.length; i++) {
            var currentTime = +/* @__PURE__ */ new Date();
            var requestTime = +new Date(data.results[i].timeStamp);
            data.results[i].timeStamp = currentTime - requestTime;
            if (currentTime - requestTime > timeStamp) {
              forDel.push(i);
            }
          }
          for (var i = 0; i < forDel.length; i++) {
            data.results.splice(forDel[i], 1);
            data.keys.splice(forDel[i], 1);
          }
          window.localStorage.removeItem(guid);
          window.localStorage.setItem(guid, JSON.stringify(data));
        }, timeStamp);
      }
      return _this;
    }
    CacheAdaptor3.prototype.generateKey = function(url, query) {
      var queries = this.getQueryRequest(query);
      var singles = Query2.filterQueryLists(query.queries, ["onSelect", "onPage", "onSkip", "onTake", "onRange"]);
      var key = url;
      var page = "onPage";
      if (page in singles) {
        key += singles[page].pageIndex;
      }
      queries.sorts.forEach(function(obj) {
        key += obj.e.direction + obj.e.fieldName;
      });
      queries.groups.forEach(function(obj) {
        key += obj.e.fieldName;
      });
      queries.searches.forEach(function(obj) {
        key += obj.e.searchKey;
      });
      for (var filter = 0; filter < queries.filters.length; filter++) {
        var currentFilter = queries.filters[filter];
        if (currentFilter.e.isComplex) {
          var newQuery = query.clone();
          newQuery.queries = [];
          for (var i = 0; i < currentFilter.e.predicates.length; i++) {
            newQuery.queries.push({
              fn: "onWhere",
              e: currentFilter.e.predicates[i],
              filter: query.queries.filter
            });
          }
          key += currentFilter.e.condition + this.generateKey(url, newQuery);
        } else {
          key += currentFilter.e.field + currentFilter.e.operator + currentFilter.e.value;
        }
      }
      return key;
    };
    CacheAdaptor3.prototype.processQuery = function(dm, query, hierarchyFilters) {
      var key = this.generateKey(dm.dataSource.url, query);
      var cachedItems = DataUtil2.parse.parseJson(window.localStorage.getItem(this.guidId));
      var data = cachedItems ? cachedItems.results[cachedItems.keys.indexOf(key)] : null;
      if (data != null && !this.isCrudAction && !this.isInsertAction) {
        return data;
      }
      this.isCrudAction = null;
      this.isInsertAction = null;
      return this.cacheAdaptor.processQuery.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
    };
    CacheAdaptor3.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
      if (this.isInsertAction || request && this.cacheAdaptor.options.batch && DataUtil2.endsWith(request.url, this.cacheAdaptor.options.batch) && request.type.toLowerCase() === "post") {
        return this.cacheAdaptor.processResponse(data, ds, query, xhr, request, changes);
      }
      data = this.cacheAdaptor.processResponse.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
      var key = query ? this.generateKey(ds.dataSource.url, query) : ds.dataSource.url;
      var obj = {};
      obj = DataUtil2.parse.parseJson(window.localStorage.getItem(this.guidId));
      var index = obj.keys.indexOf(key);
      if (index !== -1) {
        obj.results.splice(index, 1);
        obj.keys.splice(index, 1);
      }
      obj.results[obj.keys.push(key) - 1] = {
        keys: key,
        result: data.result,
        timeStamp: /* @__PURE__ */ new Date(),
        count: data.count
      };
      while (obj.results.length > this.pageSize) {
        obj.results.splice(0, 1);
        obj.keys.splice(0, 1);
      }
      window.localStorage.setItem(this.guidId, JSON.stringify(obj));
      return data;
    };
    CacheAdaptor3.prototype.beforeSend = function(dm, request, settings) {
      if (!isNullOrUndefined3(this.cacheAdaptor.options.batch) && DataUtil2.endsWith(settings.url, this.cacheAdaptor.options.batch) && settings.type.toLowerCase() === "post") {
        request.headers.set("Accept", this.cacheAdaptor.options.multipartAccept);
      }
      if (!dm.dataSource.crossDomain) {
        request.headers.set("Accept", this.cacheAdaptor.options.accept);
      }
    };
    CacheAdaptor3.prototype.update = function(dm, keyField, value, tableName) {
      this.isCrudAction = true;
      return this.cacheAdaptor.update(dm, keyField, value, tableName);
    };
    CacheAdaptor3.prototype.insert = function(dm, data, tableName) {
      this.isInsertAction = true;
      return this.cacheAdaptor.insert(dm, data, tableName);
    };
    CacheAdaptor3.prototype.remove = function(dm, keyField, value, tableName) {
      this.isCrudAction = true;
      return this.cacheAdaptor.remove(dm, keyField, value, tableName);
    };
    CacheAdaptor3.prototype.batchRequest = function(dm, changes, e) {
      return this.cacheAdaptor.batchRequest(dm, changes, e);
    };
    return CacheAdaptor3;
  }(UrlAdaptor2)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-data/src/manager.js
var DataManager2 = (
  /** @class */
  function() {
    function DataManager3(dataSource, query, adaptor) {
      var _this = this;
      this.dateParse = true;
      this.timeZoneHandling = true;
      this.persistQuery = {};
      this.isInitialLoad = false;
      this.requests = [];
      this.isInitialLoad = true;
      if (!dataSource && !this.dataSource) {
        dataSource = [];
      }
      adaptor = adaptor || dataSource.adaptor;
      if (dataSource && dataSource.timeZoneHandling === false) {
        this.timeZoneHandling = dataSource.timeZoneHandling;
      }
      var data;
      if (dataSource instanceof Array) {
        data = {
          json: dataSource,
          offline: true
        };
      } else if (typeof dataSource === "object") {
        if (!dataSource.json) {
          dataSource.json = [];
        }
        if (!dataSource.enablePersistence) {
          dataSource.enablePersistence = false;
        }
        if (!dataSource.id) {
          dataSource.id = "";
        }
        if (!dataSource.ignoreOnPersist) {
          dataSource.ignoreOnPersist = [];
        }
        data = {
          url: dataSource.url,
          insertUrl: dataSource.insertUrl,
          removeUrl: dataSource.removeUrl,
          updateUrl: dataSource.updateUrl,
          crudUrl: dataSource.crudUrl,
          batchUrl: dataSource.batchUrl,
          json: dataSource.json,
          headers: dataSource.headers,
          accept: dataSource.accept,
          data: dataSource.data,
          timeTillExpiration: dataSource.timeTillExpiration,
          cachingPageSize: dataSource.cachingPageSize,
          enableCaching: dataSource.enableCaching,
          requestType: dataSource.requestType,
          key: dataSource.key,
          crossDomain: dataSource.crossDomain,
          jsonp: dataSource.jsonp,
          dataType: dataSource.dataType,
          offline: dataSource.offline !== void 0 ? dataSource.offline : dataSource.adaptor instanceof RemoteSaveAdaptor2 || dataSource.adaptor instanceof CustomDataAdaptor2 ? false : dataSource.url ? false : true,
          requiresFormat: dataSource.requiresFormat,
          enablePersistence: dataSource.enablePersistence,
          id: dataSource.id,
          ignoreOnPersist: dataSource.ignoreOnPersist
        };
      } else {
        DataUtil2.throwError("DataManager: Invalid arguments");
      }
      if (data.requiresFormat === void 0 && !DataUtil2.isCors()) {
        data.requiresFormat = isNullOrUndefined3(data.crossDomain) ? true : data.crossDomain;
      }
      if (data.dataType === void 0) {
        data.dataType = "json";
      }
      this.dataSource = data;
      this.defaultQuery = query;
      if (this.dataSource.enablePersistence && this.dataSource.id) {
        window.addEventListener("unload", this.setPersistData.bind(this));
      }
      if (data.url && data.offline && !data.json.length) {
        this.isDataAvailable = false;
        this.adaptor = adaptor || new ODataAdaptor2();
        this.dataSource.offline = false;
        this.ready = this.executeQuery(query || new Query2());
        this.ready.then(function(e) {
          _this.dataSource.offline = true;
          _this.isDataAvailable = true;
          data.json = e.result;
          _this.adaptor = new JsonAdaptor2();
        });
      } else {
        this.adaptor = data.offline ? new JsonAdaptor2() : new ODataAdaptor2();
      }
      if (!data.jsonp && this.adaptor instanceof ODataAdaptor2) {
        data.jsonp = "callback";
      }
      this.adaptor = adaptor || this.adaptor;
      if (data.enableCaching) {
        this.adaptor = new CacheAdaptor2(this.adaptor, data.timeTillExpiration, data.cachingPageSize);
      }
      return this;
    }
    Object.defineProperty(DataManager3.prototype, "moduleName", {
      /** @hidden */
      get: function() {
        return "datamanager";
      },
      enumerable: true,
      configurable: true
    });
    ;
    DataManager3.prototype.getPersistedData = function(id) {
      var persistedData = localStorage.getItem(id || this.dataSource.id);
      return JSON.parse(persistedData);
    };
    DataManager3.prototype.setPersistData = function(e, id, persistData) {
      localStorage.setItem(id || this.dataSource.id, JSON.stringify(persistData || this.persistQuery));
    };
    DataManager3.prototype.setPersistQuery = function(query) {
      var _this = this;
      var persistedQuery = this.getPersistedData();
      if (this.isInitialLoad && persistedQuery && Object.keys(persistedQuery).length) {
        this.persistQuery = persistedQuery;
        this.persistQuery.queries = this.persistQuery.queries.filter(function(query2) {
          if (_this.dataSource.ignoreOnPersist && _this.dataSource.ignoreOnPersist.length) {
            if (query2.fn && _this.dataSource.ignoreOnPersist.some(function(keyword) {
              return query2.fn === keyword;
            })) {
              return false;
            }
          }
          if (query2.fn === "onWhere") {
            var e = query2.e;
            if (e && e.isComplex && e.predicates instanceof Array) {
              var allPredicates = e.predicates.map(function(predicateObj) {
                if (predicateObj.predicates && predicateObj.predicates instanceof Array) {
                  var nestedPredicates = predicateObj.predicates.map(function(nestedPredicate) {
                    var field2 = nestedPredicate.field, operator2 = nestedPredicate.operator, value2 = nestedPredicate.value, ignoreCase2 = nestedPredicate.ignoreCase, ignoreAccent2 = nestedPredicate.ignoreAccent, matchCase2 = nestedPredicate.matchCase;
                    return new Predicate2(field2, operator2, value2, ignoreCase2, ignoreAccent2, matchCase2);
                  });
                  return predicateObj.condition === "and" ? Predicate2.and(nestedPredicates) : Predicate2.or(nestedPredicates);
                } else {
                  var field = predicateObj.field, operator = predicateObj.operator, value = predicateObj.value, ignoreCase = predicateObj.ignoreCase, ignoreAccent = predicateObj.ignoreAccent, matchCase = predicateObj.matchCase;
                  return new Predicate2(field, operator, value, ignoreCase, ignoreAccent, matchCase);
                }
              });
              query2.e = new Predicate2(allPredicates[0], e.condition, allPredicates.slice(1));
            }
          }
          return true;
        });
        var newQuery = extend3(new Query2(), this.persistQuery);
        this.isInitialLoad = false;
        return newQuery;
      } else {
        this.persistQuery = query;
        this.isInitialLoad = false;
        return query;
      }
    };
    DataManager3.prototype.setDefaultQuery = function(query) {
      this.defaultQuery = query;
      return this;
    };
    DataManager3.prototype.executeLocal = function(query) {
      if (!this.defaultQuery && !(query instanceof Query2)) {
        DataUtil2.throwError("DataManager - executeLocal() : A query is required to execute");
      }
      if (!this.dataSource.json) {
        DataUtil2.throwError("DataManager - executeLocal() : Json data is required to execute");
      }
      if (this.dataSource.enablePersistence && this.dataSource.id) {
        query = this.setPersistQuery(query);
      }
      query = query || this.defaultQuery;
      var result = this.adaptor.processQuery(this, query);
      if (query.subQuery) {
        var from = query.subQuery.fromTable;
        var lookup = query.subQuery.lookups;
        var res = query.isCountRequired ? result.result : result;
        if (lookup && lookup instanceof Array) {
          DataUtil2.buildHierarchy(query.subQuery.fKey, from, res, lookup, query.subQuery.key);
        }
        for (var j = 0; j < res.length; j++) {
          if (res[j][from] instanceof Array) {
            res[j] = extend3({}, {}, res[j]);
            res[j][from] = this.adaptor.processResponse(query.subQuery.using(new DataManager3(res[j][from].slice(0))).executeLocal(), this, query);
          }
        }
      }
      return this.adaptor.processResponse(result, this, query);
    };
    DataManager3.prototype.executeQuery = function(query, done, fail, always) {
      var _this = this;
      var makeRequest = "makeRequest";
      if (this.dataSource.enablePersistence && this.dataSource.id) {
        query = this.setPersistQuery(query);
      }
      if (typeof query === "function") {
        always = fail;
        fail = done;
        done = query;
        query = null;
      }
      if (!query) {
        query = this.defaultQuery;
      }
      if (!(query instanceof Query2)) {
        DataUtil2.throwError("DataManager - executeQuery() : A query is required to execute");
      }
      var deffered = new Deferred2();
      var args = {
        query
      };
      if (!this.dataSource.offline && this.dataSource.url !== void 0 && this.dataSource.url !== "" || !isNullOrUndefined3(this.adaptor[makeRequest]) || this.isCustomDataAdaptor(this.adaptor)) {
        var result = this.adaptor.processQuery(this, query);
        if (!isNullOrUndefined3(this.adaptor[makeRequest])) {
          this.adaptor[makeRequest](result, deffered, args, query);
        } else if (!isNullOrUndefined3(result.url) || this.isCustomDataAdaptor(this.adaptor)) {
          this.requests = [];
          this.makeRequest(result, deffered, args, query);
        } else {
          args = DataManager3.getDeferedArgs(query, result, args);
          deffered.resolve(args);
        }
      } else {
        DataManager3.nextTick(function() {
          var res = _this.executeLocal(query);
          args = DataManager3.getDeferedArgs(query, res, args);
          deffered.resolve(args);
        });
      }
      if (done || fail) {
        deffered.promise.then(done, fail);
      }
      if (always) {
        deffered.promise.then(always, always);
      }
      return deffered.promise;
    };
    DataManager3.getDeferedArgs = function(query, result, args) {
      if (query.isCountRequired) {
        args.result = result.result;
        args.count = result.count;
        args.aggregates = result.aggregates;
      } else {
        args.result = result;
      }
      return args;
    };
    DataManager3.nextTick = function(fn) {
      (window.setImmediate || window.setTimeout)(fn, 0);
    };
    DataManager3.prototype.extendRequest = function(url, fnSuccess, fnFail) {
      return extend3({}, {
        type: "GET",
        dataType: this.dataSource.dataType,
        crossDomain: this.dataSource.crossDomain,
        jsonp: this.dataSource.jsonp,
        cache: true,
        processData: false,
        onSuccess: fnSuccess,
        onFailure: fnFail
      }, url);
    };
    DataManager3.prototype.makeRequest = function(url, deffered, args, query) {
      var _this = this;
      var isSelector = !!query.subQuerySelector;
      var fnFail = function(e) {
        args.error = e;
        deffered.reject(args);
      };
      var process = function(data, count, xhr, request2, actual, aggregates, virtualSelectRecords) {
        args.xhr = xhr;
        args.count = count ? parseInt(count.toString(), 10) : 0;
        args.result = data;
        args.request = request2;
        args.aggregates = aggregates;
        args.actual = actual;
        args.virtualSelectRecords = virtualSelectRecords;
        deffered.resolve(args);
      };
      var fnQueryChild = function(data, selector) {
        var subDeffer = new Deferred2();
        var childArgs = {
          parent: args
        };
        query.subQuery.isChild = true;
        var subUrl = _this.adaptor.processQuery(_this, query.subQuery, data ? _this.adaptor.processResponse(data) : selector);
        var childReq = _this.makeRequest(subUrl, subDeffer, childArgs, query.subQuery);
        if (!isSelector) {
          subDeffer.then(function(subData) {
            if (data) {
              DataUtil2.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, data, subData, query.subQuery.key);
              process(data, subData.count, subData.xhr);
            }
          }, fnFail);
        }
        return childReq;
      };
      var fnSuccess = function(data, request2) {
        if (_this.isGraphQLAdaptor(_this.adaptor)) {
          if (!isNullOrUndefined3(data["errors"])) {
            return fnFail(data["errors"], request2);
          }
        }
        if (_this.isCustomDataAdaptor(_this.adaptor)) {
          request2 = extend3({}, _this.fetchReqOption, request2);
        }
        if (request2.contentType.indexOf("xml") === -1 && _this.dateParse) {
          data = DataUtil2.parse.parseJson(data);
        }
        var result = _this.adaptor.processResponse(data, _this, query, request2.fetchRequest, request2);
        var count = 0;
        var aggregates = null;
        var virtualSelectRecords = "virtualSelectRecords";
        var virtualRecords = data[virtualSelectRecords];
        if (query.isCountRequired) {
          count = result.count;
          aggregates = result.aggregates;
          result = result.result;
        }
        if (!query.subQuery) {
          process(result, count, request2.fetchRequest, request2.type, data, aggregates, virtualRecords);
          return;
        }
        if (!isSelector) {
          fnQueryChild(result, request2);
        }
      };
      var req = this.extendRequest(url, fnSuccess, fnFail);
      if (!this.isCustomDataAdaptor(this.adaptor)) {
        var fetch_1 = new Fetch3(req);
        fetch_1.beforeSend = function() {
          _this.beforeSend(fetch_1.fetchRequest, fetch_1);
        };
        req = fetch_1.send();
        req.catch(function(e) {
          return true;
        });
        this.requests.push(fetch_1);
      } else {
        this.fetchReqOption = req;
        var request = req;
        this.adaptor.options.getData({
          data: request.data,
          onSuccess: request.onSuccess,
          onFailure: request.onFailure
        });
      }
      if (isSelector) {
        var promise = void 0;
        var res = query.subQuerySelector.call(this, {
          query: query.subQuery,
          parent: query
        });
        if (res && res.length) {
          promise = Promise.all([req, fnQueryChild(null, res)]);
          promise.then(function() {
            var args2 = [];
            for (var _i = 0; _i < arguments.length; _i++) {
              args2[_i] = arguments[_i];
            }
            var result = args2[0];
            var pResult = _this.adaptor.processResponse(result[0], _this, query, _this.requests[0].fetchRequest, _this.requests[0]);
            var count = 0;
            if (query.isCountRequired) {
              count = pResult.count;
              pResult = pResult.result;
            }
            var cResult = _this.adaptor.processResponse(result[1], _this, query.subQuery, _this.requests[1].fetchRequest, _this.requests[1]);
            count = 0;
            if (query.subQuery.isCountRequired) {
              count = cResult.count;
              cResult = cResult.result;
            }
            DataUtil2.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, pResult, cResult, query.subQuery.key);
            isSelector = false;
            process(pResult, count, _this.requests[0].fetchRequest);
          });
        } else {
          isSelector = false;
        }
      }
      return req;
    };
    DataManager3.prototype.beforeSend = function(request, settings) {
      this.adaptor.beforeSend(this, request, settings);
      var headers = this.dataSource.headers;
      var props;
      for (var i = 0; headers && i < headers.length; i++) {
        props = [];
        var keys4 = Object.keys(headers[i]);
        for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
          var prop = keys_1[_i];
          props.push(prop);
          request.headers.set(prop, headers[i][prop]);
        }
      }
    };
    DataManager3.prototype.saveChanges = function(changes, key, tableName, query, original) {
      var _this = this;
      if (tableName instanceof Query2) {
        query = tableName;
        tableName = null;
      }
      var args = {
        url: tableName,
        key: key || this.dataSource.key
      };
      var req = this.adaptor.batchRequest(this, changes, args, query || new Query2(), original);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return req;
      }
      if (!isNullOrUndefined3(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](req);
      } else if (!this.isCustomDataAdaptor(this.adaptor)) {
        var deff_1 = new Deferred2();
        var fetch_2 = new Fetch3(req);
        fetch_2.beforeSend = function() {
          _this.beforeSend(fetch_2.fetchRequest, fetch_2);
        };
        fetch_2.onSuccess = function(data, request) {
          if (_this.isGraphQLAdaptor(_this.adaptor)) {
            if (!isNullOrUndefined3(data["errors"])) {
              fetch_2.onFailure(JSON.stringify(data["errors"]));
            }
          }
          deff_1.resolve(_this.adaptor.processResponse(data, _this, null, request.fetchRequest, request, changes, args));
        };
        fetch_2.onFailure = function(e) {
          deff_1.reject([{
            error: e
          }]);
        };
        fetch_2.send().catch(function(e) {
          return true;
        });
        return deff_1.promise;
      } else {
        return this.dofetchRequest(req, this.adaptor.options.batchUpdate, changes);
      }
    };
    DataManager3.prototype.insert = function(data, tableName, query, position) {
      if (tableName instanceof Query2) {
        query = tableName;
        tableName = null;
      }
      var req = this.adaptor.insert(this, data, tableName, query, position);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return req;
      }
      if (!isNullOrUndefined3(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](req);
      } else {
        return this.dofetchRequest(req, this.adaptor.options.addRecord);
      }
    };
    DataManager3.prototype.remove = function(keyField, value, tableName, query) {
      if (typeof value === "object") {
        value = DataUtil2.getObject(keyField, value);
      }
      if (tableName instanceof Query2) {
        query = tableName;
        tableName = null;
      }
      var res = this.adaptor.remove(this, keyField, value, tableName, query);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return res;
      }
      if (!isNullOrUndefined3(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](res);
      } else {
        var remove3 = this.adaptor.options.deleteRecord;
        return this.dofetchRequest(res, remove3);
      }
    };
    DataManager3.prototype.update = function(keyField, value, tableName, query, original) {
      if (tableName instanceof Query2) {
        query = tableName;
        tableName = null;
      }
      var res = this.adaptor.update(this, keyField, value, tableName, query, original);
      var dofetchRequest = "dofetchRequest";
      if (this.dataSource.offline) {
        return res;
      }
      if (!isNullOrUndefined3(this.adaptor[dofetchRequest])) {
        return this.adaptor[dofetchRequest](res);
      } else {
        var update = this.adaptor.options.updateRecord;
        return this.dofetchRequest(res, update);
      }
    };
    DataManager3.prototype.isCustomDataAdaptor = function(dataSource) {
      return this.adaptor.getModuleName && this.adaptor.getModuleName() === "CustomDataAdaptor";
    };
    DataManager3.prototype.isGraphQLAdaptor = function(dataSource) {
      return this.adaptor.getModuleName && this.adaptor.getModuleName() === "GraphQLAdaptor";
    };
    DataManager3.prototype.successFunc = function(record, request, changes) {
      if (this.isGraphQLAdaptor(this.adaptor)) {
        var data = typeof record === "object" ? record : JSON.parse(record);
        if (!isNullOrUndefined3(data["errors"])) {
          this.failureFunc(JSON.stringify(data["errors"]));
        }
      }
      if (this.isCustomDataAdaptor(this.adaptor)) {
        request = extend3({}, this.fetchReqOption, request);
      }
      try {
        DataUtil2.parse.parseJson(record);
      } catch (e) {
        record = [];
      }
      record = this.adaptor.processResponse(DataUtil2.parse.parseJson(record), this, null, request.fetchRequest, request, changes);
      this.fetchDeffered.resolve(record);
    };
    DataManager3.prototype.failureFunc = function(e) {
      this.fetchDeffered.reject([{
        error: e
      }]);
    };
    DataManager3.prototype.dofetchRequest = function(res, fetchFunc, changes) {
      var _this = this;
      res = extend3({}, {
        type: "POST",
        contentType: "application/json; charset=utf-8",
        processData: false
      }, res);
      this.fetchDeffered = new Deferred2();
      if (!this.isCustomDataAdaptor(this.adaptor)) {
        var fetch_3 = new Fetch3(res);
        fetch_3.beforeSend = function() {
          _this.beforeSend(fetch_3.fetchRequest, fetch_3);
        };
        fetch_3.onSuccess = this.successFunc.bind(this);
        fetch_3.onFailure = this.failureFunc.bind(this);
        fetch_3.send().catch(function(e) {
          return true;
        });
      } else {
        this.fetchReqOption = res;
        fetchFunc.call(this, {
          data: res.data,
          onSuccess: this.successFunc.bind(this),
          onFailure: this.failureFunc.bind(this),
          changes
        });
      }
      return this.fetchDeffered.promise;
    };
    DataManager3.prototype.clearPersistence = function() {
      window.removeEventListener("unload", this.setPersistData.bind(this));
      this.dataSource.enablePersistence = false;
      this.persistQuery = {};
      window.localStorage.setItem(this.dataSource.id, "[]");
    };
    return DataManager3;
  }()
);
var Deferred2 = (
  /** @class */
  /* @__PURE__ */ function() {
    function Deferred4() {
      var _this = this;
      this.promise = new Promise(function(resolve, reject) {
        _this.resolve = resolve;
        _this.reject = reject;
      });
      this.then = this.promise.then.bind(this.promise);
      this.catch = this.promise.catch.bind(this.promise);
    }
    return Deferred4;
  }()
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/common/common.js
function wrapperInitialize2(createElement4, tag, type, element2, WRAPPER7, role) {
  var input2 = element2;
  if (element2.tagName === tag) {
    var ejInstance = getValue3("ej2_instances", element2);
    input2 = createElement4("input", {
      attrs: {
        "type": type
      }
    });
    var props = ["change", "cssClass", "label", "labelPosition", "id"];
    for (var index = 0, len = element2.attributes.length; index < len; index++) {
      if (props.indexOf(element2.attributes[index].nodeName) === -1) {
        input2.setAttribute(element2.attributes[index].nodeName, element2.attributes[index].nodeValue);
      }
    }
    attributes3(element2, {
      "class": WRAPPER7
    });
    element2.appendChild(input2);
    element2.classList.add(role);
    element2.classList.remove(role);
    setValue4("ej2_instances", ejInstance, input2);
    deleteObject3(element2, "ej2_instances");
  }
  return input2;
}
function getTextNode2(element2) {
  var node;
  var childnode = element2.childNodes;
  for (var i = 0; i < childnode.length; i++) {
    node = childnode[i];
    if (node.nodeType === 3) {
      return node;
    }
  }
  return null;
}
function destroy3(ejInst, wrapper, tagName) {
  if (tagName === "INPUT") {
    wrapper.parentNode.insertBefore(ejInst.element, wrapper);
    detach3(wrapper);
    ejInst.element.checked = false;
    ["name", "value", "disabled"].forEach(function(key) {
      ejInst.element.removeAttribute(key);
    });
  } else {
    ["role", "aria-checked", "class"].forEach(function(key) {
      wrapper.removeAttribute(key);
    });
    wrapper.innerHTML = "";
    ejInst.element = wrapper;
  }
}
function preRender2(proxy, control, wrapper, element2, moduleName) {
  element2 = wrapperInitialize2(proxy.createElement, control, "checkbox", element2, wrapper, moduleName);
  proxy.element = element2;
  if (proxy.element.getAttribute("type") !== "checkbox") {
    proxy.element.setAttribute("type", "checkbox");
  }
  if (!proxy.element.id) {
    proxy.element.id = getUniqueID2("e-" + moduleName);
  }
}
function createCheckBox2(createElement4, enableRipple, options) {
  if (enableRipple === void 0) {
    enableRipple = false;
  }
  if (options === void 0) {
    options = {};
  }
  var wrapper = createElement4("div", {
    className: "e-checkbox-wrapper e-css"
  });
  if (options.cssClass) {
    addClass3([wrapper], options.cssClass.split(" "));
  }
  if (options.enableRtl) {
    wrapper.classList.add("e-rtl");
  }
  if (enableRipple) {
    var rippleSpan = createElement4("span", {
      className: "e-ripple-container"
    });
    rippleEffect2(rippleSpan, {
      isCenterRipple: true,
      duration: 400
    });
    wrapper.appendChild(rippleSpan);
  }
  var frameSpan = createElement4("span", {
    className: "e-frame e-icons"
  });
  if (options.checked) {
    frameSpan.classList.add("e-check");
  }
  wrapper.appendChild(frameSpan);
  if (options.label) {
    var labelSpan = createElement4("span", {
      className: "e-label"
    });
    if (options.disableHtmlEncode) {
      labelSpan.textContent = options.label;
    } else {
      labelSpan.innerHTML = options.label;
    }
    wrapper.appendChild(labelSpan);
  }
  return wrapper;
}
function rippleMouseHandler2(e, rippleSpan) {
  if (rippleSpan) {
    var event_1 = document.createEvent("MouseEvents");
    event_1.initEvent(e.type, false, true);
    rippleSpan.dispatchEvent(event_1);
  }
}
function setHiddenInput2(proxy, wrap) {
  if (proxy.element.getAttribute("ejs-for")) {
    wrap.appendChild(proxy.createElement("input", {
      attrs: {
        "name": proxy.name || proxy.element.name,
        "value": "false",
        "type": "hidden"
      }
    }));
  }
}

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/button/button.js
var __extends38 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate37 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var IconPosition2;
(function(IconPosition3) {
  IconPosition3["Left"] = "Left";
  IconPosition3["Right"] = "Right";
  IconPosition3["Top"] = "Top";
  IconPosition3["Bottom"] = "Bottom";
})(IconPosition2 || (IconPosition2 = {}));
var buttonObserver2 = new Observer3();
var cssClassName2 = {
  RTL: "e-rtl",
  BUTTON: "e-btn",
  PRIMARY: "e-primary",
  ICONBTN: "e-icon-btn"
};
var Button2 = (
  /** @class */
  function(_super) {
    __extends38(Button3, _super);
    function Button3(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Button3.prototype.preRender = function() {
    };
    Button3.prototype.render = function() {
      this.initialize();
      this.removeRippleEffect = rippleEffect2(this.element, {
        selector: "." + cssClassName2.BUTTON
      });
      this.renderComplete();
    };
    Button3.prototype.initialize = function() {
      if (this.cssClass) {
        addClass3([this.element], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.isPrimary) {
        this.element.classList.add(cssClassName2.PRIMARY);
      }
      if (!isBlazor3() || isBlazor3() && this.getModuleName() !== "progress-btn") {
        if (this.content) {
          var tempContent = this.enableHtmlSanitizer ? SanitizeHtmlHelper3.sanitize(this.content) : this.content;
          this.element.innerHTML = tempContent;
        }
        this.setIconCss();
      }
      if (this.enableRtl) {
        this.element.classList.add(cssClassName2.RTL);
      }
      if (this.disabled) {
        this.controlStatus(this.disabled);
      } else {
        this.wireEvents();
      }
    };
    Button3.prototype.controlStatus = function(disabled) {
      this.element.disabled = disabled;
    };
    Button3.prototype.setIconCss = function() {
      if (this.iconCss) {
        var span = this.createElement("span", {
          className: "e-btn-icon " + this.iconCss
        });
        if (!this.element.textContent.trim()) {
          this.element.classList.add(cssClassName2.ICONBTN);
        } else {
          span.classList.add("e-icon-" + this.iconPosition.toLowerCase());
          if (this.iconPosition === "Top" || this.iconPosition === "Bottom") {
            this.element.classList.add("e-" + this.iconPosition.toLowerCase() + "-icon-btn");
          }
        }
        var node = this.element.childNodes[0];
        if (node && (this.iconPosition === "Left" || this.iconPosition === "Top")) {
          this.element.insertBefore(span, node);
        } else {
          this.element.appendChild(span);
        }
      }
    };
    Button3.prototype.wireEvents = function() {
      if (this.isToggle) {
        EventHandler3.add(this.element, "click", this.btnClickHandler, this);
      }
    };
    Button3.prototype.unWireEvents = function() {
      if (this.isToggle) {
        EventHandler3.remove(this.element, "click", this.btnClickHandler);
      }
    };
    Button3.prototype.btnClickHandler = function() {
      if (this.element.classList.contains("e-active")) {
        this.element.classList.remove("e-active");
      } else {
        this.element.classList.add("e-active");
      }
    };
    Button3.prototype.destroy = function() {
      var classList2 = [cssClassName2.PRIMARY, cssClassName2.RTL, cssClassName2.ICONBTN, "e-success", "e-info", "e-danger", "e-warning", "e-flat", "e-outline", "e-small", "e-bigger", "e-active", "e-round", "e-top-icon-btn", "e-bottom-icon-btn"];
      if (this.cssClass) {
        classList2 = classList2.concat(this.cssClass.split(" "));
      }
      _super.prototype.destroy.call(this);
      removeClass3([this.element], classList2);
      if (!this.element.getAttribute("class")) {
        this.element.removeAttribute("class");
      }
      if (this.disabled) {
        this.element.removeAttribute("disabled");
      }
      if (this.content) {
        this.element.innerHTML = this.element.innerHTML.replace(this.content, "");
      }
      var span = this.element.querySelector("span.e-btn-icon");
      if (span) {
        detach3(span);
      }
      this.unWireEvents();
      if (isRippleEnabled2) {
        this.removeRippleEffect();
      }
    };
    Button3.prototype.getModuleName = function() {
      return "btn";
    };
    Button3.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Button3.Inject = function() {
    };
    Button3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var span = this.element.querySelector("span.e-btn-icon");
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "isPrimary":
            if (newProp.isPrimary) {
              this.element.classList.add(cssClassName2.PRIMARY);
            } else {
              this.element.classList.remove(cssClassName2.PRIMARY);
            }
            break;
          case "disabled":
            this.controlStatus(newProp.disabled);
            break;
          case "iconCss": {
            span = this.element.querySelector("span.e-btn-icon");
            if (span) {
              if (newProp.iconCss) {
                span.className = "e-btn-icon " + newProp.iconCss;
                if (this.element.textContent.trim()) {
                  if (this.iconPosition === "Left") {
                    span.classList.add("e-icon-left");
                  } else {
                    span.classList.add("e-icon-right");
                  }
                }
              } else {
                detach3(span);
              }
            } else {
              this.setIconCss();
            }
            break;
          }
          case "iconPosition":
            removeClass3([this.element], ["e-top-icon-btn", "e-bottom-icon-btn"]);
            span = this.element.querySelector("span.e-btn-icon");
            if (span) {
              detach3(span);
            }
            this.setIconCss();
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass3([this.element], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass3([this.element], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              this.element.classList.add(cssClassName2.RTL);
            } else {
              this.element.classList.remove(cssClassName2.RTL);
            }
            break;
          case "content": {
            var node = getTextNode2(this.element);
            if (!node) {
              this.element.classList.remove(cssClassName2.ICONBTN);
            }
            if (!isBlazor3() || isBlazor3() && !this.isServerRendered && this.getModuleName() !== "progress-btn") {
              if (this.enableHtmlSanitizer) {
                newProp.content = SanitizeHtmlHelper3.sanitize(newProp.content);
              }
              this.element.innerHTML = newProp.content;
              this.setIconCss();
            }
            break;
          }
          case "isToggle":
            if (newProp.isToggle) {
              EventHandler3.add(this.element, "click", this.btnClickHandler, this);
            } else {
              EventHandler3.remove(this.element, "click", this.btnClickHandler);
              removeClass3([this.element], ["e-active"]);
            }
            break;
        }
      }
    };
    Button3.prototype.click = function() {
      this.element.click();
    };
    Button3.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate37([Property3("Left")], Button3.prototype, "iconPosition", void 0);
    __decorate37([Property3("")], Button3.prototype, "iconCss", void 0);
    __decorate37([Property3(false)], Button3.prototype, "disabled", void 0);
    __decorate37([Property3(false)], Button3.prototype, "isPrimary", void 0);
    __decorate37([Property3("")], Button3.prototype, "cssClass", void 0);
    __decorate37([Property3("")], Button3.prototype, "content", void 0);
    __decorate37([Property3(false)], Button3.prototype, "isToggle", void 0);
    __decorate37([Property3()], Button3.prototype, "locale", void 0);
    __decorate37([Property3(true)], Button3.prototype, "enableHtmlSanitizer", void 0);
    __decorate37([Event4()], Button3.prototype, "created", void 0);
    Button3 = __decorate37([NotifyPropertyChanges3], Button3);
    return Button3;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/check-box/check-box.js
var __extends39 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate38 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CHECK2 = "e-check";
var DISABLED4 = "e-checkbox-disabled";
var FRAME2 = "e-frame";
var INDETERMINATE2 = "e-stop";
var LABEL3 = "e-label";
var RIPPLE4 = "e-ripple-container";
var RIPPLECHECK2 = "e-ripple-check";
var RIPPLEINDETERMINATE2 = "e-ripple-stop";
var RTL6 = "e-rtl";
var WRAPPER4 = "e-checkbox-wrapper";
var containerAttr2 = ["title", "class", "style", "disabled", "readonly", "name", "value", "id", "tabindex", "aria-label", "required"];
var CheckBox2 = (
  /** @class */
  function(_super) {
    __extends39(CheckBox3, _super);
    function CheckBox3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isFocused = false;
      _this.isMouseClick = false;
      _this.clickTriggered = false;
      _this.validCheck = true;
      _this.type = "checkbox";
      return _this;
    }
    CheckBox3.prototype.changeState = function(state, isInitialize, isInterAction) {
      var wrapper = this.getWrapper();
      var rippleSpan = null;
      var frameSpan = null;
      if (wrapper) {
        frameSpan = wrapper.getElementsByClassName(FRAME2)[0];
        if (isRippleEnabled2) {
          rippleSpan = wrapper.getElementsByClassName(RIPPLE4)[0];
        }
      }
      if (state === "check") {
        if (frameSpan) {
          frameSpan.classList.remove(INDETERMINATE2);
          frameSpan.classList.add(CHECK2);
        }
        if (rippleSpan) {
          rippleSpan.classList.remove(RIPPLEINDETERMINATE2);
          rippleSpan.classList.add(RIPPLECHECK2);
        }
        this.element.checked = true;
        if ((this.element.required || closest3(this.element, "form") && closest3(this.element, "form").classList.contains("e-formvalidator")) && this.validCheck && !isInitialize && isInterAction) {
          this.element.checked = false;
          this.validCheck = false;
        } else if (this.element.required || closest3(this.element, "form") && closest3(this.element, "form").classList.contains("e-formvalidator")) {
          this.validCheck = true;
        }
      } else if (state === "uncheck") {
        if (frameSpan) {
          removeClass3([frameSpan], [CHECK2, INDETERMINATE2]);
        }
        if (rippleSpan) {
          removeClass3([rippleSpan], [RIPPLECHECK2, RIPPLEINDETERMINATE2]);
        }
        this.element.checked = false;
        if ((this.element.required || closest3(this.element, "form") && closest3(this.element, "form").classList.contains("e-formvalidator")) && this.validCheck && !isInitialize && isInterAction) {
          this.element.checked = true;
          this.validCheck = false;
        } else if (this.element.required || closest3(this.element, "form") && closest3(this.element, "form").classList.contains("e-formvalidator")) {
          this.validCheck = true;
        }
      } else {
        if (frameSpan) {
          frameSpan.classList.remove(CHECK2);
          frameSpan.classList.add(INDETERMINATE2);
        }
        if (rippleSpan) {
          rippleSpan.classList.remove(RIPPLECHECK2);
          rippleSpan.classList.add(RIPPLEINDETERMINATE2);
        }
        this.element.indeterminate = true;
        this.indeterminate = true;
      }
    };
    CheckBox3.prototype.clickHandler = function(event2) {
      if (event2.target.tagName === "INPUT" && this.clickTriggered) {
        this.changeState(this.checked ? "check" : "uncheck");
        this.clickTriggered = false;
        return;
      }
      if (event2.target.tagName === "SPAN" || event2.target.tagName === "LABEL" || closest3(event2.target, ".e-label")) {
        this.clickTriggered = true;
      }
      if (this.isMouseClick) {
        this.focusOutHandler();
        this.isMouseClick = false;
      }
      if (this.indeterminate) {
        this.changeState(this.checked ? "check" : "uncheck", false, true);
        this.indeterminate = false;
        this.element.indeterminate = false;
      } else if (this.checked) {
        this.changeState("uncheck", false, true);
        this.checked = false;
      } else {
        this.changeState("check", false, true);
        this.checked = true;
      }
      var changeEventArgs = {
        checked: this.updateVueArrayModel(false),
        event: event2
      };
      this.trigger("change", changeEventArgs);
      event2.stopPropagation();
    };
    CheckBox3.prototype.destroy = function() {
      var _this = this;
      var wrapper = this.getWrapper();
      _super.prototype.destroy.call(this);
      if (this.wrapper) {
        wrapper = this.wrapper;
        if (!this.disabled) {
          this.unWireEvents();
        }
        if (this.tagName === "INPUT") {
          if (this.getWrapper() && wrapper.parentNode) {
            wrapper.parentNode.insertBefore(this.element, wrapper);
          }
          detach3(wrapper);
          this.element.checked = false;
          if (this.indeterminate) {
            this.element.indeterminate = false;
          }
          ["name", "value", "disabled"].forEach(function(key) {
            _this.element.removeAttribute(key);
          });
        } else {
          ["class"].forEach(function(key) {
            wrapper.removeAttribute(key);
          });
          wrapper.innerHTML = "";
          this.element = wrapper;
          if (this.refreshing) {
            ["e-control", "e-checkbox", "e-lib"].forEach(function(key) {
              _this.element.classList.add(key);
            });
            setValue4("ej2_instances", [this], this.element);
          }
        }
      }
    };
    CheckBox3.prototype.focusHandler = function() {
      this.isFocused = true;
    };
    CheckBox3.prototype.focusOutHandler = function() {
      var wrapper = this.getWrapper();
      if (wrapper) {
        wrapper.classList.remove("e-focus");
      }
      this.isFocused = false;
    };
    CheckBox3.prototype.getModuleName = function() {
      return "checkbox";
    };
    CheckBox3.prototype.getPersistData = function() {
      return this.addOnPersist(["checked", "indeterminate"]);
    };
    CheckBox3.prototype.getWrapper = function() {
      if (this.element && this.element.parentElement) {
        return this.element.parentElement.parentElement;
      } else {
        return null;
      }
    };
    CheckBox3.prototype.getLabel = function() {
      if (this.element) {
        return this.element.parentElement;
      } else {
        return null;
      }
    };
    CheckBox3.prototype.initialize = function() {
      if (isNullOrUndefined3(this.initialCheckedValue)) {
        this.initialCheckedValue = this.checked;
      }
      if (this.name) {
        this.element.setAttribute("name", this.name);
      }
      if (this.value) {
        this.element.setAttribute("value", this.value);
        if (this.isVue && typeof this.value === "boolean" && this.value === true) {
          this.setProperties({
            "checked": true
          }, true);
        }
      }
      if (this.checked) {
        this.changeState("check", true);
      }
      if (this.indeterminate) {
        this.changeState();
      }
      if (this.disabled) {
        this.setDisabled();
      }
    };
    CheckBox3.prototype.initWrapper = function() {
      var wrapper = this.element.parentElement;
      if (!wrapper.classList.contains(WRAPPER4)) {
        wrapper = this.createElement("div", {
          className: WRAPPER4
        });
        if (this.element.parentNode) {
          this.element.parentNode.insertBefore(wrapper, this.element);
        }
      }
      var label = this.createElement("label", {
        attrs: {
          for: this.htmlAttributes.id ? this.htmlAttributes.id : this.element.id
        }
      });
      var frameSpan = this.createElement("span", {
        className: "e-icons " + FRAME2
      });
      wrapper.classList.add("e-wrapper");
      if (this.enableRtl) {
        wrapper.classList.add(RTL6);
      }
      if (this.cssClass) {
        addClass3([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      wrapper.appendChild(label);
      label.appendChild(this.element);
      setHiddenInput2(this, label);
      label.appendChild(frameSpan);
      if (isRippleEnabled2) {
        var rippleSpan = this.createElement("span", {
          className: RIPPLE4
        });
        if (this.labelPosition === "Before") {
          label.appendChild(rippleSpan);
        } else {
          label.insertBefore(rippleSpan, frameSpan);
        }
        rippleEffect2(rippleSpan, {
          duration: 400,
          isCenterRipple: true
        });
      }
      if (this.label) {
        this.setText(this.label);
      }
    };
    CheckBox3.prototype.keyUpHandler = function() {
      if (this.isFocused) {
        this.getWrapper().classList.add("e-focus");
      }
    };
    CheckBox3.prototype.labelMouseDownHandler = function(e) {
      this.isMouseClick = true;
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE4)[0];
      rippleMouseHandler2(e, rippleSpan);
    };
    CheckBox3.prototype.labelMouseLeaveHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE4)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler2(e, rippleSpan);
      }
    };
    CheckBox3.prototype.labelMouseUpHandler = function(e) {
      this.isMouseClick = true;
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE4)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = 0; i < rippleElem.length - 1; i++) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler2(e, rippleSpan);
      }
    };
    CheckBox3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrapper = this.getWrapper();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "checked":
            this.indeterminate = false;
            this.element.indeterminate = false;
            this.changeState(newProp.checked ? "check" : "uncheck");
            break;
          case "indeterminate":
            if (newProp.indeterminate) {
              this.changeState();
            } else {
              this.element.indeterminate = false;
              this.changeState(this.checked ? "check" : "uncheck");
            }
            break;
          case "disabled":
            if (newProp.disabled) {
              this.setDisabled();
              this.wrapper = this.getWrapper();
              this.unWireEvents();
            } else {
              this.element.disabled = false;
              wrapper.classList.remove(DISABLED4);
              wrapper.setAttribute("aria-disabled", "false");
              this.wireEvents();
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass3([wrapper], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass3([wrapper], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              wrapper.classList.add(RTL6);
            } else {
              wrapper.classList.remove(RTL6);
            }
            break;
          case "label":
            this.setText(newProp.label);
            break;
          case "labelPosition": {
            var label = wrapper.getElementsByClassName(LABEL3)[0];
            var labelWrap = wrapper.getElementsByTagName("label")[0];
            detach3(label);
            if (newProp.labelPosition === "After") {
              labelWrap.appendChild(label);
            } else {
              labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME2)[0]);
            }
            break;
          }
          case "name":
            this.element.setAttribute("name", newProp.name);
            break;
          case "value":
            if (this.isVue && typeof newProp.value === "object") {
              break;
            }
            this.element.setAttribute("value", newProp.value);
            break;
          case "htmlAttributes":
            this.updateHtmlAttributeToWrapper();
            break;
        }
      }
    };
    CheckBox3.prototype.preRender = function() {
      var element2 = this.element;
      this.tagName = this.element.tagName;
      element2 = wrapperInitialize2(this.createElement, "EJS-CHECKBOX", "checkbox", element2, WRAPPER4, "checkbox");
      this.element = element2;
      if (this.element.getAttribute("type") !== "checkbox") {
        this.element.setAttribute("type", "checkbox");
      }
      if (!this.element.id) {
        this.element.id = getUniqueID2("e-" + this.getModuleName());
      }
    };
    CheckBox3.prototype.render = function() {
      this.initWrapper();
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      this.updateHtmlAttributeToWrapper();
      this.updateVueArrayModel(true);
      this.renderComplete();
      this.wrapper = this.getWrapper();
    };
    CheckBox3.prototype.setDisabled = function() {
      var wrapper = this.getWrapper();
      this.element.disabled = true;
      wrapper.classList.add(DISABLED4);
      wrapper.setAttribute("aria-disabled", "true");
    };
    CheckBox3.prototype.setText = function(text) {
      var wrapper = this.getWrapper();
      if (!wrapper) {
        return;
      }
      var label = wrapper.getElementsByClassName(LABEL3)[0];
      if (label) {
        label.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper3.sanitize(text) : text;
      } else {
        text = this.enableHtmlSanitizer ? SanitizeHtmlHelper3.sanitize(text) : text;
        label = this.createElement("span", {
          className: LABEL3,
          innerHTML: text
        });
        var labelWrap = wrapper.getElementsByTagName("label")[0];
        if (this.labelPosition === "Before") {
          labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME2)[0]);
        } else {
          labelWrap.appendChild(label);
        }
      }
    };
    CheckBox3.prototype.changeHandler = function(e) {
      e.stopPropagation();
    };
    CheckBox3.prototype.formResetHandler = function() {
      this.checked = this.initialCheckedValue;
      this.element.checked = this.initialCheckedValue;
    };
    CheckBox3.prototype.unWireEvents = function() {
      var wrapper = this.wrapper;
      EventHandler3.remove(wrapper, "click", this.clickHandler);
      EventHandler3.remove(this.element, "keyup", this.keyUpHandler);
      EventHandler3.remove(this.element, "focus", this.focusHandler);
      EventHandler3.remove(this.element, "focusout", this.focusOutHandler);
      var label = wrapper.getElementsByTagName("label")[0];
      if (label) {
        EventHandler3.remove(label, "mousedown", this.labelMouseDownHandler);
        EventHandler3.remove(label, "mouseup", this.labelMouseUpHandler);
        EventHandler3.remove(label, "mouseleave", this.labelMouseLeaveHandler);
      }
      var formElem = closest3(this.element, "form");
      if (formElem) {
        EventHandler3.remove(formElem, "reset", this.formResetHandler);
      }
      if (this.tagName === "EJS-CHECKBOX") {
        EventHandler3.remove(this.element, "change", this.changeHandler);
      }
    };
    CheckBox3.prototype.wireEvents = function() {
      var wrapper = this.getWrapper();
      EventHandler3.add(wrapper, "click", this.clickHandler, this);
      EventHandler3.add(this.element, "keyup", this.keyUpHandler, this);
      EventHandler3.add(this.element, "focus", this.focusHandler, this);
      EventHandler3.add(this.element, "focusout", this.focusOutHandler, this);
      var label = wrapper.getElementsByTagName("label")[0];
      EventHandler3.add(label, "mousedown", this.labelMouseDownHandler, this);
      EventHandler3.add(label, "mouseup", this.labelMouseUpHandler, this);
      EventHandler3.add(label, "mouseleave", this.labelMouseLeaveHandler, this);
      var formElem = closest3(this.element, "form");
      if (formElem) {
        EventHandler3.add(formElem, "reset", this.formResetHandler, this);
      }
      if (this.tagName === "EJS-CHECKBOX") {
        EventHandler3.add(this.element, "change", this.changeHandler, this);
      }
    };
    CheckBox3.prototype.updateVueArrayModel = function(init) {
      if (this.isVue && typeof this.value === "object") {
        var value = this.element.value;
        if (value && this.value) {
          if (init) {
            for (var i = 0; i < this.value.length; i++) {
              if (value === this.value[i]) {
                this.changeState("check");
                this.setProperties({
                  "checked": true
                }, true);
              }
            }
          } else {
            var index = this.value.indexOf(value);
            if (this.checked) {
              if (index < 0) {
                this.value.push(value);
              }
            } else {
              if (index > -1) {
                this.value.splice(index, 1);
              }
            }
            return this.value;
          }
        }
      }
      return this.validCheck ? this.element.checked : !this.element.checked;
    };
    CheckBox3.prototype.updateHtmlAttributeToWrapper = function() {
      if (!isNullOrUndefined3(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          var wrapper = this.getWrapper();
          if (containerAttr2.indexOf(key) > -1) {
            if (key === "class") {
              addClass3([wrapper], this.htmlAttributes["" + key].split(" "));
            } else if (key === "title") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "style") {
              var frameSpan = this.getWrapper().getElementsByClassName(FRAME2)[0];
              frameSpan.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "disabled") {
              if (this.htmlAttributes["" + key] === "true") {
                this.setDisabled();
              }
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            } else {
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            }
          } else {
            wrapper.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    CheckBox3.prototype.click = function() {
      this.element.click();
    };
    CheckBox3.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate38([Event4()], CheckBox3.prototype, "change", void 0);
    __decorate38([Event4()], CheckBox3.prototype, "created", void 0);
    __decorate38([Property3(false)], CheckBox3.prototype, "checked", void 0);
    __decorate38([Property3("")], CheckBox3.prototype, "cssClass", void 0);
    __decorate38([Property3(false)], CheckBox3.prototype, "disabled", void 0);
    __decorate38([Property3(false)], CheckBox3.prototype, "indeterminate", void 0);
    __decorate38([Property3("")], CheckBox3.prototype, "label", void 0);
    __decorate38([Property3("After")], CheckBox3.prototype, "labelPosition", void 0);
    __decorate38([Property3("")], CheckBox3.prototype, "name", void 0);
    __decorate38([Property3("")], CheckBox3.prototype, "value", void 0);
    __decorate38([Property3(true)], CheckBox3.prototype, "enableHtmlSanitizer", void 0);
    __decorate38([Property3({})], CheckBox3.prototype, "htmlAttributes", void 0);
    CheckBox3 = __decorate38([NotifyPropertyChanges3], CheckBox3);
    return CheckBox3;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/radio-button/radio-button.js
var __extends40 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate39 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var LABEL4 = "e-label";
var RIPPLE5 = "e-ripple-container";
var RTL7 = "e-rtl";
var WRAPPER5 = "e-radio-wrapper";
var ATTRIBUTES3 = ["title", "class", "style", "disabled", "readonly", "name", "value", "id"];
var RadioButton2 = (
  /** @class */
  function(_super) {
    __extends40(RadioButton3, _super);
    function RadioButton3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isFocused = false;
      _this.type = "radio";
      return _this;
    }
    RadioButton_1 = RadioButton3;
    RadioButton3.prototype.changeHandler = function(event2) {
      this.checked = true;
      this.dataBind();
      var value = this.element.getAttribute("value");
      value = this.isVue && value ? this.element.value : this.value;
      var type = typeof this.value;
      if (this.isVue && type === "boolean") {
        value = value === "true" ? true : false;
      }
      this.trigger("change", {
        value,
        event: event2
      });
      if (this.isAngular) {
        event2.stopPropagation();
      }
    };
    RadioButton3.prototype.updateChange = function() {
      var input2;
      var instance;
      var radioGrp = this.getRadioGroup();
      for (var i = 0; i < radioGrp.length; i++) {
        input2 = radioGrp[i];
        if (input2 !== this.element) {
          instance = getInstance2(input2, RadioButton_1);
          instance.checked = false;
          if (this.tagName === "EJS-RADIOBUTTON") {
            instance.angularValue = this.value;
          }
        }
      }
    };
    RadioButton3.prototype.destroy = function() {
      var _this = this;
      var radioWrap = this.wrapper;
      _super.prototype.destroy.call(this);
      if (radioWrap) {
        if (!this.disabled) {
          this.unWireEvents();
        }
        if (this.tagName === "INPUT") {
          if (radioWrap.parentNode) {
            radioWrap.parentNode.insertBefore(this.element, radioWrap);
          }
          detach3(radioWrap);
          this.element.checked = false;
          ["name", "value", "disabled"].forEach(function(key) {
            _this.element.removeAttribute(key);
          });
        } else {
          ["role", "aria-checked", "class"].forEach(function(key) {
            radioWrap.removeAttribute(key);
          });
          radioWrap.innerHTML = "";
          this.element = this.wrapper;
          if (this.refreshing) {
            ["e-control", "e-radio", "e-lib"].forEach(function(key) {
              _this.element.classList.add(key);
            });
            setValue4("ej2_instances", [this], this.element);
          }
        }
      }
    };
    RadioButton3.prototype.focusHandler = function() {
      this.isFocused = true;
    };
    RadioButton3.prototype.focusOutHandler = function() {
      var label = this.getLabel();
      if (label) {
        label.classList.remove("e-focus");
      }
    };
    RadioButton3.prototype.getModuleName = function() {
      return "radio";
    };
    RadioButton3.prototype.getSelectedValue = function() {
      var input2;
      var radioGrp = this.getRadioGroup();
      for (var i = 0, len = radioGrp.length; i < len; i++) {
        input2 = radioGrp[i];
        if (input2.checked) {
          return input2.value;
        }
      }
      return "";
    };
    RadioButton3.prototype.getRadioGroup = function() {
      return document.querySelectorAll('input.e-radio[name="' + this.element.getAttribute("name") + '"]');
    };
    RadioButton3.prototype.getPersistData = function() {
      return this.addOnPersist(["checked"]);
    };
    RadioButton3.prototype.getWrapper = function() {
      if (this.element.parentElement) {
        return this.element.parentElement;
      } else {
        return null;
      }
    };
    RadioButton3.prototype.getLabel = function() {
      if (this.element.nextElementSibling) {
        return this.element.nextElementSibling;
      } else {
        return null;
      }
    };
    RadioButton3.prototype.initialize = function() {
      if (isNullOrUndefined3(this.initialCheckedValue)) {
        this.initialCheckedValue = this.checked;
      }
      this.initWrapper();
      this.updateHtmlAttribute();
      if (this.name) {
        this.element.setAttribute("name", this.name);
      }
      var value = this.element.getAttribute("value");
      var type = typeof this.value;
      if (this.isVue && type === "boolean") {
        value = value === "true" ? true : false;
      }
      if (this.isVue ? this.value && type !== "boolean" && !value : this.value) {
        this.element.setAttribute("value", this.value);
      }
      if (this.checked) {
        this.element.checked = true;
      }
      if (this.disabled) {
        this.setDisabled();
      }
    };
    RadioButton3.prototype.initWrapper = function() {
      var rippleSpan;
      var wrapper = this.element.parentElement;
      if (!wrapper.classList.contains(WRAPPER5)) {
        wrapper = this.createElement("div", {
          className: WRAPPER5
        });
        if (this.element.parentNode) {
          this.element.parentNode.insertBefore(wrapper, this.element);
        }
      }
      var label = this.createElement("label", {
        attrs: {
          for: this.element.id
        }
      });
      wrapper.appendChild(this.element);
      wrapper.appendChild(label);
      if (isRippleEnabled2) {
        rippleSpan = this.createElement("span", {
          className: RIPPLE5
        });
        label.appendChild(rippleSpan);
        rippleEffect2(rippleSpan, {
          duration: 400,
          isCenterRipple: true
        });
      }
      wrapper.classList.add("e-wrapper");
      if (this.enableRtl) {
        label.classList.add(RTL7);
      }
      if (this.cssClass) {
        addClass3([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.label) {
        this.setText(this.label);
      }
    };
    RadioButton3.prototype.keyUpHandler = function() {
      if (this.isFocused) {
        this.getLabel().classList.add("e-focus");
      }
    };
    RadioButton3.prototype.labelMouseDownHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE5)[0];
      rippleMouseHandler2(e, rippleSpan);
    };
    RadioButton3.prototype.labelMouseLeaveHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE5)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler2(e, rippleSpan);
      }
    };
    RadioButton3.prototype.labelMouseUpHandler = function(e) {
      var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE5)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler2(e, rippleSpan);
      }
    };
    RadioButton3.prototype.formResetHandler = function() {
      this.checked = this.initialCheckedValue;
      if (this.initialCheckedValue) {
        attributes3(this.element, {
          "checked": "true"
        });
      }
    };
    RadioButton3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrap = this.getWrapper();
      var label = this.getLabel();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "checked":
            if (newProp.checked) {
              this.updateChange();
            }
            this.element.checked = newProp.checked;
            break;
          case "disabled":
            if (newProp.disabled) {
              this.setDisabled();
              this.unWireEvents();
            } else {
              this.element.disabled = false;
              this.wireEvents();
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass3([wrap], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass3([wrap], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              label.classList.add(RTL7);
            } else {
              label.classList.remove(RTL7);
            }
            break;
          case "label":
            this.setText(newProp.label);
            break;
          case "labelPosition":
            if (newProp.labelPosition === "Before") {
              label.classList.add("e-right");
            } else {
              label.classList.remove("e-right");
            }
            break;
          case "name":
            this.element.setAttribute("name", newProp.name);
            break;
          case "value":
            var type = typeof this.htmlAttributes.value;
            if (!isNullOrUndefined3(this.htmlAttributes) && (this.htmlAttributes.value || type === "boolean" && !this.htmlAttributes.value)) {
              break;
            }
            this.element.setAttribute("value", newProp.value);
            break;
          case "htmlAttributes":
            this.updateHtmlAttribute();
            break;
        }
      }
    };
    RadioButton3.prototype.preRender = function() {
      var element2 = this.element;
      this.formElement = closest3(this.element, "form");
      this.tagName = this.element.tagName;
      element2 = wrapperInitialize2(this.createElement, "EJS-RADIOBUTTON", "radio", element2, WRAPPER5, "radio");
      this.element = element2;
      if (this.element.getAttribute("type") !== "radio") {
        this.element.setAttribute("type", "radio");
      }
      if (!this.element.id) {
        this.element.id = getUniqueID2("e-" + this.getModuleName());
      }
      if (this.tagName === "EJS-RADIOBUTTON") {
        var formControlName = this.element.getAttribute("formcontrolname");
        if (formControlName) {
          this.setProperties({
            "name": formControlName
          }, true);
          this.element.setAttribute("name", formControlName);
        }
      }
    };
    RadioButton3.prototype.render = function() {
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      this.renderComplete();
      this.wrapper = this.getWrapper();
    };
    RadioButton3.prototype.setDisabled = function() {
      this.element.disabled = true;
    };
    RadioButton3.prototype.setText = function(text) {
      var label = this.getLabel();
      var textLabel = label.getElementsByClassName(LABEL4)[0];
      if (textLabel) {
        textLabel.textContent = text;
      } else {
        text = this.enableHtmlSanitizer ? SanitizeHtmlHelper3.sanitize(text) : text;
        textLabel = this.createElement("span", {
          className: LABEL4,
          innerHTML: text
        });
        label.appendChild(textLabel);
      }
      if (this.labelPosition === "Before") {
        this.getLabel().classList.add("e-right");
      } else {
        this.getLabel().classList.remove("e-right");
      }
    };
    RadioButton3.prototype.updateHtmlAttribute = function() {
      if (!isNullOrUndefined3(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          var wrapper = this.element.parentElement;
          if (ATTRIBUTES3.indexOf(key) > -1) {
            if (key === "class") {
              addClass3([wrapper], this.htmlAttributes["" + key].replace(/\s+/g, " ").trim().split(" "));
            } else if (key === "title" || key === "style") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else {
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            }
          } else {
            wrapper.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    RadioButton3.prototype.unWireEvents = function() {
      var label = this.wrapper;
      EventHandler3.remove(this.element, "change", this.changeHandler);
      EventHandler3.remove(this.element, "focus", this.focusHandler);
      EventHandler3.remove(this.element, "focusout", this.focusOutHandler);
      EventHandler3.remove(this.element, "keyup", this.keyUpHandler);
      var rippleLabel = label.getElementsByTagName("label")[0];
      if (rippleLabel) {
        EventHandler3.remove(rippleLabel, "mousedown", this.labelMouseDownHandler);
        EventHandler3.remove(rippleLabel, "mouseup", this.labelMouseUpHandler);
        EventHandler3.remove(rippleLabel, "mouseleave", this.labelMouseLeaveHandler);
      }
      if (this.formElement) {
        EventHandler3.remove(this.formElement, "reset", this.formResetHandler);
      }
    };
    RadioButton3.prototype.wireEvents = function() {
      var label = this.getLabel();
      EventHandler3.add(this.element, "change", this.changeHandler, this);
      EventHandler3.add(this.element, "keyup", this.keyUpHandler, this);
      EventHandler3.add(this.element, "focus", this.focusHandler, this);
      EventHandler3.add(this.element, "focusout", this.focusOutHandler, this);
      var rippleLabel = label.getElementsByClassName(LABEL4)[0];
      if (rippleLabel) {
        EventHandler3.add(rippleLabel, "mousedown", this.labelMouseDownHandler, this);
        EventHandler3.add(rippleLabel, "mouseup", this.labelMouseUpHandler, this);
        EventHandler3.add(rippleLabel, "mouseleave", this.labelMouseLeaveHandler, this);
      }
      if (this.formElement) {
        EventHandler3.add(this.formElement, "reset", this.formResetHandler, this);
      }
    };
    RadioButton3.prototype.click = function() {
      this.element.click();
    };
    RadioButton3.prototype.focusIn = function() {
      this.element.focus();
    };
    var RadioButton_1;
    __decorate39([Event4()], RadioButton3.prototype, "change", void 0);
    __decorate39([Event4()], RadioButton3.prototype, "created", void 0);
    __decorate39([Property3(false)], RadioButton3.prototype, "checked", void 0);
    __decorate39([Property3("")], RadioButton3.prototype, "cssClass", void 0);
    __decorate39([Property3(false)], RadioButton3.prototype, "disabled", void 0);
    __decorate39([Property3("")], RadioButton3.prototype, "label", void 0);
    __decorate39([Property3("After")], RadioButton3.prototype, "labelPosition", void 0);
    __decorate39([Property3("")], RadioButton3.prototype, "name", void 0);
    __decorate39([Property3("")], RadioButton3.prototype, "value", void 0);
    __decorate39([Property3(true)], RadioButton3.prototype, "enableHtmlSanitizer", void 0);
    __decorate39([Property3({})], RadioButton3.prototype, "htmlAttributes", void 0);
    RadioButton3 = RadioButton_1 = __decorate39([NotifyPropertyChanges3], RadioButton3);
    return RadioButton3;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/switch/switch.js
var __extends41 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate40 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var DISABLED5 = "e-switch-disabled";
var RIPPLE6 = "e-ripple-container";
var RIPPLE_CHECK2 = "e-ripple-check";
var RTL8 = "e-rtl";
var WRAPPER6 = "e-switch-wrapper";
var ACTIVE2 = "e-switch-active";
var ATTRIBUTES4 = ["title", "class", "style", "disabled", "readonly", "name", "value", "aria-label", "id", "role", "tabindex"];
var Switch2 = (
  /** @class */
  function(_super) {
    __extends41(Switch3, _super);
    function Switch3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isFocused = false;
      _this.isDrag = false;
      _this.isWireEvents = false;
      return _this;
    }
    Switch3.prototype.changeState = function(state) {
      var rippleSpan = null;
      var wrapper = this.getWrapper();
      var bar = wrapper.querySelector(".e-switch-inner");
      var handle = wrapper.querySelector(".e-switch-handle");
      if (isRippleEnabled2) {
        rippleSpan = wrapper.getElementsByClassName(RIPPLE6)[0];
      }
      if (state) {
        addClass3([bar, handle], ACTIVE2);
        this.element.checked = true;
        this.checked = true;
        if (rippleSpan) {
          addClass3([rippleSpan], [RIPPLE_CHECK2]);
        }
      } else {
        removeClass3([bar, handle], ACTIVE2);
        this.element.checked = false;
        this.checked = false;
        if (rippleSpan) {
          removeClass3([rippleSpan], [RIPPLE_CHECK2]);
        }
      }
    };
    Switch3.prototype.clickHandler = function(evt) {
      this.isDrag = false;
      this.focusOutHandler();
      var beforeChangeEventArgs = {
        event: evt,
        cancel: false,
        checked: this.checked
      };
      this.trigger("beforeChange", beforeChangeEventArgs);
      if (!beforeChangeEventArgs.cancel) {
        this.changeState(!beforeChangeEventArgs.checked);
        this.element.focus();
        var changeEventArgs = {
          checked: this.element.checked,
          event: evt
        };
        this.trigger("change", changeEventArgs);
      }
    };
    Switch3.prototype.destroy = function() {
      var _this = this;
      _super.prototype.destroy.call(this);
      if (!this.disabled) {
        this.unWireEvents();
      }
      if (this.formElement) {
        EventHandler3.remove(this.formElement, "reset", this.formResetHandler);
      }
      destroy3(this, this.getWrapper(), this.tagName);
      if (this.refreshing) {
        ["e-control", "e-switch", "e-lib"].forEach(function(key) {
          _this.element.classList.add(key);
        });
        setValue4("ej2_instances", [this], this.element);
      }
    };
    Switch3.prototype.focusHandler = function() {
      this.isFocused = true;
    };
    Switch3.prototype.focusOutHandler = function() {
      this.getWrapper().classList.remove("e-focus");
    };
    Switch3.prototype.getModuleName = function() {
      return "switch";
    };
    Switch3.prototype.getPersistData = function() {
      return this.addOnPersist(["checked"]);
    };
    Switch3.prototype.getWrapper = function() {
      if (this.element.parentElement) {
        return this.element.parentElement;
      } else {
        return null;
      }
    };
    Switch3.prototype.initialize = function() {
      this.element.setAttribute("role", "switch");
      if (isNullOrUndefined3(this.initialSwitchCheckedValue)) {
        this.initialSwitchCheckedValue = this.checked;
      }
      if (this.name) {
        this.element.setAttribute("name", this.name);
      }
      if (this.value) {
        this.element.setAttribute("value", this.value);
      }
      if (this.checked) {
        this.changeState(true);
      }
      if (this.disabled) {
        this.setDisabled();
      }
      if (this.onLabel || this.offLabel) {
        this.setLabel(this.onLabel, this.offLabel);
      }
    };
    Switch3.prototype.initWrapper = function() {
      var wrapper = this.element.parentElement;
      if (!wrapper.classList.contains(WRAPPER6)) {
        wrapper = this.createElement("div", {
          className: WRAPPER6
        });
        this.element.parentNode.insertBefore(wrapper, this.element);
      }
      var switchInner = this.createElement("span", {
        className: "e-switch-inner"
      });
      var onLabel = this.createElement("span", {
        className: "e-switch-on"
      });
      var offLabel = this.createElement("span", {
        className: "e-switch-off"
      });
      var handle = this.createElement("span", {
        className: "e-switch-handle"
      });
      wrapper.appendChild(this.element);
      setHiddenInput2(this, wrapper);
      switchInner.appendChild(onLabel);
      switchInner.appendChild(offLabel);
      wrapper.appendChild(switchInner);
      wrapper.appendChild(handle);
      if (isRippleEnabled2) {
        var rippleSpan = this.createElement("span", {
          className: RIPPLE6
        });
        handle.appendChild(rippleSpan);
        rippleEffect2(rippleSpan, {
          duration: 400,
          isCenterRipple: true
        });
      }
      wrapper.classList.add("e-wrapper");
      if (this.enableRtl) {
        wrapper.classList.add(RTL8);
      }
      if (this.cssClass) {
        addClass3([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
    };
    Switch3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrapper = this.getWrapper();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "checked":
            this.changeState(newProp.checked);
            break;
          case "disabled":
            if (newProp.disabled) {
              this.setDisabled();
              this.unWireEvents();
              this.isWireEvents = false;
            } else {
              this.element.disabled = false;
              wrapper.classList.remove(DISABLED5);
              wrapper.setAttribute("aria-disabled", "false");
              if (!this.isWireEvents) {
                this.wireEvents();
                this.isWireEvents = true;
              }
            }
            break;
          case "value":
            this.element.setAttribute("value", newProp.value);
            break;
          case "name":
            this.element.setAttribute("name", newProp.name);
            break;
          case "onLabel":
          case "offLabel":
            this.setLabel(newProp.onLabel, newProp.offLabel);
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              wrapper.classList.add(RTL8);
            } else {
              wrapper.classList.remove(RTL8);
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass3([wrapper], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass3([wrapper], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "htmlAttributes":
            this.updateHtmlAttribute();
            break;
        }
      }
    };
    Switch3.prototype.preRender = function() {
      var element2 = this.element;
      this.formElement = closest3(this.element, "form");
      this.tagName = this.element.tagName;
      preRender2(this, "EJS-SWITCH", WRAPPER6, element2, this.getModuleName());
    };
    Switch3.prototype.render = function() {
      this.initWrapper();
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      if (this.formElement) {
        EventHandler3.add(this.formElement, "reset", this.formResetHandler, this);
      }
      this.renderComplete();
      this.updateHtmlAttribute();
    };
    Switch3.prototype.rippleHandler = function(e) {
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE6)[0];
      rippleMouseHandler2(e, rippleSpan);
      if (e.type === "mousedown" && e.currentTarget.classList.contains("e-switch-wrapper") && e.which === 1) {
        this.isDrag = true;
        this.isFocused = false;
      }
    };
    Switch3.prototype.mouseLeaveHandler = function(e) {
      var rippleSpan = this.element.parentElement.getElementsByClassName(RIPPLE6)[0];
      if (rippleSpan) {
        var rippleElem = rippleSpan.querySelectorAll(".e-ripple-element");
        for (var i = rippleElem.length - 1; i > 0; i--) {
          rippleSpan.removeChild(rippleSpan.childNodes[i]);
        }
        rippleMouseHandler2(e, rippleSpan);
      }
    };
    Switch3.prototype.rippleTouchHandler = function(eventType) {
      var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE6)[0];
      if (rippleSpan) {
        var event_1 = document.createEvent("MouseEvents");
        event_1.initEvent(eventType, false, true);
        rippleSpan.dispatchEvent(event_1);
      }
    };
    Switch3.prototype.setDisabled = function() {
      var wrapper = this.getWrapper();
      this.element.disabled = true;
      wrapper.classList.add(DISABLED5);
      wrapper.setAttribute("aria-disabled", "true");
    };
    Switch3.prototype.setLabel = function(onText, offText) {
      var wrapper = this.getWrapper();
      if (onText) {
        wrapper.querySelector(".e-switch-on").textContent = onText;
      }
      if (offText) {
        wrapper.querySelector(".e-switch-off").textContent = offText;
      }
    };
    Switch3.prototype.updateHtmlAttribute = function() {
      if (!isNullOrUndefined3(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          var wrapper = this.getWrapper();
          if (ATTRIBUTES4.indexOf(key) > -1) {
            if (key === "class") {
              addClass3([wrapper], this.htmlAttributes["" + key].split(" "));
            } else if (key === "title") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "style") {
              wrapper.setAttribute(key, this.htmlAttributes["" + key]);
            } else if (key === "disabled") {
              if (this.htmlAttributes["" + key] === "true") {
                this.setDisabled();
              }
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            } else {
              this.element.setAttribute(key, this.htmlAttributes["" + key]);
            }
          } else {
            wrapper.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    Switch3.prototype.switchFocusHandler = function(e) {
      if (this.isFocused) {
        this.getWrapper().classList.add("e-focus");
      }
      if (e && e.type === "keyup" && e.code === "Space" && this.isAngular) {
        this.clickHandler(e);
        e.stopPropagation();
        e.preventDefault();
      }
    };
    Switch3.prototype.switchMouseUp = function(e) {
      var aTouchY = 0;
      var yDiff = 0;
      var aTouchX = 0;
      var xDiff = 0;
      var target = e.target;
      if (e.type === "touchmove") {
        e.preventDefault();
        aTouchX = e.changedTouches[0].clientX;
        aTouchY = e.changedTouches[0].clientY;
        xDiff = this.bTouchX - aTouchX;
        yDiff = this.bTouchY - aTouchY;
        if (Math.abs(xDiff) < Math.abs(yDiff)) {
          this.isDrag = false;
          this.rippleTouchHandler("mouseup");
        } else {
          this.isDrag = true;
        }
      }
      if (e.type === "touchstart") {
        this.bTouchX = e.changedTouches[0].clientX;
        this.bTouchY = e.changedTouches[0].clientY;
        this.isDrag = true;
        this.rippleTouchHandler("mousedown");
      }
      if (this.isDrag) {
        if (e.type === "mouseup" && target.className.indexOf("e-switch") < 0 || e.type === "touchend") {
          xDiff = this.bTouchX - e.changedTouches[0].clientX;
          yDiff = this.bTouchY - e.changedTouches[0].clientY;
          if (Math.abs(xDiff) >= Math.abs(yDiff)) {
            this.clickHandler(e);
            this.rippleTouchHandler("mouseup");
            e.preventDefault();
          }
        }
      }
    };
    Switch3.prototype.formResetHandler = function() {
      this.checked = this.initialSwitchCheckedValue;
      this.element.checked = this.initialSwitchCheckedValue;
    };
    Switch3.prototype.toggle = function() {
      this.clickHandler();
    };
    Switch3.prototype.wireEvents = function() {
      var wrapper = this.getWrapper();
      this.delegateMouseUpHandler = this.switchMouseUp.bind(this);
      this.delegateKeyUpHandler = this.switchFocusHandler.bind(this);
      EventHandler3.add(wrapper, "click", this.clickHandler, this);
      EventHandler3.add(this.element, "focus", this.focusHandler, this);
      EventHandler3.add(this.element, "focusout", this.focusOutHandler, this);
      EventHandler3.add(this.element, "mouseup", this.delegateMouseUpHandler, this);
      EventHandler3.add(this.element, "keyup", this.delegateKeyUpHandler, this);
      EventHandler3.add(wrapper, "mousedown mouseup", this.rippleHandler, this);
      EventHandler3.add(wrapper, "mouseleave", this.mouseLeaveHandler, this);
      EventHandler3.add(wrapper, "touchstart touchmove touchend", this.switchMouseUp, this);
    };
    Switch3.prototype.unWireEvents = function() {
      var wrapper = this.getWrapper();
      EventHandler3.remove(wrapper, "click", this.clickHandler);
      EventHandler3.remove(this.element, "focus", this.focusHandler);
      EventHandler3.remove(this.element, "focusout", this.focusOutHandler);
      EventHandler3.remove(this.element, "mouseup", this.delegateMouseUpHandler);
      EventHandler3.remove(this.element, "keyup", this.delegateKeyUpHandler);
      EventHandler3.remove(wrapper, "mousedown mouseup", this.rippleHandler);
      EventHandler3.remove(wrapper, "mouseleave", this.mouseLeaveHandler);
      EventHandler3.remove(wrapper, "touchstart touchmove touchend", this.switchMouseUp);
    };
    Switch3.prototype.click = function() {
      this.element.click();
    };
    Switch3.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate40([Event4()], Switch3.prototype, "beforeChange", void 0);
    __decorate40([Event4()], Switch3.prototype, "change", void 0);
    __decorate40([Event4()], Switch3.prototype, "created", void 0);
    __decorate40([Property3(false)], Switch3.prototype, "checked", void 0);
    __decorate40([Property3("")], Switch3.prototype, "cssClass", void 0);
    __decorate40([Property3(false)], Switch3.prototype, "disabled", void 0);
    __decorate40([Property3("")], Switch3.prototype, "name", void 0);
    __decorate40([Property3("")], Switch3.prototype, "onLabel", void 0);
    __decorate40([Property3("")], Switch3.prototype, "offLabel", void 0);
    __decorate40([Property3("")], Switch3.prototype, "value", void 0);
    __decorate40([Property3({})], Switch3.prototype, "htmlAttributes", void 0);
    Switch3 = __decorate40([NotifyPropertyChanges3], Switch3);
    return Switch3;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/chips/chip-list.js
var __extends42 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate41 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var classNames2 = {
  chipSet: "e-chip-set",
  chip: "e-chip",
  avatar: "e-chip-avatar",
  text: "e-chip-text",
  icon: "e-chip-icon",
  delete: "e-chip-delete",
  deleteIcon: "e-dlt-btn",
  multiSelection: "e-multi-selection",
  singleSelection: "e-selection",
  active: "e-active",
  chipWrapper: "e-chip-avatar-wrap",
  iconWrapper: "e-chip-icon-wrap",
  focused: "e-focused",
  disabled: "e-disabled",
  rtl: "e-rtl",
  template: "e-chip-template"
};
var ChipList2 = (
  /** @class */
  function(_super) {
    __extends42(ChipList3, _super);
    function ChipList3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.multiSelectedChip = [];
      return _this;
    }
    ChipList3.prototype.preRender = function() {
    };
    ChipList3.prototype.chipType = function() {
      return this.chips && this.chips.length && this.chips.length > 0;
    };
    ChipList3.prototype.render = function() {
      this.type = !isNullOrUndefined3(this.chips) && this.chips.length ? "chipset" : this.text || this.element.innerText ? "chip" : "chipset";
      this.setAttributes();
      this.createChip();
      this.setRtl();
      this.select(this.selectedChips);
      this.wireEvent(false);
      this.rippleFunction = rippleEffect2(this.element, {
        selector: ".e-chip"
      });
      this.renderComplete();
    };
    ChipList3.prototype.createChip = function() {
      this.innerText = this.element.innerText && this.element.innerText.length !== 0 ? this.element.innerText.trim() : this.element.innerText;
      this.element.innerHTML = "";
      this.chipCreation(this.type === "chip" ? [this.innerText ? this.innerText : this.text] : this.chips);
    };
    ChipList3.prototype.setAttributes = function() {
      if (this.type === "chip") {
        if (this.enabled) {
          this.element.tabIndex = 0;
        }
        this.element.setAttribute("role", "button");
      } else {
        this.element.classList.add(classNames2.chipSet);
        this.element.setAttribute("role", "listbox");
        if (this.selection === "Multiple") {
          this.element.classList.add(classNames2.multiSelection);
          this.element.setAttribute("aria-multiselectable", "true");
        } else if (this.selection === "Single") {
          this.element.classList.add(classNames2.singleSelection);
          this.element.setAttribute("aria-multiselectable", "false");
        } else {
          this.element.setAttribute("aria-multiselectable", "false");
        }
      }
    };
    ChipList3.prototype.setRtl = function() {
      this.element.classList[this.enableRtl ? "add" : "remove"](classNames2.rtl);
    };
    ChipList3.prototype.renderTemplates = function() {
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    ChipList3.prototype.templateParser = function(template) {
      if (template) {
        try {
          if (typeof template !== "function" && document.querySelectorAll(template).length) {
            return compile6(document.querySelector(template).innerHTML.trim());
          } else {
            return compile6(template);
          }
        } catch (error) {
          return compile6(template);
        }
      }
      return void 0;
    };
    ChipList3.prototype.chipCreation = function(data) {
      if (isNullOrUndefined3(data)) {
        return;
      }
      var chipListArray = [];
      var attributeArray = [];
      for (var i = 0; i < data.length; i++) {
        var fieldsData = this.getFieldValues(data[i]);
        var attributesValue = fieldsData.htmlAttributes;
        attributeArray.push(attributesValue);
        var chipArray = this.elementCreation(fieldsData);
        var className = (classNames2.chip + " " + (fieldsData.enabled ? " " : classNames2.disabled) + " " + (fieldsData.avatarIconCss || fieldsData.avatarText ? classNames2.chipWrapper : fieldsData.leadingIconCss ? classNames2.iconWrapper : " ") + " " + fieldsData.cssClass).split(" ").filter(function(css) {
          return css;
        });
        if (!this.chipType() || this.type === "chip") {
          chipListArray = chipArray;
          addClass3([this.element], className);
          this.element.setAttribute("aria-label", fieldsData.text);
          if (fieldsData.value) {
            this.element.setAttribute("data-value", fieldsData.value.toString());
          }
        } else {
          var wrapper = this.createElement("DIV", {
            className: className.join(" "),
            attrs: {
              tabIndex: "0",
              role: "option",
              "aria-label": fieldsData.text,
              "aria-selected": "false"
            }
          });
          if (this.enableDelete) {
            wrapper.setAttribute("aria-keyshortcuts", "Press delete or backspace key to delete");
          }
          if (fieldsData.value) {
            wrapper.setAttribute("data-value", fieldsData.value.toString());
          }
          if (fieldsData.enabled) {
            wrapper.setAttribute("aria-disabled", "false");
          } else {
            wrapper.removeAttribute("tabindex");
            wrapper.setAttribute("aria-disabled", "true");
          }
          if (!isNullOrUndefined3(attributeArray[i])) {
            if (attributeArray.length > i && Object.keys(attributeArray[i]).length) {
              var htmlAttr = [];
              htmlAttr = Object.keys(attributeArray[i]);
              for (var j = 0; j < htmlAttr.length; j++) {
                wrapper.setAttribute(htmlAttr[j], attributeArray[i][htmlAttr[j]]);
              }
            }
          }
          append2(chipArray, wrapper);
          chipListArray.push(wrapper);
        }
      }
      append2(chipListArray, this.element);
    };
    ChipList3.prototype.getFieldValues = function(data) {
      var chipEnabled = !(this.enabled.toString() === "false");
      var fields = {
        text: typeof data === "object" ? data.text ? data.text.toString() : this.text.toString() : !this.chipType() ? this.innerText ? this.innerText : this.text.toString() : data.toString(),
        cssClass: typeof data === "object" ? data.cssClass ? data.cssClass.toString() : this.cssClass.toString() : this.cssClass.toString(),
        leadingIconCss: typeof data === "object" ? data.leadingIconCss ? data.leadingIconCss.toString() : this.leadingIconCss.toString() : this.leadingIconCss.toString(),
        avatarIconCss: typeof data === "object" ? data.avatarIconCss ? data.avatarIconCss.toString() : this.avatarIconCss.toString() : this.avatarIconCss.toString(),
        avatarText: typeof data === "object" ? data.avatarText ? data.avatarText.toString() : this.avatarText.toString() : this.avatarText.toString(),
        trailingIconCss: typeof data === "object" ? data.trailingIconCss ? data.trailingIconCss.toString() : this.trailingIconCss.toString() : this.trailingIconCss.toString(),
        enabled: typeof data === "object" ? data.enabled !== void 0 ? data.enabled.toString() === "false" ? false : true : chipEnabled : chipEnabled,
        value: typeof data === "object" ? data.value ? data.value.toString() : null : null,
        leadingIconUrl: typeof data === "object" ? data.leadingIconUrl ? data.leadingIconUrl.toString() : this.leadingIconUrl : this.leadingIconUrl,
        trailingIconUrl: typeof data === "object" ? data.trailingIconUrl ? data.trailingIconUrl.toString() : this.trailingIconUrl : this.trailingIconUrl,
        htmlAttributes: typeof data === "object" ? data.htmlAttributes ? data.htmlAttributes : this.htmlAttributes : this.htmlAttributes,
        template: typeof data === "object" ? data.template ? data.template : null : null
      };
      return fields;
    };
    ChipList3.prototype.elementCreation = function(fields) {
      var chipArray = [];
      if (fields.avatarText || fields.avatarIconCss) {
        var className = (classNames2.avatar + " " + fields.avatarIconCss).trim();
        var chipAvatarElement = this.createElement("span", {
          className
        });
        chipAvatarElement.innerText = fields.avatarText;
        chipArray.push(chipAvatarElement);
      } else if (fields.leadingIconCss) {
        var className = (classNames2.icon + " " + fields.leadingIconCss).trim();
        var chipIconElement = this.createElement("span", {
          className
        });
        chipArray.push(chipIconElement);
      } else if (fields.leadingIconUrl) {
        var className = (classNames2.avatar + " image-url").trim();
        var chipIconElement = this.createElement("span", {
          className
        });
        chipIconElement.style.backgroundImage = "url(" + fields.leadingIconUrl + ")";
        chipArray.push(chipIconElement);
      }
      var chipTextElement = this.createElement("span", {
        className: classNames2.text
      });
      chipTextElement.innerText = fields.text;
      chipArray.push(chipTextElement);
      if (fields.template) {
        var templateWrapper = this.createElement("div", {
          className: classNames2.template
        });
        var templateContent = this.templateParser(fields.template)(fields, this, "template", this.element.id + "_template", false);
        append2(templateContent, templateWrapper);
        chipArray.push(templateWrapper);
        this.renderTemplates();
      }
      if (fields.trailingIconCss || this.chipType() && this.enableDelete) {
        var className = (classNames2.delete + " " + (fields.trailingIconCss ? fields.trailingIconCss : classNames2.deleteIcon)).trim();
        var chipdeleteElement = this.createElement("span", {
          className
        });
        chipArray.push(chipdeleteElement);
      } else if (fields.trailingIconUrl) {
        var className = "trailing-icon-url".trim();
        var chipIconsElement = this.createElement("span", {
          className
        });
        chipIconsElement.style.backgroundImage = "url(" + fields.trailingIconUrl + ")";
        chipArray.push(chipIconsElement);
      }
      return chipArray;
    };
    ChipList3.prototype.find = function(fields) {
      var chipData = {
        text: "",
        index: -1,
        element: this.element,
        data: ""
      };
      var chipElement = fields instanceof HTMLElement ? fields : this.element.querySelectorAll("." + classNames2.chip)[fields];
      if (chipElement && this.chipType()) {
        chipData.index = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames2.chip)).indexOf(chipElement);
        var chip = this.chips[chipData.index];
        if (typeof chip === "object" && chip !== null) {
          var chipModel = chip;
          if (chipModel.text !== void 0) {
            chipData.text = chipModel.text.toString();
          }
        } else if (chip !== void 0) {
          chipData.text = chip.toString();
        }
        chipData.data = chip;
        chipData.element = chipElement;
      }
      return chipData;
    };
    ChipList3.prototype.add = function(chipsData) {
      var _a;
      if (this.type !== "chip") {
        var fieldData = chipsData instanceof Array ? chipsData : [chipsData];
        this.chips = (_a = [].slice.call(this.chips)).concat.apply(_a, fieldData);
        this.chipCreation(fieldData);
      }
    };
    ChipList3.prototype.select = function(fields, selectionType) {
      this.onSelect(fields, false, selectionType);
    };
    ChipList3.prototype.multiSelection = function(newProp) {
      var items = this.element.querySelectorAll(".e-chip");
      for (var j = 0; j < newProp.length; j++) {
        if (typeof newProp[j] === "string") {
          for (var k = 0; k < items.length; k++) {
            if (newProp[j] !== k) {
              if (newProp[j] === items[k].attributes[5].value) {
                this.multiSelectedChip.push(k);
                break;
              }
            }
          }
        } else {
          this.multiSelectedChip.push(newProp[j]);
        }
      }
    };
    ChipList3.prototype.onSelect = function(fields, callFromProperty, selectionType) {
      var index;
      var chipNodes;
      var chipValue = null;
      if (this.chipType() && this.selection !== "None") {
        if (callFromProperty) {
          var chipElements = this.element.querySelectorAll("." + classNames2.chip);
          for (var i = 0; i < chipElements.length; i++) {
            chipElements[i].setAttribute("aria-selected", "false");
            chipElements[i].classList.remove(classNames2.active);
          }
        }
        var fieldData = fields instanceof Array ? fields : [fields];
        for (var i = 0; i < fieldData.length; i++) {
          var chipElement = fieldData[i] instanceof HTMLElement ? fieldData[i] : this.element.querySelectorAll("." + classNames2.chip)[fieldData[i]];
          if (selectionType !== "index") {
            for (var j = 0; j < this.chips.length; j++) {
              chipNodes = this.element.querySelectorAll("." + classNames2.chip)[j];
              var fieldsData = this.getFieldValues(this.chips[j]);
              if (selectionType === "value") {
                if (fieldsData.value !== null) {
                  chipValue = chipNodes.dataset.value;
                }
              } else if (selectionType === "text") {
                chipValue = chipNodes.innerText;
              }
              if (chipValue === fieldData[i].toString()) {
                index = j;
                chipElement = this.element.querySelectorAll("." + classNames2.chip)[index];
              }
            }
          }
          if (chipElement instanceof HTMLElement) {
            this.selectionHandler(chipElement);
          }
        }
      }
    };
    ChipList3.prototype.remove = function(fields) {
      var _this = this;
      if (this.chipType()) {
        var fieldData = fields instanceof Array ? fields : [fields];
        var chipElements_1 = [];
        var chipCollection_1 = this.element.querySelectorAll("." + classNames2.chip);
        fieldData.forEach(function(data) {
          var chipElement = data instanceof HTMLElement ? data : chipCollection_1[data];
          if (chipElement instanceof HTMLElement) {
            chipElements_1.push(chipElement);
          }
        });
        chipElements_1.forEach(function(element2) {
          var chips = _this.element.querySelectorAll("." + classNames2.chip);
          var index = Array.prototype.slice.call(chips).indexOf(element2);
          _this.deleteHandler(element2, index);
        });
      }
    };
    ChipList3.prototype.getSelectedChips = function() {
      var selectedChips;
      if (this.chipType() && this.selection !== "None") {
        var selectedItems = {
          texts: [],
          Indexes: [],
          data: [],
          elements: []
        };
        var items = this.element.querySelectorAll("." + classNames2.active);
        for (var i = 0; i < items.length; i++) {
          var chip = items[i];
          selectedItems.elements.push(chip);
          var index = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames2.chip)).indexOf(chip);
          selectedItems.Indexes.push(index);
          selectedItems.data.push(this.chips[index]);
          var text = typeof this.chips[index] === "object" ? this.chips[index].text ? this.chips[index].text : null : this.chips[index].toString();
          selectedItems.texts.push(text);
        }
        var selectedItem = {
          text: selectedItems.texts[0],
          index: selectedItems.Indexes[0],
          data: selectedItems.data[0],
          element: selectedItems.elements[0]
        };
        selectedChips = !isNullOrUndefined3(selectedItem.index) ? this.selection === "Multiple" ? selectedItems : selectedItem : void 0;
      }
      return selectedChips;
    };
    ChipList3.prototype.wireEvent = function(unWireEvent) {
      if (!unWireEvent) {
        EventHandler3.add(this.element, "click", this.clickHandler, this);
        EventHandler3.add(this.element, "focusout", this.focusOutHandler, this);
        EventHandler3.add(this.element, "keydown", this.keyHandler, this);
        EventHandler3.add(this.element, "keyup", this.keyHandler, this);
      } else {
        EventHandler3.remove(this.element, "click", this.clickHandler);
        EventHandler3.remove(this.element, "focusout", this.focusOutHandler);
        EventHandler3.remove(this.element, "keydown", this.keyHandler);
        EventHandler3.remove(this.element, "keyup", this.keyHandler);
      }
    };
    ChipList3.prototype.keyHandler = function(e) {
      if (e.target.classList.contains(classNames2.chip)) {
        if (e.type === "keydown") {
          if (e.keyCode === 13 || e.keyCode === 32) {
            this.clickHandler(e);
          } else if ((e.keyCode === 46 || e.keyCode === 8) && this.enableDelete) {
            this.clickHandler(e, true);
          }
        } else if (e.keyCode === 9) {
          this.focusInHandler(e.target);
        }
      }
    };
    ChipList3.prototype.focusInHandler = function(chipWrapper) {
      if (!chipWrapper.classList.contains(classNames2.focused)) {
        chipWrapper.classList.add(classNames2.focused);
      }
    };
    ChipList3.prototype.focusOutHandler = function(e) {
      var chipWrapper = closest3(e.target, "." + classNames2.chip);
      var focusedElement = !this.chipType() ? this.element.classList.contains(classNames2.focused) ? this.element : null : this.element.querySelector("." + classNames2.focused);
      if (chipWrapper && focusedElement) {
        focusedElement.classList.remove(classNames2.focused);
      }
    };
    ChipList3.prototype.clickHandler = function(e, del) {
      var _this = this;
      if (del === void 0) {
        del = false;
      }
      var chipWrapper = closest3(e.target, "." + classNames2.chip);
      if (chipWrapper) {
        var chipDataArgs = void 0;
        if (this.chipType()) {
          chipDataArgs = this.find(chipWrapper);
        } else {
          var index = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames2.chip)).indexOf(chipWrapper);
          chipDataArgs = {
            text: this.innerText ? this.innerText : this.text,
            element: chipWrapper,
            data: this.text,
            index
          };
        }
        chipDataArgs.event = e;
        chipDataArgs.cancel = false;
        this.trigger("beforeClick", chipDataArgs, function(observedArgs) {
          if (!observedArgs.cancel) {
            _this.clickEventHandler(observedArgs.element, e, del);
          }
        });
      }
    };
    ChipList3.prototype.clickEventHandler = function(chipWrapper, e, del) {
      var _this = this;
      if (this.chipType()) {
        var chipData_1 = this.find(chipWrapper);
        chipData_1.event = e;
        var deleteElement = e.target.classList.contains(classNames2.deleteIcon) ? e.target : del ? chipWrapper.querySelector("." + classNames2.deleteIcon) : void 0;
        if (deleteElement && this.enableDelete) {
          chipData_1.cancel = false;
          var deletedItemArgs = chipData_1;
          this.trigger("delete", deletedItemArgs, function(observedArgs) {
            if (!observedArgs.cancel) {
              _this.deleteHandler(observedArgs.element, observedArgs.index);
              _this.selectionHandler(chipWrapper);
              chipData_1.selected = observedArgs.element.classList.contains(classNames2.active);
              var selectedItemArgs2 = chipData_1;
              _this.trigger("click", selectedItemArgs2);
              var chipElement = _this.element.querySelectorAll("." + classNames2.chip)[observedArgs.index];
              if (chipElement) {
                chipElement.focus();
                _this.focusInHandler(chipElement);
              }
            }
          });
        } else if (this.selection !== "None") {
          this.selectionHandler(chipWrapper);
          chipData_1.selected = chipWrapper.classList.contains(classNames2.active);
          var selectedItemArgs = chipData_1;
          this.trigger("click", selectedItemArgs);
        } else {
          this.focusInHandler(chipWrapper);
          var clickedItemArgs = chipData_1;
          this.trigger("click", clickedItemArgs);
        }
      } else {
        this.focusInHandler(chipWrapper);
        var clickedItemArgs = {
          text: this.innerText ? this.innerText : this.text,
          element: chipWrapper,
          data: this.text,
          event: e
        };
        this.trigger("click", clickedItemArgs);
      }
    };
    ChipList3.prototype.selectionHandler = function(chipWrapper) {
      if (this.selection === "Single") {
        var activeElement = this.element.querySelector("." + classNames2.active);
        if (activeElement && activeElement !== chipWrapper) {
          activeElement.classList.remove(classNames2.active);
          activeElement.setAttribute("aria-selected", "false");
        }
        this.setProperties({
          selectedChips: null
        }, true);
      } else {
        this.setProperties({
          selectedChips: []
        }, true);
      }
      if (chipWrapper.classList.contains(classNames2.active)) {
        chipWrapper.classList.remove(classNames2.active);
        chipWrapper.setAttribute("aria-selected", "false");
      } else {
        chipWrapper.classList.add(classNames2.active);
        chipWrapper.setAttribute("aria-selected", "true");
      }
      this.updateSelectedChips();
    };
    ChipList3.prototype.updateSelectedChips = function() {
      var chipListEle = this.element.querySelectorAll(".e-chip");
      var chipCollIndex = [];
      var chipCollValue = [];
      var chip = null;
      var value = null;
      for (var i = 0; i < chipListEle.length; i++) {
        var selectedEle = this.element.querySelectorAll(".e-chip")[i];
        if (selectedEle.getAttribute("aria-selected") === "true") {
          value = selectedEle.getAttribute("data-value");
          if (this.selection === "Single" && selectedEle.classList.contains("e-active")) {
            chip = value ? value : i;
            break;
          } else {
            chip = value ? chipCollValue.push(value) : chipCollIndex.push(i);
          }
        }
      }
      this.setProperties({
        selectedChips: this.selection === "Single" ? chip : value ? chipCollValue : chipCollIndex
      }, true);
    };
    ChipList3.prototype.deleteHandler = function(chipWrapper, index) {
      var deletedChipData = this.find(chipWrapper);
      this.chips.splice(index, 1);
      this.setProperties({
        chips: this.chips
      }, true);
      detach3(chipWrapper);
      this.trigger("deleted", deletedChipData);
    };
    ChipList3.prototype.destroy = function() {
      this.clearTemplate();
      removeClass3([this.element], [classNames2.chipSet, classNames2.chip, classNames2.rtl, classNames2.multiSelection, classNames2.singleSelection, classNames2.disabled, classNames2.chipWrapper, classNames2.iconWrapper, classNames2.active, classNames2.focused].concat(this.cssClass ? this.cssClass.toString().split(" ").filter(function(css) {
        return css;
      }) : []));
      this.removeMultipleAttributes(["tabindex", "role", "aria-label", "aria-multiselectable"], this.element);
      this.wireEvent(true);
      this.rippleFunction();
      _super.prototype.destroy.call(this);
      this.element.innerHTML = "";
      this.element.innerText = this.innerText;
    };
    ChipList3.prototype.removeMultipleAttributes = function(attributes4, element2) {
      attributes4.forEach(function(attr) {
        element2.removeAttribute(attr);
      });
    };
    ChipList3.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    ChipList3.prototype.getModuleName = function() {
      return "chip-list";
    };
    ChipList3.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "chips":
          case "text":
          case "avatarText":
          case "avatarIconCss":
          case "leadingIconCss":
          case "trailingIconCss":
          case "selection":
          case "enableDelete":
          case "enabled":
            this.refresh();
            break;
          case "cssClass":
            if (!this.chipType()) {
              removeClass3([this.element], oldProp.cssClass.toString().split(" ").filter(function(css) {
                return css;
              }));
              addClass3([this.element], newProp.cssClass.toString().split(" ").filter(function(css) {
                return css;
              }));
            } else {
              this.refresh();
            }
            break;
          case "selectedChips":
            removeClass3(this.element.querySelectorAll(".e-active"), "e-active");
            if (this.selection === "Multiple") {
              this.multiSelectedChip = [];
              this.multiSelection(newProp.selectedChips);
              this.onSelect(this.multiSelectedChip, true);
              this.updateSelectedChips();
            } else {
              this.onSelect(newProp.selectedChips, true);
            }
            break;
          case "enableRtl":
            this.setRtl();
            break;
        }
      }
    };
    __decorate41([Property3([])], ChipList3.prototype, "chips", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "text", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "avatarText", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "avatarIconCss", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "htmlAttributes", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "leadingIconCss", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "trailingIconCss", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "leadingIconUrl", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "trailingIconUrl", void 0);
    __decorate41([Property3("")], ChipList3.prototype, "cssClass", void 0);
    __decorate41([Property3(true)], ChipList3.prototype, "enabled", void 0);
    __decorate41([Property3([])], ChipList3.prototype, "selectedChips", void 0);
    __decorate41([Property3("None")], ChipList3.prototype, "selection", void 0);
    __decorate41([Property3(false)], ChipList3.prototype, "enableDelete", void 0);
    __decorate41([Event4()], ChipList3.prototype, "created", void 0);
    __decorate41([Event4()], ChipList3.prototype, "click", void 0);
    __decorate41([Event4()], ChipList3.prototype, "beforeClick", void 0);
    __decorate41([Event4()], ChipList3.prototype, "delete", void 0);
    __decorate41([Event4()], ChipList3.prototype, "deleted", void 0);
    ChipList3 = __decorate41([NotifyPropertyChanges3], ChipList3);
    return ChipList3;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/floating-action-button/floating-action-button.js
var __extends43 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate42 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var FABHIDDEN2 = "e-fab-hidden";
var FIXEDFAB2 = "e-fab-fixed";
var FABTOP2 = "e-fab-top";
var FABBOTTOM2 = "e-fab-bottom";
var FABRIGHT2 = "e-fab-right";
var FABLEFT2 = "e-fab-left";
var FABMIDDLE2 = "e-fab-middle";
var FABCENTER2 = "e-fab-center";
var FabPosition2;
(function(FabPosition3) {
  FabPosition3["TopLeft"] = "TopLeft";
  FabPosition3["TopCenter"] = "TopCenter";
  FabPosition3["TopRight"] = "TopRight";
  FabPosition3["MiddleLeft"] = "MiddleLeft";
  FabPosition3["MiddleCenter"] = "MiddleCenter";
  FabPosition3["MiddleRight"] = "MiddleRight";
  FabPosition3["BottomLeft"] = "BottomLeft";
  FabPosition3["BottomCenter"] = "BottomCenter";
  FabPosition3["BottomRight"] = "BottomRight";
})(FabPosition2 || (FabPosition2 = {}));
var Fab2 = (
  /** @class */
  function(_super) {
    __extends43(Fab3, _super);
    function Fab3(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Fab3.prototype.render = function() {
      _super.prototype.render.call(this);
      this.initializeFab();
    };
    Fab3.prototype.preRender = function() {
      _super.prototype.preRender.call(this);
      if (!this.element.id) {
        this.element.id = getUniqueID2("e-" + this.getModuleName());
      }
    };
    Fab3.prototype.getPersistData = function() {
      _super.prototype.getPersistData.call(this);
      return this.addOnPersist([]);
    };
    Fab3.prototype.getModuleName = function() {
      return "fab";
    };
    Fab3.prototype.initializeFab = function() {
      this.element.classList.add("e-" + _super.prototype.getModuleName.call(this));
      this.checkTarget();
      this.setPosition();
      this.setVisibility();
    };
    Fab3.prototype.checkTarget = function() {
      this.isFixed = true;
      if (this.target) {
        this.targetEle = typeof this.target === "string" ? select3(this.target) : this.target;
        if (this.targetEle) {
          this.isFixed = false;
          this.targetEle.appendChild(this.element);
        }
      }
      this.element.classList[this.isFixed ? "add" : "remove"](FIXEDFAB2);
    };
    Fab3.prototype.setVisibility = function() {
      this.element.classList[this.visible ? "remove" : "add"](FABHIDDEN2);
    };
    Fab3.prototype.setPosition = function() {
      this.element.classList.add(["BottomLeft", "BottomCenter", "BottomRight"].indexOf(this.position) !== -1 ? FABBOTTOM2 : FABTOP2);
      var isRight = ["TopRight", "MiddleRight", "BottomRight"].indexOf(this.position) !== -1;
      this.element.classList.add(!(this.enableRtl || isRight) || this.enableRtl && isRight ? FABLEFT2 : FABRIGHT2);
      if (["MiddleLeft", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.element.classList.add(FABMIDDLE2);
      }
      if (["TopCenter", "BottomCenter", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.element.classList.add(FABCENTER2);
      }
    };
    Fab3.prototype.clearPosition = function() {
      this.element.classList.remove(FABTOP2, FABBOTTOM2, FABMIDDLE2);
      this.element.classList.remove(FABRIGHT2, FABLEFT2, FABCENTER2);
    };
    Fab3.prototype.refreshPosition = function() {
    };
    Fab3.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.element.classList.remove("e-" + _super.prototype.getModuleName.call(this), FIXEDFAB2);
      this.clearPosition();
    };
    Fab3.prototype.onPropertyChanged = function(newProp, oldProp) {
      _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "enableRtl":
          case "position":
            this.clearPosition();
            this.setPosition();
            break;
          case "visible":
            this.setVisibility();
            break;
          case "target":
            this.checkTarget();
            this.setPosition();
            break;
          case "currencyCode":
            this.refresh();
            break;
        }
      }
    };
    __decorate42([Property3("BottomRight")], Fab3.prototype, "position", void 0);
    __decorate42([Property3("")], Fab3.prototype, "target", void 0);
    __decorate42([Property3(true)], Fab3.prototype, "visible", void 0);
    __decorate42([Property3(true)], Fab3.prototype, "isPrimary", void 0);
    Fab3 = __decorate42([NotifyPropertyChanges3], Fab3);
    return Fab3;
  }(Button2)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/speed-dial/speed-dial.js
var __extends44 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate43 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var topPosition2 = ["TopLeft", "TopCenter", "TopRight"];
var bottomPosition2 = ["BottomLeft", "BottomCenter", "BottomRight"];
var leftPosition2 = ["TopLeft", "MiddleLeft", "BottomLeft"];
var rightPosition2 = ["TopRight", "MiddleRight", "BottomRight"];
var SDHIDDEN2 = "e-speeddial-hidden";
var FIXEDSD2 = "e-speeddial-fixed";
var SPEEDDIAL2 = "e-speeddial";
var RTLCLASS2 = "e-rtl";
var HOVERSD2 = "e-speeddial-hover-open";
var RADIALSD2 = "e-speeddial-radial";
var LINEARSD2 = "e-speeddial-linear";
var TEMPLATESD2 = "e-speeddial-template";
var SDTEMPLATECONTAINER2 = "e-speeddial-template-container";
var SDOVERLAY2 = "e-speeddial-overlay";
var SDPOPUP2 = "e-speeddial-popup";
var SDUL2 = "e-speeddial-ul";
var SDLI2 = "e-speeddial-li";
var SDACTIVELI2 = "e-speeddial-li-active";
var SDLIICON2 = "e-speeddial-li-icon";
var SDLITEXT2 = "e-speeddial-li-text";
var SDLITEXTONLY2 = "e-speeddial-text-li";
var DISABLED6 = "e-disabled";
var SDVERTICALBOTTOM2 = "e-speeddial-vert-bottom";
var SDVERTICALRIGHT2 = "e-speeddial-vert-right";
var SDHORIZONTALTOP2 = "e-speeddial-horz-top";
var SDHORIZONTALLEFT2 = "e-speeddial-horz-left";
var SDHORIZONTALRIGHT2 = "e-speeddial-horz-right";
var SDOVERFLOW2 = "e-speeddial-overflow";
var SDVERTOVERFLOW2 = "e-speeddial-vert-overflow";
var SDHORZOVERFLOW2 = "e-speeddial-horz-overflow";
var SDTOP2 = "e-speeddial-top";
var SDBOTTOM2 = "e-speeddial-bottom";
var SDRIGHT2 = "e-speeddial-right";
var SDLEFT2 = "e-speeddial-left";
var SDMIDDLE2 = "e-speeddial-middle";
var SDCENTER2 = "e-speeddial-center";
var SDTOPLEFT2 = "e-speeddial-top-left";
var SDBOTTOMRIGHT2 = "e-speeddial-bottom-right";
var SDTOPRIGHT2 = "e-speeddial-top-right";
var SDBOTTOMLEFT2 = "e-speeddial-bottom-left";
var SDVERTDIST2 = "--speeddialVertDist";
var SDHORZDIST2 = "--speeddialHorzDist";
var SDRADICALANGLE2 = "--speeddialRadialAngle";
var SDRADICALOFFSET2 = "--speeddialRadialOffset";
var SDRADICALMINHEIGHT2 = "--speeddialRadialMinHeight";
var SDRADICALMINWIDTH2 = "--speeddialRadialMinWidth";
var SDOVERFLOWLIMIT2 = "--speeddialOverflowLimit";
var SDRADICALHORZDIST2 = "--speeddialRadialHorzDist";
var SpeedDialMode2;
(function(SpeedDialMode3) {
  SpeedDialMode3["Linear"] = "Linear";
  SpeedDialMode3["Radial"] = "Radial";
})(SpeedDialMode2 || (SpeedDialMode2 = {}));
var LinearDirection2;
(function(LinearDirection3) {
  LinearDirection3["Up"] = "Up";
  LinearDirection3["Down"] = "Down";
  LinearDirection3["Right"] = "Right";
  LinearDirection3["Left"] = "Left";
  LinearDirection3["Auto"] = "Auto";
})(LinearDirection2 || (LinearDirection2 = {}));
var RadialDirection2;
(function(RadialDirection3) {
  RadialDirection3["Clockwise"] = "Clockwise";
  RadialDirection3["AntiClockwise"] = "AntiClockwise";
  RadialDirection3["Auto"] = "Auto";
})(RadialDirection2 || (RadialDirection2 = {}));
var SpeedDialAnimationEffect2;
(function(SpeedDialAnimationEffect3) {
  SpeedDialAnimationEffect3["Fade"] = "Fade";
  SpeedDialAnimationEffect3["FadeZoom"] = "FadeZoom";
  SpeedDialAnimationEffect3["FlipLeftDown"] = "FlipLeftDown";
  SpeedDialAnimationEffect3["FlipLeftUp"] = "FlipLeftUp";
  SpeedDialAnimationEffect3["FlipRightDown"] = "FlipRightDown";
  SpeedDialAnimationEffect3["FlipRightUp"] = "FlipRightUp";
  SpeedDialAnimationEffect3["FlipXDown"] = "FlipXDown";
  SpeedDialAnimationEffect3["FlipXUp"] = "FlipXUp";
  SpeedDialAnimationEffect3["FlipYLeft"] = "FlipYLeft";
  SpeedDialAnimationEffect3["FlipYRight"] = "FlipYRight";
  SpeedDialAnimationEffect3["SlideBottom"] = "SlideBottom";
  SpeedDialAnimationEffect3["SlideLeft"] = "SlideLeft";
  SpeedDialAnimationEffect3["SlideRight"] = "SlideRight";
  SpeedDialAnimationEffect3["SlideTop"] = "SlideTop";
  SpeedDialAnimationEffect3["Zoom"] = "Zoom";
  SpeedDialAnimationEffect3["None"] = "None";
})(SpeedDialAnimationEffect2 || (SpeedDialAnimationEffect2 = {}));
var SpeedDialAnimationSettings2 = (
  /** @class */
  function(_super) {
    __extends44(SpeedDialAnimationSettings3, _super);
    function SpeedDialAnimationSettings3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate43([Property3("Fade")], SpeedDialAnimationSettings3.prototype, "effect", void 0);
    __decorate43([Property3(400)], SpeedDialAnimationSettings3.prototype, "duration", void 0);
    __decorate43([Property3(0)], SpeedDialAnimationSettings3.prototype, "delay", void 0);
    return SpeedDialAnimationSettings3;
  }(ChildProperty3)
);
var RadialSettings2 = (
  /** @class */
  function(_super) {
    __extends44(RadialSettings3, _super);
    function RadialSettings3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate43([Property3("Auto")], RadialSettings3.prototype, "direction", void 0);
    __decorate43([Property3(-1)], RadialSettings3.prototype, "endAngle", void 0);
    __decorate43([Property3("100px")], RadialSettings3.prototype, "offset", void 0);
    __decorate43([Property3(-1)], RadialSettings3.prototype, "startAngle", void 0);
    return RadialSettings3;
  }(ChildProperty3)
);
var SpeedDialItem2 = (
  /** @class */
  function(_super) {
    __extends44(SpeedDialItem3, _super);
    function SpeedDialItem3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate43([Property3("")], SpeedDialItem3.prototype, "iconCss", void 0);
    __decorate43([Property3("")], SpeedDialItem3.prototype, "id", void 0);
    __decorate43([Property3("")], SpeedDialItem3.prototype, "text", void 0);
    __decorate43([Property3("")], SpeedDialItem3.prototype, "title", void 0);
    __decorate43([Property3(false)], SpeedDialItem3.prototype, "disabled", void 0);
    return SpeedDialItem3;
  }(ChildProperty3)
);
var SpeedDial2 = (
  /** @class */
  function(_super) {
    __extends44(SpeedDial3, _super);
    function SpeedDial3(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isMenuOpen = false;
      _this.isClock = true;
      _this.isVertical = true;
      _this.isControl = false;
      _this.focusedIndex = -1;
      return _this;
    }
    SpeedDial3.prototype.render = function() {
      this.initialize();
    };
    SpeedDial3.prototype.preRender = function() {
      this.keyConfigs = {
        space: "space",
        enter: "enter",
        end: "end",
        home: "home",
        moveDown: "downarrow",
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        esc: "escape"
      };
      this.validateDirection();
    };
    SpeedDial3.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    SpeedDial3.prototype.getModuleName = function() {
      return "speed-dial";
    };
    SpeedDial3.prototype.initialize = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID2("e-" + this.getModuleName());
      }
      this.fab = new Fab2({
        content: this.content,
        cssClass: this.cssClass ? SPEEDDIAL2 + " " + this.cssClass : SPEEDDIAL2,
        disabled: this.disabled,
        enablePersistence: this.enablePersistence,
        enableRtl: this.enableRtl,
        iconCss: this.openIconCss,
        iconPosition: this.iconPosition,
        position: this.position,
        target: this.target,
        visible: this.visible,
        isPrimary: this.isPrimary
      });
      this.fab.appendTo(this.element);
      if (this.items.length > 0 || this.popupTemplate) {
        this.createPopup();
      }
      this.wireEvents();
    };
    SpeedDial3.prototype.wireEvents = function() {
      EventHandler3.add(window, "resize", this.resizeHandler, this);
      EventHandler3.add(document.body, "click", this.bodyClickHandler, this);
      if (this.opensOnHover) {
        this.wireFabHover();
      } else {
        this.wireFabClick();
      }
    };
    SpeedDial3.prototype.wirePopupEvents = function() {
      this.removeRippleEffect = rippleEffect2(this.popupEle, {
        selector: "." + SDLIICON2
      });
      this.keyboardModule = new KeyboardEvents3(this.element, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
      this.popupKeyboardModule = new KeyboardEvents3(this.popupEle, {
        keyAction: this.popupKeyActionHandler.bind(this),
        keyConfigs: {
          esc: "escape"
        },
        eventName: "keydown"
      });
      this.documentKeyboardModule = new KeyboardEvents3(document.body, {
        keyAction: this.popupKeyActionHandler.bind(this),
        keyConfigs: {
          enter: "enter",
          space: "space"
        },
        eventName: "keydown"
      });
      EventHandler3.add(this.popupEle, "click", this.popupClick, this);
      EventHandler3.add(this.popupEle, "mouseleave", this.popupMouseLeaveHandle, this);
    };
    SpeedDial3.prototype.wireFabClick = function() {
      EventHandler3.add(this.fab.element, "click", this.fabClick, this);
    };
    SpeedDial3.prototype.wireFabHover = function() {
      this.popupEle.classList.add(HOVERSD2);
      EventHandler3.add(this.fab.element, "mouseover", this.mouseOverHandle, this);
      EventHandler3.add(this.element, "mouseleave", this.mouseLeaveHandle, this);
    };
    SpeedDial3.prototype.createPopup = function() {
      var className = SDPOPUP2 + " " + SDHIDDEN2;
      className = this.enableRtl ? className + " " + RTLCLASS2 : className;
      className = this.cssClass ? className + " " + this.cssClass : className;
      this.popupEle = this.createElement("div", {
        className,
        id: this.element.id + "_popup"
      });
      this.element.insertAdjacentElement("afterend", this.popupEle);
      attributes3(this.element, {
        "aria-expanded": "false",
        "aria-haspopup": "true",
        "aria-controls": this.popupEle.id
      });
      this.setPopupContent();
      if (this.modal) {
        this.createOverlay();
      }
      this.checkTarget();
      this.setPositionProps();
      this.wirePopupEvents();
    };
    SpeedDial3.prototype.createOverlay = function() {
      this.overlayEle = this.createElement("div", {
        id: this.element.id + "_overlay",
        className: (SDOVERLAY2 + (this.isMenuOpen ? "" : " " + SDHIDDEN2) + " " + this.cssClass).trim()
      });
      this.element.insertAdjacentElement("beforebegin", this.overlayEle);
    };
    SpeedDial3.prototype.popupClick = function() {
      this.isControl = true;
    };
    SpeedDial3.prototype.bodyClickHandler = function(e) {
      if (this.isControl) {
        this.isControl = false;
        return;
      }
      if (this.isMenuOpen) {
        this.hidePopupEle(e);
      }
    };
    SpeedDial3.prototype.fabClick = function(e) {
      this.isControl = true;
      if (this.isMenuOpen) {
        this.hidePopupEle(e);
      } else {
        this.showPopupEle(e);
      }
    };
    SpeedDial3.prototype.setPopupContent = function() {
      this.popupEle.classList.remove(RADIALSD2, LINEARSD2, TEMPLATESD2);
      if (!this.popupTemplate) {
        this.popupEle.classList.add(this.mode === "Radial" ? RADIALSD2 : LINEARSD2);
        this.createUl();
        this.createItems();
      } else {
        this.popupEle.classList.add(TEMPLATESD2);
        this.appendTemplate();
      }
      this.renderReactTemplates();
    };
    SpeedDial3.prototype.appendTemplate = function() {
      var templateContainer = this.createElement("div", {
        className: SDTEMPLATECONTAINER2
      });
      append2([templateContainer], this.popupEle);
      var templateFunction = this.getTemplateString(this.popupTemplate);
      append2(templateFunction({}, this, "fabPopupTemplate", this.element.id + "popupTemplate", this.isStringTemplate), templateContainer);
    };
    SpeedDial3.prototype.getTemplateString = function(template) {
      var stringContent = "";
      try {
        var tempEle = select3(template);
        if (typeof template !== "function" && tempEle) {
          stringContent = tempEle.tagName === "SCRIPT" ? tempEle.innerHTML : tempEle.outerHTML;
        } else {
          stringContent = template;
        }
      } catch (e) {
        stringContent = template;
      }
      return compile6(stringContent);
    };
    SpeedDial3.prototype.updatePopupTemplate = function() {
      if (this.popupEle) {
        if (this.popupEle.querySelector("." + SDLI2)) {
          this.clearItems();
          this.popupEle.classList.remove(RADIALSD2, LINEARSD2);
          this.popupEle.classList.add(TEMPLATESD2);
        }
        while (this.popupEle.firstElementChild) {
          remove2(this.popupEle.firstElementChild);
        }
        this.setPopupContent();
        this.updatePositionProperties();
      } else {
        this.createPopup();
      }
    };
    SpeedDial3.prototype.createUl = function() {
      var popupUlEle = this.createElement("ul", {
        className: SDUL2,
        id: this.element.id + "_ul",
        attrs: {
          "role": "menu"
        }
      });
      this.popupEle.appendChild(popupUlEle);
    };
    SpeedDial3.prototype.createItems = function() {
      var _this = this;
      this.focusedIndex = -1;
      var ul = this.popupEle.querySelector("." + SDUL2);
      var _loop_1 = function(index2) {
        var item = this_1.items[parseInt(index2.toString(), 10)];
        var li = this_1.createElement("li", {
          className: SDLI2 + " " + SDHIDDEN2,
          id: item.id ? item.id : this_1.element.id + "_li_" + index2,
          attrs: {
            "role": "menuitem"
          }
        });
        if (item.text) {
          li.setAttribute("aria-label", item.text);
        }
        if (this_1.itemTemplate) {
          var templateFunction = this_1.getTemplateString(this_1.itemTemplate);
          append2(templateFunction(item, this_1, "fabItemTemplate", this_1.element.id + "itemTemplate", this_1.isStringTemplate), li);
        } else {
          if (item.iconCss) {
            var iconSpan = this_1.createElement("span", {
              className: SDLIICON2 + " " + item.iconCss
            });
            li.appendChild(iconSpan);
          }
          if (item.text) {
            var textSpan = this_1.createElement("span", {
              className: SDLITEXT2
            });
            textSpan.innerText = item.text;
            li.appendChild(textSpan);
            if (!item.iconCss) {
              li.classList.add(SDLITEXTONLY2);
            }
          }
        }
        if (item.disabled) {
          li.classList.add(DISABLED6);
          li.setAttribute("aria-disabled", "true");
        } else {
          EventHandler3.add(li, "click", function(e) {
            return _this.triggerItemClick(e, item);
          }, this_1);
        }
        if (item.title) {
          li.setAttribute("title", item.title);
        }
        var eventArgs = {
          element: li,
          item
        };
        this_1.trigger("beforeItemRender", eventArgs, function(args) {
          ul.appendChild(args.element);
        });
      };
      var this_1 = this;
      for (var index = 0; index < this.items.length; index++) {
        _loop_1(index);
      }
    };
    SpeedDial3.prototype.setRTL = function() {
      this.popupEle.classList[this.enableRtl ? "add" : "remove"](RTLCLASS2);
      this.clearHorizontalPosition();
      if (!(this.popupTemplate || this.mode === "Radial")) {
        this.setLinearHorizontalPosition();
      } else {
        if (!this.popupTemplate && this.mode === "Radial") {
          this.setRadialPosition();
        }
        this.setHorizontalPosition();
      }
    };
    SpeedDial3.prototype.checkTarget = function() {
      this.isFixed = true;
      if (this.target) {
        this.targetEle = typeof this.target === "string" ? select3(this.target) : this.target;
        if (this.targetEle) {
          this.targetEle.appendChild(this.element);
          this.isFixed = false;
        }
      }
      if (this.isFixed) {
        if (this.popupEle) {
          this.popupEle.classList.add(FIXEDSD2);
        }
        if (this.overlayEle) {
          this.overlayEle.classList.add(FIXEDSD2);
        }
      } else {
        if (this.popupEle) {
          this.popupEle.classList.remove(FIXEDSD2);
        }
        if (this.overlayEle) {
          this.overlayEle.classList.remove(FIXEDSD2);
        }
      }
    };
    SpeedDial3.prototype.setVisibility = function(val) {
      this.setProperties({
        visible: val
      }, true);
      this.fab.setProperties({
        visible: val
      });
    };
    SpeedDial3.prototype.popupMouseLeaveHandle = function(e) {
      var target = e.relatedTarget;
      if (this.opensOnHover && !(target.classList.contains(SPEEDDIAL2) || closest3(target, "." + SPEEDDIAL2))) {
        this.hidePopupEle(e);
      }
    };
    SpeedDial3.prototype.mouseOverHandle = function(e) {
      this.showPopupEle(e);
    };
    SpeedDial3.prototype.mouseLeaveHandle = function(e) {
      var target = e.relatedTarget;
      if (!(target.classList.contains(SDPOPUP2) || closest3(target, "." + SDPOPUP2))) {
        this.hidePopupEle(e);
      }
    };
    SpeedDial3.prototype.popupKeyActionHandler = function(e) {
      switch (e.action) {
        case "esc":
          this.hidePopupEle(e);
          break;
        case "enter":
        case "space":
          if (this.isMenuOpen && e.target !== this.element) {
            this.hidePopupEle(e);
          }
          break;
      }
    };
    SpeedDial3.prototype.keyActionHandler = function(e) {
      e.preventDefault();
      switch (e.action) {
        case "enter":
        case "space":
          if (this.isMenuOpen) {
            if (this.focusedIndex !== -1) {
              this.triggerItemClick(e, this.items[this.focusedIndex]);
            } else {
              this.hidePopupEle(e);
            }
          } else {
            this.showPopupEle(e);
          }
          break;
        case "esc":
          this.hidePopupEle(e);
          break;
        default:
          if (this.popupTemplate || !this.isMenuOpen) {
            break;
          }
          switch (e.action) {
            case "end":
              this.focusLastElement();
              break;
            case "home":
              this.focusFirstElement();
              break;
            case "moveRight":
              if (this.mode === "Radial") {
                this.focusLeftRightElement(false);
              } else {
                this.focusLinearElement(false);
              }
              break;
            case "moveDown":
              if (this.mode === "Radial") {
                this.focusUpDownElement(false);
              } else {
                this.focusLinearElement(false);
              }
              break;
            case "moveLeft":
              if (this.mode === "Radial") {
                this.focusLeftRightElement(true);
              } else {
                this.focusLinearElement(true);
              }
              break;
            case "moveUp":
              if (this.mode === "Radial") {
                this.focusUpDownElement(true);
              } else {
                this.focusLinearElement(true);
              }
              break;
          }
          break;
      }
    };
    SpeedDial3.prototype.focusFirstElement = function() {
      var ele = selectAll3("." + SDLI2, this.popupEle);
      var index = 0;
      while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED6)) {
        index++;
        if (index > ele.length - 1) {
          return;
        }
      }
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.focusLastElement = function() {
      var ele = selectAll3("." + SDLI2, this.popupEle);
      var index = ele.length - 1;
      while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED6)) {
        index--;
        if (index < 0) {
          return;
        }
      }
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.focusLinearElement = function(isLeftUp) {
      var isReversed = this.popupEle.classList.contains(SDVERTICALBOTTOM2) || this.popupEle.classList.contains(SDHORIZONTALRIGHT2);
      if (isReversed !== isLeftUp) {
        this.focusPrevElement();
      } else {
        this.focusNextElement();
      }
    };
    SpeedDial3.prototype.focusLeftRightElement = function(isLeft) {
      var isradialTop = ["TopLeft", "TopCenter", "TopRight", "MiddleLeft"].indexOf(this.position) !== -1;
      if (isradialTop && isLeft !== this.isClock || !isradialTop && isLeft === this.isClock) {
        this.focusPrevElement();
      } else {
        this.focusNextElement();
      }
    };
    SpeedDial3.prototype.focusUpDownElement = function(isUp) {
      var isradialRight = ["TopRight", "MiddleRight", "BottomRight", "BottomCenter"].indexOf(this.position) !== -1;
      if (isradialRight && isUp !== this.isClock || !isradialRight && isUp === this.isClock) {
        this.focusPrevElement();
      } else {
        this.focusNextElement();
      }
    };
    SpeedDial3.prototype.focusPrevElement = function() {
      var ele = selectAll3("." + SDLI2, this.popupEle);
      var index = this.focusedIndex;
      do {
        index--;
        if (index < 0) {
          this.setFocus(-1);
          return;
        }
      } while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED6));
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.focusNextElement = function() {
      var ele = selectAll3("." + SDLI2, this.popupEle);
      var index = this.focusedIndex;
      do {
        index++;
        if (index > ele.length - 1) {
          return;
        }
      } while (ele[parseInt(index.toString(), 10)].classList.contains(DISABLED6));
      this.setFocus(index, ele[parseInt(index.toString(), 10)]);
    };
    SpeedDial3.prototype.setFocus = function(index, ele) {
      this.removeFocus();
      if (ele) {
        ele.classList.add(SDACTIVELI2);
      }
      this.focusedIndex = index;
    };
    SpeedDial3.prototype.removeFocus = function() {
      var preEle = select3("." + SDACTIVELI2, this.popupEle);
      if (preEle) {
        preEle.classList.remove(SDACTIVELI2);
      }
    };
    SpeedDial3.prototype.updatePositionProperties = function() {
      this.hidePopupEle();
      this.clearPosition();
      this.validateDirection();
      this.setPositionProps();
    };
    SpeedDial3.prototype.setPositionProps = function() {
      if (this.popupTemplate) {
        this.setPosition();
      } else if (this.mode === "Radial") {
        this.setRadialPosition();
        this.setPosition();
      } else {
        this.setLinearPosition();
        this.setMaxSize();
      }
    };
    SpeedDial3.prototype.validateDirection = function() {
      switch (this.direction) {
        case "Up":
          this.actualLinDirection = topPosition2.indexOf(this.position) !== -1 ? "Auto" : "Up";
          break;
        case "Down":
          this.actualLinDirection = bottomPosition2.indexOf(this.position) !== -1 ? "Auto" : "Down";
          break;
        case "Right":
          this.actualLinDirection = rightPosition2.indexOf(this.position) !== -1 ? "Auto" : "Right";
          break;
        case "Left":
          this.actualLinDirection = leftPosition2.indexOf(this.position) !== -1 ? "Auto" : "Left";
          break;
        case "Auto":
        default:
          this.actualLinDirection = "Auto";
          break;
      }
      this.isVertical = !(this.actualLinDirection === "Left" || this.actualLinDirection === "Right");
    };
    SpeedDial3.prototype.setMaxSize = function() {
      var top = this.element.offsetTop;
      var left = this.element.offsetLeft;
      var bottom = (this.isFixed ? window.innerHeight : this.targetEle.clientHeight) - this.element.offsetTop - this.element.offsetHeight;
      var right = (this.isFixed ? window.innerWidth : this.targetEle.clientWidth) - this.element.offsetLeft - this.element.offsetWidth;
      var limit = 0;
      var popupUlEle = this.popupEle.querySelector("." + SDUL2);
      if (this.isVertical) {
        limit = this.actualLinDirection === "Up" || this.actualLinDirection === "Auto" && topPosition2.indexOf(this.position) === -1 ? top : bottom;
        if (limit < popupUlEle.offsetHeight) {
          this.popupEle.classList.add(SDOVERFLOW2, SDVERTOVERFLOW2);
          popupUlEle.style.setProperty(SDOVERFLOWLIMIT2, limit + "px");
        }
      } else {
        limit = this.enableRtl ? this.direction === "Right" ? left : right : this.direction === "Right" ? right : left;
        if (limit < popupUlEle.offsetWidth) {
          this.popupEle.classList.add(SDOVERFLOW2, SDHORZOVERFLOW2);
          popupUlEle.style.setProperty(SDOVERFLOWLIMIT2, limit + "px");
        }
      }
    };
    SpeedDial3.prototype.setLinearPosition = function() {
      var vertDist = 0;
      var isTop = this.actualLinDirection === "Down" || this.actualLinDirection === "Auto" && topPosition2.indexOf(this.position) !== -1 || !this.isVertical && bottomPosition2.indexOf(this.position) === -1;
      var elementOffSetHeight = this.element.offsetHeight / 2;
      var isMiddle = ["MiddleRight", "MiddleCenter", "MiddleLeft"].indexOf(this.position) !== -1;
      if (isTop) {
        vertDist = this.element.offsetTop + (this.isVertical ? this.element.offsetHeight : 0);
        if (isMiddle) {
          if (this.actualLinDirection === "Right" || this.actualLinDirection === "Left") {
            vertDist = this.element.offsetTop - elementOffSetHeight;
          }
          if (this.actualLinDirection === "Down") {
            vertDist = vertDist - elementOffSetHeight;
          }
        }
        if (!this.isVertical) {
          this.popupEle.classList.add(SDHORIZONTALTOP2);
        }
      } else {
        vertDist = this.isFixed ? window.document.documentElement.clientHeight : this.targetEle.clientHeight;
        vertDist = vertDist - this.element.offsetTop - (this.isVertical ? 0 : this.element.offsetHeight);
        if (isMiddle) {
          if (this.actualLinDirection === "Auto" || this.actualLinDirection === "Up") {
            vertDist = vertDist + elementOffSetHeight;
          }
        }
        if (this.isVertical) {
          this.popupEle.classList.add(SDVERTICALBOTTOM2);
        }
      }
      this.popupEle.classList.add(isTop ? SDTOP2 : SDBOTTOM2);
      this.popupEle.style.setProperty(SDVERTDIST2, vertDist + "px");
      this.setLinearHorizontalPosition();
    };
    SpeedDial3.prototype.setLinearHorizontalPosition = function() {
      if (this.actualLinDirection === "Right" || this.isVertical && rightPosition2.indexOf(this.position) === -1) {
        if (this.enableRtl) {
          this.setRight();
        } else {
          this.setLeft();
        }
        if (!this.isVertical) {
          this.popupEle.classList.add(SDHORIZONTALLEFT2);
        }
      } else {
        if (this.enableRtl) {
          this.setLeft();
        } else {
          this.setRight();
        }
        this.popupEle.classList.add(this.isVertical ? SDVERTICALRIGHT2 : SDHORIZONTALRIGHT2);
      }
    };
    SpeedDial3.prototype.setLeft = function() {
      var elementOffSetWidth = this.element.offsetWidth / 2;
      var isCenter = ["TopCenter", "MiddleCenter", "BottomCenter"].indexOf(this.position) !== -1;
      var horzDist = this.element.offsetLeft + (this.isVertical ? 0 : this.element.offsetWidth);
      if (isCenter) {
        if (this.actualLinDirection === "Auto" || this.actualLinDirection === "Down" || this.actualLinDirection === "Up") {
          horzDist = this.element.offsetLeft - elementOffSetWidth;
        } else {
          horzDist = this.actualLinDirection === "Right" ? this.element.offsetLeft + elementOffSetWidth : horzDist + elementOffSetWidth;
        }
      }
      this.popupEle.style.setProperty(SDHORZDIST2, horzDist + "px");
      this.popupEle.classList.add(SDLEFT2);
    };
    SpeedDial3.prototype.setRight = function() {
      var elementOffSetWidth = this.element.offsetWidth / 2;
      var isCenter = ["TopCenter", "MiddleCenter", "BottomCenter"].indexOf(this.position) !== -1;
      var horzDist = this.isFixed ? window.document.documentElement.clientWidth : this.targetEle.clientWidth;
      horzDist = horzDist - this.element.offsetLeft - (this.isVertical ? this.element.offsetWidth : 0);
      if (isCenter && this.actualLinDirection === "Left") {
        horzDist = horzDist + elementOffSetWidth;
      }
      if (this.popupEle.classList.contains("e-rtl") && isCenter) {
        horzDist = horzDist - elementOffSetWidth;
      }
      this.popupEle.style.setProperty(SDHORZDIST2, horzDist + "px");
      this.popupEle.classList.add(SDRIGHT2);
    };
    SpeedDial3.prototype.setPosition = function() {
      if (["MiddleLeft", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(SDMIDDLE2);
        var yoffset = ((this.isFixed ? window.innerHeight : this.targetEle.clientHeight) - this.popupEle.offsetHeight) / 2;
        this.popupEle.style.setProperty(SDVERTDIST2, yoffset + "px");
      }
      this.popupEle.classList.add(bottomPosition2.indexOf(this.position) === -1 ? SDTOP2 : SDBOTTOM2);
      this.setHorizontalPosition();
    };
    SpeedDial3.prototype.setHorizontalPosition = function() {
      if (["TopCenter", "BottomCenter", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(SDCENTER2);
        var xoffset = ((this.isFixed ? window.innerWidth : this.targetEle.clientWidth) - this.popupEle.offsetWidth) / 2;
        this.popupEle.style.setProperty(SDHORZDIST2, xoffset + "px");
      }
      var isRight = rightPosition2.indexOf(this.position) !== -1;
      this.popupEle.classList.add(!(this.enableRtl || isRight) || this.enableRtl && isRight ? SDLEFT2 : SDRIGHT2);
    };
    SpeedDial3.prototype.setCustomRadialPosition = function() {
      var viewportWidth = document.documentElement.clientWidth;
      var viewportHeight = document.documentElement.clientHeight;
      if (["TopLeft", "BottomLeft", "MiddleLeft"].indexOf(this.position) !== -1) {
        var horzDist = void 0;
        if (this.enableRtl) {
          if (this.isFixed) {
            horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth);
          } else {
            horzDist = this.targetEle.clientWidth - (this.element.offsetLeft + this.element.offsetWidth);
          }
        } else {
          horzDist = this.element.offsetLeft;
        }
        this.popupEle.style.setProperty(SDRADICALHORZDIST2, horzDist + "px");
      }
      if (["TopLeft", "TopCenter", "TopRight"].indexOf(this.position) !== -1) {
        this.popupEle.style.top = this.element.offsetTop + "px";
      }
      if (["TopRight", "BottomRight", "MiddleRight"].indexOf(this.position) !== -1) {
        var horzDist = void 0;
        if (this.enableRtl) {
          horzDist = this.element.offsetLeft;
        } else {
          if (this.isFixed) {
            horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth);
          } else {
            horzDist = this.targetEle.clientWidth - (this.element.offsetLeft + this.element.offsetWidth);
          }
        }
        this.popupEle.style.setProperty(SDRADICALHORZDIST2, horzDist + "px");
      }
      if (["BottomLeft", "BottomCenter", "BottomRight"].indexOf(this.position) !== -1) {
        if (this.isFixed) {
          this.popupEle.style.bottom = viewportHeight - (this.element.offsetTop + this.element.offsetHeight) + "px";
        } else {
          this.popupEle.style.bottom = this.targetEle.clientHeight - (this.element.offsetTop + this.element.offsetHeight) + "px";
        }
      }
      if (["TopCenter", "MiddleCenter", "BottomCenter"].indexOf(this.position) !== -1) {
        var horzDist = void 0;
        if (this.enableRtl) {
          if (this.isFixed) {
            horzDist = viewportWidth - (this.element.offsetLeft + this.element.offsetWidth) - this.popupEle.offsetWidth / 2;
          } else {
            var targetEleWidth = this.targetEle.clientWidth;
            var popupEleWidth = this.popupEle.offsetWidth;
            horzDist = targetEleWidth - (this.element.offsetLeft + this.element.offsetWidth) - popupEleWidth / 2;
          }
        } else {
          horzDist = this.element.offsetLeft - this.popupEle.offsetWidth / 2;
        }
        this.popupEle.style.setProperty(SDRADICALHORZDIST2, horzDist + "px");
      }
      if (["MiddleLeft", "MiddleCenter", "MiddleRight"].indexOf(this.position) !== -1) {
        this.popupEle.style.top = this.element.offsetTop - this.popupEle.offsetHeight / 2 + "px";
      }
    };
    SpeedDial3.prototype.setRadialPosition = function() {
      this.setRadialCorner();
      var range = this.getActualRange();
      this.isClock = range.direction === "Clockwise";
      var offset = formatUnit2(range.offset);
      var li = selectAll3("." + SDLI2, this.popupEle);
      this.popupEle.style.setProperty(SDRADICALOFFSET2, offset);
      this.popupEle.style.setProperty(SDRADICALMINHEIGHT2, li[0].offsetHeight + "px");
      this.popupEle.style.setProperty(SDRADICALMINWIDTH2, li[0].offsetWidth + "px");
      var availableAngle = Math.abs(range.endAngle - range.startAngle);
      var gaps = availableAngle === 360 || availableAngle === 0 ? li.length : li.length - 1;
      var perAngle = availableAngle / gaps;
      for (var i = 0; i < li.length; i++) {
        var ele = li[parseInt(i.toString(), 10)];
        var startAngle = range.startAngle;
        var angle = this.isClock ? startAngle + perAngle * i : startAngle - perAngle * i;
        angle = angle % 360;
        ele.style.setProperty(SDRADICALANGLE2, angle + "deg");
      }
    };
    SpeedDial3.prototype.setRadialCorner = function() {
      if (["TopLeft", "TopCenter", "MiddleLeft", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDTOPRIGHT2 : SDTOPLEFT2);
      }
      if (["TopRight", "TopCenter", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDTOPLEFT2 : SDTOPRIGHT2);
      }
      if (["BottomLeft", "BottomCenter", "MiddleLeft", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDBOTTOMRIGHT2 : SDBOTTOMLEFT2);
      }
      if (["BottomRight", "BottomCenter", "MiddleRight", "MiddleCenter"].indexOf(this.position) !== -1) {
        this.popupEle.classList.add(this.enableRtl ? SDBOTTOMLEFT2 : SDBOTTOMRIGHT2);
      }
    };
    SpeedDial3.prototype.getActualRange = function() {
      var range = {
        offset: this.radialSettings.offset
      };
      var start = this.radialSettings.startAngle;
      var end = this.radialSettings.endAngle;
      var isClockwise = false;
      switch (this.position) {
        case "TopLeft":
        case "TopRight":
          if ("TopLeft" === this.position !== this.enableRtl) {
            isClockwise = this.radialSettings.direction === "Clockwise";
            this.checkAngleRange(start, end, range, isClockwise, 0, 90, false);
          } else {
            isClockwise = this.radialSettings.direction !== "AntiClockwise";
            this.checkAngleRange(start, end, range, isClockwise, 90, 180, false);
          }
          break;
        case "TopCenter":
          isClockwise = this.radialSettings.direction === "Clockwise";
          this.checkAngleRange(start, end, range, isClockwise, 0, 180, false);
          break;
        case "MiddleLeft":
        case "MiddleRight":
          if ("MiddleLeft" === this.position !== this.enableRtl) {
            isClockwise = this.radialSettings.direction === "Clockwise";
            start = isNullOrUndefined3(start) || start < 0 || start > 360 || start > 90 && start < 270 ? isClockwise ? 270 : 90 : start;
            end = isNullOrUndefined3(end) || end < 0 || end > 360 || end > 90 && end < 270 ? isClockwise ? 90 : 270 : end;
            start = start < 91 ? start + 360 : start;
            end = end < 91 ? end + 360 : end;
            var switchVal = isClockwise && end < start || !isClockwise && end > start;
            range.startAngle = switchVal ? end : start;
            range.endAngle = switchVal ? start : end;
          } else {
            isClockwise = this.radialSettings.direction !== "AntiClockwise";
            this.checkAngleRange(start, end, range, isClockwise, 90, 270, false);
          }
          break;
        case "MiddleCenter":
          isClockwise = this.radialSettings.direction !== "AntiClockwise";
          start = isNullOrUndefined3(start) || start < 0 || start > 360 ? isClockwise ? 0 : 360 : start;
          end = isNullOrUndefined3(end) || end < 0 || end > 360 ? isClockwise ? 360 : 0 : end;
          range.startAngle = !isClockwise && start <= end ? start + 360 : start;
          range.endAngle = isClockwise && end <= start ? end + 360 : end;
          break;
        case "BottomLeft":
        case "BottomRight":
          if ("BottomLeft" === this.position !== this.enableRtl) {
            isClockwise = this.radialSettings.direction === "Clockwise";
            this.checkAngleRange(start, end, range, isClockwise, 270, 360, true);
          } else {
            isClockwise = this.radialSettings.direction !== "AntiClockwise";
            this.checkAngleRange(start, end, range, isClockwise, 180, 270, true);
          }
          break;
        case "BottomCenter":
          isClockwise = this.radialSettings.direction !== "AntiClockwise";
          this.checkAngleRange(start, end, range, isClockwise, 180, 360, true);
          break;
      }
      range.direction = isClockwise ? "Clockwise" : "AntiClockwise";
      return range;
    };
    SpeedDial3.prototype.checkAngleRange = function(start, end, range, isClockwise, min, max, check0) {
      start = this.checkAngle(start, isClockwise, min, max, check0);
      end = this.checkAngle(end, !isClockwise, min, max, check0);
      var switchVal = isClockwise && end < start || !isClockwise && end > start;
      range.startAngle = switchVal ? end : start;
      range.endAngle = switchVal ? start : end;
    };
    SpeedDial3.prototype.checkAngle = function(val, isStart, min, max, check0) {
      if (isNullOrUndefined3(val) || val < 0 || val > 360) {
        return isStart ? min : max;
      } else {
        val = check0 ? val === 0 ? 360 : val : val === 360 ? 0 : val;
        return val >= min && val <= max ? val : isStart ? min : max;
      }
    };
    SpeedDial3.prototype.clearPosition = function() {
      this.popupEle.style.removeProperty(SDRADICALOFFSET2);
      this.popupEle.style.removeProperty(SDRADICALMINHEIGHT2);
      this.popupEle.style.removeProperty(SDRADICALMINWIDTH2);
      this.popupEle.classList.remove(SDTOPLEFT2, SDTOPRIGHT2, SDBOTTOMLEFT2, SDBOTTOMRIGHT2);
      this.popupEle.classList.remove(SDTOP2, SDBOTTOM2, SDMIDDLE2);
      this.popupEle.classList.remove(SDHORIZONTALTOP2, SDVERTICALBOTTOM2);
      this.popupEle.style.removeProperty(SDVERTDIST2);
      this.clearHorizontalPosition();
      this.clearOverflow();
    };
    SpeedDial3.prototype.clearHorizontalPosition = function() {
      this.popupEle.style.removeProperty(SDHORZDIST2);
      this.popupEle.style.removeProperty(SDRADICALHORZDIST2);
      this.popupEle.style.removeProperty("top");
      this.popupEle.style.removeProperty("bottom");
      this.popupEle.classList.remove(SDRIGHT2, SDLEFT2, SDCENTER2);
      this.popupEle.classList.remove(SDVERTICALRIGHT2, SDHORIZONTALLEFT2, SDHORIZONTALRIGHT2);
    };
    SpeedDial3.prototype.clearOverflow = function() {
      this.popupEle.classList.remove(SDOVERFLOW2, SDVERTOVERFLOW2, SDHORZOVERFLOW2);
      this.popupEle.style.removeProperty(SDOVERFLOWLIMIT2);
    };
    SpeedDial3.prototype.hidePopupEle = function(e) {
      var _this = this;
      if (!this.popupEle || !this.isMenuOpen) {
        return;
      }
      var eventArgs = {
        element: this.popupEle,
        event: e,
        cancel: false
      };
      this.trigger("beforeClose", eventArgs, function(args) {
        if (args.cancel) {
          return;
        }
        if (_this.animation.effect !== "None") {
          var closeAnimation_1 = {
            name: _this.animation.effect + "Out",
            timingFunction: "easeOut"
          };
          var eleArray_1 = _this.popupTemplate ? [_this.popupEle.firstElementChild] : selectAll3("." + SDLI2, _this.popupEle);
          var timeOutInterval_1 = _this.animation.duration / (eleArray_1.length + 1);
          closeAnimation_1.duration = 2 * timeOutInterval_1;
          var animateElement_1 = function(curIndex) {
            var ele2 = eleArray_1[parseInt(curIndex.toString(), 10)];
            closeAnimation_1.delay = curIndex === eleArray_1.length - 1 ? _this.animation.delay : 0;
            closeAnimation_1.begin = function() {
              if (curIndex === eleArray_1.length - 1) {
                _this.startHide();
              }
            };
            closeAnimation_1.end = function() {
              ele2.classList.add(SDHIDDEN2);
              if (curIndex === 0) {
                _this.endHide();
              }
            };
            new Animation4(closeAnimation_1).animate(ele2);
            if (curIndex !== 0) {
              var index_1 = curIndex - 1;
              setTimeout(function() {
                animateElement_1(index_1);
              }, timeOutInterval_1);
            }
          };
          animateElement_1(eleArray_1.length - 1);
        } else {
          _this.startHide();
          if (!_this.popupTemplate) {
            var ele = selectAll3("." + SDLI2, _this.popupEle);
            ele.forEach(function(element2) {
              element2.classList.add(SDHIDDEN2);
            });
          }
          _this.endHide();
        }
      });
    };
    SpeedDial3.prototype.startHide = function() {
      this.element.setAttribute("aria-expanded", "false");
      this.removeFocus();
      this.isMenuOpen = false;
    };
    SpeedDial3.prototype.endHide = function() {
      this.fab.setProperties({
        iconCss: this.openIconCss
      });
      this.popupEle.classList.add(SDHIDDEN2);
      if (this.popupTemplate) {
        this.setVisibility(true);
      }
      this.toggleOverlay();
      if (this.popupTemplate) {
        this.popupEle.removeAttribute("tabindex");
      }
      this.trigger("onClose", {
        element: this.popupEle
      });
    };
    SpeedDial3.prototype.showPopupEle = function(e) {
      var _this = this;
      if (!this.popupEle || this.isMenuOpen) {
        return;
      }
      if (this.popupTemplate || this.mode === "Radial") {
        this.setCustomRadialPosition();
      } else {
        this.setLinearPosition();
      }
      var eventArgs = {
        element: this.popupEle,
        event: e,
        cancel: false
      };
      this.trigger("beforeOpen", eventArgs, function(args) {
        if (args.cancel) {
          return;
        }
        if (_this.animation.effect !== "None" || animationMode3 === "Enable" && _this.animation.effect === "None") {
          if (animationMode3 === "Enable" && _this.animation.effect === "None") {
            _this.animation.effect = "Fade";
          }
          if (animationMode3 === "Enable" && _this.animation.duration === 0) {
            _this.animation.duration = 400;
          }
          var openAnimation_1 = {
            name: _this.animation.effect + "In",
            timingFunction: "easeIn"
          };
          var eleArray_2 = _this.popupTemplate ? [_this.popupEle.firstElementChild] : selectAll3("." + SDLI2, _this.popupEle);
          var timeOutInterval_2 = _this.animation.duration / (eleArray_2.length + 1);
          openAnimation_1.duration = 2 * timeOutInterval_2;
          var animateElement_2 = function(curIndex) {
            var ele2 = eleArray_2[parseInt(curIndex.toString(), 10)];
            openAnimation_1.delay = curIndex === 0 ? _this.animation.delay : 0;
            openAnimation_1.begin = function() {
              if (curIndex === 0) {
                _this.startShow();
              }
              ele2.classList.remove(SDHIDDEN2);
            };
            openAnimation_1.end = function() {
              if (curIndex === eleArray_2.length - 1) {
                _this.endShow();
              }
            };
            new Animation4(openAnimation_1).animate(ele2);
            if (curIndex !== eleArray_2.length - 1) {
              var index_2 = curIndex + 1;
              setTimeout(function() {
                animateElement_2(index_2);
              }, timeOutInterval_2);
            }
          };
          animateElement_2(0);
        } else {
          _this.startShow();
          if (!_this.popupTemplate) {
            var ele = selectAll3("." + SDLI2, _this.popupEle);
            ele.forEach(function(element2) {
              element2.classList.remove(SDHIDDEN2);
            });
          }
          _this.endShow();
        }
      });
    };
    SpeedDial3.prototype.startShow = function() {
      this.element.setAttribute("aria-expanded", "true");
      this.isMenuOpen = true;
      this.toggleOverlay();
      this.popupEle.classList.remove(SDHIDDEN2);
      if (this.popupTemplate) {
        this.setVisibility(false);
      }
    };
    SpeedDial3.prototype.endShow = function() {
      if (this.closeIconCss) {
        this.fab.setProperties({
          iconCss: this.closeIconCss
        });
      }
      if (this.popupTemplate) {
        this.popupEle.setAttribute("tabindex", "1");
        this.popupEle.focus();
      }
      this.trigger("onOpen", {
        element: this.popupEle
      });
    };
    SpeedDial3.prototype.toggleOverlay = function() {
      if (!this.overlayEle) {
        return;
      }
      this.overlayEle.classList[this.isMenuOpen ? "remove" : "add"](SDHIDDEN2);
    };
    SpeedDial3.prototype.removeOverlayEle = function() {
      if (!this.overlayEle) {
        return;
      }
      remove2(this.overlayEle);
      this.overlayEle = void 0;
    };
    SpeedDial3.prototype.updatePopupItems = function() {
      if (this.popupEle) {
        this.hidePopupEle();
        this.clearItems();
        this.createItems();
        this.updatePositionProperties();
      } else {
        this.createPopup();
      }
    };
    SpeedDial3.prototype.handleResize = function(e) {
      if (!this.popupEle) {
        return;
      }
      this.hidePopupEle(e);
      this.clearOverflow();
      this.setPositionProps();
    };
    SpeedDial3.prototype.triggerItemClick = function(e, item) {
      var target = e.target;
      target = target.classList.contains(SDLI2) ? target : closest3(target, "." + SDLI2);
      var eventArgs = {
        element: target,
        item,
        event: e
      };
      this.trigger("clicked", eventArgs);
      this.hidePopupEle(e);
    };
    SpeedDial3.prototype.show = function() {
      this.showPopupEle();
    };
    SpeedDial3.prototype.hide = function() {
      this.hidePopupEle();
    };
    SpeedDial3.prototype.refreshPosition = function() {
      this.resizeHandler();
    };
    SpeedDial3.prototype.resizeHandler = function(e) {
      this.handleResize(e);
    };
    SpeedDial3.prototype.clearItems = function() {
      var liList = selectAll3("." + SDLI2, this.popupEle);
      liList.forEach(function(element2) {
        remove2(element2);
      });
    };
    SpeedDial3.prototype.unwireEvents = function() {
      EventHandler3.remove(window, "resize", this.resizeHandler);
      EventHandler3.remove(document.body, "click", this.bodyClickHandler);
      if (this.opensOnHover) {
        this.unwireFabHover();
      } else {
        this.unwireFabClick();
      }
    };
    SpeedDial3.prototype.unwireFabClick = function() {
      EventHandler3.remove(this.fab.element, "click", this.fabClick);
    };
    SpeedDial3.prototype.unwireFabHover = function() {
      this.popupEle.classList.remove(HOVERSD2);
      EventHandler3.remove(this.fab.element, "mouseover", this.mouseOverHandle);
      EventHandler3.remove(this.element, "mouseleave", this.mouseLeaveHandle);
    };
    SpeedDial3.prototype.unwirePopupEvents = function() {
      if (isRippleEnabled2) {
        this.removeRippleEffect();
      }
      this.removeRippleEffect = null;
      this.keyboardModule.destroy();
      this.popupKeyboardModule.destroy();
      this.documentKeyboardModule.destroy();
      this.keyboardModule = null;
      this.popupKeyboardModule = null;
      this.documentKeyboardModule = null;
      EventHandler3.remove(this.popupEle, "click", this.popupClick);
      EventHandler3.remove(this.popupEle, "mouseleave", this.popupMouseLeaveHandle);
    };
    SpeedDial3.prototype.destroy = function() {
      var _this = this;
      _super.prototype.destroy.call(this);
      this.unwireEvents();
      ["aria-expanded", "aria-haspopup", "aria-controls"].forEach(function(attr) {
        _this.element.removeAttribute(attr);
      });
      if (this.popupEle) {
        this.unwirePopupEvents();
        remove2(this.popupEle);
        this.popupEle = void 0;
      }
      this.removeOverlayEle();
      this.fab.destroy();
      this.fab = void 0;
    };
    SpeedDial3.prototype.onPropertyChanged = function(newProp, oldProp) {
      var fabProplist = ["content", "cssClass", "disabled", "enablePersistence", "enableRtl", "iconPosition", "position", "target", "template", "title", "visible", "isPrimary"];
      var fabModel = extend3({}, newProp);
      for (var _i = 0, _a = Object.keys(fabModel); _i < _a.length; _i++) {
        var prop = _a[_i];
        if (fabProplist.indexOf(prop) < 0) {
          deleteObject3(fabModel, prop);
        }
      }
      this.fab.setProperties(fabModel);
      for (var _b = 0, _c = Object.keys(newProp); _b < _c.length; _b++) {
        var prop = _c[_b];
        switch (prop) {
          case "cssClass":
            if (!this.popupEle) {
              break;
            }
            if (oldProp.cssClass) {
              removeClass3(this.overlayEle ? [this.popupEle, this.overlayEle] : [this.popupEle], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass3(this.overlayEle ? [this.popupEle, this.overlayEle] : [this.popupEle], newProp.cssClass.split(" "));
            }
            break;
          case "visible":
          case "disabled":
            this.hide();
            break;
          case "enableRtl":
            if (!this.popupEle) {
              break;
            }
            this.setRTL();
            break;
          case "openIconCss":
            if (!this.isMenuOpen) {
              this.fab.setProperties({
                iconCss: this.openIconCss
              });
            }
            break;
          case "closeIconCss":
            if (this.isMenuOpen) {
              this.fab.setProperties({
                iconCss: this.closeIconCss
              });
            }
            break;
          case "position":
            if (!this.popupEle) {
              break;
            }
            this.updatePositionProperties();
            break;
          case "direction":
            if (!this.popupEle || this.popupTemplate) {
              break;
            }
            this.updatePositionProperties();
            break;
          case "popupTemplate":
            this.updatePopupTemplate();
            break;
          case "target":
            this.hidePopupEle();
            this.checkTarget();
            if (this.overlayEle) {
              this.element.insertAdjacentElement("beforebegin", this.overlayEle);
            }
            if (!this.popupEle) {
              break;
            }
            this.element.insertAdjacentElement("afterend", this.popupEle);
            this.updatePositionProperties();
            break;
          case "items":
          case "itemTemplate":
            if (this.popupTemplate) {
              break;
            }
            this.updatePopupItems();
            break;
          case "modal":
            if (newProp.modal) {
              this.createOverlay();
            } else {
              this.removeOverlayEle();
            }
            break;
          case "mode":
            if (!this.popupEle || this.popupTemplate) {
              break;
            }
            this.popupEle.classList.remove(RADIALSD2, LINEARSD2);
            this.popupEle.classList.add(this.mode === "Radial" ? RADIALSD2 : LINEARSD2);
            this.updatePositionProperties();
            break;
          case "radialSettings":
            if (this.popupEle && this.mode === "Radial" && !this.popupTemplate) {
              this.setRadialPosition();
            }
            break;
          case "opensOnHover":
            if (this.opensOnHover) {
              this.unwireFabClick();
              this.wireFabHover();
            } else {
              this.unwireFabHover();
              this.wireFabClick();
            }
            break;
        }
      }
    };
    __decorate43([Complex3({}, SpeedDialAnimationSettings2)], SpeedDial3.prototype, "animation", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "content", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "closeIconCss", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "cssClass", void 0);
    __decorate43([Property3("Auto")], SpeedDial3.prototype, "direction", void 0);
    __decorate43([Property3(false)], SpeedDial3.prototype, "disabled", void 0);
    __decorate43([Property3("Left")], SpeedDial3.prototype, "iconPosition", void 0);
    __decorate43([Collection2([], SpeedDialItem2)], SpeedDial3.prototype, "items", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "itemTemplate", void 0);
    __decorate43([Property3("Linear")], SpeedDial3.prototype, "mode", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "openIconCss", void 0);
    __decorate43([Property3(false)], SpeedDial3.prototype, "opensOnHover", void 0);
    __decorate43([Property3("BottomRight")], SpeedDial3.prototype, "position", void 0);
    __decorate43([Property3(false)], SpeedDial3.prototype, "modal", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "popupTemplate", void 0);
    __decorate43([Complex3({}, RadialSettings2)], SpeedDial3.prototype, "radialSettings", void 0);
    __decorate43([Property3("")], SpeedDial3.prototype, "target", void 0);
    __decorate43([Property3(true)], SpeedDial3.prototype, "visible", void 0);
    __decorate43([Property3(true)], SpeedDial3.prototype, "isPrimary", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "beforeClose", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "beforeItemRender", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "beforeOpen", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "created", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "clicked", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "onClose", void 0);
    __decorate43([Event4()], SpeedDial3.prototype, "onOpen", void 0);
    SpeedDial3 = __decorate43([NotifyPropertyChanges3], SpeedDial3);
    return SpeedDial3;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/node_modules/@syncfusion/ej2-buttons/src/smart-paste-button/smart-paste-button.js
var __extends45 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate44 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter3 = function(thisArg, _arguments, P, generator) {
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : new P(function(resolve2) {
        resolve2(result.value);
      }).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
var __generator3 = function(thisArg, body) {
  var _ = {
    label: 0,
    sent: function() {
      if (t[0] & 1) throw t[1];
      return t[1];
    },
    trys: [],
    ops: []
  }, f, y, t, g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (_) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
};
var SmartPasteButton2 = (
  /** @class */
  function(_super) {
    __extends45(SmartPasteButton3, _super);
    function SmartPasteButton3(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    SmartPasteButton3.prototype.wireEvents = function() {
      EventHandler3.add(this.element, "click", this.smartPasteBtnClickHandler, this);
    };
    SmartPasteButton3.prototype.unWireEvents = function() {
      EventHandler3.remove(this.element, "click", this.smartPasteBtnClickHandler);
    };
    SmartPasteButton3.prototype.smartPasteBtnClickHandler = function(args) {
      return __awaiter3(this, void 0, void 0, function() {
        var target, formElement, formFields, clipboardContent, fieldsData, systemRole, userRole, settings, response;
        return __generator3(this, function(_a) {
          switch (_a.label) {
            case 0:
              target = args.target;
              formElement = target.closest("form");
              if (!formElement) {
                return [
                  2
                  /*return*/
                ];
              }
              formFields = this.getFormFields(formElement);
              if (formFields.length === 0) {
                return [
                  2
                  /*return*/
                ];
              }
              return [4, this.getClipboardContent().then(function(text) {
                return text;
              })];
            case 1:
              clipboardContent = _a.sent();
              if (!(clipboardContent !== "Clipboard API not supported" && clipboardContent !== "Clipboard access failed")) return [3, 6];
              _a.label = 2;
            case 2:
              _a.trys.push([2, , 5, 6]);
              this.disabled = true;
              fieldsData = formFields.map(function(field) {
                return {
                  fieldName: field.fieldName,
                  description: field.description,
                  allowedValues: field.allowedValues,
                  type: field.type
                };
              });
              systemRole = "\nCurrent date: " + (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
                year: "numeric",
                month: "long",
                day: "numeric"
              }) + "\n\nEach response line matches the following format:\nFIELD identifier^^^value\n\nGive a response with the following lines only, with values inferred from USER_DATA:\n" + this.formatFields(fieldsData) + "\nEND_RESPONSE\n\nDo not explain how the values were determined.\nFor fields without any corresponding information in USER_DATA, use value NO_DATA.";
              userRole = "\nUSER_DATA: " + clipboardContent + "\n                    ";
              settings = {
                messages: [{
                  role: "system",
                  content: systemRole
                }, {
                  role: "user",
                  content: userRole
                }],
                temperature: 0,
                topP: 1,
                maxTokens: 2e3,
                frequencyPenalty: 0.1,
                presencePenalty: 0,
                stop: ["END_RESPONSE"]
              };
              if (!(typeof this.aiAssistHandler === "function")) return [3, 4];
              return [4, this.aiAssistHandler(settings)];
            case 3:
              response = _a.sent();
              if (typeof response === "string" && response !== "") {
                this.setFormFields(formElement, formFields, response);
              }
              _a.label = 4;
            case 4:
              return [3, 6];
            case 5:
              this.disabled = false;
              return [
                7
                /*endfinally*/
              ];
            case 6:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    SmartPasteButton3.prototype.formatFields = function(fields) {
      var result = [];
      fields.forEach(function(field) {
        var fieldOutput = [];
        fieldOutput.push("\nFIELD " + field.fieldName + "^^^");
        if (field.description) {
          fieldOutput.push("The " + field.description);
        }
        if (field.allowedValues && field.allowedValues.length > 0) {
          fieldOutput.push(" (multiple choice, with allowed values: ");
          fieldOutput.push(field.allowedValues.map(function(val) {
            return "" + val;
          }).join(","));
          fieldOutput.push(")");
        } else {
          fieldOutput.push(" of type " + field.type);
        }
        result.push(fieldOutput.join(""));
      });
      return result.join("");
    };
    SmartPasteButton3.prototype.setFormFields = function(form, formFields, response) {
      var _this = this;
      var responseData = {};
      var fieldPrefix = "FIELD ";
      var currentField = null;
      response.split("\n").forEach(function(line) {
        if (line.startsWith(fieldPrefix)) {
          var parts = line.substring(fieldPrefix.length).split("^^^");
          if (parts.length === 2) {
            responseData["" + parts[0]] = parts[1];
            currentField = parts[0];
          }
        } else if (currentField) {
          responseData["" + currentField] += "\n" + line;
        }
      });
      formFields.forEach(function(field) {
        var value = responseData[field.fieldName];
        if (value !== void 0) {
          value = value.trim();
          if (value === "NO_DATA") {
            return;
          }
          if (field.element instanceof HTMLInputElement && field.element.type === "radio") {
            var radioButton = _this.findRadioButton(form, field.element.name, value);
            if (radioButton) {
              _this.updateElementValue(radioButton, "true");
            }
          } else {
            _this.updateElementValue(field.element, value);
          }
        }
      });
    };
    SmartPasteButton3.prototype.findRadioButton = function(form, name, value) {
      var _this = this;
      var radioButtons = Array.from(form.querySelectorAll("input[type=radio]")).filter(function(radio) {
        return radio instanceof HTMLInputElement && radio.name === name;
      }).map(function(radio) {
        return {
          elem: radio,
          text: _this.getElementDescription(form, radio)
        };
      });
      var exactMatch = radioButtons.find(function(radio) {
        return radio.text === value;
      });
      if (exactMatch) {
        return exactMatch.elem;
      }
      var partialMatch = radioButtons.filter(function(radio) {
        return radio.text && radio.text.includes(value);
      });
      if (partialMatch.length === 1) {
        return partialMatch[0].elem;
      }
      return null;
    };
    SmartPasteButton3.prototype.triggerBeforeChange = function(element2) {
      element2.dispatchEvent(new CustomEvent("beforeinput", {
        bubbles: true,
        detail: {
          fromSmartComponents: true
        }
      }));
    };
    SmartPasteButton3.prototype.triggerAfterChange = function(element2) {
      element2.dispatchEvent(new CustomEvent("input", {
        bubbles: true,
        detail: {
          fromSmartComponents: true
        }
      }));
      element2.dispatchEvent(new CustomEvent("change", {
        bubbles: true,
        detail: {
          fromSmartComponents: true
        }
      }));
    };
    SmartPasteButton3.prototype.updateElementValue = function(element2, value) {
      var isEjsControl = element2.classList.contains("e-control");
      if (element2 instanceof HTMLInputElement && (element2.type === "radio" || element2.type === "checkbox")) {
        var responseValue = value == null ? void 0 : value.toString().toLowerCase();
        var isResponseValue = responseValue === "true" || responseValue === "yes" || responseValue === "on";
        if (element2.checked !== isResponseValue) {
          this.triggerBeforeChange(element2);
          if (isEjsControl) {
            element2["ej2_instances"][0].checked = isResponseValue;
          } else {
            element2.checked = isResponseValue;
          }
          this.triggerAfterChange(element2);
        }
      } else if (element2 instanceof HTMLSelectElement) {
        var optionText_1 = value.toString();
        var index = null;
        var options = Array.from(element2.querySelectorAll("option"));
        var exactMatch = options.filter(function(option) {
          return option.textContent === optionText_1;
        });
        if (exactMatch.length > 0) {
          index = options.indexOf(exactMatch[0]);
        } else {
          var partialMatch = options.filter(function(option) {
            return option.textContent && option.textContent.indexOf(optionText_1) >= 0;
          });
          if (partialMatch.length === 1) {
            index = options.indexOf(partialMatch[0]);
          }
        }
        if (index !== null && element2.selectedIndex !== index) {
          this.triggerBeforeChange(element2);
          if (isEjsControl) {
            element2["ej2_instances"][0].index = index;
          } else {
            element2.selectedIndex = index;
          }
          this.triggerAfterChange(element2);
        }
      } else {
        this.triggerBeforeChange(element2);
        if (element2.classList.contains("e-rating") || element2.classList.contains("e-colorpicker")) {
          element2["ej2_instances"][0].value = value;
        } else {
          element2.value = value;
        }
        this.triggerAfterChange(element2);
      }
      element2.focus();
    };
    SmartPasteButton3.prototype.getFormFields = function(form) {
      var _this = this;
      var fields = [];
      var uniqueCount = 0;
      form.querySelectorAll("input, select, textarea").forEach(function(element2) {
        if (!(element2 instanceof HTMLInputElement || element2 instanceof HTMLSelectElement || element2 instanceof HTMLTextAreaElement)) {
          return;
        }
        if (element2.type === "hidden" || _this.isFieldIgnore(element2)) {
          return;
        }
        var isRadioButton = element2.type === "radio";
        var identifier = isRadioButton ? element2.name : element2.id || element2.name || "unidentified_" + ++uniqueCount;
        if (isRadioButton && fields.find(function(field) {
          return field.fieldName === identifier;
        })) {
          return;
        }
        var FieldDescription = null;
        if (!isRadioButton) {
          FieldDescription = _this.getElementDescription(form, element2);
          if (!FieldDescription) {
            return;
          }
        }
        var fieldInfo = {
          fieldName: element2.name,
          description: FieldDescription,
          element: element2,
          type: element2.type === "checkbox" ? "boolean" : element2.type === "number" ? "number" : "string"
        };
        if (element2 instanceof HTMLSelectElement) {
          var options = Array.from(element2.querySelectorAll("option")).filter(function(option) {
            return option.value;
          });
          fieldInfo.allowedValues = options.map(function(option) {
            return option.textContent;
          });
          fieldInfo.type = "fixed-choices";
        } else if (isRadioButton) {
          fieldInfo.allowedValues = [];
          fieldInfo.type = "fixed-choices";
          Array.from(form.querySelectorAll("input[type=radio]")).forEach(function(radio) {
            if (radio.name === identifier) {
              var radioDescription = _this.getElementDescription(form, radio);
              if (radioDescription) {
                fieldInfo.allowedValues.push(radioDescription);
              }
            }
          });
        }
        fields.push(fieldInfo);
      });
      return fields;
    };
    SmartPasteButton3.prototype.isFieldIgnore = function(element2) {
      return element2.hasAttribute("data-smartpaste-ignore") || element2.hasAttribute("aria-disabled") && element2.getAttribute("aria-disabled") === "true" || element2.hasAttribute("disabled") || element2.hasAttribute("readonly") || element2.hasAttribute("aria-readonly") && element2.getAttribute("aria-readonly") === "true" || element2.hasAttribute("aria-hidden") && element2.getAttribute("aria-hidden") === "true";
    };
    SmartPasteButton3.prototype.getElementDescription = function(form, element2) {
      if (element2.hasAttribute("data-smartpaste-description")) {
        return element2.getAttribute("data-smartpaste-description");
      }
      if ((element2 instanceof HTMLInputElement || element2 instanceof HTMLTextAreaElement) && element2.placeholder) {
        return element2.placeholder;
      }
      var label = form.querySelector('label[for="' + element2.id + '"]');
      if (label) {
        return label.textContent.trim();
      }
      return element2.name || element2.id;
    };
    SmartPasteButton3.prototype.getClipboardContent = function() {
      return __awaiter3(this, void 0, void 0, function() {
        var navigatorObj, customClipboard, error_1;
        return __generator3(this, function(_a) {
          switch (_a.label) {
            case 0:
              navigatorObj = navigator;
              customClipboard = document.getElementById("custom-clipboard");
              if (!(customClipboard && customClipboard.value)) return [3, 1];
              return [2, customClipboard.value];
            case 1:
              if (!(typeof window !== "undefined" && navigatorObj.clipboard && navigatorObj.clipboard.readText)) return [3, 6];
              _a.label = 2;
            case 2:
              _a.trys.push([2, 4, , 5]);
              return [4, navigatorObj.clipboard.readText()];
            case 3:
              return [2, _a.sent()];
            case 4:
              error_1 = _a.sent();
              return [2, "Clipboard access failed"];
            case 5:
              return [3, 7];
            case 6:
              return [2, "Clipboard API not supported"];
            case 7:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    __decorate44([Property3()], SmartPasteButton3.prototype, "aiAssistHandler", void 0);
    return SmartPasteButton3;
  }(Button2)
);

// node_modules/@syncfusion/ej2-lists/src/common/list-base.js
var cssClass = {
  li: "e-list-item",
  ul: "e-list-parent e-ul",
  group: "e-list-group-item",
  icon: "e-list-icon",
  text: "e-list-text",
  check: "e-list-check",
  checked: "e-checked",
  selected: "e-selected",
  expanded: "e-expanded",
  textContent: "e-text-content",
  hasChild: "e-has-child",
  level: "e-level",
  url: "e-list-url",
  collapsible: "e-icon-collapsible",
  disabled: "e-disabled",
  image: "e-list-img",
  iconWrapper: "e-icon-wrapper",
  anchorWrap: "e-anchor-wrap",
  navigable: "e-navigable"
};
var ListBase;
(function(ListBase2) {
  ListBase2.defaultMappedFields = {
    id: "id",
    text: "text",
    url: "url",
    value: "value",
    isChecked: "isChecked",
    enabled: "enabled",
    expanded: "expanded",
    selected: "selected",
    iconCss: "iconCss",
    child: "child",
    isVisible: "isVisible",
    hasChildren: "hasChildren",
    tooltip: "tooltip",
    htmlAttributes: "htmlAttributes",
    urlAttributes: "urlAttributes",
    imageAttributes: "imageAttributes",
    imageUrl: "imageUrl",
    groupBy: null,
    sortBy: null
  };
  var defaultAriaAttributes = {
    level: 1,
    listRole: "presentation",
    itemRole: "presentation",
    groupItemRole: "group",
    itemText: "list-item",
    wrapperRole: "presentation"
  };
  var defaultListBaseOptions = {
    showCheckBox: false,
    showIcon: false,
    enableHtmlSanitizer: false,
    expandCollapse: false,
    fields: ListBase2.defaultMappedFields,
    ariaAttributes: defaultAriaAttributes,
    listClass: "",
    itemClass: "",
    processSubChild: false,
    sortOrder: "None",
    template: null,
    groupTemplate: null,
    headerTemplate: null,
    expandIconClass: "e-icon-collapsible",
    moduleName: "list",
    expandIconPosition: "Right",
    itemNavigable: false
  };
  function createList(createElement4, dataSource, options, isSingleLevel, componentInstance) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var ariaAttributes = extend3({}, defaultAriaAttributes, curOpt.ariaAttributes);
    var type = typeofData(dataSource).typeof;
    if (type === "string" || type === "number") {
      return createListFromArray(createElement4, dataSource, isSingleLevel, options, componentInstance);
    } else {
      return createListFromJson(createElement4, dataSource, options, ariaAttributes.level, isSingleLevel, componentInstance);
    }
  }
  ListBase2.createList = createList;
  function createListFromArray(createElement4, dataSource, isSingleLevel, options, componentInstance) {
    var subChild = createListItemFromArray(createElement4, dataSource, isSingleLevel, options, componentInstance);
    return generateUL(createElement4, subChild, null, options);
  }
  ListBase2.createListFromArray = createListFromArray;
  function createListItemFromArray(createElement4, dataSource, isSingleLevel, options, componentInstance) {
    var subChild = [];
    var curOpt = extend3({}, defaultListBaseOptions, options);
    cssClass = getModuleClass(curOpt.moduleName);
    var id = generateId();
    for (var i = 0; i < dataSource.length; i++) {
      if (isNullOrUndefined3(dataSource[i])) {
        continue;
      }
      var li = void 0;
      if (curOpt.itemCreating && typeof curOpt.itemCreating === "function") {
        var curData = {
          dataSource,
          curData: dataSource[i],
          text: dataSource[i],
          options: curOpt
        };
        curOpt.itemCreating(curData);
      }
      if (isSingleLevel) {
        li = generateSingleLevelLI(createElement4, dataSource[i], void 0, null, null, [], null, id, i, options);
      } else {
        li = generateLI(createElement4, dataSource[i], void 0, null, null, options, componentInstance);
      }
      if (curOpt.itemCreated && typeof curOpt.itemCreated === "function") {
        var curData = {
          dataSource,
          curData: dataSource[i],
          text: dataSource[i],
          item: li,
          options: curOpt
        };
        curOpt.itemCreated(curData);
      }
      subChild.push(li);
    }
    return subChild;
  }
  ListBase2.createListItemFromArray = createListItemFromArray;
  function createListItemFromJson(createElement4, dataSource, options, level, isSingleLevel, componentInstance) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    cssClass = getModuleClass(curOpt.moduleName);
    var fields = componentInstance && (componentInstance.getModuleName() === "listview" || componentInstance.getModuleName() === "multiselect") ? curOpt.fields : extend3({}, ListBase2.defaultMappedFields, curOpt.fields);
    var ariaAttributes = extend3({}, defaultAriaAttributes, curOpt.ariaAttributes);
    var id;
    var checkboxElement = [];
    if (level) {
      ariaAttributes.level = level;
    }
    var child = [];
    var li;
    var anchorElement;
    if (dataSource && dataSource.length && !isNullOrUndefined3(typeofData(dataSource).item) && !Object.prototype.hasOwnProperty.call(typeofData(dataSource).item, fields.id)) {
      id = generateId();
    }
    for (var i = 0; i < dataSource.length; i++) {
      var fieldData = getFieldValues(dataSource[i], fields);
      if (isNullOrUndefined3(dataSource[i])) {
        continue;
      }
      if (curOpt.itemCreating && typeof curOpt.itemCreating === "function") {
        var curData = {
          dataSource,
          curData: dataSource[i],
          text: fieldData[fields.text],
          options: curOpt,
          fields
        };
        curOpt.itemCreating(curData);
      }
      var curItem = dataSource[i];
      if (curOpt.itemCreating && typeof curOpt.itemCreating === "function") {
        fieldData = getFieldValues(dataSource[i], fields);
      }
      if (Object.prototype.hasOwnProperty.call(fieldData, fields.id) && !isNullOrUndefined3(fieldData[fields.id])) {
        id = fieldData[fields.id];
      }
      var innerEle = [];
      if (curOpt.showCheckBox) {
        if (curOpt.itemNavigable && (fieldData[fields.url] || fieldData[fields.urlAttributes])) {
          checkboxElement.push(createElement4("input", {
            className: cssClass.check,
            attrs: {
              type: "checkbox"
            }
          }));
        } else {
          innerEle.push(createElement4("input", {
            className: cssClass.check,
            attrs: {
              type: "checkbox"
            }
          }));
        }
      }
      if (isSingleLevel === true) {
        if (curOpt.showIcon && Object.prototype.hasOwnProperty.call(fieldData, fields.iconCss) && !isNullOrUndefined3(fieldData[fields.iconCss])) {
          innerEle.push(createElement4("span", {
            className: cssClass.icon + " " + fieldData[fields.iconCss]
          }));
        }
        li = generateSingleLevelLI(createElement4, curItem, fieldData, fields, curOpt.itemClass, innerEle, Object.prototype.hasOwnProperty.call(curItem, "isHeader") && curItem.isHeader ? true : false, id, i, options);
        anchorElement = li.querySelector("." + cssClass.anchorWrap);
        if (Object.prototype.hasOwnProperty.call(fieldData, fields.tooltip)) {
          var tooltipText = fieldData[fields.tooltip];
          if (options && options.enableHtmlSanitizer) {
            tooltipText = SanitizeHtmlHelper3.sanitize(tooltipText);
          } else {
            var tooltipTextElement = createElement4("span", {
              innerHTML: tooltipText
            });
            tooltipText = tooltipTextElement.innerText;
            tooltipTextElement = null;
          }
          li.setAttribute("title", tooltipText);
        }
        if (curOpt.itemNavigable && checkboxElement.length) {
          prepend2(checkboxElement, li.firstElementChild);
        }
      } else {
        li = generateLI(createElement4, curItem, fieldData, fields, curOpt.itemClass, options, componentInstance);
        li.classList.add(cssClass.level + "-" + ariaAttributes.level);
        li.setAttribute("aria-level", ariaAttributes.level.toString());
        if (ariaAttributes.groupItemRole === "presentation" || ariaAttributes.itemRole === "presentation") {
          li.removeAttribute("aria-level");
        }
        anchorElement = li.querySelector("." + cssClass.anchorWrap);
        if (Object.prototype.hasOwnProperty.call(fieldData, fields.tooltip)) {
          var tooltipText = fieldData[fields.tooltip];
          if (options && options.enableHtmlSanitizer) {
            tooltipText = SanitizeHtmlHelper3.sanitize(tooltipText);
          } else {
            var tooltipTextElement = createElement4("span", {
              innerHTML: tooltipText
            });
            tooltipText = tooltipTextElement.innerText;
            tooltipTextElement = null;
          }
          li.setAttribute("title", tooltipText);
        }
        if (Object.prototype.hasOwnProperty.call(fieldData, fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {
          var htmlAttributes = fieldData[fields.htmlAttributes];
          if ("class" in htmlAttributes && typeof htmlAttributes["class"] === "string" && htmlAttributes["class"].trim() === "") {
            delete htmlAttributes["class"];
          }
          setAttribute(li, htmlAttributes);
        }
        if (Object.prototype.hasOwnProperty.call(fieldData, fields.enabled) && fieldData[fields.enabled] === false) {
          li.classList.add(cssClass.disabled);
        }
        if (Object.prototype.hasOwnProperty.call(fieldData, fields.isVisible) && fieldData[fields.isVisible] === false) {
          li.style.display = "none";
        }
        if (Object.prototype.hasOwnProperty.call(fieldData, fields.imageUrl) && !isNullOrUndefined3(fieldData[fields.imageUrl]) && !curOpt.template) {
          var attr = {
            src: fieldData[fields.imageUrl],
            alt: !isNullOrUndefined3(fieldData.name) ? "Displaying " + fieldData.name + " Image" : "Displaying Image"
          };
          merge3(attr, fieldData[fields.imageAttributes]);
          var imageElemnt = createElement4("img", {
            className: cssClass.image,
            attrs: attr
          });
          if (anchorElement) {
            anchorElement.insertAdjacentElement("afterbegin", imageElemnt);
          } else {
            prepend2([imageElemnt], li.firstElementChild);
          }
        }
        if (curOpt.showIcon && Object.prototype.hasOwnProperty.call(fieldData, fields.iconCss) && !isNullOrUndefined3(fieldData[fields.iconCss]) && !curOpt.template) {
          var iconElement = createElement4("div", {
            className: cssClass.icon + " " + fieldData[fields.iconCss]
          });
          if (anchorElement) {
            anchorElement.insertAdjacentElement("afterbegin", iconElement);
          } else {
            prepend2([iconElement], li.firstElementChild);
          }
        }
        if (innerEle.length) {
          prepend2(innerEle, li.firstElementChild);
        }
        if (curOpt.itemNavigable && checkboxElement.length) {
          prepend2(checkboxElement, li.firstElementChild);
        }
        processSubChild(createElement4, fieldData, fields, dataSource, curOpt, li, ariaAttributes.level);
      }
      if (anchorElement) {
        addClass3([li], [cssClass.navigable]);
      }
      if (curOpt.itemCreated && typeof curOpt.itemCreated === "function") {
        var curData = {
          dataSource,
          curData: dataSource[i],
          text: fieldData[fields.text],
          item: li,
          options: curOpt,
          fields
        };
        curOpt.itemCreated(curData);
      }
      checkboxElement = [];
      child.push(li);
    }
    return child;
  }
  ListBase2.createListItemFromJson = createListItemFromJson;
  function createListFromJson(createElement4, dataSource, options, level, isSingleLevel, componentInstance) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var li = createListItemFromJson(createElement4, dataSource, options, level, isSingleLevel, componentInstance);
    return generateUL(createElement4, li, curOpt.listClass, options);
  }
  ListBase2.createListFromJson = createListFromJson;
  function getSiblingLI(elementArray, element2, isPrevious) {
    cssClass = getModuleClass(defaultListBaseOptions.moduleName);
    if (!elementArray || !elementArray.length) {
      return void 0;
    }
    var siblingLI;
    var liIndex;
    var liCollections = Array.prototype.slice.call(elementArray);
    if (element2) {
      liIndex = indexOf(element2, liCollections);
    } else {
      liIndex = isPrevious === true ? liCollections.length : -1;
    }
    siblingLI = liCollections[liIndex + (isPrevious === true ? -1 : 1)];
    while (siblingLI && (!isVisible3(siblingLI) || siblingLI.classList.contains(cssClass.disabled))) {
      liIndex = liIndex + (isPrevious === true ? -1 : 1);
      siblingLI = liCollections[liIndex];
    }
    return siblingLI;
  }
  ListBase2.getSiblingLI = getSiblingLI;
  function indexOf(item, elementArray) {
    if (!elementArray || !item) {
      return void 0;
    } else {
      var liCollections = elementArray;
      liCollections = Array.prototype.slice.call(elementArray);
      return liCollections.indexOf(item);
    }
  }
  ListBase2.indexOf = indexOf;
  function groupDataSource(dataSource, fields, sortOrder) {
    if (sortOrder === void 0) {
      sortOrder = "None";
    }
    var curFields = extend3({}, ListBase2.defaultMappedFields, fields);
    var cusQuery = new Query2().group(curFields.groupBy);
    cusQuery = addSorting(sortOrder, "key", cusQuery);
    var ds = getDataSource(dataSource, cusQuery);
    dataSource = [];
    for (var j = 0; j < ds.length; j++) {
      var itemObj = ds[j].items;
      var grpItem = {};
      var hdr = "isHeader";
      grpItem[curFields.text] = ds[j].key;
      grpItem["" + hdr] = true;
      var newtext = curFields.text;
      if (newtext === "id") {
        newtext = "text";
        grpItem["" + newtext] = ds[j].key;
      }
      grpItem._id = "group-list-item-" + (ds[j].key ? ds[j].key.toString().trim() : "undefined");
      grpItem.items = itemObj;
      dataSource.push(grpItem);
      for (var k = 0; k < itemObj.length; k++) {
        dataSource.push(itemObj[k]);
      }
    }
    return dataSource;
  }
  ListBase2.groupDataSource = groupDataSource;
  function addSorting(sortOrder, sortBy, query) {
    if (query === void 0) {
      query = new Query2();
    }
    if (sortOrder === "Ascending") {
      query.sortBy(sortBy, "ascending", true);
    } else if (sortOrder === "Descending") {
      query.sortBy(sortBy, "descending", true);
    } else {
      for (var i = 0; i < query.queries.length; i++) {
        if (query.queries[i].fn === "onSortBy") {
          query.queries.splice(i, 1);
        }
      }
    }
    return query;
  }
  ListBase2.addSorting = addSorting;
  function getDataSource(dataSource, query) {
    return new DataManager2(dataSource).executeLocal(query);
  }
  ListBase2.getDataSource = getDataSource;
  function createJsonFromElement(element2, options) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var fields = extend3({}, ListBase2.defaultMappedFields, curOpt.fields);
    var curEle = element2.cloneNode(true);
    var jsonAr = [];
    curEle.classList.add("json-parent");
    var childs = curEle.querySelectorAll(".json-parent>li");
    curEle.classList.remove("json-parent");
    for (var i = 0; i < childs.length; i++) {
      var li = childs[i];
      var anchor = li.querySelector("a");
      var ul = li.querySelector("ul");
      var json = {};
      var childNodes = anchor ? anchor.childNodes : li.childNodes;
      var keys4 = Object.keys(childNodes);
      for (var i_1 = 0; i_1 < childNodes.length; i_1++) {
        if (!childNodes[Number(keys4[i_1])].hasChildNodes()) {
          json[fields.text] = childNodes[Number(keys4[i_1])].textContent;
        }
      }
      var attributes_1 = getAllAttributes(li);
      if (attributes_1.id) {
        json[fields.id] = attributes_1.id;
        delete attributes_1.id;
      } else {
        json[fields.id] = generateId();
      }
      if (Object.keys(attributes_1).length) {
        json[fields.htmlAttributes] = attributes_1;
      }
      if (anchor) {
        attributes_1 = getAllAttributes(anchor);
        if (Object.keys(attributes_1).length) {
          json[fields.urlAttributes] = attributes_1;
        }
      }
      if (ul) {
        json[fields.child] = createJsonFromElement(ul, options);
      }
      jsonAr.push(json);
    }
    return jsonAr;
  }
  ListBase2.createJsonFromElement = createJsonFromElement;
  function typeofData(data) {
    var match = {
      typeof: null,
      item: null
    };
    for (var i = 0; i < data.length; i++) {
      if (!isNullOrUndefined3(data[i])) {
        return match = {
          typeof: typeof data[i],
          item: data[i]
        };
      }
    }
    return match;
  }
  function setAttribute(element2, elementAttributes) {
    var attr = {};
    merge3(attr, elementAttributes);
    if (attr.class) {
      addClass3([element2], attr.class.split(" "));
      delete attr.class;
    }
    attributes3(element2, attr);
  }
  function getAllAttributes(element2) {
    var attributes4 = {};
    var attr = element2.attributes;
    for (var index = 0; index < attr.length; index++) {
      attributes4[attr[index].nodeName] = attr[index].nodeValue;
    }
    return attributes4;
  }
  function renderContentTemplate(createElement4, template, dataSource, fields, options, componentInstance) {
    cssClass = getModuleClass(defaultListBaseOptions.moduleName);
    var ulElement = createElement4("ul", {
      className: cssClass.ul,
      attrs: {
        role: "presentation"
      }
    });
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var curFields = extend3({}, ListBase2.defaultMappedFields, fields);
    var compiledString = compileTemplate(template);
    var liCollection = [];
    var value;
    var id = generateId();
    for (var i = 0; i < dataSource.length; i++) {
      var fieldData = getFieldValues(dataSource[i], curFields);
      var curItem = dataSource[i];
      var isHeader = curItem.isHeader;
      if (typeof dataSource[i] === "string" || typeof dataSource[i] === "number") {
        value = curItem;
      } else {
        value = fieldData[curFields.value];
      }
      if (curOpt.itemCreating && typeof curOpt.itemCreating === "function") {
        var curData = {
          dataSource,
          curData: curItem,
          text: value,
          options: curOpt,
          fields: curFields
        };
        curOpt.itemCreating(curData);
      }
      if (curOpt.itemCreating && typeof curOpt.itemCreating === "function") {
        fieldData = getFieldValues(dataSource[i], curFields);
        if (typeof dataSource[i] === "string" || typeof dataSource[i] === "number") {
          value = curItem;
        } else {
          value = fieldData[curFields.value];
        }
      }
      var li = createElement4("li", {
        id: id + "-" + i,
        className: isHeader ? cssClass.group : cssClass.li,
        attrs: {
          role: "presentation"
        }
      });
      if (isHeader) {
        if (typeof dataSource[i] === "string" || typeof dataSource[i] === "number") {
          li.innerText = curItem;
        } else {
          li.innerText = fieldData[curFields.text];
        }
      } else {
        var currentID = isHeader ? curOpt.groupTemplateID : curOpt.templateID;
        if (isHeader) {
          if (componentInstance && componentInstance.getModuleName() !== "listview") {
            var compiledElement = compiledString(curItem, componentInstance, "headerTemplate", currentID, !!curOpt.isStringTemplate, null, li);
            if (compiledElement) {
              append2(compiledElement, li);
            }
          } else {
            append2(compiledString(curItem, componentInstance, "headerTemplate", currentID, !!curOpt.isStringTemplate), li);
          }
        } else {
          if (componentInstance && componentInstance.getModuleName() !== "listview") {
            var compiledElement = compiledString(curItem, componentInstance, "template", currentID, !!curOpt.isStringTemplate, null, li);
            if (compiledElement) {
              append2(compiledElement, li);
            }
          } else {
            append2(compiledString(curItem, componentInstance, "template", currentID, !!curOpt.isStringTemplate), li);
          }
        }
        li.setAttribute("data-value", isNullOrUndefined3(value) ? "null" : value);
        li.setAttribute("role", "option");
      }
      if (curOpt.itemCreated && typeof curOpt.itemCreated === "function") {
        var curData = {
          dataSource,
          curData: curItem,
          text: value,
          item: li,
          options: curOpt,
          fields: curFields
        };
        curOpt.itemCreated(curData);
      }
      liCollection.push(li);
    }
    append2(liCollection, ulElement);
    return ulElement;
  }
  ListBase2.renderContentTemplate = renderContentTemplate;
  function renderGroupTemplate(groupTemplate, groupDataSource2, fields, headerItems, options, componentInstance) {
    var compiledString = compileTemplate(groupTemplate);
    var curFields = extend3({}, ListBase2.defaultMappedFields, fields);
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var category = curFields.groupBy;
    for (var _i = 0, headerItems_1 = headerItems; _i < headerItems_1.length; _i++) {
      var header = headerItems_1[_i];
      var headerData = {};
      headerData["" + category] = header.textContent;
      header.innerHTML = "";
      if (componentInstance && componentInstance.getModuleName() !== "listview") {
        var compiledElement = compiledString(headerData, componentInstance, "groupTemplate", curOpt.groupTemplateID, !!curOpt.isStringTemplate, null, header);
        if (compiledElement) {
          append2(compiledElement, header);
        }
      } else {
        append2(compiledString(headerData, componentInstance, "groupTemplate", curOpt.groupTemplateID, !!curOpt.isStringTemplate), header);
      }
    }
    return headerItems;
  }
  ListBase2.renderGroupTemplate = renderGroupTemplate;
  function generateId() {
    return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
  }
  ListBase2.generateId = generateId;
  function processSubChild(createElement4, fieldData, fields, ds, options, element2, level) {
    var subDS = fieldData[fields.child] || [];
    var hasChildren = fieldData[fields.hasChildren];
    if (subDS.length) {
      hasChildren = true;
      element2.classList.add(cssClass.hasChild);
      if (options.processSubChild) {
        var subLi = createListFromJson(createElement4, subDS, options, ++level);
        element2.appendChild(subLi);
      }
    }
    if (!!options.expandCollapse && hasChildren && !options.template) {
      element2.firstElementChild.classList.add(cssClass.iconWrapper);
      var expandElement = options.expandIconPosition === "Left" ? prepend2 : append2;
      expandElement([createElement4("div", {
        className: "e-icons " + options.expandIconClass
      })], element2.querySelector("." + cssClass.textContent));
    }
  }
  function generateSingleLevelLI(createElement4, item, fieldData, fields, className, innerElements, grpLI, id, index, options) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var ariaAttributes = extend3({}, defaultAriaAttributes, curOpt.ariaAttributes);
    var text = item;
    var value = item;
    var dataSource;
    if (typeof item !== "string" && typeof item !== "number" && typeof item !== "boolean") {
      dataSource = item;
      text = typeof fieldData[fields.text] === "boolean" || typeof fieldData[fields.text] === "number" ? fieldData[fields.text] : fieldData[fields.text] || "";
      value = fieldData[fields.value];
    }
    var elementID;
    if (!isNullOrUndefined3(dataSource) && !isNullOrUndefined3(fieldData[fields.id]) && fieldData[fields.id] !== "") {
      elementID = id;
    } else {
      elementID = id + "-" + index;
    }
    var li = createElement4("li", {
      className: (grpLI === true ? cssClass.group : cssClass.li) + " " + (isNullOrUndefined3(className) ? "" : className),
      id: elementID,
      attrs: ariaAttributes.groupItemRole !== "" && ariaAttributes.itemRole !== "" ? {
        role: grpLI === true ? ariaAttributes.groupItemRole : ariaAttributes.itemRole
      } : {}
    });
    if (dataSource && Object.prototype.hasOwnProperty.call(fieldData, fields.enabled) && fieldData[fields.enabled].toString() === "false") {
      li.classList.add(cssClass.disabled);
    }
    if (options && options.enableHtmlSanitizer) {
      text = SanitizeHtmlHelper3.sanitize(text);
    }
    if (grpLI) {
      li.innerText = text;
    } else {
      li.setAttribute("data-value", isNullOrUndefined3(value) ? "null" : value);
      li.setAttribute("role", "option");
      if (dataSource && Object.prototype.hasOwnProperty.call(fieldData, fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {
        setAttribute(li, fieldData[fields.htmlAttributes]);
      }
      if (innerElements.length && !curOpt.itemNavigable) {
        append2(innerElements, li);
      }
      if (dataSource && (fieldData[fields.url] || fieldData[fields.urlAttributes] && fieldData[fields.urlAttributes].href)) {
        li.appendChild(anchorTag(createElement4, dataSource, fields, text, innerElements, curOpt.itemNavigable));
      } else {
        if (innerElements.length && curOpt.itemNavigable) {
          append2(innerElements, li);
        }
        li.appendChild(document.createTextNode(text));
      }
    }
    return li;
  }
  function getModuleClass(moduleName) {
    var moduleClass;
    return moduleClass = {
      li: "e-" + moduleName + "-item",
      ul: "e-" + moduleName + "-parent e-ul",
      group: "e-" + moduleName + "-group-item",
      icon: "e-" + moduleName + "-icon",
      text: "e-" + moduleName + "-text",
      check: "e-" + moduleName + "-check",
      checked: "e-checked",
      selected: "e-selected",
      expanded: "e-expanded",
      textContent: "e-text-content",
      hasChild: "e-has-child",
      level: "e-level",
      url: "e-" + moduleName + "-url",
      collapsible: "e-icon-collapsible",
      disabled: "e-disabled",
      image: "e-" + moduleName + "-img",
      iconWrapper: "e-icon-wrapper",
      anchorWrap: "e-anchor-wrap",
      navigable: "e-navigable"
    };
  }
  function anchorTag(createElement4, dataSource, fields, text, innerElements, isFullNavigation) {
    var fieldData = getFieldValues(dataSource, fields);
    var attr = {
      href: fieldData[fields.url]
    };
    if (Object.prototype.hasOwnProperty.call(fieldData, fields.urlAttributes) && fieldData[fields.urlAttributes]) {
      merge3(attr, fieldData[fields.urlAttributes]);
      attr.href = fieldData[fields.url] ? fieldData[fields.url] : fieldData[fields.urlAttributes].href;
    }
    var anchorTag2;
    if (!isFullNavigation) {
      anchorTag2 = createElement4("a", {
        className: cssClass.text + " " + cssClass.url,
        innerHTML: text
      });
    } else {
      anchorTag2 = createElement4("a", {
        className: cssClass.text + " " + cssClass.url
      });
      var anchorWrapper = createElement4("div", {
        className: cssClass.anchorWrap
      });
      if (innerElements && innerElements.length) {
        append2(innerElements, anchorWrapper);
      }
      anchorWrapper.appendChild(document.createTextNode(text));
      append2([anchorWrapper], anchorTag2);
    }
    setAttribute(anchorTag2, attr);
    return anchorTag2;
  }
  function generateLI(createElement4, item, fieldData, fields, className, options, componentInstance) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var ariaAttributes = extend3({}, defaultAriaAttributes, curOpt.ariaAttributes);
    var text = item;
    var uID;
    var grpLI;
    var dataSource;
    if (typeof item !== "string" && typeof item !== "number") {
      dataSource = item;
      text = fieldData[fields.text] || "";
      uID = isNullOrUndefined3(fieldData["_id"]) ? fieldData[fields.id] : fieldData["_id"];
      grpLI = Object.prototype.hasOwnProperty.call(item, "isHeader") && item.isHeader ? true : false;
    }
    if (options && options.enableHtmlSanitizer) {
      text = SanitizeHtmlHelper3.sanitize(text);
    }
    var li = createElement4("li", {
      className: (grpLI === true ? cssClass.group : cssClass.li) + " " + (isNullOrUndefined3(className) ? "" : className),
      attrs: ariaAttributes.groupItemRole !== "" && ariaAttributes.itemRole !== "" ? {
        role: grpLI === true ? ariaAttributes.groupItemRole : ariaAttributes.itemRole
      } : {}
    });
    if (!isNullOrUndefined3(uID) === true) {
      li.setAttribute("data-uid", uID);
    } else {
      li.setAttribute("data-uid", generateId());
    }
    if (grpLI && options && options.groupTemplate) {
      var compiledString = compileTemplate(options.groupTemplate);
      if (componentInstance && componentInstance.getModuleName() !== "listview") {
        var compiledElement = compiledString(item, componentInstance, "groupTemplate", curOpt.groupTemplateID, !!curOpt.isStringTemplate, null, li);
        if (compiledElement) {
          append2(compiledElement, li);
        }
      } else {
        append2(compiledString(item, componentInstance, "groupTemplate", curOpt.groupTemplateID, !!curOpt.isStringTemplate), li);
      }
    } else if (!grpLI && options && options.template) {
      var compiledString = compileTemplate(options.template);
      if (componentInstance && componentInstance.getModuleName() !== "listview") {
        var compiledElement = compiledString(item, componentInstance, "template", curOpt.templateID, !!curOpt.isStringTemplate, null, li);
        if (compiledElement) {
          append2(compiledElement, li);
        }
      } else {
        append2(compiledString(item, componentInstance, "template", curOpt.templateID, !!curOpt.isStringTemplate), li);
      }
    } else {
      var innerDiv = createElement4("div", {
        className: cssClass.textContent,
        attrs: ariaAttributes.wrapperRole !== "" ? {
          role: ariaAttributes.wrapperRole
        } : {}
      });
      if (dataSource && (fieldData[fields.url] || fieldData[fields.urlAttributes] && fieldData[fields.urlAttributes].href)) {
        innerDiv.appendChild(anchorTag(createElement4, dataSource, fields, text, null, curOpt.itemNavigable));
      } else {
        var element2 = createElement4("span", {
          className: cssClass.text,
          attrs: ariaAttributes.itemText !== "" ? {
            role: ariaAttributes.itemText
          } : {}
        });
        if (options && options.enableHtmlSanitizer) {
          element2.innerText = text;
        } else {
          element2.innerHTML = text;
        }
        innerDiv.appendChild(element2);
      }
      li.appendChild(innerDiv);
    }
    return li;
  }
  function generateUL(createElement4, liElement, className, options) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    var ariaAttributes = extend3({}, defaultAriaAttributes, curOpt.ariaAttributes);
    cssClass = getModuleClass(curOpt.moduleName);
    var ulElement = createElement4("ul", {
      className: cssClass.ul + " " + (isNullOrUndefined3(className) ? "" : className),
      attrs: ariaAttributes.listRole !== "" ? {
        role: ariaAttributes.listRole
      } : {}
    });
    append2(liElement, ulElement);
    return ulElement;
  }
  ListBase2.generateUL = generateUL;
  function generateIcon(createElement4, liElement, className, options) {
    var curOpt = extend3({}, defaultListBaseOptions, options);
    cssClass = getModuleClass(curOpt.moduleName);
    var expandElement = curOpt.expandIconPosition === "Left" ? prepend2 : append2;
    expandElement([createElement4("div", {
      className: "e-icons " + curOpt.expandIconClass + " " + (isNullOrUndefined3(className) ? "" : className)
    })], liElement.querySelector("." + cssClass.textContent));
    return liElement;
  }
  ListBase2.generateIcon = generateIcon;
})(ListBase || (ListBase = {}));
function getFieldValues(dataItem, fields) {
  var fieldData = {};
  if (isNullOrUndefined3(dataItem) || typeof dataItem === "string" || typeof dataItem === "number" || !isNullOrUndefined3(dataItem.isHeader)) {
    return dataItem;
  } else {
    for (var _i = 0, _a = Object.keys(fields); _i < _a.length; _i++) {
      var field = _a[_i];
      var dataField = fields["" + field];
      var value = !isNullOrUndefined3(dataField) && typeof dataField === "string" ? getValue3(dataField, dataItem) : void 0;
      if (!isNullOrUndefined3(value)) {
        fieldData["" + dataField] = value;
      }
    }
  }
  return fieldData;
}
function compileTemplate(template) {
  if (template) {
    try {
      if (typeof template !== "function" && document.querySelector(template)) {
        return compile6(document.querySelector(template).innerHTML.trim());
      } else {
        return compile6(template);
      }
    } catch (e) {
      return compile6(template);
    }
  }
  return void 0;
}

// node_modules/@syncfusion/ej2-lists/src/list-view/list-view.js
var __extends46 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate45 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var effectsConfig = {
  "None": [],
  "SlideLeft": ["SlideRightOut", "SlideLeftOut", "SlideLeftIn", "SlideRightIn"],
  "SlideDown": ["SlideTopOut", "SlideBottomOut", "SlideBottomIn", "SlideTopIn"],
  "Zoom": ["FadeOut", "FadeZoomOut", "FadeZoomIn", "FadeIn"],
  "Fade": ["FadeOut", "FadeOut", "FadeIn", "FadeIn"]
};
var effectsRTLConfig = {
  "None": [],
  "SlideLeft": ["SlideLeftOut", "SlideRightOut", "SlideRightIn", "SlideLeftIn"],
  "SlideDown": ["SlideBottomOut", "SlideTopOut", "SlideTopIn", "SlideBottomIn"],
  "Zoom": ["FadeZoomOut", "FadeOut", "FadeIn", "FadeZoomIn"],
  "Fade": ["FadeOut", "FadeOut", "FadeIn", "FadeIn"]
};
var classNames3 = {
  root: "e-listview",
  hover: "e-hover",
  selected: "e-active",
  focused: "e-focused",
  parentItem: "e-list-parent",
  listItem: "e-list-item",
  listIcon: "e-list-icon",
  textContent: "e-text-content",
  listItemText: "e-list-text",
  groupListItem: "e-list-group-item",
  hasChild: "e-has-child",
  view: "e-view",
  header: "e-list-header",
  headerText: "e-headertext",
  headerTemplateText: "e-headertemplate-text",
  text: "e-text",
  disable: "e-disabled",
  container: "e-list-container",
  icon: "e-icons",
  backIcon: "e-icon-back",
  backButton: "e-back-button",
  checkboxWrapper: "e-checkbox-wrapper",
  checkbox: "e-checkbox",
  checked: "e-check",
  checklist: "e-checklist",
  checkboxIcon: "e-frame",
  checkboxRight: "e-checkbox-right",
  checkboxLeft: "e-checkbox-left",
  listviewCheckbox: "e-listview-checkbox",
  itemCheckList: "e-checklist",
  virtualElementContainer: "e-list-virtualcontainer"
};
var LISTVIEW_TEMPLATE_PROPERTY = "Template";
var LISTVIEW_GROUPTEMPLATE_PROPERTY = "GroupTemplate";
var LISTVIEW_HEADERTEMPLATE_PROPERTY = "HeaderTemplate";
var swipeVelocity = 0.5;
var FieldSettings = (
  /** @class */
  function(_super) {
    __extends46(FieldSettings4, _super);
    function FieldSettings4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate45([Property3("id")], FieldSettings4.prototype, "id", void 0);
    __decorate45([Property3("text")], FieldSettings4.prototype, "text", void 0);
    __decorate45([Property3("isChecked")], FieldSettings4.prototype, "isChecked", void 0);
    __decorate45([Property3("isVisible")], FieldSettings4.prototype, "isVisible", void 0);
    __decorate45([Property3("enabled")], FieldSettings4.prototype, "enabled", void 0);
    __decorate45([Property3("iconCss")], FieldSettings4.prototype, "iconCss", void 0);
    __decorate45([Property3("child")], FieldSettings4.prototype, "child", void 0);
    __decorate45([Property3("tooltip")], FieldSettings4.prototype, "tooltip", void 0);
    __decorate45([Property3("groupBy")], FieldSettings4.prototype, "groupBy", void 0);
    __decorate45([Property3("text")], FieldSettings4.prototype, "sortBy", void 0);
    __decorate45([Property3("htmlAttributes")], FieldSettings4.prototype, "htmlAttributes", void 0);
    __decorate45([Property3("tableName")], FieldSettings4.prototype, "tableName", void 0);
    return FieldSettings4;
  }(ChildProperty3)
);
var ListView = (
  /** @class */
  function(_super) {
    __extends46(ListView2, _super);
    function ListView2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.previousSelectedItems = [];
      _this.hiddenItems = [];
      _this.enabledItems = [];
      _this.disabledItems = [];
      return _this;
    }
    ListView2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "htmlAttributes":
            this.setHTMLAttribute();
            break;
          case "cssClass":
            this.setCSSClass(oldProp.cssClass);
            break;
          case "enable":
            this.setEnable();
            break;
          case "width":
          case "height":
            this.setSize();
            break;
          case "enableRtl":
            this.setEnableRTL();
            break;
          case "fields":
            this.listBaseOption.fields = this.fields.properties;
            if (this.enableVirtualization) {
              this.virtualizationModule.reRenderUiVirtualization();
            } else {
              this.reRender();
            }
            break;
          case "headerTitle":
            if (!this.curDSLevel.length) {
              this.header(this.headerTitle, false, "header");
            }
            break;
          case "query":
            if (this.enableVirtualization) {
              this.virtualizationModule.reRenderUiVirtualization();
            } else {
              this.reRender();
            }
            break;
          case "showHeader":
            this.header(this.headerTitle, false, "header");
            break;
          case "enableVirtualization":
            if (!isNullOrUndefined3(this.contentContainer)) {
              detach3(this.contentContainer);
            }
            this.refresh();
            break;
          case "showCheckBox":
          case "checkBoxPosition":
            if (this.enableVirtualization) {
              this.virtualizationModule.reRenderUiVirtualization();
            } else {
              this.setCheckbox();
            }
            break;
          case "dataSource":
            this.previousScrollTop = this.element.scrollTop;
            if (this.enableVirtualization) {
              this.virtualizationModule.reRenderUiVirtualization();
            } else {
              this.reRender();
            }
            break;
          case "sortOrder":
          case "template":
            if (!this.enableVirtualization) {
              this.refresh();
            }
            break;
          case "showIcon":
            if (this.enableVirtualization) {
              this.virtualizationModule.reRenderUiVirtualization();
            } else {
              this.listBaseOption.showIcon = this.showIcon;
              this.curViewDS = this.getSubDS();
              this.resetCurrentList();
            }
            break;
          default:
            break;
        }
      }
    };
    ListView2.prototype.setHTMLAttribute = function() {
      if (!isNullOrUndefined3(this.htmlAttributes) && Object.keys(this.htmlAttributes).length) {
        attributes3(this.element, this.htmlAttributes);
      }
    };
    ListView2.prototype.setCSSClass = function(oldCSSClass) {
      if (this.cssClass) {
        addClass3([this.element], this.cssClass.split(" ").filter(function(css) {
          return css;
        }));
      }
      if (oldCSSClass) {
        removeClass3([this.element], oldCSSClass.split(" ").filter(function(css) {
          return css;
        }));
      }
    };
    ListView2.prototype.setSize = function() {
      this.element.style.height = formatUnit2(this.height);
      this.element.style.width = formatUnit2(this.width);
      this.isWindow = this.element.clientHeight ? false : true;
    };
    ListView2.prototype.setEnable = function() {
      this.enableElement(this.element, this.enable);
    };
    ListView2.prototype.setEnableRTL = function() {
      if (this.enableRtl) {
        this.element.classList.add("e-rtl");
      } else {
        this.element.classList.remove("e-rtl");
      }
    };
    ListView2.prototype.enableElement = function(element2, isEnabled) {
      if (isEnabled) {
        element2.classList.remove(classNames3.disable);
      } else {
        element2.classList.add(classNames3.disable);
      }
    };
    ListView2.prototype.header = function(text, showBack, prop) {
      if (this.headerEle === void 0 && this.showHeader) {
        this.headerEle = this.createElement("div", {
          className: classNames3.header
        });
        var innerHeaderEle = this.createElement("span", {
          className: classNames3.headerText
        });
        if (this.enableHtmlSanitizer) {
          this.setProperties({
            headerTitle: SanitizeHtmlHelper3.sanitize(this.headerTitle)
          }, true);
          innerHeaderEle.innerText = this.headerTitle;
        } else {
          innerHeaderEle.innerHTML = this.headerTitle;
        }
        var textEle = this.createElement("div", {
          className: classNames3.text,
          innerHTML: innerHeaderEle.outerHTML
        });
        var hedBackButton = this.createElement("div", {
          className: classNames3.icon + " " + classNames3.backIcon + " " + classNames3.backButton,
          attrs: {
            style: "display:none;"
          }
        });
        this.headerEle.appendChild(hedBackButton);
        this.headerEle.appendChild(textEle);
        if (this.headerTemplate) {
          var compiledString = compile6(this.headerTemplate);
          var headerTemplateEle = this.createElement("div", {
            className: classNames3.headerTemplateText
          });
          var compiledElement = compiledString({}, this, prop, this.LISTVIEW_HEADERTEMPLATE_ID, null, null, this.headerEle);
          if (compiledElement) {
            append2(compiledElement, headerTemplateEle);
          }
          append2([headerTemplateEle], this.headerEle);
          if (this.isReact) {
            this.renderReactTemplates();
          }
        }
        if (this.headerTemplate && this.headerTitle) {
          textEle.classList.add("header");
        }
        this.element.classList.add("e-has-header");
        prepend2([this.headerEle], this.element);
      } else if (this.headerEle) {
        if (this.showHeader) {
          this.headerEle.style.display = "";
          var textEle = this.headerEle.querySelector("." + classNames3.headerText);
          var hedBackButton = this.headerEle.querySelector("." + classNames3.backIcon);
          if (this.enableHtmlSanitizer) {
            text = SanitizeHtmlHelper3.sanitize(text);
          }
          textEle.innerHTML = text;
          if (this.headerTemplate && showBack) {
            textEle.parentElement.classList.remove("header");
            this.headerEle.querySelector("." + classNames3.headerTemplateText).classList.add("nested-header");
          }
          if (this.headerTemplate && !showBack) {
            textEle.parentElement.classList.add("header");
            this.headerEle.querySelector("." + classNames3.headerTemplateText).classList.remove("nested-header");
            this.headerEle.querySelector("." + classNames3.headerTemplateText).classList.add("header");
          }
          if (showBack === true) {
            hedBackButton.style.display = "";
          } else {
            hedBackButton.style.display = "none";
          }
        } else {
          this.headerEle.style.display = "none";
        }
      }
    };
    ListView2.prototype.switchView = function(fromView, toView, reverse) {
      var _this = this;
      if (fromView && toView) {
        var fPos_1 = fromView.style.position;
        var overflow_1 = this.element.style.overflow !== "hidden" ? this.element.style.overflow : "";
        fromView.style.position = "absolute";
        fromView.classList.add("e-view");
        var anim = void 0;
        var duration = this.animation.duration;
        if (this.animation.effect) {
          anim = this.enableRtl ? effectsRTLConfig[this.animation.effect] : effectsConfig[this.animation.effect];
        } else {
          var slideLeft = "SlideLeft";
          anim = effectsConfig["" + slideLeft];
          reverse = this.enableRtl;
          duration = 0;
        }
        this.element.style.overflow = "hidden";
        this.aniObj.animate(fromView, {
          name: reverse === true ? anim[0] : anim[1],
          duration: duration === 0 && animationMode3 === "Enable" ? 400 : duration,
          timingFunction: this.animation.easing,
          end: function() {
            fromView.style.display = "none";
            _this.element.style.overflow = overflow_1;
            fromView.style.position = fPos_1;
            fromView.classList.remove("e-view");
          }
        });
        toView.style.display = "";
        this.aniObj.animate(toView, {
          name: reverse === true ? anim[2] : anim[3],
          duration: duration === 0 && animationMode3 === "Enable" ? 400 : duration,
          timingFunction: this.animation.easing,
          end: function() {
            _this.trigger("actionComplete");
          }
        });
        this.curUL = toView;
      }
    };
    ListView2.prototype.preRender = function() {
      if (this.template) {
        try {
          if (typeof this.template !== "function" && document.querySelectorAll(this.template).length) {
            this.setProperties({
              template: document.querySelector(this.template).innerHTML.trim()
            }, true);
          }
        } catch (e) {
          compile6(this.template);
        }
      }
      this.listBaseOption = {
        template: this.template,
        headerTemplate: this.headerTemplate,
        groupTemplate: this.groupTemplate,
        expandCollapse: true,
        listClass: "",
        ariaAttributes: {
          itemRole: "listitem",
          listRole: "list",
          itemText: "",
          groupItemRole: "presentation",
          wrapperRole: "presentation"
        },
        fields: this.fields.properties,
        sortOrder: this.sortOrder,
        showIcon: this.showIcon,
        itemCreated: this.renderCheckbox.bind(this),
        templateID: "" + this.element.id + LISTVIEW_TEMPLATE_PROPERTY,
        groupTemplateID: "" + this.element.id + LISTVIEW_GROUPTEMPLATE_PROPERTY,
        enableHtmlSanitizer: this.enableHtmlSanitizer
      };
      this.initialization();
    };
    ListView2.prototype.initialization = function() {
      this.curDSLevel = [];
      this.animateOptions = {};
      this.curViewDS = [];
      this.currentLiElements = [];
      this.isNestedList = false;
      this.selectedData = [];
      this.selectedId = this.enablePersistence ? this.selectedId : [];
      this.LISTVIEW_TEMPLATE_ID = "" + this.element.id + LISTVIEW_TEMPLATE_PROPERTY;
      this.LISTVIEW_GROUPTEMPLATE_ID = "" + this.element.id + LISTVIEW_GROUPTEMPLATE_PROPERTY;
      this.LISTVIEW_HEADERTEMPLATE_ID = "" + this.element.id + LISTVIEW_HEADERTEMPLATE_PROPERTY;
      this.aniObj = new Animation4(this.animateOptions);
      this.removeElement(this.curUL);
      this.removeElement(this.ulElement);
      this.removeElement(this.headerEle);
      this.removeElement(this.contentContainer);
      this.curUL = this.ulElement = this.liCollection = this.headerEle = this.contentContainer = void 0;
    };
    ListView2.prototype.renderCheckbox = function(args) {
      var _this = this;
      if (args.item.classList.contains(classNames3.hasChild)) {
        this.isNestedList = true;
      }
      if (this.showCheckBox && args.item.classList.contains(classNames3.listItem)) {
        var fieldData_1;
        var checkboxElement = createCheckBox2(this.createElement, false, {
          checked: false,
          enableRtl: this.enableRtl,
          cssClass: classNames3.listviewCheckbox
        });
        checkboxElement.setAttribute("role", "checkbox");
        var frameElement_1 = checkboxElement.querySelector("." + classNames3.checkboxIcon);
        args.item.classList.add(classNames3.itemCheckList);
        args.item.firstElementChild.classList.add(classNames3.checkbox);
        if (typeof this.dataSource[0] !== "string" && typeof this.dataSource[0] !== "number") {
          fieldData_1 = getFieldValues(args.curData, this.listBaseOption.fields);
          if (this.enablePersistence && !isNullOrUndefined3(this.selectedId)) {
            var index = this.selectedId.findIndex(function(e) {
              return e === fieldData_1[_this.listBaseOption.fields.id].toString();
            });
            if (index !== -1) {
              this.checkInternally(args, checkboxElement);
            }
          } else if (fieldData_1[this.listBaseOption.fields.isChecked]) {
            this.checkInternally(args, checkboxElement);
          }
        } else if ((typeof this.dataSource[0] === "string" || typeof this.dataSource[0] === "number") && this.selectedData.indexOf(args.text) !== -1) {
          this.checkInternally(args, checkboxElement);
        }
        checkboxElement.setAttribute("aria-checked", frameElement_1.classList.contains(classNames3.checked) ? "true" : "false");
        checkboxElement.setAttribute("aria-label", args.text);
        if (this.checkBoxPosition === "Left") {
          checkboxElement.classList.add(classNames3.checkboxLeft);
          args.item.firstElementChild.classList.add(classNames3.checkboxLeft);
          args.item.firstElementChild.insertBefore(checkboxElement, args.item.firstElementChild.childNodes[0]);
        } else {
          checkboxElement.classList.add(classNames3.checkboxRight);
          args.item.firstElementChild.classList.add(classNames3.checkboxRight);
          args.item.firstElementChild.appendChild(checkboxElement);
        }
        this.currentLiElements.push(args.item);
        if (this.checkBoxPosition === "Left") {
          this.virtualCheckBox = args.item.firstElementChild.children[0];
        } else {
          this.virtualCheckBox = args.item.firstElementChild.lastElementChild;
        }
      }
    };
    ListView2.prototype.checkInternally = function(args, checkboxElement) {
      args.item.classList.add(classNames3.selected);
      checkboxElement.querySelector("." + classNames3.checkboxIcon).classList.add(classNames3.checked);
      checkboxElement.setAttribute("aria-checked", "true");
    };
    ListView2.prototype.checkItem = function(item) {
      this.toggleCheckBase(item, true);
    };
    ListView2.prototype.toggleCheckBase = function(item, checked) {
      if (this.showCheckBox) {
        var liElement = item;
        if (item instanceof Object && item.constructor !== HTMLLIElement) {
          liElement = this.getLiFromObjOrElement(item);
        }
        if (!isNullOrUndefined3(liElement)) {
          var checkboxIcon = liElement.querySelector("." + classNames3.checkboxIcon);
          if (checked === true) {
            liElement.classList.add(classNames3.selected);
          } else {
            liElement.classList.remove(classNames3.selected);
          }
          if (checked === true) {
            checkboxIcon.classList.add(classNames3.checked);
          } else {
            checkboxIcon.classList.remove(classNames3.checked);
          }
          checkboxIcon.parentElement.setAttribute("aria-checked", checked ? "true" : "false");
        }
        this.setSelectedItemData(liElement);
        this.updateSelectedId();
      }
    };
    ListView2.prototype.uncheckItem = function(item) {
      this.toggleCheckBase(item, false);
    };
    ListView2.prototype.checkAllItems = function() {
      this.toggleAllCheckBase(true);
    };
    ListView2.prototype.uncheckAllItems = function() {
      this.toggleAllCheckBase(false);
    };
    ListView2.prototype.toggleAllCheckBase = function(checked) {
      if (this.showCheckBox) {
        for (var i = 0; i < this.liCollection.length; i++) {
          var checkIcon = this.liCollection[i].querySelector("." + classNames3.checkboxIcon);
          if (checkIcon) {
            if (checked) {
              if (!checkIcon.classList.contains(classNames3.checked)) {
                this.checkItem(this.liCollection[i]);
              }
            } else {
              if (checkIcon.classList.contains(classNames3.checked)) {
                this.uncheckItem(this.liCollection[i]);
              }
            }
          }
        }
        if (this.enableVirtualization) {
          this.virtualizationModule.checkedItem(checked);
        }
        this.updateSelectedId();
      }
    };
    ListView2.prototype.setCheckbox = function() {
      if (this.showCheckBox) {
        var liCollection = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames3.listItem));
        var args = {
          item: void 0,
          curData: void 0,
          dataSource: void 0,
          fields: void 0,
          options: void 0,
          text: ""
        };
        for (var i = 0; i < liCollection.length; i++) {
          var element2 = liCollection[i];
          args.item = element2;
          args.curData = this.getItemData(element2);
          if (element2.querySelector("." + classNames3.checkboxWrapper)) {
            this.removeElement(element2.querySelector("." + classNames3.checkboxWrapper));
          }
          this.renderCheckbox(args);
          if (args.item.classList.contains(classNames3.selected)) {
            this.checkInternally(args, args.item.querySelector("." + classNames3.checkboxWrapper));
          }
        }
      } else {
        var liCollection = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames3.itemCheckList));
        for (var i = 0; i < liCollection.length; i++) {
          var element2 = liCollection[i];
          element2.classList.remove(classNames3.selected);
          element2.firstElementChild.classList.remove(classNames3.checkbox);
          this.removeElement(element2.querySelector("." + classNames3.checkboxWrapper));
        }
        if (this.selectedItems) {
          this.selectedItems.item.classList.add(classNames3.selected);
        }
      }
    };
    ListView2.prototype.refreshItemHeight = function() {
      if (this.virtualizationModule) {
        this.virtualizationModule.refreshItemHeight();
      }
    };
    ListView2.prototype.handleCheckboxState = function(li, checkIcon, checkboxElement, isCheckedBefore, isFocusedBefore, eventArgs, isSetCheckboxLI, textAreaFocus) {
      this.trigger("select", eventArgs, function(observedArgs) {
        if (observedArgs.cancel) {
          if (isSetCheckboxLI ? isCheckedBefore : !isCheckedBefore) {
            checkIcon.classList.add(classNames3.checked);
            li.classList.add(classNames3.selected);
          } else {
            checkIcon.classList.remove(classNames3.checked);
            li.classList.remove(classNames3.selected);
          }
          checkboxElement.setAttribute("aria-checked", isSetCheckboxLI ? isCheckedBefore ? "true" : "false" : isCheckedBefore ? "false" : "true");
          merge3(eventArgs, {
            isChecked: checkIcon.classList.contains(classNames3.checked)
          });
          if (isFocusedBefore) {
            li.classList.remove(classNames3.focused);
            if (textAreaFocus) {
              textAreaFocus.classList.remove("e-focused");
            }
          }
        }
      });
    };
    ListView2.prototype.clickHandler = function(e) {
      if (Array.isArray(this.dataSource) && this.dataSource.length === 0) {
        return;
      }
      var target = e.target;
      this.targetElement = target;
      var classList2 = target.classList;
      var closestElement;
      if (classList2.contains(classNames3.backIcon) || classList2.contains(classNames3.headerText)) {
        if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
          this.uncheckAllItems();
        }
        this.back();
      } else {
        var li = closest3(target.parentNode, "." + classNames3.listItem);
        if (li === null) {
          li = target;
        }
        this.removeFocus();
        if (this.enable && this.showCheckBox && this.isValidLI(li)) {
          if (e.target.classList.contains(classNames3.checkboxIcon)) {
            li.classList.add(classNames3.focused);
            if (isNullOrUndefined3(li.querySelector("." + classNames3.checked))) {
              var args = {
                curData: void 0,
                dataSource: void 0,
                fields: void 0,
                options: void 0,
                text: void 0,
                item: li
              };
              this.checkInternally(args, args.item.querySelector("." + classNames3.checkboxWrapper));
            } else {
              this.uncheckItem(li);
              li.classList.add(classNames3.focused);
            }
            if (this.enableVirtualization) {
              this.virtualizationModule.setCheckboxLI(li, e);
            }
            if (e) {
              var eventArgs = this.selectEventData(li, e);
              var checkIcon = li.querySelector("." + classNames3.checkboxIcon);
              merge3(eventArgs, {
                isChecked: checkIcon.classList.contains(classNames3.checked)
              });
              var checkboxElement = li.querySelector("." + classNames3.checkboxWrapper);
              var isCheckedBefore = checkIcon.classList.contains(classNames3.checked);
              var isFocusedBefore = li.classList.contains(classNames3.focused);
              this.handleCheckboxState(li, checkIcon, checkboxElement, isCheckedBefore, isFocusedBefore, eventArgs, false);
            }
          } else if (li.classList.contains(classNames3.hasChild)) {
            this.removeHover();
            this.removeSelect();
            this.removeSelect(li);
            this.setSelectLI(li, e);
            li.classList.remove(classNames3.selected);
          } else {
            this.setCheckboxLI(li, e);
            if (target.nodeName === "INPUT" || target.nodeName === "TEXTAREA") {
              target.classList.add("e-focused");
              this.targetElement = target;
            }
          }
        } else {
          this.setSelectLI(li, e);
          if (target.nodeName === "INPUT" || target.nodeName === "TEXTAREA") {
            target.classList.add("e-focused");
            this.targetElement = target;
          }
        }
        closestElement = closest3(e.target, "li");
        if (!isNullOrUndefined3(closestElement)) {
          if (closestElement.classList.contains("e-has-child") && !e.target.parentElement.classList.contains("e-listview-checkbox")) {
            closestElement.classList.add(classNames3.disable);
          }
        }
      }
      this.updateSelectedId();
    };
    ListView2.prototype.removeElement = function(element2) {
      return element2 && element2.parentNode && element2.parentNode.removeChild(element2);
    };
    ListView2.prototype.hoverHandler = function(e) {
      var curLi = closest3(e.target.parentNode, "." + classNames3.listItem);
      this.setHoverLI(curLi);
    };
    ListView2.prototype.leaveHandler = function() {
      this.removeHover();
    };
    ListView2.prototype.homeKeyHandler = function(e, end) {
      e.preventDefault();
      if (Object.keys(this.dataSource).length && this.curUL) {
        var li = this.curUL.querySelectorAll("." + classNames3.listItem);
        var focusedElement = this.curUL.querySelector("." + classNames3.focused) || this.curUL.querySelector("." + classNames3.selected);
        if (focusedElement) {
          focusedElement.classList.remove(classNames3.focused);
          if (!this.showCheckBox) {
            focusedElement.classList.remove(classNames3.selected);
          }
        }
        var index = !end ? 0 : li.length - 1;
        if (li[index].classList.contains(classNames3.hasChild) || this.showCheckBox) {
          li[index].classList.add(classNames3.focused);
        } else {
          this.setSelectLI(li[index], e);
        }
        if (li[index]) {
          this.element.setAttribute("aria-activedescendant", li[index].id.toString());
        } else {
          this.element.removeAttribute("aria-activedescendant");
        }
      }
    };
    ListView2.prototype.onArrowKeyDown = function(e, prev) {
      var siblingLI;
      var li;
      var hasChild = !isNullOrUndefined3(this.curUL.querySelector("." + classNames3.hasChild)) ? true : false;
      if (hasChild || this.showCheckBox) {
        li = this.curUL.querySelector("." + classNames3.focused) || this.curUL.querySelector("." + classNames3.selected);
        siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll("." + classNames3.listItem), li, prev);
        if (!isNullOrUndefined3(siblingLI)) {
          if (li) {
            li.classList.remove(classNames3.focused);
            if (!this.showCheckBox) {
              li.classList.remove(classNames3.selected);
            }
          }
          if (siblingLI.classList.contains(classNames3.hasChild) || this.showCheckBox) {
            siblingLI.classList.add(classNames3.focused);
          } else {
            this.setSelectLI(siblingLI, e);
          }
        }
      } else {
        li = this.curUL.querySelector("." + classNames3.selected);
        siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll("." + classNames3.listItem), li, prev);
        this.setSelectLI(siblingLI, e);
      }
      if (siblingLI) {
        this.element.setAttribute("aria-activedescendant", siblingLI.id.toString());
      } else {
        this.element.removeAttribute("aria-activedescendant");
      }
      return siblingLI;
    };
    ListView2.prototype.arrowKeyHandler = function(e, prev) {
      var _this = this;
      e.preventDefault();
      if (Object.keys(this.dataSource).length && this.curUL) {
        var siblingLI = this.onArrowKeyDown(e, prev);
        var elementTop = this.element.getBoundingClientRect().top;
        var elementHeight = this.element.getBoundingClientRect().height;
        var firstItemBounds = this.curUL.querySelector("." + classNames3.listItem).getBoundingClientRect();
        var heightDiff = void 0;
        var groupItemBounds = void 0;
        if (this.fields.groupBy) {
          groupItemBounds = this.curUL.querySelector("." + classNames3.groupListItem).getBoundingClientRect();
        }
        if (siblingLI) {
          var siblingTop = siblingLI.getBoundingClientRect().top;
          var siblingHeight = siblingLI.getBoundingClientRect().height;
          if (!prev) {
            var height = this.isWindow ? window.innerHeight : elementHeight;
            heightDiff = this.isWindow ? siblingTop + siblingHeight : siblingTop - elementTop + siblingHeight;
            if (heightDiff > height) {
              if (this.isWindow === true) {
                window.scroll(0, pageYOffset + (heightDiff - height));
              } else {
                this.element.scrollTop = this.element.scrollTop + (heightDiff - height);
              }
            }
          } else {
            heightDiff = this.isWindow ? siblingTop : siblingTop - elementTop;
            if (heightDiff < 0) {
              if (this.isWindow === true) {
                window.scroll(0, pageYOffset + heightDiff);
              } else {
                this.element.scrollTop = this.element.scrollTop + heightDiff;
              }
            }
          }
        } else if (this.enableVirtualization && prev && this.virtualizationModule.uiFirstIndex) {
          this.onUIScrolled = function() {
            _this.onArrowKeyDown(e, prev);
            _this.onUIScrolled = void 0;
          };
          heightDiff = this.virtualizationModule.listItemHeight;
          if (this.isWindow === true) {
            window.scroll(0, pageYOffset - heightDiff);
          } else {
            this.element.scrollTop = this.element.scrollTop - heightDiff;
          }
        } else if (prev) {
          if (this.showHeader && this.headerEle) {
            var topHeight = groupItemBounds ? groupItemBounds.top : firstItemBounds.top;
            var headerBounds = this.headerEle.getBoundingClientRect();
            heightDiff = headerBounds.top < 0 ? headerBounds.height - topHeight : 0;
            if (this.isWindow === true) {
              window.scroll(0, pageYOffset - heightDiff);
            } else {
              this.element.scrollTop = 0;
            }
          } else if (this.fields.groupBy) {
            heightDiff = this.isWindow ? groupItemBounds.top < 0 ? groupItemBounds.top : 0 : elementTop - firstItemBounds.top + groupItemBounds.height;
            if (this.isWindow === true) {
              window.scroll(0, pageYOffset + heightDiff);
            } else {
              this.element.scrollTop = this.element.scrollTop - heightDiff;
            }
          }
        }
      }
    };
    ListView2.prototype.enterKeyHandler = function(e) {
      if (Object.keys(this.dataSource).length && this.curUL) {
        var hasChild = !isNullOrUndefined3(this.curUL.querySelector("." + classNames3.hasChild)) ? true : false;
        var li = this.curUL.querySelector("." + classNames3.focused);
        if (hasChild && li) {
          li.classList.remove(classNames3.focused);
          if (this.showCheckBox) {
            this.removeSelect();
            this.removeSelect(li);
            this.removeHover();
          }
          this.setSelectLI(li, e);
        }
      }
    };
    ListView2.prototype.spaceKeyHandler = function(e) {
      if (this.enable && this.showCheckBox && Object.keys(this.dataSource).length && this.curUL) {
        e.preventDefault();
        var li = this.curUL.querySelector("." + classNames3.focused);
        var checkboxElement = void 0;
        var checkIcon = void 0;
        if (!isNullOrUndefined3(li) && isNullOrUndefined3(li.querySelector("." + classNames3.checked))) {
          var args = {
            curData: void 0,
            dataSource: void 0,
            fields: void 0,
            options: void 0,
            text: void 0,
            item: li
          };
          checkboxElement = args.item.querySelector("." + classNames3.checkboxWrapper);
          this.checkInternally(args, checkboxElement);
          checkIcon = checkboxElement.querySelector("." + classNames3.checkboxIcon + "." + classNames3.icon);
        } else {
          this.uncheckItem(li);
        }
        var eventArgs = this.selectEventData(li, e);
        merge3(eventArgs, {
          isChecked: checkIcon ? checkIcon.classList.contains(classNames3.checked) : false
        });
        if (!isNullOrUndefined3(li)) {
          var cbElement = li.querySelector("." + classNames3.checkboxWrapper);
          var checkboxIcon = li.querySelector("." + classNames3.checkboxIcon);
          var isCheckedBefore = checkboxIcon.classList.contains(classNames3.checked);
          var isFocusedBefore = li.classList.contains(classNames3.focused);
          this.handleCheckboxState(li, checkboxIcon, cbElement, isCheckedBefore, isFocusedBefore, eventArgs, false);
        }
        this.updateSelectedId();
      }
    };
    ListView2.prototype.keyActionHandler = function(e) {
      switch (e.keyCode) {
        case 36:
          this.homeKeyHandler(e);
          break;
        case 35:
          this.homeKeyHandler(e, true);
          break;
        case 40:
          this.arrowKeyHandler(e);
          break;
        case 38:
          this.arrowKeyHandler(e, true);
          break;
        case 13:
          this.enterKeyHandler(e);
          break;
        case 8:
          if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
            this.uncheckAllItems();
          }
          this.back();
          break;
        case 32:
          if (isNullOrUndefined3(this.targetElement) || !this.targetElement.classList.contains("e-focused")) {
            this.spaceKeyHandler(e);
          }
          break;
      }
    };
    ListView2.prototype.swipeActionHandler = function(e) {
      if (e.swipeDirection === "Right" && e.velocity > swipeVelocity && e.originalEvent.type === "touchend") {
        if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
          this.uncheckAllItems();
        }
        this.back();
      }
    };
    ListView2.prototype.focusout = function() {
      if (Object.keys(this.dataSource).length && this.curUL) {
        var focusedElement = this.curUL.querySelector("." + classNames3.focused);
        if (focusedElement) {
          focusedElement.classList.remove(classNames3.focused);
          if (!this.showCheckBox && !isNullOrUndefined3(this.selectedLI)) {
            this.selectedLI.classList.add(classNames3.selected);
          }
        }
      }
    };
    ListView2.prototype.wireEvents = function() {
      EventHandler3.add(this.element, "keydown", this.keyActionHandler, this);
      EventHandler3.add(this.element, "click", this.clickHandler, this);
      EventHandler3.add(this.element, "mouseover", this.hoverHandler, this);
      EventHandler3.add(this.element, "mouseout", this.leaveHandler, this);
      EventHandler3.add(this.element, "focusout", this.focusout, this);
      this.touchModule = new Touch3(this.element, {
        swipe: this.swipeActionHandler.bind(this)
      });
      if (!isNullOrUndefined3(this.scroll)) {
        EventHandler3.add(this.element, "scroll", this.onListScroll, this);
      }
    };
    ListView2.prototype.unWireEvents = function() {
      EventHandler3.remove(this.element, "keydown", this.keyActionHandler);
      EventHandler3.remove(this.element, "click", this.clickHandler);
      EventHandler3.remove(this.element, "mouseover", this.hoverHandler);
      EventHandler3.remove(this.element, "mouseout", this.leaveHandler);
      EventHandler3.remove(this.element, "mouseover", this.hoverHandler);
      EventHandler3.remove(this.element, "mouseout", this.leaveHandler);
      EventHandler3.remove(this.element, "focusout", this.focusout);
      if (!isNullOrUndefined3(this.scroll)) {
        EventHandler3.remove(this.element, "scroll", this.onListScroll);
      }
      if (this.touchModule) {
        this.touchModule.destroy();
      }
      this.touchModule = null;
    };
    ListView2.prototype.removeFocus = function() {
      var focusedLI = this.element.querySelectorAll("." + classNames3.focused);
      for (var _i = 0, focusedLI_1 = focusedLI; _i < focusedLI_1.length; _i++) {
        var ele = focusedLI_1[_i];
        ele.classList.remove(classNames3.focused);
      }
    };
    ListView2.prototype.removeHover = function() {
      var hoverLI = this.element.querySelector("." + classNames3.hover);
      if (hoverLI) {
        hoverLI.classList.remove(classNames3.hover);
      }
    };
    ListView2.prototype.removeSelect = function(li) {
      if (isNullOrUndefined3(li)) {
        var selectedLI = this.element.querySelectorAll("." + classNames3.selected);
        for (var _i = 0, selectedLI_1 = selectedLI; _i < selectedLI_1.length; _i++) {
          var ele = selectedLI_1[_i];
          if (this.showCheckBox && ele.querySelector("." + classNames3.checked)) {
            continue;
          } else {
            ele.classList.remove(classNames3.selected);
          }
        }
      } else {
        li.classList.remove(classNames3.selected);
      }
    };
    ListView2.prototype.isValidLI = function(li) {
      return li && li.classList.contains(classNames3.listItem) && !li.classList.contains(classNames3.groupListItem) && !li.classList.contains(classNames3.disable);
    };
    ListView2.prototype.setCheckboxLI = function(li, e) {
      if (this.isValidLI(li) && this.enable && this.showCheckBox) {
        if (this.curUL.querySelector("." + classNames3.focused)) {
          this.curUL.querySelector("." + classNames3.focused).classList.remove(classNames3.focused);
        }
        var textAreaFocus = li.querySelector("textarea") || li.querySelector("input");
        li.classList.add(classNames3.focused);
        if (!isNullOrUndefined3(e)) {
          if (e.target === textAreaFocus) {
            textAreaFocus.classList.add("e-focused");
          }
        }
        var checkboxElement = li.querySelector("." + classNames3.checkboxWrapper);
        var checkIcon = checkboxElement.querySelector("." + classNames3.checkboxIcon + "." + classNames3.icon);
        this.removeHover();
        var isCheckedBefore = checkIcon.classList.contains(classNames3.checked);
        var isFocusedBefore = li.classList.contains(classNames3.focused);
        if (!isCheckedBefore) {
          checkIcon.classList.add(classNames3.checked);
          li.classList.add(classNames3.selected);
        } else {
          checkIcon.classList.remove(classNames3.checked);
          li.classList.remove(classNames3.selected);
        }
        checkboxElement.setAttribute("aria-checked", checkIcon.classList.contains(classNames3.checked) ? "true" : "false");
        var eventArgs = this.selectEventData(li, e);
        merge3(eventArgs, {
          isChecked: checkIcon.classList.contains(classNames3.checked)
        });
        if (this.enableVirtualization) {
          this.virtualizationModule.setCheckboxLI(li, e);
        }
        this.handleCheckboxState(li, checkIcon, checkboxElement, isCheckedBefore, isFocusedBefore, eventArgs, true, textAreaFocus);
        this.setSelectedItemData(li);
        this.renderSubList(li);
      }
    };
    ListView2.prototype.selectEventData = function(li, e) {
      var data = this.getItemData(li);
      var fieldData = getFieldValues(data, this.listBaseOption.fields);
      var selectedItem;
      if (!isNullOrUndefined3(data) && typeof this.dataSource[0] === "string" || typeof this.dataSource[0] === "number") {
        selectedItem = {
          item: li,
          text: li && li.innerText.trim(),
          data: this.dataSource
        };
      } else {
        selectedItem = {
          item: li,
          text: fieldData && fieldData[this.listBaseOption.fields.text],
          data
        };
      }
      var eventArgs = {};
      merge3(eventArgs, selectedItem);
      if (e) {
        merge3(eventArgs, {
          isInteracted: true,
          event: e,
          cancel: false,
          index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li)
        });
      }
      return eventArgs;
    };
    ListView2.prototype.setSelectedItemData = function(li) {
      var data = this.getItemData(li);
      var fieldData = getFieldValues(data, this.listBaseOption.fields);
      if (!isNullOrUndefined3(data) && (typeof this.dataSource[0] === "string" || typeof this.dataSource[0] === "number")) {
        this.selectedItems = {
          item: li,
          text: li && li.innerText.trim(),
          data: this.dataSource
        };
      } else {
        this.selectedItems = {
          item: li,
          text: fieldData && fieldData[this.listBaseOption.fields.text],
          data
        };
      }
    };
    ListView2.prototype.setSelectLI = function(li, e) {
      var _this = this;
      if (this.isValidLI(li) && !li.classList.contains(classNames3.selected) && this.enable) {
        if (!this.showCheckBox) {
          this.removeSelect();
        }
        li.classList.add(classNames3.selected);
        this.removeHover();
        this.setSelectedItemData(li);
        if (this.enableVirtualization) {
          this.virtualizationModule.setSelectLI(li, e);
        }
        var eventArgs = this.selectEventData(li, e);
        this.trigger("select", eventArgs, function(observedArgs) {
          if (!observedArgs.cancel) {
            _this.selectedLI = li;
            _this.renderSubList(li);
          } else {
            li.classList.remove(classNames3.selected);
            _this.selectedLI = li;
          }
        });
      }
    };
    ListView2.prototype.setHoverLI = function(li) {
      if (this.isValidLI(li) && !li.classList.contains(classNames3.hover) && this.enable) {
        var lastLi = this.element.querySelectorAll("." + classNames3.hover);
        if (lastLi && lastLi.length) {
          removeClass3(lastLi, classNames3.hover);
        }
        if (!li.classList.contains(classNames3.selected) || this.showCheckBox) {
          li.classList.add(classNames3.hover);
        }
      }
    };
    ListView2.prototype.getSubDS = function() {
      var levelKeys = this.curDSLevel;
      if (levelKeys.length) {
        var ds = this.localData;
        for (var _i = 0, levelKeys_1 = levelKeys; _i < levelKeys_1.length; _i++) {
          var key = levelKeys_1[_i];
          var field = {};
          field[this.fields.id] = key;
          this.curDSJSON = this.findItemFromDS(ds, field);
          var fieldData = getFieldValues(this.curDSJSON, this.listBaseOption.fields);
          ds = this.curDSJSON ? fieldData[this.fields.child] : ds;
        }
        return ds;
      }
      return this.localData;
    };
    ListView2.prototype.getItemData = function(li) {
      var dataSource = this.dataSource instanceof DataManager2 ? this.localData : this.dataSource;
      var fields = this.getElementUID(li);
      var curDS;
      if (isNullOrUndefined3(this.element.querySelector("." + classNames3.hasChild)) && this.fields.groupBy) {
        curDS = this.curViewDS;
      } else {
        curDS = dataSource;
      }
      return this.findItemFromDS(curDS, fields);
    };
    ListView2.prototype.findItemFromDS = function(dataSource, fields, parent) {
      var _this = this;
      var resultJSON;
      if (dataSource && dataSource.length && fields) {
        dataSource.some(function(data) {
          var fieldData = getFieldValues(data, _this.listBaseOption.fields);
          if ((fields[_this.fields.id] || fields[_this.fields.text]) && (!fields[_this.fields.id] || (!isNullOrUndefined3(fieldData[_this.fields.id]) && fieldData[_this.fields.id].toString()) === fields[_this.fields.id].toString()) && (!fields[_this.fields.text] || fieldData[_this.fields.text] === fields[_this.fields.text])) {
            resultJSON = parent ? dataSource : data;
          } else if (typeof data !== "object" && dataSource.indexOf(data) !== -1) {
            resultJSON = parent ? dataSource : data;
          } else if (!isNullOrUndefined3(fields[_this.fields.id]) && isNullOrUndefined3(fieldData[_this.fields.id])) {
            var li = _this.element.querySelector('[data-uid="' + fields[_this.fields.id] + '"]');
            if (li && li.innerText.trim() === fieldData[_this.fields.text]) {
              resultJSON = data;
            }
          } else if (Object.prototype.hasOwnProperty.call(fieldData, _this.fields.child) && fieldData[_this.fields.child].length) {
            resultJSON = _this.findItemFromDS(fieldData[_this.fields.child], fields, parent);
          }
          return !!resultJSON;
        });
      } else {
        resultJSON = dataSource;
      }
      return resultJSON;
    };
    ListView2.prototype.getQuery = function() {
      var columns = [];
      var query = this.query ? this.query : new Query2();
      if (!this.query) {
        for (var _i = 0, _a = Object.keys(this.fields.properties); _i < _a.length; _i++) {
          var column = _a[_i];
          if (column !== "tableName" && !!this.fields["" + column] && this.fields["" + column] !== ListBase.defaultMappedFields["" + column] && columns.indexOf(this.fields["" + column]) === -1) {
            columns.push(this.fields["" + column]);
          }
        }
        query.select(columns);
        if (Object.prototype.hasOwnProperty.call(this.fields.properties, "tableName")) {
          query.from(this.fields.tableName);
        }
      }
      return query;
    };
    ListView2.prototype.setViewDataSource = function(dataSource) {
      if (dataSource === void 0) {
        dataSource = this.localData;
      }
      var fieldValue = isNullOrUndefined3(this.fields.sortBy) ? this.fields.text : this.fields.sortBy;
      var query = ListBase.addSorting(this.sortOrder, fieldValue);
      if (dataSource && this.fields.groupBy) {
        if (this.sortOrder !== "None") {
          this.curViewDS = ListBase.groupDataSource(ListBase.getDataSource(dataSource, query), this.listBaseOption.fields, this.sortOrder);
        } else {
          this.curViewDS = ListBase.groupDataSource(dataSource, this.listBaseOption.fields, this.sortOrder);
        }
      } else if (dataSource && this.sortOrder !== "None") {
        this.curViewDS = ListBase.getDataSource(dataSource, query);
      } else {
        this.curViewDS = dataSource;
      }
    };
    ListView2.prototype.isInAnimation = function() {
      return this.curUL.classList.contains(".e-animate");
    };
    ListView2.prototype.renderRemoteLists = function(e, listViewComponent) {
      if (this.isDestroyed) {
        return;
      }
      this.localData = e.result;
      listViewComponent.removeElement(listViewComponent.contentContainer);
      this.renderList();
      this.trigger("actionComplete", e);
    };
    ListView2.prototype.triggerActionFailure = function(e) {
      if (this.isDestroyed) {
        return;
      }
      this.trigger("actionFailure", e);
    };
    ListView2.prototype.setLocalData = function() {
      var _this = this;
      this.trigger("actionBegin");
      if (this.dataSource instanceof DataManager2) {
        if (this.dataSource.ready) {
          this.dataSource.ready.then(function(e) {
            _this.isOffline = _this.dataSource.dataSource.offline;
            if (_this.dataSource instanceof DataManager2 && _this.isOffline) {
              _this.renderRemoteLists(e, _this);
            }
          }).catch(function(e) {
            _this.triggerActionFailure(e);
          });
        } else {
          this.dataSource.executeQuery(this.getQuery()).then(function(e) {
            _this.renderRemoteLists(e, _this);
          }).catch(function(e) {
            _this.triggerActionFailure(e);
          });
        }
      } else if (!this.dataSource || !this.dataSource.length) {
        var ul = this.element.querySelector("ul");
        if (ul) {
          remove2(ul);
          this.setProperties({
            dataSource: ListBase.createJsonFromElement(ul)
          }, true);
          this.localData = this.dataSource;
          this.renderList();
          this.trigger("actionComplete", {
            data: this.localData
          });
        }
      } else {
        this.localData = this.dataSource;
        this.renderList();
        this.trigger("actionComplete", {
          data: this.localData
        });
      }
    };
    ListView2.prototype.reRender = function() {
      this.removeElement(this.headerEle);
      this.removeElement(this.ulElement);
      this.removeElement(this.contentContainer);
      if (this.isReact) {
        this.clearTemplate();
      }
      if (Object.keys(window).indexOf("ejsInterop") === -1) {
        this.element.innerHTML = "";
      }
      this.headerEle = this.ulElement = this.liCollection = void 0;
      this.header();
      this.setLocalData();
    };
    ListView2.prototype.resetCurrentList = function() {
      this.setViewDataSource(this.curViewDS);
      this.contentContainer.innerHTML = "";
      this.createList();
      this.renderIntoDom(this.curUL);
    };
    ListView2.prototype.setAttributes = function(liElements) {
      for (var i = 0; i < liElements.length; i++) {
        var element2 = liElements[parseInt(i.toString(), 10)];
        if (element2.classList.contains("e-list-item")) {
          element2.setAttribute("id", this.element.id + "_" + element2.getAttribute("data-uid"));
          element2.setAttribute("tabindex", "-1");
        }
      }
    };
    ListView2.prototype.createList = function() {
      this.currentLiElements = [];
      this.isNestedList = false;
      this.ulElement = this.curUL = ListBase.createList(this.createElement, this.curViewDS, this.listBaseOption, null, this);
      this.liCollection = this.curUL.querySelectorAll("." + classNames3.listItem);
      this.setAttributes(this.liCollection);
    };
    ListView2.prototype.renderSubList = function(li) {
      this.liElement = li;
      var uID = li.getAttribute("data-uid");
      if (li.classList.contains(classNames3.hasChild) && uID) {
        var ul = closest3(li.parentNode, "." + classNames3.parentItem);
        var ele = this.element.querySelector("[pid='" + uID + "']");
        this.curDSLevel.push(uID);
        this.setViewDataSource(this.getSubDS());
        if (this.enableVirtualization) {
          this.virtualizationModule.updateDOMItemCount();
        }
        if (!ele) {
          var data = this.curViewDS;
          ele = ListBase.createListFromJson(this.createElement, data, this.listBaseOption, this.curDSLevel.length, null, this);
          if (this.isReact) {
            this.renderReactTemplates();
          }
          var lists = ele.querySelectorAll("." + classNames3.listItem);
          this.setAttributes(lists);
          ele.setAttribute("pID", uID);
          ele.style.display = "none";
          this.renderIntoDom(ele);
        }
        this.switchView(ul, ele);
        this.liCollection = this.curUL.querySelectorAll("." + classNames3.listItem);
        if (this.selectedItems) {
          var fieldData = getFieldValues(this.selectedItems.data, this.listBaseOption.fields);
          this.header(fieldData[this.listBaseOption.fields.text], true, "header");
        }
        this.selectedLI = void 0;
      }
    };
    ListView2.prototype.renderIntoDom = function(ele) {
      this.contentContainer.appendChild(ele);
    };
    ListView2.prototype.renderList = function(data) {
      this.setViewDataSource(data);
      if (this.enableVirtualization) {
        if (Object.keys(this.dataSource).length) {
          if ((this.template || this.groupTemplate) && !this.virtualizationModule.isNgTemplate()) {
            this.listBaseOption.itemCreated = this.virtualizationModule.createUIItem.bind(this.virtualizationModule);
          }
        }
        this.virtualizationModule.uiVirtualization();
      } else {
        this.createList();
        this.contentContainer = this.createElement("div", {
          className: classNames3.container
        });
        this.element.appendChild(this.contentContainer);
        this.renderIntoDom(this.ulElement);
        if (this.isReact) {
          this.renderReactTemplates();
        }
      }
    };
    ListView2.prototype.getElementUID = function(obj) {
      var fields = {};
      if (obj instanceof Element) {
        fields[this.fields.id] = obj.getAttribute("data-uid");
      } else {
        fields = obj;
      }
      return fields;
    };
    ListView2.prototype.render = function() {
      this.element.classList.add(classNames3.root);
      attributes3(this.element, {
        tabindex: "0"
      });
      this.setCSSClass();
      this.setEnableRTL();
      this.setEnable();
      this.setSize();
      this.wireEvents();
      this.header();
      this.setLocalData();
      this.setHTMLAttribute();
      this.rippleFn = rippleEffect2(this.element, {
        selector: "." + classNames3.listItem
      });
      this.renderComplete();
      this.previousScrollTop = this.element.scrollTop;
    };
    ListView2.prototype.destroy = function() {
      if (this.isReact) {
        this.clearTemplate();
      }
      this.unWireEvents();
      var classAr = [classNames3.root, classNames3.disable, "e-rtl", "e-has-header", "e-lib"].concat(this.cssClass ? this.cssClass.split(" ").filter(function(css) {
        return css;
      }) : []);
      removeClass3([this.element], classAr);
      this.element.removeAttribute("role");
      this.element.removeAttribute("tabindex");
      this.curUL = this.ulElement = this.liCollection = this.headerEle = void 0;
      this.element.innerHTML = "";
      this.contentContainer = null;
      this.selectedItems = null;
      this.selectedLI = null;
      this.liElement = null;
      this.targetElement = null;
      this.currentLiElements = null;
      this.virtualCheckBox = null;
      _super.prototype.destroy.call(this);
    };
    ListView2.prototype.back = function() {
      var pID = this.curDSLevel[this.curDSLevel.length - 1];
      if (pID === void 0 || this.isInAnimation()) {
        return;
      }
      this.curDSLevel.pop();
      this.setViewDataSource(this.getSubDS());
      if (this.enableVirtualization) {
        this.virtualizationModule.updateDOMItemCount();
      }
      var toUL = this.element.querySelector("[data-uid='" + pID + "']");
      var fromUL = this.curUL;
      if (!toUL) {
        this.createList();
        this.renderIntoDom(this.ulElement);
        toUL = this.curUL;
      } else {
        toUL = toUL.parentElement;
      }
      var fieldData = getFieldValues(this.curDSJSON, this.listBaseOption.fields);
      var text = fieldData[this.fields.text];
      this.switchView(fromUL, toUL, true);
      this.removeFocus();
      var li = this.element.querySelector("[data-uid='" + pID + "']");
      li.classList.remove(classNames3.disable);
      li.classList.add(classNames3.focused);
      if (!(this.showCheckBox && li.querySelector("." + classNames3.checkboxIcon).classList.contains(classNames3.checked))) {
        li.classList.remove(classNames3.selected);
      }
      this.liCollection = this.curUL.querySelectorAll("." + classNames3.listItem);
      if (this.enableHtmlSanitizer) {
        this.setProperties({
          headerTitle: SanitizeHtmlHelper3.sanitize(this.headerTitle)
        }, true);
      }
      this.header(this.curDSLevel.length ? text : this.headerTitle, this.curDSLevel.length ? true : false, "header");
    };
    ListView2.prototype.selectItem = function(item) {
      if (this.enableVirtualization) {
        this.virtualizationModule.selectItem(item);
      } else if (this.showCheckBox) {
        this.setCheckboxLI(this.getLiFromObjOrElement(item));
      } else {
        if (isNullOrUndefined3(item) === true) {
          this.removeSelect();
        } else {
          this.setSelectLI(this.getLiFromObjOrElement(item));
        }
      }
    };
    ListView2.prototype.unselectItem = function(item) {
      if (isNullOrUndefined3(item)) {
        this.removeSelect();
      } else {
        var li = this.getLiFromObjOrElement(item);
        if (!isNullOrUndefined3(li)) {
          this.removeSelect(li);
        }
      }
    };
    ListView2.prototype.getLiFromObjOrElement = function(obj) {
      var li;
      var dataSource = this.dataSource instanceof DataManager2 ? this.localData : this.dataSource;
      if (!isNullOrUndefined3(obj)) {
        if (typeof dataSource[0] === "string" || typeof dataSource[0] === "number") {
          if (obj instanceof Element) {
            var uid3 = obj.getAttribute("data-uid").toString();
            for (var i = 0; i < this.liCollection.length; i++) {
              if (this.liCollection[parseInt(i.toString(), 10)].getAttribute("data-uid").toString() === uid3) {
                li = this.liCollection[parseInt(i.toString(), 10)];
                break;
              }
            }
          } else {
            Array.prototype.some.call(this.curUL.querySelectorAll("." + classNames3.listItem), function(item) {
              if (item.innerText.trim() === obj.toString()) {
                li = item;
                return true;
              } else {
                return false;
              }
            });
          }
        } else {
          var resultJSON = this.getItemData(obj);
          var fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);
          if (resultJSON) {
            li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');
            if (!this.enableVirtualization && isNullOrUndefined3(li)) {
              var curLi = this.element.querySelectorAll("." + classNames3.listItem);
              for (var i = 0; i < curLi.length; i++) {
                if (curLi[parseInt(i.toString(), 10)].innerText.trim() === fieldData[this.fields.text]) {
                  li = curLi[parseInt(i.toString(), 10)];
                }
              }
            }
          }
        }
      }
      return li;
    };
    ListView2.prototype.selectMultipleItems = function(item) {
      if (!isNullOrUndefined3(item)) {
        for (var i = 0; i < item.length; i++) {
          if (!isNullOrUndefined3(item[parseInt(i.toString(), 10)])) {
            this.selectItem(item[parseInt(i.toString(), 10)]);
          }
        }
      }
    };
    ListView2.prototype.getParentId = function() {
      var parentId = [];
      if (this.isNestedList) {
        for (var i = this.curDSLevel.length - 1; i >= 0; i--) {
          parentId.push(this.curDSLevel[parseInt(i.toString(), 10)]);
        }
      }
      return parentId;
    };
    ListView2.prototype.updateSelectedId = function() {
      this.selectedId = [];
      var liCollection = this.curUL.getElementsByClassName(classNames3.selected);
      for (var i = 0; i < liCollection.length; i++) {
        var tempData = this.getItemData(liCollection[parseInt(i.toString(), 10)]);
        if (!isNullOrUndefined3(tempData) && tempData[this.listBaseOption.fields.id]) {
          this.selectedId.push(tempData[this.listBaseOption.fields.id]);
        }
      }
    };
    ListView2.prototype.getSelectedItems = function() {
      var finalValue;
      var isCompleted = false;
      this.selectedId = [];
      var dataSource = this.dataSource instanceof DataManager2 ? this.localData : this.dataSource;
      if (this.enableVirtualization && !isCompleted) {
        finalValue = this.virtualizationModule.getSelectedItems();
        isCompleted = true;
      } else if (this.showCheckBox && !isCompleted) {
        var liCollection = this.curUL.getElementsByClassName(classNames3.selected);
        var liTextCollection = [];
        var liDataCollection = [];
        this.selectedId = [];
        var dataParent = [];
        for (var i = 0; i < liCollection.length; i++) {
          if (typeof dataSource[0] === "string" || typeof dataSource[0] === "number") {
            liTextCollection.push(liCollection[parseInt(i.toString(), 10)].innerText.trim());
          } else {
            var tempData = this.getItemData(liCollection[parseInt(i.toString(), 10)]);
            var fieldData = getFieldValues(tempData, this.listBaseOption.fields);
            if (this.isNestedList) {
              dataParent.push({
                data: tempData,
                parentId: this.getParentId()
              });
            } else {
              liDataCollection.push(tempData);
            }
            if (fieldData) {
              liTextCollection.push(fieldData[this.listBaseOption.fields.text]);
              this.selectedId.push(fieldData[this.listBaseOption.fields.id]);
            } else {
              liTextCollection.push(void 0);
              this.selectedId.push(void 0);
            }
          }
        }
        if ((typeof dataSource[0] === "string" || typeof dataSource[0] === "number") && !isCompleted) {
          finalValue = {
            item: liCollection,
            data: dataSource,
            text: liTextCollection
          };
          isCompleted = true;
        }
        if (this.isNestedList && !isCompleted) {
          finalValue = {
            item: liCollection,
            data: dataParent,
            text: liTextCollection
          };
          isCompleted = true;
        } else if (!isCompleted) {
          finalValue = {
            item: liCollection,
            data: liDataCollection,
            text: liTextCollection
          };
          isCompleted = true;
        }
      } else if (!isCompleted) {
        var liElement = this.element.getElementsByClassName(classNames3.selected)[0];
        var fieldData = getFieldValues(this.getItemData(liElement), this.listBaseOption.fields);
        if ((typeof dataSource[0] === "string" || typeof dataSource[0] === "number") && !isCompleted) {
          finalValue = !isNullOrUndefined3(liElement) ? {
            item: liElement,
            data: dataSource,
            text: liElement.innerText.trim()
          } : void 0;
          isCompleted = true;
        } else if (!isCompleted) {
          if (isNullOrUndefined3(fieldData) || isNullOrUndefined3(liElement)) {
            finalValue = void 0;
            isCompleted = true;
          } else {
            this.selectedId.push(fieldData[this.listBaseOption.fields.id]);
            finalValue = {
              text: fieldData[this.listBaseOption.fields.text],
              item: liElement,
              data: this.getItemData(liElement)
            };
            isCompleted = true;
          }
        }
      }
      return finalValue;
    };
    ListView2.prototype.findItem = function(item) {
      return this.getItemData(item);
    };
    ListView2.prototype.enableItem = function(item) {
      this.setItemState(item, true);
      if (this.enableVirtualization) {
        this.virtualizationModule.enableItem(item);
      }
    };
    ListView2.prototype.disableItem = function(item) {
      this.setItemState(item, false);
      if (this.enableVirtualization) {
        this.virtualizationModule.disableItem(item);
      }
    };
    ListView2.prototype.setItemState = function(item, isEnable) {
      var resultJSON = this.getItemData(item);
      var fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);
      if (resultJSON) {
        var li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');
        if (isEnable) {
          if (li) {
            li.classList.remove(classNames3.disable);
          }
          delete resultJSON[this.fields.enabled];
        } else if (!isEnable) {
          if (li) {
            li.classList.add(classNames3.disable);
          }
          resultJSON[this.fields.enabled] = false;
        }
      }
    };
    ListView2.prototype.showItem = function(item) {
      this.showHideItem(item, false, "");
      if (this.enableVirtualization) {
        this.virtualizationModule.showItem(item);
      }
    };
    ListView2.prototype.hideItem = function(item) {
      this.showHideItem(item, true, "none");
      if (this.enableVirtualization) {
        this.virtualizationModule.hideItem(item);
      }
    };
    ListView2.prototype.showHideItem = function(obj, isHide, display) {
      var resultJSON = this.getItemData(obj);
      var fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);
      if (resultJSON) {
        var li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');
        if (li) {
          li.style.display = display;
        }
        if (isHide) {
          resultJSON[this.fields.isVisible] = false;
        } else {
          delete resultJSON[this.fields.isVisible];
        }
      }
    };
    ListView2.prototype.addItem = function(data, fields, index) {
      if (fields === void 0) {
        fields = void 0;
      }
      var dataSource = this.dataSource instanceof DataManager2 ? this.localData : this.dataSource;
      this.addItemInternally(data, fields, dataSource, index);
    };
    ListView2.prototype.addItemInternally = function(data, fields, dataSource, index) {
      if (data instanceof Array) {
        if (this.enableVirtualization) {
          this.virtualizationModule.addItem(data, fields, dataSource, index);
        } else {
          var ds = this.findItemFromDS(dataSource, fields);
          var child = void 0;
          if (ds) {
            var fieldData = getFieldValues(ds, this.listBaseOption.fields);
            child = fieldData[this.fields.child];
            if (!child) {
              child = [];
            }
            child = child.concat(data);
          }
          if (ds instanceof Array) {
            for (var i = 0; i < data.length; i++) {
              dataSource = this.addItemAtIndex(index, dataSource, data[parseInt(i.toString(), 10)]);
              this.setViewDataSource(dataSource);
              var targetUL = this.contentContainer ? this.contentContainer.children[0] : null;
              if (this.contentContainer && targetUL) {
                this.addItemIntoDom(data[parseInt(i.toString(), 10)], targetUL, this.curViewDS);
              } else {
                this.reRender();
              }
            }
            this.liCollection = this.curUL.querySelectorAll("." + classNames3.listItem);
          } else {
            if (ds) {
              ds[this.fields.child] = child;
              this.addItemInNestedList(ds, data);
            }
          }
        }
      }
    };
    ListView2.prototype.addItemAtIndex = function(index, newDataSource, itemData) {
      var isIndexValid = !isNullOrUndefined3(index) && index >= 0 && index < newDataSource.length && isNullOrUndefined3(this.listBaseOption.fields.groupBy);
      if (isIndexValid) {
        newDataSource.splice(index, 0, itemData);
      } else {
        newDataSource.push(itemData);
      }
      return newDataSource;
    };
    ListView2.prototype.addItemInNestedList = function(targetItemData, itemQueue) {
      var targetItemId = targetItemData[this.fields.id];
      var targetChildDS = targetItemData[this.fields.child];
      var isAlreadyRenderedUL = this.element.querySelector("[pid='" + targetItemId + "']");
      var targetLi = this.element.querySelector("[data-uid='" + targetItemId + "']");
      var targetUL = isAlreadyRenderedUL ? isAlreadyRenderedUL : targetLi ? closest3(targetLi, "ul") : null;
      var targetDS = isAlreadyRenderedUL ? targetChildDS : [targetItemData];
      var isTargetEmptyChild = targetLi ? !targetLi.classList.contains(classNames3.hasChild) : false;
      if (isTargetEmptyChild) {
        var targetRefreshedElement = ListBase.createListItemFromJson(this.createElement, targetDS, this.listBaseOption, null, null, this);
        this.setAttributes(targetRefreshedElement);
        targetUL.insertBefore(targetRefreshedElement[0], targetLi);
        detach3(targetLi);
      }
      if (isAlreadyRenderedUL && itemQueue) {
        for (var i = 0; i < itemQueue.length; i++) {
          targetDS.push(itemQueue[parseInt(i.toString(), 10)]);
          this.addItemIntoDom(itemQueue[parseInt(i.toString(), 10)], targetUL, targetDS);
        }
      }
    };
    ListView2.prototype.addItemIntoDom = function(currentItem, targetUL, curViewDS) {
      var index = curViewDS.indexOf(currentItem);
      this.addListItem(currentItem, index, targetUL, curViewDS);
      var curItemDS = curViewDS[index - 1];
      if (curItemDS && curItemDS.isHeader && curItemDS.items.length === 1) {
        this.addListItem(curItemDS, index - 1, targetUL, curViewDS);
      }
    };
    ListView2.prototype.addListItem = function(dataSource, index, ulElement, curViewDS) {
      var target = this.getLiFromObjOrElement(curViewDS[index + 1]) || this.getLiFromObjOrElement(curViewDS[index + 2]) || null;
      var li = ListBase.createListItemFromJson(this.createElement, [dataSource], this.listBaseOption, null, null, this);
      this.setAttributes(li);
      if (this.template && this.isReact) {
        this.renderReactTemplates();
      }
      if (this.fields.groupBy && curViewDS[index + 1] && curViewDS[index + 1].isHeader) {
        var targetEle = this.getLiFromObjOrElement(curViewDS[index - 1]);
        if (targetEle) {
          target = targetEle.nextElementSibling;
        }
      }
      ulElement.insertBefore(li[0], target);
    };
    ListView2.prototype.removeItem = function(item) {
      var listDataSource = this.dataSource instanceof DataManager2 ? this.localData : this.dataSource;
      if (this.enableVirtualization) {
        this.virtualizationModule.removeItem(item);
      } else {
        this.removeItemFromList(item, listDataSource);
      }
    };
    ListView2.prototype.removeItemFromList = function(obj, listDataSource) {
      var _this = this;
      var curViewDS = this.curViewDS;
      var fields = obj instanceof Element ? this.getElementUID(obj) : obj;
      var dataSource = this.findItemFromDS(listDataSource, fields, true);
      if (dataSource) {
        var data_1 = this.findItemFromDS(dataSource, fields);
        var index = curViewDS.indexOf(data_1);
        var li = this.getLiFromObjOrElement(obj);
        var groupLi = void 0;
        this.validateNestedView(li);
        if (this.fields.groupBy && this.curViewDS[index - 1] && curViewDS[index - 1].isHeader && curViewDS[index - 1].items.length === 1) {
          if (li && li.previousElementSibling.classList.contains(classNames3.groupListItem) && (isNullOrUndefined3(li.nextElementSibling) || li.nextElementSibling && li.nextElementSibling.classList.contains(classNames3.groupListItem))) {
            groupLi = li.previousElementSibling;
          }
        }
        if (li) {
          detach3(li);
        }
        if (groupLi) {
          detach3(groupLi);
        }
        var foundData = dataSource.length - 1 <= 0 ? this.findParent(this.localData, this.fields.id, function(value) {
          return value === data_1[_this.fields.id];
        }, null) : null;
        var dsIndex = dataSource.indexOf(data_1);
        dataSource.splice(dsIndex, 1);
        this.setViewDataSource(listDataSource);
        if (foundData && foundData.parent && Array.isArray(foundData.parent[this.fields.child]) && foundData.parent[this.fields.child].length <= 0) {
          var parentLi = this.getLiFromObjOrElement(foundData.parent);
          if (parentLi) {
            var li_1 = ListBase.createListItemFromJson(this.createElement, [foundData.parent], this.listBaseOption, null, null, this);
            this.setAttributes(li_1);
            parentLi.parentElement.insertBefore(li_1[0], parentLi);
            parentLi.parentElement.removeChild(parentLi);
          }
        }
        if (dataSource.length <= 0) {
          this.back();
        }
        this.liCollection = Array.prototype.slice.call(this.element.querySelectorAll("." + classNames3.listItem));
      }
    };
    ListView2.prototype.validateNestedView = function(li) {
      var liID = li ? li.getAttribute("data-uid").toString().toLowerCase() : null;
      if (liID && this.curDSLevel && this.curDSLevel.length > 0) {
        while (this.curDSLevel.some(function(id) {
          return id.toString().toLowerCase() === liID;
        })) {
          this.back();
        }
      }
    };
    ListView2.prototype.removeMultipleItems = function(item) {
      if (item.length) {
        for (var i = 0; i < item.length; i++) {
          this.removeItem(item[parseInt(i.toString(), 10)]);
        }
      }
    };
    ListView2.prototype.findParent = function(dataSource, id, callback, parent) {
      if (Object.prototype.hasOwnProperty.call(dataSource, id) && callback(dataSource[id]) === true) {
        return extend3({}, dataSource);
      }
      for (var i = 0; i < Object.keys(dataSource).length; i++) {
        if (dataSource[Object.keys(dataSource)[parseInt(i.toString(), 10)]] && typeof dataSource[Object.keys(dataSource)[parseInt(i.toString(), 10)]] === "object") {
          var result = this.findParent(dataSource[Object.keys(dataSource)[parseInt(i.toString(), 10)]], id, callback, dataSource);
          if (result != null) {
            if (!result.parent) {
              result.parent = parent;
            }
            return result;
          }
        }
      }
      return null;
    };
    ListView2.prototype.getModuleName = function() {
      return "listview";
    };
    ListView2.prototype.requiredModules = function() {
      var modules = [];
      if (this.enableVirtualization) {
        modules.push({
          args: [this],
          member: "virtualization",
          name: "Virtualization"
        });
      }
      return modules;
    };
    ListView2.prototype.onListScroll = function(e) {
      var args = {
        originalEvent: e,
        scrollDirection: "Bottom",
        distanceY: this.element.scrollHeight - this.element.scrollTop
      };
      var currentScrollTop = this.element.scrollTop;
      if (currentScrollTop > this.previousScrollTop) {
        args.scrollDirection = "Bottom";
        args.distanceY = this.element.scrollHeight - this.element.clientHeight - this.element.scrollTop;
        this.trigger("scroll", args);
      } else if (this.previousScrollTop > currentScrollTop) {
        args.scrollDirection = "Top";
        args.distanceY = this.element.scrollTop;
        this.trigger("scroll", args);
      }
      this.previousScrollTop = currentScrollTop;
    };
    ListView2.prototype.getPersistData = function() {
      return this.addOnPersist(["cssClass", "enableRtl", "htmlAttributes", "enable", "fields", "animation", "headerTitle", "sortOrder", "showIcon", "height", "width", "showCheckBox", "checkBoxPosition", "selectedId"]);
    };
    __decorate45([Property3("")], ListView2.prototype, "cssClass", void 0);
    __decorate45([Property3(false)], ListView2.prototype, "enableVirtualization", void 0);
    __decorate45([Property3({})], ListView2.prototype, "htmlAttributes", void 0);
    __decorate45([Property3(true)], ListView2.prototype, "enable", void 0);
    __decorate45([Property3([])], ListView2.prototype, "dataSource", void 0);
    __decorate45([Property3()], ListView2.prototype, "query", void 0);
    __decorate45([Complex3(ListBase.defaultMappedFields, FieldSettings)], ListView2.prototype, "fields", void 0);
    __decorate45([Property3({
      effect: "SlideLeft",
      duration: 400,
      easing: "ease"
    })], ListView2.prototype, "animation", void 0);
    __decorate45([Property3("None")], ListView2.prototype, "sortOrder", void 0);
    __decorate45([Property3(false)], ListView2.prototype, "showIcon", void 0);
    __decorate45([Property3(false)], ListView2.prototype, "showCheckBox", void 0);
    __decorate45([Property3("Left")], ListView2.prototype, "checkBoxPosition", void 0);
    __decorate45([Property3("")], ListView2.prototype, "headerTitle", void 0);
    __decorate45([Property3(false)], ListView2.prototype, "showHeader", void 0);
    __decorate45([Property3(true)], ListView2.prototype, "enableHtmlSanitizer", void 0);
    __decorate45([Property3("")], ListView2.prototype, "height", void 0);
    __decorate45([Property3("")], ListView2.prototype, "width", void 0);
    __decorate45([Property3(null)], ListView2.prototype, "template", void 0);
    __decorate45([Property3(null)], ListView2.prototype, "headerTemplate", void 0);
    __decorate45([Property3(null)], ListView2.prototype, "groupTemplate", void 0);
    __decorate45([Event4()], ListView2.prototype, "select", void 0);
    __decorate45([Event4()], ListView2.prototype, "actionBegin", void 0);
    __decorate45([Event4()], ListView2.prototype, "actionComplete", void 0);
    __decorate45([Event4()], ListView2.prototype, "actionFailure", void 0);
    __decorate45([Event4()], ListView2.prototype, "scroll", void 0);
    ListView2 = __decorate45([NotifyPropertyChanges3], ListView2);
    return ListView2;
  }(Component4)
);

// node_modules/@syncfusion/ej2-lists/src/list-view/virtualization.js
var listElementCount = 1.5;
var windowElementCount = 3;
var Virtualization = (
  /** @class */
  function() {
    function Virtualization2(instance) {
      this.elementDifference = 0;
      this.listViewInstance = instance;
    }
    Virtualization2.prototype.isNgTemplate = function() {
      return !isNullOrUndefined3(this.listViewInstance.templateRef) && typeof this.listViewInstance.templateRef !== "string";
    };
    Virtualization2.prototype.isVueFunctionTemplate = function() {
      return this.listViewInstance.isVue && typeof this.listViewInstance.template === "function";
    };
    Virtualization2.prototype.uiVirtualization = function() {
      this.wireScrollEvent(false);
      var curViewDS = this.listViewInstance.curViewDS;
      var isRendered = this.listViewInstance.isRendered;
      var firstIndex = isRendered && !isNullOrUndefined3(this.uiFirstIndex) && this.uiLastIndex <= Object.keys(curViewDS).length ? this.uiFirstIndex : 0;
      var firstDs = curViewDS.slice(firstIndex, firstIndex + 1);
      this.listViewInstance.ulElement = this.listViewInstance.curUL = ListBase.createList(this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption, null, this.listViewInstance);
      this.listViewInstance.contentContainer = this.listViewInstance.createElement("div", {
        className: classNames3.container
      });
      this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer);
      this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement);
      this.listItemHeight = this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height;
      this.expectedDomItemCount = this.ValidateItemCount(1e4);
      this.updateDOMItemCount();
      var lastIndex = isRendered && !isNullOrUndefined3(this.uiLastIndex) && this.listDiff !== 0 ? this.uiLastIndex : this.domItemCount - 1;
      this.uiFirstIndex = firstIndex;
      this.uiLastIndex = lastIndex;
      var otherDs = curViewDS.slice(firstIndex + 1, lastIndex + 1);
      var listItems = ListBase.createListItemFromJson(this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption, null, null, this.listViewInstance);
      append2(listItems, this.listViewInstance.ulElement);
      this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll("li");
      this.topElement = this.listViewInstance.createElement("div");
      this.listViewInstance.ulElement.insertBefore(this.topElement, this.listViewInstance.ulElement.firstElementChild);
      this.bottomElement = this.listViewInstance.createElement("div");
      this.listViewInstance.ulElement.insertBefore(this.bottomElement, null);
      this.totalHeight = Object.keys(curViewDS).length * this.listItemHeight - this.domItemCount * this.listItemHeight;
      this.topElement.style.height = isRendered ? this.topElementHeight + "px" : "0px";
      this.bottomElement.style.height = isRendered ? this.totalHeight - this.topElementHeight + "px" : this.totalHeight + "px";
      this.topElementHeight = isRendered ? this.topElementHeight : 0;
      this.bottomElementHeight = isRendered ? this.totalHeight - this.topElementHeight : this.totalHeight;
      this.listDiff = isRendered && Object.keys(curViewDS).length !== this.domItemCount ? this.listDiff : 0;
      if (isRendered) {
        this.listViewInstance.element.scrollTop = this.listViewInstance.previousScrollTop;
      }
      this.uiIndicesInitialization();
    };
    Virtualization2.prototype.wireScrollEvent = function(destroy5) {
      if (!destroy5) {
        if (this.listViewInstance.isWindow) {
          this.onVirtualScroll = this.onVirtualUiScroll.bind(this);
          window.addEventListener("scroll", this.onVirtualScroll);
        } else {
          EventHandler3.add(this.listViewInstance.element, "scroll", this.onVirtualUiScroll, this);
        }
      } else {
        if (this.listViewInstance.isWindow === true) {
          window.removeEventListener("scroll", this.onVirtualScroll);
          window.removeEventListener("scroll", this.updateUl);
        } else {
          EventHandler3.remove(this.listViewInstance.element, "scroll", this.onVirtualUiScroll);
        }
      }
    };
    Virtualization2.prototype.ValidateItemCount = function(dataSourceLength) {
      var height = parseFloat(formatUnit2(this.listViewInstance.height));
      var itemCount;
      if (this.listViewInstance.isWindow) {
        itemCount = Math.round(window.innerHeight / this.listItemHeight * windowElementCount);
      } else {
        if (typeof this.listViewInstance.height === "string" && this.listViewInstance.height.indexOf("%") !== -1) {
          itemCount = Math.round(this.listViewInstance.element.getBoundingClientRect().height / this.listItemHeight * listElementCount);
        } else {
          itemCount = Math.round(height / this.listItemHeight * listElementCount);
        }
      }
      if (itemCount > dataSourceLength) {
        itemCount = dataSourceLength;
      }
      return itemCount;
    };
    Virtualization2.prototype.updateDOMItemCount = function() {
      this.domItemCount = this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length);
    };
    Virtualization2.prototype.uiIndicesInitialization = function() {
      this.uiIndices = {
        "activeIndices": [],
        "disabledItemIndices": [],
        "hiddenItemIndices": []
      };
      var data = this.listViewInstance.curViewDS;
      for (var i = 0; i < data.length; i++) {
        if (this.listViewInstance.showCheckBox && data[i][this.listViewInstance.fields.isChecked]) {
          this.uiIndices.activeIndices.push(i);
        }
        if (!isNullOrUndefined3(data[parseInt(i.toString(), 10)][this.listViewInstance.fields.enabled]) && !data[i][this.listViewInstance.fields.enabled]) {
          this.uiIndices.disabledItemIndices.push(i);
        }
      }
      if (this.isNgTemplate()) {
        var items = this.listViewInstance.element.querySelectorAll("." + classNames3.listItem);
        for (var index = 0; index < items.length; index++) {
          items[index].context = this.listViewInstance.viewContainerRef.get(index).context;
        }
      }
    };
    Virtualization2.prototype.refreshItemHeight = function() {
      if (this.listViewInstance.curViewDS.length) {
        var curViewDS = this.listViewInstance.curViewDS;
        this.listItemHeight = this.topElement.nextSibling.getBoundingClientRect().height;
        this.totalHeight = Object.keys(curViewDS).length * this.listItemHeight - this.domItemCount * this.listItemHeight;
        this.bottomElementHeight = this.totalHeight;
        this.bottomElement.style.height = this.totalHeight + "px";
      }
    };
    Virtualization2.prototype.getscrollerHeight = function(startingHeight) {
      return this.listViewInstance.isWindow ? pageYOffset - startingHeight <= 0 ? 0 : pageYOffset - startingHeight : this.listViewInstance.element.scrollTop - startingHeight <= 0 ? 0 : this.listViewInstance.element.scrollTop - startingHeight;
    };
    Virtualization2.prototype.onVirtualUiScroll = function() {
      var _a;
      var startingHeight;
      var curViewDS = this.listViewInstance.curViewDS;
      this.listItemHeight = select3(".e-list-item", this.listViewInstance.element).getBoundingClientRect().height;
      this.totalHeight = Object.keys(curViewDS).length * this.listItemHeight - this.domItemCount * this.listItemHeight;
      if (this.listViewInstance.isWindow) {
        startingHeight = this.listViewInstance.ulElement.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;
      } else {
        startingHeight = this.listViewInstance.headerEle ? this.listViewInstance.headerEle.getBoundingClientRect().height : 0;
      }
      this.scrollPosition = isNullOrUndefined3(this.scrollPosition) ? 0 : this.scrollPosition;
      var scroll = this.getscrollerHeight(startingHeight);
      this.topElementHeight = this.listItemHeight * Math.floor(scroll / this.listItemHeight);
      this.bottomElementHeight = this.totalHeight - this.topElementHeight;
      _a = scroll <= this.totalHeight ? [this.topElementHeight, this.bottomElementHeight] : [this.totalHeight, 0], this.topElementHeight = _a[0], this.bottomElementHeight = _a[1];
      if (this.topElementHeight !== parseFloat(this.topElement.style.height)) {
        this.topElement.style.height = this.topElementHeight + "px";
        this.bottomElement.style.height = this.bottomElementHeight + "px";
        if (scroll > this.scrollPosition) {
          var listDiff = Math.round(this.topElementHeight / this.listItemHeight - this.listDiff);
          if (listDiff > this.expectedDomItemCount + 5) {
            this.onLongScroll(listDiff, true);
          } else {
            this.onNormalScroll(listDiff, true);
          }
        } else {
          var listDiff = Math.round(this.listDiff - this.topElementHeight / this.listItemHeight);
          if (listDiff > this.expectedDomItemCount + 5) {
            this.onLongScroll(listDiff, false);
          } else {
            this.onNormalScroll(listDiff, false);
          }
        }
      }
      this.listDiff = Math.round(this.topElementHeight / this.listItemHeight);
      if (typeof this.listViewInstance.onUIScrolled === "function") {
        this.listViewInstance.onUIScrolled();
      }
      this.scrollPosition = scroll;
    };
    Virtualization2.prototype.onLongScroll = function(listDiff, isScrollingDown) {
      var index = isScrollingDown ? this.uiFirstIndex + listDiff : this.uiFirstIndex - listDiff;
      var elements = this.listViewInstance.ulElement.querySelectorAll("li");
      for (var i = 0; i < elements.length; i++) {
        this.updateUI(elements[i], index);
        index++;
      }
      this.uiLastIndex = isScrollingDown ? this.uiLastIndex + listDiff : this.uiLastIndex - listDiff;
      this.uiFirstIndex = isScrollingDown ? this.uiFirstIndex + listDiff : this.uiFirstIndex - listDiff;
    };
    Virtualization2.prototype.onNormalScroll = function(listDiff, isScrollingDown) {
      if (isScrollingDown) {
        for (var i = 0; i < listDiff; i++) {
          var index = ++this.uiLastIndex;
          this.updateUI(this.topElement.nextElementSibling, index, this.bottomElement);
          this.uiFirstIndex++;
        }
      } else {
        for (var i = 0; i < listDiff; i++) {
          var index = --this.uiFirstIndex;
          var target = this.topElement.nextSibling;
          this.updateUI(this.bottomElement.previousElementSibling, index, target);
          this.uiLastIndex--;
        }
      }
    };
    Virtualization2.prototype.updateUiContent = function(element2, index) {
      var curViewDs = this.listViewInstance.curViewDS;
      if (typeof this.listViewInstance.dataSource[0] === "string" || typeof this.listViewInstance.dataSource[0] === "number") {
        element2.dataset.uid = ListBase.generateId();
        element2.getElementsByClassName(classNames3.listItemText)[0].innerHTML = this.listViewInstance.curViewDS[index].toString();
      } else {
        element2.dataset.uid = curViewDs[parseInt(index.toString(), 10)][this.listViewInstance.fields.id] ? curViewDs[parseInt(index.toString(), 10)][this.listViewInstance.fields.id] : ListBase.generateId();
        element2.getElementsByClassName(classNames3.listItemText)[0].innerHTML = curViewDs[parseInt(index.toString(), 10)][this.listViewInstance.fields.text];
      }
      if (this.listViewInstance.showIcon) {
        if (element2.querySelector("." + classNames3.listIcon)) {
          detach3(element2.querySelector("." + classNames3.listIcon));
        }
        if (this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]) {
          var textContent = element2.querySelector("." + classNames3.textContent);
          var curViewDS = this.listViewInstance.curViewDS[index];
          var iconCss = curViewDS[this.listViewInstance.fields.iconCss].toString();
          var target = this.listViewInstance.createElement("div", {
            className: classNames3.listIcon + " " + iconCss
          });
          textContent.insertBefore(target, element2.querySelector("." + classNames3.listItemText));
        }
      }
      if (this.listViewInstance.showCheckBox && this.listViewInstance.fields.groupBy) {
        if (!this.checkListWrapper) {
          this.checkListWrapper = this.listViewInstance.curUL.querySelector("." + classNames3.checkboxWrapper).cloneNode(true);
        }
        var textContent = element2.querySelector("." + classNames3.textContent);
        if (this.listViewInstance.curViewDS[index].isHeader) {
          if (element2.querySelector("." + classNames3.checkboxWrapper)) {
            element2.classList.remove(classNames3.checklist);
            textContent.classList.remove(classNames3.checkbox);
            detach3(element2.querySelector("." + classNames3.checkboxWrapper));
          }
        } else {
          if (!element2.querySelector("." + classNames3.checkboxWrapper)) {
            element2.classList.add(classNames3.checklist);
            textContent.classList.add(classNames3.checkbox);
            if (this.listViewInstance.checkBoxPosition === "Left") {
              textContent.classList.add("e-checkbox-left");
            } else {
              textContent.classList.add("e-checkbox-right");
            }
            textContent.append(this.checkListWrapper.cloneNode(true));
          }
        }
      }
    };
    Virtualization2.prototype.changeElementAttributes = function(element2, index) {
      element2.classList.remove(classNames3.disable);
      if (this.uiIndices.disabledItemIndices.length && this.uiIndices.disabledItemIndices.indexOf(index) !== -1) {
        element2.classList.add(classNames3.disable);
      }
      element2.style.display = "";
      if (this.uiIndices.hiddenItemIndices.length && this.uiIndices.hiddenItemIndices.indexOf(index) !== -1) {
        element2.style.display = "none";
      }
      if (this.listViewInstance.showCheckBox) {
        var checklistElement = element2.querySelector("." + classNames3.checkboxWrapper);
        element2.classList.remove(classNames3.selected);
        element2.classList.remove(classNames3.focused);
        if (checklistElement) {
          checklistElement.removeAttribute("aria-checked");
          checklistElement.firstElementChild.classList.remove(classNames3.checked);
        }
        if (this.uiIndices.activeIndices.length && this.uiIndices.activeIndices.indexOf(index) !== -1 && !this.listViewInstance.curUL.querySelector(classNames3.selected)) {
          element2.classList.add(classNames3.selected);
          checklistElement.firstElementChild.classList.add(classNames3.checked);
          checklistElement.setAttribute("aria-checked", "true");
          if (this.activeIndex === index) {
            element2.classList.add(classNames3.focused);
          }
        }
      } else {
        element2.classList.remove(classNames3.selected);
        element2.removeAttribute("aria-selected");
        if (!isNullOrUndefined3(this.activeIndex) && this.activeIndex === index && !this.listViewInstance.curUL.querySelector(classNames3.selected)) {
          element2.classList.add(classNames3.selected);
          element2.setAttribute("aria-selected", "true");
        }
      }
      if (this.listViewInstance.fields.groupBy) {
        if (this.listViewInstance.curViewDS[index].isHeader) {
          if (element2.classList.contains(classNames3.listItem)) {
            element2.classList.remove(classNames3.listItem);
            element2.setAttribute("role", "group");
            element2.classList.add(classNames3.groupListItem);
          }
        } else {
          if (element2.classList.contains(classNames3.groupListItem)) {
            element2.classList.remove(classNames3.groupListItem);
            element2.setAttribute("role", "listitem");
            element2.classList.add(classNames3.listItem);
          }
        }
      }
    };
    Virtualization2.prototype.findDSAndIndexFromId = function(ds, fields) {
      var _this = this;
      var resultJSON = {};
      fields = this.listViewInstance.getElementUID(fields);
      if (!isNullOrUndefined3(fields)) {
        ds.some(function(data, index) {
          if (fields[_this.listViewInstance.fields.id] && fields[_this.listViewInstance.fields.id] === (data[_this.listViewInstance.fields.id] && data[_this.listViewInstance.fields.id]) || fields === data) {
            resultJSON.index = index;
            resultJSON.data = data;
            return true;
          } else {
            return false;
          }
        });
      }
      return resultJSON;
    };
    Virtualization2.prototype.getSelectedItems = function() {
      var _this = this;
      if (!isNullOrUndefined3(this.activeIndex) || this.listViewInstance.showCheckBox && this.uiIndices.activeIndices.length) {
        var dataCollection = [];
        var textCollection = [];
        if (typeof this.listViewInstance.dataSource[0] === "string" || typeof this.listViewInstance.dataSource[0] === "number") {
          var curViewDS_1 = this.listViewInstance.curViewDS;
          if (this.listViewInstance.showCheckBox) {
            var indices = this.uiIndices.activeIndices;
            for (var i = 0; i < indices.length; i++) {
              dataCollection.push(curViewDS_1[indices[i]]);
            }
            return {
              text: dataCollection,
              data: dataCollection,
              index: this.uiIndices.activeIndices.map(function(index) {
                return _this.listViewInstance.dataSource.indexOf(curViewDS_1[index]);
              })
            };
          } else {
            return {
              text: curViewDS_1[this.activeIndex],
              data: curViewDS_1[this.activeIndex],
              index: this.listViewInstance.dataSource.indexOf(curViewDS_1[this.activeIndex])
            };
          }
        } else {
          var curViewDS_2 = this.listViewInstance.curViewDS;
          var text = this.listViewInstance.fields.text;
          if (this.listViewInstance.showCheckBox) {
            var indexArray = this.uiIndices.activeIndices;
            for (var i = 0; i < indexArray.length; i++) {
              textCollection.push(curViewDS_2[indexArray[i]]["" + text]);
              dataCollection.push(curViewDS_2[indexArray[parseInt(i.toString(), 10)]]);
            }
            var dataSource_1 = this.listViewInstance.dataSource instanceof DataManager2 ? curViewDS_2 : this.listViewInstance.dataSource;
            return {
              text: textCollection,
              data: dataCollection,
              index: this.uiIndices.activeIndices.map(function(index) {
                return dataSource_1.indexOf(curViewDS_2[index]);
              })
            };
          } else {
            var dataSource = this.listViewInstance.dataSource instanceof DataManager2 ? curViewDS_2 : this.listViewInstance.dataSource;
            return {
              text: curViewDS_2[this.activeIndex][this.listViewInstance.fields.text],
              data: curViewDS_2[this.activeIndex],
              index: dataSource.indexOf(curViewDS_2[this.activeIndex])
            };
          }
        }
      } else {
        return void 0;
      }
    };
    Virtualization2.prototype.selectItem = function(obj) {
      var _this = this;
      var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
      if (Object.keys(resutJSON).length) {
        var isSelected = this.activeIndex === resutJSON.index;
        var isChecked_1;
        this.activeIndex = resutJSON.index;
        if (this.listViewInstance.showCheckBox) {
          if (this.uiIndices.activeIndices.indexOf(resutJSON.index) === -1) {
            isChecked_1 = true;
            this.uiIndices.activeIndices.push(resutJSON.index);
          } else {
            isChecked_1 = false;
            this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(resutJSON.index), 1);
          }
          if (this.listViewInstance.curUL.querySelector("." + classNames3.focused)) {
            this.listViewInstance.curUL.querySelector("." + classNames3.focused).classList.remove(classNames3.focused);
          }
        }
        if (this.listViewInstance.getLiFromObjOrElement(obj)) {
          if (this.listViewInstance.showCheckBox) {
            this.listViewInstance.setCheckboxLI(this.listViewInstance.getLiFromObjOrElement(obj));
          } else {
            this.listViewInstance.setSelectLI(this.listViewInstance.getLiFromObjOrElement(obj));
          }
        } else {
          var eventArgs_1;
          if (typeof this.listViewInstance.dataSource[0] === "string" || typeof this.listViewInstance.dataSource[0] === "number") {
            eventArgs_1 = {
              text: this.listViewInstance.curViewDS[this.activeIndex],
              data: this.listViewInstance.curViewDS[this.activeIndex],
              index: this.activeIndex
            };
          } else {
            var curViewDS = this.listViewInstance.curViewDS;
            eventArgs_1 = {
              text: curViewDS[this.activeIndex][this.listViewInstance.fields.text],
              data: curViewDS[this.activeIndex],
              index: this.activeIndex
            };
          }
          if (this.listViewInstance.showCheckBox) {
            this.listViewInstance.trigger("select", eventArgs_1, function(observedArgs) {
              if (observedArgs.cancel) {
                if (!isChecked_1) {
                  eventArgs_1.isChecked = isChecked_1;
                  _this.uiIndices.activeIndices.push(resutJSON.index);
                } else {
                  eventArgs_1.isChecked = !isChecked_1;
                  _this.uiIndices.activeIndices.splice(_this.uiIndices.activeIndices.indexOf(resutJSON.index), 1);
                }
              }
            });
          } else if (!isSelected) {
            this.listViewInstance.removeSelect();
            this.listViewInstance.trigger("select", eventArgs_1, function(observedArgs) {
              if (observedArgs.cancel) {
                _this.activeIndex = void 0;
              }
            });
          }
        }
      } else if (isNullOrUndefined3(obj) && !this.listViewInstance.showCheckBox) {
        this.listViewInstance.removeSelect();
        this.activeIndex = void 0;
      }
    };
    Virtualization2.prototype.enableItem = function(obj) {
      var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
      if (Object.keys(resutJSON).length) {
        this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(resutJSON.index), 1);
      }
    };
    Virtualization2.prototype.disableItem = function(obj) {
      var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
      if (Object.keys(resutJSON).length && this.uiIndices.disabledItemIndices.indexOf(resutJSON.index) === -1) {
        this.uiIndices.disabledItemIndices.push(resutJSON.index);
      }
    };
    Virtualization2.prototype.showItem = function(obj) {
      var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
      if (Object.keys(resutJSON).length) {
        this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index), 1);
      }
    };
    Virtualization2.prototype.hideItem = function(obj) {
      var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
      if (Object.keys(resutJSON).length && this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index) === -1) {
        this.uiIndices.hiddenItemIndices.push(resutJSON.index);
      }
    };
    Virtualization2.prototype.removeItem = function(obj) {
      var dataSource;
      var curViewDS = this.listViewInstance.curViewDS;
      var resutJSON = this.findDSAndIndexFromId(curViewDS, obj);
      if (Object.keys(resutJSON).length) {
        dataSource = resutJSON.data;
        if (curViewDS[resutJSON.index - 1] && curViewDS[resutJSON.index - 1].isHeader && curViewDS[resutJSON.index - 1].items.length === 1) {
          this.removeUiItem(resutJSON.index - 1);
          this.removeUiItem(resutJSON.index - 1);
        } else {
          this.removeUiItem(resutJSON.index);
        }
      }
      var listDataSource = this.listViewInstance.dataSource instanceof DataManager2 ? this.listViewInstance.localData : this.listViewInstance.dataSource;
      var index = listDataSource.indexOf(dataSource);
      if (index !== -1) {
        listDataSource.splice(index, 1);
        this.listViewInstance.setViewDataSource(listDataSource);
      }
      this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll("li");
    };
    Virtualization2.prototype.setCheckboxLI = function(li, e) {
      var index = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"), li) + this.uiFirstIndex;
      this.activeIndex = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"), li) + this.uiFirstIndex;
      if (li.classList.contains(classNames3.selected)) {
        if (this.uiIndices.activeIndices.indexOf(index) === -1) {
          this.uiIndices.activeIndices.push(index);
        }
      } else {
        this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(index), 1);
      }
    };
    Virtualization2.prototype.setSelectLI = function(li, e) {
      this.activeIndex = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"), li) + this.uiFirstIndex;
    };
    Virtualization2.prototype.checkedItem = function(checked) {
      if (checked) {
        this.uiIndices.activeIndices = [];
        this.activeIndex = void 0;
        var data = this.listViewInstance.curViewDS;
        for (var index = 0; index < data.length; index++) {
          if (!data[index].isHeader) {
            this.uiIndices.activeIndices.push(index);
          }
        }
      } else {
        this.activeIndex = void 0;
        this.uiIndices.activeIndices = [];
      }
    };
    Virtualization2.prototype.addUiItem = function(index) {
      var curViewDs = this.listViewInstance.curViewDS;
      this.changeUiIndices(index, true);
      if (this.activeIndex && this.activeIndex >= index) {
        this.activeIndex++;
      }
      if (this.listViewInstance.showCheckBox && curViewDs[index][this.listViewInstance.fields.isChecked]) {
        this.uiIndices.activeIndices.push(index);
      }
      if (!parseFloat(this.bottomElement.style.height) && !parseFloat(this.topElement.style.height)) {
        this.bottomElement.style.height = parseFloat(this.bottomElement.style.height) + this.listItemHeight + "px";
      }
      if (parseFloat(this.bottomElement.style.height)) {
        var liItem = this.listViewInstance.curUL.lastElementChild.previousSibling;
        var target = this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 1]) || this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 2]);
        if (target) {
          this.bottomElement.style.height = parseFloat(this.bottomElement.style.height) + this.listItemHeight + "px";
          this.updateUI(liItem, index, target);
        }
      } else {
        var liItem = this.listViewInstance.curUL.firstElementChild.nextSibling;
        var target = void 0;
        if (Object.keys(this.listViewInstance.curViewDS).length - 1 === index) {
          target = this.listViewInstance.curUL.lastElementChild;
        } else {
          target = this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 1]) || this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 2]);
        }
        this.topElement.style.height = parseFloat(this.topElement.style.height) + this.listItemHeight + "px";
        this.uiFirstIndex++;
        this.uiLastIndex++;
        if (target) {
          this.updateUI(liItem, index, target);
          if (this.listViewInstance.isWindow === true) {
            window.scrollTo(0, pageYOffset + this.listItemHeight);
          } else {
            this.listViewInstance.element.scrollTop += this.listItemHeight;
          }
        }
      }
      this.totalHeight += this.listItemHeight;
      this.listDiff = Math.round(parseFloat(this.topElement.style.height) / this.listItemHeight);
    };
    Virtualization2.prototype.removeUiItem = function(index) {
      this.totalHeight -= this.listItemHeight;
      var curViewDS = this.listViewInstance.curViewDS[index];
      var liItem = this.listViewInstance.getLiFromObjOrElement(curViewDS);
      this.listViewInstance.curViewDS.splice(index, 1);
      if (this.activeIndex && this.activeIndex >= index) {
        this.activeIndex--;
      }
      if (liItem) {
        if (this.domItemCount > Object.keys(this.listViewInstance.curViewDS).length) {
          detach3(liItem);
          this.domItemCount--;
          this.uiLastIndex--;
          this.totalHeight = 0;
        } else {
          if (liItem.classList.contains(classNames3.disable)) {
            liItem.classList.remove(classNames3.disable);
            this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(index), 1);
          }
          if (liItem.style.display === "none") {
            liItem.style.display = "";
            this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(index), 1);
          }
          if (this.listViewInstance.showCheckBox && liItem.classList.contains(classNames3.selected)) {
            this.listViewInstance.removeSelect();
            this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(index), 1);
            var checklistElement = liItem.querySelector("." + classNames3.checkboxWrapper);
            checklistElement.removeAttribute("aria-checked");
            checklistElement.firstElementChild.classList.remove(classNames3.checked);
            if (liItem.classList.contains(classNames3.focused)) {
              liItem.classList.remove(classNames3.focused);
              this.activeIndex = void 0;
            }
          } else if (liItem.classList.contains(classNames3.selected)) {
            this.listViewInstance.removeSelect();
            this.activeIndex = void 0;
          }
          if (!parseFloat(this.bottomElement.style.height) && !parseFloat(this.topElement.style.height)) {
            this.updateUI(liItem, this.uiLastIndex, this.bottomElement);
          } else if (parseFloat(this.bottomElement.style.height)) {
            this.bottomElement.style.height = parseFloat(this.bottomElement.style.height) - this.listItemHeight + "px";
            this.updateUI(liItem, this.uiLastIndex, this.bottomElement);
          } else {
            this.topElement.style.height = parseFloat(this.topElement.style.height) - this.listItemHeight + "px";
            this.updateUI(liItem, this.uiFirstIndex - 1, this.topElement.nextSibling);
            this.uiLastIndex--;
            this.uiFirstIndex--;
          }
        }
      }
      this.changeUiIndices(index, false);
      this.listDiff = Math.round(parseFloat(this.topElement.style.height) / this.listItemHeight);
    };
    Virtualization2.prototype.changeUiIndices = function(index, increment) {
      var keys4 = Object.keys(this.uiIndices);
      for (var ind = 0; ind < keys4.length; ind++) {
        this.uiIndices[keys4[ind]] = this.uiIndices[keys4[ind]].map(function(i) {
          if (i >= index) {
            return increment ? ++i : --i;
          } else {
            return i;
          }
        });
      }
    };
    Virtualization2.prototype.addItem = function(data, fields, dataSource, index) {
      for (var i = 0; i < data.length; i++) {
        var currentItem = data[i];
        dataSource = this.listViewInstance.addItemAtIndex(index, dataSource, currentItem);
        this.listViewInstance.setViewDataSource(dataSource);
        if (!this.domItemCount) {
          if ((this.listViewInstance.template || this.listViewInstance.groupTemplate) && !this.isNgTemplate()) {
            this.listViewInstance.listBaseOption.template = null;
            this.listViewInstance.listBaseOption.groupTemplate = null;
            this.listViewInstance.listBaseOption.itemCreated = this.createUIItem.bind(this);
          }
          this.uiVirtualization();
        } else if (this.domItemCount < this.expectedDomItemCount) {
          var ds = this.listViewInstance.findItemFromDS(dataSource, fields);
          if (ds instanceof Array) {
            if (this.listViewInstance.ulElement) {
              var index_1 = this.listViewInstance.curViewDS.indexOf(currentItem);
              this.createAndInjectNewItem(currentItem, index_1);
              var curViewDS = this.listViewInstance.curViewDS[index_1 - 1];
              if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {
                --index_1;
                this.createAndInjectNewItem(curViewDS, index_1);
              }
            }
            this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll("li");
          }
        } else {
          var index_2 = this.listViewInstance.curViewDS.indexOf(currentItem);
          this.addUiItem(index_2);
          var curViewDS = this.listViewInstance.curViewDS[index_2 - 1];
          if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {
            this.addUiItem(index_2 - 1);
          }
        }
      }
    };
    Virtualization2.prototype.createAndInjectNewItem = function(itemData, index) {
      var target;
      var li = ListBase.createListItemFromJson(this.listViewInstance.createElement, [itemData], this.listViewInstance.listBaseOption, null, null, this.listViewInstance);
      if (Object.keys(this.listViewInstance.curViewDS).length - 1 === index) {
        target = this.listViewInstance.curUL.lastElementChild;
      } else {
        target = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 1]) || this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 2]);
      }
      if (this.listViewInstance.fields.groupBy && this.listViewInstance.curViewDS[index + 1] && this.listViewInstance.curViewDS[index + 1].isHeader) {
        var targetEle = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index - 1]);
        if (targetEle) {
          target = targetEle.nextElementSibling;
        }
      }
      this.listViewInstance.ulElement.insertBefore(li[0], target);
      this.domItemCount++;
      if (this.bottomElementHeight <= 0) {
        this.uiLastIndex++;
      }
      this.refreshItemHeight();
    };
    Virtualization2.prototype.createUIItem = function(args) {
      if (!args.item.classList.contains("e-list-group-item")) {
        this.templateData = args.curData.isHeader ? args.curData.items[0] : args.curData;
        if (this.listViewInstance.showCheckBox) {
          this.listViewInstance.renderCheckbox(args);
          if (!isNullOrUndefined3(this.listViewInstance.virtualCheckBox) && !isNullOrUndefined3(this.listViewInstance.virtualCheckBox.outerHTML)) {
            var div_1 = document.createElement("div");
            var commonTemplate = '<div class="e-text-content" role="presentation"> <span class="e-list-text"> ${' + this.listViewInstance.fields.text + "} </span></div>";
            var templateFunction = compile6(this.listViewInstance.template || commonTemplate, this.listViewInstance);
            var nodes = templateFunction(this.templateData, this.listViewInstance);
            if (this.listViewInstance.template && this.listViewInstance.isReact) {
              this.listViewInstance.renderReactTemplates();
            }
            [].slice.call(nodes).forEach(function(ele) {
              div_1.appendChild(ele);
            });
            if (div_1.children && div_1.children[0]) {
              div_1.children[0].classList.add("e-checkbox");
              if (this.listViewInstance.checkBoxPosition === "Left") {
                div_1.children[0].classList.add("e-checkbox-left");
              } else {
                div_1.children[0].classList.add("e-checkbox-right");
              }
              if (this.listViewInstance.checkBoxPosition === "Left") {
                div_1.children[0].insertBefore(this.listViewInstance.virtualCheckBox, div_1.childNodes[0].children[0]);
              } else {
                div_1.children[0].appendChild(this.listViewInstance.virtualCheckBox);
              }
              while (args.item.lastChild) {
                args.item.removeChild(args.item.lastChild);
              }
              [].slice.call(div_1.children).forEach(function(ele) {
                args.item.appendChild(ele);
              });
            }
          }
        }
      }
    };
    Virtualization2.prototype.reRenderUiVirtualization = function() {
      this.wireScrollEvent(true);
      if (this.listViewInstance.contentContainer) {
        detach3(this.listViewInstance.contentContainer);
      }
      this.listViewInstance.preRender();
      this.domItemCount = 0;
      this.listViewInstance.header();
      this.listViewInstance.setLocalData();
    };
    Virtualization2.prototype.updateUI = function(element2, index, targetElement2) {
      var onChange = this.isNgTemplate() ? this.onNgChange : this.onChange;
      if (this.listViewInstance.template || this.listViewInstance.groupTemplate) {
        var curViewDS = this.listViewInstance.curViewDS[index];
        element2.dataset.uid = curViewDS[this.listViewInstance.fields.id] ? curViewDS[this.listViewInstance.fields.id] : ListBase.generateId();
        onChange(curViewDS, element2, this);
      } else {
        this.updateUiContent(element2, index);
      }
      this.changeElementAttributes(element2, index);
      if (targetElement2) {
        this.listViewInstance.ulElement.insertBefore(element2, targetElement2);
      }
    };
    Virtualization2.prototype.onChange = function(newData, listElement, virtualThis) {
      var liItem = ListBase.createListItemFromJson(virtualThis.listViewInstance.createElement, [newData], virtualThis.listViewInstance.listBaseOption, null, null, virtualThis.listViewInstance);
      if (virtualThis.listViewInstance.isReact) {
        virtualThis.listViewInstance.renderReactTemplates();
      }
      while (listElement.lastChild) {
        listElement.removeChild(listElement.lastChild);
      }
      [].slice.call(liItem[0].children).forEach(function(ele) {
        listElement.appendChild(ele);
      });
    };
    Virtualization2.prototype.onNgChange = function(newData, listElement, virtualThis) {
      var templateCompiler = compile6(virtualThis.listViewInstance.template);
      var resultElement = templateCompiler(newData);
      while (listElement.lastChild) {
        listElement.removeChild(listElement.lastChild);
      }
      listElement.appendChild(resultElement[0]);
    };
    Virtualization2.prototype.getModuleName = function() {
      return "virtualization";
    };
    Virtualization2.prototype.destroy = function() {
      this.wireScrollEvent(true);
      this.topElement = null;
      this.bottomElement = null;
    };
    return Virtualization2;
  }()
);

// node_modules/@syncfusion/ej2-lists/src/sortable/sortable.js
var __extends47 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate46 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Sortable = (
  /** @class */
  function(_super) {
    __extends47(Sortable2, _super);
    function Sortable2(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.getHelper = function(e) {
        var target = _this.getSortableElement(e.sender.target);
        if (!_this.isValidTarget(target, _this)) {
          return false;
        }
        var element3;
        if (_this.helper) {
          element3 = _this.helper({
            sender: target,
            element: e.element
          });
        } else {
          element3 = target.cloneNode(true);
          element3.style.width = target.offsetWidth + "px";
          element3.style.height = target.offsetHeight + "px";
        }
        addClass3([element3], ["e-sortableclone"]);
        document.body.appendChild(element3);
        return element3;
      };
      _this.onDrag = function(e) {
        if (!e.target) {
          return;
        }
        _this.trigger("drag", {
          event: e.event,
          element: _this.element,
          target: e.target
        });
        var newInst = _this.getSortableInstance(e.target);
        var target = _this.getSortableElement(e.target, newInst);
        if ((_this.isValidTarget(target, newInst) || e.target && typeof e.target.className === "string" && e.target.className.indexOf("e-list-group-item") > -1) && (_this.curTarget !== target || !isNullOrUndefined3(newInst.placeHolder)) && (newInst.placeHolderElement ? newInst.placeHolderElement !== e.target : true)) {
          if (e.target.classList.contains("e-list-group-item")) {
            target = e.target;
          }
          _this.curTarget = target;
          if (_this.target === target) {
            return;
          }
          var oldIdx = _this.getIndex(newInst.placeHolderElement, newInst);
          var placeHolder = _this.getPlaceHolder(target, newInst);
          var newIdx = void 0;
          if (placeHolder) {
            oldIdx = isNullOrUndefined3(oldIdx) ? _this.getIndex(_this.target) : oldIdx;
            newIdx = _this.getIndex(target, newInst, e.event);
            var isPlaceHolderPresent = _this.isPlaceHolderPresent(newInst);
            if (isPlaceHolderPresent && oldIdx === newIdx) {
              return;
            }
            if (isPlaceHolderPresent) {
              _this.removePlaceHolder(newInst);
            }
            newInst.placeHolderElement = placeHolder;
            if (e.target && typeof e.target.className === "string" && e.target.className.indexOf("e-list-group-item") > -1) {
              newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[newIdx]);
            } else if (newInst.element !== _this.element && newIdx === newInst.element.childElementCount) {
              newInst.element.appendChild(newInst.placeHolderElement);
            } else {
              newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[newIdx]);
            }
          } else {
            oldIdx = isNullOrUndefined3(oldIdx) ? _this.getIndex(_this.target) : _this.getIndex(target, newInst) < oldIdx || !oldIdx ? oldIdx : oldIdx - 1;
            newIdx = _this.getIndex(target, newInst);
            var idx = newInst.element !== _this.element ? newIdx : oldIdx < newIdx ? newIdx + 1 : newIdx;
            _this.updateItemClass(newInst);
            newInst.element.insertBefore(_this.target, newInst.element.children[idx]);
            _this.curTarget = _this.target;
            _this.trigger("drop", {
              droppedElement: _this.target,
              element: newInst.element,
              previousIndex: oldIdx,
              currentIndex: newIdx,
              target: e.target,
              helper: document.getElementsByClassName("e-sortableclone")[0],
              event: e.event,
              scope: _this.scope
            });
          }
        } else if (_this.curTarget !== _this.target && _this.scope && _this.curTarget !== target && !isNullOrUndefined3(newInst.placeHolder)) {
          _this.removePlaceHolder(_this.getSortableInstance(_this.curTarget));
          _this.curTarget = _this.target;
        }
        newInst = _this.getSortableInstance(_this.curTarget);
        if (isNullOrUndefined3(target) && e.target !== newInst.placeHolderElement) {
          if (_this.isPlaceHolderPresent(newInst)) {
            _this.removePlaceHolder(newInst);
          }
        } else {
          var placeHolders = [].slice.call(document.getElementsByClassName("e-sortable-placeholder"));
          var inst_1;
          placeHolders.forEach(function(placeHolder2) {
            inst_1 = _this.getSortableInstance(placeHolder2);
            if (inst_1.element && inst_1 !== newInst) {
              _this.removePlaceHolder(inst_1);
            }
          });
        }
      };
      _this.onDragStart = function(e) {
        _this.target = _this.getSortableElement(e.target);
        var cancelDrag = false;
        _this.target.classList.add("e-grabbed");
        _this.curTarget = _this.target;
        e.helper = document.getElementsByClassName("e-sortableclone")[0];
        var args = {
          cancel: false,
          element: _this.element,
          target: _this.target
        };
        _this.trigger("beforeDragStart", args, function(observedArgs) {
          if (observedArgs.cancel) {
            cancelDrag = observedArgs.cancel;
            _this.onDragStop(e);
          }
        });
        if (cancelDrag) {
          return;
        }
        if (isBlazor3) {
          _this.trigger("dragStart", {
            event: e.event,
            element: _this.element,
            target: _this.target,
            bindEvents: e.bindEvents,
            dragElement: e.dragElement
          });
        } else {
          _this.trigger("dragStart", {
            event: e.event,
            element: _this.element,
            target: _this.target
          });
        }
      };
      _this.onDragStop = function(e) {
        var dropInst = _this.getSortableInstance(_this.curTarget);
        var prevIdx;
        var curIdx;
        var handled;
        prevIdx = _this.getIndex(_this.target);
        var isPlaceHolderPresent = _this.isPlaceHolderPresent(dropInst);
        if (isPlaceHolderPresent) {
          var curIdx_1 = _this.getIndex(dropInst.placeHolderElement, dropInst);
          prevIdx = _this === dropInst && prevIdx - curIdx_1 >= 1 ? prevIdx - 1 : prevIdx;
          var args = {
            previousIndex: prevIdx,
            currentIndex: curIdx_1,
            target: e.target,
            droppedElement: _this.target,
            helper: e.helper,
            cancel: false,
            handled: false
          };
          _this.trigger("beforeDrop", args, function(observedArgs) {
            if (!observedArgs.cancel) {
              handled = observedArgs.handled;
              _this.updateItemClass(dropInst);
              if (observedArgs.handled) {
                var ele = _this.target.cloneNode(true);
                _this.target.classList.remove("e-grabbed");
                _this.target = ele;
              }
              dropInst.element.insertBefore(_this.target, dropInst.placeHolderElement);
              var curIdx_2 = _this.getIndex(_this.target, dropInst);
              prevIdx = _this === dropInst && prevIdx - curIdx_2 >= 1 ? prevIdx - 1 : prevIdx;
              _this.trigger("drop", {
                event: e.event,
                element: dropInst.element,
                previousIndex: prevIdx,
                currentIndex: curIdx_2,
                target: e.target,
                helper: e.helper,
                droppedElement: _this.target,
                scopeName: _this.scope,
                handled
              });
            }
            _this.removePlaceHolder(dropInst);
          });
        }
        dropInst = _this.getSortableInstance(e.target);
        curIdx = dropInst.element.childElementCount;
        prevIdx = _this.getIndex(_this.target);
        if (dropInst.element.querySelector(".e-list-nrt")) {
          curIdx = curIdx - 1;
        }
        if (_this.curTarget === _this.target && e.target === _this.curTarget) {
          curIdx = prevIdx;
        }
        if (dropInst.element === e.target || !isPlaceHolderPresent && _this.curTarget === _this.target) {
          var beforeDropArgs = {
            previousIndex: prevIdx,
            currentIndex: curIdx,
            target: e.target,
            droppedElement: _this.target,
            helper: e.helper,
            cancel: false
          };
          _this.trigger("beforeDrop", beforeDropArgs, function(observedArgs) {
            if ((dropInst.element === e.target || typeof e.target.className === "string" && e.target.className.indexOf("e-list-nrt") > -1 || typeof e.target.className === "string" && e.target.className.indexOf("e-list-nr-template") > -1 || e.target.closest(".e-list-nr-template")) && !observedArgs.cancel) {
              _this.updateItemClass(dropInst);
              dropInst.element.appendChild(_this.target);
              _this.trigger("drop", {
                event: e.event,
                element: dropInst.element,
                previousIndex: prevIdx,
                currentIndex: curIdx,
                target: e.target,
                helper: e.helper,
                droppedElement: _this.target,
                scopeName: _this.scope
              });
            }
          });
        }
        _this.target.classList.remove("e-grabbed");
        _this.target = null;
        _this.curTarget = null;
        remove2(e.helper);
        getComponent2(_this.element, "draggable").intDestroy(e.event);
      };
      _this.bind();
      return _this;
    }
    Sortable_1 = Sortable2;
    Sortable2.prototype.bind = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID2("sortable");
      }
      if (!this.itemClass) {
        this.itemClass = "e-sort-item";
        this.dataBind();
      }
      this.initializeDraggable();
    };
    Sortable2.prototype.initializeDraggable = function() {
      new Draggable3(this.element, {
        helper: this.getHelper,
        dragStart: this.onDragStart,
        drag: this.onDrag,
        dragStop: this.onDragStop,
        dragTarget: "." + this.itemClass,
        enableTapHold: true,
        tapHoldThreshold: 200,
        queryPositionInfo: this.queryPositionInfo,
        distance: 1
      });
      this.wireEvents();
    };
    Sortable2.prototype.wireEvents = function() {
      var wrapper = this.element;
      EventHandler3.add(wrapper, "keydown", this.keyDownHandler, this);
    };
    Sortable2.prototype.unwireEvents = function() {
      var wrapper = this.element;
      EventHandler3.remove(wrapper, "keydown", this.keyDownHandler);
    };
    Sortable2.prototype.keyDownHandler = function(e) {
      if (e.keyCode === 27) {
        var dragStop2 = getComponent2(this.element, "draggable");
        if (dragStop2) {
          dragStop2.intDestroy(null);
        }
        var dragWrapper = document.getElementsByClassName("e-sortableclone")[0];
        if (dragWrapper) {
          dragWrapper.remove();
        }
        var dragPlaceholder = document.getElementsByClassName("e-sortable-placeholder")[0];
        if (dragPlaceholder) {
          dragPlaceholder.remove();
        }
      }
    };
    Sortable2.prototype.getPlaceHolder = function(target, instance) {
      if (instance.placeHolder) {
        var placeHolderElement = instance.placeHolder({
          element: instance.element,
          grabbedElement: this.target,
          target
        });
        placeHolderElement.classList.add("e-sortable-placeholder");
        return placeHolderElement;
      }
      return null;
    };
    Sortable2.prototype.isValidTarget = function(target, instance) {
      return target && compareElementParent3(target, instance.element) && target.classList.contains(instance.itemClass) && !target.classList.contains("e-disabled");
    };
    Sortable2.prototype.removePlaceHolder = function(instance) {
      remove2(instance.placeHolderElement);
      instance.placeHolderElement = null;
    };
    Sortable2.prototype.updateItemClass = function(instance) {
      if (this !== instance) {
        this.target.classList.remove(this.itemClass);
        this.target.classList.add(instance.itemClass);
      }
    };
    Sortable2.prototype.getSortableInstance = function(element2) {
      element2 = closest3(element2, ".e-" + this.getModuleName());
      if (element2) {
        var inst = getComponent2(element2, Sortable_1);
        return inst.scope && this.scope && inst.scope === this.scope ? inst : this;
      } else {
        return this;
      }
    };
    Sortable2.prototype.getIndex = function(target, instance, e) {
      if (instance === void 0) {
        instance = this;
      }
      var idx;
      var placeHolderPresent;
      [].slice.call(instance.element.children).forEach(function(element2, index) {
        if (element2.classList.contains("e-sortable-placeholder")) {
          placeHolderPresent = true;
        }
        if (element2 === target) {
          idx = index;
          if (!isNullOrUndefined3(e)) {
            if (placeHolderPresent) {
              idx -= 1;
            }
            var offset = target.getBoundingClientRect();
            var clientY = offset.bottom - (offset.bottom - offset.top) / 2;
            var cltY = e.changedTouches ? e.changedTouches[0].clientY : e.clientY;
            idx = cltY <= clientY ? idx : idx + 1;
          }
          return;
        }
      });
      return idx;
    };
    Sortable2.prototype.getSortableElement = function(element2, instance) {
      if (instance === void 0) {
        instance = this;
      }
      return closest3(element2, "." + instance.itemClass);
    };
    Sortable2.prototype.queryPositionInfo = function(value) {
      value.left = pageXOffset ? parseFloat(value.left) - pageXOffset + "px" : value.left;
      value.top = pageYOffset ? parseFloat(value.top) - pageYOffset + "px" : value.top;
      return value;
    };
    Sortable2.prototype.isPlaceHolderPresent = function(instance) {
      return instance.placeHolderElement && !!closest3(instance.placeHolderElement, "#" + instance.element.id);
    };
    Sortable2.prototype.moveTo = function(destination, targetIndexes, insertBefore) {
      moveTo(this.element, destination, targetIndexes, insertBefore);
    };
    Sortable2.prototype.destroy = function() {
      this.unwireEvents();
      if (this.itemClass === "e-sort-item") {
        this.itemClass = null;
        this.dataBind();
      }
      getComponent2(this.element, Draggable3).destroy();
      _super.prototype.destroy.call(this);
    };
    Sortable2.prototype.getModuleName = function() {
      return "sortable";
    };
    Sortable2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "itemClass":
            [].slice.call(this.element.children).forEach(function(element2) {
              if (element2.classList.contains(oldProp.itemClass)) {
                element2.classList.remove(oldProp.itemClass);
              }
              if (newProp.itemClass) {
                element2.classList.add(newProp.itemClass);
              }
            });
            break;
        }
      }
    };
    var Sortable_1;
    __decorate46([Property3(false)], Sortable2.prototype, "enableAnimation", void 0);
    __decorate46([Property3(null)], Sortable2.prototype, "itemClass", void 0);
    __decorate46([Property3(null)], Sortable2.prototype, "scope", void 0);
    __decorate46([Property3()], Sortable2.prototype, "helper", void 0);
    __decorate46([Property3()], Sortable2.prototype, "placeHolder", void 0);
    __decorate46([Event4()], Sortable2.prototype, "drag", void 0);
    __decorate46([Event4()], Sortable2.prototype, "beforeDragStart", void 0);
    __decorate46([Event4()], Sortable2.prototype, "dragStart", void 0);
    __decorate46([Event4()], Sortable2.prototype, "beforeDrop", void 0);
    __decorate46([Event4()], Sortable2.prototype, "drop", void 0);
    Sortable2 = Sortable_1 = __decorate46([NotifyPropertyChanges3], Sortable2);
    return Sortable2;
  }(Base3)
);
function moveTo(from, to, targetIndexes, insertBefore) {
  var targetElements = [];
  if (!to) {
    to = from;
  }
  if (targetIndexes && targetIndexes.length) {
    targetIndexes.forEach(function(index) {
      targetElements.push(from.children[index]);
    });
  } else {
    targetElements = [].slice.call(from.children);
  }
  if (isNullOrUndefined3(insertBefore)) {
    targetElements.forEach(function(target) {
      to.appendChild(target);
    });
  } else {
    var insertElement_1 = to.children[insertBefore];
    targetElements.forEach(function(target) {
      to.insertBefore(target, insertElement_1);
    });
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-notifications/src/toast/toast.js
var __extends48 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate47 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ROOT3 = "e-toast";
var CONTAINER = "e-toast-container";
var TITLE = "e-toast-title";
var WIDTHFULL = "e-toast-full-width";
var CONTENT2 = "e-toast-content";
var MESSAGE = "e-toast-message";
var ICON3 = "e-toast-icon";
var PROGRESS = "e-toast-progress";
var ACTIOBUTTONS = "e-toast-actions";
var CLOSEBTN = "e-toast-close-icon";
var RTL9 = "e-rtl";
var TOAST_BLAZOR_HIDDEN = "e-blazor-toast-hidden";
var ToastPosition = (
  /** @class */
  function(_super) {
    __extends48(ToastPosition2, _super);
    function ToastPosition2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate47([Property2("Left")], ToastPosition2.prototype, "X", void 0);
    __decorate47([Property2("Top")], ToastPosition2.prototype, "Y", void 0);
    return ToastPosition2;
  }(ChildProperty2)
);
var ButtonModelProps = (
  /** @class */
  function(_super) {
    __extends48(ButtonModelProps2, _super);
    function ButtonModelProps2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate47([Property2(null)], ButtonModelProps2.prototype, "model", void 0);
    __decorate47([Property2(null)], ButtonModelProps2.prototype, "click", void 0);
    return ButtonModelProps2;
  }(ChildProperty2)
);
var ToastAnimations = (
  /** @class */
  function(_super) {
    __extends48(ToastAnimations2, _super);
    function ToastAnimations2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate47([Property2("FadeIn")], ToastAnimations2.prototype, "effect", void 0);
    __decorate47([Property2(600)], ToastAnimations2.prototype, "duration", void 0);
    __decorate47([Property2("ease")], ToastAnimations2.prototype, "easing", void 0);
    return ToastAnimations2;
  }(ChildProperty2)
);
var ToastAnimationSettings = (
  /** @class */
  function(_super) {
    __extends48(ToastAnimationSettings2, _super);
    function ToastAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate47([Complex2({
      effect: "FadeIn",
      duration: 600,
      easing: "ease"
    }, ToastAnimations)], ToastAnimationSettings2.prototype, "show", void 0);
    __decorate47([Complex2({
      effect: "FadeOut",
      duration: 600,
      easing: "ease"
    }, ToastAnimations)], ToastAnimationSettings2.prototype, "hide", void 0);
    return ToastAnimationSettings2;
  }(ChildProperty2)
);
var Toast = (
  /** @class */
  function(_super) {
    __extends48(Toast2, _super);
    function Toast2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.toastCollection = [];
      _this.needsID = true;
      return _this;
    }
    Toast2.prototype.getModuleName = function() {
      return "toast";
    };
    Toast2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Toast2.prototype.destroy = function() {
      this.hide("All");
      this.element.classList.remove(CONTAINER);
      setStyleAttribute2(this.element, {
        "position": "",
        "z-index": ""
      });
      if (!isNullOrUndefined2(this.refElement) && !isNullOrUndefined2(this.refElement.parentElement)) {
        this.refElement.parentElement.insertBefore(this.element, this.refElement);
        detach2(this.refElement);
        this.refElement = void 0;
      }
      if (!this.isBlazorServer()) {
        _super.prototype.destroy.call(this);
      }
    };
    Toast2.prototype.preRender = function() {
      this.isDevice = Browser2.isDevice;
      if (this.width === "300px") {
        this.width = this.isDevice && screen.width < 768 ? "100%" : "300px";
      }
      if (isNullOrUndefined2(this.target)) {
        this.target = document.body;
      }
      if (this.enableRtl && !this.isBlazorServer()) {
        this.element.classList.add(RTL9);
      }
    };
    Toast2.prototype.render = function() {
      this.progressObj = [];
      this.intervalId = [];
      this.contentTemplate = null;
      this.toastTemplate = null;
      this.renderComplete();
      this.initRenderClass = this.element.className;
    };
    Toast2.prototype.show = function(toastObj) {
      var collectionObj;
      if (!isNullOrUndefined2(toastObj)) {
        this.templateChanges(toastObj);
        collectionObj = JSON.parse(JSON.stringify(toastObj));
        extend2(this, this, toastObj);
      }
      if (isNullOrUndefined2(this.toastContainer)) {
        this.toastContainer = this.getContainer();
        var target = typeof this.target === "string" ? document.querySelector(this.target) : typeof this.target === "object" ? this.target : document.body;
        if (isNullOrUndefined2(target)) {
          return;
        }
        if (target.tagName === "BODY") {
          this.toastContainer.style.position = "fixed";
        } else {
          this.toastContainer.style.position = "absolute";
          target.style.position = "relative";
        }
        this.setPositioning(this.position);
        target.appendChild(this.toastContainer);
      }
      if (this.isBlazorServer() && this.element.classList.contains("e-control")) {
        this.isToastModel(toastObj);
        return;
      }
      this.toastEle = this.createElement("div", {
        className: ROOT3,
        id: getUniqueID("toast")
      });
      this.setWidthHeight();
      this.setCSSClass(this.cssClass);
      if (isNullOrUndefined2(this.template) || this.template === "") {
        this.personalizeToast();
      } else {
        this.templateRendering();
      }
      this.setProgress();
      this.setCloseButton();
      this.setAria();
      this.appendToTarget(toastObj);
      if (this.isDevice && screen.width < 768) {
        new Touch2(this.toastEle, {
          swipe: this.swipeHandler.bind(this)
        });
      }
      if (!isNullOrUndefined2(collectionObj)) {
        extend2(collectionObj, {
          element: [this.toastEle]
        }, true);
        this.toastCollection.push(collectionObj);
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Toast2.prototype.showToast = function(id, toastObj) {
      this.toastEle = this.element.querySelector("#" + id);
      this.show(toastObj);
    };
    Toast2.prototype.isToastModel = function(toastObj) {
      this.toastContainer = this.element;
      this.setPositioning(this.position);
      var proxy = this;
      if (!isNullOrUndefined2(proxy.element.lastElementChild)) {
        this.setProgress();
      }
      this.setAria();
      this.appendToTarget(toastObj);
    };
    Toast2.prototype.swipeHandler = function(e) {
      var toastEle = closest2(e.originalEvent.target, "." + ROOT3 + ":not(." + CONTAINER + ")");
      var hideAnimation = this.animation.hide.effect;
      if (!isNullOrUndefined2(toastEle)) {
        if (e.swipeDirection === "Right") {
          this.animation.hide.effect = "SlideRightOut";
          this.hideToast("swipe", toastEle);
        } else if (e.swipeDirection === "Left") {
          this.animation.hide.effect = "SlideLeftOut";
          this.hideToast("swipe", toastEle);
        }
        this.animation.hide.effect = hideAnimation;
      }
    };
    Toast2.prototype.templateChanges = function(toastObj) {
      if (!isUndefined2(toastObj.content) && !isNullOrUndefined2(this.contentTemplate) && this.content !== toastObj.content) {
        this.clearContentTemplate();
      }
      if (!isUndefined2(toastObj.template) && !isNullOrUndefined2(this.toastTemplate) && this.template !== toastObj.template) {
        this.clearToastTemplate();
      }
    };
    Toast2.prototype.setCSSClass = function(cssClass2) {
      if (cssClass2) {
        var split = cssClass2.indexOf(",") !== -1 ? "," : " ";
        classList(this.toastEle, cssClass2.split(split), []);
        if (this.toastContainer) {
          classList(this.toastContainer, cssClass2.split(split), []);
        }
      }
    };
    Toast2.prototype.setWidthHeight = function() {
      if (this.width === "300px") {
        this.toastEle.style.width = formatUnit(this.width);
      } else if (this.width === "100%") {
        this.toastContainer.classList.add(WIDTHFULL);
      } else {
        this.toastEle.style.width = formatUnit(this.width);
        this.toastContainer.classList.remove(WIDTHFULL);
      }
      this.toastEle.style.height = formatUnit(this.height);
    };
    Toast2.prototype.templateRendering = function() {
      this.fetchEle(this.toastEle, this.template, "template");
    };
    Toast2.prototype.sanitizeHelper = function(value) {
      if (this.enableHtmlSanitizer) {
        var item = SanitizeHtmlHelper2.beforeSanitize();
        var beforeEvent = {
          cancel: false,
          helper: null
        };
        extend2(item, item, beforeEvent);
        this.trigger("beforeSanitizeHtml", item);
        if (item.cancel && !isNullOrUndefined2(item.helper)) {
          value = item.helper(value);
        } else if (!item.cancel) {
          value = SanitizeHtmlHelper2.serializeValue(item, value);
        }
      }
      return value;
    };
    Toast2.prototype.hide = function(element2) {
      this.hideToast("", element2);
    };
    Toast2.prototype.hideToast = function(interactionType, element2) {
      if (isNullOrUndefined2(this.toastContainer) || this.toastContainer.childElementCount === 0) {
        return;
      }
      if (typeof element2 === "string" && element2 === "All") {
        for (var i = 0; i < this.toastContainer.childElementCount; i++) {
          this.destroyToast(this.toastContainer.children[i], interactionType);
        }
        return;
      }
      if (isNullOrUndefined2(element2)) {
        element2 = this.newestOnTop ? this.toastContainer.lastElementChild : this.toastContainer.firstElementChild;
      }
      this.destroyToast(element2, interactionType);
    };
    Toast2.prototype.fetchEle = function(ele, value, prob) {
      value = typeof value === "string" ? this.sanitizeHelper(value) : value;
      var templateFn;
      var tempVar;
      var tmpArray;
      var templateProps;
      if (ele.classList.contains(TITLE)) {
        templateProps = this.element.id + "title";
      } else if (ele.classList.contains(CONTENT2)) {
        templateProps = this.element.id + "content";
      } else {
        templateProps = this.element.id + "template";
      }
      if (prob === "content") {
        tempVar = this.contentTemplate;
      } else {
        tempVar = this.toastTemplate;
      }
      if (!isNullOrUndefined2(tempVar)) {
        ele.appendChild(tempVar.cloneNode(true));
        return ele;
      }
      try {
        if (typeof value !== "function" && document.querySelectorAll(value).length > 0) {
          var elem = null;
          if (prob !== "title") {
            elem = document.querySelector(value);
            ele.appendChild(elem);
            elem.style.display = "";
          }
          var clo = isNullOrUndefined2(elem) ? tempVar : elem.cloneNode(true);
          if (prob === "content") {
            this.contentTemplate = clo;
          } else {
            this.toastTemplate = clo;
          }
        } else {
          templateFn = compile4(value);
        }
      } catch (e) {
        templateFn = typeof value == "object" ? compile4(value) : compile4(initializeCSPTemplate(function() {
          return value;
        }));
      }
      if (!isNullOrUndefined2(templateFn)) {
        if (!this.isBlazorServer()) {
          tmpArray = templateFn({}, this, prob, null, true);
        } else {
          var isString = true;
          tmpArray = templateFn({}, this, prob, templateProps, isString);
        }
      }
      if (!isNullOrUndefined2(tmpArray) && tmpArray.length > 0 && !(isNullOrUndefined2(tmpArray[0].tagName) && tmpArray.length === 1)) {
        [].slice.call(tmpArray).forEach(function(el) {
          if (!isNullOrUndefined2(el.tagName)) {
            el.style.display = "";
          }
          ele.appendChild(el);
        });
      } else if (typeof value !== "function" && ele.childElementCount === 0) {
        ele.innerHTML = value;
      }
      return ele;
    };
    Toast2.prototype.clearProgress = function(intervalId) {
      if (!isNullOrUndefined2(this.intervalId[intervalId])) {
        clearInterval(this.intervalId[intervalId]);
        delete this.intervalId[intervalId];
      }
      if (!isNullOrUndefined2(this.progressObj[intervalId])) {
        clearInterval(this.progressObj[intervalId].intervalId);
        delete this.progressObj[intervalId];
      }
    };
    Toast2.prototype.removeToastContainer = function(isClosed) {
      if (isClosed && this.toastContainer.classList.contains("e-toast-util")) {
        detach2(this.toastContainer);
      }
    };
    Toast2.prototype.clearContainerPos = function(isClosed) {
      var _this = this;
      if (this.isBlazorServer()) {
        this.toastContainer = null;
        return;
      }
      if (this.customPosition) {
        setStyleAttribute2(this.toastContainer, {
          "left": "",
          "top": ""
        });
        this.removeToastContainer(isClosed);
        this.toastContainer = null;
        this.customPosition = false;
      } else {
        [ROOT3 + "-top-left", ROOT3 + "-top-right", ROOT3 + "-bottom-left", ROOT3 + "-bottom-right", ROOT3 + "-bottom-center", ROOT3 + "-top-center", ROOT3 + "-full-width"].forEach(function(pos) {
          if (!isNullOrUndefined2(_this.toastContainer) && _this.toastContainer.classList.contains(pos)) {
            _this.toastContainer.classList.remove(pos);
          }
        });
        this.removeToastContainer(isClosed);
        this.toastContainer = null;
      }
      if (!isNullOrUndefined2(this.contentTemplate)) {
        this.clearContentTemplate();
      }
      if (!isNullOrUndefined2(this.toastTemplate)) {
        this.clearToastTemplate();
      }
    };
    Toast2.prototype.clearContentTemplate = function() {
      this.contentTemplate.style.display = "none";
      document.body.appendChild(this.contentTemplate);
      this.contentTemplate = null;
    };
    Toast2.prototype.clearToastTemplate = function() {
      this.toastTemplate.style.display = "none";
      document.body.appendChild(this.toastTemplate);
      this.toastTemplate = null;
    };
    Toast2.prototype.isBlazorServer = function() {
      return isBlazor2() && this.isServerRendered;
    };
    Toast2.prototype.destroyToast = function(toastEle, interactionType) {
      var _this = this;
      var toastObj;
      for (var i = 0; i < this.toastCollection.length; i++) {
        if (this.toastCollection[i].element[0] === toastEle) {
          toastObj = this.toastCollection[i];
          this.toastCollection.splice(i, 1);
        }
      }
      var toastBeforeClose = {
        options: this,
        cancel: false,
        type: interactionType,
        element: toastEle,
        toastContainer: this.toastContainer
      };
      var hideAnimate = this.animation.hide;
      var animate = {
        duration: hideAnimate.duration,
        name: hideAnimate.effect === "None" && animationMode2 === "Enable" ? "FadeOut" : hideAnimate.effect,
        timingFunction: hideAnimate.easing
      };
      var intervalId = parseInt(toastEle.id.split("toast_")[1], 10);
      var toastClose = this.isBlazorServer() ? {
        options: toastObj,
        toastContainer: this.toastContainer
      } : {
        options: toastObj,
        toastContainer: this.toastContainer,
        toastObj: this
      };
      this.trigger("beforeClose", toastBeforeClose, function(toastBeforeCloseArgs) {
        if (!toastBeforeCloseArgs.cancel) {
          if (!isNullOrUndefined2(_this.progressObj[intervalId]) && !isNullOrUndefined2(toastEle.querySelector("." + PROGRESS))) {
            _this.progressObj[intervalId].progressEle.style.width = "0%";
          }
          animate.end = function() {
            _this.clearProgress(intervalId);
            if (!_this.isBlazorServer() || isNullOrUndefined2(toastObj)) {
              detach2(toastEle);
            }
            _this.trigger("close", toastClose);
            if (_this.toastContainer.childElementCount === 0) {
              _this.clearContainerPos(true);
            }
            hideAnimate = null;
            animate = null;
          };
          new Animation2(animate).animate(toastEle);
        }
      });
    };
    Toast2.prototype.personalizeToast = function() {
      this.setIcon();
      this.setTitle();
      this.setContent();
      this.actionButtons();
    };
    Toast2.prototype.setAria = function() {
      attributes2(this.toastEle, {
        "role": "alert"
      });
    };
    Toast2.prototype.setPositioning = function(pos) {
      if (this.isBlazorServer()) {
        return;
      }
      if (!isNaN(parseFloat(pos.X)) || !isNaN(parseFloat(pos.Y))) {
        this.customPosition = true;
        setStyleAttribute2(this.toastContainer, {
          "left": formatUnit(pos.X),
          "top": formatUnit(pos.Y)
        });
      } else {
        this.toastContainer.classList.add(ROOT3 + "-" + pos.Y.toString().toLowerCase() + "-" + pos.X.toString().toLowerCase());
      }
    };
    Toast2.prototype.setCloseButton = function() {
      if (!this.showCloseButton) {
        return;
      }
      var localeText = {
        close: "Close"
      };
      this.l10n = new L10n2("toast", localeText, this.locale);
      this.l10n.setLocale(this.locale);
      var closeIconTitle = this.l10n.getConstant("close");
      var closeBtn = this.createElement("div", {
        className: CLOSEBTN + " e-icons ",
        attrs: {
          tabindex: "0",
          "aria-label": closeIconTitle,
          "role": "button"
        }
      });
      this.toastEle.classList.add("e-toast-header-close-icon");
      this.toastEle.appendChild(closeBtn);
    };
    Toast2.prototype.setProgress = function() {
      if (this.timeOut > 0) {
        var id = parseInt(this.toastEle.id.split("toast_")[1], 10);
        this.intervalId[id] = window.setTimeout(this.destroyToast.bind(this, this.toastEle), this.timeOut);
        this.progressObj[id] = {
          hideEta: null,
          intervalId: null,
          maxHideTime: null,
          element: null,
          timeOutId: null,
          progressEle: null
        };
        this.progressObj[id].maxHideTime = parseFloat(this.timeOut + "");
        this.progressObj[id].hideEta = (/* @__PURE__ */ new Date()).getTime() + this.progressObj[id].maxHideTime;
        this.progressObj[id].element = this.toastEle;
        if (this.extendedTimeout > 0) {
          EventHandler2.add(this.toastEle, "mouseover", this.toastHoverAction.bind(this, id));
          EventHandler2.add(this.toastEle, "mouseleave", this.delayedToastProgress.bind(this, id));
          this.progressObj[id].timeOutId = this.intervalId[id];
        }
        if (this.showProgressBar) {
          this.progressBarEle = this.createElement("div", {
            className: PROGRESS
          });
          this.toastEle.insertBefore(this.progressBarEle, this.toastEle.children[0]);
          this.progressObj[id].intervalId = setInterval(this.updateProgressBar.bind(this, this.progressObj[id]), 10);
          this.progressObj[id].progressEle = this.progressBarEle;
        }
      }
    };
    Toast2.prototype.toastHoverAction = function(id) {
      clearTimeout(this.progressObj[id].timeOutId);
      clearInterval(this.progressObj[id].intervalId);
      this.progressObj[id].hideEta = 0;
      var toastEle = this.progressObj[id].element;
      if (!isNullOrUndefined2(toastEle.querySelector("." + PROGRESS))) {
        this.progressObj[id].progressEle.style.width = "0%";
      }
    };
    Toast2.prototype.delayedToastProgress = function(id) {
      var progress = this.progressObj[id];
      if (!isNullOrUndefined2(progress)) {
        var toastEle = progress.element;
        progress.timeOutId = window.setTimeout(this.destroyToast.bind(this, toastEle), this.extendedTimeout);
        progress.maxHideTime = parseFloat(this.extendedTimeout + "");
        progress.hideEta = (/* @__PURE__ */ new Date()).getTime() + progress.maxHideTime;
        if (!isNullOrUndefined2(toastEle.querySelector("." + PROGRESS))) {
          progress.intervalId = setInterval(this.updateProgressBar.bind(this, progress), 10);
        }
      }
    };
    Toast2.prototype.updateProgressBar = function(progressObj) {
      var percentage = (progressObj.hideEta - (/* @__PURE__ */ new Date()).getTime()) / progressObj.maxHideTime * 100;
      percentage = this.progressDirection === "Ltr" ? 100 - percentage : percentage;
      progressObj.progressEle.style.width = percentage + "%";
    };
    Toast2.prototype.setIcon = function() {
      if (isNullOrUndefined2(this.icon) || this.icon.length === 0) {
        return;
      }
      var iconEle = this.createElement("div", {
        className: ICON3 + " e-icons " + this.icon
      });
      this.toastEle.classList.add("e-toast-header-icon");
      this.toastEle.appendChild(iconEle);
    };
    Toast2.prototype.setTitle = function() {
      if (isNullOrUndefined2(this.title)) {
        return;
      }
      var titleEle = this.createElement("div", {
        className: TITLE
      });
      titleEle = this.fetchEle(titleEle, this.title, "title");
      var msgContainer = this.createElement("div", {
        className: MESSAGE
      });
      msgContainer.appendChild(titleEle);
      this.toastEle.appendChild(msgContainer);
    };
    Toast2.prototype.setContent = function() {
      var contentEle = this.createElement("div", {
        className: CONTENT2
      });
      var ele = this.element;
      if (isNullOrUndefined2(this.content) || this.content === "") {
        var isContent = this.element.innerHTML.replace(/\s/g, "") !== "";
        if ((ele.children.length > 0 || isContent) && !(ele.firstElementChild && ele.firstElementChild.classList.contains(ROOT3))) {
          this.innerEle = document.createDocumentFragment();
          var tempEle_1 = this.createElement("div");
          while (ele.childNodes.length !== 0) {
            this.innerEle.appendChild(this.element.childNodes[0]);
          }
          contentEle.appendChild(this.innerEle);
          [].slice.call(contentEle.children).forEach(function(ele2) {
            tempEle_1.appendChild(ele2.cloneNode(true));
          });
          this.content = tempEle_1;
          this.appendMessageContainer(contentEle);
        }
      } else {
        if (typeof this.content === "object" && !isNullOrUndefined2(this.content.tagName)) {
          contentEle.appendChild(this.content);
          this.content = this.content.cloneNode(true);
          this.appendMessageContainer(contentEle);
        } else {
          contentEle = this.fetchEle(contentEle, this.content, "content");
          this.appendMessageContainer(contentEle);
        }
      }
    };
    Toast2.prototype.appendMessageContainer = function(element2) {
      if (this.toastEle.querySelectorAll("." + MESSAGE).length > 0) {
        this.toastEle.querySelector("." + MESSAGE).appendChild(element2);
      } else {
        var msgContainer = this.createElement("div", {
          className: MESSAGE
        });
        msgContainer.appendChild(element2);
        this.toastEle.appendChild(msgContainer);
      }
    };
    Toast2.prototype.actionButtons = function() {
      var _this = this;
      var actionBtnContainer = this.createElement("div", {
        className: ACTIOBUTTONS
      });
      [].slice.call(this.buttons).forEach(function(actionBtn) {
        if (isNullOrUndefined2(actionBtn.model)) {
          return;
        }
        var btnDom = _this.createElement("button");
        btnDom.setAttribute("type", "button");
        if (isNullOrUndefined2(actionBtn.model.cssClass) || actionBtn.model.cssClass.length === 0) {
          actionBtn.model.cssClass = "e-primary " + _this.cssClass;
        }
        btnDom.classList.add("e-small");
        new Button(actionBtn.model, btnDom);
        if (!isNullOrUndefined2(actionBtn.click) && typeof actionBtn.click === "function") {
          EventHandler2.add(btnDom, "click", actionBtn.click);
        }
        actionBtnContainer.appendChild(btnDom);
      });
      if (actionBtnContainer.childElementCount > 0) {
        this.appendMessageContainer(actionBtnContainer);
      }
    };
    Toast2.prototype.appendToTarget = function(toastObj) {
      var _this = this;
      var toastBeforeOpen = this.isBlazorServer() ? {
        options: toastObj,
        element: this.toastEle,
        cancel: false
      } : {
        options: toastObj,
        toastObj: this,
        element: this.toastEle,
        cancel: false
      };
      this.trigger("beforeOpen", toastBeforeOpen, function(toastBeforeOpenArgs) {
        if (!toastBeforeOpenArgs.cancel) {
          if (!_this.isBlazorServer()) {
            _this.toastEle.style.display = "none";
          }
          if (_this.newestOnTop && _this.toastContainer.childElementCount !== 0) {
            _this.toastContainer.insertBefore(_this.toastEle, _this.toastContainer.children[0]);
          } else if (!_this.isBlazorServer()) {
            _this.toastContainer.appendChild(_this.toastEle);
          }
          removeClass2([_this.toastEle], TOAST_BLAZOR_HIDDEN);
          EventHandler2.add(_this.toastEle, "click", _this.clickHandler, _this);
          EventHandler2.add(_this.toastEle, "keydown", _this.keyDownHandler, _this);
          _this.toastContainer.style.zIndex = getZindexPartial(_this.toastContainer) + "";
          _this.displayToast(_this.toastEle, toastObj);
        } else if (_this.isBlazorServer()) {
          var intervalId = parseInt(_this.toastEle.id.split("toast_")[1], 10);
          _this.clearProgress(intervalId);
          detach2(_this.toastEle);
          if (_this.toastContainer.childElementCount === 0) {
            _this.clearContainerPos();
          }
        }
      });
    };
    Toast2.prototype.clickHandler = function(e) {
      var _this = this;
      if (!this.isBlazorServer()) {
        e.stopPropagation();
      }
      var target = e.target;
      var toastEle = closest2(target, "." + ROOT3);
      var clickArgs = this.isBlazorServer() ? {
        element: toastEle,
        cancel: false,
        clickToClose: false,
        originalEvent: e
      } : {
        element: toastEle,
        cancel: false,
        clickToClose: false,
        originalEvent: e,
        toastObj: this
      };
      var isCloseIcon = target.classList.contains(CLOSEBTN);
      this.trigger("click", clickArgs, function(toastClickArgs) {
        if (isCloseIcon && !toastClickArgs.cancel || toastClickArgs.clickToClose) {
          _this.destroyToast(toastEle, "click");
        }
      });
    };
    Toast2.prototype.keyDownHandler = function(e) {
      if (e.target.classList.contains(CLOSEBTN) && (e.keyCode === 13 || e.keyCode === 32)) {
        var target = e.target;
        var toastEle = closest2(target, "." + ROOT3);
        this.destroyToast(toastEle, "key");
      }
    };
    Toast2.prototype.displayToast = function(toastEle, toastObj) {
      var _this = this;
      var showAnimate = this.animation.show;
      var animate = {
        duration: showAnimate.duration,
        name: showAnimate.effect === "None" && animationMode2 === "Enable" ? "FadeIn" : showAnimate.effect,
        timingFunction: showAnimate.easing
      };
      var toastOpen = this.isBlazorServer() ? {
        options: toastObj,
        element: this.toastEle
      } : {
        options: toastObj,
        toastObj: this,
        element: this.toastEle
      };
      animate.begin = function() {
        toastEle.style.display = "";
      };
      animate.end = function() {
        _this.trigger("open", toastOpen);
      };
      new Animation2(animate).animate(toastEle);
    };
    Toast2.prototype.getContainer = function() {
      this.element.classList.add(CONTAINER);
      return this.element;
    };
    Toast2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var container = this.element;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "enableRtl":
            if (newProp.enableRtl) {
              container.classList.add(RTL9);
            } else {
              container.classList.remove(RTL9);
            }
            break;
        }
      }
    };
    __decorate47([Property2("300px")], Toast2.prototype, "width", void 0);
    __decorate47([Property2("auto")], Toast2.prototype, "height", void 0);
    __decorate47([Property2(null)], Toast2.prototype, "title", void 0);
    __decorate47([Property2(null)], Toast2.prototype, "content", void 0);
    __decorate47([Property2(true)], Toast2.prototype, "enableHtmlSanitizer", void 0);
    __decorate47([Property2(null)], Toast2.prototype, "icon", void 0);
    __decorate47([Property2(null)], Toast2.prototype, "cssClass", void 0);
    __decorate47([Property2(null)], Toast2.prototype, "template", void 0);
    __decorate47([Property2(true)], Toast2.prototype, "newestOnTop", void 0);
    __decorate47([Property2(false)], Toast2.prototype, "showCloseButton", void 0);
    __decorate47([Property2(false)], Toast2.prototype, "showProgressBar", void 0);
    __decorate47([Property2(5e3)], Toast2.prototype, "timeOut", void 0);
    __decorate47([Property2("Rtl")], Toast2.prototype, "progressDirection", void 0);
    __decorate47([Property2(1e3)], Toast2.prototype, "extendedTimeout", void 0);
    __decorate47([Complex2({}, ToastAnimationSettings)], Toast2.prototype, "animation", void 0);
    __decorate47([Complex2({}, ToastPosition)], Toast2.prototype, "position", void 0);
    __decorate47([Collection([{}], ButtonModelProps)], Toast2.prototype, "buttons", void 0);
    __decorate47([Property2(null)], Toast2.prototype, "target", void 0);
    __decorate47([Event3()], Toast2.prototype, "created", void 0);
    __decorate47([Event3()], Toast2.prototype, "beforeSanitizeHtml", void 0);
    __decorate47([Event3()], Toast2.prototype, "destroyed", void 0);
    __decorate47([Event3()], Toast2.prototype, "open", void 0);
    __decorate47([Event3()], Toast2.prototype, "beforeOpen", void 0);
    __decorate47([Event3()], Toast2.prototype, "beforeClose", void 0);
    __decorate47([Event3()], Toast2.prototype, "close", void 0);
    __decorate47([Event3()], Toast2.prototype, "click", void 0);
    Toast2 = __decorate47([NotifyPropertyChanges2], Toast2);
    return Toast2;
  }(Component3)
);
var ToastUtility;
(function(ToastUtility2) {
  function show(content, type, timeOut) {
    var toastContainerElement;
    if (document.querySelector("." + CONTAINER)) {
      toastContainerElement = document.querySelector("." + CONTAINER);
    } else {
      toastContainerElement = createElement2("div", {
        "className": ROOT3 + " " + CONTAINER + " e-toast-util"
      });
      document.body.appendChild(toastContainerElement);
    }
    var untilToastsModel;
    if (typeof content === "string") {
      var cssClass2 = void 0;
      var icon = void 0;
      if (!isNullOrUndefined2(type)) {
        switch (type) {
          case "Warning":
            cssClass2 = "e-toast-warning";
            icon = "e-toast-warning-icon";
            break;
          case "Success":
            cssClass2 = "e-toast-success";
            icon = "e-toast-success-icon";
            break;
          case "Error":
            cssClass2 = "e-toast-danger";
            icon = "e-toast-error-icon";
            break;
          case "Information":
            cssClass2 = "e-toast-info";
            icon = "e-toast-info-icon";
            break;
        }
      } else {
        cssClass2 = "";
        icon = "";
      }
      untilToastsModel = {
        content,
        cssClass: cssClass2,
        icon,
        timeOut: !isNullOrUndefined2(timeOut) ? timeOut : 5e3
      };
    } else {
      untilToastsModel = content;
    }
    var toastObj = new Toast(untilToastsModel);
    toastObj.appendTo(toastContainerElement);
    toastObj.show();
    return toastObj;
  }
  ToastUtility2.show = show;
})(ToastUtility || (ToastUtility = {}));

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-notifications/src/message/message.js
var __extends49 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate48 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Severity;
(function(Severity2) {
  Severity2["Normal"] = "Normal";
  Severity2["Success"] = "Success";
  Severity2["Info"] = "Info";
  Severity2["Warning"] = "Warning";
  Severity2["Error"] = "Error";
})(Severity || (Severity = {}));
var Variant;
(function(Variant2) {
  Variant2["Text"] = "Text";
  Variant2["Outlined"] = "Outlined";
  Variant2["Filled"] = "Filled";
})(Variant || (Variant = {}));
var MSG_ICON = "e-msg-icon";
var MSG_CLOSE_ICON = "e-msg-close-icon";
var MSG_CONTENT = "e-msg-content";
var MSG_CONTENT_CENTER = "e-content-center";
var RTL10 = "e-rtl";
var SUCCESS = "e-success";
var WARNING = "e-warning";
var INFO = "e-info";
var ERROR = "e-error";
var OUTLINED = "e-outlined";
var FILLED = "e-filled";
var HIDE = "e-hidden";
var Message = (
  /** @class */
  function(_super) {
    __extends49(Message2, _super);
    function Message2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.initialRender = true;
      return _this;
    }
    Message2.prototype.getModuleName = function() {
      return "message";
    };
    Message2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Message2.prototype.preRender = function() {
      var localeText = {
        close: "Close"
      };
      this.l10n = new L10n2("message", localeText, this.locale);
    };
    Message2.prototype.render = function() {
      this.innerContent = this.element.innerHTML;
      this.element.innerHTML = "";
      this.msgElement = this.createElement("div", {
        className: "e-msg-content-wrap"
      });
      this.initialize();
      this.wireEvents();
      this.renderComplete();
      this.renderReactTemplates();
      this.initialRender = false;
    };
    Message2.prototype.initialize = function() {
      this.element.setAttribute("role", "alert");
      this.setCssClass();
      this.setIcon();
      this.setContent();
      this.setCloseIcon();
      this.setSeverity();
      this.setVariant();
      this.setVisible();
      if (this.enableRtl) {
        this.element.classList.add(RTL10);
      }
    };
    Message2.prototype.setIcon = function() {
      if (this.showIcon) {
        this.iconElement = this.createElement("span", {
          className: MSG_ICON
        });
        if (this.element.classList.contains(MSG_CONTENT_CENTER)) {
          this.msgElement.appendChild(this.iconElement);
        } else {
          this.element.appendChild(this.iconElement);
        }
      }
    };
    Message2.prototype.setCloseIcon = function() {
      if (this.showCloseIcon) {
        this.closeIcon = this.createElement("button", {
          attrs: {
            type: "button",
            class: MSG_CLOSE_ICON
          }
        });
        this.element.appendChild(this.closeIcon);
        this.setTitle();
      }
    };
    Message2.prototype.setTitle = function() {
      this.l10n.setLocale(this.locale);
      var closeIconTitle = this.l10n.getConstant("close");
      this.closeIcon.setAttribute("title", closeIconTitle);
      this.closeIcon.setAttribute("aria-label", closeIconTitle);
    };
    Message2.prototype.setContent = function() {
      this.txtElement = this.createElement("div", {
        className: MSG_CONTENT
      });
      if (this.element.classList.contains(MSG_CONTENT_CENTER)) {
        this.msgElement.appendChild(this.txtElement);
        this.element.appendChild(this.msgElement);
      } else {
        this.element.appendChild(this.txtElement);
      }
      this.setTemplate();
    };
    Message2.prototype.setTemplate = function() {
      var templateFn;
      if (isNullOrUndefined2(this.content) || this.content === "") {
        this.txtElement.innerHTML = this.innerContent;
      } else if (!isNullOrUndefined2(this.content) && this.content !== "") {
        if (typeof this.content === "string" || typeof this.content !== "string") {
          if (this.isVue || typeof this.content !== "string") {
            templateFn = compile4(this.content);
            if (!isNullOrUndefined2(templateFn)) {
              var tempArr = templateFn({}, this, "content", this.element.id + "content", true);
              if (tempArr) {
                tempArr = Array.prototype.slice.call(tempArr);
                append(tempArr, this.txtElement);
                this.renderReactTemplates();
              }
            }
          } else {
            this.txtElement.innerHTML = this.content;
          }
        }
      }
    };
    Message2.prototype.setSeverity = function() {
      var classList2 = [SUCCESS, WARNING, INFO, ERROR];
      removeClass2([this.element], classList2);
      if (this.severity === "Success") {
        addClass2([this.element], SUCCESS);
      } else if (this.severity === "Warning") {
        addClass2([this.element], WARNING);
      } else if (this.severity === "Error") {
        addClass2([this.element], ERROR);
      } else if (this.severity === "Info") {
        addClass2([this.element], INFO);
      }
    };
    Message2.prototype.setVariant = function() {
      var classList2 = [FILLED, OUTLINED];
      removeClass2([this.element], classList2);
      if (this.variant === "Outlined") {
        addClass2([this.element], OUTLINED);
      } else if (this.variant === "Filled") {
        addClass2([this.element], FILLED);
      }
    };
    Message2.prototype.setCssClass = function(oldCssClass) {
      if (oldCssClass) {
        removeClass2([this.element], oldCssClass.split(" "));
      }
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.split(" "));
      }
    };
    Message2.prototype.setVisible = function() {
      if (!this.visible) {
        addClass2([this.element], HIDE);
        if (!this.initialRender) {
          this.trigger("closed", {
            event,
            isInteracted: false,
            element: this.element
          });
        }
      } else {
        removeClass2([this.element], HIDE);
      }
    };
    Message2.prototype.clickHandler = function(event2) {
      this.closeMessage(event2);
    };
    Message2.prototype.keyboardHandler = function(event2) {
      if (event2.keyCode === 32 || event2.keyCode === 13) {
        this.closeMessage(event2);
      }
    };
    Message2.prototype.closeMessage = function(event2) {
      addClass2([this.element], HIDE);
      this.setProperties({
        visible: false
      }, true);
      var eventArgs = {
        event: event2,
        isInteracted: true,
        element: this.element
      };
      this.trigger("closed", eventArgs);
    };
    Message2.prototype.wireEvents = function() {
      if (this.showCloseIcon) {
        EventHandler2.add(this.closeIcon, "click", this.clickHandler, this);
        EventHandler2.add(this.closeIcon, "keydown", this.keyboardHandler, this);
      }
    };
    Message2.prototype.unWireEvents = function() {
      if (this.showCloseIcon) {
        EventHandler2.remove(this.closeIcon, "click", this.clickHandler);
        EventHandler2.remove(this.closeIcon, "keydown", this.keyboardHandler);
      }
    };
    Message2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "cssClass":
            this.setCssClass(oldProp.cssClass);
            break;
          case "content":
            this.txtElement.innerHTML = "";
            this.setTemplate();
            break;
          case "enableRtl":
            if (!this.enableRtl) {
              this.element.classList.remove(RTL10);
            } else {
              this.element.classList.add(RTL10);
            }
            break;
          case "locale":
            if (this.showCloseIcon) {
              this.setTitle();
            }
            break;
          case "showIcon":
            if (!this.showIcon && this.element.getElementsByClassName(MSG_ICON).length > 0) {
              detach2(this.iconElement);
            }
            if (this.showIcon) {
              this.iconElement = this.createElement("span", {
                className: MSG_ICON
              });
              this.element.insertBefore(this.iconElement, this.txtElement);
            }
            break;
          case "showCloseIcon":
            if (!this.showCloseIcon && !isNullOrUndefined2(this.closeIcon)) {
              this.unWireEvents();
              detach2(this.closeIcon);
            } else {
              this.setCloseIcon();
              this.wireEvents();
            }
            break;
          case "severity":
            this.setSeverity();
            break;
          case "variant":
            this.setVariant();
            break;
          case "visible":
            this.setVisible();
            break;
        }
      }
    };
    Message2.prototype.destroy = function() {
      var cssClass2 = isNullOrUndefined2(this.cssClass) ? [""] : this.cssClass.split(" ");
      var className = [SUCCESS, WARNING, INFO, ERROR, RTL10, HIDE, OUTLINED, FILLED];
      var classList2 = cssClass2.length === 1 && cssClass2[0] === "" ? className : className.concat(cssClass2);
      removeClass2([this.element], classList2);
      this.element.removeAttribute("role");
      this.unWireEvents();
      if (!isNullOrUndefined2(this.iconElement)) {
        detach2(this.iconElement);
      }
      detach2(this.txtElement);
      if (!isNullOrUndefined2(this.closeIcon)) {
        detach2(this.closeIcon);
      }
      _super.prototype.destroy.call(this);
    };
    __decorate48([Property2(null)], Message2.prototype, "content", void 0);
    __decorate48([Property2("")], Message2.prototype, "cssClass", void 0);
    __decorate48([Property2(true)], Message2.prototype, "showIcon", void 0);
    __decorate48([Property2(false)], Message2.prototype, "showCloseIcon", void 0);
    __decorate48([Property2("Normal")], Message2.prototype, "severity", void 0);
    __decorate48([Property2("Text")], Message2.prototype, "variant", void 0);
    __decorate48([Property2(true)], Message2.prototype, "visible", void 0);
    __decorate48([Event3()], Message2.prototype, "created", void 0);
    __decorate48([Event3()], Message2.prototype, "destroyed", void 0);
    __decorate48([Event3()], Message2.prototype, "closed", void 0);
    Message2 = __decorate48([NotifyPropertyChanges2], Message2);
    return Message2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-notifications/src/skeleton/skeleton.js
var __extends50 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate49 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var cssClassName3 = {
  TEXTSHAPE: "e-skeleton-text",
  CIRCLESHAPE: "e-skeleton-circle",
  SQUARESHAPE: "e-skeleton-square",
  RECTANGLESHAPE: "e-skeleton-rectangle",
  WAVEEFFECT: "e-shimmer-wave",
  PULSEEFFECT: "e-shimmer-pulse",
  FADEEFFECT: "e-shimmer-fade",
  VISIBLENONE: "e-visible-none"
};
var SkeletonType;
(function(SkeletonType2) {
  SkeletonType2["Text"] = "Text";
  SkeletonType2["Circle"] = "Circle";
  SkeletonType2["Square"] = "Square";
  SkeletonType2["Rectangle"] = "Rectangle";
})(SkeletonType || (SkeletonType = {}));
var ShimmerEffect;
(function(ShimmerEffect2) {
  ShimmerEffect2["Wave"] = "Wave";
  ShimmerEffect2["Fade"] = "Fade";
  ShimmerEffect2["Pulse"] = "Pulse";
  ShimmerEffect2["None"] = "None";
})(ShimmerEffect || (ShimmerEffect = {}));
var Skeleton = (
  /** @class */
  function(_super) {
    __extends50(Skeleton2, _super);
    function Skeleton2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Skeleton2.prototype.getModuleName = function() {
      return "skeleton";
    };
    Skeleton2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Skeleton2.prototype.preRender = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
      this.updateCssClass();
      attributes2(this.element, {
        role: "alert",
        "aria-busy": "true",
        "aria-live": "polite",
        "aria-label": this.label
      });
    };
    Skeleton2.prototype.render = function() {
      this.initialize();
    };
    Skeleton2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "width":
          case "height":
            this.updateDimension();
            break;
          case "shape":
            this.updateShape();
            break;
          case "shimmerEffect":
            this.updateEffect();
            break;
          case "visible":
            this.updateVisibility();
            break;
          case "label":
            this.element.setAttribute("aria-label", this.label);
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.element], oldProp.cssClass.split(" "));
            }
            this.updateCssClass();
            break;
        }
      }
    };
    Skeleton2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      var attrs = ["role", "aria-live", "aria-busy", "aria-label"];
      var cssClass2 = [];
      if (this.cssClass) {
        cssClass2 = cssClass2.concat(this.cssClass.split(" "));
      }
      for (var i = 0; i < attrs.length; i++) {
        this.element.removeAttribute(attrs[parseInt(i.toString(), 10)]);
      }
      cssClass2 = cssClass2.concat(this.element.classList.value.match(/(e-skeleton-[^\s]+)/g) || []);
      cssClass2 = cssClass2.concat(this.element.classList.value.match(/(e-shimmer-[^\s]+)/g) || []);
      removeClass2([this.element], cssClass2);
    };
    Skeleton2.prototype.initialize = function() {
      this.updateShape();
      this.updateEffect();
      this.updateVisibility();
    };
    Skeleton2.prototype.updateShape = function() {
      if (!isNullOrUndefined2(this.shape)) {
        var shapeCss = cssClassName3[this.shape.toUpperCase() + "SHAPE"];
        var removeCss = this.element.classList.value.match(/(e-skeleton-[^\s]+)/g) || [];
        this.updateDimension();
        if (removeCss) {
          removeClass2([this.element], removeCss);
        }
        addClass2([this.element], [shapeCss]);
      }
    };
    Skeleton2.prototype.updateDimension = function() {
      var width = !this.width && ["Text", "Rectangle"].indexOf(this.shape) > -1 ? "100%" : formatUnit(this.width);
      var height = ["Circle", "Square"].indexOf(this.shape) > -1 ? width : formatUnit(this.height);
      this.element.style.width = width;
      this.element.style.height = height;
    };
    Skeleton2.prototype.updateEffect = function() {
      var removeCss = this.element.classList.value.match(/(e-shimmer-[^\s]+)/g) || [];
      if (removeCss) {
        removeClass2([this.element], removeCss);
      }
      if (!isNullOrUndefined2(this.shimmerEffect)) {
        addClass2([this.element], [cssClassName3[this.shimmerEffect.toUpperCase() + "EFFECT"]]);
      }
    };
    Skeleton2.prototype.updateVisibility = function() {
      this.element.classList[this.visible ? "remove" : "add"](cssClassName3.VISIBLENONE);
    };
    Skeleton2.prototype.updateCssClass = function() {
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.split(" "));
      }
    };
    __decorate49([Property2("")], Skeleton2.prototype, "width", void 0);
    __decorate49([Property2("")], Skeleton2.prototype, "height", void 0);
    __decorate49([Property2(true)], Skeleton2.prototype, "visible", void 0);
    __decorate49([Property2("Text")], Skeleton2.prototype, "shape", void 0);
    __decorate49([Property2("Wave")], Skeleton2.prototype, "shimmerEffect", void 0);
    __decorate49([Property2("Loading...")], Skeleton2.prototype, "label", void 0);
    __decorate49([Property2("")], Skeleton2.prototype, "cssClass", void 0);
    Skeleton2 = __decorate49([NotifyPropertyChanges2], Skeleton2);
    return Skeleton2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js
var __extends51 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate50 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var FieldSettings2 = (
  /** @class */
  function(_super) {
    __extends51(FieldSettings4, _super);
    function FieldSettings4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate50([Property2()], FieldSettings4.prototype, "text", void 0);
    __decorate50([Property2()], FieldSettings4.prototype, "value", void 0);
    __decorate50([Property2()], FieldSettings4.prototype, "iconCss", void 0);
    __decorate50([Property2()], FieldSettings4.prototype, "groupBy", void 0);
    __decorate50([Property2()], FieldSettings4.prototype, "htmlAttributes", void 0);
    __decorate50([Property2()], FieldSettings4.prototype, "disabled", void 0);
    return FieldSettings4;
  }(ChildProperty2)
);
var dropDownBaseClasses = {
  root: "e-dropdownbase",
  rtl: "e-rtl",
  content: "e-content",
  selected: "e-active",
  hover: "e-hover",
  noData: "e-nodata",
  fixedHead: "e-fixed-head",
  focus: "e-item-focus",
  li: "e-list-item",
  group: "e-list-group-item",
  disabled: "e-disabled",
  grouping: "e-dd-group",
  virtualList: "e-list-item e-virtual-list"
};
var ITEMTEMPLATE_PROPERTY = "ItemTemplate";
var DISPLAYTEMPLATE_PROPERTY = "DisplayTemplate";
var SPINNERTEMPLATE_PROPERTY = "SpinnerTemplate";
var VALUETEMPLATE_PROPERTY = "ValueTemplate";
var GROUPTEMPLATE_PROPERTY = "GroupTemplate";
var HEADERTEMPLATE_PROPERTY = "HeaderTemplate";
var FOOTERTEMPLATE_PROPERTY = "FooterTemplate";
var NORECORDSTEMPLATE_PROPERTY = "NoRecordsTemplate";
var ACTIONFAILURETEMPLATE_PROPERTY = "ActionFailureTemplate";
var HIDE_GROUPLIST = "e-hide-group-header";
var DropDownBase = (
  /** @class */
  function(_super) {
    __extends51(DropDownBase2, _super);
    function DropDownBase2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.preventChange = false;
      _this.isPreventChange = false;
      _this.isDynamicDataChange = false;
      _this.addedNewItem = false;
      _this.isAddNewItemTemplate = false;
      _this.isRequesting = false;
      _this.isVirtualizationEnabled = false;
      _this.isCustomDataUpdated = false;
      _this.isAllowFiltering = false;
      _this.virtualizedItemsCount = 0;
      _this.isCheckBoxSelection = false;
      _this.totalItemCount = 0;
      _this.dataCount = 0;
      _this.remoteDataCount = -1;
      _this.isRemoteDataUpdated = false;
      _this.isIncrementalRequest = false;
      _this.itemCount = 30;
      _this.virtualListHeight = 0;
      _this.isVirtualScrolling = false;
      _this.isPreventScrollAction = false;
      _this.scrollPreStartIndex = 0;
      _this.isScrollActionTriggered = false;
      _this.previousStartIndex = 0;
      _this.isMouseScrollAction = false;
      _this.isKeyBoardAction = false;
      _this.isScrollChanged = false;
      _this.isUpwardScrolling = false;
      _this.startIndex = 0;
      _this.currentPageNumber = 0;
      _this.pageCount = 0;
      _this.isPreventKeyAction = false;
      _this.generatedDataObject = {};
      _this.skeletonCount = 32;
      _this.isVirtualTrackHeight = false;
      _this.virtualSelectAll = false;
      _this.incrementalQueryString = "";
      _this.incrementalEndIndex = 0;
      _this.incrementalStartIndex = 0;
      _this.incrementalPreQueryString = "";
      _this.isObjectCustomValue = false;
      _this.appendUncheckList = false;
      _this.getInitialData = false;
      _this.preventPopupOpen = true;
      _this.virtualSelectAllState = false;
      _this.CurrentEvent = null;
      _this.isDynamicData = false;
      _this.isPrimitiveData = false;
      _this.virtualListInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: 0
      };
      _this.viewPortInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: 0
      };
      _this.selectedValueInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: 0
      };
      return _this;
    }
    DropDownBase2.prototype.getPropObject = function(prop, newProp, oldProp) {
      var newProperty = new Object();
      var oldProperty = new Object();
      var propName = function(prop2) {
        return prop2;
      };
      newProperty[propName(prop)] = newProp[propName(prop)];
      oldProperty[propName(prop)] = oldProp[propName(prop)];
      var data = new Object();
      data.newProperty = newProperty;
      data.oldProperty = oldProperty;
      return data;
    };
    DropDownBase2.prototype.getValueByText = function(text, ignoreCase, ignoreAccent) {
      var value = null;
      if (!isNullOrUndefined2(this.listData)) {
        if (ignoreCase) {
          value = this.checkValueCase(text, true, ignoreAccent);
        } else {
          value = this.checkValueCase(text, false, ignoreAccent);
        }
      }
      return value;
    };
    DropDownBase2.prototype.checkValueCase = function(text, ignoreCase, ignoreAccent, isTextByValue) {
      var _this = this;
      var value = null;
      if (isTextByValue) {
        value = text;
      }
      if (!isNullOrUndefined2(this.listData)) {
        var dataSource = this.listData;
        var fields_1 = this.fields;
        var type = this.typeOfData(dataSource).typeof;
        if (type === "string" || type === "number" || type === "boolean") {
          for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
            var item = dataSource_1[_i];
            if (!isNullOrUndefined2(item)) {
              if (ignoreAccent) {
                value = this.checkingAccent(String(item), text, ignoreCase);
              } else {
                if (ignoreCase) {
                  if (this.checkIgnoreCase(String(item), text)) {
                    value = this.getItemValue(String(item), text, ignoreCase);
                  }
                } else {
                  if (this.checkNonIgnoreCase(String(item), text)) {
                    value = this.getItemValue(String(item), text, ignoreCase, isTextByValue);
                  }
                }
              }
            }
          }
        } else {
          if (ignoreCase) {
            dataSource.filter(function(item2) {
              var itemValue = getValue2(fields_1.value, item2);
              if (!isNullOrUndefined2(itemValue) && _this.checkIgnoreCase(getValue2(fields_1.text, item2).toString(), text)) {
                value = getValue2(fields_1.value, item2);
              }
            });
          } else {
            if (isTextByValue) {
              var compareValue_1 = null;
              compareValue_1 = value;
              dataSource.filter(function(item2) {
                var itemValue = getValue2(fields_1.value, item2);
                if (!isNullOrUndefined2(itemValue) && !isNullOrUndefined2(value) && itemValue.toString() === compareValue_1.toString()) {
                  value = getValue2(fields_1.text, item2);
                }
              });
            } else {
              dataSource.filter(function(item2) {
                if (_this.checkNonIgnoreCase(getValue2(fields_1.text, item2), text)) {
                  value = getValue2(fields_1.value, item2);
                }
              });
            }
          }
        }
      }
      return value;
    };
    DropDownBase2.prototype.checkingAccent = function(item, text, ignoreCase) {
      var dataItem = DataUtil.ignoreDiacritics(String(item));
      var textItem = DataUtil.ignoreDiacritics(text.toString());
      var value = null;
      if (ignoreCase) {
        if (this.checkIgnoreCase(dataItem, textItem)) {
          value = this.getItemValue(String(item), text, ignoreCase);
        }
      } else {
        if (this.checkNonIgnoreCase(String(item), text)) {
          value = this.getItemValue(String(item), text, ignoreCase);
        }
      }
      return value;
    };
    DropDownBase2.prototype.checkIgnoreCase = function(item, text) {
      return String(item).toLowerCase() === text.toString().toLowerCase() ? true : false;
    };
    DropDownBase2.prototype.checkNonIgnoreCase = function(item, text) {
      return String(item) === text.toString() ? true : false;
    };
    DropDownBase2.prototype.getItemValue = function(dataItem, typedText, ignoreCase, isTextByValue) {
      var value = null;
      var dataSource = this.listData;
      var type = this.typeOfData(dataSource).typeof;
      if (isTextByValue) {
        value = dataItem.toString();
      } else {
        if (ignoreCase) {
          value = type === "string" ? String(dataItem) : this.getFormattedValue(String(dataItem));
        } else {
          value = type === "string" ? typedText : this.getFormattedValue(typedText);
        }
      }
      return value;
    };
    DropDownBase2.prototype.templateCompiler = function(baseTemplate) {
      var checkTemplate = false;
      if (typeof baseTemplate !== "function" && baseTemplate) {
        try {
          checkTemplate = selectAll2(baseTemplate, document).length ? true : false;
        } catch (exception) {
          checkTemplate = false;
        }
      }
      return checkTemplate;
    };
    DropDownBase2.prototype.l10nUpdate = function(actionFailure2) {
      var ele = this.getModuleName() === "listbox" ? this.ulElement : this.list;
      if (!isNullOrUndefined2(this.noRecordsTemplate) && this.noRecordsTemplate !== "No records found" || this.actionFailureTemplate !== "Request failed") {
        var template = actionFailure2 ? this.actionFailureTemplate : this.noRecordsTemplate;
        var compiledString = void 0;
        var templateId = actionFailure2 ? this.actionFailureTemplateId : this.noRecordsTemplateId;
        ele.innerHTML = "";
        var tempaltecheck = this.templateCompiler(template);
        if (typeof template !== "function" && tempaltecheck) {
          compiledString = compile4(select2(template, document).innerHTML.trim());
        } else {
          compiledString = compile4(template);
        }
        var templateName = actionFailure2 ? "actionFailureTemplate" : "noRecordsTemplate";
        var noDataElement = void 0;
        if (this.isReact && typeof template === "function") {
          noDataElement = compiledString({}, this, templateName, templateId, this.isStringTemplate, null);
        } else {
          noDataElement = compiledString({}, this, templateName, templateId, this.isStringTemplate, null, ele);
        }
        if (noDataElement && noDataElement.length > 0) {
          for (var i = 0; i < noDataElement.length; i++) {
            if (this.getModuleName() === "listbox" && templateName === "noRecordsTemplate") {
              if (noDataElement[i].nodeName === "#text") {
                var liElem = this.createElement("li");
                liElem.textContent = noDataElement[i].textContent;
                liElem.classList.add("e-list-nrt");
                liElem.setAttribute("role", "option");
                ele.appendChild(liElem);
              } else {
                noDataElement[i].classList.add("e-list-nr-template");
                ele.appendChild(noDataElement[i]);
              }
            } else {
              if (noDataElement[i] instanceof HTMLElement || noDataElement[i] instanceof Text && noDataElement[i].textContent !== "") {
                ele.appendChild(noDataElement[i]);
              }
            }
          }
        }
        this.renderReactTemplates();
      } else {
        var l10nLocale = {
          noRecordsTemplate: "No records found",
          actionFailureTemplate: "Request failed"
        };
        var componentLocale = new L10n2(this.getLocaleName(), {}, this.locale);
        if (componentLocale.getConstant("actionFailureTemplate") !== "" || componentLocale.getConstant("noRecordsTemplate") !== "") {
          this.l10n = componentLocale;
        } else {
          this.l10n = new L10n2(this.getModuleName() === "listbox" ? "listbox" : this.getModuleName() === "mention" ? "mention" : "dropdowns", l10nLocale, this.locale);
        }
        var content = actionFailure2 ? this.l10n.getConstant("actionFailureTemplate") : this.l10n.getConstant("noRecordsTemplate");
        if (this.getModuleName() === "listbox") {
          var liElem = this.createElement("li");
          liElem.textContent = content;
          ele.appendChild(liElem);
          liElem.classList.add("e-list-nrt");
          liElem.setAttribute("role", "option");
        } else {
          if (!isNullOrUndefined2(ele)) {
            ele.innerHTML = content;
          }
        }
      }
    };
    DropDownBase2.prototype.checkAndResetCache = function() {
      if (this.isVirtualizationEnabled) {
        this.generatedDataObject = {};
        this.virtualItemStartIndex = this.virtualItemEndIndex = 0;
        this.viewPortInfo = {
          currentPageNumber: null,
          direction: null,
          sentinelInfo: {},
          offsets: {},
          startIndex: 0,
          endIndex: this.itemCount
        };
        this.selectedValueInfo = null;
      }
    };
    DropDownBase2.prototype.updateIncrementalInfo = function(startIndex, endIndex) {
      this.viewPortInfo.startIndex = startIndex;
      this.viewPortInfo.endIndex = endIndex;
      this.updateVirtualItemIndex();
      this.isIncrementalRequest = true;
      this.resetList(this.dataSource, this.fields, this.query);
      this.isIncrementalRequest = false;
    };
    DropDownBase2.prototype.updateIncrementalView = function(startIndex, endIndex) {
      this.viewPortInfo.startIndex = startIndex;
      this.viewPortInfo.endIndex = endIndex;
      this.updateVirtualItemIndex();
      this.resetList(this.dataSource, this.fields, this.query);
      this.UpdateSkeleton();
      this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
      this.ulElement = this.list.querySelector("ul");
    };
    DropDownBase2.prototype.updateVirtualItemIndex = function() {
      this.virtualItemStartIndex = this.viewPortInfo.startIndex;
      this.virtualItemEndIndex = this.viewPortInfo.endIndex;
      this.virtualListInfo = this.viewPortInfo;
    };
    DropDownBase2.prototype.getFilteringSkeletonCount = function() {
      var currentSkeletonCount = this.skeletonCount;
      this.getSkeletonCount(true);
      this.skeletonCount = this.dataCount < this.itemCount * 2 && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.totalItemCount <= this.itemCount) ? 0 : this.skeletonCount;
      var skeletonUpdated = true;
      if ((this.getModuleName() === "autocomplete" || this.getModuleName() === "multiselect") && this.totalItemCount < this.itemCount * 2 && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.totalItemCount <= this.itemCount)) {
        this.skeletonCount = 0;
        skeletonUpdated = false;
      }
      if (!this.list.classList.contains(dropDownBaseClasses.noData)) {
        if (currentSkeletonCount !== this.skeletonCount && skeletonUpdated) {
          this.UpdateSkeleton(true, Math.abs(currentSkeletonCount - this.skeletonCount));
        } else {
          this.UpdateSkeleton();
        }
        this.liCollections = this.list.querySelectorAll(".e-list-item");
        if (this.list.getElementsByClassName("e-virtual-ddl").length > 0) {
          this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
        } else if (!this.list.querySelector(".e-virtual-ddl") && this.skeletonCount > 0 && this.list.querySelector(".e-dropdownbase")) {
          var virualElement = this.createElement("div", {
            id: this.element.id + "_popup",
            className: "e-virtual-ddl",
            styles: this.GetVirtualTrackHeight()
          });
          this.list.querySelector(".e-dropdownbase").appendChild(virualElement);
        }
        if (this.list.getElementsByClassName("e-virtual-ddl-content").length > 0) {
          this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
        }
      }
    };
    DropDownBase2.prototype.getSkeletonCount = function(retainSkeleton) {
      this.virtualListHeight = this.listContainerHeight != null ? parseInt(this.listContainerHeight, 10) : this.virtualListHeight;
      var actualCount = this.virtualListHeight > 0 ? Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
      this.skeletonCount = actualCount * 4 < this.itemCount ? this.itemCount : actualCount * 4;
      this.itemCount = retainSkeleton ? this.itemCount : this.skeletonCount;
      this.virtualItemCount = this.itemCount;
      this.skeletonCount = Math.floor(this.skeletonCount / 2);
    };
    DropDownBase2.prototype.GetVirtualTrackHeight = function() {
      var height = this.totalItemCount === this.viewPortInfo.endIndex ? this.totalItemCount * this.listItemHeight - this.itemCount * this.listItemHeight : this.totalItemCount * this.listItemHeight;
      height = this.isVirtualTrackHeight ? 0 : height;
      var heightDimension = "height: " + (height - this.itemCount * this.listItemHeight) + "px;";
      if ((this.getModuleName() === "autocomplete" || this.getModuleName() === "multiselect") && this.skeletonCount === 0) {
        return "height: 0px;";
      }
      return heightDimension;
    };
    DropDownBase2.prototype.getTransformValues = function() {
      var translateY = this.viewPortInfo.startIndex * this.listItemHeight;
      translateY = translateY - this.skeletonCount * this.listItemHeight;
      translateY = this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0 || this.skeletonCount === 0 ? 0 : translateY;
      var styleText = "transform: translate(0px, " + translateY + "px);";
      return styleText;
    };
    DropDownBase2.prototype.UpdateSkeleton = function(isSkeletonCountChange, skeletonCount) {
      var isContainSkeleton = this.list.querySelector(".e-virtual-ddl-content");
      var isContainVirtualList = this.list.querySelector(".e-virtual-list");
      if (isContainSkeleton && (!isContainVirtualList || isSkeletonCountChange) && this.isVirtualizationEnabled) {
        var totalSkeletonCount = isSkeletonCountChange ? skeletonCount : this.skeletonCount;
        for (var i = 0; i < totalSkeletonCount; i++) {
          var liElement = this.createElement("li", {
            className: dropDownBaseClasses.virtualList,
            styles: "overflow: inherit"
          });
          if (this.isVirtualizationEnabled && this.itemTemplate) {
            liElement.style.height = this.listItemHeight - parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom, 10) + "px";
          }
          var skeleton = new Skeleton({
            shape: "Text",
            height: "10px",
            width: "95%",
            cssClass: "e-skeleton-text"
          });
          skeleton.appendTo(this.createElement("div"));
          liElement.appendChild(skeleton.element);
          if (isContainSkeleton.firstChild) {
            isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
          }
        }
      }
    };
    DropDownBase2.prototype.getLocaleName = function() {
      return "drop-down-base";
    };
    DropDownBase2.prototype.getTextByValue = function(value) {
      var text = this.checkValueCase(value, false, false, true);
      return text;
    };
    DropDownBase2.prototype.getFormattedValue = function(value) {
      if (this.listData && this.listData.length) {
        var item = void 0;
        if (this.properties.allowCustomValue && this.properties.value && this.properties.value instanceof Array && this.properties.value.length > 0) {
          item = this.typeOfData(this.properties.value);
        } else {
          item = this.typeOfData(this.listData);
        }
        if (typeof getValue2(this.fields.value ? this.fields.value : "value", item.item) === "number" || item.typeof === "number") {
          return parseFloat(value);
        }
        if (typeof getValue2(this.fields.value ? this.fields.value : "value", item.item) === "boolean" || item.typeof === "boolean") {
          return value === "true" || "" + value === "true";
        }
      }
      return value;
    };
    DropDownBase2.prototype.setEnableRtl = function() {
      if (!isNullOrUndefined2(this.enableRtlElements)) {
        if (this.list) {
          this.enableRtlElements.push(this.list);
        }
        if (this.enableRtl) {
          addClass2(this.enableRtlElements, dropDownBaseClasses.rtl);
        } else {
          removeClass2(this.enableRtlElements, dropDownBaseClasses.rtl);
        }
      }
    };
    DropDownBase2.prototype.initialize = function(e) {
      this.bindEvent = true;
      this.preventPopupOpen = true;
      this.actionFailureTemplateId = "" + this.element.id + ACTIONFAILURETEMPLATE_PROPERTY;
      if (this.element.tagName === "UL") {
        var jsonElement = ListBase.createJsonFromElement(this.element);
        this.setProperties({
          fields: {
            text: "text",
            value: "text"
          }
        }, true);
        this.resetList(jsonElement, this.fields);
      } else if (this.element.tagName === "SELECT") {
        var dataSource = this.dataSource instanceof Array ? this.dataSource.length > 0 ? true : false : !isNullOrUndefined2(this.dataSource) ? true : false;
        if (!dataSource) {
          this.renderItemsBySelect();
        } else if (this.isDynamicDataChange) {
          this.setListData(this.dataSource, this.fields, this.query);
        }
      } else {
        this.setListData(this.dataSource, this.fields, this.query, e);
      }
    };
    DropDownBase2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    DropDownBase2.prototype.updateDataAttribute = function(value) {
      var invalidAttr = ["class", "style", "id", "type", "aria-expanded", "aria-autocomplete", "aria-readonly"];
      var attr = {};
      for (var a = 0; a < this.element.attributes.length; a++) {
        if (invalidAttr.indexOf(this.element.attributes[a].name) === -1 && !(this.getModuleName() === "dropdownlist" && this.element.attributes[a].name === "readonly")) {
          attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);
        }
      }
      extend2(attr, value, attr);
      this.setProperties({
        htmlAttributes: attr
      }, true);
    };
    DropDownBase2.prototype.renderItemsBySelect = function() {
      var element2 = this.element;
      var group = element2.querySelectorAll("select>optgroup");
      var fields;
      var isSelectGroupCheck = this.getModuleName() === "multiselect" && this.isGroupChecking && group.length > 0;
      fields = isSelectGroupCheck ? {
        value: "value",
        text: "text",
        groupBy: "categeory"
      } : fields = {
        value: "value",
        text: "text"
      };
      var jsonElement = [];
      var option = element2.querySelectorAll("select>option");
      this.getJSONfromOption(jsonElement, option, fields);
      if (group.length) {
        for (var i = 0; i < group.length; i++) {
          var item = group[i];
          var optionGroup = {};
          optionGroup[fields.text] = item.label;
          optionGroup.isHeader = true;
          var child = item.querySelectorAll("option");
          if (isSelectGroupCheck) {
            this.getJSONfromOption(jsonElement, child, fields, item.label);
          } else {
            jsonElement.push(optionGroup);
            this.getJSONfromOption(jsonElement, child, fields);
          }
        }
        element2.querySelectorAll("select>option");
      }
      this.updateFields(fields.text, fields.value, isSelectGroupCheck ? fields.groupBy : this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
      this.resetList(jsonElement, fields);
    };
    DropDownBase2.prototype.updateFields = function(text, value, groupBy, htmlAttributes, iconCss, disabled) {
      var field = {
        "fields": {
          text,
          value,
          groupBy: !isNullOrUndefined2(groupBy) ? groupBy : this.fields && this.fields.groupBy,
          htmlAttributes: !isNullOrUndefined2(htmlAttributes) ? htmlAttributes : this.fields && this.fields.htmlAttributes,
          iconCss: !isNullOrUndefined2(iconCss) ? iconCss : this.fields && this.fields.iconCss,
          disabled: !isNullOrUndefined2(disabled) ? disabled : this.fields && this.fields.disabled
        }
      };
      this.setProperties(field, true);
    };
    DropDownBase2.prototype.getJSONfromOption = function(items, options, fields, category) {
      if (category === void 0) {
        category = null;
      }
      for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
        var option = options_1[_i];
        var json = {};
        json[fields.text] = option.innerText;
        json[fields.value] = !isNullOrUndefined2(option.getAttribute(fields.value)) ? option.getAttribute(fields.value) : option.innerText;
        if (!isNullOrUndefined2(category)) {
          json[fields.groupBy] = category;
        }
        items.push(json);
      }
    };
    DropDownBase2.prototype.preRender = function() {
      this.scrollTimer = -1;
      this.enableRtlElements = [];
      this.isRequested = false;
      this.isDataFetched = false;
      this.itemTemplateId = "" + this.element.id + ITEMTEMPLATE_PROPERTY;
      this.displayTemplateId = "" + this.element.id + DISPLAYTEMPLATE_PROPERTY;
      this.spinnerTemplateId = "" + this.element.id + SPINNERTEMPLATE_PROPERTY;
      this.valueTemplateId = "" + this.element.id + VALUETEMPLATE_PROPERTY;
      this.groupTemplateId = "" + this.element.id + GROUPTEMPLATE_PROPERTY;
      this.headerTemplateId = "" + this.element.id + HEADERTEMPLATE_PROPERTY;
      this.footerTemplateId = "" + this.element.id + FOOTERTEMPLATE_PROPERTY;
      this.noRecordsTemplateId = "" + this.element.id + NORECORDSTEMPLATE_PROPERTY;
    };
    DropDownBase2.prototype.setListData = function(dataSource, fields, query, event2) {
      var _this = this;
      fields = fields ? fields : this.fields;
      var ulElement;
      this.isActive = true;
      var eventArgs = {
        cancel: false,
        data: dataSource,
        query
      };
      this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
      if (!this.isRequesting) {
        this.trigger("actionBegin", eventArgs, function(eventArgs2) {
          if (!eventArgs2.cancel) {
            _this.isRequesting = true;
            _this.showSpinner();
            if (dataSource instanceof DataManager) {
              _this.isRequested = true;
              var isWhereExist_1 = false;
              if (_this.isDataFetched) {
                _this.emptyDataRequest(fields);
                return;
              }
              eventArgs2.data.executeQuery(_this.getQuery(eventArgs2.query)).then(function(e) {
                _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
                var isReOrder2 = true;
                if (!_this.virtualSelectAll) {
                  var newQuery2 = _this.getQuery(eventArgs2.query);
                  for (var queryElements2 = 0; queryElements2 < newQuery2.queries.length; queryElements2++) {
                    if (newQuery2.queries[queryElements2].fn === "onWhere") {
                      isWhereExist_1 = true;
                    }
                  }
                  if (_this.isVirtualizationEnabled && e.count !== 0 && e.count < _this.itemCount * 2) {
                    if (newQuery2) {
                      for (var queryElements2 = 0; queryElements2 < newQuery2.queries.length; queryElements2++) {
                        if (newQuery2.queries[queryElements2].fn === "onTake") {
                          newQuery2.queries[queryElements2].e.nos = e.count;
                        }
                        if (_this.getModuleName() === "multiselect" && (newQuery2.queries[queryElements2].e.condition === "or" || newQuery2.queries[queryElements2].e.operator === "equal")) {
                          isReOrder2 = false;
                        }
                      }
                    }
                  } else {
                    _this.isVirtualTrackHeight = false;
                    if (newQuery2) {
                      for (var queryElements2 = 0; queryElements2 < newQuery2.queries.length; queryElements2++) {
                        if (_this.getModuleName() === "multiselect" && (newQuery2.queries[queryElements2].e && newQuery2.queries[queryElements2].e.condition === "or" || newQuery2.queries[queryElements2].e && newQuery2.queries[queryElements2].e.operator === "equal")) {
                          isReOrder2 = false;
                        }
                      }
                    }
                  }
                }
                if (isReOrder2) {
                  _this.dataCount = _this.totalItemCount = e.count;
                }
                _this.trigger("actionComplete", e, function(e2) {
                  if (!e2.cancel) {
                    _this.isRequesting = false;
                    var listItems2 = e2.result;
                    if (_this.isIncrementalRequest) {
                      ulElement = _this.renderItems(listItems2, fields);
                      return;
                    }
                    if (!_this.isVirtualizationEnabled && listItems2.length === 0 || _this.isVirtualizationEnabled && listItems2.length === 0 && !isWhereExist_1) {
                      _this.isDataFetched = true;
                    }
                    if (!isWhereExist_1) {
                      _this.remoteDataCount = e2.count;
                    }
                    _this.dataCount = !_this.virtualSelectAll ? e2.count : _this.dataCount;
                    _this.totalItemCount = !_this.virtualSelectAll ? e2.count : _this.totalItemCount;
                    ulElement = _this.renderItems(listItems2, fields);
                    _this.appendUncheckList = false;
                    _this.onActionComplete(ulElement, listItems2, e2);
                    if (_this.groupTemplate) {
                      _this.renderGroupTemplate(ulElement);
                    }
                    _this.isRequested = false;
                    _this.bindChildItems(listItems2, ulElement, fields, e2);
                    if (_this.getInitialData) {
                      _this.getInitialData = false;
                      _this.preventPopupOpen = false;
                      return;
                    }
                    if (_this.isVirtualizationEnabled && _this.setCurrentView) {
                      _this.notify("setCurrentViewDataAsync", {
                        module: "VirtualScroll"
                      });
                    }
                    if (_this.keyboardEvent != null) {
                      _this.handleVirtualKeyboardActions(_this.keyboardEvent, _this.pageCount);
                    }
                    if (_this.isVirtualizationEnabled) {
                      _this.getFilteringSkeletonCount();
                    }
                    if (_this.virtualSelectAll && _this.virtualSelectAllData) {
                      _this.virtualSelectionAll(_this.virtualSelectAllState, _this.liCollections, _this.CurrentEvent);
                      _this.virtualSelectAllState = false;
                      _this.CurrentEvent = null;
                      _this.virtualSelectAll = false;
                    }
                  }
                });
              }).catch(function(e) {
                _this.isRequested = false;
                _this.isRequesting = false;
                _this.onActionFailure(e);
                _this.hideSpinner();
              });
            } else {
              _this.isRequesting = false;
              var isReOrder = true;
              var listItems = void 0;
              if (_this.isVirtualizationEnabled && !_this.virtualGroupDataSource && _this.fields.groupBy) {
                var data = new DataManager(_this.dataSource).executeLocal(new Query().group(_this.fields.groupBy));
                _this.virtualGroupDataSource = data.records;
              }
              var dataManager = _this.isVirtualizationEnabled && _this.virtualGroupDataSource && !_this.isCustomDataUpdated ? new DataManager(_this.virtualGroupDataSource) : new DataManager(eventArgs2.data);
              listItems = _this.getQuery(eventArgs2.query).executeLocal(dataManager);
              if (!_this.virtualSelectAll) {
                var newQuery = _this.getQuery(eventArgs2.query);
                if (_this.isVirtualizationEnabled && listItems.count !== 0 && listItems.count < _this.itemCount * 2) {
                  if (newQuery) {
                    for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
                      if (newQuery.queries[queryElements].fn === "onTake") {
                        newQuery.queries[queryElements].e.nos = listItems.count;
                        listItems = newQuery.executeLocal(dataManager);
                      }
                      if (_this.getModuleName() === "multiselect" && (newQuery.queries[queryElements].e.condition === "or" || newQuery.queries[queryElements].e.operator === "equal")) {
                        isReOrder = false;
                      }
                    }
                    if (isReOrder) {
                      listItems = newQuery.executeLocal(dataManager);
                      _this.isVirtualTrackHeight = !(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated ? true : false;
                    }
                  }
                } else {
                  _this.isVirtualTrackHeight = false;
                  if (newQuery) {
                    for (var queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
                      if (_this.getModuleName() === "multiselect" && (newQuery.queries[queryElements].e && newQuery.queries[queryElements].e.condition === "or" || newQuery.queries[queryElements].e && newQuery.queries[queryElements].e.operator === "equal")) {
                        isReOrder = false;
                      }
                    }
                  }
                }
              }
              if (isReOrder && !(_this.dataSource instanceof DataManager) && !_this.isCustomDataUpdated && !_this.virtualSelectAll) {
                _this.dataCount = _this.totalItemCount = _this.virtualSelectAll ? listItems.length : listItems.count;
              }
              listItems = _this.isVirtualizationEnabled ? listItems.result : listItems;
              var localDataArgs = {
                cancel: false,
                result: listItems
              };
              _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
              _this.trigger("actionComplete", localDataArgs, function(localDataArgs2) {
                if (_this.isIncrementalRequest) {
                  ulElement = _this.renderItems(localDataArgs2.result, fields);
                  return;
                }
                if (!localDataArgs2.cancel) {
                  ulElement = _this.renderItems(localDataArgs2.result, fields);
                  _this.onActionComplete(ulElement, localDataArgs2.result, event2);
                  if (_this.groupTemplate) {
                    _this.renderGroupTemplate(ulElement);
                  }
                  _this.bindChildItems(localDataArgs2.result, ulElement, fields);
                  if (_this.getInitialData) {
                    _this.getInitialData = false;
                    _this.preventPopupOpen = false;
                    return;
                  }
                  setTimeout(function() {
                    if (_this.getModuleName() === "multiselect" && _this.itemTemplate != null && ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || _this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)) {
                      _this.updateDataList();
                    }
                  });
                }
              });
            }
          }
        });
      }
    };
    DropDownBase2.prototype.handleVirtualKeyboardActions = function(e, pageCount) {
    };
    DropDownBase2.prototype.updatePopupState = function() {
    };
    DropDownBase2.prototype.virtualSelectionAll = function(state, li, event2) {
    };
    DropDownBase2.prototype.updateRemoteData = function() {
      this.setListData(this.dataSource, this.fields, this.query);
    };
    DropDownBase2.prototype.bindChildItems = function(listItems, ulElement, fields, e) {
      var _this = this;
      if (listItems.length >= 100 && this.getModuleName() === "autocomplete") {
        setTimeout(function() {
          var childNode = _this.remainingItems(_this.sortedData, fields);
          append(childNode, ulElement);
          _this.liCollections = _this.list.querySelectorAll("." + dropDownBaseClasses.li);
          _this.updateListValues();
          _this.raiseDataBound(listItems, e);
        }, 0);
      } else {
        this.raiseDataBound(listItems, e);
      }
    };
    DropDownBase2.prototype.isObjectInArray = function(objectToFind, array) {
      return array.some(function(item) {
        return Object.keys(objectToFind).every(function(key) {
          return Object.prototype.hasOwnProperty.call(item, key) && item[key] === objectToFind[key];
        });
      });
    };
    DropDownBase2.prototype.updateListValues = function() {
    };
    DropDownBase2.prototype.findListElement = function(list, findNode, attribute, value) {
      var liElement = null;
      if (list) {
        var listArr = [].slice.call(list.querySelectorAll(findNode));
        for (var index = 0; index < listArr.length; index++) {
          if (listArr[index].getAttribute(attribute) === value + "") {
            liElement = listArr[index];
            break;
          }
        }
      }
      return liElement;
    };
    DropDownBase2.prototype.raiseDataBound = function(listItems, e) {
      this.hideSpinner();
      var dataBoundEventArgs = {
        items: listItems,
        e
      };
      this.trigger("dataBound", dataBoundEventArgs);
    };
    DropDownBase2.prototype.remainingItems = function(dataSource, fields) {
      var spliceData = new DataManager(dataSource).executeLocal(new Query().skip(100));
      if (this.itemTemplate) {
        var listElements = this.templateListItem(spliceData, fields);
        return [].slice.call(listElements.childNodes);
      }
      var type = this.typeOfData(spliceData).typeof;
      if (type === "string" || type === "number" || type === "boolean") {
        return ListBase.createListItemFromArray(this.createElement, spliceData, true, this.listOption(spliceData, fields), this);
      }
      return ListBase.createListItemFromJson(this.createElement, spliceData, this.listOption(spliceData, fields), 1, true, this);
    };
    DropDownBase2.prototype.emptyDataRequest = function(fields) {
      var listItems = [];
      this.onActionComplete(this.renderItems(listItems, fields), listItems);
      this.isRequested = false;
      this.isRequesting = false;
      this.hideSpinner();
    };
    DropDownBase2.prototype.showSpinner = function() {
    };
    DropDownBase2.prototype.hideSpinner = function() {
    };
    DropDownBase2.prototype.onActionFailure = function(e) {
      this.liCollections = [];
      this.trigger("actionFailure", e);
      this.l10nUpdate(true);
      if (!isNullOrUndefined2(this.list)) {
        addClass2([this.list], dropDownBaseClasses.noData);
      }
    };
    DropDownBase2.prototype.onActionComplete = function(ulElement, list, e) {
      this.listData = list;
      if (this.isVirtualizationEnabled && !this.isCustomDataUpdated && !this.virtualSelectAll) {
        this.notify("setGeneratedData", {
          module: "VirtualScroll"
        });
      }
      if (this.getModuleName() !== "listbox") {
        ulElement.setAttribute("tabindex", "0");
      }
      if (this.isReact) {
        this.clearTemplate(["itemTemplate", "groupTemplate", "actionFailureTemplate", "noRecordsTemplate"]);
      }
      if (!this.isVirtualizationEnabled) {
        this.fixedHeaderElement = isNullOrUndefined2(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
      }
      if (this.getModuleName() === "multiselect" && this.properties.allowCustomValue && this.fields.groupBy) {
        for (var i = 0; i < ulElement.childElementCount; i++) {
          if (ulElement.children[i].classList.contains("e-list-group-item")) {
            if (isNullOrUndefined2(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML === "") {
              addClass2([ulElement.children[i]], HIDE_GROUPLIST);
            }
          }
          if (ulElement.children[0].classList.contains("e-hide-group-header")) {
            setStyleAttribute2(ulElement.children[1], {
              zIndex: 11
            });
          }
        }
      }
      if (!isNullOrUndefined2(this.list)) {
        if (!this.isVirtualizationEnabled) {
          this.list.innerHTML = "";
          this.list.appendChild(ulElement);
          this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
          this.ulElement = this.list.querySelector("ul");
          this.postRender(this.list, list, this.bindEvent);
        }
      }
    };
    DropDownBase2.prototype.postRender = function(listElement, list, bindEvent) {
      if (this.fields.disabled) {
        var liCollections = listElement.querySelectorAll("." + dropDownBaseClasses.li);
        for (var index = 0; index < liCollections.length; index++) {
          if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.disabled]) {
            if (!isNullOrUndefined2(this.fields.groupBy)) {
              var item = this.listData[index];
              var value = getValue2(this.fields.value ? this.fields.value : "value", item);
              var li = listElement.querySelector('li[data-value="' + value + '"]');
              if (!isNullOrUndefined2(li)) {
                this.disableListItem(li);
              }
            } else {
              this.disableListItem(liCollections[index]);
            }
          }
        }
      }
      var focusItem = this.fields.disabled ? listElement.querySelector("." + dropDownBaseClasses.li + ":not(.e-disabled") : listElement.querySelector("." + dropDownBaseClasses.li);
      var selectedItem = listElement.querySelector("." + dropDownBaseClasses.selected);
      if (focusItem && !selectedItem) {
        if (this.isVirtualizationEnabled && this.viewPortInfo.startIndex !== 0) {
          var elements = this.ulElement.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-virtual-list):not(.e-hide-listitem)");
          focusItem = elements && elements.length > 0 ? elements[2] : focusItem;
        }
        if (focusItem) {
          focusItem.classList.add(dropDownBaseClasses.focus);
        }
      }
      if (list.length <= 0) {
        this.l10nUpdate();
        addClass2([listElement], dropDownBaseClasses.noData);
      } else {
        listElement.classList.remove(dropDownBaseClasses.noData);
      }
    };
    DropDownBase2.prototype.getQuery = function(query) {
      return query ? query : this.query ? this.query : new Query();
    };
    DropDownBase2.prototype.updateVirtualizationProperties = function(itemCount, filtering, isCheckbox) {
      this.isVirtualizationEnabled = true;
      this.virtualizedItemsCount = itemCount;
      this.isAllowFiltering = filtering;
      this.isCheckBoxSelection = isCheckbox;
    };
    DropDownBase2.prototype.renderGroupTemplate = function(listEle) {
      if (this.fields.groupBy !== null && this.dataSource || this.element.querySelector("." + dropDownBaseClasses.group)) {
        var dataSource = this.dataSource;
        var option = {
          groupTemplateID: this.groupTemplateId,
          isStringTemplate: this.isStringTemplate
        };
        var headerItems = listEle.querySelectorAll("." + dropDownBaseClasses.group);
        var groupcheck = this.templateCompiler(this.groupTemplate);
        if (typeof this.groupTemplate !== "function" && groupcheck) {
          var groupValue = select2(this.groupTemplate, document).innerHTML.trim();
          var tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);
          if (this.isGroupChecking) {
            for (var i = 0; i < tempHeaders.length; i++) {
              this.notify("addItem", {
                module: "CheckBoxSelection",
                item: tempHeaders[i]
              });
            }
          }
        } else {
          var tempHeaders = ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option, this);
          if (this.isGroupChecking) {
            for (var i = 0; i < tempHeaders.length; i++) {
              this.notify("addItem", {
                module: "CheckBoxSelection",
                item: tempHeaders[i]
              });
            }
          }
        }
        this.renderReactTemplates();
      }
    };
    DropDownBase2.prototype.createListItems = function(dataSource, fields) {
      if (dataSource) {
        if (fields.groupBy || this.element.querySelector("optgroup")) {
          if (fields.groupBy) {
            if (this.sortOrder !== "None") {
              dataSource = this.getSortedDataSource(dataSource);
            }
            if (this.element.querySelector("optgroup") && this.isGroupChecking && this.getModuleName() === "multiselect") {
              dataSource = ListBase.groupDataSource(dataSource, fields, this.sortOrder);
            } else {
              dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
            }
          }
          addClass2([this.list], dropDownBaseClasses.grouping);
        } else if (this.getModuleName() !== "listbox" || this.getModuleName() === "listbox" && !this.preventDefActionFilter) {
          dataSource = this.getSortedDataSource(dataSource);
        }
        var options = this.listOption(dataSource, fields);
        var spliceData = dataSource.length > 100 ? new DataManager(dataSource).executeLocal(new Query().take(100)) : dataSource;
        this.sortedData = dataSource;
        return ListBase.createList(this.createElement, this.getModuleName() === "autocomplete" ? spliceData : dataSource, options, true, this);
      }
      return null;
    };
    DropDownBase2.prototype.listOption = function(dataSource, fields) {
      var iconCss = isNullOrUndefined2(fields.iconCss) ? false : true;
      var fieldValues = !isNullOrUndefined2(fields.properties) ? fields.properties : fields;
      var options = fields.text !== null || fields.value !== null ? {
        fields: fieldValues,
        showIcon: iconCss,
        ariaAttributes: {
          groupItemRole: "presentation"
        }
      } : {
        fields: {
          value: "text"
        }
      };
      return extend2({}, options, fields, true);
    };
    DropDownBase2.prototype.setFloatingHeader = function(e) {
      if (!isNullOrUndefined2(this.list) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
        if (isNullOrUndefined2(this.fixedHeaderElement)) {
          this.fixedHeaderElement = this.createElement("div", {
            className: dropDownBaseClasses.fixedHead
          });
          if (!isNullOrUndefined2(this.list) && !this.list.querySelector("li").classList.contains(dropDownBaseClasses.group)) {
            this.fixedHeaderElement.style.display = "none";
          }
          if (!isNullOrUndefined2(this.fixedHeaderElement) && !isNullOrUndefined2(this.list)) {
            prepend([this.fixedHeaderElement], this.list);
          }
          this.setFixedHeader();
        }
        if (!isNullOrUndefined2(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === "0") {
          this.setFixedHeader();
        }
        this.scrollStop(e);
      }
    };
    DropDownBase2.prototype.scrollStop = function(e, isDownkey) {
      var target = !isNullOrUndefined2(e) ? e.target : this.list;
      var computedHeight = getComputedStyle(this.getValidLi(), null).getPropertyValue("height");
      var computedMarginValue = getComputedStyle(this.getValidLi(), null).getPropertyValue("margin-bottom");
      var marginValue = parseInt(computedMarginValue, 10);
      var liHeight = this.getModuleName() === "multiselect" ? parseFloat(computedHeight) : parseInt(computedHeight, 10);
      var topIndex = Math.round(target.scrollTop / (liHeight + marginValue));
      var liCollections = this.list.querySelectorAll("li:not(.e-hide-listitem)");
      var virtualListCount = this.list.querySelectorAll(".e-virtual-list").length;
      var count = 0;
      var isCount = false;
      for (var i = topIndex; i > -1; i--) {
        var index = this.isVirtualizationEnabled ? i + virtualListCount : i;
        if (this.isVirtualizationEnabled) {
          if (isCount) {
            count++;
          }
          if (this.fixedHeaderElement && this.updateGroupHeader(index, liCollections, target)) {
            break;
          }
          if (isDownkey) {
            if (!isNullOrUndefined2(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== "autocomplete" || !isNullOrUndefined2(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === "autocomplete") {
              count++;
              isCount = true;
            }
          }
        } else {
          if (this.updateGroupHeader(index, liCollections, target)) {
            break;
          }
        }
      }
    };
    DropDownBase2.prototype.getPageCount = function(returnExactCount) {
      if (this.list) {
        var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null : getComputedStyle(this.getItems()[0], null).getPropertyValue("height");
        var pageCount = Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
        return returnExactCount ? pageCount : Math.round(pageCount);
      } else {
        return 0;
      }
    };
    DropDownBase2.prototype.updateGroupHeader = function(index, liCollections, target) {
      if (!isNullOrUndefined2(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.group)) {
        this.updateGroupFixedHeader(liCollections[index], target);
        return true;
      } else {
        this.fixedHeaderElement.style.display = "none";
        this.fixedHeaderElement.style.top = "none";
        return false;
      }
    };
    DropDownBase2.prototype.updateGroupFixedHeader = function(element2, target) {
      if (this.fixedHeaderElement) {
        if (!isNullOrUndefined2(element2.innerHTML)) {
          this.fixedHeaderElement.innerHTML = element2.innerHTML;
        }
        this.fixedHeaderElement.style.position = "fixed";
        this.fixedHeaderElement.style.top = this.list.parentElement.offsetTop + this.list.offsetTop - window.scrollY + "px";
        this.fixedHeaderElement.style.display = "block";
      }
    };
    DropDownBase2.prototype.getValidLi = function() {
      if (this.isVirtualizationEnabled) {
        return this.liCollections[0].classList.contains("e-virtual-list") ? this.liCollections[this.skeletonCount] : this.liCollections[0];
      }
      return this.liCollections[0];
    };
    DropDownBase2.prototype.renderItems = function(listData, fields, isCheckBoxUpdate) {
      var ulElement;
      if (this.itemTemplate && listData) {
        if (this.getModuleName() === "multiselect" && this.virtualSelectAll) {
          this.virtualSelectAllData = listData;
          listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
        }
        var dataSource = listData;
        if (dataSource && fields.groupBy) {
          if (this.sortOrder !== "None") {
            dataSource = this.getSortedDataSource(dataSource);
          }
          dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
        } else if (this.getModuleName() !== "listbox" || this.getModuleName() === "listbox" && !this.preventDefActionFilter) {
          dataSource = this.getSortedDataSource(dataSource);
        }
        this.sortedData = dataSource;
        var spliceData = dataSource.length > 100 ? new DataManager(dataSource).executeLocal(new Query().take(100)) : dataSource;
        ulElement = this.templateListItem(this.getModuleName() === "autocomplete" ? spliceData : dataSource, fields);
        if (this.isIncrementalRequest) {
          this.incrementalLiCollections = ulElement.querySelectorAll("." + dropDownBaseClasses.li);
          this.incrementalUlElement = ulElement;
          this.incrementalListData = listData;
          return ulElement;
        }
        if (this.isVirtualizationEnabled) {
          var oldUlElement = this.list.querySelector(".e-list-parent");
          var virtualUlElement = this.list.querySelector(".e-virtual-ddl-content");
          if (listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement || oldUlElement && virtualUlElement && this.isAllowFiltering || oldUlElement && virtualUlElement && this.getModuleName() === "autocomplete") {
            if (this.getModuleName() === "multiselect" && this.isCheckBoxSelection && this.appendUncheckList && this.list && this.list.querySelector(".e-active")) {
              virtualUlElement.appendChild(ulElement);
              isCheckBoxUpdate = true;
            } else {
              virtualUlElement.replaceChild(ulElement, oldUlElement);
            }
            var reOrderList = this.list.querySelectorAll(".e-reorder");
            if (this.list.querySelector(".e-virtual-ddl-content") && reOrderList && reOrderList.length > 0 && !isCheckBoxUpdate) {
              this.list.querySelector(".e-virtual-ddl-content").removeChild(reOrderList[0]);
            }
            this.updateListElements(listData);
          } else if (!virtualUlElement) {
            this.list.innerHTML = "";
            this.createVirtualContent();
            this.list.querySelector(".e-virtual-ddl-content").appendChild(ulElement);
            this.updateListElements(listData);
          }
        }
      } else {
        if (this.getModuleName() === "multiselect" && this.virtualSelectAll) {
          this.virtualSelectAllData = listData;
          listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
        }
        ulElement = this.createListItems(listData, fields);
        if (this.isIncrementalRequest) {
          this.incrementalLiCollections = ulElement.querySelectorAll("." + dropDownBaseClasses.li);
          this.incrementalUlElement = ulElement;
          this.incrementalListData = listData;
          return ulElement;
        }
        if (this.isVirtualizationEnabled) {
          var oldUlElement = this.list.querySelector(".e-list-parent:not(.e-reorder)");
          var virtualUlElement = this.list.querySelector(".e-virtual-ddl-content");
          var isRemovedUlelement = false;
          if (!oldUlElement && this.list.querySelector(".e-list-parent.e-reorder")) {
            oldUlElement = this.list.querySelector(".e-list-parent.e-reorder");
          }
          if (listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement || oldUlElement && virtualUlElement && this.isAllowFiltering || oldUlElement && virtualUlElement && (this.getModuleName() === "autocomplete" || this.getModuleName() === "multiselect") || isRemovedUlelement) {
            if (!this.appendUncheckList) {
              virtualUlElement.replaceChild(ulElement, oldUlElement);
            } else {
              virtualUlElement.appendChild(ulElement);
            }
            this.updateListElements(listData);
          } else if (!virtualUlElement || !virtualUlElement.firstChild) {
            this.list.innerHTML = "";
            this.createVirtualContent();
            this.list.querySelector(".e-virtual-ddl-content").appendChild(ulElement);
            this.updateListElements(listData);
          }
        }
      }
      return ulElement;
    };
    DropDownBase2.prototype.createVirtualContent = function() {
      if (!this.list.querySelector(".e-virtual-ddl-content")) {
        this.list.appendChild(this.createElement("div", {
          className: "e-virtual-ddl-content"
        }));
      }
    };
    DropDownBase2.prototype.updateListElements = function(listData) {
      this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
      this.ulElement = this.list.querySelector("ul");
      this.listData = listData;
      this.postRender(this.list, listData, this.bindEvent);
    };
    DropDownBase2.prototype.templateListItem = function(dataSource, fields) {
      var option = this.listOption(dataSource, fields);
      option.templateID = this.itemTemplateId;
      option.isStringTemplate = this.isStringTemplate;
      var itemcheck = this.templateCompiler(this.itemTemplate);
      var ulElement;
      if (typeof this.itemTemplate !== "function" && itemcheck) {
        var itemValue = select2(this.itemTemplate, document).innerHTML.trim();
        ulElement = ListBase.renderContentTemplate(this.createElement, itemValue, dataSource, fields.properties, option, this);
        if (this.isVirtualizationEnabled && this.isReact) {
          this.renderReactTemplates();
        }
        return ulElement;
      } else {
        ulElement = ListBase.renderContentTemplate(this.createElement, this.itemTemplate, dataSource, fields.properties, option, this);
        if (this.isVirtualizationEnabled && this.isReact) {
          this.renderReactTemplates();
        }
        return ulElement;
      }
    };
    DropDownBase2.prototype.typeOfData = function(items) {
      var item = {
        typeof: null,
        item: null
      };
      for (var i = 0; !isNullOrUndefined2(items) && i < items.length; i++) {
        if (!isNullOrUndefined2(items[i])) {
          var listDataType = typeof items[i] === "string" || typeof items[i] === "number" || typeof items[i] === "boolean";
          var isNullData = listDataType ? isNullOrUndefined2(items[i]) : isNullOrUndefined2(getValue2(this.fields.value ? this.fields.value : "value", items[i]));
          if (!isNullData) {
            return item = {
              typeof: typeof items[i],
              item: items[i]
            };
          }
        }
      }
      return item;
    };
    DropDownBase2.prototype.setFixedHeader = function() {
      if (!isNullOrUndefined2(this.list)) {
        this.list.parentElement.style.display = "block";
      }
      var borderWidth = 0;
      if (this.list && this.list.parentElement) {
        borderWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue("border-width"), 10);
        if (isNaN(borderWidth)) {
          var borderTopWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue("border-top-width"), 10);
          var borderBottomWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue("border-bottom-width"), 10);
          var borderLeftWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue("border-left-width"), 10);
          var borderRightWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue("border-right-width"), 10);
          borderWidth = borderTopWidth + borderBottomWidth + borderLeftWidth + borderRightWidth;
        }
      }
      if (!isNullOrUndefined2(this.liCollections)) {
        var liWidth = this.getValidLi().offsetWidth - borderWidth;
        this.fixedHeaderElement.style.width = liWidth.toString() + "px";
      }
      setStyleAttribute2(this.fixedHeaderElement, {
        zIndex: 10
      });
      var firstLi = this.ulElement.querySelector("." + dropDownBaseClasses.group + ":not(.e-hide-listitem)");
      this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
    };
    DropDownBase2.prototype.getSortedDataSource = function(dataSource) {
      if (dataSource && this.sortOrder !== "None") {
        var textField = this.fields.text ? this.fields.text : "text";
        if (this.typeOfData(dataSource).typeof === "string" || this.typeOfData(dataSource).typeof === "number" || this.typeOfData(dataSource).typeof === "boolean") {
          textField = "";
        }
        dataSource = ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, textField));
      }
      return dataSource;
    };
    DropDownBase2.prototype.getIndexByValue = function(value) {
      var index;
      var listItems = [];
      if (this.fields.disabled && this.getModuleName() === "multiselect" && this.liCollections) {
        listItems = this.liCollections;
      } else {
        listItems = this.getItems();
      }
      for (var i = 0; i < listItems.length; i++) {
        if (!isNullOrUndefined2(value) && listItems[i].getAttribute("data-value") === value.toString()) {
          index = i;
          break;
        }
      }
      return index;
    };
    DropDownBase2.prototype.getIndexByValueFilter = function(value, ulElement) {
      var index;
      if (!ulElement) {
        return null;
      }
      var listItems = ulElement.querySelectorAll("li:not(.e-list-group-item)");
      if (listItems) {
        for (var i = 0; i < listItems.length; i++) {
          if (!isNullOrUndefined2(value) && listItems[i].getAttribute("data-value") === value.toString()) {
            index = i;
            break;
          }
        }
      }
      return index;
    };
    DropDownBase2.prototype.dispatchEvent = function(element2, type) {
      var evt = document.createEvent("HTMLEvents");
      evt.initEvent(type, false, true);
      if (element2) {
        element2.dispatchEvent(evt);
      }
    };
    DropDownBase2.prototype.setFields = function() {
      if (this.fields.value && !this.fields.text) {
        this.updateFields(this.fields.value, this.fields.value);
      } else if (!this.fields.value && this.fields.text) {
        this.updateFields(this.fields.text, this.fields.text);
      } else if (!this.fields.value && !this.fields.text) {
        this.isPrimitiveData = true;
        this.updateFields("text", "text");
      }
    };
    DropDownBase2.prototype.resetList = function(dataSource, fields, query, e) {
      if (this.list) {
        if (this.element.tagName === "SELECT" && this.element.options.length > 0 || this.element.tagName === "UL" && this.element.childNodes.length > 0) {
          var data = dataSource instanceof Array ? dataSource.length > 0 : !isNullOrUndefined2(dataSource);
          if (!data && this.selectData && this.selectData.length > 0) {
            dataSource = this.selectData;
          }
        }
        dataSource = this.getModuleName() === "combobox" && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length && this.addedNewItem ? this.selectData : dataSource;
        this.addedNewItem = false;
        this.setListData(dataSource, fields, query, e);
      }
    };
    DropDownBase2.prototype.updateSelectElementData = function(isFiltering) {
      if ((isFiltering || this.isVirtualizationEnabled) && isNullOrUndefined2(this.selectData) && this.listData && this.listData.length > 0) {
        this.selectData = this.listData;
      }
    };
    DropDownBase2.prototype.updateSelection = function() {
    };
    DropDownBase2.prototype.renderList = function() {
      this.render();
    };
    DropDownBase2.prototype.updateDataSource = function(props, oldProps) {
      this.resetList(this.dataSource);
      this.totalItemCount = this.dataSource instanceof DataManager ? this.dataSource.dataSource.json.length : 0;
    };
    DropDownBase2.prototype.setUpdateInitial = function(props, newProp, oldProp) {
      this.isDataFetched = false;
      this.isPrimitiveData = false;
      var updateData = {};
      for (var j = 0; props.length > j; j++) {
        if (newProp[props[j]] && props[j] === "fields") {
          this.setFields();
          updateData[props[j]] = newProp[props[j]];
        } else if (newProp[props[j]]) {
          updateData[props[j]] = newProp[props[j]];
        }
      }
      if (Object.keys(updateData).length > 0) {
        if (Object.keys(updateData).indexOf("dataSource") === -1) {
          updateData.dataSource = this.dataSource;
        }
        if (this.getModuleName() === "listbox") {
          if (!this.isReact || this.isReact && (!isNullOrUndefined2(newProp.dataSource) || !isNullOrUndefined2(newProp.sortOrder))) {
            this.updateDataSource(updateData, oldProp);
          }
        } else {
          this.isDynamicData = true;
          this.updateDataSource(updateData, oldProp);
        }
      }
    };
    DropDownBase2.prototype.onPropertyChanged = function(newProp, oldProp) {
      if (this.getModuleName() === "dropdownbase") {
        this.setUpdateInitial(["fields", "query", "dataSource"], newProp);
      }
      this.setUpdateInitial(["sortOrder", "itemTemplate"], newProp);
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "query":
          case "sortOrder":
          case "dataSource":
          case "itemTemplate":
            break;
          case "enableRtl":
            this.setEnableRtl();
            break;
          case "groupTemplate":
            this.renderGroupTemplate(this.list);
            if (this.ulElement && this.fixedHeaderElement) {
              var firstLi = this.ulElement.querySelector("." + dropDownBaseClasses.group);
              this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
            }
            break;
          case "locale":
            if (this.list && !isNullOrUndefined2(this.liCollections) && this.liCollections.length === 0) {
              this.l10nUpdate();
            }
            break;
          case "zIndex":
            this.setProperties({
              zIndex: newProp.zIndex
            }, true);
            this.setZIndex();
            break;
        }
      }
    };
    DropDownBase2.prototype.render = function(e, isEmptyData) {
      if (this.getModuleName() === "listbox") {
        this.list = this.createElement("div", {
          className: dropDownBaseClasses.content,
          attrs: {
            "tabindex": "0"
          }
        });
      } else {
        this.list = this.createElement("div", {
          className: dropDownBaseClasses.content
        });
      }
      this.list.classList.add(dropDownBaseClasses.root);
      this.setFields();
      var rippleModel = {
        duration: 300,
        selector: "." + dropDownBaseClasses.li
      };
      this.rippleFun = rippleEffect(this.list, rippleModel);
      var group = this.element.querySelector("select>optgroup");
      if ((this.fields.groupBy || !isNullOrUndefined2(group)) && !this.isGroupChecking) {
        EventHandler2.add(this.list, "scroll", this.setFloatingHeader, this);
        EventHandler2.add(document, "scroll", this.updateGroupFixedHeader, this);
      }
      if (this.getModuleName() === "dropdownbase") {
        if (this.element.getAttribute("tabindex")) {
          this.list.setAttribute("tabindex", this.element.getAttribute("tabindex"));
        }
        removeClass2([this.element], dropDownBaseClasses.root);
        this.element.style.display = "none";
        var wrapperElement = this.createElement("div");
        this.element.parentElement.insertBefore(wrapperElement, this.element);
        wrapperElement.appendChild(this.element);
        wrapperElement.appendChild(this.list);
      }
      this.setEnableRtl();
      if (!isEmptyData) {
        this.initialize(e);
      }
    };
    DropDownBase2.prototype.removeScrollEvent = function() {
      if (this.list) {
        EventHandler2.remove(this.list, "scroll", this.setFloatingHeader);
      }
    };
    DropDownBase2.prototype.getModuleName = function() {
      return "dropdownbase";
    };
    DropDownBase2.prototype.getItems = function() {
      return this.ulElement.querySelectorAll("." + dropDownBaseClasses.li);
    };
    DropDownBase2.prototype.addItem = function(items, itemIndex) {
      if (!this.list || this.list.textContent === this.noRecordsTemplate && this.getModuleName() !== "listbox") {
        this.renderList();
      }
      if (this.sortOrder !== "None" && isNullOrUndefined2(itemIndex)) {
        var newList = [].slice.call(this.listData);
        newList.push(items);
        newList = this.getSortedDataSource(newList);
        if (this.fields.groupBy) {
          newList = ListBase.groupDataSource(newList, this.fields.properties, this.sortOrder);
          itemIndex = newList.indexOf(items);
        } else {
          itemIndex = newList.indexOf(items);
        }
      }
      var itemsCount = this.getItems().length;
      var isListboxEmpty = itemsCount === 0;
      var selectedItemValue = this.list.querySelector("." + dropDownBaseClasses.selected);
      items = items instanceof Array ? items : [items];
      var index;
      index = isNullOrUndefined2(itemIndex) || itemIndex < 0 || itemIndex > itemsCount - 1 ? itemsCount : itemIndex;
      var fields = this.fields;
      if (items && fields.groupBy) {
        items = ListBase.groupDataSource(items, fields.properties);
      }
      var liCollections = [];
      for (var i = 0; i < items.length; i++) {
        var item = items[i];
        var isHeader = item.isHeader;
        var li = this.createElement("li", {
          className: isHeader ? dropDownBaseClasses.group : dropDownBaseClasses.li,
          id: "option-add-" + i
        });
        var itemText = item instanceof Object ? getValue2(fields.text, item) : item;
        if (isHeader) {
          li.innerText = itemText;
        }
        if (this.itemTemplate && !isHeader) {
          var itemCheck = this.templateCompiler(this.itemTemplate);
          var compiledString = typeof this.itemTemplate !== "function" && itemCheck ? compile4(select2(this.itemTemplate, document).innerHTML.trim()) : compile4(this.itemTemplate);
          var addItemTemplate = compiledString(item, this, "itemTemplate", this.itemTemplateId, this.isStringTemplate, null, li);
          if (addItemTemplate) {
            append(addItemTemplate, li);
          }
        } else if (!isHeader) {
          li.appendChild(document.createTextNode(itemText));
        }
        li.setAttribute("data-value", item instanceof Object ? getValue2(fields.value, item) : item);
        li.setAttribute("role", "option");
        this.notify("addItem", {
          module: "CheckBoxSelection",
          item: li
        });
        liCollections.push(li);
        if (this.getModuleName() === "listbox") {
          this.listData.splice(isListboxEmpty ? this.listData.length : index, 0, item);
          if (this.listData.length !== this.sortedData.length) {
            this.sortedData = this.listData;
          }
        } else {
          this.listData.push(item);
        }
        if (this.sortOrder === "None" && isNullOrUndefined2(itemIndex) && index === 0) {
          index = null;
        }
        if (this.getModuleName() === "listbox") {
          this.updateActionCompleteData(li, item, isListboxEmpty ? null : index + i);
        } else {
          this.updateActionCompleteData(li, item, index);
        }
        this.trigger("beforeItemRender", {
          element: li,
          item
        });
      }
      if (itemsCount === 0 && isNullOrUndefined2(this.list.querySelector("ul"))) {
        if (!isNullOrUndefined2(this.list)) {
          this.list.innerHTML = "";
          this.list.classList.remove(dropDownBaseClasses.noData);
          this.isAddNewItemTemplate = true;
          if (!isNullOrUndefined2(this.ulElement)) {
            this.list.appendChild(this.ulElement);
          }
        }
        this.liCollections = liCollections;
        if (!isNullOrUndefined2(liCollections) && !isNullOrUndefined2(this.ulElement)) {
          append(liCollections, this.ulElement);
        }
        this.updateAddItemList(this.list, itemsCount);
      } else {
        if (this.getModuleName() === "listbox" && itemsCount === 0) {
          this.ulElement.innerHTML = "";
        }
        var attr = [];
        for (var i = 0; i < items.length; i++) {
          var listGroupItem = this.ulElement.querySelectorAll(".e-list-group-item");
          for (var j = 0; j < listGroupItem.length; j++) {
            attr[j] = listGroupItem[j].innerText;
          }
          if (attr.indexOf(liCollections[i].innerText) > -1 && fields.groupBy) {
            for (var j = 0; j < listGroupItem.length; j++) {
              if (attr[j] === liCollections[i].innerText) {
                if (this.sortOrder === "None") {
                  this.ulElement.insertBefore(liCollections[i + 1], listGroupItem[j + 1]);
                } else {
                  this.ulElement.insertBefore(liCollections[i + 1], this.ulElement.childNodes[itemIndex]);
                }
                i = i + 1;
                break;
              }
            }
          } else {
            if (this.liCollections[index] && this.liCollections[index].parentNode) {
              this.liCollections[index].parentNode.insertBefore(liCollections[i], this.liCollections[index]);
            } else {
              if (itemIndex && this.getModuleName() === "listbox") {
                this.ulElement.insertBefore(liCollections[i], this.ulElement.childNodes[itemIndex + i]);
              } else {
                this.ulElement.appendChild(liCollections[i]);
              }
            }
          }
          var tempLi = [].slice.call(this.liCollections);
          tempLi.splice(index, 0, liCollections[i]);
          this.liCollections = tempLi;
          index += 1;
          if (this.getModuleName() === "multiselect") {
            this.updateDataList();
          }
        }
      }
      if (this.getModuleName() === "listbox" && this.isReact) {
        this.renderReactTemplates();
      }
      if (selectedItemValue || itemIndex === 0) {
        this.updateSelection();
      }
      this.addedNewItem = true;
    };
    DropDownBase2.prototype.isDisabledElement = function(li) {
      if (li && li.classList.contains("e-disabled")) {
        return true;
      }
      return false;
    };
    DropDownBase2.prototype.isDisabledItemByIndex = function(index) {
      if (this.fields.disabled && this.liCollections) {
        return this.isDisabledElement(this.liCollections[index]);
      }
      return false;
    };
    DropDownBase2.prototype.disableListItem = function(li) {
      li.classList.add("e-disabled");
      li.setAttribute("aria-disabled", "true");
      li.setAttribute("aria-selected", "false");
    };
    DropDownBase2.prototype.validationAttribute = function(target, hidden) {
      var name = target.getAttribute("name") ? target.getAttribute("name") : target.getAttribute("id");
      hidden.setAttribute("name", name);
      target.removeAttribute("name");
      var attributes4 = ["required", "aria-required", "form"];
      for (var i = 0; i < attributes4.length; i++) {
        if (!target.getAttribute(attributes4[i])) {
          continue;
        }
        var attr = target.getAttribute(attributes4[i]);
        hidden.setAttribute(attributes4[i], attr);
        target.removeAttribute(attributes4[i]);
      }
    };
    DropDownBase2.prototype.setZIndex = function() {
    };
    DropDownBase2.prototype.updateActionCompleteData = function(li, item, index) {
    };
    DropDownBase2.prototype.updateAddItemList = function(list, itemCount) {
    };
    DropDownBase2.prototype.updateDataList = function() {
    };
    DropDownBase2.prototype.getDataByValue = function(value) {
      if (!isNullOrUndefined2(this.listData)) {
        var type = this.typeOfData(this.listData).typeof;
        if (type === "string" || type === "number" || type === "boolean") {
          for (var _i = 0, _a = this.listData; _i < _a.length; _i++) {
            var item = _a[_i];
            if (!isNullOrUndefined2(item) && item === value) {
              return item;
            }
          }
        } else {
          for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
            var item = _c[_b];
            if (!isNullOrUndefined2(item) && getValue2(this.fields.value ? this.fields.value : "value", item) === value) {
              return item;
            }
          }
        }
      }
      return null;
    };
    DropDownBase2.prototype.destroy = function() {
      if (document) {
        EventHandler2.remove(document, "scroll", this.updateGroupFixedHeader);
        if (document.body.contains(this.list)) {
          EventHandler2.remove(this.list, "scroll", this.setFloatingHeader);
          if (!isNullOrUndefined2(this.rippleFun)) {
            this.rippleFun();
          }
          detach2(this.list);
        }
      }
      this.liCollections = null;
      this.ulElement = null;
      this.list = null;
      this.enableRtlElements = null;
      this.rippleFun = null;
      _super.prototype.destroy.call(this);
    };
    __decorate50([Complex2({
      text: null,
      value: null,
      iconCss: null,
      groupBy: null,
      disabled: null
    }, FieldSettings2)], DropDownBase2.prototype, "fields", void 0);
    __decorate50([Property2(null)], DropDownBase2.prototype, "itemTemplate", void 0);
    __decorate50([Property2(null)], DropDownBase2.prototype, "groupTemplate", void 0);
    __decorate50([Property2("No records found")], DropDownBase2.prototype, "noRecordsTemplate", void 0);
    __decorate50([Property2("Request failed")], DropDownBase2.prototype, "actionFailureTemplate", void 0);
    __decorate50([Property2("None")], DropDownBase2.prototype, "sortOrder", void 0);
    __decorate50([Property2([])], DropDownBase2.prototype, "dataSource", void 0);
    __decorate50([Property2(null)], DropDownBase2.prototype, "query", void 0);
    __decorate50([Property2("StartsWith")], DropDownBase2.prototype, "filterType", void 0);
    __decorate50([Property2(true)], DropDownBase2.prototype, "ignoreCase", void 0);
    __decorate50([Property2(1e3)], DropDownBase2.prototype, "zIndex", void 0);
    __decorate50([Property2(false)], DropDownBase2.prototype, "ignoreAccent", void 0);
    __decorate50([Property2()], DropDownBase2.prototype, "locale", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "actionBegin", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "actionComplete", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "actionFailure", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "select", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "dataBound", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "created", void 0);
    __decorate50([Event3()], DropDownBase2.prototype, "destroyed", void 0);
    DropDownBase2 = __decorate50([NotifyPropertyChanges2], DropDownBase2);
    return DropDownBase2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/input/input.js
var CLASSNAMES2 = {
  RTL: "e-rtl",
  DISABLE: "e-disabled",
  INPUT: "e-input",
  TEXTAREA: "e-multi-line-input",
  INPUTGROUP: "e-input-group",
  FLOATINPUT: "e-float-input",
  FLOATLINE: "e-float-line",
  FLOATTEXT: "e-float-text",
  FLOATTEXTCONTENT: "e-float-text-content",
  CLEARICON: "e-clear-icon",
  CLEARICONHIDE: "e-clear-icon-hide",
  LABELTOP: "e-label-top",
  LABELBOTTOM: "e-label-bottom",
  NOFLOATLABEL: "e-no-float-label",
  INPUTCUSTOMTAG: "e-input-custom-tag",
  FLOATCUSTOMTAG: "e-float-custom-tag"
};
var containerAttributes = ["title", "style", "class"];
var TEXTBOX_FOCUS = "e-input-focus";
var Input;
(function(Input2) {
  var privateInputObj = {
    container: null,
    buttons: [],
    clearButton: null
  };
  var floatType;
  var isBindClearAction = true;
  function createInput(args, internalCreateElement) {
    args.element.__eventHandlers = {};
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    var inputObject3 = {
      container: null,
      buttons: [],
      clearButton: null
    };
    floatType = args.floatLabelType;
    isBindClearAction = args.bindClearAction;
    if (isNullOrUndefined2(args.floatLabelType) || args.floatLabelType === "Never") {
      inputObject3.container = createInputContainer(args, CLASSNAMES2.INPUTGROUP, CLASSNAMES2.INPUTCUSTOMTAG, "span", makeElement);
      args.element.parentNode.insertBefore(inputObject3.container, args.element);
      addClass2([args.element], CLASSNAMES2.INPUT);
      inputObject3.container.appendChild(args.element);
    } else {
      createFloatingInput(args, inputObject3, makeElement);
    }
    bindInitialEvent(args);
    if (!isNullOrUndefined2(args.properties) && !isNullOrUndefined2(args.properties.showClearButton) && args.properties.showClearButton) {
      setClearButton(args.properties.showClearButton, args.element, inputObject3, true, makeElement);
      inputObject3.clearButton.setAttribute("role", "button");
      if (inputObject3.container.classList.contains(CLASSNAMES2.FLOATINPUT)) {
        addClass2([inputObject3.container], CLASSNAMES2.INPUTGROUP);
      }
    }
    if (!isNullOrUndefined2(args.buttons)) {
      for (var i = 0; i < args.buttons.length; i++) {
        inputObject3.buttons.push(appendSpan(args.buttons[i], inputObject3.container, makeElement));
      }
    }
    if (!isNullOrUndefined2(args.element) && args.element.tagName === "TEXTAREA") {
      addClass2([inputObject3.container], CLASSNAMES2.TEXTAREA);
    }
    validateInputType(inputObject3.container, args.element);
    inputObject3 = setPropertyValue(args, inputObject3);
    createSpanElement(inputObject3.container, makeElement);
    privateInputObj = inputObject3;
    return inputObject3;
  }
  Input2.createInput = createInput;
  function bindFocusEventHandler(args) {
    var parent = getParentNode(args.element);
    if (parent.classList.contains("e-input-group") || parent.classList.contains("e-outline") || parent.classList.contains("e-filled")) {
      parent.classList.add("e-input-focus");
    }
    if (args.floatLabelType !== "Never") {
      setTimeout(function() {
        Input2.calculateWidth(args.element, parent);
      }, 80);
    }
  }
  function bindBlurEventHandler(args) {
    var parent = getParentNode(args.element);
    if (parent.classList.contains("e-input-group") || parent.classList.contains("e-outline") || parent.classList.contains("e-filled")) {
      parent.classList.remove("e-input-focus");
    }
    if (args.floatLabelType !== "Never") {
      setTimeout(function() {
        Input2.calculateWidth(args.element, parent);
      }, 80);
    }
  }
  function bindInputEventHandler(args) {
    checkInputValue(args.floatLabelType, args.element);
  }
  function bindInitialEvent(args) {
    checkInputValue(args.floatLabelType, args.element);
    var focusHandler2 = function() {
      return bindFocusEventHandler(args);
    };
    var blurHandler2 = function() {
      return bindBlurEventHandler(args);
    };
    var inputHandler2 = function() {
      return bindInputEventHandler(args);
    };
    args.element.addEventListener("focus", focusHandler2);
    args.element.addEventListener("blur", blurHandler2);
    args.element.addEventListener("input", inputHandler2);
    args.element.__eventHandlers["inputFocusHandler"] = {
      focusHandler: focusHandler2
    };
    args.element.__eventHandlers["inputBlurHandler"] = {
      blurHandler: blurHandler2
    };
    args.element.__eventHandlers["inputHandler"] = {
      inputHandler: inputHandler2
    };
  }
  Input2.bindInitialEvent = bindInitialEvent;
  function unbindInitialEvent(args) {
    if (!isNullOrUndefined2(args.element)) {
      if (!isNullOrUndefined2(args.element.__eventHandlers)) {
        if (!isNullOrUndefined2(args.element.__eventHandlers["inputFocusHandler"]) && !isNullOrUndefined2(args.element.__eventHandlers["inputBlurHandler"]) && !isNullOrUndefined2(args.element.__eventHandlers["inputHandler"])) {
          var focusHandler_1 = args.element.__eventHandlers["inputFocusHandler"].focusHandler;
          var blurHandler_1 = args.element.__eventHandlers["inputBlurHandler"].blurHandler;
          var inputHandler_1 = args.element.__eventHandlers["inputHandler"].inputHandler;
          args.element.removeEventListener("focus", focusHandler_1);
          args.element.removeEventListener("blur", blurHandler_1);
          args.element.removeEventListener("input", inputHandler_1);
          delete args.element.__eventHandlers["inputFocusHandler"];
          delete args.element.__eventHandlers["inputBlurHandler"];
          delete args.element.__eventHandlers["inputHandler"];
        }
      }
    }
  }
  function checkInputValue(floatLabelType, inputElement) {
    var inputValue = inputElement.value;
    var inputParent = inputElement.parentElement;
    var grandParent = inputParent && inputParent.parentElement;
    if (inputValue !== "" && !isNullOrUndefined2(inputValue)) {
      if (inputParent && inputParent.classList.contains("e-input-group")) {
        inputParent.classList.add("e-valid-input");
      } else if (grandParent && grandParent.classList.contains("e-input-group")) {
        grandParent.classList.add("e-valid-input");
      }
    } else if (floatLabelType !== "Always") {
      if (inputParent && inputParent.classList.contains("e-input-group")) {
        inputParent.classList.remove("e-valid-input");
      } else if (grandParent && grandParent.classList.contains("e-input-group")) {
        grandParent.classList.remove("e-valid-input");
      }
    }
  }
  function _focusFn() {
    var label = getParentNode(this).getElementsByClassName("e-float-text")[0];
    if (!isNullOrUndefined2(label)) {
      addClass2([label], CLASSNAMES2.LABELTOP);
      if (label.classList.contains(CLASSNAMES2.LABELBOTTOM)) {
        removeClass2([label], CLASSNAMES2.LABELBOTTOM);
      }
    }
  }
  function _blurFn() {
    var parent = getParentNode(this);
    if (parent.getElementsByTagName("textarea")[0] ? parent.getElementsByTagName("textarea")[0].value === "" : parent.getElementsByTagName("input")[0].value === "") {
      var label = parent.getElementsByClassName("e-float-text")[0];
      if (!isNullOrUndefined2(label)) {
        if (label.classList.contains(CLASSNAMES2.LABELTOP)) {
          removeClass2([label], CLASSNAMES2.LABELTOP);
        }
        addClass2([label], CLASSNAMES2.LABELBOTTOM);
      }
    }
  }
  function wireFloatingEvents(element2) {
    element2.addEventListener("focus", _focusFn);
    element2.addEventListener("blur", _blurFn);
  }
  Input2.wireFloatingEvents = wireFloatingEvents;
  function unwireFloatingEvents(element2) {
    if (!isNullOrUndefined2(element2)) {
      element2.removeEventListener("focus", _focusFn);
      element2.removeEventListener("blur", _blurFn);
    }
  }
  function inputEventHandler(args) {
    validateLabel(args.element, args.floatLabelType);
  }
  function blurEventHandler(args) {
    validateLabel(args.element, args.floatLabelType);
  }
  function createFloatingInput(args, inputObject3, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    if (args.floatLabelType === "Auto") {
      wireFloatingEvents(args.element);
    }
    if (isNullOrUndefined2(inputObject3.container)) {
      inputObject3.container = createInputContainer(args, CLASSNAMES2.FLOATINPUT, CLASSNAMES2.FLOATCUSTOMTAG, "div", makeElement);
      inputObject3.container.classList.add(CLASSNAMES2.INPUTGROUP);
      if (args.element.parentNode) {
        args.element.parentNode.insertBefore(inputObject3.container, args.element);
      }
    } else {
      if (!isNullOrUndefined2(args.customTag)) {
        inputObject3.container.classList.add(CLASSNAMES2.FLOATCUSTOMTAG);
      }
      inputObject3.container.classList.add(CLASSNAMES2.FLOATINPUT);
    }
    var floatLinelement = makeElement("span", {
      className: CLASSNAMES2.FLOATLINE
    });
    var floatLabelElement = makeElement("label", {
      className: CLASSNAMES2.FLOATTEXT
    });
    if (!isNullOrUndefined2(args.element.id) && args.element.id !== "") {
      floatLabelElement.id = "label_" + args.element.id.replace(/ /g, "_");
      attributes2(args.element, {
        "aria-labelledby": floatLabelElement.id
      });
    }
    if (!isNullOrUndefined2(args.element.placeholder) && args.element.placeholder !== "") {
      floatLabelElement.innerText = encodePlaceHolder(args.element.placeholder);
      args.element.removeAttribute("placeholder");
    }
    if (!isNullOrUndefined2(args.properties) && !isNullOrUndefined2(args.properties.placeholder) && args.properties.placeholder !== "") {
      floatLabelElement.innerText = encodePlaceHolder(args.properties.placeholder);
    }
    if (!floatLabelElement.innerText) {
      inputObject3.container.classList.add(CLASSNAMES2.NOFLOATLABEL);
    }
    if (inputObject3.container.classList.contains("e-float-icon-left")) {
      var inputWrap = inputObject3.container.querySelector(".e-input-in-wrap");
      inputWrap.appendChild(args.element);
      inputWrap.appendChild(floatLinelement);
      inputWrap.appendChild(floatLabelElement);
    } else {
      inputObject3.container.appendChild(args.element);
      inputObject3.container.appendChild(floatLinelement);
      inputObject3.container.appendChild(floatLabelElement);
    }
    updateLabelState(args.element.value, floatLabelElement);
    if (args.floatLabelType === "Always") {
      if (floatLabelElement.classList.contains(CLASSNAMES2.LABELBOTTOM)) {
        removeClass2([floatLabelElement], CLASSNAMES2.LABELBOTTOM);
      }
      addClass2([floatLabelElement], CLASSNAMES2.LABELTOP);
    }
    if (args.floatLabelType === "Auto") {
      var inputFloatHandler = function() {
        return inputEventHandler(args);
      };
      var blurFloatHandler = function() {
        return blurEventHandler(args);
      };
      args.element.addEventListener("input", inputFloatHandler);
      args.element.addEventListener("blur", blurFloatHandler);
      args.element.__eventHandlers["floatInputHandler"] = {
        inputFloatHandler
      };
      args.element.__eventHandlers["floatBlurHandler"] = {
        blurFloatHandler
      };
    } else {
      unWireFloatLabelEvents(args);
    }
    if (!isNullOrUndefined2(args.element.getAttribute("id"))) {
      floatLabelElement.setAttribute("for", args.element.getAttribute("id"));
    }
  }
  function unWireFloatLabelEvents(args) {
    if (!isNullOrUndefined2(args.element) && !isNullOrUndefined2(args.element.__eventHandlers) && !isNullOrUndefined2(args.element.__eventHandlers["floatInputHandler"]) && !isNullOrUndefined2(args.element.__eventHandlers["floatBlurHandler"])) {
      var inputFloatHandler = args.element.__eventHandlers["floatInputHandler"].inputFloatHandler;
      var blurFloatHandler = args.element.__eventHandlers["floatBlurHandler"].blurFloatHandler;
      args.element.removeEventListener("input", inputFloatHandler);
      args.element.removeEventListener("blur", blurFloatHandler);
      delete args.element.__eventHandlers["floatInputHandler"];
      delete args.element.__eventHandlers["floatBlurHandler"];
    }
  }
  function checkFloatLabelType(type, container) {
    if (type === "Always" && container.classList.contains("e-outline")) {
      container.classList.add("e-valid-input");
    }
  }
  function setPropertyValue(args, inputObject3) {
    if (!isNullOrUndefined2(args.properties)) {
      for (var _i = 0, _a = Object.keys(args.properties); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "cssClass":
            setCssClass(args.properties.cssClass, [inputObject3.container]);
            checkFloatLabelType(args.floatLabelType, inputObject3.container);
            break;
          case "enabled":
            setEnabled(args.properties.enabled, args.element, args.floatLabelType, inputObject3.container);
            break;
          case "enableRtl":
            setEnableRtl(args.properties.enableRtl, [inputObject3.container]);
            break;
          case "placeholder":
            setPlaceholder(args.properties.placeholder, args.element);
            break;
          case "readonly":
            setReadonly(args.properties.readonly, args.element);
            break;
        }
      }
    }
    return inputObject3;
  }
  function updateIconState(value, button, readonly) {
    if (!isNullOrUndefined2(button)) {
      if (value && !readonly) {
        removeClass2([button], CLASSNAMES2.CLEARICONHIDE);
      } else {
        addClass2([button], CLASSNAMES2.CLEARICONHIDE);
      }
    }
  }
  function updateLabelState(value, label, element2) {
    if (element2 === void 0) {
      element2 = null;
    }
    if (value) {
      addClass2([label], CLASSNAMES2.LABELTOP);
      if (label.classList.contains(CLASSNAMES2.LABELBOTTOM)) {
        removeClass2([label], CLASSNAMES2.LABELBOTTOM);
      }
    } else {
      var isNotFocused = element2 != null ? element2 !== document.activeElement : true;
      if (isNotFocused) {
        if (label.classList.contains(CLASSNAMES2.LABELTOP)) {
          removeClass2([label], CLASSNAMES2.LABELTOP);
        }
        addClass2([label], CLASSNAMES2.LABELBOTTOM);
      }
    }
  }
  function getParentNode(element2) {
    var parentNode = isNullOrUndefined2(element2.parentNode) ? element2 : element2.parentNode;
    if (parentNode && parentNode.classList.contains("e-input-in-wrap")) {
      parentNode = parentNode.parentNode;
    }
    return parentNode;
  }
  function createClearButton(element2, inputObject3, initial, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    var button = makeElement("span", {
      className: CLASSNAMES2.CLEARICON
    });
    var container = inputObject3.container;
    if (!isNullOrUndefined2(initial)) {
      container.appendChild(button);
    } else {
      var baseElement = inputObject3.container.classList.contains(CLASSNAMES2.FLOATINPUT) ? inputObject3.container.querySelector("." + CLASSNAMES2.FLOATTEXT) : element2;
      baseElement.insertAdjacentElement("afterend", button);
    }
    addClass2([button], CLASSNAMES2.CLEARICONHIDE);
    wireClearBtnEvents(element2, button, container);
    button.setAttribute("aria-label", "close");
    return button;
  }
  function clickHandler(event2, element2, button) {
    if (!(element2.classList.contains(CLASSNAMES2.DISABLE) || element2.readOnly)) {
      event2.preventDefault();
      if (element2 !== document.activeElement) {
        element2.focus();
      }
      element2.value = "";
      addClass2([button], CLASSNAMES2.CLEARICONHIDE);
    }
  }
  function inputHandler(element2, button) {
    updateIconState(element2.value, button);
  }
  function focusHandler(element2, button) {
    updateIconState(element2.value, button, element2.readOnly);
  }
  function blurHandler(element2, button) {
    setTimeout(function() {
      if (!isNullOrUndefined2(button)) {
        addClass2([button], CLASSNAMES2.CLEARICONHIDE);
        button = !isNullOrUndefined2(element2) && element2.classList.contains("e-combobox") ? null : button;
      }
    }, 200);
  }
  function wireClearBtnEvents(element2, button, container) {
    if (isBindClearAction === void 0 || isBindClearAction) {
      var clickHandlerEvent = function(e) {
        return clickHandler(e, element2, button);
      };
      button.addEventListener("click", clickHandlerEvent);
      element2.__eventHandlers["clearClickHandler"] = {
        clickHandlerEvent
      };
    }
    var inputHandlerEvent = function() {
      return inputHandler(element2, button);
    };
    var focusHandlerEvent = function() {
      return focusHandler(element2, button);
    };
    var blurHandlerEvent = function() {
      return blurHandler(element2, button);
    };
    element2.addEventListener("input", inputHandlerEvent);
    element2.addEventListener("focus", focusHandlerEvent);
    element2.addEventListener("blur", blurHandlerEvent);
    element2.__eventHandlers["clearInputHandler"] = {
      inputHandlerEvent
    };
    element2.__eventHandlers["clearFocusHandler"] = {
      focusHandlerEvent
    };
    element2.__eventHandlers["clearBlurHandler"] = {
      blurHandlerEvent
    };
  }
  Input2.wireClearBtnEvents = wireClearBtnEvents;
  function unWireClearBtnEvents(element2, button) {
    if (!isNullOrUndefined2(element2) && !isNullOrUndefined2(element2.__eventHandlers)) {
      if (!isNullOrUndefined2(element2.__eventHandlers["clearClickHandler"])) {
        var clickHandlerEvent = element2.__eventHandlers["clearClickHandler"].clickHandlerEvent;
        if (isBindClearAction === void 0 || isBindClearAction) {
          if (!isNullOrUndefined2(button)) {
            button.removeEventListener("click", clickHandlerEvent);
          }
        }
        delete element2.__eventHandlers["clearClickHandler"];
      }
      if (!isNullOrUndefined2(element2.__eventHandlers["clearInputHandler"]) && !isNullOrUndefined2(element2.__eventHandlers["clearFocusHandler"]) && !isNullOrUndefined2(element2.__eventHandlers["clearBlurHandler"])) {
        var inputHandlerEvent = element2.__eventHandlers["clearInputHandler"].inputHandlerEvent;
        var focusHandlerEvent = element2.__eventHandlers["clearFocusHandler"].focusHandlerEvent;
        var blurHandlerEvent = element2.__eventHandlers["clearBlurHandler"].blurHandlerEvent;
        element2.removeEventListener("input", inputHandlerEvent);
        element2.removeEventListener("focus", focusHandlerEvent);
        element2.removeEventListener("blur", blurHandlerEvent);
        delete element2.__eventHandlers["clearInputHandler"];
        delete element2.__eventHandlers["clearFocusHandler"];
        delete element2.__eventHandlers["clearBlurHandler"];
      }
    }
  }
  function destroy5(args, button) {
    if (button === void 0) {
      button = null;
    }
    unbindInitialEvent(args);
    if (args.floatLabelType === "Auto") {
      unWireFloatLabelEvents(args);
    }
    if (args.properties.showClearButton) {
      unWireClearBtnEvents(args.element, button);
    }
    if (!isNullOrUndefined2(args.buttons)) {
      _internalRipple(false, null, args.buttons);
    }
    unwireFloatingEvents(args.element);
    if (!isNullOrUndefined2(args.element)) {
      delete args.element.__eventHandlers;
      if (args.element.classList.contains(CLASSNAMES2.INPUT)) {
        args.element.classList.remove(CLASSNAMES2.INPUT);
      }
    }
    privateInputObj = null;
  }
  Input2.destroy = destroy5;
  function validateLabel(element2, floatLabelType) {
    var parent = getParentNode(element2);
    if (parent.classList.contains(CLASSNAMES2.FLOATINPUT) && floatLabelType === "Auto") {
      var label = getParentNode(element2).getElementsByClassName("e-float-text")[0];
      updateLabelState(element2.value, label, element2);
    }
  }
  function createInputContainer(args, className, tagClass, tag, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    var container;
    if (!isNullOrUndefined2(args.customTag)) {
      container = makeElement(args.customTag, {
        className
      });
      container.classList.add(tagClass);
    } else {
      container = makeElement(tag, {
        className
      });
    }
    container.classList.add("e-control-wrapper");
    return container;
  }
  function encodePlaceHolder(placeholder) {
    var result = "";
    if (!isNullOrUndefined2(placeholder) && placeholder !== "") {
      var spanEle = document.createElement("span");
      spanEle.innerHTML = '<input  placeholder="' + placeholder + '"/>';
      var hiddenInput = spanEle.children[0];
      result = hiddenInput.placeholder;
    }
    return result;
  }
  function setValue5(value, element2, floatLabelType, clearButton) {
    element2.value = value;
    if (floatLabelType !== "Never") {
      calculateWidth(element2, element2.parentElement);
    }
    if (!isNullOrUndefined2(floatLabelType) && floatLabelType === "Auto") {
      validateLabel(element2, floatLabelType);
    }
    if (!isNullOrUndefined2(clearButton) && clearButton) {
      var parentElement = getParentNode(element2);
      if (!isNullOrUndefined2(parentElement)) {
        var button = parentElement.getElementsByClassName(CLASSNAMES2.CLEARICON)[0];
        if (!isNullOrUndefined2(button)) {
          if (element2.value && !isNullOrUndefined2(parentElement) && parentElement.classList.contains("e-input-focus")) {
            removeClass2([button], CLASSNAMES2.CLEARICONHIDE);
          } else {
            addClass2([button], CLASSNAMES2.CLEARICONHIDE);
          }
        }
      }
    }
    checkInputValue(floatLabelType, element2);
  }
  Input2.setValue = setValue5;
  function setCssClass(cssClass2, elements, oldClass) {
    if (!isNullOrUndefined2(oldClass) && oldClass !== "") {
      removeClass2(elements, oldClass.split(" "));
    }
    if (!isNullOrUndefined2(cssClass2) && cssClass2 !== "") {
      addClass2(elements, cssClass2.split(" "));
    }
  }
  Input2.setCssClass = setCssClass;
  function calculateWidth(element2, container, moduleName) {
    if (moduleName !== "multiselect" && !_isElementVisible(element2)) {
      return;
    }
    var elementWidth = moduleName === "multiselect" ? element2 : element2.clientWidth - parseInt(getComputedStyle(element2, null).getPropertyValue("padding-left"), 10);
    if (!isNullOrUndefined2(container) && !isNullOrUndefined2(container.getElementsByClassName("e-float-text-content")[0])) {
      if (container.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")) {
        container.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow");
      }
      if (elementWidth < container.getElementsByClassName("e-float-text-content")[0].clientWidth || elementWidth === container.getElementsByClassName("e-float-text-content")[0].clientWidth) {
        container.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow");
      }
    }
  }
  Input2.calculateWidth = calculateWidth;
  function setWidth2(width, container) {
    if (typeof width === "number") {
      container.style.width = formatUnit(width);
    } else if (typeof width === "string") {
      container.style.width = width.match(/px|%|em/) ? width : formatUnit(width);
    }
    calculateWidth(container.firstChild, container);
  }
  Input2.setWidth = setWidth2;
  function setPlaceholder(placeholder, element2) {
    placeholder = encodePlaceHolder(placeholder);
    var parentElement = getParentNode(element2);
    if (parentElement.classList.contains(CLASSNAMES2.FLOATINPUT)) {
      if (!isNullOrUndefined2(placeholder) && placeholder !== "") {
        var floatTextContent = parentElement.getElementsByClassName("e-float-text-content")[0];
        if (floatTextContent && floatTextContent.children[0]) {
          floatTextContent.children[0].textContent = placeholder;
        } else {
          parentElement.getElementsByClassName(CLASSNAMES2.FLOATTEXT)[0].textContent = placeholder;
        }
        parentElement.classList.remove(CLASSNAMES2.NOFLOATLABEL);
        element2.removeAttribute("placeholder");
      } else {
        parentElement.classList.add(CLASSNAMES2.NOFLOATLABEL);
        var floatTextContent = parentElement.getElementsByClassName("e-float-text-content")[0];
        if (floatTextContent) {
          floatTextContent.children[0].textContent = "";
        } else {
          parentElement.getElementsByClassName(CLASSNAMES2.FLOATTEXT)[0].textContent = "";
        }
      }
    } else {
      if (!isNullOrUndefined2(placeholder) && placeholder !== "") {
        attributes2(element2, {
          "placeholder": placeholder
        });
      } else {
        element2.removeAttribute("placeholder");
      }
    }
  }
  Input2.setPlaceholder = setPlaceholder;
  function setReadonly(isReadonly, element2, floatLabelType) {
    if (isReadonly) {
      attributes2(element2, {
        readonly: ""
      });
    } else {
      element2.removeAttribute("readonly");
    }
    if (!isNullOrUndefined2(floatLabelType)) {
      validateLabel(element2, floatLabelType);
    }
  }
  Input2.setReadonly = setReadonly;
  function setEnableRtl(isRtl, elements) {
    if (isRtl) {
      addClass2(elements, CLASSNAMES2.RTL);
    } else {
      removeClass2(elements, CLASSNAMES2.RTL);
    }
  }
  Input2.setEnableRtl = setEnableRtl;
  function setEnabled(isEnable, element2, floatLabelType, inputContainer) {
    var disabledAttrs = {
      "disabled": "",
      "aria-disabled": "true"
    };
    var considerWrapper = isNullOrUndefined2(inputContainer) ? false : true;
    if (isEnable) {
      element2.classList.remove(CLASSNAMES2.DISABLE);
      removeAttributes(disabledAttrs, element2);
      if (considerWrapper) {
        removeClass2([inputContainer], CLASSNAMES2.DISABLE);
      }
    } else {
      element2.classList.add(CLASSNAMES2.DISABLE);
      addAttributes(disabledAttrs, element2);
      if (considerWrapper) {
        addClass2([inputContainer], CLASSNAMES2.DISABLE);
      }
    }
    if (!isNullOrUndefined2(floatLabelType)) {
      validateLabel(element2, floatLabelType);
    }
  }
  Input2.setEnabled = setEnabled;
  function setClearButton(isClear, element2, inputObject3, initial, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    if (isClear) {
      inputObject3.clearButton = createClearButton(element2, inputObject3, initial, makeElement);
    } else {
      remove(inputObject3.clearButton);
      inputObject3.clearButton = null;
    }
  }
  Input2.setClearButton = setClearButton;
  function removeAttributes(attrs, element2) {
    for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
      var key = _a[_i];
      var parentElement = getParentNode(element2);
      if (key === "disabled") {
        element2.classList.remove(CLASSNAMES2.DISABLE);
      }
      if (key === "disabled" && parentElement.classList.contains(CLASSNAMES2.INPUTGROUP)) {
        parentElement.classList.remove(CLASSNAMES2.DISABLE);
      }
      if (key === "placeholder" && parentElement.classList.contains(CLASSNAMES2.FLOATINPUT)) {
        parentElement.getElementsByClassName(CLASSNAMES2.FLOATTEXT)[0].textContent = "";
      } else {
        element2.removeAttribute(key);
      }
    }
  }
  Input2.removeAttributes = removeAttributes;
  function addAttributes(attrs, element2) {
    for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
      var key = _a[_i];
      var parentElement = getParentNode(element2);
      if (key === "disabled") {
        element2.classList.add(CLASSNAMES2.DISABLE);
      }
      if (key === "disabled" && parentElement.classList.contains(CLASSNAMES2.INPUTGROUP)) {
        parentElement.classList.add(CLASSNAMES2.DISABLE);
      }
      if (key === "placeholder" && parentElement.classList.contains(CLASSNAMES2.FLOATINPUT)) {
        parentElement.getElementsByClassName(CLASSNAMES2.FLOATTEXT)[0].textContent = attrs["" + key];
      } else {
        element2.setAttribute(key, attrs["" + key]);
      }
    }
  }
  Input2.addAttributes = addAttributes;
  function removeFloating2(input2) {
    var container = input2.container;
    if (!isNullOrUndefined2(container) && container.classList.contains(CLASSNAMES2.FLOATINPUT)) {
      var inputEle = container.querySelector("textarea") ? container.querySelector("textarea") : container.querySelector("input");
      var placeholder = container.querySelector("." + CLASSNAMES2.FLOATTEXT).textContent;
      var clearButton = container.querySelector(".e-clear-icon") !== null;
      detach2(container.querySelector("." + CLASSNAMES2.FLOATLINE));
      detach2(container.querySelector("." + CLASSNAMES2.FLOATTEXT));
      classList(container, [CLASSNAMES2.INPUTGROUP], [CLASSNAMES2.FLOATINPUT]);
      unwireFloatingEvents(inputEle);
      attributes2(inputEle, {
        "placeholder": placeholder
      });
      inputEle.classList.add(CLASSNAMES2.INPUT);
      if (!clearButton && inputEle.tagName === "INPUT") {
        inputEle.removeAttribute("required");
      }
    }
  }
  Input2.removeFloating = removeFloating2;
  function addFloating(input2, type, placeholder, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    var container = closest2(input2, "." + CLASSNAMES2.INPUTGROUP);
    floatType = type;
    var customTag = container.tagName;
    customTag = customTag !== "DIV" && customTag !== "SPAN" ? customTag : null;
    var args = {
      element: input2,
      floatLabelType: type,
      customTag,
      properties: {
        placeholder
      }
    };
    if (type !== "Never") {
      var iconEle = container.querySelector(".e-clear-icon");
      var inputObj = {
        container
      };
      input2.classList.remove(CLASSNAMES2.INPUT);
      createFloatingInput(args, inputObj, makeElement);
      createSpanElement(inputObj.container, makeElement);
      calculateWidth(args.element, inputObj.container);
      var isPrependIcon = container.classList.contains("e-float-icon-left");
      if (isNullOrUndefined2(iconEle)) {
        if (isPrependIcon) {
          var inputWrap = container.querySelector(".e-input-in-wrap");
          iconEle = inputWrap.querySelector(".e-input-group-icon");
        } else {
          iconEle = container.querySelector(".e-input-group-icon");
        }
      }
      if (isNullOrUndefined2(iconEle)) {
        if (isPrependIcon) {
          iconEle = container.querySelector(".e-input-group-icon");
        }
      } else {
        var floatLine = container.querySelector("." + CLASSNAMES2.FLOATLINE);
        var floatText = container.querySelector("." + CLASSNAMES2.FLOATTEXT);
        var wrapper = isPrependIcon ? container.querySelector(".e-input-in-wrap") : container;
        wrapper.insertBefore(input2, iconEle);
        wrapper.insertBefore(floatLine, iconEle);
        wrapper.insertBefore(floatText, iconEle);
      }
    } else {
      unWireFloatLabelEvents(args);
    }
    checkFloatLabelType(type, input2.parentElement);
  }
  Input2.addFloating = addFloating;
  function createSpanElement(inputObject3, makeElement) {
    if (inputObject3.classList.contains("e-outline") && inputObject3.getElementsByClassName("e-float-text")[0]) {
      var labelSpanElement = makeElement("span", {
        className: CLASSNAMES2.FLOATTEXTCONTENT
      });
      labelSpanElement.innerHTML = inputObject3.getElementsByClassName("e-float-text")[0].innerHTML;
      inputObject3.getElementsByClassName("e-float-text")[0].innerHTML = "";
      inputObject3.getElementsByClassName("e-float-text")[0].appendChild(labelSpanElement);
    }
  }
  Input2.createSpanElement = createSpanElement;
  function setRipple(isRipple, inputObj) {
    for (var i = 0; i < inputObj.length; i++) {
      _internalRipple(isRipple, inputObj[parseInt(i.toString(), 10)].container);
    }
  }
  Input2.setRipple = setRipple;
  function _internalRipple(isRipple, container, button) {
    var argsButton = [];
    argsButton.push(button);
    var buttons = isNullOrUndefined2(button) ? container.querySelectorAll(".e-input-group-icon") : argsButton;
    if (isRipple && buttons.length > 0) {
      for (var index = 0; index < buttons.length; index++) {
        buttons[parseInt(index.toString(), 10)].addEventListener("mousedown", _onMouseDownRipple, false);
        buttons[parseInt(index.toString(), 10)].addEventListener("mouseup", _onMouseUpRipple, false);
      }
    } else if (buttons.length > 0) {
      for (var index = 0; index < buttons.length; index++) {
        buttons[parseInt(index.toString(), 10)].removeEventListener("mousedown", _onMouseDownRipple, this);
        buttons[parseInt(index.toString(), 10)].removeEventListener("mouseup", _onMouseUpRipple, this);
      }
    }
  }
  function _onMouseRipple(container, button) {
    if (!container.classList.contains("e-disabled") && !container.querySelector("input").readOnly) {
      button.classList.add("e-input-btn-ripple");
    }
  }
  function _isElementVisible(element2) {
    if (!element2) {
      return false;
    }
    var currentElement = element2;
    while (currentElement && currentElement !== document.body) {
      var style = window.getComputedStyle(currentElement);
      if (style.display === "none") {
        return false;
      }
      currentElement = currentElement.parentElement;
    }
    return true;
  }
  function _onMouseDownRipple() {
    var ele = this;
    var parentEle = this.parentElement;
    while (!parentEle.classList.contains("e-input-group")) {
      parentEle = parentEle.parentElement;
    }
    _onMouseRipple(parentEle, ele);
  }
  function _onMouseUpRipple() {
    var ele = this;
    setTimeout(function() {
      ele.classList.remove("e-input-btn-ripple");
    }, 500);
  }
  function createIconEle(iconClass, makeElement) {
    var button = makeElement("span", {
      className: iconClass
    });
    button.classList.add("e-input-group-icon");
    return button;
  }
  function addIcon(position, icons, container, input2, internalCreate) {
    var result = typeof icons === "string" ? icons.split(",") : icons;
    if (position.toLowerCase() === "append") {
      for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
        var icon = result_1[_i];
        appendSpan(icon, container, internalCreate);
      }
    } else {
      for (var _a = 0, result_2 = result; _a < result_2.length; _a++) {
        var icon = result_2[_a];
        prependSpan(icon, container, input2, internalCreate);
      }
    }
    if (container.getElementsByClassName("e-input-group-icon")[0] && container.getElementsByClassName("e-float-text-overflow")[0]) {
      container.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon");
    }
  }
  Input2.addIcon = addIcon;
  function prependSpan(iconClass, container, inputElement, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    var button = createIconEle(iconClass, makeElement);
    container.classList.add("e-float-icon-left");
    var innerWrapper = container.querySelector(".e-input-in-wrap");
    if (isNullOrUndefined2(innerWrapper)) {
      innerWrapper = makeElement("span", {
        className: "e-input-in-wrap"
      });
      inputElement.parentNode.insertBefore(innerWrapper, inputElement);
      var result = container.querySelectorAll(inputElement.tagName + " ~ *");
      innerWrapper.appendChild(inputElement);
      for (var i = 0; i < result.length; i++) {
        var element2 = result[parseInt(i.toString(), 10)];
        var parentElement = innerWrapper.parentElement;
        if (!element2.classList.contains("e-float-line") || !(parentElement && parentElement.classList.contains("e-filled")) && parentElement) {
          innerWrapper.appendChild(element2);
        }
      }
    }
    innerWrapper.parentNode.insertBefore(button, innerWrapper);
    _internalRipple(true, container, button);
    return button;
  }
  Input2.prependSpan = prependSpan;
  function appendSpan(iconClass, container, internalCreateElement) {
    var makeElement = !isNullOrUndefined2(internalCreateElement) ? internalCreateElement : createElement2;
    var button = createIconEle(iconClass, makeElement);
    var wrap = container.classList.contains("e-float-icon-left") ? container.querySelector(".e-input-in-wrap") : container;
    wrap.appendChild(button);
    _internalRipple(true, container, button);
    return button;
  }
  Input2.appendSpan = appendSpan;
  function validateInputType(containerElement2, input2) {
    if (input2.type === "hidden") {
      containerElement2.classList.add("e-hidden");
    } else if (containerElement2.classList.contains("e-hidden")) {
      containerElement2.classList.remove("e-hidden");
    }
  }
  Input2.validateInputType = validateInputType;
  function updateHTMLAttributesToElement(htmlAttributes, element2) {
    if (!isNullOrUndefined2(htmlAttributes)) {
      for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
        var key = _a[_i];
        if (containerAttributes.indexOf(key) < 0) {
          element2.setAttribute(key, htmlAttributes["" + key]);
        }
      }
    }
  }
  Input2.updateHTMLAttributesToElement = updateHTMLAttributesToElement;
  function updateCssClass(newClass, oldClass, container) {
    setCssClass(getInputValidClassList(newClass), [container], getInputValidClassList(oldClass));
  }
  Input2.updateCssClass = updateCssClass;
  function getInputValidClassList(inputClassName) {
    var result = inputClassName;
    if (!isNullOrUndefined2(inputClassName) && inputClassName !== "") {
      result = inputClassName.replace(/\s+/g, " ").trim();
    }
    return result;
  }
  Input2.getInputValidClassList = getInputValidClassList;
  function updateHTMLAttributesToWrapper(htmlAttributes, container) {
    if (!isNullOrUndefined2(htmlAttributes)) {
      for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
        var key = _a[_i];
        if (containerAttributes.indexOf(key) > -1) {
          if (key === "class") {
            var updatedClassValues = this.getInputValidClassList(htmlAttributes["" + key]);
            if (updatedClassValues !== "") {
              addClass2([container], updatedClassValues.split(" "));
            }
          } else if (key === "style") {
            var setStyle = container.getAttribute(key);
            setStyle = !isNullOrUndefined2(setStyle) ? setStyle + htmlAttributes["" + key] : htmlAttributes["" + key];
            container.setAttribute(key, setStyle);
          } else {
            container.setAttribute(key, htmlAttributes["" + key]);
          }
        }
      }
    }
  }
  Input2.updateHTMLAttributesToWrapper = updateHTMLAttributesToWrapper;
  function isBlank(inputString) {
    return !inputString || /^\s*$/.test(inputString);
  }
  Input2.isBlank = isBlank;
})(Input || (Input = {}));

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/numerictextbox/numerictextbox.js
var __extends52 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate51 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ROOT4 = "e-control-wrapper e-numeric";
var SPINICON = "e-input-group-icon";
var SPINUP = "e-spin-up";
var SPINDOWN = "e-spin-down";
var ERROR2 = "e-error";
var INCREMENT = "increment";
var DECREMENT = "decrement";
var INTREGEXP = new RegExp("^(-)?(\\d*)$");
var DECIMALSEPARATOR = ".";
var COMPONENT = "e-numerictextbox";
var CONTROL = "e-control";
var NUMERIC_FOCUS = "e-input-focus";
var HIDDENELEMENT = "e-numeric-hidden";
var wrapperAttributes = ["title", "style", "class"];
var selectionTimeOut = 0;
var NumericTextBox = (
  /** @class */
  function(_super) {
    __extends52(NumericTextBox2, _super);
    function NumericTextBox2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.preventChange = false;
      _this.isDynamicChange = false;
      _this.numericOptions = options;
      return _this;
    }
    NumericTextBox2.prototype.preRender = function() {
      this.isPrevFocused = false;
      this.decimalSeparator = ".";
      this.intRegExp = new RegExp("/^(-)?(d*)$/");
      this.isCalled = false;
      var ejInstance = getValue2("ej2_instances", this.element);
      this.cloneElement = this.element.cloneNode(true);
      removeClass2([this.cloneElement], [CONTROL, COMPONENT, "e-lib"]);
      this.angularTagName = null;
      this.formEle = closest2(this.element, "form");
      if (this.element.tagName === "EJS-NUMERICTEXTBOX") {
        this.angularTagName = this.element.tagName;
        var input2 = this.createElement("input");
        var index = 0;
        for (index; index < this.element.attributes.length; index++) {
          var attributeName = this.element.attributes[index].nodeName;
          if (attributeName !== "id" && attributeName !== "class") {
            input2.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
            input2.innerHTML = this.element.innerHTML;
          } else if (attributeName === "class") {
            input2.setAttribute(attributeName, this.element.className.split(" ").filter(function(item) {
              return item.indexOf("ng-") !== 0;
            }).join(" "));
          }
        }
        if (this.element.hasAttribute("name")) {
          this.element.removeAttribute("name");
        }
        this.element.classList.remove("e-control", "e-numerictextbox");
        this.element.appendChild(input2);
        this.element = input2;
        setValue3("ej2_instances", ejInstance, this.element);
      }
      attributes2(this.element, {
        "role": "spinbutton",
        "tabindex": "0",
        "autocomplete": "off"
      });
      var localeText = {
        incrementTitle: "Increment value",
        decrementTitle: "Decrement value",
        placeholder: this.placeholder
      };
      this.l10n = new L10n2("numerictextbox", localeText, this.locale);
      if (this.l10n.getConstant("placeholder") !== "") {
        this.setProperties({
          placeholder: this.placeholder || this.l10n.getConstant("placeholder")
        }, true);
      }
      if (!this.element.hasAttribute("id")) {
        this.element.setAttribute("id", getUniqueID("numerictextbox"));
      }
      this.isValidState = true;
      this.inputStyle = null;
      this.inputName = null;
      this.cultureInfo = {};
      this.initCultureInfo();
      this.initCultureFunc();
      this.prevValue = this.value;
      this.updateHTMLAttrToElement();
      this.checkAttributes(false);
      if (this.formEle) {
        this.inputEleValue = this.value;
      }
      this.validateMinMax();
      this.validateStep();
      if (this.placeholder === null) {
        this.updatePlaceholder();
      }
    };
    NumericTextBox2.prototype.render = function() {
      if (this.element.tagName.toLowerCase() === "input") {
        this.createWrapper();
        if (this.showSpinButton) {
          this.spinBtnCreation();
        }
        this.setElementWidth(this.width);
        if (!this.container.classList.contains("e-input-group")) {
          this.container.classList.add("e-input-group");
        }
        this.changeValue(this.value === null || isNaN(this.value) ? null : this.strictMode ? this.trimValue(this.value) : this.value);
        this.wireEvents();
        if (this.value !== null && !isNaN(this.value)) {
          if (this.decimals) {
            this.setProperties({
              value: this.roundNumber(this.value, this.decimals)
            }, true);
          }
        }
        if (this.element.getAttribute("value") || this.value) {
          this.element.setAttribute("value", this.element.value);
          this.hiddenInput.setAttribute("value", this.hiddenInput.value);
        }
        this.elementPrevValue = this.element.value;
        if (this.element.hasAttribute("data-val")) {
          this.element.setAttribute("data-val", "false");
        }
        if (!this.element.hasAttribute("aria-labelledby") && !this.element.hasAttribute("placeholder") && !this.element.hasAttribute("aria-label")) {
          this.element.setAttribute("aria-label", "numerictextbox");
        }
        if (!isNullOrUndefined2(closest2(this.element, "fieldset")) && closest2(this.element, "fieldset").disabled) {
          this.enabled = false;
        }
        this.renderComplete();
      }
    };
    NumericTextBox2.prototype.checkAttributes = function(isDynamic) {
      var attributes4 = isDynamic ? isNullOrUndefined2(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ["value", "min", "max", "step", "disabled", "readonly", "style", "name", "placeholder"];
      for (var _i = 0, attributes_1 = attributes4; _i < attributes_1.length; _i++) {
        var prop = attributes_1[_i];
        if (!isNullOrUndefined2(this.element.getAttribute(prop))) {
          switch (prop) {
            case "disabled":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["enabled"] === void 0 || isDynamic) {
                var enabled = this.element.getAttribute(prop) === "disabled" || this.element.getAttribute(prop) === "" || this.element.getAttribute(prop) === "true" ? false : true;
                this.setProperties({
                  enabled
                }, !isDynamic);
              }
              break;
            case "readonly":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["readonly"] === void 0 || isDynamic) {
                var readonly = this.element.getAttribute(prop) === "readonly" || this.element.getAttribute(prop) === "" || this.element.getAttribute(prop) === "true" ? true : false;
                this.setProperties({
                  readonly
                }, !isDynamic);
              }
              break;
            case "placeholder":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["placeholder"] === void 0 || isDynamic) {
                this.setProperties({
                  placeholder: this.element.placeholder
                }, !isDynamic);
              }
              break;
            case "value":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["value"] === void 0 || isDynamic) {
                var setNumber = this.instance.getNumberParser({
                  format: "n"
                })(this.element.getAttribute(prop));
                this.setProperties(setValue3(prop, setNumber, {}), !isDynamic);
              }
              break;
            case "min":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["min"] === void 0 || isDynamic) {
                var minValue = this.instance.getNumberParser({
                  format: "n"
                })(this.element.getAttribute(prop));
                if (minValue !== null && !isNaN(minValue)) {
                  this.setProperties(setValue3(prop, minValue, {}), !isDynamic);
                }
              }
              break;
            case "max":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["max"] === void 0 || isDynamic) {
                var maxValue = this.instance.getNumberParser({
                  format: "n"
                })(this.element.getAttribute(prop));
                if (maxValue !== null && !isNaN(maxValue)) {
                  this.setProperties(setValue3(prop, maxValue, {}), !isDynamic);
                }
              }
              break;
            case "step":
              if (isNullOrUndefined2(this.numericOptions) || this.numericOptions["step"] === void 0 || isDynamic) {
                var stepValue = this.instance.getNumberParser({
                  format: "n"
                })(this.element.getAttribute(prop));
                if (stepValue !== null && !isNaN(stepValue)) {
                  this.setProperties(setValue3(prop, stepValue, {}), !isDynamic);
                }
              }
              break;
            case "style":
              this.inputStyle = this.element.getAttribute(prop);
              break;
            case "name":
              this.inputName = this.element.getAttribute(prop);
              break;
            default:
              {
                var value = this.instance.getNumberParser({
                  format: "n"
                })(this.element.getAttribute(prop));
                if (value !== null && !isNaN(value) || prop === "value") {
                  this.setProperties(setValue3(prop, value, {}), true);
                }
              }
              break;
          }
        }
      }
    };
    NumericTextBox2.prototype.updatePlaceholder = function() {
      this.setProperties({
        placeholder: this.l10n.getConstant("placeholder")
      }, true);
    };
    NumericTextBox2.prototype.initCultureFunc = function() {
      this.instance = new Internationalization2(this.locale);
    };
    NumericTextBox2.prototype.initCultureInfo = function() {
      this.cultureInfo.format = this.format;
      if (getValue2("currency", this) !== null) {
        setValue3("currency", this.currency, this.cultureInfo);
        this.setProperties({
          currencyCode: this.currency
        }, true);
      }
    };
    NumericTextBox2.prototype.createWrapper = function() {
      var updatedCssClassValue = this.cssClass;
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        updatedCssClassValue = this.getNumericValidClassList(this.cssClass);
      }
      var inputObj = Input.createInput({
        element: this.element,
        floatLabelType: this.floatLabelType,
        properties: {
          readonly: this.readonly,
          placeholder: this.placeholder,
          cssClass: updatedCssClassValue,
          enableRtl: this.enableRtl,
          showClearButton: this.showClearButton,
          enabled: this.enabled
        }
      }, this.createElement);
      this.inputWrapper = inputObj;
      this.container = inputObj.container;
      this.container.setAttribute("class", ROOT4 + " " + this.container.getAttribute("class"));
      this.updateHTMLAttrToWrapper();
      if (this.readonly) {
        attributes2(this.element, {
          "aria-readonly": "true"
        });
      }
      this.hiddenInput = this.createElement("input", {
        attrs: {
          type: "text",
          "validateHidden": "true",
          "aria-label": "hidden",
          "class": HIDDENELEMENT
        }
      });
      this.inputName = this.inputName !== null ? this.inputName : this.element.id;
      this.element.removeAttribute("name");
      if (this.isAngular && this.angularTagName === "EJS-NUMERICTEXTBOX" && this.cloneElement.id.length > 0) {
        attributes2(this.hiddenInput, {
          "name": this.cloneElement.id
        });
      } else {
        attributes2(this.hiddenInput, {
          "name": this.inputName
        });
      }
      this.container.insertBefore(this.hiddenInput, this.container.childNodes[1]);
      this.updateDataAttribute(false);
      if (this.inputStyle !== null) {
        attributes2(this.container, {
          "style": this.inputStyle
        });
      }
    };
    NumericTextBox2.prototype.updateDataAttribute = function(isDynamic) {
      var attr = {};
      if (!isDynamic) {
        for (var a = 0; a < this.element.attributes.length; a++) {
          attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);
        }
      } else {
        attr = this.htmlAttributes;
      }
      for (var _i = 0, _a = Object.keys(attr); _i < _a.length; _i++) {
        var key = _a[_i];
        if (key.indexOf("data") === 0) {
          this.hiddenInput.setAttribute(key, attr["" + key]);
        }
      }
    };
    NumericTextBox2.prototype.updateHTMLAttrToElement = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var pro = _a[_i];
          if (wrapperAttributes.indexOf(pro) < 0) {
            this.element.setAttribute(pro, this.htmlAttributes["" + pro]);
          }
        }
      }
    };
    NumericTextBox2.prototype.updateCssClass = function(newClass, oldClass) {
      Input.setCssClass(this.getNumericValidClassList(newClass), [this.container], this.getNumericValidClassList(oldClass));
    };
    NumericTextBox2.prototype.getNumericValidClassList = function(numericClassName) {
      var result = numericClassName;
      if (!isNullOrUndefined2(numericClassName) && numericClassName !== "") {
        result = numericClassName.replace(/\s+/g, " ").trim();
      }
      return result;
    };
    NumericTextBox2.prototype.updateHTMLAttrToWrapper = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var pro = _a[_i];
          if (wrapperAttributes.indexOf(pro) > -1) {
            if (pro === "class") {
              var updatedClassValue = this.getNumericValidClassList(this.htmlAttributes["" + pro]);
              if (updatedClassValue !== "") {
                addClass2([this.container], updatedClassValue.split(" "));
              }
            } else if (pro === "style") {
              var numericStyle = this.container.getAttribute(pro);
              numericStyle = !isNullOrUndefined2(numericStyle) ? numericStyle + this.htmlAttributes["" + pro] : this.htmlAttributes["" + pro];
              this.container.setAttribute(pro, numericStyle);
            } else {
              this.container.setAttribute(pro, this.htmlAttributes["" + pro]);
            }
          }
        }
      }
    };
    NumericTextBox2.prototype.setElementWidth = function(width) {
      if (!isNullOrUndefined2(width)) {
        if (typeof width === "number") {
          this.container.style.width = formatUnit(width);
        } else if (typeof width === "string") {
          this.container.style.width = width.match(/px|%|em/) ? width : formatUnit(width);
        }
      }
    };
    NumericTextBox2.prototype.spinBtnCreation = function() {
      this.spinDown = Input.appendSpan(SPINICON + " " + SPINDOWN, this.container, this.createElement);
      attributes2(this.spinDown, {
        "title": this.l10n.getConstant("decrementTitle")
      });
      this.spinUp = Input.appendSpan(SPINICON + " " + SPINUP, this.container, this.createElement);
      attributes2(this.spinUp, {
        "title": this.l10n.getConstant("incrementTitle")
      });
      this.wireSpinBtnEvents();
    };
    NumericTextBox2.prototype.validateMinMax = function() {
      if (!(typeof this.min === "number" && !isNaN(this.min))) {
        this.setProperties({
          min: -Number.MAX_VALUE
        }, true);
      }
      if (!(typeof this.max === "number" && !isNaN(this.max))) {
        this.setProperties({
          max: Number.MAX_VALUE
        }, true);
      }
      if (this.decimals !== null) {
        if (this.min !== -Number.MAX_VALUE) {
          this.setProperties({
            min: this.instance.getNumberParser({
              format: "n"
            })(this.formattedValue(this.decimals, this.min))
          }, true);
        }
        if (this.max !== Number.MAX_VALUE) {
          this.setProperties({
            max: this.instance.getNumberParser({
              format: "n"
            })(this.formattedValue(this.decimals, this.max))
          }, true);
        }
      }
      this.setProperties({
        min: this.min > this.max ? this.max : this.min
      }, true);
      if (this.min !== -Number.MAX_VALUE) {
        attributes2(this.element, {
          "aria-valuemin": this.min.toString()
        });
      }
      if (this.max !== Number.MAX_VALUE) {
        attributes2(this.element, {
          "aria-valuemax": this.max.toString()
        });
      }
    };
    NumericTextBox2.prototype.formattedValue = function(decimals, value) {
      return this.instance.getNumberFormat({
        maximumFractionDigits: decimals,
        minimumFractionDigits: decimals,
        useGrouping: false
      })(value);
    };
    NumericTextBox2.prototype.validateStep = function() {
      if (this.decimals !== null) {
        this.setProperties({
          step: this.instance.getNumberParser({
            format: "n"
          })(this.formattedValue(this.decimals, this.step))
        }, true);
      }
    };
    NumericTextBox2.prototype.action = function(operation, event2) {
      this.isInteract = true;
      var value = this.isFocused ? this.instance.getNumberParser({
        format: "n"
      })(this.element.value) : this.value;
      this.changeValue(this.performAction(value, this.step, operation));
      this.raiseChangeEvent(event2);
    };
    NumericTextBox2.prototype.checkErrorClass = function() {
      if (this.isValidState) {
        removeClass2([this.container], ERROR2);
      } else {
        addClass2([this.container], ERROR2);
      }
      attributes2(this.element, {
        "aria-invalid": this.isValidState ? "false" : "true"
      });
    };
    NumericTextBox2.prototype.bindClearEvent = function() {
      if (this.showClearButton) {
        EventHandler2.add(this.inputWrapper.clearButton, "mousedown touchstart", this.resetHandler, this);
      }
    };
    NumericTextBox2.prototype.resetHandler = function(e) {
      e.preventDefault();
      if (!this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide") || this.inputWrapper.container.classList.contains("e-static-clear")) {
        this.clear(e);
      }
      this.isInteract = true;
      this.raiseChangeEvent(e);
    };
    NumericTextBox2.prototype.clear = function(event2) {
      this.setProperties({
        value: null
      }, true);
      this.setElementValue("");
      this.hiddenInput.value = "";
      var formElement = closest2(this.element, "form");
      if (formElement) {
        var element2 = this.element.nextElementSibling;
        var keyupEvent = document.createEvent("KeyboardEvent");
        keyupEvent.initEvent("keyup", false, true);
        element2.dispatchEvent(keyupEvent);
      }
    };
    NumericTextBox2.prototype.resetFormHandler = function() {
      if (this.element.tagName === "EJS-NUMERICTEXTBOX") {
        this.updateValue(null);
      } else {
        this.updateValue(this.inputEleValue);
      }
    };
    NumericTextBox2.prototype.setSpinButton = function() {
      if (!isNullOrUndefined2(this.spinDown)) {
        attributes2(this.spinDown, {
          "title": this.l10n.getConstant("decrementTitle"),
          "aria-label": this.l10n.getConstant("decrementTitle")
        });
      }
      if (!isNullOrUndefined2(this.spinUp)) {
        attributes2(this.spinUp, {
          "title": this.l10n.getConstant("incrementTitle"),
          "aria-label": this.l10n.getConstant("incrementTitle")
        });
      }
    };
    NumericTextBox2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "focus", this.focusHandler, this);
      EventHandler2.add(this.element, "blur", this.focusOutHandler, this);
      EventHandler2.add(this.element, "keydown", this.keyDownHandler, this);
      EventHandler2.add(this.element, "keyup", this.keyUpHandler, this);
      EventHandler2.add(this.element, "input", this.inputHandler, this);
      EventHandler2.add(this.element, "keypress", this.keyPressHandler, this);
      EventHandler2.add(this.element, "change", this.changeHandler, this);
      EventHandler2.add(this.element, "paste", this.pasteHandler, this);
      if (this.enabled) {
        this.bindClearEvent();
        if (this.formEle) {
          EventHandler2.add(this.formEle, "reset", this.resetFormHandler, this);
        }
      }
    };
    NumericTextBox2.prototype.wireSpinBtnEvents = function() {
      EventHandler2.add(this.spinUp, Browser2.touchStartEvent, this.mouseDownOnSpinner, this);
      EventHandler2.add(this.spinDown, Browser2.touchStartEvent, this.mouseDownOnSpinner, this);
      EventHandler2.add(this.spinUp, Browser2.touchEndEvent, this.mouseUpOnSpinner, this);
      EventHandler2.add(this.spinDown, Browser2.touchEndEvent, this.mouseUpOnSpinner, this);
      EventHandler2.add(this.spinUp, Browser2.touchMoveEvent, this.touchMoveOnSpinner, this);
      EventHandler2.add(this.spinDown, Browser2.touchMoveEvent, this.touchMoveOnSpinner, this);
    };
    NumericTextBox2.prototype.unwireEvents = function() {
      EventHandler2.remove(this.element, "focus", this.focusHandler);
      EventHandler2.remove(this.element, "blur", this.focusOutHandler);
      EventHandler2.remove(this.element, "keyup", this.keyUpHandler);
      EventHandler2.remove(this.element, "input", this.inputHandler);
      EventHandler2.remove(this.element, "keydown", this.keyDownHandler);
      EventHandler2.remove(this.element, "keypress", this.keyPressHandler);
      EventHandler2.remove(this.element, "change", this.changeHandler);
      EventHandler2.remove(this.element, "paste", this.pasteHandler);
      if (this.formEle) {
        EventHandler2.remove(this.formEle, "reset", this.resetFormHandler);
      }
    };
    NumericTextBox2.prototype.unwireSpinBtnEvents = function() {
      EventHandler2.remove(this.spinUp, Browser2.touchStartEvent, this.mouseDownOnSpinner);
      EventHandler2.remove(this.spinDown, Browser2.touchStartEvent, this.mouseDownOnSpinner);
      EventHandler2.remove(this.spinUp, Browser2.touchEndEvent, this.mouseUpOnSpinner);
      EventHandler2.remove(this.spinDown, Browser2.touchEndEvent, this.mouseUpOnSpinner);
      EventHandler2.remove(this.spinUp, Browser2.touchMoveEvent, this.touchMoveOnSpinner);
      EventHandler2.remove(this.spinDown, Browser2.touchMoveEvent, this.touchMoveOnSpinner);
    };
    NumericTextBox2.prototype.changeHandler = function(event2) {
      event2.stopPropagation();
      if (!this.element.value.length) {
        this.setProperties({
          value: null
        }, true);
      }
      var parsedInput = this.instance.getNumberParser({
        format: "n"
      })(this.element.value);
      this.updateValue(parsedInput, event2);
    };
    NumericTextBox2.prototype.raiseChangeEvent = function(event2) {
      this.inputValue = isNullOrUndefined2(this.inputValue) || isNaN(this.inputValue) ? null : this.inputValue;
      if (this.prevValue !== this.value || this.prevValue !== this.inputValue) {
        var eventArgs = {};
        this.changeEventArgs = {
          value: this.value,
          previousValue: this.prevValue,
          isInteracted: this.isInteract,
          isInteraction: this.isInteract,
          event: event2
        };
        if (event2) {
          this.changeEventArgs.event = event2;
        }
        if (this.changeEventArgs.event === void 0) {
          this.changeEventArgs.isInteracted = false;
          this.changeEventArgs.isInteraction = false;
        }
        merge2(eventArgs, this.changeEventArgs);
        this.prevValue = this.value;
        this.isInteract = false;
        this.elementPrevValue = this.element.value;
        this.preventChange = false;
        this.trigger("change", eventArgs);
      }
    };
    NumericTextBox2.prototype.pasteHandler = function() {
      var _this = this;
      if (!this.enabled || this.readonly) {
        return;
      }
      var beforeUpdate = this.element.value;
      setTimeout(function() {
        if (!_this.numericRegex().test(_this.element.value)) {
          _this.setElementValue(beforeUpdate);
        }
      });
    };
    NumericTextBox2.prototype.preventHandler = function() {
      var _this = this;
      var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
      setTimeout(function() {
        if (_this.element.selectionStart > 0) {
          var currentPos = _this.element.selectionStart;
          var prevPos = _this.element.selectionStart - 1;
          var start = 0;
          var valArray = _this.element.value.split("");
          var numericObject = getNumericObject(_this.locale);
          var decimalSeparator = getValue2("decimal", numericObject);
          var ignoreKeyCode = decimalSeparator.charCodeAt(0);
          if (_this.element.value[prevPos] === " " && _this.element.selectionStart > 0 && !iOS) {
            if (isNullOrUndefined2(_this.prevVal)) {
              _this.element.value = _this.element.value.trim();
            } else if (prevPos !== 0) {
              _this.element.value = _this.prevVal;
            } else if (prevPos === 0) {
              _this.element.value = _this.element.value.trim();
            }
            _this.element.setSelectionRange(prevPos, prevPos);
          } else if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1])) && _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) !== 45) {
            if (valArray.indexOf(_this.element.value[_this.element.selectionStart - 1]) !== valArray.lastIndexOf(_this.element.value[_this.element.selectionStart - 1]) && _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === ignoreKeyCode || _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) !== ignoreKeyCode) {
              _this.element.value = _this.element.value.substring(0, prevPos) + _this.element.value.substring(currentPos, _this.element.value.length);
              _this.element.setSelectionRange(prevPos, prevPos);
              if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1])) && _this.element.selectionStart > 0 && _this.element.value.length) {
                _this.preventHandler();
              }
            }
          } else if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 2])) && _this.element.selectionStart > 1 && _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) !== 45) {
            if (valArray.indexOf(_this.element.value[_this.element.selectionStart - 2]) !== valArray.lastIndexOf(_this.element.value[_this.element.selectionStart - 2]) && _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) === ignoreKeyCode || _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) !== ignoreKeyCode) {
              _this.element.setSelectionRange(prevPos, prevPos);
              _this.nextEle = _this.element.value[_this.element.selectionStart];
              _this.cursorPosChanged = true;
              _this.preventHandler();
            }
          }
          if (_this.cursorPosChanged === true && _this.element.value[_this.element.selectionStart] === _this.nextEle && isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1]))) {
            _this.element.setSelectionRange(_this.element.selectionStart + 1, _this.element.selectionStart + 1);
            _this.cursorPosChanged = false;
            _this.nextEle = null;
          }
          if (_this.element.value.trim() === "") {
            _this.element.setSelectionRange(start, start);
          }
          if (_this.element.selectionStart > 0) {
            if (_this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === 45 && _this.element.selectionStart > 1) {
              if (!isNullOrUndefined2(_this.prevVal)) {
                _this.element.value = _this.prevVal;
              }
              _this.element.setSelectionRange(_this.element.selectionStart, _this.element.selectionStart);
            }
            if (_this.element.value[_this.element.selectionStart - 1] === decimalSeparator && _this.decimals === 0 && _this.validateDecimalOnType) {
              _this.element.value = _this.element.value.substring(0, prevPos) + _this.element.value.substring(currentPos, _this.element.value.length);
            }
          }
          _this.prevVal = _this.element.value;
        }
      });
    };
    NumericTextBox2.prototype.keyUpHandler = function() {
      if (!this.enabled || this.readonly) {
        return;
      }
      var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
      if (!iOS && Browser2.isDevice) {
        this.preventHandler();
      }
      var parseValue = this.instance.getNumberParser({
        format: "n"
      })(this.element.value);
      parseValue = parseValue === null || isNaN(parseValue) ? null : parseValue;
      this.hiddenInput.value = parseValue || parseValue === 0 ? parseValue.toString() : null;
      var formElement = closest2(this.element, "form");
      if (formElement) {
        var element2 = this.element.nextElementSibling;
        var keyupEvent = document.createEvent("KeyboardEvent");
        keyupEvent.initEvent("keyup", false, true);
        element2.dispatchEvent(keyupEvent);
      }
    };
    NumericTextBox2.prototype.inputHandler = function(event2) {
      var numerictextboxObj = this;
      if (!this.enabled || this.readonly) {
        return;
      }
      var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
      var fireFox = navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
      if ((fireFox || iOS) && Browser2.isDevice) {
        this.preventHandler();
      }
      if (this.isAngular && this.element.value !== getValue2("decimal", getNumericObject(this.locale)) && this.element.value !== getValue2("minusSign", getNumericObject(this.locale))) {
        var parsedValue = this.instance.getNumberParser({
          format: "n"
        })(this.element.value);
        parsedValue = isNaN(parsedValue) ? null : parsedValue;
        numerictextboxObj.localChange({
          value: parsedValue
        });
        this.preventChange = true;
      }
      if (this.isVue) {
        var current = this.instance.getNumberParser({
          format: "n"
        })(this.element.value);
        var previous = this.instance.getNumberParser({
          format: "n"
        })(this.elementPrevValue);
        var nonZeroRegex = new RegExp("[^0-9]+$");
        if (nonZeroRegex.test(this.element.value) || (this.elementPrevValue.indexOf(".") !== -1 || this.elementPrevValue.indexOf("-") !== -1) && this.element.value[this.element.value.length - 1] === "0") {
          current = this.value;
        }
        var eventArgs = {
          event: event2,
          value: current === null || isNaN(current) ? null : current,
          previousValue: previous === null || isNaN(previous) ? null : previous
        };
        this.preventChange = true;
        this.elementPrevValue = this.element.value;
        this.trigger("input", eventArgs);
      }
    };
    NumericTextBox2.prototype.keyDownHandler = function(event2) {
      if (!this.readonly) {
        switch (event2.keyCode) {
          case 38:
            event2.preventDefault();
            this.action(INCREMENT, event2);
            break;
          case 40:
            event2.preventDefault();
            this.action(DECREMENT, event2);
            break;
          default:
            break;
        }
      }
    };
    NumericTextBox2.prototype.performAction = function(value, step, operation) {
      if (value === null || isNaN(value)) {
        value = 0;
      }
      var updatedValue = operation === INCREMENT ? value + step : value - step;
      updatedValue = this.correctRounding(value, step, updatedValue);
      return this.strictMode ? this.trimValue(updatedValue) : updatedValue;
    };
    NumericTextBox2.prototype.correctRounding = function(value, step, result) {
      var floatExp = new RegExp("[,.](.*)");
      var floatValue = floatExp.test(value.toString());
      var floatStep = floatExp.test(step.toString());
      if (floatValue || floatStep) {
        var valueCount = floatValue ? floatExp.exec(value.toString())[0].length : 0;
        var stepCount = floatStep ? floatExp.exec(step.toString())[0].length : 0;
        var max = Math.max(valueCount, stepCount);
        return value = this.roundValue(result, max);
      }
      return result;
    };
    NumericTextBox2.prototype.roundValue = function(result, precision) {
      precision = precision || 0;
      var divide = Math.pow(10, precision);
      return result *= divide, result = Math.round(result) / divide;
    };
    NumericTextBox2.prototype.updateValue = function(value, event2) {
      if (event2) {
        this.isInteract = true;
      }
      if (value !== null && !isNaN(value)) {
        if (this.decimals) {
          value = this.roundNumber(value, this.decimals);
        }
      }
      this.inputValue = value;
      this.changeValue(value === null || isNaN(value) ? null : this.strictMode ? this.trimValue(value) : value);
      if (!this.isDynamicChange) {
        this.raiseChangeEvent(event2);
      }
    };
    NumericTextBox2.prototype.updateCurrency = function(prop, propVal) {
      setValue3(prop, propVal, this.cultureInfo);
      this.updateValue(this.value);
    };
    NumericTextBox2.prototype.changeValue = function(value) {
      if (!(value || value === 0)) {
        value = null;
        this.setProperties({
          value
        }, true);
      } else {
        var numberOfDecimals = this.getNumberOfDecimals(value);
        this.setProperties({
          value: this.roundNumber(value, numberOfDecimals)
        }, true);
      }
      this.modifyText();
      if (!this.strictMode) {
        this.validateState();
      }
    };
    NumericTextBox2.prototype.modifyText = function() {
      if (this.value || this.value === 0) {
        var value = this.formatNumber();
        var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
        this.setElementValue(elementValue);
        attributes2(this.element, {
          "aria-valuenow": value
        });
        if (!isNullOrUndefined2(this.hiddenInput)) {
          this.hiddenInput.value = this.value.toString();
          if (this.value !== null && this.serverDecimalSeparator) {
            this.hiddenInput.value = this.hiddenInput.value.replace(".", this.serverDecimalSeparator);
          }
        }
      } else {
        this.setElementValue("");
        this.element.removeAttribute("aria-valuenow");
        this.hiddenInput.value = null;
      }
    };
    NumericTextBox2.prototype.setElementValue = function(val, element2) {
      Input.setValue(val, element2 ? element2 : this.element, this.floatLabelType, this.showClearButton);
    };
    NumericTextBox2.prototype.validateState = function() {
      this.isValidState = true;
      if (this.value || this.value === 0) {
        this.isValidState = !(this.value > this.max || this.value < this.min);
      }
      this.checkErrorClass();
    };
    NumericTextBox2.prototype.getNumberOfDecimals = function(value) {
      var numberOfDecimals;
      var EXPREGEXP = new RegExp("[eE][-+]?([0-9]+)");
      var valueString = value.toString();
      if (EXPREGEXP.test(valueString)) {
        var result = EXPREGEXP.exec(valueString);
        if (!isNullOrUndefined2(result)) {
          valueString = value.toFixed(Math.min(parseInt(result[1], 10), 20));
        }
      }
      var decimalPart = valueString.split(".")[1];
      numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;
      if (this.decimals !== null) {
        numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals;
      }
      return numberOfDecimals;
    };
    NumericTextBox2.prototype.formatNumber = function() {
      var numberOfDecimals = this.getNumberOfDecimals(this.value);
      return this.instance.getNumberFormat({
        maximumFractionDigits: numberOfDecimals,
        minimumFractionDigits: numberOfDecimals,
        useGrouping: false
      })(this.value);
    };
    NumericTextBox2.prototype.trimValue = function(value) {
      if (value > this.max) {
        return this.max;
      }
      if (value < this.min) {
        return this.min;
      }
      return value;
    };
    NumericTextBox2.prototype.roundNumber = function(value, precision) {
      var result = value;
      var decimals = precision || 0;
      var result1 = result.toString().split("e");
      result = Math.round(Number(result1[0] + "e" + (result1[1] ? Number(result1[1]) + decimals : decimals)));
      var result2 = result.toString().split("e");
      result = Number(result2[0] + "e" + (result2[1] ? Number(result2[1]) - decimals : -decimals));
      return Number(result.toFixed(decimals));
    };
    NumericTextBox2.prototype.cancelEvent = function(event2) {
      event2.preventDefault();
      return false;
    };
    NumericTextBox2.prototype.keyPressHandler = function(event2) {
      if (!this.enabled || this.readonly) {
        return true;
      }
      if (!Browser2.isDevice && Browser2.info.version === "11.0" && event2.keyCode === 13) {
        var parsedInput = this.instance.getNumberParser({
          format: "n"
        })(this.element.value);
        this.updateValue(parsedInput, event2);
        return true;
      }
      if (event2.which === 0 || event2.metaKey || event2.ctrlKey || event2.keyCode === 8 || event2.keyCode === 13) {
        return true;
      }
      var currentChar = String.fromCharCode(event2.which);
      var decimalSeparator = getValue2("decimal", getNumericObject(this.locale));
      var isAlterNumPadDecimalChar = event2.code === "NumpadDecimal" && currentChar !== decimalSeparator;
      if (isAlterNumPadDecimalChar) {
        currentChar = decimalSeparator;
      }
      var text = this.element.value;
      text = text.substring(0, this.element.selectionStart) + currentChar + text.substring(this.element.selectionEnd);
      if (!this.numericRegex().test(text)) {
        event2.preventDefault();
        event2.stopPropagation();
        return false;
      } else {
        if (isAlterNumPadDecimalChar) {
          var start = this.element.selectionStart + 1;
          this.element.value = text;
          this.element.setSelectionRange(start, start);
          event2.preventDefault();
          event2.stopPropagation();
        }
        return true;
      }
    };
    NumericTextBox2.prototype.numericRegex = function() {
      var numericObject = getNumericObject(this.locale);
      var decimalSeparator = getValue2("decimal", numericObject);
      var fractionRule = "*";
      if (decimalSeparator === DECIMALSEPARATOR) {
        decimalSeparator = "\\" + decimalSeparator;
      }
      if (this.decimals === 0 && this.validateDecimalOnType) {
        return INTREGEXP;
      }
      if (this.decimals && this.validateDecimalOnType) {
        fractionRule = "{0," + this.decimals + "}";
      }
      return new RegExp("^\\s*(-)?(((\\d+(" + decimalSeparator + "\\d" + fractionRule + ")?)|(" + decimalSeparator + "\\d" + fractionRule + ")))?$");
    };
    NumericTextBox2.prototype.mouseWheel = function(event2) {
      event2.preventDefault();
      var delta;
      var rawEvent = event2;
      if (rawEvent.wheelDelta) {
        delta = rawEvent.wheelDelta / 120;
      } else if (rawEvent.detail) {
        delta = -rawEvent.detail / 3;
      }
      if (delta > 0) {
        this.action(INCREMENT, event2);
      } else if (delta < 0) {
        this.action(DECREMENT, event2);
      }
      this.cancelEvent(event2);
    };
    NumericTextBox2.prototype.focusHandler = function(event2) {
      var _this = this;
      clearTimeout(selectionTimeOut);
      this.focusEventArgs = {
        event: event2,
        value: this.value,
        container: this.container
      };
      this.trigger("focus", this.focusEventArgs);
      if (!this.enabled || this.readonly) {
        return;
      }
      this.isFocused = true;
      this.prevValue = this.value;
      if (this.value || this.value === 0) {
        var formatValue_1 = this.formatNumber();
        this.setElementValue(formatValue_1);
        if (!this.isPrevFocused) {
          if (!Browser2.isDevice && Browser2.info.version === "11.0") {
            this.element.setSelectionRange(0, formatValue_1.length);
          } else {
            var delay = Browser2.isDevice && Browser2.isIos ? 600 : 0;
            selectionTimeOut = setTimeout(function() {
              _this.element.setSelectionRange(0, formatValue_1.length);
            }, delay);
          }
        }
      }
      if (!Browser2.isDevice) {
        EventHandler2.add(this.element, "mousewheel DOMMouseScroll", this.mouseWheel, this);
      }
    };
    NumericTextBox2.prototype.focusOutHandler = function(event2) {
      var _this = this;
      this.blurEventArgs = {
        event: event2,
        value: this.value,
        container: this.container
      };
      this.trigger("blur", this.blurEventArgs);
      if (!this.enabled || this.readonly) {
        return;
      }
      if (this.isPrevFocused) {
        event2.preventDefault();
        if (Browser2.isDevice) {
          var value_1 = this.element.value;
          this.element.focus();
          this.isPrevFocused = false;
          var ele_1 = this.element;
          setTimeout(function() {
            _this.setElementValue(value_1, ele_1);
          }, 200);
        }
      } else {
        this.isFocused = false;
        if (!this.element.value.length) {
          this.setProperties({
            value: null
          }, true);
        }
        var parsedInput = this.instance.getNumberParser({
          format: "n"
        })(this.element.value);
        this.updateValue(parsedInput);
        if (!Browser2.isDevice) {
          EventHandler2.remove(this.element, "mousewheel DOMMouseScroll", this.mouseWheel);
        }
      }
      var formElement = closest2(this.element, "form");
      if (formElement) {
        var element2 = this.element.nextElementSibling;
        var focusEvent = document.createEvent("FocusEvent");
        focusEvent.initEvent("focusout", false, true);
        element2.dispatchEvent(focusEvent);
      }
    };
    NumericTextBox2.prototype.mouseDownOnSpinner = function(event2) {
      var _this = this;
      if (this.isFocused) {
        this.isPrevFocused = true;
        event2.preventDefault();
      }
      if (!this.getElementData(event2)) {
        return;
      }
      this.getElementData(event2);
      var target = event2.currentTarget;
      var action = target.classList.contains(SPINUP) ? INCREMENT : DECREMENT;
      EventHandler2.add(target, "mouseleave", this.mouseUpClick, this);
      this.timeOut = setInterval(function() {
        _this.isCalled = true;
        _this.action(action, event2);
      }, 150);
      EventHandler2.add(document, "mouseup", this.mouseUpClick, this);
    };
    NumericTextBox2.prototype.touchMoveOnSpinner = function(event2) {
      var target;
      if (event2.type === "touchmove") {
        var touchEvent = event2.touches;
        target = touchEvent.length && document.elementFromPoint(touchEvent[0].pageX, touchEvent[0].pageY);
      } else {
        target = document.elementFromPoint(event2.clientX, event2.clientY);
      }
      if (!target.classList.contains(SPINICON)) {
        clearInterval(this.timeOut);
      }
    };
    NumericTextBox2.prototype.mouseUpOnSpinner = function(event2) {
      this.prevValue = this.value;
      if (this.isPrevFocused) {
        this.element.focus();
        if (!Browser2.isDevice) {
          this.isPrevFocused = false;
        }
      }
      if (!Browser2.isDevice) {
        event2.preventDefault();
      }
      if (!this.getElementData(event2)) {
        return;
      }
      var target = event2.currentTarget;
      var action = target.classList.contains(SPINUP) ? INCREMENT : DECREMENT;
      EventHandler2.remove(target, "mouseleave", this.mouseUpClick);
      if (!this.isCalled) {
        this.action(action, event2);
      }
      this.isCalled = false;
      EventHandler2.remove(document, "mouseup", this.mouseUpClick);
      var formElement = closest2(this.element, "form");
      if (formElement) {
        var element2 = this.element.nextElementSibling;
        var keyupEvent = document.createEvent("KeyboardEvent");
        keyupEvent.initEvent("keyup", false, true);
        element2.dispatchEvent(keyupEvent);
      }
    };
    NumericTextBox2.prototype.getElementData = function(event2) {
      if (event2.which && event2.which === 3 || event2.button && event2.button === 2 || !this.enabled || this.readonly) {
        return false;
      }
      clearInterval(this.timeOut);
      return true;
    };
    NumericTextBox2.prototype.floatLabelTypeUpdate = function() {
      Input.removeFloating(this.inputWrapper);
      var hiddenInput = this.hiddenInput;
      this.hiddenInput.remove();
      Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
      this.container.insertBefore(hiddenInput, this.container.childNodes[1]);
    };
    NumericTextBox2.prototype.mouseUpClick = function(event2) {
      event2.stopPropagation();
      clearInterval(this.timeOut);
      this.isCalled = false;
      if (this.spinUp) {
        EventHandler2.remove(this.spinUp, "mouseleave", this.mouseUpClick);
      }
      if (this.spinDown) {
        EventHandler2.remove(this.spinDown, "mouseleave", this.mouseUpClick);
      }
    };
    NumericTextBox2.prototype.increment = function(step) {
      if (step === void 0) {
        step = this.step;
      }
      this.isInteract = false;
      this.changeValue(this.performAction(this.value, step, INCREMENT));
      this.raiseChangeEvent();
    };
    NumericTextBox2.prototype.decrement = function(step) {
      if (step === void 0) {
        step = this.step;
      }
      this.isInteract = false;
      this.changeValue(this.performAction(this.value, step, DECREMENT));
      this.raiseChangeEvent();
    };
    NumericTextBox2.prototype.destroy = function() {
      this.unwireEvents();
      if (this.showClearButton) {
        this.clearButton = document.getElementsByClassName("e-clear-icon")[0];
      }
      detach2(this.hiddenInput);
      if (this.showSpinButton) {
        this.unwireSpinBtnEvents();
        detach2(this.spinUp);
        detach2(this.spinDown);
      }
      var attrArray = ["aria-labelledby", "role", "autocomplete", "aria-readonly", "aria-disabled", "autocapitalize", "spellcheck", "aria-autocomplete", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-invalid"];
      for (var i = 0; i < attrArray.length; i++) {
        this.element.removeAttribute(attrArray[i]);
      }
      this.element.classList.remove("e-input");
      this.container.insertAdjacentElement("afterend", this.element);
      detach2(this.container);
      this.spinUp = null;
      this.spinDown = null;
      this.container = null;
      this.hiddenInput = null;
      this.changeEventArgs = null;
      this.blurEventArgs = null;
      this.focusEventArgs = null;
      this.inputWrapper = null;
      Input.destroy({
        element: this.element,
        floatLabelType: this.floatLabelType,
        properties: this.properties
      }, this.clearButton);
      _super.prototype.destroy.call(this);
    };
    NumericTextBox2.prototype.getText = function() {
      return this.element.value;
    };
    NumericTextBox2.prototype.focusIn = function() {
      if (document.activeElement !== this.element && this.enabled) {
        this.element.focus();
        addClass2([this.container], [NUMERIC_FOCUS]);
      }
    };
    NumericTextBox2.prototype.focusOut = function() {
      if (document.activeElement === this.element && this.enabled) {
        this.element.blur();
        removeClass2([this.container], [NUMERIC_FOCUS]);
      }
    };
    NumericTextBox2.prototype.getPersistData = function() {
      var keyEntity = ["value"];
      return this.addOnPersist(keyEntity);
    };
    NumericTextBox2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "width":
            this.setElementWidth(newProp.width);
            Input.calculateWidth(this.element, this.container);
            break;
          case "cssClass":
            this.updateCssClass(newProp.cssClass, oldProp.cssClass);
            break;
          case "enabled":
            Input.setEnabled(newProp.enabled, this.element);
            this.bindClearEvent();
            break;
          case "enableRtl":
            Input.setEnableRtl(newProp.enableRtl, [this.container]);
            break;
          case "readonly":
            Input.setReadonly(newProp.readonly, this.element);
            if (this.readonly) {
              attributes2(this.element, {
                "aria-readonly": "true"
              });
            } else {
              this.element.removeAttribute("aria-readonly");
            }
            break;
          case "htmlAttributes":
            this.updateHTMLAttrToElement();
            this.updateHTMLAttrToWrapper();
            this.updateDataAttribute(true);
            this.checkAttributes(true);
            Input.validateInputType(this.container, this.element);
            break;
          case "placeholder":
            Input.setPlaceholder(newProp.placeholder, this.element);
            Input.calculateWidth(this.element, this.container);
            break;
          case "step":
            this.step = newProp.step;
            this.validateStep();
            break;
          case "showSpinButton":
            this.updateSpinButton(newProp);
            break;
          case "showClearButton":
            this.updateClearButton(newProp);
            break;
          case "floatLabelType":
            this.floatLabelType = newProp.floatLabelType;
            this.floatLabelTypeUpdate();
            break;
          case "value":
            this.isDynamicChange = (this.isAngular || this.isVue) && this.preventChange;
            this.updateValue(newProp.value);
            if (this.isDynamicChange) {
              this.preventChange = false;
              this.isDynamicChange = false;
            }
            break;
          case "min":
          case "max":
            setValue3(prop, getValue2(prop, newProp), this);
            this.validateMinMax();
            this.updateValue(this.value);
            break;
          case "strictMode":
            this.strictMode = newProp.strictMode;
            this.updateValue(this.value);
            this.validateState();
            break;
          case "locale":
            this.initCultureFunc();
            this.l10n.setLocale(this.locale);
            this.setSpinButton();
            this.updatePlaceholder();
            Input.setPlaceholder(this.placeholder, this.element);
            this.updateValue(this.value);
            break;
          case "currency":
            {
              var propVal = getValue2(prop, newProp);
              this.setProperties({
                currencyCode: propVal
              }, true);
              this.updateCurrency(prop, propVal);
            }
            break;
          case "currencyCode":
            {
              var propValue = getValue2(prop, newProp);
              this.setProperties({
                currency: propValue
              }, true);
              this.updateCurrency("currency", propValue);
            }
            break;
          case "format":
            setValue3(prop, getValue2(prop, newProp), this);
            this.initCultureInfo();
            this.updateValue(this.value);
            break;
          case "decimals":
            this.decimals = newProp.decimals;
            this.updateValue(this.value);
        }
      }
    };
    NumericTextBox2.prototype.updateClearButton = function(newProp) {
      Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper, void 0, this.createElement);
      this.bindClearEvent();
    };
    NumericTextBox2.prototype.updateSpinButton = function(newProp) {
      if (newProp.showSpinButton) {
        this.spinBtnCreation();
      } else {
        detach2(this.spinUp);
        detach2(this.spinDown);
      }
    };
    NumericTextBox2.prototype.getModuleName = function() {
      return "numerictextbox";
    };
    __decorate51([Property2("")], NumericTextBox2.prototype, "cssClass", void 0);
    __decorate51([Property2(null)], NumericTextBox2.prototype, "value", void 0);
    __decorate51([Property2(-Number.MAX_VALUE)], NumericTextBox2.prototype, "min", void 0);
    __decorate51([Property2(Number.MAX_VALUE)], NumericTextBox2.prototype, "max", void 0);
    __decorate51([Property2(1)], NumericTextBox2.prototype, "step", void 0);
    __decorate51([Property2(null)], NumericTextBox2.prototype, "width", void 0);
    __decorate51([Property2(null)], NumericTextBox2.prototype, "placeholder", void 0);
    __decorate51([Property2({})], NumericTextBox2.prototype, "htmlAttributes", void 0);
    __decorate51([Property2(true)], NumericTextBox2.prototype, "showSpinButton", void 0);
    __decorate51([Property2(false)], NumericTextBox2.prototype, "readonly", void 0);
    __decorate51([Property2(true)], NumericTextBox2.prototype, "enabled", void 0);
    __decorate51([Property2(false)], NumericTextBox2.prototype, "showClearButton", void 0);
    __decorate51([Property2(false)], NumericTextBox2.prototype, "enablePersistence", void 0);
    __decorate51([Property2("n2")], NumericTextBox2.prototype, "format", void 0);
    __decorate51([Property2(null)], NumericTextBox2.prototype, "decimals", void 0);
    __decorate51([Property2(null)], NumericTextBox2.prototype, "currency", void 0);
    __decorate51([Property2(null)], NumericTextBox2.prototype, "currencyCode", void 0);
    __decorate51([Property2(true)], NumericTextBox2.prototype, "strictMode", void 0);
    __decorate51([Property2(false)], NumericTextBox2.prototype, "validateDecimalOnType", void 0);
    __decorate51([Property2("Never")], NumericTextBox2.prototype, "floatLabelType", void 0);
    __decorate51([Event3()], NumericTextBox2.prototype, "created", void 0);
    __decorate51([Event3()], NumericTextBox2.prototype, "destroyed", void 0);
    __decorate51([Event3()], NumericTextBox2.prototype, "change", void 0);
    __decorate51([Event3()], NumericTextBox2.prototype, "focus", void 0);
    __decorate51([Event3()], NumericTextBox2.prototype, "blur", void 0);
    NumericTextBox2 = __decorate51([NotifyPropertyChanges2], NumericTextBox2);
    return NumericTextBox2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/base/mask-base.js
var ERROR3 = "e-error";
var INPUTGROUP = "e-input-group";
var FLOATINPUT = "e-float-input";
var TOPLABEL = "e-label-top";
var BOTTOMLABEL = "e-label-bottom";
var regularExpressions = {
  "0": "[0-9]",
  "9": "[0-9 ]",
  "#": "[0-9 +-]",
  "L": "[A-Za-z]",
  "?": "[A-Za-z ]",
  "&": "[^ ]+",
  "C": "[^]+",
  "A": "[A-Za-z0-9]",
  "a": "[A-Za-z0-9 ]"
};
function createMask() {
  attributes2(this.element, {
    "role": "textbox",
    "autocomplete": "off",
    "autocapitalize": "off",
    "spellcheck": "false",
    "aria-live": "assertive"
  });
  if (this.mask) {
    var splitMask = this.mask.split("]");
    for (var i = 0; i < splitMask.length; i++) {
      if (splitMask[i][splitMask[i].length - 1] === "\\") {
        splitMask[i] = splitMask[i] + "]";
        var splitInnerMask = splitMask[i].split("[");
        for (var j = 0; j < splitInnerMask.length; j++) {
          if (splitInnerMask[j][splitInnerMask[j].length - 1] === "\\") {
            splitInnerMask[j] = splitInnerMask[j] + "[";
          }
          pushIntoRegExpCollec.call(this, splitInnerMask[j]);
        }
      } else {
        var splitInnerMask = splitMask[i].split("[");
        if (splitInnerMask.length > 1) {
          var chkSpace = false;
          for (var j = 0; j < splitInnerMask.length; j++) {
            if (splitInnerMask[j] === "\\") {
              this.customRegExpCollec.push("[");
              this.hiddenMask += splitInnerMask[j] + "[";
            } else if (splitInnerMask[j] === "") {
              chkSpace = true;
            } else if (splitInnerMask[j] !== "" && chkSpace || j === splitInnerMask.length - 1) {
              this.customRegExpCollec.push("[" + splitInnerMask[j] + "]");
              this.hiddenMask += this.promptChar;
              chkSpace = false;
            } else {
              pushIntoRegExpCollec.call(this, splitInnerMask[j]);
            }
          }
        } else {
          pushIntoRegExpCollec.call(this, splitInnerMask[0]);
        }
      }
    }
    this.escapeMaskValue = this.hiddenMask;
    this.promptMask = this.hiddenMask.replace(/[09?LCAa#&]/g, this.promptChar);
    if (!isNullOrUndefined2(this.customCharacters)) {
      for (var i = 0; i < this.promptMask.length; i++) {
        if (!isNullOrUndefined2(this.customCharacters[this.promptMask[i]])) {
          this.promptMask = this.promptMask.replace(new RegExp(this.promptMask[i], "g"), this.promptChar);
        }
      }
    }
    var escapeNumber = 0;
    if (this.hiddenMask.match(new RegExp(/\\/))) {
      for (var i = 0; i < this.hiddenMask.length; i++) {
        var j = 0;
        if (i >= 1) {
          j = i;
        }
        escapeNumber = this.hiddenMask.length - this.promptMask.length;
        j = j - escapeNumber;
        if (i > 0 && this.hiddenMask[i - 1] !== "\\" && (this.hiddenMask[i] === ">" || this.hiddenMask[i] === "<" || this.hiddenMask[i] === "|")) {
          this.promptMask = this.promptMask.substring(0, j) + this.promptMask.substring(i + 1 - escapeNumber, this.promptMask.length);
          this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue.substring(i + 1 - escapeNumber, this.escapeMaskValue.length);
        }
        if (this.hiddenMask[i] === "\\") {
          this.promptMask = this.promptMask.substring(0, j) + this.hiddenMask[i + 1] + this.promptMask.substring(i + 2 - escapeNumber, this.promptMask.length);
          this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue[i + 1] + this.escapeMaskValue.substring(i + 2 - escapeNumber, this.escapeMaskValue.length);
        }
      }
    } else {
      this.promptMask = this.promptMask.replace(/[>|<]/g, "");
      this.escapeMaskValue = this.hiddenMask.replace(/[>|<]/g, "");
    }
    attributes2(this.element, {
      "aria-invalid": "false"
    });
  }
}
function applyMask() {
  setElementValue.call(this, this.promptMask);
  setMaskValue.call(this, this.value);
}
function wireEvents2() {
  EventHandler2.add(this.element, "keydown", maskInputKeyDownHandler, this);
  EventHandler2.add(this.element, "keypress", maskInputKeyPressHandler, this);
  EventHandler2.add(this.element, "keyup", maskInputKeyUpHandler, this);
  EventHandler2.add(this.element, "input", maskInputHandler, this);
  EventHandler2.add(this.element, "focus", maskInputFocusHandler, this);
  EventHandler2.add(this.element, "blur", maskInputBlurHandler, this);
  EventHandler2.add(this.element, "paste", maskInputPasteHandler, this);
  EventHandler2.add(this.element, "cut", maskInputCutHandler, this);
  EventHandler2.add(this.element, "drop", maskInputDropHandler, this);
  EventHandler2.add(this.element, "mousedown", maskInputMouseDownHandler, this);
  EventHandler2.add(this.element, "mouseup", maskInputMouseUpHandler, this);
  if (this.enabled) {
    bindClearEvent.call(this);
    if (this.formElement) {
      EventHandler2.add(this.formElement, "reset", resetFormHandler, this);
    }
  }
}
function unwireEvents() {
  EventHandler2.remove(this.element, "keydown", maskInputKeyDownHandler);
  EventHandler2.remove(this.element, "keypress", maskInputKeyPressHandler);
  EventHandler2.remove(this.element, "keyup", maskInputKeyUpHandler);
  EventHandler2.remove(this.element, "input", maskInputHandler);
  EventHandler2.remove(this.element, "focus", maskInputFocusHandler);
  EventHandler2.remove(this.element, "blur", maskInputBlurHandler);
  EventHandler2.remove(this.element, "paste", maskInputPasteHandler);
  EventHandler2.remove(this.element, "cut", maskInputCutHandler);
  EventHandler2.remove(this.element, "drop", maskInputDropHandler);
  EventHandler2.remove(this.element, "mousedown", maskInputMouseDownHandler);
  EventHandler2.remove(this.element, "mouseup", maskInputMouseUpHandler);
  if (this.formElement) {
    EventHandler2.remove(this.formElement, "reset", resetFormHandler);
  }
}
function bindClearEvent() {
  if (this.showClearButton) {
    EventHandler2.add(this.inputObj.clearButton, "mousedown touchstart", resetHandler, this);
  }
}
function resetHandler(e) {
  e.preventDefault();
  if (!this.inputObj.clearButton.classList.contains("e-clear-icon-hide") || this.inputObj.container.classList.contains("e-static-clear")) {
    clear.call(this, e);
    this.value = "";
  }
}
function clear(event2) {
  var value = this.element.value;
  setElementValue.call(this, this.promptMask);
  this.redoCollec.unshift({
    value: this.promptMask,
    startIndex: this.element.selectionStart,
    endIndex: this.element.selectionEnd
  });
  triggerMaskChangeEvent.call(this, event2, value);
  this.element.setSelectionRange(0, 0);
}
function resetFormHandler() {
  if (this.element.tagName === "EJS-MASKEDTEXTBOX") {
    setElementValue.call(this, this.promptMask);
  } else {
    this.value = this.initInputValue;
  }
}
function unstrippedValue(element2) {
  return element2.value;
}
function strippedValue(element2, maskValues) {
  var value = "";
  var k = 0;
  var checkMask = false;
  var maskValue = !isNullOrUndefined2(maskValues) ? maskValues : !isNullOrUndefined2(element2) && !isNullOrUndefined2(this) ? element2.value : maskValues;
  if (maskValue !== this.promptMask) {
    for (var i = 0; i < this.customRegExpCollec.length; i++) {
      if (checkMask) {
        checkMask = false;
      }
      if (this.customRegExpCollec[k] === ">" || this.customRegExpCollec[k] === "<" || this.customRegExpCollec[k] === "|" || this.customRegExpCollec[k] === "\\") {
        --i;
        checkMask = true;
      }
      if (!checkMask) {
        if (maskValue[i] !== this.promptChar && !isNullOrUndefined2(this.customRegExpCollec[k]) && (this._callPasteHandler || !isNullOrUndefined2(this.regExpCollec[this.customRegExpCollec[k]]) && !this.maskedRegExp.includes(this.customRegExpCollec[k]) || this.customRegExpCollec[k].length > 2 && this.customRegExpCollec[k][0] === "[" && this.customRegExpCollec[k][this.customRegExpCollec[k].length - 1] === "]" || !isNullOrUndefined2(this.customCharacters) && !isNullOrUndefined2(this.customCharacters[this.customRegExpCollec[k]])) && maskValue !== "") {
          value += maskValue[i];
        }
      }
      ++k;
    }
  }
  if (this.mask === null || this.mask === "" && this.value !== void 0) {
    value = maskValue;
  }
  return value;
}
function pushIntoRegExpCollec(value) {
  for (var k = 0; k < value.length; k++) {
    this.hiddenMask += value[k];
    if (value[k] !== "\\") {
      this.customRegExpCollec.push(value[k]);
    } else if (value[k] === "\\" && !isNullOrUndefined2(this.regExpCollec[value[k + 1]])) {
      this.maskedRegExp.push(value[k + 1]);
    }
  }
}
function maskInputMouseDownHandler() {
  this.isClicked = true;
}
function maskInputMouseUpHandler() {
  this.isClicked = false;
}
function maskInputFocusHandler(event2) {
  var _this = this;
  var inputElement = this.element;
  var startIndex = 0;
  var modelValue = strippedValue.call(this, inputElement);
  var toAllowForward = false;
  var toAllowBackward = false;
  var eventArgs = {
    selectionStart: inputElement.selectionStart,
    event: event2,
    value: this.value,
    maskedValue: inputElement.value,
    container: !isNullOrUndefined2(this.inputObj) ? this.inputObj.container : this.inputObj,
    selectionEnd: inputElement.selectionEnd
  };
  if (!this.isClicked) {
    triggerFocus.call(this, eventArgs, inputElement);
  }
  if (this.mask) {
    if (!(!(modelValue === null || modelValue === "") || this.floatLabelType === "Always" || this.placeholder === null || this.placeholder === "")) {
      inputElement.value = this.promptMask;
    }
    setTimeout(function() {
      if (inputElement.selectionStart === _this.promptMask.length || inputElement.value[inputElement.selectionStart] === _this.promptChar) {
        toAllowForward = true;
      } else {
        for (var i = inputElement.selectionStart; i < _this.promptMask.length; i++) {
          if (inputElement.value[i] !== _this.promptChar) {
            if (inputElement.value[i] !== _this.promptMask[i]) {
              toAllowForward = false;
              break;
            }
          } else {
            toAllowForward = true;
            break;
          }
        }
      }
    });
    setTimeout(function() {
      var backSelectionStart = inputElement.selectionStart - 1;
      if (backSelectionStart === _this.promptMask.length - 1 || inputElement.value[backSelectionStart] === _this.promptChar) {
        toAllowBackward = true;
      } else {
        for (var i = backSelectionStart; i >= 0; i--) {
          if (inputElement.value[i] !== _this.promptChar) {
            if (inputElement.value[i] !== _this.promptMask[i]) {
              toAllowBackward = false;
              break;
            }
          } else {
            toAllowBackward = true;
            break;
          }
        }
      }
    });
    if (this.isClicked || this.floatLabelType !== "Always" && (modelValue === null || modelValue === "") && this.placeholder !== null && this.placeholder !== "") {
      for (startIndex = 0; startIndex < this.promptMask.length; startIndex++) {
        if (inputElement.value[startIndex] === this.promptChar) {
          setTimeout(function() {
            if (toAllowForward || toAllowBackward) {
              inputElement.selectionEnd = startIndex;
              inputElement.selectionStart = startIndex;
            }
            eventArgs = {
              selectionStart: inputElement.selectionStart,
              event: event2,
              value: _this.value,
              maskedValue: inputElement.value,
              container: !isNullOrUndefined2(_this.inputObj) ? _this.inputObj.container : _this.inputObj,
              selectionEnd: inputElement.selectionEnd
            };
            triggerFocus.call(_this, eventArgs, inputElement);
          }, 110);
          break;
        }
      }
      if (isNullOrUndefined2(inputElement.value.match(escapeRegExp(this.promptChar)))) {
        eventArgs = {
          selectionStart: inputElement.selectionStart,
          event: event2,
          value: this.value,
          maskedValue: inputElement.value,
          container: !isNullOrUndefined2(this.inputObj) ? this.inputObj.container : this.inputObj,
          selectionEnd: inputElement.selectionEnd
        };
        triggerFocus.call(this, eventArgs, inputElement);
      }
      this.isClicked = false;
    }
  }
}
function triggerFocus(eventArgs, inputElement) {
  this.trigger("focus", eventArgs, function(eventArgs2) {
    inputElement.selectionStart = eventArgs2.selectionStart;
    inputElement.selectionEnd = eventArgs2.selectionEnd;
  });
}
function escapeRegExp(text) {
  return !isNullOrUndefined2(text) ? text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") : text;
}
function maskInputBlurHandler(event2) {
  this.blurEventArgs = {
    event: event2,
    value: this.value,
    maskedValue: this.element.value,
    container: !isNullOrUndefined2(this.inputObj) ? this.inputObj.container : this.inputObj
  };
  this.trigger("blur", this.blurEventArgs);
  if (this.mask) {
    this.isFocus = false;
    if (this.placeholder && this.element.value === this.promptMask && this.floatLabelType !== "Always") {
      setElementValue.call(this, "");
      var labelElement = this.element.parentNode.querySelector(".e-float-text");
      if (this.floatLabelType === "Auto" && !isNullOrUndefined2(labelElement) && labelElement.classList.contains(TOPLABEL)) {
        removeClass2([labelElement], TOPLABEL);
      }
    }
  }
}
function maskInputPasteHandler(event2) {
  var _this = this;
  if (this.mask && !this.readonly) {
    var sIndex_1 = this.element.selectionStart;
    var eIndex_1 = this.element.selectionEnd;
    var oldValue_1 = this.element.value;
    setElementValue.call(this, "");
    this._callPasteHandler = true;
    setTimeout(function() {
      var value = _this.element.value.replace(/ /g, "");
      if (_this.redoCollec.length > 0 && _this.redoCollec[0].value === _this.element.value) {
        value = strippedValue.call(_this, _this.element);
      }
      setElementValue.call(_this, oldValue_1);
      _this.element.selectionStart = sIndex_1;
      _this.element.selectionEnd = eIndex_1;
      var i = 0;
      _this.maskKeyPress = true;
      do {
        validateValue.call(_this, value[i], false, null);
        ++i;
      } while (i < value.length);
      _this.maskKeyPress = false;
      _this._callPasteHandler = false;
      if (_this.element.value === oldValue_1) {
        var i_1 = 0;
        _this.maskKeyPress = true;
        do {
          validateValue.call(_this, value[i_1], false, null);
          ++i_1;
        } while (i_1 < value.length);
        _this.maskKeyPress = false;
      } else {
        triggerMaskChangeEvent.call(_this, event2, oldValue_1);
      }
    }, 1);
  }
}
function maskInputCutHandler(event2) {
  var _this = this;
  if (this.mask && !this.readonly) {
    var preValue_1 = this.element.value;
    var sIndex_2 = this.element.selectionStart;
    var eIndex = this.element.selectionEnd;
    this.undoCollec.push({
      value: this.element.value,
      startIndex: this.element.selectionStart,
      endIndex: this.element.selectionEnd
    });
    var value_1 = this.element.value.substring(0, sIndex_2) + this.promptMask.substring(sIndex_2, eIndex) + this.element.value.substring(eIndex);
    setTimeout(function() {
      setElementValue.call(_this, value_1);
      _this.element.selectionStart = _this.element.selectionEnd = sIndex_2;
      if (_this.element.value !== preValue_1) {
        triggerMaskChangeEvent.call(_this, event2, null);
      }
    }, 0);
  }
}
function maskInputDropHandler(event2) {
  event2.preventDefault();
}
function maskInputHandler(event2) {
  if (Browser2.isIE === true && this.element.value === "" && this.floatLabelType === "Never") {
    return;
  }
  var eventArgs = {
    ctrlKey: false,
    keyCode: 229
  };
  extend2(event2, eventArgs);
  if (this.mask) {
    if (this.element.value === "") {
      this.redoCollec.unshift({
        value: this.promptMask,
        startIndex: this.element.selectionStart,
        endIndex: this.element.selectionEnd
      });
    }
    if (this.element.value.length === 1) {
      this.element.value = this.element.value + this.promptMask;
      this.element.setSelectionRange(1, 1);
    }
    if (!this._callPasteHandler) {
      removeMaskInputValues.call(this, event2);
    }
    if (this.element.value.length > this.promptMask.length) {
      var startIndex = this.element.selectionStart;
      var addedValues = this.element.value.length - this.promptMask.length;
      var value = this.element.value.substring(startIndex - addedValues, startIndex);
      this.maskKeyPress = false;
      var i = 0;
      do {
        validateValue.call(this, value[i], event2.ctrlKey, event2);
        ++i;
      } while (i < value.length);
      if (this.element.value !== this.preEleVal) {
        triggerMaskChangeEvent.call(this, event2, null);
      }
    }
    var val = strippedValue.call(this, this.element);
    this.prevValue = val;
    this.value = val;
    if (val === "") {
      setElementValue.call(this, this.promptMask);
      this.element.setSelectionRange(0, 0);
    }
  }
}
function maskInputKeyDownHandler(event2) {
  if (this.mask && !this.readonly) {
    if (event2.keyCode !== 229) {
      if (event2.ctrlKey && (event2.keyCode === 89 || event2.keyCode === 90)) {
        event2.preventDefault();
      }
      removeMaskInputValues.call(this, event2);
    }
    var startValue = this.element.value;
    if (event2.ctrlKey && (event2.keyCode === 89 || event2.keyCode === 90)) {
      var collec = void 0;
      if (event2.keyCode === 90 && this.undoCollec.length > 0 && startValue !== this.undoCollec[this.undoCollec.length - 1].value) {
        collec = this.undoCollec[this.undoCollec.length - 1];
        this.redoCollec.unshift({
          value: this.element.value,
          startIndex: this.element.selectionStart,
          endIndex: this.element.selectionEnd
        });
        setElementValue.call(this, collec.value);
        this.element.selectionStart = collec.startIndex;
        this.element.selectionEnd = collec.endIndex;
        this.undoCollec.splice(this.undoCollec.length - 1, 1);
      } else if (event2.keyCode === 89 && this.redoCollec.length > 0 && startValue !== this.redoCollec[0].value) {
        collec = this.redoCollec[0];
        this.undoCollec.push({
          value: this.element.value,
          startIndex: this.element.selectionStart,
          endIndex: this.element.selectionEnd
        });
        setElementValue.call(this, collec.value);
        this.element.selectionStart = collec.startIndex;
        this.element.selectionEnd = collec.endIndex;
        this.redoCollec.splice(0, 1);
      }
    }
  }
}
function mobileRemoveFunction() {
  var collec;
  var sIndex = this.element.selectionStart;
  var eIndex = this.element.selectionEnd;
  if (this.redoCollec.length > 0) {
    collec = this.redoCollec[0];
    setElementValue.call(this, collec.value);
    if (collec.startIndex - sIndex === 1) {
      this.element.selectionStart = collec.startIndex;
      this.element.selectionEnd = collec.endIndex;
    } else {
      this.element.selectionStart = sIndex + 1;
      this.element.selectionEnd = eIndex + 1;
    }
  } else {
    setElementValue.call(this, this.promptMask);
    this.element.selectionStart = this.element.selectionEnd = sIndex;
  }
}
function autoFillMaskInputValues(isRemove, oldEventVal, event2) {
  if (event2.type === "input") {
    isRemove = false;
    oldEventVal = this.element.value;
    setElementValue.call(this, this.promptMask);
    setMaskValue.call(this, oldEventVal);
  }
  return isRemove;
}
function removeMaskInputValues(event2) {
  var isRemove = false;
  var oldEventVal;
  var isDeleted = false;
  if (this.element.value.length < this.promptMask.length) {
    isRemove = true;
    oldEventVal = this.element.value;
    isRemove = autoFillMaskInputValues.call(this, isRemove, oldEventVal, event2);
    mobileRemoveFunction.call(this);
  }
  if (this.element.value.length >= this.promptMask.length && event2.type === "input") {
    isRemove = autoFillMaskInputValues.call(this, isRemove, oldEventVal, event2);
  }
  var initStartIndex = this.element.selectionStart;
  var initEndIndex = this.element.selectionEnd;
  var startIndex = this.element.selectionStart;
  var endIndex = this.element.selectionEnd;
  var maskValue = this.hiddenMask.replace(/[>|\\<]/g, "");
  var curMask = maskValue[startIndex - 1];
  var deleteEndIndex = this.element.selectionEnd;
  if (isRemove || event2.keyCode === 8 || event2.keyCode === 46) {
    this.undoCollec.push({
      value: this.element.value,
      startIndex: this.element.selectionStart,
      endIndex
    });
    var multipleDel = false;
    var preValue = this.element.value;
    if (startIndex > 0 || (event2.keyCode === 8 || event2.keyCode === 46) && startIndex < this.element.value.length && this.element.selectionEnd - startIndex !== this.element.value.length) {
      var index = startIndex;
      if (startIndex !== endIndex) {
        startIndex = endIndex;
        if (event2.keyCode === 46) {
          multipleDel = true;
        }
      } else if (event2.keyCode === 46) {
        ++index;
      } else {
        --index;
      }
      for (var k = startIndex; event2.keyCode === 8 || isRemove || multipleDel ? k > index : k < index; event2.keyCode === 8 || isRemove || multipleDel ? k-- : k++) {
        for (var i = startIndex; event2.keyCode === 8 || isRemove || multipleDel ? i > 0 : i < this.element.value.length; event2.keyCode === 8 || isRemove || multipleDel ? i-- : i++) {
          var sIndex = void 0;
          if ((event2.keyCode === 8 || multipleDel) && (initStartIndex !== initEndIndex && initStartIndex !== startIndex || initStartIndex === initEndIndex) || isRemove) {
            curMask = maskValue[i - 1];
            sIndex = startIndex - 1;
          } else {
            curMask = maskValue[i];
            sIndex = startIndex;
            ++startIndex;
          }
          var oldValue = this.element.value[sIndex];
          if (isNullOrUndefined2(this.regExpCollec["" + curMask]) && !isNullOrUndefined2(this.customCharacters) && isNullOrUndefined2(this.customCharacters["" + curMask]) && this.hiddenMask[sIndex] !== this.promptChar && this.customRegExpCollec[sIndex][0] !== "[" && this.customRegExpCollec[sIndex][this.customRegExpCollec[sIndex].length - 1] !== "]" || this.promptMask[sIndex] !== this.promptChar && isNullOrUndefined2(this.customCharacters)) {
            this.element.selectionStart = this.element.selectionEnd = sIndex;
            event2.preventDefault();
            if (event2.keyCode === 46 && !multipleDel) {
              ++this.element.selectionStart;
            }
          } else {
            var value = this.element.value;
            var prompt_1 = this.promptChar;
            var elementValue = value.substring(0, sIndex) + prompt_1 + value.substring(startIndex, value.length);
            setElementValue.call(this, elementValue);
            event2.preventDefault();
            if (event2.keyCode === 46 && !multipleDel) {
              sIndex++;
            }
            this.element.selectionStart = this.element.selectionEnd = sIndex;
            isDeleted = true;
          }
          startIndex = this.element.selectionStart;
          if (!isDeleted && event2.keyCode === 8 || multipleDel || !isDeleted && !(event2.keyCode === 46)) {
            sIndex = startIndex - 1;
          } else {
            sIndex = startIndex;
            isDeleted = false;
          }
          oldValue = this.element.value[sIndex];
          if (initStartIndex !== initEndIndex && this.element.selectionStart === initStartIndex || this.promptMask[sIndex] === this.promptChar || oldValue !== this.promptMask[sIndex] && this.promptMask[sIndex] !== this.promptChar && !isNullOrUndefined2(this.customCharacters)) {
            break;
          }
        }
      }
    }
    if (event2.keyCode === 46 && multipleDel && isDeleted) {
      this.element.selectionStart = this.element.selectionEnd = deleteEndIndex;
    }
    if (this.element.selectionStart === 0 && this.element.selectionEnd === this.element.value.length) {
      setElementValue.call(this, this.promptMask);
      event2.preventDefault();
      this.element.selectionStart = this.element.selectionEnd = startIndex;
    }
    this.redoCollec.unshift({
      value: this.element.value,
      startIndex: this.element.selectionStart,
      endIndex: this.element.selectionEnd
    });
    if (this.element.value !== preValue) {
      triggerMaskChangeEvent.call(this, event2, oldEventVal);
    }
  }
}
function maskInputKeyPressHandler(event2) {
  if (this.mask && !this.readonly) {
    var oldValue = this.element.value;
    if (!(event2.ctrlKey || event2.metaKey) || (event2.ctrlKey || event2.metaKey) && event2.code !== "KeyA" && event2.code !== "KeyY" && event2.code !== "KeyZ" && event2.code !== "KeyX" && event2.code !== "KeyC" && event2.code !== "KeyV") {
      this.maskKeyPress = true;
      var key = event2.key;
      if (key === "Spacebar") {
        key = String.fromCharCode(event2.keyCode);
      }
      if (!key) {
        this.isIosInvalid = true;
        validateValue.call(this, String.fromCharCode(event2.keyCode), event2.ctrlKey, event2);
        event2.preventDefault();
        this.isIosInvalid = false;
      } else if (key && key.length === 1) {
        validateValue.call(this, key, event2.ctrlKey, event2);
        event2.preventDefault();
      }
      if (event2.keyCode === 32 && key === " " && this.promptChar === " ") {
        this.element.selectionStart = this.element.selectionEnd = this.element.selectionStart - key.length;
      }
    }
    if (this.element.value !== oldValue) {
      triggerMaskChangeEvent.call(this, event2, oldValue);
    }
  }
}
function triggerMaskChangeEvent(event2, oldValue) {
  var prevOnChange = this.isProtectedOnChange;
  if (!isNullOrUndefined2(this.changeEventArgs) && !this.isInitial) {
    var eventArgs = {};
    this.changeEventArgs = {
      value: this.element.value,
      maskedValue: this.element.value,
      isInteraction: false,
      isInteracted: false
    };
    if (this.mask) {
      this.changeEventArgs.value = strippedValue.call(this, this.element);
    }
    if (!isNullOrUndefined2(event2)) {
      this.changeEventArgs.isInteracted = true;
      this.changeEventArgs.isInteraction = true;
      this.changeEventArgs.event = event2;
    }
    this.isProtectedOnChange = true;
    this.value = this.changeEventArgs.value;
    this.isProtectedOnChange = prevOnChange;
    merge2(eventArgs, this.changeEventArgs);
    if (this.isAngular && this.preventChange) {
      this.preventChange = false;
    } else {
      this.trigger("change", eventArgs);
    }
  }
  this.preEleVal = this.element.value;
  this.prevValue = strippedValue.call(this, this.element);
}
function maskInputKeyUpHandler(event2) {
  if (this.mask && !this.readonly) {
    var collec = void 0;
    if (!this.maskKeyPress && event2.keyCode === 229) {
      var oldEventVal = void 0;
      if (this.element.value.length === 1) {
        this.element.value = this.element.value + this.promptMask;
        this.element.setSelectionRange(1, 1);
      }
      if (this.element.value.length > this.promptMask.length) {
        var startIndex = this.element.selectionStart;
        var addedValues = this.element.value.length - this.promptMask.length;
        var val_1 = this.element.value.substring(startIndex - addedValues, startIndex);
        if (this.undoCollec.length > 0) {
          collec = this.undoCollec[this.undoCollec.length - 1];
          var startIndex_1 = this.element.selectionStart;
          oldEventVal = collec.value;
          var oldVal = collec.value.substring(startIndex_1 - addedValues, startIndex_1);
          collec = this.redoCollec[0];
          val_1 = val_1.trim();
          var isSpace = Browser2.isAndroid && val_1 === "";
          if (!isSpace && oldVal !== val_1 && collec.value.substring(startIndex_1 - addedValues, startIndex_1) !== val_1) {
            validateValue.call(this, val_1, event2.ctrlKey, event2);
          } else if (isSpace) {
            preventUnsupportedValues.call(this, event2, startIndex_1 - 1, this.element.selectionEnd - 1, val_1, event2.ctrlKey, false);
          }
        } else {
          oldEventVal = this.promptMask;
          validateValue.call(this, val_1, event2.ctrlKey, event2);
        }
        this.maskKeyPress = false;
        triggerMaskChangeEvent.call(this, event2, oldEventVal);
      }
    } else {
      removeMaskError.call(this);
    }
    var val = strippedValue.call(this, this.element);
    if (!(this.element.selectionStart === 0 && this.promptMask === this.element.value && val === "") || val === "" && this.value !== val) {
      this.prevValue = val;
      this.value = val;
    }
  } else {
    triggerMaskChangeEvent.call(this, event2);
  }
  if (this.element.selectionStart === 0 && this.element.selectionEnd === 0) {
    var temp_1 = this.element;
    setTimeout(function() {
      temp_1.setSelectionRange(0, 0);
    }, 0);
  }
}
function mobileSwipeCheck(key) {
  if (key.length > 1 && this.promptMask.length + key.length < this.element.value.length) {
    var elementValue = this.redoCollec[0].value.substring(0, this.redoCollec[0].startIndex) + key + this.redoCollec[0].value.substring(this.redoCollec[0].startIndex, this.redoCollec[0].value.length);
    setElementValue.call(this, elementValue);
    this.element.selectionStart = this.element.selectionEnd = this.redoCollec[0].startIndex + key.length;
  }
  this.element.selectionStart = this.element.selectionStart - key.length;
  this.element.selectionEnd = this.element.selectionEnd - key.length;
}
function mobileValidation(key) {
  if (!this.maskKeyPress) {
    mobileSwipeCheck.call(this, key);
  }
}
function validateValue(key, isCtrlKey, event2) {
  mobileValidation.call(this, key);
  if (isNullOrUndefined2(this) || isNullOrUndefined2(key)) {
    return;
  }
  var startIndex = this.element.selectionStart;
  var initStartIndex = startIndex;
  var curMask;
  var allowText = false;
  var value = this.element.value;
  var eventOldVal;
  var prevSupport = false;
  var isEqualVal = false;
  for (var k = 0; k < key.length; k++) {
    var keyValue = key[k];
    startIndex = this.element.selectionStart;
    if (!this.maskKeyPress && initStartIndex === startIndex) {
      startIndex = startIndex + k;
    }
    if (!this.maskKeyPress || startIndex < this.promptMask.length) {
      for (var i = startIndex; i < this.promptMask.length; i++) {
        var maskValue = this.escapeMaskValue;
        curMask = maskValue[startIndex];
        if (this.hiddenMask[startIndex] === "\\" && this.hiddenMask[startIndex + 1] === key) {
          isEqualVal = true;
        }
        if (isNullOrUndefined2(this.regExpCollec["" + curMask]) && (isNullOrUndefined2(this.customCharacters) || !isNullOrUndefined2(this.customCharacters) && isNullOrUndefined2(this.customCharacters["" + curMask])) && this.hiddenMask[startIndex] !== this.promptChar && this.customRegExpCollec[startIndex][0] !== "[" && this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] !== "]" || this.promptMask[startIndex] !== this.promptChar && isNullOrUndefined2(this.customCharacters) || this.promptChar === curMask && this.escapeMaskValue === this.mask) {
          this.element.selectionStart = this.element.selectionEnd = startIndex + 1;
          startIndex = this.element.selectionStart;
          curMask = this.hiddenMask[startIndex];
        }
      }
      if (!isNullOrUndefined2(this.customCharacters) && !isNullOrUndefined2(this.customCharacters["" + curMask])) {
        var customValStr = this.customCharacters["" + curMask];
        var customValArr = customValStr.split(",");
        for (var i = 0; i < customValArr.length; i++) {
          if (keyValue.match(new RegExp("[" + customValArr[i] + "]"))) {
            allowText = true;
            break;
          }
        }
      } else if (!isNullOrUndefined2(this.regExpCollec["" + curMask]) && keyValue.match(new RegExp(this.regExpCollec["" + curMask])) && this.promptMask[startIndex] === this.promptChar) {
        allowText = true;
      } else if (this.promptMask[startIndex] === this.promptChar && this.customRegExpCollec[startIndex][0] === "[" && this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] === "]" && keyValue.match(new RegExp(this.customRegExpCollec[startIndex]))) {
        allowText = true;
      }
      if ((!this.maskKeyPress || startIndex < this.hiddenMask.length) && allowText) {
        if (k === 0) {
          if (this.maskKeyPress) {
            this.undoCollec.push({
              value,
              startIndex,
              endIndex: startIndex
            });
          } else {
            var sIndex = this.element.selectionStart;
            var eIndex = this.element.selectionEnd;
            if (this.redoCollec.length > 0) {
              eventOldVal = this.redoCollec[0].value;
              setElementValue.call(this, eventOldVal);
              this.undoCollec.push(this.redoCollec[0]);
            } else {
              this.undoCollec.push({
                value: this.promptMask,
                startIndex,
                endIndex: startIndex
              });
              eventOldVal = this.promptMask;
              setElementValue.call(this, eventOldVal);
            }
            this.element.selectionStart = sIndex;
            this.element.selectionEnd = eIndex;
          }
        }
        startIndex = this.element.selectionStart;
        applySupportedValues.call(this, event2, startIndex, keyValue, eventOldVal, isEqualVal);
        prevSupport = true;
        if (k === key.length - 1) {
          this.redoCollec.unshift({
            value: this.element.value,
            startIndex: this.element.selectionStart,
            endIndex: this.element.selectionEnd
          });
        }
        allowText = false;
      } else {
        startIndex = this.element.selectionStart;
        preventUnsupportedValues.call(this, event2, startIndex, initStartIndex, key, isCtrlKey, prevSupport);
      }
      if (k === key.length - 1 && !allowText) {
        if (!Browser2.isAndroid || Browser2.isAndroid && startIndex < this.promptMask.length) {
          this.redoCollec.unshift({
            value: this.element.value,
            startIndex: this.element.selectionStart,
            endIndex: this.element.selectionEnd
          });
        }
      }
    } else {
      if (key.length === 1 && !isCtrlKey && !isNullOrUndefined2(event2)) {
        addMaskErrorClass.call(this);
      }
    }
  }
}
function applySupportedValues(event2, startIndex, keyValue, eventOldVal, isEqualVal) {
  if (this.hiddenMask.length > this.promptMask.length) {
    keyValue = changeToLowerUpperCase.call(this, keyValue, this.element.value);
  }
  if (!isEqualVal) {
    var value = this.element.value;
    var elementValue = value.substring(0, startIndex) + keyValue + value.substring(startIndex + 1, value.length);
    setElementValue.call(this, elementValue);
    this.element.selectionStart = this.element.selectionEnd = startIndex + 1;
  }
}
function preventUnsupportedValues(event2, sIdx, idx, key, ctrl, chkSupport) {
  if (!this.maskKeyPress) {
    var value = this.element.value;
    if (sIdx >= this.promptMask.length) {
      setElementValue.call(this, value.substring(0, sIdx));
    } else {
      if (idx === sIdx) {
        setElementValue.call(this, value.substring(0, sIdx) + value.substring(sIdx + 1, value.length));
      } else {
        if (this.promptMask.length === this.element.value.length) {
          setElementValue.call(this, value.substring(0, sIdx) + value.substring(sIdx, value.length));
        } else {
          setElementValue.call(this, value.substring(0, idx) + value.substring(idx + 1, value.length));
        }
      }
      this.element.selectionStart = this.element.selectionEnd = chkSupport || this.element.value[idx] !== this.promptChar ? sIdx : idx;
    }
    addMaskErrorClass.call(this);
  }
  if (key.length === 1 && !ctrl && !isNullOrUndefined2(event2)) {
    addMaskErrorClass.call(this);
  }
}
function addMaskErrorClass() {
  var _this = this;
  var parentElement = this.element.parentNode;
  var timer = 200;
  if (parentElement.classList.contains(INPUTGROUP) || parentElement.classList.contains(FLOATINPUT)) {
    addClass2([parentElement], ERROR3);
  } else {
    addClass2([this.element], ERROR3);
  }
  if (this.isIosInvalid === true) {
    timer = 400;
  }
  attributes2(this.element, {
    "aria-invalid": "true"
  });
  setTimeout(function() {
    if (!_this.maskKeyPress) {
      removeMaskError.call(_this);
    }
  }, timer);
}
function removeMaskError() {
  var parentElement = this.element.parentNode;
  if (!isNullOrUndefined2(parentElement)) {
    removeClass2([parentElement], ERROR3);
  }
  removeClass2([this.element], ERROR3);
  attributes2(this.element, {
    "aria-invalid": "false"
  });
}
function changeToLowerUpperCase(key, value) {
  var promptMask;
  var i;
  var curVal = value;
  var caseCount = 0;
  for (i = 0; i < this.hiddenMask.length; i++) {
    if (this.hiddenMask[i] === "\\") {
      promptMask = curVal.substring(0, i) + "\\" + curVal.substring(i, curVal.length);
    }
    if (this.hiddenMask[i] === ">" || this.hiddenMask[i] === "<" || this.hiddenMask[i] === "|") {
      if (this.hiddenMask[i] !== curVal[i]) {
        promptMask = curVal.substring(0, i) + this.hiddenMask[i] + curVal.substring(i, curVal.length);
      }
      ++caseCount;
    }
    if (promptMask) {
      if (promptMask[i] === this.promptChar && i > this.element.selectionStart || this.element.value.indexOf(this.promptChar) < 0 && this.element.selectionStart + caseCount === i) {
        caseCount = 0;
        break;
      }
      curVal = promptMask;
    }
  }
  while (i >= 0 && promptMask) {
    if (i === 0 || promptMask[i - 1] !== "\\") {
      if (promptMask[i] === ">") {
        key = key.toUpperCase();
        break;
      } else if (promptMask[i] === "<") {
        key = key.toLowerCase();
        break;
      } else if (promptMask[i] === "|") {
        break;
      }
    }
    --i;
  }
  return key;
}
function setMaskValue(val) {
  if (this.mask && val !== void 0 && (this.prevValue === void 0 || this.prevValue !== val)) {
    this.maskKeyPress = true;
    setElementValue.call(this, this.promptMask);
    if (val !== "" && !(val === null && this.floatLabelType === "Never" && this.placeholder)) {
      this.element.selectionStart = 0;
      this.element.selectionEnd = 0;
    }
    if (val !== null) {
      for (var i = 0; i < val.length; i++) {
        validateValue.call(this, val[i], false, null);
      }
    }
    var newVal = strippedValue.call(this, this.element);
    this.prevValue = newVal;
    this.value = newVal;
    triggerMaskChangeEvent.call(this, null, null);
    this.maskKeyPress = false;
    var labelElement = this.element.parentNode.querySelector(".e-float-text");
    if (this.element.value === this.promptMask && this.floatLabelType === "Auto" && this.placeholder && !isNullOrUndefined2(labelElement) && labelElement.classList.contains(TOPLABEL) && !this.isFocus) {
      removeClass2([labelElement], TOPLABEL);
      addClass2([labelElement], BOTTOMLABEL);
      setElementValue.call(this, "");
    }
  }
  if (this.mask === null || this.mask === "" && this.value !== void 0) {
    setElementValue.call(this, this.value);
  }
}
function setElementValue(val, element2) {
  if (!this.isFocus && this.floatLabelType === "Auto" && this.placeholder && isNullOrUndefined2(this.value)) {
    val = "";
  }
  var value = strippedValue.call(this, element2 ? element2 : this.element, val);
  if (value === null || value === "") {
    Input.setValue(val, element2 ? element2 : this.element, this.floatLabelType, false);
    if (this.showClearButton) {
      this.inputObj.clearButton.classList.add("e-clear-icon-hide");
    }
  } else {
    Input.setValue(val, element2 ? element2 : this.element, this.floatLabelType, this.showClearButton);
  }
}
var MaskUndo = (
  /** @class */
  /* @__PURE__ */ function() {
    function MaskUndo2() {
    }
    return MaskUndo2;
  }()
);
var maskUndo = new MaskUndo();

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/maskedtextbox/maskedtextbox/maskedtextbox.js
var __extends53 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate52 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ROOT5 = "e-control-wrapper e-mask";
var INPUT = "e-input";
var COMPONENT2 = "e-maskedtextbox";
var CONTROL2 = "e-control";
var MASKINPUT_FOCUS = "e-input-focus";
var wrapperAttr = ["title", "style", "class"];
var MaskedTextBox = (
  /** @class */
  function(_super) {
    __extends53(MaskedTextBox2, _super);
    function MaskedTextBox2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.initInputValue = "";
      _this.preventChange = false;
      _this.isClicked = false;
      _this.maskOptions = options;
      return _this;
    }
    MaskedTextBox2.prototype.getModuleName = function() {
      return "maskedtextbox";
    };
    MaskedTextBox2.prototype.preRender = function() {
      this.promptMask = "";
      this.hiddenMask = "";
      this.escapeMaskValue = "";
      this.regExpCollec = regularExpressions;
      this.customRegExpCollec = [];
      this.maskedRegExp = [];
      this.undoCollec = [];
      this.redoCollec = [];
      this.changeEventArgs = {};
      this.focusEventArgs = {};
      this.blurEventArgs = {};
      this.maskKeyPress = false;
      this.isFocus = false;
      this.isInitial = false;
      this.isIosInvalid = false;
      var ejInstance = getValue2("ej2_instances", this.element);
      this.cloneElement = this.element.cloneNode(true);
      removeClass2([this.cloneElement], [CONTROL2, COMPONENT2, "e-lib"]);
      this.angularTagName = null;
      this.formElement = closest2(this.element, "form");
      if (this.element.tagName === "EJS-MASKEDTEXTBOX") {
        this.angularTagName = this.element.tagName;
        var input2 = this.createElement("input");
        for (var i = 0; i < this.element.attributes.length; i++) {
          input2.setAttribute(this.element.attributes[i].nodeName, this.element.attributes[i].nodeValue);
          input2.innerHTML = this.element.innerHTML;
        }
        if (this.element.hasAttribute("id")) {
          this.element.removeAttribute("id");
        }
        if (this.element.hasAttribute("name")) {
          this.element.removeAttribute("name");
        }
        this.element.classList.remove("e-control", "e-maskedtextbox");
        this.element.classList.add("e-mask-container");
        this.element.appendChild(input2);
        this.element = input2;
        setValue3("ej2_instances", ejInstance, this.element);
      }
      this.updateHTMLAttrToElement();
      this.checkHtmlAttributes(false);
      if (this.formElement) {
        this.initInputValue = this.value;
      }
    };
    MaskedTextBox2.prototype.getPersistData = function() {
      var keyEntity = ["value"];
      return this.addOnPersist(keyEntity);
    };
    MaskedTextBox2.prototype.render = function() {
      if (this.element.tagName.toLowerCase() === "input") {
        if (this.floatLabelType === "Never") {
          addClass2([this.element], INPUT);
        }
        this.createWrapper();
        this.updateHTMLAttrToWrapper();
        if (this.element.name === "") {
          this.element.setAttribute("name", this.element.id);
        }
        this.isInitial = true;
        this.resetMaskedTextBox();
        this.isInitial = false;
        this.setMaskPlaceholder(true, false);
        this.setWidth(this.width);
        this.preEleVal = this.element.value;
        if (!Browser2.isDevice && (Browser2.info.version === "11.0" || Browser2.info.name === "edge")) {
          this.element.blur();
        }
        if (Browser2.isDevice && Browser2.isIos) {
          this.element.blur();
        }
        if (this.element.getAttribute("value") || this.value) {
          this.element.setAttribute("value", this.element.value);
        }
        if (!isNullOrUndefined2(closest2(this.element, "fieldset")) && closest2(this.element, "fieldset").disabled) {
          this.enabled = false;
        }
        if (!this.element.hasAttribute("aria-labelledby") && !this.element.hasAttribute("placeholder") && !this.element.hasAttribute("aria-label")) {
          this.element.setAttribute("aria-label", "maskedtextbox");
        }
        this.renderComplete();
      }
    };
    MaskedTextBox2.prototype.updateHTMLAttrToElement = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          if (wrapperAttr.indexOf(key) < 0) {
            this.element.setAttribute(key, this.htmlAttributes["" + key]);
          }
        }
      }
    };
    MaskedTextBox2.prototype.updateCssClass = function(newClass, oldClass) {
      Input.setCssClass(this.getValidClassList(newClass), [this.inputObj.container], this.getValidClassList(oldClass));
    };
    MaskedTextBox2.prototype.getValidClassList = function(maskClassName) {
      var result = maskClassName;
      if (!isNullOrUndefined2(maskClassName) && maskClassName !== "") {
        result = maskClassName.replace(/\s+/g, " ").trim();
      }
      return result;
    };
    MaskedTextBox2.prototype.updateHTMLAttrToWrapper = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var key = _a[_i];
          if (wrapperAttr.indexOf(key) > -1) {
            if (key === "class") {
              var updatedClassValues = this.htmlAttributes["" + key].replace(/\s+/g, " ").trim();
              if (updatedClassValues !== "") {
                addClass2([this.inputObj.container], updatedClassValues.split(" "));
              }
            } else if (key === "style") {
              var maskStyle = this.inputObj.container.getAttribute(key);
              maskStyle = !isNullOrUndefined2(maskStyle) ? maskStyle + this.htmlAttributes["" + key] : this.htmlAttributes["" + key];
              this.inputObj.container.setAttribute(key, maskStyle);
            } else {
              this.inputObj.container.setAttribute(key, this.htmlAttributes["" + key]);
            }
          }
        }
      }
    };
    MaskedTextBox2.prototype.resetMaskedTextBox = function() {
      this.promptMask = "";
      this.hiddenMask = "";
      this.escapeMaskValue = "";
      this.customRegExpCollec = [];
      this.undoCollec = [];
      this.redoCollec = [];
      if (this.promptChar && this.promptChar.length > 1) {
        this.promptChar = this.promptChar[0];
      }
      createMask.call(this);
      applyMask.call(this);
      if (this.mask === null || this.mask === "" && this.value !== void 0) {
        setElementValue.call(this, this.value);
      }
      var val = strippedValue.call(this, this.element);
      this.prevValue = val;
      this.value = val;
      if (!this.isInitial) {
        unwireEvents.call(this);
      }
      wireEvents2.call(this);
    };
    MaskedTextBox2.prototype.setMaskPlaceholder = function(setVal, dynamicPlaceholder) {
      if (dynamicPlaceholder || this.placeholder) {
        Input.setPlaceholder(this.placeholder, this.element);
        if (this.element.value === this.promptMask && setVal && this.floatLabelType !== "Always" || this.element.value === this.promptMask && this.floatLabelType === "Never") {
          setElementValue.call(this, "");
        }
      }
    };
    MaskedTextBox2.prototype.setWidth = function(width) {
      if (!isNullOrUndefined2(width)) {
        if (typeof width === "number") {
          this.inputObj.container.style.width = formatUnit(width);
          this.element.style.width = formatUnit(width);
        } else if (typeof width === "string") {
          var elementWidth = width.match(/px|%|em/) ? width : formatUnit(width);
          this.inputObj.container.style.width = elementWidth;
          this.element.style.width = elementWidth;
        }
      }
    };
    MaskedTextBox2.prototype.checkHtmlAttributes = function(isDynamic) {
      var attributes4 = isDynamic ? isNullOrUndefined2(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ["placeholder", "disabled", "value", "readonly"];
      for (var _i = 0, attributes_1 = attributes4; _i < attributes_1.length; _i++) {
        var key = attributes_1[_i];
        if (!isNullOrUndefined2(this.element.getAttribute(key))) {
          switch (key) {
            case "placeholder":
              if (isNullOrUndefined2(this.maskOptions) || this.maskOptions["placeholder"] === void 0 || isDynamic) {
                this.setProperties({
                  placeholder: this.element.placeholder
                }, !isDynamic);
              }
              break;
            case "disabled":
              if (isNullOrUndefined2(this.maskOptions) || this.maskOptions["enabled"] === void 0 || isDynamic) {
                var isEnabled = this.element.getAttribute(key) === "disabled" || this.element.getAttribute(key) === "" || this.element.getAttribute(key) === "true" ? false : true;
                this.setProperties({
                  enabled: isEnabled
                }, !isDynamic);
              }
              break;
            case "value":
              if (isNullOrUndefined2(this.maskOptions) || this.maskOptions["value"] === void 0 || isDynamic) {
                this.setProperties({
                  value: this.element.value
                }, !isDynamic);
              }
              break;
            case "readonly":
              if (isNullOrUndefined2(this.maskOptions) || this.maskOptions["readonly"] === void 0 || isDynamic) {
                var isReadonly = this.element.getAttribute(key) === "readonly" || this.element.getAttribute(key) === "" || this.element.getAttribute(key) === "true" ? true : false;
                this.setProperties({
                  readonly: isReadonly
                }, !isDynamic);
              }
              break;
          }
        }
      }
    };
    MaskedTextBox2.prototype.createWrapper = function() {
      var updatedCssClassValues = this.cssClass;
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        updatedCssClassValues = this.getValidClassList(this.cssClass);
      }
      this.inputObj = Input.createInput({
        element: this.element,
        floatLabelType: this.floatLabelType,
        properties: {
          enableRtl: this.enableRtl,
          cssClass: updatedCssClassValues,
          enabled: this.enabled,
          readonly: this.readonly,
          placeholder: this.placeholder,
          showClearButton: this.showClearButton
        }
      }, this.createElement);
      this.inputObj.container.setAttribute("class", ROOT5 + " " + this.inputObj.container.getAttribute("class"));
    };
    MaskedTextBox2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "value":
            setMaskValue.call(this, this.value);
            if (this.placeholder && !this.isFocus) {
              this.setMaskPlaceholder(false, false);
            }
            if (this.value === "" && oldProp.value != null) {
              this.element.selectionStart = 0;
              this.element.selectionEnd = 0;
            }
            break;
          case "placeholder":
            this.setMaskPlaceholder(true, true);
            break;
          case "width":
            this.setWidth(newProp.width);
            Input.calculateWidth(this.element, this.inputObj.container);
            break;
          case "cssClass":
            this.updateCssClass(newProp.cssClass, oldProp.cssClass);
            break;
          case "enabled":
            Input.setEnabled(newProp.enabled, this.element, this.floatLabelType, this.inputObj.container);
            break;
          case "readonly":
            Input.setReadonly(newProp.readonly, this.element);
            break;
          case "enableRtl":
            Input.setEnableRtl(newProp.enableRtl, [this.inputObj.container]);
            break;
          case "customCharacters":
            this.customCharacters = newProp.customCharacters;
            this.resetMaskedTextBox();
            break;
          case "showClearButton":
            Input.setClearButton(newProp.showClearButton, this.element, this.inputObj, void 0, this.createElement);
            bindClearEvent.call(this);
            break;
          case "floatLabelType":
            this.floatLabelType = newProp.floatLabelType;
            Input.removeFloating(this.inputObj);
            Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
            break;
          case "htmlAttributes":
            this.updateHTMLAttrToElement();
            this.updateHTMLAttrToWrapper();
            this.checkHtmlAttributes(true);
            break;
          case "mask":
            {
              var strippedValue_1 = this.value;
              this.mask = newProp.mask;
              this.maskedRegExp = [];
              this.updateValue(strippedValue_1);
            }
            break;
          case "promptChar": {
            if (newProp.promptChar.length > 1) {
              newProp.promptChar = newProp.promptChar[0];
            }
            if (newProp.promptChar) {
              this.promptChar = newProp.promptChar;
            } else {
              this.promptChar = "_";
            }
            var value = this.element.value.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar);
            if (this.promptMask === this.element.value) {
              value = this.promptMask.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar);
            }
            this.promptMask = this.promptMask.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar);
            this.undoCollec = this.redoCollec = [];
            setElementValue.call(this, value);
            break;
          }
        }
      }
      this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;
    };
    MaskedTextBox2.prototype.updateValue = function(strippedVal) {
      this.resetMaskedTextBox();
      setMaskValue.call(this, strippedVal);
    };
    MaskedTextBox2.prototype.getMaskedValue = function() {
      return unstrippedValue.call(this, this.element);
    };
    MaskedTextBox2.prototype.focusIn = function() {
      if (document.activeElement !== this.element && this.enabled) {
        this.isFocus = true;
        this.element.focus();
        addClass2([this.inputObj.container], [MASKINPUT_FOCUS]);
      }
    };
    MaskedTextBox2.prototype.focusOut = function() {
      if (document.activeElement === this.element && this.enabled) {
        this.isFocus = false;
        this.element.blur();
        removeClass2([this.inputObj.container], [MASKINPUT_FOCUS]);
      }
    };
    MaskedTextBox2.prototype.destroy = function() {
      unwireEvents.call(this);
      if (this.showClearButton) {
        this.clearButton = document.getElementsByClassName("e-clear-icon")[0];
      }
      var attrArray = ["aria-labelledby", "role", "autocomplete", "aria-readonly", "aria-disabled", "autocapitalize", "spellcheck", "aria-autocomplete", "aria-live", "aria-invalid"];
      for (var i = 0; i < attrArray.length; i++) {
        this.element.removeAttribute(attrArray[i]);
      }
      this.element.classList.remove("e-input");
      if (this.inputObj) {
        this.inputObj.container.insertAdjacentElement("afterend", this.element);
        detach2(this.inputObj.container);
      }
      this.blurEventArgs = null;
      Input.destroy({
        element: this.element,
        floatLabelType: this.floatLabelType,
        properties: this.properties
      }, this.clearButton);
      this.changeEventArgs = null;
      this.inputObj = null;
      _super.prototype.destroy.call(this);
    };
    __decorate52([Property2(null)], MaskedTextBox2.prototype, "cssClass", void 0);
    __decorate52([Property2(null)], MaskedTextBox2.prototype, "width", void 0);
    __decorate52([Property2(null)], MaskedTextBox2.prototype, "placeholder", void 0);
    __decorate52([Property2("Never")], MaskedTextBox2.prototype, "floatLabelType", void 0);
    __decorate52([Property2({})], MaskedTextBox2.prototype, "htmlAttributes", void 0);
    __decorate52([Property2(true)], MaskedTextBox2.prototype, "enabled", void 0);
    __decorate52([Property2(false)], MaskedTextBox2.prototype, "readonly", void 0);
    __decorate52([Property2(false)], MaskedTextBox2.prototype, "showClearButton", void 0);
    __decorate52([Property2(false)], MaskedTextBox2.prototype, "enablePersistence", void 0);
    __decorate52([Property2(null)], MaskedTextBox2.prototype, "mask", void 0);
    __decorate52([Property2("_")], MaskedTextBox2.prototype, "promptChar", void 0);
    __decorate52([Property2(null)], MaskedTextBox2.prototype, "value", void 0);
    __decorate52([Property2(null)], MaskedTextBox2.prototype, "customCharacters", void 0);
    __decorate52([Event3()], MaskedTextBox2.prototype, "created", void 0);
    __decorate52([Event3()], MaskedTextBox2.prototype, "destroyed", void 0);
    __decorate52([Event3()], MaskedTextBox2.prototype, "change", void 0);
    __decorate52([Event3()], MaskedTextBox2.prototype, "focus", void 0);
    __decorate52([Event3()], MaskedTextBox2.prototype, "blur", void 0);
    MaskedTextBox2 = __decorate52([NotifyPropertyChanges2], MaskedTextBox2);
    return MaskedTextBox2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/slider/slider.js
var __extends54 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate53 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var TicksData = (
  /** @class */
  function(_super) {
    __extends54(TicksData2, _super);
    function TicksData2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate53([Property2("None")], TicksData2.prototype, "placement", void 0);
    __decorate53([Property2(10)], TicksData2.prototype, "largeStep", void 0);
    __decorate53([Property2(1)], TicksData2.prototype, "smallStep", void 0);
    __decorate53([Property2(false)], TicksData2.prototype, "showSmallTicks", void 0);
    __decorate53([Property2(null)], TicksData2.prototype, "format", void 0);
    return TicksData2;
  }(ChildProperty2)
);
var ColorRangeData = (
  /** @class */
  function(_super) {
    __extends54(ColorRangeData2, _super);
    function ColorRangeData2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate53([Property2(null)], ColorRangeData2.prototype, "color", void 0);
    __decorate53([Property2(null)], ColorRangeData2.prototype, "start", void 0);
    __decorate53([Property2(null)], ColorRangeData2.prototype, "end", void 0);
    return ColorRangeData2;
  }(ChildProperty2)
);
var LimitData = (
  /** @class */
  function(_super) {
    __extends54(LimitData2, _super);
    function LimitData2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate53([Property2(false)], LimitData2.prototype, "enabled", void 0);
    __decorate53([Property2(null)], LimitData2.prototype, "minStart", void 0);
    __decorate53([Property2(null)], LimitData2.prototype, "minEnd", void 0);
    __decorate53([Property2(null)], LimitData2.prototype, "maxStart", void 0);
    __decorate53([Property2(null)], LimitData2.prototype, "maxEnd", void 0);
    __decorate53([Property2(false)], LimitData2.prototype, "startHandleFixed", void 0);
    __decorate53([Property2(false)], LimitData2.prototype, "endHandleFixed", void 0);
    return LimitData2;
  }(ChildProperty2)
);
var TooltipData = (
  /** @class */
  function(_super) {
    __extends54(TooltipData2, _super);
    function TooltipData2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate53([Property2("")], TooltipData2.prototype, "cssClass", void 0);
    __decorate53([Property2("Before")], TooltipData2.prototype, "placement", void 0);
    __decorate53([Property2("Focus")], TooltipData2.prototype, "showOn", void 0);
    __decorate53([Property2(false)], TooltipData2.prototype, "isVisible", void 0);
    __decorate53([Property2(null)], TooltipData2.prototype, "format", void 0);
    return TooltipData2;
  }(ChildProperty2)
);
var bootstrapTooltipOffset = 6;
var bootstrap4TooltipOffset = 3;
var classNames4 = {
  root: "e-slider",
  rtl: "e-rtl",
  sliderHiddenInput: "e-slider-input",
  controlWrapper: "e-control-wrapper",
  sliderHandle: "e-handle",
  rangeBar: "e-range",
  sliderButton: "e-slider-button",
  firstButton: "e-first-button",
  secondButton: "e-second-button",
  scale: "e-scale",
  tick: "e-tick",
  large: "e-large",
  tickValue: "e-tick-value",
  sliderTooltip: "e-slider-tooltip",
  sliderHover: "e-slider-hover",
  sliderFirstHandle: "e-handle-first",
  sliderSecondHandle: "e-handle-second",
  sliderDisabled: "e-disabled",
  sliderContainer: "e-slider-container",
  horizontalTooltipBefore: "e-slider-horizontal-before",
  horizontalTooltipAfter: "e-slider-horizontal-after",
  verticalTooltipBefore: "e-slider-vertical-before",
  verticalTooltipAfter: "e-slider-vertical-after",
  materialTooltip: "e-material-tooltip",
  materialTooltipOpen: "e-material-tooltip-open",
  materialTooltipActive: "e-tooltip-active",
  materialSlider: "e-material-slider",
  sliderTrack: "e-slider-track",
  sliderHorizantalColor: "e-slider-horizantal-color",
  sliderVerticalColor: "e-slider-vertical-color",
  sliderHandleFocused: "e-handle-focused",
  verticalSlider: "e-vertical",
  horizontalSlider: "e-horizontal",
  sliderHandleStart: "e-handle-start",
  sliderTooltipStart: "e-material-tooltip-start",
  sliderTabHandle: "e-tab-handle",
  sliderButtonIcon: "e-button-icon",
  sliderSmallSize: "e-small-size",
  sliderTickPosition: "e-tick-pos",
  sliderFirstTick: "e-first-tick",
  sliderLastTick: "e-last-tick",
  sliderButtonClass: "e-slider-btn",
  sliderTooltipWrapper: "e-tooltip-wrap",
  sliderTabTrack: "e-tab-track",
  sliderTabRange: "e-tab-range",
  sliderActiveHandle: "e-handle-active",
  sliderMaterialHandle: "e-material-handle",
  sliderMaterialRange: "e-material-range",
  sliderMaterialDefault: "e-material-default",
  materialTooltipShow: "e-material-tooltip-show",
  materialTooltipHide: "e-material-tooltip-hide",
  readonly: "e-read-only",
  limits: "e-limits",
  limitBarDefault: "e-limit-bar",
  limitBarFirst: "e-limit-first",
  limitBarSecond: "e-limit-second",
  dragHorizontal: "e-drag-horizontal",
  dragVertical: "e-drag-vertical"
};
var Slider = (
  /** @class */
  function(_super) {
    __extends54(Slider2, _super);
    function Slider2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.horDir = "left";
      _this.verDir = "bottom";
      _this.transition = {
        handle: "left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",
        rangeBar: "all .4s cubic-bezier(.25, .8, .25, 1)"
      };
      _this.transitionOnMaterialTooltip = {
        handle: "left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, top 1ms ease-out",
        rangeBar: "left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"
      };
      _this.scaleTransform = "transform .4s cubic-bezier(.25, .8, .25, 1)";
      _this.customAriaText = null;
      _this.drag = true;
      _this.isDragComplete = false;
      _this.initialTooltip = true;
      return _this;
    }
    Slider2.prototype.preRender = function() {
      var localeText = {
        incrementTitle: "Increase",
        decrementTitle: "Decrease"
      };
      this.l10n = new L10n2("slider", localeText, this.locale);
      this.isElementFocused = false;
      this.tickElementCollection = [];
      this.tooltipFormatInfo = {};
      this.ticksFormatInfo = {};
      this.initCultureInfo();
      this.initCultureFunc();
      this.formChecker();
    };
    Slider2.prototype.formChecker = function() {
      var formElement = closest2(this.element, "form");
      if (formElement) {
        this.isForm = true;
        if (!isNullOrUndefined2(this.formResetValue)) {
          this.setProperties({
            "value": this.formResetValue
          }, true);
        }
        this.formResetValue = this.value;
        if (this.type === "Range" && (isNullOrUndefined2(this.formResetValue) || typeof this.formResetValue !== "object")) {
          this.formResetValue = [parseFloat(formatUnit(this.min)), parseFloat(formatUnit(this.max))];
        } else if (isNullOrUndefined2(this.formResetValue)) {
          this.formResetValue = parseFloat(formatUnit(this.min));
        }
        this.formElement = formElement;
      } else {
        this.isForm = false;
      }
    };
    Slider2.prototype.initCultureFunc = function() {
      this.internationalization = new Internationalization2(this.locale);
    };
    Slider2.prototype.initCultureInfo = function() {
      this.tooltipFormatInfo.format = !isNullOrUndefined2(this.tooltip.format) ? this.tooltip.format : null;
      this.ticksFormatInfo.format = !isNullOrUndefined2(this.ticks.format) ? this.ticks.format : null;
    };
    Slider2.prototype.formatString = function(value, formatInfo) {
      var formatValue = null;
      var formatString = null;
      if (value || value === 0) {
        formatValue = this.formatNumber(value);
        var numberOfDecimals = this.numberOfDecimals(value);
        formatString = this.internationalization.getNumberFormat(formatInfo)(this.makeRoundNumber(value, numberOfDecimals));
      }
      return {
        elementVal: formatValue,
        formatString
      };
    };
    Slider2.prototype.formatNumber = function(value) {
      var numberOfDecimals = this.numberOfDecimals(value);
      return this.internationalization.getNumberFormat({
        maximumFractionDigits: numberOfDecimals,
        minimumFractionDigits: numberOfDecimals,
        useGrouping: false
      })(value);
    };
    Slider2.prototype.numberOfDecimals = function(value) {
      var decimalPart = value.toString().split(".")[1];
      var numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;
      return numberOfDecimals;
    };
    Slider2.prototype.makeRoundNumber = function(value, precision) {
      var decimals = precision || 0;
      return Number(value.toFixed(decimals));
    };
    Slider2.prototype.fractionalToInteger = function(value) {
      value = this.numberOfDecimals(value) === 0 ? Number(value).toFixed(this.noOfDecimals) : value;
      var tens = 1;
      for (var i = 0; i < this.noOfDecimals; i++) {
        tens *= 10;
      }
      value = Number((value * tens).toFixed(0));
      return value;
    };
    Slider2.prototype.render = function() {
      var _this = this;
      this.initialize();
      this.initRender();
      this.wireEvents();
      this.setZindex();
      this.renderComplete();
      if (this.element.tagName === "EJS-SLIDER") {
        if (this.getTheme(this.sliderContainer) === "none") {
          setTimeout(function() {
            _this.refresh();
          }, 0);
        }
      }
    };
    Slider2.prototype.initialize = function() {
      addClass2([this.element], classNames4.root);
      this.setCSSClass();
    };
    Slider2.prototype.setElementWidth = function(width) {
      if (!isNullOrUndefined2(width) && !isNullOrUndefined2(this.sliderContainer)) {
        if (typeof width === "number") {
          this.sliderContainer.style.width = formatUnit(width);
        } else if (typeof width === "string") {
          this.sliderContainer.style.width = width.match(/px|%|em/) ? width : formatUnit(width);
        }
      }
    };
    Slider2.prototype.setCSSClass = function(oldCSSClass) {
      if (oldCSSClass) {
        removeClass2([this.element], oldCSSClass.split(" "));
      }
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.split(" "));
      }
    };
    Slider2.prototype.setEnabled = function() {
      if (!this.enabled) {
        addClass2([this.sliderContainer], [classNames4.sliderDisabled]);
        if (this.tooltip.isVisible && this.tooltipElement && this.tooltip.showOn === "Always") {
          this.tooltipElement.classList.add(classNames4.sliderDisabled);
        }
        this.unwireEvents();
      } else {
        removeClass2([this.sliderContainer], [classNames4.sliderDisabled]);
        if (this.tooltip.isVisible && this.tooltipElement && this.tooltip.showOn === "Always") {
          this.tooltipElement.classList.remove(classNames4.sliderDisabled);
        }
        this.wireEvents();
      }
    };
    Slider2.prototype.getTheme = function(container) {
      var theme = window.getComputedStyle(container, ":after").getPropertyValue("content");
      return theme.replace(/['"]+/g, "");
    };
    Slider2.prototype.initRender = function() {
      this.sliderContainer = this.createElement("div", {
        className: classNames4.sliderContainer + " " + classNames4.controlWrapper
      });
      this.element.parentNode.insertBefore(this.sliderContainer, this.element);
      this.sliderContainer.appendChild(this.element);
      this.sliderTrack = this.createElement("div", {
        className: classNames4.sliderTrack
      });
      this.element.appendChild(this.sliderTrack);
      this.setElementWidth(this.width);
      this.element.tabIndex = -1;
      this.getThemeInitialization();
      this.setHandler();
      this.createRangeBar();
      if (this.limits.enabled) {
        this.createLimitBar();
      }
      this.setOrientClass();
      this.hiddenInput = this.createElement("input", {
        attrs: {
          type: "hidden",
          value: isNullOrUndefined2(this.value) ? isNullOrUndefined2(this.min) ? "0" : this.min.toString() : this.value.toString(),
          name: this.element.getAttribute("name") || this.element.getAttribute("id") || "_" + (Math.random() * 1e3).toFixed(0) + "slider",
          class: classNames4.sliderHiddenInput
        }
      });
      this.hiddenInput.tabIndex = -1;
      this.sliderContainer.appendChild(this.hiddenInput);
      if (this.showButtons) {
        this.setButtons();
      }
      this.setEnableRTL();
      if (this.type === "Range") {
        this.rangeValueUpdate();
      } else {
        this.value = isNullOrUndefined2(this.value) ? isNullOrUndefined2(this.min) ? 0 : parseFloat(formatUnit(this.min.toString())) : this.value;
      }
      this.previousVal = this.type !== "Range" ? this.checkHandleValue(parseFloat(formatUnit(this.value.toString()))) : [this.checkHandleValue(parseFloat(formatUnit(this.value[0].toString()))), this.checkHandleValue(parseFloat(formatUnit(this.value[1].toString())))];
      this.previousChanged = this.previousVal;
      if (!isNullOrUndefined2(this.element.hasAttribute("name"))) {
        this.element.removeAttribute("name");
      }
      this.setValue();
      if (this.limits.enabled) {
        this.setLimitBar();
      }
      if (this.ticks.placement !== "None") {
        this.renderScale();
      }
      if (this.tooltip.isVisible) {
        this.renderTooltip();
      }
      if (!this.enabled) {
        addClass2([this.sliderContainer], [classNames4.sliderDisabled]);
      } else {
        removeClass2([this.sliderContainer], [classNames4.sliderDisabled]);
      }
      if (this.readonly) {
        addClass2([this.sliderContainer], [classNames4.readonly]);
      } else {
        removeClass2([this.sliderContainer], [classNames4.readonly]);
      }
    };
    Slider2.prototype.getThemeInitialization = function() {
      this.isMaterial = this.getTheme(this.sliderContainer) === "material" || this.getTheme(this.sliderContainer) === "material-dark";
      this.isMaterial3 = this.getTheme(this.sliderContainer) === "Material3" || this.getTheme(this.sliderContainer) === "Material3-dark";
      this.isBootstrap = this.getTheme(this.sliderContainer) === "bootstrap" || this.getTheme(this.sliderContainer) === "bootstrap-dark";
      this.isBootstrap4 = this.getTheme(this.sliderContainer) === "bootstrap4";
      this.isTailwind = this.getTheme(this.sliderContainer) === "tailwind" || this.getTheme(this.sliderContainer) === "tailwind-dark";
      this.isTailwind3 = this.getTheme(this.sliderContainer) === "tailwind3" || this.getTheme(this.sliderContainer) === "tailwind3-dark";
      this.isBootstrap5 = this.getTheme(this.sliderContainer) === "bootstrap5";
      this.isFluent = this.getTheme(this.sliderContainer) === "FluentUI";
      this.isFluent2 = this.getTheme(this.sliderContainer) === "fluent2";
      this.isBootstrap5Dot3 = this.getTheme(this.sliderContainer) === "bootstrap5.3";
      this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== "Range" && this.tooltip.isVisible;
    };
    Slider2.prototype.createRangeBar = function() {
      if (this.type !== "Default") {
        this.rangeBar = this.createElement("div", {
          attrs: {
            class: classNames4.rangeBar
          }
        });
        this.element.appendChild(this.rangeBar);
        if (this.drag && this.type === "Range") {
          if (this.orientation === "Horizontal") {
            this.rangeBar.classList.add(classNames4.dragHorizontal);
          } else {
            this.rangeBar.classList.add(classNames4.dragVertical);
          }
        }
      }
    };
    Slider2.prototype.createLimitBar = function() {
      var firstElementClassName = this.type !== "Range" ? classNames4.limitBarDefault : classNames4.limitBarFirst;
      firstElementClassName += " " + classNames4.limits;
      this.limitBarFirst = this.createElement("div", {
        attrs: {
          class: firstElementClassName
        }
      });
      this.element.appendChild(this.limitBarFirst);
      if (this.type === "Range") {
        this.limitBarSecond = this.createElement("div", {
          attrs: {
            class: classNames4.limitBarSecond + " " + classNames4.limits
          }
        });
        this.element.appendChild(this.limitBarSecond);
      }
    };
    Slider2.prototype.setOrientClass = function() {
      if (this.orientation !== "Vertical") {
        this.sliderContainer.classList.remove(classNames4.verticalSlider);
        this.sliderContainer.classList.add(classNames4.horizontalSlider);
        this.firstHandle.setAttribute("aria-orientation", "horizontal");
        if (this.type === "Range") {
          this.secondHandle.setAttribute("aria-orientation", "horizontal");
        }
      } else {
        this.sliderContainer.classList.remove(classNames4.horizontalSlider);
        this.sliderContainer.classList.add(classNames4.verticalSlider);
        this.firstHandle.setAttribute("aria-orientation", "vertical");
        if (this.type === "Range") {
          this.secondHandle.setAttribute("aria-orientation", "vertical");
        }
      }
    };
    Slider2.prototype.setAriaAttributes = function(element2) {
      var _this = this;
      var min = this.min;
      var max = this.max;
      if (!isNullOrUndefined2(this.customValues) && this.customValues.length > 0) {
        min = this.customValues[0];
        max = this.customValues[this.customValues.length - 1];
      }
      if (this.type !== "Range") {
        attributes2(element2, {
          "aria-valuemin": isNullOrUndefined2(min) ? "0" : min.toString(),
          "aria-valuemax": isNullOrUndefined2(max) ? "100" : max.toString()
        });
      } else {
        var range = !isNullOrUndefined2(this.customValues) && this.customValues.length > 0 ? [[min.toString(), this.customValues[this.value[1]].toString()], [this.customValues[this.value[0]].toString(), max.toString()]] : [[min.toString(), this.value[1].toString()], [this.value[0].toString(), max.toString()]];
        range.forEach(function(range2, index) {
          var element3 = index === 0 ? _this.firstHandle : _this.secondHandle;
          if (element3) {
            attributes2(element3, {
              "aria-valuemin": range2[0],
              "aria-valuemax": range2[1]
            });
          }
        });
      }
    };
    Slider2.prototype.createSecondHandle = function() {
      this.secondHandle = this.createElement("div", {
        attrs: {
          class: classNames4.sliderHandle,
          "role": "slider",
          tabIndex: "0",
          "aria-label": "slider"
        }
      });
      this.secondHandle.classList.add(classNames4.sliderSecondHandle);
      this.element.appendChild(this.secondHandle);
    };
    Slider2.prototype.createFirstHandle = function() {
      this.firstHandle = this.createElement("div", {
        attrs: {
          class: classNames4.sliderHandle,
          "role": "slider",
          tabIndex: "0",
          "aria-label": "slider"
        }
      });
      this.firstHandle.classList.add(classNames4.sliderFirstHandle);
      this.element.appendChild(this.firstHandle);
      if (this.isMaterialTooltip) {
        this.materialHandle = this.createElement("div", {
          attrs: {
            class: classNames4.sliderHandle + " " + classNames4.sliderMaterialHandle
          }
        });
        this.element.appendChild(this.materialHandle);
      }
    };
    Slider2.prototype.wireFirstHandleEvt = function(destroy5) {
      if (!destroy5) {
        EventHandler2.add(this.firstHandle, "mousedown touchstart", this.handleFocus, this);
        EventHandler2.add(this.firstHandle, "transitionend", this.transitionEnd, this);
        EventHandler2.add(this.firstHandle, "mouseenter touchenter", this.handleOver, this);
        EventHandler2.add(this.firstHandle, "mouseleave touchend", this.handleLeave, this);
      } else {
        EventHandler2.remove(this.firstHandle, "mousedown touchstart", this.handleFocus);
        EventHandler2.remove(this.firstHandle, "transitionend", this.transitionEnd);
        EventHandler2.remove(this.firstHandle, "mouseenter touchenter", this.handleOver);
        EventHandler2.remove(this.firstHandle, "mouseleave touchend", this.handleLeave);
      }
    };
    Slider2.prototype.wireSecondHandleEvt = function(destroy5) {
      if (!destroy5) {
        EventHandler2.add(this.secondHandle, "mousedown touchstart", this.handleFocus, this);
        EventHandler2.add(this.secondHandle, "transitionend", this.transitionEnd, this);
        EventHandler2.add(this.secondHandle, "mouseenter touchenter", this.handleOver, this);
        EventHandler2.add(this.secondHandle, "mouseleave touchend", this.handleLeave, this);
      } else {
        EventHandler2.remove(this.secondHandle, "mousedown touchstart", this.handleFocus);
        EventHandler2.remove(this.secondHandle, "transitionend", this.transitionEnd);
        EventHandler2.remove(this.secondHandle, "mouseenter touchenter", this.handleOver);
        EventHandler2.remove(this.secondHandle, "mouseleave touchend", this.handleLeave);
      }
    };
    Slider2.prototype.handleStart = function() {
      if (this.type !== "Range") {
        this.firstHandle.classList[this.handlePos1 === 0 ? "add" : "remove"](classNames4.sliderHandleStart);
        if (this.isMaterialTooltip) {
          this.materialHandle.classList[this.handlePos1 === 0 ? "add" : "remove"](classNames4.sliderHandleStart);
          if (this.tooltipElement) {
            this.tooltipElement.classList[this.handlePos1 === 0 ? "add" : "remove"](classNames4.sliderTooltipStart);
          }
        }
      }
    };
    Slider2.prototype.transitionEnd = function(e) {
      if (e.propertyName !== "transform") {
        this.handleStart();
        if (!this.enableAnimation) {
          this.getHandle().style.transition = "none";
        }
        if (this.type !== "Default") {
          this.rangeBar.style.transition = "none";
        }
        if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === "Default") {
          this.tooltipElement.style.transition = this.transition.handle;
        }
        this.tooltipToggle(this.getHandle());
        this.closeTooltip();
      }
    };
    Slider2.prototype.handleFocusOut = function() {
      if (this.firstHandle.classList.contains(classNames4.sliderHandleFocused)) {
        this.firstHandle.classList.remove(classNames4.sliderHandleFocused);
      }
      if (this.type === "Range") {
        if (this.secondHandle.classList.contains(classNames4.sliderHandleFocused)) {
          this.secondHandle.classList.remove(classNames4.sliderHandleFocused);
        }
      }
    };
    Slider2.prototype.handleFocus = function(e) {
      this.focusSliderElement();
      this.sliderBarClick(e);
      if (e.currentTarget === this.firstHandle) {
        this.firstHandle.classList.add(classNames4.sliderHandleFocused);
        this.firstHandle.classList.add(classNames4.sliderTabHandle);
      } else {
        this.secondHandle.classList.add(classNames4.sliderHandleFocused);
        this.secondHandle.classList.add(classNames4.sliderTabHandle);
      }
      EventHandler2.add(document, "mousemove touchmove", this.sliderBarMove, this);
      EventHandler2.add(document, "mouseup touchend", this.sliderBarUp, this);
    };
    Slider2.prototype.handleOver = function(e) {
      if (this.tooltip.isVisible && this.tooltip.showOn === "Hover") {
        this.tooltipToggle(e.currentTarget);
      }
      if (this.type === "Default") {
        this.tooltipToggle(this.getHandle());
      }
    };
    Slider2.prototype.handleLeave = function(e) {
      if (this.tooltip.isVisible && this.tooltip.showOn === "Hover" && !e.currentTarget.classList.contains(classNames4.sliderHandleFocused) && !e.currentTarget.classList.contains(classNames4.sliderTabHandle)) {
        this.closeTooltip();
      }
    };
    Slider2.prototype.setHandler = function() {
      this.createFirstHandle();
      if (this.type === "Range") {
        this.createSecondHandle();
      }
    };
    Slider2.prototype.setEnableRTL = function() {
      if (this.enableRtl && this.orientation !== "Vertical") {
        addClass2([this.sliderContainer], classNames4.rtl);
      } else {
        removeClass2([this.sliderContainer], classNames4.rtl);
      }
      var preDir = this.orientation !== "Vertical" ? this.horDir : this.verDir;
      if (this.enableRtl) {
        this.horDir = "right";
        this.verDir = "bottom";
      } else {
        this.horDir = "left";
        this.verDir = "bottom";
      }
      var currDir = this.orientation !== "Vertical" ? this.horDir : this.verDir;
      if (preDir !== currDir) {
        if (this.orientation === "Horizontal") {
          setStyleAttribute2(this.firstHandle, {
            "right": "",
            "left": "auto"
          });
          if (this.type === "Range") {
            setStyleAttribute2(this.secondHandle, {
              "top": "",
              "left": "auto"
            });
          }
        }
      }
      this.setBarColor();
    };
    Slider2.prototype.tooltipValue = function() {
      var _this = this;
      var text;
      var args = {
        value: this.value,
        text: ""
      };
      if (this.initialTooltip) {
        this.initialTooltip = false;
        this.setTooltipContent();
        args.text = text = typeof this.tooltipObj.content === "function" ? this.tooltipObj.content() : this.tooltipObj.content;
        this.trigger("tooltipChange", args, function(observedArgs) {
          _this.addTooltipClass(observedArgs.text);
          if (text !== observedArgs.text) {
            _this.customAriaText = observedArgs.text;
            if (_this.enableHtmlSanitizer) {
              observedArgs.text = SanitizeHtmlHelper2.sanitize(observedArgs.text.toString());
            } else {
              observedArgs.text = observedArgs.text.toString();
            }
            var contentTemp = function() {
              return observedArgs.text;
            };
            _this.tooltipObj.content = initializeCSPTemplate(contentTemp);
            _this.setAriaAttrValue(_this.firstHandle);
            if (_this.type === "Range") {
              _this.setAriaAttrValue(_this.secondHandle);
            }
          }
        });
        if (this.isMaterialTooltip) {
          this.setPreviousVal("change", this.value);
        }
      }
    };
    Slider2.prototype.setTooltipContent = function() {
      var content = this.formatContent(this.tooltipFormatInfo, false);
      var contentTemp = function() {
        return content;
      };
      this.tooltipObj.content = initializeCSPTemplate(contentTemp);
    };
    Slider2.prototype.formatContent = function(formatInfo, ariaContent) {
      var content = "";
      var handle1 = this.handleVal1;
      var handle2 = this.handleVal2;
      if (!isNullOrUndefined2(this.customValues) && this.customValues.length > 0) {
        handle1 = this.customValues[this.handleVal1];
        handle2 = this.customValues[this.handleVal2];
      }
      if (!ariaContent) {
        if (this.type === "Range") {
          if (this.enableRtl && this.orientation !== "Vertical") {
            content = !isNullOrUndefined2(formatInfo.format) ? this.formatString(handle2, formatInfo).formatString + " - " + this.formatString(handle1, formatInfo).formatString : handle2.toString() + " - " + handle1.toString();
          } else {
            content = !isNullOrUndefined2(formatInfo.format) ? this.formatString(handle1, formatInfo).formatString + " - " + this.formatString(handle2, formatInfo).formatString : handle1.toString() + " - " + handle2.toString();
          }
        } else {
          if (!isNullOrUndefined2(handle1)) {
            content = !isNullOrUndefined2(formatInfo.format) ? this.formatString(handle1, formatInfo).formatString : handle1.toString();
          }
        }
        return content;
      } else {
        if (this.type === "Range") {
          if (this.enableRtl && this.orientation !== "Vertical") {
            content = !isNullOrUndefined2(this.tooltip) && !isNullOrUndefined2(this.tooltip.format) ? this.formatString(handle2, formatInfo).elementVal + " - " + this.formatString(handle1, formatInfo).elementVal : handle2.toString() + " - " + handle1.toString();
          } else {
            content = !isNullOrUndefined2(this.tooltip) && !isNullOrUndefined2(this.tooltip.format) ? this.formatString(handle1, formatInfo).elementVal + " - " + this.formatString(handle2, formatInfo).elementVal : handle1.toString() + " - " + handle2.toString();
          }
        } else {
          if (!isNullOrUndefined2(handle1)) {
            content = !isNullOrUndefined2(this.tooltip) && !isNullOrUndefined2(this.tooltip.format) ? this.formatString(handle1, formatInfo).elementVal : handle1.toString();
          }
        }
        return content;
      }
    };
    Slider2.prototype.addTooltipClass = function(content) {
      if (this.isMaterialTooltip) {
        var count = content.toString().length;
        if (!this.tooltipElement) {
          var cssClass2 = count > 4 ? classNames4.sliderMaterialRange : classNames4.sliderMaterialDefault;
          this.tooltipObj.cssClass = classNames4.sliderTooltip + " " + cssClass2;
        } else {
          var cssClass2 = count > 4 ? {
            oldCss: classNames4.sliderMaterialDefault,
            newCss: classNames4.sliderMaterialRange
          } : {
            oldCss: classNames4.sliderMaterialRange,
            newCss: classNames4.sliderMaterialDefault
          };
          this.tooltipElement.classList.remove(cssClass2.oldCss);
          if (!this.tooltipElement.classList.contains(cssClass2.newCss)) {
            this.tooltipElement.classList.add(cssClass2.newCss);
            this.tooltipElement.style.transform = count > 4 ? "scale(1)" : this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
          }
        }
      }
    };
    Slider2.prototype.tooltipPlacement = function() {
      return this.orientation === "Horizontal" ? this.tooltip.placement === "Before" ? "TopCenter" : "BottomCenter" : this.tooltip.placement === "Before" ? "LeftCenter" : "RightCenter";
    };
    Slider2.prototype.tooltipBeforeOpen = function(args) {
      this.tooltipElement = args.element;
      if (this.tooltip.cssClass) {
        addClass2([this.tooltipElement], this.tooltip.cssClass.split(" ").filter(function(css) {
          return css;
        }));
      }
      args.target.removeAttribute("aria-describedby");
      if (this.isMaterialTooltip) {
        this.tooltipElement.firstElementChild.classList.add(classNames4.materialTooltipHide);
        this.handleStart();
        this.setTooltipTransform();
      }
    };
    Slider2.prototype.tooltipCollision = function(position) {
      if (this.isBootstrap || this.isBootstrap4 || (this.isMaterial || this.isMaterial3) && !this.isMaterialTooltip) {
        var tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;
        switch (position) {
          case "TopCenter":
            this.tooltipObj.setProperties({
              "offsetY": -tooltipOffsetValue
            }, false);
            break;
          case "BottomCenter":
            this.tooltipObj.setProperties({
              "offsetY": tooltipOffsetValue
            }, false);
            break;
          case "LeftCenter":
            this.tooltipObj.setProperties({
              "offsetX": -tooltipOffsetValue
            }, false);
            break;
          case "RightCenter":
            this.tooltipObj.setProperties({
              "offsetX": tooltipOffsetValue
            }, false);
            break;
        }
      }
    };
    Slider2.prototype.materialTooltipEventCallBack = function(event2) {
      this.sliderBarClick(event2);
      EventHandler2.add(document, "mousemove touchmove", this.sliderBarMove, this);
      EventHandler2.add(document, "mouseup touchend", this.sliderBarUp, this);
    };
    Slider2.prototype.wireMaterialTooltipEvent = function(destroy5) {
      if (this.isMaterialTooltip) {
        if (!destroy5) {
          EventHandler2.add(this.tooltipElement, "mousedown touchstart", this.materialTooltipEventCallBack, this);
        } else {
          EventHandler2.remove(this.tooltipElement, "mousedown touchstart", this.materialTooltipEventCallBack);
        }
      }
    };
    Slider2.prototype.tooltipPositionCalculation = function(position) {
      var cssClass2;
      switch (position) {
        case "TopCenter":
          cssClass2 = classNames4.horizontalTooltipBefore;
          break;
        case "BottomCenter":
          cssClass2 = classNames4.horizontalTooltipAfter;
          break;
        case "LeftCenter":
          cssClass2 = classNames4.verticalTooltipBefore;
          break;
        case "RightCenter":
          cssClass2 = classNames4.verticalTooltipAfter;
          break;
      }
      return cssClass2;
    };
    Slider2.prototype.getTooltipTransformProperties = function(className) {
      var transformProperties;
      if (this.tooltipElement) {
        var position = this.orientation === "Horizontal" ? this.tooltipElement.clientHeight + 14 - this.tooltipElement.clientHeight / 2 : this.tooltipElement.clientWidth + 14 - this.tooltipElement.clientWidth / 2;
        transformProperties = this.orientation === "Horizontal" ? className === classNames4.horizontalTooltipBefore ? {
          rotate: "rotate(45deg)",
          translate: "translateY(" + position + "px)"
        } : {
          rotate: "rotate(225deg)",
          translate: "translateY(" + -position + "px)"
        } : className === classNames4.verticalTooltipBefore ? {
          rotate: "rotate(-45deg)",
          translate: "translateX(" + position + "px)"
        } : {
          rotate: "rotate(-225deg)",
          translate: "translateX(" + -position + "px)"
        };
      }
      return transformProperties;
    };
    Slider2.prototype.openMaterialTooltip = function() {
      var _this = this;
      if (this.isMaterialTooltip) {
        this.refreshTooltip(this.firstHandle);
        var tooltipContentElement = this.tooltipElement.firstElementChild;
        tooltipContentElement.classList.remove(classNames4.materialTooltipHide);
        tooltipContentElement.classList.add(classNames4.materialTooltipShow);
        this.firstHandle.style.cursor = "default";
        this.tooltipElement.style.transition = this.scaleTransform;
        this.tooltipElement.classList.add(classNames4.materialTooltipOpen);
        this.materialHandle.style.transform = "scale(0)";
        if (tooltipContentElement.innerText.length > 4) {
          this.tooltipElement.style.transform = "scale(1)";
        } else {
          this.tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
        }
        if (this.type === "Default") {
          setTimeout(function() {
            if (_this.tooltipElement) {
              _this.tooltipElement.style.transition = _this.transition.handle;
            }
          }, 2500);
        } else {
          setTimeout(function() {
            if (_this.tooltipElement) {
              _this.tooltipElement.style.transition = "none";
            }
          }, 2500);
        }
      }
    };
    Slider2.prototype.closeMaterialTooltip = function() {
      var _this = this;
      if (this.isMaterialTooltip) {
        var tooltipContentElement = this.tooltipElement.firstElementChild;
        this.tooltipElement.style.transition = this.scaleTransform;
        tooltipContentElement.classList.remove(classNames4.materialTooltipShow);
        tooltipContentElement.classList.add(classNames4.materialTooltipHide);
        this.firstHandle.style.cursor = "-webkit-grab";
        this.firstHandle.style.cursor = "grab";
        if (this.materialHandle) {
          this.materialHandle.style.transform = "scale(1)";
        }
        this.tooltipElement.classList.remove(classNames4.materialTooltipOpen);
        this.setTooltipTransform();
        this.tooltipTarget = void 0;
        setTimeout(function() {
          if (_this.tooltipElement) {
            _this.tooltipElement.style.transition = "none";
          }
        }, 2500);
      }
    };
    Slider2.prototype.checkTooltipPosition = function(args) {
      var tooltipClass = this.tooltipPositionCalculation(args.collidedPosition);
      if (this.tooltipCollidedPosition === void 0 || this.tooltipCollidedPosition !== args.collidedPosition || !args.element.classList.contains(tooltipClass)) {
        if (this.isMaterialTooltip) {
          if (tooltipClass !== void 0) {
            args.element.classList.remove(this.previousTooltipClass);
            args.element.classList.add(tooltipClass);
            this.previousTooltipClass = tooltipClass;
          }
          if (args.element.style.transform && args.element.classList.contains(classNames4.materialTooltipOpen) && args.element.firstElementChild.innerText.length <= 4) {
            args.element.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
          }
        }
        this.tooltipCollidedPosition = args.collidedPosition;
      }
      if (this.isMaterialTooltip && this.tooltipElement && this.tooltipElement.style.transform.indexOf("translate") !== -1) {
        this.setTooltipTransform();
      }
    };
    Slider2.prototype.setTooltipTransform = function() {
      var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
      if (isNullOrUndefined2(this.tooltipElement)) {
        return;
      }
      if (this.tooltipElement.firstElementChild.innerText.length > 4) {
        this.tooltipElement.style.transform = transformProperties.translate + " scale(0.01)";
      } else {
        this.tooltipElement.style.transform = transformProperties.translate + " " + transformProperties.rotate + " scale(0.01)";
      }
    };
    Slider2.prototype.renderTooltip = function() {
      this.tooltipObj = new Tooltip({
        showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind || this.isTailwind3 || this.isBootstrap5 || this.isFluent || this.isFluent2 || this.isBootstrap5Dot3,
        cssClass: classNames4.sliderTooltip,
        height: this.isMaterial || this.isMaterial3 ? 30 : "auto",
        animation: {
          open: {
            effect: "None"
          },
          close: {
            effect: "FadeOut",
            duration: 500
          }
        },
        opensOn: "Custom",
        beforeOpen: this.tooltipBeforeOpen.bind(this),
        beforeCollision: this.checkTooltipPosition.bind(this),
        beforeClose: this.tooltipBeforeClose.bind(this),
        enableHtmlSanitizer: this.enableHtmlSanitizer
      });
      this.tooltipObj.appendTo(this.firstHandle);
      this.initializeTooltipProps();
    };
    Slider2.prototype.initializeTooltipProps = function() {
      var tooltipShowOn = this.tooltip.showOn === "Auto" ? "Hover" : this.tooltip.showOn;
      this.setProperties({
        tooltip: {
          showOn: tooltipShowOn
        }
      }, true);
      this.tooltipObj.position = this.tooltipPlacement();
      this.tooltipCollision(this.tooltipObj.position);
      [this.firstHandle, this.rangeBar, this.secondHandle].forEach(function(handle) {
        if (!isNullOrUndefined2(handle)) {
          handle.style.transition = "none";
        }
      });
      if (this.isMaterialTooltip) {
        this.sliderContainer.classList.add(classNames4.materialSlider);
        this.tooltipValue();
        this.tooltipObj.animation.close.effect = "None";
        this.tooltipObj.open(this.firstHandle);
      }
    };
    Slider2.prototype.tooltipBeforeClose = function() {
      this.tooltipElement = void 0;
      this.tooltipCollidedPosition = void 0;
    };
    Slider2.prototype.setButtons = function() {
      this.firstBtn = this.createElement("div", {
        className: classNames4.sliderButton + " " + classNames4.firstButton
      });
      this.firstBtn.appendChild(this.createElement("span", {
        className: classNames4.sliderButtonIcon
      }));
      if (this.isTailwind || this.isTailwind3) {
        this.firstBtn.querySelector("span").classList.add("e-icons");
      }
      this.firstBtn.tabIndex = -1;
      this.secondBtn = this.createElement("div", {
        className: classNames4.sliderButton + " " + classNames4.secondButton
      });
      this.secondBtn.appendChild(this.createElement("span", {
        className: classNames4.sliderButtonIcon
      }));
      if (this.isTailwind || this.isTailwind3) {
        this.secondBtn.querySelector("span").classList.add("e-icons");
      }
      this.secondBtn.tabIndex = -1;
      this.sliderContainer.classList.add(classNames4.sliderButtonClass);
      this.sliderContainer.appendChild(this.firstBtn);
      this.sliderContainer.appendChild(this.secondBtn);
      this.sliderContainer.appendChild(this.element);
      this.buttonTitle();
    };
    Slider2.prototype.buttonTitle = function() {
      var enabledRTL = this.enableRtl && this.orientation !== "Vertical";
      this.l10n.setLocale(this.locale);
      var decrementTitle = this.l10n.getConstant("decrementTitle");
      var incrementTitle = this.l10n.getConstant("incrementTitle");
      attributes2(enabledRTL ? this.secondBtn : this.firstBtn, {
        "aria-label": decrementTitle,
        title: decrementTitle
      });
      attributes2(enabledRTL ? this.firstBtn : this.secondBtn, {
        "aria-label": incrementTitle,
        title: incrementTitle
      });
    };
    Slider2.prototype.buttonFocusOut = function() {
      if (this.isMaterial || this.isMaterial3) {
        this.getHandle().classList.remove("e-large-thumb-size");
      }
    };
    Slider2.prototype.repeatButton = function(args) {
      var hVal = this.handleValueUpdate();
      var enabledRTL = this.enableRtl && this.orientation !== "Vertical";
      var value;
      if (args.target.parentElement.classList.contains(classNames4.firstButton) || args.target.classList.contains(classNames4.firstButton)) {
        if (enabledRTL) {
          value = this.add(hVal, parseFloat(this.step.toString()), true);
        } else {
          value = this.add(hVal, parseFloat(this.step.toString()), false);
        }
      } else if (args.target.parentElement.classList.contains(classNames4.secondButton) || args.target.classList.contains(classNames4.secondButton)) {
        if (enabledRTL) {
          value = this.add(hVal, parseFloat(this.step.toString()), false);
        } else {
          value = this.add(hVal, parseFloat(this.step.toString()), true);
        }
      }
      if (this.limits.enabled) {
        value = this.getLimitCorrectedValues(value);
      }
      if (value >= this.min && value <= this.max) {
        this.changeHandleValue(value);
        this.tooltipToggle(this.getHandle());
      }
    };
    Slider2.prototype.repeatHandlerMouse = function(args) {
      args.preventDefault();
      if (args.type === "mousedown" || args.type === "touchstart") {
        this.buttonClick(args);
        this.repeatInterval = setInterval(this.repeatButton.bind(this), 180, args);
      }
    };
    Slider2.prototype.materialChange = function() {
      if (!this.getHandle().classList.contains("e-large-thumb-size")) {
        this.getHandle().classList.add("e-large-thumb-size");
      }
    };
    Slider2.prototype.focusHandle = function() {
      if (!this.getHandle().classList.contains(classNames4.sliderTabHandle)) {
        this.getHandle().classList.add(classNames4.sliderTabHandle);
      }
    };
    Slider2.prototype.repeatHandlerUp = function(e) {
      this.changeEvent("changed", e);
      this.closeTooltip();
      clearInterval(this.repeatInterval);
      this.getHandle().focus();
    };
    Slider2.prototype.customTickCounter = function(bigNum) {
      var tickCount = 4;
      if (!isNullOrUndefined2(this.customValues) && this.customValues.length > 0) {
        if (bigNum > 4) {
          tickCount = 3;
        }
        if (bigNum > 7) {
          tickCount = 2;
        }
        if (bigNum > 14) {
          tickCount = 1;
        }
        if (bigNum > 28) {
          tickCount = 0;
        }
      }
      return tickCount;
    };
    Slider2.prototype.renderScale = function() {
      var orien = this.orientation === "Vertical" ? "v" : "h";
      this.noOfDecimals = this.numberOfDecimals(this.step);
      this.ul = this.createElement("ul", {
        className: classNames4.scale + " e-" + orien + "-scale " + classNames4.tick + "-" + this.ticks.placement.toLowerCase(),
        attrs: {
          role: "presentation",
          "aria-hidden": "true"
        }
      });
      this.ul.style.zIndex = "-1";
      if (Browser2.isAndroid && orien === "h") {
        this.ul.classList.add(classNames4.sliderTickPosition);
      }
      var smallStep = this.ticks.smallStep;
      if (!this.ticks.showSmallTicks) {
        if (this.ticks.largeStep > 0) {
          smallStep = this.ticks.largeStep;
        } else {
          smallStep = parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min));
        }
      } else if (smallStep <= 0) {
        smallStep = parseFloat(formatUnit(this.step));
      }
      var min = this.fractionalToInteger(this.min);
      var max = this.fractionalToInteger(this.max);
      var steps = this.fractionalToInteger(smallStep);
      var bigNum = !isNullOrUndefined2(this.customValues) && this.customValues.length > 0 && this.customValues.length - 1;
      var customStep = this.customTickCounter(bigNum);
      var count = !isNullOrUndefined2(this.customValues) && this.customValues.length > 0 ? bigNum * customStep + bigNum : Math.abs((max - min) / steps);
      this.element.appendChild(this.ul);
      var li;
      var start = parseFloat(this.min.toString());
      if (orien === "v") {
        start = parseFloat(this.max.toString());
      }
      var left = 0;
      var islargeTick;
      var tickWidth = 100 / count;
      if (tickWidth === Infinity) {
        tickWidth = 5;
      }
      for (var i = 0, y = !isNullOrUndefined2(this.customValues) && this.customValues.length > 0 ? this.customValues.length - 1 : 0, k = 0; i <= count; i++) {
        li = this.createElement("li", {
          attrs: {
            class: classNames4.tick,
            role: "presentation",
            "aria-hidden": "true"
          }
        });
        if (!isNullOrUndefined2(this.customValues) && this.customValues.length > 0) {
          islargeTick = i % (customStep + 1) === 0;
          if (islargeTick) {
            if (orien === "h") {
              start = this.customValues[k];
              k++;
            } else {
              start = this.customValues[y];
              y--;
            }
            li.setAttribute("title", start.toString());
          }
        } else {
          li.setAttribute("title", start.toString());
          if (this.numberOfDecimals(this.max) === 0 && this.numberOfDecimals(this.min) === 0 && this.numberOfDecimals(this.step) === 0) {
            if (orien === "h") {
              islargeTick = (start - parseFloat(this.min.toString())) % this.ticks.largeStep === 0 ? true : false;
            } else {
              islargeTick = Math.abs(start - parseFloat(this.max.toString())) % this.ticks.largeStep === 0 ? true : false;
            }
          } else {
            var largestep = this.fractionalToInteger(this.ticks.largeStep);
            var startValue = this.fractionalToInteger(start);
            if (orien === "h") {
              islargeTick = (startValue - min) % largestep === 0 ? true : false;
            } else {
              islargeTick = Math.abs(startValue - parseFloat(max.toString())) % largestep === 0 ? true : false;
            }
          }
        }
        if (islargeTick) {
          li.classList.add(classNames4.large);
        }
        if (orien === "h") {
          li.style.width = tickWidth + "%";
        } else {
          li.style.height = tickWidth + "%";
        }
        var repeat = islargeTick ? this.ticks.placement === "Both" ? 2 : 1 : 0;
        if (islargeTick) {
          for (var j = 0; j < repeat; j++) {
            this.createTick(li, start);
          }
        } else if (isNullOrUndefined2(this.customValues)) {
          this.formatTicksValue(li, start);
        }
        this.ul.appendChild(li);
        this.tickElementCollection.push(li);
        var decimalPoints = void 0;
        if (isNullOrUndefined2(this.customValues)) {
          if (this.numberOfDecimals(smallStep) > this.numberOfDecimals(start)) {
            decimalPoints = this.numberOfDecimals(smallStep);
          } else {
            decimalPoints = this.numberOfDecimals(start);
          }
          if (orien === "h") {
            start = this.makeRoundNumber(start + smallStep, decimalPoints);
          } else {
            if (this.min > this.max) {
              start = this.makeRoundNumber(start + smallStep, decimalPoints);
            } else {
              start = this.makeRoundNumber(start - smallStep, decimalPoints);
            }
          }
          left = this.makeRoundNumber(left + smallStep, decimalPoints);
        }
      }
      this.ticksAlignment(orien, tickWidth);
    };
    Slider2.prototype.ticksAlignment = function(orien, tickWidth, triggerEvent) {
      if (triggerEvent === void 0) {
        triggerEvent = true;
      }
      this.firstChild = this.ul.firstElementChild;
      this.lastChild = this.ul.lastElementChild;
      this.firstChild.classList.add(classNames4.sliderFirstTick);
      this.lastChild.classList.add(classNames4.sliderLastTick);
      this.sliderContainer.classList.add(classNames4.scale + "-" + this.ticks.placement.toLowerCase());
      if (orien === "h") {
        this.firstChild.style.width = tickWidth / 2 + "%";
        this.lastChild.style.width = tickWidth / 2 + "%";
      } else {
        this.firstChild.style.height = tickWidth / 2 + "%";
        this.lastChild.style.height = tickWidth / 2 + "%";
      }
      var eventArgs = {
        ticksWrapper: this.ul,
        tickElements: this.tickElementCollection
      };
      if (triggerEvent) {
        this.trigger("renderedTicks", eventArgs);
      }
      this.scaleAlignment();
    };
    Slider2.prototype.createTick = function(li, start) {
      var span = this.createElement("span", {
        className: classNames4.tickValue + " " + classNames4.tick + "-" + this.ticks.placement.toLowerCase(),
        attrs: {
          role: "presentation",
          "aria-hidden": "true"
        }
      });
      li.appendChild(span);
      if (isNullOrUndefined2(this.customValues)) {
        this.formatTicksValue(li, start, span);
      } else {
        if (this.enableHtmlSanitizer) {
          span.innerHTML = SanitizeHtmlHelper2.sanitize(start.toString());
        } else {
          span.innerHTML = start.toString();
        }
      }
    };
    Slider2.prototype.formatTicksValue = function(li, start, spanElement) {
      var _this = this;
      var tickText = this.formatNumber(start);
      var text = !isNullOrUndefined2(this.ticks) && !isNullOrUndefined2(this.ticks.format) ? this.formatString(start, this.ticksFormatInfo).formatString : tickText;
      var eventArgs = {
        value: start,
        text,
        tickElement: li
      };
      this.trigger("renderingTicks", eventArgs, function(observedArgs) {
        li.setAttribute("title", observedArgs.text.toString());
        if (spanElement) {
          if (_this.enableHtmlSanitizer) {
            spanElement.innerHTML = SanitizeHtmlHelper2.sanitize(observedArgs.text.toString());
          } else {
            spanElement.innerHTML = observedArgs.text.toString();
          }
        }
      });
    };
    Slider2.prototype.scaleAlignment = function() {
      this.tickValuePosition();
      if (this.orientation === "Vertical") {
        if (this.element.getBoundingClientRect().width <= 15) {
          this.sliderContainer.classList.add(classNames4.sliderSmallSize);
        } else {
          this.sliderContainer.classList.remove(classNames4.sliderSmallSize);
        }
      } else {
        if (this.element.getBoundingClientRect().height <= 15) {
          this.sliderContainer.classList.add(classNames4.sliderSmallSize);
        } else {
          this.sliderContainer.classList.remove(classNames4.sliderSmallSize);
        }
      }
    };
    Slider2.prototype.tickValuePosition = function() {
      this.firstChild = this.element.querySelector("ul").children[0];
      var first = this.firstChild.getBoundingClientRect();
      var firstChild;
      var otherChild;
      var smallStep = this.ticks.smallStep;
      var count = Math.abs(parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))) / smallStep;
      if (this.firstChild.children.length > 0) {
        firstChild = this.firstChild.children[0].getBoundingClientRect();
      }
      var tickElements = [this.sliderContainer.querySelectorAll("." + classNames4.tick + "." + classNames4.large + " ." + classNames4.tickValue)];
      var other;
      if (this.ticks.placement === "Both") {
        other = [].slice.call(tickElements[0], 2);
      } else {
        other = [].slice.call(tickElements[0], 1);
      }
      var tickWidth = this.orientation === "Vertical" ? first.height * 2 : first.width * 2;
      for (var i = 0; i < this.firstChild.children.length; i++) {
        if (this.orientation === "Vertical") {
          this.firstChild.children[i].style.top = -(firstChild.height / 2) + "px";
        } else {
          if (!this.enableRtl) {
            this.firstChild.children[i].style.left = -(firstChild.width / 2) + "px";
          } else {
            this.firstChild.children[i].style.left = (tickWidth - this.firstChild.children[i].getBoundingClientRect().width) / 2 + "px";
          }
        }
      }
      for (var i = 0; i < other.length; i++) {
        otherChild = other[i].getBoundingClientRect();
        if (this.orientation === "Vertical") {
          setStyleAttribute2(other[i], {
            top: (tickWidth - otherChild.height) / 2 + "px"
          });
        } else {
          setStyleAttribute2(other[i], {
            left: (tickWidth - otherChild.width) / 2 + "px"
          });
        }
      }
      if (this.enableRtl && this.lastChild.children.length && count !== 0) {
        this.lastChild.children[0].style.left = -(this.lastChild.getBoundingClientRect().width / 2) + "px";
        if (this.ticks.placement === "Both") {
          this.lastChild.children[1].style.left = -(this.lastChild.getBoundingClientRect().width / 2) + "px";
        }
      }
      if (count === 0) {
        if (this.orientation === "Horizontal") {
          if (!this.enableRtl) {
            this.firstChild.classList.remove(classNames4.sliderLastTick);
            this.firstChild.style.left = this.firstHandle.style.left;
          } else {
            this.firstChild.classList.remove(classNames4.sliderLastTick);
            this.firstChild.style.right = this.firstHandle.style.right;
            this.firstChild.children[0].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + "px";
            if (this.ticks.placement === "Both") {
              this.firstChild.children[1].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + "px";
            }
          }
        }
        if (this.orientation === "Vertical") {
          this.firstChild.classList.remove(classNames4.sliderLastTick);
        }
      }
    };
    Slider2.prototype.setAriaAttrValue = function(element2) {
      var ariaValueText;
      var isTickFormatted = !isNullOrUndefined2(this.ticks) && !isNullOrUndefined2(this.ticks.format) ? true : false;
      var text = !isTickFormatted ? this.formatContent(this.ticksFormatInfo, false) : this.formatContent(this.tooltipFormatInfo, false);
      var valuenow = isTickFormatted ? this.formatContent(this.ticksFormatInfo, true) : this.formatContent(this.tooltipFormatInfo, true);
      text = !this.customAriaText ? text : this.customAriaText;
      if (text.split(" - ").length === 2) {
        ariaValueText = text.split(" - ");
      } else {
        ariaValueText = [text, text];
      }
      this.setAriaAttributes(element2);
      if (this.type !== "Range") {
        attributes2(element2, {
          "aria-valuenow": valuenow,
          "aria-valuetext": text
        });
      } else {
        if (!this.enableRtl) {
          if (element2 === this.firstHandle) {
            attributes2(element2, {
              "aria-valuenow": valuenow.split(" - ")[0],
              "aria-valuetext": ariaValueText[0]
            });
          } else {
            attributes2(element2, {
              "aria-valuenow": valuenow.split(" - ")[1],
              "aria-valuetext": ariaValueText[1]
            });
          }
        } else {
          if (element2 === this.firstHandle) {
            attributes2(element2, {
              "aria-valuenow": valuenow.split(" - ")[1],
              "aria-valuetext": ariaValueText[1]
            });
          } else {
            attributes2(element2, {
              "aria-valuenow": valuenow.split(" - ")[0],
              "aria-valuetext": ariaValueText[0]
            });
          }
        }
      }
    };
    Slider2.prototype.handleValueUpdate = function() {
      var hVal;
      if (this.type === "Range") {
        if (this.activeHandle === 1) {
          hVal = this.handleVal1;
        } else {
          hVal = this.handleVal2;
        }
      } else {
        hVal = this.handleVal1;
      }
      return hVal;
    };
    Slider2.prototype.getLimitCorrectedValues = function(value) {
      if (this.type === "MinRange" || this.type === "Default") {
        value = this.getLimitValueAndPosition(value, this.limits.minStart, this.limits.minEnd)[0];
      } else {
        if (this.activeHandle === 1) {
          value = this.getLimitValueAndPosition(value, this.limits.minStart, this.limits.minEnd)[0];
        } else {
          value = this.getLimitValueAndPosition(value, this.limits.maxStart, this.limits.maxEnd)[0];
        }
      }
      return value;
    };
    Slider2.prototype.focusSliderElement = function() {
      if (!this.isElementFocused) {
        this.element.focus();
        this.isElementFocused = true;
      }
    };
    Slider2.prototype.buttonClick = function(args) {
      this.focusSliderElement();
      var value;
      var enabledRTL = this.enableRtl && this.orientation !== "Vertical";
      var hVal = this.handleValueUpdate();
      if (args.keyCode === 40 || args.keyCode === 37 || args.currentTarget.classList.contains(classNames4.firstButton)) {
        if (enabledRTL) {
          value = this.add(hVal, parseFloat(this.step.toString()), true);
        } else {
          value = this.add(hVal, parseFloat(this.step.toString()), false);
        }
      } else if (args.keyCode === 38 || args.keyCode === 39 || args.currentTarget.classList.contains(classNames4.secondButton)) {
        if (enabledRTL) {
          value = this.add(hVal, parseFloat(this.step.toString()), false);
        } else {
          value = this.add(hVal, parseFloat(this.step.toString()), true);
        }
      } else if (args.keyCode === 33 || args.currentTarget.classList.contains(classNames4.firstButton)) {
        if (enabledRTL) {
          value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false);
        } else {
          value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), true);
        }
      } else if (args.keyCode === 34 || args.currentTarget.classList.contains(classNames4.secondButton)) {
        if (enabledRTL) {
          value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), true);
        } else {
          value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false);
        }
      } else if (args.keyCode === 36) {
        value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
      } else if (args.keyCode === 35) {
        value = parseFloat(this.min < this.max ? this.max.toString() : this.min.toString());
      }
      if (this.limits.enabled) {
        value = this.getLimitCorrectedValues(value);
      }
      this.changeHandleValue(value);
      if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible && !this.getHandle().classList.contains(classNames4.sliderTabHandle)) {
        this.materialChange();
      }
      this.tooltipToggle(this.getHandle());
      this.getHandle().focus();
      this.focusHandle();
      if (args.currentTarget.classList.contains(classNames4.firstButton)) {
        EventHandler2.add(this.firstBtn, "mouseup touchend", this.buttonUp, this);
      }
      if (args.currentTarget.classList.contains(classNames4.secondButton)) {
        EventHandler2.add(this.secondBtn, "mouseup touchend", this.buttonUp, this);
      }
    };
    Slider2.prototype.tooltipToggle = function(target) {
      if (this.isMaterialTooltip) {
        if (!this.tooltipElement.classList.contains(classNames4.materialTooltipOpen)) {
          this.openMaterialTooltip();
        } else {
          this.refreshTooltip(this.firstHandle);
        }
      } else {
        if (!this.tooltipElement) {
          this.openTooltip(target);
        } else {
          this.refreshTooltip(target);
        }
      }
    };
    Slider2.prototype.buttonUp = function(args) {
      if (args.currentTarget.classList.contains(classNames4.firstButton)) {
        EventHandler2.remove(this.firstBtn, "mouseup touchend", this.buttonUp);
      }
      if (args.currentTarget.classList.contains(classNames4.secondButton)) {
        EventHandler2.remove(this.secondBtn, "mouseup touchend", this.buttonUp);
      }
    };
    Slider2.prototype.setRangeBar = function() {
      if (this.orientation === "Horizontal" && !isNullOrUndefined2(this.rangeBar)) {
        if (this.type === "MinRange") {
          if (this.enableRtl) {
            this.rangeBar.style.right = "0px";
          } else {
            this.rangeBar.style.left = "0px";
          }
          setStyleAttribute2(this.rangeBar, {
            "width": isNullOrUndefined2(this.handlePos1) ? 0 : this.handlePos1 + "px"
          });
        } else {
          if (this.enableRtl) {
            this.rangeBar.style.right = this.handlePos1 + "px";
          } else {
            this.rangeBar.style.left = this.handlePos1 + "px";
          }
          setStyleAttribute2(this.rangeBar, {
            "width": this.handlePos2 - this.handlePos1 + "px"
          });
        }
      } else if (!isNullOrUndefined2(this.rangeBar)) {
        if (this.type === "MinRange") {
          this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + "px" : "0px";
          setStyleAttribute2(this.rangeBar, {
            "height": isNullOrUndefined2(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + "px" : this.handlePos1 + "px"
          });
        } else {
          this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + "px" : this.handlePos1 + "px";
          setStyleAttribute2(this.rangeBar, {
            "height": this.min > this.max ? this.handlePos1 - this.handlePos2 + "px" : this.handlePos2 - this.handlePos1 + "px"
          });
        }
      }
    };
    Slider2.prototype.checkValidValueAndPos = function(value) {
      value = this.checkHandleValue(value);
      value = this.checkHandlePosition(value);
      return value;
    };
    Slider2.prototype.setLimitBarPositions = function(fromMinPostion, fromMaxpostion, toMinPostion, toMaxpostion) {
      if (this.orientation === "Horizontal") {
        if (!this.enableRtl) {
          this.limitBarFirst.style.left = fromMinPostion + "px";
          this.limitBarFirst.style.width = fromMaxpostion - fromMinPostion + "px";
        } else {
          this.limitBarFirst.style.right = fromMinPostion + "px";
          this.limitBarFirst.style.width = fromMaxpostion - fromMinPostion + "px";
        }
      } else {
        this.limitBarFirst.style.bottom = (this.min < this.max ? fromMinPostion : fromMaxpostion) + "px";
        this.limitBarFirst.style.height = (this.min < this.max ? fromMaxpostion - fromMinPostion : fromMinPostion - fromMaxpostion) + "px";
      }
      if (this.type === "Range") {
        if (this.orientation === "Horizontal") {
          if (!this.enableRtl) {
            this.limitBarSecond.style.left = toMinPostion + "px";
            this.limitBarSecond.style.width = toMaxpostion - toMinPostion + "px";
          } else {
            this.limitBarSecond.style.right = toMinPostion + "px";
            this.limitBarSecond.style.width = toMaxpostion - toMinPostion + "px";
          }
        } else {
          this.limitBarSecond.style.bottom = (this.min < this.max ? toMinPostion : toMaxpostion) + "px";
          this.limitBarSecond.style.height = (this.min < this.max ? toMaxpostion - toMinPostion : toMinPostion - toMaxpostion) + "px";
        }
      }
    };
    Slider2.prototype.setLimitBar = function() {
      if (this.type === "Default" || this.type === "MinRange") {
        var fromPosition = this.getLimitValueAndPosition(this.limits.minStart, this.limits.minStart, this.limits.minEnd, true)[0];
        fromPosition = this.checkValidValueAndPos(fromPosition);
        var toPosition = this.getLimitValueAndPosition(this.limits.minEnd, this.limits.minStart, this.limits.minEnd, true)[0];
        toPosition = this.checkValidValueAndPos(toPosition);
        this.setLimitBarPositions(fromPosition, toPosition);
      } else if (this.type === "Range") {
        var fromMinPostion = this.getLimitValueAndPosition(this.limits.minStart, this.limits.minStart, this.limits.minEnd, true)[0];
        fromMinPostion = this.checkValidValueAndPos(fromMinPostion);
        var fromMaxpostion = this.getLimitValueAndPosition(this.limits.minEnd, this.limits.minStart, this.limits.minEnd, true)[0];
        fromMaxpostion = this.checkValidValueAndPos(fromMaxpostion);
        var toMinPostion = this.getLimitValueAndPosition(this.limits.maxStart, this.limits.maxStart, this.limits.maxEnd, true)[0];
        toMinPostion = this.checkValidValueAndPos(toMinPostion);
        var toMaxpostion = this.getLimitValueAndPosition(this.limits.maxEnd, this.limits.maxStart, this.limits.maxEnd, true)[0];
        toMaxpostion = this.checkValidValueAndPos(toMaxpostion);
        this.setLimitBarPositions(fromMinPostion, fromMaxpostion, toMinPostion, toMaxpostion);
      }
    };
    Slider2.prototype.getLimitValueAndPosition = function(currentValue, minValue, maxValue, limitBar) {
      if (isNullOrUndefined2(minValue)) {
        minValue = this.min < this.max ? this.min : this.max;
        if (isNullOrUndefined2(currentValue) && limitBar) {
          currentValue = minValue;
        }
      }
      if (isNullOrUndefined2(maxValue)) {
        maxValue = this.min < this.max ? this.max : this.min;
        if (isNullOrUndefined2(currentValue) && limitBar) {
          currentValue = maxValue;
        }
      }
      if (currentValue < minValue) {
        currentValue = minValue;
      }
      if (currentValue > maxValue) {
        currentValue = maxValue;
      }
      return [currentValue, this.checkHandlePosition(currentValue)];
    };
    Slider2.prototype.setValue = function() {
      if (!isNullOrUndefined2(this.customValues) && this.customValues.length > 0) {
        this.min = 0;
        this.max = this.customValues.length - 1;
        this.setBarColor();
      }
      this.setAriaAttributes(this.firstHandle);
      this.handleVal1 = isNullOrUndefined2(this.value) ? this.checkHandleValue(parseFloat(this.min.toString())) : this.checkHandleValue(parseFloat(this.value.toString()));
      this.handlePos1 = this.checkHandlePosition(this.handleVal1);
      this.preHandlePos1 = this.handlePos1;
      if (isNullOrUndefined2(this.activeHandle)) {
        this.activeHandle = this.type === "Range" ? 2 : 1;
      }
      if (this.type === "Default" || this.type === "MinRange") {
        if (this.limits.enabled) {
          var values = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
          this.handleVal1 = values[0];
          this.handlePos1 = values[1];
          this.preHandlePos1 = this.handlePos1;
        }
        this.setHandlePosition(null);
        this.handleStart();
        this.value = this.handleVal1;
        this.setAriaAttrValue(this.firstHandle);
        this.changeEvent("changed", null);
      } else {
        this.validateRangeValue();
      }
      if (this.type !== "Default") {
        this.setRangeBar();
      }
      if (this.limits.enabled) {
        this.setLimitBar();
      }
    };
    Slider2.prototype.rangeValueUpdate = function() {
      if (this.value === null || typeof this.value !== "object") {
        this.value = [parseFloat(formatUnit(this.min)), parseFloat(formatUnit(this.max))];
      }
    };
    Slider2.prototype.validateRangeValue = function() {
      this.rangeValueUpdate();
      this.setRangeValue();
    };
    Slider2.prototype.modifyZindex = function() {
      if (this.type === "Range" && !isNullOrUndefined2(this.firstHandle) && !isNullOrUndefined2(this.secondHandle)) {
        if (this.activeHandle === 1) {
          this.firstHandle.style.zIndex = this.zIndex + 4 + "";
          this.secondHandle.style.zIndex = this.zIndex + 3 + "";
        } else {
          this.firstHandle.style.zIndex = this.zIndex + 3 + "";
          this.secondHandle.style.zIndex = this.zIndex + 4 + "";
        }
      } else if (this.isMaterialTooltip && this.tooltipElement) {
        this.tooltipElement.style.zIndex = getZindexPartial(this.element) + "";
      }
    };
    Slider2.prototype.setHandlePosition = function(event2) {
      var _this = this;
      var handle;
      var pos = this.activeHandle === 1 ? this.handlePos1 : this.handlePos2;
      if (this.isMaterialTooltip) {
        handle = [this.firstHandle, this.materialHandle];
      } else {
        handle = [this.getHandle()];
      }
      this.handleStart();
      handle.forEach(function(handle2) {
        if (isNullOrUndefined2(handle2)) {
          return;
        }
        if (_this.orientation === "Horizontal") {
          if (_this.enableRtl) {
            handle2.style.right = pos + "px";
          } else {
            handle2.style.left = pos + "px";
          }
        } else {
          handle2.style.bottom = pos + "px";
        }
      });
      this.changeEvent("change", event2);
    };
    Slider2.prototype.getHandle = function() {
      return this.activeHandle === 1 ? this.firstHandle : this.secondHandle;
    };
    Slider2.prototype.setRangeValue = function() {
      this.updateRangeValue();
      this.activeHandle = 1;
      this.setHandlePosition(null);
      this.activeHandle = 2;
      this.setHandlePosition(null);
      this.activeHandle = 1;
    };
    Slider2.prototype.changeEvent = function(eventName, e) {
      var previous = eventName === "change" ? this.previousVal : this.previousChanged;
      if (this.type !== "Range") {
        this.setProperties({
          "value": this.handleVal1
        }, true);
        if (previous !== this.value && (!this.isMaterialTooltip || !this.initialTooltip)) {
          this.trigger(eventName, this.changeEventArgs(eventName, e));
          this.initialTooltip = true;
          this.setPreviousVal(eventName, this.value);
        }
        this.setAriaAttrValue(this.firstHandle);
      } else {
        var value = this.value = [this.handleVal1, this.handleVal2];
        this.setProperties({
          "value": value
        }, true);
        if (previous.length === this.value.length && this.value[0] !== previous[0] || this.value[1] !== previous[1]) {
          this.initialTooltip = false;
          this.trigger(eventName, this.changeEventArgs(eventName, e));
          this.initialTooltip = true;
          this.setPreviousVal(eventName, this.value);
        }
        this.setAriaAttrValue(this.getHandle());
      }
      this.hiddenInput.value = this.value.toString();
    };
    Slider2.prototype.changeEventArgs = function(eventName, e) {
      var eventArgs;
      if (this.tooltip.isVisible && this.tooltipObj && this.initialTooltip) {
        this.tooltipValue();
        eventArgs = {
          value: this.value,
          previousValue: eventName === "change" ? this.previousVal : this.previousChanged,
          action: eventName,
          text: typeof this.tooltipObj.content === "function" ? this.tooltipObj.content() : this.tooltipObj.content,
          isInteracted: isNullOrUndefined2(e) ? false : true
        };
      } else {
        eventArgs = {
          value: this.value,
          previousValue: eventName === "change" ? this.previousVal : this.previousChanged,
          action: eventName,
          text: isNullOrUndefined2(this.ticksFormatInfo.format) ? this.value.toString() : this.type !== "Range" ? this.formatString(this.value, this.ticksFormatInfo).formatString : this.formatString(this.value[0], this.ticksFormatInfo).formatString + " - " + this.formatString(this.value[1], this.ticksFormatInfo).formatString,
          isInteracted: isNullOrUndefined2(e) ? false : true
        };
      }
      return eventArgs;
    };
    Slider2.prototype.setPreviousVal = function(eventName, value) {
      if (eventName === "change") {
        this.previousVal = value;
      } else {
        this.previousChanged = value;
      }
    };
    Slider2.prototype.updateRangeValue = function() {
      var values = this.value.toString().split(",").map(Number);
      if (this.enableRtl && this.orientation !== "Vertical" || this.rtl) {
        this.value = [values[1], values[0]];
      } else {
        this.value = [values[0], values[1]];
      }
      if (this.enableRtl && this.orientation !== "Vertical") {
        this.handleVal1 = this.checkHandleValue(this.value[1]);
        this.handleVal2 = this.checkHandleValue(this.value[0]);
      } else {
        this.handleVal1 = this.checkHandleValue(this.value[0]);
        this.handleVal2 = this.checkHandleValue(this.value[1]);
      }
      this.handlePos1 = this.checkHandlePosition(this.handleVal1);
      this.handlePos2 = this.checkHandlePosition(this.handleVal2);
      if (this.min < this.max && this.handlePos1 > this.handlePos2) {
        this.handlePos1 = this.handlePos2;
        this.handleVal1 = this.handleVal2;
      }
      if (this.min > this.max && this.handlePos1 < this.handlePos2) {
        this.handlePos2 = this.handlePos1;
        this.handleVal2 = this.handleVal1;
      }
      this.preHandlePos1 = this.handlePos1;
      this.preHandlePos2 = this.handlePos2;
      if (this.limits.enabled) {
        this.activeHandle = 1;
        var values_1 = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
        this.handleVal1 = values_1[0];
        this.handlePos1 = values_1[1];
        this.preHandlePos1 = this.handlePos1;
        this.activeHandle = 2;
        values_1 = this.getLimitValueAndPosition(this.handleVal2, this.limits.maxStart, this.limits.maxEnd);
        this.handleVal2 = values_1[0];
        this.handlePos2 = values_1[1];
        this.preHandlePos2 = this.handlePos2;
      }
    };
    Slider2.prototype.checkHandlePosition = function(value) {
      var pos;
      value = 100 * (value - parseFloat(formatUnit(this.min))) / (parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min)));
      if (this.orientation === "Horizontal") {
        pos = this.element.getBoundingClientRect().width * (value / 100);
      } else {
        pos = this.element.getBoundingClientRect().height * (value / 100);
      }
      if (parseFloat(formatUnit(this.max)) === parseFloat(formatUnit(this.min))) {
        if (this.orientation === "Horizontal") {
          pos = this.element.getBoundingClientRect().width;
        } else {
          pos = this.element.getBoundingClientRect().height;
        }
      }
      return pos;
    };
    Slider2.prototype.checkHandleValue = function(value) {
      if (this.min === this.max) {
        return parseFloat(formatUnit(this.max));
      }
      var handle = this.tempStartEnd();
      if (value < handle.start) {
        value = handle.start;
      } else if (value > handle.end) {
        value = handle.end;
      }
      return value;
    };
    Slider2.prototype.reposition = function() {
      var _this = this;
      if (!isNullOrUndefined2(this.firstHandle)) {
        this.firstHandle.style.transition = "none";
      }
      if (this.type !== "Default" && !isNullOrUndefined2(this.rangeBar)) {
        this.rangeBar.style.transition = "none";
      }
      if (this.type === "Range" && !isNullOrUndefined2(this.secondHandle)) {
        this.secondHandle.style.transition = "none";
      }
      this.handlePos1 = this.checkHandlePosition(this.handleVal1);
      if (this.handleVal2) {
        this.handlePos2 = this.checkHandlePosition(this.handleVal2);
      }
      if (this.orientation === "Horizontal") {
        if (this.enableRtl) {
          this.firstHandle.style.right = this.handlePos1 + "px";
        } else {
          this.firstHandle.style.left = this.handlePos1 + "px";
        }
        if (this.isMaterialTooltip && !isNullOrUndefined2(this.materialHandle)) {
          if (this.enableRtl) {
            this.materialHandle.style.right = this.handlePos1 + "px";
          } else {
            this.materialHandle.style.left = this.handlePos1 + "px";
          }
        }
        if (this.type === "MinRange" && !isNullOrUndefined2(this.rangeBar)) {
          if (this.enableRtl) {
            this.rangeBar.style.right = "0px";
          } else {
            this.rangeBar.style.left = "0px";
          }
          setStyleAttribute2(this.rangeBar, {
            "width": isNullOrUndefined2(this.handlePos1) ? 0 : this.handlePos1 + "px"
          });
        } else if (this.type === "Range" && !isNullOrUndefined2(this.secondHandle) && !isNullOrUndefined2(this.rangeBar)) {
          if (this.enableRtl) {
            this.secondHandle.style.right = this.handlePos2 + "px";
            this.rangeBar.style.right = this.handlePos1 + "px";
          } else {
            this.secondHandle.style.left = this.handlePos2 + "px";
            this.rangeBar.style.left = this.handlePos1 + "px";
          }
          setStyleAttribute2(this.rangeBar, {
            "width": this.handlePos2 - this.handlePos1 + "px"
          });
        }
      } else {
        this.firstHandle.style.bottom = this.handlePos1 + "px";
        if (this.isMaterialTooltip) {
          this.materialHandle.style.bottom = this.handlePos1 + "px";
        }
        if (this.type === "MinRange") {
          this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + "px" : "0px";
          setStyleAttribute2(this.rangeBar, {
            "height": isNullOrUndefined2(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + "px" : this.handlePos1 + "px"
          });
        } else if (this.type === "Range") {
          this.secondHandle.style.bottom = this.handlePos2 + "px";
          this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + "px" : this.handlePos1 + "px";
          setStyleAttribute2(this.rangeBar, {
            "height": this.min > this.max ? this.handlePos1 - this.handlePos2 + "px" : this.handlePos2 - this.handlePos1 + "px"
          });
        }
      }
      if (this.limits.enabled) {
        this.setLimitBar();
      }
      if (this.ticks.placement !== "None" && this.ul) {
        this.removeElement(this.ul);
        this.ul = void 0;
        this.renderScale();
      }
      this.handleStart();
      if (!this.tooltip.isVisible) {
        setTimeout(function() {
          if (!isNullOrUndefined2(_this.firstHandle)) {
            _this.firstHandle.style.transition = _this.scaleTransform;
          }
          if (_this.type === "Range" && !isNullOrUndefined2(_this.secondHandle)) {
            _this.secondHandle.style.transition = _this.scaleTransform;
          }
        });
      }
      this.refreshTooltip(this.tooltipTarget);
      this.setBarColor();
    };
    Slider2.prototype.changeHandleValue = function(value) {
      var position = null;
      if (this.activeHandle === 1) {
        if (!(this.limits.enabled && this.limits.startHandleFixed)) {
          this.handleVal1 = this.checkHandleValue(value);
          this.handlePos1 = this.checkHandlePosition(this.handleVal1);
          if (this.type === "Range" && (this.handlePos1 > this.handlePos2 && this.min < this.max || this.handlePos1 < this.handlePos2 && this.min > this.max)) {
            this.handlePos1 = this.handlePos2;
            this.handleVal1 = this.handleVal2;
          }
          if (this.handlePos1 !== this.preHandlePos1) {
            position = this.preHandlePos1 = this.handlePos1;
          }
        }
        this.modifyZindex();
      } else {
        if (!(this.limits.enabled && this.limits.endHandleFixed)) {
          this.handleVal2 = this.checkHandleValue(value);
          this.handlePos2 = this.checkHandlePosition(this.handleVal2);
          if (this.type === "Range" && (this.handlePos2 < this.handlePos1 && this.min < this.max || this.handlePos2 > this.handlePos1 && this.min > this.max)) {
            this.handlePos2 = this.handlePos1;
            this.handleVal2 = this.handleVal1;
          }
          if (this.handlePos2 !== this.preHandlePos2) {
            position = this.preHandlePos2 = this.handlePos2;
          }
        }
        this.modifyZindex();
      }
      if (position !== null) {
        if (this.type !== "Default") {
          this.setRangeBar();
        }
        this.setHandlePosition(null);
      }
    };
    Slider2.prototype.tempStartEnd = function() {
      if (this.min > this.max) {
        return {
          start: this.max,
          end: this.min
        };
      } else {
        return {
          start: this.min,
          end: this.max
        };
      }
    };
    Slider2.prototype.xyToPosition = function(position) {
      var pos;
      if (this.min === this.max) {
        return 100;
      }
      if (this.orientation === "Horizontal") {
        var left = position.x - this.element.getBoundingClientRect().left;
        var num = this.element.offsetWidth / 100;
        this.val = left / num;
      } else {
        var top_1 = position.y - this.element.getBoundingClientRect().top;
        var num = this.element.offsetHeight / 100;
        this.val = 100 - top_1 / num;
      }
      var val = this.stepValueCalculation(this.val);
      if (val < 0) {
        val = 0;
      } else if (val > 100) {
        val = 100;
      }
      if (this.enableRtl && this.orientation !== "Vertical") {
        val = 100 - val;
      }
      if (this.orientation === "Horizontal") {
        pos = this.element.getBoundingClientRect().width * (val / 100);
      } else {
        pos = this.element.getBoundingClientRect().height * (val / 100);
      }
      return pos;
    };
    Slider2.prototype.stepValueCalculation = function(value) {
      if (this.step === 0) {
        this.step = 1;
      }
      var percentStep = parseFloat(formatUnit(this.step)) / ((parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))) / 100);
      var remain = value % Math.abs(percentStep);
      if (remain !== 0) {
        if (percentStep / 2 > remain) {
          value -= remain;
        } else {
          value += Math.abs(percentStep) - remain;
        }
      }
      return value;
    };
    Slider2.prototype.add = function(a, b, addition) {
      var precision;
      var x = Math.pow(10, precision || 3);
      var val;
      if (addition) {
        val = (Math.round(a * x) + Math.round(b * x)) / x;
      } else {
        val = (Math.round(a * x) - Math.round(b * x)) / x;
      }
      return val;
    };
    Slider2.prototype.positionToValue = function(pos) {
      var val;
      var diff = parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min));
      if (this.orientation === "Horizontal") {
        val = pos / this.element.getBoundingClientRect().width * diff;
      } else {
        val = pos / this.element.getBoundingClientRect().height * diff;
      }
      var total = this.add(val, parseFloat(this.min.toString()), true);
      return total;
    };
    Slider2.prototype.sliderBarClick = function(evt) {
      evt.preventDefault();
      var pos;
      if (evt.type === "mousedown" || evt.type === "mouseup" || evt.type === "click") {
        pos = {
          x: evt.clientX,
          y: evt.clientY
        };
      } else if (evt.type === "touchend" || evt.type === "touchstart") {
        pos = {
          x: evt.changedTouches[0].clientX,
          y: evt.changedTouches[0].clientY
        };
      }
      var handlepos = this.xyToPosition(pos);
      var handleVal = this.positionToValue(handlepos);
      if (this.type === "Range" && (this.min < this.max && this.handlePos2 - handlepos < handlepos - this.handlePos1 || this.min > this.max && this.handlePos1 - handlepos > handlepos - this.handlePos2)) {
        this.activeHandle = 2;
        if (!(this.limits.enabled && this.limits.endHandleFixed)) {
          if (this.limits.enabled) {
            var value = this.getLimitValueAndPosition(handleVal, this.limits.maxStart, this.limits.maxEnd);
            handleVal = value[0];
            handlepos = value[1];
          }
          this.secondHandle.classList.add(classNames4.sliderActiveHandle);
          this.handlePos2 = this.preHandlePos2 = handlepos;
          this.handleVal2 = handleVal;
        }
        this.modifyZindex();
        this.secondHandle.focus();
      } else {
        this.activeHandle = 1;
        if (!(this.limits.enabled && this.limits.startHandleFixed)) {
          if (this.limits.enabled) {
            var value = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);
            handleVal = value[0];
            handlepos = value[1];
          }
          this.firstHandle.classList.add(classNames4.sliderActiveHandle);
          this.handlePos1 = this.preHandlePos1 = handlepos;
          this.handleVal1 = handleVal;
        }
        this.modifyZindex();
        this.firstHandle.focus();
      }
      if (this.isMaterialTooltip) {
        this.tooltipElement.classList.add(classNames4.materialTooltipActive);
      }
      var focusedElement = this.element.querySelector("." + classNames4.sliderTabHandle);
      if (focusedElement && this.getHandle() !== focusedElement) {
        focusedElement.classList.remove(classNames4.sliderTabHandle);
      }
      var handle = this.activeHandle === 1 ? this.firstHandle : this.secondHandle;
      var behindElement;
      if ((evt.type === "click" || evt.type === "mousedown") && evt.target === handle) {
        var eventX = evt.clientX, eventY = evt.clientY;
        behindElement = document.elementFromPoint(eventX, eventY);
      }
      if (!this.checkRepeatedValue(handleVal)) {
        return;
      }
      var transition = (this.isMaterial || this.isMaterial3) && this.tooltip.isVisible ? this.transitionOnMaterialTooltip : this.transition;
      this.getHandle().style.transition = transition.handle;
      if (this.type !== "Default") {
        this.rangeBar.style.transition = transition.rangeBar;
      }
      this.setHandlePosition(evt);
      if (this.isMaterialTooltip) {
        this.initialTooltip = false;
      }
      if (evt.target !== handle) {
        this.changeEvent("changed", evt);
      }
      if (this.type !== "Default") {
        this.setRangeBar();
      }
    };
    Slider2.prototype.handleValueAdjust = function(handleValue, assignValue, handleNumber) {
      if (handleNumber === 1) {
        this.handleVal1 = assignValue;
        this.handleVal2 = this.handleVal1 + this.minDiff;
      } else if (handleNumber === 2) {
        this.handleVal2 = assignValue;
        this.handleVal1 = this.handleVal2 - this.minDiff;
      }
      this.handlePos1 = this.checkHandlePosition(this.handleVal1);
      this.handlePos2 = this.checkHandlePosition(this.handleVal2);
    };
    Slider2.prototype.dragRangeBarMove = function(event2) {
      var _a, _b;
      if (event2.type !== "touchmove") {
        event2.preventDefault();
      }
      this.rangeBarDragged = true;
      var pos;
      this.rangeBar.style.transition = "none";
      this.firstHandle.style.transition = "none";
      this.secondHandle.style.transition = "none";
      var xPostion;
      var yPostion;
      if (event2.type === "mousemove") {
        _a = [event2.clientX, event2.clientY], xPostion = _a[0], yPostion = _a[1];
      } else {
        _b = [event2.changedTouches[0].clientX, event2.changedTouches[0].clientY], xPostion = _b[0], yPostion = _b[1];
      }
      if (!(this.limits.enabled && this.limits.startHandleFixed) && !(this.limits.enabled && this.limits.endHandleFixed)) {
        if (!this.enableRtl) {
          pos = {
            x: xPostion - this.firstPartRemain,
            y: yPostion + this.secondPartRemain
          };
        } else {
          pos = {
            x: xPostion + this.secondPartRemain,
            y: yPostion + this.secondPartRemain
          };
        }
        if (this.min > this.max) {
          this.handlePos2 = this.xyToPosition(pos);
          this.handleVal2 = this.positionToValue(this.handlePos2);
        } else {
          this.handlePos1 = this.xyToPosition(pos);
          this.handleVal1 = this.positionToValue(this.handlePos1);
        }
        if (!this.enableRtl) {
          pos = {
            x: xPostion + this.secondPartRemain,
            y: yPostion - this.firstPartRemain
          };
        } else {
          pos = {
            x: xPostion - this.firstPartRemain,
            y: yPostion - this.firstPartRemain
          };
        }
        if (this.min > this.max) {
          this.handlePos1 = this.xyToPosition(pos);
          this.handleVal1 = this.positionToValue(this.handlePos1);
        } else {
          this.handlePos2 = this.xyToPosition(pos);
          this.handleVal2 = this.positionToValue(this.handlePos2);
        }
        if (this.limits.enabled) {
          var value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
          this.handleVal1 = value[0];
          this.handlePos1 = value[1];
          if (this.handleVal1 === this.limits.minEnd) {
            this.handleValueAdjust(this.handleVal1, this.limits.minEnd, 1);
          }
          if (this.handleVal1 === this.limits.minStart) {
            this.handleValueAdjust(this.handleVal1, this.limits.minStart, 1);
          }
          value = this.getLimitValueAndPosition(this.handleVal2, this.limits.maxStart, this.limits.maxEnd);
          this.handleVal2 = value[0];
          this.handlePos2 = value[1];
          if (this.handleVal2 === this.limits.maxStart) {
            this.handleValueAdjust(this.handleVal2, this.limits.maxStart, 2);
          }
          if (this.handleVal2 === this.limits.maxEnd) {
            this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
          }
        }
        if (this.handleVal2 === (this.min > this.max ? this.min : this.max)) {
          this.handleValueAdjust(this.handleVal2, this.min > this.max ? this.min : this.max, 2);
        }
        if (this.handleVal1 === (this.min > this.max ? this.max : this.min)) {
          this.handleValueAdjust(this.handleVal1, this.min > this.max ? this.max : this.min, 1);
        }
      }
      this.activeHandle = 1;
      this.setHandlePosition(event2);
      this.activeHandle = 2;
      this.setHandlePosition(event2);
      this.tooltipToggle(this.rangeBar);
      this.setRangeBar();
    };
    Slider2.prototype.sliderBarUp = function(event2) {
      this.changeEvent("changed", event2);
      this.handleFocusOut();
      this.firstHandle.classList.remove(classNames4.sliderActiveHandle);
      if (this.type === "Range") {
        this.initialTooltip = false;
        this.secondHandle.classList.remove(classNames4.sliderActiveHandle);
      }
      this.closeTooltip();
      if (this.isMaterial || this.isMaterial3) {
        this.getHandle().classList.remove("e-large-thumb-size");
        if (this.isMaterialTooltip) {
          this.tooltipElement.classList.remove(classNames4.materialTooltipActive);
        }
      }
      EventHandler2.remove(document, "mousemove touchmove", this.sliderBarMove);
      EventHandler2.remove(document, "mouseup touchend", this.sliderBarUp);
    };
    Slider2.prototype.sliderBarMove = function(evt) {
      if (evt.type !== "touchmove") {
        evt.preventDefault();
      }
      var pos;
      if (evt.type === "mousemove") {
        pos = {
          x: evt.clientX,
          y: evt.clientY
        };
      } else {
        pos = {
          x: evt.changedTouches[0].clientX,
          y: evt.changedTouches[0].clientY
        };
      }
      var handlepos = this.xyToPosition(pos);
      var handleVal = this.positionToValue(handlepos);
      handlepos = Math.round(handlepos);
      if (this.type !== "Range" && this.activeHandle === 1) {
        if (!(this.limits.enabled && this.limits.startHandleFixed)) {
          if (this.limits.enabled) {
            var valueAndPostion = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);
            handlepos = valueAndPostion[1];
            handleVal = valueAndPostion[0];
          }
          this.handlePos1 = handlepos;
          this.handleVal1 = handleVal;
        }
        this.firstHandle.classList.add(classNames4.sliderActiveHandle);
      }
      if (this.type === "Range") {
        if (this.activeHandle === 1) {
          this.firstHandle.classList.add(classNames4.sliderActiveHandle);
          if (!(this.limits.enabled && this.limits.startHandleFixed)) {
            if (this.min < this.max && handlepos > this.handlePos2 || this.min > this.max && handlepos < this.handlePos2) {
              handlepos = this.handlePos2;
              handleVal = this.handleVal2;
            }
            if (handlepos !== this.preHandlePos1) {
              if (this.limits.enabled) {
                var value = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);
                handleVal = value[0];
                handlepos = value[1];
              }
              this.handlePos1 = this.preHandlePos1 = handlepos;
              this.handleVal1 = handleVal;
              this.activeHandle = 1;
            }
          }
        } else if (this.activeHandle === 2) {
          this.secondHandle.classList.add(classNames4.sliderActiveHandle);
          if (!(this.limits.enabled && this.limits.endHandleFixed)) {
            if (this.min < this.max && handlepos < this.handlePos1 || this.min > this.max && handlepos > this.handlePos1) {
              handlepos = this.handlePos1;
              handleVal = this.handleVal1;
            }
            if (handlepos !== this.preHandlePos2) {
              if (this.limits.enabled) {
                var value = this.getLimitValueAndPosition(handleVal, this.limits.maxStart, this.limits.maxEnd);
                handleVal = value[0];
                handlepos = value[1];
              }
              this.handlePos2 = this.preHandlePos2 = handlepos;
              this.handleVal2 = handleVal;
              this.activeHandle = 2;
            }
          }
        }
      }
      if (!this.checkRepeatedValue(handleVal)) {
        return;
      }
      this.getHandle().style.transition = this.scaleTransform;
      if (this.type !== "Default") {
        this.rangeBar.style.transition = "none";
      }
      this.setHandlePosition(evt);
      if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible && !this.getHandle().classList.contains(classNames4.sliderTabHandle)) {
        this.materialChange();
      }
      this.tooltipToggle(this.getHandle());
      if (this.type !== "Default") {
        this.setRangeBar();
      }
    };
    Slider2.prototype.dragRangeBarUp = function(event2) {
      if (!this.rangeBarDragged) {
        this.focusSliderElement();
        this.sliderBarClick(event2);
      } else {
        this.isDragComplete = true;
      }
      this.changeEvent("changed", event2);
      this.closeTooltip();
      EventHandler2.remove(document, "mousemove touchmove", this.dragRangeBarMove);
      EventHandler2.remove(document, "mouseup touchend", this.dragRangeBarUp);
      this.rangeBarDragged = false;
    };
    Slider2.prototype.checkRepeatedValue = function(currentValue) {
      if (this.type === "Range") {
        var previousVal = this.enableRtl && this.orientation !== "Vertical" ? this.activeHandle === 1 ? this.previousVal[1] : this.previousVal[0] : this.activeHandle === 1 ? this.previousVal[0] : this.previousVal[1];
        if (currentValue === previousVal) {
          return 0;
        }
      } else {
        if (currentValue === this.previousVal) {
          return 0;
        }
      }
      return 1;
    };
    Slider2.prototype.refreshTooltip = function(target) {
      if (this.tooltip.isVisible && this.tooltipObj) {
        this.tooltipValue();
        if (target) {
          this.tooltipObj.refresh(target);
          this.tooltipTarget = target;
        }
      }
    };
    Slider2.prototype.openTooltip = function(target) {
      if (this.tooltip.isVisible && this.tooltipObj && !this.isMaterialTooltip) {
        this.tooltipValue();
        this.tooltipObj.open(target);
        this.tooltipTarget = target;
      }
    };
    Slider2.prototype.closeTooltip = function() {
      if (this.tooltip.isVisible && this.tooltipObj && this.tooltip.showOn !== "Always" && !this.isMaterialTooltip) {
        this.tooltipValue();
        this.tooltipObj.close();
        this.tooltipTarget = void 0;
      }
    };
    Slider2.prototype.keyDown = function(event2) {
      switch (event2.keyCode) {
        case 37:
        case 38:
        case 39:
        case 40:
        case 33:
        case 34:
        case 36:
        case 35:
          event2.preventDefault();
          this.buttonClick(event2);
          break;
      }
    };
    Slider2.prototype.wireButtonEvt = function(destroy5) {
      if (!destroy5) {
        EventHandler2.add(this.firstBtn, "mouseleave touchleave", this.buttonFocusOut, this);
        EventHandler2.add(this.secondBtn, "mouseleave touchleave", this.buttonFocusOut, this);
        EventHandler2.add(this.firstBtn, "mousedown touchstart", this.repeatHandlerMouse, this);
        EventHandler2.add(this.firstBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp, this);
        EventHandler2.add(this.secondBtn, "mousedown touchstart", this.repeatHandlerMouse, this);
        EventHandler2.add(this.secondBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp, this);
        EventHandler2.add(this.firstBtn, "focusout", this.sliderFocusOut, this);
        EventHandler2.add(this.secondBtn, "focusout", this.sliderFocusOut, this);
      } else {
        EventHandler2.remove(this.firstBtn, "mouseleave touchleave", this.buttonFocusOut);
        EventHandler2.remove(this.secondBtn, "mouseleave touchleave", this.buttonFocusOut);
        EventHandler2.remove(this.firstBtn, "mousedown touchstart", this.repeatHandlerMouse);
        EventHandler2.remove(this.firstBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp);
        EventHandler2.remove(this.secondBtn, "mousedown touchstart", this.repeatHandlerMouse);
        EventHandler2.remove(this.secondBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp);
        EventHandler2.remove(this.firstBtn, "focusout", this.sliderFocusOut);
        EventHandler2.remove(this.secondBtn, "focusout", this.sliderFocusOut);
      }
    };
    Slider2.prototype.rangeBarMousedown = function(event2) {
      var _a, _b;
      event2.preventDefault();
      this.focusSliderElement();
      if (this.type === "Range" && this.drag && event2.target === this.rangeBar) {
        var xPostion = void 0;
        var yPostion = void 0;
        if (event2.type === "mousedown") {
          _a = [event2.clientX, event2.clientY], xPostion = _a[0], yPostion = _a[1];
        } else if (event2.type === "touchstart") {
          _b = [event2.changedTouches[0].clientX, event2.changedTouches[0].clientY], xPostion = _b[0], yPostion = _b[1];
        }
        if (this.orientation === "Horizontal") {
          this.firstPartRemain = xPostion - this.rangeBar.getBoundingClientRect().left;
          this.secondPartRemain = this.rangeBar.getBoundingClientRect().right - xPostion;
        } else {
          this.firstPartRemain = yPostion - this.rangeBar.getBoundingClientRect().top;
          this.secondPartRemain = this.rangeBar.getBoundingClientRect().bottom - yPostion;
        }
        this.minDiff = this.handleVal2 - this.handleVal1;
        this.tooltipToggle(this.rangeBar);
        var focusedElement = this.element.querySelector("." + classNames4.sliderTabHandle);
        if (focusedElement) {
          focusedElement.classList.remove(classNames4.sliderTabHandle);
        }
        EventHandler2.add(document, "mousemove touchmove", this.dragRangeBarMove, this);
        EventHandler2.add(document, "mouseup touchend", this.dragRangeBarUp, this);
      }
    };
    Slider2.prototype.elementClick = function(event2) {
      if (this.isDragComplete) {
        this.isDragComplete = false;
        return;
      }
      event2.preventDefault();
      this.focusSliderElement();
      this.sliderBarClick(event2);
      this.focusHandle();
    };
    Slider2.prototype.wireEvents = function() {
      this.onresize = this.reposition.bind(this);
      window.addEventListener("resize", this.onresize);
      if (this.enabled && !this.readonly) {
        EventHandler2.add(this.element, "click", this.elementClick, this);
        if (this.type === "Range" && this.drag) {
          EventHandler2.add(this.rangeBar, "mousedown touchstart", this.rangeBarMousedown, this);
        }
        EventHandler2.add(this.sliderContainer, "keydown", this.keyDown, this);
        EventHandler2.add(this.sliderContainer, "keyup", this.keyUp, this);
        EventHandler2.add(this.element, "focusout", this.sliderFocusOut, this);
        EventHandler2.add(this.sliderContainer, "mouseover mouseout touchstart touchend", this.hover, this);
        this.wireFirstHandleEvt(false);
        if (this.type === "Range") {
          this.wireSecondHandleEvt(false);
        }
        if (this.showButtons) {
          this.wireButtonEvt(false);
        }
        this.wireMaterialTooltipEvent(false);
        if (this.isForm) {
          EventHandler2.add(this.formElement, "reset", this.formResetHandler, this);
        }
      }
    };
    Slider2.prototype.unwireEvents = function() {
      EventHandler2.remove(this.element, "click", this.elementClick);
      if (this.type === "Range" && this.drag) {
        EventHandler2.remove(this.rangeBar, "mousedown touchstart", this.rangeBarMousedown);
      }
      EventHandler2.remove(this.sliderContainer, "keydown", this.keyDown);
      EventHandler2.remove(this.sliderContainer, "keyup", this.keyUp);
      EventHandler2.remove(this.element, "focusout", this.sliderFocusOut);
      EventHandler2.remove(this.sliderContainer, "mouseover mouseout touchstart touchend", this.hover);
      this.wireFirstHandleEvt(true);
      if (this.type === "Range") {
        this.wireSecondHandleEvt(true);
      }
      if (this.showButtons) {
        this.wireButtonEvt(true);
      }
      this.wireMaterialTooltipEvent(true);
      EventHandler2.remove(this.element, "reset", this.formResetHandler);
    };
    Slider2.prototype.formResetHandler = function() {
      this.setProperties({
        "value": this.formResetValue
      }, true);
      this.setValue();
    };
    Slider2.prototype.keyUp = function(event2) {
      if (event2.keyCode === 9 && event2.target.classList.contains(classNames4.sliderHandle)) {
        this.focusSliderElement();
        if (!event2.target.classList.contains(classNames4.sliderTabHandle)) {
          if (this.element.querySelector("." + classNames4.sliderTabHandle)) {
            this.element.querySelector("." + classNames4.sliderTabHandle).classList.remove(classNames4.sliderTabHandle);
          }
          event2.target.classList.add(classNames4.sliderTabHandle);
          var parentElement = event2.target.parentElement;
          if (parentElement === this.element) {
            parentElement.querySelector("." + classNames4.sliderTrack).classList.add(classNames4.sliderTabTrack);
            if (this.type === "Range" || this.type === "MinRange") {
              parentElement.querySelector("." + classNames4.rangeBar).classList.add(classNames4.sliderTabRange);
            }
          }
          if (this.type === "Range") {
            var previousSibling = event2.target.previousSibling;
            if (previousSibling && previousSibling.classList.contains(classNames4.sliderHandle)) {
              this.activeHandle = 2;
            } else {
              this.activeHandle = 1;
            }
          }
          this.getHandle().focus();
          this.tooltipToggle(this.getHandle());
        }
      }
      this.closeTooltip();
      this.changeEvent("changed", event2);
    };
    Slider2.prototype.hover = function(event2) {
      if (!isNullOrUndefined2(event2)) {
        if (event2.type === "mouseover" || event2.type === "touchmove" || event2.type === "mousemove" || event2.type === "pointermove" || event2.type === "touchstart") {
          this.sliderContainer.classList.add(classNames4.sliderHover);
        } else {
          this.sliderContainer.classList.remove(classNames4.sliderHover);
          var curTarget = event2.currentTarget;
          if (this.tooltip.isVisible && this.tooltip.showOn !== "Always" && this.tooltipObj && this.isMaterialTooltip && !curTarget.classList.contains(classNames4.sliderHandleFocused) && !curTarget.classList.contains(classNames4.sliderTabHandle)) {
            this.closeMaterialTooltip();
          }
        }
      }
    };
    Slider2.prototype.sliderFocusOut = function(event2) {
      if (event2.relatedTarget !== this.secondHandle && event2.relatedTarget !== this.firstHandle && event2.relatedTarget !== this.element && event2.relatedTarget !== this.firstBtn && event2.relatedTarget !== this.secondBtn) {
        this.closeMaterialTooltip();
        this.closeTooltip();
        if (this.element.querySelector("." + classNames4.sliderTabHandle)) {
          this.element.querySelector("." + classNames4.sliderTabHandle).classList.remove(classNames4.sliderTabHandle);
        }
        if (this.element.querySelector("." + classNames4.sliderTabTrack)) {
          this.element.querySelector("." + classNames4.sliderTabTrack).classList.remove(classNames4.sliderTabTrack);
          if ((this.type === "Range" || this.type === "MinRange") && this.element.querySelector("." + classNames4.sliderTabRange)) {
            this.element.querySelector("." + classNames4.sliderTabRange).classList.remove(classNames4.sliderTabRange);
          }
        }
        this.hiddenInput.focus();
        this.hiddenInput.blur();
        this.isElementFocused = false;
      }
    };
    Slider2.prototype.removeElement = function(element2) {
      if (element2.parentNode) {
        element2.parentNode.removeChild(element2);
      }
    };
    Slider2.prototype.changeSliderType = function(type, args) {
      if (this.isMaterialTooltip && this.materialHandle) {
        this.sliderContainer.classList.remove(classNames4.materialSlider);
        this.removeElement(this.materialHandle);
        this.materialHandle = void 0;
      }
      this.removeElement(this.firstHandle);
      this.firstHandle = void 0;
      if (type !== "Default") {
        if (type === "Range") {
          this.removeElement(this.secondHandle);
          this.secondHandle = void 0;
        }
        this.removeElement(this.rangeBar);
        this.rangeBar = void 0;
      }
      if (this.tooltip.isVisible && !isNullOrUndefined2(this.tooltipObj)) {
        this.tooltipObj.destroy();
        this.tooltipElement = void 0;
        this.tooltipCollidedPosition = void 0;
      }
      if (this.limits.enabled) {
        if (type === "MinRange" || type === "Default") {
          if (!isNullOrUndefined2(this.limitBarFirst)) {
            this.removeElement(this.limitBarFirst);
            this.limitBarFirst = void 0;
          }
        } else {
          if (!isNullOrUndefined2(this.limitBarSecond)) {
            this.removeElement(this.limitBarSecond);
            this.limitBarSecond = void 0;
          }
        }
      }
      this.activeHandle = 1;
      this.getThemeInitialization();
      if (this.type === "Range") {
        this.rangeValueUpdate();
      }
      this.createRangeBar();
      if (this.limits.enabled) {
        this.createLimitBar();
      }
      this.setHandler();
      this.setOrientClass();
      this.wireFirstHandleEvt(!this.enabled);
      if (this.type === "Range") {
        this.wireSecondHandleEvt(!this.enabled);
      }
      this.setValue();
      if (this.tooltip.isVisible) {
        this.renderTooltip();
        this.wireMaterialTooltipEvent(false);
      }
      this.setBarColor();
      if (args !== "tooltip") {
        this.updateConfig();
      }
      if (this.readonly) {
        this.sliderContainer.classList.remove(classNames4.readonly);
        this.setReadOnly();
      }
    };
    Slider2.prototype.changeRtl = function() {
      if (!this.enableRtl && this.type === "Range") {
        this.value = [this.handleVal2, this.handleVal1];
      }
      this.updateConfig();
      if (this.tooltip.isVisible) {
        this.tooltipObj.refresh(this.firstHandle);
      }
      if (this.showButtons) {
        var enabledRTL = this.enableRtl && this.orientation !== "Vertical";
        attributes2(enabledRTL ? this.secondBtn : this.firstBtn, {
          "aria-label": "Decrease",
          title: "Decrease"
        });
        attributes2(enabledRTL ? this.firstBtn : this.secondBtn, {
          "aria-label": "Increase",
          title: "Increase"
        });
      }
    };
    Slider2.prototype.changeOrientation = function() {
      this.changeSliderType(this.type, "null");
    };
    Slider2.prototype.updateConfig = function() {
      this.setEnableRTL();
      this.setValue();
      if (this.tooltip.isVisible) {
        this.refreshTooltip(this.tooltipTarget);
      }
      if (this.ticks.placement !== "None") {
        if (this.ul) {
          this.removeElement(this.ul);
          this.ul = void 0;
          this.renderScale();
        }
      }
      this.limitsPropertyChange();
    };
    Slider2.prototype.limitsPropertyChange = function() {
      if (this.limits.enabled) {
        if (isNullOrUndefined2(this.limitBarFirst) && this.type !== "Range") {
          this.createLimitBar();
        }
        if (isNullOrUndefined2(this.limitBarFirst) && isNullOrUndefined2(this.limitBarSecond) && this.type === "Range") {
          this.createLimitBar();
        }
        this.setLimitBar();
        this.setValue();
      } else {
        if (!isNullOrUndefined2(this.limitBarFirst)) {
          detach2(this.limitBarFirst);
        }
        if (!isNullOrUndefined2(this.limitBarSecond)) {
          detach2(this.limitBarSecond);
        }
      }
    };
    Slider2.prototype.getPersistData = function() {
      var keyEntity = ["value"];
      return this.addOnPersist(keyEntity);
    };
    Slider2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.unwireEvents();
      window.removeEventListener("resize", this.onresize);
      removeClass2([this.sliderContainer], [classNames4.sliderDisabled]);
      this.firstHandle.removeAttribute("aria-orientation");
      if (this.type === "Range") {
        this.secondHandle.removeAttribute("aria-orientation");
      }
      if (this.sliderContainer.parentNode) {
        this.sliderContainer.parentNode.insertBefore(this.element, this.sliderContainer);
      }
      detach2(this.sliderContainer);
      if (this.tooltip.isVisible) {
        this.tooltipObj.destroy();
      }
      this.element.innerHTML = "";
      this.hiddenInput = null;
      this.sliderContainer = null;
      this.sliderTrack = null;
      this.rangeBar = null;
      this.firstHandle = null;
      this.secondHandle = null;
      this.tickElementCollection = null;
      this.ul = null;
      this.firstBtn = null;
      this.secondBtn = null;
      this.materialHandle = null;
      this.tooltipObj = null;
      this.tooltipTarget = null;
      this.limitBarFirst = null;
      this.limitBarSecond = null;
      this.firstChild = null;
      this.lastChild = null;
      this.tooltipElement = null;
    };
    Slider2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var _this = this;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "cssClass":
            this.setCSSClass(oldProp.cssClass);
            break;
          case "value":
            if (newProp && oldProp) {
              var value = isNullOrUndefined2(newProp.value) ? this.type === "Range" ? [this.min, this.max] : this.min : newProp.value;
              this.setProperties({
                "value": value
              }, true);
              if (!isNullOrUndefined2(oldProp.value) && oldProp.value.toString() !== value.toString()) {
                this.setValue();
                this.refreshTooltip(this.tooltipTarget);
                if (this.type === "Range") {
                  if (isNullOrUndefined2(newProp.value) || oldProp.value[1] === value[1]) {
                    this.activeHandle = 1;
                  } else {
                    this.activeHandle = 2;
                  }
                }
              }
            }
            break;
          case "min":
          case "step":
          case "max":
            this.setMinMaxValue();
            break;
          case "tooltip":
            if (!isNullOrUndefined2(newProp.tooltip) && !isNullOrUndefined2(oldProp.tooltip)) {
              this.initialTooltip = true;
              this.setTooltip(prop);
              if (!this.showButtons) {
                this.wireEvents();
              }
            }
            break;
          case "type":
            if (!isNullOrUndefined2(oldProp) && Object.keys(oldProp).length && !isNullOrUndefined2(oldProp.type)) {
              this.changeSliderType(oldProp.type, prop);
              this.setZindex();
            }
            break;
          case "enableRtl":
            if (oldProp.enableRtl !== newProp.enableRtl && this.orientation !== "Vertical") {
              this.rtl = oldProp.enableRtl;
              this.changeRtl();
            }
            break;
          case "limits":
            this.limitsPropertyChange();
            break;
          case "orientation":
            this.changeOrientation();
            break;
          case "ticks":
            if (!isNullOrUndefined2(this.sliderContainer.querySelector("." + classNames4.scale))) {
              detach2(this.ul);
              Array.prototype.forEach.call(this.sliderContainer.classList, function(className) {
                if (className.match(/e-scale-/)) {
                  _this.sliderContainer.classList.remove(className);
                }
              });
            }
            if (this.ticks.placement !== "None") {
              this.renderScale();
              this.setZindex();
            }
            break;
          case "locale":
            if (this.showButtons) {
              this.buttonTitle();
            }
            break;
          case "showButtons":
            if (newProp.showButtons) {
              this.setButtons();
              this.reposition();
              if (this.enabled && !this.readonly) {
                this.wireButtonEvt(false);
              }
            } else {
              if (this.firstBtn && this.secondBtn) {
                this.sliderContainer.removeChild(this.firstBtn);
                this.sliderContainer.removeChild(this.secondBtn);
                this.sliderContainer.classList.remove(classNames4.sliderButtonClass);
                this.firstBtn = void 0;
                this.secondBtn = void 0;
                this.reposition();
              }
            }
            break;
          case "enabled":
            this.setEnabled();
            break;
          case "readonly":
            this.setReadOnly();
            break;
          case "customValues":
            this.setValue();
            this.reposition();
            break;
          case "colorRange":
            this.reposition();
            break;
          case "width":
            this.setElementWidth(newProp.width);
            this.setMinMaxValue();
            if (this.limits) {
              this.limitsPropertyChange();
            }
            break;
        }
      }
    };
    Slider2.prototype.setReadOnly = function() {
      if (this.readonly) {
        this.unwireEvents();
        this.sliderContainer.classList.add(classNames4.readonly);
      } else {
        this.wireEvents();
        this.sliderContainer.classList.remove(classNames4.readonly);
      }
    };
    Slider2.prototype.setMinMaxValue = function() {
      var _this = this;
      this.setValue();
      this.refreshTooltip(this.tooltipTarget);
      if (!isNullOrUndefined2(this.sliderContainer.querySelector("." + classNames4.scale))) {
        if (this.ul) {
          detach2(this.ul);
          Array.prototype.forEach.call(this.sliderContainer.classList, function(className) {
            if (className.match(/e-scale-/)) {
              _this.sliderContainer.classList.remove(className);
            }
          });
        }
      }
      if (this.ticks.placement !== "None") {
        this.renderScale();
        this.setZindex();
      }
    };
    Slider2.prototype.setZindex = function() {
      this.zIndex = 6;
      if (!isNullOrUndefined2(this.ticks) && this.ticks.placement !== "None" && !isNullOrUndefined2(this.ul) && !isNullOrUndefined2(this.element)) {
        this.ul.style.zIndex = this.zIndex + -7 + "";
        this.element.style.zIndex = this.zIndex + 2 + "";
      }
      if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined2(this.ticks) && this.ticks.placement === "Both") {
        this.element.style.zIndex = this.zIndex + 2 + "";
      }
      if (!isNullOrUndefined2(this.firstHandle)) {
        this.firstHandle.style.zIndex = this.zIndex + 3 + "";
      }
      if (this.type === "Range" && !isNullOrUndefined2(this.secondHandle)) {
        this.secondHandle.style.zIndex = this.zIndex + 4 + "";
      }
    };
    Slider2.prototype.setTooltip = function(args) {
      this.changeSliderType(this.type, args);
    };
    Slider2.prototype.setBarColor = function() {
      var trackPosition;
      var trackClassName;
      var child = this.sliderTrack.lastElementChild;
      while (child) {
        this.sliderTrack.removeChild(child);
        child = this.sliderTrack.lastElementChild;
      }
      for (var i = 0; i < this.colorRange.length; i++) {
        if (!isNullOrUndefined2(this.colorRange[i].start) && !isNullOrUndefined2(this.colorRange[i].end)) {
          if (this.colorRange[i].end > this.colorRange[i].start) {
            if (this.colorRange[i].start < this.min) {
              this.colorRange[i].start = this.min;
            }
            if (this.colorRange[i].end > this.max) {
              this.colorRange[i].end = this.max;
            }
            var startingPosition = this.checkHandlePosition(this.colorRange[i].start);
            var endPosition = this.checkHandlePosition(this.colorRange[i].end);
            var trackContainer = this.createElement("div");
            trackContainer.style.backgroundColor = this.colorRange[i].color;
            trackContainer.style.border = "1px solid " + this.colorRange[i].color;
            if (this.orientation === "Horizontal") {
              trackClassName = classNames4.sliderHorizantalColor;
              if (this.enableRtl) {
                if (isNullOrUndefined2(this.customValues)) {
                  trackPosition = this.checkHandlePosition(this.max) - this.checkHandlePosition(this.colorRange[i].end);
                } else {
                  trackPosition = this.checkHandlePosition(this.customValues.length - this.colorRange[i].end - 1);
                }
              } else {
                trackPosition = this.checkHandlePosition(this.colorRange[i].start);
              }
              trackContainer.style.width = endPosition - startingPosition + "px";
              trackContainer.style.left = trackPosition + "px";
            } else {
              trackClassName = classNames4.sliderVerticalColor;
              trackPosition = this.checkHandlePosition(this.colorRange[i].start);
              trackContainer.style.height = endPosition - startingPosition + "px";
              trackContainer.style.bottom = trackPosition + "px";
            }
            trackContainer.classList.add(trackClassName);
            this.sliderTrack.appendChild(trackContainer);
          }
        }
      }
    };
    Slider2.prototype.getModuleName = function() {
      return "slider";
    };
    __decorate53([Property2(null)], Slider2.prototype, "value", void 0);
    __decorate53([Property2(null)], Slider2.prototype, "customValues", void 0);
    __decorate53([Property2(1)], Slider2.prototype, "step", void 0);
    __decorate53([Property2(null)], Slider2.prototype, "width", void 0);
    __decorate53([Property2(0)], Slider2.prototype, "min", void 0);
    __decorate53([Property2(100)], Slider2.prototype, "max", void 0);
    __decorate53([Property2(false)], Slider2.prototype, "readonly", void 0);
    __decorate53([Property2("Default")], Slider2.prototype, "type", void 0);
    __decorate53([Collection([{}], ColorRangeData)], Slider2.prototype, "colorRange", void 0);
    __decorate53([Complex2({}, TicksData)], Slider2.prototype, "ticks", void 0);
    __decorate53([Complex2({}, LimitData)], Slider2.prototype, "limits", void 0);
    __decorate53([Property2(true)], Slider2.prototype, "enabled", void 0);
    __decorate53([Complex2({}, TooltipData)], Slider2.prototype, "tooltip", void 0);
    __decorate53([Property2(false)], Slider2.prototype, "showButtons", void 0);
    __decorate53([Property2(true)], Slider2.prototype, "enableAnimation", void 0);
    __decorate53([Property2("Horizontal")], Slider2.prototype, "orientation", void 0);
    __decorate53([Property2("")], Slider2.prototype, "cssClass", void 0);
    __decorate53([Property2(true)], Slider2.prototype, "enableHtmlSanitizer", void 0);
    __decorate53([Event3()], Slider2.prototype, "created", void 0);
    __decorate53([Event3()], Slider2.prototype, "change", void 0);
    __decorate53([Event3()], Slider2.prototype, "changed", void 0);
    __decorate53([Event3()], Slider2.prototype, "renderingTicks", void 0);
    __decorate53([Event3()], Slider2.prototype, "renderedTicks", void 0);
    __decorate53([Event3()], Slider2.prototype, "tooltipChange", void 0);
    Slider2 = __decorate53([NotifyPropertyChanges2], Slider2);
    return Slider2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/form-validator/form-validator.js
var __extends55 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate54 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var regex = {
  /* eslint-disable no-useless-escape */
  EMAIL: new RegExp("^[A-Za-z0-9._%+-]{1,}@[A-Za-z0-9._%+-]{1,}([.]{1}[a-zA-Z0-9]{2,}|[.]{1}[a-zA-Z0-9]{2,4}[.]{1}[a-zA-Z0-9]{2,4})$"),
  /* eslint-disable-next-line security/detect-unsafe-regex */
  URL: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/m,
  DATE_ISO: new RegExp("^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"),
  DIGITS: new RegExp("^[0-9]*$"),
  PHONE: new RegExp("^[+]?[0-9]{9,13}$"),
  CREDITCARD: new RegExp("^\\d{13,16}$")
  /* eslint-enable no-useless-escape */
};
var ErrorOption;
(function(ErrorOption2) {
  ErrorOption2[ErrorOption2["Message"] = 0] = "Message";
  ErrorOption2[ErrorOption2["Label"] = 1] = "Label";
})(ErrorOption || (ErrorOption = {}));
var FormValidator = (
  /** @class */
  function(_super) {
    __extends55(FormValidator2, _super);
    function FormValidator2(element2, options) {
      var _this = _super.call(this, options, element2) || this;
      _this.validated = [];
      _this.errorRules = [];
      _this.allowSubmit = false;
      _this.required = "required";
      _this.infoElement = null;
      _this.inputElement = null;
      _this.selectQuery = "input:not([type=reset]):not([type=button]), select, textarea";
      _this.localyMessage = {};
      _this.defaultMessages = {
        required: "This field is required.",
        email: "Please enter a valid email address.",
        url: "Please enter a valid URL.",
        date: "Please enter a valid date.",
        dateIso: "Please enter a valid date ( ISO ).",
        creditcard: "Please enter valid card number",
        number: "Please enter a valid number.",
        digits: "Please enter only digits.",
        maxLength: "Please enter no more than {0} characters.",
        minLength: "Please enter at least {0} characters.",
        rangeLength: "Please enter a value between {0} and {1} characters long.",
        range: "Please enter a value between {0} and {1}.",
        max: "Please enter a value less than or equal to {0}.",
        min: "Please enter a value greater than or equal to {0}.",
        regex: "Please enter a correct value.",
        tel: "Please enter a valid phone number.",
        pattern: "Please enter a correct pattern value.",
        equalTo: "Please enter the valid match text"
      };
      if (typeof _this.rules === "undefined") {
        _this.rules = {};
      }
      _this.l10n = new L10n2("formValidator", _this.defaultMessages, _this.locale);
      if (_this.locale) {
        _this.localeFunc();
      }
      onIntlChange2.on("notifyExternalChange", _this.afterLocalization, _this);
      element2 = typeof element2 === "string" ? select2(element2, document) : element2;
      if (_this.element != null) {
        _this.element.setAttribute("novalidate", "");
        _this.inputElements = selectAll2(_this.selectQuery, _this.element);
        _this.createHTML5Rules();
        _this.wireEvents();
      } else {
        return void 0;
      }
      return _this;
    }
    FormValidator_1 = FormValidator2;
    FormValidator2.prototype.addRules = function(name, rules) {
      if (name) {
        if (this.rules.hasOwnProperty(name)) {
          extend2(this.rules["" + name], rules, {});
        } else {
          this.rules["" + name] = rules;
        }
      }
    };
    FormValidator2.prototype.removeRules = function(name, rules) {
      if (!name && !rules) {
        this.rules = {};
      } else if (this.rules["" + name] && !rules) {
        delete this.rules["" + name];
      } else if (!isNullOrUndefined2(this.rules["" + name] && rules)) {
        for (var i = 0; i < rules.length; i++) {
          delete this.rules["" + name][rules[parseInt(i.toString(), 10)]];
        }
      } else {
        return;
      }
    };
    FormValidator2.prototype.validate = function(selected) {
      var rules = Object.keys(this.rules);
      if (selected && rules.length) {
        this.validateRules(selected);
        return rules.indexOf(selected) !== -1 && this.errorRules.filter(function(data) {
          return data.name === selected;
        }).length === 0;
      } else {
        this.errorRules = [];
        for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) {
          var name_1 = rules_1[_i];
          this.validateRules(name_1);
        }
        return this.errorRules.length === 0;
      }
    };
    FormValidator2.prototype.reset = function() {
      this.element.reset();
      this.clearForm();
    };
    FormValidator2.prototype.getInputElement = function(name) {
      this.inputElement = select2('[name="' + name + '"]', this.element);
      return this.inputElement;
    };
    FormValidator2.prototype.destroy = function() {
      this.reset();
      this.unwireEvents();
      this.rules = {};
      var elements = selectAll2("." + this.errorClass + ", ." + this.validClass, this.element);
      for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
        var element2 = elements_1[_i];
        detach2(element2);
      }
      _super.prototype.destroy.call(this);
      this.infoElement = null;
      onIntlChange2.off("notifyExternalChange", this.afterLocalization);
    };
    FormValidator2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "locale":
            this.localeFunc();
            break;
        }
      }
    };
    FormValidator2.prototype.localeFunc = function() {
      for (var _i = 0, _a = Object.keys(this.defaultMessages); _i < _a.length; _i++) {
        var key = _a[_i];
        this.l10n.setLocale(this.locale);
        var value = this.l10n.getConstant(key);
        this.localyMessage["" + key] = value;
      }
    };
    FormValidator2.prototype.getModuleName = function() {
      return "formvalidator";
    };
    FormValidator2.prototype.afterLocalization = function(args) {
      this.locale = args.locale;
      this.localeFunc();
    };
    FormValidator2.prototype.refresh = function() {
      this.unwireEvents();
      this.inputElements = selectAll2(this.selectQuery, this.element);
      this.wireEvents();
    };
    FormValidator2.prototype.clearForm = function() {
      this.errorRules = [];
      this.validated = [];
      var elements = selectAll2(this.selectQuery, this.element);
      for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
        var element2 = elements_2[_i];
        var input2 = element2;
        input2.removeAttribute("aria-invalid");
        var inputParent = input2.parentElement;
        var grandParent = inputParent.parentElement;
        if (inputParent.classList.contains("e-control-wrapper") || inputParent.classList.contains("e-wrapper") || input2.classList.contains("e-input") && inputParent.classList.contains("e-input-group")) {
          inputParent.classList.remove(this.errorClass);
        } else if (grandParent != null && (grandParent.classList.contains("e-control-wrapper") || grandParent.classList.contains("e-wrapper"))) {
          grandParent.classList.remove(this.errorClass);
        } else {
          input2.classList.remove(this.errorClass);
        }
        if (input2.name.length > 0) {
          this.getInputElement(input2.name);
          this.getErrorElement(input2.name);
          this.hideMessage(input2.name);
        }
        if (inputParent.classList.contains("e-control-wrapper") || inputParent.classList.contains("e-wrapper") || input2.classList.contains("e-input") && inputParent.classList.contains("e-input-group")) {
          inputParent.classList.remove(this.validClass);
        } else if (grandParent != null && (grandParent.classList.contains("e-control-wrapper") || grandParent.classList.contains("e-wrapper"))) {
          grandParent.classList.remove(this.validClass);
        } else {
          input2.classList.remove(this.validClass);
        }
      }
    };
    FormValidator2.prototype.createHTML5Rules = function() {
      var defRules = ["required", "validateHidden", "regex", "rangeLength", "maxLength", "minLength", "dateIso", "digits", "pattern", "data-val-required", "type", "data-validation", "min", "max", "range", "equalTo", "data-val-minlength-min", "data-val-equalto-other", "data-val-maxlength-max", "data-val-range-min", "data-val-regex-pattern", "data-val-length-max", "data-val-creditcard", "data-val-phone"];
      var acceptedTypes = ["hidden", "email", "url", "date", "number", "tel"];
      for (var _i = 0, _a = this.inputElements; _i < _a.length; _i++) {
        var input2 = _a[_i];
        var allRule = {};
        for (var _b = 0, defRules_1 = defRules; _b < defRules_1.length; _b++) {
          var rule = defRules_1[_b];
          if (input2.getAttribute(rule) !== null) {
            switch (rule) {
              case "required":
                this.defRule(input2, allRule, rule, input2.required);
                break;
              case "data-validation":
                rule = input2.getAttribute(rule);
                this.defRule(input2, allRule, rule, true);
                break;
              case "type":
                if (acceptedTypes.indexOf(input2.type) !== -1) {
                  this.defRule(input2, allRule, input2.type, true);
                }
                break;
              case "rangeLength":
              case "range":
                this.defRule(input2, allRule, rule, JSON.parse(input2.getAttribute(rule)));
                break;
              case "equalTo":
                {
                  var id = input2.getAttribute(rule);
                  this.defRule(input2, allRule, rule, id);
                }
                break;
              default:
                if (input2.getAttribute("data-val") === "true") {
                  this.annotationRule(input2, allRule, rule, input2.getAttribute(rule));
                } else {
                  this.defRule(input2, allRule, rule, input2.getAttribute(rule));
                }
            }
          }
        }
        if (Object.keys(allRule).length !== 0) {
          this.addRules(input2.name, allRule);
        }
      }
    };
    FormValidator2.prototype.annotationRule = function(input2, ruleCon, ruleName, value) {
      var annotationRule = ruleName.split("-");
      var rulesList = ["required", "creditcard", "phone", "maxlength", "minlength", "range", "regex", "equalto"];
      var ruleFirstName = annotationRule[annotationRule.length - 1];
      var ruleSecondName = annotationRule[annotationRule.length - 2];
      if (rulesList.indexOf(ruleFirstName) !== -1) {
        switch (ruleFirstName) {
          case "required":
            this.defRule(input2, ruleCon, "required", value);
            break;
          case "creditcard":
            this.defRule(input2, ruleCon, "creditcard", value);
            break;
          case "phone":
            this.defRule(input2, ruleCon, "tel", value);
            break;
        }
      } else if (rulesList.indexOf(ruleSecondName) !== -1) {
        switch (ruleSecondName) {
          case "maxlength":
            this.defRule(input2, ruleCon, "maxLength", value);
            break;
          case "minlength":
            this.defRule(input2, ruleCon, "minLength", value);
            break;
          case "range":
            {
              var minvalue = input2.getAttribute("data-val-range-min");
              var maxvalue = input2.getAttribute("data-val-range-max");
              this.defRule(input2, ruleCon, "range", [minvalue, maxvalue]);
            }
            break;
          case "equalto":
            {
              var id = input2.getAttribute(ruleName).split(".");
              this.defRule(input2, ruleCon, "equalTo", id[id.length - 1]);
            }
            break;
          case "regex":
            this.defRule(input2, ruleCon, "regex", value);
            break;
        }
      }
    };
    FormValidator2.prototype.defRule = function(input2, ruleCon, ruleName, value) {
      var message = input2.getAttribute("data-" + ruleName + "-message");
      var annotationMessage = input2.getAttribute("data-val-" + ruleName);
      var customMessage;
      if (this.rules[input2.name] && ruleName !== "validateHidden" && ruleName !== "hidden") {
        this.getInputElement(input2.name);
        customMessage = this.getErrorMessage(this.rules[input2.name]["" + ruleName], ruleName);
      }
      if (message) {
        value = [value, message];
      } else if (annotationMessage) {
        value = [value, annotationMessage];
      } else if (customMessage) {
        value = [value, customMessage];
      }
      ruleCon["" + ruleName] = value;
    };
    FormValidator2.prototype.wireEvents = function() {
      for (var _i = 0, _a = this.inputElements; _i < _a.length; _i++) {
        var input2 = _a[_i];
        if (FormValidator_1.isCheckable(input2)) {
          EventHandler2.add(input2, "click", this.clickHandler, this);
        } else if (input2.tagName === "SELECT") {
          EventHandler2.add(input2, "change", this.changeHandler, this);
        } else {
          EventHandler2.add(input2, "focusout", this.focusOutHandler, this);
          EventHandler2.add(input2, "keyup", this.keyUpHandler, this);
        }
      }
      EventHandler2.add(this.element, "submit", this.submitHandler, this);
      EventHandler2.add(this.element, "reset", this.resetHandler, this);
    };
    FormValidator2.prototype.unwireEvents = function() {
      for (var _i = 0, _a = this.inputElements; _i < _a.length; _i++) {
        var input2 = _a[_i];
        EventHandler2.clearEvents(input2);
      }
      EventHandler2.remove(this.element, "submit", this.submitHandler);
      EventHandler2.remove(this.element, "reset", this.resetHandler);
    };
    FormValidator2.prototype.focusOutHandler = function(e) {
      this.trigger("focusout", e);
      var element2 = e.target;
      if (this.rules[element2.name]) {
        if (this.rules[element2.name][this.required] || element2.value.length > 0) {
          this.validate(element2.name);
        } else if (this.validated.indexOf(element2.name) === -1) {
          this.validated.push(element2.name);
        }
      }
    };
    FormValidator2.prototype.keyUpHandler = function(e) {
      this.trigger("keyup", e);
      var element2 = e.target;
      var excludeKeys = [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225];
      if (e.which === 9 && (!this.rules[element2.name] || this.rules[element2.name] && !this.rules[element2.name][this.required])) {
        return;
      }
      if (this.validated.indexOf(element2.name) !== -1 && this.rules[element2.name] && excludeKeys.indexOf(e.which) === -1) {
        this.validate(element2.name);
      }
    };
    FormValidator2.prototype.clickHandler = function(e) {
      this.trigger("click", e);
      var element2 = e.target;
      if (element2.type !== "submit") {
        this.validate(element2.name);
      } else if (element2.getAttribute("formnovalidate") !== null) {
        this.allowSubmit = true;
      }
    };
    FormValidator2.prototype.changeHandler = function(e) {
      this.trigger("change", e);
      var element2 = e.target;
      this.validate(element2.name);
    };
    FormValidator2.prototype.submitHandler = function(e) {
      this.trigger("submit", e);
      if (!this.allowSubmit && !this.validate()) {
        e.preventDefault();
      } else {
        this.allowSubmit = false;
      }
    };
    FormValidator2.prototype.resetHandler = function() {
      this.clearForm();
    };
    FormValidator2.prototype.validateRules = function(name) {
      if (!this.rules["" + name]) {
        return;
      }
      var rules = Object.keys(this.rules["" + name]);
      var hiddenType = false;
      var validateHiddenType = false;
      var vhPos = rules.indexOf("validateHidden");
      var hPos = rules.indexOf("hidden");
      this.getInputElement(name);
      if (hPos !== -1) {
        hiddenType = true;
      }
      if (vhPos !== -1) {
        validateHiddenType = true;
      }
      if (!hiddenType || hiddenType && validateHiddenType) {
        if (vhPos !== -1) {
          rules.splice(vhPos, 1);
        }
        if (hPos !== -1) {
          rules.splice(hPos - 1, 1);
        }
        this.getErrorElement(name);
        for (var _i = 0, rules_2 = rules; _i < rules_2.length; _i++) {
          var rule = rules_2[_i];
          var errorMessage = this.getErrorMessage(this.rules["" + name]["" + rule], rule);
          var errorRule = {
            name,
            message: errorMessage
          };
          var eventArgs = {
            inputName: name,
            element: this.inputElement,
            message: errorMessage
          };
          if (!this.isValid(name, rule) && !this.inputElement.classList.contains(this.ignore)) {
            this.removeErrorRules(name);
            this.errorRules.push(errorRule);
            this.inputElement.setAttribute("aria-invalid", "true");
            this.inputElement.setAttribute("aria-describedby", this.inputElement.id + "-info");
            var inputParent = this.inputElement.parentElement;
            var grandParent = inputParent.parentElement;
            if (inputParent.classList.contains("e-control-wrapper") || inputParent.classList.contains("e-wrapper") || this.inputElement.classList.contains("e-input") && inputParent.classList.contains("e-input-group")) {
              inputParent.classList.add(this.errorClass);
              inputParent.classList.remove(this.validClass);
            } else if (grandParent != null && (grandParent.classList.contains("e-control-wrapper") || grandParent.classList.contains("e-wrapper"))) {
              grandParent.classList.add(this.errorClass);
              grandParent.classList.remove(this.validClass);
            } else {
              this.inputElement.classList.add(this.errorClass);
              this.inputElement.classList.remove(this.validClass);
            }
            if (!this.infoElement) {
              this.createErrorElement(name, errorRule.message, this.inputElement);
            } else {
              this.showMessage(errorRule);
            }
            eventArgs.errorElement = this.infoElement;
            eventArgs.status = "failure";
            if (inputParent.classList.contains("e-control-wrapper") || inputParent.classList.contains("e-wrapper") || this.inputElement.classList.contains("e-input") && inputParent.classList.contains("e-input-group")) {
              inputParent.classList.add(this.errorClass);
              inputParent.classList.remove(this.validClass);
            } else if (grandParent != null && (grandParent.classList.contains("e-control-wrapper") || grandParent.classList.contains("e-wrapper"))) {
              grandParent.classList.add(this.errorClass);
              grandParent.classList.remove(this.validClass);
            } else {
              this.inputElement.classList.add(this.errorClass);
              this.inputElement.classList.remove(this.validClass);
            }
            this.optionalValidationStatus(name, eventArgs);
            this.trigger("validationComplete", eventArgs);
            if (rule === "required") {
              this.inputElement.setAttribute("aria-required", "true");
            }
            break;
          } else {
            this.hideMessage(name);
            eventArgs.status = "success";
            this.trigger("validationComplete", eventArgs);
          }
        }
      } else {
        return;
      }
    };
    FormValidator2.prototype.optionalValidationStatus = function(name, refer) {
      if (!this.rules["" + name][this.required] && !this.inputElement.value.length && !isNullOrUndefined2(this.infoElement)) {
        this.infoElement.innerHTML = this.inputElement.value;
        this.infoElement.setAttribute("aria-invalid", "false");
        refer.status = "";
        this.hideMessage(name);
      }
    };
    FormValidator2.prototype.isValid = function(name, rule) {
      var params = this.rules["" + name]["" + rule];
      var param = params instanceof Array && typeof params[1] === "string" ? params[0] : params;
      var currentRule = this.rules["" + name]["" + rule];
      var dateFormat = (rule === "min" || rule === "max") && this.rules["" + name].date && typeof this.rules["" + name].date === "string" ? this.rules["" + name].date : null;
      var args = {
        value: this.inputElement.value,
        param,
        element: this.inputElement,
        formElement: this.element,
        format: dateFormat,
        culture: this.locale
      };
      this.trigger("validationBegin", args);
      if (!args.param && rule === "required") {
        return true;
      }
      if (currentRule && typeof currentRule[0] === "function") {
        var fn = currentRule[0];
        return fn.call(this, {
          element: this.inputElement,
          value: this.inputElement.value
        });
      } else if (FormValidator_1.isCheckable(this.inputElement)) {
        if (rule !== "required") {
          return true;
        }
        return selectAll2('input[name="' + name + '"]:checked', this.element).length > 0;
      } else {
        return FormValidator_1.checkValidator["" + rule](args);
      }
    };
    FormValidator2.prototype.getErrorMessage = function(ruleValue, rule) {
      var message = this.inputElement.getAttribute("data-" + rule + "-message") ? this.inputElement.getAttribute("data-" + rule + "-message") : ruleValue instanceof Array && typeof ruleValue[1] === "string" ? ruleValue[1] : Object.keys(this.localyMessage).length !== 0 ? this.localyMessage["" + rule] : this.defaultMessages["" + rule];
      var formats = message.match(/{(\d)}/g);
      if (!isNullOrUndefined2(formats)) {
        for (var i = 0; i < formats.length; i++) {
          var value = ruleValue instanceof Array ? ruleValue[parseInt(i.toString(), 10)] : ruleValue;
          message = message.replace(formats[parseInt(i.toString(), 10)], value);
        }
      }
      return message;
    };
    FormValidator2.prototype.createErrorElement = function(name, message, input2) {
      var errorElement = createElement2(this.errorElement, {
        className: this.errorClass,
        innerHTML: message,
        attrs: {
          for: name
        }
      });
      if (this.errorOption === ErrorOption.Message) {
        errorElement.classList.remove(this.errorClass);
        errorElement.classList.add("e-message");
        errorElement = createElement2(this.errorContainer, {
          className: this.errorClass,
          innerHTML: errorElement.outerHTML
        });
      }
      errorElement.id = this.inputElement.name + "-info";
      if (this.element.querySelector('[data-valmsg-for="' + input2.id + '"]')) {
        this.element.querySelector('[data-valmsg-for="' + input2.id + '"]').appendChild(errorElement);
      } else if (input2.hasAttribute("data-msg-containerid") === true) {
        var containerId = input2.getAttribute("data-msg-containerid");
        var divElement = select2("#" + containerId, this.element);
        divElement.appendChild(errorElement);
      } else if (this.customPlacement != null) {
        this.customPlacement.call(this, this.inputElement, errorElement);
      } else {
        var inputParent = this.inputElement.parentElement;
        var grandParent = inputParent.parentElement;
        if (inputParent.classList.contains("e-control-wrapper") || inputParent.classList.contains("e-wrapper")) {
          grandParent.insertBefore(errorElement, inputParent.nextSibling);
        } else if (grandParent.classList.contains("e-control-wrapper") || grandParent.classList.contains("e-wrapper")) {
          grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);
        } else {
          inputParent.insertBefore(errorElement, this.inputElement.nextSibling);
        }
      }
      errorElement.style.display = "block";
      this.getErrorElement(name);
      this.validated.push(name);
      this.checkRequired(name);
    };
    FormValidator2.prototype.getErrorElement = function(name) {
      this.infoElement = select2(this.errorElement + "." + this.errorClass, this.inputElement.parentElement);
      if (!this.infoElement) {
        this.infoElement = select2(this.errorElement + "." + this.errorClass + '[for="' + name + '"]', this.element);
      }
      return this.infoElement;
    };
    FormValidator2.prototype.removeErrorRules = function(name) {
      for (var i = 0; i < this.errorRules.length; i++) {
        var rule = this.errorRules[parseInt(i.toString(), 10)];
        if (rule.name === name) {
          this.errorRules.splice(i, 1);
        }
      }
    };
    FormValidator2.prototype.showMessage = function(errorRule) {
      this.infoElement.style.display = "block";
      this.infoElement.innerHTML = errorRule.message;
      this.checkRequired(errorRule.name);
    };
    FormValidator2.prototype.hideMessage = function(name) {
      if (this.infoElement) {
        this.infoElement.style.display = "none";
        this.removeErrorRules(name);
        var inputParent = this.inputElement.parentElement;
        var grandParent = inputParent.parentElement;
        if (inputParent.classList.contains("e-control-wrapper") || inputParent.classList.contains("e-wrapper") || this.inputElement.classList.contains("e-input") && inputParent.classList.contains("e-input-group")) {
          inputParent.classList.add(this.validClass);
          inputParent.classList.remove(this.errorClass);
        } else if (grandParent != null && (grandParent.classList.contains("e-control-wrapper") || grandParent.classList.contains("e-wrapper"))) {
          grandParent.classList.add(this.validClass);
          grandParent.classList.remove(this.errorClass);
        } else {
          this.inputElement.classList.add(this.validClass);
          this.inputElement.classList.remove(this.errorClass);
        }
        this.inputElement.setAttribute("aria-invalid", "false");
      }
    };
    FormValidator2.prototype.checkRequired = function(name) {
      if (!this.rules["" + name][this.required] && !this.inputElement.value.length && !isNullOrUndefined2(this.infoElement)) {
        this.infoElement.innerHTML = this.inputElement.value;
        this.infoElement.setAttribute("aria-invalid", "false");
        this.hideMessage(name);
      }
    };
    FormValidator2.isCheckable = function(input2) {
      var inputType = input2.getAttribute("type");
      return inputType && (inputType === "checkbox" || inputType === "radio" || inputType === "submit");
    };
    var FormValidator_1;
    FormValidator2.checkValidator = {
      required: function(option) {
        return !isNaN(Date.parse(option.value)) ? !isNaN(new Date(option.value).getTime()) : option.value.toString().length > 0;
      },
      email: function(option) {
        return regex.EMAIL.test(option.value);
      },
      url: function(option) {
        return regex.URL.test(option.value);
      },
      dateIso: function(option) {
        return regex.DATE_ISO.test(option.value);
      },
      tel: function(option) {
        return regex.PHONE.test(option.value);
      },
      creditcard: function(option) {
        return regex.CREDITCARD.test(option.value);
      },
      number: function(option) {
        return !isNaN(Number(option.value)) && option.value.indexOf(" ") === -1;
      },
      digits: function(option) {
        return regex.DIGITS.test(option.value);
      },
      maxLength: function(option) {
        return option.value.length <= Number(option.param);
      },
      minLength: function(option) {
        return option.value.length >= Number(option.param);
      },
      rangeLength: function(option) {
        var param = option.param;
        return option.value.length >= param[0] && option.value.length <= param[1];
      },
      range: function(option) {
        var param = option.param;
        return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
      },
      date: function(option) {
        if (!isNullOrUndefined2(option.param) && typeof option.param === "string" && option.param !== "") {
          var globalize = option.culture && option.culture !== "" ? new Internationalization2(option.culture) : new Internationalization2();
          var dateOptions = {
            format: option.param.toString(),
            type: "dateTime",
            skeleton: "yMd"
          };
          var dateValue = globalize.parseDate(option.value, dateOptions);
          return !isNullOrUndefined2(dateValue) && dateValue instanceof Date && !isNaN(+dateValue);
        } else {
          return !isNaN(new Date(option.value).getTime());
        }
      },
      max: function(option) {
        if (!isNaN(Number(option.value))) {
          return +option.value <= +option.param;
        }
        if (option.format && option.format !== "") {
          var globalize = option.culture && option.culture !== "" ? new Internationalization2(option.culture) : new Internationalization2();
          var dateOptions = {
            format: option.format.toString(),
            type: "dateTime",
            skeleton: "yMd"
          };
          var dateValue = globalize.parseDate(option.value, dateOptions);
          var maxValue = typeof option.param === "string" ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
          return new Date(dateValue).getTime() <= new Date(maxValue).getTime();
        } else {
          return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
        }
      },
      min: function(option) {
        if (!isNaN(Number(option.value))) {
          return +option.value >= +option.param;
        } else if (option.value.indexOf(",") !== -1) {
          var uNum = option.value.replace(/,/g, "");
          return parseFloat(uNum) >= Number(option.param);
        } else {
          if (option.format && option.format !== "") {
            var globalize = option.culture && option.culture !== "" ? new Internationalization2(option.culture) : new Internationalization2();
            var dateOptions = {
              format: option.format.toString(),
              type: "dateTime",
              skeleton: "yMd"
            };
            var dateValue = globalize.parseDate(option.value, dateOptions);
            var minValue = typeof option.param === "string" ? globalize.parseDate(JSON.parse(JSON.stringify(option.param)), dateOptions) : option.param;
            return new Date(dateValue).getTime() >= new Date(minValue).getTime();
          } else {
            return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
          }
        }
      },
      regex: function(option) {
        return new RegExp(option.param).test(option.value);
      },
      equalTo: function(option) {
        var compareTo = option.formElement.querySelector("#" + option.param);
        option.param = compareTo.value;
        return option.param === option.value;
      }
    };
    __decorate54([Property2("")], FormValidator2.prototype, "locale", void 0);
    __decorate54([Property2("e-hidden")], FormValidator2.prototype, "ignore", void 0);
    __decorate54([Property2()], FormValidator2.prototype, "rules", void 0);
    __decorate54([Property2("e-error")], FormValidator2.prototype, "errorClass", void 0);
    __decorate54([Property2("e-valid")], FormValidator2.prototype, "validClass", void 0);
    __decorate54([Property2("label")], FormValidator2.prototype, "errorElement", void 0);
    __decorate54([Property2("div")], FormValidator2.prototype, "errorContainer", void 0);
    __decorate54([Property2(ErrorOption.Label)], FormValidator2.prototype, "errorOption", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "focusout", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "keyup", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "click", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "change", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "submit", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "validationBegin", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "validationComplete", void 0);
    __decorate54([Event3()], FormValidator2.prototype, "customPlacement", void 0);
    FormValidator2 = FormValidator_1 = __decorate54([NotifyPropertyChanges2], FormValidator2);
    return FormValidator2;
  }(Base2)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/uploader/uploader.js
var __extends56 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate55 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CONTROL_WRAPPER = "e-upload e-control-wrapper";
var INPUT_WRAPPER = "e-file-select";
var DROP_AREA = "e-file-drop";
var DROP_WRAPPER = "e-file-select-wrap";
var LIST_PARENT = "e-upload-files";
var FILE = "e-upload-file-list";
var STATUS = "e-file-status";
var ACTION_BUTTONS = "e-upload-actions";
var UPLOAD_BUTTONS = "e-file-upload-btn e-css e-btn e-flat e-primary";
var CLEAR_BUTTONS = "e-file-clear-btn e-css e-btn e-flat";
var FILE_NAME = "e-file-name";
var FILE_TYPE = "e-file-type";
var FILE_SIZE = "e-file-size";
var REMOVE_ICON = "e-file-remove-btn";
var DELETE_ICON = "e-file-delete-btn";
var SPINNER_PANE = "e-spinner-pane";
var ABORT_ICON = "e-file-abort-btn";
var RETRY_ICON = "e-file-reload-btn";
var DRAG_HOVER = "e-upload-drag-hover";
var PROGRESS_WRAPPER = "e-upload-progress-wrap";
var PROGRESSBAR = "e-upload-progress-bar";
var PROGRESSBAR_TEXT = "e-progress-bar-text";
var UPLOAD_INPROGRESS = "e-upload-progress";
var UPLOAD_SUCCESS = "e-upload-success";
var UPLOAD_FAILED = "e-upload-fails";
var TEXT_CONTAINER = "e-file-container";
var VALIDATION_FAILS = "e-validation-fails";
var RTL11 = "e-rtl";
var DISABLED7 = "e-disabled";
var RTL_CONTAINER = "e-rtl-container";
var ICON_FOCUSED = "e-clear-icon-focus";
var PROGRESS_INNER_WRAPPER = "e-progress-inner-wrap";
var PAUSE_UPLOAD = "e-file-pause-btn";
var RESUME_UPLOAD = "e-file-play-btn";
var RESTRICT_RETRY = "e-restrict-retry";
var wrapperAttr2 = ["title", "style", "class"];
var FORM_UPLOAD = "e-form-upload";
var HIDDEN_INPUT = "e-hidden-file-input";
var INVALID_FILE = "e-file-invalid";
var INFORMATION = "e-file-information";
var FilesProp = (
  /** @class */
  function(_super) {
    __extends56(FilesProp2, _super);
    function FilesProp2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate55([Property2("")], FilesProp2.prototype, "name", void 0);
    __decorate55([Property2(null)], FilesProp2.prototype, "size", void 0);
    __decorate55([Property2("")], FilesProp2.prototype, "type", void 0);
    return FilesProp2;
  }(ChildProperty2)
);
var ButtonsProps = (
  /** @class */
  function(_super) {
    __extends56(ButtonsProps2, _super);
    function ButtonsProps2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate55([Property2("Browse...")], ButtonsProps2.prototype, "browse", void 0);
    __decorate55([Property2("Upload")], ButtonsProps2.prototype, "upload", void 0);
    __decorate55([Property2("Clear")], ButtonsProps2.prototype, "clear", void 0);
    return ButtonsProps2;
  }(ChildProperty2)
);
var AsyncSettings = (
  /** @class */
  function(_super) {
    __extends56(AsyncSettings2, _super);
    function AsyncSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate55([Property2("")], AsyncSettings2.prototype, "saveUrl", void 0);
    __decorate55([Property2("")], AsyncSettings2.prototype, "removeUrl", void 0);
    __decorate55([Property2(0)], AsyncSettings2.prototype, "chunkSize", void 0);
    __decorate55([Property2(3)], AsyncSettings2.prototype, "retryCount", void 0);
    __decorate55([Property2(500)], AsyncSettings2.prototype, "retryAfterDelay", void 0);
    return AsyncSettings2;
  }(ChildProperty2)
);
var Uploader = (
  /** @class */
  function(_super) {
    __extends56(Uploader2, _super);
    function Uploader2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.initialAttr = {
        accept: null,
        multiple: false,
        disabled: false
      };
      _this.uploadedFilesData = [];
      _this.base64String = [];
      _this.isForm = false;
      _this.allTypes = false;
      _this.pausedData = [];
      _this.uploadMetaData = [];
      _this.tabIndex = "0";
      _this.btnTabIndex = "0";
      _this.disableKeyboardNavigation = false;
      _this.count = -1;
      _this.actionCompleteCount = 0;
      _this.flag = true;
      _this.selectedFiles = [];
      _this.uploaderName = "UploadFiles";
      _this.fileStreams = [];
      _this.newFileRef = 0;
      _this.isFirstFileOnSelection = false;
      _this.dragCounter = 0;
      _this.fileList = [];
      _this.filesData = [];
      _this.uploaderOptions = options;
      return _this;
    }
    Uploader2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "allowedExtensions":
            this.setExtensions(this.allowedExtensions);
            this.clearAll();
            break;
          case "enabled":
            this.setControlStatus();
            break;
          case "multiple":
            this.setMultipleSelection();
            break;
          case "enableRtl":
            this.setRTL();
            this.reRenderFileList();
            break;
          case "buttons":
            this.buttons.browse = isNullOrUndefined2(this.buttons.browse) ? "" : this.buttons.browse;
            this.buttons.clear = isNullOrUndefined2(this.buttons.clear) ? "" : this.buttons.clear;
            this.buttons.upload = isNullOrUndefined2(this.buttons.upload) ? "" : this.buttons.upload;
            this.renderButtonTemplates();
            break;
          case "dropArea":
            this.unBindDropEvents();
            this.updateDropArea();
            break;
          case "htmlAttributes":
            this.updateHTMLAttrToElement();
            this.updateHTMLAttrToWrapper();
            this.checkHTMLAttributes(true);
            break;
          case "files":
            this.renderPreLoadFiles();
            break;
          case "directoryUpload":
            this.updateDirectoryAttributes();
            break;
          case "template":
            if (this.isReact) {
              this.reRenderFileList();
            } else {
              this.clearAll();
            }
            break;
          case "minFileSize":
          case "maxFileSize":
          case "autoUpload":
            this.clearAll();
            break;
          case "sequentialUpload":
            this.clearAll();
            break;
          case "locale":
            this.l10n.setLocale(this.locale);
            this.setLocalizedTexts();
            this.preLocaleObj = getValue2("currentLocale", this.l10n);
            break;
          case "cssClass":
            this.setCSSClass(oldProp.cssClass);
            break;
        }
      }
    };
    Uploader2.prototype.setLocalizedTexts = function() {
      if (isNullOrUndefined2(this.template)) {
        if (typeof this.buttons.browse === "string") {
          this.browseButton.innerText = this.buttons.browse === "Browse..." ? this.localizedTexts("Browse") : this.buttons.browse;
          this.browseButton.setAttribute("title", this.browseButton.innerText);
          if (this.uploadWrapper && !isNullOrUndefined2(this.uploadWrapper.querySelector("." + DROP_AREA))) {
            this.uploadWrapper.querySelector("." + DROP_AREA).innerHTML = this.localizedTexts("dropFilesHint");
          }
        }
        this.updateFileList();
      }
    };
    Uploader2.prototype.getKeyValue = function(val) {
      var keyValue;
      for (var _i = 0, _a = Object.keys(this.preLocaleObj); _i < _a.length; _i++) {
        var key = _a[_i];
        if (this.preLocaleObj["" + key] === val) {
          keyValue = key;
        }
      }
      return keyValue;
    };
    Uploader2.prototype.updateFileList = function() {
      var element2;
      if (this.fileList.length > 0 && !isNullOrUndefined2(this.uploadWrapper.querySelector("." + LIST_PARENT))) {
        for (var i = 0; i < this.fileList.length; i++) {
          element2 = this.fileList[i].querySelector(".e-file-status");
          element2.innerHTML = this.localizedTexts(this.getKeyValue(this.filesData[i].status));
          this.filesData[i].status = this.localizedTexts(this.getKeyValue(this.filesData[i].status));
          if (this.fileList[i].classList.contains(UPLOAD_SUCCESS)) {
            this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("delete"));
          }
          if (this.fileList[i].querySelector(".e-file-play-btn")) {
            this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("resume"));
          }
          if (this.fileList[i].querySelector(".e-file-remove-btn")) {
            this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("remove"));
          }
          if (this.fileList[i].querySelector(".e-file-reload-btn")) {
            this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("retry"));
          }
          if (!this.autoUpload) {
            this.uploadButton.innerText = this.buttons.upload === "Upload" ? this.localizedTexts("Upload") : this.buttons.upload;
            this.uploadButton.setAttribute("title", this.localizedTexts("Upload"));
            this.clearButton.innerText = this.buttons.clear === "Clear" ? this.localizedTexts("Clear") : this.buttons.clear;
            this.clearButton.setAttribute("title", this.localizedTexts("Clear"));
          }
        }
      }
    };
    Uploader2.prototype.reRenderFileList = function() {
      if (this.listParent) {
        detach2(this.listParent);
        this.listParent = null;
        this.fileList = [];
        this.internalCreateFileList(this.filesData);
        if (this.actionButtons) {
          this.removeActionButtons();
          this.renderActionButtons();
          this.checkActionButtonStatus();
        }
      }
    };
    Uploader2.prototype.preRender = function() {
      this.localeText = {
        Browse: "Browse...",
        Clear: "Clear",
        Upload: "Upload",
        invalidFileName: "File Name is not allowed",
        dropFilesHint: "Or drop files here",
        invalidMaxFileSize: "File size is too large",
        invalidMinFileSize: "File size is too small",
        invalidFileType: "File type is not allowed",
        uploadFailedMessage: "File failed to upload",
        uploadSuccessMessage: "File uploaded successfully",
        removedSuccessMessage: "File removed successfully",
        removedFailedMessage: "Unable to remove file",
        inProgress: "Uploading",
        readyToUploadMessage: "Ready to upload",
        abort: "Abort",
        remove: "Remove",
        cancel: "Cancel",
        delete: "Delete file",
        pauseUpload: "File upload paused",
        pause: "Pause",
        resume: "Resume",
        retry: "Retry",
        fileUploadCancel: "File upload canceled",
        invalidFileSelection: "Invalid files selected",
        totalFiles: "Total files",
        size: "Size"
      };
      this.l10n = new L10n2("uploader", this.localeText, this.locale);
      this.preLocaleObj = getValue2("currentLocale", this.l10n);
      this.formRendered();
      this.updateHTMLAttrToElement();
      this.checkHTMLAttributes(false);
      var ejInstance = getValue2("ej2_instances", this.element);
      if (this.element.tagName === "EJS-UPLOADER") {
        var inputElement = this.createElement("input", {
          attrs: {
            type: "file"
          }
        });
        var index = 0;
        for (index; index < this.element.attributes.length; index++) {
          if (this.element.attributes[index].nodeName !== "id") {
            inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
          } else if (this.element.attributes[index].nodeName === "id") {
            inputElement.setAttribute(this.element.attributes[index].nodeName, getUniqueID("uploader"));
          }
          inputElement.innerHTML = this.element.innerHTML;
        }
        if (!inputElement.hasAttribute("name")) {
          inputElement.setAttribute("name", "UploadFiles");
        }
        this.element.appendChild(inputElement);
        this.element = inputElement;
        setValue3("ej2_instances", ejInstance, this.element);
      }
      if (ejInstance[0].isPureReactComponent) {
        if (!isNullOrUndefined2(ejInstance[0].props.name)) {
          this.element.setAttribute("name", ejInstance[0].props.name);
        } else if (!isNullOrUndefined2(ejInstance[0].props.id) && isNullOrUndefined2(ejInstance[0].props.name)) {
          this.element.setAttribute("name", ejInstance[0].props.id);
        } else {
          this.element.setAttribute("name", "UploadFiles");
        }
      }
      if (isNullOrUndefined2(this.element.getAttribute("name"))) {
        this.element.setAttribute("name", this.element.getAttribute("id"));
      }
      if (!this.element.hasAttribute("type")) {
        this.element.setAttribute("type", "file");
      }
      this.updateDirectoryAttributes();
      this.keyConfigs = {
        enter: "enter"
      };
      if (this.element.hasAttribute("tabindex")) {
        this.tabIndex = this.element.getAttribute("tabindex");
      }
      this.browserName = Browser2.info.name;
      this.uploaderName = this.element.getAttribute("name");
    };
    Uploader2.prototype.formRendered = function() {
      var parentEle = closest2(this.element, "form");
      if (!isNullOrUndefined2(parentEle)) {
        for (; parentEle && parentEle !== document.documentElement; parentEle = parentEle.parentElement) {
          if (parentEle.tagName === "FORM") {
            this.isForm = true;
            this.formElement = parentEle;
            parentEle.setAttribute("enctype", "multipart/form-data");
            parentEle.setAttribute("encoding", "multipart/form-data");
          }
        }
      }
    };
    Uploader2.prototype.getPersistData = function() {
      return this.addOnPersist(["filesData"]);
    };
    Uploader2.prototype.getModuleName = function() {
      return "uploader";
    };
    Uploader2.prototype.updateDirectoryAttributes = function() {
      if (this.directoryUpload) {
        this.element.setAttribute("directory", "true");
        this.element.setAttribute("webkitdirectory", "true");
      } else {
        this.element.removeAttribute("directory");
        this.element.removeAttribute("webkitdirectory");
      }
    };
    Uploader2.prototype.render = function() {
      this.renderBrowseButton();
      this.initializeUpload();
      this.updateHTMLAttrToWrapper();
      this.wireEvents();
      this.setMultipleSelection();
      this.setExtensions(this.allowedExtensions);
      this.setRTL();
      this.renderPreLoadFiles();
      this.setControlStatus();
      this.setCSSClass();
    };
    Uploader2.prototype.renderBrowseButton = function() {
      this.browseButton = this.createElement("button", {
        className: "e-css e-btn",
        attrs: {
          "type": "button"
        }
      });
      this.browseButton.setAttribute("tabindex", this.tabIndex);
      if (typeof this.buttons.browse === "string") {
        this.browseButton.textContent = this.buttons.browse === "Browse..." ? this.localizedTexts("Browse") : this.buttons.browse;
        this.browseButton.setAttribute("title", this.browseButton.innerText);
      } else {
        this.browseButton.appendChild(this.buttons.browse);
      }
      this.element.setAttribute("aria-label", "Uploader");
    };
    Uploader2.prototype.renderActionButtons = function() {
      this.element.setAttribute("tabindex", "-1");
      this.actionButtons = this.createElement("div", {
        className: ACTION_BUTTONS
      });
      this.uploadButton = this.createElement("button", {
        className: UPLOAD_BUTTONS,
        attrs: {
          "type": "button",
          "tabindex": this.btnTabIndex,
          "aria-label": this.localizedTexts("Upload")
        }
      });
      this.clearButton = this.createElement("button", {
        className: CLEAR_BUTTONS,
        attrs: {
          "type": "button",
          "tabindex": this.btnTabIndex,
          "aria-label": this.localizedTexts("Clear")
        }
      });
      this.actionButtons.appendChild(this.clearButton);
      this.actionButtons.appendChild(this.uploadButton);
      this.renderButtonTemplates();
      this.uploadWrapper.appendChild(this.actionButtons);
      this.browseButton.blur();
      if (!this.isPreloadFiles) {
        this.uploadButton.focus();
      }
      this.wireActionButtonEvents();
    };
    Uploader2.prototype.serverActionButtonsEventBind = function(element2) {
      if (element2 && !this.isForm) {
        this.browseButton.blur();
        this.actionButtons = element2;
        this.uploadButton = this.actionButtons.querySelector(".e-file-upload-btn");
        this.clearButton = this.actionButtons.querySelector(".e-file-clear-btn");
        this.uploadButton.focus();
        this.unwireActionButtonEvents();
        this.wireActionButtonEvents();
        this.checkActionButtonStatus();
      }
    };
    Uploader2.prototype.wireActionButtonEvents = function() {
      EventHandler2.add(this.uploadButton, "click", this.uploadButtonClick, this);
      EventHandler2.add(this.clearButton, "click", this.clearButtonClick, this);
    };
    Uploader2.prototype.unwireActionButtonEvents = function() {
      EventHandler2.remove(this.uploadButton, "click", this.uploadButtonClick);
      EventHandler2.remove(this.clearButton, "click", this.clearButtonClick);
    };
    Uploader2.prototype.removeActionButtons = function() {
      if (this.actionButtons) {
        this.unwireActionButtonEvents();
        detach2(this.actionButtons);
        this.actionButtons = null;
      }
    };
    Uploader2.prototype.renderButtonTemplates = function() {
      if (typeof this.buttons.browse === "string") {
        this.browseButton.textContent = this.buttons.browse === "Browse..." ? this.localizedTexts("Browse") : this.buttons.browse;
        this.browseButton.setAttribute("title", this.browseButton.textContent);
      } else {
        this.browseButton.innerHTML = "";
        this.browseButton.appendChild(this.buttons.browse);
      }
      if (this.uploadButton) {
        var uploadText = isNullOrUndefined2(this.buttons.upload) ? "Upload" : this.buttons.upload;
        this.buttons.upload = uploadText;
        if (typeof this.buttons.upload === "string") {
          this.uploadButton.textContent = this.buttons.upload === "Upload" ? this.localizedTexts("Upload") : this.buttons.upload;
          this.uploadButton.setAttribute("title", this.uploadButton.textContent);
        } else {
          this.uploadButton.innerHTML = "";
          this.uploadButton.appendChild(this.buttons.upload);
        }
      }
      if (this.clearButton) {
        var clearText = isNullOrUndefined2(this.buttons.clear) ? "Clear" : this.buttons.clear;
        this.buttons.clear = clearText;
        if (typeof this.buttons.clear === "string") {
          this.clearButton.textContent = this.buttons.clear === "Clear" ? this.localizedTexts("Clear") : this.buttons.clear;
          this.clearButton.setAttribute("title", this.clearButton.textContent);
        } else {
          this.clearButton.innerHTML = "";
          this.clearButton.appendChild(this.buttons.clear);
        }
      }
    };
    Uploader2.prototype.initializeUpload = function() {
      this.element.setAttribute("tabindex", "-1");
      var inputWrapper = this.createElement("span", {
        className: INPUT_WRAPPER
      });
      this.element.parentElement.insertBefore(inputWrapper, this.element);
      this.dropAreaWrapper = this.createElement("div", {
        className: DROP_WRAPPER
      });
      this.element.parentElement.insertBefore(this.dropAreaWrapper, this.element);
      inputWrapper.appendChild(this.element);
      this.dropAreaWrapper.appendChild(this.browseButton);
      this.dropAreaWrapper.appendChild(inputWrapper);
      this.uploadWrapper = this.createElement("div", {
        className: CONTROL_WRAPPER
      });
      this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper, this.dropAreaWrapper);
      this.uploadWrapper.appendChild(this.dropAreaWrapper);
      this.setDropArea();
    };
    Uploader2.prototype.renderPreLoadFiles = function() {
      if (this.files.length) {
        if (this.enablePersistence && this.filesData.length) {
          this.internalCreateFileList(this.filesData);
          return;
        }
        if (isNullOrUndefined2(this.files[0].size)) {
          return;
        }
        this.isPreloadFiles = true;
        var files = [].slice.call(this.files);
        var filesData = [];
        if (!this.multiple) {
          this.clearData();
          files = [files[0]];
        }
        for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
          var data = files_1[_i];
          var fileData = {
            name: data.name + "." + data.type.split(".")[data.type.split(".").length - 1],
            rawFile: "",
            size: data.size,
            status: this.localizedTexts("uploadSuccessMessage"),
            type: data.type,
            validationMessages: {
              minSize: "",
              maxSize: ""
            },
            statusCode: "2"
          };
          filesData.push(fileData);
          this.filesData.push(fileData);
        }
        this.internalCreateFileList(filesData);
        if (!this.autoUpload && this.listParent && !this.actionButtons && (!this.isForm || this.allowUpload()) && this.showFileList) {
          this.renderActionButtons();
        }
        this.checkActionButtonStatus();
        if (this.sequentialUpload) {
          this.count = this.filesData.length - 1;
        }
        this.isPreloadFiles = false;
      }
    };
    Uploader2.prototype.checkActionButtonStatus = function() {
      if (this.actionButtons) {
        var length_1 = this.uploadWrapper.querySelectorAll("." + VALIDATION_FAILS).length + this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length + this.uploadWrapper.querySelectorAll("span." + UPLOAD_SUCCESS).length + this.uploadWrapper.querySelectorAll("span." + UPLOAD_INPROGRESS).length;
        if (length_1 > 0 && length_1 === this.uploadWrapper.querySelectorAll("li").length) {
          this.uploadButton.setAttribute("disabled", "disabled");
        } else {
          this.uploadButton.removeAttribute("disabled");
        }
      }
    };
    Uploader2.prototype.setDropArea = function() {
      var dropTextArea = this.dropAreaWrapper.querySelector(".e-file-drop");
      if (this.dropArea) {
        this.dropZoneElement = typeof this.dropArea !== "string" ? this.dropArea : select2(this.dropArea, document);
        var element2 = this.element;
        var enableDropText = false;
        while (element2.parentNode) {
          element2 = element2.parentNode;
          if (element2 === this.dropZoneElement) {
            enableDropText = true;
            if (!dropTextArea) {
              this.createDropTextHint();
            } else {
              dropTextArea.innerHTML = this.localizedTexts("dropFilesHint");
            }
          }
        }
        if (!enableDropText && dropTextArea) {
          remove(dropTextArea);
        }
      } else if (!isNullOrUndefined2(this.uploaderOptions) && this.uploaderOptions.dropArea === void 0) {
        this.createDropTextHint();
        this.dropZoneElement = this.uploadWrapper;
        this.setProperties({
          dropArea: this.uploadWrapper
        }, true);
      }
      this.bindDropEvents();
    };
    Uploader2.prototype.updateDropArea = function() {
      if (this.dropArea) {
        this.setDropArea();
      } else {
        this.dropZoneElement = null;
        var dropTextArea = this.dropAreaWrapper.querySelector(".e-file-drop");
        if (dropTextArea) {
          remove(dropTextArea);
        }
      }
    };
    Uploader2.prototype.createDropTextHint = function() {
      var fileDropArea = this.createElement("span", {
        className: DROP_AREA
      });
      fileDropArea.innerHTML = this.localizedTexts("dropFilesHint");
      this.dropAreaWrapper.appendChild(fileDropArea);
    };
    Uploader2.prototype.updateHTMLAttrToElement = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var pro = _a[_i];
          if (wrapperAttr2.indexOf(pro) < 0) {
            this.element.setAttribute(pro, this.htmlAttributes["" + pro]);
          }
        }
      }
    };
    Uploader2.prototype.updateHTMLAttrToWrapper = function() {
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var pro = _a[_i];
          if (wrapperAttr2.indexOf(pro) > -1) {
            if (pro === "class") {
              var updatedClassValues = this.htmlAttributes["" + pro].replace(/\s+/g, " ").trim();
              if (updatedClassValues !== "") {
                addClass2([this.uploadWrapper], updatedClassValues.split(" "));
              }
            } else if (pro === "style") {
              var uploadStyle = this.uploadWrapper.getAttribute(pro);
              uploadStyle = !isNullOrUndefined2(uploadStyle) ? uploadStyle + this.htmlAttributes["" + pro] : this.htmlAttributes["" + pro];
              this.uploadWrapper.setAttribute(pro, uploadStyle);
            } else {
              this.uploadWrapper.setAttribute(pro, this.htmlAttributes["" + pro]);
            }
          }
        }
      }
    };
    Uploader2.prototype.setMultipleSelection = function() {
      if (this.multiple && !this.element.hasAttribute("multiple")) {
        var newAttr = document.createAttribute("multiple");
        newAttr.value = "multiple";
        this.element.setAttributeNode(newAttr);
      } else if (!this.multiple) {
        this.element.removeAttribute("multiple");
      }
    };
    Uploader2.prototype.checkAutoUpload = function(fileData) {
      if (this.autoUpload) {
        if (this.sequentialUpload) {
          this.sequenceUpload(fileData);
        } else {
          this.upload(fileData);
        }
        this.removeActionButtons();
      } else if (!this.actionButtons) {
        this.renderActionButtons();
      }
      this.checkActionButtonStatus();
    };
    Uploader2.prototype.sequenceUpload = function(fileData) {
      if (this.filesData.length - fileData.length === 0 || this.filesData[this.filesData.length - fileData.length - 1].statusCode !== "1") {
        if (this.multiple || this.count < 0) {
          ++this.count;
        }
        var isFileListCreated = this.showFileList ? false : true;
        if (typeof this.filesData[this.count] === "object") {
          this.isFirstFileOnSelection = false;
          this.upload(this.filesData[this.count], isFileListCreated);
          if (this.filesData[this.count].statusCode === "0") {
            this.sequenceUpload(fileData);
          }
        } else {
          --this.count;
        }
      }
    };
    Uploader2.prototype.setCSSClass = function(oldCSSClass) {
      var updatedOldCssClass = oldCSSClass;
      if (!isNullOrUndefined2(oldCSSClass)) {
        updatedOldCssClass = oldCSSClass.replace(/\s+/g, " ").trim();
      }
      if (!isNullOrUndefined2(oldCSSClass) && updatedOldCssClass !== "") {
        removeClass2([this.uploadWrapper], updatedOldCssClass.split(" "));
      }
      var updatedCssClassValue = this.cssClass;
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        updatedCssClassValue = this.cssClass.replace(/\s+/g, " ").trim();
      }
      if (!isNullOrUndefined2(this.cssClass) && updatedCssClassValue !== "") {
        addClass2([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(",") > -1 ? "," : " "));
      }
    };
    Uploader2.prototype.wireEvents = function() {
      EventHandler2.add(this.browseButton, "click", this.browseButtonClick, this);
      EventHandler2.add(this.element, "change", this.onSelectFiles, this);
      EventHandler2.add(document, "click", this.removeFocus, this);
      this.keyboardModule = new KeyboardEvents2(this.uploadWrapper, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
      if (this.isForm) {
        EventHandler2.add(this.formElement, "reset", this.resetForm, this);
      }
    };
    Uploader2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.browseButton, "click", this.browseButtonClick);
      EventHandler2.remove(this.element, "change", this.onSelectFiles);
      EventHandler2.remove(document, "click", this.removeFocus);
      if (this.isForm) {
        EventHandler2.remove(this.formElement, "reset", this.resetForm);
      }
      if (this.keyboardModule) {
        this.keyboardModule.destroy();
      }
    };
    Uploader2.prototype.resetForm = function() {
      this.clearAll();
    };
    Uploader2.prototype.keyActionHandler = function(e) {
      var targetElement2 = e.target;
      switch (e.action) {
        case "enter":
          if (e.target === this.clearButton) {
            this.clearButtonClick();
          } else if (e.target === this.uploadButton) {
            this.uploadButtonClick();
          } else if (e.target === this.browseButton) {
            this.browseButtonClick();
          } else if (targetElement2.classList.contains(PAUSE_UPLOAD)) {
            var metaData = this.getCurrentMetaData(null, e);
            metaData.file.statusCode = "4";
            metaData.file.status = this.localizedTexts("pauseUpload");
            this.abortUpload(metaData, false);
          } else if (targetElement2.classList.contains(RESUME_UPLOAD)) {
            this.resumeUpload(this.getCurrentMetaData(null, e), e);
          } else if (targetElement2.classList.contains(RETRY_ICON)) {
            var metaData = this.getCurrentMetaData(null, e);
            if (!isNullOrUndefined2(metaData)) {
              metaData.file.statusCode = "1";
              metaData.file.status = this.localizedTexts("readyToUploadMessage");
              this.chunkUpload(metaData.file);
            } else {
              var target = e.target.parentElement;
              var fileData = this.filesData[this.fileList.indexOf(target)];
              this.retry(fileData);
            }
          } else {
            this.removeFiles(e);
            if (!targetElement2.classList.contains(ABORT_ICON)) {
              this.browseButton.focus();
            }
          }
          e.preventDefault();
          e.stopPropagation();
          break;
      }
    };
    Uploader2.prototype.getCurrentMetaData = function(fileInfo, e) {
      var fileData;
      var targetMetaData;
      if (isNullOrUndefined2(fileInfo)) {
        var target = e.target.parentElement;
        fileData = this.filesData[this.fileList.indexOf(target)];
      } else {
        fileData = fileInfo;
      }
      for (var i = 0; i < this.uploadMetaData.length; i++) {
        if (this.uploadMetaData[i].file.name === fileData.name) {
          targetMetaData = this.uploadMetaData[i];
        }
      }
      return targetMetaData;
    };
    Uploader2.prototype.removeFocus = function() {
      if (this.uploadWrapper && this.listParent && this.listParent.querySelector("." + ICON_FOCUSED)) {
        document.activeElement.blur();
        this.listParent.querySelector("." + ICON_FOCUSED).classList.remove(ICON_FOCUSED);
      }
    };
    Uploader2.prototype.browseButtonClick = function() {
      this.element.click();
    };
    Uploader2.prototype.uploadButtonClick = function() {
      if (this.sequentialUpload) {
        this.sequenceUpload(this.filesData);
      } else {
        this.upload(this.filesData);
      }
    };
    Uploader2.prototype.clearButtonClick = function() {
      this.clearAll();
      if (this.sequentialUpload) {
        this.count = -1;
      }
      this.actionCompleteCount = 0;
    };
    Uploader2.prototype.bindDropEvents = function() {
      if (this.dropZoneElement) {
        EventHandler2.add(this.dropZoneElement, "drop", this.dropElement, this);
        EventHandler2.add(this.dropZoneElement, "dragover", this.dragHover, this);
        EventHandler2.add(this.dropZoneElement, "dragleave", this.onDragLeave, this);
        EventHandler2.add(this.dropZoneElement, "paste", this.onPasteFile, this);
        EventHandler2.add(this.dropZoneElement, "dragenter", this.onDragEnter, this);
      }
    };
    Uploader2.prototype.unBindDropEvents = function() {
      if (this.dropZoneElement) {
        EventHandler2.remove(this.dropZoneElement, "drop", this.dropElement);
        EventHandler2.remove(this.dropZoneElement, "dragover", this.dragHover);
        EventHandler2.remove(this.dropZoneElement, "dragleave", this.onDragLeave);
        EventHandler2.remove(this.dropZoneElement, "dragenter", this.onDragEnter);
      }
    };
    Uploader2.prototype.onDragEnter = function(e) {
      if (!this.enabled) {
        return;
      }
      this.dropZoneElement.classList.add(DRAG_HOVER);
      this.dragCounter = this.dragCounter + 1;
      e.preventDefault();
      e.stopPropagation();
    };
    Uploader2.prototype.onDragLeave = function() {
      if (!this.enabled) {
        return;
      }
      this.dragCounter = this.dragCounter - 1;
      if (!this.dragCounter) {
        this.dropZoneElement.classList.remove(DRAG_HOVER);
      }
    };
    Uploader2.prototype.dragHover = function(e) {
      if (!this.enabled) {
        return;
      }
      if (this.dropEffect !== "Default") {
        e.dataTransfer.dropEffect = this.dropEffect.toLowerCase();
      }
      e.preventDefault();
      e.stopPropagation();
    };
    Uploader2.prototype.dropElement = function(e) {
      this.dragCounter = 0;
      this.dropZoneElement.classList.remove(DRAG_HOVER);
      this.onSelectFiles(e);
      e.preventDefault();
      e.stopPropagation();
    };
    Uploader2.prototype.onPasteFile = function(event2) {
      var item = event2.clipboardData.items;
      if (event2.type === "paste" && this.browserName !== "msie" && this.browserName !== "edge" && this.browserName !== "safari") {
        this.element.files = event2.clipboardData.files;
      }
      if (item.length !== 1 && !this.multiple) {
        return;
      }
      for (var file = 0; file < item.length; file++) {
        var pasteFile = [].slice.call(item)[file];
        if (!isNullOrUndefined2(pasteFile.getAsFile()) && (pasteFile.kind === "file" || pasteFile.type.match("^image/"))) {
          this.renderSelectedFiles(event2, [pasteFile.getAsFile()], false, true);
        }
      }
    };
    Uploader2.prototype.getSelectedFiles = function(index) {
      var data = [];
      var liElement = this.fileList[index];
      var allFiles = this.getFilesData();
      var nameElements = +liElement.getAttribute("data-files-count");
      var startIndex = 0;
      for (var i = 0; i < index; i++) {
        startIndex += +this.fileList[i].getAttribute("data-files-count");
      }
      for (var j = startIndex; j < startIndex + nameElements; j++) {
        data.push(allFiles[j]);
      }
      return data;
    };
    Uploader2.prototype.removeFiles = function(args) {
      if (!this.enabled) {
        return;
      }
      var selectedElement = args.target.parentElement;
      var index = this.fileList.indexOf(selectedElement);
      var liElement = this.fileList[index];
      var formUpload = this.isFormUpload();
      var fileData = formUpload ? this.getSelectedFiles(index) : this.getFilesInArray(this.filesData[index]);
      if (isNullOrUndefined2(fileData)) {
        return;
      }
      if (args.target.classList.contains(ABORT_ICON) && !formUpload) {
        fileData[0].statusCode = "5";
        if (!isNullOrUndefined2(liElement)) {
          var spinnerTarget = liElement.querySelector("." + ABORT_ICON);
          createSpinner({
            target: spinnerTarget,
            width: "20px"
          });
          showSpinner(spinnerTarget);
        }
        if (this.sequentialUpload) {
          this.uploadSequential();
        }
        if (!liElement.classList.contains(RESTRICT_RETRY)) {
          this.checkActionComplete(true);
        }
      } else if (!closest2(args.target, "." + SPINNER_PANE)) {
        this.remove(fileData, false, false, true, args);
      }
      if (this.isForm && liElement && liElement.classList.contains(INVALID_FILE)) {
        this.element.value = "";
      }
      this.checkActionButtonStatus();
    };
    Uploader2.prototype.removeFilesData = function(file, customTemplate) {
      var index;
      if (customTemplate) {
        if (!this.showFileList) {
          index = this.filesData.indexOf(file);
          this.filesData.splice(index, 1);
        }
        return;
      }
      var selectedElement = this.getLiElement(file);
      if (isNullOrUndefined2(selectedElement)) {
        return;
      }
      this.element.value = "";
      detach2(selectedElement);
      index = this.fileList.indexOf(selectedElement);
      this.fileList.splice(index, 1);
      this.filesData.splice(index, 1);
      if (this.fileList.length === 0 && !isNullOrUndefined2(this.listParent)) {
        detach2(this.listParent);
        this.listParent = null;
        this.removeActionButtons();
      }
      if (this.sequentialUpload) {
        if (index <= this.count) {
          --this.count;
        }
      }
    };
    Uploader2.prototype.removeUploadedFile = function(file, eventArgs, removeDirectly, custom) {
      var _this = this;
      var selectedFiles = file;
      var ajax = new Ajax2(this.asyncSettings.removeUrl, "POST", true, null);
      ajax.emitError = false;
      var formData = new FormData();
      ajax.beforeSend = function(e) {
        eventArgs.currentRequest = ajax.httpRequest;
        if (!removeDirectly) {
          _this.trigger("removing", eventArgs, function(eventArgs2) {
            if (eventArgs2.cancel) {
              e.cancel = true;
            } else {
              _this.removingEventCallback(eventArgs2, formData, selectedFiles, file);
            }
          });
        } else {
          _this.removingEventCallback(eventArgs, formData, selectedFiles, file);
        }
      };
      ajax.onLoad = function(e) {
        _this.removeCompleted(e, selectedFiles, custom);
        return {};
      };
      ajax.onError = function(e) {
        _this.removeFailed(e, selectedFiles, custom);
        return {};
      };
      ajax.send(formData);
    };
    Uploader2.prototype.removingEventCallback = function(eventArgs, formData, selectedFiles, file) {
      var name = this.element.getAttribute("name");
      var liElement = this.getLiElement(file);
      if (!isNullOrUndefined2(liElement) && (!isNullOrUndefined2(liElement.querySelector("." + DELETE_ICON)) || !isNullOrUndefined2(liElement.querySelector("." + REMOVE_ICON)))) {
        var spinnerTarget = liElement.querySelector("." + DELETE_ICON) ? liElement.querySelector("." + DELETE_ICON) : liElement.querySelector("." + REMOVE_ICON);
        createSpinner({
          target: spinnerTarget,
          width: "20px"
        });
        showSpinner(spinnerTarget);
      }
      if (eventArgs.postRawFile && !isNullOrUndefined2(selectedFiles.rawFile) && selectedFiles.rawFile !== "") {
        formData.append(name, selectedFiles.rawFile, selectedFiles.name);
      } else {
        formData.append(name, selectedFiles.name);
      }
      this.updateFormData(formData, eventArgs.customFormData);
    };
    Uploader2.prototype.updateFormData = function(formData, customData) {
      if (customData.length > 0 && customData[0]) {
        var _loop_1 = function(i2) {
          var data = customData[i2];
          var value = Object.keys(data).map(function(e) {
            return data["" + e];
          });
          formData.append(Object.keys(data)[0], value);
        };
        for (var i = 0; i < customData.length; i++) {
          _loop_1(i);
        }
      }
    };
    Uploader2.prototype.updateCustomheader = function(request, currentRequest) {
      if (currentRequest.length > 0 && currentRequest[0]) {
        var _loop_2 = function(i2) {
          var data = currentRequest[i2];
          var value = Object.keys(data).map(function(e) {
            return data["" + e];
          });
          request.setRequestHeader(Object.keys(data)[0], value);
        };
        for (var i = 0; i < currentRequest.length; i++) {
          _loop_2(i);
        }
      }
    };
    Uploader2.prototype.removeCompleted = function(e, files, customTemplate) {
      var response = e && e.currentTarget ? this.getResponse(e) : null;
      var status = e.target;
      if (status.readyState === 4 && status.status >= 200 && status.status <= 299) {
        var args = {
          e,
          response,
          operation: "remove",
          file: this.updateStatus(files, this.localizedTexts("removedSuccessMessage"), "2")
        };
        this.trigger("success", args);
        this.removeFilesData(files, customTemplate);
        var index = this.uploadedFilesData.indexOf(files);
        this.uploadedFilesData.splice(index, 1);
        this.trigger("change", {
          files: this.uploadedFilesData
        });
      } else {
        this.removeFailed(e, files, customTemplate);
      }
    };
    Uploader2.prototype.removeFailed = function(e, files, customTemplate) {
      var response = e && e.currentTarget ? this.getResponse(e) : null;
      var args = {
        e,
        response,
        operation: "remove",
        file: this.updateStatus(files, this.localizedTexts("removedFailedMessage"), "0")
      };
      if (!customTemplate) {
        var index = this.filesData.indexOf(files);
        var rootElement = this.fileList[index];
        if (rootElement) {
          rootElement.classList.remove(UPLOAD_SUCCESS);
          rootElement.classList.add(UPLOAD_FAILED);
          var statusElement = rootElement.querySelector("." + STATUS);
          if (statusElement) {
            statusElement.classList.remove(UPLOAD_SUCCESS);
            statusElement.classList.add(UPLOAD_FAILED);
          }
        }
        this.checkActionButtonStatus();
      }
      this.trigger("failure", args);
      var liElement = this.getLiElement(files);
      if (!isNullOrUndefined2(liElement) && !isNullOrUndefined2(liElement.querySelector("." + DELETE_ICON))) {
        var spinnerTarget = liElement.querySelector("." + DELETE_ICON);
        hideSpinner(spinnerTarget);
        detach2(liElement.querySelector(".e-spinner-pane"));
      }
    };
    Uploader2.prototype.getFilesFromFolder = function(event2) {
      this.filesEntries = [];
      var items = this.multiple ? event2.dataTransfer.items : [event2.dataTransfer.items[0]];
      var validDirectoryUpload = this.checkDirectoryUpload(items);
      if (!validDirectoryUpload) {
        return;
      }
      var _loop_3 = function(i2) {
        var item = items[i2].webkitGetAsEntry();
        if (item.isFile) {
          var files_2 = [];
          item.file(function(fileObj) {
            var path = item.fullPath;
            files_2.push({
              "path": path,
              "file": fileObj
            });
          });
          this_1.renderSelectedFiles(event2, files_2, true);
        } else if (item.isDirectory) {
          this_1.traverseFileTree(item, event2);
        }
      };
      var this_1 = this;
      for (var i = 0; i < items.length; i++) {
        _loop_3(i);
      }
    };
    Uploader2.prototype.checkDirectoryUpload = function(items) {
      for (var i = 0; items && i < items.length; i++) {
        var item = items[i].webkitGetAsEntry();
        if (item.isDirectory) {
          return true;
        }
      }
      return false;
    };
    Uploader2.prototype.traverseFileTree = function(item, event2) {
      if (item.isFile) {
        this.filesEntries.push(item);
      } else if (item.isDirectory) {
        var directoryReader = item.createReader();
        this.readFileFromDirectory(directoryReader, event2);
      }
    };
    Uploader2.prototype.readFileFromDirectory = function(directoryReader, event2) {
      var _this = this;
      directoryReader.readEntries(function(entries) {
        for (var i = 0; i < entries.length; i++) {
          _this.traverseFileTree(entries[i], event2);
        }
        _this.pushFilesEntries(event2);
        if (entries.length) {
          _this.readFileFromDirectory(directoryReader);
        }
      });
    };
    Uploader2.prototype.pushFilesEntries = function(event2) {
      var _this = this;
      var files = [];
      var _loop_4 = function(i2) {
        this_2.filesEntries[i2].file(function(fileObj) {
          if (_this.filesEntries.length) {
            var path = _this.filesEntries[i2].fullPath;
            files.push({
              "path": path,
              "file": fileObj
            });
            if (i2 === _this.filesEntries.length - 1) {
              _this.filesEntries = [];
              _this.renderSelectedFiles(event2, files, true);
            }
          }
        });
      };
      var this_2 = this;
      for (var i = 0; i < this.filesEntries.length; i++) {
        _loop_4(i);
      }
    };
    Uploader2.prototype.onSelectFiles = function(args) {
      if (!this.enabled) {
        return;
      }
      var targetFiles;
      if (args.type === "drop") {
        if (this.directoryUpload) {
          this.getFilesFromFolder(args);
        } else {
          var files = this.sortFilesList = args.dataTransfer.files;
          if (this.browserName !== "msie" && this.browserName !== "edge" && this.browserName !== "safari") {
            this.element.files = files;
          }
          if (files.length > 0) {
            targetFiles = this.multiple ? this.sortFileList(files) : [files[0]];
            this.renderSelectedFiles(args, targetFiles);
          }
        }
      } else {
        targetFiles = [].slice.call(args.target.files);
        this.renderSelectedFiles(args, targetFiles);
      }
      if (this.isAngular || this.isReact) {
        args.stopPropagation();
      }
    };
    Uploader2.prototype.getBase64 = function(file) {
      return new Promise(function(resolve, reject) {
        var fileReader = new FileReader();
        fileReader.readAsDataURL(file);
        fileReader.onload = function() {
          return resolve(fileReader.result);
        };
        fileReader.onerror = function(error) {
          return reject(error);
        };
      });
    };
    Uploader2.prototype.renderSelectedFiles = function(args, targetFiles, directory, paste) {
      var _this = this;
      this.base64String = [];
      var eventArgs = {
        event: args,
        cancel: false,
        filesData: [],
        isModified: false,
        modifiedFilesData: [],
        progressInterval: "",
        isCanceled: false,
        currentRequest: null,
        customFormData: null
      };
      if (targetFiles.length < 1) {
        eventArgs.isCanceled = true;
        this.trigger("selected", eventArgs);
        return;
      }
      this.flag = true;
      var fileData = [];
      if (!this.multiple) {
        this.clearData(true);
        this.actionCompleteCount = 0;
        targetFiles = [targetFiles[0]];
      }
      for (var i = 0; i < targetFiles.length; i++) {
        var file = directory ? targetFiles[i].file : targetFiles[i];
        this.updateInitialFileDetails(args, targetFiles, file, i, fileData, directory, paste);
      }
      eventArgs.filesData = fileData;
      if (this.allowedExtensions.indexOf("*") > -1) {
        this.allTypes = true;
      }
      if (this.enableHtmlSanitizer) {
        for (var i = 0; i < fileData.length; i++) {
          var sanitizeFile = SanitizeHtmlHelper2.beforeSanitize();
          var sanitizeFileName = SanitizeHtmlHelper2.serializeValue(sanitizeFile, fileData[parseInt(i.toString(), 10)].name);
          var currentFileName = fileData[parseInt(i.toString(), 10)].name;
          var isUTF8 = false;
          for (var i_1 = 0; i_1 < currentFileName.length; i_1++) {
            if (currentFileName.charCodeAt(i_1) > 127) {
              isUTF8 = true;
              break;
            }
          }
          var htmlTagRegex = /<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i;
          var hasHTMLString = htmlTagRegex.test(currentFileName);
          if (sanitizeFileName !== fileData[parseInt(i.toString(), 10)].name && !(isUTF8 && !hasHTMLString)) {
            var encodedFileName = targetFiles[parseInt(i.toString(), 10)].name.replace(/[\u00A0-\u9999<>\\&]/g, function(i2) {
              return "&#" + i2.charCodeAt(0) + ";";
            });
            fileData[parseInt(i.toString(), 10)].name = encodedFileName;
            fileData[parseInt(i.toString(), 10)].status = this.localizedTexts("invalidFileName");
            fileData[parseInt(i.toString(), 10)].statusCode = "0";
          }
        }
      }
      if (!this.allTypes) {
        fileData = this.checkExtension(fileData);
      }
      this.trigger("selected", eventArgs, function(eventArgs2) {
        _this._internalRenderSelect(eventArgs2, fileData);
      });
    };
    Uploader2.prototype.updateInitialFileDetails = function(args, targetFiles, file, i, fileData, directory, paste) {
      var fileName = directory ? targetFiles[i].path.substring(1, targetFiles[i].path.length) : paste ? getUniqueID(file.name.substring(0, file.name.lastIndexOf("."))) + "." + this.getFileType(file.name) : this.directoryUpload ? targetFiles[i].webkitRelativePath : file.name;
      var fileDetails = {
        name: fileName,
        rawFile: file,
        size: file.size,
        status: this.localizedTexts("readyToUploadMessage"),
        type: this.getFileType(file.name),
        validationMessages: this.validatedFileSize(file.size),
        statusCode: "1",
        id: getUniqueID(file.name.substring(0, file.name.lastIndexOf("."))) + "." + this.getFileType(file.name)
      };
      if (paste) {
        fileDetails.fileSource = "paste";
      }
      fileDetails.status = fileDetails.validationMessages.minSize !== "" ? this.localizedTexts("invalidMinFileSize") : fileDetails.validationMessages.maxSize !== "" ? this.localizedTexts("invalidMaxFileSize") : fileDetails.status;
      if (fileDetails.validationMessages.minSize !== "" || fileDetails.validationMessages.maxSize !== "") {
        fileDetails.statusCode = "0";
        this.checkActionComplete(true);
      }
      fileData.push(fileDetails);
    };
    Uploader2.prototype._internalRenderSelect = function(eventArgs, fileData) {
      if (!eventArgs.cancel) {
        this.selectedFiles = this.selectedFiles.concat(fileData);
        this.btnTabIndex = this.disableKeyboardNavigation ? "-1" : "0";
        if (this.showFileList) {
          if (eventArgs.isModified && eventArgs.modifiedFilesData.length > 0) {
            for (var j = 0; j < eventArgs.modifiedFilesData.length; j++) {
              for (var k = 0; k < fileData.length; k++) {
                if (eventArgs.modifiedFilesData[j].id === fileData[k].id) {
                  eventArgs.modifiedFilesData[j].rawFile = fileData[k].rawFile;
                }
              }
            }
            var dataFiles = this.allTypes ? eventArgs.modifiedFilesData : this.checkExtension(eventArgs.modifiedFilesData);
            this.updateSortedFileList(dataFiles);
            this.filesData = this.filesData.concat(dataFiles);
            if (!this.isForm || this.allowUpload()) {
              this.checkAutoUpload(dataFiles);
            }
          } else {
            this.internalCreateFileList(fileData);
            if (this.autoUpload && this.sequenceUpload && this.sequentialUpload && this.filesData.length > 0 && this.filesData[this.filesData.length - 1].statusCode !== "2" && this.filesData[this.filesData.length - 1].statusCode !== "0") {
              this.filesData = this.filesData.concat(fileData);
              return;
            }
            this.filesData = this.filesData.concat(fileData);
            if (!this.isForm || this.allowUpload()) {
              this.checkAutoUpload(fileData);
            }
          }
          if (!isNullOrUndefined2(eventArgs.progressInterval) && eventArgs.progressInterval !== "") {
            this.progressInterval = eventArgs.progressInterval;
          }
        } else {
          this.filesData = this.filesData.concat(fileData);
          if (this.autoUpload) {
            this.upload(this.filesData, true);
          }
        }
        this.raiseActionComplete();
        this.isFirstFileOnSelection = true;
      }
    };
    Uploader2.prototype.allowUpload = function() {
      var allowFormUpload = false;
      if (this.isForm && !isNullOrUndefined2(this.asyncSettings.saveUrl) && this.asyncSettings.saveUrl !== "") {
        allowFormUpload = true;
      }
      return allowFormUpload;
    };
    Uploader2.prototype.isFormUpload = function() {
      var isFormUpload = false;
      if (this.isForm && (isNullOrUndefined2(this.asyncSettings.saveUrl) || this.asyncSettings.saveUrl === "") && (isNullOrUndefined2(this.asyncSettings.removeUrl) || this.asyncSettings.removeUrl === "")) {
        isFormUpload = true;
      }
      return isFormUpload;
    };
    Uploader2.prototype.clearData = function(singleUpload) {
      if (!isNullOrUndefined2(this.listParent)) {
        detach2(this.listParent);
        this.listParent = null;
      }
      if (this.browserName !== "msie" && !singleUpload) {
        this.element.value = "";
      }
      this.fileList = [];
      this.filesData = [];
      this.removeActionButtons();
    };
    Uploader2.prototype.updateSortedFileList = function(filesData) {
      var previousListClone = this.createElement("div", {
        id: "clonewrapper"
      });
      var added = -1;
      if (this.listParent) {
        for (var i = 0; i < this.listParent.querySelectorAll("li").length; i++) {
          var liElement = this.listParent.querySelectorAll("li")[i];
          previousListClone.appendChild(liElement.cloneNode(true));
        }
        this.removeActionButtons();
        var oldList = [].slice.call(previousListClone.childNodes);
        this.createParentUL();
        for (var index = 0; index < filesData.length; index++) {
          for (var j = 0; j < this.filesData.length; j++) {
            if (this.filesData[j].name === filesData[index].name) {
              this.listParent.appendChild(oldList[j]);
              EventHandler2.add(oldList[j].querySelector(".e-icons"), "click", this.removeFiles, this);
              this.fileList.push(oldList[j]);
              added = index;
            }
          }
          if (added !== index) {
            this.internalCreateFileList([filesData[index]]);
          }
        }
      } else {
        this.internalCreateFileList(filesData);
      }
    };
    Uploader2.prototype.isBlank = function(str) {
      return !str || /^\s*$/.test(str);
    };
    Uploader2.prototype.checkExtension = function(files) {
      var dropFiles = files;
      if (!this.isBlank(this.allowedExtensions)) {
        var allowedExtensions = [];
        var extensions = this.allowedExtensions.split(",");
        for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
          var extension = extensions_1[_i];
          allowedExtensions.push(extension.trim().toLocaleLowerCase());
        }
        for (var i = 0; i < files.length; i++) {
          var checkFileType = files[i].type.indexOf(".") !== -1 ? files[i].type.replace(".", "") : files[i].type;
          if (allowedExtensions.indexOf(("." + checkFileType).toLocaleLowerCase()) === -1) {
            files[i].status = this.localizedTexts("invalidFileType");
            files[i].statusCode = "0";
          }
        }
      }
      return dropFiles;
    };
    Uploader2.prototype.validatedFileSize = function(fileSize) {
      var minSizeError = "";
      var maxSizeError = "";
      if (fileSize < this.minFileSize) {
        minSizeError = this.localizedTexts("invalidMinFileSize");
      } else if (fileSize > this.maxFileSize) {
        maxSizeError = this.localizedTexts("invalidMaxFileSize");
      } else {
        minSizeError = "";
        maxSizeError = "";
      }
      var errorMessage = {
        minSize: minSizeError,
        maxSize: maxSizeError
      };
      return errorMessage;
    };
    Uploader2.prototype.isPreLoadFile = function(fileData) {
      var isPreload = false;
      for (var i = 0; i < this.files.length; i++) {
        if (this.files[i].name === fileData.name.slice(0, fileData.name.lastIndexOf(".")) && this.files[i].type === fileData.type) {
          isPreload = true;
        }
      }
      return isPreload;
    };
    Uploader2.prototype.createCustomfileList = function(fileData) {
      this.createParentUL();
      for (var _i = 0, fileData_1 = fileData; _i < fileData_1.length; _i++) {
        var listItem = fileData_1[_i];
        var listElement = this.createElement("li", {
          className: FILE,
          attrs: {
            "data-file-name": listItem.name
          }
        });
        this.uploadTemplateFn = this.templateComplier(this.template);
        var liTempCompiler = this.uploadTemplateFn(listItem, this, "template", this.element.id + "Template", this.isStringTemplate, null, listElement);
        if (liTempCompiler) {
          var fromElements = [].slice.call(liTempCompiler);
          append(fromElements, listElement);
        }
        var index = fileData.indexOf(listItem);
        var eventArgs = {
          element: listElement,
          fileInfo: listItem,
          index,
          isPreload: this.isPreLoadFile(listItem)
        };
        var eventsArgs = {
          element: listElement,
          fileInfo: listItem,
          index,
          isPreload: this.isPreLoadFile(listItem)
        };
        this.trigger("rendering", eventArgs);
        this.trigger("fileListRendering", eventsArgs);
        this.listParent.appendChild(listElement);
        this.fileList.push(listElement);
      }
      this.renderReactTemplates();
    };
    Uploader2.prototype.createParentUL = function() {
      if (isNullOrUndefined2(this.listParent)) {
        this.listParent = this.createElement("ul", {
          className: LIST_PARENT
        });
        this.uploadWrapper.appendChild(this.listParent);
      }
    };
    Uploader2.prototype.formFileList = function(fileData, files) {
      var fileList = this.createElement("li", {
        className: FILE
      });
      fileList.setAttribute("data-files-count", fileData.length + "");
      var fileContainer = this.createElement("span", {
        className: TEXT_CONTAINER
      });
      var statusMessage;
      for (var _i = 0, fileData_2 = fileData; _i < fileData_2.length; _i++) {
        var listItem = fileData_2[_i];
        var fileNameEle = this.createElement("span", {
          className: FILE_NAME
        });
        fileNameEle.innerHTML = this.getFileNameOnly(listItem.name);
        var fileTypeEle = this.createElement("span", {
          className: FILE_TYPE
        });
        var fileType = this.getFileType(listItem.name);
        fileTypeEle.innerHTML = "." + fileType;
        if (!fileType) {
          fileTypeEle.classList.add("e-hidden");
        }
        if (!this.enableRtl) {
          fileContainer.appendChild(fileNameEle);
          fileContainer.appendChild(fileTypeEle);
        } else {
          var rtlContainer = this.createElement("span", {
            className: RTL_CONTAINER
          });
          rtlContainer.appendChild(fileTypeEle);
          rtlContainer.appendChild(fileNameEle);
          fileContainer.appendChild(rtlContainer);
        }
        this.truncateName(fileNameEle);
        statusMessage = this.formValidateFileInfo(listItem, fileList);
      }
      fileList.appendChild(fileContainer);
      this.setListToFileInfo(fileData, fileList);
      var index = this.listParent.querySelectorAll("li").length;
      var infoEle = this.createElement("span");
      if (fileList.classList.contains(INVALID_FILE)) {
        infoEle.classList.add(STATUS);
        infoEle.classList.add(INVALID_FILE);
        infoEle.innerText = fileData.length > 1 ? this.localizedTexts("invalidFileSelection") : statusMessage;
      } else {
        infoEle.classList.add(fileData.length > 1 ? INFORMATION : FILE_SIZE);
        infoEle.innerText = fileData.length > 1 ? this.localizedTexts("totalFiles") + ": " + fileData.length + " , " + this.localizedTexts("size") + ": " + this.bytesToSize(this.getFileSize(fileData)) : this.bytesToSize(fileData[0].size);
        this.createFormInput(fileData);
      }
      fileContainer.appendChild(infoEle);
      if (isNullOrUndefined2(fileList.querySelector(".e-icons"))) {
        var iconElement = this.createElement("span", {
          className: "e-icons",
          attrs: {
            "tabindex": this.btnTabIndex
          }
        });
        if (this.browserName === "msie") {
          iconElement.classList.add("e-msie");
        }
        iconElement.setAttribute("title", this.localizedTexts("remove"));
        fileList.appendChild(fileContainer);
        fileList.appendChild(iconElement);
        EventHandler2.add(iconElement, "click", this.removeFiles, this);
        iconElement.classList.add(REMOVE_ICON);
      }
      var eventArgs = {
        element: fileList,
        fileInfo: this.mergeFileInfo(fileData, fileList),
        index,
        isPreload: this.isPreLoadFile(this.mergeFileInfo(fileData, fileList))
      };
      var eventsArgs = {
        element: fileList,
        fileInfo: this.mergeFileInfo(fileData, fileList),
        index,
        isPreload: this.isPreLoadFile(this.mergeFileInfo(fileData, fileList))
      };
      this.trigger("rendering", eventArgs);
      this.trigger("fileListRendering", eventsArgs);
      this.listParent.appendChild(fileList);
      this.fileList.push(fileList);
    };
    Uploader2.prototype.formValidateFileInfo = function(listItem, fileList) {
      var statusMessage = listItem.status;
      var validationMessages = this.validatedFileSize(listItem.size);
      if (validationMessages.minSize !== "" || validationMessages.maxSize !== "") {
        this.addInvalidClass(fileList);
        statusMessage = validationMessages.minSize !== "" ? this.localizedTexts("invalidMinFileSize") : validationMessages.maxSize !== "" ? this.localizedTexts("invalidMaxFileSize") : statusMessage;
      }
      var typeValidationMessage = this.checkExtension(this.getFilesInArray(listItem))[0].status;
      if (typeValidationMessage === this.localizedTexts("invalidFileType")) {
        this.addInvalidClass(fileList);
        statusMessage = typeValidationMessage;
      }
      return statusMessage;
    };
    Uploader2.prototype.addInvalidClass = function(fileList) {
      fileList.classList.add(INVALID_FILE);
    };
    Uploader2.prototype.createFormInput = function(fileData) {
      if (this.browserName !== "safari") {
        var inputElement = this.element.cloneNode(true);
        inputElement.classList.add(HIDDEN_INPUT);
        for (var _i = 0, fileData_3 = fileData; _i < fileData_3.length; _i++) {
          var listItem = fileData_3[_i];
          listItem.input = inputElement;
        }
        inputElement.setAttribute("id", getUniqueID("hiddenUploader"));
        inputElement.setAttribute("name", this.uploaderName);
        this.uploadWrapper.querySelector("." + INPUT_WRAPPER).appendChild(inputElement);
        if (this.browserName !== "msie" && this.browserName !== "edge") {
          this.element.value = "";
        }
      }
    };
    Uploader2.prototype.getFileSize = function(fileData) {
      var fileSize = 0;
      for (var _i = 0, fileData_4 = fileData; _i < fileData_4.length; _i++) {
        var file = fileData_4[_i];
        fileSize += file.size;
      }
      return fileSize;
    };
    Uploader2.prototype.mergeFileInfo = function(fileData, fileList) {
      var result = {
        name: "",
        rawFile: "",
        size: 0,
        status: "",
        type: "",
        validationMessages: {
          minSize: "",
          maxSize: ""
        },
        statusCode: "1",
        list: fileList
      };
      var fileNames = [];
      var type = "";
      for (var _i = 0, fileData_5 = fileData; _i < fileData_5.length; _i++) {
        var listItem = fileData_5[_i];
        fileNames.push(listItem.name);
        type = listItem.type;
      }
      result.name = fileNames.join(", ");
      result.size = this.getFileSize(fileData);
      result.type = type;
      result.status = this.statusForFormUpload(fileData, fileList);
      return result;
    };
    Uploader2.prototype.statusForFormUpload = function(fileData, fileList) {
      var isValid = true;
      var statusMessage;
      for (var _i = 0, fileData_6 = fileData; _i < fileData_6.length; _i++) {
        var listItem = fileData_6[_i];
        statusMessage = listItem.status;
        var validationMessages = this.validatedFileSize(listItem.size);
        if (validationMessages.minSize !== "" || validationMessages.maxSize !== "") {
          isValid = false;
          statusMessage = validationMessages.minSize !== "" ? this.localizedTexts("invalidMinFileSize") : validationMessages.maxSize !== "" ? this.localizedTexts("invalidMaxFileSize") : statusMessage;
        }
        var typeValidationMessage = this.checkExtension(this.getFilesInArray(listItem))[0].status;
        if (typeValidationMessage === this.localizedTexts("invalidFileType")) {
          isValid = false;
          statusMessage = typeValidationMessage;
        }
      }
      if (!isValid) {
        fileList.classList.add(INVALID_FILE);
        statusMessage = fileData.length > 1 ? this.localizedTexts("invalidFileSelection") : statusMessage;
      } else {
        statusMessage = this.localizedTexts("totalFiles") + ": " + fileData.length + " , " + this.localizedTexts("size") + ": " + this.bytesToSize(this.getFileSize(fileData));
      }
      return statusMessage;
    };
    Uploader2.prototype.formCustomFileList = function(fileData, files) {
      this.createParentUL();
      var fileList = this.createElement("li", {
        className: FILE
      });
      fileList.setAttribute("data-files-count", fileData.length + "");
      this.setListToFileInfo(fileData, fileList);
      var result = this.mergeFileInfo(fileData, fileList);
      fileList.setAttribute("data-file-name", result.name);
      this.uploadTemplateFn = this.templateComplier(this.template);
      var liTempCompiler = this.uploadTemplateFn(result, this, "template", this.element.id + "Template", this.isStringTemplate, null, fileList);
      if (liTempCompiler) {
        var fromElements = [].slice.call(liTempCompiler);
        append(fromElements, fileList);
      }
      var index = this.listParent.querySelectorAll("li").length;
      if (!fileList.classList.contains(INVALID_FILE)) {
        this.createFormInput(fileData);
      }
      var eventArgs = {
        element: fileList,
        fileInfo: result,
        index,
        isPreload: this.isPreLoadFile(result)
      };
      var eventsArgs = {
        element: fileList,
        fileInfo: result,
        index,
        isPreload: this.isPreLoadFile(result)
      };
      this.trigger("rendering", eventArgs);
      this.trigger("fileListRendering", eventsArgs);
      this.listParent.appendChild(fileList);
      this.fileList.push(fileList);
      this.renderReactTemplates();
    };
    Uploader2.prototype.createFileList = function(fileData) {
      this.filesData = this.filesData && this.filesData.length > 0 ? this.filesData.concat(fileData) : fileData;
      this.internalCreateFileList(fileData);
    };
    Uploader2.prototype.internalCreateFileList = function(fileData) {
      this.createParentUL();
      if (this.template !== "" && !isNullOrUndefined2(this.template)) {
        if (this.isFormUpload()) {
          this.uploadWrapper.classList.add(FORM_UPLOAD);
          this.formCustomFileList(fileData, this.element.files);
        } else {
          this.createCustomfileList(fileData);
        }
      } else if (this.isFormUpload()) {
        this.uploadWrapper.classList.add(FORM_UPLOAD);
        this.formFileList(fileData, this.element.files);
      } else {
        for (var _i = 0, fileData_7 = fileData; _i < fileData_7.length; _i++) {
          var listItem = fileData_7[_i];
          var liElement = this.createElement("li", {
            className: FILE,
            attrs: {
              "data-file-name": listItem.name,
              "data-files-count": "1"
            }
          });
          var textContainer = this.createElement("span", {
            className: TEXT_CONTAINER
          });
          var textElement = this.createElement("span", {
            className: FILE_NAME,
            attrs: {
              "title": listItem.name
            }
          });
          textElement.innerHTML = this.getFileNameOnly(listItem.name);
          var fileExtension = this.createElement("span", {
            className: FILE_TYPE
          });
          var fileType = this.getFileType(listItem.name);
          fileExtension.innerHTML = "." + fileType;
          if (!fileType) {
            fileExtension.classList.add("e-hidden");
          }
          if (!this.enableRtl) {
            textContainer.appendChild(textElement);
            textContainer.appendChild(fileExtension);
          } else {
            var rtlContainer = this.createElement("span", {
              className: RTL_CONTAINER
            });
            rtlContainer.appendChild(fileExtension);
            rtlContainer.appendChild(textElement);
            textContainer.appendChild(rtlContainer);
          }
          var fileSize = this.createElement("span", {
            className: FILE_SIZE
          });
          fileSize.innerHTML = this.bytesToSize(listItem.size);
          textContainer.appendChild(fileSize);
          var statusElement = this.createElement("span", {
            className: STATUS
          });
          textContainer.appendChild(statusElement);
          statusElement.innerHTML = listItem.status;
          liElement.appendChild(textContainer);
          var iconElement = this.createElement("span", {
            className: " e-icons",
            attrs: {
              "tabindex": this.btnTabIndex
            }
          });
          if (this.browserName === "msie") {
            iconElement.classList.add("e-msie");
          }
          iconElement.setAttribute("title", this.localizedTexts("remove"));
          liElement.appendChild(iconElement);
          EventHandler2.add(iconElement, "click", this.removeFiles, this);
          if (listItem.statusCode === "2") {
            statusElement.classList.add(UPLOAD_SUCCESS);
            iconElement.classList.add(DELETE_ICON);
            iconElement.setAttribute("title", this.localizedTexts("delete"));
            iconElement.setAttribute("aria-label", this.localizedTexts("delete"));
          } else if (listItem.statusCode !== "1") {
            statusElement.classList.remove(UPLOAD_SUCCESS);
            statusElement.classList.add(VALIDATION_FAILS);
          }
          if (this.autoUpload && listItem.statusCode === "1" && this.asyncSettings.saveUrl !== "") {
            statusElement.innerHTML = "";
          }
          if (!iconElement.classList.contains(DELETE_ICON)) {
            iconElement.classList.add(REMOVE_ICON);
            iconElement.setAttribute("aria-label", this.localizedTexts("remove"));
          }
          var index = fileData.indexOf(listItem);
          var eventArgs = {
            element: liElement,
            fileInfo: listItem,
            index,
            isPreload: this.isPreLoadFile(listItem)
          };
          var eventsArgs = {
            element: liElement,
            fileInfo: listItem,
            index,
            isPreload: this.isPreLoadFile(listItem)
          };
          this.trigger("rendering", eventArgs);
          this.trigger("fileListRendering", eventsArgs);
          this.listParent.appendChild(liElement);
          this.fileList.push(liElement);
          this.truncateName(textElement);
          var preventActionComplete = this.flag;
          if (this.isPreLoadFile(listItem)) {
            this.flag = false;
            this.checkActionComplete(true);
            this.flag = preventActionComplete;
          }
        }
      }
    };
    Uploader2.prototype.getSlicedName = function(nameElement) {
      var text = nameElement.textContent;
      nameElement.dataset.tail = text.slice(text.length - 10);
    };
    Uploader2.prototype.setListToFileInfo = function(fileData, fileList) {
      for (var _i = 0, fileData_8 = fileData; _i < fileData_8.length; _i++) {
        var listItem = fileData_8[_i];
        listItem.list = fileList;
      }
    };
    Uploader2.prototype.truncateName = function(name) {
      var nameElement = name;
      if (this.browserName !== "edge" && nameElement.offsetWidth < nameElement.scrollWidth) {
        this.getSlicedName(nameElement);
      } else if (nameElement.offsetWidth + 1 < nameElement.scrollWidth) {
        this.getSlicedName(nameElement);
      }
    };
    Uploader2.prototype.getFileType = function(name) {
      var extension;
      var index = name.lastIndexOf(".");
      if (index >= 0) {
        extension = name.substring(index + 1);
      }
      return extension ? extension : "";
    };
    Uploader2.prototype.getFileNameOnly = function(name) {
      var type = this.getFileType(name);
      var names = name.split("." + type);
      return type = names[0];
    };
    Uploader2.prototype.setInitialAttributes = function() {
      if (this.initialAttr.accept) {
        this.element.setAttribute("accept", this.initialAttr.accept);
      }
      if (this.initialAttr.disabled) {
        this.element.setAttribute("disabled", "disabled");
      }
      if (this.initialAttr.multiple) {
        var newAttr = document.createAttribute("multiple");
        this.element.setAttributeNode(newAttr);
      }
    };
    Uploader2.prototype.filterfileList = function(files) {
      var filterFiles = [];
      var li;
      for (var i = 0; i < files.length; i++) {
        li = this.getLiElement(files[i]);
        if (!isNullOrUndefined2(li) && !li.classList.contains(UPLOAD_SUCCESS)) {
          filterFiles.push(files[i]);
        } else if (!this.showFileList && files[i].status !== "File uploaded successfully") {
          filterFiles.push(files[i]);
        }
      }
      return filterFiles;
    };
    Uploader2.prototype.updateStatus = function(files, status, statusCode, updateLiStatus) {
      if (updateLiStatus === void 0) {
        updateLiStatus = true;
      }
      if (!(status === "" || isNullOrUndefined2(status)) && !(statusCode === "" || isNullOrUndefined2(statusCode))) {
        files.status = status;
        files.statusCode = statusCode;
      }
      if (updateLiStatus) {
        var li = this.getLiElement(files);
        if (!isNullOrUndefined2(li)) {
          if (!isNullOrUndefined2(li.querySelector("." + STATUS)) && !(status === "" || isNullOrUndefined2(status))) {
            li.querySelector("." + STATUS).textContent = status;
          }
        }
      }
      return files;
    };
    Uploader2.prototype.getLiElement = function(files) {
      var index;
      for (var i = 0; i < this.filesData.length; i++) {
        if (!isNullOrUndefined2(files) && (!isNullOrUndefined2(this.filesData[i].id) && !isNullOrUndefined2(files.id) ? this.filesData[i].name === files.name && this.filesData[i].id === files.id : this.filesData[i].name === files.name)) {
          index = i;
        }
      }
      return this.fileList[index];
    };
    Uploader2.prototype.createProgressBar = function(liElement) {
      var progressbarWrapper = this.createElement("span", {
        className: PROGRESS_WRAPPER
      });
      var progressBar = this.createElement("progressbar", {
        className: PROGRESSBAR,
        attrs: {
          value: "0",
          max: "100"
        }
      });
      var progressbarInnerWrapper = this.createElement("span", {
        className: PROGRESS_INNER_WRAPPER
      });
      progressBar.setAttribute("style", "width: 0%");
      var progressbarText = this.createElement("span", {
        className: PROGRESSBAR_TEXT
      });
      progressbarText.textContent = "0%";
      progressbarInnerWrapper.appendChild(progressBar);
      progressbarWrapper.appendChild(progressbarInnerWrapper);
      progressbarWrapper.appendChild(progressbarText);
      liElement.querySelector("." + TEXT_CONTAINER).appendChild(progressbarWrapper);
    };
    Uploader2.prototype.updateProgressbar = function(e, li) {
      if (!isNaN(Math.round(e.loaded / e.total * 100)) && !isNullOrUndefined2(li.querySelector("." + PROGRESSBAR))) {
        if (!isNullOrUndefined2(this.progressInterval) && this.progressInterval !== "") {
          var value = Math.round(e.loaded / e.total * 100) % parseInt(this.progressInterval, 10);
          if (value === 0 || value === 100) {
            this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + "%");
          }
        } else {
          this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + "%");
        }
      }
    };
    Uploader2.prototype.changeProgressValue = function(li, progressValue) {
      li.querySelector("." + PROGRESSBAR).setAttribute("style", "width:" + progressValue);
      li.querySelector("." + PROGRESSBAR_TEXT).textContent = progressValue;
    };
    Uploader2.prototype.uploadInProgress = function(e, files, customUI, request) {
      var li = this.getLiElement(files);
      if (isNullOrUndefined2(li) && !customUI) {
        return;
      }
      if (!isNullOrUndefined2(li)) {
        if (files.statusCode === "5") {
          this.cancelUploadingFile(files, e, request, li);
        }
        if (!(li.querySelectorAll("." + PROGRESS_WRAPPER).length > 0) && li.querySelector("." + STATUS)) {
          li.querySelector("." + STATUS).classList.add(UPLOAD_INPROGRESS);
          this.createProgressBar(li);
          this.updateProgressBarClasses(li, UPLOAD_INPROGRESS);
          li.querySelector("." + STATUS).classList.remove(UPLOAD_FAILED);
        }
        this.updateProgressbar(e, li);
        var iconEle = li.querySelector("." + REMOVE_ICON);
        if (!isNullOrUndefined2(iconEle)) {
          iconEle.classList.add(ABORT_ICON, UPLOAD_INPROGRESS);
          iconEle.setAttribute("title", this.localizedTexts("abort"));
          iconEle.classList.remove(REMOVE_ICON);
        }
      } else {
        this.cancelUploadingFile(files, e, request);
      }
      var args = {
        e,
        operation: "upload",
        file: this.updateStatus(files, this.localizedTexts("inProgress"), "3")
      };
      this.trigger("progress", args);
    };
    Uploader2.prototype.cancelUploadingFile = function(files, e, request, li) {
      var _this = this;
      if (files.statusCode === "5") {
        var eventArgs = {
          event: e,
          fileData: files,
          cancel: false,
          customFormData: [],
          currentRequest: null
        };
        this.trigger("canceling", eventArgs, function(eventArgs2) {
          if (eventArgs2.cancel) {
            files.statusCode = "3";
            if (!isNullOrUndefined2(li)) {
              var spinnerTarget = li.querySelector("." + ABORT_ICON);
              if (!isNullOrUndefined2(spinnerTarget)) {
                hideSpinner(spinnerTarget);
                detach2(li.querySelector(".e-spinner-pane"));
              }
            }
          } else {
            request.emitError = false;
            request.httpRequest.abort();
            var formData = new FormData();
            if (files.statusCode === "5") {
              var name_1 = _this.element.getAttribute("name");
              formData.append(name_1, files.name);
              formData.append("cancel-uploading", files.name);
              _this.updateFormData(formData, eventArgs2.customFormData);
              var ajax_1 = new Ajax2(_this.asyncSettings.removeUrl, "POST", true, null);
              ajax_1.emitError = false;
              ajax_1.beforeSend = function(e2) {
                if (eventArgs2.currentRequest) {
                  _this.updateCustomheader(ajax_1.httpRequest, eventArgs2.currentRequest);
                }
              };
              ajax_1.onLoad = function(e2) {
                _this.removecanceledFile(e2, files);
                return {};
              };
              ajax_1.send(formData);
            }
          }
        });
      }
    };
    Uploader2.prototype.removecanceledFile = function(e, file) {
      var liElement = this.getLiElement(file);
      if (isNullOrUndefined2(liElement) || liElement.querySelector("." + RETRY_ICON) || isNullOrUndefined2(liElement.querySelector("." + ABORT_ICON))) {
        return;
      }
      this.updateStatus(file, this.localizedTexts("fileUploadCancel"), "5");
      this.renderFailureState(e, file, liElement);
      var spinnerTarget = liElement.querySelector("." + REMOVE_ICON);
      if (!isNullOrUndefined2(liElement)) {
        hideSpinner(spinnerTarget);
        if (!isNullOrUndefined2(liElement.querySelector(".e-spinner-pane"))) {
          detach2(liElement.querySelector(".e-spinner-pane"));
        }
      }
      var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;
      var args = {
        event: e,
        response: requestResponse,
        operation: "cancel",
        file
      };
      this.trigger("success", args);
    };
    Uploader2.prototype.renderFailureState = function(e, file, liElement) {
      var _this = this;
      this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
      this.removeProgressbar(liElement, "failure");
      if (!isNullOrUndefined2(liElement.querySelector(".e-file-status"))) {
        liElement.querySelector(".e-file-status").classList.add(UPLOAD_FAILED);
      }
      var deleteIcon = liElement.querySelector("." + ABORT_ICON);
      if (isNullOrUndefined2(deleteIcon)) {
        return;
      }
      deleteIcon.classList.remove(ABORT_ICON, UPLOAD_INPROGRESS);
      deleteIcon.classList.add(REMOVE_ICON);
      deleteIcon.setAttribute("title", this.localizedTexts("remove"));
      this.pauseButton = this.createElement("span", {
        className: "e-icons e-file-reload-btn",
        attrs: {
          "tabindex": this.btnTabIndex
        }
      });
      deleteIcon.parentElement.insertBefore(this.pauseButton, deleteIcon);
      this.pauseButton.setAttribute("title", this.localizedTexts("retry"));
      this.pauseButton.setAttribute("aria-label", this.localizedTexts("retry"));
      var retryElement = liElement.querySelector("." + RETRY_ICON);
      retryElement.addEventListener("click", function(e2) {
        _this.reloadcanceledFile(e2, file, liElement, false);
      }, false);
    };
    Uploader2.prototype.reloadcanceledFile = function(e, file, liElement, custom) {
      file.statusCode = "1";
      file.status = this.localizedTexts("readyToUploadMessage");
      if (!custom) {
        if (!isNullOrUndefined2(liElement.querySelector("." + STATUS))) {
          liElement.querySelector("." + STATUS).classList.remove(UPLOAD_FAILED);
        }
        if (!isNullOrUndefined2(liElement.querySelector("." + RETRY_ICON))) {
          detach2(liElement.querySelector("." + RETRY_ICON));
        }
        this.pauseButton = null;
      }
      if (!isNullOrUndefined2(liElement)) {
        liElement.classList.add(RESTRICT_RETRY);
      }
      this.upload([file]);
    };
    Uploader2.prototype.uploadComplete = function(e, file, customUI) {
      var status = e.target;
      if (status.readyState === 4 && status.status >= 200 && status.status <= 299) {
        var li = this.getLiElement(file);
        if (isNullOrUndefined2(li) && (!customUI || isNullOrUndefined2(customUI)) && this.showFileList) {
          return;
        }
        if (!isNullOrUndefined2(li)) {
          this.updateProgressBarClasses(li, UPLOAD_SUCCESS);
          this.removeProgressbar(li, "success");
          var iconEle = li.querySelector("." + ABORT_ICON);
          if (!isNullOrUndefined2(iconEle)) {
            iconEle.classList.add(DELETE_ICON);
            iconEle.setAttribute("title", this.localizedTexts("delete"));
            iconEle.setAttribute("aria-label", this.localizedTexts("delete"));
            iconEle.classList.remove(ABORT_ICON);
            iconEle.classList.remove(UPLOAD_INPROGRESS);
          }
        }
        this.raiseSuccessEvent(e, file);
      } else {
        this.uploadFailed(e, file);
      }
    };
    Uploader2.prototype.getResponse = function(e) {
      var target = e.currentTarget;
      var response = {
        readyState: target.readyState,
        statusCode: target.status,
        statusText: target.statusText,
        headers: target.getAllResponseHeaders(),
        withCredentials: target.withCredentials
      };
      return response;
    };
    Uploader2.prototype.raiseSuccessEvent = function(e, file) {
      var _this = this;
      var response = e && e.currentTarget ? this.getResponse(e) : null;
      var statusMessage = this.localizedTexts("uploadSuccessMessage");
      var args = {
        e,
        response,
        operation: "upload",
        file: this.updateStatus(file, statusMessage, "2", false),
        statusText: statusMessage
      };
      var liElement = this.getLiElement(file);
      if (!isNullOrUndefined2(liElement)) {
        var spinnerEle = liElement.querySelector("." + SPINNER_PANE);
        if (!isNullOrUndefined2(spinnerEle)) {
          hideSpinner(liElement);
          detach2(spinnerEle);
        }
      }
      this.trigger("success", args, function(args2) {
        _this.updateStatus(file, args2.statusText, "2");
        if (_this.multiple) {
          _this.uploadedFilesData.push(file);
        } else {
          _this.uploadedFilesData = [file];
        }
        _this.trigger("change", {
          file: _this.uploadedFilesData
        });
        _this.checkActionButtonStatus();
        if (_this.fileList.length > 0) {
          if (!_this.getLiElement(file).classList.contains(RESTRICT_RETRY)) {
            _this.uploadSequential();
            _this.checkActionComplete(true);
          } else {
            _this.getLiElement(file).classList.remove(RESTRICT_RETRY);
          }
        } else if (!_this.showFileList) {
          _this.checkActionComplete(true);
        }
      });
    };
    Uploader2.prototype.uploadFailed = function(e, file) {
      var _this = this;
      var li = this.getLiElement(file);
      var response = e && e.currentTarget ? this.getResponse(e) : null;
      var statusMessage = this.localizedTexts("uploadFailedMessage");
      var args = {
        e,
        response,
        operation: "upload",
        file: this.updateStatus(file, statusMessage, "0", false),
        statusText: statusMessage
      };
      if (!isNullOrUndefined2(li)) {
        this.renderFailureState(e, file, li);
      }
      this.trigger("failure", args, function(args2) {
        _this.updateStatus(file, args2.statusText, "0");
        _this.checkActionButtonStatus();
        _this.uploadSequential();
        _this.checkActionComplete(true);
      });
    };
    Uploader2.prototype.uploadSequential = function() {
      if (this.sequentialUpload) {
        if (this.autoUpload) {
          this.checkAutoUpload(this.filesData);
        } else {
          this.uploadButtonClick();
        }
      }
    };
    Uploader2.prototype.checkActionComplete = function(increment) {
      if (increment) {
        ++this.actionCompleteCount;
      } else {
        --this.actionCompleteCount;
      }
      this.raiseActionComplete();
    };
    Uploader2.prototype.raiseActionComplete = function() {
      if (this.filesData.length === this.actionCompleteCount && this.flag) {
        this.flag = false;
        var eventArgs = {
          fileData: []
        };
        eventArgs.fileData = this.getSelectedFileStatus(this.selectedFiles);
        this.trigger("actionComplete", eventArgs);
      }
    };
    Uploader2.prototype.getSelectedFileStatus = function(selectedFiles) {
      var matchFiles = [];
      var matchFilesIndex = 0;
      for (var selectFileIndex = 0; selectFileIndex < selectedFiles.length; selectFileIndex++) {
        var selectedFileData = selectedFiles[selectFileIndex];
        for (var fileDataIndex = 0; fileDataIndex < this.filesData.length; fileDataIndex++) {
          if (this.filesData[fileDataIndex].name === selectedFileData.name && this.filesData[fileDataIndex].status === selectedFileData.status) {
            matchFiles[matchFilesIndex] = this.filesData[fileDataIndex];
            ++matchFilesIndex;
            break;
          }
        }
      }
      return matchFiles;
    };
    Uploader2.prototype.updateProgressBarClasses = function(li, className) {
      var progressBar = li.querySelector("." + PROGRESSBAR);
      if (!isNullOrUndefined2(progressBar)) {
        progressBar.classList.add(className);
      }
    };
    Uploader2.prototype.removeProgressbar = function(li, callType) {
      var _this = this;
      if (!isNullOrUndefined2(li.querySelector("." + PROGRESS_WRAPPER))) {
        this.progressAnimation = new Animation2({
          duration: 1250
        });
        this.progressAnimation.animate(li.querySelector("." + PROGRESS_WRAPPER), {
          name: "FadeOut"
        });
        this.progressAnimation.animate(li.querySelector("." + PROGRESSBAR_TEXT), {
          name: "FadeOut"
        });
        setTimeout(function() {
          _this.animateProgressBar(li, callType);
        }, 750);
      }
    };
    Uploader2.prototype.animateProgressBar = function(li, callType) {
      if (callType === "success") {
        li.classList.add(UPLOAD_SUCCESS);
        if (!isNullOrUndefined2(li.querySelector("." + STATUS))) {
          li.querySelector("." + STATUS).classList.remove(UPLOAD_INPROGRESS);
          this.progressAnimation.animate(li.querySelector("." + STATUS), {
            name: "FadeIn"
          });
          li.querySelector("." + STATUS).classList.add(UPLOAD_SUCCESS);
        }
      } else {
        if (!isNullOrUndefined2(li.querySelector("." + STATUS))) {
          li.querySelector("." + STATUS).classList.remove(UPLOAD_INPROGRESS);
          this.progressAnimation.animate(li.querySelector("." + STATUS), {
            name: "FadeIn"
          });
          li.querySelector("." + STATUS).classList.add(UPLOAD_FAILED);
        }
      }
      if (li.querySelector("." + PROGRESS_WRAPPER)) {
        detach2(li.querySelector("." + PROGRESS_WRAPPER));
      }
    };
    Uploader2.prototype.setExtensions = function(extensions) {
      if (extensions !== "" && !isNullOrUndefined2(extensions)) {
        this.element.setAttribute("accept", extensions);
      } else {
        this.element.removeAttribute("accept");
      }
    };
    Uploader2.prototype.templateComplier = function(uploadTemplate) {
      if (uploadTemplate) {
        try {
          if (typeof uploadTemplate !== "function" && selectAll2(uploadTemplate, document).length) {
            return compile4(select2(uploadTemplate, document).innerHTML.trim());
          } else {
            return compile4(uploadTemplate);
          }
        } catch (exception) {
          return compile4(uploadTemplate);
        }
      }
      return void 0;
    };
    Uploader2.prototype.setRTL = function() {
      if (this.enableRtl) {
        addClass2([this.uploadWrapper], RTL11);
      } else {
        removeClass2([this.uploadWrapper], RTL11);
      }
    };
    Uploader2.prototype.localizedTexts = function(localeText) {
      this.l10n.setLocale(this.locale);
      return this.l10n.getConstant(localeText);
    };
    Uploader2.prototype.setControlStatus = function() {
      if (!this.enabled) {
        this.uploadWrapper.classList.add(DISABLED7);
        this.element.setAttribute("disabled", "disabled");
        this.browseButton.setAttribute("disabled", "disabled");
        if (!isNullOrUndefined2(this.clearButton)) {
          this.clearButton.setAttribute("disabled", "disabled");
        }
        if (!isNullOrUndefined2(this.uploadButton)) {
          this.uploadButton.setAttribute("disabled", "disabled");
        }
      } else {
        if (this.uploadWrapper.classList.contains(DISABLED7)) {
          this.uploadWrapper.classList.remove(DISABLED7);
        }
        if (!isNullOrUndefined2(this.browseButton) && this.element.hasAttribute("disabled")) {
          this.element.removeAttribute("disabled");
          this.browseButton.removeAttribute("disabled");
        }
        if (!isNullOrUndefined2(this.clearButton) && this.clearButton.hasAttribute("disabled")) {
          this.clearButton.removeAttribute("disabled");
        }
        if (!isNullOrUndefined2(this.uploadButton) && this.uploadButton.hasAttribute("disabled")) {
          this.uploadButton.hasAttribute("disabled");
        }
      }
    };
    Uploader2.prototype.checkHTMLAttributes = function(isDynamic) {
      var attributes4 = isDynamic ? isNullOrUndefined2(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ["accept", "multiple", "disabled"];
      for (var _i = 0, attributes_1 = attributes4; _i < attributes_1.length; _i++) {
        var prop = attributes_1[_i];
        if (!isNullOrUndefined2(this.element.getAttribute(prop))) {
          switch (prop) {
            case "accept":
              if (isNullOrUndefined2(this.uploaderOptions) || this.uploaderOptions["allowedExtensions"] === void 0 || isDynamic) {
                this.setProperties({
                  allowedExtensions: this.element.getAttribute("accept")
                }, !isDynamic);
                this.initialAttr.accept = this.allowedExtensions;
              }
              break;
            case "multiple":
              if (isNullOrUndefined2(this.uploaderOptions) || this.uploaderOptions["multiple"] === void 0 || isDynamic) {
                var isMutiple = this.element.getAttribute(prop) === "multiple" || this.element.getAttribute(prop) === "" || this.element.getAttribute(prop) === "true" ? true : false;
                this.setProperties({
                  multiple: isMutiple
                }, !isDynamic);
                this.initialAttr.multiple = true;
              }
              break;
            case "disabled":
              if (isNullOrUndefined2(this.uploaderOptions) || this.uploaderOptions["enabled"] === void 0 || isDynamic) {
                var isDisabled = this.element.getAttribute(prop) === "disabled" || this.element.getAttribute(prop) === "" || this.element.getAttribute(prop) === "true" ? false : true;
                this.setProperties({
                  enabled: isDisabled
                }, !isDynamic);
                this.initialAttr.disabled = true;
              }
          }
        }
      }
    };
    Uploader2.prototype.chunkUpload = function(file, custom, fileIndex) {
      var start = 0;
      var end = Math.min(this.asyncSettings.chunkSize, file.size);
      var index = 0;
      var blob = file.rawFile.slice(start, end);
      var metaData = {
        chunkIndex: index,
        blob,
        file,
        start,
        end,
        retryCount: 0,
        request: null
      };
      this.sendRequest(file, metaData, custom, fileIndex);
    };
    Uploader2.prototype.sendRequest = function(file, metaData, custom, fileIndex) {
      var _this = this;
      var formData = new FormData();
      var blob = file.rawFile.slice(metaData.start, metaData.end);
      formData.append(this.uploaderName, blob, file.name);
      formData.append("chunk-index", metaData.chunkIndex.toString());
      formData.append("chunkIndex", metaData.chunkIndex.toString());
      var totalChunk = Math.max(Math.ceil(file.size / this.asyncSettings.chunkSize), 1);
      formData.append("total-chunk", totalChunk.toString());
      formData.append("totalChunk", totalChunk.toString());
      var ajax = new Ajax2({
        url: this.asyncSettings.saveUrl,
        type: "POST",
        async: true,
        contentType: null
      });
      ajax.emitError = false;
      ajax.onLoad = function(e) {
        _this.chunkUploadComplete(e, metaData, custom);
        return {};
      };
      ajax.onUploadProgress = function(e) {
        _this.chunkUploadInProgress(e, metaData, custom);
        return {};
      };
      var eventArgs = {
        fileData: file,
        customFormData: [],
        cancel: false,
        chunkSize: this.asyncSettings.chunkSize === 0 ? null : this.asyncSettings.chunkSize
      };
      ajax.beforeSend = function(e) {
        eventArgs.currentRequest = ajax.httpRequest;
        eventArgs.currentChunkIndex = metaData.chunkIndex;
        if (eventArgs.currentChunkIndex === 0) {
          _this.trigger("uploading", eventArgs, function(eventArgs2) {
            _this.uploadingEventCallback(formData, eventArgs2, e, file);
          });
        } else {
          _this.trigger("chunkUploading", eventArgs, function(eventArgs2) {
            _this.uploadingEventCallback(formData, eventArgs2, e, file);
          });
        }
      };
      ajax.onError = function(e) {
        _this.chunkUploadFailed(e, metaData, custom);
        return {};
      };
      ajax.send(formData);
      metaData.request = ajax;
    };
    Uploader2.prototype.uploadingEventCallback = function(formData, eventArgs, e, file) {
      if (eventArgs.cancel) {
        this.eventCancelByArgs(e, eventArgs, file);
      } else {
        this.updateFormData(formData, eventArgs.customFormData);
      }
    };
    Uploader2.prototype.eventCancelByArgs = function(e, eventArgs, file) {
      var _this = this;
      e.cancel = true;
      if (eventArgs.fileData.statusCode === "5") {
        return;
      }
      eventArgs.fileData.statusCode = "5";
      eventArgs.fileData.status = this.localizedTexts("fileUploadCancel");
      var liElement = this.getLiElement(eventArgs.fileData);
      if (liElement) {
        if (!isNullOrUndefined2(liElement.querySelector("." + STATUS))) {
          liElement.querySelector("." + STATUS).innerHTML = this.localizedTexts("fileUploadCancel");
          liElement.querySelector("." + STATUS).classList.add(UPLOAD_FAILED);
        }
        this.pauseButton = this.createElement("span", {
          className: "e-icons e-file-reload-btn",
          attrs: {
            "tabindex": this.btnTabIndex
          }
        });
        var removeIcon = liElement.querySelector("." + REMOVE_ICON);
        if (removeIcon) {
          removeIcon.parentElement.insertBefore(this.pauseButton, removeIcon);
        }
        this.pauseButton.setAttribute("title", this.localizedTexts("retry"));
        this.pauseButton.addEventListener("click", function(e2) {
          _this.reloadcanceledFile(e2, file, liElement);
        }, false);
        this.checkActionButtonStatus();
      }
    };
    Uploader2.prototype.checkChunkUpload = function() {
      return this.asyncSettings.chunkSize <= 0 || isNullOrUndefined2(this.asyncSettings.chunkSize) ? false : true;
    };
    Uploader2.prototype.chunkUploadComplete = function(e, metaData, custom) {
      var _this = this;
      var response = e.target;
      var liElement;
      if (response.readyState === 4 && response.status >= 200 && response.status < 300) {
        var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;
        var totalChunk = Math.max(Math.ceil(metaData.file.size / this.asyncSettings.chunkSize), 1);
        var eventArgs = {
          event: e,
          file: metaData.file,
          chunkIndex: metaData.chunkIndex,
          totalChunk,
          chunkSize: this.asyncSettings.chunkSize,
          response: requestResponse
        };
        this.trigger("chunkSuccess", eventArgs);
        if (isNullOrUndefined2(custom) || !custom) {
          liElement = this.getLiElement(metaData.file);
        }
        this.updateMetaData(metaData);
        if (metaData.end === metaData.file.size) {
          metaData.file.statusCode = "3";
        }
        if (metaData.file.statusCode === "5") {
          var eventArgs_1 = {
            event: e,
            fileData: metaData.file,
            cancel: false,
            customFormData: []
          };
          this.trigger("canceling", eventArgs_1, function(eventArgs2) {
            if (eventArgs2.cancel) {
              metaData.file.statusCode = "3";
              var spinnerTarget = liElement.querySelector("." + ABORT_ICON);
              if (!isNullOrUndefined2(liElement) && !isNullOrUndefined2(spinnerTarget)) {
                hideSpinner(spinnerTarget);
                detach2(liElement.querySelector(".e-spinner-pane"));
              }
              _this.sendNextRequest(metaData);
            } else {
              metaData.request.emitError = false;
              response.abort();
              var formData = new FormData();
              var name_2 = _this.element.getAttribute("name");
              formData.append(name_2, metaData.file.name);
              formData.append("cancel-uploading", metaData.file.name);
              formData.append("cancelUploading", metaData.file.name);
              _this.updateFormData(formData, eventArgs2.customFormData);
              var ajax = new Ajax2(_this.asyncSettings.removeUrl, "POST", true, null);
              ajax.emitError = false;
              ajax.onLoad = function(e2) {
                _this.removeChunkFile(e2, metaData, custom);
                return {};
              };
              ajax.send(formData);
            }
          });
        } else {
          if (totalChunk - 1 === metaData.chunkIndex && totalChunk > metaData.chunkIndex) {
            var index = this.pausedData.indexOf(metaData);
            if (index >= 0) {
              this.pausedData.splice(index, 1);
            }
            if (isNullOrUndefined2(this.template) && (isNullOrUndefined2(custom) || !custom) && liElement) {
              if (liElement && !isNullOrUndefined2(liElement.querySelector("." + PAUSE_UPLOAD))) {
                detach2(liElement.querySelector("." + PAUSE_UPLOAD));
              }
              this.removeChunkProgressBar(metaData);
            }
            this.raiseSuccessEvent(e, metaData.file);
            return;
          }
          if (metaData.file.statusCode !== "4") {
            this.sendNextRequest(metaData);
          }
        }
      } else {
        this.chunkUploadFailed(e, metaData);
      }
    };
    Uploader2.prototype.sendNextRequest = function(metaData) {
      metaData.start = metaData.end;
      metaData.end += this.asyncSettings.chunkSize;
      metaData.end = Math.min(metaData.end, metaData.file.size);
      metaData.chunkIndex += 1;
      this.sendRequest(metaData.file, metaData);
    };
    Uploader2.prototype.removeChunkFile = function(e, metaData, custom) {
      if (isNullOrUndefined2(this.template) && isNullOrUndefined2(custom) && !custom) {
        var liElement = this.getLiElement(metaData.file);
        var deleteIcon = liElement.querySelector("." + ABORT_ICON);
        var spinnerTarget = deleteIcon;
        this.updateStatus(metaData.file, this.localizedTexts("fileUploadCancel"), "5");
        this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
        this.removeProgressbar(liElement, "failure");
        if (deleteIcon) {
          deleteIcon.classList.remove(ABORT_ICON);
          deleteIcon.classList.add(REMOVE_ICON);
          deleteIcon.setAttribute("title", this.localizedTexts("remove"));
        }
        var pauseIcon = liElement.querySelector("." + PAUSE_UPLOAD);
        if (pauseIcon) {
          pauseIcon.classList.add(RETRY_ICON);
          pauseIcon.classList.remove(PAUSE_UPLOAD);
          pauseIcon.setAttribute("title", this.localizedTexts("retry"));
        }
        if (!isNullOrUndefined2(liElement) && !isNullOrUndefined2(deleteIcon) && !isNullOrUndefined2(liElement.querySelector(".e-spinner-pane"))) {
          hideSpinner(spinnerTarget);
          detach2(liElement.querySelector(".e-spinner-pane"));
        }
      }
    };
    Uploader2.prototype.pauseUpload = function(metaData, e, custom) {
      metaData.file.statusCode = "4";
      metaData.file.status = this.localizedTexts("pause");
      this.updateMetaData(metaData);
      var eventArgs = {
        event: e ? e : null,
        file: metaData.file,
        chunkIndex: metaData.chunkIndex,
        chunkCount: Math.round(metaData.file.size / this.asyncSettings.chunkSize),
        chunkSize: this.asyncSettings.chunkSize
      };
      this.abortUpload(metaData, custom, eventArgs);
      if (this.sequentialUpload) {
        this.uploadSequential();
      }
    };
    Uploader2.prototype.abortUpload = function(metaData, custom, eventArgs) {
      if (metaData.file.statusCode !== "4") {
        metaData.request.emitError = false;
        metaData.request.httpRequest.abort();
      }
      var liElement = this.getLiElement(metaData.file);
      if (isNullOrUndefined2(this.template) && (isNullOrUndefined2(custom) || !custom)) {
        var targetElement2 = liElement.querySelector("." + PAUSE_UPLOAD);
        targetElement2.classList.remove(PAUSE_UPLOAD);
        targetElement2.classList.add(RESUME_UPLOAD);
        targetElement2.setAttribute("title", this.localizedTexts("resume"));
        targetElement2.nextElementSibling.classList.add(REMOVE_ICON);
        targetElement2.nextElementSibling.classList.remove(ABORT_ICON);
        targetElement2.nextElementSibling.setAttribute("title", this.localizedTexts("remove"));
      }
      for (var i = 0; i < this.pausedData.length; i++) {
        if (this.pausedData[i].file.name === metaData.file.name) {
          this.pausedData.splice(i, 1);
        }
      }
      this.pausedData.push(metaData);
      this.trigger("pausing", eventArgs);
    };
    Uploader2.prototype.resumeUpload = function(metaData, e, custom) {
      var liElement = this.getLiElement(metaData.file);
      var targetElement2;
      if (!isNullOrUndefined2(liElement)) {
        targetElement2 = liElement.querySelector("." + RESUME_UPLOAD);
      }
      if (!isNullOrUndefined2(targetElement2) && (isNullOrUndefined2(custom) || !custom)) {
        targetElement2.classList.remove(RESUME_UPLOAD);
        targetElement2.classList.add(PAUSE_UPLOAD);
        targetElement2.setAttribute("title", this.localizedTexts("pause"));
        targetElement2.nextElementSibling.classList.remove(REMOVE_ICON);
        targetElement2.nextElementSibling.classList.add(ABORT_ICON);
        targetElement2.nextElementSibling.setAttribute("title", this.localizedTexts("abort"));
      }
      metaData.file.status = this.localizedTexts("inProgress");
      metaData.file.statusCode = "3";
      this.updateMetaData(metaData);
      var eventArgs = {
        event: e ? e : null,
        file: metaData.file,
        chunkIndex: metaData.chunkIndex,
        chunkCount: Math.round(metaData.file.size / this.asyncSettings.chunkSize),
        chunkSize: this.asyncSettings.chunkSize
      };
      this.trigger("resuming", eventArgs);
      for (var i = 0; i < this.pausedData.length; i++) {
        if (this.pausedData[i].end === this.pausedData[i].file.size) {
          this.chunkUploadComplete(e, metaData, custom);
        } else {
          if (this.pausedData[i].file.name === metaData.file.name) {
            this.pausedData[i].start = this.pausedData[i].end;
            this.pausedData[i].end = this.pausedData[i].end + this.asyncSettings.chunkSize;
            this.pausedData[i].end = Math.min(this.pausedData[i].end, this.pausedData[i].file.size);
            this.pausedData[i].chunkIndex = this.pausedData[i].chunkIndex + 1;
            this.sendRequest(this.pausedData[i].file, this.pausedData[i], custom);
          }
        }
      }
    };
    Uploader2.prototype.updateMetaData = function(metaData) {
      if (this.uploadMetaData.indexOf(metaData) === -1) {
        this.uploadMetaData.push(metaData);
      } else {
        this.uploadMetaData.splice(this.uploadMetaData.indexOf(metaData), 1);
        this.uploadMetaData.push(metaData);
      }
    };
    Uploader2.prototype.removeChunkProgressBar = function(metaData) {
      var liElement = this.getLiElement(metaData.file);
      if (!isNullOrUndefined2(liElement)) {
        this.updateProgressBarClasses(liElement, UPLOAD_SUCCESS);
        this.removeProgressbar(liElement, "success");
        var cancelButton = liElement.querySelector("." + ABORT_ICON);
        if (!isNullOrUndefined2(cancelButton)) {
          cancelButton.classList.add(DELETE_ICON);
          cancelButton.setAttribute("title", this.localizedTexts("delete"));
          cancelButton.classList.remove(ABORT_ICON, UPLOAD_INPROGRESS);
        }
      }
    };
    Uploader2.prototype.chunkUploadFailed = function(e, metaData, custom) {
      var _this = this;
      var chunkCount = Math.max(Math.ceil(metaData.file.size / this.asyncSettings.chunkSize), 1);
      var liElement;
      if (isNullOrUndefined2(this.template) && (isNullOrUndefined2(custom) || !custom)) {
        liElement = this.getLiElement(metaData.file);
      }
      var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;
      var eventArgs = {
        event: e,
        file: metaData.file,
        chunkIndex: metaData.chunkIndex,
        totalChunk: chunkCount,
        chunkSize: this.asyncSettings.chunkSize,
        cancel: false,
        response: requestResponse
      };
      this.trigger("chunkFailure", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel) {
          if (metaData.retryCount < _this.asyncSettings.retryCount) {
            setTimeout(function() {
              _this.retryRequest(liElement, metaData, custom);
            }, _this.asyncSettings.retryAfterDelay);
          } else {
            if (!isNullOrUndefined2(liElement)) {
              var pauseButton = liElement.querySelector("." + PAUSE_UPLOAD) ? liElement.querySelector("." + PAUSE_UPLOAD) : liElement.querySelector("." + RESUME_UPLOAD);
              if (!isNullOrUndefined2(pauseButton)) {
                pauseButton.classList.add(RETRY_ICON);
                pauseButton.classList.remove(PAUSE_UPLOAD, RESUME_UPLOAD);
              }
              _this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
              _this.removeProgressbar(liElement, "failure");
              liElement.querySelector(".e-icons").classList.remove(UPLOAD_INPROGRESS);
              var iconElement = liElement.querySelector("." + ABORT_ICON) ? liElement.querySelector("." + ABORT_ICON) : liElement.querySelector("." + REMOVE_ICON);
              iconElement.classList.remove(ABORT_ICON);
              if (!isNullOrUndefined2(liElement.querySelector("." + PAUSE_UPLOAD))) {
                detach2(liElement.querySelector("." + PAUSE_UPLOAD));
              }
              if (metaData.start > 0) {
                iconElement.classList.add(DELETE_ICON);
                iconElement.setAttribute("title", _this.localizedTexts("delete"));
              } else {
                iconElement.classList.add(REMOVE_ICON);
                iconElement.setAttribute("title", _this.localizedTexts("remove"));
              }
            }
            metaData.retryCount = 0;
            var file_1 = metaData.file;
            var failureMessage = _this.localizedTexts("uploadFailedMessage");
            var args = {
              e,
              response: requestResponse,
              operation: "upload",
              file: _this.updateStatus(file_1, failureMessage, "0", false),
              statusText: failureMessage
            };
            _this.trigger("failure", args, function(args2) {
              _this.updateStatus(file_1, args2.statusText, "0");
              _this.uploadSequential();
              _this.checkActionComplete(true);
            });
          }
        }
      });
    };
    Uploader2.prototype.retryRequest = function(liElement, metaData, custom) {
      if (isNullOrUndefined2(this.template) && (isNullOrUndefined2(custom) || !custom) && liElement) {
        this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
      }
      metaData.retryCount += 1;
      this.sendRequest(metaData.file, metaData);
    };
    Uploader2.prototype.checkPausePlayAction = function(e) {
      var targetElement2 = e.target;
      var selectedElement = e.target.parentElement;
      var index = this.fileList.indexOf(selectedElement);
      var fileData = this.filesData[index];
      var metaData = this.getCurrentMetaData(fileData);
      if (targetElement2.classList.contains(PAUSE_UPLOAD)) {
        this.pauseUpload(metaData, e);
      } else if (targetElement2.classList.contains(RESUME_UPLOAD)) {
        this.resumeUpload(metaData, e);
      } else if (targetElement2.classList.contains(RETRY_ICON)) {
        if (metaData.file.status === this.localizedTexts("fileUploadCancel")) {
          this.retryUpload(metaData, false);
        } else {
          this.retryUpload(metaData, true);
        }
      }
    };
    Uploader2.prototype.retryUpload = function(metaData, fromcanceledStage) {
      if (fromcanceledStage) {
        metaData.end = metaData.end + this.asyncSettings.chunkSize;
        metaData.start = metaData.start + this.asyncSettings.chunkSize;
        this.sendRequest(metaData.file, metaData);
      } else {
        metaData.file.statusCode = "1";
        metaData.file.status = this.localizedTexts("readyToUploadMessage");
        this.chunkUpload(metaData.file);
      }
      this.getLiElement(metaData.file).classList.add(RESTRICT_RETRY);
    };
    Uploader2.prototype.chunkUploadInProgress = function(e, metaData, custom) {
      var _this = this;
      if (metaData.file.statusCode === "4") {
        return;
      }
      if (metaData.file.statusCode !== "4" && metaData.file.statusCode !== "5") {
        metaData.file.statusCode = "3";
        metaData.file.status = this.localizedTexts("inProgress");
      }
      this.updateMetaData(metaData);
      var liElement = this.getLiElement(metaData.file);
      if (isNullOrUndefined2(liElement)) {
        return;
      }
      var retryElement = liElement.querySelector("." + RETRY_ICON);
      if (!isNullOrUndefined2(retryElement)) {
        retryElement.classList.add(PAUSE_UPLOAD);
        retryElement.setAttribute("title", this.localizedTexts("pause"));
        retryElement.classList.remove(RETRY_ICON);
      }
      if (!isNullOrUndefined2(liElement)) {
        if (!(liElement.querySelectorAll("." + PROGRESS_WRAPPER).length > 0)) {
          var statusElement = liElement.querySelector("." + STATUS);
          if (isNullOrUndefined2(this.template)) {
            statusElement.classList.add(UPLOAD_INPROGRESS);
            statusElement.classList.remove(UPLOAD_FAILED);
            this.createProgressBar(liElement);
            this.updateProgressBarClasses(liElement, UPLOAD_INPROGRESS);
          }
          var clearIcon2 = liElement.querySelector("." + REMOVE_ICON) ? liElement.querySelector("." + REMOVE_ICON) : liElement.querySelector("." + DELETE_ICON);
          if (!isNullOrUndefined2(clearIcon2)) {
            clearIcon2.classList.add(ABORT_ICON);
            clearIcon2.setAttribute("title", this.localizedTexts("abort"));
            clearIcon2.classList.remove(REMOVE_ICON);
          }
        }
        if (!isNaN(Math.round(e.loaded / e.total * 100)) && isNullOrUndefined2(this.template) && metaData.file.statusCode !== "4") {
          var progressVal = void 0;
          var totalChunks = Math.ceil(metaData.file.size / this.asyncSettings.chunkSize) - 1;
          if (this.asyncSettings.chunkSize && totalChunks) {
            progressVal = Math.round(metaData.chunkIndex / totalChunks * 100);
            this.changeProgressValue(liElement, progressVal.toString() + "%");
          }
        }
        if (metaData.chunkIndex === 0) {
          this.checkActionButtonStatus();
        }
      }
      if (isNullOrUndefined2(liElement.querySelector("." + PAUSE_UPLOAD)) && isNullOrUndefined2(this.template) && isNullOrUndefined2(liElement.querySelector("." + DELETE_ICON))) {
        this.pauseButton = this.createElement("span", {
          className: "e-icons e-file-pause-btn",
          attrs: {
            "tabindex": this.btnTabIndex
          }
        });
        if (this.browserName === "msie") {
          this.pauseButton.classList.add("e-msie");
        }
        var abortIcon = liElement.querySelector("." + ABORT_ICON);
        abortIcon.parentElement.insertBefore(this.pauseButton, abortIcon);
        this.pauseButton.setAttribute("title", this.localizedTexts("pause"));
        this.pauseButton.addEventListener("click", function(e2) {
          _this.checkPausePlayAction(e2);
        }, false);
      }
    };
    Uploader2.prototype.bytesToSize = function(bytes) {
      var i = -1;
      if (!bytes) {
        return "0.0 KB";
      }
      do {
        bytes = bytes / 1024;
        i++;
      } while (bytes > 99);
      if (i >= 2) {
        bytes = bytes * 1024;
        i = 1;
      }
      return Math.max(bytes, 0).toFixed(1) + " " + ["KB", "MB"][i];
    };
    Uploader2.prototype.sortFileList = function(filesData) {
      filesData = filesData ? filesData : this.sortFilesList;
      var files = filesData;
      var fileNames = [];
      for (var i = 0; i < files.length; i++) {
        fileNames.push(files[i].name);
      }
      var sortedFileNames = fileNames.sort();
      var sortedFilesData = [];
      for (var _i = 0, sortedFileNames_1 = sortedFileNames; _i < sortedFileNames_1.length; _i++) {
        var name_3 = sortedFileNames_1[_i];
        for (var i = 0; i < files.length; i++) {
          if (name_3 === files[i].name) {
            sortedFilesData.push(files[i]);
          }
        }
      }
      return sortedFilesData;
    };
    Uploader2.prototype.destroy = function() {
      this.element.value = null;
      this.clearTemplate();
      this.clearAll();
      this.unWireEvents();
      this.unBindDropEvents();
      if (this.multiple) {
        this.element.removeAttribute("multiple");
      }
      if (!this.enabled) {
        this.element.removeAttribute("disabled");
      }
      this.element.removeAttribute("accept");
      this.setInitialAttributes();
      var attributes4 = ["aria-label", "directory", "webkitdirectory", "tabindex"];
      for (var _i = 0, attributes_2 = attributes4; _i < attributes_2.length; _i++) {
        var key = attributes_2[_i];
        this.element.removeAttribute(key);
      }
      if (!isNullOrUndefined2(this.uploadWrapper)) {
        this.uploadWrapper.parentElement.appendChild(this.element);
        detach2(this.uploadWrapper);
      }
      this.uploadWrapper = null;
      this.uploadWrapper = null;
      this.browseButton = null;
      this.dropAreaWrapper = null;
      this.dropZoneElement = null;
      this.dropArea = null;
      this.keyboardModule = null;
      this.clearButton = null;
      this.uploadButton = null;
      _super.prototype.destroy.call(this);
    };
    Uploader2.prototype.upload = function(files, custom) {
      var _this = this;
      files = files ? files : this.filesData;
      if (this.sequentialUpload && (this.isFirstFileOnSelection || custom)) {
        this.sequenceUpload(files);
      } else {
        var uploadFiles_1 = this.getFilesInArray(files);
        var eventArgs = {
          customFormData: [],
          currentRequest: null,
          cancel: false
        };
        this.trigger("beforeUpload", eventArgs, function(eventArgs2) {
          if (!eventArgs2.cancel) {
            _this.customFormDatas = eventArgs2.customFormData && eventArgs2.customFormData.length > 0 ? eventArgs2.customFormData : _this.customFormDatas;
            _this.uploadFiles(uploadFiles_1, custom);
          }
        });
      }
    };
    Uploader2.prototype.getFilesInArray = function(files) {
      var uploadFiles = [];
      if (files instanceof Array) {
        uploadFiles = files;
      } else {
        uploadFiles.push(files);
      }
      return uploadFiles;
    };
    Uploader2.prototype.serverReadFileBase64 = function(fileIndex, position, totalCount) {
      var _this = this;
      return new Promise(function(resolve, reject) {
        var file = _this.fileStreams[fileIndex].rawFile;
        try {
          var reader = new FileReader();
          reader.onload = /* @__PURE__ */ function(args) {
            return function() {
              try {
                var contents = args.result;
                var data = contents ? contents.split(";base64,")[1] : null;
                resolve(data);
              } catch (e) {
                reject(e);
              }
            };
          }(reader);
          reader.readAsDataURL(file.slice(position, position + totalCount));
        } catch (e) {
          reject(e);
        }
      });
    };
    Uploader2.prototype.uploadFileCount = function(ele) {
      var files = this.filesData;
      if (!files || files.length === 0) {
        return -1;
      }
      var result = files.length;
      return result;
    };
    Uploader2.prototype.getFileRead = function(index, ele) {
      var files = this.filesData;
      if (!files || files.length === 0) {
        return -1;
      }
      var file = files[index];
      var fileCount = this.newFileRef++;
      this.fileStreams[fileCount] = file;
      return fileCount;
    };
    Uploader2.prototype.uploadFiles = function(files, custom) {
      var selectedFiles = [];
      if (this.asyncSettings.saveUrl === "" || isNullOrUndefined2(this.asyncSettings.saveUrl)) {
        return;
      }
      if (!custom || isNullOrUndefined2(custom)) {
        if (!this.multiple) {
          var file = [];
          file.push(files[0]);
          selectedFiles = this.filterfileList(file);
        } else {
          selectedFiles = this.filterfileList(files);
        }
      } else {
        selectedFiles = files;
      }
      for (var i = 0; i < selectedFiles.length; i++) {
        this.uploadFilesRequest(selectedFiles, i, custom);
      }
    };
    Uploader2.prototype.uploadFilesRequest = function(selectedFiles, i, custom) {
      var _this = this;
      var chunkEnabled = this.checkChunkUpload();
      var ajax = new Ajax2(this.asyncSettings.saveUrl, "POST", true, null);
      ajax.emitError = false;
      var eventArgs = {
        fileData: selectedFiles[i],
        customFormData: [],
        cancel: false
      };
      var formData = new FormData();
      ajax.beforeSend = function(e) {
        eventArgs.currentRequest = ajax.httpRequest;
        _this.trigger("uploading", eventArgs, function(eventArgs2) {
          if (eventArgs2.cancel) {
            _this.eventCancelByArgs(e, eventArgs2, selectedFiles[i]);
          }
          if (_this.customFormDatas && _this.customFormDatas.length > 0) {
            _this.updateFormData(formData, _this.customFormDatas);
          }
          _this.updateFormData(formData, eventArgs2.customFormData);
        });
      };
      if (selectedFiles[i].statusCode === "1") {
        var name_4 = this.element.getAttribute("name");
        formData.append(name_4, selectedFiles[i].rawFile, selectedFiles[i].name);
        if (chunkEnabled && selectedFiles[i].size > this.asyncSettings.chunkSize) {
          this.chunkUpload(selectedFiles[i], custom, i);
        } else {
          ajax.onLoad = function(e) {
            if (eventArgs.cancel) {
              return {};
            } else {
              _this.uploadComplete(e, selectedFiles[i], custom);
              return {};
            }
          };
          ajax.onUploadProgress = function(e) {
            if (eventArgs.cancel) {
              return {};
            } else {
              _this.uploadInProgress(e, selectedFiles[i], custom, ajax);
              return {};
            }
          };
          ajax.onError = function(e) {
            _this.uploadFailed(e, selectedFiles[i]);
            return {};
          };
          ajax.send(formData);
        }
      }
    };
    Uploader2.prototype.spliceFiles = function(liIndex) {
      var liElement = this.fileList[liIndex];
      var allFiles = this.getFilesData();
      var nameElements = +liElement.getAttribute("data-files-count");
      var startIndex = 0;
      for (var i = 0; i < liIndex; i++) {
        startIndex += +this.fileList[i].getAttribute("data-files-count");
      }
      var endIndex = startIndex + nameElements - 1;
      for (var j = endIndex; j >= startIndex; j--) {
        allFiles.splice(j, 1);
      }
    };
    Uploader2.prototype.remove = function(fileData, customTemplate, removeDirectly, postRawFile, args) {
      var _this = this;
      if (isNullOrUndefined2(postRawFile)) {
        postRawFile = true;
      }
      var eventArgs = {
        event: args,
        cancel: false,
        filesData: [],
        customFormData: [],
        postRawFile,
        currentRequest: null
      };
      var beforeEventArgs = {
        cancel: false,
        customFormData: [],
        currentRequest: null
      };
      this.trigger("beforeRemove", beforeEventArgs, function(beforeEventArgs2) {
        if (!beforeEventArgs2.cancel) {
          if (_this.isFormUpload()) {
            eventArgs.filesData = fileData;
            _this.trigger("removing", eventArgs, function(eventArgs2) {
              if (!eventArgs2.cancel) {
                var removingFiles = _this.getFilesInArray(fileData);
                var isLiRemoved = false;
                var liIndex = void 0;
                for (var _i2 = 0, removingFiles_1 = removingFiles; _i2 < removingFiles_1.length; _i2++) {
                  var data = removingFiles_1[_i2];
                  if (!isLiRemoved) {
                    liIndex = _this.fileList.indexOf(data.list);
                  }
                  if (liIndex > -1) {
                    var inputElement = !isNullOrUndefined2(data.input) ? data.input : null;
                    if (inputElement) {
                      detach2(inputElement);
                    }
                    _this.spliceFiles(liIndex);
                    detach2(_this.fileList[liIndex]);
                    _this.fileList.splice(liIndex, 1);
                    isLiRemoved = true;
                    liIndex = -1;
                  }
                }
              }
            });
          } else if (_this.isForm && (isNullOrUndefined2(_this.asyncSettings.removeUrl) || _this.asyncSettings.removeUrl === "")) {
            eventArgs.filesData = _this.getFilesData();
            _this.trigger("removing", eventArgs, function(eventArgs2) {
              if (!eventArgs2.cancel) {
                _this.clearAll();
              }
            });
          } else {
            var removeFiles = [];
            fileData = !isNullOrUndefined2(fileData) ? fileData : _this.filesData;
            if (fileData instanceof Array) {
              removeFiles = fileData;
            } else {
              removeFiles.push(fileData);
            }
            eventArgs.filesData = removeFiles;
            var removeUrl = _this.asyncSettings.removeUrl;
            var validUrl = removeUrl === "" || isNullOrUndefined2(removeUrl) ? false : true;
            var _loop_5 = function(files2) {
              var fileUploadedIndex = _this.uploadedFilesData.indexOf(files2);
              if ((files2.statusCode === "2" || files2.statusCode === "4" || files2.statusCode === "0" && fileUploadedIndex !== -1) && validUrl) {
                _this.removeUploadedFile(files2, eventArgs, removeDirectly, customTemplate);
              } else {
                if (!removeDirectly) {
                  _this.trigger("removing", eventArgs, function(eventArgs2) {
                    if (!eventArgs2.cancel) {
                      _this.removeFilesData(files2, customTemplate);
                    }
                  });
                } else {
                  _this.removeFilesData(files2, customTemplate);
                }
              }
              if (args && !args.target.classList.contains(REMOVE_ICON)) {
                _this.checkActionComplete(false);
              }
            };
            for (var _i = 0, removeFiles_1 = removeFiles; _i < removeFiles_1.length; _i++) {
              var files = removeFiles_1[_i];
              _loop_5(files);
            }
          }
        }
      });
    };
    Uploader2.prototype.clearAll = function() {
      var _this = this;
      if (isNullOrUndefined2(this.listParent)) {
        if (this.browserName !== "msie") {
          this.element.value = "";
        }
        this.filesData = [];
        return;
      }
      var eventArgs = {
        cancel: false,
        filesData: this.filesData
      };
      this.trigger("clearing", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel) {
          _this.clearData();
          _this.actionCompleteCount = 0;
          _this.count = -1;
        }
      });
    };
    Uploader2.prototype.getFilesData = function(index) {
      if (isNullOrUndefined2(index)) {
        return this.filesData;
      } else {
        return this.getSelectedFiles(index);
      }
    };
    Uploader2.prototype.pause = function(fileData, custom) {
      fileData = fileData ? fileData : this.filesData;
      var fileDataFiles = this.getFilesInArray(fileData);
      this.pauseUploading(fileDataFiles, custom);
    };
    Uploader2.prototype.pauseUploading = function(fileData, custom) {
      var files = this.getFiles(fileData);
      for (var i = 0; i < files.length; i++) {
        if (files[i].statusCode === "3") {
          this.pauseUpload(this.getCurrentMetaData(files[i], null), null, custom);
        }
      }
    };
    Uploader2.prototype.getFiles = function(fileData) {
      var files = [];
      if (!isNullOrUndefined2(fileData) && !(fileData instanceof Array)) {
        files.push(fileData);
      } else {
        files = fileData;
      }
      return files;
    };
    Uploader2.prototype.resume = function(fileData, custom) {
      fileData = fileData ? fileData : this.filesData;
      var fileDataFiles = this.getFilesInArray(fileData);
      this.resumeFiles(fileDataFiles, custom);
    };
    Uploader2.prototype.resumeFiles = function(fileData, custom) {
      var files = this.getFiles(fileData);
      for (var i = 0; i < files.length; i++) {
        if (files[i].statusCode === "4") {
          this.resumeUpload(this.getCurrentMetaData(files[i], null), null, custom);
        }
      }
    };
    Uploader2.prototype.retry = function(fileData, fromcanceledStage, custom) {
      fileData = fileData ? fileData : this.filesData;
      var fileDataFiles = this.getFilesInArray(fileData);
      if (this.sequentialUpload && this.isFirstFileOnSelection) {
        this.isFirstFileOnSelection = false;
      }
      this.retryFailedFiles(fileDataFiles, fromcanceledStage, custom);
    };
    Uploader2.prototype.retryFailedFiles = function(fileData, fromcanceledStage, custom) {
      var files = this.getFiles(fileData);
      for (var i = 0; i < files.length; i++) {
        if (files[i].statusCode === "5" || files[i].statusCode === "0") {
          if (this.asyncSettings.chunkSize > 0 && this.getCurrentMetaData(files[i], null)) {
            this.retryUpload(this.getCurrentMetaData(files[i], null), fromcanceledStage);
          } else {
            var liElement = void 0;
            if (!custom) {
              liElement = this.fileList[this.filesData.indexOf(files[i])];
            }
            this.reloadcanceledFile(null, files[i], liElement, custom);
          }
        }
      }
    };
    Uploader2.prototype.cancel = function(fileData) {
      fileData = fileData ? fileData : this.filesData;
      var cancelingFiles = this.getFilesInArray(fileData);
      this.cancelUpload(cancelingFiles);
    };
    Uploader2.prototype.cancelUpload = function(fileData) {
      var files = this.getFiles(fileData);
      if (this.asyncSettings.chunkSize > 0) {
        for (var i = 0; i < files.length; i++) {
          if (files[i].statusCode === "3") {
            var metaData = this.getCurrentMetaData(files[i], null);
            metaData.file.statusCode = "5";
            metaData.file.status = this.localizedTexts("fileUploadCancel");
            this.updateMetaData(metaData);
            this.showHideUploadSpinner(files[i]);
          }
        }
      } else {
        for (var i = 0; i < files.length; i++) {
          if (files[i].statusCode === "3") {
            files[i].statusCode = "5";
            files[i].status = this.localizedTexts("fileUploadCancel");
            this.showHideUploadSpinner(files[i]);
          }
        }
      }
    };
    Uploader2.prototype.showHideUploadSpinner = function(files) {
      var liElement = this.getLiElement(files);
      if (!isNullOrUndefined2(liElement) && isNullOrUndefined2(this.template)) {
        var spinnerTarget = liElement.querySelector("." + ABORT_ICON);
        createSpinner({
          target: spinnerTarget,
          width: "20px"
        });
        showSpinner(spinnerTarget);
      }
    };
    __decorate55([Complex2({
      saveUrl: "",
      removeUrl: ""
    }, AsyncSettings)], Uploader2.prototype, "asyncSettings", void 0);
    __decorate55([Property2(false)], Uploader2.prototype, "sequentialUpload", void 0);
    __decorate55([Property2({})], Uploader2.prototype, "htmlAttributes", void 0);
    __decorate55([Property2("")], Uploader2.prototype, "cssClass", void 0);
    __decorate55([Property2(true)], Uploader2.prototype, "enabled", void 0);
    __decorate55([Property2(null)], Uploader2.prototype, "template", void 0);
    __decorate55([Property2(true)], Uploader2.prototype, "multiple", void 0);
    __decorate55([Property2(true)], Uploader2.prototype, "autoUpload", void 0);
    __decorate55([Property2(true)], Uploader2.prototype, "enableHtmlSanitizer", void 0);
    __decorate55([Complex2({}, ButtonsProps)], Uploader2.prototype, "buttons", void 0);
    __decorate55([Property2("")], Uploader2.prototype, "allowedExtensions", void 0);
    __decorate55([Property2(0)], Uploader2.prototype, "minFileSize", void 0);
    __decorate55([Property2(3e7)], Uploader2.prototype, "maxFileSize", void 0);
    __decorate55([Property2(null)], Uploader2.prototype, "dropArea", void 0);
    __decorate55([Collection([{}], FilesProp)], Uploader2.prototype, "files", void 0);
    __decorate55([Property2(true)], Uploader2.prototype, "showFileList", void 0);
    __decorate55([Property2(false)], Uploader2.prototype, "directoryUpload", void 0);
    __decorate55([Property2("Default")], Uploader2.prototype, "dropEffect", void 0);
    __decorate55([Event3()], Uploader2.prototype, "created", void 0);
    __decorate55([Event3()], Uploader2.prototype, "actionComplete", void 0);
    __decorate55([Event3()], Uploader2.prototype, "rendering", void 0);
    __decorate55([Event3()], Uploader2.prototype, "beforeUpload", void 0);
    __decorate55([Event3()], Uploader2.prototype, "fileListRendering", void 0);
    __decorate55([Event3()], Uploader2.prototype, "selected", void 0);
    __decorate55([Event3()], Uploader2.prototype, "uploading", void 0);
    __decorate55([Event3()], Uploader2.prototype, "success", void 0);
    __decorate55([Event3()], Uploader2.prototype, "failure", void 0);
    __decorate55([Event3()], Uploader2.prototype, "removing", void 0);
    __decorate55([Event3()], Uploader2.prototype, "beforeRemove", void 0);
    __decorate55([Event3()], Uploader2.prototype, "clearing", void 0);
    __decorate55([Event3()], Uploader2.prototype, "progress", void 0);
    __decorate55([Event3()], Uploader2.prototype, "change", void 0);
    __decorate55([Event3()], Uploader2.prototype, "chunkSuccess", void 0);
    __decorate55([Event3()], Uploader2.prototype, "chunkFailure", void 0);
    __decorate55([Event3()], Uploader2.prototype, "chunkUploading", void 0);
    __decorate55([Event3()], Uploader2.prototype, "canceling", void 0);
    __decorate55([Event3()], Uploader2.prototype, "pausing", void 0);
    __decorate55([Event3()], Uploader2.prototype, "resuming", void 0);
    Uploader2 = __decorate55([NotifyPropertyChanges2], Uploader2);
    return Uploader2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-splitbuttons/src/common/common.js
var __extends57 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate56 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
function getModel(props, model) {
  var obj = extend2({}, props);
  for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
    var prop = _a[_i];
    if (model.indexOf(prop) < 0) {
      deleteObject2(obj, prop);
    }
  }
  return obj;
}
function upDownKeyHandler(ul, keyCode4) {
  var defaultIdx = keyCode4 === 40 ? 0 : ul.childElementCount - 1;
  var liIdx = defaultIdx;
  var li;
  var selectedLi = ul.querySelector(".e-selected");
  if (selectedLi) {
    selectedLi.classList.remove("e-selected");
  }
  for (var i = 0, len = ul.children.length; i < len; i++) {
    if (ul.children[i].classList.contains("e-focused")) {
      li = ul.children[i];
      liIdx = i;
      li.classList.remove("e-focused");
      if (keyCode4 === 40) {
        liIdx++;
      } else {
        liIdx--;
      }
      if (liIdx === (keyCode4 === 40 ? ul.childElementCount : -1)) {
        liIdx = defaultIdx;
      }
    }
  }
  li = ul.children[liIdx];
  liIdx = isValidLI(ul, li, liIdx, keyCode4);
  if (liIdx !== -1) {
    addClass2([ul.children[liIdx]], "e-focused");
    ul.children[liIdx].focus();
  }
}
function isValidLI(ul, li, index, keyCode4, count) {
  if (count === void 0) {
    count = 0;
  }
  if (li.classList.contains("e-separator") || li.classList.contains("e-disabled")) {
    if (index === (keyCode4 === 40 ? ul.childElementCount - 1 : 0)) {
      index = keyCode4 === 40 ? 0 : ul.childElementCount - 1;
    } else {
      if (keyCode4 === 40) {
        index++;
      } else {
        index--;
      }
    }
  }
  li = ul.children[index];
  if (li.classList.contains("e-separator") || li.classList.contains("e-disabled")) {
    count++;
    if (count === ul.childElementCount) {
      return index = -1;
    }
    index = isValidLI(ul, li, index, keyCode4, count);
  }
  return index;
}
function setBlankIconStyle(popup, blankIcon) {
  var blankIconList = [].slice.call(popup.getElementsByClassName("e-blank-icon"));
  if (blankIcon) {
    var menuItem = [].slice.call(popup.getElementsByClassName("e-item"));
    menuItem.forEach(function(li) {
      if (li.style.paddingLeft || li.style.paddingRight) {
        li.removeAttribute("style");
      }
    });
  }
  if (!blankIconList.length) {
    return;
  }
  var iconLi = popup.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");
  if (isNullOrUndefined2(iconLi)) {
    return;
  }
  if (iconLi.classList.contains("e-url")) {
    iconLi = iconLi.querySelector(".e-menu-url");
  }
  var icon = iconLi.querySelector(".e-menu-icon");
  var cssProp;
  var enableRtl = popup.classList.contains("e-rtl");
  if (enableRtl) {
    cssProp = {
      padding: "paddingRight",
      margin: "marginLeft"
    };
  } else {
    cssProp = {
      padding: "paddingLeft",
      margin: "marginRight"
    };
  }
  var size = parseInt(getComputedStyle(icon).fontSize, 10) + parseInt(enableRtl ? getComputedStyle(icon)[cssProp.margin] : getComputedStyle(icon)[cssProp.margin], 10) + parseInt(getComputedStyle(iconLi).paddingLeft, 10) + "px";
  blankIconList.forEach(function(li) {
    if (li.classList.contains("e-url") && li.querySelector(".e-menu-url")) {
      li.querySelector(".e-menu-url").style[cssProp.padding] = size;
    } else {
      li.style[cssProp.padding] = size;
    }
  });
}
var Item = (
  /** @class */
  function(_super) {
    __extends57(Item3, _super);
    function Item3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate56([Property2("")], Item3.prototype, "iconCss", void 0);
    __decorate56([Property2("")], Item3.prototype, "id", void 0);
    __decorate56([Property2(false)], Item3.prototype, "separator", void 0);
    __decorate56([Property2("")], Item3.prototype, "text", void 0);
    __decorate56([Property2("")], Item3.prototype, "url", void 0);
    __decorate56([Property2(false)], Item3.prototype, "disabled", void 0);
    return Item3;
  }(ChildProperty2)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js
var __extends58 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate57 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var classNames5 = {
  DISABLED: "e-disabled",
  FOCUS: "e-focused",
  ICON: "e-menu-icon",
  ITEM: "e-item",
  POPUP: "e-dropdown-popup",
  RTL: "e-rtl",
  SEPARATOR: "e-separator",
  VERTICAL: "e-vertical",
  POPUPWIDTH: "e-dropdown-popup-width"
};
var DropDownMenuAnimationSettings = (
  /** @class */
  function(_super) {
    __extends58(DropDownMenuAnimationSettings2, _super);
    function DropDownMenuAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate57([Property2("SlideDown")], DropDownMenuAnimationSettings2.prototype, "effect", void 0);
    __decorate57([Property2(400)], DropDownMenuAnimationSettings2.prototype, "duration", void 0);
    __decorate57([Property2("ease")], DropDownMenuAnimationSettings2.prototype, "easing", void 0);
    return DropDownMenuAnimationSettings2;
  }(ChildProperty2)
);
var DropDownButton = (
  /** @class */
  function(_super) {
    __extends58(DropDownButton2, _super);
    function DropDownButton2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isPopupCreated = true;
      return _this;
    }
    DropDownButton2.prototype.preRender = function() {
    };
    DropDownButton2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    DropDownButton2.prototype.toggle = function() {
      if (this.canOpen()) {
        this.openPopUp();
      } else if (this.createPopupOnClick && !this.isPopupCreated) {
        this.createPopup();
        this.openPopUp();
      } else {
        this.closePopup();
      }
    };
    DropDownButton2.prototype.render = function() {
      this.initialize();
      if (!this.disabled) {
        this.wireEvents();
      }
      this.renderComplete();
    };
    DropDownButton2.prototype.addItems = function(items, text) {
      var newItem;
      var idx = this.items.length;
      for (var j = 0, len = this.items.length; j < len; j++) {
        if (text === this.items[j].text) {
          idx = j;
          break;
        }
      }
      for (var i = items.length - 1; i >= 0; i--) {
        newItem = new Item(this, "items", items[i], true);
        this.items.splice(idx, 0, newItem);
      }
      if (!this.canOpen()) {
        this.createItems();
      }
    };
    DropDownButton2.prototype.removeItems = function(items, isUniqueId) {
      var refresh = false;
      for (var i = 0, len = items.length; i < len; i++) {
        for (var j = 0, len_1 = this.items.length; j < len_1; j++) {
          if (items[i] === (isUniqueId ? this.items[j].id : this.items[j].text)) {
            this.items.splice(j, 1);
            refresh = true;
            break;
          }
        }
      }
      if (refresh && this.getULElement()) {
        this.createItems();
      }
    };
    DropDownButton2.prototype.createPopup = function() {
      var _a;
      var div = this.createElement("div", {
        className: this.popupWidth !== "auto" ? classNames5.POPUP + " " + classNames5.POPUPWIDTH : classNames5.POPUP,
        id: this.element.id + "-popup"
      });
      document.body.appendChild(div);
      this.dropDown = new Popup(div, {
        width: this.popupWidth,
        relateTo: this.element,
        collision: {
          X: "fit",
          Y: "flip"
        },
        position: {
          X: "left",
          Y: "bottom"
        },
        targetType: "relative",
        content: this.target ? this.getTargetElement() : "",
        enableRtl: this.enableRtl
      });
      this.dropDown.element.setAttribute("role", "dialog");
      this.dropDown.element.setAttribute("aria-label", "dropdown menu");
      if (!isNullOrUndefined2(this.popupContent)) {
        this.popupContent.style.display = "";
      }
      if (this.dropDown.element.style.position === "fixed") {
        this.dropDown.refreshPosition(this.element);
      }
      this.dropDown.hide();
      attributes2(this.element, (_a = {}, _a["aria-haspopup"] = this.items.length || this.target ? "true" : "false", _a["aria-expanded"] = "false", _a["type"] = "button", _a));
      if (this.cssClass) {
        addClass2([div], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      this.isPopupCreated = true;
      if (this.createPopupOnClick) {
        var splitButton = getComponent(this.activeElem[0], "split-btn");
        if (splitButton) {
          splitButton.isPopupCreated = true;
        }
      }
    };
    DropDownButton2.prototype.getTargetElement = function() {
      if (this.createPopupOnClick && !this.isColorPicker() && !isNullOrUndefined2(this.popupContent)) {
        return this.popupContent;
      }
      return typeof this.target === "string" ? select2(this.target) : this.target;
    };
    DropDownButton2.prototype.createItems = function(appendItems) {
      var _this = this;
      var items = this.items;
      var showIcon = this.hasIcon(this.items, "iconCss");
      var span;
      var item;
      var li;
      var eventArgs;
      var ul = this.getULElement();
      if (ul) {
        ul.innerHTML = "";
      } else {
        ul = this.createElement("ul", {
          attrs: {
            "role": "menu",
            "tabindex": "0"
          }
        });
      }
      if (this.itemTemplate) {
        var compiledTemplate_1 = this.compiletemplate(this.itemTemplate);
        items.forEach(function(item2) {
          var li2 = _this.createElement("li", {
            className: item2.separator ? classNames5.ITEM + " " + classNames5.SEPARATOR : classNames5.ITEM,
            attrs: item2.separator ? {
              "role": "separator",
              "tabindex": "-1",
              "aria-label": "separator",
              "aria-hidden": "true"
            } : {
              "role": "menuitem",
              "tabindex": "-1",
              "aria-label": item2.text
            },
            id: item2.id ? item2.id : getUniqueID("e-" + _this.getModuleName() + "-item")
          });
          var compiledElement = compiledTemplate_1(item2, _this, "template", null, false, null, li2);
          if (compiledElement) {
            append(compiledElement, li2);
          }
          if (item2.disabled) {
            li2.classList.add("e-disabled");
          }
          var eventArgs2 = {
            item: item2,
            element: li2
          };
          _this.trigger("beforeItemRender", eventArgs2);
          if (eventArgs2.item.disabled !== item2.disabled) {
            li2.classList[eventArgs2.item.disabled ? "add" : "remove"]("e-disabled");
          }
          ul.appendChild(li2);
        });
        if (this.isReact) {
          this.renderReactTemplates();
        }
      } else {
        for (var i = 0; i < items.length; i++) {
          item = items[i];
          var tempItem = item.text;
          li = this.createElement("li", {
            innerHTML: item.url ? "" : tempItem,
            className: item.separator ? classNames5.ITEM + " " + classNames5.SEPARATOR : classNames5.ITEM,
            attrs: item.separator ? {
              "role": "separator",
              "tabindex": "-1",
              "aria-label": "separator",
              "aria-hidden": "true"
            } : {
              "role": "menuitem",
              "tabindex": "-1",
              "aria-label": tempItem
            },
            id: item.id ? item.id : getUniqueID("e-" + this.getModuleName() + "-item")
          });
          if (this.enableHtmlSanitizer) {
            li.textContent = item.url ? "" : tempItem;
          } else {
            li.innerHTML = item.url ? "" : tempItem;
          }
          if (item.url) {
            li.appendChild(this.createAnchor(item));
            li.classList.add("e-url");
          }
          if (item.iconCss) {
            span = this.createElement("span", {
              className: classNames5.ICON + " " + item.iconCss
            });
            if (item.url) {
              li.childNodes[0].appendChild(span);
            } else {
              li.insertBefore(span, li.childNodes[0]);
            }
          } else {
            if (showIcon && !item.separator) {
              li.classList.add("e-blank-icon");
            }
          }
          var beforeDisabled = item.disabled;
          if (item.disabled) {
            li.classList.add("e-disabled");
          }
          eventArgs = {
            item,
            element: li
          };
          this.trigger("beforeItemRender", eventArgs);
          var afterDisabled = eventArgs.item.disabled;
          if (beforeDisabled !== afterDisabled) {
            if (eventArgs.item.disabled) {
              li.classList.add("e-disabled");
            } else {
              li.classList.remove("e-disabled");
            }
          }
          ul.appendChild(li);
        }
      }
      if (appendItems) {
        this.getPopUpElement().appendChild(ul);
      }
      if (showIcon) {
        setBlankIconStyle(this.getPopUpElement());
      }
    };
    DropDownButton2.prototype.compiletemplate = function(template) {
      if (!this.itemTemplate) {
        return void 0;
      }
      try {
        if (typeof this.itemTemplate !== "function") {
          var templateElement = document.querySelector(this.itemTemplate);
          if (templateElement) {
            return compile4(templateElement.innerHTML.trim());
          }
        }
        return compile4(template);
      } catch (_a) {
        return compile4(template);
      }
    };
    DropDownButton2.prototype.hasIcon = function(items, field) {
      for (var i = 0, len = items.length; i < len; i++) {
        if (items[i]["" + field]) {
          return true;
        }
      }
      return false;
    };
    DropDownButton2.prototype.createAnchor = function(item) {
      var tempItem = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(item.text) : item.text;
      return this.createElement("a", {
        className: "e-menu-text e-menu-url",
        innerHTML: tempItem,
        attrs: {
          "href": item.url
        }
      });
    };
    DropDownButton2.prototype.initialize = function() {
      this.button = new Button({
        iconCss: this.iconCss,
        iconPosition: this.iconPosition,
        cssClass: this.cssClass,
        content: this.content,
        disabled: this.disabled,
        enableRtl: this.enableRtl,
        enablePersistence: this.enablePersistence
      });
      this.button.createElement = this.createElement;
      this.button.appendTo(this.element);
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
      this.appendArrowSpan();
      this.setActiveElem([this.element]);
      this.element.setAttribute("tabindex", "0");
      this.element.setAttribute("aria-label", this.element.textContent ? this.element.textContent : "dropdownbutton");
      if (this.target && !this.isColorPicker() && !this.createPopupOnClick || !this.createPopupOnClick) {
        this.createPopup();
      } else {
        this.isPopupCreated = false;
        if (this.target && !this.isColorPicker() && this.createPopupOnClick) {
          this.popupContent = this.getTargetElement();
          this.popupContent.style.display = "none";
        }
      }
    };
    DropDownButton2.prototype.isColorPicker = function() {
      if (!this.element) {
        return false;
      }
      var prevElem = this.element.previousSibling;
      if (prevElem && prevElem.classList && prevElem.classList.contains("e-split-colorpicker")) {
        return true;
      }
      return false;
    };
    DropDownButton2.prototype.appendArrowSpan = function() {
      this.cssClass = isNullOrUndefined2(this.cssClass) ? "" : this.cssClass;
      this.element.appendChild(this.createElement("span", {
        className: "e-btn-icon e-icons e-icon-" + (this.cssClass.indexOf(classNames5.VERTICAL) > -1 ? "bottom" : "right") + " e-caret"
      }));
    };
    DropDownButton2.prototype.setActiveElem = function(elem) {
      this.activeElem = elem;
    };
    DropDownButton2.prototype.getModuleName = function() {
      return "dropdown-btn";
    };
    DropDownButton2.prototype.canOpen = function() {
      var val = false;
      if (this.isPopupCreated) {
        val = this.getPopUpElement().classList.contains("e-popup-close");
      }
      return val;
    };
    DropDownButton2.prototype.destroy = function() {
      var _this = this;
      _super.prototype.destroy.call(this);
      if (this.getModuleName() === "dropdown-btn") {
        var classList_1;
        if (this.element.querySelector("span.e-caret")) {
          detach2(this.element.querySelector("span.e-caret"));
        }
        if (this.cssClass) {
          classList_1 = this.cssClass.split(" ");
        }
        this.button.destroy();
        if (classList_1) {
          removeClass2([this.element], classList_1);
        }
        removeClass2(this.activeElem, ["e-active"]);
        var attrList = this.element.getAttribute("class") ? ["aria-haspopup", "aria-expanded", "aria-owns", "type"] : ["aria-haspopup", "aria-expanded", "aria-owns", "type", "class"];
        attrList.forEach(function(key) {
          _this.element.removeAttribute(key);
        });
        this.popupUnWireEvents();
        this.destroyPopup();
        this.isPopupCreated = false;
        if (!this.disabled) {
          this.unWireEvents();
        }
      }
    };
    DropDownButton2.prototype.destroyPopup = function() {
      if (this.isPopupCreated) {
        this.dropDown.destroy();
        if (this.getPopUpElement()) {
          var popupEle = document.getElementById(this.getPopUpElement().id);
          if (popupEle) {
            removeClass2([popupEle], ["e-popup-open", "e-popup-close"]);
            detach2(popupEle);
          }
        }
        EventHandler2.remove(this.getPopUpElement(), "click", this.clickHandler);
        EventHandler2.remove(this.getPopUpElement(), "keydown", this.keyBoardHandler);
        if (this.isPopupCreated && this.dropDown) {
          this.dropDown.element = null;
          this.dropDown = void 0;
        }
      }
      this.isPopupCreated = false;
      var splitButton = getComponent(this.activeElem[0], "split-btn");
      if (this.createPopupOnClick && splitButton) {
        var dropDownButton = getComponent(this.activeElem[1], "dropdown-btn");
        if (dropDownButton) {
          dropDownButton.isPopupCreated = false;
        }
      }
    };
    DropDownButton2.prototype.getPopUpElement = function() {
      var val = null;
      if (!this.dropDown && this.activeElem[0].classList.contains("e-split-btn")) {
        var dropDownBtn = getComponent(this.activeElem[1], "dropdown-btn");
        if (dropDownBtn) {
          this.dropDown = dropDownBtn.dropDown;
        }
      }
      if (this.dropDown) {
        val = this.dropDown.element;
      }
      return val;
    };
    DropDownButton2.prototype.getULElement = function() {
      var val = null;
      if (this.getPopUpElement()) {
        val = this.getPopUpElement().children[0];
      }
      return val;
    };
    DropDownButton2.prototype.wireEvents = function() {
      this.delegateMousedownHandler = this.mousedownHandler.bind(this);
      if (!this.createPopupOnClick) {
        EventHandler2.add(document, "mousedown touchstart", this.delegateMousedownHandler, this);
      }
      EventHandler2.add(this.element, "click", this.clickHandler, this);
      EventHandler2.add(this.element, "keydown", this.keyBoardHandler, this);
      EventHandler2.add(window, "resize", this.windowResize, this);
    };
    DropDownButton2.prototype.windowResize = function() {
      if (!this.canOpen() && this.dropDown) {
        this.dropDown.refreshPosition(this.element);
      }
    };
    DropDownButton2.prototype.popupWireEvents = function() {
      if (!this.delegateMousedownHandler) {
        this.delegateMousedownHandler = this.mousedownHandler.bind(this);
      }
      var popupElement = this.getPopUpElement();
      if (this.createPopupOnClick) {
        EventHandler2.add(document, "mousedown touchstart", this.delegateMousedownHandler, this);
      }
      if (popupElement) {
        EventHandler2.add(popupElement, "click", this.clickHandler, this);
        EventHandler2.add(popupElement, "keydown", this.keyBoardHandler, this);
        if (this.closeActionEvents) {
          EventHandler2.add(popupElement, this.closeActionEvents, this.focusoutHandler, this);
        }
      }
      this.rippleFn = rippleEffect(popupElement, {
        selector: "." + classNames5.ITEM
      });
    };
    DropDownButton2.prototype.popupUnWireEvents = function() {
      var popupElement = this.getPopUpElement();
      if (this.createPopupOnClick) {
        EventHandler2.remove(document, "mousedown touchstart", this.delegateMousedownHandler);
      }
      if (popupElement && popupElement.parentElement) {
        EventHandler2.remove(popupElement, "click", this.clickHandler);
        EventHandler2.remove(popupElement, "keydown", this.keyBoardHandler);
        if (this.closeActionEvents) {
          EventHandler2.remove(popupElement, this.closeActionEvents, this.focusoutHandler);
        }
      }
      if (isRippleEnabled && this.rippleFn) {
        this.rippleFn();
      }
    };
    DropDownButton2.prototype.keyBoardHandler = function(e) {
      if (e.target === this.element && (e.keyCode === 9 || !e.altKey && e.keyCode === 40 || e.keyCode === 38)) {
        return;
      }
      switch (e.keyCode) {
        case 38:
        case 40:
          if (e.altKey && (e.keyCode === 38 || e.keyCode === 40)) {
            this.keyEventHandler(e);
          } else {
            this.upDownKeyHandler(e);
          }
          break;
        case 9:
        case 13:
        case 27:
        case 32:
          this.keyEventHandler(e);
          break;
      }
    };
    DropDownButton2.prototype.isSafari = function() {
      return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
    };
    DropDownButton2.prototype.upDownKeyHandler = function(e) {
      if (this.target && (e.keyCode === 38 || e.keyCode === 40)) {
        return;
      }
      e.preventDefault();
      upDownKeyHandler(this.getULElement(), e.keyCode);
    };
    DropDownButton2.prototype.keyEventHandler = function(e) {
      if (this.target && (e.keyCode === 13 || e.keyCode === 9)) {
        return;
      }
      if (e.keyCode === 13 && this.activeElem[0].classList.contains("e-split-btn")) {
        this.triggerSelect(e);
        this.activeElem[0].focus();
        return;
      }
      if (e.target && e.target.className.indexOf("e-edit-template") > -1 && e.keyCode === 32) {
        return;
      }
      if (e.keyCode !== 9) {
        e.preventDefault();
      }
      if (e.keyCode === 27 || e.keyCode === 38 || e.keyCode === 9) {
        if (!this.canOpen()) {
          this.closePopup(e, this.element);
        }
      } else {
        this.clickHandler(e);
      }
    };
    DropDownButton2.prototype.getLI = function(elem) {
      return elem.tagName === "LI" ? elem : closest2(elem, "li");
    };
    DropDownButton2.prototype.mousedownHandler = function(e) {
      var trgt = e.target;
      if (this.dropDown && !this.canOpen() && this.getPopUpElement() && !(closest2(trgt, '[id="' + this.getPopUpElement().id + '"]') || closest2(trgt, '[id="' + this.element.id + '"]'))) {
        this.closePopup(e);
      }
    };
    DropDownButton2.prototype.focusoutHandler = function(e) {
      if (this.isPopupCreated && !this.canOpen()) {
        var liTarget = e.relatedTarget || e.target;
        if (liTarget && liTarget.className.indexOf("e-item") > -1) {
          var li = this.getLI(liTarget);
          if (li) {
            var liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
            var item = this.items[liIdx];
            if (item) {
              var selectEventArgs = {
                element: li,
                item,
                event: e
              };
              this.trigger("select", selectEventArgs);
            }
          }
        }
        this.closePopup(e);
      }
    };
    DropDownButton2.prototype.clickHandler = function(e) {
      var trgt = e.target;
      if (closest2(trgt, '[id="' + this.element.id + '"]')) {
        if (!this.createPopupOnClick || this.target && this.target !== "" && !this.isColorPicker() && !this.createPopupOnClick) {
          if (this.getPopUpElement().classList.contains("e-popup-close")) {
            this.openPopUp(e);
          } else {
            this.closePopup(e);
          }
        } else if (this.isPopupCreated) {
          this.closePopup(e, this.activeElem[0]);
        } else {
          this.createPopup();
          this.openPopUp(e);
        }
      } else {
        if (closest2(trgt, '[id="' + this.getPopUpElement().id + '"]')) {
          var li = this.getLI(e.target);
          if (li) {
            this.triggerSelect(e);
            this.closePopup(e, this.activeElem[0]);
          }
        }
      }
    };
    DropDownButton2.prototype.triggerSelect = function(e) {
      var eventArgs;
      var liIdx;
      var item;
      var li = this.getLI(e.target);
      if (li) {
        liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
        item = this.items[liIdx];
        if (item) {
          eventArgs = {
            element: li,
            item,
            event: e
          };
          this.trigger("select", eventArgs);
        }
      }
    };
    DropDownButton2.prototype.openPopUp = function(e) {
      var _this = this;
      if (e === void 0) {
        e = null;
      }
      var isReact = false;
      var popupElem = this.getPopUpElement();
      if (this.activeElem[0] && this.activeElem[0].classList.contains("e-dropdown-btn") && popupElem.style.width && popupElem.style.width !== "auto") {
        this.setWidth(popupElem);
      }
      if (!this.target) {
        this.createItems(true);
      } else {
        if (this.activeElem.length > 1) {
          var splitButton = getComponent(this.activeElem[0], "split-btn");
          if (splitButton.isReact && popupElem.childNodes.length < 1) {
            isReact = true;
            if (splitButton.appendReactElement) {
              splitButton.appendReactElement(this.getTargetElement(), this.getPopUpElement());
            }
            this.renderReactTemplates();
          }
        } else {
          if (this.isReact && popupElem.childNodes.length < 1) {
            isReact = true;
            if (this.appendReactElement) {
              this.appendReactElement(this.getTargetElement(), this.getPopUpElement());
            }
            this.renderReactTemplates();
          }
        }
      }
      var ul = this.getULElement();
      this.popupWireEvents();
      var beforeOpenArgs = {
        element: ul,
        items: this.items,
        event: e,
        cancel: false
      };
      this.trigger("beforeOpen", beforeOpenArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          var ul_1 = _this.getULElement();
          var animationOptions = _this.animationSettings.effect !== "None" ? {
            name: _this.animationSettings.effect,
            duration: _this.animationSettings.duration,
            timingFunction: _this.animationSettings.easing
          } : null;
          if (animationOptions) {
            _this.animatePopup(animationOptions, ul_1);
          }
          _this.dropDown.show(null, _this.element);
          addClass2([_this.element], "e-active");
          _this.element.setAttribute("aria-expanded", "true");
          _this.element.setAttribute("aria-owns", _this.getPopUpElement().id);
          if (ul_1 && !_this.isSafari()) {
            ul_1.focus();
          }
          if (_this.enableRtl && ul_1.parentElement.style.left !== "0px") {
            var wrapperWidth = void 0;
            if (_this.element.parentElement && _this.element.parentElement.classList.contains("e-split-btn-wrapper")) {
              wrapperWidth = _this.element.parentElement.offsetWidth;
            } else {
              wrapperWidth = _this.element.offsetWidth;
            }
            var popupRect2 = ul_1.parentElement.offsetWidth - wrapperWidth;
            var popupLeft = parseFloat(ul_1.parentElement.style.left) - popupRect2;
            if (popupLeft < 0) {
              popupLeft = 0;
            }
            ul_1.parentElement.style.left = popupLeft + "px";
          }
          var openArgs = {
            element: ul_1,
            items: _this.items
          };
          _this.trigger("open", openArgs);
          if (ul_1 && _this.isSafari()) {
            ul_1.focus();
          }
        }
      });
    };
    DropDownButton2.prototype.animatePopup = function(animationOptions, element2) {
      new Animation2(animationOptions).animate(element2, {
        begin: function(args) {
          args.element.parentElement.style.height = args.element.parentElement.offsetHeight + "px";
        }
      });
    };
    DropDownButton2.prototype.setWidth = function(popupElem) {
      var width = formatUnit(popupElem.style.width);
      if (width.indexOf("%") > -1) {
        var btnWidth = this.element.offsetWidth * parseFloat(width) / 100;
        popupElem.style.width = btnWidth + "px";
      }
    };
    DropDownButton2.prototype.closePopup = function(e, focusEle) {
      var _this = this;
      if (e === void 0) {
        e = null;
      }
      var ul = this.getULElement();
      var beforeCloseArgs = {
        element: ul,
        items: this.items,
        event: e,
        cancel: false
      };
      this.trigger("beforeClose", beforeCloseArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          var popupElement = _this.getPopUpElement();
          if (popupElement) {
            EventHandler2.remove(popupElement, "keydown", _this.keyBoardHandler);
          }
          _this.popupUnWireEvents();
          var ul_2 = _this.getULElement();
          var selectedLi = void 0;
          if (ul_2) {
            selectedLi = ul_2.querySelector(".e-selected");
          }
          if (selectedLi) {
            selectedLi.classList.remove("e-selected");
          }
          if (_this.dropDown) {
            _this.dropDown.hide();
          }
          removeClass2(_this.activeElem, "e-active");
          _this.element.setAttribute("aria-expanded", "false");
          _this.element.removeAttribute("aria-owns");
          if (focusEle) {
            focusEle.focus();
          }
          var closeArgs = {
            element: ul_2,
            items: _this.items
          };
          _this.trigger("close", closeArgs);
          if (!_this.target && ul_2) {
            detach2(ul_2);
          }
          if (!_this.target || _this.isColorPicker() || _this.target && !_this.isColorPicker()) {
            if (_this.createPopupOnClick) {
              _this.destroyPopup();
            }
          }
        } else {
          if (ul) {
            ul.focus();
          }
        }
      });
    };
    DropDownButton2.prototype.unWireEvents = function() {
      if (!this.createPopupOnClick) {
        EventHandler2.remove(document, "mousedown touchstart", this.delegateMousedownHandler);
      }
      EventHandler2.remove(this.element, "click", this.clickHandler);
      EventHandler2.remove(this.element, "keydown", this.keyBoardHandler);
      if (this.isPopupCreated) {
        EventHandler2.remove(this.getPopUpElement(), "click", this.clickHandler);
        EventHandler2.remove(this.getPopUpElement(), "keydown", this.keyBoardHandler);
      }
      EventHandler2.remove(window, "resize", this.windowResize);
    };
    DropDownButton2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var btnModel = ["content", "cssClass", "iconCss", "iconPosition", "disabled", "enableRtl"];
      this.button.setProperties(getModel(newProp, btnModel));
      var popupElement;
      if (this.isPopupCreated) {
        popupElement = this.getPopUpElement();
        this.dropDown.setProperties(getModel(newProp, ["enableRtl"]));
      }
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "content":
            if (!this.element.querySelector("span.e-caret")) {
              this.appendArrowSpan();
            }
            break;
          case "disabled":
            if (newProp.disabled) {
              this.unWireEvents();
              if (this.isPopupCreated && !this.canOpen()) {
                this.closePopup();
              }
            } else {
              this.wireEvents();
            }
            break;
          case "cssClass":
            oldProp.cssClass = isNullOrUndefined2(oldProp.cssClass) ? "" : oldProp.cssClass;
            if (newProp.cssClass.indexOf(classNames5.VERTICAL) > -1 || oldProp.cssClass.indexOf(classNames5.VERTICAL) > -1) {
              if (!this.element.querySelector("span.e-caret")) {
                this.appendArrowSpan();
              }
              var arrowSpan = this.element.querySelector("span.e-caret");
              newProp.cssClass.indexOf(classNames5.VERTICAL) > -1 ? classList(arrowSpan, ["e-icon-bottom"], ["e-icon-right"]) : classList(arrowSpan, ["e-icon-right"], ["e-icon-bottom"]);
            }
            if (this.isPopupCreated) {
              if (oldProp.cssClass) {
                removeClass2([popupElement], oldProp.cssClass.split(" "));
              }
              if (newProp.cssClass) {
                addClass2([popupElement], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
              }
            }
            break;
          case "target":
            this.dropDown.content = this.getTargetElement();
            this.dropDown.dataBind();
            break;
          case "items":
            if (this.isPopupCreated && this.getULElement()) {
              this.createItems();
            }
            break;
          case "createPopupOnClick":
            if (newProp.createPopupOnClick) {
              this.destroyPopup();
            } else {
              this.createPopup();
            }
            break;
        }
      }
    };
    DropDownButton2.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate57([Property2("")], DropDownButton2.prototype, "content", void 0);
    __decorate57([Property2("")], DropDownButton2.prototype, "cssClass", void 0);
    __decorate57([Property2(false)], DropDownButton2.prototype, "disabled", void 0);
    __decorate57([Property2("")], DropDownButton2.prototype, "iconCss", void 0);
    __decorate57([Property2("Left")], DropDownButton2.prototype, "iconPosition", void 0);
    __decorate57([Property2(true)], DropDownButton2.prototype, "enableHtmlSanitizer", void 0);
    __decorate57([Collection([], Item)], DropDownButton2.prototype, "items", void 0);
    __decorate57([Property2(false)], DropDownButton2.prototype, "createPopupOnClick", void 0);
    __decorate57([Property2("")], DropDownButton2.prototype, "target", void 0);
    __decorate57([Property2("")], DropDownButton2.prototype, "closeActionEvents", void 0);
    __decorate57([Property2(null)], DropDownButton2.prototype, "itemTemplate", void 0);
    __decorate57([Property2("auto")], DropDownButton2.prototype, "popupWidth", void 0);
    __decorate57([Complex2({
      effect: "None"
    }, DropDownMenuAnimationSettings)], DropDownButton2.prototype, "animationSettings", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "beforeItemRender", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "beforeOpen", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "beforeClose", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "close", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "open", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "select", void 0);
    __decorate57([Event3()], DropDownButton2.prototype, "created", void 0);
    DropDownButton2 = __decorate57([NotifyPropertyChanges2], DropDownButton2);
    return DropDownButton2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-splitbuttons/src/split-button/split-button.js
var __extends59 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate58 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var RTL12 = "e-rtl";
var TAGNAME = "EJS-SPLITBUTTON";
var SplitButton = (
  /** @class */
  function(_super) {
    __extends59(SplitButton2, _super);
    function SplitButton2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    SplitButton2.prototype.preRender = function() {
      var ele = this.element;
      if (ele.tagName === TAGNAME) {
        var ejInstance = getValue2("ej2_instances", ele);
        var btn = this.createElement("button", {
          attrs: {
            "type": "button"
          }
        });
        var wrapper = this.createElement(TAGNAME, {
          className: "e-" + this.getModuleName() + "-wrapper"
        });
        for (var idx = 0, len = ele.attributes.length; idx < len; idx++) {
          btn.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
        }
        ele.parentNode.insertBefore(wrapper, ele);
        detach2(ele);
        ele = btn;
        wrapper.appendChild(ele);
        setValue3("ej2_instances", ejInstance, ele);
        this.wrapper = wrapper;
        this.element = ele;
      }
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
    };
    SplitButton2.prototype.render = function() {
      this.initWrapper();
      this.createPrimaryButton();
      this.renderControl();
    };
    SplitButton2.prototype.renderControl = function() {
      this.createSecondaryButton();
      this.setActiveElem([this.element, this.secondaryBtnObj.element]);
      this.setAria();
      this.wireEvents();
      this.renderComplete();
    };
    SplitButton2.prototype.addItems = function(items, text) {
      _super.prototype.addItems.call(this, items, text);
      this.secondaryBtnObj.items = this.items;
    };
    SplitButton2.prototype.removeItems = function(items, isUniqueId) {
      _super.prototype.removeItems.call(this, items, isUniqueId);
      this.secondaryBtnObj.items = this.items;
    };
    SplitButton2.prototype.initWrapper = function() {
      if (!this.wrapper) {
        this.wrapper = this.createElement("div", {
          className: "e-" + this.getModuleName() + "-wrapper"
        });
        this.element.parentNode.insertBefore(this.wrapper, this.element);
      }
      this.element.classList.remove("e-" + this.getModuleName());
      if (this.enableRtl) {
        this.wrapper.classList.add(RTL12);
      }
      if (this.cssClass) {
        addClass2([this.wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
    };
    SplitButton2.prototype.createPrimaryButton = function() {
      var btnModel = {
        cssClass: this.cssClass,
        enableRtl: this.enableRtl,
        iconCss: this.iconCss,
        iconPosition: this.iconPosition,
        content: this.content,
        disabled: this.disabled
      };
      this.primaryBtnObj = new Button(btnModel);
      this.primaryBtnObj.createElement = this.createElement;
      this.primaryBtnObj.appendTo(this.element);
      this.element.classList.add("e-" + this.getModuleName());
      this.element.type = "button";
      this.wrapper.appendChild(this.element);
    };
    SplitButton2.prototype.createSecondaryButton = function() {
      var _this = this;
      var btnElem = this.createElement("button", {
        className: "e-icon-btn",
        attrs: {
          "tabindex": "-1"
        },
        id: this.element.id + "_dropdownbtn"
      });
      this.wrapper.appendChild(btnElem);
      var dropDownBtnModel = {
        cssClass: this.cssClass,
        disabled: this.disabled,
        enableRtl: this.enableRtl,
        items: this.items,
        target: this.target,
        createPopupOnClick: this.createPopupOnClick
      };
      dropDownBtnModel.beforeItemRender = function(args) {
        if (_this.createPopupOnClick) {
          _this.secondaryBtnObj.dropDown.relateTo = _this.wrapper;
          _this.dropDown = _this.secondaryBtnObj.dropDown;
        }
        _this.trigger("beforeItemRender", args);
      };
      dropDownBtnModel.open = function(args) {
        _this.trigger("open", args);
      };
      dropDownBtnModel.close = function(args) {
        _this.trigger("close", args);
      };
      dropDownBtnModel.select = function(args) {
        _this.trigger("select", args);
      };
      dropDownBtnModel.beforeOpen = function(args) {
        if (_this.createPopupOnClick && _this.items.length === 0) {
          _this.secondaryBtnObj.dropDown.relateTo = _this.wrapper;
          _this.dropDown = _this.secondaryBtnObj.dropDown;
        }
        var callBackPromise = new Deferred3();
        _this.trigger("beforeOpen", args, function(observedArgs) {
          callBackPromise.resolve(observedArgs);
        });
        return callBackPromise;
      };
      dropDownBtnModel.beforeClose = function(args) {
        var callBackPromise = new Deferred3();
        _this.trigger("beforeClose", args, function(observedArgs) {
          callBackPromise.resolve(observedArgs);
        });
        return callBackPromise;
      };
      this.secondaryBtnObj = new DropDownButton(dropDownBtnModel);
      this.secondaryBtnObj.createElement = this.createElement;
      this.secondaryBtnObj.appendTo(btnElem);
      if (!this.createPopupOnClick) {
        this.secondaryBtnObj.dropDown.relateTo = this.wrapper;
        this.dropDown = this.secondaryBtnObj.dropDown;
      }
      this.isPopupCreated = this.secondaryBtnObj.isPopupCreated;
      this.secondaryBtnObj.activeElem = [this.element, this.secondaryBtnObj.element];
      this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right");
      if (this.disabled) {
        this.wrapper.classList.add("e-splitbtn-disabled");
      }
    };
    SplitButton2.prototype.setAria = function() {
      attributes2(this.element, {
        "aria-expanded": "false",
        "aria-haspopup": "true",
        "aria-label": this.element.textContent ? this.element.textContent + " splitbutton" : "splitbutton",
        "aria-owns": this.element.id + "_dropdownbtn-popup"
      });
    };
    SplitButton2.prototype.getModuleName = function() {
      return "split-btn";
    };
    SplitButton2.prototype.toggle = function() {
      this.secondaryBtnObj.toggle();
    };
    SplitButton2.prototype.destroy = function() {
      var _this = this;
      var classList2 = [RTL12];
      if (this.cssClass) {
        classList2 = classList2.concat(this.cssClass.split(" "));
      }
      if (this.element) {
        var element2 = document.getElementById(this.element.id);
        if (element2 && element2.parentElement === this.wrapper) {
          if (this.wrapper.tagName === TAGNAME) {
            this.wrapper.innerHTML = "";
            removeClass2([this.wrapper], ["e-rtl", "e-" + this.getModuleName() + "-wrapper"]);
            removeClass2([this.wrapper], this.cssClass.split(" "));
          } else {
            removeClass2([this.element], classList2);
            ["aria-label", "aria-haspopup", "aria-expanded", "aria-owns", "type"].forEach(function(key) {
              _this.element.removeAttribute(key);
            });
            this.wrapper.parentNode.insertBefore(this.element, this.wrapper);
            remove(this.wrapper);
          }
          this.unWireEvents();
        }
      }
      this.primaryBtnObj.destroy();
      this.secondaryBtnObj.destroy();
      _super.prototype.destroy.call(this);
      if (this.element && !this.element.getAttribute("class")) {
        this.element.removeAttribute("class");
      }
      if (this.refreshing && this.isAngular) {
        this.element = this.wrapper;
        ["e-control", "e-split-btn", "e-lib"].forEach(function(key) {
          _this.element.classList.add(key);
        });
        setValue3("ej2_instances", [this], this.element);
      }
      this.wrapper = null;
    };
    SplitButton2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "click", this.primaryBtnClickHandler, this);
      new KeyboardEvents2(this.element, {
        keyAction: this.btnKeyBoardHandler.bind(this),
        keyConfigs: {
          altdownarrow: "alt+downarrow",
          enter: "enter"
        }
      });
    };
    SplitButton2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.element, "click", this.primaryBtnClickHandler);
      getInstance(this.element, KeyboardEvents2).destroy();
    };
    SplitButton2.prototype.primaryBtnClickHandler = function() {
      this.trigger("click", {
        element: this.element
      });
    };
    SplitButton2.prototype.btnKeyBoardHandler = function(e) {
      switch (e.action) {
        case "altdownarrow":
          this.clickHandler(e);
          break;
        case "enter":
          this.clickHandler(e);
          if (this.getPopUpElement() && !this.getPopUpElement().classList.contains("e-popup-close")) {
            this.element.classList.remove("e-active");
            this.secondaryBtnObj.element.classList.add("e-active");
          } else {
            this.secondaryBtnObj.element.classList.remove("e-active");
          }
          break;
      }
    };
    SplitButton2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var model = ["content", "iconCss", "iconPosition", "cssClass", "disabled", "enableRtl"];
      this.primaryBtnObj.setProperties(getModel(newProp, model));
      model = ["beforeOpen", "beforeItemRender", "select", "open", "close", "cssClass", "disabled", "enableRtl", "createPopupOnClick"];
      if (Object.keys(newProp).indexOf("items") > -1) {
        this.secondaryBtnObj.items = newProp.items;
        this.secondaryBtnObj.dataBind();
      }
      this.secondaryBtnObj.setProperties(getModel(newProp, model));
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.wrapper], oldProp.cssClass.split(" "));
            }
            addClass2([this.wrapper], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              addClass2([this.wrapper], RTL12);
            } else {
              removeClass2([this.wrapper], RTL12);
            }
            break;
          case "disabled":
            if (newProp.disabled) {
              addClass2([this.wrapper], "e-splitbtn-disabled");
            } else {
              removeClass2([this.wrapper], "e-splitbtn-disabled");
            }
        }
      }
    };
    SplitButton2.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate58([Property2("")], SplitButton2.prototype, "content", void 0);
    __decorate58([Property2("")], SplitButton2.prototype, "cssClass", void 0);
    __decorate58([Property2(false)], SplitButton2.prototype, "disabled", void 0);
    __decorate58([Property2("")], SplitButton2.prototype, "iconCss", void 0);
    __decorate58([Property2("Left")], SplitButton2.prototype, "iconPosition", void 0);
    __decorate58([Property2(false)], SplitButton2.prototype, "createPopupOnClick", void 0);
    __decorate58([Collection([], Item)], SplitButton2.prototype, "items", void 0);
    __decorate58([Property2("")], SplitButton2.prototype, "target", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "beforeItemRender", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "beforeOpen", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "beforeClose", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "click", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "close", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "open", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "select", void 0);
    __decorate58([Event3()], SplitButton2.prototype, "created", void 0);
    SplitButton2 = __decorate58([NotifyPropertyChanges2], SplitButton2);
    return SplitButton2;
  }(DropDownButton)
);
var Deferred3 = (
  /** @class */
  /* @__PURE__ */ function() {
    function Deferred4() {
      var _this = this;
      this.promise = new Promise(function(resolve, reject) {
        _this.resolve = resolve;
        _this.reject = reject;
      });
      this.catch = this.promise.catch.bind(this.promise);
      this.then = this.promise.then.bind(this.promise);
    }
    return Deferred4;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-splitbuttons/src/progress-button/progress-button.js
var __extends60 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate59 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var HIDESPINNER = "e-hide-spinner";
var PROGRESS2 = "e-progress";
var PROGRESSACTIVE = "e-progress-active";
var CONTENTCLS = "e-btn-content";
var SpinSettings = (
  /** @class */
  function(_super) {
    __extends60(SpinSettings2, _super);
    function SpinSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate59([Property2(null)], SpinSettings2.prototype, "template", void 0);
    __decorate59([Property2(16)], SpinSettings2.prototype, "width", void 0);
    __decorate59([Property2("Left")], SpinSettings2.prototype, "position", void 0);
    return SpinSettings2;
  }(ChildProperty2)
);
var AnimationSettings2 = (
  /** @class */
  function(_super) {
    __extends60(AnimationSettings3, _super);
    function AnimationSettings3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate59([Property2(400)], AnimationSettings3.prototype, "duration", void 0);
    __decorate59([Property2("None")], AnimationSettings3.prototype, "effect", void 0);
    __decorate59([Property2("ease")], AnimationSettings3.prototype, "easing", void 0);
    return AnimationSettings3;
  }(ChildProperty2)
);
var ProgressButton = (
  /** @class */
  function(_super) {
    __extends60(ProgressButton2, _super);
    function ProgressButton2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.step = 1;
      return _this;
    }
    ProgressButton2.prototype.preRender = function() {
      _super.prototype.preRender.call(this);
    };
    ProgressButton2.prototype.render = function() {
      _super.prototype.render.call(this);
      this.init();
      this.wireEvents();
      this.setAria();
      this.renderComplete();
    };
    ProgressButton2.prototype.start = function(percent) {
      this.isPaused = false;
      this.startProgress(percent ? percent : this.percent, this.progressTime);
    };
    ProgressButton2.prototype.stop = function() {
      this.isPaused = true;
      cancelAnimationFrame(this.timerId);
    };
    ProgressButton2.prototype.progressComplete = function() {
      this.isPaused = false;
      this.finishProgress();
    };
    ProgressButton2.prototype.getModuleName = function() {
      return "progress-btn";
    };
    ProgressButton2.prototype.destroy = function() {
      var _this = this;
      var classList2 = [HIDESPINNER, PROGRESSACTIVE, "e-round-corner", "e-" + _super.prototype.getModuleName.call(this)];
      if (this.spinSettings.position) {
        classList2.push("e-spin-" + this.spinSettings.position.toLowerCase());
      }
      _super.prototype.destroy.call(this);
      this.unWireEvents();
      this.element.innerHTML = "";
      if (this.cssClass) {
        classList2 = classList2.concat(this.cssClass.split(" "));
      }
      removeClass2([this.element], classList2);
      var css = this.element.getAttribute("class") ? ["aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow"] : ["aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "class"];
      css.forEach(function(key) {
        _this.element.removeAttribute(key);
      });
      if (this.disabled) {
        this.element.removeAttribute("disabled");
      }
    };
    ProgressButton2.prototype.init = function() {
      this.element.classList.add("e-" + _super.prototype.getModuleName.call(this));
      this.setContent();
      this.createSpinner();
      if (this.enableProgress) {
        this.createProgress();
      }
    };
    ProgressButton2.prototype.createSpinner = function() {
      var spinner = this.createElement("span", {
        className: "e-spinner"
      });
      this.setSpinPosition(spinner);
      createSpinner({
        target: spinner,
        width: this.spinSettings.width || 16,
        template: this.spinSettings.template
      }, this.createElement);
    };
    ProgressButton2.prototype.getSpinner = function() {
      return this.element.getElementsByClassName("e-spinner")[0];
    };
    ProgressButton2.prototype.getProgress = function() {
      return this.element.getElementsByClassName(PROGRESS2)[0];
    };
    ProgressButton2.prototype.setSpinPosition = function(ele) {
      var position = this.spinSettings.position || "Left";
      if (position === "Left" || position === "Top") {
        this.element.insertBefore(ele, this.element.getElementsByClassName(CONTENTCLS)[0]);
      } else {
        this.element.appendChild(ele);
      }
      this.element.classList.add("e-spin-" + position.toLowerCase());
    };
    ProgressButton2.prototype.createProgress = function() {
      this.element.appendChild(this.createElement("span", {
        className: PROGRESS2
      }));
    };
    ProgressButton2.prototype.setContent = function() {
      var cont;
      cont = this.element.innerHTML;
      if (this.enableHtmlSanitizer) {
        cont = SanitizeHtmlHelper2.sanitize(this.element.innerHTML);
      }
      this.element.innerHTML = "";
      this.element.appendChild(this.createElement("span", {
        className: CONTENTCLS,
        innerHTML: cont
      }));
    };
    ProgressButton2.prototype.clickHandler = function() {
      if (this.element.classList.contains(PROGRESSACTIVE)) {
        return;
      }
      this.startProgress();
    };
    ProgressButton2.prototype.startProgress = function(percent, progressTime) {
      var clsList = this.element.classList;
      var isVertical = clsList.contains("e-vertical");
      clsList.add(PROGRESSACTIVE);
      if (!clsList.contains(HIDESPINNER)) {
        showSpinner(this.element.querySelector(".e-spinner"));
      }
      this.startAnimate(Date.now(), progressTime ? progressTime : 0, progressTime ? Date.now() - this.duration * 1 / 100 : Date.now(), percent ? percent : 0, 0, this.step, 0, isVertical);
      this.startContAnimate();
    };
    ProgressButton2.prototype.startAnimate = function(timestamp, progressTime, prevTime, percent, prevPercent, step, prevProgressTime, isVertical) {
      var _this = this;
      try {
        var timeDiff = timestamp - prevTime;
        var stepTime = this.duration * step / 100;
        var timeDiffBuffer_1 = timeDiff ? timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime : 0;
        this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer_1;
        prevTime = timestamp - timeDiffBuffer_1;
        percent = percent + (timeDiff - timeDiffBuffer_1) / this.duration * 100;
        prevPercent = (progressTime - prevProgressTime) % stepTime === 0 || percent === 100 ? percent : prevPercent;
        var args = {
          percent: prevPercent,
          currentDuration: progressTime,
          step
        };
        this.eIsVertical = isVertical;
        if (percent === 0) {
          this.trigger("begin", args, function(observedArgs) {
            _this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
          });
        } else if (percent === 100 || progressTime === this.duration) {
          this.trigger("end", args, function(observedArgs) {
            _this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
          });
        } else {
          this.trigger("progress", args, function(observedArgs) {
            _this.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer_1, prevTime);
          });
        }
      } catch (e) {
        cancelAnimationFrame(this.timerId);
        this.trigger("fail", e);
      }
    };
    ProgressButton2.prototype.successCallback = function(args, perc, pPerc, prgTim, pPrgTim, timDif, pTim) {
      var _this = this;
      var percent = perc;
      var prevPercent = pPerc;
      var timeDiffBuffer = timDif;
      var progressTime = prgTim;
      var prevProgressTime = pPrgTim;
      var prevTime = pTim;
      var isVertical = this.eIsVertical;
      if (percent !== args.percent && args.percent !== prevPercent) {
        percent = args.percent;
      }
      this.percent = percent;
      this.step = args.step;
      if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
        this.timerId = requestAnimationFrame(function() {
          if (_this.enableProgress && _this.getProgress()) {
            _this.getProgress().style[isVertical ? "height" : "width"] = percent + "%";
          }
          _this.element.setAttribute("aria-valuenow", percent.toString());
        });
        prevPercent = percent;
        prevProgressTime = progressTime;
      }
      if (!this.isPaused) {
        if (progressTime < this.duration && percent < 100) {
          this.interval = window.setTimeout(function() {
            _this.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args.step, prevProgressTime, isVertical);
          }, this.duration / 100 - timeDiffBuffer);
        } else {
          this.interval = window.setTimeout(function() {
            _this.progressTime = _this.percent = 0;
            if (_this.enableProgress && _this.getProgress()) {
              _this.getProgress().style[isVertical ? "height" : "width"] = "0%";
            }
            _this.element.setAttribute("aria-valuenow", "0");
            _this.hideSpin();
          }, 100);
        }
      }
    };
    ProgressButton2.prototype.startContAnimate = function() {
      var _this = this;
      var ele = this.element.getElementsByClassName(CONTENTCLS)[0];
      if (this.animationSettings.effect !== "None") {
        new Animation2({}).animate(ele, {
          duration: this.animationSettings.duration === 0 && animationMode2 === "Enable" ? 400 : this.animationSettings.duration,
          name: "Progress" + this.animationSettings.effect,
          timingFunction: this.animationSettings.easing,
          begin: function() {
            if (_this.spinSettings.position === "Center") {
              _this.setSpinnerSize();
            }
          },
          end: function() {
            ele.classList.add("e-animate-end");
          }
        });
      } else if (this.spinSettings.position === "Center") {
        this.setSpinnerSize();
      }
    };
    ProgressButton2.prototype.finishProgress = function() {
      var clsList = this.element.classList;
      var isVertical = clsList.contains("e-vertical");
      clsList.add(PROGRESSACTIVE);
      var count = 100;
      for (var i = this.percent; i < count; i++) {
        i += 10;
        if (i > 100) {
          i = 100;
        }
        if (this.enableProgress && this.getProgress()) {
          this.getProgress().style[isVertical ? "height" : "width"] = this.percent < 100 ? i + "%" : "100%";
        }
      }
      this.element.setAttribute("aria-valuenow", "0");
      this.hideSpin();
      var args = {
        step: this.step,
        currentDuration: this.progressTime,
        percent: 100
      };
      clearTimeout(this.interval);
      this.trigger("end", args);
      this.progressTime = this.percent = 0;
    };
    ProgressButton2.prototype.setSpinnerSize = function() {
      var ele = this.element.getElementsByClassName(CONTENTCLS)[0];
      var spinner = this.getSpinner();
      spinner.style.width = Math.max(spinner.offsetWidth, ele.offsetWidth) + "px";
      spinner.style.height = Math.max(spinner.offsetHeight, ele.offsetHeight) + "px";
      ele.classList.add("e-cont-animate");
    };
    ProgressButton2.prototype.hideSpin = function() {
      var cont = this.element.getElementsByClassName(CONTENTCLS)[0];
      if (!this.element.classList.contains(HIDESPINNER)) {
        hideSpinner(this.element.querySelector(".e-spinner"));
      }
      this.element.classList.remove(PROGRESSACTIVE);
      if (this.animationSettings.effect !== "None") {
        cont.classList.remove("e-animate-end");
      }
      if (this.spinSettings.position === "Center") {
        var ele = this.getSpinner();
        cont.classList.remove("e-cont-animate");
        ele.style.width = "auto";
        ele.style.height = "auto";
      }
    };
    ProgressButton2.prototype.setIconSpan = function() {
      var cont = this.element.getElementsByClassName(CONTENTCLS)[0];
      var iconSpan = this.element.getElementsByClassName("e-btn-icon")[0];
      if (cont.childNodes[0] && (this.iconPosition === "Left" || this.iconPosition === "Top")) {
        cont.insertBefore(iconSpan, cont.childNodes[0]);
      } else {
        cont.appendChild(iconSpan);
      }
    };
    ProgressButton2.prototype.setAria = function() {
      attributes2(this.element, {
        "aria-label": this.element.textContent + " progress"
      });
    };
    ProgressButton2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "click", this.clickHandler, this);
    };
    ProgressButton2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.element, "click", this.clickHandler);
    };
    ProgressButton2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var ele = this.element;
      var isSpinning = false;
      var clsList = this.element.querySelector(".e-spinner-pane").classList;
      if (clsList.contains("e-spin-show")) {
        isSpinning = true;
      }
      _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "content":
            this.setContent();
            this.createSpinner();
            if (isSpinning) {
              showSpinner(this.element.querySelector(".e-spinner"));
              isSpinning = false;
            }
            if (this.enableProgress) {
              this.createProgress();
            }
            ele.setAttribute("aria-label", ele.textContent + " progress");
            break;
          case "iconCss":
            if (!oldProp.iconCss) {
              this.setIconSpan();
            }
            break;
          case "iconPosition":
            this.setIconSpan();
            break;
          case "enableProgress":
            if (newProp.enableProgress) {
              this.createProgress();
            } else {
              remove(this.getProgress());
            }
            break;
          case "spinSettings":
            if (newProp.spinSettings.position) {
              ele.classList.remove("e-spin-" + oldProp.spinSettings.position.toLowerCase());
              this.setSpinPosition(this.getSpinner());
            }
            if (newProp.spinSettings.template || newProp.spinSettings.width) {
              ele.removeChild(this.getSpinner());
              this.createSpinner();
            }
            break;
        }
      }
    };
    ProgressButton2.prototype.focusIn = function() {
      this.element.focus();
    };
    __decorate59([Property2(false)], ProgressButton2.prototype, "enableProgress", void 0);
    __decorate59([Property2(2e3)], ProgressButton2.prototype, "duration", void 0);
    __decorate59([Property2("Left")], ProgressButton2.prototype, "iconPosition", void 0);
    __decorate59([Property2("")], ProgressButton2.prototype, "iconCss", void 0);
    __decorate59([Property2(false)], ProgressButton2.prototype, "disabled", void 0);
    __decorate59([Property2(false)], ProgressButton2.prototype, "isPrimary", void 0);
    __decorate59([Property2("")], ProgressButton2.prototype, "cssClass", void 0);
    __decorate59([Property2("")], ProgressButton2.prototype, "content", void 0);
    __decorate59([Property2(false)], ProgressButton2.prototype, "isToggle", void 0);
    __decorate59([Property2(true)], ProgressButton2.prototype, "enableHtmlSanitizer", void 0);
    __decorate59([Complex2({}, SpinSettings)], ProgressButton2.prototype, "spinSettings", void 0);
    __decorate59([Complex2({}, AnimationSettings2)], ProgressButton2.prototype, "animationSettings", void 0);
    __decorate59([Event3()], ProgressButton2.prototype, "created", void 0);
    __decorate59([Event3()], ProgressButton2.prototype, "begin", void 0);
    __decorate59([Event3()], ProgressButton2.prototype, "progress", void 0);
    __decorate59([Event3()], ProgressButton2.prototype, "end", void 0);
    __decorate59([Event3()], ProgressButton2.prototype, "fail", void 0);
    ProgressButton2 = __decorate59([NotifyPropertyChanges2], ProgressButton2);
    return ProgressButton2;
  }(Button)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/color-picker/color-picker.js
var __extends61 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate60 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var APPLY = "e-apply";
var CANCEL = "e-cancel";
var CURRENT = "e-current";
var CONTAINER2 = "e-container";
var CTRLBTN = "e-ctrl-btn";
var CTRLSWITCH = "e-switch-ctrl-btn";
var DISABLED8 = "e-disabled";
var FORMATSWITCH = "e-value-switch-btn";
var HANDLER = "e-handler";
var HEX = "e-hex";
var HIDEHEX = "e-hide-hex-value";
var HIDEOPACITY = "e-hide-opacity";
var HIDERGBA = "e-hide-switchable-value";
var HIDEVALUE = "e-hide-value";
var HIDEVALUESWITCH = "e-hide-valueswitcher";
var HSVAREA = "e-hsv-color";
var HSVCONTAINER = "e-hsv-container";
var INPUTWRAPPER = "e-selected-value";
var MODESWITCH = "e-mode-switch-btn";
var NOCOLOR = "e-nocolor-item";
var OPACITY = "e-opacity-value";
var PALETTES = "e-palette";
var PALETTECONTENT = "e-color-palette";
var PICKERCONTENT = "e-color-picker";
var PREVIEW = "e-preview-container";
var PREVIOUS = "e-previous";
var RTL13 = "e-rtl";
var SHOWVALUE = "e-show-value";
var SELECT = "e-selected";
var SPLITPREVIEW = "e-split-preview";
var TILE = "e-tile";
var presets = {
  default: ["#000000", "#f44336", "#e91e63", "#9c27b0", "#673ab7", "#2196f3", "#03a9f4", "#00bcd4", "#009688", "#ffeb3b", "#ffffff", "#ffebee", "#fce4ec", "#f3e5f5", "#ede7f6", "#e3f2fd", "#e1f5fe", "#e0f7fa", "#e0f2f1", "#fffde7", "#f2f2f2", "#ffcdd2", "#f8bbd0", "#e1bee7", "#d1c4e9", "#bbdefb", "#b3e5fc", "#b2ebf2", "#b2dfdb", "#fff9c4", "#e6e6e6", "#ef9a9a", "#f48fb1", "#ce93d8", "#b39ddb", "#90caf9", "#81d4fa", "#80deea", "#80cbc4", "#fff59d", "#cccccc", "#e57373", "#f06292", "#ba68c8", "#9575cd", "#64b5f6", "#4fc3f7", "#4dd0e1", "#4db6ac", "#fff176", "#b3b3b3", "#ef5350", "#ec407a", "#ab47bc", "#7e57c2", "#42a5f5", "#29b6f6", "#26c6da", "#26a69a", "#ffee58", "#999999", "#e53935", "#d81b60", "#8e24aa", "#5e35b1", "#1e88e5", "#039be5", "#00acc1", "#00897b", "#fdd835", "#808080", "#d32f2f", "#c2185b", "#7b1fa2", "#512da8", "#1976d2", "#0288d1", "#0097a7", "#00796b", "#fbc02d", "#666666", "#c62828", "#ad1457", "#6a1b9a", "#4527a0", "#1565c0", "#0277bd", "#00838f", "#00695c", "#f9a825", "#4d4d4d", "#b71c1c", "#880e4f", "#4a148c", "#311b92", "#0d47a1", "#01579b", "#006064", "#004d40", "#f57f17"]
};
var ColorPicker = (
  /** @class */
  function(_super) {
    __extends61(ColorPicker2, _super);
    function ColorPicker2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.recentColors = [];
      return _this;
    }
    ColorPicker2.prototype.preRender = function() {
      var ele = this.element;
      this.formElement = closest2(this.element, "form");
      if (this.formElement) {
        EventHandler2.add(this.formElement, "reset", this.formResetHandler, this);
      }
      var localeText = {
        Apply: "Apply",
        Cancel: "Cancel",
        ModeSwitcher: "Switch Mode",
        RecentColors: "Recent colors"
      };
      this.l10n = new L10n2("colorpicker", localeText, this.locale);
      if (ele.getAttribute("ejs-for") && !ele.getAttribute("name")) {
        ele.setAttribute("name", ele.id);
      }
    };
    ColorPicker2.prototype.render = function() {
      this.initWrapper();
      if (this.inline) {
        this.createWidget();
      } else {
        this.createSplitBtn();
      }
      if (!this.enableOpacity) {
        addClass2([this.container.parentElement], HIDEOPACITY);
      }
      this.renderComplete();
    };
    ColorPicker2.prototype.initWrapper = function() {
      var wrapper = this.createElement("div", {
        className: "e-" + this.getModuleName() + "-wrapper"
      });
      this.element.parentNode.insertBefore(wrapper, this.element);
      wrapper.appendChild(this.element);
      attributes2(this.element, {
        "tabindex": "-1",
        "spellcheck": "false",
        "aria-label": "colorpicker"
      });
      this.container = this.createElement("div", {
        className: CONTAINER2
      });
      this.getWrapper().appendChild(this.container);
      var value = this.value ? this.roundValue(this.value).toLowerCase() : "#008000ff";
      if (this.noColor && this.mode === "Palette" && this.value === "") {
        value = "";
      }
      var slicedValue = value.slice(0, 7);
      if (isNullOrUndefined2(this.initialInputValue)) {
        this.initialInputValue = slicedValue;
      }
      this.element.value = slicedValue;
      if (this.enableOpacity) {
        this.setProperties({
          "value": value
        }, true);
      } else {
        this.setProperties({
          "value": slicedValue
        }, true);
      }
      if (this.enableRtl) {
        wrapper.classList.add(RTL13);
      }
      if (this.cssClass) {
        addClass2([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      this.tileRipple = rippleEffect(this.container, {
        selector: "." + TILE
      });
      this.ctrlBtnRipple = rippleEffect(this.container, {
        selector: ".e-btn"
      });
    };
    ColorPicker2.prototype.getWrapper = function() {
      return this.element.parentElement;
    };
    ColorPicker2.prototype.createWidget = function() {
      if (this.mode === "Palette") {
        this.createPalette();
        if (!this.inline) {
          this.firstPaletteFocus();
        }
      } else {
        this.createPicker();
        if (!this.inline) {
          this.getDragHandler().focus();
        }
      }
      this.isRgb = true;
      this.createInput();
      this.createCtrlBtn();
      if (!this.disabled) {
        this.wireEvents();
      }
      if (this.inline && this.disabled) {
        this.toggleDisabled(true);
      }
      if (Browser2.isDevice) {
        this.refreshPopupPos();
      }
    };
    ColorPicker2.prototype.createSplitBtn = function() {
      var _this = this;
      var splitButton = this.createElement("button", {
        className: "e-split-colorpicker"
      });
      this.getWrapper().appendChild(splitButton);
      this.splitBtn = new SplitButton({
        iconCss: "e-selected-color",
        target: this.container,
        disabled: this.disabled,
        enableRtl: this.enableRtl,
        createPopupOnClick: this.createPopupOnClick,
        open: this.onOpen.bind(this),
        click: function() {
          var ev = new MouseEvent("click", {
            bubbles: true,
            cancelable: false
          });
          _this.trigger("change", {
            currentValue: {
              hex: _this.value.slice(0, 7),
              rgba: _this.convertToRgbString(_this.hexToRgb(_this.value))
            },
            previousValue: {
              hex: null,
              rgba: null
            },
            value: _this.value,
            event: ev
          });
        }
      });
      this.splitBtn.createElement = this.createElement;
      this.splitBtn.appendTo(splitButton);
      this.splitBtn.element.setAttribute("aria-label", "colorpicker");
      var preview = this.createElement("span", {
        className: SPLITPREVIEW
      });
      select2(".e-selected-color", splitButton).appendChild(preview);
      preview.style.backgroundColor = this.convertToRgbString(this.hexToRgb(this.value));
      var popupEle = this.getPopupEle();
      addClass2([popupEle], "e-colorpicker-popup");
      if (this.cssClass) {
        addClass2([popupEle], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (Browser2.isDevice && !this.createPopupOnClick) {
        var popupInst = this.getPopupInst();
        popupInst.relateTo = document.body;
        popupInst.position = {
          X: "center",
          Y: "center"
        };
        popupInst.targetType = "container";
        popupInst.collision = {
          X: "fit",
          Y: "fit"
        };
        popupInst.offsetY = 4;
        popupEle.style.zIndex = getZindexPartial(this.splitBtn.element).toString();
      }
      this.bindCallBackEvent();
    };
    ColorPicker2.prototype.onOpen = function() {
      this.trigger("open", {
        element: this.container
      });
      if (!Browser2.isDevice) {
        var popupInst = this.getPopupInst();
        var collision = isCollide(popupInst.element);
        if (collision.length > 0) {
          popupInst.collision = {
            X: "flip",
            Y: "fit"
          };
          popupInst.position = {
            X: "right",
            Y: "bottom"
          };
          popupInst.targetType = "container";
        }
      }
    };
    ColorPicker2.prototype.getPopupInst = function() {
      return getInstance(this.getPopupEle(), Popup);
    };
    ColorPicker2.prototype.bindCallBackEvent = function() {
      var _this = this;
      this.splitBtn.beforeOpen = function(args) {
        var callBackPromise = new Deferred3();
        _this.trigger("beforeOpen", args, function(observeOpenArgs) {
          if (!observeOpenArgs.cancel) {
            var popupEle = _this.getPopupEle();
            popupEle.style.top = formatUnit(0 + pageYOffset);
            popupEle.style.left = formatUnit(0 + pageXOffset);
            popupEle.style.display = "block";
            _this.createWidget();
            popupEle.style.display = "";
            if (Browser2.isDevice) {
              if (_this.createPopupOnClick) {
                var popupInst = _this.getPopupInst();
                popupInst.relateTo = document.body;
                popupInst.position = {
                  X: "center",
                  Y: "center"
                };
                popupInst.targetType = "container";
                popupInst.collision = {
                  X: "fit",
                  Y: "fit"
                };
                popupInst.offsetY = 4;
                popupEle.style.zIndex = getZindexPartial(_this.splitBtn.element).toString();
              }
              _this.modal = _this.createElement("div");
              _this.modal.className = "e-" + _this.getModuleName() + " e-modal";
              _this.modal.style.display = "none";
              document.body.insertBefore(_this.modal, popupEle);
              document.body.className += " e-colorpicker-overflow";
              _this.modal.style.display = "block";
              _this.modal.style.zIndex = (Number(popupEle.style.zIndex) - 1).toString();
            }
          }
          args.cancel = observeOpenArgs.cancel;
          callBackPromise.resolve(observeOpenArgs);
        });
        return callBackPromise;
      };
      this.splitBtn.beforeClose = function(args) {
        var callBackPromise = new Deferred3();
        if (!isNullOrUndefined2(args.event)) {
          var beforeCloseArgs = {
            element: _this.container,
            event: args.event,
            cancel: false
          };
          _this.trigger("beforeClose", beforeCloseArgs, function(observedCloseArgs) {
            if (Browser2.isDevice && args.event.target === _this.modal) {
              observedCloseArgs.cancel = true;
            }
            if (!observedCloseArgs.cancel) {
              _this.onPopupClose();
            }
            args.cancel = observedCloseArgs.cancel;
            callBackPromise.resolve(observedCloseArgs);
          });
        } else {
          callBackPromise.resolve(args);
        }
        return callBackPromise;
      };
    };
    ColorPicker2.prototype.onPopupClose = function() {
      this.unWireEvents();
      this.destroyOtherComp();
      this.container.style.width = "";
      select2("." + SPLITPREVIEW, this.splitBtn.element).style.backgroundColor = this.convertToRgbString(this.hexToRgb(this.value));
      this.container.innerHTML = "";
      removeClass2([this.container], [PICKERCONTENT, PALETTECONTENT]);
      if (Browser2.isDevice && this.modal) {
        removeClass2([document.body], "e-colorpicker-overflow");
        this.modal.style.display = "none";
        this.modal.outerHTML = "";
        this.modal = null;
      }
    };
    ColorPicker2.prototype.createPalette = function() {
      classList(this.container, [PALETTECONTENT], [PICKERCONTENT]);
      if (this.presetColors) {
        var paletteGroup = this.createElement("div", {
          className: "e-custom-palette"
        });
        this.appendElement(paletteGroup);
        var keys4 = Object.keys(this.presetColors);
        if (keys4.length === 1) {
          this.appendPalette(this.presetColors[keys4[0]], keys4[0], paletteGroup);
        } else {
          for (var i = 0, len = keys4.length; i < len; i++) {
            this.appendPalette(this.presetColors[keys4[i]], keys4[i], paletteGroup);
          }
        }
        if (selectAll2(".e-row", paletteGroup).length > 10) {
          addClass2([paletteGroup], "e-palette-group");
        }
      } else {
        this.appendPalette(presets.default, "default");
      }
      if (this.mode === "Palette" && !this.modeSwitcher && this.noColor) {
        this.setNoColor();
      }
      if (this.showRecentColors && this.recentColors && this.recentColors.length > 0) {
        this.renderRecentColor();
      }
      var width = parseInt(getComputedStyle(this.container).borderBottomWidth, 10);
      this.container.style.width = formatUnit(this.container.children[0].offsetWidth + width + width);
      this.rgb = this.hexToRgb(this.roundValue(this.value));
      this.hsv = this.rgbToHsv.apply(this, this.rgb);
    };
    ColorPicker2.prototype.renderRecentColor = function() {
      var _this = this;
      var recentClrWpr = this.container.querySelector(".e-clr-pal-rec-wpr");
      if (recentClrWpr) {
        detach2(recentClrWpr);
      }
      var recentColorWrapper = this.createElement("div", {
        className: "e-clr-pal-rec-wpr"
      });
      var refEle = this.container.querySelector(".e-switch-ctrl-btn");
      if (refEle) {
        this.container.insertBefore(recentColorWrapper, refEle);
      } else {
        this.container.appendChild(recentColorWrapper);
      }
      var recentClrSpan = this.createElement("label", {
        className: "e-recent-clr-span"
      });
      recentClrSpan.textContent = this.l10n.getConstant("RecentColors");
      recentColorWrapper.appendChild(recentClrSpan);
      if (this.recentColors.length > 0) {
        this.recentColors = this.recentColors.filter(function(item, index) {
          return _this.recentColors.indexOf(item) === index;
        });
        while (this.recentColors.length > 10) {
          this.recentColors.pop();
        }
        this.appendPalette(this.recentColors, "recent-color", recentColorWrapper);
      }
    };
    ColorPicker2.prototype.firstPaletteFocus = function() {
      if (!select2("." + SELECT, this.container.children[0])) {
        selectAll2("." + PALETTES, this.container)[0].focus();
      }
    };
    ColorPicker2.prototype.appendPalette = function(colors, key, refEle) {
      var palette = this.createElement("div", {
        className: PALETTES,
        attrs: {
          "tabindex": "0",
          "role": "grid"
        }
      });
      if (key === "recent-color") {
        palette.classList.add("e-recent-palette");
      }
      if (refEle) {
        refEle.appendChild(palette);
      } else {
        this.appendElement(palette);
      }
      var row;
      var tile;
      var roundedColor;
      for (var i = 0, len = colors.length; i < len; i++) {
        if (i === 0 || i % this.columns === 0) {
          row = this.createElement("div", {
            className: "e-row",
            attrs: {
              "role": "row"
            }
          });
          palette.appendChild(row);
        }
        roundedColor = this.roundValue(colors[i]).toLowerCase();
        tile = this.createElement("span", {
          className: TILE,
          attrs: {
            "role": "gridcell",
            "aria-label": roundedColor,
            "aria-selected": "false"
          }
        });
        this.trigger("beforeTileRender", {
          element: tile,
          presetName: key,
          value: colors[i]
        });
        row.appendChild(tile);
        if (this.value === roundedColor && key !== "recent-color") {
          this.addTileSelection(tile);
          palette.focus();
        }
        tile.style.backgroundColor = this.convertToRgbString(this.hexToRgb(roundedColor));
      }
    };
    ColorPicker2.prototype.setNoColor = function() {
      var noColorEle = this.container.querySelector(".e-row").children[0];
      noColorEle.classList.add(NOCOLOR);
      if (!this.value) {
        noColorEle.classList.add(SELECT);
        closest2(noColorEle, "." + PALETTES).focus();
      }
      ["aria-selected", "aria-label"].forEach(function(attr) {
        noColorEle.removeAttribute(attr);
      });
      noColorEle.style.backgroundColor = "";
    };
    ColorPicker2.prototype.appendElement = function(ele, insertPos) {
      if (insertPos === void 0) {
        insertPos = 0;
      }
      var refEle = this.container.children[insertPos];
      if (refEle) {
        this.container.insertBefore(ele, refEle);
      } else {
        this.container.appendChild(ele);
      }
    };
    ColorPicker2.prototype.addTileSelection = function(ele) {
      if (ele) {
        ele.classList.add(SELECT);
        ele.setAttribute("aria-selected", "true");
      }
    };
    ColorPicker2.prototype.createPicker = function() {
      classList(this.container, [PICKERCONTENT], [PALETTECONTENT]);
      var hsvContainer = this.createElement("div", {
        className: HSVCONTAINER
      });
      this.appendElement(hsvContainer);
      hsvContainer.appendChild(this.createElement("div", {
        className: HSVAREA
      }));
      var dragHandler = this.createElement("span", {
        className: HANDLER,
        attrs: {
          "tabindex": "0"
        }
      });
      hsvContainer.appendChild(dragHandler);
      if (this.value === null || this.value === "") {
        this.value = "#008000ff";
      }
      this.rgb = this.hexToRgb(this.value);
      this.hsv = this.rgbToHsv.apply(this, this.rgb);
      this.setHsvContainerBg();
      this.setHandlerPosition();
      this.createSlider();
      this.createDragTooltip();
    };
    ColorPicker2.prototype.setHsvContainerBg = function(h) {
      if (h === void 0) {
        h = this.hsv[0];
      }
      this.getHsvContainer().style.backgroundColor = this.convertToRgbString(this.hsvToRgb(h, 100, 100, 1));
    };
    ColorPicker2.prototype.getHsvContainer = function() {
      return select2("." + HSVCONTAINER, this.container);
    };
    ColorPicker2.prototype.setHandlerPosition = function() {
      var dragHandler = this.getDragHandler();
      var hsvArea = select2("." + HSVAREA, this.container);
      if (this.enableRtl) {
        dragHandler.style.left = formatUnit((hsvArea.offsetWidth - dragHandler.offsetWidth / 2.5) * Math.abs(100 - this.hsv[1]) / 100);
      } else {
        dragHandler.style.left = formatUnit((hsvArea.offsetWidth - dragHandler.offsetWidth / 2.5) * this.hsv[1] / 100);
      }
      dragHandler.style.top = formatUnit((hsvArea.offsetHeight - dragHandler.offsetHeight / 2.5) * (100 - this.hsv[2]) / 100);
    };
    ColorPicker2.prototype.createSlider = function() {
      var sliderPreviewWrapper = this.createElement("div", {
        className: "e-slider-preview"
      });
      this.appendElement(sliderPreviewWrapper, 1);
      this.createPreview(sliderPreviewWrapper);
      var sliderWrapper = this.createElement("div", {
        className: "e-colorpicker-slider"
      });
      sliderPreviewWrapper.insertBefore(sliderWrapper, sliderPreviewWrapper.children[0]);
      var slider = this.createElement("div", {
        className: "e-hue-slider"
      });
      sliderWrapper.appendChild(slider);
      this.hueSlider = new Slider({
        value: this.hsv[0],
        min: 0,
        max: 359,
        enableRtl: this.enableRtl,
        enabled: !this.disabled,
        change: this.hueChange.bind(this)
      });
      this.hueSlider.createElement = this.createElement;
      this.hueSlider.appendTo(slider);
      if (this.enableOpacity) {
        slider = this.createElement("div", {
          className: "e-opacity-slider"
        });
        sliderWrapper.appendChild(slider);
        this.createOpacitySlider(slider);
      }
    };
    ColorPicker2.prototype.createOpacitySlider = function(slider) {
      this.opacitySlider = new Slider({
        value: this.rgb[3] * 100,
        min: 0,
        max: 100,
        enableRtl: this.enableRtl,
        enabled: !this.disabled,
        change: this.opacityChange.bind(this)
      });
      this.opacitySlider.createElement = this.createElement;
      this.opacitySlider.appendTo(slider);
      var opacityBgTrack = this.createElement("div", {
        className: "e-opacity-empty-track"
      });
      slider.appendChild(opacityBgTrack);
      this.updateOpacitySliderBg();
    };
    ColorPicker2.prototype.updateOpacitySliderBg = function() {
      var direction = this.enableRtl ? "to left" : "to right";
      var opacityEle = select2(".e-opacity-empty-track", this.opacitySlider.element);
      if (opacityEle) {
        opacityEle.style.background = "linear-gradient(" + direction + ", rgba(" + this.rgb.slice(0, 3) + ", 0) 0%, " + this.convertToRgbString(this.rgb.slice(0, 3)) + " 100%)";
      }
    };
    ColorPicker2.prototype.hueChange = function(args) {
      this.hsv[0] = args.value;
      this.setHsvContainerBg();
      this.convertToOtherFormat();
    };
    ColorPicker2.prototype.opacityChange = function(args) {
      var value = args.value;
      var pValue = this.rgbToHex(this.rgb);
      this.hsv[3] = value / 100;
      this.rgb[3] = value / 100;
      var cValue = this.rgbToHex(this.rgb);
      this.updateOpacityInput(value);
      var rgb = this.convertToRgbString(this.rgb);
      this.updatePreview(rgb);
      this.triggerEvent(cValue, pValue, rgb);
    };
    ColorPicker2.prototype.updateOpacityInput = function(value) {
      if (this.enableOpacity && !this.getWrapper().classList.contains(HIDEVALUE)) {
        var opacityTextBoxInst = getInstance(select2("." + OPACITY, this.container), NumericTextBox);
        opacityTextBoxInst.value = value;
        opacityTextBoxInst.dataBind();
      }
    };
    ColorPicker2.prototype.createPreview = function(parentEle) {
      var previewContainer = this.createElement("div", {
        className: PREVIEW
      });
      parentEle.appendChild(previewContainer);
      var preview = this.createElement("span", {
        className: "e-preview " + CURRENT
      });
      previewContainer.appendChild(preview);
      var colorValue = this.convertToRgbString(this.rgb);
      preview.style.backgroundColor = colorValue;
      preview = this.createElement("span", {
        className: "e-preview " + PREVIOUS
      });
      previewContainer.appendChild(preview);
      preview.style.backgroundColor = colorValue;
    };
    ColorPicker2.prototype.isPicker = function() {
      return !this.container.classList.contains(PALETTECONTENT);
    };
    ColorPicker2.prototype.getPopupEle = function() {
      return this.container.parentElement;
    };
    ColorPicker2.prototype.createNumericInput = function(element2, value, label, max) {
      var _this = this;
      var numericInput = new NumericTextBox({
        value,
        placeholder: label,
        min: 0,
        max,
        format: "###.##",
        showSpinButton: false,
        floatLabelType: "Always",
        enableRtl: this.enableRtl,
        enabled: !this.disabled,
        readonly: this.isPicker() ? false : true,
        change: function(args) {
          if (args.event) {
            _this.inputHandler(args.event);
          }
        }
      });
      numericInput.createElement = this.createElement;
      numericInput.appendTo(element2);
    };
    ColorPicker2.prototype.createInput = function() {
      var isPicker = this.isPicker();
      var wrapper = this.getWrapper();
      if (isPicker && !wrapper.classList.contains(HIDEVALUE) || !isPicker && wrapper.classList.contains(SHOWVALUE)) {
        var inputWrap = this.createElement("div", {
          className: INPUTWRAPPER
        });
        if (isPicker) {
          this.appendElement(inputWrap, 2);
        } else {
          this.appendElement(inputWrap, 1);
        }
        var container = this.createElement("div", {
          className: "e-input-container"
        });
        inputWrap.appendChild(container);
        if (!wrapper.classList.contains(HIDEVALUESWITCH)) {
          this.appendValueSwitchBtn(inputWrap);
        }
        if (!wrapper.classList.contains(HIDEHEX)) {
          var hexInput = this.createElement("input", {
            className: HEX,
            attrs: {
              "maxlength": "7",
              "spellcheck": "false",
              "aria-label": "HEX"
            }
          });
          container.appendChild(hexInput);
          Input.createInput({
            element: hexInput,
            floatLabelType: "Always",
            properties: {
              placeholder: "HEX",
              enableRtl: this.enableRtl,
              enabled: !this.disabled,
              readonly: this.isPicker() ? false : true
            }
          }, this.createElement);
          Input.setValue(this.value.slice(0, 7), hexInput);
          hexInput.addEventListener("input", this.inputHandler.bind(this));
        }
        if (!wrapper.classList.contains(HIDERGBA)) {
          var label = void 0;
          var value = void 0;
          if (this.isRgb) {
            label = "RGB";
            value = this.rgb;
          } else {
            label = "HSV";
            value = this.hsv;
          }
          var clsName = ["rh", "gs", "bv"];
          for (var i = 0; i < 3; i++) {
            this.createNumericInput(container.appendChild(this.createElement("input", {
              className: "e-" + clsName[i] + "-value"
            })), value[i], label[i], 255);
          }
          if (this.enableOpacity) {
            this.appendOpacityValue(container);
          }
        }
      }
    };
    ColorPicker2.prototype.appendOpacityValue = function(container) {
      this.createNumericInput(container.appendChild(this.createElement("input", {
        className: OPACITY
      })), this.rgb[3] * 100, "A", 100);
    };
    ColorPicker2.prototype.appendValueSwitchBtn = function(targetEle) {
      var valueSwitchBtn = this.createElement("button", {
        className: "e-icons e-css e-btn e-flat e-icon-btn " + FORMATSWITCH,
        attrs: {
          "title": "Toggle format"
        }
      });
      targetEle.appendChild(valueSwitchBtn);
      if (this.isPicker() && !this.getWrapper().classList.contains(HIDERGBA)) {
        valueSwitchBtn.addEventListener("click", this.formatSwitchHandler.bind(this));
      }
    };
    ColorPicker2.prototype.createCtrlBtn = function() {
      if (this.modeSwitcher || this.showButtons) {
        this.l10n.setLocale(this.locale);
        var btnWrapper = this.createElement("div", {
          className: CTRLSWITCH
        });
        this.container.appendChild(btnWrapper);
        if (this.showButtons) {
          var controlBtnWrapper = this.createElement("div", {
            className: CTRLBTN
          });
          btnWrapper.appendChild(controlBtnWrapper);
          var apply = this.l10n.getConstant("Apply");
          controlBtnWrapper.appendChild(this.createElement("button", {
            innerHTML: apply,
            className: "e-btn e-css e-flat e-primary e-small " + APPLY,
            attrs: {
              "title": apply
            }
          }));
          var cancel = this.l10n.getConstant("Cancel");
          controlBtnWrapper.appendChild(this.createElement("button", {
            innerHTML: cancel,
            className: "e-btn e-css e-flat e-small " + CANCEL,
            attrs: {
              "title": cancel
            }
          }));
        }
        if (this.modeSwitcher) {
          this.appendModeSwitchBtn();
        }
      }
    };
    ColorPicker2.prototype.appendModeSwitchBtn = function() {
      var modeSwitcher = this.createElement("button", {
        className: "e-icons e-btn e-flat e-icon-btn " + MODESWITCH,
        attrs: {
          title: this.l10n.getConstant("ModeSwitcher")
        }
      });
      select2("." + CTRLSWITCH, this.container).insertBefore(modeSwitcher, select2("." + CTRLBTN, this.container));
    };
    ColorPicker2.prototype.createDragTooltip = function() {
      var _this = this;
      var tooltip = new Tooltip({
        opensOn: "Custom",
        showTipPointer: false,
        cssClass: "e-color-picker-tooltip",
        htmlAttributes: {
          title: "tooltip"
        },
        beforeOpen: function(args) {
          _this.tooltipEle = args.element;
        },
        animation: {
          open: {
            effect: "None"
          },
          close: {
            effect: "None"
          }
        }
      });
      tooltip.createElement = this.createElement;
      tooltip.appendTo(this.container);
      tooltip.open(this.container);
      this.tooltipEle.style.zIndex = getZindexPartial(this.tooltipEle).toString();
      this.tooltipEle.setAttribute("aria-label", "colorpicker-tooltip");
      select2(".e-tip-content", this.tooltipEle).appendChild(this.createElement("div", {
        className: "e-tip-transparent"
      }));
    };
    ColorPicker2.prototype.getTooltipInst = function() {
      return getInstance(this.container, Tooltip);
    };
    ColorPicker2.prototype.setTooltipOffset = function(value) {
      this.getTooltipInst().offsetY = value;
    };
    ColorPicker2.prototype.toggleDisabled = function(enable) {
      if (enable) {
        this.getWrapper().classList.add(DISABLED8);
      } else {
        this.getWrapper().classList.remove(DISABLED8);
      }
      if (this.showButtons) {
        [].slice.call(selectAll2(".e-btn", this.container)).forEach(function(ele) {
          if (enable) {
            attributes2(ele, {
              "disabled": ""
            });
          } else {
            ele.removeAttribute("disabled");
          }
        });
      }
    };
    ColorPicker2.prototype.convertToRgbString = function(rgb) {
      return rgb.length ? rgb.length === 4 ? "rgba(" + rgb.join() + ")" : "rgb(" + rgb.join() + ")" : "";
    };
    ColorPicker2.prototype.convertToHsvString = function(hsv) {
      return hsv.length === 4 ? "hsva(" + hsv.join() + ")" : "hsv(" + hsv.join() + ")";
    };
    ColorPicker2.prototype.updateHsv = function() {
      this.hsv[1] = this.hsv[1] > 100 ? 100 : this.hsv[1];
      this.hsv[2] = this.hsv[2] > 100 ? 100 : this.hsv[2];
      this.setHandlerPosition();
    };
    ColorPicker2.prototype.convertToOtherFormat = function(isKey, e) {
      if (isKey === void 0) {
        isKey = false;
      }
      var pValue = this.rgbToHex(this.rgb);
      this.rgb = this.hsvToRgb.apply(this, this.hsv);
      var cValue = this.rgbToHex(this.rgb);
      var rgba = this.convertToRgbString(this.rgb);
      this.updatePreview(rgba);
      this.updateInput(cValue);
      this.triggerEvent(cValue, pValue, rgba, isKey, e);
    };
    ColorPicker2.prototype.updateInput = function(value) {
      var wrapper = this.getWrapper();
      if (!wrapper.classList.contains(HIDEVALUE)) {
        if (!wrapper.classList.contains(HIDEHEX)) {
          Input.setValue(value.substr(0, 7), select2("." + HEX, this.container));
        }
        if (!wrapper.classList.contains(HIDERGBA)) {
          if (this.isRgb) {
            this.updateValue(this.rgb, false);
          } else {
            this.updateValue(this.hsv, false);
          }
        }
      }
    };
    ColorPicker2.prototype.updatePreview = function(value) {
      if (this.enableOpacity) {
        this.updateOpacitySliderBg();
      }
      select2(".e-tip-transparent", this.tooltipEle).style.backgroundColor = value;
      select2("." + PREVIEW + " ." + CURRENT, this.container).style.backgroundColor = value;
      select2("." + PREVIEW + " ." + PREVIOUS, this.container).style.backgroundColor = this.convertToRgbString(this.hexToRgb(this.value));
    };
    ColorPicker2.prototype.getDragHandler = function() {
      return select2("." + HANDLER, this.container);
    };
    ColorPicker2.prototype.removeTileSelection = function() {
      var selectedEle = [].slice.call(selectAll2("." + SELECT, this.container));
      selectedEle.forEach(function(ele) {
        ele.classList.remove(SELECT);
        ele.setAttribute("aria-selected", "false");
      });
    };
    ColorPicker2.prototype.convertRgbToNumberArray = function(value) {
      return value.slice(value.indexOf("(") + 1, value.indexOf(")")).split(",").map(function(n, i) {
        return i !== 3 ? parseInt(n, 10) : parseFloat(n);
      });
    };
    ColorPicker2.prototype.getValue = function(value, type) {
      if (!value) {
        value = this.value;
      }
      type = !type ? "hex" : type.toLowerCase();
      if (value[0] === "r") {
        var cValue = this.convertRgbToNumberArray(value);
        if (type === "hex" || type === "hexa") {
          var hex = this.rgbToHex(cValue);
          return type === "hex" ? hex.slice(0, 7) : hex;
        } else {
          if (type === "hsv") {
            return this.convertToHsvString(this.rgbToHsv.apply(this, cValue.slice(0, 3)));
          } else {
            if (type === "hsva") {
              return this.convertToHsvString(this.rgbToHsv.apply(this, cValue));
            } else {
              return "null";
            }
          }
        }
      } else {
        if (value[0] === "h") {
          var cValue = this.hsvToRgb.apply(this, this.convertRgbToNumberArray(value));
          if (type === "rgba") {
            return this.convertToRgbString(cValue);
          } else {
            if (type === "hex" || type === "hexa") {
              var hex = this.rgbToHex(cValue);
              return type === "hex" ? hex.slice(0, 7) : hex;
            } else {
              if (type === "rgb") {
                return this.convertToRgbString(cValue.slice(0, 3));
              } else {
                return "null";
              }
            }
          }
        } else {
          value = this.roundValue(value);
          var rgb = this.hexToRgb(value);
          if (type === "rgb" || type === "hsv") {
            rgb = rgb.slice(0, 3);
          }
          if (type === "rgba" || type === "rgb") {
            return this.convertToRgbString(rgb);
          } else {
            if (type === "hsva" || type === "hsv") {
              return this.convertToHsvString(this.rgbToHsv.apply(this, rgb));
            } else {
              if (type === "hex") {
                return value.slice(0, 7);
              } else {
                if (type === "a") {
                  return rgb[3].toString();
                } else {
                  return "null";
                }
              }
            }
          }
        }
      }
    };
    ColorPicker2.prototype.toggle = function() {
      if (this.container.parentElement.classList.contains("e-popup-close")) {
        this.splitBtn.toggle();
      } else {
        this.closePopup(null);
      }
    };
    ColorPicker2.prototype.getModuleName = function() {
      return "colorpicker";
    };
    ColorPicker2.prototype.getPersistData = function() {
      return this.addOnPersist(["value"]);
    };
    ColorPicker2.prototype.wireEvents = function() {
      if (this.isPicker()) {
        var dragHandler = this.getDragHandler();
        EventHandler2.add(dragHandler, "keydown", this.pickerKeyDown, this);
        var ctrlBtn = select2("." + CTRLBTN, this.container);
        if (ctrlBtn) {
          EventHandler2.add(ctrlBtn, "keydown", this.ctrlBtnKeyDown, this);
        }
        EventHandler2.add(this.getHsvContainer(), "mousedown touchstart", this.handlerDown, this);
        if (this.modeSwitcher || this.showButtons) {
          this.addCtrlSwitchEvent();
        }
        EventHandler2.add(select2("." + PREVIOUS, this.container), "click", this.previewHandler, this);
      } else {
        EventHandler2.add(this.container, "click", this.paletteClickHandler, this);
        EventHandler2.add(this.container, "keydown", this.paletteKeyDown, this);
      }
    };
    ColorPicker2.prototype.formResetHandler = function() {
      this.value = this.initialInputValue;
      attributes2(this.element, {
        "value": this.initialInputValue
      });
    };
    ColorPicker2.prototype.addCtrlSwitchEvent = function() {
      var ctrlSwitchBtn = select2("." + CTRLSWITCH, this.container);
      if (ctrlSwitchBtn) {
        EventHandler2.add(ctrlSwitchBtn, "click", this.btnClickHandler, this);
      }
    };
    ColorPicker2.prototype.ctrlBtnKeyDown = function(e) {
      if (e.keyCode === 13) {
        var applyBtn = select2("." + APPLY, this.container);
        if (applyBtn) {
          var cValue = this.rgbToHex(this.rgb);
          this.triggerChangeEvent(cValue);
        }
        this.splitBtn.element.focus();
      }
    };
    ColorPicker2.prototype.pickerKeyDown = function(e) {
      switch (e.keyCode) {
        case 39:
          this.handlerDragPosition(1, this.enableRtl ? -1 : 1, e);
          break;
        case 37:
          this.handlerDragPosition(1, this.enableRtl ? 1 : -1, e);
          break;
        case 38:
          this.handlerDragPosition(2, 1, e);
          break;
        case 40:
          this.handlerDragPosition(2, -1, e);
          break;
        case 13: {
          e.preventDefault();
          var cValue = this.rgbToHex(this.rgb);
          this.enterKeyHandler(cValue);
        }
      }
    };
    ColorPicker2.prototype.enterKeyHandler = function(value) {
      this.triggerChangeEvent(value);
      if (!this.inline) {
        this.splitBtn.element.focus();
      }
    };
    ColorPicker2.prototype.closePopup = function(e) {
      var _this = this;
      var beforeCloseArgs = {
        element: this.container,
        event: e,
        cancel: false
      };
      this.trigger("beforeClose", beforeCloseArgs, function(observedcloseArgs) {
        if (!observedcloseArgs.cancel) {
          _this.splitBtn.toggle();
          _this.onPopupClose();
        }
      });
    };
    ColorPicker2.prototype.triggerChangeEvent = function(value, e) {
      var hex = value.slice(0, 7);
      this.trigger("change", {
        currentValue: {
          hex,
          rgba: this.convertToRgbString(this.rgb)
        },
        event: e,
        previousValue: {
          hex: this.value.slice(0, 7),
          rgba: this.convertToRgbString(this.hexToRgb(this.value))
        },
        value: this.enableOpacity ? value : hex
      });
      if (this.showRecentColors) {
        this.recentColors.unshift(hex);
        if (this.inline) {
          this.renderRecentColor();
        }
      }
      if (this.enableOpacity) {
        this.setProperties({
          "value": value
        }, true);
      } else {
        this.setProperties({
          "value": hex
        }, true);
      }
      this.element.value = hex ? hex : "#000000";
    };
    ColorPicker2.prototype.handlerDragPosition = function(prob, value, e) {
      e.preventDefault();
      this.hsv[prob] += value * (e.ctrlKey ? 1 : 3);
      if (this.hsv[prob] < 0) {
        this.hsv[prob] = 0;
      }
      this.updateHsv();
      this.convertToOtherFormat(true, e);
    };
    ColorPicker2.prototype.handlerDown = function(e) {
      e.preventDefault();
      if (e.type === "mousedown") {
        this.clientX = Math.abs(e.pageX - pageXOffset);
        this.clientY = Math.abs(e.pageY - pageYOffset);
        this.setTooltipOffset(8);
      } else {
        this.clientX = Math.abs(e.changedTouches[0].pageX - pageXOffset);
        this.clientY = Math.abs(e.changedTouches[0].pageY - pageYOffset);
        this.setTooltipOffset(-8);
      }
      this.setHsv(this.clientX, this.clientY);
      this.getDragHandler().style.transition = "left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)";
      this.updateHsv();
      this.convertToOtherFormat(false, e);
      this.getDragHandler().focus();
      EventHandler2.add(document, "mousemove touchmove", this.handlerMove, this);
      EventHandler2.add(document, "mouseup touchend", this.handlerEnd, this);
    };
    ColorPicker2.prototype.handlerMove = function(e) {
      if (e.type !== "touchmove") {
        e.preventDefault();
      }
      var x;
      var y;
      if (e.type === "mousemove") {
        x = Math.abs(e.pageX - pageXOffset);
        y = Math.abs(e.pageY - pageYOffset);
      } else {
        x = Math.abs(e.changedTouches[0].pageX - pageXOffset);
        y = Math.abs(e.changedTouches[0].pageY - pageYOffset);
      }
      this.setHsv(x, y);
      var dragHandler = this.getDragHandler();
      this.updateHsv();
      this.convertToOtherFormat(false, e);
      this.getTooltipInst().refresh(dragHandler);
      if (!this.tooltipEle.style.transform) {
        if (Math.abs(this.clientX - x) > 8 || Math.abs(this.clientY - y) > 8) {
          select2("." + HSVAREA, this.container).style.cursor = "pointer";
          dragHandler.style.transition = "none";
          if (!this.inline) {
            this.tooltipEle.style.zIndex = (parseInt(this.getPopupEle().style.zIndex, 10) + 1).toString();
          }
          this.tooltipEle.style.transform = "rotate(45deg)";
          dragHandler.classList.add("e-hide-handler");
        }
      }
    };
    ColorPicker2.prototype.setHsv = function(clientX, clientY) {
      var ele = select2("." + HSVAREA, this.container);
      var position = ele.getBoundingClientRect();
      if (this.enableRtl) {
        clientX = clientX > position.right ? 0 : Math.abs(clientX - position.right);
      } else {
        clientX = clientX > position.left ? Math.abs(clientX - position.left) : 0;
      }
      clientY = clientY > position.top ? Math.abs(clientY - position.top) : 0;
      this.hsv[2] = Math.round(Number(100 * (ele.offsetHeight - Math.max(0, Math.min(ele.offsetHeight, clientY - ele.offsetTop))) / ele.offsetHeight) * 10) / 10;
      this.hsv[1] = Math.round(Number(100 * Math.max(0, Math.min(ele.offsetWidth, clientX - ele.offsetLeft)) / ele.offsetWidth) * 10) / 10;
    };
    ColorPicker2.prototype.handlerEnd = function(e) {
      if (e.type !== "touchend") {
        e.preventDefault();
      }
      EventHandler2.remove(document, "mousemove touchmove", this.handlerMove);
      EventHandler2.remove(document, "mouseup touchend", this.handlerEnd);
      var dragHandler = this.getDragHandler();
      select2("." + HSVAREA, this.container).style.cursor = "";
      if (this.tooltipEle.style.transform) {
        this.tooltipEle.style.transform = "";
        dragHandler.classList.remove("e-hide-handler");
      }
      if (!this.inline && !this.showButtons) {
        this.closePopup(e);
      }
    };
    ColorPicker2.prototype.btnClickHandler = function(e) {
      var target = e.target;
      if (closest2(target, "." + MODESWITCH)) {
        e.stopPropagation();
        this.switchToPalette();
      } else {
        if (target.classList.contains(APPLY) || target.classList.contains(CANCEL)) {
          this.ctrlBtnClick(target, e);
        }
      }
    };
    ColorPicker2.prototype.switchToPalette = function() {
      this.trigger("beforeModeSwitch", {
        element: this.container,
        mode: "Palette"
      });
      this.unWireEvents();
      this.destroyOtherComp();
      detach2(select2(".e-slider-preview", this.container));
      if (!this.getWrapper().classList.contains(HIDEVALUE)) {
        remove(select2("." + INPUTWRAPPER, this.container));
      }
      detach2(this.getHsvContainer());
      this.createPalette();
      this.firstPaletteFocus();
      this.createInput();
      this.refreshPopupPos();
      if (this.element.parentElement && this.element.parentElement.parentElement && this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")) {
        this.refreshImageEditorPopupPos();
      }
      this.wireEvents();
      this.trigger("onModeSwitch", {
        element: this.container,
        mode: "Palette"
      });
    };
    ColorPicker2.prototype.refreshImageEditorPopupPos = function() {
      if (Browser2.isDevice) {
        var popupEle = this.getPopupEle();
        popupEle.style.left = formatUnit(0 + pageXOffset);
        popupEle.style.top = formatUnit(0 + pageYOffset);
        var btnElem = document.querySelector("#" + this.element.parentElement.parentElement.id.split("-popup")[0]);
        if (btnElem) {
          popupEle.parentElement.ej2_instances[0].refreshPosition(btnElem);
        }
      }
    };
    ColorPicker2.prototype.refreshPopupPos = function() {
      if (!this.inline) {
        var popupEle = this.getPopupEle();
        popupEle.style.left = formatUnit(0 + pageXOffset);
        popupEle.style.top = formatUnit(0 + pageYOffset);
        this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement);
      }
    };
    ColorPicker2.prototype.formatSwitchHandler = function() {
      if (this.isRgb) {
        this.updateValue(this.hsv, true, 3, [360, 100, 100]);
        this.isRgb = false;
      } else {
        this.updateValue(this.rgb, true, 2);
        this.isRgb = true;
      }
    };
    ColorPicker2.prototype.updateValue = function(value, format, idx, max) {
      var clsName = ["e-rh-value", "e-gs-value", "e-bv-value"];
      var inst;
      for (var i = 0, len = clsName.length; i < len; i++) {
        inst = getInstance(select2("." + clsName[i], this.container), NumericTextBox);
        inst.value = Math.round(value[i]);
        if (format) {
          inst.placeholder = clsName[i].substr(idx, 1).toUpperCase();
          inst.max = max ? max[i] : 255;
        }
        inst.dataBind();
      }
    };
    ColorPicker2.prototype.previewHandler = function(e) {
      var target = e.target;
      var pValue = this.rgbToHex(this.rgb);
      this.rgb = this.convertRgbToNumberArray(target.style.backgroundColor);
      if (!this.rgb[3]) {
        this.rgb[3] = 1;
      }
      var cValue = this.rgbToHex(this.rgb);
      var hsv = this.rgbToHsv.apply(this, this.rgb);
      if (hsv[0] !== this.hsv[0]) {
        this.hueSlider.setProperties({
          "value": hsv[0]
        }, true);
        this.hueSlider.refresh();
      }
      this.setHsvContainerBg(hsv[0]);
      if (this.enableOpacity && hsv[3] !== this.hsv[3]) {
        this.opacitySlider.setProperties({
          "value": hsv[3] * 100
        }, true);
        this.opacitySlider.refresh();
        this.updateOpacitySliderBg();
      }
      this.hsv = hsv;
      this.setHandlerPosition();
      this.updateInput(cValue);
      select2("." + PREVIEW + " ." + CURRENT, this.container).style.backgroundColor = this.convertToRgbString(this.rgb);
      this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), false, e);
    };
    ColorPicker2.prototype.paletteClickHandler = function(e) {
      e.preventDefault();
      var target = e.target;
      if (target.classList.contains(TILE)) {
        this.removeTileSelection();
        this.addTileSelection(target);
        if (target.classList.contains(NOCOLOR)) {
          this.noColorTile();
        } else {
          var cValue = target.getAttribute("aria-label");
          var pValue = this.rgbToHex(this.rgb);
          this.rgb = this.hexToRgb(this.roundValue(cValue));
          this.hsv = this.rgbToHsv.apply(this, this.rgb);
          if (this.getWrapper().classList.contains(SHOWVALUE)) {
            this.updateInput(cValue);
          }
          this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), false, e);
        }
        if (!this.inline && !this.showButtons) {
          this.closePopup(e);
        }
      } else {
        if (closest2(target, "." + MODESWITCH)) {
          this.switchToPicker();
        } else {
          if (target.classList.contains(APPLY) || target.classList.contains(CANCEL)) {
            this.ctrlBtnClick(target, e);
          } else {
            if (this.getWrapper().classList.contains(SHOWVALUE) && closest2(target, "." + FORMATSWITCH)) {
              this.formatSwitchHandler();
            }
          }
        }
      }
    };
    ColorPicker2.prototype.noColorTile = function(isKey) {
      if (isKey === void 0) {
        isKey = false;
      }
      var pValue = this.rgbToHex(this.rgb);
      this.rgb = [];
      this.hsv = [];
      this.triggerEvent("", pValue, "", isKey);
    };
    ColorPicker2.prototype.switchToPicker = function() {
      var wrapper = this.getWrapper();
      this.trigger("beforeModeSwitch", {
        element: this.container,
        mode: "Picker"
      });
      this.unWireEvents();
      [].slice.call(selectAll2("." + PALETTES, this.container)).forEach(function(ele) {
        detach2(ele);
      });
      if (this.container.querySelector(".e-clr-pal-rec-wpr")) {
        detach2(this.container.querySelector(".e-clr-pal-rec-wpr"));
      }
      if (wrapper.classList.contains(SHOWVALUE)) {
        detach2(select2("." + INPUTWRAPPER, this.container));
      }
      this.container.style.width = "";
      var grpEle = select2(".e-custom-palette", this.container);
      if (this.presetColors) {
        remove(grpEle);
      }
      this.createPicker();
      this.getDragHandler().focus();
      this.createInput();
      this.refreshPopupPos();
      if (this.element.parentElement && this.element.parentElement.parentElement && this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")) {
        this.refreshImageEditorPopupPos();
      }
      this.wireEvents();
      this.trigger("onModeSwitch", {
        element: this.container,
        mode: "Picker"
      });
    };
    ColorPicker2.prototype.ctrlBtnClick = function(ele, e) {
      if (ele.classList.contains(APPLY)) {
        var cValue = this.rgbToHex(this.rgb);
        this.triggerChangeEvent(cValue, e);
      }
      if (!this.inline) {
        this.closePopup(e);
        this.splitBtn.element.focus();
      } else if (ele.classList.contains(CANCEL)) {
        var beforeCloseArgs = {
          element: this.container,
          event: e,
          cancel: false
        };
        this.trigger("beforeClose", beforeCloseArgs);
      }
    };
    ColorPicker2.prototype.paletteKeyDown = function(e) {
      var target = e.target;
      if (!target.classList.contains(PALETTES)) {
        return;
      }
      var selectedEle;
      var idx;
      var tiles = [].slice.call(selectAll2("." + TILE, target));
      var prevSelectedEle = tiles.filter(function(tile) {
        return tile.classList.contains("e-selected");
      }).pop();
      switch (!e.altKey && e.keyCode) {
        case 39:
          e.preventDefault();
          selectedEle = prevSelectedEle ? tiles[this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? -1 : 1)] : tiles[this.enableRtl ? tiles.length - 1 : 0];
          this.keySelectionChanges(selectedEle);
          break;
        case 37:
          e.preventDefault();
          selectedEle = prevSelectedEle ? tiles[this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? 1 : -1)] : tiles[this.enableRtl ? 0 : tiles.length - 1];
          this.keySelectionChanges(selectedEle);
          break;
        case 38:
          e.preventDefault();
          idx = prevSelectedEle ? this.tilePosition(tiles, prevSelectedEle, -this.columns) : 0;
          selectedEle = tiles[idx] ? tiles[idx] : tiles[idx - this.columns];
          this.keySelectionChanges(selectedEle);
          break;
        case 40:
          e.preventDefault();
          idx = prevSelectedEle ? this.tilePosition(tiles, prevSelectedEle, this.columns) : tiles.length - 1;
          if (tiles[idx]) {
            selectedEle = tiles[idx];
          } else {
            idx %= tiles.length;
            idx += tiles[tiles.length - 1].parentElement.childElementCount;
            selectedEle = tiles[idx];
          }
          this.keySelectionChanges(selectedEle);
          break;
        case 13:
          e.preventDefault();
          if (prevSelectedEle) {
            var cValue = prevSelectedEle.getAttribute("aria-label");
            this.enterKeyHandler(cValue ? cValue : "");
          }
          break;
      }
    };
    ColorPicker2.prototype.keySelectionChanges = function(newEle) {
      this.removeTileSelection();
      this.addTileSelection(newEle);
      if (newEle.classList.contains(NOCOLOR)) {
        this.noColorTile(true);
      } else {
        var cValue = newEle.getAttribute("aria-label");
        var pValue = this.rgbToHex(this.rgb);
        this.rgb = this.hexToRgb(cValue);
        this.hsv = this.rgbToHsv.apply(this, this.rgb);
        if (this.getWrapper().classList.contains(SHOWVALUE)) {
          this.updateInput(cValue);
        }
        this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), true);
      }
    };
    ColorPicker2.prototype.tilePosition = function(items, element2, cIdx) {
      items = Array.prototype.slice.call(items);
      var n = items.length;
      var emptyCount = this.columns - items[n - 1].parentElement.childElementCount;
      var idx = items.indexOf(element2);
      idx += cIdx;
      if (idx < 0) {
        idx += n + emptyCount;
      } else {
        idx %= n + emptyCount;
      }
      return idx;
    };
    ColorPicker2.prototype.inputHandler = function(e) {
      var target = e.target;
      if (!target.value.length) {
        return;
      }
      var hsv;
      var pValue;
      var label = select2(".e-float-text", target.parentElement).textContent;
      switch (label) {
        case "HEX": {
          var value = "";
          if (target.value[0] === "#" && target.value.length !== 5 || target.value[0] !== "#" && target.value.length !== 4) {
            value = this.roundValue(target.value);
          }
          if (value.length === 9) {
            pValue = this.rgbToHex(this.rgb);
            this.rgb = this.hexToRgb(value + value.substr(-2));
            this.inputValueChange(this.rgbToHsv.apply(this, this.rgb), pValue, target.value, e);
          } else {
            return;
          }
          break;
        }
        case "R":
          if (this.rgb[0] !== Number(target.value)) {
            pValue = this.rgbToHex(this.rgb);
            this.rgb[0] = Number(target.value);
            hsv = this.rgbToHsv.apply(this, this.rgb);
            this.inputValueChange(hsv, pValue, null, e);
          }
          break;
        case "G":
          if (this.rgb[1] !== Number(target.value)) {
            pValue = this.rgbToHex(this.rgb);
            this.rgb[1] = Number(target.value);
            hsv = this.rgbToHsv.apply(this, this.rgb);
            this.inputValueChange(hsv, pValue, null, e);
          }
          break;
        case "B":
          if (this.rgb[2] !== Number(target.value)) {
            pValue = this.rgbToHex(this.rgb);
            this.rgb[2] = Number(target.value);
            hsv = this.rgbToHsv.apply(this, this.rgb);
            this.inputValueChange(hsv, pValue, null, e);
          }
          break;
        case "H":
          this.hueSlider.value = Number(target.value);
          break;
        case "S":
          if (this.hsv[1] !== Number(target.value)) {
            this.hsv[1] = Number(target.value);
            this.updateHsv();
            this.convertToOtherFormat(false, e);
          }
          break;
        case "V":
          if (this.hsv[2] !== Number(target.value)) {
            this.hsv[2] = Number(target.value);
            this.updateHsv();
            this.convertToOtherFormat(false, e);
          }
          break;
        case "A":
          this.opacitySlider.value = Number(target.value);
          break;
      }
    };
    ColorPicker2.prototype.inputValueChange = function(hsv, pValue, value, e) {
      if (hsv[0] !== this.hsv[0]) {
        this.hueSlider.setProperties({
          "value": hsv[0]
        }, true);
        this.hueSlider.refresh();
        this.setHsvContainerBg(hsv[0]);
      }
      this.hsv = hsv;
      var cValue = this.rgbToHex(this.rgb);
      this.setHandlerPosition();
      this.updateInput(value ? value : cValue);
      var rgba = this.convertToRgbString(this.rgb);
      this.updatePreview(rgba);
      this.triggerEvent(cValue, pValue, rgba, false, e);
    };
    ColorPicker2.prototype.triggerEvent = function(cValue, pValue, rgba, isKey, e) {
      if (isKey === void 0) {
        isKey = false;
      }
      var hex = cValue.slice(0, 7);
      if (isNullOrUndefined2(e)) {
        e = new MouseEvent("click", {
          bubbles: true,
          cancelable: false
        });
      }
      if (!this.showButtons && !isKey) {
        this.trigger("change", {
          currentValue: {
            hex,
            rgba
          },
          event: e,
          previousValue: {
            hex: this.value.slice(0, 7),
            rgba: this.convertToRgbString(this.hexToRgb(this.value))
          },
          value: cValue
        });
        if (this.showRecentColors) {
          this.recentColors.unshift(hex);
          if (this.inline) {
            this.renderRecentColor();
          }
        }
        if (this.enableOpacity) {
          this.setProperties({
            "value": cValue
          }, true);
        } else {
          this.setProperties({
            "value": hex
          }, true);
        }
        this.element.value = hex ? hex : "#000000";
      } else {
        this.trigger("select", {
          currentValue: {
            hex,
            rgba
          },
          event: e,
          previousValue: {
            hex: pValue.slice(0, 7),
            rgba: this.convertToRgbString(this.hexToRgb(pValue))
          }
        });
      }
    };
    ColorPicker2.prototype.destroy = function() {
      var _this = this;
      var wrapper = this.getWrapper();
      _super.prototype.destroy.call(this);
      ["tabindex", "spellcheck"].forEach(function(attr) {
        _this.element.removeAttribute(attr);
      });
      if (this.inline) {
        this.unWireEvents();
        this.destroyOtherComp();
      } else {
        if (this.isPopupOpen()) {
          this.unWireEvents();
          this.destroyOtherComp();
        }
        this.splitBtn.destroy();
        this.splitBtn = null;
      }
      this.tileRipple();
      this.tileRipple = null;
      this.ctrlBtnRipple();
      this.ctrlBtnRipple = null;
      if (this.element.nextElementSibling) {
        detach2(this.element.nextElementSibling);
      }
      if (wrapper) {
        wrapper.parentElement.insertBefore(this.element, wrapper);
        detach2(wrapper);
      }
      this.container = null;
      if (this.formElement) {
        EventHandler2.remove(this.formElement, "reset", this.formResetHandler);
      }
    };
    ColorPicker2.prototype.destroyOtherComp = function() {
      if (this.isPicker()) {
        var popup = closest2(this.hueSlider.element, ".e-color-picker");
        var numericElemColl = popup.querySelectorAll(".e-numerictextbox");
        for (var i = 0; i < numericElemColl.length; i++) {
          getInstance(numericElemColl[i], NumericTextBox).destroy();
        }
        this.hueSlider.destroy();
        if (this.enableOpacity) {
          this.opacitySlider.destroy();
          this.opacitySlider = null;
        }
        this.hueSlider = null;
        var tooltipInst = this.getTooltipInst();
        tooltipInst.close();
        tooltipInst.destroy();
        this.tooltipEle = null;
      }
    };
    ColorPicker2.prototype.isPopupOpen = function() {
      return this.getPopupEle().classList.contains("e-popup-open");
    };
    ColorPicker2.prototype.unWireEvents = function() {
      if (this.isPicker()) {
        var dragHandler = this.getDragHandler();
        EventHandler2.remove(dragHandler, "keydown", this.pickerKeyDown);
        var ctrlBtn = select2("." + CTRLBTN, this.container);
        if (ctrlBtn) {
          EventHandler2.remove(ctrlBtn, "keydown", this.ctrlBtnKeyDown);
        }
        EventHandler2.remove(this.getHsvContainer(), "mousedown touchstart", this.handlerDown);
        if (this.modeSwitcher || this.showButtons) {
          EventHandler2.remove(select2("." + CTRLSWITCH, this.container), "click", this.btnClickHandler);
        }
        EventHandler2.remove(select2("." + PREVIOUS, this.container), "click", this.previewHandler);
      } else {
        EventHandler2.remove(this.container, "click", this.paletteClickHandler);
        EventHandler2.remove(this.container, "keydown", this.paletteKeyDown);
      }
    };
    ColorPicker2.prototype.roundValue = function(value) {
      if (!value) {
        return "";
      }
      if (value[0] !== "#") {
        value = "#" + value;
      }
      var len = value.length;
      if (len === 4) {
        value += "f";
        len = 5;
      }
      if (len === 5) {
        var tempValue = "";
        for (var i = 1, len_1 = value.length; i < len_1; i++) {
          tempValue += value.charAt(i) + value.charAt(i);
        }
        value = "#" + tempValue;
        len = 9;
      }
      if (len === 7) {
        value += "ff";
      }
      return value;
    };
    ColorPicker2.prototype.hexToRgb = function(hex) {
      if (!hex) {
        return [];
      }
      hex = hex.trim();
      if (hex.length !== 9) {
        hex = this.roundValue(hex);
      }
      var opacity = Number((parseInt(hex.slice(-2), 16) / 255).toFixed(2));
      hex = hex.slice(1, 7);
      var bigInt = parseInt(hex, 16);
      var h = [];
      h.push(bigInt >> 16 & 255);
      h.push(bigInt >> 8 & 255);
      h.push(bigInt & 255);
      h.push(opacity);
      return h;
    };
    ColorPicker2.prototype.rgbToHsv = function(r, g, b, opacity) {
      if (this.rgb && !this.rgb.length) {
        return [];
      }
      r /= 255;
      g /= 255;
      b /= 255;
      var max = Math.max(r, g, b);
      var min = Math.min(r, g, b);
      var h;
      var v = max;
      var d = max - min;
      var s = max === 0 ? 0 : d / max;
      if (max === min) {
        h = 0;
      } else {
        switch (max) {
          case r:
            h = (g - b) / d + (g < b ? 6 : 0);
            break;
          case g:
            h = (b - r) / d + 2;
            break;
          case b:
            h = (r - g) / d + 4;
            break;
        }
        h /= 6;
      }
      var hsv = [Math.round(h * 360), Math.round(s * 1e3) / 10, Math.round(v * 1e3) / 10];
      if (!isNullOrUndefined2(opacity)) {
        hsv.push(opacity);
      }
      return hsv;
    };
    ColorPicker2.prototype.hsvToRgb = function(h, s, v, opacity) {
      var r;
      var g;
      var b;
      s /= 100;
      v /= 100;
      if (s === 0) {
        r = g = b = v;
        return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), opacity];
      }
      h /= 60;
      var i = Math.floor(h);
      var f = h - i;
      var p = v * (1 - s);
      var q = v * (1 - s * f);
      var t = v * (1 - s * (1 - f));
      switch (i) {
        case 0:
          r = v;
          g = t;
          b = p;
          break;
        case 1:
          r = q;
          g = v;
          b = p;
          break;
        case 2:
          r = p;
          g = v;
          b = t;
          break;
        case 3:
          r = p;
          g = q;
          b = v;
          break;
        case 4:
          r = t;
          g = p;
          b = v;
          break;
        default:
          r = v;
          g = p;
          b = q;
      }
      var rgb = [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
      if (!isNullOrUndefined2(opacity)) {
        rgb.push(opacity);
      }
      return rgb;
    };
    ColorPicker2.prototype.rgbToHex = function(rgb) {
      return rgb.length ? "#" + this.hex(rgb[0]) + this.hex(rgb[1]) + this.hex(rgb[2]) + (!isNullOrUndefined2(rgb[3]) ? rgb[3] !== 0 ? (Math.round(rgb[3] * 255) + 65536).toString(16).substr(-2) : "00" : "") : "";
    };
    ColorPicker2.prototype.hex = function(x) {
      return ("0" + x.toString(16)).slice(-2);
    };
    ColorPicker2.prototype.changeModeSwitcherProp = function(prop) {
      var ctrlSwitchWrapper = select2("." + CTRLSWITCH, this.container);
      if (prop) {
        if (ctrlSwitchWrapper) {
          this.appendModeSwitchBtn();
        } else {
          this.createCtrlBtn();
          if (this.isPicker() && !this.disabled) {
            this.addCtrlSwitchEvent();
          }
        }
      } else {
        if (ctrlSwitchWrapper) {
          if (this.showButtons) {
            detach2(select2("." + MODESWITCH, ctrlSwitchWrapper));
          } else {
            remove(ctrlSwitchWrapper);
          }
        }
      }
    };
    ColorPicker2.prototype.changeShowBtnProps = function(prop) {
      var ctrlBtnWrapper = select2("." + CTRLSWITCH, this.container);
      if (prop) {
        if (ctrlBtnWrapper) {
          remove(ctrlBtnWrapper);
        }
        this.createCtrlBtn();
        if (this.isPicker() && !this.disabled) {
          this.addCtrlSwitchEvent();
        }
      } else {
        if (this.modeSwitcher) {
          detach2(select2("." + CTRLBTN, ctrlBtnWrapper));
        } else {
          remove(ctrlBtnWrapper);
        }
      }
    };
    ColorPicker2.prototype.changeValueProp = function(newProp) {
      if (this.isPicker()) {
        this.rgb = this.hexToRgb(newProp);
        this.hsv = this.rgbToHsv.apply(this, this.rgb);
        this.setHandlerPosition();
        detach2(closest2(this.hueSlider.element, ".e-slider-preview"));
        this.createSlider();
        this.setHsvContainerBg();
        this.updateInput(newProp);
        if (this.rgb.length === 4) {
          this.updateOpacityInput(this.rgb[3] * 100);
        }
      } else {
        this.removeTileSelection();
        var ele = this.container.querySelector('span[aria-label="' + this.roundValue(newProp) + '"]');
        if (ele) {
          this.addTileSelection(ele);
        }
      }
    };
    ColorPicker2.prototype.setInputEleProps = function() {
      remove(select2("." + INPUTWRAPPER, this.container));
      this.createInput();
    };
    ColorPicker2.prototype.changeDisabledProp = function(newProp) {
      if (this.isPicker()) {
        this.hueSlider.enabled = !newProp;
        this.opacitySlider.enabled = !newProp;
        this.setInputEleProps();
      }
      if (newProp) {
        this.toggleDisabled(true);
        this.unWireEvents();
      } else {
        this.toggleDisabled(false);
        this.wireEvents();
      }
    };
    ColorPicker2.prototype.changeCssClassProps = function(newProp, oldProp) {
      var wrapper = this.getWrapper();
      var popupWrapper = this.getPopupEle();
      if (oldProp) {
        removeClass2([wrapper, popupWrapper], oldProp.split(" "));
      }
      if (newProp) {
        addClass2([wrapper, popupWrapper], newProp.replace(/\s+/g, " ").trim().split(" "));
      }
    };
    ColorPicker2.prototype.changeRtlProps = function(newProp) {
      if (newProp) {
        addClass2([this.getWrapper()], "e-rtl");
      } else {
        removeClass2([this.getWrapper()], "e-rtl");
      }
    };
    ColorPicker2.prototype.changePaletteProps = function() {
      detach2(this.container.children[0]);
      this.container.style.width = "";
      this.createPalette();
    };
    ColorPicker2.prototype.changeOpacityProps = function(newProp) {
      var wrapper = this.getWrapper();
      if (newProp) {
        removeClass2([this.container.parentElement], HIDEOPACITY);
        this.createOpacitySlider(select2(".e-colorpicker-slider", this.container).appendChild(this.createElement("div", {
          className: "e-opacity-slider"
        })));
        if (!wrapper.classList.contains(HIDEVALUE) && !wrapper.classList.contains(HIDERGBA)) {
          this.appendOpacityValue(select2(".e-input-container", this.container));
        }
      } else {
        addClass2([this.container.parentElement], HIDEOPACITY);
        this.opacitySlider.destroy();
        remove(this.opacitySlider.element);
        this.opacitySlider = null;
        if (!wrapper.classList.contains(HIDEVALUE) && !wrapper.classList.contains(HIDERGBA)) {
          remove(select2("." + OPACITY, this.container).parentElement);
        }
      }
    };
    ColorPicker2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var _this = this;
      if (!isNullOrUndefined2(newProp.value)) {
        var value = this.roundValue(newProp.value);
        if (value.length === 9) {
          this.element.value = this.roundValue(value).slice(0, 7);
          var preview = this.splitBtn && select2("." + SPLITPREVIEW, this.splitBtn.element);
          if (preview) {
            preview.style.backgroundColor = this.convertToRgbString(this.hexToRgb(newProp.value));
          }
        } else if (this.noColor && this.mode === "Palette" && this.value === "") {
          var preview = this.splitBtn && select2("." + SPLITPREVIEW, this.splitBtn.element);
          preview.style.backgroundColor = "";
        } else {
          this.value = oldProp.value;
        }
      }
      if (!this.inline && isNullOrUndefined2(newProp.inline)) {
        var otherCompModel = ["disabled", "enableRtl"];
        this.splitBtn.setProperties(getModel(newProp, otherCompModel));
        if (!this.isPopupOpen()) {
          this.changeCssClassProps(newProp.cssClass, oldProp.cssClass);
          this.changeRtlProps(newProp.enableRtl);
          return;
        }
      }
      var _loop_1 = function(prop2) {
        switch (prop2) {
          case "inline":
            if (newProp.inline) {
              this_1.getWrapper().appendChild(this_1.container);
              this_1.splitBtn.destroy();
              detach2(this_1.element.nextElementSibling);
              if (!this_1.container.children.length) {
                this_1.createWidget();
              }
            } else {
              this_1.destroyOtherComp();
              this_1.unWireEvents();
              this_1.container.innerHTML = "";
              this_1.createSplitBtn();
            }
            break;
          case "cssClass": {
            this_1.changeCssClassProps(newProp.cssClass, oldProp.cssClass);
            var props = newProp.cssClass.split(" ").concat(oldProp.cssClass.split(" "));
            props = props.reduce(function(a, b) {
              if (a.indexOf(b) < 0) {
                a.push(b);
              }
              return a;
            }, []);
            var count_1 = 0;
            props.forEach(function(cls) {
              if (count_1 === 0 && (cls === HIDEVALUE || cls === HIDEVALUESWITCH || cls === SHOWVALUE || cls === HIDEHEX || cls === HIDERGBA)) {
                var inputWrap = select2("." + INPUTWRAPPER, _this.container);
                if (inputWrap) {
                  remove(select2("." + INPUTWRAPPER, _this.container));
                }
                _this.createInput();
                count_1++;
              }
            });
            break;
          }
          case "enableRtl":
            if (this_1.isPicker()) {
              this_1.hueSlider.enableRtl = newProp.enableRtl;
              if (this_1.enableOpacity) {
                this_1.opacitySlider.enableRtl = newProp.enableRtl;
              }
              this_1.setInputEleProps();
            }
            this_1.changeRtlProps(newProp.enableRtl);
            break;
          case "disabled":
            this_1.changeDisabledProp(newProp.disabled);
            break;
          case "value":
            if (this_1.value !== oldProp.value) {
              this_1.changeValueProp(newProp.value);
            }
            break;
          case "showButtons":
            this_1.changeShowBtnProps(newProp.showButtons);
            break;
          case "mode":
            if (newProp.mode === "Picker") {
              this_1.switchToPicker();
            } else {
              this_1.switchToPalette();
            }
            break;
          case "modeSwitcher":
            this_1.changeModeSwitcherProp(newProp.modeSwitcher);
            break;
          case "columns":
          case "presetColors":
            if (!this_1.isPicker()) {
              this_1.changePaletteProps();
            }
            break;
          case "noColor":
            if (newProp.noColor) {
              if (this_1.mode === "Palette" && !this_1.modeSwitcher) {
                this_1.setNoColor();
              }
            } else {
              this_1.changePaletteProps();
            }
            break;
          case "enableOpacity":
            this_1.changeOpacityProps(newProp.enableOpacity);
            break;
          case "showRecentColors":
            if (!newProp.showRecentColors) {
              var recentClrWpr = this_1.container.querySelector(".e-clr-pal-rec-wpr");
              if (recentClrWpr) {
                detach2(recentClrWpr);
              }
            }
            this_1.recentColors = [];
            break;
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        _loop_1(prop);
      }
    };
    ColorPicker2.prototype.focusIn = function() {
      this.element.parentElement.focus();
    };
    __decorate60([Property2("#008000ff")], ColorPicker2.prototype, "value", void 0);
    __decorate60([Property2("")], ColorPicker2.prototype, "cssClass", void 0);
    __decorate60([Property2(false)], ColorPicker2.prototype, "disabled", void 0);
    __decorate60([Property2("Picker")], ColorPicker2.prototype, "mode", void 0);
    __decorate60([Property2(true)], ColorPicker2.prototype, "modeSwitcher", void 0);
    __decorate60([Property2(null)], ColorPicker2.prototype, "presetColors", void 0);
    __decorate60([Property2(true)], ColorPicker2.prototype, "showButtons", void 0);
    __decorate60([Property2(10)], ColorPicker2.prototype, "columns", void 0);
    __decorate60([Property2(false)], ColorPicker2.prototype, "inline", void 0);
    __decorate60([Property2(false)], ColorPicker2.prototype, "noColor", void 0);
    __decorate60([Property2(false)], ColorPicker2.prototype, "enablePersistence", void 0);
    __decorate60([Property2(true)], ColorPicker2.prototype, "enableOpacity", void 0);
    __decorate60([Property2(false)], ColorPicker2.prototype, "createPopupOnClick", void 0);
    __decorate60([Property2(false)], ColorPicker2.prototype, "showRecentColors", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "select", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "change", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "beforeTileRender", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "beforeOpen", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "open", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "beforeClose", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "beforeModeSwitch", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "onModeSwitch", void 0);
    __decorate60([Event3()], ColorPicker2.prototype, "created", void 0);
    ColorPicker2 = __decorate60([NotifyPropertyChanges2], ColorPicker2);
    return ColorPicker2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/textbox/textbox.js
var __extends62 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate61 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var HIDE_CLEAR = "e-clear-icon-hide";
var TextBox = (
  /** @class */
  function(_super) {
    __extends62(TextBox2, _super);
    function TextBox2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.previousValue = null;
      _this.isHiddenInput = false;
      _this.isForm = false;
      _this.inputPreviousValue = null;
      _this.textboxOptions = options;
      return _this;
    }
    TextBox2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "floatLabelType":
            Input.removeFloating(this.textboxWrapper);
            Input.addFloating(this.respectiveElement, this.floatLabelType, this.placeholder);
            break;
          case "enabled":
            Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
            this.bindClearEvent();
            break;
          case "width":
            Input.setWidth(newProp.width, this.textboxWrapper.container);
            break;
          case "value":
            {
              var prevOnChange = this.isProtectedOnChange;
              this.isProtectedOnChange = true;
              if (!Input.isBlank(this.value)) {
                this.value = this.value.toString();
              }
              this.isProtectedOnChange = prevOnChange;
              Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);
              if (this.isHiddenInput) {
                this.element.value = this.respectiveElement.value;
              }
              this.inputPreviousValue = this.respectiveElement.value;
              if ((this.isAngular || this.isVue) && this.preventChange === true) {
                this.previousValue = this.isAngular ? this.value : this.previousValue;
                this.preventChange = false;
              } else if (isNullOrUndefined2(this.isAngular) || !this.isAngular || this.isAngular && !this.preventChange || this.isAngular && isNullOrUndefined2(this.preventChange)) {
                this.raiseChangeEvent();
              }
            }
            break;
          case "htmlAttributes":
            {
              this.updateHTMLAttributesToElement();
              this.updateHTMLAttributesToWrapper();
              this.checkAttributes(true);
              if (this.multiline && !isNullOrUndefined2(this.textarea)) {
                Input.validateInputType(this.textboxWrapper.container, this.textarea);
              } else {
                Input.validateInputType(this.textboxWrapper.container, this.element);
              }
            }
            break;
          case "readonly":
            Input.setReadonly(this.readonly, this.respectiveElement);
            break;
          case "type":
            if (this.respectiveElement.tagName !== "TEXTAREA") {
              this.respectiveElement.setAttribute("type", this.type);
              Input.validateInputType(this.textboxWrapper.container, this.element);
              this.raiseChangeEvent();
            }
            break;
          case "showClearButton":
            Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
            this.bindClearEvent();
            break;
          case "enableRtl":
            Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
            break;
          case "placeholder":
            Input.setPlaceholder(this.placeholder, this.respectiveElement);
            Input.calculateWidth(this.respectiveElement, this.textboxWrapper.container);
            break;
          case "autocomplete":
            if (this.autocomplete !== "on" && this.autocomplete !== "") {
              this.respectiveElement.autocomplete = this.autocomplete;
            } else {
              this.removeAttributes(["autocomplete"]);
            }
            break;
          case "cssClass":
            Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textboxWrapper.container);
            break;
          case "locale":
            this.globalize = new Internationalization2(this.locale);
            this.l10n.setLocale(this.locale);
            this.setProperties({
              placeholder: this.l10n.getConstant("placeholder")
            }, true);
            Input.setPlaceholder(this.placeholder, this.respectiveElement);
            break;
        }
      }
    };
    TextBox2.prototype.getModuleName = function() {
      return "textbox";
    };
    TextBox2.prototype.preRender = function() {
      this.cloneElement = this.element.cloneNode(true);
      this.formElement = closest2(this.element, "form");
      if (!isNullOrUndefined2(this.formElement)) {
        this.isForm = true;
      }
      if (this.element.tagName === "EJS-TEXTBOX") {
        var ejInstance = getValue2("ej2_instances", this.element);
        var inputElement = this.multiline ? this.createElement("textarea") : this.createElement("input");
        var index = 0;
        for (index; index < this.element.attributes.length; index++) {
          var attributeName = this.element.attributes[index].nodeName;
          if (attributeName !== "id" && attributeName !== "class") {
            inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);
            inputElement.innerHTML = this.element.innerHTML;
            if (attributeName === "name") {
              this.element.removeAttribute("name");
            }
          } else if (attributeName === "class") {
            inputElement.setAttribute(attributeName, this.element.className.split(" ").filter(function(item) {
              return item.indexOf("ng-") !== 0;
            }).join(" "));
          }
        }
        this.element.appendChild(inputElement);
        this.element = inputElement;
        setValue3("ej2_instances", ejInstance, this.element);
      }
      this.updateHTMLAttributesToElement();
      this.checkAttributes(false);
      if ((isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["value"] === void 0) && this.element.value !== "") {
        this.setProperties({
          value: this.element.value
        }, true);
      }
      if (this.element.tagName !== "TEXTAREA") {
        this.element.setAttribute("type", this.type);
      }
      if (this.type === "text" || this.element.tagName === "INPUT" && this.multiline && this.isReact) {
        this.element.setAttribute("role", "textbox");
      }
      this.globalize = new Internationalization2(this.locale);
      var localeText = {
        placeholder: this.placeholder
      };
      this.l10n = new L10n2("textbox", localeText, this.locale);
      if (this.l10n.getConstant("placeholder") !== "") {
        this.setProperties({
          placeholder: this.placeholder || this.l10n.getConstant("placeholder")
        }, true);
      }
      if (!this.element.hasAttribute("id")) {
        this.element.setAttribute("id", getUniqueID("textbox"));
      }
      if (!this.element.hasAttribute("name")) {
        this.element.setAttribute("name", this.element.getAttribute("id"));
      }
      if (this.element.tagName === "INPUT" && this.multiline) {
        this.isHiddenInput = true;
        this.textarea = this.createElement("textarea");
        this.element.parentNode.insertBefore(this.textarea, this.element);
        this.element.setAttribute("type", "hidden");
        this.textarea.setAttribute("name", this.element.getAttribute("name"));
        this.element.removeAttribute("name");
        this.textarea.setAttribute("role", this.element.getAttribute("role"));
        this.element.removeAttribute("role");
        this.textarea.setAttribute("id", getUniqueID("textarea"));
        var apiAttributes = ["placeholder", "disabled", "value", "readonly", "type", "autocomplete"];
        for (var index = 0; index < this.element.attributes.length; index++) {
          var attributeName = this.element.attributes[index].nodeName;
          if (this.element.hasAttribute(attributeName) && containerAttributes.indexOf(attributeName) < 0 && !(attributeName === "id" || attributeName === "type" || attributeName === "e-mappinguid")) {
            this.textarea.setAttribute(attributeName, this.element.attributes[index].nodeValue);
            if (apiAttributes.indexOf(attributeName) < 0) {
              this.element.removeAttribute(attributeName);
              index--;
            }
          }
        }
      }
    };
    TextBox2.prototype.checkAttributes = function(isDynamic) {
      var attrs = isDynamic ? isNullOrUndefined2(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ["placeholder", "disabled", "value", "readonly", "type", "autocomplete"];
      for (var _i = 0, attrs_1 = attrs; _i < attrs_1.length; _i++) {
        var key = attrs_1[_i];
        if (!isNullOrUndefined2(this.element.getAttribute(key))) {
          switch (key) {
            case "disabled":
              if (isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["enabled"] === void 0 || isDynamic) {
                var enabled = this.element.getAttribute(key) === "disabled" || this.element.getAttribute(key) === "" || this.element.getAttribute(key) === "true" ? false : true;
                this.setProperties({
                  enabled
                }, !isDynamic);
              }
              break;
            case "readonly":
              if (isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["readonly"] === void 0 || isDynamic) {
                var readonly = this.element.getAttribute(key) === "readonly" || this.element.getAttribute(key) === "" || this.element.getAttribute(key) === "true" ? true : false;
                this.setProperties({
                  readonly
                }, !isDynamic);
              }
              break;
            case "placeholder":
              if (isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["placeholder"] === void 0 || isDynamic) {
                this.setProperties({
                  placeholder: this.element.placeholder
                }, !isDynamic);
              }
              break;
            case "autocomplete":
              if (isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["autocomplete"] === void 0 || isDynamic) {
                var autoCompleteTxt = this.element.autocomplete === "off" ? "off" : "on";
                this.setProperties({
                  autocomplete: autoCompleteTxt
                }, !isDynamic);
              }
              break;
            case "value":
              if ((isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["value"] === void 0 || isDynamic) && this.element.value !== "") {
                this.setProperties({
                  value: this.element.value
                }, !isDynamic);
              }
              break;
            case "type":
              if (isNullOrUndefined2(this.textboxOptions) || this.textboxOptions["type"] === void 0 || isDynamic) {
                this.setProperties({
                  type: this.element.type
                }, !isDynamic);
              }
              break;
          }
        }
      }
    };
    TextBox2.prototype.render = function() {
      var updatedCssClassValue = this.cssClass;
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        updatedCssClassValue = Input.getInputValidClassList(this.cssClass);
      }
      this.respectiveElement = this.isHiddenInput ? this.textarea : this.element;
      this.textboxWrapper = Input.createInput({
        element: this.respectiveElement,
        floatLabelType: this.floatLabelType,
        properties: {
          enabled: this.enabled,
          enableRtl: this.enableRtl,
          cssClass: updatedCssClassValue,
          readonly: this.readonly,
          placeholder: this.placeholder,
          showClearButton: this.showClearButton
        }
      });
      this.updateHTMLAttributesToWrapper();
      if (this.isHiddenInput) {
        this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
      }
      this.wireEvents();
      if (!isNullOrUndefined2(this.value)) {
        Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);
        if (this.isHiddenInput) {
          this.element.value = this.respectiveElement.value;
        }
      }
      if (!isNullOrUndefined2(this.value)) {
        this.initialValue = this.value;
        this.setInitialValue();
      }
      if (this.autocomplete !== "on" && this.autocomplete !== "") {
        this.respectiveElement.autocomplete = this.autocomplete;
      } else if (!isNullOrUndefined2(this.textboxOptions) && this.textboxOptions["autocomplete"] !== void 0) {
        this.removeAttributes(["autocomplete"]);
      }
      this.previousValue = this.value;
      this.inputPreviousValue = this.value;
      this.respectiveElement.defaultValue = this.respectiveElement.value;
      Input.setWidth(this.width, this.textboxWrapper.container);
      if (!isNullOrUndefined2(closest2(this.element, "fieldset")) && closest2(this.element, "fieldset").disabled) {
        this.enabled = false;
      }
      if (!this.element.hasAttribute("aria-labelledby") && !this.element.hasAttribute("placeholder") && !this.element.hasAttribute("aria-label")) {
        this.element.setAttribute("aria-label", "textbox");
      }
      this.renderComplete();
    };
    TextBox2.prototype.updateHTMLAttributesToWrapper = function() {
      Input.updateHTMLAttributesToWrapper(this.htmlAttributes, this.textboxWrapper.container);
    };
    TextBox2.prototype.updateHTMLAttributesToElement = function() {
      Input.updateHTMLAttributesToElement(this.htmlAttributes, this.respectiveElement ? this.respectiveElement : this.multiline && !isNullOrUndefined2(this.textarea) ? this.textarea : this.element);
    };
    TextBox2.prototype.setInitialValue = function() {
      if (!this.isAngular) {
        this.respectiveElement.setAttribute("value", this.initialValue);
      }
    };
    TextBox2.prototype.wireEvents = function() {
      EventHandler2.add(this.respectiveElement, "focus", this.focusHandler, this);
      EventHandler2.add(this.respectiveElement, "blur", this.focusOutHandler, this);
      EventHandler2.add(this.respectiveElement, "keydown", this.keydownHandler, this);
      EventHandler2.add(this.respectiveElement, "input", this.inputHandler, this);
      EventHandler2.add(this.respectiveElement, "change", this.changeHandler, this);
      if (this.isForm) {
        EventHandler2.add(this.formElement, "reset", this.resetForm, this);
      }
      this.bindClearEvent();
      if (!isNullOrUndefined2(this.textboxWrapper.container.querySelector(".e-float-text")) && this.floatLabelType === "Auto" && this.textboxWrapper.container.classList.contains("e-autofill") && this.textboxWrapper.container.classList.contains("e-outline")) {
        EventHandler2.add(this.textboxWrapper.container.querySelector(".e-float-text"), "animationstart", this.animationHandler, this);
      }
    };
    TextBox2.prototype.animationHandler = function() {
      this.textboxWrapper.container.classList.add("e-valid-input");
      var label = this.textboxWrapper.container.querySelector(".e-float-text");
      if (!isNullOrUndefined2(label)) {
        label.classList.add("e-label-top");
        if (label.classList.contains("e-label-bottom")) {
          label.classList.remove("e-label-bottom");
        }
      }
    };
    TextBox2.prototype.resetValue = function(value) {
      var prevOnChange = this.isProtectedOnChange;
      this.isProtectedOnChange = true;
      this.value = value;
      if (value == null && this.textboxWrapper.container.classList.contains("e-valid-input") && !(this.floatLabelType === "Always" && this.textboxWrapper.container.classList.contains("e-outline"))) {
        this.textboxWrapper.container.classList.remove("e-valid-input");
      }
      this.isProtectedOnChange = prevOnChange;
    };
    TextBox2.prototype.resetForm = function() {
      if (this.isAngular) {
        this.resetValue("");
      } else {
        this.resetValue(this.initialValue);
      }
      if (!isNullOrUndefined2(this.textboxWrapper)) {
        var label = this.textboxWrapper.container.querySelector(".e-float-text");
        if (!isNullOrUndefined2(label) && this.floatLabelType !== "Always") {
          if (isNullOrUndefined2(this.initialValue) || this.initialValue === "") {
            label.classList.add("e-label-bottom");
            label.classList.remove("e-label-top");
          } else if (this.initialValue !== "") {
            label.classList.add("e-label-top");
            label.classList.remove("e-label-bottom");
          }
        }
      }
    };
    TextBox2.prototype.focusHandler = function(args) {
      var eventArgs = {
        container: this.textboxWrapper.container,
        event: args,
        value: this.value
      };
      this.trigger("focus", eventArgs);
    };
    TextBox2.prototype.focusOutHandler = function(args) {
      if (!(this.previousValue === null && this.value === null && this.respectiveElement.value === "") && this.previousValue !== this.value) {
        this.raiseChangeEvent(args, true);
      }
      var eventArgs = {
        container: this.textboxWrapper.container,
        event: args,
        value: this.value
      };
      this.trigger("blur", eventArgs);
    };
    TextBox2.prototype.keydownHandler = function(args) {
      if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === "") && (this.value === null || this.value === "") && this.respectiveElement.value === "")) {
        this.setProperties({
          value: this.respectiveElement.value
        }, true);
      }
    };
    TextBox2.prototype.inputHandler = function(args) {
      var textboxObj = this;
      var eventArgs = {
        event: args,
        value: this.respectiveElement.value,
        previousValue: this.inputPreviousValue,
        container: this.textboxWrapper.container
      };
      this.inputPreviousValue = this.respectiveElement.value;
      if (this.isAngular) {
        textboxObj.localChange({
          value: this.respectiveElement.value
        });
        this.preventChange = true;
      }
      if (this.isVue) {
        this.preventChange = true;
      }
      this.trigger("input", eventArgs);
      args.stopPropagation();
    };
    TextBox2.prototype.changeHandler = function(args) {
      this.setProperties({
        value: this.respectiveElement.value
      }, true);
      if (this.previousValue !== this.value) {
        this.raiseChangeEvent(args, true);
      }
      args.stopPropagation();
    };
    TextBox2.prototype.raiseChangeEvent = function(event2, interaction) {
      var eventArgs = {
        event: event2,
        value: this.value,
        previousValue: this.previousValue,
        container: this.textboxWrapper.container,
        isInteraction: interaction ? interaction : false,
        isInteracted: interaction ? interaction : false
      };
      this.preventChange = false;
      this.trigger("change", eventArgs);
      this.previousValue = this.value;
      if (this.element.tagName === "INPUT" && this.multiline && Browser2.info.name === "mozilla") {
        this.element.value = this.respectiveElement.value;
      }
    };
    TextBox2.prototype.bindClearEvent = function() {
      if (this.showClearButton) {
        if (this.enabled) {
          EventHandler2.add(this.textboxWrapper.clearButton, "mousedown touchstart", this.resetInputHandler, this);
        } else {
          EventHandler2.remove(this.textboxWrapper.clearButton, "mousedown touchstart", this.resetInputHandler);
        }
      }
    };
    TextBox2.prototype.resetInputHandler = function(event2) {
      event2.preventDefault();
      if (!this.textboxWrapper.clearButton.classList.contains(HIDE_CLEAR) || this.textboxWrapper.container.classList.contains("e-static-clear")) {
        Input.setValue("", this.respectiveElement, this.floatLabelType, this.showClearButton);
        if (this.isHiddenInput) {
          this.element.value = this.respectiveElement.value;
        }
        this.setProperties({
          value: this.respectiveElement.value
        }, true);
        var eventArgs = {
          event: event2,
          value: this.respectiveElement.value,
          previousValue: this.inputPreviousValue,
          container: this.textboxWrapper.container
        };
        this.trigger("input", eventArgs);
        this.inputPreviousValue = this.respectiveElement.value;
        this.raiseChangeEvent(event2, true);
        if (closest2(this.element, "form")) {
          var element2 = this.element;
          var keyupEvent = document.createEvent("KeyboardEvent");
          keyupEvent.initEvent("keyup", false, true);
          element2.dispatchEvent(keyupEvent);
        }
      }
    };
    TextBox2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.respectiveElement, "focus", this.focusHandler);
      EventHandler2.remove(this.respectiveElement, "blur", this.focusOutHandler);
      EventHandler2.remove(this.respectiveElement, "keydown", this.keydownHandler);
      EventHandler2.remove(this.respectiveElement, "input", this.inputHandler);
      EventHandler2.remove(this.respectiveElement, "change", this.changeHandler);
      if (this.isForm) {
        EventHandler2.remove(this.formElement, "reset", this.resetForm);
      }
      if (!isNullOrUndefined2(this.textboxWrapper.container.querySelector(".e-float-text")) && this.floatLabelType === "Auto" && this.textboxWrapper.container.classList.contains("e-outline") && this.textboxWrapper.container.classList.contains("e-autofill")) {
        EventHandler2.remove(this.textboxWrapper.container.querySelector(".e-float-text"), "animationstart", this.animationHandler);
      }
    };
    TextBox2.prototype.destroy = function() {
      this.unWireEvents();
      if (this.showClearButton) {
        this.clearButton = document.getElementsByClassName("e-clear-icon")[0];
      }
      if (this.element.tagName === "INPUT" && this.multiline) {
        detach2(this.textboxWrapper.container.getElementsByTagName("textarea")[0]);
        this.respectiveElement = this.element;
        this.element.removeAttribute("type");
      }
      this.respectiveElement.value = this.respectiveElement.defaultValue;
      this.respectiveElement.classList.remove("e-input");
      this.removeAttributes(["aria-disabled", "aria-readonly", "aria-labelledby"]);
      if (!isNullOrUndefined2(this.textboxWrapper)) {
        this.textboxWrapper.container.insertAdjacentElement("afterend", this.respectiveElement);
        detach2(this.textboxWrapper.container);
      }
      this.textboxWrapper = null;
      Input.destroy({
        element: this.respectiveElement,
        floatLabelType: this.floatLabelType,
        properties: this.properties
      }, this.clearButton);
      _super.prototype.destroy.call(this);
    };
    TextBox2.prototype.addIcon = function(position, icons) {
      Input.addIcon(position, icons, this.textboxWrapper.container, this.respectiveElement, this.createElement);
    };
    TextBox2.prototype.getPersistData = function() {
      var keyEntity = ["value"];
      return this.addOnPersist(keyEntity);
    };
    TextBox2.prototype.addAttributes = function(attributes4) {
      for (var _i = 0, _a = Object.keys(attributes4); _i < _a.length; _i++) {
        var key = _a[_i];
        if (key === "disabled") {
          this.setProperties({
            enabled: false
          }, true);
          Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
        } else if (key === "readonly") {
          this.setProperties({
            readonly: true
          }, true);
          Input.setReadonly(this.readonly, this.respectiveElement);
        } else if (key === "class") {
          this.respectiveElement.classList.add(attributes4["" + key]);
        } else if (key === "placeholder") {
          this.setProperties({
            placeholder: attributes4["" + key]
          }, true);
          Input.setPlaceholder(this.placeholder, this.respectiveElement);
        } else if (key === "rows" && this.respectiveElement.tagName === "TEXTAREA") {
          this.respectiveElement.setAttribute(key, attributes4["" + key]);
        } else {
          this.respectiveElement.setAttribute(key, attributes4["" + key]);
        }
      }
    };
    TextBox2.prototype.removeAttributes = function(attributes4) {
      for (var _i = 0, attributes_1 = attributes4; _i < attributes_1.length; _i++) {
        var key = attributes_1[_i];
        if (key === "disabled") {
          this.setProperties({
            enabled: true
          }, true);
          Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
        } else if (key === "readonly") {
          this.setProperties({
            readonly: false
          }, true);
          Input.setReadonly(this.readonly, this.respectiveElement);
        } else if (key === "placeholder") {
          this.setProperties({
            placeholder: null
          }, true);
          Input.setPlaceholder(this.placeholder, this.respectiveElement);
        } else {
          this.respectiveElement.removeAttribute(key);
        }
      }
    };
    TextBox2.prototype.focusIn = function() {
      if (document.activeElement !== this.respectiveElement && this.enabled) {
        this.respectiveElement.focus();
        if (this.textboxWrapper.container.classList.contains("e-input-group") || this.textboxWrapper.container.classList.contains("e-outline") || this.textboxWrapper.container.classList.contains("e-filled")) {
          addClass2([this.textboxWrapper.container], [TEXTBOX_FOCUS]);
        }
      }
    };
    TextBox2.prototype.focusOut = function() {
      if (document.activeElement === this.respectiveElement && this.enabled) {
        this.respectiveElement.blur();
        if (this.textboxWrapper.container.classList.contains("e-input-group") || this.textboxWrapper.container.classList.contains("e-outline") || this.textboxWrapper.container.classList.contains("e-filled")) {
          removeClass2([this.textboxWrapper.container], [TEXTBOX_FOCUS]);
        }
      }
    };
    __decorate61([Property2("text")], TextBox2.prototype, "type", void 0);
    __decorate61([Property2(false)], TextBox2.prototype, "readonly", void 0);
    __decorate61([Property2(null)], TextBox2.prototype, "value", void 0);
    __decorate61([Property2("Never")], TextBox2.prototype, "floatLabelType", void 0);
    __decorate61([Property2("")], TextBox2.prototype, "cssClass", void 0);
    __decorate61([Property2(null)], TextBox2.prototype, "placeholder", void 0);
    __decorate61([Property2("on")], TextBox2.prototype, "autocomplete", void 0);
    __decorate61([Property2({})], TextBox2.prototype, "htmlAttributes", void 0);
    __decorate61([Property2(false)], TextBox2.prototype, "multiline", void 0);
    __decorate61([Property2(true)], TextBox2.prototype, "enabled", void 0);
    __decorate61([Property2(false)], TextBox2.prototype, "showClearButton", void 0);
    __decorate61([Property2(false)], TextBox2.prototype, "enablePersistence", void 0);
    __decorate61([Property2(null)], TextBox2.prototype, "width", void 0);
    __decorate61([Event3()], TextBox2.prototype, "created", void 0);
    __decorate61([Event3()], TextBox2.prototype, "destroyed", void 0);
    __decorate61([Event3()], TextBox2.prototype, "change", void 0);
    __decorate61([Event3()], TextBox2.prototype, "blur", void 0);
    __decorate61([Event3()], TextBox2.prototype, "focus", void 0);
    __decorate61([Event3()], TextBox2.prototype, "input", void 0);
    TextBox2 = __decorate61([NotifyPropertyChanges2], TextBox2);
    return TextBox2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/textarea/textarea.js
var __extends63 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate62 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var HIDE_CLEAR2 = "e-clear-icon-hide";
var AUTO_WIDTH = "e-auto-width";
var RESIZE_X = "e-resize-x";
var RESIZE_Y = "e-resize-y";
var RESIZE_XY = "e-resize-xy";
var RESIZE_NONE = "e-resize-none";
var TextArea = (
  /** @class */
  function(_super) {
    __extends63(TextArea2, _super);
    function TextArea2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.previousValue = null;
      _this.isForm = false;
      _this.inputPreviousValue = null;
      _this.textareaOptions = options;
      return _this;
    }
    TextArea2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "floatLabelType":
            Input.removeFloating(this.textareaWrapper);
            Input.addFloating(this.element, this.floatLabelType, this.placeholder);
            if (this.floatLabelType === "Never") {
              this.element.removeAttribute("aria-labelledby");
            }
            break;
          case "enabled":
            Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
            this.bindClearEvent();
            if (!this.enabled && this.resizeMode !== "None") {
              this.element.classList.remove(this.getCurrentResizeClass(this.resizeMode));
              this.element.classList.add(RESIZE_NONE);
            } else {
              this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
            }
            break;
          case "width":
            if (this.resizeMode !== "None" && this.resizeMode !== "Vertical") {
              this.setElementWidth(newProp.width);
              this.textareaWrapper.container.classList.add(AUTO_WIDTH);
            } else {
              if (this.textareaWrapper.container.classList.contains(AUTO_WIDTH)) {
                this.textareaWrapper.container.classList.remove(AUTO_WIDTH);
              }
              Input.setWidth(newProp.width, this.textareaWrapper.container);
            }
            break;
          case "value":
            {
              var prevOnChange = this.isProtectedOnChange;
              this.isProtectedOnChange = true;
              if (!Input.isBlank(this.value)) {
                this.value = this.value.toString();
              }
              this.isProtectedOnChange = prevOnChange;
              Input.setValue(this.value, this.element, this.floatLabelType, this.showClearButton);
              this.inputPreviousValue = this.element.value;
              if ((this.isAngular || this.isVue) && this.preventChange === true) {
                this.previousValue = this.isAngular ? this.value : this.previousValue;
                this.preventChange = false;
              } else if (isNullOrUndefined2(this.isAngular) || !this.isAngular || this.isAngular && !this.preventChange || this.isAngular && isNullOrUndefined2(this.preventChange)) {
                this.raiseChangeEvent();
              }
            }
            break;
          case "htmlAttributes":
            {
              this.updateHTMLAttributesToElement();
              this.updateHTMLAttributesToWrapper();
              this.checkAttributes(true);
              Input.validateInputType(this.textareaWrapper.container, this.element);
            }
            break;
          case "readonly":
            Input.setReadonly(this.readonly, this.element);
            if (this.readonly) {
              this.element.setAttribute("aria-readonly", "true");
            } else {
              this.element.removeAttribute("aria-readonly");
            }
            break;
          case "showClearButton":
            Input.setClearButton(this.showClearButton, this.element, this.textareaWrapper);
            this.bindClearEvent();
            break;
          case "enableRtl":
            Input.setEnableRtl(this.enableRtl, [this.textareaWrapper.container]);
            break;
          case "placeholder":
            Input.setPlaceholder(this.placeholder, this.element);
            Input.calculateWidth(this.element, this.textareaWrapper.container);
            break;
          case "cssClass":
            Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textareaWrapper.container);
            break;
          case "locale":
            this.globalize = new Internationalization2(this.locale);
            this.l10n.setLocale(this.locale);
            this.setProperties({
              placeholder: this.l10n.getConstant("placeholder")
            }, true);
            Input.setPlaceholder(this.placeholder, this.element);
            break;
          case "rows":
            if (this.rows) {
              this.element.setAttribute("rows", this.rows.toString());
            }
            break;
          case "cols":
            if (this.cols) {
              this.element.setAttribute("cols", this.cols.toString());
              if (this.width == null) {
                this.textareaWrapper.container.classList.add(AUTO_WIDTH);
              }
            }
            break;
          case "maxLength":
            if (this.maxLength) {
              this.element.setAttribute("maxlength", this.maxLength.toString());
            }
            break;
          case "resizeMode":
            if (this.enabled) {
              if (this.element.classList.contains(this.getCurrentResizeClass(oldProp.resizeMode))) {
                this.element.classList.remove(this.getCurrentResizeClass(oldProp.resizeMode));
              }
              this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
              if (this.element.style.width && (this.resizeMode === "None" || this.resizeMode === "Vertical")) {
                Input.setWidth(this.element.style.width, this.textareaWrapper.container);
              } else {
                var currentWidth = this.element.offsetWidth;
                this.element.style.width = currentWidth + "px";
                if (this.textareaWrapper.container.style.width) {
                  this.textareaWrapper.container.style.width = "";
                }
              }
              this.setWrapperWidth();
            }
            break;
        }
      }
    };
    TextArea2.prototype.preRender = function() {
      this.formElement = closest2(this.element, "form");
      if (!isNullOrUndefined2(this.formElement)) {
        this.isForm = true;
      }
      if (this.element.tagName === "EJS-TEXTAREA" || this.element.tagName === "EJS-SMARTTEXTAREA") {
        var ejInstance = getValue2("ej2_instances", this.element);
        var inputElement = this.createElement("textarea");
        var index = 0;
        for (index; index < this.element.attributes.length; index++) {
          var attributeName = this.element.attributes[index].nodeName;
          if (attributeName !== "id" && attributeName !== "class") {
            inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);
            inputElement.innerHTML = this.element.innerHTML;
            if (attributeName === "name") {
              this.element.removeAttribute("name");
            }
          } else if (attributeName === "class") {
            inputElement.setAttribute(attributeName, this.element.className.split(" ").filter(function(item) {
              return item.indexOf("ng-") !== 0;
            }).join(" "));
          }
        }
        this.element.appendChild(inputElement);
        this.element = inputElement;
        setValue3("ej2_instances", ejInstance, this.element);
      }
      this.updateHTMLAttributesToElement();
      this.checkAttributes(false);
      if ((isNullOrUndefined2(this.textareaOptions) || this.textareaOptions["value"] === void 0) && this.element.value !== "") {
        this.setProperties({
          value: this.element.value
        }, true);
      }
      this.globalize = new Internationalization2(this.locale);
      var localeText = {
        placeholder: this.placeholder
      };
      this.l10n = new L10n2("textarea", localeText, this.locale);
      if (this.l10n.getConstant("placeholder") !== "") {
        this.setProperties({
          placeholder: this.placeholder || this.l10n.getConstant("placeholder")
        }, true);
      }
      if (!this.element.hasAttribute("id")) {
        this.element.setAttribute("id", getUniqueID("textbox"));
      }
      if (!this.element.hasAttribute("name")) {
        this.element.setAttribute("name", this.element.getAttribute("id"));
      }
      if (this.rows) {
        this.element.setAttribute("rows", this.rows.toString());
      }
      if (this.cols) {
        this.element.setAttribute("cols", this.cols.toString());
      }
      if (this.maxLength) {
        this.element.setAttribute("maxlength", this.maxLength.toString());
      }
      if (!this.element.style.resize && this.enabled) {
        this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
      }
      if (this.enabled) {
        this.element.setAttribute("aria-multiline", "true");
      }
    };
    TextArea2.prototype.render = function() {
      var updatedCssClassValue = this.cssClass;
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        updatedCssClassValue = Input.getInputValidClassList(this.cssClass);
      }
      this.textareaWrapper = Input.createInput({
        element: this.element,
        floatLabelType: this.floatLabelType,
        properties: {
          enabled: this.enabled,
          enableRtl: this.enableRtl,
          cssClass: updatedCssClassValue,
          readonly: this.readonly,
          placeholder: this.placeholder,
          showClearButton: this.showClearButton
        }
      });
      this.updateHTMLAttributesToWrapper();
      this.wireEvents();
      if (!isNullOrUndefined2(this.value)) {
        Input.setValue(this.value, this.element, this.floatLabelType, this.showClearButton);
      }
      if (!isNullOrUndefined2(this.value)) {
        this.initialValue = this.value;
        if (!this.isAngular) {
          this.element.setAttribute("value", this.initialValue);
        }
      }
      this.previousValue = this.value;
      this.inputPreviousValue = this.value;
      this.element.defaultValue = this.element.value;
      Input.setWidth(this.width, this.textareaWrapper.container);
      this.setWrapperWidth();
      this.renderComplete();
    };
    TextArea2.prototype.getModuleName = function() {
      return "textarea";
    };
    TextArea2.prototype.getPersistData = function() {
      var keyEntity = ["value"];
      return this.addOnPersist(keyEntity);
    };
    TextArea2.prototype.checkAttributes = function(isDynamic) {
      var attrs = isDynamic ? isNullOrUndefined2(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ["placeholder", "disabled", "value", "readonly"];
      for (var _i = 0, attrs_1 = attrs; _i < attrs_1.length; _i++) {
        var key = attrs_1[_i];
        if (!isNullOrUndefined2(this.element.getAttribute(key))) {
          switch (key) {
            case "disabled":
              if (isNullOrUndefined2(this.textareaOptions) || this.textareaOptions["enabled"] === void 0 || isDynamic) {
                var enabled = this.element.getAttribute(key) === "disabled" || this.element.getAttribute(key) === "" || this.element.getAttribute(key) === "true" ? false : true;
                this.setProperties({
                  enabled
                }, !isDynamic);
              }
              break;
            case "readonly":
              if (isNullOrUndefined2(this.textareaOptions) || this.textareaOptions["readonly"] === void 0 || isDynamic) {
                var readonly = this.element.getAttribute(key) === "readonly" || this.element.getAttribute(key) === "" || this.element.getAttribute(key) === "true" ? true : false;
                this.setProperties({
                  readonly
                }, !isDynamic);
              }
              break;
            case "placeholder":
              if (isNullOrUndefined2(this.textareaOptions) || this.textareaOptions["placeholder"] === void 0 || isDynamic) {
                this.setProperties({
                  placeholder: this.element.placeholder
                }, !isDynamic);
              }
              break;
            case "value":
              if ((isNullOrUndefined2(this.textareaOptions) || this.textareaOptions["value"] === void 0 || isDynamic) && this.element.value !== "") {
                this.setProperties({
                  value: this.element.value
                }, !isDynamic);
              }
              break;
          }
        }
      }
    };
    TextArea2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "focus", this.focusHandler, this);
      EventHandler2.add(this.element, "blur", this.focusOutHandler, this);
      EventHandler2.add(this.element, "keydown", this.keydownHandler, this);
      EventHandler2.add(this.element, "input", this.inputHandler, this);
      EventHandler2.add(this.element, "change", this.changeHandler, this);
      if (this.isForm) {
        EventHandler2.add(this.formElement, "reset", this.resetForm, this);
      }
      this.bindClearEvent();
    };
    TextArea2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.element, "focus", this.focusHandler);
      EventHandler2.remove(this.element, "blur", this.focusOutHandler);
      EventHandler2.remove(this.element, "keydown", this.keydownHandler);
      EventHandler2.remove(this.element, "input", this.inputHandler);
      EventHandler2.remove(this.element, "change", this.changeHandler);
      if (this.isForm) {
        EventHandler2.remove(this.formElement, "reset", this.resetForm);
      }
    };
    TextArea2.prototype.destroy = function() {
      this.unWireEvents();
      if (this.showClearButton) {
        this.clearButton = document.getElementsByClassName("e-clear-icon")[0];
      }
      this.element.value = this.element.defaultValue;
      this.element.classList.remove("e-input", RESIZE_X, RESIZE_Y, RESIZE_XY, RESIZE_NONE);
      this.removeAttributes(["aria-disabled", "aria-readonly", "aria-labelledby", "aria-multiline"]);
      if (!isNullOrUndefined2(this.textareaWrapper)) {
        this.textareaWrapper.container.insertAdjacentElement("afterend", this.element);
        detach2(this.textareaWrapper.container);
      }
      this.textareaWrapper = null;
      Input.destroy({
        element: this.element,
        floatLabelType: this.floatLabelType,
        properties: this.properties
      }, this.clearButton);
      this.formElement = null;
      _super.prototype.destroy.call(this);
    };
    TextArea2.prototype.focusHandler = function(args) {
      var eventArgs = {
        container: this.textareaWrapper.container,
        event: args,
        value: this.value
      };
      this.trigger("focus", eventArgs);
    };
    TextArea2.prototype.focusOutHandler = function(args) {
      if (!(this.previousValue === null && this.value === null) && this.previousValue !== this.value) {
        this.raiseChangeEvent(args, true);
      }
      var eventArgs = {
        container: this.textareaWrapper.container,
        event: args,
        value: this.value
      };
      this.trigger("blur", eventArgs);
    };
    TextArea2.prototype.keydownHandler = function(args) {
      if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === "") && (this.value === null || this.value === "") && this.element.value === "")) {
        this.setProperties({
          value: this.element.value
        }, true);
      }
    };
    TextArea2.prototype.inputHandler = function(args) {
      var textareaObj = this;
      var eventArgs = {
        event: args,
        value: this.element.value,
        previousValue: this.inputPreviousValue,
        container: this.textareaWrapper.container
      };
      this.inputPreviousValue = this.element.value;
      if (this.isAngular) {
        textareaObj.localChange({
          value: this.element.value
        });
        this.preventChange = true;
      }
      if (this.isVue) {
        this.preventChange = true;
      }
      this.trigger("input", eventArgs);
      args.stopPropagation();
    };
    TextArea2.prototype.changeHandler = function(args) {
      this.setProperties({
        value: this.element.value
      }, true);
      if (this.previousValue !== this.value) {
        this.raiseChangeEvent(args, true);
      }
      args.stopPropagation();
    };
    TextArea2.prototype.raiseChangeEvent = function(event2, interaction) {
      var eventArgs = {
        event: event2,
        value: this.value,
        previousValue: this.previousValue,
        container: this.textareaWrapper.container,
        isInteraction: interaction ? interaction : false,
        isInteracted: interaction ? interaction : false
      };
      this.preventChange = false;
      this.trigger("change", eventArgs);
      this.previousValue = this.value;
    };
    TextArea2.prototype.updateHTMLAttributesToWrapper = function() {
      Input.updateHTMLAttributesToWrapper(this.htmlAttributes, this.textareaWrapper.container);
    };
    TextArea2.prototype.updateHTMLAttributesToElement = function() {
      Input.updateHTMLAttributesToElement(this.htmlAttributes, this.element);
    };
    TextArea2.prototype.bindClearEvent = function() {
      if (this.showClearButton) {
        if (this.enabled) {
          EventHandler2.add(this.textareaWrapper.clearButton, "mousedown touchstart", this.resetInputHandler, this);
        } else {
          EventHandler2.remove(this.textareaWrapper.clearButton, "mousedown touchstart", this.resetInputHandler);
        }
      }
    };
    TextArea2.prototype.resetInputHandler = function(event2) {
      event2.preventDefault();
      if (!this.textareaWrapper.clearButton.classList.contains(HIDE_CLEAR2) || this.textareaWrapper.container.classList.contains("e-static-clear")) {
        Input.setValue("", this.element, this.floatLabelType, this.showClearButton);
        this.setProperties({
          value: this.element.value
        }, true);
      }
      var eventArgs = {
        event: event2,
        value: this.element.value,
        previousValue: this.inputPreviousValue,
        container: this.textareaWrapper.container
      };
      this.trigger("input", eventArgs);
      this.inputPreviousValue = this.element.value;
      this.raiseChangeEvent(event2, true);
      if (closest2(this.element, "form")) {
        var element2 = this.element;
        var keyupEvent = document.createEvent("KeyboardEvent");
        keyupEvent.initEvent("keyup", false, true);
        element2.dispatchEvent(keyupEvent);
      }
    };
    TextArea2.prototype.addAttributes = function(attributes4) {
      for (var _i = 0, _a = Object.keys(attributes4); _i < _a.length; _i++) {
        var key = _a[_i];
        if (key === "disabled") {
          this.setProperties({
            enabled: false
          }, true);
          Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
        } else if (key === "readonly") {
          this.setProperties({
            readonly: true
          }, true);
          Input.setReadonly(this.readonly, this.element);
        } else if (key === "class") {
          this.element.classList.add(attributes4["" + key]);
        } else if (key === "placeholder") {
          this.setProperties({
            placeholder: attributes4["" + key]
          }, true);
          Input.setPlaceholder(this.placeholder, this.element);
        } else {
          this.element.setAttribute(key, attributes4["" + key]);
        }
      }
    };
    TextArea2.prototype.removeAttributes = function(attributes4) {
      for (var _i = 0, attributes_1 = attributes4; _i < attributes_1.length; _i++) {
        var key = attributes_1[_i];
        if (key === "disabled") {
          this.setProperties({
            enabled: true
          }, true);
          Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
        } else if (key === "readonly") {
          this.setProperties({
            readonly: false
          }, true);
          Input.setReadonly(this.readonly, this.element);
        } else if (key === "placeholder") {
          this.setProperties({
            placeholder: null
          }, true);
          Input.setPlaceholder(this.placeholder, this.element);
        } else {
          this.element.removeAttribute(key);
        }
      }
    };
    TextArea2.prototype.focusIn = function() {
      if (document.activeElement !== this.element && this.enabled) {
        this.element.focus();
        if (this.textareaWrapper.container.classList.contains("e-input-group") || this.textareaWrapper.container.classList.contains("e-outline") || this.textareaWrapper.container.classList.contains("e-filled")) {
          addClass2([this.textareaWrapper.container], [TEXTBOX_FOCUS]);
        }
      }
    };
    TextArea2.prototype.focusOut = function() {
      if (document.activeElement === this.element && this.enabled) {
        this.element.blur();
        if (this.textareaWrapper.container.classList.contains("e-input-group") || this.textareaWrapper.container.classList.contains("e-outline") || this.textareaWrapper.container.classList.contains("e-filled")) {
          removeClass2([this.textareaWrapper.container], [TEXTBOX_FOCUS]);
        }
      }
    };
    TextArea2.prototype.setWrapperWidth = function() {
      if (this.enabled && (this.resizeMode !== "None" && this.resizeMode !== "Vertical" || this.cols || this.element.getAttribute("cols"))) {
        if (this.resizeMode !== "None" && this.resizeMode !== "Vertical") {
          if (this.textareaWrapper.container.style.width) {
            this.setElementWidth(this.textareaWrapper.container.style.width);
            this.textareaWrapper.container.style.width = "";
            this.textareaWrapper.container.classList.add(AUTO_WIDTH);
          }
        }
        this.textareaWrapper.container.classList.add(AUTO_WIDTH);
      } else {
        if (this.textareaWrapper.container.classList.contains(AUTO_WIDTH)) {
          this.textareaWrapper.container.classList.remove(AUTO_WIDTH);
        }
      }
    };
    TextArea2.prototype.resetForm = function() {
      if (this.isAngular) {
        this.resetValue("");
      } else {
        this.resetValue(this.initialValue);
      }
      if (!isNullOrUndefined2(this.textareaWrapper)) {
        var label = this.textareaWrapper.container.querySelector(".e-float-text");
        if (!isNullOrUndefined2(label) && this.floatLabelType !== "Always") {
          if (isNullOrUndefined2(this.initialValue) || this.initialValue === "") {
            label.classList.add("e-label-bottom");
            label.classList.remove("e-label-top");
          } else if (this.initialValue !== "") {
            label.classList.add("e-label-top");
            label.classList.remove("e-label-bottom");
          }
        }
      }
    };
    TextArea2.prototype.resetValue = function(value) {
      var prevOnChange = this.isProtectedOnChange;
      this.isProtectedOnChange = true;
      this.value = value;
      if (value == null && this.textareaWrapper.container.classList.contains("e-valid-input") && !(this.floatLabelType === "Always" && this.textareaWrapper.container.classList.contains("e-outline"))) {
        this.textareaWrapper.container.classList.remove("e-valid-input");
      }
      this.isProtectedOnChange = prevOnChange;
    };
    TextArea2.prototype.setElementWidth = function(width) {
      if (typeof width === "number") {
        this.element.style.width = formatUnit(width);
      } else if (typeof width === "string") {
        this.element.style.width = width.match(/px|%|em/) ? width : formatUnit(width);
      }
    };
    TextArea2.prototype.getCurrentResizeClass = function(resizeMode) {
      return resizeMode === "None" ? RESIZE_NONE : resizeMode === "Both" ? RESIZE_XY : resizeMode === "Horizontal" ? RESIZE_X : RESIZE_Y;
    };
    __decorate62([Property2(false)], TextArea2.prototype, "readonly", void 0);
    __decorate62([Property2(null)], TextArea2.prototype, "value", void 0);
    __decorate62([Property2("Never")], TextArea2.prototype, "floatLabelType", void 0);
    __decorate62([Property2("")], TextArea2.prototype, "cssClass", void 0);
    __decorate62([Property2(null)], TextArea2.prototype, "placeholder", void 0);
    __decorate62([Property2({})], TextArea2.prototype, "htmlAttributes", void 0);
    __decorate62([Property2(true)], TextArea2.prototype, "enabled", void 0);
    __decorate62([Property2(false)], TextArea2.prototype, "showClearButton", void 0);
    __decorate62([Property2(false)], TextArea2.prototype, "enablePersistence", void 0);
    __decorate62([Property2(null)], TextArea2.prototype, "width", void 0);
    __decorate62([Property2("Both")], TextArea2.prototype, "resizeMode", void 0);
    __decorate62([Property2(null)], TextArea2.prototype, "maxLength", void 0);
    __decorate62([Property2(null)], TextArea2.prototype, "cols", void 0);
    __decorate62([Property2(null)], TextArea2.prototype, "rows", void 0);
    __decorate62([Event3()], TextArea2.prototype, "created", void 0);
    __decorate62([Event3()], TextArea2.prototype, "destroyed", void 0);
    __decorate62([Event3()], TextArea2.prototype, "change", void 0);
    __decorate62([Event3()], TextArea2.prototype, "blur", void 0);
    __decorate62([Event3()], TextArea2.prototype, "focus", void 0);
    __decorate62([Event3()], TextArea2.prototype, "input", void 0);
    TextArea2 = __decorate62([NotifyPropertyChanges2], TextArea2);
    return TextArea2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/smart-textarea/caret-helper.js
var CaretPositionHelper = (
  /** @class */
  function() {
    function CaretPositionHelper2() {
    }
    CaretPositionHelper2.createStyledDiv = function(target, htmlContent) {
      var div = document.createElement("div");
      var styles = {
        position: "absolute",
        left: -9999,
        top: 0,
        zIndex: -2e3
      };
      this.properties.forEach(function(prop) {
        styles["" + prop] = getComputedStyle(target)[prop];
      });
      Object.keys(styles).forEach(function(key) {
        div.style["" + key] = styles["" + key];
      });
      var scrollbarWidth = target.offsetWidth - target.clientWidth;
      div.style.width = target.clientWidth + scrollbarWidth + "px";
      div.innerHTML = htmlContent;
      if (target && target.parentNode) {
        target.parentNode.insertBefore(div, target.nextSibling);
      }
      return div;
    };
    CaretPositionHelper2.createCaretMarker = function(target, htmlContent) {
      var div = this.createStyledDiv(target, htmlContent);
      var marker = div.ownerDocument.getElementById("caret-position-marker");
      var position = {
        left: marker.offsetLeft,
        top: marker.offsetTop,
        height: marker.offsetHeight
      };
      if (div && div.parentNode) {
        div.parentNode.removeChild(div);
      }
      return position;
    };
    CaretPositionHelper2.escapeHtml = function(value) {
      return value.replace(/<|>|`|"|&/g, "?").replace(/\r\n|\r|\n/g, "<br/>");
    };
    CaretPositionHelper2.getCaretPosition = function(target) {
      var position = target.selectionStart || 0;
      var textBeforeCaret = target.value.slice(0, position);
      var textAfterCaret = target.value.slice(position);
      var content = '<span style="position: relative; display: inline;">' + this.escapeHtml(textBeforeCaret) + "</span>";
      content += '<span id="caret-position-marker" style="position: relative; display: inline;">|</span>';
      content += '<span style="position: relative; display: inline;">' + this.escapeHtml(textAfterCaret) + "</span>";
      var rect = this.createCaretMarker(target, content);
      rect.pos = position;
      return rect;
    };
    CaretPositionHelper2.adjustScrollToCaretPosition = function(element2) {
      var caretPosition = this.getCaretPosition(element2);
      var lineHeight = parseFloat(window.getComputedStyle(element2).lineHeight);
      if (caretPosition.top > element2.clientHeight + element2.scrollTop - lineHeight) {
        element2.scrollTop = caretPosition.top - element2.clientHeight + lineHeight;
      }
    };
    CaretPositionHelper2.getTextAreaPosition = function(element2) {
      var computedStyle = window.getComputedStyle(element2);
      var position = this.getCaretPosition(element2);
      return {
        top: position.top + parseFloat(computedStyle.borderTopWidth) + element2.offsetTop - element2.scrollTop,
        left: position.left + parseFloat(computedStyle.borderLeftWidth) + element2.offsetLeft - element2.scrollLeft - 0.25,
        height: position.height,
        elemStyle: computedStyle
      };
    };
    CaretPositionHelper2.insertCharacter = function(element2, text) {
      var start = element2.selectionStart;
      var end = element2.selectionEnd;
      element2.value = element2.value.substring(0, start) + text + element2.value.substring(end);
      start += text.length;
      element2.setSelectionRange(start, start);
    };
    CaretPositionHelper2.properties = ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle", "borderTopWidth", "boxSizing", "fontFamily", "fontSize", "fontWeight", "height", "letterSpacing", "lineHeight", "marginBottom", "marginLeft", "marginRight", "marginTop", "outlineWidth", "overflow", "overflowX", "overflowY", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "textAlign", "textOverflow", "textTransform", "whiteSpace", "wordBreak", "wordWrap", "width"];
    return CaretPositionHelper2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/smart-textarea/smart-textarea.js
var __extends64 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate63 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter4 = function(thisArg, _arguments, P, generator) {
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : new P(function(resolve2) {
        resolve2(result.value);
      }).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
var __generator4 = function(thisArg, body) {
  var _ = {
    label: 0,
    sent: function() {
      if (t[0] & 1) throw t[1];
      return t[1];
    },
    trys: [],
    ops: []
  }, f, y, t, g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (_) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
};
var ChatMessageRole;
(function(ChatMessageRole2) {
  ChatMessageRole2["System"] = "system";
  ChatMessageRole2["User"] = "user";
  ChatMessageRole2["Assistant"] = "assistant";
})(ChatMessageRole || (ChatMessageRole = {}));
var SmartTextArea = (
  /** @class */
  function(_super) {
    __extends64(SmartTextArea2, _super);
    function SmartTextArea2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    SmartTextArea2.prototype.render = function() {
      _super.prototype.render.call(this);
      if (!(this.element instanceof HTMLTextAreaElement)) {
        return;
      }
      this.textArea = this.element;
      var smartTextArea = createElement2("smart-textarea");
      smartTextArea.classList.add("e-smart-textarea");
      this.textArea.after(smartTextArea);
      if (this.showSuggestionOnPopup !== "None") {
        var suggestionState = this.showSuggestionOnPopup === "Enable" ? "false" : "true";
        this.textArea.setAttribute("data-inline-suggestions", suggestionState);
      }
      this.suggestionDisplay = this.shouldShowInlineSuggestions(this.textArea) ? new InlineSuggestion(smartTextArea, this.textArea) : new ContextSuggestion(smartTextArea, this.textArea);
    };
    SmartTextArea2.prototype.wireEvents = function() {
      var _this = this;
      _super.prototype.wireEvents.call(this);
      EventHandler2.add(this.element, "keyup", this.handleKeyUp, this);
      EventHandler2.add(this.element, "keydown", this.handleKeyDown, this);
      EventHandler2.add(this.element, "mousedown", this.removeExistingOrPendingSuggestion, this);
      EventHandler2.add(this.element, "focusout", this.removeExistingOrPendingSuggestion, this);
      this.element.addEventListener("scroll", function() {
        return _this.suggestionDisplay.reject();
      }, {
        passive: true
      });
    };
    SmartTextArea2.prototype.unWireEvents = function() {
      var _this = this;
      _super.prototype.unWireEvents.call(this);
      EventHandler2.remove(this.element, "keyup", this.handleKeyUp);
      EventHandler2.remove(this.element, "keydown", this.handleKeyDown);
      EventHandler2.remove(this.element, "mousedown", this.removeExistingOrPendingSuggestion);
      EventHandler2.remove(this.element, "focusout", this.removeExistingOrPendingSuggestion);
      this.element.removeEventListener("scroll", function() {
        return _this.suggestionDisplay.reject();
      });
    };
    SmartTextArea2.prototype.keydownHandler = function() {
    };
    SmartTextArea2.prototype.shouldShowInlineSuggestions = function(textArea) {
      var inlineSuggestions = textArea.getAttribute("data-inline-suggestions");
      if (inlineSuggestions) {
        return inlineSuggestions.toLowerCase() === "true";
      }
      return !("ontouchstart" in window);
    };
    SmartTextArea2.prototype.handleKeyDown = function(event2) {
      switch (event2.key) {
        case "Tab":
          if (this.suggestionDisplay.isShowing()) {
            this.suggestionDisplay.accept();
            event2.preventDefault();
          }
          break;
        case "Alt":
        case "Control":
        case "Shift":
        case "Command":
          break;
        default:
          if (this.suggestionDisplay.isShowing() && this.suggestionDisplay.currentSuggestion.startsWith(event2.key)) {
            CaretPositionHelper.insertCharacter(this.textArea, event2.key);
            event2.preventDefault();
            this.suggestionDisplay.show(this.suggestionDisplay.currentSuggestion.substring(event2.key.length));
            CaretPositionHelper.adjustScrollToCaretPosition(this.textArea);
          } else {
            this.removeExistingOrPendingSuggestion();
          }
          break;
      }
    };
    SmartTextArea2.prototype.handleKeyUp = function() {
      var _this = this;
      if (!this.suggestionDisplay.isShowing()) {
        clearTimeout(this.typingDebounceTimeout);
        this.typingDebounceTimeout = setTimeout(function() {
          return _this.handleTypingPaused();
        }, 350);
      }
    };
    SmartTextArea2.prototype.handleTypingPaused = function() {
      return __awaiter4(this, void 0, void 0, function() {
        return __generator4(this, function(_a) {
          switch (_a.label) {
            case 0:
              if (document.activeElement !== this.textArea) {
                return [
                  2
                  /*return*/
                ];
              }
              if (!(this.textArea.selectionStart === this.textArea.selectionEnd && (this.textArea.selectionStart === this.textArea.value.length || this.textArea.value[this.textArea.selectionStart] === "\n"))) return [3, 2];
              return [4, this.requestSuggestionAsync()];
            case 1:
              _a.sent();
              _a.label = 2;
            case 2:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    SmartTextArea2.prototype.removeExistingOrPendingSuggestion = function() {
      clearTimeout(this.typingDebounceTimeout);
      if (this.pendingSuggestionAbort) {
        this.pendingSuggestionAbort.abort();
        this.pendingSuggestionAbort = null;
      }
      this.suggestionDisplay.reject();
    };
    SmartTextArea2.prototype.createSuggestionPrompt = function(textBefore, textAfter) {
      var stringBuilder = "Predict what text the user in the given ROLE would insert at the cursor position indicated by ^^^.\nOnly give predictions for which you have an EXTREMELY high confidence that the user would insert that EXACT text.\nDo not make up new information. If you are not sure, just reply with NO_PREDICTION.\n\nRULES:\n1. Reply with OK:, then in square brackets the predicted text, then END_INSERTION, and no other output.\n2. When a specific value or quantity cannot be inferred and would need to be provided, use the word NEED_INFO.\n3. If there is not enough information to predict any words that the user would type next, just reply with the word NO_PREDICTION.\n4. NEVER invent new information. If you can not be sure what the user is about to type, ALWAYS stop the prediction with END_INSERTION.";
      var userPhrases = this.UserPhrases;
      if (userPhrases && userPhrases.length > 0) {
        stringBuilder += "\nAlways try to use variations on the following phrases as part of the predictions:\n";
        for (var _i = 0, userPhrases_1 = userPhrases; _i < userPhrases_1.length; _i++) {
          var phrase = userPhrases_1[_i];
          stringBuilder += "- " + phrase + "\n";
        }
      }
      var chatMessageList = [{
        role: ChatMessageRole.System,
        content: stringBuilder
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: Family member sending a text\nUSER_TEXT: Hey, it is a nice day - the weather is ^^^"
      }, {
        role: ChatMessageRole.Assistant,
        content: "OK:[great!]END_INSERTION"
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: Customer service assistant\nUSER_TEXT: You can find more information on^^^\n\nAlternatively, phone us."
      }, {
        role: ChatMessageRole.Assistant,
        content: "OK:[ our website at NEED_INFO]END_INSERTION"
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: Casual\nUSER_TEXT: Oh I see!\n\nWell sure thing, we can"
      }, {
        role: ChatMessageRole.Assistant,
        content: "OK:[ help you out with that!]END_INSERTION"
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: Storyteller\nUSER_TEXT: Sir Digby Chicken Caesar, also know^^^"
      }, {
        role: ChatMessageRole.Assistant,
        content: "OK:[n as NEED_INFO]END_INSERTION"
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: Customer support agent\nUSER_TEXT: Goodbye for now.^^^"
      }, {
        role: ChatMessageRole.Assistant,
        content: "NO_PREDICTION END_INSERTION"
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: Pirate\nUSER_TEXT: Have you found^^^"
      }, {
        role: ChatMessageRole.Assistant,
        content: "OK:[ the treasure, me hearties?]END_INSERTION"
      }, {
        role: ChatMessageRole.User,
        content: "ROLE: " + this.userRole + "\nUSER_TEXT: " + textBefore + "^^^" + textAfter
      }];
      return {
        messages: chatMessageList,
        temperature: 0,
        maxTokens: 400,
        stopSequences: ["END_INSERTION", "NEED_INFO"],
        frequencyPenalty: 0,
        presencePenalty: 0
      };
    };
    SmartTextArea2.prototype.requestSuggestionAsync = function() {
      return __awaiter4(this, void 0, void 0, function() {
        var requestDetails, suggestionData, chatConfig, insertSuggestion, response;
        return __generator4(this, function(_a) {
          switch (_a.label) {
            case 0:
              if (this.pendingSuggestionAbort) {
                this.pendingSuggestionAbort.abort();
                return [
                  2
                  /*return*/
                ];
              }
              this.pendingSuggestionAbort = new AbortController();
              requestDetails = {
                textAreaValue: this.textArea.value,
                cursorPosition: this.textArea.selectionStart
              };
              suggestionData = {
                textBefore: requestDetails.textAreaValue.substring(0, requestDetails.cursorPosition),
                textAfter: requestDetails.textAreaValue.substring(requestDetails.cursorPosition)
              };
              chatConfig = this.createSuggestionPrompt(suggestionData.textBefore, suggestionData.textAfter);
              if (!(typeof this.aiSuggestionHandler === "function")) return [3, 2];
              return [4, this.aiSuggestionHandler(chatConfig)];
            case 1:
              response = _a.sent();
              insertSuggestion = this.validateSuggestion(response, suggestionData.textBefore);
              _a.label = 2;
            case 2:
              if (insertSuggestion && requestDetails.textAreaValue === this.textArea.value && requestDetails.cursorPosition === this.textArea.selectionStart) {
                if (!insertSuggestion.endsWith(" ")) {
                  insertSuggestion += " ";
                }
                this.suggestionDisplay.show(insertSuggestion);
              }
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    SmartTextArea2.prototype.validateSuggestion = function(response, textBefore) {
      var suggestion;
      if (typeof response !== "string" || response.length <= 5 || response.indexOf("OK:[") !== 0) {
        return "";
      }
      var endIndex = this.indexOfAny(response, [".", "?", "!"]);
      if (endIndex > 0 && response.length > endIndex + 1 && response[endIndex + 1] === " ") {
        response = response.substring(0, endIndex + 1);
      }
      suggestion = response.substring(4).replace(/[\]\s]+$/, "");
      if (textBefore.length > 0 && textBefore[textBefore.length - 1] === " ") {
        suggestion = suggestion.replace(/^\s+/, "");
      }
      return suggestion;
    };
    SmartTextArea2.prototype.indexOfAny = function(str, chars) {
      for (var i = 0; i < str.length; i++) {
        if (chars.indexOf(str["" + i]) !== -1) {
          return i;
        }
      }
      return -1;
    };
    SmartTextArea2.prototype.getModuleName = function() {
      return "smarttextarea";
    };
    SmartTextArea2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.textArea = null;
      this.suggestionDisplay = null;
      this.typingDebounceTimeout = null;
    };
    __decorate63([Property2("")], SmartTextArea2.prototype, "userRole", void 0);
    __decorate63([Property2([])], SmartTextArea2.prototype, "UserPhrases", void 0);
    __decorate63([Property2()], SmartTextArea2.prototype, "aiSuggestionHandler", void 0);
    __decorate63([Property2("None")], SmartTextArea2.prototype, "showSuggestionOnPopup", void 0);
    return SmartTextArea2;
  }(TextArea)
);
var InlineSuggestion = (
  /** @class */
  function() {
    function InlineSuggestion2(smartTextArea, textArea) {
      this.owner = smartTextArea;
      this.textArea = textArea;
      this.latestSuggestionText = "";
      this.suggestionStartPos = null;
      this.suggestionEndPos = null;
      this.virtualCaret = null;
      this.originalValueProperty = this.getOriginalValueProperty(textArea, "value");
    }
    Object.defineProperty(InlineSuggestion2.prototype, "value", {
      get: function() {
        var value = this.originalValueProperty.get.call(this.textArea);
        return this.isShowing() ? value.substring(0, this.suggestionStartPos) + value.substring(this.suggestionEndPos) : value;
      },
      set: function(newValue) {
        this.originalValueProperty.set.call(this.textArea, newValue);
      },
      enumerable: true,
      configurable: true
    });
    InlineSuggestion2.prototype.getOriginalValueProperty = function(obj, property) {
      while (obj) {
        var descriptor = Object.getOwnPropertyDescriptor(obj, property);
        if (descriptor) {
          return descriptor;
        }
        obj = Object.getPrototypeOf(obj);
      }
      throw new Error("Property " + property + " not found on object or its prototype chain");
    };
    Object.defineProperty(InlineSuggestion2.prototype, "valueIncludingSuggestion", {
      get: function() {
        return this.originalValueProperty.get.call(this.textArea);
      },
      set: function(newValue) {
        this.originalValueProperty.set.call(this.textArea, newValue);
      },
      enumerable: true,
      configurable: true
    });
    InlineSuggestion2.prototype.isShowing = function() {
      return this.suggestionStartPos !== null;
    };
    InlineSuggestion2.prototype.show = function(suggestionText) {
      this.latestSuggestionText = suggestionText;
      this.suggestionStartPos = this.textArea.selectionStart;
      this.suggestionEndPos = this.suggestionStartPos + suggestionText.length;
      this.textArea.setAttribute("data-suggestion-visible", "");
      this.valueIncludingSuggestion = this.valueIncludingSuggestion.substring(0, this.suggestionStartPos) + suggestionText + this.valueIncludingSuggestion.substring(this.suggestionStartPos);
      this.textArea.setSelectionRange(this.suggestionStartPos, this.suggestionEndPos);
      if (!this.virtualCaret) {
        this.virtualCaret = new VirtualCaret(this.owner, this.textArea);
      }
      this.virtualCaret.show();
    };
    Object.defineProperty(InlineSuggestion2.prototype, "currentSuggestion", {
      get: function() {
        return this.latestSuggestionText;
      },
      enumerable: true,
      configurable: true
    });
    InlineSuggestion2.prototype.accept = function() {
      this.textArea.setSelectionRange(this.suggestionEndPos, this.suggestionEndPos);
      this.suggestionStartPos = null;
      this.suggestionEndPos = null;
      if (this.virtualCaret) {
        this.virtualCaret.hide();
      }
      this.textArea.removeAttribute("data-suggestion-visible");
      CaretPositionHelper.adjustScrollToCaretPosition(this.textArea);
    };
    InlineSuggestion2.prototype.reject = function() {
      if (!this.isShowing()) {
        return;
      }
      var selectionStart = this.textArea.selectionStart;
      var selectionEnd = this.textArea.selectionEnd;
      this.valueIncludingSuggestion = this.valueIncludingSuggestion.substring(0, this.suggestionStartPos) + this.valueIncludingSuggestion.substring(this.suggestionEndPos);
      if (this.suggestionStartPos === selectionStart && this.suggestionEndPos === selectionEnd) {
        this.textArea.setSelectionRange(selectionStart, selectionStart);
      }
      this.suggestionStartPos = null;
      this.suggestionEndPos = null;
      this.textArea.removeAttribute("data-suggestion-visible");
      if (this.virtualCaret) {
        this.virtualCaret.hide();
      }
    };
    return InlineSuggestion2;
  }()
);
var ContextSuggestion = (
  /** @class */
  function() {
    function ContextSuggestion2(container, textArea) {
      var _this = this;
      this.latestSuggestionText = "";
      this.showing = false;
      this.textArea = textArea;
      this.suggestionElement = document.createElement("div");
      this.suggestionElement.classList.add("smart-textarea-suggestion-overlay");
      this.suggestionElement.addEventListener("mousedown", function(event2) {
        return _this.handleSuggestionClicked(event2);
      });
      this.suggestionElement.addEventListener("touchend", function(event2) {
        return _this.handleSuggestionClicked(event2);
      });
      this.suggestionPrefixElement = document.createElement("span");
      this.suggestionTextElement = document.createElement("span");
      this.suggestionElement.appendChild(this.suggestionPrefixElement);
      this.suggestionElement.appendChild(this.suggestionTextElement);
      this.suggestionPrefixElement.style.opacity = "0.3";
      var computedStyle = window.getComputedStyle(this.textArea);
      this.suggestionElement.style.font = computedStyle.font;
      this.suggestionElement.style.marginTop = 1.4 * parseFloat(computedStyle.fontSize) + "px";
      container.appendChild(this.suggestionElement);
    }
    Object.defineProperty(ContextSuggestion2.prototype, "currentSuggestion", {
      get: function() {
        return this.latestSuggestionText;
      },
      enumerable: true,
      configurable: true
    });
    ContextSuggestion2.prototype.show = function(suggestionText) {
      this.latestSuggestionText = suggestionText;
      this.suggestionPrefixElement.textContent = suggestionText[0] !== " " ? this.getPrefixText(this.textArea, 20) : "";
      this.suggestionTextElement.textContent = suggestionText;
      var position = CaretPositionHelper.getTextAreaPosition(this.textArea);
      var style = this.suggestionElement.style;
      style.minWidth = null;
      this.suggestionElement.classList.add("smart-textarea-suggestion-overlay-visible");
      style.zIndex = this.textArea.style.zIndex + 1;
      style.top = position.top + "px";
      var leftPosition3 = position.left - this.suggestionPrefixElement.offsetWidth;
      if (!style.left || Math.abs(parseFloat(style.left) - leftPosition3) > 10) {
        style.left = leftPosition3 + "px";
      }
      this.showing = true;
      var computedStyle = window.getComputedStyle(this.suggestionElement);
      var lineHeight = parseFloat(computedStyle.lineHeight);
      var paddingTop = parseFloat(computedStyle.paddingTop);
      var paddingBottom = parseFloat(computedStyle.paddingBottom);
      var lines = Math.round((this.suggestionElement.offsetHeight - paddingTop - paddingBottom) / lineHeight);
      if (lines > 2) {
        var elementWidth = this.suggestionElement.offsetWidth;
        style.minWidth = "calc(min(70vw, " + lines * elementWidth / 2 + "px))";
      }
      var rect = this.suggestionElement.getBoundingClientRect();
      if (rect.right > document.body.clientWidth - 20) {
        style.left = "calc(" + (parseFloat(style.left) - (rect.right - document.body.clientWidth)) + "px - 2rem)";
      }
    };
    ContextSuggestion2.prototype.accept = function() {
      if (this.showing) {
        CaretPositionHelper.insertCharacter(this.textArea, this.currentSuggestion);
        CaretPositionHelper.adjustScrollToCaretPosition(this.textArea);
        this.hide();
      }
    };
    ContextSuggestion2.prototype.reject = function() {
      this.hide();
    };
    ContextSuggestion2.prototype.hide = function() {
      if (this.showing) {
        this.showing = false;
        this.suggestionElement.classList.remove("smart-textarea-suggestion-overlay-visible");
      }
    };
    ContextSuggestion2.prototype.isShowing = function() {
      return this.showing;
    };
    ContextSuggestion2.prototype.handleSuggestionClicked = function(event2) {
      event2.preventDefault();
      event2.stopImmediatePropagation();
      this.accept();
    };
    ContextSuggestion2.prototype.getPrefixText = function(textArea, maxLength) {
      var value = textArea.value;
      var selectionStart = textArea.selectionStart;
      for (var i = selectionStart - 1; i > selectionStart - maxLength; i--) {
        if (i < 0 || /\s/.test(value["" + i])) {
          return value.substring(i + 1, selectionStart);
        }
      }
      return "";
    };
    return ContextSuggestion2;
  }()
);
var VirtualCaret = (
  /** @class */
  function() {
    function VirtualCaret2(smartTextArea, textArea) {
      this.textArea = textArea;
      this.caretDiv = document.createElement("div");
      this.caretDiv.classList.add("smart-textarea-caret");
      smartTextArea.appendChild(this.caretDiv);
    }
    VirtualCaret2.prototype.show = function() {
      var textAreaPosition = CaretPositionHelper.getTextAreaPosition(this.textArea);
      var caretStyle = this.caretDiv.style;
      caretStyle.display = "block";
      caretStyle.top = textAreaPosition.top + "px";
      caretStyle.left = textAreaPosition.left + "px";
      caretStyle.height = textAreaPosition.height + "px";
      caretStyle.zIndex = this.textArea.style.zIndex;
      caretStyle.backgroundColor = textAreaPosition.elemStyle.caretColor;
    };
    VirtualCaret2.prototype.hide = function() {
      this.caretDiv.style.display = "none";
    };
    return VirtualCaret2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/common/signature-base.js
var __extends65 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var SignatureBase = (
  /** @class */
  function(_super) {
    __extends65(SignatureBase2, _super);
    function SignatureBase2() {
      var _this = _super !== null && _super.apply(this, arguments) || this;
      _this.minDistance = 5;
      _this.previous = 0;
      _this.interval = 30;
      _this.timeout = null;
      _this.isSignatureEmpty = true;
      _this.backgroundLoaded = null;
      _this.isBlazor = false;
      _this.isResponsive = false;
      _this.signPointsColl = [];
      _this.signRatioPointsColl = [];
      _this.canRedraw = true;
      return _this;
    }
    SignatureBase2.prototype.initialize = function(element2, dotnetRef) {
      this.clearArray = [];
      this.element = element2;
      this.canvasContext = this.element.getContext("2d");
      this.canvasContext.canvas.tabIndex = -1;
      if (dotnetRef) {
        this.dotnetRef = dotnetRef;
        this.isBlazor = true;
        if (this.signatureValue) {
          this.loadPersistedSignature();
        }
      }
      this.setHTMLProperties();
      if (isNullOrUndefined2(this.signatureValue)) {
        this.updateSnapCollection(true);
      }
      this.wireEvents();
      if (!this.isBlazor) {
        this.trigger("created", null);
      }
    };
    SignatureBase2.prototype.wireEvents = function() {
      if (isNullOrUndefined2(this.pointColl) && !this.isReadOnly && !this.disabled) {
        EventHandler2.add(this.canvasContext.canvas, "mousedown touchstart", this.mouseDownHandler, this);
        EventHandler2.add(this.canvasContext.canvas, "keydown", this.keyboardHandler, this);
        window.addEventListener("resize", this.resizeHandler.bind(this));
      } else if (this.pointColl) {
        EventHandler2.add(this.canvasContext.canvas, "mousemove touchmove", this.mouseMoveHandler, this);
        EventHandler2.add(this.canvasContext.canvas, "mouseup touchend", this.mouseUpHandler, this);
        EventHandler2.add(document, "mouseup", this.mouseUpHandler, this);
      }
    };
    SignatureBase2.prototype.unwireEvents = function(type) {
      if (type === "mouseup" || type === "touchend") {
        if (this.canvasContext) {
          EventHandler2.remove(this.canvasContext.canvas, "mousemove touchmove", this.mouseMoveHandler);
          EventHandler2.remove(this.canvasContext.canvas, "mouseup touchend", this.mouseUpHandler);
        }
        EventHandler2.remove(document, "mouseup", this.mouseUpHandler);
      } else {
        if (this.canvasContext) {
          EventHandler2.remove(this.canvasContext.canvas, "mousedown touchstart", this.mouseDownHandler);
          EventHandler2.remove(this.canvasContext.canvas, "keydown", this.keyboardHandler);
        }
        window.removeEventListener("resize", this.resizeHandler);
      }
    };
    SignatureBase2.prototype.setHTMLProperties = function() {
      if (this.element.height === 150 && this.element.width === 300 && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
        this.element.height = this.element.offsetHeight;
        this.element.width = this.element.offsetWidth;
        this.isResponsive = true;
      } else if ((this.element.height !== this.element.offsetHeight - 1 || this.element.width !== this.element.offsetWidth - 1) && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
        this.element.height = this.element.offsetHeight;
        this.element.width = this.element.offsetWidth;
      }
      this.canvasContext.fillStyle = this.strokeColor;
      this.tempCanvas = this.createElement("canvas", {
        className: "e-" + this.getModuleName() + "-temp"
      });
      this.tempContext = this.tempCanvas.getContext("2d");
      this.tempCanvas.width = this.element.width;
      this.tempCanvas.height = this.element.height;
      if (this.backgroundImage) {
        this.canvasContext.canvas.style.backgroundImage = "url(" + this.backgroundImage + ")";
        this.canvasContext.canvas.style.backgroundRepeat = "no-repeat";
        if (this.saveWithBackground) {
          this.setBackgroundImage(this.backgroundImage, "temp");
        }
      } else if (this.backgroundColor) {
        this.canvasContext.canvas.style.backgroundColor = this.backgroundColor;
      }
    };
    SignatureBase2.prototype.mouseDownHandler = function(e) {
      if (e.buttons === 1 || e.buttons === 2 || e.type === "touchstart") {
        if (e.type === "touchstart") {
          e.preventDefault();
          e.stopPropagation();
        }
        this.beginStroke(e);
        this.wireEvents();
      }
    };
    SignatureBase2.prototype.mouseMoveHandler = function(e) {
      if (e.buttons === 1 || e.buttons === 2 || e.type === "touchmove") {
        if (e.type === "touchmove") {
          e.preventDefault();
          e.stopPropagation();
        }
        if (this.interval) {
          this.updateStrokeWithThrottle(e);
        } else {
          this.updateStroke(e);
        }
      }
    };
    SignatureBase2.prototype.mouseUpHandler = function(e) {
      var args = {
        actionName: "strokeUpdate"
      };
      if (e.type === "touchstart") {
        e.preventDefault();
        e.stopPropagation();
      }
      this.endDraw();
      this.updateSnapCollection();
      this.unwireEvents(e.type);
      if (!this.isBlazor) {
        this.trigger("change", args);
      } else {
        this.dotnetRef.invokeMethodAsync("TriggerEventAsync", "mouseUp");
      }
      this.signatureValue = this.snapColl[this.incStep];
      for (var i = 0; i < this.signPointsColl.length; i++) {
        this.signRatioPointsColl.push({
          x: this.signPointsColl[i].x / this.canvasContext.canvas.width,
          y: this.signPointsColl[i].y / this.canvasContext.canvas.height
        });
      }
      this.signPointsColl = [];
    };
    SignatureBase2.prototype.keyboardHandler = function(e) {
      var _this = this;
      var args = {
        fileName: "Signature",
        type: "Png",
        cancel: false
      };
      switch (e.key) {
        case "Delete":
          this.clear();
          break;
        case (e.ctrlKey && "s"):
          if (!this.isBlazor) {
            this.trigger("beforeSave", args, function(observableSaveArgs) {
              if (!args.cancel) {
                _this.save(observableSaveArgs.type, observableSaveArgs.fileName);
              }
            });
          } else {
            this.dotnetRef.invokeMethodAsync("TriggerEventAsync", "beforeSave");
          }
          e.preventDefault();
          e.stopImmediatePropagation();
          break;
        case (e.ctrlKey && "z"):
          this.undo();
          break;
        case (e.ctrlKey && "y"):
          this.redo();
          break;
      }
    };
    SignatureBase2.prototype.resizeHandler = function() {
      var proxy = this;
      if (this.isResponsive && this.canRedraw && this.canvasContext && this.element) {
        this.canvasContext.canvas.width = this.element.offsetWidth;
        this.canvasContext.canvas.height = this.element.offsetHeight;
        this.canvasContext.scale(1, 1);
        this.canvasContext.fillStyle = this.strokeColor;
        var pointSize = (this.minStrokeWidth + this.maxStrokeWidth) / 2;
        for (var i = 0; i < this.signRatioPointsColl.length; i++) {
          this.arcDraw(this.signRatioPointsColl[i].x * this.canvasContext.canvas.width, this.signRatioPointsColl[i].y * this.canvasContext.canvas.height, pointSize);
        }
        this.signPointsColl = [];
        this.canvasContext.closePath();
        this.canvasContext.fill();
      } else if (this.canvasContext && this.element) {
        var restoreImg_1 = new Image();
        restoreImg_1.src = this.snapColl[this.incStep];
        restoreImg_1.onload = function() {
          proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
          proxy.canvasContext.drawImage(restoreImg_1, 0, 0, proxy.element.width, proxy.element.height);
        };
      }
    };
    SignatureBase2.prototype.beginStroke = function(e) {
      this.internalRefresh();
      this.updateStroke(e);
    };
    SignatureBase2.prototype.updateStroke = function(e) {
      var point = this.createPoint(e);
      this.addPoint(point);
    };
    SignatureBase2.prototype.updateStrokeWithThrottle = function(args) {
      var now = Date.now();
      var remaining = this.interval - (now - this.previous);
      this.storedArgs = args;
      if (remaining <= 0 || remaining > this.interval) {
        if (this.timeout) {
          clearTimeout(this.timeout);
          this.timeout = null;
        }
        this.previous = now;
        this.updateStroke(this.storedArgs);
        if (!this.timeout) {
          this.storedArgs = null;
        }
      } else if (!this.timeout) {
        this.timeout = window.setTimeout(this.delay.bind(this), remaining);
      }
    };
    SignatureBase2.prototype.delay = function() {
      this.previous = Date.now();
      this.timeout = null;
      this.updateStroke(this.storedArgs);
      if (!this.timeout) {
        this.storedArgs = null;
      }
    };
    SignatureBase2.prototype.createPoint = function(e) {
      var rect = this.canvasContext.canvas.getBoundingClientRect();
      if (e.type === "mousedown" || e.type === "mousemove") {
        return this.point(e.clientX - rect.left, e.clientY - rect.top, (/* @__PURE__ */ new Date()).getTime());
      } else {
        return this.point(e.touches[0].clientX - rect.left, e.touches[0].clientY - rect.top, (/* @__PURE__ */ new Date()).getTime());
      }
    };
    SignatureBase2.prototype.point = function(pointX, pointY, time) {
      this.pointX = pointX;
      this.pointY = pointY;
      this.time = time || (/* @__PURE__ */ new Date()).getTime();
      return {
        x: this.pointX,
        y: this.pointY,
        time: this.time
      };
    };
    SignatureBase2.prototype.addPoint = function(point) {
      var points = this.pointColl;
      var controlPoint1;
      var controlPoint2;
      var lastPoint = points.length > 0 && points[points.length - 1];
      var isLastPointTooClose = lastPoint ? this.distanceTo(lastPoint) <= this.minDistance : false;
      if (!lastPoint || !(lastPoint && isLastPointTooClose)) {
        points.push(point);
        if (points.length > 2) {
          if (points.length === 3) {
            points.unshift(points[0]);
          }
          controlPoint1 = this.calculateCurveControlPoints(points[0], points[1], points[2]).controlPoint2;
          controlPoint2 = this.calculateCurveControlPoints(points[1], points[2], points[3]).controlPoint1;
          this.startPoint = points[1];
          this.controlPoint1 = controlPoint1;
          this.controlPoint2 = controlPoint2;
          this.endPoint = points[2];
          this.startDraw();
          points.shift();
        }
      }
    };
    SignatureBase2.prototype.startDraw = function() {
      var velocity;
      velocity = this.pointVelocityCalc(this.startPoint);
      velocity = this.velocity * velocity + (1 - this.velocity) * this.lastVelocity;
      var newWidth = Math.max(this.maxStrokeWidth / (velocity + 1), this.minStrokeWidth);
      this.curveDraw(this.lastWidth, newWidth);
      this.lastVelocity = velocity;
      this.lastWidth = newWidth;
    };
    SignatureBase2.prototype.endDraw = function() {
      if (isNullOrUndefined2(this.pointColl)) {
        return;
      }
      var canDrawCurve = this.pointColl.length > 2;
      var point = this.pointColl[0];
      if (!canDrawCurve && point) {
        this.strokeDraw(point);
      }
    };
    SignatureBase2.prototype.curveDraw = function(startWidth, endWidth) {
      var context = this.canvasContext;
      var width;
      var i;
      var t1;
      var t2;
      var t3;
      var u1;
      var u2;
      var u3;
      var x;
      var y;
      var widthValue = endWidth - startWidth;
      var bezierLength = this.bezierLengthCalc();
      var drawSteps = Math.ceil(bezierLength) * 2;
      context.beginPath();
      for (i = 0; i < drawSteps; i++) {
        t1 = i / drawSteps;
        t2 = t1 * t1;
        t3 = t2 * t1;
        u1 = 1 - t1;
        u2 = u1 * u1;
        u3 = u2 * u1;
        x = u3 * this.startPoint.x;
        x += 3 * u2 * t1 * this.controlPoint1.x;
        x += 3 * u1 * t2 * this.controlPoint2.x;
        x += t3 * this.endPoint.x;
        y = u3 * this.startPoint.y;
        y += 3 * u2 * t1 * this.controlPoint1.y;
        y += 3 * u1 * t2 * this.controlPoint2.y;
        y += t3 * this.endPoint.y;
        width = Math.min(startWidth + t3 * widthValue, this.maxStrokeWidth);
        this.arcDraw(x, y, width);
      }
      context.closePath();
      context.fill();
      this.isSignatureEmpty = false;
    };
    SignatureBase2.prototype.strokeDraw = function(point) {
      var context = this.canvasContext;
      var pointSize = (this.minStrokeWidth + this.maxStrokeWidth) / 2;
      context.beginPath();
      this.arcDraw(point.x, point.y, pointSize);
      context.closePath();
      context.fill();
      this.isSignatureEmpty = false;
    };
    SignatureBase2.prototype.arcDraw = function(x, y, size) {
      this.signPointsColl.push({
        x,
        y
      });
      var context = this.canvasContext;
      context.moveTo(x, y);
      context.arc(x, y, size, 0, 2 * Math.PI, false);
    };
    SignatureBase2.prototype.calculateCurveControlPoints = function(p1, p2, p3) {
      var dx1 = p1.x - p2.x;
      var dy1 = p1.y - p2.y;
      var dx2 = p2.x - p3.x;
      var dy2 = p2.y - p3.y;
      var m1 = {
        x: (p1.x + p2.x) / 2,
        y: (p1.y + p2.y) / 2
      };
      var m2 = {
        x: (p2.x + p3.x) / 2,
        y: (p2.y + p3.y) / 2
      };
      var l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);
      var l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);
      var dxm = m1.x - m2.x;
      var dym = m1.y - m2.y;
      var k = l2 / (l1 + l2);
      var cm = {
        x: m2.x + dxm * k,
        y: m2.y + dym * k
      };
      var tx = p2.x - cm.x;
      var ty = p2.y - cm.y;
      return {
        controlPoint1: this.point(m1.x + tx, m1.y + ty, 0),
        controlPoint2: this.point(m2.x + tx, m2.y + ty, 0)
      };
    };
    SignatureBase2.prototype.bezierLengthCalc = function() {
      var steps = 10;
      var length = 0;
      var i;
      var t;
      var pointx1;
      var pointy1;
      var pointx2;
      var pointy2;
      var pointx3;
      var pointy3;
      for (i = 0; i <= steps; i++) {
        t = i / steps;
        pointx1 = this.bezierPointCalc(t, this.startPoint.x, this.controlPoint1.x, this.controlPoint2.x, this.endPoint.x);
        pointy1 = this.bezierPointCalc(t, this.startPoint.y, this.controlPoint1.y, this.controlPoint2.y, this.endPoint.y);
        if (i > 0) {
          pointx3 = pointx1 - pointx2;
          pointy3 = pointy1 - pointy2;
          length += Math.sqrt(pointx3 * pointx3 + pointy3 * pointy3);
        }
        pointx2 = pointx1;
        pointy2 = pointy1;
      }
      return length;
    };
    SignatureBase2.prototype.bezierPointCalc = function(t, startpoint, cp1, cp2, endpoint) {
      return startpoint * (1 - t) * (1 - t) * (1 - t) + 3 * cp1 * (1 - t) * (1 - t) * t + 3 * cp2 * (1 - t) * t * t + endpoint * t * t * t;
    };
    SignatureBase2.prototype.pointVelocityCalc = function(startPoint) {
      return this.time !== startPoint.time ? this.distanceTo(startPoint) / (this.time - startPoint.time) : 0;
    };
    SignatureBase2.prototype.distanceTo = function(start) {
      return Math.sqrt(Math.pow(this.pointX - start.x, 2) + Math.pow(this.pointY - start.y, 2));
    };
    SignatureBase2.prototype.isRead = function(isRead) {
      if (isRead) {
        EventHandler2.remove(this.canvasContext.canvas, "mousedown touchstart", this.mouseDownHandler);
      } else if (!this.disabled) {
        EventHandler2.add(this.canvasContext.canvas, "mousedown touchstart", this.mouseDownHandler, this);
      }
    };
    SignatureBase2.prototype.enableOrDisable = function(isDisable) {
      this.disabled = isDisable;
      if (isDisable) {
        this.canvasContext.canvas.style.filter = "opacity(0.5)";
        this.isRead(true);
      } else {
        this.canvasContext.canvas.style.filter = "";
        this.isRead(false);
      }
    };
    SignatureBase2.prototype.updateSnapCollection = function(isClear) {
      if (isNullOrUndefined2(this.incStep)) {
        this.incStep = -1;
        this.incStep++;
        this.snapColl = [];
        this.clearArray = [];
      } else {
        this.incStep++;
      }
      if (this.incStep < this.snapColl.length) {
        this.snapColl.length = this.incStep;
      }
      if (this.incStep > 0) {
        var canvasNew = this.createElement("canvas", {
          className: "e-" + this.getModuleName() + "-wrapper"
        });
        var canvasContextNew = canvasNew.getContext("2d");
        if (this.canvasContext) {
          canvasNew.width = this.canvasContext.canvas.width;
          canvasNew.height = this.canvasContext.canvas.height;
          canvasContextNew.drawImage(this.canvasContext.canvas, 0, 0, canvasNew.width, canvasNew.height);
          this.snapColl.push(canvasNew.toDataURL());
        }
      } else {
        this.snapColl.push(this.canvasContext.canvas.toDataURL());
      }
      if (isClear) {
        this.clearArray.push(this.incStep);
      }
    };
    SignatureBase2.prototype.setBackgroundImage = function(imageSrc, type) {
      var proxy = this;
      var imageObj = new Image();
      imageObj.crossOrigin = "anonymous";
      imageObj.src = imageSrc;
      if (type === "temp") {
        imageObj.onload = function() {
          proxy.tempContext.globalCompositeOperation = "source-over";
          proxy.tempContext.drawImage(imageObj, 0, 0, proxy.element.width, proxy.element.height);
        };
      } else {
        imageObj.onload = function() {
          proxy.canvasContext.globalCompositeOperation = "source-over";
          proxy.canvasContext.drawImage(imageObj, 0, 0, proxy.element.width, proxy.element.height);
          proxy.updateSnapCollection();
          proxy.saveBackground(true);
        };
        this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      }
    };
    SignatureBase2.prototype.setBackgroundColor = function(color) {
      var canvasEle = this.canvasContext;
      canvasEle.strokeStyle = color;
      var i;
      var j;
      for (i = 1; i <= canvasEle.canvas.width; i++) {
        for (j = 1; j <= canvasEle.canvas.height; j++) {
          canvasEle.strokeRect(0, 0, i, j);
        }
      }
      this.updateSnapCollection();
    };
    SignatureBase2.prototype.loadPersistedSignature = function() {
      if (isNullOrUndefined2(this.signatureValue)) {
        return;
      }
      var proxy = this;
      var lastImage = new Image();
      lastImage.src = this.signatureValue;
      lastImage.onload = function() {
        proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
        proxy.canvasContext.drawImage(lastImage, 0, 0);
        proxy.updateSnapCollection();
      };
      this.isSignatureEmpty = false;
    };
    SignatureBase2.prototype.getBlob = function(url) {
      var arr = url.split(",");
      var type = arr[0].match(/:(.*?);/)[1];
      var bstr = atob(arr[1]);
      var n = bstr.length;
      var u8arr = new Uint8Array(n);
      while (n--) {
        u8arr[n] = bstr.charCodeAt(n);
      }
      return new Blob([u8arr], {
        type
      });
    };
    SignatureBase2.prototype.download = function(blob, fileName) {
      var blobUrl = URL.createObjectURL(blob);
      var a = document.createElement("a");
      a.href = blobUrl;
      a.target = "_parent";
      a.download = fileName;
      (document.body || document.documentElement).appendChild(a);
      a.click();
      a.parentNode.removeChild(a);
    };
    SignatureBase2.prototype.internalRefresh = function() {
      this.pointColl = [];
      this.lastVelocity = 0;
      this.lastWidth = (this.minStrokeWidth + this.maxStrokeWidth) / 2;
    };
    SignatureBase2.prototype.refresh = function() {
      this.isResponsive = false;
      this.setHTMLProperties();
      this.resizeHandler();
      this.internalRefresh();
    };
    SignatureBase2.prototype.clear = function() {
      var args = {
        actionName: "clear"
      };
      this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      this.tempContext.clearRect(0, 0, this.tempContext.canvas.width, this.tempContext.canvas.height);
      if (this.saveWithBackground && this.backgroundImage) {
        this.setBackgroundImage(this.backgroundImage, "temp");
      }
      this.internalRefresh();
      this.signRatioPointsColl = [];
      this.updateSnapCollection(true);
      this.isSignatureEmpty = this.canRedraw = true;
      if (!this.isBlazor) {
        this.trigger("change", args);
      } else {
        this.dotnetRef.invokeMethodAsync("TriggerEventAsync", "Clear");
      }
    };
    SignatureBase2.prototype.undo = function() {
      var args = {
        actionName: "undo"
      };
      var proxy = this;
      if (this.incStep > 0) {
        this.incStep--;
        var undoImg_1 = new Image();
        undoImg_1.src = this.snapColl[this.incStep];
        undoImg_1.onload = function() {
          proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
          proxy.canvasContext.drawImage(undoImg_1, 0, 0, proxy.element.width, proxy.element.height);
        };
      }
      this.isClear();
      if (!this.isBlazor) {
        this.trigger("change", args);
      } else {
        this.dotnetRef.invokeMethodAsync("TriggerEventAsync", "Undo");
      }
    };
    SignatureBase2.prototype.redo = function() {
      var args = {
        actionName: "redo"
      };
      var proxy = this;
      if (this.incStep < this.snapColl.length - 1) {
        this.incStep++;
        var redoImg_1 = new Image();
        redoImg_1.src = this.snapColl[this.incStep];
        redoImg_1.onload = function() {
          proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
          proxy.canvasContext.drawImage(redoImg_1, 0, 0, proxy.element.width, proxy.element.height);
        };
      }
      this.isClear();
      if (!this.isBlazor) {
        this.trigger("change", args);
      } else {
        this.dotnetRef.invokeMethodAsync("TriggerEventAsync", "Redo");
      }
    };
    SignatureBase2.prototype.isClear = function() {
      if (this.clearArray) {
        var empty = false;
        for (var i = 0; i < this.clearArray.length; i++) {
          if (this.clearArray[i] === this.incStep) {
            this.isSignatureEmpty = true;
            empty = true;
          }
        }
        if (!empty) {
          this.isSignatureEmpty = false;
        }
      }
    };
    SignatureBase2.prototype.isEmpty = function() {
      return this.isSignatureEmpty;
    };
    SignatureBase2.prototype.canUndo = function() {
      return this.incStep > 0;
    };
    SignatureBase2.prototype.canRedo = function() {
      return this.incStep < this.snapColl.length - 1;
    };
    SignatureBase2.prototype.draw = function(text, fontFamily, fontSize, x, y) {
      var args = {
        actionName: "draw-text"
      };
      this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      fontFamily = fontFamily || "Arial";
      fontSize = fontSize || 30;
      this.canvasContext.font = fontSize + "px " + fontFamily;
      var startX = this.element.width / 2;
      var startY = this.element.height / 2;
      if (isNullOrUndefined2(x) && isNullOrUndefined2(y)) {
        this.canvasContext.textAlign = "center";
        this.canvasContext.textBaseline = "middle";
      } else {
        startX = isNullOrUndefined2(x) ? startX : x;
        startY = isNullOrUndefined2(y) ? startY + fontSize / 2 : y + fontSize / 2;
      }
      this.canvasContext.fillText(text, startX, startY);
      this.updateSnapCollection();
      this.isSignatureEmpty = false;
      this.trigger("change", args);
    };
    SignatureBase2.prototype.load = function(signature, width, height) {
      height = height || this.element.height;
      width = width || this.element.width;
      this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      var proxy = this;
      var bitmapImage = new Image();
      bitmapImage.src = signature;
      if (signature.slice(0, 4) !== "data") {
        bitmapImage.crossOrigin = "anonymous";
      }
      bitmapImage.onload = function() {
        Promise.all([createImageBitmap(bitmapImage, 0, 0, width, height)]).then(function(results) {
          var tempCanvas = document.createElement("canvas");
          tempCanvas.width = width;
          tempCanvas.height = height;
          tempCanvas.getContext("2d").drawImage(results[0], 0, 0);
          if (signature.slice(0, 4) !== "data") {
            proxy.canvasContext.globalCompositeOperation = "source-over";
          }
          proxy.canvasContext.drawImage(tempCanvas, 0, 0, width, height, 0, 0, proxy.element.width, proxy.element.height);
          proxy.updateSnapCollection();
        });
      };
      this.isSignatureEmpty = this.canRedraw = false;
    };
    SignatureBase2.prototype.saveBackground = function(savebg) {
      var imageSrc;
      if (savebg && this.backgroundImage) {
        imageSrc = this.snapColl[this.incStep - 1];
      } else {
        imageSrc = this.snapColl[this.incStep];
      }
      if (!savebg) {
        this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
        if (this.backgroundImage) {
          this.setBackgroundImage(this.backgroundImage);
        } else if (this.backgroundColor) {
          this.setBackgroundColor(this.backgroundColor);
          savebg = true;
        }
      }
      if (savebg) {
        var proxy_1 = this;
        var imageObj_1 = new Image();
        imageObj_1.crossOrigin = "anonymous";
        imageObj_1.src = imageSrc;
        imageObj_1.onload = function() {
          proxy_1.backgroundLoaded = true;
          proxy_1.canvasContext.globalCompositeOperation = "source-over";
          proxy_1.canvasContext.drawImage(imageObj_1, 0, 0, proxy_1.element.width, proxy_1.element.height);
          proxy_1.save(proxy_1.fileType, proxy_1.fileName);
        };
      }
    };
    SignatureBase2.prototype.save = function(type, fileName) {
      if (this.saveWithBackground && this.backgroundLoaded == null && (this.backgroundImage || this.backgroundColor)) {
        this.backgroundLoaded = false;
        this.fileType = type;
        this.fileName = fileName;
        this.saveBackground(false);
      } else if (type === "Svg") {
        fileName = fileName || "Signature";
        this.toSVG(fileName);
      } else if (type === "Jpeg") {
        fileName = fileName || "Signature";
        if (!this.saveWithBackground || this.saveWithBackground && !(this.backgroundImage || this.backgroundColor)) {
          this.toJPEG(fileName);
        } else {
          var dataURL = this.canvasContext.canvas.toDataURL("image/jpeg");
          this.download(this.getBlob(dataURL), fileName + ".jpeg");
        }
      } else {
        fileName = fileName || "Signature";
        var dataURL = this.canvasContext.canvas.toDataURL("image/png");
        this.download(this.getBlob(dataURL), fileName + ".png");
      }
      if (this.saveWithBackground && this.backgroundLoaded) {
        this.resetSnap();
      }
    };
    SignatureBase2.prototype.resetSnap = function() {
      this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      var proxy = this;
      var restoreObj = new Image();
      restoreObj.src = this.snapColl[this.incStep - 1];
      restoreObj.onload = function() {
        proxy.canvasContext.drawImage(restoreObj, 0, 0, proxy.element.width, proxy.element.height);
        proxy.updateSnapCollection();
      };
      this.backgroundLoaded = null;
      this.snapColl.pop();
      this.incStep--;
      this.snapColl.pop();
      this.incStep--;
    };
    SignatureBase2.prototype.toJPEG = function(fileName) {
      var _this = this;
      var imageSrc = this.snapColl[this.incStep];
      this.setBackgroundColor("#ffffff");
      var proxy = this;
      var imageObj = new Image();
      imageObj.crossOrigin = "anonymous";
      imageObj.src = imageSrc;
      imageObj.onload = function() {
        proxy.canvasContext.globalCompositeOperation = "source-over";
        proxy.canvasContext.drawImage(imageObj, 0, 0, proxy.element.width, proxy.element.height);
        var dataURL = proxy.canvasContext.canvas.toDataURL("image/jpeg");
        proxy.download(proxy.getBlob(dataURL), fileName + ".jpeg");
        proxy.canvasContext.clearRect(0, 0, proxy.canvasContext.canvas.width, proxy.canvasContext.canvas.height);
        _this.resizeHandler();
      };
      this.snapColl.pop();
      this.incStep--;
    };
    SignatureBase2.prototype.toSVG = function(fileName, dataUrl) {
      var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
      svg.setAttribute("width", this.canvasContext.canvas.width.toString());
      svg.setAttribute("height", this.canvasContext.canvas.height.toString());
      var XLinkNS = "http://www.w3.org/1999/xlink";
      var img = document.createElementNS("http://www.w3.org/2000/svg", "image");
      img.setAttributeNS(null, "height", this.canvasContext.canvas.height.toString());
      img.setAttributeNS(null, "width", this.canvasContext.canvas.width.toString());
      img.setAttributeNS(XLinkNS, "xlink:href", dataUrl);
      svg.appendChild(img);
      var prefix = "data:image/svg+xml;base64,";
      var header = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' width="' + this.canvasContext.canvas.width + '"') + (' height="' + this.canvasContext.canvas.height + '"') + ">";
      var footer = "</svg>";
      var body = svg.innerHTML;
      var data = header + body + footer;
      var svgDataUrl = prefix + btoa(data);
      if (fileName == null) {
        return svgDataUrl;
      } else {
        this.download(this.getBlob(svgDataUrl), fileName + ".svg");
        return null;
      }
    };
    SignatureBase2.prototype.saveAsBlob = function() {
      return this.getBlob(this.canvasContext.canvas.toDataURL("image/png"));
    };
    SignatureBase2.prototype.getSignature = function(type) {
      if (this.saveWithBackground && this.backgroundColor && !this.backgroundImage) {
        this.tempContext.fillStyle = this.backgroundColor;
        this.tempContext.fillRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      } else if (!this.backgroundColor && !this.backgroundImage && type === "Jpeg") {
        this.tempContext.fillStyle = "#fff";
        this.tempContext.fillRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
      }
      this.tempContext.drawImage(this.element, 0, 0);
      if (type === "Jpeg") {
        return this.tempCanvas.toDataURL("image/jpeg");
      } else if (type === "Svg") {
        return this.toSVG(null, this.tempCanvas.toDataURL("image/png"));
      } else {
        return this.tempCanvas.toDataURL("image/png");
      }
    };
    SignatureBase2.prototype.getModuleName = function() {
      return "signature";
    };
    SignatureBase2.prototype.getPersistData = function() {
      this.signatureValue = this.snapColl[this.incStep];
      return this.addOnPersist(["signatureValue"]);
    };
    SignatureBase2.prototype.destroy = function() {
      if (this.getModuleName() !== "image-editor") {
        this.unwireEvents(null);
        removeClass2([this.element], "e-" + this.getModuleName());
        this.element.removeAttribute("tabindex");
        this.pointColl = null;
        this.tempContext = null;
        this.tempCanvas = null;
        this.canvasContext = null;
      }
      _super.prototype.destroy.call(this);
      this.element = null;
    };
    SignatureBase2.prototype.propertyChanged = function(key, value) {
      var canvasNew = this.canvasContext;
      switch (key) {
        case "backgroundColor":
          canvasNew.canvas.style.backgroundColor = value;
          this.backgroundColor = value;
          break;
        case "backgroundImage":
          canvasNew.canvas.style.backgroundImage = "url(" + value + ")";
          this.backgroundImage = value;
          if (this.saveWithBackground) {
            this.setBackgroundImage(this.backgroundImage, "temp");
          }
          break;
        case "strokeColor":
          canvasNew.fillStyle = value;
          this.strokeColor = value;
          break;
        case "saveWithBackground":
          this.saveWithBackground = value;
          break;
        case "maxStrokeWidth":
          this.maxStrokeWidth = value;
          break;
        case "minStrokeWidth":
          this.minStrokeWidth = value;
          break;
        case "velocity":
          this.velocity = value;
          break;
        case "isReadOnly":
          this.isRead(value);
          break;
        case "disabled":
          this.enableOrDisable(value);
          break;
      }
    };
    return SignatureBase2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/signature/signature.js
var __extends66 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate64 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Signature = (
  /** @class */
  function(_super) {
    __extends66(Signature2, _super);
    function Signature2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Signature2.prototype.preRender = function() {
    };
    Signature2.prototype.render = function() {
      this.initialize();
    };
    Signature2.prototype.initialize = function() {
      this.element.setAttribute("role", "img");
      this.element.setAttribute("aria-label", "signature");
      addClass2([this.element], "e-" + this.getModuleName());
      _super.prototype.initialize.call(this, this.element);
      if (this.enablePersistence) {
        this.loadPersistedSignature();
      }
    };
    Signature2.prototype.getModuleName = function() {
      return _super.prototype.getModuleName.call(this);
    };
    Signature2.prototype.getPersistData = function() {
      return _super.prototype.getPersistData.call(this);
    };
    Signature2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "backgroundColor":
            _super.prototype.propertyChanged.call(this, prop, newProp.backgroundColor);
            break;
          case "backgroundImage":
            _super.prototype.propertyChanged.call(this, prop, newProp.backgroundImage);
            break;
          case "strokeColor":
            if (newProp.strokeColor !== oldProp.strokeColor) {
              _super.prototype.propertyChanged.call(this, prop, newProp.strokeColor);
            }
            break;
          case "maxStrokeWidth":
            if (newProp.maxStrokeWidth !== oldProp.maxStrokeWidth) {
              _super.prototype.propertyChanged.call(this, prop, newProp.maxStrokeWidth);
            }
            break;
          case "minStrokeWidth":
            if (newProp.minStrokeWidth !== oldProp.minStrokeWidth) {
              _super.prototype.propertyChanged.call(this, prop, newProp.minStrokeWidth);
            }
            break;
          case "velocity":
            if (newProp.velocity !== oldProp.velocity) {
              _super.prototype.propertyChanged.call(this, prop, newProp.velocity);
            }
            break;
          case "saveWithBackground":
            _super.prototype.propertyChanged.call(this, prop, newProp.saveWithBackground);
            break;
          case "isReadOnly":
            _super.prototype.propertyChanged.call(this, prop, newProp.isReadOnly);
            break;
          case "disabled":
            _super.prototype.propertyChanged.call(this, prop, newProp.disabled);
            break;
        }
      }
    };
    __decorate64([Property2("")], Signature2.prototype, "backgroundColor", void 0);
    __decorate64([Property2("")], Signature2.prototype, "backgroundImage", void 0);
    __decorate64([Property2(false)], Signature2.prototype, "disabled", void 0);
    __decorate64([Property2(false)], Signature2.prototype, "isReadOnly", void 0);
    __decorate64([Property2(true)], Signature2.prototype, "saveWithBackground", void 0);
    __decorate64([Property2("#000000")], Signature2.prototype, "strokeColor", void 0);
    __decorate64([Property2(0.5)], Signature2.prototype, "minStrokeWidth", void 0);
    __decorate64([Property2(2)], Signature2.prototype, "maxStrokeWidth", void 0);
    __decorate64([Property2(0.7)], Signature2.prototype, "velocity", void 0);
    __decorate64([Property2("en-US")], Signature2.prototype, "locale", void 0);
    __decorate64([Property2(false)], Signature2.prototype, "enableRtl", void 0);
    __decorate64([Property2(false)], Signature2.prototype, "enablePersistence", void 0);
    __decorate64([Event3()], Signature2.prototype, "beforeSave", void 0);
    __decorate64([Event3()], Signature2.prototype, "change", void 0);
    __decorate64([Event3()], Signature2.prototype, "created", void 0);
    Signature2 = __decorate64([NotifyPropertyChanges2], Signature2);
    return Signature2;
  }(SignatureBase)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/rating/rating.js
var __extends67 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate65 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ICONCSS = "e-rating-icon e-icons e-star-filled";
var ITEMLIST = "e-rating-item-list";
var ITEMCONTAINER = "e-rating-item-container";
var SELECTED = "e-rating-selected";
var INTERMEDIATE = "e-rating-intermediate";
var LABEL5 = "e-rating-label";
var RESET = "e-icons e-reset";
var HIDDEN = "e-rating-hidden";
var DISABLED9 = "e-disabled";
var READONLY = "e-rating-readonly";
var RTL14 = "e-rtl";
var ANIMATION = "e-rating-animation";
var FULLTEMPLATE = "e-rating-full";
var EMPTYTEMPLATE = "e-rating-empty";
var SELECTEDVALUE = "e-selected-value";
var RATINGVALUE = "--rating-value";
var LabelPosition;
(function(LabelPosition2) {
  LabelPosition2["Top"] = "Top";
  LabelPosition2["Bottom"] = "Bottom";
  LabelPosition2["Left"] = "Left";
  LabelPosition2["Right"] = "Right";
})(LabelPosition || (LabelPosition = {}));
var PrecisionType;
(function(PrecisionType2) {
  PrecisionType2["Full"] = "Full";
  PrecisionType2["Half"] = "Half";
  PrecisionType2["Quarter"] = "Quarter";
  PrecisionType2["Exact"] = "Exact";
})(PrecisionType || (PrecisionType = {}));
var Rating = (
  /** @class */
  function(_super) {
    __extends67(Rating2, _super);
    function Rating2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.itemElements = [];
      return _this;
    }
    Rating2.prototype.preRender = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
      this.keyConfigs = {
        downarrow: "downarrow",
        leftarrow: "leftarrow",
        rightarrow: "rightarrow",
        uparrow: "uparrow",
        space: "space"
      };
      this.tooltipOpen = false;
      this.isTouchSelected = false;
      if (closest2(this.element, "form") && this.element.getAttribute("value")) {
        this.setProperties({
          value: this.element.getAttribute("value")
        }, true);
      }
    };
    Rating2.prototype.render = function() {
      this.initialize();
      this.updateMinValue();
      this.updateTemplateFunction();
      this.triggerChange(null, this.value, false, true);
      this.renderItems();
      this.displayLabel();
    };
    Rating2.prototype.initialize = function() {
      this.wrapper = this.createElement("div", {
        className: "e-" + this.getModuleName() + "-container "
      });
      this.element.parentNode.insertBefore(this.wrapper, this.element);
      this.wrapper.appendChild(this.element);
      if (this.element.getAttribute("name") == null) {
        this.element.setAttribute("name", this.element.id);
      }
      attributes2(this.element, {
        "aria-label": "rating"
      });
      this.renderItemList();
      this.updateReset();
      if (this.readOnly) {
        this.wrapper.classList.add(READONLY);
      }
      if (!this.visible) {
        this.wrapper.classList.add(HIDDEN);
      }
      if (this.enableRtl) {
        this.wrapper.classList.add(RTL14);
      }
      if (this.enableAnimation) {
        this.wrapper.classList.add(ANIMATION);
      }
      if (this.cssClass) {
        addClass2([this.wrapper], this.cssClass.split(" "));
      }
      this.updateTooltip();
      this.wireKeyboardEvent();
      this.updateDisabled();
    };
    Rating2.prototype.updateDisabled = function() {
      this.wrapper.classList[this.disabled ? "add" : "remove"](DISABLED9);
      attributes2(this.ratingItemList, {
        "tabindex": this.disabled ? "-1" : "0"
      });
      this.updateResetButton();
    };
    Rating2.prototype.updateResetButton = function() {
      if (this.allowReset) {
        var isDisabled = this.value <= this.min || this.disabled;
        this.resetElement.classList[isDisabled ? "add" : "remove"](DISABLED9);
        attributes2(this.resetElement, {
          "tabindex": isDisabled ? "-1" : "0",
          "aria-hidden": isDisabled.toString()
        });
      }
    };
    Rating2.prototype.renderItemList = function() {
      var _this = this;
      this.ratingItemList = this.createElement("div", {
        className: ITEMLIST,
        id: this.element.id + "_item-list"
      });
      attributes2(this.ratingItemList, {
        "aria-label": "rating",
        "role": "slider"
      });
      this.wrapper.appendChild(this.ratingItemList);
      EventHandler2.add(this.ratingItemList, "touchmove", function(e) {
        return _this.touchMoveHandler(e);
      }, this);
      EventHandler2.add(this.ratingItemList, Browser2.touchEndEvent, this.touchEndHandler, this);
    };
    Rating2.prototype.touchMoveHandler = function(e) {
      if (!this.isTouchSelected) {
        this.wrapper.classList.add("e-rating-touch");
        this.isTouchSelected = true;
      }
      this.wrapper.classList.add("e-touch-select");
      var rect = this.ratingItemList.getBoundingClientRect();
      var x = e.touches[0].clientX - rect.x;
      var currValue = x / rect.width * this.itemsCount;
      currValue = this.enableRtl ? this.itemsCount - currValue : currValue;
      currValue = currValue < this.min ? this.min : currValue > this.itemsCount ? this.itemsCount : currValue;
      currValue = this.validateValue(currValue);
      var element2 = currValue === 0 ? null : this.itemElements[parseInt((Math.ceil(currValue) - 1).toString(), 10)];
      if (currValue === this.currentValue) {
        if (this.showTooltip && element2) {
          this.openRatingTooltip(element2, false);
        }
        return;
      }
      var previousValue = this.currentValue;
      this.triggerChange(e, currValue);
      this.updateCurrentValue(currValue);
      if (this.showTooltip) {
        if (element2) {
          if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
            this.closeRatingTooltip();
          }
          this.openRatingTooltip(element2, true);
        } else {
          this.closeRatingTooltip();
        }
      }
    };
    Rating2.prototype.touchEndHandler = function() {
      this.closeRatingTooltip();
      this.wrapper.classList.remove("e-touch-select");
    };
    Rating2.prototype.updateTemplateFunction = function() {
      this.emptyTemplateFunction = this.emptyTemplate ? this.getTemplateString(this.emptyTemplate) : null;
      this.fullTemplateFunction = this.fullTemplate ? this.getTemplateString(this.fullTemplate) : null;
    };
    Rating2.prototype.renderItems = function() {
      var _this = this;
      for (var i = 0; i < this.itemsCount; i++) {
        var ratingItemContainer = this.createElement("span", {
          className: ITEMCONTAINER
        });
        var spanItem = this.createElement("span", {
          className: "e-rating-item"
        });
        var ratingValue = this.getRatingValue(this.value, i);
        this.renderItemContent(spanItem, ratingValue, i, false);
        ratingItemContainer.appendChild(spanItem);
        this.wireItemsEvents(ratingItemContainer, i + 1);
        this.itemElements.push(ratingItemContainer);
        var eventArgs = {
          element: ratingItemContainer,
          value: i + 1
        };
        this.trigger("beforeItemRender", eventArgs, function(args) {
          _this.ratingItemList.appendChild(args.element);
        });
      }
      attributes2(this.ratingItemList, {
        "aria-valuemax": this.itemsCount.toString()
      });
      this.updateItemValue(false);
    };
    Rating2.prototype.renderItemContent = function(spanEle, val, index, isrerender) {
      if (isrerender) {
        this.removeItemContent(spanEle);
      }
      if (this.fullTemplate && val === 1) {
        spanEle.classList.add(FULLTEMPLATE);
        append(this.fullTemplateFunction({
          index,
          ratingValue: val
        }, this, "ratingFullTemplate", this.element.id + "fullTemplate", this.isStringTemplate), spanEle);
      } else if (this.emptyTemplate) {
        spanEle.classList.add(EMPTYTEMPLATE);
        append(this.emptyTemplateFunction({
          index,
          ratingValue: val
        }, this, "ratingEmptyTemplate", this.element.id + "emptyTemplate", this.isStringTemplate), spanEle);
      } else {
        addClass2([spanEle], ICONCSS.split(" "));
      }
    };
    Rating2.prototype.removeItemContent = function(spanEle) {
      spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
      removeClass2([spanEle], ICONCSS.split(" "));
      if (spanEle.firstChild) {
        spanEle.innerHTML = "";
      }
    };
    Rating2.prototype.updateTooltip = function() {
      if (this.showTooltip) {
        this.tooltipObj = new Tooltip({
          target: ".e-rating-item-container",
          windowCollision: true,
          opensOn: "Custom",
          cssClass: this.cssClass ? "e-rating-tooltip " + this.cssClass : "e-rating-tooltip"
        });
        this.tooltipObj.appendTo(this.ratingItemList);
      } else {
        if (!isNullOrUndefined2(this.tooltipObj)) {
          this.tooltipObj.destroy();
          this.tooltipObj = null;
        }
      }
    };
    Rating2.prototype.updateMinValue = function() {
      this.setProperties({
        min: this.validateValue(this.min)
      }, true);
      if (this.min > 0 && this.value < this.min) {
        this.triggerChange(null, this.min, false);
      }
      attributes2(this.ratingItemList, {
        "aria-valuemin": this.min.toString()
      });
    };
    Rating2.prototype.validateValue = function(currentValue) {
      if (currentValue > this.itemsCount) {
        currentValue = this.itemsCount;
      } else if (currentValue < 0) {
        currentValue = 0;
      } else {
        currentValue = this.precision === PrecisionType.Full || this.enableSingleSelection ? Math.round(currentValue) : this.precision === PrecisionType.Half ? Math.round(currentValue * 2) / 2 : this.precision === PrecisionType.Quarter ? Math.round(currentValue * 4) / 4 : Math.round(currentValue * 10) / 10;
      }
      return currentValue;
    };
    Rating2.prototype.getRatingValue = function(value, i) {
      return this.enableSingleSelection ? value > i && value <= i + 1 ? 1 : 0 : value >= i + 1 ? 1 : value < i ? 0 : value - i;
    };
    Rating2.prototype.updateItemValue = function(isUpdate) {
      if (isUpdate === void 0) {
        isUpdate = true;
      }
      if (isUpdate && this.isReact) {
        this.clearTemplate(["ratingEmptyTemplate", "ratingFullTemplate"]);
      }
      for (var i = 0; i < this.itemsCount; i++) {
        var itemElement = this.itemElements[parseInt(i.toString(), 10)];
        itemElement.classList.remove(SELECTED, INTERMEDIATE, SELECTEDVALUE);
        var ratingValue = this.getRatingValue(this.currentValue, i);
        if (ratingValue === 1) {
          itemElement.classList.add(SELECTED);
        } else if (ratingValue > 0) {
          itemElement.classList.add(INTERMEDIATE);
        } else if (this.precision === PrecisionType.Full && i + 1 <= this.value && !this.enableSingleSelection) {
          itemElement.classList.add(SELECTEDVALUE);
        }
        if (isUpdate) {
          this.updateItemContent(ratingValue, i);
        }
        itemElement.style.setProperty(RATINGVALUE, ratingValue * 100 + "%");
        itemElement.classList[this.value === 0 && i === 0 || this.value === i + 1 || ratingValue > 0 && ratingValue < 1 ? "add" : "remove"]("e-rating-focus");
      }
      if (isUpdate) {
        this.renderReactTemplates();
      }
      this.updateResetButton();
      attributes2(this.ratingItemList, {
        "aria-valuenow": this.currentValue.toString()
      });
      attributes2(this.element, {
        "value": this.value.toString()
      });
    };
    Rating2.prototype.updateItemContent = function(ratingValue, index) {
      if (!this.fullTemplate && !this.emptyTemplate) {
        return;
      }
      var spanEle = this.itemElements[parseInt(index.toString(), 10)].querySelector(".e-rating-item");
      if (this.fullTemplate && ratingValue === 1) {
        if (!this.isReact && spanEle.classList.contains(FULLTEMPLATE)) {
          return;
        }
        this.removeItemContent(spanEle);
        spanEle.classList.add(FULLTEMPLATE);
        append(this.fullTemplateFunction({
          ratingValue,
          index
        }, this, "ratingFullTemplate", this.element.id + "fullTemplate" + index, this.isStringTemplate), spanEle);
      } else if (this.emptyTemplate) {
        if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
          return;
        }
        this.removeItemContent(spanEle);
        spanEle.classList.add(EMPTYTEMPLATE);
        append(this.emptyTemplateFunction({
          ratingValue,
          index
        }, this, "ratingEmptyTemplate", this.element.id + "emptyTemplate" + index, this.isStringTemplate), spanEle);
      } else {
        this.removeItemContent(spanEle);
        addClass2([spanEle], ICONCSS.split(" "));
      }
    };
    Rating2.prototype.updateTooltipContent = function(isChange) {
      var _this = this;
      if (this.showTooltip) {
        if (this.isReact) {
          this.clearTemplate(["ratingTooltipTemplate"]);
        }
        var content_1;
        if (this.tooltipTemplate) {
          content_1 = this.createElement("span", {
            className: "e-rating-tooltip-content"
          });
          var templateFunction = this.getTemplateString(this.tooltipTemplate);
          append(templateFunction({
            value: this.currentValue
          }, this, "ratingTooltipTemplate", this.element.id + "tooltipTemplate", this.isStringTemplate), content_1);
          this.tooltipObj.setProperties({
            content: content_1
          }, isChange);
          if (this.isAngular) {
            setTimeout(function() {
              var ratingSpan = _this.ratingItemList.querySelectorAll("." + ITEMCONTAINER + "." + SELECTED);
              _this.tooltipObj.refresh(ratingSpan[ratingSpan.length - 1]);
            });
          }
        } else {
          content_1 = this.currentValue.toString();
          this.tooltipObj.setProperties({
            content: initializeCSPTemplate(function() {
              return content_1;
            })
          }, isChange);
        }
        this.renderReactTemplates();
      }
    };
    Rating2.prototype.getTemplateString = function(template) {
      var stringContent = "";
      try {
        if (typeof template !== "function") {
          var tempEle = select2(template);
          if (tempEle) {
            stringContent = tempEle.tagName === "SCRIPT" ? tempEle.innerHTML : tempEle.outerHTML;
          } else {
            stringContent = template;
          }
        } else {
          stringContent = template;
        }
      } catch (e) {
        stringContent = template;
      }
      return compile4(stringContent);
    };
    Rating2.prototype.displayLabel = function() {
      if (this.showLabel) {
        this.spanLabel = this.createElement("span", {
          className: LABEL5
        });
        this.updateLabel();
        this.updateLabelPosition();
      } else {
        if (this.wrapper.contains(this.spanLabel)) {
          remove(this.spanLabel);
          this.spanLabel = null;
        }
      }
    };
    Rating2.prototype.updateLabel = function() {
      if (this.showLabel) {
        if (this.labelTemplate) {
          if (this.isReact) {
            this.clearTemplate(["ratingLabelTemplate"]);
          }
          if (this.spanLabel.firstChild) {
            this.spanLabel.innerHTML = "";
          }
          var templateFunction = this.getTemplateString(this.labelTemplate);
          append(templateFunction({
            value: this.currentValue
          }, this, "ratingLabelTemplate", this.element.id + "labelTemplate", this.isStringTemplate), this.spanLabel);
          this.renderReactTemplates();
        } else {
          this.spanLabel.textContent = this.currentValue + " / " + this.itemsCount;
        }
      }
    };
    Rating2.prototype.updateReset = function() {
      if (this.allowReset) {
        this.resetElement = this.createElement("span", {
          className: RESET,
          attrs: {
            "aria-label": "resetbutton",
            "role": "button"
          }
        });
        this.updateResetButton();
        EventHandler2.add(this.resetElement, "click", this.resetClicked, this);
        this.wrapper.insertBefore(this.resetElement, this.ratingItemList);
      } else {
        if (this.wrapper.contains(this.resetElement)) {
          remove(this.resetElement);
          this.resetElement = null;
        }
      }
    };
    Rating2.prototype.updateLabelPosition = function() {
      this.clearLabelPosition();
      this.spanLabel.classList.add("e-label-" + this.labelPosition.toLowerCase());
      if (this.labelPosition === "Left" || this.labelPosition === "Top") {
        this.wrapper.firstChild.after(this.spanLabel);
      } else {
        this.wrapper.appendChild(this.spanLabel);
      }
    };
    Rating2.prototype.clearLabelPosition = function() {
      var removeCss = this.spanLabel.classList.value.match(/(e-label-[top|bottom|right|left]+)/g);
      if (removeCss) {
        removeClass2([this.spanLabel], removeCss);
      }
    };
    Rating2.prototype.wireItemsEvents = function(itemElement, index) {
      var _this = this;
      EventHandler2.add(itemElement, "click", function(e) {
        return _this.clickHandler(e);
      }, this);
      EventHandler2.add(itemElement, "mousemove", function(e) {
        return _this.mouseMoveHandler(index, e);
      }, this);
      EventHandler2.add(itemElement, "mouseleave", this.mouseLeaveHandler, this);
    };
    Rating2.prototype.clickHandler = function(e) {
      this.currentValue = this.min > 0 && this.currentValue < this.min ? this.min : this.currentValue;
      this.triggerChange(e, this.currentValue);
      this.updateItemValue();
      this.updateLabel();
      this.updateResetButton();
    };
    Rating2.prototype.updateValueChange = function(e, val, isInteracted) {
      if (isInteracted === void 0) {
        isInteracted = true;
      }
      this.triggerChange(e, val, isInteracted);
      this.updateItemValue();
      this.updateLabel();
    };
    Rating2.prototype.triggerChange = function(e, val, isInteracted, isInitial) {
      if (isInteracted === void 0) {
        isInteracted = true;
      }
      if (isInitial === void 0) {
        isInitial = false;
      }
      var ratingObj = this;
      val = this.validateValue(val);
      this.currentValue = val;
      if (this.currentValue === this.value) {
        return;
      }
      var eventArgs = {
        event: e,
        isInteracted,
        value: val,
        previousValue: this.value
      };
      this.setProperties({
        value: val
      }, true);
      if (this.isAngular && !isInitial) {
        ratingObj.localChange({
          value: val
        });
      }
      if (!isInitial) {
        this.trigger("valueChanged", eventArgs);
      }
    };
    Rating2.prototype.mouseMoveHandler = function(index, e) {
      if (this.isTouchSelected) {
        this.wrapper.classList.remove("e-rating-touch");
        this.isTouchSelected = false;
      }
      var currValue = this.calculateCurrentValue(index, e);
      currValue = this.validateValue(currValue);
      var element2 = this.itemElements[parseInt((index - 1).toString(), 10)];
      if (currValue === this.currentValue) {
        this.openRatingTooltip(element2, false);
        return;
      }
      this.updateCurrentValue(currValue);
      this.openRatingTooltip(element2, true);
      var eventArgs = {
        element: element2,
        event: e,
        value: currValue
      };
      this.trigger("onItemHover", eventArgs);
    };
    Rating2.prototype.openRatingTooltip = function(element2, isChange) {
      if (this.showTooltip) {
        if (!this.tooltipOpen) {
          this.updateTooltipContent(false);
          this.tooltipObj.open(element2);
          this.tooltipOpen = true;
        } else if (isChange) {
          this.updateTooltipContent(true);
          this.tooltipObj.refresh(element2);
        }
      }
    };
    Rating2.prototype.closeRatingTooltip = function() {
      if (this.tooltipOpen) {
        this.tooltipObj.close();
        this.tooltipOpen = false;
      }
    };
    Rating2.prototype.updateCurrentValue = function(currValue) {
      this.currentValue = currValue;
      this.updateItemValue();
      this.updateLabel();
    };
    Rating2.prototype.mouseLeaveHandler = function() {
      this.closeRatingTooltip();
      this.updateCurrentValue(this.value);
    };
    Rating2.prototype.calculateCurrentValue = function(index, args) {
      var currentValue = index;
      if (!(this.enableSingleSelection || this.precision === PrecisionType.Full)) {
        currentValue = args.offsetX / this.itemElements[index - 1].clientWidth;
        currentValue = this.enableRtl ? 1 - currentValue : currentValue;
        if (this.precision === PrecisionType.Quarter) {
          currentValue = currentValue <= 0.25 ? 0.25 : currentValue <= 0.5 ? 0.5 : currentValue < 0.75 ? 0.75 : 1;
        } else if (this.precision === PrecisionType.Half) {
          currentValue = currentValue <= 0.5 ? 0.5 : 1;
        }
        currentValue = currentValue + index - 1;
      }
      return currentValue;
    };
    Rating2.prototype.reset = function() {
      this.resetClicked(null, false);
    };
    Rating2.prototype.resetClicked = function(e, isInteracted) {
      if (isInteracted === void 0) {
        isInteracted = true;
      }
      this.updateValueChange(e, this.min, isInteracted);
      this.updateResetButton();
    };
    Rating2.prototype.wireKeyboardEvent = function() {
      this.keyboardModuleRating = new KeyboardEvents2(this.wrapper, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    Rating2.prototype.keyActionHandler = function(e) {
      e.preventDefault();
      if (this.disabled || this.readOnly) {
        return;
      }
      if (e.target.classList.contains(ITEMLIST)) {
        switch (e.action) {
          case "uparrow":
            this.handleNavigation(e, true);
            break;
          case "downarrow":
            this.handleNavigation(e, false);
            break;
          case "leftarrow":
            this.handleNavigation(e, this.enableRtl);
            break;
          case "rightarrow":
            this.handleNavigation(e, !this.enableRtl);
            break;
        }
      }
      if (this.allowReset && e.target.classList.contains("e-reset")) {
        switch (e.action) {
          case "space":
            this.resetClicked(e);
            break;
        }
      }
    };
    Rating2.prototype.handleNavigation = function(e, isIncrease) {
      if (!isIncrease && this.value > this.min || isIncrease && this.value < this.itemsCount) {
        var currentValue = this.precision === PrecisionType.Full || this.enableSingleSelection ? 1 : this.precision === PrecisionType.Half ? 0.5 : this.precision === PrecisionType.Quarter ? 0.25 : Math.round(0.1 * 10) / 10;
        currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
        this.updateValueChange(e, currentValue);
        this.updateResetButton();
      }
    };
    Rating2.prototype.updateContent = function() {
      if (this.isReact) {
        this.clearTemplate(["ratingEmptyTemplate", "ratingFullTemplate"]);
      }
      for (var i = 0; i < this.itemsCount; i++) {
        var itemElement = this.itemElements[parseInt(i.toString(), 10)].firstElementChild;
        this.renderItemContent(itemElement, this.getRatingValue(this.value, i), i, true);
      }
    };
    Rating2.prototype.getModuleName = function() {
      return "rating";
    };
    Rating2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Rating2.prototype.removeItemElements = function() {
      for (var i = 0; i < this.itemElements.length; i++) {
        remove(this.itemElements[parseInt(i.toString(), 10)]);
      }
      this.itemElements = [];
    };
    Rating2.prototype.destroy = function() {
      var _this = this;
      _super.prototype.destroy.call(this);
      this.removeItemElements();
      this.clearTemplate();
      if (this.spanLabel) {
        remove(this.spanLabel);
        this.spanLabel = null;
      }
      if (this.resetElement) {
        remove(this.resetElement);
        this.resetElement = null;
      }
      if (this.showTooltip) {
        this.tooltipObj.destroy();
        this.tooltipObj = null;
      }
      remove(this.ratingItemList);
      this.ratingItemList = null;
      this.wrapper.parentNode.insertBefore(this.element, this.wrapper);
      remove(this.wrapper);
      this.wrapper = null;
      this.keyboardModuleRating.destroy();
      this.keyboardModuleRating = null;
      ["value", "aria-label", "name"].forEach(function(attr) {
        _this.element.removeAttribute(attr);
      });
    };
    Rating2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "value":
            this.updateValueChange(null, this.value > this.min ? this.value : this.min, false);
            break;
          case "min":
            this.updateMinValue();
            this.updateItemValue();
            this.updateLabel();
            break;
          case "showLabel":
            this.displayLabel();
            break;
          case "visible":
            this.wrapper.classList[!this.visible ? "add" : "remove"](HIDDEN);
            break;
          case "disabled":
            this.updateDisabled();
            break;
          case "readOnly":
            this.wrapper.classList[this.readOnly ? "add" : "remove"](READONLY);
            break;
          case "allowReset":
            this.updateReset();
            break;
          case "enableRtl":
            this.wrapper.classList[this.enableRtl ? "add" : "remove"](RTL14);
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.wrapper], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([this.wrapper], newProp.cssClass.split(" "));
            }
            if (this.tooltipObj) {
              this.tooltipObj.setProperties({
                cssClass: this.cssClass ? "e-rating-tooltip " + this.cssClass : "e-rating-tooltip"
              });
            }
            break;
          case "labelPosition":
            this.updateLabelPosition();
            break;
          case "showTooltip":
            this.updateTooltip();
            break;
          case "precision":
            this.updateMinValue();
            this.triggerChange(null, this.value, false);
            this.updateItemValue();
            this.updateLabel();
            break;
          case "enableSingleSelection":
            this.updateValueChange(null, this.currentValue, false);
            break;
          case "enableAnimation":
            this.wrapper.classList[this.enableAnimation ? "add" : "remove"](ANIMATION);
            break;
          case "emptyTemplate":
          case "fullTemplate":
            this.updateTemplateFunction();
            this.updateContent();
            break;
          case "labelTemplate":
            this.updateLabel();
            break;
          case "itemsCount":
            this.removeItemElements();
            this.renderItems();
            this.updateLabel();
            break;
        }
      }
    };
    __decorate65([Property2(false)], Rating2.prototype, "allowReset", void 0);
    __decorate65([Property2("")], Rating2.prototype, "cssClass", void 0);
    __decorate65([Property2(false)], Rating2.prototype, "disabled", void 0);
    __decorate65([Property2("")], Rating2.prototype, "emptyTemplate", void 0);
    __decorate65([Property2(true)], Rating2.prototype, "enableAnimation", void 0);
    __decorate65([Property2(false)], Rating2.prototype, "enableSingleSelection", void 0);
    __decorate65([Property2("")], Rating2.prototype, "fullTemplate", void 0);
    __decorate65([Property2(5)], Rating2.prototype, "itemsCount", void 0);
    __decorate65([Property2(LabelPosition.Right)], Rating2.prototype, "labelPosition", void 0);
    __decorate65([Property2("")], Rating2.prototype, "labelTemplate", void 0);
    __decorate65([Property2(0)], Rating2.prototype, "min", void 0);
    __decorate65([Property2(PrecisionType.Full)], Rating2.prototype, "precision", void 0);
    __decorate65([Property2(false)], Rating2.prototype, "readOnly", void 0);
    __decorate65([Property2(false)], Rating2.prototype, "showLabel", void 0);
    __decorate65([Property2(true)], Rating2.prototype, "showTooltip", void 0);
    __decorate65([Property2("")], Rating2.prototype, "tooltipTemplate", void 0);
    __decorate65([Property2(0)], Rating2.prototype, "value", void 0);
    __decorate65([Property2(true)], Rating2.prototype, "visible", void 0);
    __decorate65([Event3()], Rating2.prototype, "beforeItemRender", void 0);
    __decorate65([Event3()], Rating2.prototype, "created", void 0);
    __decorate65([Event3()], Rating2.prototype, "onItemHover", void 0);
    __decorate65([Event3()], Rating2.prototype, "valueChanged", void 0);
    Rating2 = __decorate65([NotifyPropertyChanges2], Rating2);
    return Rating2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-inputs/src/otp-input/otp-input.js
var __extends68 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate66 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var INPUTFIELD = "e-otp-input-field";
var RTL15 = "e-rtl";
var OtpInputType;
(function(OtpInputType2) {
  OtpInputType2["Number"] = "number";
  OtpInputType2["Text"] = "text";
  OtpInputType2["Password"] = "password";
})(OtpInputType || (OtpInputType = {}));
var OtpInputStyle;
(function(OtpInputStyle2) {
  OtpInputStyle2["Outlined"] = "outlined";
  OtpInputStyle2["Underlined"] = "underlined";
  OtpInputStyle2["Filled"] = "filled";
})(OtpInputStyle || (OtpInputStyle = {}));
var TextTransform;
(function(TextTransform2) {
  TextTransform2["None"] = "none";
  TextTransform2["Uppercase"] = "uppercase";
  TextTransform2["Lowercase"] = "lowercase";
})(TextTransform || (TextTransform = {}));
var OtpInput = (
  /** @class */
  function(_super) {
    __extends68(OtpInput2, _super);
    function OtpInput2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.inputs = [];
      _this.previousValue = "";
      _this.separatorElements = [];
      _this.shouldFireFocus = true;
      _this.shouldFireBlur = true;
      _this.isFocusInCalled = false;
      _this.isFocusOutCalled = false;
      _this.handleWheelEvent = function(e) {
        e.preventDefault();
      };
      return _this;
    }
    OtpInput2.prototype.preRender = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
    };
    OtpInput2.prototype.render = function() {
      this.initialize();
    };
    OtpInput2.prototype.initialize = function() {
      attributes2(this.element, {
        "role": "group"
      });
      this.renderInputs();
      this.renderSeparator(1, this.inputs.length);
      this.addPlaceHolder();
      this.updateCssClass(this.cssClass);
      this.updateVariantClass();
      this.updateAriaLabel(this.ariaLabels);
      this.setElementAttributes(this.htmlAttributes, this.element);
      if (this.enableRtl) {
        this.element.classList.add(RTL15);
      }
      this.previousValue = this.value.toString();
      if (this.autoFocus) {
        this.focusIn();
      }
    };
    OtpInput2.prototype.renderInputs = function() {
      this.hiddenInputEle = this.createElement("input", {
        id: "otpInput_hidden",
        attrs: {
          name: this.element.id,
          type: "hidden",
          value: this.type === "number" ? this.value.toString().replace(/\D/g, "") : this.value.toString(),
          autoComplete: "off"
        }
      });
      this.element.appendChild(this.hiddenInputEle);
      for (var i = 0; i < this.length; i++) {
        this.createOtpInput(i);
      }
    };
    OtpInput2.prototype.createOtpInput = function(index) {
      var valueContainer = this.getDefaultValue();
      var inputValue = "";
      if (valueContainer) {
        var valueAtIndex = valueContainer[parseInt(index.toString(), 10)];
        if (this.type === "number") {
          if (!isNaN(Number(valueAtIndex))) {
            inputValue = valueAtIndex;
          }
        } else {
          inputValue = valueAtIndex || "";
        }
      }
      var inputEle = this.createElement("input", {
        id: this.element.id + "-" + (index + 1),
        className: INPUTFIELD + " e-input",
        attrs: {
          maxlength: "1",
          type: this.type,
          inputmode: this.htmlAttributes["inputmode"] || (this.type === "number" ? "numeric" : "text")
        }
      });
      if (this.disabled) {
        inputEle.setAttribute("disabled", "disabled");
      }
      this.element.appendChild(inputEle);
      this.inputs.push(inputEle);
      if (inputValue) {
        inputEle.value = inputValue;
      }
      this.wireEvents(inputEle, index);
    };
    OtpInput2.prototype.renderSeparator = function(index, length) {
      if (this.separator.length > 0) {
        for (var i = index; i < length; i++) {
          var separatorElement = this.createElement("span", {
            className: "e-otp-separator"
          });
          separatorElement.textContent = this.separator;
          this.separatorElements.push(separatorElement);
          this.element.insertBefore(separatorElement, this.inputs[parseInt(i.toString(), 10)]);
        }
      }
    };
    OtpInput2.prototype.updateSeparatorValue = function() {
      var _this = this;
      if (this.separator === "") {
        this.separatorElements.forEach(function(element2) {
          return remove(element2);
        });
        this.separatorElements = [];
      } else {
        this.separatorElements.forEach(function(element2) {
          element2.textContent = _this.separator;
        });
      }
    };
    OtpInput2.prototype.addPlaceHolder = function() {
      for (var i = 0; i < this.inputs.length; i++) {
        var placeholderValue = this.placeholder.length <= 1 ? this.placeholder : this.placeholder.charAt(i);
        this.setElementAttributes({
          "placeholder": placeholderValue
        }, this.inputs[parseInt(i.toString(), 10)]);
      }
    };
    OtpInput2.prototype.updateInputType = function(inputType) {
      var inputMode = this.htmlAttributes["inputmode"] || (inputType === "number" ? "numeric" : "text");
      this.inputs.forEach(function(input2) {
        input2.type = inputType;
        input2.setAttribute("inputmode", inputMode);
      });
    };
    OtpInput2.prototype.getDefaultValue = function() {
      var extractedValue = typeof this.value === "number" ? this.value.toString() : this.value;
      if (this.textTransform) {
        extractedValue = this.getTransformedText(extractedValue);
      }
      var value = extractedValue.replace(/\s/g, "");
      return value.length > 0 ? value.split("") : void 0;
    };
    OtpInput2.prototype.getTransformedText = function(transformingText) {
      var transformedText = this.textTransform.toLowerCase() === TextTransform.Lowercase ? transformingText.toLowerCase() : this.textTransform.toLowerCase() === TextTransform.Uppercase ? transformingText.toUpperCase() : transformingText;
      return transformedText;
    };
    OtpInput2.prototype.handleInputChange = function(index, event2) {
      var currentInputElement = this.inputs[parseInt(index.toString(), 10)];
      if (currentInputElement && index < this.length - 1 && currentInputElement.value.length > 0) {
        var nextInputElement = this.inputs[parseInt(index.toString(), 10) + 1];
        this.shouldFireFocus = this.shouldFireBlur = false;
        nextInputElement.focus();
        if (nextInputElement && nextInputElement.value.length > 0) {
          nextInputElement.select();
        }
      }
      var target = event2.target;
      if (target.value.length > 1) {
        target.value = target.value.slice(0, 1);
      }
      if (this.textTransform) {
        target.value = this.getTransformedText(target.value);
      }
      this.triggerInputEvent(index, event2);
      this.triggerValuechanged(event2, true);
    };
    OtpInput2.prototype.handleKeyAction = function(index, event2) {
      if (event2.key.length > 1 && !(index === 0 && event2.key === "Backspace" || index === this.length - 1 && event2.key === "Delete")) {
        this.shouldFireFocus = this.shouldFireBlur = false;
      }
      var currentInputElement = this.inputs[parseInt(index.toString(), 10)];
      var previousInputElement = this.inputs[parseInt(index.toString(), 10) - 1];
      var nextInputElement = this.inputs[parseInt(index.toString(), 10) + 1];
      if (event2.key === "Delete") {
        var value = "";
        if (currentInputElement.value.length > 0) {
          value = currentInputElement.value;
          currentInputElement.value = "";
        } else if (index !== this.inputs.length - 1) {
          value = nextInputElement.value;
          nextInputElement.value = "";
          nextInputElement.focus();
        }
        if (value.length > 0) {
          this.triggerInputEvent(index, event2);
        }
      } else if (event2.key === "Backspace") {
        if (index !== 0 && currentInputElement.value.length === 0) {
          var previousValue = previousInputElement.value;
          previousInputElement.value = "";
          previousInputElement.focus();
          if (previousValue.length > 0) {
            this.triggerInputEvent(index, event2);
          }
        }
      } else if (event2.key === "ArrowLeft" || event2.key === "ArrowRight") {
        if (event2.key === "ArrowLeft" && index > 0) {
          previousInputElement.focus();
          previousInputElement.select();
        } else if (event2.key === "ArrowRight" && index < this.inputs.length - 1) {
          nextInputElement.focus();
          nextInputElement.select();
        }
        event2.preventDefault();
      } else if (event2.key === "ArrowUp" || event2.key === "ArrowDown") {
        event2.preventDefault();
      } else if (event2.key !== "Tab" && !event2.shiftKey && !event2.ctrlKey) {
        if (this.type === "number" && /\D/.test(event2.key.toLocaleLowerCase())) {
          event2.preventDefault();
        }
      }
    };
    OtpInput2.prototype.handleSelection = function(index) {
      var currentInputElement = this.inputs[parseInt(index.toString(), 10)];
      if (currentInputElement.value) {
        currentInputElement.select();
      }
    };
    OtpInput2.prototype.handleFocus = function(index, event2) {
      addClass2([this.inputs[parseInt(index.toString(), 10)]], "e-otp-input-focus");
      if (this.shouldFireFocus) {
        var eventArgs = {
          element: this.element,
          event: event2,
          index,
          isInteracted: this.isFocusInCalled ? false : true,
          value: this.value
        };
        this.trigger("focus", eventArgs);
      }
      this.shouldFireFocus = true;
    };
    OtpInput2.prototype.handleBlur = function(index, event2) {
      removeClass2([this.inputs[parseInt(index.toString(), 10)]], "e-otp-input-focus");
      if (this.shouldFireBlur) {
        var eventArgs = {
          element: this.element,
          event: event2,
          value: this.value,
          index,
          isInteracted: this.isFocusOutCalled ? false : true
        };
        this.trigger("blur", eventArgs);
      }
      this.shouldFireBlur = true;
    };
    OtpInput2.prototype.handlePaste = function(index, event2) {
      var clipboardData = event2.clipboardData;
      if (clipboardData) {
        var pastedText = clipboardData.getData("text");
        var pastedValues = pastedText.split("");
        var pastedValueIndex = 0;
        for (var i = index; i < this.inputs.length; i++) {
          if (pastedValues.length > 0 && pastedValues[parseInt(pastedValueIndex.toString(), 10)]) {
            this.inputs[parseInt(i.toString(), 10)].value = pastedValues[parseInt(pastedValueIndex.toString(), 10)];
            pastedValueIndex++;
            this.updateValueProperty();
          }
        }
        this.focusIn();
        this.triggerValuechanged(event2, true);
      }
    };
    OtpInput2.prototype.triggerInputEvent = function(index, event2) {
      var previousValue = this.value.toString();
      this.updateValueProperty();
      var inputEventArgs = {
        element: this.element,
        event: event2,
        previousValue,
        value: this.value.toString(),
        index
      };
      this.trigger("input", inputEventArgs);
    };
    OtpInput2.prototype.triggerValuechanged = function(event2, isInteracted) {
      if (this.length === this.value.toString().length) {
        if (this.previousValue !== this.value) {
          var eventArgs = {
            element: this.element,
            event: event2,
            isInteracted: isInteracted ? isInteracted : false,
            previousValue: this.previousValue,
            value: this.value
          };
          this.trigger("valueChanged", eventArgs);
          this.previousValue = this.value.toString();
        }
      }
    };
    OtpInput2.prototype.wireEvents = function(inputEle, index) {
      EventHandler2.add(inputEle, "focus", this.handleFocus.bind(this, index), this);
      EventHandler2.add(inputEle, "blur", this.handleBlur.bind(this, index), this);
      EventHandler2.add(inputEle, "input", this.handleInputChange.bind(this, index), this);
      EventHandler2.add(inputEle, "keydown", this.handleKeyAction.bind(this, index), this);
      EventHandler2.add(inputEle, "click", this.handleSelection.bind(this, index), this);
      EventHandler2.add(inputEle, "paste", this.handlePaste.bind(this, index), this);
      EventHandler2.add(inputEle, "wheel", this.handleWheelEvent, this);
    };
    OtpInput2.prototype.unWireEvents = function() {
      for (var i = 0; i < this.inputs.length; i++) {
        var currentInputElement = this.inputs[parseInt(i.toString(), 10)];
        EventHandler2.remove(currentInputElement, "focus", this.handleFocus.bind(this, i));
        EventHandler2.remove(currentInputElement, "blur", this.handleBlur.bind(this, i));
        EventHandler2.remove(currentInputElement, "input", this.handleInputChange.bind(this, i));
        EventHandler2.remove(currentInputElement, "keydown", this.handleKeyAction.bind(this, i));
        EventHandler2.remove(currentInputElement, "click", this.handleSelection.bind(this, i));
        EventHandler2.remove(currentInputElement, "paste", this.handlePaste.bind(this, i));
        EventHandler2.remove(currentInputElement, "wheel", this.handleWheelEvent);
      }
    };
    OtpInput2.prototype.updateValueProperty = function() {
      var value = "";
      this.inputs.forEach(function(input2) {
        value += input2.value;
      });
      var prevOnChange = this.isProtectedOnChange;
      this.isProtectedOnChange = true;
      this.value = typeof this.value === "number" ? parseInt(value, 10) : value;
      this.isProtectedOnChange = prevOnChange;
      this.hiddenInputEle.value = this.value.toString();
    };
    OtpInput2.prototype.updateInputValue = function(previousValue) {
      var stringifiedValue = this.value.toString();
      if (this.textTransform) {
        stringifiedValue = this.getTransformedText(stringifiedValue);
      }
      var previousStringValue = previousValue.toString();
      for (var i = 0; i < this.inputs.length; i++) {
        if (previousStringValue.charAt(i) !== stringifiedValue.charAt(i)) {
          this.inputs[parseInt(i.toString(), 10)].value = stringifiedValue.charAt(i);
          this.hiddenInputEle.value = stringifiedValue;
        }
      }
      this.focusIn();
    };
    OtpInput2.prototype.updateCssClass = function(addCss, removeCss) {
      if (removeCss === void 0) {
        removeCss = "";
      }
      var _a, _b;
      var cssClasses;
      if (removeCss) {
        cssClasses = removeCss.trim().split(" ");
        (_a = this.element.classList).remove.apply(_a, cssClasses);
      }
      if (addCss) {
        cssClasses = addCss.trim().split(" ");
        (_b = this.element.classList).add.apply(_b, cssClasses);
      }
    };
    OtpInput2.prototype.updateVariantClass = function() {
      var variantClass = this.stylingMode.toLocaleLowerCase() === "outlined" ? "outline" : this.stylingMode.toLocaleLowerCase();
      var validClasses = ["underlined", "filled", "outline"];
      if (validClasses.indexOf(variantClass) !== -1) {
        removeClass2([this.element], validClasses.map(function(cls) {
          return "e-" + cls;
        }));
        addClass2([this.element], "e-" + variantClass);
      }
    };
    OtpInput2.prototype.updateAriaLabel = function(customAriaLabel) {
      this.inputs.forEach(function(input2, index) {
        var defaultLabel = "Enter Otp Character " + (index + 1);
        var ariaLabel = customAriaLabel && customAriaLabel.length > 0 ? customAriaLabel[parseInt(index.toString(), 10)] || defaultLabel : defaultLabel;
        input2.setAttribute("aria-label", ariaLabel);
      });
    };
    OtpInput2.prototype.updateDisabledState = function() {
      var _this = this;
      this.inputs.forEach(function(input2) {
        if (_this.disabled) {
          input2.setAttribute("disabled", "disabled");
        } else {
          input2.removeAttribute("disabled");
        }
      });
    };
    OtpInput2.prototype.setElementAttributes = function(htmlAttributes, element2) {
      if (!isNullOrUndefined2(htmlAttributes)) {
        for (var key in htmlAttributes) {
          if (key === "class") {
            var elementClass2 = htmlAttributes["class"].replace(/\s+/g, " ").trim();
            if (elementClass2) {
              addClass2([element2], elementClass2.split(" "));
            }
          } else if (key === "inputmode") {
            this.setInputMode(htmlAttributes["" + key]);
          } else if (key === "name" && this.element.id === element2.id) {
            this.hiddenInputEle.setAttribute(key, htmlAttributes["" + key]);
          } else {
            element2.setAttribute(key, htmlAttributes["" + key]);
          }
        }
      }
    };
    OtpInput2.prototype.setInputMode = function(inputModeValue) {
      for (var i = 0; i < this.inputs.length; i++) {
        this.inputs[parseInt(i.toString(), 10)].setAttribute("inputmode", inputModeValue);
      }
    };
    OtpInput2.prototype.handleLengthChange = function(currentValue, previousValue) {
      var isLengthAdded = currentValue - previousValue > 0;
      if (isLengthAdded) {
        for (var i = previousValue; i < currentValue; i++) {
          this.createOtpInput(i);
        }
        this.renderSeparator(previousValue, currentValue);
        this.addPlaceHolder();
        this.updateAriaLabel(this.ariaLabels);
      } else {
        if (currentValue >= 0 && this.inputs.length > 0) {
          for (var i = currentValue; i < this.inputs.length; i++) {
            remove(this.inputs[parseInt(i.toString(), 10)]);
          }
          this.inputs.splice(currentValue);
          if (this.separatorElements.length > 0) {
            var index = currentValue === 0 ? 0 : currentValue - 1;
            for (var i = index; i < this.separatorElements.length; i++) {
              remove(this.separatorElements[parseInt(i.toString(), 10)]);
            }
            this.separatorElements.splice(index);
          }
        }
      }
    };
    OtpInput2.prototype.getModuleName = function() {
      return "otpinput";
    };
    OtpInput2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    OtpInput2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.unWireEvents();
      this.inputs.forEach(function(input2) {
        remove(input2);
      });
      this.separatorElements.forEach(function(separatorElement) {
        remove(separatorElement);
      });
      remove(this.hiddenInputEle);
      removeClass2([this.element], ["e-underlined", "e-filled", "e-outline", "e-rtl"]);
      if (this.cssClass) {
        removeClass2([this.element], this.cssClass.trim().split(" "));
      }
      this.element.removeAttribute("role");
      this.inputs = [];
      this.separatorElements = [];
      this.hiddenInputEle = null;
    };
    OtpInput2.prototype.focusIn = function() {
      this.isFocusInCalled = true;
      var focusIndex = this.inputs.length - 1;
      for (var index = 0; index < this.inputs.length; index++) {
        if (!(this.inputs[parseInt(index.toString(), 10)].value.length > 0)) {
          focusIndex = index;
          break;
        }
      }
      this.inputs[parseInt(focusIndex.toString(), 10)].focus();
      this.isFocusInCalled = false;
    };
    OtpInput2.prototype.focusOut = function() {
      this.isFocusOutCalled = true;
      this.inputs.forEach(function(input2) {
        input2.blur();
      });
      this.isFocusOutCalled = false;
    };
    OtpInput2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "textTransform":
            this.updateInputValue(this.value);
            break;
          case "value":
            this.updateInputValue(oldProp.value);
            this.triggerValuechanged();
            break;
          case "placeholder":
            this.addPlaceHolder();
            break;
          case "disabled":
            this.updateDisabledState();
            break;
          case "cssClass":
            this.updateCssClass(newProp.cssClass, oldProp.cssClass);
            break;
          case "separator":
            if (oldProp.separator === "") {
              this.renderSeparator(1, this.inputs.length);
            } else {
              this.updateSeparatorValue();
            }
            break;
          case "htmlAttributes":
            this.setElementAttributes(newProp.htmlAttributes, this.element);
            break;
          case "type":
            this.updateInputType(newProp.type);
            break;
          case "stylingMode":
            this.updateVariantClass();
            break;
          case "ariaLabels":
            this.updateAriaLabel(newProp.ariaLabels);
            break;
          case "length":
            this.handleLengthChange(newProp.length, oldProp.length);
            break;
          case "enableRtl":
            this.element.classList[this.enableRtl ? "add" : "remove"](RTL15);
            break;
          case "autoFocus":
            if (this.autoFocus) {
              this.focusIn();
            }
            break;
        }
      }
    };
    __decorate66([Property2(4)], OtpInput2.prototype, "length", void 0);
    __decorate66([Property2("")], OtpInput2.prototype, "value", void 0);
    __decorate66([Property2(OtpInputType.Number)], OtpInput2.prototype, "type", void 0);
    __decorate66([Property2("")], OtpInput2.prototype, "separator", void 0);
    __decorate66([Property2("")], OtpInput2.prototype, "placeholder", void 0);
    __decorate66([Property2(OtpInputStyle.Outlined)], OtpInput2.prototype, "stylingMode", void 0);
    __decorate66([Property2(false)], OtpInput2.prototype, "disabled", void 0);
    __decorate66([Property2("")], OtpInput2.prototype, "cssClass", void 0);
    __decorate66([Property2(false)], OtpInput2.prototype, "autoFocus", void 0);
    __decorate66([Property2(TextTransform.None)], OtpInput2.prototype, "textTransform", void 0);
    __decorate66([Property2({})], OtpInput2.prototype, "htmlAttributes", void 0);
    __decorate66([Property2([])], OtpInput2.prototype, "ariaLabels", void 0);
    __decorate66([Event3()], OtpInput2.prototype, "created", void 0);
    __decorate66([Event3()], OtpInput2.prototype, "valueChanged", void 0);
    __decorate66([Event3()], OtpInput2.prototype, "focus", void 0);
    __decorate66([Event3()], OtpInput2.prototype, "blur", void 0);
    __decorate66([Event3()], OtpInput2.prototype, "input", void 0);
    OtpInput2 = __decorate66([NotifyPropertyChanges2], OtpInput2);
    return OtpInput2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js
var __extends69 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate67 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var dropDownListClasses = {
  root: "e-dropdownlist",
  hover: dropDownBaseClasses.hover,
  selected: dropDownBaseClasses.selected,
  rtl: dropDownBaseClasses.rtl,
  li: dropDownBaseClasses.li,
  disable: dropDownBaseClasses.disabled,
  base: dropDownBaseClasses.root,
  focus: dropDownBaseClasses.focus,
  content: dropDownBaseClasses.content,
  input: "e-input-group",
  inputFocus: "e-input-focus",
  icon: "e-input-group-icon e-ddl-icon",
  iconAnimation: "e-icon-anim",
  value: "e-input-value",
  device: "e-ddl-device",
  backIcon: "e-input-group-icon e-back-icon e-icons",
  filterBarClearIcon: "e-input-group-icon e-clear-icon e-icons",
  filterInput: "e-input-filter",
  resizeIcon: "e-resizer-right e-icons",
  filterParent: "e-filter-parent",
  mobileFilter: "e-ddl-device-filter",
  footer: "e-ddl-footer",
  header: "e-ddl-header",
  clearIcon: "e-clear-icon",
  clearIconHide: "e-clear-icon-hide",
  popupFullScreen: "e-popup-full-page",
  disableIcon: "e-ddl-disable-icon",
  hiddenElement: "e-ddl-hidden",
  virtualList: "e-list-item e-virtual-list"
};
var inputObject = {
  container: null,
  buttons: []
};
var DropDownList = (
  /** @class */
  function(_super) {
    __extends69(DropDownList2, _super);
    function DropDownList2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isListSearched = false;
      _this.preventChange = false;
      _this.isTouched = false;
      _this.isFocused = false;
      _this.autoFill = false;
      _this.isUpdateHeaderHeight = false;
      _this.isUpdateFooterHeight = false;
      _this.isReactTemplateUpdate = false;
      return _this;
    }
    DropDownList2.prototype.preRender = function() {
      this.valueTempElement = null;
      this.element.style.opacity = "0";
      this.initializeData();
      _super.prototype.preRender.call(this);
      this.activeIndex = this.index;
      this.queryString = "";
    };
    DropDownList2.prototype.initializeData = function() {
      this.isPopupOpen = false;
      this.isDocumentClick = false;
      this.isInteracted = false;
      this.isFilterFocus = false;
      this.beforePopupOpen = false;
      this.initial = true;
      this.initialRemoteRender = false;
      this.isNotSearchList = false;
      this.isTyped = false;
      this.isSelected = false;
      this.preventFocus = false;
      this.preventAutoFill = false;
      this.isValidKey = false;
      this.typedString = "";
      this.isEscapeKey = false;
      this.isPreventBlur = false;
      this.isTabKey = false;
      this.actionCompleteData = {
        isUpdated: false
      };
      this.actionData = {
        isUpdated: false
      };
      this.prevSelectPoints = {};
      this.isSelectCustom = false;
      this.isDropDownClick = false;
      this.preventAltUp = false;
      this.isCustomFilter = false;
      this.isSecondClick = false;
      this.previousValue = null;
      this.keyConfigure = {
        tab: "tab",
        enter: "13",
        escape: "27",
        end: "35",
        home: "36",
        down: "40",
        up: "38",
        pageUp: "33",
        pageDown: "34",
        open: "alt+40",
        close: "shift+tab",
        hide: "alt+38",
        space: "32"
      };
      this.viewPortInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: this.itemCount
      };
    };
    DropDownList2.prototype.setZIndex = function() {
      if (this.popupObj) {
        this.popupObj.setProperties({
          "zIndex": this.zIndex
        });
      }
    };
    DropDownList2.prototype.requiredModules = function() {
      var modules = [];
      if (this.enableVirtualization) {
        modules.push({
          args: [this],
          member: "VirtualScroll"
        });
      }
      return modules;
    };
    DropDownList2.prototype.renderList = function(e, isEmptyData) {
      _super.prototype.render.call(this, e, isEmptyData);
      if (!(this.dataSource instanceof DataManager)) {
        this.totalItemCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
      }
      if (this.enableVirtualization && this.isFiltering() && this.getModuleName() === "combobox") {
        this.UpdateSkeleton();
        this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
        this.ulElement = this.list.querySelector("ul");
      }
      this.unWireListEvents();
      this.wireListEvents();
    };
    DropDownList2.prototype.floatLabelChange = function() {
      if (this.getModuleName() === "dropdownlist" && this.floatLabelType === "Auto") {
        var floatElement = this.inputWrapper.container.querySelector(".e-float-text");
        if (this.inputElement.value !== "" || this.isInteracted) {
          classList(floatElement, ["e-label-top"], ["e-label-bottom"]);
        } else {
          classList(floatElement, ["e-label-bottom"], ["e-label-top"]);
        }
      }
    };
    DropDownList2.prototype.resetHandler = function(e) {
      e.preventDefault();
      this.clearAll(e);
      if (this.enableVirtualization) {
        this.list.scrollTop = 0;
        this.virtualListInfo = null;
        this.previousStartIndex = 0;
        this.previousEndIndex = 0;
      }
    };
    DropDownList2.prototype.resetFocusElement = function() {
      this.removeHover();
      this.removeSelection();
      this.removeFocus();
      this.list.scrollTop = 0;
      if (this.getModuleName() !== "autocomplete" && !isNullOrUndefined2(this.ulElement)) {
        var li = this.fields.disabled ? this.ulElement.querySelector("." + dropDownListClasses.li + ":not(.e-disabled)") : this.ulElement.querySelector("." + dropDownListClasses.li);
        if (this.enableVirtualization) {
          li = this.liCollections[this.skeletonCount];
        }
        if (li) {
          li.classList.add(dropDownListClasses.focus);
        }
      }
    };
    DropDownList2.prototype.clearAll = function(e, properties) {
      this.previousItemData = !isNullOrUndefined2(this.itemData) ? this.itemData : null;
      if (isNullOrUndefined2(properties) || !isNullOrUndefined2(properties) && (isNullOrUndefined2(properties.dataSource) || !(properties.dataSource instanceof DataManager) && properties.dataSource.length === 0)) {
        this.isActive = true;
        this.resetSelection(properties);
      }
      var dataItem = this.getItemData();
      if (!this.allowObjectBinding && this.previousValue === dataItem.value || this.allowObjectBinding && this.previousValue && this.isObjectInArray(this.previousValue, [this.allowCustom ? this.value ? this.value : dataItem : dataItem.value ? this.getDataByValue(dataItem.value) : dataItem])) {
        this.checkAndResetCache();
        if (this.enableVirtualization && this.list) {
          this.updateInitialData();
        }
        return;
      }
      this.onChangeEvent(e);
      this.checkAndResetCache();
      if (this.enableVirtualization) {
        this.updateInitialData();
      }
    };
    DropDownList2.prototype.resetSelection = function(properties) {
      if (this.list) {
        if (!isNullOrUndefined2(properties) && (isNullOrUndefined2(properties.dataSource) || !(properties.dataSource instanceof DataManager) && properties.dataSource.length === 0)) {
          this.selectedLI = null;
          this.actionCompleteData.isUpdated = false;
          this.actionCompleteData.ulElement = null;
          this.actionCompleteData.list = null;
          this.resetList(properties.dataSource);
        } else {
          if (this.allowFiltering && this.getModuleName() !== "autocomplete" && !isNullOrUndefined2(this.actionCompleteData.ulElement) && !isNullOrUndefined2(this.actionCompleteData.list) && this.actionCompleteData.list.length > 0) {
            this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);
          }
          this.resetFocusElement();
        }
      }
      if (!isNullOrUndefined2(this.hiddenElement)) {
        this.hiddenElement.innerHTML = "";
      }
      if (!isNullOrUndefined2(this.inputElement)) {
        this.inputElement.value = "";
      }
      this.value = null;
      this.itemData = null;
      this.text = null;
      this.index = null;
      this.activeIndex = null;
      this.item = null;
      this.queryString = "";
      if (this.valueTempElement) {
        detach2(this.valueTempElement);
        this.inputElement.style.display = "block";
        this.valueTempElement = null;
      }
      this.setSelection(null, null);
      this.isSelectCustom = false;
      this.updateIconState();
      this.cloneElements();
    };
    DropDownList2.prototype.setHTMLAttributes = function() {
      if (Object.keys(this.htmlAttributes).length) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var htmlAttr = _a[_i];
          if (htmlAttr === "class") {
            var updatedClassValue = this.htmlAttributes["" + htmlAttr].replace(/\s+/g, " ").trim();
            if (updatedClassValue !== "") {
              addClass2([this.inputWrapper.container], updatedClassValue.split(" "));
            }
          } else if (htmlAttr === "disabled" && this.htmlAttributes["" + htmlAttr] === "disabled") {
            this.enabled = false;
            this.setEnable();
          } else if (htmlAttr === "readonly" && !isNullOrUndefined2(this.htmlAttributes["" + htmlAttr])) {
            this.readonly = true;
            this.dataBind();
          } else if (htmlAttr === "style") {
            this.inputWrapper.container.setAttribute("style", this.htmlAttributes["" + htmlAttr]);
          } else if (htmlAttr === "aria-label") {
            if ((this.getModuleName() === "autocomplete" || this.getModuleName() === "combobox") && !this.readonly) {
              this.inputElement.setAttribute("aria-label", this.htmlAttributes["" + htmlAttr]);
            } else if (this.getModuleName() === "dropdownlist") {
              this.inputWrapper.container.setAttribute("aria-label", this.htmlAttributes["" + htmlAttr]);
            }
          } else {
            var defaultAttr = ["title", "id", "placeholder", "role", "autocomplete", "autocapitalize", "spellcheck", "minlength", "maxlength"];
            var validateAttr = ["name", "required"];
            if (this.getModuleName() === "autocomplete" || this.getModuleName() === "combobox") {
              defaultAttr.push("tabindex");
            }
            if (validateAttr.indexOf(htmlAttr) > -1 || htmlAttr.indexOf("data") === 0) {
              this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
            } else if (defaultAttr.indexOf(htmlAttr) > -1) {
              if (htmlAttr === "placeholder") {
                Input.setPlaceholder(this.htmlAttributes["" + htmlAttr], this.inputElement);
              } else {
                this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
              }
            } else {
              this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
            }
          }
        }
      }
      if (this.getModuleName() === "autocomplete" || this.getModuleName() === "combobox") {
        this.inputWrapper.container.removeAttribute("tabindex");
      }
    };
    DropDownList2.prototype.getAriaAttributes = function() {
      return {
        "aria-disabled": "false",
        "role": "combobox",
        "aria-expanded": "false",
        "aria-live": "polite",
        "aria-labelledby": this.hiddenElement.id
      };
    };
    DropDownList2.prototype.setEnableRtl = function() {
      if (!isNullOrUndefined2(this.inputElement) && !isNullOrUndefined2(this.inputElement.parentElement)) {
        Input.setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);
      }
      if (this.popupObj) {
        this.popupObj.enableRtl = this.enableRtl;
        this.popupObj.dataBind();
      }
    };
    DropDownList2.prototype.setEnable = function() {
      Input.setEnabled(this.enabled, this.inputElement);
      if (this.enabled) {
        removeClass2([this.inputWrapper.container], dropDownListClasses.disable);
        this.inputElement.setAttribute("aria-disabled", "false");
        this.targetElement().setAttribute("tabindex", this.tabIndex);
        if (this.inputWrapper && this.inputWrapper.container) {
          this.inputWrapper.container.setAttribute("aria-disabled", "false");
          this.inputWrapper.container.removeAttribute("disabled");
        }
      } else {
        this.hidePopup();
        addClass2([this.inputWrapper.container], dropDownListClasses.disable);
        this.inputElement.setAttribute("aria-disabled", "true");
        this.targetElement().tabIndex = -1;
        if (this.inputWrapper && this.inputWrapper.container) {
          this.inputWrapper.container.setAttribute("aria-disabled", "true");
          this.inputWrapper.container.setAttribute("disabled", "");
        }
      }
    };
    DropDownList2.prototype.getPersistData = function() {
      return this.addOnPersist(["value"]);
    };
    DropDownList2.prototype.getLocaleName = function() {
      return "drop-down-list";
    };
    DropDownList2.prototype.preventTabIndex = function(element2) {
      if (this.getModuleName() === "dropdownlist") {
        element2.tabIndex = -1;
      }
    };
    DropDownList2.prototype.targetElement = function() {
      return !isNullOrUndefined2(this.inputWrapper) ? this.inputWrapper.container : null;
    };
    DropDownList2.prototype.getNgDirective = function() {
      return "EJS-DROPDOWNLIST";
    };
    DropDownList2.prototype.getElementByText = function(text) {
      return this.getElementByValue(this.getValueByText(text));
    };
    DropDownList2.prototype.getElementByValue = function(value) {
      var item;
      var listItems = this.getItems();
      for (var _i = 0, listItems_1 = listItems; _i < listItems_1.length; _i++) {
        var liItem = listItems_1[_i];
        if (this.getFormattedValue(liItem.getAttribute("data-value")) === value) {
          item = liItem;
          break;
        }
      }
      return item;
    };
    DropDownList2.prototype.initValue = function() {
      this.viewPortInfo.startIndex = this.virtualItemStartIndex = 0;
      this.viewPortInfo.endIndex = this.virtualItemEndIndex = this.itemCount;
      this.renderList();
      if (this.dataSource instanceof DataManager) {
        this.initialRemoteRender = true;
      } else {
        this.updateValues();
      }
    };
    DropDownList2.prototype.isDisableItemValue = function(value) {
      if (typeof value === "object") {
        var objectValue = JSON.parse(JSON.stringify(value))[this.fields.value];
        return this.isDisabledItemByIndex(this.getIndexByValue(objectValue));
      }
      return this.isDisabledItemByIndex(this.getIndexByValue(value));
    };
    DropDownList2.prototype.updateValues = function() {
      if (this.fields.disabled) {
        if (this.value != null) {
          this.value = !this.isDisableItemValue(this.value) ? this.value : null;
        }
        if (this.text != null) {
          this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
        }
        if (this.index != null) {
          this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
          this.activeIndex = this.index;
        }
      }
      this.selectedValueInfo = this.viewPortInfo;
      if (!isNullOrUndefined2(this.value)) {
        var value = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
        this.setSelection(this.getElementByValue(value), null);
      } else if (this.text && isNullOrUndefined2(this.value)) {
        var element2 = this.getElementByText(this.text);
        if (isNullOrUndefined2(element2)) {
          this.setProperties({
            text: null
          });
          return;
        } else {
          this.setSelection(element2, null);
        }
      } else {
        this.setSelection(this.liCollections[this.activeIndex], null);
      }
      this.setHiddenValue();
      Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
    };
    DropDownList2.prototype.onBlurHandler = function(e) {
      if (!this.enabled) {
        return;
      }
      var target = e.relatedTarget;
      var currentTarget = e.target;
      var isPreventBlur = this.isPreventBlur;
      this.isPreventBlur = false;
      if (isPreventBlur && !this.isDocumentClick && this.isPopupOpen && (!isNullOrUndefined2(currentTarget) || !this.isFilterLayout() && isNullOrUndefined2(target))) {
        if (this.getModuleName() === "dropdownlist" && this.allowFiltering && this.isPopupOpen) {
          this.filterInput.focus();
        } else {
          this.targetElement().focus();
        }
        return;
      }
      if (this.isDocumentClick || !isNullOrUndefined2(this.popupObj) && document.body.contains(this.popupObj.element) && this.popupObj.element.classList.contains(dropDownListClasses.mobileFilter)) {
        if (!this.beforePopupOpen) {
          this.isDocumentClick = false;
        }
        return;
      }
      if (this.getModuleName() === "dropdownlist" && !this.isFilterFocus && target !== this.inputElement && (document.activeElement !== target || document.activeElement === target && currentTarget.classList.contains(dropDownListClasses.inputFocus)) || isNullOrUndefined2(target) && this.getModuleName() === "dropdownlist" && this.allowFiltering && currentTarget !== this.inputWrapper.container || this.getModuleName() !== "dropdownlist" && !this.inputWrapper.container.contains(target) || this.isTabKey) {
        this.isDocumentClick = this.isPopupOpen ? true : false;
        this.focusOutAction(e);
        this.isTabKey = false;
      }
      if (this.isRequested && !this.isPopupOpen && !this.isPreventBlur) {
        this.isActive = false;
        this.beforePopupOpen = false;
      }
      this.isFocused = false;
    };
    DropDownList2.prototype.focusOutAction = function(e) {
      this.isInteracted = false;
      this.focusOut(e);
      this.onFocusOut(e);
    };
    DropDownList2.prototype.onFocusOut = function(e) {
      if (!this.enabled) {
        return;
      }
      if (this.isSelected) {
        this.isSelectCustom = false;
        this.onChangeEvent(e);
      }
      this.floatLabelChange();
      this.dispatchEvent(this.hiddenElement, "change");
      if (this.getModuleName() === "dropdownlist" && this.element.tagName !== "INPUT") {
        this.dispatchEvent(this.inputElement, "blur");
      }
      if (this.inputWrapper.clearButton) {
        addClass2([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
      }
      this.trigger("blur");
    };
    DropDownList2.prototype.onFocus = function(e) {
      if (!this.isInteracted) {
        this.isInteracted = true;
        var args = {
          isInteracted: e ? true : false,
          event: e
        };
        this.trigger("focus", args);
      }
      this.updateIconState();
      this.isFocused = true;
    };
    DropDownList2.prototype.resizingWireEvent = function() {
      EventHandler2.add(document, "mousemove", this.resizePopup, this);
      EventHandler2.add(document, "mouseup", this.stopResizing, this);
      EventHandler2.add(document, "touchmove", this.resizePopup, this);
      EventHandler2.add(document, "touchend", this.stopResizing, this);
    };
    DropDownList2.prototype.resizingUnWireEvent = function() {
      EventHandler2.remove(document, "mousemove", this.resizePopup);
      EventHandler2.remove(document, "mouseup", this.stopResizing);
      EventHandler2.remove(document, "touchmove", this.resizePopup);
      EventHandler2.remove(document, "touchend", this.stopResizing);
    };
    DropDownList2.prototype.resetValueHandler = function(e) {
      var formElement = closest2(this.inputElement, "form");
      if (formElement && e.target === formElement) {
        var val = this.element.tagName === this.getNgDirective() ? null : this.inputElement.getAttribute("value");
        this.text = val;
      }
    };
    DropDownList2.prototype.wireEvent = function() {
      EventHandler2.add(this.inputWrapper.container, "mousedown", this.dropDownClick, this);
      EventHandler2.add(this.inputWrapper.container, "focus", this.focusIn, this);
      EventHandler2.add(this.inputWrapper.container, "keypress", this.onSearch, this);
      EventHandler2.add(window, "resize", this.windowResize, this);
      this.bindCommonEvent();
    };
    DropDownList2.prototype.bindCommonEvent = function() {
      EventHandler2.add(this.targetElement(), "blur", this.onBlurHandler, this);
      var formElement = closest2(this.inputElement, "form");
      if (formElement) {
        EventHandler2.add(formElement, "reset", this.resetValueHandler, this);
      }
      if (!Browser2.isDevice) {
        this.keyboardModule = new KeyboardEvents2(this.targetElement(), {
          keyAction: this.keyActionHandler.bind(this),
          keyConfigs: this.keyConfigure,
          eventName: "keydown"
        });
      } else {
        this.keyboardModule = new KeyboardEvents2(this.targetElement(), {
          keyAction: this.mobileKeyActionHandler.bind(this),
          keyConfigs: this.keyConfigure,
          eventName: "keydown"
        });
      }
      this.bindClearEvent();
    };
    DropDownList2.prototype.windowResize = function() {
      if (this.isPopupOpen) {
        this.popupObj.refreshPosition(this.inputWrapper.container);
      }
    };
    DropDownList2.prototype.bindClearEvent = function() {
      if (this.showClearButton) {
        EventHandler2.add(this.inputWrapper.clearButton, "mousedown", this.resetHandler, this);
      }
    };
    DropDownList2.prototype.unBindCommonEvent = function() {
      if (!isNullOrUndefined2(this.inputWrapper) && this.targetElement()) {
        EventHandler2.remove(this.targetElement(), "blur", this.onBlurHandler);
      }
      var formElement = this.inputElement && closest2(this.inputElement, "form");
      if (formElement) {
        EventHandler2.remove(formElement, "reset", this.resetValueHandler);
      }
      if (!Browser2.isDevice) {
        this.keyboardModule.destroy();
      }
      if (this.showClearButton) {
        EventHandler2.remove(this.inputWrapper.clearButton, "mousedown", this.resetHandler);
      }
    };
    DropDownList2.prototype.updateIconState = function() {
      if (this.showClearButton) {
        if (this.inputElement.value !== "" && !this.readonly) {
          removeClass2([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
        } else {
          addClass2([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
        }
      }
    };
    DropDownList2.prototype.wireListEvents = function() {
      if (!isNullOrUndefined2(this.list)) {
        EventHandler2.add(this.list, "click", this.onMouseClick, this);
        EventHandler2.add(this.list, "mouseover", this.onMouseOver, this);
        EventHandler2.add(this.list, "mouseout", this.onMouseLeave, this);
      }
    };
    DropDownList2.prototype.onSearch = function(e) {
      if (e.charCode !== 32 && e.charCode !== 13) {
        if (this.list === void 0) {
          this.renderList();
        }
        this.searchKeyEvent = e;
        this.onServerIncrementalSearch(e);
      }
    };
    DropDownList2.prototype.onServerIncrementalSearch = function(e) {
      if (!this.isRequested && !isNullOrUndefined2(this.list) && !isNullOrUndefined2(this.list.querySelector("li")) && this.enabled && !this.readonly) {
        this.incrementalSearch(e);
      }
    };
    DropDownList2.prototype.startResizing = function(event2) {
      this.isResizing = true;
      this.trigger("resizeStart", event2);
      var clientX = event2 instanceof MouseEvent ? event2.clientX : event2.touches[0].clientX;
      var clientY = event2 instanceof MouseEvent ? event2.clientY : event2.touches[0].clientY;
      if (this.list && this.list.parentElement) {
        this.originalWidth = this.list.parentElement.offsetWidth;
        this.originalHeight = this.list.parentElement.offsetHeight;
        this.originalMouseX = clientX;
        this.originalMouseY = clientY;
      }
      this.resizingWireEvent();
      if (event2) {
        event2.preventDefault();
      }
    };
    DropDownList2.prototype.resizePopup = function(event2) {
      if (!this.isResizing) {
        return;
      }
      this.trigger("resizing", event2);
      var clientX = event2 instanceof MouseEvent ? event2.clientX : event2.touches[0].clientX;
      var clientY = event2 instanceof MouseEvent ? event2.clientY : event2.touches[0].clientY;
      var dx = clientX - this.originalMouseX;
      var dy = clientY - this.originalMouseY;
      if (this.list && this.list.parentElement) {
        var minWidth2 = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
        var minHeight2 = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
        minWidth2 = minWidth2 || 100;
        minHeight2 = minHeight2 || 120;
        this.resizeWidth = Math.max(this.originalWidth + dx, minWidth2);
        this.resizeHeight = Math.max(this.originalHeight + dy, minHeight2);
        this.list.parentElement.style.width = this.resizeWidth + "px";
        this.list.parentElement.style.height = this.resizeHeight + "px";
        this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
        this.list.style.maxHeight = this.resizeHeight + "px";
        if (this.fixedHeaderElement && this.ulElement) {
          this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
        }
      }
      if (event2) {
        event2.preventDefault();
      }
    };
    DropDownList2.prototype.stopResizing = function(event2) {
      if (this.isResizing) {
        this.isResizing = false;
        this.trigger("resizeStop", event2);
        this.resizingUnWireEvent();
      }
      if (event2) {
        event2.preventDefault();
      }
    };
    DropDownList2.prototype.onMouseClick = function(e) {
      var target = e.target;
      this.keyboardEvent = null;
      var li = closest2(target, "." + dropDownBaseClasses.li);
      if (!this.isValidLI(li) || this.isDisabledElement(li)) {
        return;
      }
      this.setSelection(li, e);
      if (Browser2.isDevice && this.isFilterLayout()) {
        history.back();
      } else {
        var delay = 100;
        this.closePopup(delay, e);
      }
    };
    DropDownList2.prototype.onMouseOver = function(e) {
      var currentLi = closest2(e.target, "." + dropDownBaseClasses.li);
      this.setHover(currentLi);
    };
    DropDownList2.prototype.setHover = function(li) {
      if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
        this.removeHover();
        addClass2([li], dropDownBaseClasses.hover);
      }
    };
    DropDownList2.prototype.onMouseLeave = function() {
      this.removeHover();
    };
    DropDownList2.prototype.removeHover = function() {
      if (this.list) {
        var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.hover);
        if (hoveredItem && hoveredItem.length) {
          removeClass2(hoveredItem, dropDownBaseClasses.hover);
        }
      }
    };
    DropDownList2.prototype.isValidLI = function(li) {
      return li && li.hasAttribute("role") && li.getAttribute("role") === "option";
    };
    DropDownList2.prototype.updateIncrementalItemIndex = function(startIndex, endIndex) {
      this.incrementalStartIndex = startIndex;
      this.incrementalEndIndex = endIndex;
    };
    DropDownList2.prototype.incrementalSearch = function(e) {
      if (this.liCollections.length > 0) {
        if (this.enableVirtualization) {
          var updatingincrementalindex = false;
          var queryStringUpdated = false;
          var activeElement = this.ulElement.getElementsByClassName("e-active")[0];
          var currentValue = activeElement ? activeElement.textContent : null;
          if (this.incrementalQueryString === "") {
            this.incrementalQueryString = String.fromCharCode(e.charCode);
            this.incrementalPreQueryString = this.incrementalQueryString;
          } else if (String.fromCharCode(e.charCode).toLocaleLowerCase() === this.incrementalPreQueryString.toLocaleLowerCase()) {
            queryStringUpdated = true;
          } else {
            this.incrementalQueryString = String.fromCharCode(e.charCode);
          }
          if (this.viewPortInfo.endIndex >= this.incrementalEndIndex && this.incrementalEndIndex <= this.totalItemCount || this.incrementalEndIndex === 0) {
            updatingincrementalindex = true;
            this.incrementalStartIndex = this.incrementalEndIndex;
            if (this.incrementalEndIndex === 0) {
              this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;
            } else {
              this.incrementalEndIndex = this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100;
            }
            this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
            updatingincrementalindex = true;
          }
          if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
            this.updateIncrementalView(0, this.itemCount);
          }
          var li = incrementalSearch(e.charCode, this.incrementalLiCollections, this.activeIndex, true, this.element.id, queryStringUpdated, currentValue, true);
          while (isNullOrUndefined2(li) && this.incrementalEndIndex < this.totalItemCount) {
            this.updateIncrementalItemIndex(this.incrementalEndIndex, this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100);
            this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
            updatingincrementalindex = true;
            if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
              this.updateIncrementalView(0, this.itemCount);
            }
            li = incrementalSearch(e.charCode, this.incrementalLiCollections, 0, true, this.element.id, queryStringUpdated, currentValue, true, true);
            if (!isNullOrUndefined2(li)) {
              break;
            }
            if (isNullOrUndefined2(li) && this.incrementalEndIndex >= this.totalItemCount) {
              this.updateIncrementalItemIndex(0, 100 > this.totalItemCount ? this.totalItemCount : 100);
              break;
            }
          }
          if (isNullOrUndefined2(li) && this.incrementalEndIndex >= this.totalItemCount) {
            this.updateIncrementalItemIndex(0, 100 > this.totalItemCount ? this.totalItemCount : 100);
            this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
            updatingincrementalindex = true;
            if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
              this.updateIncrementalView(0, this.itemCount);
            }
            li = incrementalSearch(e.charCode, this.incrementalLiCollections, 0, true, this.element.id, queryStringUpdated, currentValue, true, true);
          }
          var index = li && this.getIndexByValue(li.getAttribute("data-value"));
          if (!index) {
            for (var i = 0; i < this.incrementalLiCollections.length; i++) {
              if (!isNullOrUndefined2(li) && !isNullOrUndefined2(li.getAttribute("data-value")) && this.incrementalLiCollections[i].getAttribute("data-value") === li.getAttribute("data-value").toString()) {
                index = i;
                index = this.incrementalStartIndex + index;
                break;
              }
            }
          } else {
            index = index - this.skeletonCount;
          }
          if (index) {
            if (!(this.viewPortInfo.startIndex >= index) || !(index >= this.viewPortInfo.endIndex)) {
              var startIndex = index - (this.itemCount / 2 - 2) > 0 ? index - (this.itemCount / 2 - 2) : 0;
              var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
              this.updateIncrementalView(startIndex, endIndex);
            }
          }
          if (!isNullOrUndefined2(li)) {
            var index_1 = this.getIndexByValue(li.getAttribute("data-value")) - this.skeletonCount;
            if (index_1 > this.itemCount / 2) {
              var startIndex = this.viewPortInfo.startIndex + (this.itemCount / 2 - 2) < this.totalItemCount ? this.viewPortInfo.startIndex + (this.itemCount / 2 - 2) : this.totalItemCount;
              var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
              this.updateIncrementalView(startIndex, endIndex);
            }
            li = this.getElementByValue(li.getAttribute("data-value"));
            this.setSelection(li, e);
            this.setScrollPosition();
            this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
            if (this.enableVirtualization && !this.fields.groupBy) {
              var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + this.virtualListInfo.startIndex * this.selectedLI.offsetHeight : this.selectedLI.offsetTop;
              this.list.scrollTop = selectedLiOffsetTop - this.list.querySelectorAll(".e-virtual-list").length * this.selectedLI.offsetHeight;
            }
            this.incrementalPreQueryString = this.incrementalQueryString;
          } else {
            this.updateIncrementalView(0, this.itemCount);
            this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
            this.list.scrollTop = 0;
          }
        } else {
          var li = void 0;
          if (this.fields.disabled) {
            var enableLiCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li + ":not(.e-disabled)");
            li = incrementalSearch(e.charCode, enableLiCollections, this.activeIndex, true, this.element.id);
          } else {
            li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
          }
          if (!isNullOrUndefined2(li)) {
            this.setSelection(li, e);
            this.setScrollPosition();
          }
        }
      }
    };
    DropDownList2.prototype.hideSpinner = function() {
      if (!isNullOrUndefined2(this.spinnerElement)) {
        hideSpinner(this.spinnerElement);
        removeClass2([this.spinnerElement], dropDownListClasses.disableIcon);
        this.spinnerElement.innerHTML = "";
        this.spinnerElement = null;
      }
    };
    DropDownList2.prototype.showSpinner = function() {
      if (isNullOrUndefined2(this.spinnerElement)) {
        this.spinnerElement = Browser2.isDevice && !isNullOrUndefined2(this.filterInputObj) && this.filterInputObj.buttons[1] || !isNullOrUndefined2(this.filterInputObj) && this.filterInputObj.buttons[0] || this.inputWrapper.buttons[0];
        addClass2([this.spinnerElement], dropDownListClasses.disableIcon);
        createSpinner({
          target: this.spinnerElement,
          width: Browser2.isDevice ? "16px" : "14px"
        }, this.createElement);
        showSpinner(this.spinnerElement);
      }
    };
    DropDownList2.prototype.keyActionHandler = function(e) {
      if (!this.enabled) {
        return;
      }
      this.keyboardEvent = e;
      if (this.isPreventKeyAction && this.enableVirtualization) {
        e.preventDefault();
      }
      var preventAction = e.action === "pageUp" || e.action === "pageDown";
      var preventHomeEnd = this.getModuleName() !== "dropdownlist" && (e.action === "home" || e.action === "end");
      this.isEscapeKey = e.action === "escape";
      this.isTabKey = !this.isPopupOpen && e.action === "tab";
      var isNavigation = e.action === "down" || e.action === "up" || e.action === "pageUp" || e.action === "pageDown" || e.action === "home" || e.action === "end";
      if ((this.isEditTextBox() || preventAction || preventHomeEnd) && !this.isPopupOpen) {
        return;
      }
      if (!this.readonly) {
        var isTabAction = e.action === "tab" || e.action === "close";
        if (isNullOrUndefined2(this.list) && !this.isRequested && !isTabAction && e.action !== "escape") {
          this.searchKeyEvent = e;
          if (!this.enableVirtualization || this.enableVirtualization && this.getModuleName() !== "autocomplete" && e.type !== "mousedown" && (e.keyCode === 40 || e.keyCode === 38)) {
            this.renderList(e);
            this.UpdateSkeleton();
            this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
            this.ulElement = this.list.querySelector("ul");
          }
        }
        if (isNullOrUndefined2(this.list) || !isNullOrUndefined2(this.liCollections) && isNavigation && this.liCollections.length === 0 || this.isRequested) {
          return;
        }
        if (isTabAction && this.getModuleName() !== "autocomplete" && this.isPopupOpen || e.action === "escape") {
          e.preventDefault();
        }
        this.isSelected = e.action === "escape" ? false : this.isSelected;
        this.isTyped = isNavigation || e.action === "escape" ? false : this.isTyped;
        switch (e.action) {
          case "down":
          case "up":
            this.updateUpDownAction(e);
            break;
          case "pageUp":
            this.pageUpSelection(this.activeIndex - this.getPageCount(), e);
            e.preventDefault();
            break;
          case "pageDown":
            this.pageDownSelection(this.activeIndex + this.getPageCount(), e);
            e.preventDefault();
            break;
          case "home":
            this.isMouseScrollAction = true;
            this.updateHomeEndAction(e);
            break;
          case "end":
            this.isMouseScrollAction = true;
            this.updateHomeEndAction(e);
            break;
          case "space":
            if (this.getModuleName() === "dropdownlist") {
              if (!this.beforePopupOpen) {
                this.showPopup();
                e.preventDefault();
              }
            }
            break;
          case "open":
            this.showPopup(e);
            break;
          case "hide":
            this.preventAltUp = this.isPopupOpen;
            this.hidePopup(e);
            this.focusDropDown(e);
            break;
          case "enter":
            this.selectCurrentItem(e);
            break;
          case "tab":
            this.selectCurrentValueOnTab(e);
            break;
          case "escape":
          case "close":
            if (this.isPopupOpen) {
              this.hidePopup(e);
              this.focusDropDown(e);
            }
            break;
        }
      }
    };
    DropDownList2.prototype.updateUpDownAction = function(e, isVirtualKeyAction) {
      if (this.fields.disabled && this.list && this.list.querySelectorAll(".e-list-item:not(.e-disabled)").length === 0) {
        return;
      }
      if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== "autocomplete") {
        var value = this.getItemData().value;
        if (isNullOrUndefined2(value)) {
          value = "null";
        }
        var filterIndex = this.getIndexByValue(value);
        if (!isNullOrUndefined2(filterIndex)) {
          this.activeIndex = filterIndex;
        }
      }
      var focusEle = this.list.querySelector("." + dropDownListClasses.focus);
      if (this.isSelectFocusItem(focusEle) && !isVirtualKeyAction) {
        this.setSelection(focusEle, e);
        if (this.enableVirtualization) {
          var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + this.virtualListInfo.startIndex * this.selectedLI.offsetHeight : this.selectedLI.offsetTop;
          if (this.fields.groupBy) {
            selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex === 0 ? this.selectedLI.offsetHeight - selectedLiOffsetTop : selectedLiOffsetTop - this.selectedLI.offsetHeight;
          }
          this.list.scrollTop = selectedLiOffsetTop - this.list.querySelectorAll(".e-virtual-list").length * this.selectedLI.offsetHeight;
        }
      } else if (!isNullOrUndefined2(this.liCollections)) {
        var virtualIndex = this.activeIndex;
        var index = e.action === "down" ? this.activeIndex + 1 : this.activeIndex - 1;
        index = isVirtualKeyAction ? virtualIndex : index;
        var startIndex = 0;
        if (this.getModuleName() === "autocomplete") {
          startIndex = e.action === "down" && isNullOrUndefined2(this.activeIndex) ? 0 : this.liCollections.length - 1;
          index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
        }
        var nextItem = void 0;
        if (this.getModuleName() !== "autocomplete" || this.getModuleName() === "autocomplete" && this.isPopupOpen) {
          if (!this.enableVirtualization) {
            nextItem = isNullOrUndefined2(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index];
          } else {
            if (!isVirtualKeyAction) {
              nextItem = isNullOrUndefined2(this.activeIndex) ? this.liCollections[this.skeletonCount] : this.liCollections[index];
              nextItem = !isNullOrUndefined2(nextItem) && !nextItem.classList.contains("e-virtual-list") ? nextItem : null;
            } else {
              if (this.getModuleName() === "autocomplete") {
                var value = this.getFormattedValue(this.selectedLI.getAttribute("data-value"));
                nextItem = this.getElementByValue(value);
              } else {
                nextItem = this.getElementByValue(this.getItemData().value);
              }
            }
          }
        }
        if (!isNullOrUndefined2(nextItem)) {
          var focusAtFirstElement = this.liCollections[this.skeletonCount] && this.liCollections[this.skeletonCount].classList.contains("e-item-focus");
          this.setSelection(nextItem, e);
          if (focusAtFirstElement && this.enableVirtualization && this.getModuleName() === "autocomplete" && !isVirtualKeyAction) {
            var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + this.virtualListInfo.startIndex * this.selectedLI.offsetHeight : this.selectedLI.offsetTop;
            selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex === 0 && this.fields.groupBy ? this.selectedLI.offsetHeight - selectedLiOffsetTop : selectedLiOffsetTop - this.selectedLI.offsetHeight;
            this.list.scrollTop = selectedLiOffsetTop - this.list.querySelectorAll(".e-virtual-list").length * this.selectedLI.offsetHeight;
          }
        } else if (this.enableVirtualization && !this.isPopupOpen && this.getModuleName() !== "autocomplete" && (this.viewPortInfo.endIndex !== this.totalItemCount && e.action === "down" || this.viewPortInfo.startIndex !== 0 && e.action === "up")) {
          if (e.action === "down") {
            this.viewPortInfo.startIndex = this.viewPortInfo.startIndex + this.itemCount < this.totalItemCount - this.itemCount ? this.viewPortInfo.startIndex + this.itemCount : this.totalItemCount - this.itemCount;
            this.viewPortInfo.endIndex = this.viewPortInfo.startIndex + this.itemCount;
            this.updateVirtualItemIndex();
            this.isCustomFilter = this.getModuleName() === "combobox" ? true : this.isCustomFilter;
            this.resetList(this.dataSource, this.fields, this.query);
            this.isCustomFilter = this.getModuleName() === "combobox" ? false : this.isCustomFilter;
            var value = this.liCollections[0].getAttribute("data-value") !== "null" ? this.getFormattedValue(this.liCollections[0].getAttribute("data-value")) : null;
            var selectedData = this.getDataByValue(value);
            if (selectedData) {
              this.itemData = selectedData;
            }
          } else if (e.action === "up") {
            this.viewPortInfo.startIndex = this.viewPortInfo.startIndex - this.itemCount > 0 ? this.viewPortInfo.startIndex - this.itemCount : 0;
            this.viewPortInfo.endIndex = this.viewPortInfo.startIndex + this.itemCount;
            this.updateVirtualItemIndex();
            this.isCustomFilter = this.getModuleName() === "combobox" ? true : this.isCustomFilter;
            this.resetList(this.dataSource, this.fields, this.query);
            this.isCustomFilter = this.getModuleName() === "combobox" ? false : this.isCustomFilter;
            var value = this.liCollections[this.liCollections.length - 1].getAttribute("data-value") !== "null" ? this.getFormattedValue(this.liCollections[this.liCollections.length - 1].getAttribute("data-value")) : null;
            var selectedData = this.getDataByValue(value);
            if (selectedData) {
              this.itemData = selectedData;
            }
          }
          this.UpdateSkeleton();
          this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
          this.ulElement = this.list.querySelector("ul");
          this.handleVirtualKeyboardActions(e, this.pageCount);
        }
      }
      if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== "autocomplete") {
        var value = this.getItemData().value;
        var filterIndex = this.getIndexByValueFilter(value, this.actionCompleteData.ulElement);
        if (!isNullOrUndefined2(filterIndex)) {
          this.activeIndex = filterIndex;
        }
      }
      if (this.allowFiltering && this.getModuleName() === "dropdownlist" && this.filterInput) {
        if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-item-focus")[0])) {
          attributes2(this.filterInput, {
            "aria-activedescendant": this.ulElement.getElementsByClassName("e-item-focus")[0].id
          });
        } else if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-active")[0])) {
          attributes2(this.filterInput, {
            "aria-activedescendant": this.ulElement.getElementsByClassName("e-active")[0].id
          });
        }
      }
      var itemIndex;
      for (var index = 0; index < this.liCollections.length; index++) {
        if (this.liCollections[index].classList.contains(dropDownListClasses.focus) || this.liCollections[index].classList.contains(dropDownListClasses.selected)) {
          itemIndex = index;
          break;
        }
      }
      if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
        if (this.getModuleName() !== "autocomplete") {
          if (this.liCollections.length - 1 === itemIndex && e.action === "down") {
            e.action = "up";
          }
          if (itemIndex === 0 && e.action === "up") {
            e.action = "down";
          }
        }
        this.updateUpDownAction(e);
      }
      e.preventDefault();
    };
    DropDownList2.prototype.updateHomeEndAction = function(e, isVirtualKeyAction) {
      if (this.getModuleName() === "dropdownlist") {
        var findLi = 0;
        if (e.action === "home") {
          findLi = 0;
          if (this.enableVirtualization && this.isPopupOpen) {
            findLi = this.skeletonCount;
          } else if (this.enableVirtualization && !this.isPopupOpen && this.viewPortInfo.startIndex !== 0) {
            this.viewPortInfo.startIndex = 0;
            this.viewPortInfo.endIndex = this.itemCount;
            this.updateVirtualItemIndex();
            this.resetList(this.dataSource, this.fields, this.query);
          }
        } else {
          if (this.enableVirtualization && !this.isPopupOpen && this.viewPortInfo.endIndex !== this.totalItemCount) {
            this.viewPortInfo.startIndex = this.totalItemCount - this.itemCount;
            this.viewPortInfo.endIndex = this.totalItemCount;
            this.updateVirtualItemIndex();
            this.resetList(this.dataSource, this.fields, this.query);
          }
          findLi = this.getItems().length - 1;
        }
        e.preventDefault();
        if (this.activeIndex === findLi) {
          if (isVirtualKeyAction) {
            this.setSelection(this.liCollections[findLi], e);
          }
          return;
        }
        if (!this.enableVirtualization && this.liCollections[findLi] && this.liCollections[findLi].classList.contains("e-disabled")) {
          return;
        }
        this.setSelection(this.liCollections[findLi], e);
      }
    };
    DropDownList2.prototype.selectCurrentValueOnTab = function(e) {
      if (this.getModuleName() === "autocomplete") {
        this.selectCurrentItem(e);
      } else {
        if (this.isPopupOpen) {
          this.hidePopup(e);
          this.focusDropDown(e);
        }
      }
    };
    DropDownList2.prototype.mobileKeyActionHandler = function(e) {
      if (!this.enabled) {
        return;
      }
      if (this.isEditTextBox() && !this.isPopupOpen) {
        return;
      }
      if (!this.readonly) {
        if (this.list === void 0 && !this.isRequested) {
          this.searchKeyEvent = e;
          this.renderList();
        }
        if (isNullOrUndefined2(this.list) || !isNullOrUndefined2(this.liCollections) && this.liCollections.length === 0 || this.isRequested) {
          return;
        }
        if (e.action === "enter") {
          this.selectCurrentItem(e);
        }
      }
    };
    DropDownList2.prototype.handleVirtualKeyboardActions = function(e, pageCount) {
      switch (e.action) {
        case "down":
        case "up":
          if (this.itemData != null || this.getModuleName() === "autocomplete") {
            this.updateUpDownAction(e, true);
          }
          break;
        case "pageUp":
          this.activeIndex = this.getModuleName() === "autocomplete" ? this.getIndexByValue(this.selectedLI.getAttribute("data-value")) + this.getPageCount() - 1 : this.getIndexByValue(this.previousValue);
          this.pageUpSelection(this.activeIndex - this.getPageCount(), e, true);
          e.preventDefault();
          break;
        case "pageDown":
          this.activeIndex = this.getModuleName() === "autocomplete" ? this.getIndexByValue(this.selectedLI.getAttribute("data-value")) - this.getPageCount() : this.getIndexByValue(this.previousValue);
          this.pageDownSelection(!isNullOrUndefined2(this.activeIndex) ? this.activeIndex + this.getPageCount() : 2 * this.getPageCount(), e, true);
          e.preventDefault();
          break;
        case "home":
          this.isMouseScrollAction = true;
          this.updateHomeEndAction(e, true);
          break;
        case "end":
          this.isMouseScrollAction = true;
          this.updateHomeEndAction(e, true);
          break;
      }
      this.keyboardEvent = null;
    };
    DropDownList2.prototype.selectCurrentItem = function(e) {
      if (this.isPopupOpen) {
        var li = this.list.querySelector("." + dropDownListClasses.focus);
        if (this.isDisabledElement(li)) {
          return;
        }
        if (li) {
          this.setSelection(li, e);
          this.isTyped = false;
        }
        if (this.isSelected) {
          this.isSelectCustom = false;
          this.onChangeEvent(e);
        }
        this.hidePopup(e);
        this.focusDropDown(e);
      } else {
        this.showPopup();
      }
    };
    DropDownList2.prototype.isSelectFocusItem = function(element2) {
      return !isNullOrUndefined2(element2);
    };
    DropDownList2.prototype.pageUpSelection = function(steps, event2, isVirtualKeyAction) {
      var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
      if (!this.enableVirtualization && previousItem && previousItem.classList.contains("e-disabled")) {
        var validIndex = steps >= 0 ? steps + 1 : 0;
        while (validIndex < this.liCollections.length) {
          previousItem = this.liCollections[validIndex];
          if (previousItem && !previousItem.classList.contains("e-disabled")) {
            break;
          }
          validIndex--;
          if (validIndex < 0) {
            return;
          }
        }
      }
      if (this.enableVirtualization && this.activeIndex == null) {
        previousItem = this.liCollections.length >= steps && steps >= 0 ? this.liCollections[steps + this.skeletonCount + 1] : this.liCollections[0];
      }
      if (!isNullOrUndefined2(previousItem) && previousItem.classList.contains("e-virtual-list")) {
        previousItem = this.liCollections[this.skeletonCount];
      }
      this.PageUpDownSelection(previousItem, event2);
      if (this.allowFiltering && this.getModuleName() === "dropdownlist") {
        if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-item-focus")[0])) {
          attributes2(this.filterInput, {
            "aria-activedescendant": this.ulElement.getElementsByClassName("e-item-focus")[0].id
          });
        } else if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-active")[0])) {
          attributes2(this.filterInput, {
            "aria-activedescendant": this.ulElement.getElementsByClassName("e-active")[0].id
          });
        }
      }
    };
    DropDownList2.prototype.PageUpDownSelection = function(previousItem, event2) {
      if (this.enableVirtualization) {
        if (!isNullOrUndefined2(previousItem) && (this.getModuleName() !== "autocomplete" && !previousItem.classList.contains("e-active") || this.getModuleName() === "autocomplete" && !previousItem.classList.contains("e-item-focus"))) {
          this.setSelection(previousItem, event2);
        }
      } else {
        this.setSelection(previousItem, event2);
      }
    };
    DropDownList2.prototype.pageDownSelection = function(steps, event2, isVirtualKeyAction) {
      var list = this.getItems();
      var previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
      if (!this.enableVirtualization && previousItem && previousItem.classList.contains("e-disabled")) {
        while (steps >= 0 && steps < this.liCollections.length) {
          previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
          if (previousItem && !previousItem.classList.contains("e-disabled")) {
            break;
          }
          steps++;
        }
      }
      if (this.enableVirtualization && this.skeletonCount > 0) {
        steps = this.getModuleName() === "dropdownlist" && this.allowFiltering ? steps + 1 : steps;
        previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
      }
      if (this.enableVirtualization && this.activeIndex == null) {
        previousItem = steps <= list.length ? this.liCollections[steps + this.skeletonCount - 1] : this.liCollections[list.length - 1];
      }
      this.PageUpDownSelection(previousItem, event2);
      if (this.allowFiltering && this.getModuleName() === "dropdownlist") {
        if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-item-focus")[0])) {
          attributes2(this.filterInput, {
            "aria-activedescendant": this.ulElement.getElementsByClassName("e-item-focus")[0].id
          });
        } else if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-active")[0])) {
          attributes2(this.filterInput, {
            "aria-activedescendant": this.ulElement.getElementsByClassName("e-active")[0].id
          });
        }
      }
    };
    DropDownList2.prototype.unWireEvent = function() {
      if (!isNullOrUndefined2(this.inputWrapper)) {
        EventHandler2.remove(this.inputWrapper.container, "mousedown", this.dropDownClick);
        EventHandler2.remove(this.inputWrapper.container, "keypress", this.onSearch);
        EventHandler2.remove(this.inputWrapper.container, "focus", this.focusIn);
        EventHandler2.remove(window, "resize", this.windowResize);
      }
      this.unBindCommonEvent();
    };
    DropDownList2.prototype.unWireListEvents = function() {
      if (this.list) {
        EventHandler2.remove(this.list, "click", this.onMouseClick);
        EventHandler2.remove(this.list, "mouseover", this.onMouseOver);
        EventHandler2.remove(this.list, "mouseout", this.onMouseLeave);
      }
    };
    DropDownList2.prototype.checkSelector = function(id) {
      return '[id="' + id.replace(/(:|\.|\[|\]|,|=|@|\\|\/|#)/g, "\\$1") + '"]';
    };
    DropDownList2.prototype.onDocumentClick = function(e) {
      var target = e.target;
      if (!(!isNullOrUndefined2(this.popupObj) && closest2(target, this.checkSelector(this.popupObj.element.id))) && !isNullOrUndefined2(this.inputWrapper) && !this.inputWrapper.container.contains(e.target)) {
        if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
          this.isDocumentClick = true;
          var isActive = this.isRequested;
          if (this.getModuleName() === "combobox" && this.isTyped) {
            this.isInteracted = false;
          }
          this.hidePopup(e);
          this.isInteracted = false;
          if (!isActive) {
            this.onFocusOut(e);
            this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
          }
        }
      } else if (target !== this.inputElement && !(this.allowFiltering && target === this.filterInput) && !(this.getModuleName() === "combobox" && !this.allowFiltering && Browser2.isDevice && target === this.inputWrapper.buttons[0])) {
        this.isPreventBlur = (Browser2.isIE || Browser2.info.name === "edge") && (document.activeElement === this.targetElement() || document.activeElement === this.filterInput);
        e.preventDefault();
      }
    };
    DropDownList2.prototype.activeStateChange = function() {
      if (this.isDocumentClick) {
        this.hidePopup();
        this.onFocusOut();
        this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
      }
    };
    DropDownList2.prototype.focusDropDown = function(e) {
      if (!this.initial && this.isFilterLayout()) {
        this.focusIn(e);
      }
    };
    DropDownList2.prototype.dropDownClick = function(e) {
      if (e.which === 3 || e.button === 2) {
        return;
      }
      this.keyboardEvent = null;
      if (this.targetElement().classList.contains(dropDownListClasses.disable) || this.inputWrapper.clearButton === e.target) {
        return;
      }
      var target = e.target;
      if (target !== this.inputElement && !(this.allowFiltering && target === this.filterInput) && this.getModuleName() !== "combobox") {
        e.preventDefault();
      }
      if (!this.readonly) {
        if (this.isPopupOpen) {
          this.hidePopup(e);
          if (this.isFilterLayout()) {
            this.focusDropDown(e);
          }
        } else {
          this.focusIn(e);
          this.floatLabelChange();
          this.queryString = this.inputElement.value.trim() === "" ? null : this.inputElement.value;
          this.isDropDownClick = true;
          this.showPopup(e);
        }
        var proxy_1 = this;
        var duration = this.element.tagName === this.getNgDirective() && this.itemTemplate ? 500 : 100;
        if (!this.isSecondClick) {
          setTimeout(function() {
            proxy_1.cloneElements();
            proxy_1.isSecondClick = true;
            proxy_1.isSecondClick = proxy_1.isReact && proxy_1.isFiltering() && proxy_1.dataSource instanceof DataManager && !proxy_1.list.querySelector("ul") ? false : true;
          }, duration);
        }
      } else {
        this.focusIn(e);
      }
    };
    DropDownList2.prototype.cloneElements = function() {
      if (this.list) {
        var ulElement = this.list.querySelector("ul");
        if (ulElement) {
          ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
          this.actionCompleteData.ulElement = ulElement;
        }
      }
    };
    DropDownList2.prototype.updateSelectedItem = function(li, e, preventSelect, isSelection) {
      var _this = this;
      this.removeSelection();
      li.classList.add(dropDownBaseClasses.selected);
      this.removeHover();
      var value = li.getAttribute("data-value") !== null ? this.getFormattedValue(li.getAttribute("data-value")) : null;
      var selectedData = this.getDataByValue(value);
      if (!this.initial && !preventSelect && !isNullOrUndefined2(e)) {
        var items = this.detachChanges(selectedData);
        this.isSelected = true;
        var eventArgs = {
          e,
          item: li,
          itemData: items,
          isInteracted: e ? true : false,
          cancel: false
        };
        this.trigger("select", eventArgs, function(eventArgs2) {
          if (eventArgs2.cancel) {
            li.classList.remove(dropDownBaseClasses.selected);
          } else {
            _this.selectEventCallback(li, e, preventSelect, selectedData, value);
            if (isSelection) {
              _this.setSelectOptions(li, e);
            }
          }
        });
      } else {
        this.selectEventCallback(li, e, preventSelect, selectedData, value);
        if (isSelection) {
          this.setSelectOptions(li, e);
        }
      }
    };
    DropDownList2.prototype.selectEventCallback = function(li, e, preventSelect, selectedData, value) {
      this.previousItemData = !isNullOrUndefined2(this.itemData) ? this.itemData : null;
      if (this.itemData !== selectedData) {
        this.previousValue = !isNullOrUndefined2(this.itemData) ? typeof this.itemData == "object" && !this.allowObjectBinding ? this.checkFieldValue(this.itemData, this.fields.value.split(".")) : this.itemData : null;
      }
      this.item = li;
      this.itemData = selectedData;
      var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
      if (focusedItem) {
        removeClass2([focusedItem], dropDownBaseClasses.focus);
      }
      li.setAttribute("aria-selected", "true");
      if (isNullOrUndefined2(value)) {
        value = "null";
      }
      if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== "autocomplete") {
        var filterIndex = this.getIndexByValueFilter(value, this.actionCompleteData.ulElement);
        if (!isNullOrUndefined2(filterIndex)) {
          this.activeIndex = filterIndex;
        } else {
          this.activeIndex = this.getIndexByValue(value);
        }
      } else {
        if (this.enableVirtualization && this.activeIndex == null && this.dataSource instanceof DataManager) {
          this.UpdateSkeleton();
          this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
          this.ulElement = this.list.querySelector("ul");
        }
        this.activeIndex = this.getIndexByValue(value);
      }
    };
    DropDownList2.prototype.activeItem = function(li) {
      if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
        this.removeSelection();
        li.classList.add(dropDownBaseClasses.selected);
        this.removeHover();
        li.setAttribute("aria-selected", "true");
      }
    };
    DropDownList2.prototype.setValue = function(e) {
      var dataItem = this.getItemData();
      this.isTouched = !isNullOrUndefined2(e);
      if (dataItem.value === null) {
        Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);
      } else {
        Input.setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton);
      }
      if (this.valueTemplate && this.itemData !== null) {
        this.setValueTemplate();
      } else if (!isNullOrUndefined2(this.valueTempElement) && this.inputElement.previousSibling === this.valueTempElement) {
        detach2(this.valueTempElement);
        this.inputElement.style.display = "block";
      }
      if (!isNullOrUndefined2(dataItem.value) && !this.enableVirtualization && this.allowFiltering) {
        this.activeIndex = this.getIndexByValueFilter(dataItem.value, this.actionCompleteData.ulElement);
      }
      var clearIcon2 = dropDownListClasses.clearIcon;
      var isFilterElement = this.isFiltering() && this.filterInput && this.getModuleName() === "combobox";
      var clearElement = isFilterElement && this.filterInput.parentElement.querySelector("." + clearIcon2);
      if (this.isFiltering() && clearElement) {
        clearElement.style.removeProperty("visibility");
      }
      if (!this.allowObjectBinding && this.previousValue === dataItem.value || this.allowObjectBinding && this.previousValue != null && this.isObjectInArray(this.previousValue, [this.allowCustom && this.isObjectCustomValue ? this.value ? this.value : dataItem : dataItem.value ? this.getDataByValue(dataItem.value) : dataItem])) {
        this.isSelected = false;
        return true;
      } else {
        this.isSelected = !this.initial ? true : false;
        this.isSelectCustom = false;
        if (this.getModuleName() === "dropdownlist") {
          this.updateIconState();
        }
        return false;
      }
    };
    DropDownList2.prototype.setSelection = function(li, e) {
      if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || this.isPopupOpen && this.isSelected && li.classList.contains(dropDownBaseClasses.selected))) {
        this.updateSelectedItem(li, e, false, true);
      } else {
        this.setSelectOptions(li, e);
        if (this.enableVirtualization && this.value) {
          var fields = !this.isPrimitiveData ? this.fields.value : "";
          var currentValue = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
          if (this.dataSource instanceof DataManager) {
            var getItem = new DataManager(this.virtualGroupDataSource).executeLocal(new Query().where(new Predicate(fields, "equal", currentValue)));
            if (getItem && getItem.length > 0) {
              this.itemData = getItem[0];
              var dataItem = this.getItemData();
              var value = this.allowObjectBinding ? this.getDataByValue(dataItem.value) : dataItem.value;
              if (this.value === dataItem.value && this.text !== dataItem.text || this.value !== dataItem.value && this.text === dataItem.text) {
                this.setProperties({
                  "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
                  "value": value
                });
              }
            }
          } else {
            var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, "equal", currentValue)));
            if (getItem && getItem.length > 0) {
              this.itemData = getItem[0];
              var dataItem = this.getItemData();
              var value = this.allowObjectBinding ? this.getDataByValue(dataItem.value) : dataItem.value;
              if (this.value === dataItem.value && this.text !== dataItem.text || this.value !== dataItem.value && this.text === dataItem.text) {
                this.setProperties({
                  "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
                  "value": value
                });
              }
            }
          }
        }
      }
    };
    DropDownList2.prototype.setSelectOptions = function(li, e) {
      if (this.list) {
        this.removeHover();
      }
      this.previousSelectedLI = !isNullOrUndefined2(this.selectedLI) ? this.selectedLI : null;
      this.selectedLI = li;
      if (this.setValue(e)) {
        return;
      }
      if (!this.isPopupOpen && !isNullOrUndefined2(li) || this.isPopupOpen && !isNullOrUndefined2(e) && (e.type !== "keydown" || e.type === "keydown" && e.action === "enter")) {
        this.isSelectCustom = false;
        this.onChangeEvent(e);
      }
      if (this.isPopupOpen && !isNullOrUndefined2(this.selectedLI) && this.itemData !== null && (!e || e.type !== "click")) {
        this.setScrollPosition(e);
      }
      if (Browser2.info.name !== "mozilla") {
        if (this.targetElement()) {
          attributes2(this.targetElement(), {
            "aria-describedby": this.inputElement.id !== "" ? this.inputElement.id : this.element.id
          });
          this.targetElement().removeAttribute("aria-live");
        }
      }
      if (this.isPopupOpen && !isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-item-focus")[0])) {
        attributes2(this.targetElement(), {
          "aria-activedescendant": this.ulElement.getElementsByClassName("e-item-focus")[0].id
        });
      } else if (this.isPopupOpen && !isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-active")[0])) {
        attributes2(this.targetElement(), {
          "aria-activedescendant": this.ulElement.getElementsByClassName("e-active")[0].id
        });
      }
    };
    DropDownList2.prototype.dropdownCompiler = function(dropdownTemplate) {
      var checkTemplate = false;
      if (typeof dropdownTemplate !== "function" && dropdownTemplate) {
        try {
          checkTemplate = document.querySelectorAll(dropdownTemplate).length ? true : false;
        } catch (exception) {
          checkTemplate = false;
        }
      }
      return checkTemplate;
    };
    DropDownList2.prototype.setValueTemplate = function() {
      var compiledString;
      if (this.isReact) {
        this.clearTemplate(["valueTemplate"]);
        if (this.valueTempElement) {
          detach2(this.valueTempElement);
          this.inputElement.style.display = "block";
          this.valueTempElement = null;
        }
      }
      if (!this.valueTempElement) {
        this.valueTempElement = this.createElement("span", {
          className: dropDownListClasses.value
        });
        this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement);
        this.inputElement.style.display = "none";
      }
      if (!this.isReact) {
        this.valueTempElement.innerHTML = "";
      }
      var valuecheck = this.dropdownCompiler(this.valueTemplate);
      if (typeof this.valueTemplate !== "function" && valuecheck) {
        compiledString = compile4(document.querySelector(this.valueTemplate).innerHTML.trim());
      } else {
        compiledString = compile4(this.valueTemplate);
      }
      var valueCompTemp = compiledString(this.itemData, this, "valueTemplate", this.valueTemplateId, this.isStringTemplate, null, this.valueTempElement);
      if (valueCompTemp && valueCompTemp.length > 0) {
        append(valueCompTemp, this.valueTempElement);
      }
      this.renderReactTemplates();
    };
    DropDownList2.prototype.removeSelection = function() {
      if (this.list) {
        var selectedItems = this.list.querySelectorAll("." + dropDownBaseClasses.selected);
        if (selectedItems.length) {
          removeClass2(selectedItems, dropDownBaseClasses.selected);
          selectedItems[0].removeAttribute("aria-selected");
        }
      }
    };
    DropDownList2.prototype.getItemData = function() {
      var fields = this.fields;
      var dataItem = null;
      dataItem = this.itemData;
      var dataValue;
      var dataText;
      if (!isNullOrUndefined2(dataItem)) {
        dataValue = getValue2(fields.value, dataItem);
        dataText = getValue2(fields.text, dataItem);
      }
      var value = !isNullOrUndefined2(dataItem) && !isUndefined2(dataValue) ? dataValue : dataItem;
      var text = !isNullOrUndefined2(dataItem) && !isUndefined2(dataValue) ? dataText : dataItem;
      return {
        value,
        text
      };
    };
    DropDownList2.prototype.onChangeEvent = function(eve, isCustomValue) {
      var _this = this;
      var dataItem = this.getItemData();
      var index = this.isSelectCustom ? null : this.activeIndex;
      if (this.enableVirtualization) {
        var datas = this.dataSource instanceof DataManager ? this.virtualGroupDataSource : this.dataSource;
        if (dataItem.value && datas && datas.length > 0) {
          var foundIndex = datas.findIndex(function(data) {
            return !isNullOrUndefined2(dataItem.value) && getValue2(_this.fields.value, data) === dataItem.value;
          });
          if (foundIndex !== -1) {
            index = foundIndex;
          }
        }
      }
      var value = this.allowObjectBinding ? isCustomValue ? this.value : this.getDataByValue(dataItem.value) : dataItem.value;
      this.setProperties({
        "index": index,
        "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
        "value": value
      }, true);
      this.detachChangeEvent(eve);
    };
    DropDownList2.prototype.detachChanges = function(value) {
      var items;
      if (typeof value === "string" || typeof value === "boolean" || typeof value === "number") {
        items = Object.defineProperties({}, {
          value: {
            value,
            enumerable: true
          },
          text: {
            value,
            enumerable: true
          }
        });
      } else {
        items = value;
      }
      return items;
    };
    DropDownList2.prototype.detachChangeEvent = function(eve) {
      this.isSelected = false;
      this.previousValue = this.value;
      this.activeIndex = this.enableVirtualization ? this.getIndexByValue(this.value) : this.index;
      this.typedString = !isNullOrUndefined2(this.text) ? this.text : "";
      if (!this.initial) {
        var items = this.detachChanges(this.itemData);
        var preItems = void 0;
        if (typeof this.previousItemData === "string" || typeof this.previousItemData === "boolean" || typeof this.previousItemData === "number") {
          preItems = Object.defineProperties({}, {
            value: {
              value: this.previousItemData,
              enumerable: true
            },
            text: {
              value: this.previousItemData,
              enumerable: true
            }
          });
        } else {
          preItems = this.previousItemData;
        }
        this.setHiddenValue();
        var eventArgs = {
          e: eve,
          item: this.item,
          itemData: items,
          previousItem: this.previousSelectedLI,
          previousItemData: preItems,
          isInteracted: eve ? true : false,
          value: this.value,
          element: this.element,
          event: eve
        };
        if (this.isAngular && this.preventChange) {
          this.preventChange = false;
        } else {
          this.trigger("change", eventArgs);
        }
      }
      if ((isNullOrUndefined2(this.value) || this.value === "") && this.floatLabelType !== "Always") {
        removeClass2([this.inputWrapper.container], "e-valid-input");
      }
    };
    DropDownList2.prototype.setHiddenValue = function() {
      if (!isNullOrUndefined2(this.value)) {
        var value = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
        if (this.hiddenElement.querySelector("option")) {
          var selectedElement = this.hiddenElement.querySelector("option");
          selectedElement.textContent = this.text;
          selectedElement.setAttribute("value", value.toString());
        } else {
          if (!isNullOrUndefined2(this.hiddenElement)) {
            var option = document.createElement("option");
            option.text = this.text;
            option.setAttribute("selected", "");
            this.hiddenElement.appendChild(option);
            var selectedElement = this.hiddenElement.querySelector("option");
            selectedElement.setAttribute("value", value.toString());
          }
        }
      } else {
        this.hiddenElement.innerHTML = "";
      }
    };
    DropDownList2.prototype.onFilterUp = function(e) {
      if (!(e.ctrlKey && e.keyCode === 86) && (this.isValidKey || e.keyCode === 40 || e.keyCode === 38)) {
        this.isValidKey = false;
        this.filterArgs = e;
        this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
        switch (e.keyCode) {
          case 38:
          case 40:
            if (this.getModuleName() === "autocomplete" && !this.isPopupOpen && !this.preventAltUp && !this.isRequested) {
              this.preventAutoFill = true;
              this.searchLists(e);
            } else {
              this.preventAutoFill = false;
            }
            this.preventAltUp = false;
            if (this.getModuleName() === "autocomplete" && !isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-item-focus")[0])) {
              attributes2(this.targetElement(), {
                "aria-activedescendant": this.ulElement.getElementsByClassName("e-item-focus")[0].id
              });
            }
            e.preventDefault();
            break;
          case 46:
          case 8:
            this.typedString = this.filterInput.value;
            if (!this.isPopupOpen && this.typedString !== "" || this.isPopupOpen && this.queryString.length > 0) {
              this.preventAutoFill = true;
              this.searchLists(e);
            } else if (this.typedString === "" && this.queryString === "" && this.getModuleName() !== "autocomplete") {
              this.preventAutoFill = true;
              this.searchLists(e);
            } else if (this.typedString === "") {
              if (this.list) {
                this.resetFocusElement();
              }
              this.activeIndex = null;
              if (this.getModuleName() !== "dropdownlist") {
                this.preventAutoFill = true;
                this.searchLists(e);
                if (this.getModuleName() === "autocomplete") {
                  this.hidePopup();
                }
              }
            }
            e.preventDefault();
            break;
          default:
            if (this.isFiltering() && this.getModuleName() === "combobox" && isNullOrUndefined2(this.list)) {
              this.getInitialData = true;
              this.renderList();
              if (!this.isSecondClick && !this.isDropDownClick) {
                this.executeCloneElements();
              }
            }
            this.typedString = this.filterInput.value;
            this.preventAutoFill = false;
            if (!this.getInitialData) {
              this.searchLists(e);
            }
            if (this.enableVirtualization && this.getModuleName() !== "autocomplete" || this.getModuleName() === "autocomplete" && !(this.dataSource instanceof DataManager) || this.getModuleName() === "autocomplete" && this.dataSource instanceof DataManager && this.totalItemCount !== 0) {
              this.getFilteringSkeletonCount();
            }
            break;
        }
      } else {
        this.isValidKey = false;
      }
    };
    DropDownList2.prototype.onFilterDown = function(e) {
      switch (e.keyCode) {
        case 13:
          break;
        case 40:
        case 38:
          this.queryString = this.filterInput.value;
          e.preventDefault();
          break;
        case 9:
          if (this.isPopupOpen && this.getModuleName() !== "autocomplete") {
            e.preventDefault();
          }
          break;
        default:
          this.prevSelectPoints = this.getSelectionPoints();
          this.queryString = this.filterInput.value;
          break;
      }
    };
    DropDownList2.prototype.removeFillSelection = function() {
      if (this.isInteracted) {
        var selection = this.getSelectionPoints();
        this.inputElement.setSelectionRange(selection.end, selection.end);
      }
    };
    DropDownList2.prototype.getQuery = function(query) {
      var filterQuery;
      if (!this.isCustomFilter && this.allowFiltering && this.filterInput) {
        filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
        var filterType = this.typedString === "" ? "contains" : this.filterType;
        var dataType = this.typeOfData(this.dataSource).typeof;
        if (!(this.dataSource instanceof DataManager) && dataType === "string" || dataType === "number") {
          filterQuery.where("", filterType, this.typedString, this.ignoreCase, this.ignoreAccent);
        } else if (this.getModuleName() !== "combobox" || this.isFiltering() && this.getModuleName() === "combobox" && this.typedString !== "") {
          var fields = this.fields.text ? this.fields.text : "";
          filterQuery.where(fields, filterType, this.typedString, this.ignoreCase, this.ignoreAccent);
        }
      } else {
        filterQuery = this.enableVirtualization && !isNullOrUndefined2(this.customFilterQuery) ? this.customFilterQuery.clone() : query ? query.clone() : this.query ? this.query.clone() : new Query();
      }
      if (this.enableVirtualization && this.viewPortInfo.endIndex !== 0) {
        var takeValue = this.getTakeValue();
        var alreadySkipAdded = false;
        if (filterQuery) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onSkip") {
              alreadySkipAdded = true;
              break;
            }
          }
        }
        var queryTakeValue = 0;
        var querySkipValue = 0;
        if (filterQuery && filterQuery.queries.length > 0) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onSkip") {
              querySkipValue = filterQuery.queries[queryElements].e.nos;
            }
            if (filterQuery.queries[queryElements].fn === "onTake") {
              queryTakeValue = takeValue <= filterQuery.queries[queryElements].e.nos ? filterQuery.queries[queryElements].e.nos : takeValue;
            }
          }
        }
        if (queryTakeValue <= 0 && this.query && this.query.queries.length > 0) {
          for (var queryElements = 0; queryElements < this.query.queries.length; queryElements++) {
            if (this.query.queries[queryElements].fn === "onTake") {
              queryTakeValue = takeValue <= this.query.queries[queryElements].e.nos ? this.query.queries[queryElements].e.nos : takeValue;
            }
          }
        }
        var skipExists = false;
        if (filterQuery && filterQuery.queries.length > 0) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onSkip") {
              querySkipValue = filterQuery.queries[queryElements].e.nos;
              filterQuery.queries.splice(queryElements, 1);
              alreadySkipAdded = false;
              --queryElements;
              continue;
            }
            if (filterQuery.queries[queryElements].fn === "onTake") {
              queryTakeValue = filterQuery.queries[queryElements].e.nos <= queryTakeValue ? queryTakeValue : filterQuery.queries[queryElements].e.nos;
              filterQuery.queries.splice(queryElements, 1);
              --queryElements;
            }
          }
        }
        if (!skipExists && (this.allowFiltering || !this.isPopupOpen || !alreadySkipAdded)) {
          if (querySkipValue > 0) {
            filterQuery.skip(querySkipValue);
          } else {
            filterQuery.skip(this.virtualItemStartIndex);
          }
        }
        if (this.isIncrementalRequest) {
          filterQuery.take(this.incrementalEndIndex);
        } else {
          if (queryTakeValue > 0) {
            filterQuery.take(queryTakeValue);
          } else {
            filterQuery.take(takeValue);
          }
        }
        filterQuery.requiresCount();
      }
      return filterQuery;
    };
    DropDownList2.prototype.getSelectionPoints = function() {
      var input2 = this.inputElement;
      return {
        start: Math.abs(input2.selectionStart),
        end: Math.abs(input2.selectionEnd)
      };
    };
    DropDownList2.prototype.searchLists = function(e) {
      var _this = this;
      this.isTyped = true;
      this.activeIndex = null;
      this.isListSearched = true;
      if (this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon)) {
        var clearElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon);
        clearElement.style.visibility = this.filterInput.value === "" ? "hidden" : "visible";
      }
      this.isDataFetched = false;
      if (this.isFiltering()) {
        this.checkAndResetCache();
        this.isRequesting = false;
        var eventArgs_1 = {
          preventDefaultAction: false,
          text: this.filterInput.value,
          updateData: function(dataSource, query, fields) {
            if (eventArgs_1.cancel) {
              return;
            }
            _this.isCustomFilter = true;
            _this.customFilterQuery = query ? query.clone() : query;
            _this.filteringAction(dataSource, query, fields);
          },
          baseEventArgs: e,
          cancel: false
        };
        this.trigger("filtering", eventArgs_1, function(eventArgs) {
          if (!eventArgs.cancel && !_this.isCustomFilter && !eventArgs.preventDefaultAction) {
            _this.filteringAction(_this.dataSource, null, _this.fields);
          }
        });
      }
    };
    DropDownList2.prototype.filter = function(dataSource, query, fields) {
      this.isCustomFilter = true;
      this.filteringAction(dataSource, query, fields);
    };
    DropDownList2.prototype.filteringAction = function(dataSource, query, fields) {
      if (!isNullOrUndefined2(this.filterInput)) {
        this.beforePopupOpen = !this.isPopupOpen && this.getModuleName() === "combobox" && this.filterInput.value === "" || this.getInitialData ? false : true;
        var isNoData = this.list.classList.contains(dropDownBaseClasses.noData);
        if (this.filterInput.value.trim() === "" && !this.itemTemplate) {
          this.actionCompleteData.isUpdated = false;
          this.isTyped = false;
          if (!isNullOrUndefined2(this.actionCompleteData.ulElement) && !isNullOrUndefined2(this.actionCompleteData.list)) {
            if (this.enableVirtualization) {
              if (this.isFiltering()) {
                this.isPreventScrollAction = true;
                this.list.scrollTop = 0;
                this.previousStartIndex = 0;
                this.virtualListInfo = null;
              }
              this.totalItemCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
              this.resetList(dataSource, fields, query);
              if (isNoData && !this.list.classList.contains(dropDownBaseClasses.noData)) {
                if (!this.list.querySelector(".e-virtual-ddl-content")) {
                  this.list.appendChild(this.createElement("div", {
                    className: "e-virtual-ddl-content",
                    styles: this.getTransformValues()
                  })).appendChild(this.list.querySelector(".e-list-parent"));
                }
                if (!this.list.querySelector(".e-virtual-ddl")) {
                  var virualElement = this.createElement("div", {
                    id: this.element.id + "_popup",
                    className: "e-virtual-ddl",
                    styles: this.GetVirtualTrackHeight()
                  });
                  this.list.parentElement.querySelector(".e-dropdownbase").appendChild(virualElement);
                }
              }
            }
            this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list);
          }
          this.isTyped = true;
          if (!isNullOrUndefined2(this.itemData) && this.getModuleName() === "dropdownlist") {
            this.focusIndexItem();
            this.setScrollPosition();
          }
          this.isNotSearchList = true;
        } else {
          this.isNotSearchList = false;
          query = this.filterInput.value.trim() === "" ? null : query;
          if (this.enableVirtualization && this.isFiltering() && this.isTyped) {
            this.isPreventScrollAction = true;
            this.list.scrollTop = 0;
            this.previousStartIndex = 0;
            this.virtualListInfo = null;
          }
          this.resetList(dataSource, fields, query);
          if (this.getModuleName() === "dropdownlist" && this.list.classList.contains(dropDownBaseClasses.noData)) {
            this.popupContentElement.setAttribute("role", "status");
            this.popupContentElement.setAttribute("id", "no-record");
            attributes2(this.filterInputObj.container, {
              "aria-activedescendant": "no-record"
            });
          }
          if (this.enableVirtualization && isNoData && !this.list.classList.contains(dropDownBaseClasses.noData)) {
            if (!this.list.querySelector(".e-virtual-ddl-content")) {
              this.list.appendChild(this.createElement("div", {
                className: "e-virtual-ddl-content",
                styles: this.getTransformValues()
              })).appendChild(this.list.querySelector(".e-list-parent"));
            }
            if (!this.list.querySelector(".e-virtual-ddl")) {
              var virualElement = this.createElement("div", {
                id: this.element.id + "_popup",
                className: "e-virtual-ddl",
                styles: this.GetVirtualTrackHeight()
              });
              this.list.parentElement.querySelector(".e-dropdownbase").appendChild(virualElement);
            }
          }
        }
        if (this.enableVirtualization) {
          this.getFilteringSkeletonCount();
        }
        this.renderReactTemplates();
        if (this.filterInput && this.filterInput.value === "" && this.getModuleName() === "combobox") {
          this.executeCloneElements();
        }
      }
    };
    DropDownList2.prototype.setSearchBox = function(popupElement) {
      if (this.isFiltering()) {
        var parentElement = popupElement.querySelector("." + dropDownListClasses.filterParent) ? popupElement.querySelector("." + dropDownListClasses.filterParent) : this.createElement("span", {
          className: dropDownListClasses.filterParent
        });
        this.filterInput = this.createElement("input", {
          attrs: {
            type: "text"
          },
          className: dropDownListClasses.filterInput
        });
        this.element.parentNode.insertBefore(this.filterInput, this.element);
        var backIcon = false;
        if (Browser2.isDevice && this.isDeviceFullScreen) {
          backIcon = true;
        }
        this.filterInputObj = Input.createInput({
          element: this.filterInput,
          buttons: backIcon ? [dropDownListClasses.backIcon, dropDownListClasses.filterBarClearIcon] : [dropDownListClasses.filterBarClearIcon],
          properties: {
            placeholder: this.filterBarPlaceholder
          }
        }, this.createElement);
        if (!isNullOrUndefined2(this.cssClass)) {
          if (this.cssClass.split(" ").indexOf("e-outline") !== -1) {
            addClass2([this.filterInputObj.container], "e-outline");
          } else if (this.cssClass.split(" ").indexOf("e-filled") !== -1) {
            addClass2([this.filterInputObj.container], "e-filled");
          }
        }
        append([this.filterInputObj.container], parentElement);
        prepend([parentElement], popupElement);
        attributes2(this.filterInput, {
          "aria-disabled": "false",
          "role": "combobox",
          "autocomplete": "off",
          "autocapitalize": "off",
          "spellcheck": "false"
        });
        this.clearIconElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon);
        if (!Browser2.isDevice && this.clearIconElement) {
          EventHandler2.add(this.clearIconElement, "click", this.clearText, this);
          this.clearIconElement.style.visibility = "hidden";
        }
        if (!Browser2.isDevice) {
          this.searchKeyModule = new KeyboardEvents2(this.filterInput, {
            keyAction: this.keyActionHandler.bind(this),
            keyConfigs: this.keyConfigure,
            eventName: "keydown"
          });
        } else {
          this.searchKeyModule = new KeyboardEvents2(this.filterInput, {
            keyAction: this.mobileKeyActionHandler.bind(this),
            keyConfigs: this.keyConfigure,
            eventName: "keydown"
          });
        }
        EventHandler2.add(this.filterInput, "input", this.onInput, this);
        EventHandler2.add(this.filterInput, "keyup", this.onFilterUp, this);
        EventHandler2.add(this.filterInput, "keydown", this.onFilterDown, this);
        EventHandler2.add(this.filterInput, "blur", this.onBlurHandler, this);
        EventHandler2.add(this.filterInput, "paste", this.pasteHandler, this);
        return this.filterInputObj;
      } else {
        return inputObject;
      }
    };
    DropDownList2.prototype.onInput = function(e) {
      if (!isNullOrUndefined2(e) && !isNullOrUndefined2(e.data) && e.data.length > 1 && this.autoFill && (this.getModuleName() === "combobox" || this.getModuleName() === "autocomplete")) {
        this.inputElement.value = e.data;
      }
      this.isValidKey = true;
      if (this.getModuleName() === "combobox") {
        this.updateIconState();
      }
      if (Browser2.isDevice && Browser2.info.name === "mozilla") {
        this.typedString = this.filterInput.value;
        this.preventAutoFill = true;
        this.searchLists(e);
      }
    };
    DropDownList2.prototype.pasteHandler = function(e) {
      var _this = this;
      setTimeout(function() {
        _this.typedString = _this.filterInput.value;
        if (_this.getModuleName() === "combobox" && _this.isFiltering() && isNullOrUndefined2(_this.list)) {
          _this.renderList();
        }
        _this.searchLists(e);
      });
    };
    DropDownList2.prototype.onActionFailure = function(e) {
      _super.prototype.onActionFailure.call(this, e);
      if (this.beforePopupOpen) {
        this.renderPopup();
      }
    };
    DropDownList2.prototype.getTakeValue = function() {
      return this.allowFiltering && this.getModuleName() === "dropdownlist" && Browser2.isDevice ? Math.round(window.outerHeight / this.listItemHeight) : this.itemCount;
    };
    DropDownList2.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
      var _this = this;
      if (this.dataSource instanceof DataManager && !isNullOrUndefined2(e) && !this.virtualGroupDataSource) {
        this.totalItemCount = e.count;
      }
      if (this.isNotSearchList && !this.enableVirtualization) {
        this.isNotSearchList = false;
        return;
      }
      if (this.getInitialData) {
        this.updateActionCompleteDataValues(ulElement, list);
        this.getInitialData = false;
        this.isReactTemplateUpdate = true;
        this.searchLists(this.filterArgs);
        return;
      }
      var tempItemCount = this.itemCount;
      if (this.isActive || !isNullOrUndefined2(ulElement)) {
        var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(true) : null;
        _super.prototype.onActionComplete.call(this, ulElement, list, e);
        this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.totalItemCount <= this.itemCount) ? 0 : this.skeletonCount;
        this.updateSelectElementData(this.allowFiltering);
        if (this.isRequested && !isNullOrUndefined2(this.searchKeyEvent) && this.searchKeyEvent.type === "keydown") {
          this.isRequested = false;
          this.keyActionHandler(this.searchKeyEvent);
          this.searchKeyEvent = null;
        }
        if (this.isRequested && !isNullOrUndefined2(this.searchKeyEvent)) {
          this.incrementalSearch(this.searchKeyEvent);
          this.searchKeyEvent = null;
        }
        if (!this.enableVirtualization) {
          this.list.scrollTop = 0;
        }
        if (!isNullOrUndefined2(ulElement)) {
          attributes2(ulElement, {
            "id": this.element.id + "_options",
            "role": "listbox",
            "aria-hidden": "false",
            "aria-label": "listbox"
          });
        }
        if (this.initialRemoteRender) {
          this.initial = true;
          this.activeIndex = this.index;
          this.initialRemoteRender = false;
          if (this.value && this.dataSource instanceof DataManager) {
            var checkField_1 = isNullOrUndefined2(this.fields.value) ? this.fields.text : this.fields.value;
            var value_1 = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(checkField_1, this.value) : this.value;
            var fieldValue_1 = this.fields.value.split(".");
            var checkVal = list.some(function(x) {
              return isNullOrUndefined2(x[checkField_1]) && fieldValue_1.length > 1 ? _this.checkFieldValue(x, fieldValue_1) === value_1 : x[checkField_1] === value_1;
            });
            if (this.enableVirtualization && this.virtualGroupDataSource) {
              checkVal = this.virtualGroupDataSource.some(function(x) {
                return isNullOrUndefined2(x[checkField_1]) && fieldValue_1.length > 1 ? _this.checkFieldValue(x, fieldValue_1) === value_1 : x[checkField_1] === value_1;
              });
            }
            if (!checkVal) {
              this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField_1, "equal", value_1))).then(function(e2) {
                if (e2.result.length > 0) {
                  _this.addItem(e2.result, list.length);
                  _this.updateValues();
                } else {
                  _this.updateValues();
                }
              });
            } else {
              this.updateValues();
            }
          } else {
            this.updateValues();
          }
          this.initial = false;
        } else if (this.getModuleName() === "autocomplete" && this.value) {
          this.setInputValue();
        }
        if (this.getModuleName() !== "autocomplete" && this.isFiltering() && !this.isTyped) {
          if (!this.actionCompleteData.isUpdated || !this.isCustomFilter && !this.isFilterFocus || isNullOrUndefined2(this.itemData) && this.allowFiltering && (this.dataSource instanceof DataManager || !isNullOrUndefined2(this.dataSource) && !isNullOrUndefined2(this.dataSource.length) && this.dataSource.length !== 0)) {
            if (this.itemTemplate && this.element.tagName === "EJS-COMBOBOX" && this.allowFiltering) {
              setTimeout(function() {
                _this.updateActionCompleteDataValues(ulElement, list);
              }, 0);
            } else {
              this.updateActionCompleteDataValues(ulElement, list);
            }
          }
          if (this.isDynamicData) {
            var currentValue = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
            this.itemData = this.getDataByValue(currentValue);
            this.selectedLI = this.getElementByValue(currentValue);
            this.isDynamicData = false;
          }
          if ((this.allowCustom || this.allowFiltering && !this.isValueInList(list, this.value) && this.dataSource instanceof DataManager) && !this.enableVirtualization) {
            this.addNewItem(list, selectedItem);
          } else if ((this.allowCustom || this.allowFiltering && this.isValueInList(list, this.value)) && !this.enableVirtualization) {
            var value = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
            var isValidAddition = !isNullOrUndefined2(this.value) && selectedItem && selectedItem.getAttribute("data-value") === value.toString();
            if (isValidAddition) {
              this.addNewItem(list, selectedItem);
            }
          }
          if (!isNullOrUndefined2(this.itemData) || isNullOrUndefined2(this.itemData) && this.enableVirtualization) {
            this.getSkeletonCount();
            this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.totalItemCount <= this.itemCount) ? 0 : this.skeletonCount;
            this.UpdateSkeleton();
            this.focusIndexItem();
          }
          if (this.enableVirtualization) {
            this.updateActionCompleteDataValues(ulElement, list);
          }
        } else if (this.enableVirtualization && this.getModuleName() !== "autocomplete" && !this.isFiltering()) {
          var value = this.getItemData().value;
          this.activeIndex = this.getIndexByValue(value);
          var element2 = this.findListElement(this.list, "li", "data-value", value);
          this.selectedLI = element2;
        } else if (this.enableVirtualization && this.getModuleName() === "autocomplete") {
          this.activeIndex = this.skeletonCount;
        }
        if (this.beforePopupOpen) {
          this.renderPopup(e);
          if (this.enableVirtualization) {
            if (!this.list.querySelector(".e-virtual-list")) {
              this.UpdateSkeleton();
              this.liCollections = this.list.querySelectorAll(".e-list-item");
            }
          }
          if (this.enableVirtualization && tempItemCount !== this.itemCount) {
            this.resetList(this.dataSource, this.fields);
          }
        }
      }
    };
    DropDownList2.prototype.isValueInList = function(list, valueToFind) {
      if (Array.isArray(list)) {
        for (var i = 0; i < list.length; i++) {
          if (list[i] === valueToFind) {
            return true;
          }
        }
      } else if (typeof list === "object" && list !== null) {
        for (var key in list) {
          if (Object.prototype.hasOwnProperty.call(list, key) && list[key] === valueToFind) {
            return true;
          }
        }
      }
      return false;
    };
    DropDownList2.prototype.checkFieldValue = function(list, fieldValue) {
      var checkField = list;
      fieldValue.forEach(function(value) {
        checkField = checkField[value];
      });
      return checkField;
    };
    DropDownList2.prototype.updateActionCompleteDataValues = function(ulElement, list) {
      this.actionCompleteData = {
        ulElement: ulElement.cloneNode(true),
        list,
        isUpdated: true
      };
      if (this.actionData.list !== this.actionCompleteData.list && this.actionCompleteData.ulElement && this.actionCompleteData.list) {
        this.actionData = this.actionCompleteData;
      }
    };
    DropDownList2.prototype.addNewItem = function(listData, newElement) {
      var _this = this;
      if (!isNullOrUndefined2(this.itemData) && !isNullOrUndefined2(newElement)) {
        var value_2 = this.getItemData().value;
        var isExist = listData.some(function(data) {
          return (typeof data === "string" || typeof data === "number" || typeof data === "boolean") && data === value_2 || getValue2(_this.fields.value, data) === value_2;
        });
        if (!isExist) {
          this.addItem(this.itemData);
        }
      }
    };
    DropDownList2.prototype.updateActionCompleteData = function(li, item, index) {
      var _this = this;
      if (this.getModuleName() !== "autocomplete" && this.actionCompleteData.ulElement) {
        if (this.itemTemplate && this.element.tagName === "EJS-COMBOBOX" && this.allowFiltering) {
          setTimeout(function() {
            _this.actionCompleteDataUpdate(li, item, index);
          }, 0);
        } else {
          this.actionCompleteDataUpdate(li, item, index);
        }
      }
    };
    DropDownList2.prototype.actionCompleteDataUpdate = function(li, item, index) {
      if (index !== null) {
        this.actionCompleteData.ulElement.insertBefore(li.cloneNode(true), this.actionCompleteData.ulElement.childNodes[index]);
      } else {
        this.actionCompleteData.ulElement.appendChild(li.cloneNode(true));
      }
      if (this.isFiltering() && this.actionCompleteData.list && this.actionCompleteData.list.indexOf(item) < 0) {
        this.actionCompleteData.list.push(item);
      }
    };
    DropDownList2.prototype.focusIndexItem = function() {
      var value = this.getItemData().value;
      this.activeIndex = this.enableVirtualization && !isNullOrUndefined2(value) || !this.enableVirtualization ? this.getIndexByValue(value) : this.activeIndex;
      var element2 = this.findListElement(this.list, "li", "data-value", value);
      this.selectedLI = element2;
      this.activeItem(element2);
      if (!(this.enableVirtualization && isNullOrUndefined2(element2))) {
        this.removeFocus();
      }
    };
    DropDownList2.prototype.updateSelection = function() {
      var selectedItem = this.list.querySelector("." + dropDownBaseClasses.selected);
      if (selectedItem) {
        this.setProperties({
          "index": this.getIndexByValue(selectedItem.getAttribute("data-value"))
        });
        this.activeIndex = this.index;
      } else {
        this.removeFocus();
        this.list.querySelector("." + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
      }
    };
    DropDownList2.prototype.updateSelectionList = function() {
      var selectedItem = this.list && this.list.querySelector(".e-active");
      if (!selectedItem && !isNullOrUndefined2(this.value) && this.getModuleName() !== "autocomplete") {
        var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
        var findEle = this.findListElement(this.list, "li", "data-value", value);
        if (findEle) {
          findEle.classList.add("e-active");
        }
      }
    };
    DropDownList2.prototype.removeFocus = function() {
      var highlightedItem = this.list.querySelectorAll("." + dropDownListClasses.focus);
      if (highlightedItem && highlightedItem.length) {
        removeClass2(highlightedItem, dropDownListClasses.focus);
      }
    };
    DropDownList2.prototype.renderPopup = function(e) {
      var _this = this;
      if (this.popupObj && document.body.contains(this.popupObj.element)) {
        this.refreshPopup();
        return;
      }
      var args = {
        cancel: false
      };
      this.trigger("beforeOpen", args, function(args2) {
        if (!args2.cancel) {
          var popupEle = _this.createElement("div", {
            id: _this.element.id + "_popup",
            className: "e-ddl e-popup " + (_this.cssClass !== null ? _this.cssClass : "")
          });
          popupEle.setAttribute("aria-label", _this.element.id);
          popupEle.setAttribute("role", "dialog");
          var searchBox = _this.setSearchBox(popupEle);
          _this.listContainerHeight = _this.allowFiltering && _this.getModuleName() === "dropdownlist" && Browser2.isDevice ? formatUnit(Math.round(window.outerHeight).toString() + "px") : formatUnit(_this.popupHeight);
          if (_this.headerTemplate) {
            _this.setHeaderTemplate(popupEle);
            _this.isUpdateHeaderHeight = _this.header.offsetHeight !== 0;
          }
          append([_this.list], popupEle);
          if (_this.footerTemplate) {
            _this.setFooterTemplate(popupEle);
            _this.isUpdateFooterHeight = _this.footer.offsetHeight !== 0;
          }
          document.body.appendChild(popupEle);
          popupEle.style.top = "0px";
          if (_this.enableVirtualization && _this.itemTemplate) {
            var listitems = popupEle.querySelectorAll("li.e-list-item:not(.e-virtual-list)");
            _this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) + parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
          }
          if (_this.enableVirtualization && !_this.list.classList.contains(dropDownBaseClasses.noData)) {
            _this.getSkeletonCount();
            _this.skeletonCount = _this.totalItemCount < _this.itemCount * 2 && (!(_this.dataSource instanceof DataManager) || _this.dataSource instanceof DataManager && _this.totalItemCount <= _this.itemCount) ? 0 : _this.skeletonCount;
            if (!_this.list.querySelector(".e-virtual-ddl-content")) {
              _this.list.appendChild(_this.createElement("div", {
                className: "e-virtual-ddl-content",
                styles: _this.getTransformValues()
              })).appendChild(_this.list.querySelector(".e-list-parent"));
            } else {
              _this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = _this.getTransformValues();
            }
            _this.UpdateSkeleton();
            _this.liCollections = _this.list.querySelectorAll("." + dropDownBaseClasses.li);
            _this.virtualItemCount = _this.itemCount;
            if (!_this.list.querySelector(".e-virtual-ddl")) {
              var virualElement = _this.createElement("div", {
                id: _this.element.id + "_popup",
                className: "e-virtual-ddl",
                styles: _this.GetVirtualTrackHeight()
              });
              popupEle.querySelector(".e-dropdownbase").appendChild(virualElement);
            } else {
              _this.list.getElementsByClassName("e-virtual-ddl")[0].style = _this.GetVirtualTrackHeight();
            }
          }
          popupEle.style.visibility = "hidden";
          if (_this.popupHeight !== "auto") {
            _this.searchBoxHeight = 0;
            if (!isNullOrUndefined2(searchBox.container) && _this.getModuleName() !== "combobox" && _this.getModuleName() !== "autocomplete") {
              _this.searchBoxHeight = searchBox.container.parentElement.getBoundingClientRect().height;
              _this.listContainerHeight = (parseInt(_this.listContainerHeight, 10) - _this.searchBoxHeight).toString() + "px";
            }
            if (_this.headerTemplate) {
              _this.header = _this.header ? _this.header : popupEle.querySelector(".e-ddl-header");
              var height = Math.round(_this.header.getBoundingClientRect().height);
              _this.listContainerHeight = (parseInt(_this.listContainerHeight, 10) - (height + _this.searchBoxHeight)).toString() + "px";
            }
            if (_this.footerTemplate) {
              _this.footer = _this.footer ? _this.footer : popupEle.querySelector(".e-ddl-footer");
              var height = Math.round(_this.footer.getBoundingClientRect().height);
              _this.listContainerHeight = (parseInt(_this.listContainerHeight, 10) - (height + _this.searchBoxHeight)).toString() + "px";
            }
            _this.list.style.maxHeight = (parseInt(_this.listContainerHeight, 10) - 2).toString() + "px";
            popupEle.style.maxHeight = formatUnit(_this.popupHeight);
          } else {
            popupEle.style.height = "auto";
          }
          var offsetValue = 0;
          var left = void 0;
          _this.isPreventScrollAction = true;
          if (!isNullOrUndefined2(_this.selectedLI) && !isNullOrUndefined2(_this.activeIndex) && _this.activeIndex >= 0) {
            _this.setScrollPosition();
          } else if (_this.enableVirtualization) {
            _this.setScrollPosition();
          } else {
            _this.list.scrollTop = 0;
          }
          if (Browser2.isDevice && _this.isDeviceFullScreen && !_this.allowFiltering && (_this.getModuleName() === "dropdownlist" || _this.isDropDownClick && _this.getModuleName() === "combobox")) {
            offsetValue = _this.getOffsetValue(popupEle);
            var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
            if (!isNullOrUndefined2(_this.inputElement)) {
              left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
            }
          }
          _this.createPopup(popupEle, offsetValue, left);
          _this.popupContentElement = _this.popupObj.element.querySelector(".e-content");
          _this.getFocusElement();
          _this.checkCollision(popupEle);
          if (Browser2.isDevice) {
            if (parseInt(_this.popupWidth.toString(), 10) > window.outerWidth && !(_this.getModuleName() === "dropdownlist" && _this.allowFiltering)) {
              _this.popupObj.element.classList.add("e-wide-popup");
            }
            _this.popupObj.element.classList.add(dropDownListClasses.device);
            if (_this.getModuleName() === "dropdownlist" || _this.getModuleName() === "combobox" && !_this.allowFiltering && _this.isDropDownClick) {
              _this.popupObj.collision = {
                X: "fit",
                Y: "fit"
              };
            }
            if (_this.isFilterLayout() && _this.isDeviceFullScreen) {
              _this.popupObj.element.classList.add(dropDownListClasses.mobileFilter);
              _this.popupObj.position = {
                X: 0,
                Y: 0
              };
              _this.popupObj.dataBind();
              attributes2(_this.popupObj.element, {
                style: "left:0px;right:0px;top:0px;bottom:0px;"
              });
              addClass2([document.body, _this.popupObj.element], dropDownListClasses.popupFullScreen);
              _this.setSearchBoxPosition();
              _this.backIconElement = searchBox.container.querySelector(".e-back-icon");
              _this.clearIconElement = searchBox.container.querySelector("." + dropDownListClasses.clearIcon);
              EventHandler2.add(_this.backIconElement, "click", _this.clickOnBackIcon, _this);
              EventHandler2.add(_this.clearIconElement, "click", _this.clearText, _this);
            }
          }
          popupEle.style.visibility = "visible";
          addClass2([popupEle], "e-popup-close");
          var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
          for (var _i = 0, scrollParentElements_1 = scrollParentElements; _i < scrollParentElements_1.length; _i++) {
            var element2 = scrollParentElements_1[_i];
            EventHandler2.add(element2, "scroll", _this.scrollHandler, _this);
          }
          if (!isNullOrUndefined2(_this.list)) {
            _this.unWireListEvents();
            _this.wireListEvents();
          }
          _this.selectedElementID = _this.selectedLI ? _this.selectedLI.id : null;
          if (_this.enableVirtualization) {
            _this.notify("bindScrollEvent", {
              module: "VirtualScroll",
              component: _this.getModuleName(),
              enable: _this.enableVirtualization
            });
            setTimeout(function() {
              if (_this.value || _this.list.querySelector(".e-active")) {
                _this.updateSelectionList();
                if (_this.selectedValueInfo && _this.viewPortInfo && _this.viewPortInfo.offsets.top) {
                  _this.list.scrollTop = _this.viewPortInfo.offsets.top;
                } else {
                  _this.scrollBottom(true, true);
                }
              }
            }, 5);
          }
          attributes2(_this.targetElement(), {
            "aria-expanded": "true",
            "aria-owns": _this.element.id + "_popup",
            "aria-controls": _this.element.id
          });
          if (_this.getModuleName() !== "dropdownlist" && _this.list.classList.contains("e-nodata")) {
            attributes2(_this.targetElement(), {
              "aria-activedescendant": "no-record"
            });
            _this.popupContentElement.setAttribute("role", "status");
            _this.popupContentElement.setAttribute("id", "no-record");
          }
          _this.inputElement.setAttribute("aria-expanded", "true");
          _this.inputElement.setAttribute("aria-controls", _this.element.id + "_popup");
          var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;
          addClass2([inputParent], [dropDownListClasses.inputFocus]);
          var animModel = {
            name: "FadeIn",
            duration: 100
          };
          _this.beforePopupOpen = true;
          var popupInstance = _this.popupObj;
          var eventArgs = {
            popup: popupInstance,
            event: e,
            cancel: false,
            animation: animModel
          };
          _this.trigger("open", eventArgs, function(eventArgs2) {
            if (!eventArgs2.cancel) {
              if (!isNullOrUndefined2(_this.inputWrapper)) {
                addClass2([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
              }
              _this.renderReactTemplates();
              if (_this.isReact && _this.isFiltering() && _this.dataSource instanceof DataManager && _this.list.querySelector("ul") && !_this.isSecondClick) {
                _this.executeCloneElements();
              }
              if (!isNullOrUndefined2(_this.popupObj)) {
                _this.popupObj.show(new Animation2(eventArgs2.animation), _this.zIndex === 1e3 ? _this.element : null);
              }
              if (_this.isReact) {
                setTimeout(function() {
                  if (_this.popupHeight && _this.list && _this.popupHeight !== "auto" && !(_this.getModuleName() === "dropdownlist" && _this.allowFiltering)) {
                    var popupHeightValue = typeof _this.popupHeight === "string" ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
                    if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
                      var listHeight = _this.list.style.maxHeight === "" ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
                      _this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + "px";
                      _this.isUpdateHeaderHeight = true;
                    }
                    if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
                      var listHeight = _this.list.style.maxHeight === "" ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
                      _this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + "px";
                      _this.isUpdateFooterHeight = true;
                    }
                  }
                }, 15);
              }
            } else {
              _this.beforePopupOpen = false;
              _this.destroyPopup();
            }
          });
          if (_this.allowResize && (_this.getModuleName() !== "dropdownlist" || !(Browser2.isDevice && _this.isDeviceFullScreen && _this.allowFiltering))) {
            var resizePaddingBottom = 16;
            _this.resizer = _this.createElement("div", {
              id: _this.element.id + "_resize-popup",
              className: dropDownListClasses.resizeIcon
              // Adding class for styling
            });
            if (_this.list && _this.list.parentElement) {
              _this.list.parentElement.classList.add("e-resize");
              if (_this.popupHeight.toString().toLowerCase() !== "auto") {
                _this.list.parentElement.style.height = "100%";
              }
              _this.list.parentElement.style.paddingBottom = _this.getModuleName() === "dropdownlist" && _this.allowFiltering && _this.searchBoxHeight ? (_this.searchBoxHeight + resizePaddingBottom).toString() + "px" : resizePaddingBottom.toString() + "px";
              if (_this.header || _this.footer || _this.itemTemplate) {
                _this.list.parentElement.style.paddingBottom = (parseInt(_this.list.parentElement.style.maxHeight, 10) - parseInt(_this.list.style.maxHeight, 10) + resizePaddingBottom).toString() + "px";
              }
              _this.list.parentElement.appendChild(_this.resizer);
              _this.list.parentElement.style.width = _this.resizeWidth + "px";
              _this.list.parentElement.style.height = _this.resizeHeight + "px";
              _this.list.parentElement.style.maxHeight = _this.resizeHeight + "px";
              _this.list.style.maxHeight = _this.resizeHeight + "px";
            }
            EventHandler2.add(_this.resizer, "mousedown", _this.startResizing, _this);
            EventHandler2.add(_this.resizer, "touchstart", _this.startResizing, _this);
          }
        } else {
          _this.beforePopupOpen = false;
        }
      });
    };
    DropDownList2.prototype.checkCollision = function(popupEle) {
      if (!Browser2.isDevice || Browser2.isDevice && !(this.getModuleName() === "dropdownlist" || this.isDropDownClick)) {
        var collision = isCollide(popupEle);
        if (collision.length > 0) {
          popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + "px";
        }
        this.popupObj.resolveCollision();
      }
    };
    DropDownList2.prototype.getOffsetValue = function(popupEle) {
      var popupStyles = getComputedStyle(popupEle);
      var borderTop = parseInt(popupStyles.borderTopWidth, 10);
      var borderBottom = parseInt(popupStyles.borderBottomWidth, 10);
      return this.setPopupPosition(borderTop + borderBottom);
    };
    DropDownList2.prototype.createPopup = function(element2, offsetValue, left) {
      var _this = this;
      this.popupObj = new Popup(element2, {
        width: this.setWidth(),
        targetType: "relative",
        relateTo: this.inputWrapper.container,
        collision: this.enableRtl ? {
          X: "fit",
          Y: "flip"
        } : {
          X: "flip",
          Y: "flip"
        },
        offsetY: offsetValue,
        enableRtl: this.enableRtl,
        offsetX: left,
        position: this.enableRtl ? {
          X: "right",
          Y: "bottom"
        } : {
          X: "left",
          Y: "bottom"
        },
        zIndex: this.zIndex,
        close: function() {
          if (!_this.isDocumentClick) {
            _this.focusDropDown();
          }
          if (_this.isReact) {
            _this.clearTemplate(["headerTemplate", "footerTemplate"]);
          }
          _this.isNotSearchList = false;
          _this.isDocumentClick = false;
          _this.destroyPopup();
          if (_this.isFiltering() && _this.actionCompleteData.list && _this.actionCompleteData.list.length > 0) {
            _this.isActive = true;
            if (_this.isReactTemplateUpdate && _this.isReact && _this.itemTemplate && !_this.enableVirtualization) {
              _this.actionCompleteData.ulElement = _this.renderItems(_this.actionCompleteData.list, _this.fields);
              _this.isReactTemplateUpdate = false;
            }
            if (_this.enableVirtualization) {
              _this.onActionComplete(_this.ulElement, _this.listData, null, true);
            } else {
              _this.onActionComplete(_this.actionCompleteData.ulElement, _this.actionCompleteData.list, null, true);
            }
          } else if (_this.enableVirtualization) {
            _this.focusIndexItem();
          }
        },
        open: function() {
          EventHandler2.add(document, "mousedown", _this.onDocumentClick, _this);
          _this.isPopupOpen = true;
          var actionList = _this.actionCompleteData && _this.actionCompleteData.ulElement && _this.actionCompleteData.ulElement.querySelector("li");
          var ulElement = _this.list.querySelector("ul li");
          if (!isNullOrUndefined2(_this.ulElement) && !isNullOrUndefined2(_this.ulElement.getElementsByClassName("e-item-focus")[0])) {
            attributes2(_this.targetElement(), {
              "aria-activedescendant": _this.ulElement.getElementsByClassName("e-item-focus")[0].id
            });
          } else if (!isNullOrUndefined2(_this.ulElement) && !isNullOrUndefined2(_this.ulElement.getElementsByClassName("e-active")[0])) {
            attributes2(_this.targetElement(), {
              "aria-activedescendant": _this.ulElement.getElementsByClassName("e-active")[0].id
            });
          }
          if (_this.isFiltering() && _this.itemTemplate && _this.element.tagName === _this.getNgDirective() && actionList && ulElement && actionList.textContent !== ulElement.textContent && _this.element.tagName !== "EJS-COMBOBOX") {
            _this.cloneElements();
          }
          if (_this.isFilterLayout()) {
            removeClass2([_this.inputWrapper.container], [dropDownListClasses.inputFocus]);
            _this.isFilterFocus = true;
            _this.filterInput.focus();
            if (_this.inputWrapper.clearButton) {
              addClass2([_this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
            }
          }
          _this.activeStateChange();
        },
        targetExitViewport: function() {
          if (!Browser2.isDevice) {
            _this.hidePopup();
          }
        }
      });
    };
    DropDownList2.prototype.isEmptyList = function() {
      return !isNullOrUndefined2(this.liCollections) && this.liCollections.length === 0;
    };
    DropDownList2.prototype.getFocusElement = function() {
    };
    DropDownList2.prototype.isFilterLayout = function() {
      return this.getModuleName() === "dropdownlist" && this.allowFiltering;
    };
    DropDownList2.prototype.scrollHandler = function() {
      if (Browser2.isDevice && (this.getModuleName() === "dropdownlist" && !this.isFilterLayout() || this.getModuleName() === "combobox" && !this.allowFiltering && this.isDropDownClick)) {
        if (this.element && !this.isElementInViewport(this.element)) {
          this.hidePopup();
        }
      }
    };
    DropDownList2.prototype.isElementInViewport = function(element2) {
      var elementRect2 = element2.getBoundingClientRect();
      return elementRect2.top >= 0 && elementRect2.left >= 0 && elementRect2.bottom <= window.innerHeight && elementRect2.right <= window.innerWidth;
    };
    DropDownList2.prototype.setSearchBoxPosition = function() {
      var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
      this.popupObj.element.style.maxHeight = "100%";
      this.popupObj.element.style.width = "100%";
      this.list.style.maxHeight = window.innerHeight - searchBoxHeight + "px";
      this.list.style.height = window.innerHeight - searchBoxHeight + "px";
      var clearElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon);
      detach2(this.filterInput);
      clearElement.parentElement.insertBefore(this.filterInput, clearElement);
    };
    DropDownList2.prototype.setPopupPosition = function(border) {
      var offsetValue;
      var popupOffset = border;
      var selectedLI = this.list.querySelector("." + dropDownListClasses.focus) || this.selectedLI;
      var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
      var lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1];
      var liHeight = firstItem.getBoundingClientRect().height;
      this.listItemHeight = liHeight + parseInt(window.getComputedStyle(firstItem).marginBottom, 10);
      var listHeight = this.list.offsetHeight / 2;
      var height = isNullOrUndefined2(selectedLI) ? firstItem.offsetTop : selectedLI.offsetTop;
      var lastItemOffsetValue = lastItem.offsetTop;
      if (lastItemOffsetValue - listHeight < height && !isNullOrUndefined2(this.liCollections) && this.liCollections.length > 0 && !isNullOrUndefined2(selectedLI)) {
        var count = this.list.offsetHeight / liHeight;
        var paddingBottom = parseInt(getComputedStyle(this.list).paddingBottom, 10);
        offsetValue = (count - (this.liCollections.length - this.activeIndex)) * liHeight - popupOffset + paddingBottom;
        this.list.scrollTop = selectedLI.offsetTop;
      } else if (height > listHeight && !this.enableVirtualization) {
        offsetValue = listHeight - liHeight / 2;
        this.list.scrollTop = height - listHeight + liHeight / 2;
      } else {
        offsetValue = height;
      }
      var inputHeight = this.inputWrapper.container.offsetHeight;
      offsetValue = offsetValue + liHeight + popupOffset - (liHeight - inputHeight) / 2;
      return -offsetValue;
    };
    DropDownList2.prototype.setWidth = function() {
      var width = formatUnit(this.popupWidth);
      if (width.indexOf("%") > -1) {
        var inputWidth = this.inputWrapper.container.offsetWidth * parseFloat(width) / 100;
        width = inputWidth.toString() + "px";
      }
      if (Browser2.isDevice && width.indexOf("px") > -1 && !this.allowFiltering && (this.getModuleName() === "dropdownlist" || this.isDropDownClick && this.getModuleName() === "combobox")) {
        var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
        width = parseInt(width, 10) + (parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) * 2 + "px";
      }
      return width;
    };
    DropDownList2.prototype.scrollBottom = function(isInitial, isInitialSelection, keyAction) {
      var _this = this;
      if (isInitialSelection === void 0) {
        isInitialSelection = false;
      }
      if (keyAction === void 0) {
        keyAction = null;
      }
      if (isNullOrUndefined2(this.selectedLI) && this.enableVirtualization) {
        this.selectedLI = this.list.querySelector("." + dropDownBaseClasses.li);
        if (!isNullOrUndefined2(this.selectedLI) && this.selectedLI.classList.contains("e-virtual-list")) {
          this.selectedLI = this.liCollections[this.skeletonCount];
        }
      }
      if (!isNullOrUndefined2(this.selectedLI)) {
        var selectedListMargin = this.selectedLI && !isNaN(parseInt(window.getComputedStyle(this.selectedLI).marginBottom, 10)) ? parseInt(window.getComputedStyle(this.selectedLI).marginBottom, 10) : 0;
        this.isUpwardScrolling = false;
        var virtualListCount = this.list.querySelectorAll(".e-virtual-list").length;
        var lastElementValue = this.list.querySelector("li:last-of-type") ? this.list.querySelector("li:last-of-type").getAttribute("data-value") : null;
        var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + this.virtualListInfo.startIndex * (this.selectedLI.offsetHeight + selectedListMargin) : this.selectedLI.offsetTop;
        var currentOffset = this.list.offsetHeight;
        var nextBottom = selectedLiOffsetTop - virtualListCount * (this.selectedLI.offsetHeight + selectedListMargin) + (this.selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
        var nextOffset = this.list.scrollTop + nextBottom - currentOffset;
        var isScrollerCHanged = false;
        var isScrollTopChanged = false;
        nextOffset = isInitial ? nextOffset + parseInt(getComputedStyle(this.list).paddingTop, 10) * 2 : nextOffset + parseInt(getComputedStyle(this.list).paddingTop, 10);
        var boxRange = selectedLiOffsetTop - virtualListCount * (this.selectedLI.offsetHeight + selectedListMargin) + (this.selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
        boxRange = this.fields.groupBy && !isNullOrUndefined2(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.offsetHeight : boxRange;
        if (this.activeIndex === 0 && !this.enableVirtualization) {
          this.list.scrollTop = 0;
          isScrollerCHanged = this.isKeyBoardAction;
        } else if (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) {
          var currentElementValue = this.selectedLI ? this.selectedLI.getAttribute("data-value") : null;
          var liCount = keyAction === "pageDown" ? this.getPageCount() - 2 : 1;
          if (!this.enableVirtualization || this.isKeyBoardAction || isInitialSelection) {
            if (this.isKeyBoardAction && this.enableVirtualization && lastElementValue && currentElementValue === lastElementValue && keyAction !== "end" && !this.isVirtualScrolling) {
              this.isPreventKeyAction = true;
              if (this.enableVirtualization && this.itemTemplate) {
                this.list.scrollTop += nextOffset;
              } else {
                if (this.enableVirtualization) {
                  liCount = keyAction === "pageDown" ? this.getPageCount() + 1 : liCount;
                }
                this.list.scrollTop += (this.selectedLI.offsetHeight + selectedListMargin) * liCount;
              }
              this.isPreventKeyAction = this.IsScrollerAtEnd() ? false : this.isPreventKeyAction;
              this.isKeyBoardAction = false;
              this.isPreventScrollAction = false;
            } else if (this.enableVirtualization && keyAction === "end") {
              this.isPreventKeyAction = false;
              this.isKeyBoardAction = false;
              this.isPreventScrollAction = false;
              this.list.scrollTop = this.list.scrollHeight;
            } else {
              if (keyAction === "pageDown" && this.enableVirtualization && !this.isVirtualScrolling) {
                this.isPreventKeyAction = false;
                this.isKeyBoardAction = false;
                this.isPreventScrollAction = false;
              }
              this.list.scrollTop = nextOffset;
            }
          } else {
            this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight + this.listItemHeight * 2 : this.virtualListInfo.startIndex * this.listItemHeight : 0;
          }
          isScrollerCHanged = this.isKeyBoardAction;
          isScrollTopChanged = true;
        }
        this.isKeyBoardAction = isScrollerCHanged;
        if (this.enableVirtualization && this.fields.groupBy && this.fixedHeaderElement && keyAction === "down") {
          setTimeout(function() {
            _this.scrollStop(null, true);
          }, 100);
        }
      }
    };
    DropDownList2.prototype.scrollTop = function(keyAction) {
      if (keyAction === void 0) {
        keyAction = null;
      }
      if (!isNullOrUndefined2(this.selectedLI)) {
        var selectedListMargin = this.selectedLI && !isNaN(parseInt(window.getComputedStyle(this.selectedLI).marginBottom, 10)) ? parseInt(window.getComputedStyle(this.selectedLI).marginBottom, 10) : 0;
        var virtualListCount = this.list.querySelectorAll(".e-virtual-list").length;
        var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.selectedLI.offsetTop + this.virtualListInfo.startIndex * (this.selectedLI.offsetHeight + selectedListMargin) : this.selectedLI.offsetTop;
        var nextOffset = selectedLiOffsetTop - virtualListCount * (this.selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
        var firstElementValue = this.list.querySelector("li.e-list-item:not(.e-virtual-list)") ? this.list.querySelector("li.e-list-item:not(.e-virtual-list)").getAttribute("data-value") : null;
        nextOffset = this.fields.groupBy && !isNullOrUndefined2(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;
        var boxRange = selectedLiOffsetTop - virtualListCount * (this.selectedLI.offsetHeight + selectedListMargin) + (this.selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
        var isPageUpKeyAction = this.enableVirtualization && this.getModuleName() === "autocomplete" && nextOffset <= 0;
        if (this.activeIndex === 0 && !this.enableVirtualization) {
          this.list.scrollTop = 0;
        } else if (nextOffset < 0 || isPageUpKeyAction) {
          var currentElementValue = this.selectedLI ? this.selectedLI.getAttribute("data-value") : null;
          var liCount = keyAction === "pageUp" ? this.getPageCount() - 2 : 1;
          if (this.enableVirtualization) {
            liCount = keyAction === "pageUp" ? this.getPageCount() : liCount;
          }
          if (this.enableVirtualization && this.isKeyBoardAction && firstElementValue && currentElementValue === firstElementValue && keyAction !== "home" && !this.isVirtualScrolling) {
            this.isUpwardScrolling = true;
            this.isPreventKeyAction = true;
            this.list.scrollTop -= (this.selectedLI.offsetHeight + selectedListMargin) * liCount;
            this.isPreventKeyAction = this.list.scrollTop !== 0 ? this.isPreventKeyAction : false;
            this.isKeyBoardAction = false;
            this.isPreventScrollAction = false;
          } else if (this.enableVirtualization && keyAction === "home") {
            this.isPreventScrollAction = false;
            this.isPreventKeyAction = true;
            this.isKeyBoardAction = false;
            this.list.scrollTo(0, 0);
          } else {
            if (keyAction === "pageUp" && this.enableVirtualization && !this.isVirtualScrolling) {
              this.isPreventKeyAction = false;
              this.isKeyBoardAction = false;
              this.isPreventScrollAction = false;
            }
            this.list.scrollTop = this.list.scrollTop + nextOffset;
          }
        } else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {
          this.list.scrollTop = this.selectedLI.offsetTop - (this.fields.groupBy && !isNullOrUndefined2(this.fixedHeaderElement) ? this.fixedHeaderElement.offsetHeight : 0);
        }
      }
    };
    DropDownList2.prototype.IsScrollerAtEnd = function() {
      return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
    };
    DropDownList2.prototype.isEditTextBox = function() {
      return false;
    };
    DropDownList2.prototype.isFiltering = function() {
      return this.allowFiltering;
    };
    DropDownList2.prototype.isPopupButton = function() {
      return true;
    };
    DropDownList2.prototype.setScrollPosition = function(e) {
      this.isPreventScrollAction = true;
      if (!isNullOrUndefined2(e)) {
        switch (e.action) {
          case "pageDown":
          case "down":
          case "end":
            this.isKeyBoardAction = true;
            this.scrollBottom(false, false, e.action);
            break;
          default:
            this.isKeyBoardAction = e.action === "up" || e.action === "pageUp" || e.action === "open";
            this.scrollTop(e.action);
            break;
        }
      } else {
        this.scrollBottom(true);
      }
      this.isKeyBoardAction = false;
    };
    DropDownList2.prototype.clearText = function() {
      this.filterInput.value = this.typedString = "";
      this.searchLists(null);
      if (this.enableVirtualization) {
        this.list.scrollTop = 0;
        this.totalItemCount = this.dataCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
        if (this.list.getElementsByClassName("e-virtual-ddl")[0]) {
          this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
        }
        this.getSkeletonCount();
        this.UpdateSkeleton();
        this.liCollections = this.list.querySelectorAll(".e-list-item");
        if (this.list.getElementsByClassName("e-virtual-ddl-content")[0]) {
          this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
        }
      }
    };
    DropDownList2.prototype.setEleWidth = function(width) {
      if (!isNullOrUndefined2(width)) {
        if (typeof width === "number") {
          this.inputWrapper.container.style.width = formatUnit(width);
        } else if (typeof width === "string") {
          this.inputWrapper.container.style.width = width.match(/px|%|em/) ? width : formatUnit(width);
        }
      }
    };
    DropDownList2.prototype.closePopup = function(delay, e) {
      var _this = this;
      var isFilterValue = !isNullOrUndefined2(this.filterInput) && !isNullOrUndefined2(this.filterInput.value) && this.filterInput.value !== "";
      var typedString = this.getModuleName() === "combobox" ? this.typedString : null;
      this.isTyped = false;
      this.isVirtualTrackHeight = false;
      if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
        return;
      }
      this.keyboardEvent = null;
      EventHandler2.remove(document, "mousedown", this.onDocumentClick);
      this.isActive = false;
      this.isDropDownClick = false;
      this.preventAutoFill = false;
      var scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);
      for (var _i = 0, scrollableParentElements_1 = scrollableParentElements; _i < scrollableParentElements_1.length; _i++) {
        var element2 = scrollableParentElements_1[_i];
        EventHandler2.remove(element2, "scroll", this.scrollHandler);
      }
      if (Browser2.isDevice && this.isFilterLayout() && this.isDeviceFullScreen) {
        removeClass2([document.body, this.popupObj.element], dropDownListClasses.popupFullScreen);
      }
      if (this.isFilterLayout()) {
        if (!Browser2.isDevice) {
          this.searchKeyModule.destroy();
          if (this.clearIconElement) {
            EventHandler2.remove(this.clearIconElement, "click", this.clearText);
          }
        }
        if (this.backIconElement) {
          EventHandler2.remove(this.backIconElement, "click", this.clickOnBackIcon);
          EventHandler2.remove(this.clearIconElement, "click", this.clearText);
        }
        if (!isNullOrUndefined2(this.filterInput)) {
          EventHandler2.remove(this.filterInput, "input", this.onInput);
          EventHandler2.remove(this.filterInput, "keyup", this.onFilterUp);
          EventHandler2.remove(this.filterInput, "keydown", this.onFilterDown);
          EventHandler2.remove(this.filterInput, "blur", this.onBlurHandler);
          EventHandler2.remove(this.filterInput, "paste", this.pasteHandler);
        }
        if (this.allowFiltering && this.getModuleName() === "dropdownlist") {
          this.filterInput.removeAttribute("aria-activedescendant");
          this.filterInput.removeAttribute("aria-disabled");
          this.filterInput.removeAttribute("role");
          this.filterInput.removeAttribute("autocomplete");
          this.filterInput.removeAttribute("autocapitalize");
          this.filterInput.removeAttribute("spellcheck");
        }
        this.filterInput = null;
      }
      attributes2(this.targetElement(), {
        "aria-expanded": "false"
      });
      this.inputElement.setAttribute("aria-expanded", "false");
      this.targetElement().removeAttribute("aria-owns");
      this.targetElement().removeAttribute("aria-activedescendant");
      this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation);
      if (this.isFiltering()) {
        this.actionCompleteData.isUpdated = false;
      }
      if (this.enableVirtualization) {
        if (this.value == null || this.isTyped) {
          this.viewPortInfo.endIndex = this.viewPortInfo && this.viewPortInfo.endIndex > 0 ? this.viewPortInfo.endIndex : this.itemCount;
          if (this.getModuleName() === "autocomplete" || this.getModuleName() === "dropdownlist" && !isNullOrUndefined2(this.typedString) && this.typedString !== "" || this.getModuleName() === "combobox" && this.allowFiltering && !isNullOrUndefined2(this.typedString) && this.typedString !== "") {
            this.checkAndResetCache();
          }
        } else if (this.getModuleName() === "autocomplete") {
          this.checkAndResetCache();
        }
        if ((this.getModuleName() === "dropdownlist" || this.getModuleName() === "combobox") && !(this.skeletonCount === 0)) {
          this.getSkeletonCount(true);
        }
      }
      this.beforePopupOpen = false;
      var animModel = {
        name: "FadeOut",
        duration: 100,
        delay: delay ? delay : 0
      };
      var popupInstance = this.popupObj;
      var eventArgs = {
        popup: popupInstance,
        cancel: false,
        animation: animModel,
        event: e || null
      };
      this.trigger("close", eventArgs, function(eventArgs2) {
        if (_this.getModuleName() === "dropdownlist") {
          Input.destroy({
            element: _this.filterInput,
            floatLabelType: _this.floatLabelType,
            properties: {
              placeholder: _this.filterBarPlaceholder
            },
            buttons: _this.clearIconElement
          }, _this.clearIconElement);
        }
        _this.filterInputObj = null;
        if (!isNullOrUndefined2(_this.popupObj) && !isNullOrUndefined2(_this.popupObj.element.querySelector(".e-fixed-head"))) {
          var fixedHeader = _this.popupObj.element.querySelector(".e-fixed-head");
          fixedHeader.parentNode.removeChild(fixedHeader);
          _this.fixedHeaderElement = null;
        }
        if (!eventArgs2.cancel) {
          if (_this.getModuleName() === "autocomplete") {
            _this.rippleFun();
          }
          if (_this.isPopupOpen) {
            _this.popupObj.hide(new Animation2(eventArgs2.animation));
          } else {
            _this.destroyPopup();
          }
        }
      });
      if (Browser2.isDevice && !eventArgs.cancel && this.popupObj.element.classList.contains("e-wide-popup")) {
        this.popupObj.element.classList.remove("e-wide-popup");
      }
      var dataSourceCount;
      if (this.dataSource instanceof DataManager) {
        dataSourceCount = this.virtualGroupDataSource && this.virtualGroupDataSource.length ? this.virtualGroupDataSource.length : 0;
      } else {
        dataSourceCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
      }
      if (this.enableVirtualization && this.isFiltering() && isFilterValue && this.totalItemCount !== dataSourceCount) {
        this.updateInitialData();
        this.checkAndResetCache();
      }
    };
    DropDownList2.prototype.updateInitialData = function() {
      var currentData = this.selectData;
      if (isNullOrUndefined2(currentData)) {
        return;
      }
      var ulElement = this.renderItems(currentData, this.fields);
      this.list.scrollTop = 0;
      this.virtualListInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: this.itemCount
      };
      if (this.getModuleName() === "combobox") {
        this.typedString = "";
      }
      this.previousStartIndex = 0;
      this.previousEndIndex = 0;
      if (this.dataSource instanceof DataManager) {
        if (this.remoteDataCount >= 0) {
          this.totalItemCount = this.dataCount = this.remoteDataCount;
        } else {
          this.resetList(this.dataSource);
        }
      } else {
        this.totalItemCount = this.dataCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
      }
      if (this.list.getElementsByClassName("e-virtual-ddl")[0]) {
        this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
      } else if (!this.list.querySelector(".e-virtual-ddl") && this.list.parentElement) {
        var virualElement = this.createElement("div", {
          id: this.element.id + "_popup",
          className: "e-virtual-ddl",
          styles: this.GetVirtualTrackHeight()
        });
        this.list.parentElement.querySelector(".e-dropdownbase").appendChild(virualElement);
      }
      if (this.getModuleName() !== "autocomplete" && this.totalItemCount !== 0 && this.totalItemCount > this.itemCount * 2) {
        this.getSkeletonCount();
      }
      this.UpdateSkeleton();
      this.listData = currentData;
      this.updateActionCompleteDataValues(ulElement, currentData);
      this.liCollections = this.list.querySelectorAll(".e-list-item");
      if (this.list.getElementsByClassName("e-virtual-ddl-content")[0]) {
        this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
      }
    };
    DropDownList2.prototype.destroyPopup = function() {
      this.isPopupOpen = false;
      this.isFilterFocus = false;
      this.inputElement.removeAttribute("aria-controls");
      if (this.popupObj) {
        if (this.resizer) {
          EventHandler2.remove(this.resizer, "mousedown", this.startResizing);
          EventHandler2.remove(this.resizer, "touchstart", this.startResizing);
        }
        this.popupObj.destroy();
        detach2(this.popupObj.element);
      }
    };
    DropDownList2.prototype.clickOnBackIcon = function() {
      this.hidePopup();
      this.focusIn();
    };
    DropDownList2.prototype.render = function() {
      this.preselectedIndex = !isNullOrUndefined2(this.index) ? this.index : null;
      if (this.element.tagName === "INPUT") {
        this.inputElement = this.element;
        if (isNullOrUndefined2(this.inputElement.getAttribute("role"))) {
          this.inputElement.setAttribute("role", "combobox");
        }
        if (isNullOrUndefined2(this.inputElement.getAttribute("type"))) {
          this.inputElement.setAttribute("type", "text");
        }
        this.inputElement.setAttribute("aria-expanded", "false");
      } else {
        this.inputElement = this.createElement("input", {
          attrs: {
            role: "combobox",
            type: "text"
          }
        });
        if (this.element.tagName !== this.getNgDirective()) {
          this.element.style.display = "none";
        }
        this.element.parentElement.insertBefore(this.inputElement, this.element);
        this.preventTabIndex(this.inputElement);
      }
      var updatedCssClassValues = this.cssClass;
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        updatedCssClassValues = this.cssClass.replace(/\s+/g, " ").trim();
      }
      if (!isNullOrUndefined2(closest2(this.element, "fieldset")) && closest2(this.element, "fieldset").disabled) {
        this.enabled = false;
      }
      this.inputWrapper = Input.createInput({
        element: this.inputElement,
        buttons: this.isPopupButton() ? [dropDownListClasses.icon] : null,
        floatLabelType: this.floatLabelType,
        properties: {
          readonly: this.getModuleName() === "dropdownlist" ? true : this.readonly,
          placeholder: this.placeholder,
          cssClass: updatedCssClassValues,
          enabled: this.enabled,
          enableRtl: this.enableRtl,
          showClearButton: this.showClearButton
        }
      }, this.createElement);
      if (this.element.tagName === this.getNgDirective()) {
        this.element.appendChild(this.inputWrapper.container);
      } else {
        this.inputElement.parentElement.insertBefore(this.element, this.inputElement);
      }
      this.hiddenElement = this.createElement("select", {
        attrs: {
          "aria-hidden": "true",
          "tabindex": "-1",
          "class": dropDownListClasses.hiddenElement
        }
      });
      prepend([this.hiddenElement], this.inputWrapper.container);
      if (!this.hiddenElement.hasAttribute("aria-label")) {
        this.hiddenElement.setAttribute("aria-label", this.getModuleName());
      }
      this.validationAttribute(this.element, this.hiddenElement);
      this.setReadOnly();
      this.setFields();
      this.inputWrapper.container.style.width = formatUnit(this.width);
      this.inputWrapper.container.classList.add("e-ddl");
      if (this.floatLabelType !== "Never") {
        Input.calculateWidth(this.inputElement, this.inputWrapper.container);
      }
      if (!isNullOrUndefined2(this.inputWrapper.buttons[0]) && this.inputWrapper.container.getElementsByClassName("e-float-text-content")[0] && this.floatLabelType !== "Never") {
        this.inputWrapper.container.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon");
      }
      this.wireEvent();
      this.tabIndex = this.element.hasAttribute("tabindex") ? this.element.getAttribute("tabindex") : "0";
      this.element.removeAttribute("tabindex");
      var id = this.element.getAttribute("id") ? this.element.getAttribute("id") : getUniqueID("ej2_dropdownlist");
      this.element.id = id;
      this.hiddenElement.id = id + "_hidden";
      this.targetElement().setAttribute("tabindex", this.tabIndex);
      if ((this.getModuleName() === "autocomplete" || this.getModuleName() === "combobox") && !this.readonly) {
        if (!this.inputElement.hasAttribute("aria-label")) {
          this.inputElement.setAttribute("aria-label", this.getModuleName());
        }
      } else if (this.getModuleName() === "dropdownlist") {
        if (!this.targetElement().hasAttribute("aria-label")) {
          attributes2(this.targetElement(), {
            "aria-label": this.getModuleName()
          });
        }
        if (!this.inputElement.hasAttribute("aria-label")) {
          this.inputElement.setAttribute("aria-label", this.getModuleName());
        }
        this.inputElement.setAttribute("aria-expanded", "false");
      }
      attributes2(this.targetElement(), this.getAriaAttributes());
      this.updateDataAttribute(this.htmlAttributes);
      this.setHTMLAttributes();
      if (this.targetElement() === this.inputElement) {
        this.inputElement.removeAttribute("aria-labelledby");
      }
      if (this.value !== null || this.activeIndex !== null || this.text !== null) {
        if (this.enableVirtualization) {
          this.listItemHeight = this.getListHeight();
          this.getSkeletonCount();
          this.updateVirtualizationProperties(this.itemCount, this.allowFiltering);
          if (this.index !== null) {
            this.activeIndex = this.index + this.skeletonCount;
          }
        }
        this.initValue();
        this.selectedValueInfo = this.viewPortInfo;
        if (this.enableVirtualization) {
          this.activeIndex = this.activeIndex + this.skeletonCount;
        }
      } else if (this.element.tagName === "SELECT" && this.element.options[0]) {
        var selectElement = this.element;
        this.value = this.allowObjectBinding ? this.getDataByValue(selectElement.options[selectElement.selectedIndex].value) : selectElement.options[selectElement.selectedIndex].value;
        this.text = isNullOrUndefined2(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent;
        this.initValue();
      }
      this.setEnabled();
      this.preventTabIndex(this.element);
      if (!this.enabled) {
        this.targetElement().tabIndex = -1;
      }
      this.initial = false;
      this.element.style.opacity = "";
      this.inputElement.onselect = function(e) {
        e.stopImmediatePropagation();
      };
      this.inputElement.onchange = function(e) {
        e.stopImmediatePropagation();
      };
      if (this.element.hasAttribute("autofocus")) {
        this.focusIn();
      }
      if (!isNullOrUndefined2(this.text)) {
        this.inputElement.setAttribute("value", this.text);
      }
      if (this.element.hasAttribute("data-val")) {
        this.element.setAttribute("data-val", "false");
      }
      var floatLabelElement = this.inputWrapper.container.getElementsByClassName("e-float-text")[0];
      if (!isNullOrUndefined2(this.element.id) && this.element.id !== "" && !isNullOrUndefined2(floatLabelElement)) {
        floatLabelElement.id = "label_" + this.element.id.replace(/ /g, "_");
        attributes2(this.inputElement, {
          "aria-labelledby": floatLabelElement.id
        });
      }
      this.renderComplete();
      this.listItemHeight = this.getListHeight();
      this.getSkeletonCount();
      if (this.enableVirtualization) {
        this.updateVirtualizationProperties(this.itemCount, this.allowFiltering);
      }
      this.viewPortInfo.startIndex = this.virtualItemStartIndex = 0;
      this.viewPortInfo.endIndex = this.virtualItemEndIndex = this.viewPortInfo.startIndex > 0 ? this.viewPortInfo.endIndex : this.itemCount;
    };
    DropDownList2.prototype.getListHeight = function() {
      var listParent = this.createElement("div", {
        className: "e-dropdownbase"
      });
      var item = this.createElement("li", {
        className: "e-list-item"
      });
      var listParentHeight = formatUnit(this.popupHeight);
      listParent.style.height = parseInt(listParentHeight, 10).toString() + "px";
      listParent.appendChild(item);
      document.body.appendChild(listParent);
      this.virtualListHeight = listParent.getBoundingClientRect().height;
      var listItemHeight = Math.ceil(item.getBoundingClientRect().height) + parseInt(window.getComputedStyle(item).marginBottom, 10);
      listParent.remove();
      return listItemHeight;
    };
    DropDownList2.prototype.setFooterTemplate = function(popupEle) {
      var compiledString;
      if (this.footer) {
        if (this.isReact && typeof this.footerTemplate === "function") {
          this.clearTemplate(["footerTemplate"]);
        } else {
          this.footer.innerHTML = "";
        }
      } else {
        this.footer = this.createElement("div");
        addClass2([this.footer], dropDownListClasses.footer);
      }
      var footercheck = this.dropdownCompiler(this.footerTemplate);
      if (typeof this.footerTemplate !== "function" && footercheck) {
        compiledString = compile4(select2(this.footerTemplate, document).innerHTML.trim());
      } else {
        compiledString = compile4(this.footerTemplate);
      }
      var footerCompTemp = compiledString({}, this, "footerTemplate", this.footerTemplateId, this.isStringTemplate, null, this.footer);
      if (footerCompTemp && footerCompTemp.length > 0) {
        append(footerCompTemp, this.footer);
      }
      append([this.footer], popupEle);
    };
    DropDownList2.prototype.setHeaderTemplate = function(popupEle) {
      var compiledString;
      if (this.header) {
        this.header.innerHTML = "";
      } else {
        this.header = this.createElement("div");
        addClass2([this.header], dropDownListClasses.header);
      }
      var headercheck = this.dropdownCompiler(this.headerTemplate);
      if (typeof this.headerTemplate !== "function" && headercheck) {
        compiledString = compile4(select2(this.headerTemplate, document).innerHTML.trim());
      } else {
        compiledString = compile4(this.headerTemplate);
      }
      var headerCompTemp = compiledString({}, this, "headerTemplate", this.headerTemplateId, this.isStringTemplate, null, this.header);
      if (headerCompTemp && headerCompTemp.length) {
        append(headerCompTemp, this.header);
      }
      var contentEle = popupEle.querySelector("div.e-content");
      popupEle.insertBefore(this.header, contentEle);
    };
    DropDownList2.prototype.setEnabled = function() {
      this.element.setAttribute("aria-disabled", this.enabled ? "false" : "true");
    };
    DropDownList2.prototype.setOldText = function(text) {
      this.text = text;
    };
    DropDownList2.prototype.setOldValue = function(value) {
      this.value = value;
    };
    DropDownList2.prototype.refreshPopup = function() {
      if (!isNullOrUndefined2(this.popupObj) && document.body.contains(this.popupObj.element) && (this.allowFiltering && !(Browser2.isDevice && this.isFilterLayout()) || this.getModuleName() === "autocomplete")) {
        removeClass2([this.popupObj.element], "e-popup-close");
        this.popupObj.refreshPosition(this.inputWrapper.container);
        this.popupObj.resolveCollision();
      }
    };
    DropDownList2.prototype.checkData = function(newProp) {
      if (newProp.dataSource && !isNullOrUndefined2(Object.keys(newProp.dataSource)) && this.itemTemplate && this.allowFiltering && !(this.isListSearched && newProp.dataSource instanceof DataManager)) {
        if (this.list && !this.isReact) {
          this.list.innerHTML = "";
        } else {
          this.list = null;
        }
        this.actionCompleteData = {
          ulElement: null,
          list: null,
          isUpdated: false
        };
      }
      this.isListSearched = false;
      var isChangeValue = Object.keys(newProp).indexOf("value") !== -1 && isNullOrUndefined2(newProp.value);
      var isChangeText = Object.keys(newProp).indexOf("text") !== -1 && isNullOrUndefined2(newProp.text);
      if (this.getModuleName() !== "autocomplete" && this.allowFiltering && (isChangeValue || isChangeText)) {
        this.itemData = null;
      }
      if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined2(Object.keys(newProp.dataSource))) {
        this.actionCompleteData = {
          ulElement: null,
          list: null,
          isUpdated: false
        };
        this.actionData = this.actionCompleteData;
      } else if (this.allowFiltering && newProp.query && !isNullOrUndefined2(Object.keys(newProp.query))) {
        this.actionCompleteData = this.getModuleName() === "combobox" ? {
          ulElement: null,
          list: null,
          isUpdated: false
        } : this.actionCompleteData;
        this.actionData = this.actionCompleteData;
      }
    };
    DropDownList2.prototype.updateDataSource = function(props, oldProps) {
      if (this.inputElement.value !== "" || !isNullOrUndefined2(props) && (isNullOrUndefined2(props.dataSource) || !(props.dataSource instanceof DataManager) && props.dataSource.length === 0)) {
        this.clearAll(null, props);
      }
      if (this.fields.groupBy && props.fields && !this.isGroupChecking && this.list) {
        EventHandler2.remove(this.list, "scroll", this.setFloatingHeader);
        EventHandler2.add(this.list, "scroll", this.setFloatingHeader, this);
      }
      if (!(!isNullOrUndefined2(props) && (isNullOrUndefined2(props.dataSource) || !(props.dataSource instanceof DataManager) && props.dataSource.length === 0)) || props.dataSource instanceof DataManager || !isNullOrUndefined2(props) && Array.isArray(props.dataSource) && !isNullOrUndefined2(oldProps) && Array.isArray(oldProps.dataSource) && props.dataSource.length !== oldProps.dataSource.length) {
        this.typedString = "";
        this.resetList(this.dataSource);
      }
      if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {
        this.checkCustomValue();
      }
    };
    DropDownList2.prototype.checkCustomValue = function() {
      var currentValue = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
      this.itemData = this.getDataByValue(currentValue);
      var dataItem = this.getItemData();
      var value = this.allowObjectBinding ? this.itemData : dataItem.value;
      var index = isNullOrUndefined2(value) ? null : this.index;
      if (isNullOrUndefined2(index) && currentValue === value || this.isAngular) {
        this.setProperties({
          "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
          "value": value
        });
      } else {
        this.setProperties({
          "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
          "index": index,
          "value": value
        });
      }
    };
    DropDownList2.prototype.updateInputFields = function() {
      if (this.getModuleName() === "dropdownlist") {
        Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
      }
    };
    DropDownList2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var _this = this;
      if (!isNullOrUndefined2(newProp.dataSource) && !this.isTouched && isNullOrUndefined2(newProp.value) && isNullOrUndefined2(newProp.index) && !isNullOrUndefined2(this.preselectedIndex) && !isNullOrUndefined2(this.index)) {
        newProp.index = this.index;
      }
      if (!isNullOrUndefined2(newProp.value) || !isNullOrUndefined2(newProp.index)) {
        this.isTouched = true;
      }
      if (this.getModuleName() === "dropdownlist") {
        this.checkData(newProp);
        this.setUpdateInitial(["fields", "query", "dataSource"], newProp);
      }
      var _loop_1 = function(prop2) {
        switch (prop2) {
          case "query":
          case "dataSource":
            this_1.getSkeletonCount();
            this_1.checkAndResetCache();
            break;
          case "htmlAttributes":
            this_1.setHTMLAttributes();
            break;
          case "width":
            this_1.setEleWidth(newProp.width);
            Input.calculateWidth(this_1.inputElement, this_1.inputWrapper.container);
            break;
          case "placeholder":
            Input.setPlaceholder(newProp.placeholder, this_1.inputElement);
            break;
          case "filterBarPlaceholder":
            if (this_1.filterInput) {
              Input.setPlaceholder(newProp.filterBarPlaceholder, this_1.filterInput);
            }
            break;
          case "readonly":
            if (this_1.getModuleName() !== "dropdownlist") {
              Input.setReadonly(newProp.readonly, this_1.inputElement);
            }
            this_1.setReadOnly();
            break;
          case "cssClass":
            this_1.setCssClass(newProp.cssClass, oldProp.cssClass);
            Input.calculateWidth(this_1.inputElement, this_1.inputWrapper.container);
            break;
          case "enableRtl":
            this_1.setEnableRtl();
            break;
          case "enabled":
            this_1.setEnable();
            break;
          case "text":
            if (this_1.fields.disabled) {
              newProp.text = newProp.text && !this_1.isDisabledItemByIndex(this_1.getIndexByValue(this_1.getValueByText(newProp.text))) ? newProp.text : null;
            }
            if (newProp.text === null) {
              this_1.clearAll();
              break;
            }
            if (this_1.enableVirtualization) {
              this_1.updateValues();
              this_1.updateInputFields();
              this_1.notify("setCurrentViewDataAsync", {
                module: "VirtualScroll"
              });
              break;
            }
            if (!this_1.list) {
              if (this_1.dataSource instanceof DataManager) {
                this_1.initialRemoteRender = true;
              }
              this_1.renderList();
            }
            if (!this_1.initialRemoteRender) {
              var li = this_1.getElementByText(newProp.text);
              if (!this_1.checkValidLi(li)) {
                if (this_1.liCollections && this_1.liCollections.length === 100 && this_1.getModuleName() === "autocomplete" && this_1.listData.length > 100) {
                  this_1.setSelectionData(newProp.text, oldProp.text, "text");
                } else if (newProp.text && this_1.dataSource instanceof DataManager) {
                  var listLength_1 = this_1.getItems().length;
                  var checkField = isNullOrUndefined2(this_1.fields.text) ? this_1.fields.value : this_1.fields.text;
                  this_1.typedString = "";
                  this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, "equal", newProp.text))).then(function(e) {
                    if (e.result.length > 0) {
                      _this.addItem(e.result, listLength_1);
                      _this.updateValues();
                    } else {
                      _this.setOldText(oldProp.text);
                    }
                  });
                } else if (this_1.getModuleName() === "autocomplete") {
                  this_1.setInputValue(newProp, oldProp);
                } else {
                  this_1.setOldText(oldProp.text);
                }
              }
              this_1.updateInputFields();
            }
            break;
          case "value":
            if (this_1.fields.disabled) {
              newProp.value = newProp.value != null && !this_1.isDisableItemValue(newProp.value) ? newProp.value : null;
            }
            if (newProp.value === null) {
              this_1.clearAll();
              break;
            }
            if (this_1.allowObjectBinding && !isNullOrUndefined2(newProp.value) && !isNullOrUndefined2(oldProp.value) && this_1.isObjectInArray(newProp.value, [oldProp.value])) {
              return {
                value: void 0
              };
            }
            if (this_1.enableVirtualization) {
              this_1.updateValues();
              this_1.updateInputFields();
              this_1.notify("setCurrentViewDataAsync", {
                module: "VirtualScroll"
              });
              this_1.preventChange = this_1.isAngular && this_1.preventChange ? !this_1.preventChange : this_1.preventChange;
              break;
            }
            this_1.notify("beforeValueChange", {
              newProp
            });
            if (!this_1.list) {
              if (this_1.dataSource instanceof DataManager) {
                this_1.initialRemoteRender = true;
              }
              this_1.renderList();
            }
            if (!this_1.initialRemoteRender) {
              var value = this_1.allowObjectBinding && !isNullOrUndefined2(newProp.value) ? getValue2(this_1.fields.value ? this_1.fields.value : "", newProp.value) : newProp.value;
              var item = this_1.getElementByValue(value);
              if (!this_1.checkValidLi(item)) {
                if (this_1.liCollections && this_1.liCollections.length === 100 && this_1.getModuleName() === "autocomplete" && this_1.listData.length > 100) {
                  this_1.setSelectionData(newProp.value, oldProp.value, "value");
                } else if (newProp.value && this_1.dataSource instanceof DataManager) {
                  var listLength_2 = this_1.getItems().length;
                  var checkField = isNullOrUndefined2(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
                  this_1.typedString = "";
                  var value_3 = this_1.allowObjectBinding && !isNullOrUndefined2(newProp.value) ? getValue2(checkField, newProp.value) : newProp.value;
                  this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, "equal", value_3))).then(function(e) {
                    if (e.result.length > 0) {
                      _this.addItem(e.result, listLength_2);
                      _this.updateValues();
                    } else {
                      _this.setOldValue(oldProp.value);
                    }
                  });
                } else if (this_1.getModuleName() === "autocomplete") {
                  this_1.setInputValue(newProp, oldProp);
                } else {
                  this_1.setOldValue(oldProp.value);
                }
              }
              this_1.updateInputFields();
              this_1.preventChange = this_1.isAngular && this_1.preventChange ? !this_1.preventChange : this_1.preventChange;
            }
            break;
          case "index":
            if (this_1.fields.disabled) {
              newProp.index = newProp.index != null && !this_1.isDisabledItemByIndex(newProp.index) ? newProp.index : null;
            }
            if (newProp.index === null) {
              this_1.clearAll();
              break;
            }
            if (!this_1.list) {
              if (this_1.dataSource instanceof DataManager) {
                this_1.initialRemoteRender = true;
              }
              this_1.renderList();
            }
            if (!this_1.initialRemoteRender && this_1.liCollections) {
              var element2 = this_1.liCollections[newProp.index];
              if (!this_1.checkValidLi(element2)) {
                if (this_1.liCollections && this_1.liCollections.length === 100 && this_1.getModuleName() === "autocomplete" && this_1.listData.length > 100) {
                  this_1.setSelectionData(newProp.index, oldProp.index, "index");
                } else {
                  this_1.index = oldProp.index;
                }
              }
              this_1.updateInputFields();
            }
            break;
          case "footerTemplate":
            if (this_1.popupObj) {
              this_1.setFooterTemplate(this_1.popupObj.element);
            }
            break;
          case "headerTemplate":
            if (this_1.popupObj) {
              this_1.setHeaderTemplate(this_1.popupObj.element);
            }
            break;
          case "valueTemplate":
            if (!isNullOrUndefined2(this_1.itemData) && this_1.valueTemplate !== null) {
              this_1.setValueTemplate();
            }
            break;
          case "allowFiltering":
            if (this_1.allowFiltering) {
              this_1.actionCompleteData = {
                ulElement: this_1.ulElement,
                list: this_1.listData,
                isUpdated: true
              };
              this_1.actionData = this_1.actionCompleteData;
              this_1.updateSelectElementData(this_1.allowFiltering);
            }
            break;
          case "floatLabelType":
            Input.removeFloating(this_1.inputWrapper);
            Input.addFloating(this_1.inputElement, newProp.floatLabelType, this_1.placeholder, this_1.createElement);
            if (!isNullOrUndefined2(this_1.inputWrapper.buttons[0]) && this_1.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0] && this_1.floatLabelType !== "Never") {
              this_1.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon");
            }
            break;
          case "showClearButton":
            if (!this_1.inputWrapper.clearButton) {
              Input.setClearButton(newProp.showClearButton, this_1.inputElement, this_1.inputWrapper, null, this_1.createElement);
              this_1.bindClearEvent();
            }
            break;
          default:
            {
              var ddlProps = this_1.getPropObject(prop2, newProp, oldProp);
              _super.prototype.onPropertyChanged.call(this_1, ddlProps.newProperty, ddlProps.oldProperty);
            }
            break;
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        var state_1 = _loop_1(prop);
        if (typeof state_1 === "object") return state_1.value;
      }
    };
    DropDownList2.prototype.checkValidLi = function(element2) {
      if (this.isValidLI(element2)) {
        this.setSelection(element2, null);
        return true;
      }
      return false;
    };
    DropDownList2.prototype.setSelectionData = function(newProp, oldProp, prop) {
      var _this = this;
      var li;
      this.updateListValues = function() {
        if (prop === "text") {
          li = _this.getElementByText(newProp);
          if (!_this.checkValidLi(li)) {
            _this.setOldText(oldProp);
          }
        } else if (prop === "value") {
          var fields = _this.fields.value ? _this.fields.value : "";
          var value = _this.allowObjectBinding && !isNullOrUndefined2(newProp) ? getValue2(fields, newProp) : newProp;
          li = _this.getElementByValue(newProp);
          if (!_this.checkValidLi(li)) {
            _this.setOldValue(oldProp);
          }
        } else if (prop === "index") {
          li = _this.liCollections[newProp];
          if (!_this.checkValidLi(li)) {
            _this.index = oldProp;
          }
        }
      };
    };
    DropDownList2.prototype.updatePopupState = function() {
      if (this.beforePopupOpen) {
        this.beforePopupOpen = false;
        this.showPopup();
      }
    };
    DropDownList2.prototype.setReadOnly = function() {
      if (this.readonly) {
        addClass2([this.inputWrapper.container], ["e-readonly"]);
      } else {
        removeClass2([this.inputWrapper.container], ["e-readonly"]);
      }
    };
    DropDownList2.prototype.setInputValue = function(newProp, oldProp) {
    };
    DropDownList2.prototype.setCssClass = function(newClass, oldClass) {
      if (!isNullOrUndefined2(oldClass)) {
        oldClass = oldClass.replace(/\s+/g, " ").trim();
      }
      if (!isNullOrUndefined2(newClass)) {
        newClass = newClass.replace(/\s+/g, " ").trim();
      }
      Input.setCssClass(newClass, [this.inputWrapper.container], oldClass);
      if (this.popupObj) {
        Input.setCssClass(newClass, [this.popupObj.element], oldClass);
      }
    };
    DropDownList2.prototype.getModuleName = function() {
      return "dropdownlist";
    };
    DropDownList2.prototype.showPopup = function(e) {
      if (!this.enabled) {
        return;
      }
      this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
      if (this.isReact && this.getModuleName() === "combobox" && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
        this.renderList();
        this.isAddNewItemTemplate = false;
      }
      if (this.isFiltering() && this.dataSource instanceof DataManager && this.actionData.list !== this.actionCompleteData.list && this.actionData.list && this.actionData.ulElement) {
        this.actionCompleteData = this.actionData;
        this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);
      }
      if (this.beforePopupOpen) {
        this.refreshPopup();
        return;
      }
      this.beforePopupOpen = true;
      if (this.isFiltering() && !this.isActive && this.actionCompleteData.list && this.actionCompleteData.list[0]) {
        this.isActive = true;
        this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);
      } else if (isNullOrUndefined2(this.list) || !isUndefined2(this.list) && (this.list.classList.contains(dropDownBaseClasses.noData) || this.list.querySelectorAll("." + dropDownBaseClasses.li).length <= 0)) {
        if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
          this.isSecondClick = false;
        }
        this.renderList(e);
      }
      if (this.enableVirtualization && this.listData && this.listData.length) {
        if (!isNullOrUndefined2(this.value) && (this.getModuleName() === "dropdownlist" || this.getModuleName() === "combobox")) {
          this.removeHover();
        }
        if (!this.beforePopupOpen) {
          this.notify("setCurrentViewDataAsync", {
            module: "VirtualScroll"
          });
        }
      }
      if (this.beforePopupOpen) {
        this.invokeRenderPopup(e);
      }
      if (this.enableVirtualization && !this.allowFiltering && this.selectedValueInfo != null && this.selectedValueInfo.startIndex > 0 && this.value != null) {
        this.notify("dataProcessAsync", {
          module: "VirtualScroll",
          isOpen: true
        });
      }
      if (!this.isSecondClick && !this.isDropDownClick) {
        this.executeCloneElements();
      }
    };
    DropDownList2.prototype.executeCloneElements = function() {
      var proxy = this;
      var duration = this.element.tagName === this.getNgDirective() && this.itemTemplate ? 500 : 100;
      if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
        setTimeout(function() {
          proxy.cloneElements();
          proxy.isSecondClick = proxy.isReact && proxy.isFiltering() && proxy.dataSource instanceof DataManager && !proxy.list.querySelector("ul") ? false : true;
        }, duration);
      }
    };
    DropDownList2.prototype.invokeRenderPopup = function(e) {
      if (Browser2.isDevice && this.isFilterLayout()) {
        var proxy_2 = this;
        window.onpopstate = function() {
          proxy_2.hidePopup();
        };
        history.pushState({}, "");
      }
      if (!isNullOrUndefined2(this.list) && (!isNullOrUndefined2(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData))) {
        this.renderPopup(e);
      }
    };
    DropDownList2.prototype.renderHightSearch = function() {
    };
    DropDownList2.prototype.hidePopup = function(e) {
      if (this.isEscapeKey && this.getModuleName() === "dropdownlist") {
        if (!isNullOrUndefined2(this.inputElement)) {
          Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }
        this.isEscapeKey = false;
        if (!isNullOrUndefined2(this.index)) {
          var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
          var element2 = this.findListElement(this.ulElement, "li", "data-value", value);
          this.selectedLI = this.liCollections[this.index] || element2;
          if (this.selectedLI) {
            this.updateSelectedItem(this.selectedLI, null, true);
            if (this.valueTemplate && this.itemData !== null) {
              this.setValueTemplate();
            }
          }
        } else {
          this.resetSelection();
        }
      }
      this.isVirtualTrackHeight = false;
      this.customFilterQuery = null;
      this.closePopup(0, e);
      var dataItem = this.getItemData();
      var isSelectVal = !isNullOrUndefined2(this.selectedLI);
      if (isSelectVal && this.enableVirtualization && this.selectedLI.classList) {
        isSelectVal = this.selectedLI.classList.contains("e-active");
      }
      if (this.inputElement && this.inputElement.value === "" && !this.isInteracted && (this.isSelectCustom || isSelectVal && this.inputElement.value !== dataItem.text)) {
        this.isSelectCustom = false;
        this.clearAll(e);
      }
    };
    DropDownList2.prototype.focusIn = function(e) {
      if (!this.enabled) {
        return;
      }
      if (this.targetElement().classList.contains(dropDownListClasses.disable)) {
        return;
      }
      var isFocused = false;
      if (this.preventFocus && Browser2.isDevice) {
        this.inputWrapper.container.tabIndex = 1;
        this.inputWrapper.container.focus();
        this.preventFocus = false;
        isFocused = true;
      }
      if (!isFocused) {
        this.targetElement().focus();
      }
      addClass2([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
      this.onFocus(e);
      if (this.floatLabelType !== "Never") {
        Input.calculateWidth(this.inputElement, this.inputWrapper.container);
      }
    };
    DropDownList2.prototype.focusOut = function(e) {
      if (!this.enabled) {
        return;
      }
      if (!this.enableVirtualization && (this.getModuleName() === "combobox" || this.getModuleName() === "autocomplete")) {
        this.isTyped = true;
      }
      this.hidePopup(e);
      if (this.targetElement()) {
        this.targetElement().blur();
      }
      removeClass2([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
      if (this.floatLabelType !== "Never") {
        Input.calculateWidth(this.inputElement, this.inputWrapper.container);
      }
    };
    DropDownList2.prototype.disableItem = function(item) {
      if (this.fields.disabled) {
        if (!this.list) {
          this.renderList();
        }
        var itemIndex = -1;
        if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
          if (typeof item === "string") {
            itemIndex = this.getIndexByValue(item);
          } else if (typeof item === "object") {
            if (item instanceof HTMLLIElement) {
              for (var index = 0; index < this.liCollections.length; index++) {
                if (this.liCollections[index] === item) {
                  itemIndex = this.getIndexByValue(item.getAttribute("data-value"));
                  break;
                }
              }
            } else {
              var value = JSON.parse(JSON.stringify(item))[this.fields.value];
              for (var index = 0; index < this.listData.length; index++) {
                if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
                  itemIndex = this.getIndexByValue(value);
                  break;
                }
              }
            }
          } else {
            itemIndex = item;
          }
          var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
          if (isValidIndex && !JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled]) {
            var li = this.liCollections[itemIndex];
            if (li) {
              this.disableListItem(li);
              var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
              parsedData[this.fields.disabled] = true;
              this.listData[itemIndex] = parsedData;
              this.dataSource = this.listData;
              if (li.classList.contains(dropDownListClasses.focus)) {
                this.removeFocus();
              }
              if (li.classList.contains(dropDownListClasses.selected)) {
                this.clear();
              }
            }
          }
        }
      }
    };
    DropDownList2.prototype.destroy = function() {
      this.isActive = false;
      if (this.showClearButton) {
        this.clearButton = document.getElementsByClassName("e-clear-icon")[0];
      }
      resetIncrementalSearchValues(this.element.id);
      if (this.isReact) {
        this.clearTemplate();
      }
      this.hidePopup();
      if (this.popupObj) {
        this.popupObj.hide();
      }
      this.unWireEvent();
      if (this.list) {
        this.unWireListEvents();
      }
      if (this.element && !this.element.classList.contains("e-" + this.getModuleName())) {
        return;
      }
      if (this.inputElement) {
        var attrArray = ["readonly", "aria-disabled", "placeholder", "aria-labelledby", "aria-expanded", "autocomplete", "aria-readonly", "autocapitalize", "spellcheck", "aria-autocomplete", "aria-live", "aria-describedby", "aria-label"];
        for (var i = 0; i < attrArray.length; i++) {
          this.inputElement.removeAttribute(attrArray[i]);
        }
        this.inputElement.setAttribute("tabindex", this.tabIndex);
        this.inputElement.classList.remove("e-input");
        Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton);
      }
      this.element.style.display = "block";
      if (this.inputWrapper.container && this.inputWrapper.container.parentElement) {
        if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
          detach2(this.inputWrapper.container);
        } else {
          this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
          detach2(this.inputWrapper.container);
        }
      }
      delete this.hiddenElement;
      this.filterInput = null;
      this.keyboardModule = null;
      this.ulElement = null;
      this.list = null;
      this.clearIconElement = null;
      this.popupObj = null;
      this.popupContentElement = null;
      this.rippleFun = null;
      this.selectedLI = null;
      this.liCollections = null;
      this.item = null;
      this.footer = null;
      this.header = null;
      this.previousSelectedLI = null;
      this.valueTempElement = null;
      this.actionData.ulElement = null;
      if (this.inputElement && !isNullOrUndefined2(this.inputElement.onchange)) {
        this.inputElement.onchange = null;
      }
      if (this.inputElement && !isNullOrUndefined2(this.inputElement.onselect)) {
        this.inputElement.onselect = null;
      }
      Input.destroy({
        element: this.inputElement,
        floatLabelType: this.floatLabelType,
        properties: this.properties,
        buttons: this.inputWrapper.container.querySelectorAll(".e-input-group-icon")[0]
      }, this.clearButton);
      this.clearButton = null;
      this.inputElement = null;
      this.inputWrapper = null;
      _super.prototype.destroy.call(this);
    };
    DropDownList2.prototype.getItems = function() {
      if (!this.list) {
        if (this.dataSource instanceof DataManager) {
          this.initialRemoteRender = true;
        }
        this.renderList();
      }
      return this.ulElement ? _super.prototype.getItems.call(this) : [];
    };
    DropDownList2.prototype.getDataByValue = function(value) {
      return _super.prototype.getDataByValue.call(this, value);
    };
    DropDownList2.prototype.clear = function() {
      this.value = null;
    };
    __decorate67([Property2(null)], DropDownList2.prototype, "cssClass", void 0);
    __decorate67([Property2("100%")], DropDownList2.prototype, "width", void 0);
    __decorate67([Property2(true)], DropDownList2.prototype, "enabled", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "enablePersistence", void 0);
    __decorate67([Property2("300px")], DropDownList2.prototype, "popupHeight", void 0);
    __decorate67([Property2("100%")], DropDownList2.prototype, "popupWidth", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "placeholder", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "filterBarPlaceholder", void 0);
    __decorate67([Property2({})], DropDownList2.prototype, "htmlAttributes", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "query", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "valueTemplate", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "headerTemplate", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "footerTemplate", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "allowFiltering", void 0);
    __decorate67([Property2(true)], DropDownList2.prototype, "isDeviceFullScreen", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "readonly", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "enableVirtualization", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "allowResize", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "text", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "value", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "allowObjectBinding", void 0);
    __decorate67([Property2(null)], DropDownList2.prototype, "index", void 0);
    __decorate67([Property2("Never")], DropDownList2.prototype, "floatLabelType", void 0);
    __decorate67([Property2(false)], DropDownList2.prototype, "showClearButton", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "filtering", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "change", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "beforeOpen", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "open", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "close", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "blur", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "focus", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "resizeStop", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "resizing", void 0);
    __decorate67([Event3()], DropDownList2.prototype, "resizeStart", void 0);
    DropDownList2 = __decorate67([NotifyPropertyChanges2], DropDownList2);
    return DropDownList2;
  }(DropDownBase)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js
var __extends70 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate68 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_ROOT = "e-hscroll";
var CLS_RTL = "e-rtl";
var CLS_DISABLE = "e-overlay";
var CLS_HSCROLLBAR = "e-hscroll-bar";
var CLS_HSCROLLCON = "e-hscroll-content";
var CLS_NAVARROW = "e-nav-arrow";
var CLS_NAVRIGHTARROW = "e-nav-right-arrow";
var CLS_NAVLEFTARROW = "e-nav-left-arrow";
var CLS_HSCROLLNAV = "e-scroll-nav";
var CLS_HSCROLLNAVRIGHT = "e-scroll-right-nav";
var CLS_HSCROLLNAVLEFT = "e-scroll-left-nav";
var CLS_DEVICE = "e-scroll-device";
var CLS_OVERLAY = "e-scroll-overlay";
var CLS_RIGHTOVERLAY = "e-scroll-right-overlay";
var CLS_LEFTOVERLAY = "e-scroll-left-overlay";
var OVERLAY_MAXWID = 40;
var HScroll = (
  /** @class */
  function(_super) {
    __extends70(HScroll2, _super);
    function HScroll2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    HScroll2.prototype.preRender = function() {
      this.browser = Browser2.info.name;
      this.browserCheck = this.browser === "mozilla";
      this.isDevice = Browser2.isDevice;
      this.customStep = true;
      var element2 = this.element;
      this.ieCheck = this.browser === "edge" || this.browser === "msie";
      this.initialize();
      if (element2.id === "") {
        element2.id = getUniqueID("hscroll");
        this.uniqueId = true;
      }
      element2.style.display = "block";
      if (this.enableRtl) {
        element2.classList.add(CLS_RTL);
      }
    };
    HScroll2.prototype.render = function() {
      this.touchModule = new Touch2(this.element, {
        scroll: this.touchHandler.bind(this),
        swipe: this.swipeHandler.bind(this)
      });
      EventHandler2.add(this.scrollEle, "scroll", this.scrollHandler, this);
      if (!this.isDevice) {
        this.createNavIcon(this.element);
      } else {
        this.element.classList.add(CLS_DEVICE);
        this.createOverlay(this.element);
      }
      this.setScrollState();
    };
    HScroll2.prototype.setScrollState = function() {
      if (isNullOrUndefined2(this.scrollStep) || this.scrollStep < 0) {
        this.scrollStep = this.scrollEle.offsetWidth;
        this.customStep = false;
      } else {
        this.customStep = true;
      }
    };
    HScroll2.prototype.initialize = function() {
      var scrollEle = this.createElement("div", {
        className: CLS_HSCROLLCON
      });
      var scrollDiv = this.createElement("div", {
        className: CLS_HSCROLLBAR
      });
      scrollDiv.setAttribute("tabindex", "-1");
      var ele = this.element;
      var innerEle = [].slice.call(ele.children);
      for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {
        var ele_1 = innerEle_1[_i];
        scrollEle.appendChild(ele_1);
      }
      scrollDiv.appendChild(scrollEle);
      ele.appendChild(scrollDiv);
      scrollDiv.style.overflowX = "hidden";
      this.scrollEle = scrollDiv;
      this.scrollItems = scrollEle;
    };
    HScroll2.prototype.getPersistData = function() {
      var keyEntity = ["scrollStep"];
      return this.addOnPersist(keyEntity);
    };
    HScroll2.prototype.getModuleName = function() {
      return "hScroll";
    };
    HScroll2.prototype.destroy = function() {
      var ele = this.element;
      ele.style.display = "";
      ele.classList.remove(CLS_ROOT);
      ele.classList.remove(CLS_DEVICE);
      ele.classList.remove(CLS_RTL);
      var nav = selectAll2(".e-" + ele.id + "_nav." + CLS_HSCROLLNAV, ele);
      var overlay = selectAll2("." + CLS_OVERLAY, ele);
      [].slice.call(overlay).forEach(function(ele2) {
        detach2(ele2);
      });
      for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
        var elem = _a[_i];
        ele.appendChild(elem);
      }
      if (this.uniqueId) {
        this.element.removeAttribute("id");
      }
      detach2(this.scrollEle);
      if (nav.length > 0) {
        detach2(nav[0]);
        if (!isNullOrUndefined2(nav[1])) {
          detach2(nav[1]);
        }
      }
      EventHandler2.remove(this.scrollEle, "scroll", this.scrollHandler);
      this.touchModule.destroy();
      this.touchModule = null;
      _super.prototype.destroy.call(this);
    };
    HScroll2.prototype.disable = function(value) {
      var navEles = selectAll2(".e-scroll-nav:not(." + CLS_DISABLE + ")", this.element);
      if (value) {
        this.element.classList.add(CLS_DISABLE);
      } else {
        this.element.classList.remove(CLS_DISABLE);
      }
      [].slice.call(navEles).forEach(function(el) {
        el.setAttribute("tabindex", !value ? "0" : "-1");
      });
    };
    HScroll2.prototype.createOverlay = function(element2) {
      var id = element2.id.concat("_nav");
      var rightOverlayEle = this.createElement("div", {
        className: CLS_OVERLAY + " " + CLS_RIGHTOVERLAY
      });
      var clsRight = "e-" + element2.id.concat("_nav " + CLS_HSCROLLNAV + " " + CLS_HSCROLLNAVRIGHT);
      var rightEle = this.createElement("div", {
        id: id.concat("_right"),
        className: clsRight
      });
      var navItem = this.createElement("div", {
        className: CLS_NAVRIGHTARROW + " " + CLS_NAVARROW + " e-icons"
      });
      rightEle.appendChild(navItem);
      var leftEle = this.createElement("div", {
        className: CLS_OVERLAY + " " + CLS_LEFTOVERLAY
      });
      if (this.ieCheck) {
        rightEle.classList.add("e-ie-align");
      }
      element2.appendChild(rightOverlayEle);
      element2.appendChild(rightEle);
      element2.insertBefore(leftEle, element2.firstChild);
      this.eventBinding([rightEle]);
    };
    HScroll2.prototype.createNavIcon = function(element2) {
      var id = element2.id.concat("_nav");
      var clsRight = "e-" + element2.id.concat("_nav " + CLS_HSCROLLNAV + " " + CLS_HSCROLLNAVRIGHT);
      var rightAttributes = {
        "role": "button",
        "id": id.concat("_right"),
        "aria-label": "Scroll right"
      };
      var nav = this.createElement("div", {
        className: clsRight,
        attrs: rightAttributes
      });
      nav.setAttribute("aria-disabled", "false");
      var navItem = this.createElement("div", {
        className: CLS_NAVRIGHTARROW + " " + CLS_NAVARROW + " e-icons"
      });
      var clsLeft = "e-" + element2.id.concat("_nav " + CLS_HSCROLLNAV + " " + CLS_HSCROLLNAVLEFT);
      var leftAttributes = {
        "role": "button",
        "id": id.concat("_left"),
        "aria-label": "Scroll left"
      };
      var navEle = this.createElement("div", {
        className: clsLeft + " " + CLS_DISABLE,
        attrs: leftAttributes
      });
      navEle.setAttribute("aria-disabled", "true");
      var navLeftItem = this.createElement("div", {
        className: CLS_NAVLEFTARROW + " " + CLS_NAVARROW + " e-icons"
      });
      navEle.appendChild(navLeftItem);
      nav.appendChild(navItem);
      element2.appendChild(nav);
      element2.insertBefore(navEle, element2.firstChild);
      if (this.ieCheck) {
        nav.classList.add("e-ie-align");
        navEle.classList.add("e-ie-align");
      }
      this.eventBinding([nav, navEle]);
    };
    HScroll2.prototype.onKeyPress = function(e) {
      var _this = this;
      if (e.key === "Enter") {
        var timeoutFun_1 = function() {
          _this.keyTimeout = true;
          _this.eleScrolling(10, e.target, true);
        };
        this.keyTimer = window.setTimeout(function() {
          timeoutFun_1();
        }, 100);
      }
    };
    HScroll2.prototype.onKeyUp = function(e) {
      if (e.key !== "Enter") {
        return;
      }
      if (this.keyTimeout) {
        this.keyTimeout = false;
      } else {
        e.target.click();
      }
      clearTimeout(this.keyTimer);
    };
    HScroll2.prototype.eventBinding = function(ele) {
      var _this = this;
      [].slice.call(ele).forEach(function(el) {
        new Touch2(el, {
          tapHold: _this.tabHoldHandler.bind(_this),
          tapHoldThreshold: 500
        });
        el.addEventListener("keydown", _this.onKeyPress.bind(_this));
        el.addEventListener("keyup", _this.onKeyUp.bind(_this));
        el.addEventListener("mouseup", _this.repeatScroll.bind(_this));
        el.addEventListener("touchend", _this.repeatScroll.bind(_this));
        el.addEventListener("contextmenu", function(e) {
          e.preventDefault();
        });
        EventHandler2.add(el, "click", _this.clickEventHandler, _this);
      });
    };
    HScroll2.prototype.repeatScroll = function() {
      clearInterval(this.timeout);
    };
    HScroll2.prototype.tabHoldHandler = function(e) {
      var _this = this;
      var trgt = e.originalEvent.target;
      trgt = this.contains(trgt, CLS_HSCROLLNAV) ? trgt.firstElementChild : trgt;
      var scrollDis = 10;
      var timeoutFun = function() {
        _this.eleScrolling(scrollDis, trgt, true);
      };
      this.timeout = window.setInterval(function() {
        timeoutFun();
      }, 50);
    };
    HScroll2.prototype.contains = function(ele, className) {
      return ele.classList.contains(className);
    };
    HScroll2.prototype.eleScrolling = function(scrollDis, trgt, isContinuous) {
      var rootEle = this.element;
      var classList2 = trgt.classList;
      if (classList2.contains(CLS_HSCROLLNAV)) {
        classList2 = trgt.querySelector("." + CLS_NAVARROW).classList;
      }
      if (this.contains(rootEle, CLS_RTL) && this.browserCheck) {
        scrollDis = -scrollDis;
      }
      if (!this.contains(rootEle, CLS_RTL) || this.browserCheck || this.ieCheck) {
        if (classList2.contains(CLS_NAVRIGHTARROW)) {
          this.frameScrollRequest(scrollDis, "add", isContinuous);
        } else {
          this.frameScrollRequest(scrollDis, "", isContinuous);
        }
      } else {
        if (classList2.contains(CLS_NAVLEFTARROW)) {
          this.frameScrollRequest(scrollDis, "add", isContinuous);
        } else {
          this.frameScrollRequest(scrollDis, "", isContinuous);
        }
      }
    };
    HScroll2.prototype.clickEventHandler = function(e) {
      this.eleScrolling(this.scrollStep, e.target, false);
    };
    HScroll2.prototype.swipeHandler = function(e) {
      var swipeEle = this.scrollEle;
      var distance;
      if (e.velocity <= 1) {
        distance = e.distanceX / (e.velocity * 10);
      } else {
        distance = e.distanceX / e.velocity;
      }
      var start = 0.5;
      var animate = function() {
        var step = Math.sin(start);
        if (step <= 0) {
          window.cancelAnimationFrame(step);
        } else {
          if (e.swipeDirection === "Left") {
            swipeEle.scrollLeft += distance * step;
          } else if (e.swipeDirection === "Right") {
            swipeEle.scrollLeft -= distance * step;
          }
          start -= 0.5;
          window.requestAnimationFrame(animate);
        }
      };
      animate();
    };
    HScroll2.prototype.scrollUpdating = function(scrollVal, action) {
      if (action === "add") {
        this.scrollEle.scrollLeft += scrollVal;
      } else {
        this.scrollEle.scrollLeft -= scrollVal;
      }
      if (this.enableRtl && this.scrollEle.scrollLeft > 0) {
        this.scrollEle.scrollLeft = 0;
      }
    };
    HScroll2.prototype.frameScrollRequest = function(scrollVal, action, isContinuous) {
      var _this = this;
      var step = 10;
      if (isContinuous) {
        this.scrollUpdating(scrollVal, action);
        return;
      }
      if (!this.customStep) {
        [].slice.call(selectAll2("." + CLS_OVERLAY, this.element)).forEach(function(el) {
          scrollVal -= el.offsetWidth;
        });
      }
      var animate = function() {
        var scrollValue;
        var scrollStep;
        if (_this.contains(_this.element, CLS_RTL) && _this.browserCheck) {
          scrollValue = -scrollVal;
          scrollStep = -step;
        } else {
          scrollValue = scrollVal;
          scrollStep = step;
        }
        if (scrollValue < step) {
          window.cancelAnimationFrame(scrollStep);
        } else {
          _this.scrollUpdating(scrollStep, action);
          scrollVal -= scrollStep;
          window.requestAnimationFrame(animate);
        }
      };
      animate();
    };
    HScroll2.prototype.touchHandler = function(e) {
      var ele = this.scrollEle;
      var distance = e.distanceX;
      if (this.ieCheck && this.contains(this.element, CLS_RTL)) {
        distance = -distance;
      }
      if (e.scrollDirection === "Left") {
        ele.scrollLeft = ele.scrollLeft + distance;
      } else if (e.scrollDirection === "Right") {
        ele.scrollLeft = ele.scrollLeft - distance;
      }
    };
    HScroll2.prototype.arrowDisabling = function(addDisable, removeDisable) {
      if (this.isDevice) {
        var arrowEle = isNullOrUndefined2(addDisable) ? removeDisable : addDisable;
        var arrowIcon = arrowEle.querySelector("." + CLS_NAVARROW);
        if (isNullOrUndefined2(addDisable)) {
          classList(arrowIcon, [CLS_NAVRIGHTARROW], [CLS_NAVLEFTARROW]);
        } else {
          classList(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);
        }
      } else if (addDisable && removeDisable) {
        addDisable.classList.add(CLS_DISABLE);
        addDisable.setAttribute("aria-disabled", "true");
        addDisable.removeAttribute("tabindex");
        removeDisable.classList.remove(CLS_DISABLE);
        removeDisable.setAttribute("aria-disabled", "false");
        removeDisable.setAttribute("tabindex", "0");
      }
      this.repeatScroll();
    };
    HScroll2.prototype.scrollHandler = function(e) {
      var target = e.target;
      var width = target.offsetWidth;
      var rootEle = this.element;
      var navLeftEle = this.element.querySelector("." + CLS_HSCROLLNAVLEFT);
      var navRightEle = this.element.querySelector("." + CLS_HSCROLLNAVRIGHT);
      var leftOverlay = this.element.querySelector("." + CLS_LEFTOVERLAY);
      var rightOverlay = this.element.querySelector("." + CLS_RIGHTOVERLAY);
      var scrollLeft = target.scrollLeft;
      if (scrollLeft <= 0) {
        scrollLeft = -scrollLeft;
      }
      if (this.isDevice) {
        if (this.enableRtl && !(this.browserCheck || this.ieCheck)) {
          leftOverlay = this.element.querySelector("." + CLS_RIGHTOVERLAY);
          rightOverlay = this.element.querySelector("." + CLS_LEFTOVERLAY);
        }
        if (scrollLeft < OVERLAY_MAXWID) {
          leftOverlay.style.width = scrollLeft + "px";
        } else {
          leftOverlay.style.width = "40px";
        }
        if (target.scrollWidth - Math.ceil(width + scrollLeft) < OVERLAY_MAXWID) {
          rightOverlay.style.width = target.scrollWidth - Math.ceil(width + scrollLeft) + "px";
        } else {
          rightOverlay.style.width = "40px";
        }
      }
      if (scrollLeft === 0) {
        this.arrowDisabling(navLeftEle, navRightEle);
      } else if (Math.ceil(width + scrollLeft + 0.1) >= target.scrollWidth) {
        this.arrowDisabling(navRightEle, navLeftEle);
      } else {
        var disEle = this.element.querySelector("." + CLS_HSCROLLNAV + "." + CLS_DISABLE);
        if (disEle) {
          disEle.classList.remove(CLS_DISABLE);
          disEle.setAttribute("aria-disabled", "false");
          disEle.setAttribute("tabindex", "0");
        }
      }
    };
    HScroll2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "scrollStep":
            this.setScrollState();
            break;
          case "enableRtl":
            newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);
            break;
        }
      }
    };
    __decorate68([Property2(null)], HScroll2.prototype, "scrollStep", void 0);
    HScroll2 = __decorate68([NotifyPropertyChanges2], HScroll2);
    return HScroll2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js
var __extends71 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate69 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_ROOT2 = "e-vscroll";
var CLS_RTL2 = "e-rtl";
var CLS_DISABLE2 = "e-overlay";
var CLS_VSCROLLBAR = "e-vscroll-bar";
var CLS_VSCROLLCON = "e-vscroll-content";
var CLS_NAVARROW2 = "e-nav-arrow";
var CLS_NAVUPARROW = "e-nav-up-arrow";
var CLS_NAVDOWNARROW = "e-nav-down-arrow";
var CLS_VSCROLLNAV = "e-scroll-nav";
var CLS_VSCROLLNAVUP = "e-scroll-up-nav";
var CLS_VSCROLLNAVDOWN = "e-scroll-down-nav";
var CLS_DEVICE2 = "e-scroll-device";
var CLS_OVERLAY2 = "e-scroll-overlay";
var CLS_UPOVERLAY = "e-scroll-up-overlay";
var CLS_DOWNOVERLAY = "e-scroll-down-overlay";
var OVERLAY_MAXWID2 = 40;
var VScroll = (
  /** @class */
  function(_super) {
    __extends71(VScroll2, _super);
    function VScroll2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    VScroll2.prototype.preRender = function() {
      this.browser = Browser2.info.name;
      this.browserCheck = this.browser === "mozilla";
      this.isDevice = Browser2.isDevice;
      this.customStep = true;
      var ele = this.element;
      this.ieCheck = this.browser === "edge" || this.browser === "msie";
      this.initialize();
      if (ele.id === "") {
        ele.id = getUniqueID("vscroll");
        this.uniqueId = true;
      }
      ele.style.display = "block";
      if (this.enableRtl) {
        ele.classList.add(CLS_RTL2);
      }
    };
    VScroll2.prototype.render = function() {
      this.touchModule = new Touch2(this.element, {
        scroll: this.touchHandler.bind(this),
        swipe: this.swipeHandler.bind(this)
      });
      EventHandler2.add(this.scrollEle, "scroll", this.scrollEventHandler, this);
      if (!this.isDevice) {
        this.createNavIcon(this.element);
      } else {
        this.element.classList.add(CLS_DEVICE2);
        this.createOverlayElement(this.element);
      }
      this.setScrollState();
      EventHandler2.add(this.element, "wheel", this.wheelEventHandler, this);
    };
    VScroll2.prototype.setScrollState = function() {
      if (isNullOrUndefined2(this.scrollStep) || this.scrollStep < 0) {
        this.scrollStep = this.scrollEle.offsetHeight;
        this.customStep = false;
      } else {
        this.customStep = true;
      }
    };
    VScroll2.prototype.initialize = function() {
      var scrollCnt = createElement2("div", {
        className: CLS_VSCROLLCON
      });
      var scrollBar = createElement2("div", {
        className: CLS_VSCROLLBAR
      });
      scrollBar.setAttribute("tabindex", "-1");
      var ele = this.element;
      var innerEle = [].slice.call(ele.children);
      for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {
        var ele_1 = innerEle_1[_i];
        scrollCnt.appendChild(ele_1);
      }
      scrollBar.appendChild(scrollCnt);
      ele.appendChild(scrollBar);
      scrollBar.style.overflow = "hidden";
      this.scrollEle = scrollBar;
      this.scrollItems = scrollCnt;
    };
    VScroll2.prototype.getPersistData = function() {
      var keyEntity = ["scrollStep"];
      return this.addOnPersist(keyEntity);
    };
    VScroll2.prototype.getModuleName = function() {
      return "vScroll";
    };
    VScroll2.prototype.destroy = function() {
      var el = this.element;
      el.style.display = "";
      removeClass2([this.element], [CLS_ROOT2, CLS_DEVICE2, CLS_RTL2]);
      var navs = selectAll2(".e-" + el.id + "_nav." + CLS_VSCROLLNAV, el);
      var overlays = selectAll2("." + CLS_OVERLAY2, el);
      [].slice.call(overlays).forEach(function(ele) {
        detach2(ele);
      });
      for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
        var elem = _a[_i];
        el.appendChild(elem);
      }
      if (this.uniqueId) {
        this.element.removeAttribute("id");
      }
      detach2(this.scrollEle);
      if (navs.length > 0) {
        detach2(navs[0]);
        if (!isNullOrUndefined2(navs[1])) {
          detach2(navs[1]);
        }
      }
      EventHandler2.remove(this.scrollEle, "scroll", this.scrollEventHandler);
      this.touchModule.destroy();
      this.touchModule = null;
      _super.prototype.destroy.call(this);
    };
    VScroll2.prototype.disable = function(value) {
      var navEle = selectAll2(".e-scroll-nav:not(." + CLS_DISABLE2 + ")", this.element);
      if (value) {
        this.element.classList.add(CLS_DISABLE2);
      } else {
        this.element.classList.remove(CLS_DISABLE2);
      }
      [].slice.call(navEle).forEach(function(el) {
        el.setAttribute("tabindex", !value ? "0" : "-1");
      });
    };
    VScroll2.prototype.createOverlayElement = function(element2) {
      var id = element2.id.concat("_nav");
      var downOverlayEle = createElement2("div", {
        className: CLS_OVERLAY2 + " " + CLS_DOWNOVERLAY
      });
      var clsDown = "e-" + element2.id.concat("_nav " + CLS_VSCROLLNAV + " " + CLS_VSCROLLNAVDOWN);
      var downEle = createElement2("div", {
        id: id.concat("down"),
        className: clsDown
      });
      var navItem = createElement2("div", {
        className: CLS_NAVDOWNARROW + " " + CLS_NAVARROW2 + " e-icons"
      });
      downEle.appendChild(navItem);
      var upEle = createElement2("div", {
        className: CLS_OVERLAY2 + " " + CLS_UPOVERLAY
      });
      if (this.ieCheck) {
        downEle.classList.add("e-ie-align");
      }
      element2.appendChild(downOverlayEle);
      element2.appendChild(downEle);
      element2.insertBefore(upEle, element2.firstChild);
      this.eventBinding([downEle]);
    };
    VScroll2.prototype.createNavIcon = function(element2) {
      var id = element2.id.concat("_nav");
      var clsDown = "e-" + element2.id.concat("_nav " + CLS_VSCROLLNAV + " " + CLS_VSCROLLNAVDOWN);
      var nav = createElement2("div", {
        id: id.concat("_down"),
        className: clsDown
      });
      nav.setAttribute("aria-disabled", "false");
      var navItem = createElement2("div", {
        className: CLS_NAVDOWNARROW + " " + CLS_NAVARROW2 + " e-icons"
      });
      var clsUp = "e-" + element2.id.concat("_nav " + CLS_VSCROLLNAV + " " + CLS_VSCROLLNAVUP);
      var navElement = createElement2("div", {
        id: id.concat("_up"),
        className: clsUp + " " + CLS_DISABLE2
      });
      navElement.setAttribute("aria-disabled", "true");
      var navUpItem = createElement2("div", {
        className: CLS_NAVUPARROW + " " + CLS_NAVARROW2 + " e-icons"
      });
      navElement.appendChild(navUpItem);
      nav.appendChild(navItem);
      nav.setAttribute("tabindex", "0");
      element2.appendChild(nav);
      element2.insertBefore(navElement, element2.firstChild);
      if (this.ieCheck) {
        nav.classList.add("e-ie-align");
        navElement.classList.add("e-ie-align");
      }
      this.eventBinding([nav, navElement]);
    };
    VScroll2.prototype.onKeyPress = function(ev) {
      var _this = this;
      if (ev.key === "Enter") {
        var timeoutFun_1 = function() {
          _this.keyTimeout = true;
          _this.eleScrolling(10, ev.target, true);
        };
        this.keyTimer = window.setTimeout(function() {
          timeoutFun_1();
        }, 100);
      }
    };
    VScroll2.prototype.onKeyUp = function(ev) {
      if (ev.key !== "Enter") {
        return;
      }
      if (this.keyTimeout) {
        this.keyTimeout = false;
      } else {
        ev.target.click();
      }
      clearTimeout(this.keyTimer);
    };
    VScroll2.prototype.eventBinding = function(element2) {
      var _this = this;
      [].slice.call(element2).forEach(function(ele) {
        new Touch2(ele, {
          tapHold: _this.tabHoldHandler.bind(_this),
          tapHoldThreshold: 500
        });
        ele.addEventListener("keydown", _this.onKeyPress.bind(_this));
        ele.addEventListener("keyup", _this.onKeyUp.bind(_this));
        ele.addEventListener("mouseup", _this.repeatScroll.bind(_this));
        ele.addEventListener("touchend", _this.repeatScroll.bind(_this));
        ele.addEventListener("contextmenu", function(e) {
          e.preventDefault();
        });
        EventHandler2.add(ele, "click", _this.clickEventHandler, _this);
      });
    };
    VScroll2.prototype.repeatScroll = function() {
      clearInterval(this.timeout);
    };
    VScroll2.prototype.tabHoldHandler = function(ev) {
      var _this = this;
      var trgt = ev.originalEvent.target;
      trgt = this.contains(trgt, CLS_VSCROLLNAV) ? trgt.firstElementChild : trgt;
      var scrollDistance = 10;
      var timeoutFun = function() {
        _this.eleScrolling(scrollDistance, trgt, true);
      };
      this.timeout = window.setInterval(function() {
        timeoutFun();
      }, 50);
    };
    VScroll2.prototype.contains = function(element2, className) {
      return element2.classList.contains(className);
    };
    VScroll2.prototype.eleScrolling = function(scrollDis, trgt, isContinuous) {
      var classList2 = trgt.classList;
      if (classList2.contains(CLS_VSCROLLNAV)) {
        classList2 = trgt.querySelector("." + CLS_NAVARROW2).classList;
      }
      if (classList2.contains(CLS_NAVDOWNARROW)) {
        this.frameScrollRequest(scrollDis, "add", isContinuous);
      } else if (classList2.contains(CLS_NAVUPARROW)) {
        this.frameScrollRequest(scrollDis, "", isContinuous);
      }
    };
    VScroll2.prototype.clickEventHandler = function(event2) {
      this.eleScrolling(this.scrollStep, event2.target, false);
    };
    VScroll2.prototype.wheelEventHandler = function(e) {
      e.preventDefault();
      this.frameScrollRequest(this.scrollStep, e.deltaY > 0 ? "add" : "", false);
    };
    VScroll2.prototype.swipeHandler = function(e) {
      var swipeElement = this.scrollEle;
      var distance;
      if (e.velocity <= 1) {
        distance = e.distanceY / (e.velocity * 10);
      } else {
        distance = e.distanceY / e.velocity;
      }
      var start = 0.5;
      var animate = function() {
        var step = Math.sin(start);
        if (step <= 0) {
          window.cancelAnimationFrame(step);
        } else {
          if (e.swipeDirection === "Up") {
            swipeElement.scrollTop += distance * step;
          } else if (e.swipeDirection === "Down") {
            swipeElement.scrollTop -= distance * step;
          }
          start -= 0.02;
          window.requestAnimationFrame(animate);
        }
      };
      animate();
    };
    VScroll2.prototype.scrollUpdating = function(scrollVal, action) {
      if (action === "add") {
        this.scrollEle.scrollTop += scrollVal;
      } else {
        this.scrollEle.scrollTop -= scrollVal;
      }
    };
    VScroll2.prototype.frameScrollRequest = function(scrollValue, action, isContinuous) {
      var _this = this;
      var step = 10;
      if (isContinuous) {
        this.scrollUpdating(scrollValue, action);
        return;
      }
      if (!this.customStep) {
        [].slice.call(selectAll2("." + CLS_OVERLAY2, this.element)).forEach(function(el) {
          scrollValue -= el.offsetHeight;
        });
      }
      var animate = function() {
        if (scrollValue < step) {
          window.cancelAnimationFrame(step);
        } else {
          _this.scrollUpdating(step, action);
          scrollValue -= step;
          window.requestAnimationFrame(animate);
        }
      };
      animate();
    };
    VScroll2.prototype.touchHandler = function(e) {
      var el = this.scrollEle;
      var distance = e.distanceY;
      if (e.scrollDirection === "Up") {
        el.scrollTop = el.scrollTop + distance;
      } else if (e.scrollDirection === "Down") {
        el.scrollTop = el.scrollTop - distance;
      }
    };
    VScroll2.prototype.arrowDisabling = function(addDisableCls, removeDisableCls) {
      if (this.isDevice) {
        var arrowEle = isNullOrUndefined2(addDisableCls) ? removeDisableCls : addDisableCls;
        var arrowIcon = arrowEle.querySelector("." + CLS_NAVARROW2);
        if (isNullOrUndefined2(addDisableCls)) {
          classList(arrowIcon, [CLS_NAVDOWNARROW], [CLS_NAVUPARROW]);
        } else {
          classList(arrowIcon, [CLS_NAVUPARROW], [CLS_NAVDOWNARROW]);
        }
      } else {
        addDisableCls.classList.add(CLS_DISABLE2);
        addDisableCls.setAttribute("aria-disabled", "true");
        addDisableCls.removeAttribute("tabindex");
        removeDisableCls.classList.remove(CLS_DISABLE2);
        removeDisableCls.setAttribute("aria-disabled", "false");
        removeDisableCls.setAttribute("tabindex", "0");
      }
      this.repeatScroll();
    };
    VScroll2.prototype.scrollEventHandler = function(e) {
      var target = e.target;
      var height = target.offsetHeight;
      var navUpEle = this.element.querySelector("." + CLS_VSCROLLNAVUP);
      var navDownEle = this.element.querySelector("." + CLS_VSCROLLNAVDOWN);
      var upOverlay = this.element.querySelector("." + CLS_UPOVERLAY);
      var downOverlay = this.element.querySelector("." + CLS_DOWNOVERLAY);
      var scrollTop = target.scrollTop;
      if (scrollTop <= 0) {
        scrollTop = -scrollTop;
      }
      if (this.isDevice) {
        if (scrollTop < OVERLAY_MAXWID2) {
          upOverlay.style.height = scrollTop + "px";
        } else {
          upOverlay.style.height = "40px";
        }
        if (target.scrollHeight - Math.ceil(height + scrollTop) < OVERLAY_MAXWID2) {
          downOverlay.style.height = target.scrollHeight - Math.ceil(height + scrollTop) + "px";
        } else {
          downOverlay.style.height = "40px";
        }
      }
      if (scrollTop === 0) {
        this.arrowDisabling(navUpEle, navDownEle);
      } else if (Math.ceil(height + scrollTop + 0.1) >= target.scrollHeight) {
        this.arrowDisabling(navDownEle, navUpEle);
      } else {
        var disEle = this.element.querySelector("." + CLS_VSCROLLNAV + "." + CLS_DISABLE2);
        if (disEle) {
          disEle.classList.remove(CLS_DISABLE2);
          disEle.setAttribute("aria-disabled", "false");
          disEle.setAttribute("tabindex", "0");
        }
      }
    };
    VScroll2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "scrollStep":
            this.setScrollState();
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              this.element.classList.add(CLS_RTL2);
            } else {
              this.element.classList.remove(CLS_RTL2);
            }
            break;
        }
      }
    };
    __decorate69([Property2(null)], VScroll2.prototype, "scrollStep", void 0);
    VScroll2 = __decorate69([NotifyPropertyChanges2], VScroll2);
    return VScroll2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/common/menu-scroll.js
function addScrolling(createElement4, container, content, scrollType, enableRtl, offset) {
  var containerOffset;
  var contentOffset;
  var parentElem = container.parentElement;
  if (scrollType === "vscroll") {
    containerOffset = offset || container.getBoundingClientRect().height;
    contentOffset = content.getBoundingClientRect().height;
  } else {
    containerOffset = container.getBoundingClientRect().width;
    contentOffset = content.getBoundingClientRect().width;
  }
  if (containerOffset < contentOffset) {
    return createScrollbar(createElement4, container, content, scrollType, enableRtl, offset);
  } else if (parentElem) {
    var width = parentElem.getBoundingClientRect().width;
    if (width < containerOffset && scrollType === "hscroll") {
      contentOffset = width;
      container.style.maxWidth = width + "px";
      return createScrollbar(createElement4, container, content, scrollType, enableRtl, offset);
    }
    return content;
  } else {
    return content;
  }
}
function createScrollbar(createElement4, container, content, scrollType, enableRtl, offset) {
  var scrollEle = createElement4("div", {
    className: "e-menu-" + scrollType
  });
  container.appendChild(scrollEle);
  scrollEle.appendChild(content);
  if (offset) {
    scrollEle.style.overflow = "hidden";
    scrollEle.style.height = offset + "px";
  } else {
    scrollEle.style.maxHeight = container.style.maxHeight;
    container.style.overflow = "hidden";
  }
  var scrollObj;
  if (scrollType === "vscroll") {
    scrollObj = new VScroll({
      enableRtl
    }, scrollEle);
    scrollObj.scrollStep = select2(".e-" + scrollType + "-bar", container).offsetHeight / 2;
  } else {
    scrollObj = new HScroll({
      enableRtl
    }, scrollEle);
    scrollObj.scrollStep = select2(".e-" + scrollType + "-bar", container).offsetWidth;
  }
  return scrollEle;
}
function destroyScroll(scrollObj, element2, skipEle) {
  if (scrollObj) {
    var menu = select2(".e-menu-parent", element2);
    if (menu) {
      if (!skipEle || skipEle === menu) {
        scrollObj.destroy();
        element2.parentElement.appendChild(menu);
        detach2(element2);
      }
    } else {
      scrollObj.destroy();
      detach2(element2);
    }
  }
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js
var __extends72 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate70 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ENTER = "enter";
var ESCAPE = "escape";
var FOCUSED = "e-focused";
var HEADER = "e-menu-header";
var SELECTED2 = "e-selected";
var SEPARATOR = "e-separator";
var UPARROW = "uparrow";
var DOWNARROW = "downarrow";
var LEFTARROW = "leftarrow";
var RIGHTARROW = "rightarrow";
var HOME = "home";
var END = "end";
var TAB = "tab";
var CARET = "e-caret";
var ITEM = "e-menu-item";
var DISABLED10 = "e-disabled";
var HIDE2 = "e-menu-hide";
var ICONS = "e-icons";
var RTL16 = "e-rtl";
var POPUP = "e-menu-popup";
var TEMPLATE_PROPERTY = "Template";
var FieldSettings3 = (
  /** @class */
  function(_super) {
    __extends72(FieldSettings4, _super);
    function FieldSettings4() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate70([Property2("id")], FieldSettings4.prototype, "itemId", void 0);
    __decorate70([Property2("parentId")], FieldSettings4.prototype, "parentId", void 0);
    __decorate70([Property2("text")], FieldSettings4.prototype, "text", void 0);
    __decorate70([Property2("iconCss")], FieldSettings4.prototype, "iconCss", void 0);
    __decorate70([Property2("url")], FieldSettings4.prototype, "url", void 0);
    __decorate70([Property2("separator")], FieldSettings4.prototype, "separator", void 0);
    __decorate70([Property2("items")], FieldSettings4.prototype, "children", void 0);
    return FieldSettings4;
  }(ChildProperty2)
);
var MenuItem = (
  /** @class */
  function(_super) {
    __extends72(MenuItem2, _super);
    function MenuItem2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate70([Property2(null)], MenuItem2.prototype, "iconCss", void 0);
    __decorate70([Property2("")], MenuItem2.prototype, "id", void 0);
    __decorate70([Property2(false)], MenuItem2.prototype, "separator", void 0);
    __decorate70([Collection([], MenuItem2)], MenuItem2.prototype, "items", void 0);
    __decorate70([Property2("")], MenuItem2.prototype, "text", void 0);
    __decorate70([Property2("")], MenuItem2.prototype, "url", void 0);
    __decorate70([Property2()], MenuItem2.prototype, "htmlAttributes", void 0);
    return MenuItem2;
  }(ChildProperty2)
);
var MenuAnimationSettings = (
  /** @class */
  function(_super) {
    __extends72(MenuAnimationSettings2, _super);
    function MenuAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate70([Property2("SlideDown")], MenuAnimationSettings2.prototype, "effect", void 0);
    __decorate70([Property2(400)], MenuAnimationSettings2.prototype, "duration", void 0);
    __decorate70([Property2("ease")], MenuAnimationSettings2.prototype, "easing", void 0);
    return MenuAnimationSettings2;
  }(ChildProperty2)
);
var MenuBase = (
  /** @class */
  function(_super) {
    __extends72(MenuBase2, _super);
    function MenuBase2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.navIdx = [];
      _this.animation = new Animation2({});
      _this.isTapHold = false;
      _this.tempItem = [];
      _this.showSubMenuOn = "Auto";
      _this.isAnimationNone = false;
      return _this;
    }
    MenuBase2.prototype.preRender = function() {
      if (!this.isMenu) {
        var ul = void 0;
        if (this.element.tagName === "EJS-CONTEXTMENU") {
          ul = this.createElement("ul", {
            id: getUniqueID(this.getModuleName()),
            className: "e-control e-lib e-" + this.getModuleName()
          });
          var ejInst = getValue2("ej2_instances", this.element);
          removeClass2([this.element], ["e-control", "e-lib", "e-" + this.getModuleName()]);
          this.clonedElement = this.element;
          this.element = ul;
          setValue3("ej2_instances", ejInst, this.element);
        } else {
          ul = this.createElement("ul", {
            id: getUniqueID(this.getModuleName())
          });
          append([].slice.call(this.element.cloneNode(true).children), ul);
          var refEle = this.element.nextElementSibling;
          if (refEle) {
            this.element.parentElement.insertBefore(ul, refEle);
          } else {
            this.element.parentElement.appendChild(ul);
          }
          this.clonedElement = ul;
        }
        this.clonedElement.style.display = "none";
      }
      if (this.element.tagName === "EJS-MENU") {
        var ele = this.element;
        var ejInstance = getValue2("ej2_instances", ele);
        var ul = this.createElement("ul");
        var wrapper = this.createElement("EJS-MENU", {
          className: "e-" + this.getModuleName() + "-wrapper"
        });
        for (var idx = 0, len = ele.attributes.length; idx < len; idx++) {
          ul.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
        }
        ele.parentNode.insertBefore(wrapper, ele);
        detach2(ele);
        ele = ul;
        wrapper.appendChild(ele);
        setValue3("ej2_instances", ejInstance, ele);
        this.clonedElement = wrapper;
        this.element = ele;
        if (!this.element.id) {
          this.element.id = getUniqueID(this.getModuleName());
        }
      }
    };
    MenuBase2.prototype.render = function() {
      var _this = this;
      this.initialize();
      this.renderItems();
      this.wireEvents();
      this.renderComplete();
      var wrapper = this.getWrapper();
      if (this.template && this.enableScrolling && (this.isReact || this.isAngular)) {
        requestAnimationFrame(function() {
          addScrolling(_this.createElement, wrapper, _this.element, "hscroll", _this.enableRtl);
        });
      }
    };
    MenuBase2.prototype.initialize = function() {
      var wrapper = this.getWrapper();
      if (!wrapper) {
        wrapper = this.createElement("div", {
          className: "e-" + this.getModuleName() + "-wrapper"
        });
        if (this.isMenu) {
          this.element.parentElement.insertBefore(wrapper, this.element);
        } else {
          document.body.appendChild(wrapper);
        }
      }
      if (this.cssClass) {
        addClass2([wrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.enableRtl) {
        wrapper.classList.add(RTL16);
      }
      wrapper.appendChild(this.element);
      if (this.isMenu && this.hamburgerMode) {
        if (!this.target) {
          this.createHeaderContainer(wrapper);
        }
      }
      this.defaultOption = this.showItemOnClick;
    };
    MenuBase2.prototype.renderItems = function() {
      if (!this.items.length) {
        var items = ListBase.createJsonFromElement(this.element, {
          fields: {
            child: "items"
          }
        });
        this.setProperties({
          items
        }, true);
        if (isBlazor2() && !this.isMenu) {
          this.element = this.removeChildElement(this.element);
        } else {
          this.element.innerHTML = "";
        }
      }
      var ul = this.createItems(this.items);
      append(Array.prototype.slice.call(ul.children), this.element);
      this.element.classList.add("e-menu-parent");
      if (this.isMenu) {
        if (!this.hamburgerMode && this.element.classList.contains("e-vertical")) {
          this.setBlankIconStyle(this.element);
        }
        if (this.enableScrolling) {
          var wrapper = this.getWrapper();
          if (this.element.classList.contains("e-vertical")) {
            addScrolling(this.createElement, wrapper, this.element, "vscroll", this.enableRtl);
          } else {
            addScrolling(this.createElement, wrapper, this.element, "hscroll", this.enableRtl);
          }
        }
      } else {
        this.element.parentElement.setAttribute("role", "dialog");
        this.element.parentElement.setAttribute("aria-label", "context menu");
      }
    };
    MenuBase2.prototype.wireEvents = function() {
      var wrapper = this.getWrapper();
      if (this.target) {
        var target = void 0;
        var targetElems = selectAll2(this.target);
        for (var i = 0, len = targetElems.length; i < len; i++) {
          target = targetElems[i];
          if (this.isMenu) {
            EventHandler2.add(target, "click", this.menuHeaderClickHandler, this);
          } else {
            if (Browser2.isIos) {
              new Touch2(target, {
                tapHold: this.touchHandler.bind(this)
              });
            } else {
              EventHandler2.add(target, "contextmenu", this.cmenuHandler, this);
            }
          }
        }
        this.targetElement = target;
        if (!this.isMenu) {
          EventHandler2.add(this.targetElement, "scroll", this.scrollHandler, this);
          for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
            var parent_1 = _a[_i];
            EventHandler2.add(parent_1, "scroll", this.scrollHandler, this);
          }
        }
      }
      if (!Browser2.isDevice) {
        this.delegateMoverHandler = this.moverHandler.bind(this);
        this.delegateMouseDownHandler = this.mouseDownHandler.bind(this);
        EventHandler2.add(this.isMenu ? document : wrapper, "mouseover", this.delegateMoverHandler, this);
        EventHandler2.add(document, "mousedown", this.delegateMouseDownHandler, this);
        EventHandler2.add(document, "keydown", this.domKeyHandler, this);
        if (!this.isMenu && !this.target) {
          EventHandler2.add(document, "scroll", this.scrollHandler, this);
        }
      }
      this.delegateClickHandler = this.clickHandler.bind(this);
      EventHandler2.add(document, "click", this.delegateClickHandler, this);
      this.wireKeyboardEvent(wrapper);
      this.rippleFn = rippleEffect(wrapper, {
        selector: "." + ITEM
      });
    };
    MenuBase2.prototype.wireKeyboardEvent = function(element2) {
      var keyConfigs = {
        downarrow: DOWNARROW,
        uparrow: UPARROW,
        enter: ENTER,
        leftarrow: LEFTARROW,
        rightarrow: RIGHTARROW,
        escape: ESCAPE
      };
      if (this.isMenu) {
        keyConfigs.home = HOME;
        keyConfigs.end = END;
        keyConfigs.tab = TAB;
      }
      new KeyboardEvents2(element2, {
        keyAction: this.keyBoardHandler.bind(this),
        keyConfigs
      });
    };
    MenuBase2.prototype.mouseDownHandler = function(e) {
      if (closest2(e.target, ".e-" + this.getModuleName() + "-wrapper") !== this.getWrapper() && !closest2(e.target, ".e-" + this.getModuleName() + "-popup")) {
        this.closeMenu(this.isMenu ? null : this.navIdx.length, e);
      }
    };
    MenuBase2.prototype.keyHandler = function(e) {
      if (e.keyCode === 38 || e.keyCode === 40) {
        if (e.target && (e.target.classList.contains("e-contextmenu") || e.target.classList.contains("e-menu-item"))) {
          e.preventDefault();
        }
      }
    };
    MenuBase2.prototype.domKeyHandler = function(e) {
      if (e.keyCode === 27) {
        if (this.isMenuVisible()) {
          e.stopImmediatePropagation();
        }
        e.action = ESCAPE;
        this.leftEscKeyHandler(e);
      }
    };
    MenuBase2.prototype.keyBoardHandler = function(e) {
      var actionName = "";
      var trgt = e.target;
      var actionNeeded = this.isMenu && !this.hamburgerMode && !this.element.classList.contains("e-vertical") && this.navIdx.length < 1;
      e.preventDefault();
      if (this.enableScrolling && e.keyCode === 13 && trgt.classList.contains("e-scroll-nav")) {
        this.removeLIStateByClass([FOCUSED, SELECTED2], [closest2(trgt, ".e-" + this.getModuleName() + "-wrapper")]);
      }
      if (actionNeeded) {
        switch (e.action) {
          case RIGHTARROW:
            actionName = RIGHTARROW;
            e.action = DOWNARROW;
            break;
          case LEFTARROW:
            actionName = LEFTARROW;
            e.action = UPARROW;
            break;
          case DOWNARROW:
            actionName = DOWNARROW;
            e.action = RIGHTARROW;
            break;
          case UPARROW:
            actionName = UPARROW;
            e.action = "";
            break;
        }
      } else if (this.enableRtl) {
        switch (e.action) {
          case LEFTARROW:
            actionNeeded = true;
            actionName = LEFTARROW;
            e.action = RIGHTARROW;
            break;
          case RIGHTARROW:
            actionNeeded = true;
            actionName = RIGHTARROW;
            e.action = LEFTARROW;
            break;
        }
      }
      switch (e.action) {
        case DOWNARROW:
        case UPARROW:
        case END:
        case HOME:
        case TAB:
          this.upDownKeyHandler(e);
          break;
        case RIGHTARROW:
          this.rightEnterKeyHandler(e);
          break;
        case LEFTARROW:
          this.leftEscKeyHandler(e);
          break;
        case ENTER:
          if (this.hamburgerMode && trgt.tagName === "SPAN" && trgt.classList.contains("e-menu-icon")) {
            this.menuHeaderClickHandler(e);
          } else {
            this.rightEnterKeyHandler(e);
          }
          break;
      }
      if (actionNeeded) {
        e.action = actionName;
      }
    };
    MenuBase2.prototype.upDownKeyHandler = function(e) {
      var cul = this.getUlByNavIdx();
      var defaultIdx = e.action === DOWNARROW || e.action === HOME || e.action === TAB ? 0 : cul.childElementCount - 1;
      var fliIdx = defaultIdx;
      var fli = this.getLIByClass(cul, FOCUSED);
      if (fli) {
        if (e.action !== END && e.action !== HOME) {
          fliIdx = this.getIdx(cul, fli);
        }
        fli.classList.remove(FOCUSED);
        if (e.action !== END && e.action !== HOME) {
          if (e.action === DOWNARROW) {
            fliIdx++;
          } else {
            fliIdx--;
          }
          if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {
            fliIdx = defaultIdx;
          }
        }
      }
      var cli = cul.children[fliIdx];
      fliIdx = this.isValidLI(cli, fliIdx, e.action);
      cul.children[fliIdx].classList.add(FOCUSED);
      cul.children[fliIdx].focus();
    };
    MenuBase2.prototype.isValidLI = function(cli, index, action) {
      var cul = this.getUlByNavIdx();
      var defaultIdx = action === DOWNARROW || action === HOME || action === TAB ? 0 : cul.childElementCount - 1;
      if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED10) || cli.classList.contains(HIDE2)) {
        if (action === DOWNARROW && index === cul.childElementCount - 1) {
          index = defaultIdx;
        } else if (action === UPARROW && index === 0) {
          index = defaultIdx;
        } else if (action === DOWNARROW || action === RIGHTARROW) {
          index++;
        } else if (action === "tab" && cli.classList.contains(SEPARATOR)) {
          index++;
        } else {
          index--;
        }
      }
      cli = cul.children[index];
      if (cli && (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED10) || cli.classList.contains(HIDE2))) {
        index = this.isValidLI(cli, index, action);
      }
      return index;
    };
    MenuBase2.prototype.getUlByNavIdx = function(navIdxLen) {
      var _this = this;
      if (navIdxLen === void 0) {
        navIdxLen = this.navIdx.length;
      }
      if (this.isMenu) {
        var popup = [this.getWrapper()].concat([].slice.call(selectAll2("." + POPUP)))[navIdxLen];
        var popups_1 = [];
        var allPopup = selectAll2("." + POPUP);
        allPopup.forEach(function(elem) {
          if (_this.element.id === elem.id.split("-")[2] || elem.id.split("-")[2] + "-" + elem.id.split("-")[3]) {
            popups_1.push(elem);
          }
        });
        popup = [this.getWrapper()].concat([].slice.call(popups_1))[navIdxLen];
        return isNullOrUndefined2(popup) ? null : select2(".e-menu-parent", popup);
      } else {
        if (!document.body.contains(this.element) && navIdxLen === 0) {
          return null;
        }
        return this.getWrapper().children[navIdxLen];
      }
    };
    MenuBase2.prototype.rightEnterKeyHandler = function(e) {
      var eventArgs;
      var cul = this.getUlByNavIdx();
      var fli = this.getLIByClass(cul, FOCUSED);
      if (fli) {
        var fliIdx = this.getIdx(cul, fli);
        var navIdx = this.navIdx.concat(fliIdx);
        var item = this.getItem(navIdx);
        if (item.items.length) {
          this.navIdx.push(fliIdx);
          this.keyType = "right";
          this.action = e.action;
          this.openMenu(fli, item, -1, -1, e);
        } else {
          if (e.action === ENTER) {
            if (this.isMenu && this.navIdx.length === 0) {
              this.removeLIStateByClass([SELECTED2], [this.getWrapper()]);
            } else {
              fli.classList.remove(FOCUSED);
            }
            fli.classList.add(SELECTED2);
            eventArgs = {
              element: fli,
              item,
              event: e
            };
            this.trigger("select", eventArgs);
            var aEle = fli.querySelector(".e-menu-url");
            if (item.url && aEle) {
              switch (aEle.getAttribute("target")) {
                case "_blank":
                  window.open(item.url, "_blank");
                  break;
                case "_parent":
                  window.parent.location.href = item.url;
                  break;
                default:
                  window.location.href = item.url;
              }
            }
            this.closeMenu(null, e);
            var sli = this.getLIByClass(this.getUlByNavIdx(), SELECTED2);
            if (sli) {
              sli.classList.add(FOCUSED);
              sli.focus();
            }
          }
        }
      }
    };
    MenuBase2.prototype.leftEscKeyHandler = function(e) {
      if (this.navIdx.length) {
        this.keyType = "left";
        this.closeMenu(this.navIdx.length, e);
      } else {
        if (e.action === ESCAPE) {
          this.closeMenu(null, e);
        }
      }
    };
    MenuBase2.prototype.scrollHandler = function(e) {
      this.closeMenu(null, e);
    };
    MenuBase2.prototype.touchHandler = function(e) {
      this.isTapHold = true;
      this.cmenuHandler(e.originalEvent);
    };
    MenuBase2.prototype.cmenuHandler = function(e) {
      e.preventDefault();
      this.currentTarget = e.target;
      this.isCMenu = true;
      this.pageX = e.changedTouches ? e.changedTouches[0].pageX + 1 : e.pageX + 1;
      this.pageY = e.changedTouches ? e.changedTouches[0].pageY + 1 : e.pageY + 1;
      this.closeMenu(null, e);
      if (this.isCMenu) {
        if (this.canOpen(e.target)) {
          this.openMenu(null, null, this.pageY, this.pageX, e);
        }
        this.isCMenu = false;
      }
    };
    MenuBase2.prototype.closeMenu = function(ulIndex, e, isIterated) {
      var _this = this;
      if (ulIndex === void 0) {
        ulIndex = 0;
      }
      if (e === void 0) {
        e = null;
      }
      if (this.isMenuVisible()) {
        var sli = void 0;
        var item_1;
        var wrapper_1 = this.getWrapper();
        var beforeCloseArgs = void 0;
        var items_1;
        var popups = this.getPopups();
        var isClose = false;
        var cnt = this.isMenu ? popups.length + 1 : wrapper_1.childElementCount;
        var ul_1 = this.isMenu && cnt !== 1 ? select2(".e-ul", popups[cnt - 2]) : selectAll2(".e-menu-parent", wrapper_1)[cnt - 1];
        if (this.isMenu && ul_1.classList.contains("e-menu")) {
          sli = this.getLIByClass(ul_1, SELECTED2);
          if (sli) {
            sli.classList.remove(SELECTED2);
          }
          isClose = true;
        }
        if (!isClose) {
          var liElem_1 = e && e.target && this.getLI(e.target);
          if (liElem_1) {
            this.cli = liElem_1;
          } else {
            this.cli = ul_1.children[0];
          }
          item_1 = this.navIdx.length ? this.getItem(this.navIdx) : null;
          items_1 = item_1 ? item_1.items : this.items;
          beforeCloseArgs = {
            element: ul_1,
            parentItem: item_1,
            items: items_1,
            event: e,
            cancel: false,
            isFocused: true
          };
          this.trigger("beforeClose", beforeCloseArgs, function(observedCloseArgs) {
            var popupEle;
            var closeArgs;
            var popupId = "";
            var popupObj;
            var isOpen = !observedCloseArgs.cancel;
            if (isOpen || _this.isCMenu) {
              if (_this.isMenu) {
                popupEle = closest2(ul_1, "." + POPUP);
                if (_this.hamburgerMode) {
                  popupEle.parentElement.style.minHeight = "";
                  closest2(ul_1, ".e-menu-item").setAttribute("aria-expanded", "false");
                }
                _this.unWireKeyboardEvent(popupEle);
                destroyScroll(getInstance(popupEle.children[0], VScroll), popupEle.children[0]);
                popupObj = getInstance(popupEle, Popup);
                popupObj.hide();
                popupId = popupEle.id;
                popupObj.destroy();
                detach2(popupEle);
              } else {
                _this.isContextMenuClosed = false;
                _this.toggleAnimation(ul_1, false);
              }
              closeArgs = {
                element: ul_1,
                parentItem: item_1,
                items: items_1
              };
              _this.trigger("onClose", closeArgs);
              _this.navIdx.pop();
              if (_this.navIdx.length === 0 && e && e.type === "keyup") {
                _this.showSubMenu = false;
              }
              if (!_this.isMenu) {
                EventHandler2.remove(ul_1, "keydown", _this.keyHandler);
                if (_this.keyType === "right") {
                  _this.keyType = "";
                }
              }
            }
            _this.updateReactTemplate();
            var trgtliId;
            var closedLi;
            var trgtLi;
            var trgtpopUp = _this.getWrapper() && _this.getUlByNavIdx();
            if (_this.isCMenu) {
              if (_this.canOpen(e.target)) {
                _this.openMenu(null, null, _this.pageY, _this.pageX, e);
              }
              _this.isCMenu = false;
            }
            if (_this.isMenu && trgtpopUp && popupId.length) {
              var regExp7 = RegExp;
              trgtliId = new regExp7("(.*)-ej2menu-" + _this.element.id + "-popup").exec(popupId)[1];
              closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
              trgtLi = liElem_1 && trgtpopUp.querySelector('[id="' + liElem_1.id + '"]');
            } else if (trgtpopUp) {
              closedLi = trgtpopUp.querySelector(".e-menu-item.e-selected");
              trgtLi = liElem_1 && trgtpopUp.querySelector('[id="' + liElem_1.id + '"]');
            }
            var submenus = liElem_1 && liElem_1.querySelectorAll(".e-menu-item");
            if (isOpen && _this.hamburgerMode && ulIndex && !submenus.length) {
              _this.afterCloseMenu(e);
            } else if (isOpen && !_this.hamburgerMode && closedLi && !trgtLi && _this.keyType !== "left" && (_this.navIdx.length || !_this.isMenu && _this.navIdx.length === 0)) {
              var ele = e && e.target.classList && (e.target.classList.contains("e-vscroll") || e.target.classList.contains("e-scroll-nav")) ? closest2(e.target, ".e-menu-wrapper") : null;
              if (ele) {
                ele = ele.querySelector(".e-menu-item");
                if (_this.showItemOnClick || ele && _this.getIndex(ele.id, true).length <= _this.navIdx.length) {
                  _this.closeMenu(_this.navIdx[_this.navIdx.length - 1], e, true);
                }
              } else {
                if (!(e && e.target.classList && e.target.classList.contains("e-nav-arrow"))) {
                  _this.closeMenu(_this.navIdx[_this.navIdx.length - 1], e);
                }
              }
            } else if (isOpen && !isIterated && !ulIndex && (_this.hamburgerMode && _this.navIdx.length || _this.navIdx.length === 1 && liElem_1 && trgtpopUp !== liElem_1.parentElement)) {
              _this.closeMenu(null, e);
            } else if (isOpen && isNullOrUndefined2(ulIndex) && _this.navIdx.length) {
              _this.closeMenu(null, e);
            } else if (isOpen && !_this.isMenu && !ulIndex && _this.navIdx.length === 0 && !_this.isMenusClosed && !_this.isCmenuHover) {
              _this.isMenusClosed = true;
              _this.closeMenu(0, e);
            } else if (isOpen && _this.isMenu && e && e.target && _this.navIdx.length !== 0 && closest2(e.target, ".e-menu-parent.e-control")) {
              _this.closeMenu(0, e);
            } else if (isOpen && !_this.isMenu && selectAll2(".e-menu-parent", wrapper_1)[ulIndex - 1] && e.which === 3) {
              _this.closeMenu(null, e);
            } else {
              if (isOpen && (_this.keyType === "right" || _this.keyType === "click")) {
                _this.afterCloseMenu(e);
              } else {
                var cul = _this.getUlByNavIdx();
                var sli_1 = _this.getLIByClass(cul, SELECTED2);
                if (sli_1) {
                  sli_1.setAttribute("aria-expanded", "false");
                  sli_1.classList.remove(SELECTED2);
                  if (observedCloseArgs.isFocused && liElem_1 || _this.keyType === "left") {
                    sli_1.classList.add(FOCUSED);
                    if (!e.target || !e.target.classList.contains("e-edit-template")) {
                      sli_1.focus();
                    }
                  }
                }
                if (!isOpen && _this.hamburgerMode && liElem_1 && liElem_1.getAttribute("aria-expanded") === "false" && liElem_1.getAttribute("aria-haspopup") === "true") {
                  if (closest2(liElem_1, ".e-menu-parent.e-control")) {
                    _this.navIdx = [];
                  } else {
                    _this.navIdx.pop();
                  }
                  _this.navIdx.push(_this.cliIdx);
                  var item_2 = _this.getItem(_this.navIdx);
                  liElem_1.setAttribute("aria-expanded", "true");
                  _this.openMenu(liElem_1, item_2, -1, -1, e);
                }
              }
              if (_this.navIdx.length < 1) {
                if (_this.showSubMenuOn === "Hover" || _this.showSubMenuOn === "Click") {
                  _this.showItemOnClick = _this.defaultOption;
                  _this.showSubMenuOn = "Auto";
                }
              }
            }
            _this.removeStateWrapper();
          });
        }
      }
    };
    MenuBase2.prototype.updateReactTemplate = function() {
      if (this.isReact && this.template && this.navIdx.length === 0) {
        var portals = void 0;
        if (this.portals) {
          portals = this.portals.splice(0, this.items.length);
        }
        this.clearTemplate(["template"]);
        this.portals = portals;
        this.renderReactTemplates();
      }
    };
    MenuBase2.prototype.getMenuItemModel = function(item, level) {
      if (isNullOrUndefined2(item)) {
        return null;
      }
      if (isNullOrUndefined2(level)) {
        level = 0;
      }
      var fields = this.getFields(level);
      return {
        text: item[fields.text],
        id: item[fields.id],
        items: item[fields.child],
        separator: item[fields.separator],
        iconCss: item[fields.iconCss],
        url: item[fields.url]
      };
    };
    MenuBase2.prototype.getPopups = function() {
      var _this = this;
      var popups = [];
      [].slice.call(document.querySelectorAll("." + POPUP)).forEach(function(elem) {
        if (!isNullOrUndefined2(elem.querySelector("." + ITEM)) && _this.getIndex(elem.querySelector("." + ITEM).id, true).length) {
          popups.push(elem);
        }
      });
      return popups;
    };
    MenuBase2.prototype.isMenuVisible = function() {
      return this.navIdx.length > 0 || this.element.classList.contains("e-contextmenu") && isVisible2(this.element).valueOf();
    };
    MenuBase2.prototype.canOpen = function(target) {
      var canOpen = true;
      if (this.filter) {
        canOpen = false;
        var filter = this.filter.split(" ");
        for (var i = 0, len = filter.length; i < len; i++) {
          if (closest2(target, "." + filter[i])) {
            canOpen = true;
            break;
          }
        }
      }
      return canOpen;
    };
    MenuBase2.prototype.openMenu = function(li, item, top, left, e, target) {
      var _this = this;
      if (top === void 0) {
        top = 0;
      }
      if (left === void 0) {
        left = 0;
      }
      if (e === void 0) {
        e = null;
      }
      if (target === void 0) {
        target = this.targetElement;
      }
      var wrapper = this.getWrapper();
      this.lItem = li;
      var elemId = this.element.id !== "" ? this.element.id : "menu";
      this.isMenusClosed = false;
      if (isNullOrUndefined2(top)) {
        top = -1;
      }
      if (isNullOrUndefined2(left)) {
        left = -1;
      }
      if (li) {
        this.uList = this.createItems(item[this.getField("children", this.navIdx.length - 1)]);
        if (!this.isMenu && Browser2.isDevice) {
          wrapper.lastChild.style.display = "none";
          var data = {
            text: item[this.getField("text")].toString(),
            iconCss: ICONS + " e-previous"
          };
          if (this.template) {
            item.iconCss = (item.iconCss || "") + ICONS + " e-previous";
          }
          var hdata = new MenuItem(this.items[0], "items", this.template ? item : data, true);
          var hli = this.createItems([hdata]).children[0];
          hli.classList.add(HEADER);
          this.uList.insertBefore(hli, this.uList.children[0]);
        }
        if (this.isMenu) {
          this.popupWrapper = this.createElement("div", {
            className: "e-" + this.getModuleName() + "-wrapper " + POPUP,
            id: li.id + "-ej2menu-" + elemId + "-popup"
          });
          if (this.hamburgerMode) {
            top = li.offsetHeight;
            li.appendChild(this.popupWrapper);
          } else {
            document.body.appendChild(this.popupWrapper);
          }
          this.isNestedOrVertical = this.element.classList.contains("e-vertical") || this.navIdx.length !== 1;
          this.popupObj = this.generatePopup(this.popupWrapper, this.uList, li, this.isNestedOrVertical);
          if (this.template) {
            this.renderReactTemplates();
          }
          if (this.hamburgerMode) {
            this.calculateIndentSize(this.uList, li);
          } else {
            if (this.cssClass) {
              addClass2([this.popupWrapper], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            this.popupObj.hide();
          }
          if (!this.hamburgerMode && !this.showItemOnClick && this.hoverDelay) {
            window.clearInterval(this.timer);
            this.timer = window.setTimeout(function() {
              _this.triggerBeforeOpen(li, _this.uList, item, e, 0, 0, "menu");
            }, this.hoverDelay);
          } else {
            this.triggerBeforeOpen(li, this.uList, item, e, 0, 0, "menu");
          }
        } else {
          this.uList.style.zIndex = this.element.style.zIndex;
          wrapper.appendChild(this.uList);
          if (!this.showItemOnClick && this.hoverDelay) {
            window.clearInterval(this.timer);
            this.timer = window.setTimeout(function() {
              _this.triggerBeforeOpen(li, _this.uList, item, e, top, left, "none");
            }, this.hoverDelay);
          } else {
            this.triggerBeforeOpen(li, this.uList, item, e, top, left, "none");
          }
        }
      } else {
        this.uList = this.element;
        this.uList.style.zIndex = getZindexPartial(target ? target : this.element).toString();
        if (isNullOrUndefined2(e)) {
          var ev = document.createEvent("MouseEvents");
          ev.initEvent("click", true, false);
          var targetEvent = this.copyObject(ev, {});
          targetEvent.target = targetEvent.srcElement = target;
          targetEvent.currentTarget = target;
          this.triggerBeforeOpen(li, this.uList, item, targetEvent, top, left, "none");
        } else {
          this.triggerBeforeOpen(li, this.uList, item, e, top, left, "none");
        }
      }
    };
    MenuBase2.prototype.copyObject = function(source, destination) {
      for (var prop in source) {
        destination["" + prop] = source["" + prop];
      }
      return destination;
    };
    MenuBase2.prototype.calculateIndentSize = function(ul, li) {
      var liStyle = getComputedStyle(li);
      var liIndent = parseInt(liStyle.textIndent, 10);
      if (this.navIdx.length < 2 && !li.classList.contains("e-blankicon")) {
        liIndent *= 2;
      } else {
        liIndent += liIndent / 4;
      }
      ul.style.textIndent = liIndent + "px";
      var blankIconElem = ul.querySelectorAll(".e-blankicon");
      if (blankIconElem && blankIconElem.length) {
        var menuIconElem = ul.querySelector(".e-menu-icon");
        var menuIconElemStyle = getComputedStyle(menuIconElem);
        var blankIconIndent = parseInt(menuIconElemStyle.marginRight, 10) + menuIconElem.offsetWidth + liIndent;
        for (var i = 0; i < blankIconElem.length; i++) {
          blankIconElem[i].style.textIndent = blankIconIndent + "px";
        }
      }
    };
    MenuBase2.prototype.generatePopup = function(popupWrapper, ul, li, isNestedOrVertical) {
      var _this = this;
      var popupObj = new Popup(popupWrapper, {
        actionOnScroll: this.hamburgerMode ? "none" : "reposition",
        relateTo: li,
        collision: this.hamburgerMode ? {
          X: "none",
          Y: "none"
        } : {
          X: isNestedOrVertical || this.enableRtl ? "none" : "flip",
          Y: "fit"
        },
        position: isNestedOrVertical && !this.hamburgerMode ? {
          X: "right",
          Y: "top"
        } : {
          X: "left",
          Y: "bottom"
        },
        targetType: "relative",
        enableRtl: this.enableRtl,
        content: ul,
        open: function() {
          var scrollEle = select2(".e-menu-vscroll", popupObj.element);
          if (scrollEle) {
            scrollEle.style.height = "inherit";
            scrollEle.style.maxHeight = "";
          }
          var ul2 = select2(".e-ul", popupObj.element);
          popupObj.element.style.maxHeight = "";
          ul2.focus();
          _this.triggerOpen(ul2);
        }
      });
      return popupObj;
    };
    MenuBase2.prototype.createHeaderContainer = function(wrapper) {
      wrapper = wrapper || this.getWrapper();
      var spanElem = this.createElement("span", {
        className: "e-" + this.getModuleName() + "-header"
      });
      var tempTitle = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(this.title) : this.title;
      var spanTitle = this.createElement("span", {
        className: "e-" + this.getModuleName() + "-title",
        innerHTML: tempTitle
      });
      var spanIcon = this.createElement("span", {
        className: "e-icons e-" + this.getModuleName() + "-icon",
        attrs: {
          "tabindex": "0"
        }
      });
      spanElem.appendChild(spanTitle);
      spanElem.appendChild(spanIcon);
      wrapper.insertBefore(spanElem, this.element);
    };
    MenuBase2.prototype.openHamburgerMenu = function(e) {
      if (this.hamburgerMode) {
        this.triggerBeforeOpen(null, this.element, null, e, 0, 0, "hamburger");
      }
    };
    MenuBase2.prototype.closeHamburgerMenu = function(e) {
      var _this = this;
      var beforeCloseArgs = {
        element: this.element,
        parentItem: null,
        event: e,
        items: this.items,
        cancel: false
      };
      this.trigger("beforeClose", beforeCloseArgs, function(observedHamburgerCloseArgs) {
        if (!observedHamburgerCloseArgs.cancel) {
          _this.closeMenu(null, e);
          _this.element.classList.add("e-hide-menu");
          _this.trigger("onClose", {
            element: _this.element,
            parentItem: null,
            items: _this.items
          });
        }
      });
    };
    MenuBase2.prototype.callFit = function(element2, x, y, top, left) {
      return fit(element2, null, {
        X: x,
        Y: y
      }, {
        top,
        left
      });
    };
    MenuBase2.prototype.triggerBeforeOpen = function(li, ul, item, e, top, left, type) {
      var _this = this;
      var items = li ? item[this.getField("children", this.navIdx.length - 1)] : this.items;
      var eventArgs = {
        element: ul,
        items,
        parentItem: item,
        event: e,
        cancel: false,
        top,
        left,
        showSubMenuOn: "Auto"
      };
      var menuType = type;
      var observedElement;
      this.trigger("beforeOpen", eventArgs, function(observedOpenArgs) {
        switch (menuType) {
          case "menu":
            if (!_this.hamburgerMode) {
              if (observedOpenArgs.showSubMenuOn !== "Auto") {
                _this.showItemOnClick = !_this.defaultOption;
                _this.showSubMenuOn = observedOpenArgs.showSubMenuOn;
              }
              _this.top = observedOpenArgs.top;
              _this.left = observedOpenArgs.left;
            }
            _this.popupWrapper.style.display = "block";
            if (!_this.hamburgerMode) {
              _this.popupWrapper.style.maxHeight = _this.popupWrapper.getBoundingClientRect().height + "px";
              if (_this.enableScrolling) {
                addScrolling(_this.createElement, _this.popupWrapper, _this.uList, "vscroll", _this.enableRtl);
              }
              _this.checkScrollOffset(e);
            }
            if (!_this.hamburgerMode && !_this.left && !_this.top) {
              _this.popupObj.refreshPosition(_this.lItem, true);
              _this.left = parseInt(_this.popupWrapper.style.left, 10);
              _this.top = parseInt(_this.popupWrapper.style.top, 10);
              if (_this.enableRtl) {
                _this.left = _this.isNestedOrVertical ? _this.left - _this.popupWrapper.offsetWidth - _this.lItem.parentElement.offsetWidth + 2 : _this.left - _this.popupWrapper.offsetWidth + _this.lItem.offsetWidth;
              }
              if (_this.template && (_this.isReact || _this.isAngular)) {
                requestAnimationFrame(function() {
                  _this.collision();
                  _this.popupWrapper.style.display = "";
                });
              } else {
                _this.collision();
                _this.popupWrapper.style.display = "";
              }
            } else {
              _this.popupObj.collision = {
                X: "none",
                Y: "none"
              };
              _this.popupWrapper.style.display = "";
            }
            break;
          case "none":
            _this.top = observedOpenArgs.top;
            _this.left = observedOpenArgs.left;
            _this.isContextMenuClosed = true;
            observedElement = observedOpenArgs.element;
            if (_this.enableScrolling && _this.isCMenu && observedElement && observedElement.parentElement) {
              observedElement.style.height = observedElement.parentElement.style.height;
            }
            break;
          case "hamburger":
            if (!observedOpenArgs.cancel) {
              _this.element.classList.remove("e-hide-menu");
              _this.triggerOpen(_this.element);
            }
            break;
        }
        if (menuType !== "hamburger") {
          if (observedOpenArgs.cancel) {
            if (_this.isMenu) {
              _this.popupObj.destroy();
              detach2(_this.popupWrapper);
            } else if (ul.className.indexOf("e-ul") > -1) {
              detach2(ul);
            }
            _this.navIdx.pop();
          } else {
            if (_this.isMenu) {
              if (_this.hamburgerMode) {
                _this.popupWrapper.style.top = _this.top + "px";
                _this.popupWrapper.style.left = "0px";
                _this.toggleAnimation(_this.popupWrapper);
              } else {
                _this.setBlankIconStyle(_this.popupWrapper);
                _this.wireKeyboardEvent(_this.popupWrapper);
                rippleEffect(_this.popupWrapper, {
                  selector: "." + ITEM
                });
                _this.popupWrapper.style.left = _this.left + "px";
                _this.popupWrapper.style.top = _this.top + "px";
                var animationOptions = _this.animationSettings.effect !== "None" ? {
                  name: _this.animationSettings.effect,
                  duration: _this.animationSettings.duration,
                  timingFunction: _this.animationSettings.easing
                } : null;
                _this.popupObj.show(animationOptions, _this.lItem);
                if (Browser2.isDevice) {
                  _this.popupWrapper.style.left = _this.left + "px";
                }
              }
            } else {
              _this.setBlankIconStyle(_this.uList);
              _this.setPosition(_this.lItem, _this.uList, _this.top, _this.left);
              _this.toggleAnimation(_this.uList);
            }
          }
        }
        if (_this.keyType === "right") {
          var cul = _this.getUlByNavIdx();
          li.classList.remove(FOCUSED);
          if (_this.isMenu && _this.navIdx.length === 1) {
            _this.removeLIStateByClass([SELECTED2], [_this.getWrapper()]);
          }
          li.classList.add(SELECTED2);
          if (_this.action === ENTER) {
            var eventArgs_1 = {
              element: li,
              item,
              event: e
            };
            _this.trigger("select", eventArgs_1);
          }
          li.focus();
          cul = _this.getUlByNavIdx();
          var index = _this.isValidLI(cul.children[0], 0, _this.action);
          cul.children[index].classList.add(FOCUSED);
          cul.children[index].focus();
        }
      });
    };
    MenuBase2.prototype.collision = function() {
      var collide;
      collide = isCollide(this.popupWrapper, null, this.left, this.top);
      if ((this.isNestedOrVertical || this.enableRtl) && (collide.indexOf("right") > -1 || collide.indexOf("left") > -1)) {
        this.popupObj.collision.X = "none";
        var offWidth = closest2(this.lItem, ".e-" + this.getModuleName() + "-wrapper").offsetWidth;
        this.left = this.enableRtl ? calculatePosition(this.lItem, this.isNestedOrVertical ? "right" : "left", "top").left : this.left - this.popupWrapper.offsetWidth - offWidth + 2;
      }
      collide = isCollide(this.popupWrapper, null, this.left, this.top);
      if (collide.indexOf("left") > -1 || collide.indexOf("right") > -1) {
        this.left = this.callFit(this.popupWrapper, true, false, this.top, this.left).left;
      }
      this.popupWrapper.style.left = this.left + "px";
    };
    MenuBase2.prototype.setBlankIconStyle = function(menu) {
      var blankIconList = [].slice.call(menu.getElementsByClassName("e-blankicon"));
      if (!blankIconList.length) {
        return;
      }
      var iconLi = menu.querySelector(".e-menu-item:not(.e-blankicon):not(.e-separator)");
      if (!iconLi) {
        return;
      }
      var icon = iconLi.querySelector(".e-menu-icon");
      if (!icon) {
        return;
      }
      var cssProp = this.enableRtl ? {
        padding: "paddingRight",
        margin: "marginLeft"
      } : {
        padding: "paddingLeft",
        margin: "marginRight"
      };
      var iconCssProps = getComputedStyle(icon);
      var iconSize = parseInt(iconCssProps.fontSize, 10);
      if (!!parseInt(iconCssProps.width, 10) && parseInt(iconCssProps.width, 10) > iconSize) {
        iconSize = parseInt(iconCssProps.width, 10);
      }
      var size = iconSize + parseInt(
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        iconCssProps[cssProp.margin],
        10
      ) + parseInt(getComputedStyle(iconLi)[cssProp.padding], 10) + "px";
      blankIconList.forEach(function(li) {
        li.style[cssProp.padding] = size;
      });
    };
    MenuBase2.prototype.checkScrollOffset = function(e) {
      var wrapper = this.getWrapper();
      if (wrapper.children[0].classList.contains("e-menu-hscroll") && this.navIdx.length === 1) {
        var trgt = isNullOrUndefined2(e) ? this.element : closest2(e.target, "." + ITEM);
        var offsetEle = select2(".e-hscroll-bar", wrapper);
        if (offsetEle.scrollLeft > trgt.offsetLeft) {
          offsetEle.scrollLeft -= offsetEle.scrollLeft - trgt.offsetLeft;
        }
        var offsetLeft = offsetEle.scrollLeft + offsetEle.offsetWidth;
        var offsetRight = trgt.offsetLeft + trgt.offsetWidth;
        if (offsetLeft < offsetRight) {
          offsetEle.scrollLeft += offsetRight - offsetLeft;
        }
      }
    };
    MenuBase2.prototype.setPosition = function(li, ul, top, left) {
      var px = "px";
      this.toggleVisiblity(ul);
      if (ul === this.element || left > -1 && top > -1) {
        var collide = isCollide(ul, null, left, top);
        if (collide.indexOf("right") > -1) {
          left = left - ul.offsetWidth;
        }
        if (collide.indexOf("bottom") > -1) {
          var offset = this.callFit(ul, false, true, top, left);
          top = offset.top - 20;
          if (top < 0) {
            var newTop = pageYOffset + document.documentElement.clientHeight - ul.getBoundingClientRect().height;
            if (newTop > -1) {
              top = newTop;
            }
          }
        }
        collide = isCollide(ul, null, left, top);
        if (collide.indexOf("left") > -1) {
          var offset = this.callFit(ul, true, false, top, left);
          left = offset.left;
        }
      } else {
        if (Browser2.isDevice) {
          top = Number(this.element.style.top.replace(px, ""));
          left = Number(this.element.style.left.replace(px, ""));
        } else {
          var x = this.enableRtl ? "left" : "right";
          var offset = calculatePosition(li, x, "top");
          top = offset.top;
          left = offset.left;
          var collide = isCollide(ul, null, this.enableRtl ? left - ul.offsetWidth : left, top);
          var xCollision = collide.indexOf("left") > -1 || collide.indexOf("right") > -1;
          if (xCollision) {
            offset = calculatePosition(li, this.enableRtl ? "right" : "left", "top");
            left = offset.left;
          }
          if (this.enableRtl || xCollision) {
            left = this.enableRtl && xCollision ? left : left - ul.offsetWidth;
          }
          if (collide.indexOf("bottom") > -1) {
            offset = this.callFit(ul, false, true, top, left);
            top = offset.top;
          }
        }
      }
      this.toggleVisiblity(ul, false);
      if (this.isCMenu && this.enableScrolling && ul) {
        ul.style.height = "";
      }
      var wrapper = closest2(this.element, ".e-" + this.getModuleName() + "-wrapper");
      if (!this.isMenu && this.enableScrolling && ul && wrapper && wrapper.offsetHeight > 0) {
        var menuVScroll = closest2(ul, ".e-menu-vscroll");
        ul.style.display = "block";
        if (menuVScroll) {
          destroyScroll(getInstance(menuVScroll, VScroll), menuVScroll);
        }
        var cmenuWidth = Math.ceil(this.getMenuWidth(ul, ul.offsetWidth, this.enableRtl));
        var cmenu = addScrolling(this.createElement, wrapper, ul, "vscroll", this.enableRtl, wrapper.offsetHeight);
        Object.assign(cmenu.style, {
          top: top + "px",
          left: left + "px",
          width: cmenuWidth + "px",
          position: "absolute",
          display: "none"
        });
      } else {
        ul.style.top = top + px;
        ul.style.left = left + px;
      }
    };
    MenuBase2.prototype.getMenuWidth = function(cmenu, width, isRtl) {
      var caretIcon = cmenu.getElementsByClassName(CARET)[0];
      if (caretIcon) {
        width += parseInt(getComputedStyle(caretIcon)[isRtl ? "marginRight" : "marginLeft"], 10);
      }
      return width < 120 ? 120 : width;
    };
    MenuBase2.prototype.toggleVisiblity = function(ul, isVisible4) {
      if (isVisible4 === void 0) {
        isVisible4 = true;
      }
      ul.style.visibility = isVisible4 ? "hidden" : "";
      ul.style.display = isVisible4 ? "block" : "none";
    };
    MenuBase2.prototype.createItems = function(items) {
      var _this = this;
      var level = this.navIdx ? this.navIdx.length : 0;
      var fields = this.getFields(level);
      var showIcon = this.hasField(items, this.getField("iconCss", level));
      var listBaseOptions = {
        showIcon,
        moduleName: "menu",
        fields,
        template: this.template,
        itemNavigable: true,
        itemCreating: function(args) {
          if (!args.curData[args.fields[fields.id]]) {
            args.curData[args.fields[fields.id]] = getUniqueID("menuitem");
          }
          if (isNullOrUndefined2(args.curData.htmlAttributes)) {
            Object.defineProperty(args.curData, "htmlAttributes", {
              value: {},
              writable: true,
              enumerable: true,
              configurable: true
            });
          }
          if (Browser2.isIE) {
            if (!args.curData.htmlAttributes.role) {
              args.curData.htmlAttributes.role = "menuitem";
            }
            if (!args.curData.htmlAttributes.tabindex) {
              args.curData.htmlAttributes.tabindex = "-1";
            }
          } else {
            Object.assign(args.curData.htmlAttributes, {
              role: args.curData.htmlAttributes.role || "menuitem",
              tabindex: args.curData.htmlAttributes.tabindex || "-1"
            });
          }
          if (_this.isMenu && !args.curData[_this.getField("separator", level)]) {
            if (!args.curData.htmlAttributes["aria-label"]) {
              args.curData.htmlAttributes["aria-label"] = args.curData[args.fields.text] ? args.curData[args.fields.text] : args.curData[args.fields.id];
            }
          }
          if (args.curData[args.fields[fields.iconCss]] === "") {
            args.curData[args.fields[fields.iconCss]] = null;
          }
        },
        itemCreated: function(args) {
          if (args.curData[_this.getField("separator", level)]) {
            args.item.classList.add(SEPARATOR);
            if (!args.curData.htmlAttributes.role) {
              args.item.setAttribute("role", "separator");
            }
          }
          if (showIcon && !args.curData[args.fields.iconCss] && !args.curData[_this.getField("separator", level)]) {
            args.item.classList.add("e-blankicon");
          }
          if (args.curData[args.fields.child] && args.curData[args.fields.child].length) {
            var span = _this.createElement("span", {
              className: ICONS + " " + CARET
            });
            args.item.appendChild(span);
            args.item.setAttribute("aria-haspopup", "true");
            args.item.setAttribute("aria-expanded", "false");
            args.item.classList.add("e-menu-caret-icon");
          }
          if (_this.isMenu && _this.template) {
            args.item.setAttribute("id", args.curData[args.fields.id].toString());
            args.item.removeAttribute("data-uid");
            if (args.item.classList.contains("e-level-1")) {
              args.item.classList.remove("e-level-1");
            }
            if (args.item.classList.contains("e-has-child")) {
              args.item.classList.remove("e-has-child");
            }
            args.item.removeAttribute("aria-level");
          }
          var eventArgs = {
            item: args.curData,
            element: args.item
          };
          _this.trigger("beforeItemRender", eventArgs);
        }
      };
      this.setProperties({
        "items": this.items
      }, true);
      if (this.isMenu) {
        listBaseOptions.templateID = this.element.id + TEMPLATE_PROPERTY;
      }
      var ul = ListBase.createList(this.createElement, items, listBaseOptions, !this.template, this);
      ul.setAttribute("tabindex", "0");
      if (this.isMenu) {
        ul.setAttribute("role", "menu");
      } else {
        ul.setAttribute("role", "menubar");
      }
      return ul;
    };
    MenuBase2.prototype.moverHandler = function(e) {
      var trgt = e.target;
      this.liTrgt = trgt;
      if (!this.isMenu) {
        this.isCmenuHover = true;
      }
      var cli = this.getLI(trgt);
      var wrapper = cli ? closest2(cli, ".e-" + this.getModuleName() + "-wrapper") : this.getWrapper();
      var hdrWrapper = this.getWrapper();
      var regex2 = new RegExp("-ej2menu-(.*)-popup");
      var ulId;
      var isDifferentElem = false;
      if (!wrapper) {
        return;
      }
      if (wrapper.id !== "") {
        ulId = regex2.exec(wrapper.id)[1];
      } else {
        ulId = wrapper.querySelector("ul").id;
      }
      if (ulId !== this.element.id) {
        this.removeLIStateByClass([FOCUSED, SELECTED2], [this.getWrapper()]);
        if (this.navIdx.length) {
          isDifferentElem = true;
        } else {
          return;
        }
      }
      if (cli && closest2(cli, ".e-" + this.getModuleName() + "-wrapper") && !isDifferentElem) {
        this.removeLIStateByClass([FOCUSED], this.isMenu ? [wrapper].concat(this.getPopups()) : [wrapper]);
        this.removeLIStateByClass([FOCUSED], this.isMenu ? [hdrWrapper].concat(this.getPopups()) : [hdrWrapper]);
        cli.classList.add(FOCUSED);
        if (!this.showItemOnClick) {
          this.clickHandler(e);
        }
      } else if (this.isMenu && this.showItemOnClick && !isDifferentElem) {
        this.removeLIStateByClass([FOCUSED], [wrapper].concat(this.getPopups()));
      }
      if (this.isMenu) {
        if (!this.showItemOnClick && trgt.parentElement !== wrapper && !closest2(trgt, ".e-" + this.getModuleName() + "-popup") && (!cli || cli && !this.getIndex(cli.id, true).length) && this.showSubMenuOn !== "Hover") {
          this.removeLIStateByClass([FOCUSED], [wrapper]);
          if (this.navIdx.length) {
            this.isClosed = true;
            this.closeMenu(null, e);
          }
        } else if (isDifferentElem && !this.showItemOnClick) {
          if (this.navIdx.length) {
            this.isClosed = true;
            this.closeMenu(null, e);
          }
        }
        if (!this.isClosed) {
          this.removeStateWrapper();
        }
        this.isClosed = false;
      }
      if (!this.isMenu) {
        this.isCmenuHover = false;
      }
    };
    MenuBase2.prototype.removeStateWrapper = function() {
      if (this.liTrgt) {
        var wrapper = closest2(this.liTrgt, ".e-menu-vscroll");
        if (this.liTrgt.tagName === "DIV" && wrapper) {
          this.removeLIStateByClass([FOCUSED, SELECTED2], [wrapper]);
        }
      }
    };
    MenuBase2.prototype.removeLIStateByClass = function(classList2, element2) {
      var li;
      var _loop_1 = function(i2) {
        classList2.forEach(function(className) {
          li = select2("." + className, element2[i2]);
          if (li) {
            li.classList.remove(className);
          }
        });
      };
      for (var i = 0; i < element2.length; i++) {
        _loop_1(i);
      }
    };
    MenuBase2.prototype.getField = function(propName, level) {
      if (level === void 0) {
        level = 0;
      }
      var fieldName = this.fields["" + propName];
      return typeof fieldName === "string" ? fieldName : !fieldName[level] ? fieldName[fieldName.length - 1].toString() : fieldName[level].toString();
    };
    MenuBase2.prototype.getFields = function(level) {
      if (level === void 0) {
        level = 0;
      }
      return {
        id: this.getField("itemId", level),
        iconCss: this.getField("iconCss", level),
        text: this.getField("text", level),
        url: this.getField("url", level),
        child: this.getField("children", level),
        separator: this.getField("separator", level)
      };
    };
    MenuBase2.prototype.hasField = function(items, field) {
      for (var i = 0, len = items.length; i < len; i++) {
        if (items[i]["" + field]) {
          return true;
        }
      }
      return false;
    };
    MenuBase2.prototype.menuHeaderClickHandler = function(e) {
      var menuWrapper = closest2(e.target, ".e-menu-wrapper");
      if (menuWrapper && menuWrapper.querySelector("ul.e-menu-parent").id !== this.element.id) {
        return;
      }
      if (this.element.className.indexOf("e-hide-menu") > -1) {
        this.openHamburgerMenu(e);
      } else {
        this.closeHamburgerMenu(e);
      }
    };
    MenuBase2.prototype.clickHandler = function(e) {
      this.isTapHold = this.isTapHold ? false : this.isTapHold;
      var wrapper = this.getWrapper();
      var trgt = e.target;
      var cli = this.cli = this.getLI(trgt);
      var regex2 = new RegExp("-ej2menu-(.*)-popup");
      var cliWrapper = cli ? closest2(cli, ".e-" + this.getModuleName() + "-wrapper") : null;
      var isInstLI = cli && cliWrapper && (this.isMenu ? this.getIndex(cli.id, true).length > 0 : wrapper.firstElementChild.id === cliWrapper.firstElementChild.id);
      if (Browser2.isDevice && this.isMenu) {
        this.removeLIStateByClass([FOCUSED], [wrapper].concat(this.getPopups()));
        this.mouseDownHandler(e);
      }
      if (cli && cliWrapper && this.isMenu) {
        var cliWrapperId = cliWrapper.id ? regex2.exec(cliWrapper.id)[1] : cliWrapper.querySelector(".e-menu-parent").id;
        if (this.element.id !== cliWrapperId) {
          return;
        }
      }
      if (isInstLI && e.type === "click" && !cli.classList.contains(HEADER)) {
        this.setLISelected(cli);
        var navIdx = this.getIndex(cli.id, true);
        var item = this.getItem(navIdx);
        var eventArgs = {
          element: cli,
          item,
          event: e
        };
        this.trigger("select", eventArgs);
      }
      if (isInstLI && (e.type === "mouseover" || Browser2.isDevice || this.showItemOnClick)) {
        var ul = void 0;
        if (cli.classList.contains(HEADER)) {
          ul = wrapper.children[this.navIdx.length - 1];
          this.toggleAnimation(ul);
          var sli = this.getLIByClass(ul, SELECTED2);
          if (sli) {
            sli.classList.remove(SELECTED2);
          }
          detach2(cli.parentNode);
          this.navIdx.pop();
        } else {
          if (!cli.classList.contains(SEPARATOR)) {
            this.showSubMenu = true;
            var cul = cli.parentNode;
            if (isNullOrUndefined2(cul)) {
              return;
            }
            this.cliIdx = this.getIdx(cul, cli);
            if (this.isMenu || !Browser2.isDevice) {
              var culIdx = this.isMenu ? Array.prototype.indexOf.call([wrapper].concat(this.getPopups()), closest2(cul, ".e-" + this.getModuleName() + "-wrapper")) : this.getIdx(wrapper, cul);
              if (this.navIdx[culIdx] === this.cliIdx) {
                this.showSubMenu = false;
              }
              if (culIdx !== this.navIdx.length && (e.type !== "mouseover" || this.showSubMenu)) {
                var sli = this.getLIByClass(cul, SELECTED2);
                if (sli) {
                  sli.classList.remove(SELECTED2);
                }
                this.isClosed = true;
                this.keyType = "click";
                if (this.showItemOnClick) {
                  this.setLISelected(cli);
                  if (!this.isMenu) {
                    this.isCmenuHover = true;
                  }
                }
                this.closeMenu(culIdx + 1, e);
                if (this.showItemOnClick) {
                  this.setLISelected(cli);
                  if (!this.isMenu) {
                    this.isCmenuHover = false;
                  }
                }
              }
            }
            if (!this.isClosed) {
              this.afterCloseMenu(e);
            }
            this.isClosed = false;
          }
        }
      } else {
        if (trgt.tagName === "DIV" && closest2(trgt, ".e-menu-vscroll") && (this.navIdx.length || !this.isMenu && this.enableScrolling && this.navIdx.length === 0)) {
          var popupEle = this.isMenu ? closest2(trgt, "." + POPUP) : closest2(trgt, ".e-menu-vscroll");
          var cIdx = this.isMenu ? Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1 : this.getIdx(wrapper, select2("ul.e-menu-parent", popupEle));
          if (cIdx < this.navIdx.length) {
            this.closeMenu(cIdx + 1, e);
            if (popupEle) {
              this.removeLIStateByClass([FOCUSED, SELECTED2], [popupEle]);
            }
          }
        } else if (this.isMenu && this.hamburgerMode && trgt.tagName === "SPAN" && trgt.classList.contains("e-menu-icon")) {
          this.menuHeaderClickHandler(e);
        } else {
          if (trgt.tagName !== "UL" || (this.isMenu ? trgt.parentElement.classList.contains("e-menu-wrapper") && !this.getIndex(trgt.querySelector("." + ITEM).id, true).length : trgt.parentElement !== wrapper)) {
            if (!cli) {
              this.removeLIStateByClass([SELECTED2], [wrapper]);
            }
            if (!this.isAnimationNone && !cli || cli && !cli.querySelector("." + CARET)) {
              if (navigator.platform.toUpperCase().indexOf("MAC") < 0 || navigator.platform.toUpperCase().indexOf("MAC") >= 0 && !e.ctrlKey) {
                this.closeMenu(null, e);
              }
            }
          }
        }
      }
    };
    MenuBase2.prototype.afterCloseMenu = function(e) {
      if (isNullOrUndefined2(e)) {
        return;
      }
      var isHeader;
      if (this.showSubMenu) {
        if (this.showItemOnClick && this.navIdx.length === 0) {
          isHeader = closest2(e.target, ".e-menu-parent.e-control");
        } else {
          isHeader = closest2(this.element, ".e-menu-parent.e-control");
        }
        var idx = this.navIdx.concat(this.cliIdx);
        var item = this.getItem(idx);
        if (item && item[this.getField("children", idx.length - 1)] && item[this.getField("children", idx.length - 1)].length) {
          if (e.type === "mouseover" || Browser2.isDevice && this.isMenu) {
            this.setLISelected(this.cli);
          }
          if (!this.hamburgerMode && isHeader || this.hamburgerMode && this.cli.getAttribute("aria-expanded") === "false") {
            this.cli.setAttribute("aria-expanded", "true");
            this.navIdx.push(this.cliIdx);
            this.openMenu(this.cli, item, null, null, e);
          }
        } else {
          if (e.type !== "mouseover") {
            this.closeMenu(null, e);
          }
        }
        if (!isHeader) {
          var cul = this.getUlByNavIdx();
          var sli = this.getLIByClass(cul, SELECTED2);
          if (sli) {
            sli.setAttribute("aria-expanded", "false");
            sli.classList.remove(SELECTED2);
          }
        }
      }
      this.keyType = "";
    };
    MenuBase2.prototype.setLISelected = function(li) {
      var sli = this.getLIByClass(li.parentElement, SELECTED2);
      if (sli) {
        sli.classList.remove(SELECTED2);
      }
      if (!this.isMenu) {
        li.classList.remove(FOCUSED);
      }
      li.classList.add(SELECTED2);
    };
    MenuBase2.prototype.getLIByClass = function(ul, classname) {
      if (ul && ul.children) {
        for (var i = 0, len = ul.children.length; i < len; i++) {
          if (ul.children[i].classList.contains(classname)) {
            return ul.children[i];
          }
        }
      }
      return null;
    };
    MenuBase2.prototype.getItemIndex = function(item, isUniqueId) {
      var idx;
      if (typeof item === "string") {
        idx = item;
      } else {
        idx = item.id;
      }
      var isText = isUniqueId === false ? false : true;
      var navIdx = this.getIndex(idx, isText);
      return navIdx;
    };
    MenuBase2.prototype.setItem = function(item, id, isUniqueId) {
      var idx;
      if (isUniqueId) {
        idx = id ? id : item.id;
      } else {
        idx = id ? id : item.text;
      }
      var navIdx = this.getIndex(idx, isUniqueId);
      var newItem = this.getItem(navIdx);
      Object.assign(newItem, item);
    };
    MenuBase2.prototype.getItem = function(navIdx) {
      navIdx = navIdx.slice();
      var idx = navIdx.pop();
      var items = this.getItems(navIdx);
      return items[idx];
    };
    MenuBase2.prototype.getItems = function(navIdx) {
      var items = this.items;
      for (var i = 0; i < navIdx.length; i++) {
        items = items[navIdx[i]][this.getField("children", i)];
      }
      return items;
    };
    MenuBase2.prototype.setItems = function(newItems, navIdx) {
      var items = this.getItems(navIdx);
      items.splice(0, items.length);
      for (var i = 0; i < newItems.length; i++) {
        items.splice(i, 0, newItems[i]);
      }
    };
    MenuBase2.prototype.getIdx = function(ul, li, skipHdr) {
      if (skipHdr === void 0) {
        skipHdr = true;
      }
      var ulElem = !this.isMenu && this.enableScrolling && select2(".e-menu-vscroll", ul) ? selectAll2(".e-menu-parent", ul) : Array.from(ul.children);
      var idx = Array.prototype.indexOf.call(ulElem, li);
      if (skipHdr && ul.children[0].classList.contains(HEADER)) {
        idx--;
      }
      return idx;
    };
    MenuBase2.prototype.getLI = function(elem) {
      if (elem.tagName === "LI" && elem.classList.contains("e-menu-item")) {
        return elem;
      }
      return closest2(elem, "li.e-menu-item");
    };
    MenuBase2.prototype.updateItemsByNavIdx = function() {
      var items = this.items;
      var count = 0;
      for (var index = 0; index < this.navIdx.length; index++) {
        items = items[index].items;
        if (!items) {
          break;
        }
        count++;
        var ul = this.getUlByNavIdx(count);
        if (!ul) {
          break;
        }
        this.updateItem(ul, items);
      }
    };
    MenuBase2.prototype.removeChildElement = function(elem) {
      while (elem.firstElementChild) {
        elem.removeChild(elem.firstElementChild);
      }
      return elem;
    };
    MenuBase2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var _this = this;
      var wrapper = this.getWrapper();
      var _loop_2 = function(prop2) {
        switch (prop2) {
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([wrapper], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([wrapper], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (this_1.enableRtl) {
              wrapper.classList.add(RTL16);
            } else {
              wrapper.classList.remove(RTL16);
            }
            break;
          case "showItemOnClick":
            this_1.unWireEvents();
            this_1.showItemOnClick = newProp.showItemOnClick;
            this_1.wireEvents();
            break;
          case "enableScrolling":
            if (newProp.enableScrolling) {
              var ul_2;
              if (this_1.element.classList.contains("e-vertical")) {
                addScrolling(this_1.createElement, wrapper, this_1.element, "vscroll", this_1.enableRtl);
              } else {
                addScrolling(this_1.createElement, wrapper, this_1.element, "hscroll", this_1.enableRtl);
              }
              this_1.getPopups().forEach(function(wrapper2) {
                ul_2 = select2(".e-ul", wrapper2);
                addScrolling(_this.createElement, wrapper2, ul_2, "vscroll", _this.enableRtl);
              });
            } else {
              var ul_3 = wrapper.children[0];
              if (this_1.element.classList.contains("e-vertical") || !this_1.isMenu) {
                destroyScroll(getInstance(ul_3, VScroll), ul_3);
              } else {
                destroyScroll(getInstance(ul_3, HScroll), ul_3);
              }
              wrapper.style.overflow = "";
              wrapper.appendChild(this_1.element);
              this_1.getPopups().forEach(function(wrapper2) {
                ul_3 = wrapper2.children[0];
                destroyScroll(getInstance(ul_3, VScroll), ul_3);
                wrapper2.style.overflow = "";
              });
            }
            break;
          case "items": {
            var idx = void 0;
            var navIdx = void 0;
            var item = void 0;
            if (this_1.isReact && this_1.template) {
              this_1.clearTemplate(["template"]);
            }
            if (!Object.keys(oldProp.items).length) {
              this_1.updateItem(this_1.element, this_1.items);
              if (this_1.enableScrolling && this_1.element.parentElement.classList.contains("e-custom-scroll")) {
                if (this_1.element.classList.contains("e-vertical")) {
                  addScrolling(this_1.createElement, wrapper, this_1.element, "vscroll", this_1.enableRtl);
                } else {
                  addScrolling(this_1.createElement, wrapper, this_1.element, "hscroll", this_1.enableRtl);
                }
              }
              if (!this_1.hamburgerMode) {
                for (var i = 1, count = wrapper.childElementCount; i < count; i++) {
                  detach2(wrapper.lastElementChild);
                }
              }
              this_1.navIdx = [];
            } else {
              var keys4 = Object.keys(newProp.items);
              for (var i = 0; i < keys4.length; i++) {
                navIdx = this_1.getChangedItemIndex(newProp, [], Number(keys4[i]));
                if (navIdx.length <= this_1.getWrapper().children.length) {
                  idx = navIdx.pop();
                  item = this_1.getItems(navIdx);
                  this_1.insertAfter([item[idx]], item[idx].text);
                  this_1.removeItem(item, navIdx, idx);
                  this_1.setItems(item, navIdx);
                }
                navIdx.length = 0;
              }
            }
            break;
          }
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        _loop_2(prop);
      }
    };
    MenuBase2.prototype.updateItem = function(ul, items) {
      if (isBlazor2() && !this.isMenu) {
        ul = this.removeChildElement(ul);
      } else {
        if (this.enableScrolling) {
          var wrapper1 = this.getWrapper();
          var ul1 = wrapper1.children[0];
          if (this.element.classList.contains("e-vertical")) {
            destroyScroll(getInstance(ul1, VScroll), ul1);
          } else {
            destroyScroll(getInstance(ul1, HScroll), ul1);
          }
        }
        ul.innerHTML = "";
      }
      var lis = [].slice.call(this.createItems(items).children);
      lis.forEach(function(li) {
        ul.appendChild(li);
      });
    };
    MenuBase2.prototype.getChangedItemIndex = function(newProp, index, idx) {
      index.push(idx);
      var key = Object.keys(newProp.items[idx]).pop();
      if (key === "items") {
        var item = newProp.items[idx];
        var popStr = Object.keys(item.items).pop();
        if (popStr) {
          this.getChangedItemIndex(item, index, Number(popStr));
        }
      } else {
        if (key === "isParentArray" && index.length > 1) {
          index.pop();
        }
      }
      return index;
    };
    MenuBase2.prototype.removeItem = function(item, navIdx, idx) {
      item.splice(idx, 1);
      var uls = this.getWrapper().children;
      if (navIdx.length < uls.length) {
        detach2(uls[navIdx.length].children[idx]);
      }
    };
    MenuBase2.prototype.unWireEvents = function(targetSelctor) {
      if (targetSelctor === void 0) {
        targetSelctor = this.target;
      }
      var wrapper = this.getWrapper();
      if (targetSelctor) {
        var target = void 0;
        var touchModule = void 0;
        var targetElems = selectAll2(targetSelctor);
        for (var i = 0, len = targetElems.length; i < len; i++) {
          target = targetElems[i];
          if (this.isMenu) {
            EventHandler2.remove(target, "click", this.menuHeaderClickHandler);
          } else {
            if (Browser2.isIos) {
              touchModule = getInstance(target, Touch2);
              if (touchModule) {
                touchModule.destroy();
              }
            } else {
              EventHandler2.remove(target, "contextmenu", this.cmenuHandler);
            }
          }
        }
        if (!this.isMenu) {
          EventHandler2.remove(this.targetElement, "scroll", this.scrollHandler);
          for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
            var parent_2 = _a[_i];
            EventHandler2.remove(parent_2, "scroll", this.scrollHandler);
          }
        }
      }
      if (!Browser2.isDevice) {
        EventHandler2.remove(this.isMenu ? document : wrapper, "mouseover", this.delegateMoverHandler);
        EventHandler2.remove(document, "mousedown", this.delegateMouseDownHandler);
        EventHandler2.remove(document, "keydown", this.domKeyHandler);
        if (!this.isMenu && !this.target) {
          EventHandler2.remove(document, "scroll", this.scrollHandler);
        }
      }
      EventHandler2.remove(document, "click", this.delegateClickHandler);
      this.unWireKeyboardEvent(wrapper);
      this.rippleFn();
    };
    MenuBase2.prototype.unWireKeyboardEvent = function(element2) {
      var keyboardModule = getInstance(element2, KeyboardEvents2);
      if (keyboardModule) {
        keyboardModule.destroy();
      }
    };
    MenuBase2.prototype.toggleAnimation = function(ul, isMenuOpen) {
      var _this = this;
      if (isMenuOpen === void 0) {
        isMenuOpen = true;
      }
      var pUlHeight;
      var pElement;
      var animateElement = this.enableScrolling && !this.isMenu && closest2(ul, ".e-menu-vscroll") ? closest2(ul, ".e-menu-vscroll") : ul;
      if (this.animationSettings.effect === "None" || !isMenuOpen) {
        if (this.hamburgerMode && ul) {
          ul.style.top = "0px";
        }
        this.isAnimationNone = this.animationSettings.effect === "None";
        this.end(ul, isMenuOpen);
      } else {
        this.animation.animate(animateElement, {
          name: this.animationSettings.effect,
          duration: this.animationSettings.duration,
          timingFunction: this.animationSettings.easing,
          begin: function(options) {
            if (_this.hamburgerMode) {
              pElement = options.element.parentElement;
              options.element.style.position = "absolute";
              if (pElement) {
                pUlHeight = pElement.offsetHeight;
              }
              options.element.style.maxHeight = options.element.offsetHeight + "px";
              if (pElement) {
                pElement.style.maxHeight = "";
              }
            } else {
              options.element.style.display = "block";
              options.element.style.maxHeight = _this.isMenu ? options.element.getBoundingClientRect().height + "px" : options.element.scrollHeight + "px";
            }
          },
          progress: function(options) {
            if (_this.hamburgerMode && pElement) {
              pElement.style.minHeight = pUlHeight + options.element.offsetHeight + "px";
            }
          },
          end: function(options) {
            if (_this.hamburgerMode) {
              options.element.style.position = "";
              options.element.style.maxHeight = "";
              if (pElement) {
                pElement.style.minHeight = "";
              }
              options.element.style.top = "0px";
              options.element.children[0].focus();
              _this.triggerOpen(options.element.children[0]);
            } else {
              _this.end(options.element, isMenuOpen);
            }
          }
        });
      }
    };
    MenuBase2.prototype.triggerOpen = function(ul) {
      var item = this.navIdx.length ? this.getItem(this.navIdx) : null;
      var eventArgs = {
        element: ul,
        parentItem: item,
        items: item ? item.items : this.items
      };
      this.trigger("onOpen", eventArgs);
      if (!this.isMenu) {
        EventHandler2.add(ul, "keydown", this.keyHandler, this);
      }
    };
    MenuBase2.prototype.end = function(ul, isMenuOpen) {
      if (isMenuOpen && this.isContextMenuClosed) {
        if (this.isMenu || !Browser2.isDevice || !this.isMenu && this.isAnimationNone && Browser2.isDevice) {
          ul.style.display = "block";
        }
        ul.style.maxHeight = "";
        var scrollMenu = this.enableScrolling && !this.isMenu ? closest2(ul, ".e-menu-vscroll") : null;
        if (scrollMenu) {
          scrollMenu.style.display = "block";
        }
        this.triggerOpen(ul);
        if (ul.querySelector("." + FOCUSED)) {
          ul.querySelector("." + FOCUSED).focus();
        } else {
          var ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1];
          if (this.currentTarget) {
            if (!(this.currentTarget.classList.contains("e-numerictextbox") || this.currentTarget.classList.contains("e-textbox") || this.currentTarget.tagName === "INPUT")) {
              if (ele) {
                ele.querySelector("." + SELECTED2).focus();
              } else {
                this.element.focus();
              }
            }
          } else {
            if (ele) {
              ele.querySelector("." + SELECTED2).focus();
            } else {
              this.element.focus();
            }
          }
        }
      } else {
        var scrollMenu = this.enableScrolling && !this.isMenu ? closest2(ul, ".e-menu-vscroll") : null;
        if (scrollMenu) {
          destroyScroll(getInstance(scrollMenu, VScroll), scrollMenu);
        }
        if (ul === this.element) {
          var fli = this.getLIByClass(this.element, FOCUSED);
          if (fli) {
            fli.classList.remove(FOCUSED);
          }
          var sli = this.getLIByClass(this.element, SELECTED2);
          if (sli) {
            sli.classList.remove(SELECTED2);
          }
          ul.style.display = "none";
          this.isAnimationNone = false;
        } else {
          detach2(ul);
        }
      }
    };
    MenuBase2.prototype.getPersistData = function() {
      return "";
    };
    MenuBase2.prototype.getWrapper = function() {
      return closest2(this.element, ".e-" + this.getModuleName() + "-wrapper");
    };
    MenuBase2.prototype.getIndex = function(data, isUniqueId, items, nIndex, isCallBack, level) {
      if (items === void 0) {
        items = this.items;
      }
      if (nIndex === void 0) {
        nIndex = [];
      }
      if (isCallBack === void 0) {
        isCallBack = false;
      }
      if (level === void 0) {
        level = 0;
      }
      var item;
      level = isCallBack ? level + 1 : 0;
      for (var i = 0, len = items.length; i < len; i++) {
        item = items[i];
        var currentField = isUniqueId ? item[this.getField("itemId", level)] : item[this.getField("text", level)];
        var itemId = item.htmlAttributes && "id" in item.htmlAttributes ? item.htmlAttributes.id : currentField;
        if (itemId === data) {
          nIndex.push(i);
          break;
        } else if (item[this.getField("children", level)] && item[this.getField("children", level)].length) {
          nIndex = this.getIndex(data, isUniqueId, item[this.getField("children", level)], nIndex, true, level);
          if (nIndex[nIndex.length - 1] === -1) {
            if (i !== len - 1) {
              nIndex.pop();
            }
          } else {
            nIndex.unshift(i);
            break;
          }
        } else {
          if (i === len - 1) {
            nIndex.push(-1);
          }
        }
      }
      return !isCallBack && nIndex[0] === -1 ? [] : nIndex;
    };
    MenuBase2.prototype.enableItems = function(items, enable, isUniqueId) {
      if (enable === void 0) {
        enable = true;
      }
      var ul;
      var idx;
      var navIdx;
      var disabled = DISABLED10;
      var skipItem;
      for (var i = 0; i < items.length; i++) {
        navIdx = this.getIndex(items[i], isUniqueId);
        if (this.navIdx.length) {
          if (navIdx.length !== 1) {
            skipItem = false;
            for (var i_1 = 0, len = navIdx.length - 1; i_1 < len; i_1++) {
              if (navIdx[i_1] !== this.navIdx[i_1]) {
                skipItem = true;
                break;
              }
            }
            if (skipItem) {
              continue;
            }
          }
        } else {
          if (navIdx.length !== 1) {
            continue;
          }
        }
        idx = navIdx.pop();
        ul = this.getUlByNavIdx(navIdx.length);
        if (ul && !isNullOrUndefined2(idx)) {
          if (enable) {
            if (this.isMenu) {
              ul.children[idx].classList.remove(disabled);
              ul.children[idx].removeAttribute("aria-disabled");
            } else {
              if (Browser2.isDevice && !ul.classList.contains("e-contextmenu")) {
                ul.children[idx + 1].classList.remove(disabled);
              } else {
                ul.children[idx].classList.remove(disabled);
              }
            }
          } else {
            if (this.isMenu) {
              ul.children[idx].classList.add(disabled);
              ul.children[idx].setAttribute("aria-disabled", "true");
            } else {
              if (Browser2.isDevice && !ul.classList.contains("e-contextmenu")) {
                ul.children[idx + 1].classList.add(disabled);
              } else {
                ul.children[idx].classList.add(disabled);
              }
            }
          }
        }
      }
    };
    MenuBase2.prototype.showItems = function(items, isUniqueId) {
      this.showHideItems(items, false, isUniqueId);
    };
    MenuBase2.prototype.hideItems = function(items, isUniqueId) {
      this.showHideItems(items, true, isUniqueId);
    };
    MenuBase2.prototype.showHideItems = function(items, ishide, isUniqueId) {
      var ul;
      var index;
      var navIdx;
      var item;
      for (var i = 0; i < items.length; i++) {
        navIdx = this.getIndex(items[i], isUniqueId);
        index = navIdx.pop();
        ul = this.getUlByNavIdx(navIdx.length);
        item = this.getItems(navIdx);
        if (ul) {
          var validUl = isUniqueId ? ul.children[index].id : item[index].text.toString();
          if (ishide && validUl === items[i]) {
            ul.children[index].classList.add(HIDE2);
          } else if (!ishide && validUl === items[i]) {
            ul.children[index].classList.remove(HIDE2);
          }
        }
      }
    };
    MenuBase2.prototype.removeItems = function(items, isUniqueId) {
      var idx;
      var navIdx;
      var iitems;
      for (var i = 0; i < items.length; i++) {
        navIdx = this.getIndex(items[i], isUniqueId);
        idx = navIdx.pop();
        iitems = this.getItems(navIdx);
        if (!isNullOrUndefined2(idx)) {
          this.removeItem(iitems, navIdx, idx);
        }
      }
    };
    MenuBase2.prototype.insertAfter = function(items, text, isUniqueId) {
      this.insertItems(items, text, isUniqueId);
    };
    MenuBase2.prototype.insertBefore = function(items, text, isUniqueId) {
      this.insertItems(items, text, isUniqueId, false);
    };
    MenuBase2.prototype.insertItems = function(items, text, isUniqueId, isAfter) {
      if (isAfter === void 0) {
        isAfter = true;
      }
      var li;
      var idx;
      var navIdx;
      var iitems;
      var menuitem;
      for (var i = 0; i < items.length; i++) {
        navIdx = this.getIndex(text, isUniqueId);
        idx = navIdx.pop();
        iitems = this.getItems(navIdx);
        menuitem = new MenuItem(iitems[0], "items", items[i], true);
        menuitem.parentObj = iitems[0].parentObj;
        iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
        var uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);
        if (!isNullOrUndefined2(idx) && navIdx.length < uls.length) {
          idx = isAfter ? idx + 1 : idx;
          li = this.createItems(iitems).children[idx];
          var ul = this.isMenu ? select2(".e-menu-parent", uls[navIdx.length]) : uls[navIdx.length];
          ul.insertBefore(li, ul.children[idx]);
          if (i === items.length - 1 && !this.isMenu && ul.style.display === "block") {
            this.setPosition(null, ul, parseFloat(ul.style.top), parseFloat(ul.style.left));
            ul.style.display = "block";
          }
        }
      }
    };
    MenuBase2.prototype.removeAttributes = function() {
      var _this = this;
      ["top", "left", "display", "z-index"].forEach(function(key) {
        _this.element.style.removeProperty(key);
      });
      ["role", "tabindex", "class", "style"].forEach(function(key) {
        if (key === "class" && _this.element.classList.contains("e-menu-parent")) {
          _this.element.classList.remove("e-menu-parent");
        }
        if (["class", "style"].indexOf(key) === -1 || !_this.element.getAttribute(key)) {
          _this.element.removeAttribute(key);
        }
        if (_this.isMenu && key === "class" && _this.element.classList.contains("e-vertical")) {
          _this.element.classList.remove("e-vertical");
        }
      });
    };
    MenuBase2.prototype.destroy = function() {
      var wrapper = this.getWrapper();
      if (wrapper) {
        this.unWireEvents();
        if (!this.isMenu) {
          this.clonedElement.style.display = "";
          if (this.clonedElement.tagName === "EJS-CONTEXTMENU") {
            addClass2([this.clonedElement], ["e-control", "e-lib", "e-" + this.getModuleName()]);
            this.element = this.clonedElement;
          } else {
            if (this.refreshing && this.clonedElement.childElementCount && this.clonedElement.children[0].tagName === "LI") {
              this.setProperties({
                "items": []
              }, true);
            }
            if (document.getElementById(this.clonedElement.id)) {
              var refEle = this.clonedElement.nextElementSibling;
              if (refEle && refEle !== wrapper) {
                this.clonedElement.parentElement.insertBefore(this.element, refEle);
              } else {
                this.clonedElement.parentElement.appendChild(this.element);
              }
              if (isBlazor2() && !this.isMenu) {
                this.element = this.removeChildElement(this.element);
              } else {
                this.element.innerHTML = "";
              }
              append([].slice.call(this.clonedElement.children), this.element);
              detach2(this.clonedElement);
              this.removeAttributes();
            }
          }
          this.clonedElement = null;
        } else {
          this.closeMenu();
          if (isBlazor2() && !this.isMenu) {
            this.element = this.removeChildElement(this.element);
          } else {
            this.element.innerHTML = "";
          }
          this.removeAttributes();
          wrapper.parentNode.insertBefore(this.element, wrapper);
          this.clonedElement = null;
        }
        detach2(wrapper);
        _super.prototype.destroy.call(this);
        if (this.template) {
          this.clearTemplate(["template"]);
        }
      }
      this.rippleFn = null;
    };
    __decorate70([Event3()], MenuBase2.prototype, "beforeItemRender", void 0);
    __decorate70([Event3()], MenuBase2.prototype, "beforeOpen", void 0);
    __decorate70([Event3()], MenuBase2.prototype, "onOpen", void 0);
    __decorate70([Event3()], MenuBase2.prototype, "beforeClose", void 0);
    __decorate70([Event3()], MenuBase2.prototype, "onClose", void 0);
    __decorate70([Event3()], MenuBase2.prototype, "select", void 0);
    __decorate70([Event3()], MenuBase2.prototype, "created", void 0);
    __decorate70([Property2("")], MenuBase2.prototype, "cssClass", void 0);
    __decorate70([Property2(0)], MenuBase2.prototype, "hoverDelay", void 0);
    __decorate70([Property2(false)], MenuBase2.prototype, "showItemOnClick", void 0);
    __decorate70([Property2("")], MenuBase2.prototype, "target", void 0);
    __decorate70([Property2("")], MenuBase2.prototype, "filter", void 0);
    __decorate70([Property2(null)], MenuBase2.prototype, "template", void 0);
    __decorate70([Property2(false)], MenuBase2.prototype, "enableScrolling", void 0);
    __decorate70([Property2(true)], MenuBase2.prototype, "enableHtmlSanitizer", void 0);
    __decorate70([Complex2({
      itemId: "id",
      text: "text",
      parentId: "parentId",
      iconCss: "iconCss",
      url: "url",
      separator: "separator",
      children: "items"
    }, FieldSettings3)], MenuBase2.prototype, "fields", void 0);
    __decorate70([Collection([], MenuItem)], MenuBase2.prototype, "items", void 0);
    __decorate70([Complex2({
      duration: 400,
      easing: "ease",
      effect: "SlideDown"
    }, MenuAnimationSettings)], MenuBase2.prototype, "animationSettings", void 0);
    MenuBase2 = __decorate70([NotifyPropertyChanges2], MenuBase2);
    return MenuBase2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js
var __extends73 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate71 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_VERTICAL = "e-vertical";
var CLS_ITEMS = "e-toolbar-items";
var CLS_ITEM = "e-toolbar-item";
var CLS_RTL3 = "e-rtl";
var CLS_SEPARATOR = "e-separator";
var CLS_POPUPICON = "e-popup-up-icon";
var CLS_POPUPDOWN = "e-popup-down-icon";
var CLS_POPUPOPEN = "e-popup-open";
var CLS_TEMPLATE = "e-template";
var CLS_DISABLE3 = "e-overlay";
var CLS_POPUPTEXT = "e-toolbar-text";
var CLS_TBARTEXT = "e-popup-text";
var CLS_TBAROVERFLOW = "e-overflow-show";
var CLS_POPOVERFLOW = "e-overflow-hide";
var CLS_TBARBTN = "e-tbar-btn";
var CLS_TBARNAV = "e-hor-nav";
var CLS_TBARSCRLNAV = "e-scroll-nav";
var CLS_TBARRIGHT = "e-toolbar-right";
var CLS_TBARLEFT = "e-toolbar-left";
var CLS_TBARCENTER = "e-toolbar-center";
var CLS_TBARPOS = "e-tbar-pos";
var CLS_HSCROLLCNT = "e-hscroll-content";
var CLS_VSCROLLCNT = "e-vscroll-content";
var CLS_HSCROLLBAR2 = "e-hscroll-bar";
var CLS_POPUPNAV = "e-hor-nav";
var CLS_POPUPCLASS = "e-toolbar-pop";
var CLS_POPUP = "e-toolbar-popup";
var CLS_TBARBTNTEXT = "e-tbar-btn-text";
var CLS_TBARNAVACT = "e-nav-active";
var CLS_TBARIGNORE = "e-ignore";
var CLS_POPPRI = "e-popup-alone";
var CLS_HIDDEN = "e-hidden";
var CLS_MULTIROW = "e-toolbar-multirow";
var CLS_MULTIROWPOS = "e-multirow-pos";
var CLS_MULTIROW_SEPARATOR = "e-multirow-separator";
var CLS_EXTENDABLE_SEPARATOR = "e-extended-separator";
var CLS_EXTEANDABLE_TOOLBAR = "e-extended-toolbar";
var CLS_EXTENDABLECLASS = "e-toolbar-extended";
var CLS_EXTENDPOPUP = "e-expended-nav";
var CLS_EXTENDEDPOPOPEN = "e-tbar-extended";
var Item2 = (
  /** @class */
  function(_super) {
    __extends73(Item3, _super);
    function Item3() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate71([Property2("")], Item3.prototype, "id", void 0);
    __decorate71([Property2("")], Item3.prototype, "text", void 0);
    __decorate71([Property2("auto")], Item3.prototype, "width", void 0);
    __decorate71([Property2("")], Item3.prototype, "cssClass", void 0);
    __decorate71([Property2(false)], Item3.prototype, "showAlwaysInPopup", void 0);
    __decorate71([Property2(false)], Item3.prototype, "disabled", void 0);
    __decorate71([Property2("")], Item3.prototype, "prefixIcon", void 0);
    __decorate71([Property2("")], Item3.prototype, "suffixIcon", void 0);
    __decorate71([Property2(true)], Item3.prototype, "visible", void 0);
    __decorate71([Property2("None")], Item3.prototype, "overflow", void 0);
    __decorate71([Property2("")], Item3.prototype, "template", void 0);
    __decorate71([Property2("Button")], Item3.prototype, "type", void 0);
    __decorate71([Property2("Both")], Item3.prototype, "showTextOn", void 0);
    __decorate71([Property2(null)], Item3.prototype, "htmlAttributes", void 0);
    __decorate71([Property2("")], Item3.prototype, "tooltipText", void 0);
    __decorate71([Property2("Left")], Item3.prototype, "align", void 0);
    __decorate71([Event3()], Item3.prototype, "click", void 0);
    __decorate71([Property2(-1)], Item3.prototype, "tabIndex", void 0);
    return Item3;
  }(ChildProperty2)
);
var Toolbar = (
  /** @class */
  function(_super) {
    __extends73(Toolbar2, _super);
    function Toolbar2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.resizeContext = _this.resize.bind(_this);
      _this.orientationChangeContext = _this.orientationChange.bind(_this);
      _this.keyConfigs = {
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        moveDown: "downarrow",
        popupOpen: "enter",
        popupClose: "escape",
        tab: "tab",
        home: "home",
        end: "end"
      };
      return _this;
    }
    Toolbar2.prototype.destroy = function() {
      var _this = this;
      if (this.isReact || this.isAngular) {
        this.clearTemplate();
      }
      var btnItems = this.element.querySelectorAll(".e-control.e-btn");
      [].slice.call(btnItems).forEach(function(el) {
        if (!isNullOrUndefined2(el) && !isNullOrUndefined2(el.ej2_instances) && !isNullOrUndefined2(el.ej2_instances[0]) && !el.ej2_instances[0].isDestroyed) {
          el.ej2_instances[0].destroy();
        }
      });
      this.unwireEvents();
      this.tempId.forEach(function(ele) {
        if (!isNullOrUndefined2(_this.element.querySelector(ele))) {
          document.body.appendChild(_this.element.querySelector(ele)).style.display = "none";
        }
      });
      this.destroyItems();
      while (this.element.lastElementChild) {
        this.element.removeChild(this.element.lastElementChild);
      }
      if (this.trgtEle) {
        this.element.appendChild(this.ctrlTem);
        this.trgtEle = null;
        this.ctrlTem = null;
      }
      if (this.popObj) {
        this.popObj.destroy();
        detach2(this.popObj.element);
      }
      if (this.activeEle) {
        this.activeEle = null;
      }
      this.popObj = null;
      this.tbarAlign = null;
      this.tbarItemsCol = [];
      this.remove(this.element, "e-toolpop");
      if (this.cssClass) {
        removeClass2([this.element], this.cssClass.split(" "));
      }
      this.element.removeAttribute("style");
      ["aria-disabled", "aria-orientation", "role"].forEach(function(attrb) {
        return _this.element.removeAttribute(attrb);
      });
      _super.prototype.destroy.call(this);
    };
    Toolbar2.prototype.preRender = function() {
      var eventArgs = {
        enableCollision: this.enableCollision,
        scrollStep: this.scrollStep
      };
      this.trigger("beforeCreate", eventArgs);
      this.enableCollision = eventArgs.enableCollision;
      this.scrollStep = eventArgs.scrollStep;
      this.scrollModule = null;
      this.popObj = null;
      this.tempId = [];
      this.tbarItemsCol = this.items;
      this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
      this.isExtendedOpen = false;
      this.popupPriCount = 0;
      if (this.enableRtl) {
        this.add(this.element, CLS_RTL3);
      }
    };
    Toolbar2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "click", this.clickHandler, this);
      window.addEventListener("resize", this.resizeContext);
      window.addEventListener("orientationchange", this.orientationChangeContext);
      if (this.allowKeyboard) {
        this.wireKeyboardEvent();
      }
    };
    Toolbar2.prototype.wireKeyboardEvent = function() {
      this.keyModule = new KeyboardEvents2(this.element, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs
      });
      EventHandler2.add(this.element, "keydown", this.docKeyDown, this);
      this.updateTabIndex("0");
    };
    Toolbar2.prototype.updateTabIndex = function(tabIndex) {
      var ele = this.element.querySelector("." + CLS_ITEM + ":not(." + CLS_DISABLE3 + " ):not(." + CLS_SEPARATOR + " ):not(." + CLS_HIDDEN + " )");
      if (!isNullOrUndefined2(ele) && !isNullOrUndefined2(ele.firstElementChild)) {
        var dataTabIndex = ele.firstElementChild.getAttribute("data-tabindex");
        if (dataTabIndex && dataTabIndex === "-1" && ele.firstElementChild.tagName !== "INPUT") {
          ele.firstElementChild.setAttribute("tabindex", tabIndex);
        }
      }
    };
    Toolbar2.prototype.unwireKeyboardEvent = function() {
      if (this.keyModule) {
        EventHandler2.remove(this.element, "keydown", this.docKeyDown);
        this.keyModule.destroy();
        this.keyModule = null;
      }
    };
    Toolbar2.prototype.docKeyDown = function(e) {
      if (e.target.tagName === "INPUT") {
        return;
      }
      var popCheck = !isNullOrUndefined2(this.popObj) && isVisible2(this.popObj.element) && this.overflowMode !== "Extended";
      if (e.keyCode === 9 && e.target.classList.contains("e-hor-nav") === true && popCheck) {
        this.popObj.hide({
          name: "FadeOut",
          duration: 100
        });
      }
      var keyCheck = e.keyCode === 40 || e.keyCode === 38 || e.keyCode === 35 || e.keyCode === 36;
      if (keyCheck) {
        e.preventDefault();
      }
    };
    Toolbar2.prototype.unwireEvents = function() {
      EventHandler2.remove(this.element, "click", this.clickHandler);
      this.destroyScroll();
      this.unwireKeyboardEvent();
      window.removeEventListener("resize", this.resizeContext);
      window.removeEventListener("orientationchange", this.orientationChangeContext);
      document.removeEventListener("scroll", this.clickEvent);
      document.removeEventListener("click", this.scrollEvent);
      this.scrollEvent = null;
      this.clickEvent = null;
    };
    Toolbar2.prototype.clearProperty = function() {
      this.tbarEle = [];
      this.tbarAlgEle = {
        lefts: [],
        centers: [],
        rights: []
      };
    };
    Toolbar2.prototype.docEvent = function(e) {
      var popEle = closest2(e.target, ".e-popup");
      if (this.popObj && isVisible2(this.popObj.element) && !popEle && this.overflowMode === "Popup") {
        this.popObj.hide({
          name: "FadeOut",
          duration: 100
        });
      }
    };
    Toolbar2.prototype.destroyScroll = function() {
      if (this.scrollModule) {
        if (this.tbarAlign) {
          this.add(this.scrollModule.element, CLS_TBARPOS);
        }
        this.scrollModule.destroy();
        this.scrollModule = null;
      }
    };
    Toolbar2.prototype.destroyItems = function() {
      if (this.element) {
        [].slice.call(this.element.querySelectorAll("." + CLS_ITEM)).forEach(function(el) {
          detach2(el);
        });
      }
      if (this.tbarAlign) {
        var tbarItems = this.element.querySelector("." + CLS_ITEMS);
        [].slice.call(tbarItems.children).forEach(function(el) {
          detach2(el);
        });
        this.tbarAlign = false;
        this.remove(tbarItems, CLS_TBARPOS);
      }
      this.clearProperty();
    };
    Toolbar2.prototype.destroyMode = function() {
      if (this.scrollModule) {
        this.remove(this.scrollModule.element, CLS_RTL3);
        this.destroyScroll();
      }
      this.remove(this.element, CLS_EXTENDEDPOPOPEN);
      this.remove(this.element, CLS_EXTEANDABLE_TOOLBAR);
      var tempEle = this.element.querySelector(".e-toolbar-multirow");
      if (tempEle) {
        this.remove(tempEle, CLS_MULTIROW);
      }
      if (this.popObj) {
        this.popupRefresh(this.popObj.element, true);
      }
    };
    Toolbar2.prototype.add = function(ele, val) {
      ele.classList.add(val);
    };
    Toolbar2.prototype.remove = function(ele, val) {
      ele.classList.remove(val);
    };
    Toolbar2.prototype.elementFocus = function(ele) {
      var fChild = ele.firstElementChild;
      if (fChild) {
        fChild.focus();
        this.activeEleSwitch(ele);
      } else {
        ele.focus();
      }
    };
    Toolbar2.prototype.clstElement = function(tbrNavChk, trgt) {
      var clst;
      if (tbrNavChk && this.popObj && isVisible2(this.popObj.element)) {
        clst = this.popObj.element.querySelector("." + CLS_ITEM);
      } else if (this.element === trgt || tbrNavChk) {
        clst = this.element.querySelector("." + CLS_ITEM + ":not(." + CLS_DISABLE3 + " ):not(." + CLS_SEPARATOR + " ):not(." + CLS_HIDDEN + " )");
      } else {
        clst = closest2(trgt, "." + CLS_ITEM);
      }
      return clst;
    };
    Toolbar2.prototype.keyHandling = function(clst, e, trgt, navChk, scrollChk) {
      var popObj = this.popObj;
      var rootEle = this.element;
      var popAnimate = {
        name: "FadeOut",
        duration: 100
      };
      var value = e.action === "moveUp" ? "previous" : "next";
      var ele;
      var nodes;
      switch (e.action) {
        case "moveRight":
          if (this.isVertical) {
            return;
          }
          if (rootEle === trgt) {
            this.elementFocus(clst);
          } else if (!navChk) {
            this.eleFocus(clst, "next");
          }
          break;
        case "moveLeft":
          if (this.isVertical) {
            return;
          }
          if (!navChk) {
            this.eleFocus(clst, "previous");
          }
          break;
        case "home":
        case "end":
          if (clst) {
            var popupCheck = closest2(clst, ".e-popup");
            var extendedPopup = this.element.querySelector("." + CLS_EXTENDABLECLASS);
            if (this.overflowMode === "Extended" && extendedPopup && extendedPopup.classList.contains("e-popup-open")) {
              popupCheck = e.action === "end" ? extendedPopup : null;
            }
            if (popupCheck) {
              if (isVisible2(this.popObj.element)) {
                nodes = [].slice.call(popupCheck.children);
                if (e.action === "home") {
                  ele = this.focusFirstVisibleEle(nodes);
                } else {
                  ele = this.focusLastVisibleEle(nodes);
                }
              }
            } else {
              nodes = this.element.querySelectorAll("." + CLS_ITEMS + " ." + CLS_ITEM + ":not(." + CLS_SEPARATOR + ")");
              if (e.action === "home") {
                ele = this.focusFirstVisibleEle(nodes);
              } else {
                ele = this.focusLastVisibleEle(nodes);
              }
            }
            if (ele) {
              this.elementFocus(ele);
            }
          }
          break;
        case "moveUp":
        case "moveDown":
          if (!this.isVertical) {
            if (popObj && closest2(trgt, ".e-popup")) {
              var popEle = popObj.element;
              var popFrstEle = popEle.firstElementChild;
              if (value === "previous" && popFrstEle === clst) {
                popEle.lastElementChild.firstChild.focus();
              } else if (value === "next" && popEle.lastElementChild === clst) {
                popFrstEle.firstChild.focus();
              } else {
                this.eleFocus(clst, value);
              }
            } else if (e.action === "moveDown" && popObj && isVisible2(popObj.element)) {
              this.elementFocus(clst);
            }
          } else {
            if (e.action === "moveUp") {
              this.eleFocus(clst, "previous");
            } else {
              this.eleFocus(clst, "next");
            }
          }
          break;
        case "tab":
          if (!scrollChk && !navChk) {
            var ele_1 = clst.firstElementChild;
            if (rootEle === trgt) {
              if (this.activeEle) {
                this.activeEle.focus();
              } else {
                this.activeEleRemove(ele_1);
                ele_1.focus();
              }
            }
          }
          break;
        case "popupClose":
          if (popObj && this.overflowMode !== "Extended") {
            popObj.hide(popAnimate);
          }
          break;
        case "popupOpen":
          if (!navChk) {
            return;
          }
          if (popObj && !isVisible2(popObj.element)) {
            popObj.element.style.top = rootEle.offsetHeight + "px";
            popObj.show({
              name: "FadeIn",
              duration: 100
            });
          } else {
            popObj.hide(popAnimate);
          }
          break;
      }
    };
    Toolbar2.prototype.keyActionHandler = function(e) {
      var trgt = e.target;
      if (trgt.tagName === "INPUT" || trgt.tagName === "TEXTAREA" || this.element.classList.contains(CLS_DISABLE3)) {
        return;
      }
      e.preventDefault();
      var tbrNavChk = trgt.classList.contains(CLS_TBARNAV);
      var tbarScrollChk = trgt.classList.contains(CLS_TBARSCRLNAV);
      var clst = this.clstElement(tbrNavChk, trgt);
      if (clst || tbarScrollChk) {
        this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
      }
    };
    Toolbar2.prototype.disable = function(value) {
      var rootEle = this.element;
      if (value) {
        rootEle.classList.add(CLS_DISABLE3);
      } else {
        rootEle.classList.remove(CLS_DISABLE3);
      }
      if (this.activeEle) {
        this.activeEle.setAttribute("tabindex", this.activeEle.getAttribute("data-tabindex"));
      }
      if (this.scrollModule) {
        this.scrollModule.disable(value);
      }
      if (this.popObj) {
        if (isVisible2(this.popObj.element) && this.overflowMode !== "Extended") {
          this.popObj.hide();
        }
        rootEle.querySelector("#" + rootEle.id + "_nav").setAttribute("tabindex", !value ? "0" : "-1");
      }
    };
    Toolbar2.prototype.eleContains = function(el) {
      return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE3) || el.getAttribute("disabled") || el.classList.contains(CLS_HIDDEN) || !isVisible2(el) || !el.classList.contains(CLS_ITEM);
    };
    Toolbar2.prototype.focusFirstVisibleEle = function(nodes) {
      var element2;
      var index = 0;
      while (index < nodes.length) {
        var ele = nodes[parseInt(index.toString(), 10)];
        if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE3)) {
          return ele;
        }
        index++;
      }
      return element2;
    };
    Toolbar2.prototype.focusLastVisibleEle = function(nodes) {
      var element2;
      var index = nodes.length - 1;
      while (index >= 0) {
        var ele = nodes[parseInt(index.toString(), 10)];
        if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE3)) {
          return ele;
        }
        index--;
      }
      return element2;
    };
    Toolbar2.prototype.eleFocus = function(closest4, pos) {
      var sib = Object(closest4)[pos + "ElementSibling"];
      if (sib) {
        var skipEle = this.eleContains(sib);
        if (skipEle) {
          this.eleFocus(sib, pos);
          return;
        }
        this.elementFocus(sib);
      } else if (this.tbarAlign) {
        var elem = Object(closest4.parentElement)[pos + "ElementSibling"];
        if (!isNullOrUndefined2(elem) && elem.children.length === 0) {
          elem = Object(elem)[pos + "ElementSibling"];
        }
        if (!isNullOrUndefined2(elem) && elem.children.length > 0) {
          if (pos === "next") {
            var el = elem.querySelector("." + CLS_ITEM);
            if (this.eleContains(el)) {
              this.eleFocus(el, pos);
            } else {
              el.firstElementChild.focus();
              this.activeEleSwitch(el);
            }
          } else {
            var el = elem.lastElementChild;
            if (this.eleContains(el)) {
              this.eleFocus(el, pos);
            } else {
              this.elementFocus(el);
            }
          }
        }
      } else if (!isNullOrUndefined2(closest4)) {
        var tbrItems = this.element.querySelectorAll("." + CLS_ITEMS + " ." + CLS_ITEM + ":not(." + CLS_SEPARATOR + "):not(." + CLS_DISABLE3 + "):not(." + CLS_HIDDEN + ")");
        if (pos === "next" && tbrItems) {
          this.elementFocus(tbrItems[0]);
        } else if (pos === "previous" && tbrItems) {
          this.elementFocus(tbrItems[tbrItems.length - 1]);
        }
      }
    };
    Toolbar2.prototype.clickHandler = function(e) {
      var _this = this;
      var trgt = e.target;
      var ele = this.element;
      var isPopupElement = !isNullOrUndefined2(closest2(trgt, "." + CLS_POPUPCLASS));
      var clsList = trgt.classList;
      var popupNav = closest2(trgt, "." + CLS_TBARNAV);
      if (!popupNav) {
        popupNav = trgt;
      }
      if (!ele.children[0].classList.contains("e-hscroll") && !ele.children[0].classList.contains("e-vscroll") && clsList.contains(CLS_TBARNAV)) {
        clsList = trgt.querySelector(".e-icons").classList;
      }
      if (clsList.contains(CLS_POPUPICON) || clsList.contains(CLS_POPUPDOWN)) {
        this.popupClickHandler(ele, popupNav, CLS_RTL3);
      }
      var itemObj;
      var clst = closest2(e.target, "." + CLS_ITEM);
      if ((isNullOrUndefined2(clst) || clst.classList.contains(CLS_DISABLE3)) && !popupNav.classList.contains(CLS_TBARNAV)) {
        return;
      }
      if (clst) {
        var tempItem = this.items[this.tbarEle.indexOf(clst)];
        itemObj = tempItem;
      }
      var eventArgs = {
        originalEvent: e,
        item: itemObj
      };
      var isClickBinded = itemObj && !isNullOrUndefined2(itemObj.click) && typeof itemObj.click == "object" ? !isNullOrUndefined2(itemObj.click.observers) && itemObj.click.observers.length > 0 : !isNullOrUndefined2(itemObj) && !isNullOrUndefined2(itemObj.click);
      if (isClickBinded) {
        this.trigger("items[" + this.tbarEle.indexOf(clst) + "].click", eventArgs);
      }
      if (!eventArgs.cancel) {
        this.trigger("clicked", eventArgs, function(clickedArgs) {
          if (!isNullOrUndefined2(_this.popObj) && isPopupElement && !clickedArgs.cancel && _this.overflowMode === "Popup" && clickedArgs.item && clickedArgs.item.type !== "Input") {
            _this.popObj.hide({
              name: "FadeOut",
              duration: 100
            });
          }
        });
      }
    };
    Toolbar2.prototype.popupClickHandler = function(ele, popupNav, CLS_RTL8) {
      var popObj = this.popObj;
      if (isVisible2(popObj.element)) {
        popupNav.classList.remove(CLS_TBARNAVACT);
        popObj.hide({
          name: "FadeOut",
          duration: 100
        });
      } else {
        if (ele.classList.contains(CLS_RTL8)) {
          popObj.enableRtl = true;
          popObj.position = {
            X: "left",
            Y: "top"
          };
        }
        if (popObj.offsetX === 0 && !ele.classList.contains(CLS_RTL8)) {
          popObj.enableRtl = false;
          popObj.position = {
            X: "right",
            Y: "top"
          };
        }
        if (this.overflowMode === "Extended") {
          popObj.element.style.minHeight = "0px";
          popObj.width = this.getToolbarPopupWidth(this.element);
        }
        popObj.dataBind();
        popObj.refreshPosition();
        popObj.element.style.top = this.getElementOffsetY() + "px";
        popupNav.classList.add(CLS_TBARNAVACT);
        popObj.show({
          name: "FadeIn",
          duration: 100
        });
      }
    };
    Toolbar2.prototype.getToolbarPopupWidth = function(ele) {
      var eleStyles = window.getComputedStyle(ele);
      return parseFloat(eleStyles.width) + parseFloat(eleStyles.borderRightWidth) * 2;
    };
    Toolbar2.prototype.render = function() {
      var _this = this;
      this.initialize();
      this.renderControl();
      this.wireEvents();
      this.clickEvent = this.docEvent.bind(this);
      this.scrollEvent = this.docEvent.bind(this);
      this.renderComplete();
      if (this.isReact && this.portals && this.portals.length > 0) {
        this.renderReactTemplates(function() {
          _this.refreshOverflow();
        });
      }
    };
    Toolbar2.prototype.initialize = function() {
      var width = formatUnit(this.width);
      var height = formatUnit(this.height);
      if (Browser2.info.name !== "msie" || this.height !== "auto" || this.overflowMode === "MultiRow") {
        setStyleAttribute2(this.element, {
          "height": height
        });
      }
      setStyleAttribute2(this.element, {
        "width": width
      });
      var ariaAttr = {
        "role": "toolbar",
        "aria-disabled": "false",
        "aria-orientation": !this.isVertical ? "horizontal" : "vertical"
      };
      attributes2(this.element, ariaAttr);
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.split(" "));
      }
    };
    Toolbar2.prototype.renderControl = function() {
      var ele = this.element;
      this.trgtEle = ele.children.length > 0 ? ele.querySelector("div") : null;
      this.tbarAlgEle = {
        lefts: [],
        centers: [],
        rights: []
      };
      this.renderItems();
      this.renderLayout();
    };
    Toolbar2.prototype.renderLayout = function() {
      this.renderOverflowMode();
      if (this.tbarAlign) {
        this.itemPositioning();
      }
      if (this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element)) {
        this.popupRefresh(this.popObj.element, false);
      }
      this.separator();
    };
    Toolbar2.prototype.itemsAlign = function(items, itemEleDom) {
      var innerItem;
      var innerPos;
      if (!this.tbarEle) {
        this.tbarEle = [];
      }
      for (var i = 0; i < items.length; i++) {
        innerItem = this.renderSubComponent(items[parseInt(i.toString(), 10)], i);
        if (this.tbarEle.indexOf(innerItem) === -1) {
          this.tbarEle.push(innerItem);
        }
        if (!this.tbarAlign) {
          this.tbarItemAlign(items[parseInt(i.toString(), 10)], itemEleDom, i);
        }
        innerPos = itemEleDom.querySelector(".e-toolbar-" + items[parseInt(i.toString(), 10)].align.toLowerCase());
        if (innerPos) {
          if (!(items[parseInt(i.toString(), 10)].showAlwaysInPopup && items[parseInt(i.toString(), 10)].overflow !== "Show")) {
            this.tbarAlgEle[(items[parseInt(i.toString(), 10)].align + "s").toLowerCase()].push(innerItem);
          }
          innerPos.appendChild(innerItem);
        } else {
          itemEleDom.appendChild(innerItem);
        }
      }
      if (this.isReact) {
        var portals = "portals";
        this.notify("render-react-toolbar-template", this["" + portals]);
        this.renderReactTemplates();
      }
    };
    Toolbar2.prototype.changeOrientation = function() {
      var ele = this.element;
      if (this.isVertical) {
        ele.classList.remove(CLS_VERTICAL);
        this.isVertical = false;
        if (this.height === "auto" || this.height === "100%") {
          ele.style.height = this.height;
        }
        ele.setAttribute("aria-orientation", "horizontal");
      } else {
        ele.classList.add(CLS_VERTICAL);
        this.isVertical = true;
        ele.setAttribute("aria-orientation", "vertical");
        setStyleAttribute2(this.element, {
          "height": formatUnit(this.height),
          "width": formatUnit(this.width)
        });
      }
      this.destroyMode();
      this.refreshOverflow();
    };
    Toolbar2.prototype.initScroll = function(element2, innerItems) {
      if (!this.scrollModule && this.checkOverflow(element2, innerItems[0])) {
        if (this.tbarAlign) {
          this.element.querySelector("." + CLS_ITEMS + " ." + CLS_TBARCENTER).removeAttribute("style");
        }
        if (this.isVertical) {
          this.scrollModule = new VScroll({
            scrollStep: this.scrollStep,
            enableRtl: this.enableRtl
          }, innerItems[0]);
        } else {
          this.scrollModule = new HScroll({
            scrollStep: this.scrollStep,
            enableRtl: this.enableRtl
          }, innerItems[0]);
        }
        if (this.cssClass) {
          addClass2([innerItems[0]], this.cssClass.split(" "));
        }
        var scrollEle = this.scrollModule.element.querySelector("." + CLS_HSCROLLBAR2 + ", .e-vscroll-bar");
        if (scrollEle) {
          scrollEle.removeAttribute("tabindex");
        }
        this.remove(this.scrollModule.element, CLS_TBARPOS);
        setStyleAttribute2(this.element, {
          overflow: "hidden"
        });
      }
    };
    Toolbar2.prototype.itemWidthCal = function(items) {
      var _this = this;
      var width = 0;
      var style;
      [].slice.call(selectAll2("." + CLS_ITEM, items)).forEach(function(el) {
        if (isVisible2(el)) {
          style = window.getComputedStyle(el);
          width += _this.isVertical ? el.offsetHeight : el.offsetWidth;
          width += parseFloat(_this.isVertical ? style.marginTop : style.marginRight);
          width += parseFloat(_this.isVertical ? style.marginBottom : style.marginLeft);
        }
      });
      return width;
    };
    Toolbar2.prototype.getScrollCntEle = function(innerItem) {
      var trgClass = this.isVertical ? ".e-vscroll-content" : ".e-hscroll-content";
      return innerItem.querySelector(trgClass);
    };
    Toolbar2.prototype.checkOverflow = function(element2, innerItem) {
      if (isNullOrUndefined2(element2) || isNullOrUndefined2(innerItem) || !isVisible2(element2)) {
        return false;
      }
      var eleWidth = this.isVertical ? element2.offsetHeight : element2.offsetWidth;
      var itemWidth = this.isVertical ? innerItem.offsetHeight : innerItem.offsetWidth;
      if (this.tbarAlign || this.scrollModule || eleWidth === itemWidth) {
        itemWidth = this.itemWidthCal(this.scrollModule ? this.getScrollCntEle(innerItem) : innerItem);
      }
      var popNav = element2.querySelector("." + CLS_TBARNAV);
      var scrollNav = element2.querySelector("." + CLS_TBARSCRLNAV);
      var navEleWidth = 0;
      if (popNav) {
        navEleWidth = this.isVertical ? popNav.offsetHeight : popNav.offsetWidth;
      } else if (scrollNav) {
        navEleWidth = this.isVertical ? scrollNav.offsetHeight * 2 : scrollNav.offsetWidth * 2;
      }
      if (itemWidth > eleWidth - navEleWidth) {
        return true;
      } else {
        return false;
      }
    };
    Toolbar2.prototype.refreshOverflow = function() {
      this.resize();
    };
    Toolbar2.prototype.toolbarAlign = function(innerItems) {
      if (this.tbarAlign) {
        this.add(innerItems, CLS_TBARPOS);
        this.itemPositioning();
      }
    };
    Toolbar2.prototype.renderOverflowMode = function() {
      var ele = this.element;
      var innerItems = ele.querySelector("." + CLS_ITEMS);
      var priorityCheck = this.popupPriCount > 0;
      if (ele && ele.children.length > 0) {
        this.offsetWid = ele.offsetWidth;
        this.remove(this.element, "e-toolpop");
        if (Browser2.info.name === "msie" && this.height === "auto") {
          ele.style.height = "";
        }
        switch (this.overflowMode) {
          case "Scrollable":
            if (isNullOrUndefined2(this.scrollModule)) {
              this.initScroll(ele, [].slice.call(ele.getElementsByClassName(CLS_ITEMS)));
            }
            break;
          case "Popup":
            this.add(this.element, "e-toolpop");
            if (this.tbarAlign) {
              this.removePositioning();
            }
            if (this.checkOverflow(ele, innerItems) || priorityCheck) {
              this.setOverflowAttributes(ele);
            }
            this.toolbarAlign(innerItems);
            break;
          case "MultiRow":
            this.add(innerItems, CLS_MULTIROW);
            if (this.checkOverflow(ele, innerItems) && this.tbarAlign) {
              this.removePositioning();
              this.add(innerItems, CLS_MULTIROWPOS);
            }
            if (ele.style.overflow === "hidden") {
              ele.style.overflow = "";
            }
            if (Browser2.info.name === "msie" || ele.style.height !== "auto") {
              ele.style.height = "auto";
            }
            break;
          case "Extended":
            this.add(this.element, CLS_EXTEANDABLE_TOOLBAR);
            if (this.checkOverflow(ele, innerItems) || priorityCheck) {
              if (this.tbarAlign) {
                this.removePositioning();
              }
              this.setOverflowAttributes(ele);
            }
            this.toolbarAlign(innerItems);
        }
      }
    };
    Toolbar2.prototype.setOverflowAttributes = function(ele) {
      this.createPopupEle(ele, [].slice.call(selectAll2("." + CLS_ITEMS + " ." + CLS_ITEM, ele)));
      var ariaAttr = {
        "tabindex": "0",
        "role": "button",
        "aria-haspopup": "true",
        "aria-label": "overflow"
      };
      attributes2(this.element.querySelector("." + CLS_TBARNAV), ariaAttr);
    };
    Toolbar2.prototype.separator = function() {
      var element2 = this.element;
      var eleItem = [].slice.call(element2.querySelectorAll("." + CLS_SEPARATOR));
      var multiVar = element2.querySelector("." + CLS_MULTIROW_SEPARATOR);
      var extendVar = element2.querySelector("." + CLS_EXTENDABLE_SEPARATOR);
      var eleInlineItem = this.overflowMode === "MultiRow" ? multiVar : extendVar;
      if (eleInlineItem !== null) {
        if (this.overflowMode === "MultiRow") {
          eleInlineItem.classList.remove(CLS_MULTIROW_SEPARATOR);
        } else if (this.overflowMode === "Extended") {
          eleInlineItem.classList.remove(CLS_EXTENDABLE_SEPARATOR);
        }
      }
      for (var i = 0; i <= eleItem.length - 1; i++) {
        if (eleItem[parseInt(i.toString(), 10)].offsetLeft < 30 && eleItem[parseInt(i.toString(), 10)].offsetLeft !== 0) {
          if (this.overflowMode === "MultiRow") {
            eleItem[parseInt(i.toString(), 10)].classList.add(CLS_MULTIROW_SEPARATOR);
          } else if (this.overflowMode === "Extended") {
            eleItem[parseInt(i.toString(), 10)].classList.add(CLS_EXTENDABLE_SEPARATOR);
          }
        }
      }
    };
    Toolbar2.prototype.createPopupEle = function(ele, innerEle) {
      var innerNav = ele.querySelector("." + CLS_TBARNAV);
      var vertical = this.isVertical;
      if (!innerNav) {
        this.createPopupIcon(ele);
      }
      innerNav = ele.querySelector("." + CLS_TBARNAV);
      var innerNavDom = vertical ? innerNav.offsetHeight : innerNav.offsetWidth;
      var eleWidth = (vertical ? ele.offsetHeight : ele.offsetWidth) - innerNavDom;
      this.element.classList.remove("e-rtl");
      setStyleAttribute2(this.element, {
        direction: "initial"
      });
      this.checkPriority(ele, innerEle, eleWidth, true);
      if (this.enableRtl) {
        this.element.classList.add("e-rtl");
      }
      this.element.style.removeProperty("direction");
      this.createPopup();
    };
    Toolbar2.prototype.pushingPoppedEle = function(tbarObj, popupPri, ele, eleHeight, sepHeight) {
      var element2 = tbarObj.element;
      var poppedEle = [].slice.call(selectAll2("." + CLS_POPUP, element2.querySelector("." + CLS_ITEMS)));
      var nodes = selectAll2("." + CLS_TBAROVERFLOW, ele);
      var nodeIndex = 0;
      var nodePri = 0;
      poppedEle.forEach(function(el, index) {
        nodes = selectAll2("." + CLS_TBAROVERFLOW, ele);
        if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {
          if (tbarObj.tbResize && nodes.length > index) {
            ele.insertBefore(el, nodes[parseInt(index.toString(), 10)]);
            ++nodePri;
          } else {
            ele.insertBefore(el, ele.children[nodes.length]);
            ++nodePri;
          }
        } else if (el.classList.contains(CLS_TBAROVERFLOW)) {
          ele.insertBefore(el, ele.firstChild);
          ++nodePri;
        } else if (tbarObj.tbResize && el.classList.contains(CLS_POPOVERFLOW) && ele.children.length > 0 && nodes.length === 0) {
          ele.insertBefore(el, ele.firstChild);
          ++nodePri;
        } else if (el.classList.contains(CLS_POPOVERFLOW)) {
          popupPri.push(el);
        } else if (tbarObj.tbResize) {
          ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]);
          ++nodeIndex;
        } else {
          ele.appendChild(el);
        }
        if (el.classList.contains(CLS_SEPARATOR)) {
          setStyleAttribute2(el, {
            display: "",
            height: sepHeight + "px"
          });
        } else {
          setStyleAttribute2(el, {
            display: "",
            height: eleHeight + "px"
          });
        }
      });
      popupPri.forEach(function(el) {
        ele.appendChild(el);
      });
      var tbarEle = selectAll2("." + CLS_ITEM, element2.querySelector("." + CLS_ITEMS));
      for (var i = tbarEle.length - 1; i >= 0; i--) {
        var tbarElement = tbarEle[parseInt(i.toString(), 10)];
        if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== "Extended") {
          setStyleAttribute2(tbarElement, {
            display: "none"
          });
        } else {
          break;
        }
      }
    };
    Toolbar2.prototype.createPopup = function() {
      var element2 = this.element;
      var sepHeight;
      var sepItem;
      if (this.overflowMode === "Extended") {
        sepItem = element2.querySelector("." + CLS_SEPARATOR);
        sepHeight = element2.style.height === "auto" || element2.style.height === "" ? null : sepItem && sepItem.offsetHeight;
      }
      var eleItem = element2.querySelector("." + CLS_ITEM + ":not(." + CLS_SEPARATOR + "):not(." + CLS_POPUP + ")");
      var eleHeight = element2.style.height === "auto" || element2.style.height === "" ? null : eleItem && eleItem.offsetHeight;
      var ele;
      var popupPri = [];
      if (select2("#" + element2.id + "_popup." + CLS_POPUPCLASS, element2)) {
        ele = select2("#" + element2.id + "_popup." + CLS_POPUPCLASS, element2);
      } else {
        var extendEle = this.createElement("div", {
          id: element2.id + "_popup",
          className: CLS_POPUPCLASS + " " + CLS_EXTENDABLECLASS
        });
        var popupEle = this.createElement("div", {
          id: element2.id + "_popup",
          className: CLS_POPUPCLASS
        });
        ele = this.overflowMode === "Extended" ? extendEle : popupEle;
      }
      this.pushingPoppedEle(this, popupPri, ele, eleHeight, sepHeight);
      this.popupInit(element2, ele);
    };
    Toolbar2.prototype.getElementOffsetY = function() {
      return this.overflowMode === "Extended" && window.getComputedStyle(this.element).getPropertyValue("box-sizing") === "border-box" ? this.element.clientHeight : this.element.offsetHeight;
    };
    Toolbar2.prototype.popupInit = function(element2, ele) {
      if (!this.popObj) {
        element2.appendChild(ele);
        if (this.cssClass) {
          addClass2([ele], this.cssClass.split(" "));
        }
        setStyleAttribute2(this.element, {
          overflow: ""
        });
        var popup = new Popup(null, {
          relateTo: this.element,
          offsetY: this.isVertical ? 0 : this.getElementOffsetY(),
          enableRtl: this.enableRtl,
          open: this.popupOpen.bind(this),
          close: this.popupClose.bind(this),
          collision: {
            Y: this.enableCollision ? "flip" : "none"
          },
          position: this.enableRtl ? {
            X: "left",
            Y: "top"
          } : {
            X: "right",
            Y: "top"
          }
        });
        if (this.overflowMode === "Extended") {
          popup.width = this.getToolbarPopupWidth(this.element);
          popup.offsetX = 0;
        }
        popup.appendTo(ele);
        document.addEventListener("scroll", this.clickEvent);
        document.addEventListener("click", this.scrollEvent);
        if (this.overflowMode !== "Extended") {
          popup.element.style.maxHeight = popup.element.offsetHeight + "px";
        }
        if (this.isVertical) {
          popup.element.style.visibility = "hidden";
        }
        if (this.isExtendedOpen) {
          var popupNav = this.element.querySelector("." + CLS_TBARNAV);
          popupNav.classList.add(CLS_TBARNAVACT);
          classList(popupNav.firstElementChild, [CLS_POPUPICON], [CLS_POPUPDOWN]);
          this.element.querySelector("." + CLS_EXTENDABLECLASS).classList.add(CLS_POPUPOPEN);
        } else {
          popup.hide();
        }
        this.popObj = popup;
      } else if (this.overflowMode !== "Extended") {
        var popupEle = this.popObj.element;
        setStyleAttribute2(popupEle, {
          maxHeight: "",
          display: "block"
        });
        setStyleAttribute2(popupEle, {
          maxHeight: popupEle.offsetHeight + "px",
          display: ""
        });
      }
    };
    Toolbar2.prototype.tbarPopupHandler = function(isOpen) {
      if (this.overflowMode === "Extended") {
        if (isOpen) {
          this.add(this.element, CLS_EXTENDEDPOPOPEN);
        } else {
          this.remove(this.element, CLS_EXTENDEDPOPOPEN);
        }
      }
    };
    Toolbar2.prototype.popupOpen = function(e) {
      var popObj = this.popObj;
      if (!this.isVertical) {
        popObj.offsetY = this.getElementOffsetY();
        popObj.dataBind();
      }
      var popupEle = this.popObj.element;
      var toolEle = this.popObj.element.parentElement;
      var popupNav = toolEle.querySelector("." + CLS_TBARNAV);
      popupNav.setAttribute("aria-expanded", "true");
      if (this.overflowMode === "Extended") {
        popObj.element.style.minHeight = "";
      } else {
        setStyleAttribute2(popObj.element, {
          height: "auto",
          maxHeight: ""
        });
        popObj.element.style.maxHeight = popObj.element.offsetHeight + "px";
      }
      var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top;
      var popIcon = popupNav.firstElementChild;
      popupNav.classList.add(CLS_TBARNAVACT);
      classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
      this.tbarPopupHandler(true);
      var scrollVal = isNullOrUndefined2(window.scrollY) ? 0 : window.scrollY;
      if (!this.isVertical && window.innerHeight + scrollVal < popupElePos && this.element.offsetTop < popupEle.offsetHeight) {
        var overflowHeight = popupEle.offsetHeight - (popupElePos - window.innerHeight - scrollVal + 5);
        popObj.height = overflowHeight + "px";
        for (var i = 0; i <= popupEle.childElementCount; i++) {
          var ele = popupEle.children[parseInt(i.toString(), 10)];
          if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
            overflowHeight = ele.offsetTop;
            break;
          }
        }
        if (this.overflowMode !== "Extended") {
          setStyleAttribute2(popObj.element, {
            maxHeight: overflowHeight + "px"
          });
        }
      } else if (this.isVertical && this.overflowMode !== "Extended") {
        var tbEleData = this.element.getBoundingClientRect();
        setStyleAttribute2(popObj.element, {
          maxHeight: tbEleData.top + this.element.offsetHeight + "px",
          bottom: 0,
          visibility: ""
        });
      }
      if (popObj) {
        var popupOffset = popupEle.getBoundingClientRect();
        if (popupOffset.right > document.documentElement.clientWidth && popupOffset.width > toolEle.getBoundingClientRect().width) {
          popObj.collision = {
            Y: "none"
          };
          popObj.dataBind();
        }
        popObj.refreshPosition();
      }
    };
    Toolbar2.prototype.popupClose = function(e) {
      var element2 = this.element;
      var popupNav = element2.querySelector("." + CLS_TBARNAV);
      popupNav.setAttribute("aria-expanded", "false");
      var popIcon = popupNav.firstElementChild;
      popupNav.classList.remove(CLS_TBARNAVACT);
      classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
      this.tbarPopupHandler(false);
    };
    Toolbar2.prototype.checkPriority = function(ele, inEle, eleWidth, pre) {
      var popPriority = this.popupPriCount > 0;
      var len = inEle.length;
      var eleWid = eleWidth;
      var eleOffset;
      var checkoffset;
      var sepCheck = 0;
      var itemCount = 0;
      var itemPopCount = 0;
      var checkClass = function(ele2, val) {
        var rVal = false;
        val.forEach(function(cls) {
          if (ele2.classList.contains(cls)) {
            rVal = true;
          }
        });
        return rVal;
      };
      for (var i = len - 1; i >= 0; i--) {
        var mrgn = void 0;
        var compuStyle = window.getComputedStyle(inEle[parseInt(i.toString(), 10)]);
        if (this.isVertical) {
          mrgn = parseFloat(compuStyle.marginTop);
          mrgn += parseFloat(compuStyle.marginBottom);
        } else {
          mrgn = parseFloat(compuStyle.marginRight);
          mrgn += parseFloat(compuStyle.marginLeft);
        }
        var fstEleCheck = inEle[parseInt(i.toString(), 10)] === this.tbarEle[0];
        if (fstEleCheck) {
          this.tbarEleMrgn = mrgn;
        }
        eleOffset = this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth;
        var eleWid_1 = fstEleCheck ? eleOffset + mrgn : eleOffset;
        if (checkClass(inEle[parseInt(i.toString(), 10)], [CLS_POPPRI]) && popPriority) {
          inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
          if (this.isVertical) {
            setStyleAttribute2(inEle[parseInt(i.toString(), 10)], {
              display: "none",
              minHeight: eleWid_1 + "px"
            });
          } else {
            setStyleAttribute2(inEle[parseInt(i.toString(), 10)], {
              display: "none",
              minWidth: eleWid_1 + "px"
            });
          }
          itemPopCount++;
        }
        if (this.isVertical) {
          checkoffset = inEle[parseInt(i.toString(), 10)].offsetTop + inEle[parseInt(i.toString(), 10)].offsetHeight + mrgn > eleWidth;
        } else {
          checkoffset = inEle[parseInt(i.toString(), 10)].offsetLeft + inEle[parseInt(i.toString(), 10)].offsetWidth + mrgn > eleWidth;
        }
        if (checkoffset) {
          if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
            if (this.overflowMode === "Extended") {
              var sepEle = inEle[parseInt(i.toString(), 10)];
              if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
                inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
                itemPopCount++;
              }
              itemCount++;
            } else if (this.overflowMode === "Popup") {
              if (sepCheck > 0 && itemCount === itemPopCount) {
                var sepEle = inEle[i + itemCount + (sepCheck - 1)];
                if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
                  setStyleAttribute2(sepEle, {
                    display: "none"
                  });
                }
              }
              sepCheck++;
              itemCount = 0;
              itemPopCount = 0;
            }
          } else {
            itemCount++;
          }
          if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_TBAROVERFLOW) && pre) {
            eleWidth -= (this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth) + mrgn;
          } else if (!checkClass(inEle[parseInt(i.toString(), 10)], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
            inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
            if (this.isVertical) {
              setStyleAttribute2(inEle[parseInt(i.toString(), 10)], {
                display: "none",
                minHeight: eleWid_1 + "px"
              });
            } else {
              setStyleAttribute2(inEle[parseInt(i.toString(), 10)], {
                display: "none",
                minWidth: eleWid_1 + "px"
              });
            }
            itemPopCount++;
          } else {
            eleWidth -= (this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth) + mrgn;
          }
        }
      }
      if (pre) {
        var popedEle = selectAll2("." + CLS_ITEM + ":not(." + CLS_POPUP + ")", this.element);
        this.checkPriority(ele, popedEle, eleWid, false);
      }
    };
    Toolbar2.prototype.createPopupIcon = function(element2) {
      var id = element2.id.concat("_nav");
      var className = "e-" + element2.id.concat("_nav " + CLS_POPUPNAV);
      className = this.overflowMode === "Extended" ? className + " " + CLS_EXTENDPOPUP : className;
      var nav = this.createElement("div", {
        id,
        className
      });
      if (Browser2.info.name === "msie" || Browser2.info.name === "edge") {
        nav.classList.add("e-ie-align");
      }
      var navItem = this.createElement("div", {
        className: CLS_POPUPDOWN + " e-icons"
      });
      nav.appendChild(navItem);
      nav.setAttribute("tabindex", "0");
      nav.setAttribute("role", "button");
      element2.appendChild(nav);
    };
    Toolbar2.prototype.tbarPriRef = function(inEle, indx, sepPri, el, des, elWid, wid, ig, eleStyles) {
      var ignoreCount = ig;
      var popEle = this.popObj.element;
      var query = "." + CLS_ITEM + ":not(." + CLS_SEPARATOR + "):not(." + CLS_TBAROVERFLOW + ")";
      var priEleCnt = selectAll2("." + CLS_POPUP + ":not(." + CLS_TBAROVERFLOW + ")", popEle).length;
      var checkClass = function(ele, val) {
        return ele.classList.contains(val);
      };
      if (selectAll2(query, inEle).length === 0) {
        var eleSep = inEle.children[indx - (indx - sepPri) - 1];
        var ignoreCheck = !isNullOrUndefined2(eleSep) && checkClass(eleSep, CLS_TBARIGNORE);
        if (!isNullOrUndefined2(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible2(eleSep) || ignoreCheck) {
          eleSep.style.display = "unset";
          var eleSepWidth = eleSep.offsetWidth + parseFloat(window.getComputedStyle(eleSep).marginRight) * 2;
          var prevSep = eleSep.previousElementSibling;
          if (elWid + eleSepWidth < wid || des) {
            inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]);
            if (!isNullOrUndefined2(prevSep)) {
              prevSep.style.display = "";
            }
          } else {
            setStyleAttribute2(el, eleStyles);
            if (prevSep.classList.contains(CLS_SEPARATOR)) {
              prevSep.style.display = "none";
            }
          }
          eleSep.style.display = "";
        } else {
          inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]);
        }
      } else {
        inEle.insertBefore(el, inEle.children[indx + ignoreCount - priEleCnt]);
      }
    };
    Toolbar2.prototype.popupRefresh = function(popupEle, destroy5) {
      var _this = this;
      var ele = this.element;
      var isVer = this.isVertical;
      var innerEle = ele.querySelector("." + CLS_ITEMS);
      var popNav = ele.querySelector("." + CLS_TBARNAV);
      if (isNullOrUndefined2(popNav)) {
        return;
      }
      innerEle.removeAttribute("style");
      popupEle.style.display = "block";
      var dimension;
      if (isVer) {
        dimension = ele.offsetHeight - (popNav.offsetHeight + innerEle.offsetHeight);
      } else {
        dimension = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);
      }
      var popupEleWidth = 0;
      [].slice.call(popupEle.children).forEach(function(el) {
        popupEleWidth += _this.popupEleWidth(el);
        setStyleAttribute2(el, {
          "position": ""
        });
      });
      if (dimension + (isVer ? popNav.offsetHeight : popNav.offsetWidth) > popupEleWidth && this.popupPriCount === 0) {
        destroy5 = true;
      }
      this.popupEleRefresh(dimension, popupEle, destroy5);
      popupEle.style.display = "";
      if (popupEle.children.length === 0 && popNav && this.popObj) {
        detach2(popNav);
        popNav = null;
        this.popObj.destroy();
        detach2(this.popObj.element);
        this.popObj = null;
      }
    };
    Toolbar2.prototype.ignoreEleFetch = function(index, innerEle) {
      var ignoreEle = [].slice.call(innerEle.querySelectorAll("." + CLS_TBARIGNORE));
      var ignoreInx = [];
      var count = 0;
      if (ignoreEle.length > 0) {
        ignoreEle.forEach(function(ele) {
          ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
        });
      } else {
        return 0;
      }
      ignoreInx.forEach(function(val) {
        if (val <= index) {
          count++;
        }
      });
      return count;
    };
    Toolbar2.prototype.checkPopupRefresh = function(root, popEle) {
      popEle.style.display = "block";
      var elWid = this.popupEleWidth(popEle.firstElementChild);
      popEle.firstElementChild.style.removeProperty("Position");
      var tbarWidth = root.offsetWidth - root.querySelector("." + CLS_TBARNAV).offsetWidth;
      var tbarItemsWid = root.querySelector("." + CLS_ITEMS).offsetWidth;
      popEle.style.removeProperty("display");
      if (tbarWidth > elWid + tbarItemsWid) {
        return true;
      }
      return false;
    };
    Toolbar2.prototype.popupEleWidth = function(el) {
      el.style.position = "absolute";
      var elWidth = this.isVertical ? el.offsetHeight : el.offsetWidth;
      var btnText = el.querySelector("." + CLS_TBARBTNTEXT);
      if (el.classList.contains("e-tbtn-align") || el.classList.contains(CLS_TBARTEXT)) {
        var btn = el.children[0];
        if (!isNullOrUndefined2(btnText) && el.classList.contains(CLS_TBARTEXT)) {
          btnText.style.display = "none";
        } else if (!isNullOrUndefined2(btnText) && el.classList.contains(CLS_POPUPTEXT)) {
          btnText.style.display = "block";
        }
        btn.style.minWidth = "0%";
        elWidth = parseFloat(!this.isVertical ? el.style.minWidth : el.style.minHeight);
        btn.style.minWidth = "";
        btn.style.minHeight = "";
        if (!isNullOrUndefined2(btnText)) {
          btnText.style.display = "";
        }
      }
      return elWidth;
    };
    Toolbar2.prototype.popupEleRefresh = function(width, popupEle, destroy5) {
      var popPriority = this.popupPriCount > 0;
      var eleSplice = this.tbarEle;
      var priEleCnt;
      var index;
      var innerEle = this.element.querySelector("." + CLS_ITEMS);
      var ignoreCount = 0;
      var _loop_1 = function(el2) {
        if (el2.classList.contains(CLS_POPPRI) && popPriority && !destroy5) {
          return "continue";
        }
        var elWidth = this_1.popupEleWidth(el2);
        if (el2 === this_1.tbarEle[0]) {
          elWidth += this_1.tbarEleMrgn;
        }
        el2.style.position = "";
        if (elWidth < width || destroy5) {
          var inlineStyles = {
            minWidth: el2.style.minWidth,
            height: el2.style.height,
            minHeight: el2.style.minHeight
          };
          setStyleAttribute2(el2, {
            minWidth: "",
            height: "",
            minHeight: ""
          });
          if (!el2.classList.contains(CLS_POPOVERFLOW)) {
            el2.classList.remove(CLS_POPUP);
          }
          index = this_1.tbarEle.indexOf(el2);
          if (this_1.tbarAlign) {
            var pos = this_1.items[parseInt(index.toString(), 10)].align;
            index = this_1.tbarAlgEle[(pos + "s").toLowerCase()].indexOf(el2);
            eleSplice = this_1.tbarAlgEle[(pos + "s").toLowerCase()];
            innerEle = this_1.element.querySelector("." + CLS_ITEMS + " .e-toolbar-" + pos.toLowerCase());
          }
          var sepBeforePri_1 = 0;
          if (this_1.overflowMode !== "Extended") {
            eleSplice.slice(0, index).forEach(function(el3) {
              if (el3.classList.contains(CLS_TBAROVERFLOW) || el3.classList.contains(CLS_SEPARATOR)) {
                if (el3.classList.contains(CLS_SEPARATOR)) {
                  el3.style.display = "";
                  width -= el3.offsetWidth;
                }
                sepBeforePri_1++;
              }
            });
          }
          ignoreCount = this_1.ignoreEleFetch(index, innerEle);
          if (el2.classList.contains(CLS_TBAROVERFLOW)) {
            this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el2, destroy5, elWidth, width, ignoreCount, inlineStyles);
            width -= el2.offsetWidth;
          } else if (index === 0) {
            innerEle.insertBefore(el2, innerEle.firstChild);
            width -= el2.offsetWidth;
          } else {
            priEleCnt = selectAll2("." + CLS_TBAROVERFLOW, this_1.popObj.element).length;
            innerEle.insertBefore(el2, innerEle.children[index + ignoreCount - priEleCnt]);
            width -= el2.offsetWidth;
          }
          el2.style.height = "";
        } else {
          return "break";
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {
        var el = _a[_i];
        var state_1 = _loop_1(el);
        if (state_1 === "break") break;
      }
      var checkOverflow = this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS)[0]);
      if (checkOverflow && !destroy5) {
        this.renderOverflowMode();
      }
    };
    Toolbar2.prototype.removePositioning = function() {
      var item = this.element.querySelector("." + CLS_ITEMS);
      if (isNullOrUndefined2(item) || !item.classList.contains(CLS_TBARPOS)) {
        return;
      }
      this.remove(item, CLS_TBARPOS);
      var innerItem = [].slice.call(item.childNodes);
      innerItem[1].removeAttribute("style");
      innerItem[2].removeAttribute("style");
    };
    Toolbar2.prototype.refreshPositioning = function() {
      var item = this.element.querySelector("." + CLS_ITEMS);
      this.add(item, CLS_TBARPOS);
      this.itemPositioning();
    };
    Toolbar2.prototype.itemPositioning = function() {
      var item = this.element.querySelector("." + CLS_ITEMS);
      var margin;
      if (isNullOrUndefined2(item) || !item.classList.contains(CLS_TBARPOS)) {
        return;
      }
      var popupNav = this.element.querySelector("." + CLS_TBARNAV);
      var innerItem;
      if (this.scrollModule) {
        var trgClass = this.isVertical ? CLS_VSCROLLCNT : CLS_HSCROLLCNT;
        innerItem = [].slice.call(item.querySelector("." + trgClass).children);
      } else {
        innerItem = [].slice.call(item.childNodes);
      }
      if (this.isVertical) {
        margin = innerItem[0].offsetHeight + innerItem[2].offsetHeight;
      } else {
        margin = innerItem[0].offsetWidth + innerItem[2].offsetWidth;
      }
      var tbarWid = this.isVertical ? this.element.offsetHeight : this.element.offsetWidth;
      if (popupNav) {
        tbarWid -= this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth;
        var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + "px";
        innerItem[2].removeAttribute("style");
        if (this.isVertical) {
          if (this.enableRtl) {
            innerItem[2].style.top = popWid;
          } else {
            innerItem[2].style.bottom = popWid;
          }
        } else {
          if (this.enableRtl) {
            innerItem[2].style.left = popWid;
          } else {
            innerItem[2].style.right = popWid;
          }
        }
      }
      if (tbarWid <= margin) {
        return;
      }
      var value = (tbarWid - margin - (!this.isVertical ? innerItem[1].offsetWidth : innerItem[1].offsetHeight)) / 2;
      innerItem[1].removeAttribute("style");
      var mrgn = (!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value + "px";
      if (this.isVertical) {
        if (this.enableRtl) {
          innerItem[1].style.marginBottom = mrgn;
        } else {
          innerItem[1].style.marginTop = mrgn;
        }
      } else {
        if (this.enableRtl) {
          innerItem[1].style.marginRight = mrgn;
        } else {
          innerItem[1].style.marginLeft = mrgn;
        }
      }
    };
    Toolbar2.prototype.tbarItemAlign = function(item, itemEle, pos) {
      var _this = this;
      if (item.showAlwaysInPopup && item.overflow !== "Show") {
        return;
      }
      var alignDiv = [];
      alignDiv.push(this.createElement("div", {
        className: CLS_TBARLEFT,
        attrs: {
          role: "group"
        }
      }));
      alignDiv.push(this.createElement("div", {
        className: CLS_TBARCENTER,
        attrs: {
          role: "group"
        }
      }));
      alignDiv.push(this.createElement("div", {
        className: CLS_TBARRIGHT,
        attrs: {
          role: "group"
        }
      }));
      if (pos === 0 && item.align !== "Left") {
        alignDiv.forEach(function(ele) {
          itemEle.appendChild(ele);
        });
        this.tbarAlign = true;
        this.add(itemEle, CLS_TBARPOS);
      } else if (item.align !== "Left") {
        var alignEle = itemEle.childNodes;
        var leftAlign_1 = alignDiv[0];
        [].slice.call(alignEle).forEach(function(el) {
          _this.tbarAlgEle.lefts.push(el);
          leftAlign_1.appendChild(el);
        });
        itemEle.appendChild(leftAlign_1);
        itemEle.appendChild(alignDiv[1]);
        itemEle.appendChild(alignDiv[2]);
        this.tbarAlign = true;
        this.add(itemEle, CLS_TBARPOS);
      }
    };
    Toolbar2.prototype.ctrlTemplate = function() {
      var _this = this;
      this.ctrlTem = this.trgtEle.cloneNode(true);
      this.add(this.trgtEle, CLS_ITEMS);
      this.tbarEle = [];
      var innerEle = [].slice.call(this.trgtEle.children);
      innerEle.forEach(function(ele) {
        if (ele.tagName === "DIV") {
          _this.tbarEle.push(ele);
          if (!isNullOrUndefined2(ele.firstElementChild)) {
            ele.firstElementChild.setAttribute("aria-disabled", "false");
          }
          _this.add(ele, CLS_ITEM);
        }
      });
    };
    Toolbar2.prototype.renderItems = function() {
      var ele = this.element;
      var items = this.items;
      if (this.trgtEle != null) {
        this.ctrlTemplate();
      } else if (ele && items.length > 0) {
        var itemEleDom = void 0;
        if (ele && ele.children.length > 0) {
          itemEleDom = ele.querySelector("." + CLS_ITEMS);
        }
        if (!itemEleDom) {
          itemEleDom = this.createElement("div", {
            className: CLS_ITEMS
          });
        }
        this.itemsAlign(items, itemEleDom);
        ele.appendChild(itemEleDom);
      }
    };
    Toolbar2.prototype.setAttr = function(attr, element2) {
      var key = Object.keys(attr);
      var keyVal;
      for (var i = 0; i < key.length; i++) {
        keyVal = key[parseInt(i.toString(), 10)];
        if (keyVal === "class") {
          this.add(element2, attr["" + keyVal]);
        } else {
          element2.setAttribute(keyVal, attr["" + keyVal]);
        }
      }
    };
    Toolbar2.prototype.enableItems = function(items, isEnable) {
      var elements = items;
      var len = elements.length;
      var ele;
      if (isNullOrUndefined2(isEnable)) {
        isEnable = true;
      }
      var enable = function(isEnable2, ele2) {
        if (isEnable2) {
          ele2.classList.remove(CLS_DISABLE3);
          if (!isNullOrUndefined2(ele2.firstElementChild)) {
            ele2.firstElementChild.setAttribute("aria-disabled", "false");
          }
        } else {
          ele2.classList.add(CLS_DISABLE3);
          if (!isNullOrUndefined2(ele2.firstElementChild)) {
            ele2.firstElementChild.setAttribute("aria-disabled", "true");
          }
        }
      };
      if (!isNullOrUndefined2(len) && len >= 1) {
        for (var a = 0, element2 = [].slice.call(elements); a < len; a++) {
          var itemElement = element2[parseInt(a.toString(), 10)];
          if (typeof itemElement === "number") {
            ele = this.getElementByIndex(itemElement);
            if (isNullOrUndefined2(ele)) {
              return;
            } else {
              elements[parseInt(a.toString(), 10)] = ele;
            }
          } else {
            ele = itemElement;
          }
          enable(isEnable, ele);
        }
        if (isEnable) {
          removeClass2(elements, CLS_DISABLE3);
        } else {
          addClass2(elements, CLS_DISABLE3);
        }
      } else {
        if (typeof elements === "number") {
          ele = this.getElementByIndex(elements);
          if (isNullOrUndefined2(ele)) {
            return;
          }
        } else {
          ele = items;
        }
        enable(isEnable, ele);
      }
    };
    Toolbar2.prototype.getElementByIndex = function(index) {
      if (this.tbarEle[parseInt(index.toString(), 10)]) {
        return this.tbarEle[parseInt(index.toString(), 10)];
      }
      return null;
    };
    Toolbar2.prototype.addItems = function(items, index) {
      var innerItems;
      this.extendedOpen();
      var itemsDiv = this.element.querySelector("." + CLS_ITEMS);
      if (isNullOrUndefined2(itemsDiv)) {
        this.itemsRerender(items);
        return;
      }
      var innerEle;
      var itemAgn = "Left";
      if (isNullOrUndefined2(index)) {
        index = 0;
      }
      items.forEach(function(e) {
        if (!isNullOrUndefined2(e.align) && e.align !== "Left" && itemAgn === "Left") {
          itemAgn = e.align;
        }
      });
      for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
        var item = items_1[_i];
        if (isNullOrUndefined2(item.type)) {
          item.type = "Button";
        }
        innerItems = selectAll2("." + CLS_ITEM, this.element);
        item.align = itemAgn;
        innerEle = this.renderSubComponent(item, index);
        if (this.tbarEle.length >= index && innerItems.length >= 0) {
          if (isNullOrUndefined2(this.scrollModule)) {
            this.destroyMode();
          }
          var algIndex = item.align[0] === "L" ? 0 : item.align[0] === "C" ? 1 : 2;
          var ele = void 0;
          if (!this.tbarAlign && itemAgn !== "Left") {
            this.tbarItemAlign(item, itemsDiv, 1);
            this.tbarAlign = true;
            ele = closest2(innerItems[0], "." + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
            ele.appendChild(innerEle);
            this.tbarAlgEle[(item.align + "s").toLowerCase()].push(innerEle);
            this.refreshPositioning();
          } else if (this.tbarAlign) {
            ele = closest2(innerItems[0], "." + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];
            ele.insertBefore(innerEle, ele.children[parseInt(index.toString(), 10)]);
            this.tbarAlgEle[(item.align + "s").toLowerCase()].splice(index, 0, innerEle);
            this.refreshPositioning();
          } else if (innerItems.length === 0) {
            innerItems = selectAll2("." + CLS_ITEMS, this.element);
            innerItems[0].appendChild(innerEle);
          } else {
            innerItems[0].parentNode.insertBefore(innerEle, innerItems[parseInt(index.toString(), 10)]);
          }
          this.items.splice(index, 0, item);
          if (item.template) {
            this.tbarEle.splice(this.tbarEle.length - 1, 1);
          }
          this.tbarEle.splice(index, 0, innerEle);
          index++;
          this.offsetWid = itemsDiv.offsetWidth;
        }
      }
      itemsDiv.style.width = "";
      this.renderOverflowMode();
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Toolbar2.prototype.removeItems = function(args) {
      var elements = args;
      var index;
      var innerItems = [].slice.call(selectAll2("." + CLS_ITEM, this.element));
      if (typeof elements === "number") {
        index = parseInt(args.toString(), 10);
        this.removeItemByIndex(index, innerItems);
      } else {
        if (elements && elements.length > 1) {
          for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
            var ele = _a[_i];
            index = this.tbarEle.indexOf(ele);
            this.removeItemByIndex(index, innerItems);
            innerItems = selectAll2("." + CLS_ITEM, this.element);
          }
        } else {
          var ele = elements && elements.length && elements.length === 1 ? elements[0] : args;
          index = innerItems.indexOf(ele);
          this.removeItemByIndex(index, innerItems);
        }
      }
      this.resize();
    };
    Toolbar2.prototype.removeItemByIndex = function(index, innerItems) {
      if (this.tbarEle[parseInt(index.toString(), 10)] && innerItems[parseInt(index.toString(), 10)]) {
        var eleIdx = this.tbarEle.indexOf(innerItems[parseInt(index.toString(), 10)]);
        if (this.tbarAlign) {
          var indexAgn = this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + "s").toLowerCase()].indexOf(this.tbarEle[parseInt(eleIdx.toString(), 10)]);
          this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + "s").toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
        }
        if (this.isReact) {
          this.clearToolbarTemplate(innerItems[parseInt(index.toString(), 10)]);
        }
        var btnItem = innerItems[parseInt(index.toString(), 10)].querySelector(".e-control.e-btn");
        if (!isNullOrUndefined2(btnItem) && !isNullOrUndefined2(btnItem.ej2_instances[0]) && !btnItem.ej2_instances[0].isDestroyed) {
          btnItem.ej2_instances[0].destroy();
        }
        detach2(innerItems[parseInt(index.toString(), 10)]);
        this.items.splice(eleIdx, 1);
        this.tbarEle.splice(eleIdx, 1);
      }
    };
    Toolbar2.prototype.templateRender = function(templateProp, innerEle, item, index) {
      var itemType = item.type;
      var eleObj = templateProp;
      var isComponent;
      if (typeof templateProp === "object") {
        isComponent = typeof eleObj.appendTo === "function";
      }
      if (typeof templateProp === "string" || !isComponent) {
        var templateFn = void 0;
        var val = templateProp;
        var regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
        val = typeof templateProp === "string" ? templateProp.trim() : templateProp;
        try {
          if (typeof templateProp === "object" && !isNullOrUndefined2(templateProp.tagName)) {
            innerEle.appendChild(templateProp);
          } else if (typeof templateProp === "string" && regEx.test(val)) {
            innerEle.innerHTML = val;
          } else if (document.querySelectorAll(val).length) {
            var ele = document.querySelector(val);
            var tempStr = ele.outerHTML.trim();
            innerEle.appendChild(ele);
            ele.style.display = "";
            if (!isNullOrUndefined2(tempStr)) {
              this.tempId.push(val);
            }
          } else {
            templateFn = compile4(val);
          }
        } catch (e) {
          templateFn = compile4(val);
        }
        var tempArray = void 0;
        if (!isNullOrUndefined2(templateFn)) {
          var toolbarTemplateID = this.element.id + index + "_template";
          tempArray = templateFn({}, this, "template", toolbarTemplateID, this.isStringTemplate, void 0, void 0, this.root);
        }
        if (!isNullOrUndefined2(tempArray) && tempArray.length > 0) {
          [].slice.call(tempArray).forEach(function(ele2) {
            if (!isNullOrUndefined2(ele2.tagName)) {
              ele2.style.display = "";
            }
            innerEle.appendChild(ele2);
          });
        }
      } else if (itemType === "Input") {
        var ele = this.createElement("input");
        if (item.id) {
          ele.id = item.id;
        } else {
          ele.id = getUniqueID("tbr-ipt");
        }
        innerEle.appendChild(ele);
        eleObj.appendTo(ele);
      }
      this.add(innerEle, CLS_TEMPLATE);
      var firstChild = innerEle.firstElementChild;
      if (!isNullOrUndefined2(firstChild)) {
        firstChild.setAttribute("tabindex", isNullOrUndefined2(firstChild.getAttribute("tabIndex")) ? "-1" : this.getDataTabindex(firstChild));
        firstChild.setAttribute("data-tabindex", isNullOrUndefined2(firstChild.getAttribute("tabIndex")) ? "-1" : this.getDataTabindex(firstChild));
      }
      this.tbarEle.push(innerEle);
    };
    Toolbar2.prototype.buttonRendering = function(item, innerEle) {
      var dom = this.createElement("button", {
        className: CLS_TBARBTN
      });
      dom.setAttribute("type", "button");
      var textStr = item.text;
      var iconCss;
      var iconPos;
      if (item.id) {
        dom.id = item.id;
      } else {
        dom.id = getUniqueID("e-tbr-btn");
      }
      var btnTxt = this.createElement("span", {
        className: "e-tbar-btn-text"
      });
      if (textStr) {
        btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(textStr) : textStr;
        dom.appendChild(btnTxt);
        dom.classList.add("e-tbtn-txt");
      } else {
        this.add(innerEle, "e-tbtn-align");
      }
      if (item.prefixIcon || item.suffixIcon) {
        if (item.prefixIcon && item.suffixIcon || item.prefixIcon) {
          iconCss = item.prefixIcon + " e-icons";
          iconPos = "Left";
        } else {
          iconCss = item.suffixIcon + " e-icons";
          iconPos = "Right";
        }
      }
      var btnObj = new Button({
        iconCss,
        iconPosition: iconPos
      });
      btnObj.createElement = this.createElement;
      btnObj.appendTo(dom);
      if (item.width) {
        setStyleAttribute2(dom, {
          "width": formatUnit(item.width)
        });
      }
      return dom;
    };
    Toolbar2.prototype.renderSubComponent = function(item, index) {
      var dom;
      var innerEle = this.createElement("div", {
        className: CLS_ITEM
      });
      var tempDom = this.createElement("div", {
        innerHTML: this.enableHtmlSanitizer && !isNullOrUndefined2(item.tooltipText) ? SanitizeHtmlHelper2.sanitize(item.tooltipText) : item.tooltipText
      });
      if (!this.tbarEle) {
        this.tbarEle = [];
      }
      if (item.htmlAttributes) {
        this.setAttr(item.htmlAttributes, innerEle);
      }
      if (item.tooltipText) {
        innerEle.setAttribute("title", tempDom.textContent);
      }
      if (item.cssClass) {
        innerEle.className = innerEle.className + " " + item.cssClass;
      }
      if (item.template) {
        this.templateRender(item.template, innerEle, item, index);
      } else {
        switch (item.type) {
          case "Button":
            dom = this.buttonRendering(item, innerEle);
            dom.setAttribute("tabindex", isNullOrUndefined2(item.tabIndex) ? "-1" : item.tabIndex.toString());
            dom.setAttribute("data-tabindex", isNullOrUndefined2(item.tabIndex) ? "-1" : item.tabIndex.toString());
            dom.setAttribute("aria-label", item.text || item.tooltipText);
            dom.setAttribute("aria-disabled", "false");
            innerEle.appendChild(dom);
            innerEle.addEventListener("click", this.itemClick.bind(this));
            break;
          case "Separator":
            this.add(innerEle, CLS_SEPARATOR);
            break;
        }
      }
      if (item.showTextOn) {
        var sTxt = item.showTextOn;
        if (sTxt === "Toolbar") {
          this.add(innerEle, CLS_POPUPTEXT);
          this.add(innerEle, "e-tbtn-align");
        } else if (sTxt === "Overflow") {
          this.add(innerEle, CLS_TBARTEXT);
        }
      }
      if (item.overflow) {
        var overflow = item.overflow;
        if (overflow === "Show") {
          this.add(innerEle, CLS_TBAROVERFLOW);
        } else if (overflow === "Hide") {
          if (!innerEle.classList.contains(CLS_SEPARATOR)) {
            this.add(innerEle, CLS_POPOVERFLOW);
          }
        }
      }
      if (item.overflow !== "Show" && item.showAlwaysInPopup && !innerEle.classList.contains(CLS_SEPARATOR)) {
        this.add(innerEle, CLS_POPPRI);
        this.popupPriCount++;
      }
      if (item.disabled) {
        this.add(innerEle, CLS_DISABLE3);
      }
      if (item.visible === false) {
        this.add(innerEle, CLS_HIDDEN);
      }
      return innerEle;
    };
    Toolbar2.prototype.getDataTabindex = function(ele) {
      return isNullOrUndefined2(ele.getAttribute("data-tabindex")) ? "-1" : ele.getAttribute("data-tabindex");
    };
    Toolbar2.prototype.itemClick = function(e) {
      this.activeEleSwitch(e.currentTarget);
    };
    Toolbar2.prototype.activeEleSwitch = function(ele) {
      this.activeEleRemove(ele.firstElementChild);
      this.activeEle.focus();
    };
    Toolbar2.prototype.activeEleRemove = function(curEle) {
      var previousEle = this.element.querySelector("." + CLS_ITEM + ":not(." + CLS_DISABLE3 + " ):not(." + CLS_SEPARATOR + " ):not(." + CLS_HIDDEN + " )");
      if (!isNullOrUndefined2(this.activeEle)) {
        this.activeEle.setAttribute("tabindex", this.getDataTabindex(this.activeEle));
        if (previousEle) {
          previousEle.removeAttribute("tabindex");
        }
        previousEle = this.activeEle;
      }
      this.activeEle = curEle;
      if (this.getDataTabindex(this.activeEle) === "-1") {
        if (isNullOrUndefined2(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {
          if (!isNullOrUndefined2(this.element.querySelector(".e-hor-nav")) && this.element.querySelector(".e-hor-nav").classList.contains("e-nav-active")) {
            this.updateTabIndex("0");
            var tabindexValue = this.getDataTabindex(previousEle) === "-1" ? "0" : this.getDataTabindex(previousEle);
            previousEle.setAttribute("tabindex", tabindexValue);
          } else {
            this.updateTabIndex("-1");
          }
          curEle.removeAttribute("tabindex");
        } else {
          var tabIndex = parseInt(this.getDataTabindex(this.activeEle), 10) + 1;
          this.activeEle.setAttribute("tabindex", tabIndex.toString());
        }
      }
    };
    Toolbar2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    Toolbar2.prototype.getModuleName = function() {
      return "toolbar";
    };
    Toolbar2.prototype.itemsRerender = function(newProp) {
      this.items = this.tbarItemsCol;
      if (this.isReact || this.isAngular) {
        this.clearTemplate();
      }
      this.destroyMode();
      this.destroyItems();
      this.items = newProp;
      this.tbarItemsCol = this.items;
      this.renderItems();
      this.renderOverflowMode();
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Toolbar2.prototype.resize = function() {
      var ele = this.element;
      this.tbResize = true;
      if (this.tbarAlign) {
        this.itemPositioning();
      }
      if (this.popObj && this.overflowMode === "Popup") {
        this.popObj.hide();
      }
      var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);
      if (!checkOverflow) {
        this.destroyScroll();
        var multirowele = ele.querySelector("." + CLS_ITEMS);
        if (!isNullOrUndefined2(multirowele)) {
          this.remove(multirowele, CLS_MULTIROWPOS);
          if (this.tbarAlign) {
            this.add(multirowele, CLS_TBARPOS);
          }
        }
      }
      if (checkOverflow && this.scrollModule && this.offsetWid === ele.offsetWidth) {
        return;
      }
      if (this.offsetWid > ele.offsetWidth || checkOverflow) {
        this.renderOverflowMode();
      }
      if (this.popObj) {
        if (this.overflowMode === "Extended") {
          this.popObj.width = this.getToolbarPopupWidth(this.element);
        }
        if (this.tbarAlign) {
          this.removePositioning();
        }
        this.popupRefresh(this.popObj.element, false);
        if (this.tbarAlign) {
          this.refreshPositioning();
        }
      }
      if (this.element.querySelector("." + CLS_HSCROLLBAR2)) {
        this.scrollStep = this.element.querySelector("." + CLS_HSCROLLBAR2).offsetWidth;
      }
      this.offsetWid = ele.offsetWidth;
      this.tbResize = false;
      this.separator();
    };
    Toolbar2.prototype.orientationChange = function() {
      var _this = this;
      setTimeout(function() {
        _this.resize();
      }, 500);
    };
    Toolbar2.prototype.extendedOpen = function() {
      var sib = this.element.querySelector("." + CLS_EXTENDABLECLASS);
      if (this.overflowMode === "Extended" && sib) {
        this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);
      }
    };
    Toolbar2.prototype.updateHideEleTabIndex = function(ele, isHidden, isElement, eleIndex, innerItems) {
      if (isElement) {
        eleIndex = innerItems.indexOf(ele);
      }
      var nextEle = innerItems[++eleIndex];
      while (nextEle) {
        var skipEle = this.eleContains(nextEle);
        if (!skipEle) {
          var dataTabIndex = nextEle.firstElementChild.getAttribute("data-tabindex");
          if (isHidden && dataTabIndex === "-1") {
            nextEle.firstElementChild.setAttribute("tabindex", "0");
          } else if (dataTabIndex !== nextEle.firstElementChild.getAttribute("tabindex")) {
            nextEle.firstElementChild.setAttribute("tabindex", dataTabIndex);
          }
          break;
        }
        nextEle = innerItems[++eleIndex];
      }
    };
    Toolbar2.prototype.clearToolbarTemplate = function(templateEle) {
      if (this.registeredTemplate && this.registeredTemplate["template"]) {
        var registeredTemplates = this.registeredTemplate;
        for (var index = 0; index < registeredTemplates["template"].length; index++) {
          var registeredItem = registeredTemplates["template"][parseInt(index.toString(), 10)].rootNodes[0];
          var closestItem = closest2(registeredItem, "." + CLS_ITEM);
          if (!isNullOrUndefined2(closestItem) && closestItem === templateEle) {
            this.clearTemplate(["template"], [registeredTemplates["template"][parseInt(index.toString(), 10)]]);
            break;
          }
        }
      } else if (this.portals && this.portals.length > 0) {
        var portals = this.portals;
        for (var index = 0; index < portals.length; index++) {
          var portalItem = portals[parseInt(index.toString(), 10)];
          var closestItem = closest2(portalItem.containerInfo, "." + CLS_ITEM);
          if (!isNullOrUndefined2(closestItem) && closestItem === templateEle) {
            this.clearTemplate(["template"], index);
            break;
          }
        }
      }
    };
    Toolbar2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var tEle = this.element;
      this.extendedOpen();
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "items":
            if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
              var changedProb = Object.keys(newProp.items);
              for (var i = 0; i < changedProb.length; i++) {
                var index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
                var property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
                var newProperty = Object(newProp.items[parseInt(index.toString(), 10)])["" + property];
                if (this.tbarAlign || property === "align") {
                  this.refresh();
                  this.trigger("created");
                  break;
                }
                var popupPriCheck = property === "showAlwaysInPopup" && !newProperty;
                var booleanCheck = property === "overflow" && this.popupPriCount !== 0;
                if (popupPriCheck || this.items[parseInt(index.toString(), 10)].showAlwaysInPopup && booleanCheck) {
                  --this.popupPriCount;
                }
                if (isNullOrUndefined2(this.scrollModule)) {
                  this.destroyMode();
                }
                var itemCol = [].slice.call(selectAll2("." + CLS_ITEMS + " ." + CLS_ITEM, tEle));
                if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
                  this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);
                }
                detach2(itemCol[parseInt(index.toString(), 10)]);
                this.tbarEle.splice(index, 1);
                this.addItems([this.items[parseInt(index.toString(), 10)]], index);
                this.items.splice(index, 1);
                if (this.items[parseInt(index.toString(), 10)].template) {
                  this.tbarEle.splice(this.items.length, 1);
                }
              }
            } else {
              this.itemsRerender(newProp.items);
            }
            break;
          case "width":
            setStyleAttribute2(tEle, {
              "width": formatUnit(newProp.width)
            });
            this.refreshOverflow();
            break;
          case "height":
            setStyleAttribute2(this.element, {
              "height": formatUnit(newProp.height)
            });
            break;
          case "overflowMode":
            this.destroyMode();
            this.renderOverflowMode();
            if (this.enableRtl) {
              this.add(tEle, CLS_RTL3);
            }
            this.refreshOverflow();
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              this.add(tEle, CLS_RTL3);
            } else {
              this.remove(tEle, CLS_RTL3);
            }
            if (!isNullOrUndefined2(this.scrollModule)) {
              if (newProp.enableRtl) {
                this.add(this.scrollModule.element, CLS_RTL3);
              } else {
                this.remove(this.scrollModule.element, CLS_RTL3);
              }
            }
            if (!isNullOrUndefined2(this.popObj)) {
              if (newProp.enableRtl) {
                this.add(this.popObj.element, CLS_RTL3);
              } else {
                this.remove(this.popObj.element, CLS_RTL3);
              }
            }
            if (this.tbarAlign) {
              this.itemPositioning();
            }
            break;
          case "scrollStep":
            if (this.scrollModule) {
              this.scrollModule.scrollStep = this.scrollStep;
            }
            break;
          case "enableCollision":
            if (this.popObj) {
              this.popObj.collision = {
                Y: this.enableCollision ? "flip" : "none"
              };
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.element], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([this.element], newProp.cssClass.split(" "));
            }
            break;
          case "allowKeyboard":
            this.unwireKeyboardEvent();
            if (newProp.allowKeyboard) {
              this.wireKeyboardEvent();
            }
            break;
        }
      }
    };
    Toolbar2.prototype.hideItem = function(index, value) {
      var isElement = typeof index === "object" ? true : false;
      var eleIndex = index;
      var ele;
      if (!isElement && isNullOrUndefined2(eleIndex)) {
        return;
      }
      var innerItems = [].slice.call(selectAll2("." + CLS_ITEM, this.element));
      if (isElement) {
        ele = index;
      } else if (this.tbarEle[parseInt(eleIndex.toString(), 10)]) {
        var innerItems_1 = [].slice.call(selectAll2("." + CLS_ITEM, this.element));
        ele = innerItems_1[parseInt(eleIndex.toString(), 10)];
      }
      if (ele) {
        if (value) {
          ele.classList.add(CLS_HIDDEN);
          if (!ele.classList.contains(CLS_SEPARATOR)) {
            if (isNullOrUndefined2(ele.firstElementChild.getAttribute("tabindex")) || ele.firstElementChild.getAttribute("tabindex") !== "-1") {
              this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
            }
          }
        } else {
          ele.classList.remove(CLS_HIDDEN);
          if (!ele.classList.contains(CLS_SEPARATOR)) {
            this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);
          }
        }
        this.refreshOverflow();
      }
    };
    __decorate71([Collection([], Item2)], Toolbar2.prototype, "items", void 0);
    __decorate71([Property2("auto")], Toolbar2.prototype, "width", void 0);
    __decorate71([Property2("auto")], Toolbar2.prototype, "height", void 0);
    __decorate71([Property2("")], Toolbar2.prototype, "cssClass", void 0);
    __decorate71([Property2("Scrollable")], Toolbar2.prototype, "overflowMode", void 0);
    __decorate71([Property2()], Toolbar2.prototype, "scrollStep", void 0);
    __decorate71([Property2(true)], Toolbar2.prototype, "enableCollision", void 0);
    __decorate71([Property2(true)], Toolbar2.prototype, "enableHtmlSanitizer", void 0);
    __decorate71([Property2(true)], Toolbar2.prototype, "allowKeyboard", void 0);
    __decorate71([Event3()], Toolbar2.prototype, "clicked", void 0);
    __decorate71([Event3()], Toolbar2.prototype, "created", void 0);
    __decorate71([Event3()], Toolbar2.prototype, "destroyed", void 0);
    __decorate71([Event3()], Toolbar2.prototype, "beforeCreate", void 0);
    Toolbar2 = __decorate71([NotifyPropertyChanges2], Toolbar2);
    return Toolbar2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/accordion/accordion.js
var __extends74 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate72 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_ACRDN_ROOT = "e-acrdn-root";
var CLS_ROOT3 = "e-accordion";
var CLS_ITEM2 = "e-acrdn-item";
var CLS_ITEMFOCUS = "e-item-focus";
var CLS_ITEMHIDE = "e-hide";
var CLS_HEADER = "e-acrdn-header";
var CLS_HEADERICN = "e-acrdn-header-icon";
var CLS_HEADERCTN = "e-acrdn-header-content";
var CLS_CONTENT = "e-acrdn-panel";
var CLS_CTENT = "e-acrdn-content";
var CLS_TOOGLEICN = "e-toggle-icon";
var CLS_COLLAPSEICN = "e-tgl-collapse-icon e-icons";
var CLS_EXPANDICN = "e-expand-icon";
var CLS_RTL4 = "e-rtl";
var CLS_CTNHIDE = "e-content-hide";
var CLS_SLCT = "e-select";
var CLS_SLCTED = "e-selected";
var CLS_ACTIVE = "e-active";
var CLS_ANIMATE = "e-animate";
var CLS_DISABLE4 = "e-overlay";
var CLS_TOGANIMATE = "e-toggle-animation";
var CLS_NEST = "e-nested";
var CLS_EXPANDSTATE = "e-expand-state";
var CLS_CONTAINER = "e-accordion-container";
var AccordionActionSettings = (
  /** @class */
  function(_super) {
    __extends74(AccordionActionSettings2, _super);
    function AccordionActionSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate72([Property2("SlideDown")], AccordionActionSettings2.prototype, "effect", void 0);
    __decorate72([Property2(400)], AccordionActionSettings2.prototype, "duration", void 0);
    __decorate72([Property2("linear")], AccordionActionSettings2.prototype, "easing", void 0);
    return AccordionActionSettings2;
  }(ChildProperty2)
);
var AccordionAnimationSettings = (
  /** @class */
  function(_super) {
    __extends74(AccordionAnimationSettings2, _super);
    function AccordionAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate72([Complex2({
      effect: "SlideUp",
      duration: 400,
      easing: "linear"
    }, AccordionActionSettings)], AccordionAnimationSettings2.prototype, "collapse", void 0);
    __decorate72([Complex2({
      effect: "SlideDown",
      duration: 400,
      easing: "linear"
    }, AccordionActionSettings)], AccordionAnimationSettings2.prototype, "expand", void 0);
    return AccordionAnimationSettings2;
  }(ChildProperty2)
);
var AccordionItem = (
  /** @class */
  function(_super) {
    __extends74(AccordionItem2, _super);
    function AccordionItem2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate72([Property2(null)], AccordionItem2.prototype, "content", void 0);
    __decorate72([Property2(null)], AccordionItem2.prototype, "header", void 0);
    __decorate72([Property2(null)], AccordionItem2.prototype, "cssClass", void 0);
    __decorate72([Property2(null)], AccordionItem2.prototype, "iconCss", void 0);
    __decorate72([Property2(false)], AccordionItem2.prototype, "expanded", void 0);
    __decorate72([Property2(true)], AccordionItem2.prototype, "visible", void 0);
    __decorate72([Property2(false)], AccordionItem2.prototype, "disabled", void 0);
    __decorate72([Property2()], AccordionItem2.prototype, "id", void 0);
    return AccordionItem2;
  }(ChildProperty2)
);
var Accordion = (
  /** @class */
  function(_super) {
    __extends74(Accordion2, _super);
    function Accordion2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.keyConfigs = {
        moveUp: "uparrow",
        moveDown: "downarrow",
        enter: "enter",
        space: "space",
        home: "home",
        end: "end"
      };
      return _this;
    }
    Accordion2.prototype.destroy = function() {
      if (this.isReact || this.isAngular || this.isVue) {
        this.clearTemplate();
      }
      var ele = this.element;
      _super.prototype.destroy.call(this);
      this.unWireEvents();
      this.isDestroy = true;
      this.restoreContent(null);
      [].slice.call(ele.children).forEach(function(el) {
        ele.removeChild(el);
      });
      if (this.trgtEle) {
        this.trgtEle = null;
        while (this.ctrlTem.firstElementChild) {
          ele.appendChild(this.ctrlTem.firstElementChild);
        }
        this.ctrlTem = null;
      }
      ele.classList.remove(CLS_ACRDN_ROOT);
      ele.removeAttribute("style");
      this.element.removeAttribute("data-ripple");
      if (!this.isNested && isRippleEnabled) {
        this.removeRippleEffect();
      }
    };
    Accordion2.prototype.preRender = function() {
      var nested = closest2(this.element, "." + CLS_CONTENT);
      this.isNested = false;
      this.templateEle = [];
      if (!this.isDestroy) {
        this.isDestroy = false;
      }
      if (nested && nested.firstElementChild && nested.firstElementChild.firstElementChild) {
        if (nested.firstElementChild.firstElementChild.classList.contains(CLS_ROOT3)) {
          nested.classList.add(CLS_NEST);
          this.isNested = true;
        }
      } else {
        this.element.classList.add(CLS_ACRDN_ROOT);
      }
      if (this.enableRtl) {
        this.add(this.element, CLS_RTL4);
      }
    };
    Accordion2.prototype.add = function(ele, val) {
      ele.classList.add(val);
    };
    Accordion2.prototype.remove = function(ele, val) {
      ele.classList.remove(val);
    };
    Accordion2.prototype.render = function() {
      this.initializeHeaderTemplate();
      this.initializeItemTemplate();
      this.initialize();
      this.renderControl();
      this.wireEvents();
      this.renderComplete();
    };
    Accordion2.prototype.initialize = function() {
      var width = formatUnit(this.width);
      var height = formatUnit(this.height);
      setStyleAttribute2(this.element, {
        "width": width,
        "height": height
      });
      if (isNullOrUndefined2(this.initExpand)) {
        this.initExpand = [];
      }
      if (!isNullOrUndefined2(this.expandedIndices) && this.expandedIndices.length > 0) {
        this.initExpand = this.expandedIndices;
      }
    };
    Accordion2.prototype.renderControl = function() {
      this.trgtEle = this.element.children.length > 0 ? select2("div", this.element) : null;
      this.renderItems();
      this.initItemExpand();
    };
    Accordion2.prototype.wireFocusEvents = function() {
      var acrdItem = [].slice.call(this.element.querySelectorAll("." + CLS_ITEM2));
      for (var _i = 0, acrdItem_1 = acrdItem; _i < acrdItem_1.length; _i++) {
        var item = acrdItem_1[_i];
        var headerEle = item.querySelector("." + CLS_HEADER);
        if (item.childElementCount > 0 && headerEle) {
          EventHandler2.clearEvents(headerEle);
          EventHandler2.add(headerEle, "focus", this.focusIn, this);
          EventHandler2.add(headerEle, "blur", this.focusOut, this);
        }
      }
    };
    Accordion2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.element, "click", this.clickHandler);
      if (!isNullOrUndefined2(this.keyModule)) {
        this.keyModule.destroy();
      }
    };
    Accordion2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "click", this.clickHandler, this);
      if (!this.isNested && !this.isDestroy) {
        this.removeRippleEffect = rippleEffect(this.element, {
          selector: "." + CLS_HEADER
        });
      }
      if (!this.isNested) {
        this.keyModule = new KeyboardEvents2(this.element, {
          keyAction: this.keyActionHandler.bind(this),
          keyConfigs: this.keyConfigs,
          eventName: "keydown"
        });
      }
    };
    Accordion2.prototype.templateParser = function(template) {
      if (template) {
        try {
          if (typeof template !== "function" && document.querySelectorAll(template).length) {
            return compile4(document.querySelector(template).innerHTML.trim());
          } else {
            return compile4(template);
          }
        } catch (error) {
          return compile4(template);
        }
      }
      return void 0;
    };
    Accordion2.prototype.initializeHeaderTemplate = function() {
      if (this.headerTemplate) {
        this.headerTemplateFn = this.templateParser(this.headerTemplate);
      }
    };
    Accordion2.prototype.initializeItemTemplate = function() {
      if (this.itemTemplate) {
        this.itemTemplateFn = this.templateParser(this.itemTemplate);
      }
    };
    Accordion2.prototype.getHeaderTemplate = function() {
      return this.headerTemplateFn;
    };
    Accordion2.prototype.getItemTemplate = function() {
      return this.itemTemplateFn;
    };
    Accordion2.prototype.focusIn = function(e) {
      e.target.parentElement.classList.add(CLS_ITEMFOCUS);
    };
    Accordion2.prototype.focusOut = function(e) {
      e.target.parentElement.classList.remove(CLS_ITEMFOCUS);
    };
    Accordion2.prototype.ctrlTemplate = function() {
      this.ctrlTem = this.element.cloneNode(true);
      var innerEles;
      var rootEle = select2("." + CLS_CONTAINER, this.element);
      if (rootEle) {
        innerEles = rootEle.children;
      } else {
        innerEles = this.element.children;
      }
      var items = [];
      [].slice.call(innerEles).forEach(function(el) {
        items.push({
          header: el.childElementCount > 0 && el.children[0] ? el.children[0] : "",
          content: el.childElementCount > 1 && el.children[1] ? el.children[1] : ""
        });
        el.parentNode.removeChild(el);
      });
      if (rootEle) {
        this.element.removeChild(rootEle);
      }
      this.setProperties({
        items
      }, true);
    };
    Accordion2.prototype.toggleIconGenerate = function() {
      var tglIcon = this.createElement("div", {
        className: CLS_TOOGLEICN
      });
      var hdrColIcon = this.createElement("span", {
        className: CLS_COLLAPSEICN
      });
      tglIcon.appendChild(hdrColIcon);
      return tglIcon;
    };
    Accordion2.prototype.initItemExpand = function() {
      var len = this.initExpand.length;
      if (len === 0) {
        return;
      }
      if (this.expandMode === "Single") {
        this.expandItem(true, this.initExpand[len - 1]);
      } else {
        for (var i = 0; i < len; i++) {
          this.expandItem(true, this.initExpand[parseInt(i.toString(), 10)]);
        }
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Accordion2.prototype.renderItems = function() {
      var _this = this;
      var ele = this.element;
      var innerItem;
      var innerDataSourceItem;
      if (!isNullOrUndefined2(this.trgtEle)) {
        this.ctrlTemplate();
      }
      if (!isNullOrUndefined2(this.dataSource) && this.dataSource.length > 0) {
        this.dataSource.forEach(function(item, index) {
          innerDataSourceItem = _this.renderInnerItem(item, index);
          ele.appendChild(innerDataSourceItem);
          if (innerDataSourceItem.childElementCount > 0) {
            EventHandler2.add(innerDataSourceItem.querySelector("." + CLS_HEADER), "focus", _this.focusIn, _this);
            EventHandler2.add(innerDataSourceItem.querySelector("." + CLS_HEADER), "blur", _this.focusOut, _this);
          }
        });
      } else {
        var items = this.items;
        if (ele && items.length > 0) {
          items.forEach(function(item, index) {
            innerItem = _this.renderInnerItem(item, index);
            ele.appendChild(innerItem);
            if (innerItem.childElementCount > 0) {
              EventHandler2.add(innerItem.querySelector("." + CLS_HEADER), "focus", _this.focusIn, _this);
              EventHandler2.add(innerItem.querySelector("." + CLS_HEADER), "blur", _this.focusOut, _this);
            }
          });
        }
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Accordion2.prototype.clickHandler = function(e) {
      var trgt = e.target;
      var items = this.getItems();
      var eventArgs = {};
      var tglIcon;
      var acrdEle = closest2(trgt, "." + CLS_ROOT3);
      if (acrdEle !== this.element) {
        return;
      }
      trgt.classList.add("e-target");
      var acrdnItem = closest2(trgt, "." + CLS_ITEM2);
      var acrdnHdr = closest2(trgt, "." + CLS_HEADER);
      var acrdnCtn = closest2(trgt, "." + CLS_CONTENT);
      if (acrdnItem && (isNullOrUndefined2(acrdnHdr) || isNullOrUndefined2(acrdnCtn))) {
        acrdnHdr = acrdnItem.children[0];
        acrdnCtn = acrdnItem.children[1];
      }
      if (acrdnHdr) {
        tglIcon = select2("." + CLS_TOOGLEICN, acrdnHdr);
      }
      var acrdnCtnItem;
      if (acrdnHdr) {
        acrdnCtnItem = closest2(acrdnHdr, "." + CLS_ITEM2);
      } else if (acrdnCtn) {
        acrdnCtnItem = closest2(acrdnCtn, "." + CLS_ITEM2);
      }
      var index = this.getIndexByItem(acrdnItem);
      if (acrdnCtnItem) {
        eventArgs.item = items[this.getIndexByItem(acrdnCtnItem)];
      }
      eventArgs.originalEvent = e;
      var ctnCheck = !isNullOrUndefined2(tglIcon) && acrdnItem.childElementCount <= 1;
      if (ctnCheck && (isNullOrUndefined2(acrdnCtn) || !isNullOrUndefined2(select2("." + CLS_HEADER + " ." + CLS_TOOGLEICN, acrdnCtnItem)))) {
        acrdnItem.appendChild(this.contentRendering(index));
        this.ariaAttrUpdate(acrdnItem);
        this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
      } else {
        this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Accordion2.prototype.afterContentRender = function(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem) {
      var _this = this;
      var acrdActive = [];
      this.trigger("clicked", eventArgs, function(eventArgs2) {
        if (eventArgs2.cancel) {
          return;
        }
        var cntclkCheck = acrdnCtn && !isNullOrUndefined2(select2(".e-target", acrdnCtn));
        var inlineAcrdnSel = "." + CLS_CONTENT + " ." + CLS_ROOT3;
        var inlineEleAcrdn = acrdnCtn && !isNullOrUndefined2(select2("." + CLS_ROOT3, acrdnCtn)) && isNullOrUndefined2(closest2(trgt, inlineAcrdnSel));
        var nestContCheck = acrdnCtn && isNullOrUndefined2(select2("." + CLS_ROOT3, acrdnCtn)) || !(closest2(trgt, "." + CLS_ROOT3) === _this.element);
        cntclkCheck = cntclkCheck && (inlineEleAcrdn || nestContCheck);
        trgt.classList.remove("e-target");
        if (trgt.classList.contains(CLS_CONTENT) || trgt.classList.contains(CLS_CTENT) || cntclkCheck) {
          return;
        }
        var acrdcontainer = _this.element.querySelector("." + CLS_CONTAINER);
        var acrdnchild = acrdcontainer ? acrdcontainer.children : _this.element.children;
        [].slice.call(acrdnchild).forEach(function(el2) {
          if (el2.classList.contains(CLS_ACTIVE)) {
            acrdActive.push(el2);
          }
        });
        var acrdAniEle = [].slice.call(_this.element.querySelectorAll("." + CLS_ITEM2 + " [" + CLS_ANIMATE + "]"));
        if (acrdAniEle.length > 0) {
          for (var _i = 0, acrdAniEle_1 = acrdAniEle; _i < acrdAniEle_1.length; _i++) {
            var el = acrdAniEle_1[_i];
            acrdActive.push(el.parentElement);
          }
        }
        var sameContentCheck = acrdActive.indexOf(acrdnCtnItem) !== -1 && acrdnCtn.getAttribute("e-animate") === "true";
        var sameHeader = false;
        if (!isNullOrUndefined2(acrdnItem) && !isNullOrUndefined2(acrdnHdr)) {
          var acrdnCtn_1 = select2("." + CLS_CONTENT, acrdnItem);
          var acrdnRoot = closest2(acrdnItem, "." + CLS_ACRDN_ROOT);
          var expandState = acrdnRoot.querySelector("." + CLS_EXPANDSTATE);
          if (isNullOrUndefined2(acrdnCtn_1)) {
            return;
          }
          sameHeader = expandState === acrdnItem;
          if (isVisible2(acrdnCtn_1) && (!sameContentCheck || acrdnCtnItem.classList.contains(CLS_SLCTED))) {
            _this.collapse(acrdnCtn_1);
          } else {
            if (acrdActive.length > 0 && _this.expandMode === "Single" && !sameContentCheck) {
              acrdActive.forEach(function(el2) {
                _this.collapse(select2("." + CLS_CONTENT, el2));
                el2.classList.remove(CLS_EXPANDSTATE);
              });
            }
            _this.expand(acrdnCtn_1);
          }
          if (!isNullOrUndefined2(expandState) && !sameHeader) {
            expandState.classList.remove(CLS_EXPANDSTATE);
          }
        }
      });
    };
    Accordion2.prototype.eleMoveFocus = function(action, root, trgt) {
      var clst;
      var clstItem = closest2(trgt, "." + CLS_ITEM2);
      if (trgt === root) {
        clst = (action === "moveUp" ? trgt.lastElementChild : trgt).querySelector("." + CLS_HEADER);
      } else if (trgt.classList.contains(CLS_HEADER)) {
        clstItem = action === "moveUp" ? clstItem.previousElementSibling : clstItem.nextElementSibling;
        if (clstItem) {
          clst = select2("." + CLS_HEADER, clstItem);
        }
      }
      if (clst) {
        clst.focus();
      }
    };
    Accordion2.prototype.keyActionHandler = function(e) {
      var trgt = e.target;
      var header = closest2(e.target, CLS_HEADER);
      if (isNullOrUndefined2(header) && !trgt.classList.contains(CLS_ROOT3) && !trgt.classList.contains(CLS_HEADER)) {
        return;
      }
      var clst;
      var root = this.element;
      var content;
      switch (e.action) {
        case "moveUp":
          this.eleMoveFocus(e.action, root, trgt);
          break;
        case "moveDown":
          this.eleMoveFocus(e.action, root, trgt);
          break;
        case "space":
        case "enter":
          content = trgt.nextElementSibling;
          if (!isNullOrUndefined2(content) && content.classList.contains(CLS_CONTENT)) {
            if (content.getAttribute("e-animate") !== "true") {
              trgt.click();
            }
          } else {
            trgt.click();
          }
          e.preventDefault();
          break;
        case "home":
        case "end":
          clst = e.action === "home" ? root.firstElementChild.children[0] : root.lastElementChild.children[0];
          clst.focus();
          e.preventDefault();
          break;
      }
    };
    Accordion2.prototype.headerEleGenerate = function() {
      var header = this.createElement("div", {
        className: CLS_HEADER,
        id: getUniqueID("acrdn_header")
      });
      var ariaAttr = {
        "tabindex": "0",
        "role": "button",
        "aria-disabled": "false",
        "aria-expanded": "false"
      };
      attributes2(header, ariaAttr);
      return header;
    };
    Accordion2.prototype.renderInnerItem = function(item, index) {
      var innerEle = this.createElement("div", {
        className: CLS_ITEM2,
        id: item.id || getUniqueID("acrdn_item")
      });
      if (this.headerTemplate) {
        var ctnEle = this.headerEleGenerate();
        var hdrEle = this.createElement("div", {
          className: CLS_HEADERCTN
        });
        ctnEle.appendChild(hdrEle);
        append(this.getHeaderTemplate()(item, this, "headerTemplate", this.element.id + "_headerTemplate", false), hdrEle);
        innerEle.appendChild(ctnEle);
        ctnEle.appendChild(this.toggleIconGenerate());
        this.add(innerEle, CLS_SLCT);
        return innerEle;
      }
      if (item.header && this.angularnativeCondiCheck(item, "header")) {
        var header = item.header;
        if (this.enableHtmlSanitizer && typeof item.header === "string") {
          header = SanitizeHtmlHelper2.sanitize(item.header);
        }
        var ctnEle = this.headerEleGenerate();
        var hdrEle = this.createElement("div", {
          className: CLS_HEADERCTN
        });
        ctnEle.appendChild(hdrEle);
        ctnEle.appendChild(this.fetchElement(hdrEle, header, index));
        innerEle.appendChild(ctnEle);
      }
      var hdr = select2("." + CLS_HEADER, innerEle);
      if (item.expanded && !isNullOrUndefined2(index) && !this.enablePersistence) {
        if (this.initExpand.indexOf(index) === -1) {
          this.initExpand.push(index);
        }
      }
      if (item.cssClass) {
        addClass2([innerEle], item.cssClass.split(" "));
      }
      if (item.disabled) {
        addClass2([innerEle], CLS_DISABLE4);
      }
      if (item.visible === false) {
        addClass2([innerEle], CLS_ITEMHIDE);
      }
      if (item.iconCss) {
        var hdrIcnEle = this.createElement("div", {
          className: CLS_HEADERICN
        });
        var icon = this.createElement("span", {
          className: item.iconCss + " e-icons"
        });
        hdrIcnEle.appendChild(icon);
        if (isNullOrUndefined2(hdr)) {
          hdr = this.headerEleGenerate();
          hdr.appendChild(hdrIcnEle);
          innerEle.appendChild(hdr);
        } else {
          hdr.insertBefore(hdrIcnEle, hdr.childNodes[0]);
        }
      }
      if (item.content && this.angularnativeCondiCheck(item, "content")) {
        var hdrIcon = this.toggleIconGenerate();
        if (isNullOrUndefined2(hdr)) {
          hdr = this.headerEleGenerate();
          innerEle.appendChild(hdr);
        }
        hdr.appendChild(hdrIcon);
        this.add(innerEle, CLS_SLCT);
      }
      return innerEle;
    };
    Accordion2.prototype.angularnativeCondiCheck = function(item, prop) {
      var property = prop === "content" ? item.content : item.header;
      var content = property;
      if (this.isAngular && !isNullOrUndefined2(content.elementRef)) {
        var data = content.elementRef.nativeElement.data;
        if (isNullOrUndefined2(data) || data === "" || data.indexOf("bindings=") === -1) {
          return true;
        }
        var parseddata = JSON.parse(content.elementRef.nativeElement.data.replace("bindings=", ""));
        if (!isNullOrUndefined2(parseddata) && parseddata["ng-reflect-ng-if"] === "false") {
          return false;
        } else {
          return true;
        }
      } else {
        return true;
      }
    };
    Accordion2.prototype.fetchElement = function(ele, value, index) {
      var templateFn;
      var temString;
      try {
        if (document.querySelectorAll(value).length && value !== "Button") {
          var eleVal = document.querySelector(value);
          temString = eleVal.outerHTML.trim();
          ele.appendChild(eleVal);
          eleVal.style.display = "";
        } else {
          templateFn = compile4(value);
        }
      } catch (e) {
        if (typeof value === "string") {
          ele.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(value) : value;
        } else if (value instanceof HTMLElement) {
          ele.appendChild(value);
          if (this.trgtEle) {
            ele.firstElementChild.style.display = "";
          }
        } else {
          templateFn = compile4(value);
        }
      }
      var tempArray;
      if (!isNullOrUndefined2(templateFn)) {
        if (this.isReact) {
          this.renderReactTemplates();
        }
        var templateProps = void 0;
        var templateName = void 0;
        if (ele.classList.contains(CLS_HEADERCTN)) {
          templateProps = this.element.id + index + "_header";
          templateName = "header";
        } else if (ele.classList.contains(CLS_CTENT)) {
          templateProps = this.element.id + index + "_content";
          templateName = "content";
        }
        tempArray = templateFn({}, this, templateName, templateProps, this.isStringTemplate);
      }
      if (!isNullOrUndefined2(tempArray) && tempArray.length > 0 && !(isNullOrUndefined2(tempArray[0].tagName) && tempArray.length === 1)) {
        [].slice.call(tempArray).forEach(function(el) {
          if (!isNullOrUndefined2(el.tagName)) {
            el.style.display = "";
          }
          ele.appendChild(el);
        });
      } else if (ele.childElementCount === 0) {
        ele.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(value) : value;
      }
      if (!isNullOrUndefined2(temString)) {
        if (this.templateEle.indexOf(value) === -1) {
          this.templateEle.push(value);
        }
      }
      return ele;
    };
    Accordion2.prototype.ariaAttrUpdate = function(itemEle) {
      var header = select2("." + CLS_HEADER, itemEle);
      var content = select2("." + CLS_CONTENT, itemEle);
      header.setAttribute("aria-controls", content.id);
      content.setAttribute("aria-labelledby", header.id);
      content.setAttribute("role", "region");
    };
    Accordion2.prototype.contentRendering = function(index) {
      var itemcnt = this.createElement("div", {
        className: CLS_CONTENT + " " + CLS_CTNHIDE,
        id: getUniqueID("acrdn_panel")
      });
      attributes2(itemcnt, {
        "aria-hidden": "true"
      });
      var ctn = this.createElement("div", {
        className: CLS_CTENT
      });
      if (!isNullOrUndefined2(this.dataSource) && this.dataSource.length > 0) {
        if (this.isReact) {
          this.renderReactTemplates();
        }
        append(this.getItemTemplate()(this.dataSource[parseInt(index.toString(), 10)], this, "itemTemplate", this.element.id + "_itemTemplate", false), ctn);
        itemcnt.appendChild(ctn);
      } else {
        var content = this.items[parseInt(index.toString(), 10)].content;
        if (this.enableHtmlSanitizer && typeof content === "string") {
          content = SanitizeHtmlHelper2.sanitize(content);
        }
        itemcnt.appendChild(this.fetchElement(ctn, content, index));
      }
      return itemcnt;
    };
    Accordion2.prototype.expand = function(trgt) {
      var _this = this;
      var items = this.getItems();
      var trgtItemEle = closest2(trgt, "." + CLS_ITEM2);
      if (isNullOrUndefined2(trgt) || isVisible2(trgt) && trgt.getAttribute("e-animate") !== "true" || trgtItemEle.classList.contains(CLS_DISABLE4)) {
        return;
      }
      var acrdnRoot = closest2(trgtItemEle, "." + CLS_ACRDN_ROOT);
      var expandState = acrdnRoot.querySelector("." + CLS_EXPANDSTATE);
      var animation = {
        name: this.animation.expand.effect,
        duration: this.animation.expand.duration,
        timingFunction: this.animation.expand.easing
      };
      var icon = select2("." + CLS_TOOGLEICN, trgtItemEle).firstElementChild;
      var eventArgs = {
        element: trgtItemEle,
        item: items[this.getIndexByItem(trgtItemEle)],
        index: this.getIndexByItem(trgtItemEle),
        content: trgtItemEle.querySelector("." + CLS_CONTENT),
        isExpanded: true
      };
      this.trigger("expanding", eventArgs, function(expandArgs) {
        if (!expandArgs.cancel) {
          icon.classList.add(CLS_TOGANIMATE);
          _this.expandedItemsPush(trgtItemEle);
          if (!isNullOrUndefined2(expandState)) {
            expandState.classList.remove(CLS_EXPANDSTATE);
          }
          trgtItemEle.classList.add(CLS_EXPANDSTATE);
          if (animation.name === "None" && animationMode2 !== "Enable" || animationMode2 === "Disable") {
            _this.expandProgress("begin", icon, trgt, trgtItemEle, expandArgs);
            _this.expandProgress("end", icon, trgt, trgtItemEle, expandArgs);
          } else {
            _this.expandAnimation(animation.name, icon, trgt, trgtItemEle, animation, expandArgs);
          }
        }
      });
    };
    Accordion2.prototype.expandAnimation = function(ef, icn, trgt, trgtItemEle, animate, args) {
      var _this = this;
      if (ef === "None" && animationMode2 === "Enable") {
        ef = "SlideDown";
        animate.name = "SlideDown";
      }
      var height;
      this.lastActiveItemId = trgtItemEle.id;
      if (ef === "SlideDown") {
        animate.begin = function() {
          _this.expandProgress("begin", icn, trgt, trgtItemEle, args);
          trgt.style.position = "absolute";
          height = trgtItemEle.offsetHeight;
          trgt.style.maxHeight = trgt.offsetHeight + "px";
          trgtItemEle.style.maxHeight = "";
        };
        animate.progress = function() {
          trgtItemEle.style.minHeight = height + trgt.offsetHeight + "px";
        };
        animate.end = function() {
          setStyleAttribute2(trgt, {
            "position": "",
            "maxHeight": ""
          });
          trgtItemEle.style.minHeight = "";
          _this.expandProgress("end", icn, trgt, trgtItemEle, args);
        };
      } else {
        animate.begin = function() {
          _this.expandProgress("begin", icn, trgt, trgtItemEle, args);
        };
        animate.end = function() {
          _this.expandProgress("end", icn, trgt, trgtItemEle, args);
        };
      }
      new Animation2(animate).animate(trgt);
    };
    Accordion2.prototype.expandProgress = function(progress, icon, trgt, trgtItemEle, eventArgs) {
      this.remove(trgt, CLS_CTNHIDE);
      this.add(trgtItemEle, CLS_SLCTED);
      this.add(icon, CLS_EXPANDICN);
      if (progress === "end") {
        this.add(trgtItemEle, CLS_ACTIVE);
        trgt.setAttribute("aria-hidden", "false");
        attributes2(trgt.previousElementSibling, {
          "aria-expanded": "true"
        });
        icon.classList.remove(CLS_TOGANIMATE);
        this.trigger("expanded", eventArgs);
      }
    };
    Accordion2.prototype.expandedItemsPush = function(item) {
      var index = this.getIndexByItem(item);
      if (this.expandedIndices.indexOf(index) === -1) {
        var temp = [].slice.call(this.expandedIndices);
        temp.push(index);
        this.setProperties({
          expandedIndices: temp
        }, true);
      }
    };
    Accordion2.prototype.getIndexByItem = function(item) {
      var itemEle = this.getItemElements();
      return [].slice.call(itemEle).indexOf(item);
    };
    Accordion2.prototype.getItemElements = function() {
      var itemEle = [];
      var itemCollection = this.element.children;
      [].slice.call(itemCollection).forEach(function(el) {
        if (el.classList.contains(CLS_ITEM2)) {
          itemEle.push(el);
        }
      });
      return itemEle;
    };
    Accordion2.prototype.expandedItemsPop = function(item) {
      var index = this.getIndexByItem(item);
      var temp = [].slice.call(this.expandedIndices);
      temp.splice(temp.indexOf(index), 1);
      this.setProperties({
        expandedIndices: temp
      }, true);
    };
    Accordion2.prototype.collapse = function(trgt) {
      var _this = this;
      if (isNullOrUndefined2(trgt)) {
        return;
      }
      var items = this.getItems();
      var trgtItemEle = closest2(trgt, "." + CLS_ITEM2);
      if (!isVisible2(trgt) || trgtItemEle.classList.contains(CLS_DISABLE4)) {
        return;
      }
      var animation = {
        name: this.animation.collapse.effect,
        duration: this.animation.collapse.duration,
        timingFunction: this.animation.collapse.easing
      };
      var icon = select2("." + CLS_TOOGLEICN, trgtItemEle).firstElementChild;
      var eventArgs = {
        element: trgtItemEle,
        item: items[this.getIndexByItem(trgtItemEle)],
        index: this.getIndexByItem(trgtItemEle),
        content: trgtItemEle.querySelector("." + CLS_CONTENT),
        isExpanded: false
      };
      this.trigger("expanding", eventArgs, function(expandArgs) {
        if (!expandArgs.cancel) {
          _this.expandedItemsPop(trgtItemEle);
          trgtItemEle.classList.remove(CLS_EXPANDSTATE);
          icon.classList.add(CLS_TOGANIMATE);
          if (animation.name === "None" && animationMode2 !== "Enable" || animationMode2 === "Disable") {
            _this.collapseProgress("begin", icon, trgt, trgtItemEle, expandArgs);
            _this.collapseProgress("end", icon, trgt, trgtItemEle, expandArgs);
          } else {
            _this.collapseAnimation(animation.name, trgt, trgtItemEle, icon, animation, expandArgs);
          }
        }
      });
    };
    Accordion2.prototype.collapseAnimation = function(ef, trgt, trgtItEl, icn, animate, args) {
      var _this = this;
      if (ef === "None" && animationMode2 === "Enable") {
        ef = "SlideUp";
        animate.name = "SlideUp";
      }
      var height;
      var trgtHeight;
      var itemHeight;
      var remain;
      this.lastActiveItemId = trgtItEl.id;
      if (ef === "SlideUp") {
        animate.begin = function() {
          itemHeight = trgtItEl.offsetHeight;
          trgtItEl.style.minHeight = itemHeight + "px";
          trgt.style.position = "absolute";
          height = trgtItEl.offsetHeight;
          trgtHeight = trgt.offsetHeight;
          trgt.style.maxHeight = trgtHeight + "px";
          _this.collapseProgress("begin", icn, trgt, trgtItEl, args);
        };
        animate.progress = function() {
          remain = height - (trgtHeight - trgt.offsetHeight);
          if (remain < itemHeight) {
            trgtItEl.style.minHeight = remain + "px";
          }
        };
        animate.end = function() {
          trgt.style.display = "none";
          _this.collapseProgress("end", icn, trgt, trgtItEl, args);
          trgtItEl.style.minHeight = "";
          setStyleAttribute2(trgt, {
            "position": "",
            "maxHeight": "",
            "display": ""
          });
        };
      } else {
        animate.begin = function() {
          _this.collapseProgress("begin", icn, trgt, trgtItEl, args);
        };
        animate.end = function() {
          _this.collapseProgress("end", icn, trgt, trgtItEl, args);
        };
      }
      new Animation2(animate).animate(trgt);
    };
    Accordion2.prototype.collapseProgress = function(progress, icon, trgt, trgtItemEle, eventArgs) {
      this.remove(icon, CLS_EXPANDICN);
      this.remove(trgtItemEle, CLS_SLCTED);
      if (progress === "end") {
        this.add(trgt, CLS_CTNHIDE);
        icon.classList.remove(CLS_TOGANIMATE);
        this.remove(trgtItemEle, CLS_ACTIVE);
        trgt.setAttribute("aria-hidden", "true");
        attributes2(trgt.previousElementSibling, {
          "aria-expanded": "false"
        });
        this.trigger("expanded", eventArgs);
      }
    };
    Accordion2.prototype.getModuleName = function() {
      return "accordion";
    };
    Accordion2.prototype.getItems = function() {
      var items;
      if (this.itemTemplate && this.headerTemplate) {
        items = this.dataSource;
      } else {
        items = this.items;
      }
      return items;
    };
    Accordion2.prototype.addItem = function(item, index) {
      var _this = this;
      var ele = this.element;
      var itemEle = this.getItemElements();
      var items = this.getItems();
      if (isNullOrUndefined2(index)) {
        index = items.length;
      }
      if (ele.childElementCount >= index) {
        var addItems = item instanceof Array ? item : [item];
        addItems.forEach(function(addItem, i) {
          var itemIndex = index + i;
          items.splice(itemIndex, 0, addItem);
          var innerItemEle = _this.renderInnerItem(addItem, itemIndex);
          if (ele.childElementCount === itemIndex) {
            ele.appendChild(innerItemEle);
          } else {
            ele.insertBefore(innerItemEle, itemEle[parseInt(itemIndex.toString(), 10)]);
          }
          EventHandler2.add(innerItemEle.querySelector("." + CLS_HEADER), "focus", _this.focusIn, _this);
          EventHandler2.add(innerItemEle.querySelector("." + CLS_HEADER), "blur", _this.focusOut, _this);
          _this.expandedIndices = [];
          _this.expandedItemRefresh();
          if (addItem && addItem.expanded) {
            _this.expandItem(true, itemIndex);
          }
        });
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Accordion2.prototype.expandedItemRefresh = function() {
      var _this = this;
      var itemEle = this.getItemElements();
      [].slice.call(itemEle).forEach(function(el) {
        if (el.classList.contains(CLS_SLCTED)) {
          _this.expandedItemsPush(el);
        }
      });
    };
    Accordion2.prototype.removeItem = function(index) {
      if (this.isReact || this.isAngular) {
        var item = selectAll2("." + CLS_ITEM2, this.element)[parseInt(index.toString(), 10)];
        var header = select2("." + CLS_HEADERCTN, item);
        var content = select2("." + CLS_CTENT, item);
        this.clearAccordionTemplate(header, this.dataSource.length > 0 ? "headerTemplate" : "header", CLS_HEADERCTN);
        this.clearAccordionTemplate(content, this.dataSource.length > 0 ? "itemTemplate" : "content", CLS_CTENT);
      }
      var itemEle = this.getItemElements();
      var ele = itemEle[parseInt(index.toString(), 10)];
      var items = this.getItems();
      if (isNullOrUndefined2(ele)) {
        return;
      }
      this.restoreContent(index);
      detach2(ele);
      items.splice(index, 1);
      this.expandedIndices = [];
      this.expandedItemRefresh();
    };
    Accordion2.prototype.select = function(index) {
      var itemEle = this.getItemElements();
      var ele = itemEle[parseInt(index.toString(), 10)];
      if (isNullOrUndefined2(ele) || isNullOrUndefined2(select2("." + CLS_HEADER, ele))) {
        return;
      }
      ele.children[0].focus();
    };
    Accordion2.prototype.hideItem = function(index, isHidden) {
      var itemEle = this.getItemElements();
      var ele = itemEle[parseInt(index.toString(), 10)];
      if (isNullOrUndefined2(ele)) {
        return;
      }
      if (isNullOrUndefined2(isHidden)) {
        isHidden = true;
      }
      if (isHidden) {
        this.add(ele, CLS_ITEMHIDE);
      } else {
        this.remove(ele, CLS_ITEMHIDE);
      }
    };
    Accordion2.prototype.enableItem = function(index, isEnable) {
      var itemEle = this.getItemElements();
      var ele = itemEle[parseInt(index.toString(), 10)];
      if (isNullOrUndefined2(ele)) {
        return;
      }
      var eleHeader = ele.firstElementChild;
      if (isEnable) {
        this.remove(ele, CLS_DISABLE4);
        attributes2(eleHeader, {
          "tabindex": "0",
          "aria-disabled": "false"
        });
        eleHeader.focus();
      } else {
        if (ele.classList.contains(CLS_ACTIVE)) {
          this.expandItem(false, index);
          this.eleMoveFocus("movedown", this.element, eleHeader);
        }
        this.add(ele, CLS_DISABLE4);
        eleHeader.setAttribute("aria-disabled", "true");
        eleHeader.removeAttribute("tabindex");
      }
    };
    Accordion2.prototype.expandItem = function(isExpand, index) {
      var _this = this;
      var itemEle = this.getItemElements();
      if (isNullOrUndefined2(index)) {
        if (this.expandMode === "Single" && isExpand) {
          var ele = itemEle[itemEle.length - 1];
          this.itemExpand(isExpand, ele, this.getIndexByItem(ele));
        } else {
          var item = select2("#" + this.lastActiveItemId, this.element);
          [].slice.call(itemEle).forEach(function(el) {
            _this.itemExpand(isExpand, el, _this.getIndexByItem(el));
            el.classList.remove(CLS_EXPANDSTATE);
          });
          var expandedItem = select2("." + CLS_EXPANDSTATE, this.element);
          if (expandedItem) {
            expandedItem.classList.remove(CLS_EXPANDSTATE);
          }
          if (item) {
            item.classList.add(CLS_EXPANDSTATE);
          }
        }
      } else {
        var ele = itemEle[parseInt(index.toString(), 10)];
        if (isNullOrUndefined2(ele) || !ele.classList.contains(CLS_SLCT) || ele.classList.contains(CLS_ACTIVE) && isExpand) {
          return;
        } else {
          if (this.expandMode === "Single") {
            this.expandItem(false);
          }
          this.itemExpand(isExpand, ele, index);
        }
      }
    };
    Accordion2.prototype.itemExpand = function(isExpand, ele, index) {
      var ctn = ele.children[1];
      if (ele.classList.contains(CLS_DISABLE4)) {
        return;
      }
      if (isNullOrUndefined2(ctn) && isExpand) {
        ctn = this.contentRendering(index);
        ele.appendChild(ctn);
        this.ariaAttrUpdate(ele);
        this.expand(ctn);
      } else if (!isNullOrUndefined2(ctn)) {
        if (isExpand) {
          this.expand(ctn);
        } else {
          this.collapse(ctn);
        }
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Accordion2.prototype.destroyItems = function() {
      this.restoreContent(null);
      if (this.isReact || this.isAngular || this.isVue) {
        this.clearTemplate();
      }
      [].slice.call(this.element.querySelectorAll("." + CLS_ITEM2)).forEach(function(el) {
        detach2(el);
      });
    };
    Accordion2.prototype.restoreContent = function(index) {
      var ctnElePos;
      if (isNullOrUndefined2(index)) {
        ctnElePos = this.element;
      } else {
        ctnElePos = this.element.querySelectorAll("." + CLS_ITEM2)[parseInt(index.toString(), 10)];
      }
      this.templateEle.forEach(function(eleStr) {
        if (!isNullOrUndefined2(ctnElePos.querySelector(eleStr))) {
          document.body.appendChild(ctnElePos.querySelector(eleStr)).style.display = "none";
        }
      });
    };
    Accordion2.prototype.updateItem = function(item, index) {
      if (!isNullOrUndefined2(item)) {
        var items = this.getItems();
        var itemObj = items[parseInt(index.toString(), 10)];
        items.splice(index, 1);
        this.restoreContent(index);
        var header = select2("." + CLS_HEADERCTN, item);
        var content = select2("." + CLS_CTENT, item);
        if (this.isReact || this.isAngular) {
          this.clearAccordionTemplate(header, "header", CLS_HEADERCTN);
          this.clearAccordionTemplate(content, "content", CLS_CTENT);
        }
        detach2(item);
        this.addItem(itemObj, index);
      }
    };
    Accordion2.prototype.setTemplate = function(template, toElement, index) {
      this.fetchElement(toElement, template, index);
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Accordion2.prototype.clearAccordionTemplate = function(templateEle, templateName, className) {
      if (this.registeredTemplate && this.registeredTemplate["" + templateName]) {
        var registeredTemplates = this.registeredTemplate;
        for (var index = 0; index < registeredTemplates["" + templateName].length; index++) {
          var registeredItem = registeredTemplates["" + templateName][parseInt(index.toString(), 10)].rootNodes[0];
          var closestItem = closest2(registeredItem, "." + className);
          if (!isNullOrUndefined2(closestItem) && closestItem === templateEle || isNullOrUndefined2(registeredItem.parentNode)) {
            this.clearTemplate([templateName], [registeredTemplates["" + templateName][parseInt(index.toString(), 10)]]);
            break;
          }
        }
      } else if (this.portals && this.portals.length > 0) {
        var portals = this.portals;
        for (var index = 0; index < portals.length; index++) {
          var portalItem = portals[parseInt(index.toString(), 10)];
          var closestItem = closest2(portalItem.containerInfo, "." + className);
          if (!isNullOrUndefined2(closestItem) && closestItem === templateEle) {
            this.clearTemplate([templateName], index);
            break;
          }
        }
      }
    };
    Accordion2.prototype.getPersistData = function() {
      var keyEntity = ["expandedIndices"];
      return this.addOnPersist(keyEntity);
    };
    Accordion2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var acrdn = this.element;
      var isRefresh = false;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "items":
            if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
              var changedProp = Object.keys(newProp.items);
              for (var j = 0; j < changedProp.length; j++) {
                var index = parseInt(Object.keys(newProp.items)[parseInt(j.toString(), 10)], 10);
                var property = Object.keys(newProp.items[parseInt(index.toString(), 10)]);
                for (var k = 0; k < property.length; k++) {
                  var item = selectAll2("." + CLS_ITEM2, this.element)[parseInt(index.toString(), 10)];
                  var oldVal = Object(oldProp.items[parseInt(index.toString(), 10)])["" + property[parseInt(k.toString(), 10)]];
                  var newVal = Object(newProp.items[parseInt(index.toString(), 10)])["" + property[parseInt(k.toString(), 10)]];
                  var temp = property[parseInt(k.toString(), 10)];
                  var content = select2("." + CLS_CTENT, item);
                  if (temp === "header" || temp === "iconCss" || temp === "expanded" || temp === "content" && oldVal === "") {
                    this.updateItem(item, index);
                  }
                  if (property[parseInt(k.toString(), 10)] === "cssClass" && !isNullOrUndefined2(item)) {
                    if (oldVal) {
                      removeClass2([item], oldVal.split(" "));
                    }
                    if (newVal) {
                      addClass2([item], newVal.split(" "));
                    }
                  }
                  if (property[parseInt(k.toString(), 10)] === "visible" && !isNullOrUndefined2(item)) {
                    if (Object(newProp.items[parseInt(index.toString(), 10)])["" + property[parseInt(k.toString(), 10)]] === false) {
                      item.classList.add(CLS_ITEMHIDE);
                    } else {
                      item.classList.remove(CLS_ITEMHIDE);
                    }
                  }
                  if (property[parseInt(k.toString(), 10)] === "disabled" && !isNullOrUndefined2(item)) {
                    this.enableItem(index, !newVal);
                  }
                  if (property.indexOf("header") < 0 && property[parseInt(k.toString(), 10)] === "content" && !isNullOrUndefined2(item) && item.children.length === 2) {
                    if (typeof newVal === "function") {
                      if (this.isAngular || this.isReact) {
                        this.clearAccordionTemplate(content, property[parseInt(k.toString(), 10)], CLS_CTENT);
                      }
                      var activeContent = item.querySelector("." + CLS_CTENT);
                      activeContent.innerHTML = "";
                      this.setTemplate(newVal, activeContent, index);
                    } else {
                      if (item.classList.contains(CLS_SLCTED)) {
                        this.expandItem(false, index);
                      }
                      detach2(item.querySelector("." + CLS_CONTENT));
                    }
                  }
                }
              }
            } else {
              isRefresh = true;
            }
            break;
          case "dataSource":
          case "expandedIndices":
            if (this.expandedIndices === null) {
              this.expandedIndices = [];
            }
            isRefresh = true;
            break;
          case "headerTemplate":
            this.initializeHeaderTemplate();
            isRefresh = true;
            break;
          case "itemTemplate":
            this.initializeItemTemplate();
            isRefresh = true;
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              this.add(acrdn, CLS_RTL4);
            } else {
              this.remove(acrdn, CLS_RTL4);
            }
            break;
          case "height":
            setStyleAttribute2(this.element, {
              "height": formatUnit(newProp.height)
            });
            break;
          case "width":
            setStyleAttribute2(this.element, {
              "width": formatUnit(newProp.width)
            });
            break;
          case "expandMode":
            if (newProp.expandMode === "Single" && !isNullOrUndefined2(this.expandedIndices) && this.expandedIndices.length > 1) {
              this.expandItem(false);
            }
            break;
        }
      }
      if (isRefresh) {
        this.initExpand = [];
        if (!isNullOrUndefined2(this.expandedIndices) && this.expandedIndices.length > 0) {
          this.initExpand = this.expandedIndices;
        }
        this.destroyItems();
        this.renderItems();
        this.initItemExpand();
      }
    };
    __decorate72([Collection([], AccordionItem)], Accordion2.prototype, "items", void 0);
    __decorate72([Property2([])], Accordion2.prototype, "dataSource", void 0);
    __decorate72([Property2()], Accordion2.prototype, "itemTemplate", void 0);
    __decorate72([Property2()], Accordion2.prototype, "headerTemplate", void 0);
    __decorate72([Property2("100%")], Accordion2.prototype, "width", void 0);
    __decorate72([Property2("auto")], Accordion2.prototype, "height", void 0);
    __decorate72([Property2([])], Accordion2.prototype, "expandedIndices", void 0);
    __decorate72([Property2("Multiple")], Accordion2.prototype, "expandMode", void 0);
    __decorate72([Property2(true)], Accordion2.prototype, "enableHtmlSanitizer", void 0);
    __decorate72([Complex2({}, AccordionAnimationSettings)], Accordion2.prototype, "animation", void 0);
    __decorate72([Event3()], Accordion2.prototype, "clicked", void 0);
    __decorate72([Event3()], Accordion2.prototype, "expanding", void 0);
    __decorate72([Event3()], Accordion2.prototype, "expanded", void 0);
    __decorate72([Event3()], Accordion2.prototype, "created", void 0);
    __decorate72([Event3()], Accordion2.prototype, "destroyed", void 0);
    Accordion2 = __decorate72([NotifyPropertyChanges2], Accordion2);
    return Accordion2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/context-menu/context-menu.js
var __extends75 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate73 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ContextMenu = (
  /** @class */
  function(_super) {
    __extends75(ContextMenu2, _super);
    function ContextMenu2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    ContextMenu2.prototype.preRender = function() {
      this.isMenu = false;
      this.element.id = this.element.id || getUniqueID("ej2-contextmenu");
      _super.prototype.preRender.call(this);
    };
    ContextMenu2.prototype.initialize = function() {
      this.template = this.itemTemplate ? this.itemTemplate : null;
      _super.prototype.initialize.call(this);
      attributes2(this.element, {
        "role": "menubar",
        "tabindex": "0"
      });
      this.element.style.zIndex = getZindexPartial(this.element).toString();
    };
    ContextMenu2.prototype.open = function(top, left, target) {
      _super.prototype.openMenu.call(this, null, null, top, left, null, target);
    };
    ContextMenu2.prototype.close = function() {
      _super.prototype.closeMenu.call(this);
    };
    ContextMenu2.prototype.onPropertyChanged = function(newProp, oldProp) {
      _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "filter":
            this.close();
            this.filter = newProp.filter;
            break;
          case "target":
            this.unWireEvents(oldProp.target);
            this.wireEvents();
            break;
          case "itemTemplate":
            this.itemTemplate = newProp.itemTemplate;
            this.refresh();
        }
      }
    };
    ContextMenu2.prototype.getModuleName = function() {
      return "contextmenu";
    };
    __decorate73([Property2("")], ContextMenu2.prototype, "target", void 0);
    __decorate73([Property2("")], ContextMenu2.prototype, "filter", void 0);
    __decorate73([Collection([], MenuItem)], ContextMenu2.prototype, "items", void 0);
    __decorate73([Property2(null)], ContextMenu2.prototype, "itemTemplate", void 0);
    __decorate73([Property2(false)], ContextMenu2.prototype, "enableScrolling", void 0);
    ContextMenu2 = __decorate73([NotifyPropertyChanges2], ContextMenu2);
    return ContextMenu2;
  }(MenuBase)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/menu/menu.js
var __extends76 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate74 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var VMENU = "e-vertical";
var SCROLLABLE = "e-scrollable";
var HAMBURGER = "e-hamburger";
var Menu = (
  /** @class */
  function(_super) {
    __extends76(Menu2, _super);
    function Menu2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.tempItems = [];
      return _this;
    }
    Menu2.prototype.getModuleName = function() {
      return "menu";
    };
    Menu2.prototype.preRender = function() {
      this.isMenu = true;
      this.element.id = this.element.id || getUniqueID("ej2-menu");
      if (this.template) {
        try {
          if (typeof this.template !== "function" && document.querySelectorAll(this.template).length) {
            this.template = document.querySelector(this.template).innerHTML.trim();
            this.clearChanges();
          }
        } catch (e) {
        }
        this.updateMenuItems(this.items);
      } else {
        this.updateMenuItems(this.items);
      }
      _super.prototype.preRender.call(this);
    };
    Menu2.prototype.initialize = function() {
      _super.prototype.initialize.call(this);
      attributes2(this.element, {
        "role": "menubar",
        "tabindex": "0"
      });
      if (this.orientation === "Vertical") {
        this.element.classList.add(VMENU);
        if (this.hamburgerMode && !this.target) {
          this.element.previousElementSibling.classList.add(VMENU);
        }
        this.element.setAttribute("aria-orientation", "vertical");
      } else {
        if (Browser2.isDevice && !this.enableScrolling) {
          this.element.parentElement.classList.add(SCROLLABLE);
        }
      }
      if (this.hamburgerMode) {
        this.element.parentElement.classList.add(HAMBURGER);
        if (this.orientation === "Horizontal") {
          this.element.classList.add("e-hide-menu");
        }
      }
    };
    Menu2.prototype.updateMenuItems = function(items) {
      this.tempItems = items;
      this.items = [];
      this.tempItems.map(this.createMenuItems, this);
      this.setProperties({
        items: this.items
      }, true);
      this.tempItems = [];
    };
    Menu2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var _this = this;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "orientation":
            if (newProp.orientation === "Vertical") {
              this.element.classList.add(VMENU);
              if (this.hamburgerMode) {
                if (!this.target) {
                  this.element.previousElementSibling.classList.add(VMENU);
                }
                this.element.classList.remove("e-hide-menu");
              }
              this.element.setAttribute("aria-orientation", "vertical");
            } else {
              this.element.classList.remove(VMENU);
              if (this.hamburgerMode) {
                if (!this.target) {
                  this.element.previousElementSibling.classList.remove(VMENU);
                }
                this.element.classList.add("e-hide-menu");
              }
              this.element.removeAttribute("aria-orientation");
            }
            break;
          case "items":
            if (!Object.keys(oldProp.items).length) {
              this.updateMenuItems(newProp.items);
            }
            break;
          case "hamburgerMode":
            if (!this.element.previousElementSibling) {
              _super.prototype.createHeaderContainer.call(this);
            }
            if (newProp.hamburgerMode) {
              this.element.parentElement.classList.add(HAMBURGER);
              [].slice.call(this.element.getElementsByClassName("e-blankicon")).forEach(function(li) {
                li.style[_this.enableRtl ? "paddingRight" : "paddingLeft"] = "";
              });
            } else {
              this.element.parentElement.classList.remove(HAMBURGER);
              if (this.orientation === "Vertical") {
                this.setBlankIconStyle(this.element);
              }
            }
            if (this.orientation === "Vertical") {
              if (!this.target) {
                this.element.previousElementSibling.classList.add(VMENU);
              }
              this.element.classList.remove("e-hide-menu");
            } else {
              if (this.target) {
                this.element.previousElementSibling.classList.add(VMENU);
              } else {
                this.element.previousElementSibling.classList.remove(VMENU);
              }
              this.element.classList[newProp.hamburgerMode ? "add" : "remove"]("e-hide-menu");
            }
            break;
          case "title":
            if (this.hamburgerMode && this.element.previousElementSibling) {
              newProp.title = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(newProp.title) : newProp.title;
              this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML = newProp.title;
            }
            break;
          case "target":
            if (this.hamburgerMode) {
              this.unWireEvents(oldProp.target);
              this.wireEvents();
              if (this.orientation === "Horizontal") {
                if (!newProp.target) {
                  if (!this.element.previousElementSibling) {
                    _super.prototype.createHeaderContainer.call(this);
                  }
                  this.element.previousElementSibling.classList.remove(VMENU);
                } else {
                  this.element.previousElementSibling.classList.add(VMENU);
                }
                this.element.classList.add("e-hide-menu");
              }
            }
            break;
          case "template":
            this.template = newProp.template;
            this.refresh();
            break;
        }
      }
      _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
    };
    Menu2.prototype.createMenuItems = function(item) {
      var idx;
      var i;
      var items = this.items;
      var pIdField = this.getField("parentId");
      if (item["" + pIdField]) {
        idx = this.getIndex(item["" + pIdField].toString(), true);
        for (i = 0; i < idx.length; i++) {
          if (!items[idx[i]].items) {
            items[idx[i]].items = [];
          }
          items = items[idx[i]].items;
        }
        items.push(item);
      } else {
        this.items.push(item);
      }
    };
    Menu2.prototype.open = function() {
      _super.prototype.openHamburgerMenu.call(this);
    };
    Menu2.prototype.close = function() {
      _super.prototype.closeHamburgerMenu.call(this);
    };
    __decorate74([Property2("Horizontal")], Menu2.prototype, "orientation", void 0);
    __decorate74([Property2("")], Menu2.prototype, "target", void 0);
    __decorate74([Property2(null)], Menu2.prototype, "template", void 0);
    __decorate74([Property2(false)], Menu2.prototype, "enableScrolling", void 0);
    __decorate74([Property2(false)], Menu2.prototype, "hamburgerMode", void 0);
    __decorate74([Property2("Menu")], Menu2.prototype, "title", void 0);
    __decorate74([Property2(true)], Menu2.prototype, "enableHtmlSanitizer", void 0);
    __decorate74([Complex2({
      itemId: "id",
      text: "text",
      parentId: "parentId",
      iconCss: "iconCss",
      url: "url",
      separator: "separator",
      children: "items"
    }, FieldSettings3)], Menu2.prototype, "fields", void 0);
    Menu2 = __decorate74([NotifyPropertyChanges2], Menu2);
    return Menu2;
  }(MenuBase)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/tab/tab.js
var __extends77 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate75 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_TAB = "e-tab";
var CLS_HEADER2 = "e-tab-header";
var CLS_BLA_TEM = "blazor-template";
var CLS_CONTENT2 = "e-content";
var CLS_NEST2 = "e-nested";
var CLS_ITEMS2 = "e-items";
var CLS_ITEM3 = "e-item";
var CLS_TEMPLATE2 = "e-template";
var CLS_RTL5 = "e-rtl";
var CLS_ACTIVE2 = "e-active";
var CLS_DISABLE5 = "e-disable";
var CLS_HIDDEN2 = "e-hidden";
var CLS_FOCUS = "e-focused";
var CLS_ICONS = "e-icons";
var CLS_ICON = "e-icon";
var CLS_ICON_TAB = "e-icon-tab";
var CLS_ICON_CLOSE = "e-close-icon";
var CLS_CLOSE_SHOW = "e-close-show";
var CLS_TEXT = "e-tab-text";
var CLS_INDICATOR = "e-indicator";
var CLS_WRAP = "e-tab-wrap";
var CLS_TEXT_WRAP = "e-text-wrap";
var CLS_TAB_ICON = "e-tab-icon";
var CLS_TB_ITEMS = "e-toolbar-items";
var CLS_TB_ITEM = "e-toolbar-item";
var CLS_TB_POP = "e-toolbar-pop";
var CLS_TB_POPUP = "e-toolbar-popup";
var CLS_HOR_NAV = "e-hor-nav";
var CLS_POPUP_OPEN = "e-popup-open";
var CLS_POPUP_CLOSE = "e-popup-close";
var CLS_PROGRESS = "e-progress";
var CLS_IGNORE = "e-ignore";
var CLS_OVERLAY3 = "e-overlay";
var CLS_HSCRCNT = "e-hscroll-content";
var CLS_VSCRCNT = "e-vscroll-content";
var CLS_VTAB = "e-vertical-tab";
var CLS_VERTICAL2 = "e-vertical";
var CLS_VLEFT = "e-vertical-left";
var CLS_VRIGHT = "e-vertical-right";
var CLS_HBOTTOM = "e-horizontal-bottom";
var CLS_FILL = "e-fill-mode";
var TABITEMPREFIX = "tabitem_";
var CLS_REORDER_ACTIVE_ITEM = "e-reorder-active-item";
var TabActionSettings = (
  /** @class */
  function(_super) {
    __extends77(TabActionSettings2, _super);
    function TabActionSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate75([Property2("SlideLeftIn")], TabActionSettings2.prototype, "effect", void 0);
    __decorate75([Property2(600)], TabActionSettings2.prototype, "duration", void 0);
    __decorate75([Property2("ease")], TabActionSettings2.prototype, "easing", void 0);
    return TabActionSettings2;
  }(ChildProperty2)
);
var TabAnimationSettings = (
  /** @class */
  function(_super) {
    __extends77(TabAnimationSettings2, _super);
    function TabAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate75([Complex2({
      effect: "SlideLeftIn",
      duration: 600,
      easing: "ease"
    }, TabActionSettings)], TabAnimationSettings2.prototype, "previous", void 0);
    __decorate75([Complex2({
      effect: "SlideRightIn",
      duration: 600,
      easing: "ease"
    }, TabActionSettings)], TabAnimationSettings2.prototype, "next", void 0);
    return TabAnimationSettings2;
  }(ChildProperty2)
);
var Header = (
  /** @class */
  function(_super) {
    __extends77(Header2, _super);
    function Header2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate75([Property2("")], Header2.prototype, "text", void 0);
    __decorate75([Property2("")], Header2.prototype, "iconCss", void 0);
    __decorate75([Property2("left")], Header2.prototype, "iconPosition", void 0);
    return Header2;
  }(ChildProperty2)
);
var TabItem = (
  /** @class */
  function(_super) {
    __extends77(TabItem2, _super);
    function TabItem2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate75([Complex2({}, Header)], TabItem2.prototype, "header", void 0);
    __decorate75([Property2(null)], TabItem2.prototype, "headerTemplate", void 0);
    __decorate75([Property2("")], TabItem2.prototype, "content", void 0);
    __decorate75([Property2("")], TabItem2.prototype, "cssClass", void 0);
    __decorate75([Property2(false)], TabItem2.prototype, "disabled", void 0);
    __decorate75([Property2(true)], TabItem2.prototype, "visible", void 0);
    __decorate75([Property2()], TabItem2.prototype, "id", void 0);
    __decorate75([Property2(-1)], TabItem2.prototype, "tabIndex", void 0);
    return TabItem2;
  }(ChildProperty2)
);
var Tab = (
  /** @class */
  function(_super) {
    __extends77(Tab2, _super);
    function Tab2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.show = {};
      _this.hide = {};
      _this.maxHeight = 0;
      _this.title = "Close";
      _this.isInteracted = false;
      _this.lastIndex = 0;
      _this.isAdd = false;
      _this.isIconAlone = false;
      _this.draggableItems = [];
      _this.resizeContext = _this.refreshActiveTabBorder.bind(_this);
      _this.keyConfigs = {
        tab: "tab",
        home: "home",
        end: "end",
        enter: "enter",
        space: "space",
        delete: "delete",
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        moveDown: "downarrow"
      };
      return _this;
    }
    Tab2.prototype.destroy = function() {
      if (this.isReact || this.isAngular) {
        this.clearTemplate();
      }
      if (!isNullOrUndefined2(this.tbObj)) {
        this.tbObj.destroy();
        this.tbObj = null;
      }
      this.unWireEvents();
      this.element.removeAttribute("aria-disabled");
      this.expTemplateContent();
      if (!this.isTemplate) {
        while (this.element.firstElementChild) {
          remove(this.element.firstElementChild);
        }
      } else {
        var cntEle = select2("." + CLS_TAB + " > ." + CLS_CONTENT2, this.element);
        this.element.classList.remove(CLS_TEMPLATE2);
        if (!isNullOrUndefined2(cntEle)) {
          cntEle.innerHTML = this.cnt;
        }
      }
      if (this.btnCls) {
        this.btnCls = null;
      }
      this.hdrEle = null;
      this.cntEle = null;
      this.tbItems = null;
      this.tbItem = null;
      this.tbPop = null;
      this.prevItem = null;
      this.popEle = null;
      this.bdrLine = null;
      this.content = null;
      this.dragItem = null;
      this.cloneElement = null;
      this.draggingItems = [];
      if (this.draggableItems && this.draggableItems.length > 0) {
        for (var i = 0; i < this.draggableItems.length; i++) {
          this.draggableItems[i].destroy();
          this.draggableItems[i] = null;
        }
        this.draggableItems = [];
      }
      _super.prototype.destroy.call(this);
      this.trigger("destroyed");
    };
    Tab2.prototype.refresh = function() {
      if (this.isReact) {
        this.clearTemplate();
      }
      _super.prototype.refresh.call(this);
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Tab2.prototype.refreshOverflow = function() {
      if (!isNullOrUndefined2(this.tbObj)) {
        this.tbObj.refreshOverflow();
      }
    };
    Tab2.prototype.preRender = function() {
      var nested = closest2(this.element, "." + CLS_CONTENT2);
      this.prevIndex = 0;
      this.isNested = false;
      this.isPopup = false;
      this.initRender = true;
      this.isSwiped = false;
      this.itemIndexArray = [];
      this.templateEle = [];
      if (this.allowDragAndDrop) {
        this.dragArea = !isNullOrUndefined2(this.dragArea) ? this.dragArea : "#" + this.element.id + " " + ("." + CLS_HEADER2);
      }
      if (!isNullOrUndefined2(nested)) {
        nested.parentElement.classList.add(CLS_NEST2);
        this.isNested = true;
      }
      var name = Browser2.info.name;
      var css = name === "msie" ? "e-ie" : name === "edge" ? "e-edge" : name === "safari" ? "e-safari" : "";
      setStyleAttribute2(this.element, {
        "width": formatUnit(this.width),
        "height": formatUnit(this.height)
      });
      this.setCssClass(this.element, this.cssClass, true);
      attributes2(this.element, {
        "aria-disabled": "false"
      });
      this.setCssClass(this.element, css, true);
      this.updatePopAnimationConfig();
    };
    Tab2.prototype.render = function() {
      var _this = this;
      this.btnCls = this.createElement("span", {
        className: CLS_ICONS + " " + CLS_ICON_CLOSE,
        attrs: {
          title: this.title
        }
      });
      this.tabId = this.element.id.length > 0 ? "-" + this.element.id : getRandomId();
      this.renderContainer();
      this.wireEvents();
      this.initRender = false;
      if (this.isReact && this.portals && this.portals.length > 0) {
        this.renderReactTemplates(function() {
          _this.refreshOverflow();
          _this.refreshActiveBorder();
        });
      }
    };
    Tab2.prototype.renderContainer = function() {
      var ele = this.element;
      this.items.forEach(function(item, index) {
        if (isNullOrUndefined2(item.id) && !isNullOrUndefined2(item.setProperties)) {
          item.setProperties({
            id: TABITEMPREFIX + index.toString()
          }, true);
        }
      });
      if (this.items.length > 0 && ele.children.length === 0) {
        ele.appendChild(this.createElement("div", {
          className: CLS_CONTENT2
        }));
        this.setOrientation(this.headerPlacement, this.createElement("div", {
          className: CLS_HEADER2
        }));
        this.isTemplate = false;
      } else if (this.element.children.length > 0) {
        this.isTemplate = true;
        ele.classList.add(CLS_TEMPLATE2);
        var header = ele.querySelector("." + CLS_HEADER2);
        if (header && this.headerPlacement === "Bottom") {
          this.setOrientation(this.headerPlacement, header);
        }
      }
      if (!isNullOrUndefined2(select2("." + CLS_HEADER2, this.element)) && !isNullOrUndefined2(select2("." + CLS_CONTENT2, this.element))) {
        this.renderHeader();
        this.tbItems = select2("." + CLS_HEADER2 + " ." + CLS_TB_ITEMS, this.element);
        if (!isNullOrUndefined2(this.tbItems)) {
          rippleEffect(this.tbItems, {
            selector: ".e-tab-wrap"
          });
        }
        this.renderContent();
        if (selectAll2("." + CLS_TB_ITEM, this.element).length > 0) {
          this.tbItems = select2("." + CLS_HEADER2 + " ." + CLS_TB_ITEMS, this.element);
          this.bdrLine = this.createElement("div", {
            className: CLS_INDICATOR + " " + CLS_HIDDEN2 + " " + CLS_IGNORE
          });
          var scrCnt = select2("." + this.scrCntClass, this.tbItems);
          if (!isNullOrUndefined2(scrCnt)) {
            scrCnt.insertBefore(this.bdrLine, scrCnt.firstChild);
          } else {
            this.tbItems.insertBefore(this.bdrLine, this.tbItems.firstChild);
          }
          this.setContentHeight(true);
          this.select(this.selectedItem);
        }
        this.setRTL(this.enableRtl);
      }
    };
    Tab2.prototype.renderHeader = function() {
      var _this = this;
      var hdrPlace = this.headerPlacement;
      var tabItems = [];
      this.hdrEle = this.getTabHeader();
      this.addVerticalClass();
      if (!this.isTemplate) {
        tabItems = this.parseObject(this.items, 0);
      } else {
        if (this.element.children.length > 1 && this.element.children[1].classList.contains(CLS_HEADER2)) {
          this.setProperties({
            headerPlacement: "Bottom"
          }, true);
        }
        var count = this.hdrEle.children.length;
        var hdrItems = [];
        for (var i = 0; i < count; i++) {
          hdrItems.push(this.hdrEle.children.item(i));
        }
        if (count > 0) {
          var tabItems_1 = this.createElement("div", {
            className: CLS_ITEMS2
          });
          this.hdrEle.appendChild(tabItems_1);
          hdrItems.forEach(function(item, index) {
            _this.lastIndex = index;
            var attr = {
              className: CLS_ITEM3,
              id: CLS_ITEM3 + _this.tabId + "_" + index
            };
            var txt = _this.createElement("span", {
              className: CLS_TEXT,
              attrs: {
                "role": "presentation"
              }
            }).outerHTML;
            var cont = _this.createElement("div", {
              className: CLS_TEXT_WRAP,
              innerHTML: txt + _this.btnCls.outerHTML
            }).outerHTML;
            var wrap = _this.createElement("div", {
              className: CLS_WRAP,
              innerHTML: cont,
              attrs: {
                role: "tab",
                tabIndex: "-1",
                "aria-selected": "false",
                "aria-controls": CLS_CONTENT2 + _this.tabId + "_" + index,
                "aria-disabled": "false"
              }
            });
            wrap.querySelector("." + CLS_TEXT).appendChild(item);
            tabItems_1.appendChild(_this.createElement("div", attr));
            selectAll2("." + CLS_ITEM3, tabItems_1)[index].appendChild(wrap);
          });
        }
      }
      this.tbObj = new Toolbar({
        width: hdrPlace === "Left" || hdrPlace === "Right" ? "auto" : "100%",
        height: hdrPlace === "Left" || hdrPlace === "Right" ? "100%" : "auto",
        overflowMode: this.overflowMode,
        items: tabItems.length !== 0 ? tabItems : [],
        clicked: this.clickHandler.bind(this),
        scrollStep: this.scrollStep,
        enableHtmlSanitizer: this.enableHtmlSanitizer,
        cssClass: this.cssClass
      });
      this.tbObj.isStringTemplate = true;
      this.tbObj.createElement = this.createElement;
      this.tbObj.appendTo(this.hdrEle);
      attributes2(this.hdrEle, {
        role: "tablist"
      });
      if (!isNullOrUndefined2(this.element.getAttribute("aria-label"))) {
        this.hdrEle.setAttribute("aria-label", this.element.getAttribute("aria-label"));
        this.element.removeAttribute("aria-label");
      } else if (!isNullOrUndefined2(this.element.getAttribute("aria-labelledby"))) {
        this.hdrEle.setAttribute("aria-labelledby", this.element.getAttribute("aria-labelledby"));
        this.element.removeAttribute("aria-labelledby");
      }
      this.setCloseButton(this.showCloseButton);
      var toolbarHeader = this.tbObj.element.querySelector("." + CLS_TB_ITEMS);
      if (!isNullOrUndefined2(toolbarHeader)) {
        if (isNullOrUndefined2(toolbarHeader.id) || toolbarHeader.id === "") {
          toolbarHeader.id = this.element.id + "_tab_header_items";
        }
      }
    };
    Tab2.prototype.createContentElement = function(index) {
      var contentElement = this.createElement("div", {
        id: CLS_CONTENT2 + this.tabId + "_" + index,
        className: CLS_ITEM3,
        attrs: {
          "role": "tabpanel",
          "aria-labelledby": CLS_ITEM3 + this.tabId + "_" + index
        }
      });
      if (["Dynamic", "Demand"].indexOf(this.loadOn) !== -1 || this.loadOn === "Init" && index === Number(this.extIndex(this.itemIndexArray[0]))) {
        addClass2([contentElement], CLS_ACTIVE2);
      }
      return contentElement;
    };
    Tab2.prototype.renderContent = function() {
      this.cntEle = select2("." + CLS_CONTENT2, this.element);
      var hdrItem = selectAll2("." + CLS_TB_ITEM, this.element);
      if (this.isTemplate) {
        this.cnt = this.cntEle.children.length > 0 ? this.cntEle.innerHTML : "";
        var contents = this.cntEle.children;
        for (var i = 0; i < hdrItem.length; i++) {
          if (contents.length - 1 >= i) {
            addClass2([contents.item(i)], CLS_ITEM3);
            attributes2(contents.item(i), {
              "role": "tabpanel",
              "aria-labelledby": CLS_ITEM3 + this.tabId + "_" + i
            });
            contents.item(i).id = CLS_CONTENT2 + this.tabId + "_" + i;
          }
        }
      } else {
        if (selectAll2("." + CLS_TB_ITEM, this.element).length > 0) {
          if (this.loadOn === "Init") {
            for (var i = 0; i < this.itemIndexArray.length; i++) {
              if (this.itemIndexArray[i]) {
                this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[i]))));
              }
            }
          } else if (this.loadOn === "Dynamic") {
            this.cntEle.appendChild(this.createContentElement(this.selectedItem > 0 ? this.selectedItem : Number(this.extIndex(this.itemIndexArray[0]))));
          }
        }
      }
    };
    Tab2.prototype.reRenderItems = function() {
      this.renderContainer();
      if (!isNullOrUndefined2(this.cntEle)) {
        this.bindSwipeEvents();
      }
    };
    Tab2.prototype.parseObject = function(items, index) {
      var _this = this;
      var tbItems = Array.prototype.slice.call(selectAll2(".e-tab-header ." + CLS_TB_ITEM, this.element));
      var maxId = this.lastIndex;
      if (!this.isReplace && tbItems.length > 0) {
        maxId = this.getMaxIndicesFromItems(tbItems);
      }
      var tItems = [];
      var txtWrapEle;
      var spliceArray = [];
      var i = 0;
      items.forEach(function(item, i2) {
        var pos = isNullOrUndefined2(item.header) || isNullOrUndefined2(item.header.iconPosition) ? "" : item.header.iconPosition;
        var css = isNullOrUndefined2(item.header) || isNullOrUndefined2(item.header.iconCss) ? "" : item.header.iconCss;
        if (isNullOrUndefined2(item.headerTemplate) && (isNullOrUndefined2(item.header) || isNullOrUndefined2(item.header.text) || item.header.text.length === 0 && css === "")) {
          spliceArray.push(i2);
          return;
        }
        var txt = item.headerTemplate || item.header.text;
        if (typeof txt === "string" && _this.enableHtmlSanitizer) {
          txt = SanitizeHtmlHelper2.sanitize(txt);
        }
        var itemIndex;
        if (_this.isReplace && !isNullOrUndefined2(_this.tbId) && _this.tbId !== "") {
          itemIndex = parseInt(_this.tbId.substring(_this.tbId.lastIndexOf("_") + 1), 10);
          _this.tbId = "";
        } else {
          itemIndex = index + i2;
        }
        _this.lastIndex = tbItems.length === 0 ? i2 : _this.isReplace ? itemIndex : maxId + 1 + i2;
        var disabled = item.disabled ? " " + CLS_DISABLE5 + " " + CLS_OVERLAY3 : "";
        var hidden = item.visible === false ? " " + CLS_HIDDEN2 : "";
        txtWrapEle = _this.createElement("div", {
          className: CLS_TEXT,
          attrs: {
            "role": "presentation"
          }
        });
        var tHtml = txt instanceof Object ? txt.outerHTML : txt;
        var txtEmpty = !isNullOrUndefined2(tHtml) && tHtml !== "";
        if (!isNullOrUndefined2(txt.tagName)) {
          txtWrapEle.appendChild(txt);
        } else {
          _this.headerTextCompile(txtWrapEle, txt, i2);
        }
        var tEle;
        var icon = _this.createElement("span", {
          className: CLS_ICONS + " " + CLS_TAB_ICON + " " + CLS_ICON + "-" + pos + " " + css
        });
        var tCont = _this.createElement("div", {
          className: CLS_TEXT_WRAP
        });
        tCont.appendChild(txtWrapEle);
        if (txt !== "" && txt !== void 0 && css !== "") {
          if (pos === "left" || pos === "top") {
            tCont.insertBefore(icon, tCont.firstElementChild);
          } else {
            tCont.appendChild(icon);
          }
          tEle = txtWrapEle;
          _this.isIconAlone = false;
        } else {
          tEle = css === "" ? txtWrapEle : icon;
          if (tEle === icon) {
            detach2(txtWrapEle);
            tCont.appendChild(icon);
            _this.isIconAlone = true;
          }
        }
        var tabIndex = isNullOrUndefined2(item.tabIndex) ? "-1" : item.tabIndex.toString();
        var wrapAttrs = item.disabled ? {
          role: "tab",
          "aria-disabled": "true"
        } : {
          tabIndex,
          "data-tabindex": tabIndex,
          role: "tab",
          "aria-selected": "false",
          "aria-disabled": "false"
        };
        tCont.appendChild(_this.btnCls.cloneNode(true));
        var wrap = _this.createElement("div", {
          className: CLS_WRAP,
          attrs: wrapAttrs
        });
        wrap.appendChild(tCont);
        if (_this.itemIndexArray instanceof Array) {
          _this.itemIndexArray.splice(index + i2, 0, CLS_ITEM3 + _this.tabId + "_" + _this.lastIndex);
        }
        var attrObj = {
          id: CLS_ITEM3 + _this.tabId + "_" + _this.lastIndex,
          "data-id": item.id
        };
        var tItem = {
          htmlAttributes: attrObj,
          template: wrap
        };
        tItem.cssClass = (item.cssClass !== void 0 ? item.cssClass : " ") + " " + disabled + " " + hidden + " " + (css !== "" ? "e-i" + pos : "") + " " + (!txtEmpty ? CLS_ICON : "");
        if (pos === "top" || pos === "bottom") {
          _this.element.classList.add("e-vertical-icon");
        }
        tItems.push(tItem);
        i2++;
      });
      if (!this.isAdd) {
        spliceArray.forEach(function(spliceItemIndex) {
          _this.items.splice(spliceItemIndex, 1);
        });
      }
      if (this.isIconAlone) {
        this.element.classList.add(CLS_ICON_TAB);
      } else {
        this.element.classList.remove(CLS_ICON_TAB);
      }
      return tItems;
    };
    Tab2.prototype.removeActiveClass = function() {
      var tabHeader = this.getTabHeader();
      if (tabHeader) {
        var tabItems = selectAll2("." + CLS_TB_ITEM + "." + CLS_ACTIVE2, tabHeader);
        [].slice.call(tabItems).forEach(function(node) {
          return node.classList.remove(CLS_ACTIVE2);
        });
        [].slice.call(tabItems).forEach(function(node) {
          return node.firstElementChild.setAttribute("aria-selected", "false");
        });
      }
    };
    Tab2.prototype.checkPopupOverflow = function(ele) {
      this.tbPop = select2("." + CLS_TB_POP, this.element);
      var popIcon = select2(".e-hor-nav", this.element);
      var tbrItems = select2("." + CLS_TB_ITEMS, this.element);
      var lastChild = tbrItems.lastChild;
      var isOverflow = false;
      if (!this.isVertical() && (this.enableRtl && popIcon.offsetLeft + popIcon.offsetWidth > tbrItems.offsetLeft || !this.enableRtl && popIcon.offsetLeft < tbrItems.offsetWidth)) {
        isOverflow = true;
      } else if (this.isVertical() && popIcon.offsetTop < lastChild.offsetTop + lastChild.offsetHeight) {
        isOverflow = true;
      }
      if (isOverflow) {
        ele.classList.add(CLS_TB_POPUP);
        this.tbPop.insertBefore(ele, selectAll2("." + CLS_TB_POPUP, this.tbPop)[0]);
      }
      return true;
    };
    Tab2.prototype.popupHandler = function(target) {
      var ripEle = target.querySelector(".e-ripple-element");
      if (!isNullOrUndefined2(ripEle)) {
        ripEle.outerHTML = "";
        target.querySelector("." + CLS_WRAP).classList.remove("e-ripple");
      }
      this.tbItem = selectAll2("." + CLS_TB_ITEMS + " ." + CLS_TB_ITEM, this.hdrEle);
      var lastChild = this.tbItem[this.tbItem.length - 1];
      if (this.tbItem.length !== 0) {
        target.classList.remove(CLS_TB_POPUP);
        target.removeAttribute("style");
        this.tbItems.appendChild(target);
        this.actEleId = target.id;
        if (this.checkPopupOverflow(lastChild)) {
          var prevEle = this.tbItems.lastChild.previousElementSibling;
          this.checkPopupOverflow(prevEle);
        }
        this.isPopup = true;
      }
      return selectAll2("." + CLS_TB_ITEM, this.tbItems).length - 1;
    };
    Tab2.prototype.setCloseButton = function(val) {
      var trg = select2("." + CLS_HEADER2, this.element);
      if (val === true) {
        trg.classList.add(CLS_CLOSE_SHOW);
      } else {
        trg.classList.remove(CLS_CLOSE_SHOW);
      }
      this.refreshOverflow();
      this.refreshActiveTabBorder();
    };
    Tab2.prototype.prevCtnAnimation = function(prev, current) {
      var animation;
      var checkRTL = this.enableRtl || this.element.classList.contains(CLS_RTL5);
      if (this.isPopup || prev <= current) {
        if (this.animation.previous.effect === "SlideLeftIn") {
          animation = {
            name: "SlideLeftOut",
            duration: this.animation.previous.duration,
            timingFunction: this.animation.previous.easing
          };
        } else {
          animation = null;
        }
      } else {
        if (this.animation.next.effect === "SlideRightIn") {
          animation = {
            name: "SlideRightOut",
            duration: this.animation.next.duration,
            timingFunction: this.animation.next.easing
          };
        } else {
          animation = null;
        }
      }
      return animation;
    };
    Tab2.prototype.triggerPrevAnimation = function(oldCnt, prevIndex) {
      var _this = this;
      var animateObj = this.prevCtnAnimation(prevIndex, this.selectedItem);
      if (!isNullOrUndefined2(animateObj)) {
        animateObj.begin = function() {
          setStyleAttribute2(oldCnt, {
            "position": "absolute"
          });
          oldCnt.classList.add(CLS_PROGRESS);
          oldCnt.classList.add("e-view");
        };
        animateObj.end = function() {
          oldCnt.style.display = "none";
          oldCnt.classList.remove(CLS_ACTIVE2);
          oldCnt.classList.remove(CLS_PROGRESS);
          oldCnt.classList.remove("e-view");
          setStyleAttribute2(oldCnt, {
            "display": "",
            "position": ""
          });
          if (oldCnt.childNodes.length === 0 && !_this.isTemplate) {
            detach2(oldCnt);
          }
        };
        new Animation2(animateObj).animate(oldCnt);
      } else {
        oldCnt.classList.remove(CLS_ACTIVE2);
      }
    };
    Tab2.prototype.triggerAnimation = function(id, value) {
      var _this = this;
      var prevIndex = this.prevIndex;
      var oldCnt;
      var itemCollection = [].slice.call(this.element.querySelector("." + CLS_CONTENT2).children);
      itemCollection.forEach(function(item) {
        if (item.id === _this.prevActiveEle) {
          oldCnt = item;
        }
      });
      var prevEle = this.tbItem[prevIndex];
      var newCnt = this.getTrgContent(this.cntEle, this.extIndex(id));
      if (isNullOrUndefined2(oldCnt) && !isNullOrUndefined2(prevEle)) {
        var idNo = this.extIndex(prevEle.id);
        oldCnt = this.getTrgContent(this.cntEle, idNo);
      }
      if (!isNullOrUndefined2(newCnt)) {
        this.prevActiveEle = newCnt.id;
      }
      var isPrevent = isNullOrUndefined2(this.animation) || isNullOrUndefined2(this.animation.next.effect) || isNullOrUndefined2(this.animation.previous.effect) || this.animation.previous.effect === "None" || this.animation.next.effect === "None";
      if (this.initRender || value === false || isPrevent) {
        if (oldCnt && oldCnt !== newCnt) {
          oldCnt.classList.remove(CLS_ACTIVE2);
        }
        return;
      }
      var cnt = select2("." + CLS_CONTENT2, this.element);
      var animateObj;
      if (this.prevIndex > this.selectedItem && !this.isPopup) {
        var openEff = this.animation.previous.effect;
        animateObj = {
          name: openEff === "None" ? "" : openEff !== "SlideLeftIn" ? openEff : "SlideLeftIn",
          duration: this.animation.previous.duration === 0 && animationMode2 === "Enable" ? 600 : this.animation.previous.duration,
          timingFunction: this.animation.previous.easing
        };
      } else if (this.isPopup || this.prevIndex < this.selectedItem || this.prevIndex === this.selectedItem) {
        var clsEff = this.animation.next.effect;
        animateObj = {
          name: clsEff === "None" ? "" : clsEff !== "SlideRightIn" ? clsEff : "SlideRightIn",
          duration: this.animation.next.duration === 0 && animationMode2 === "Enable" ? 600 : this.animation.next.duration,
          timingFunction: this.animation.next.easing
        };
      }
      animateObj.progress = function() {
        cnt.classList.add(CLS_PROGRESS);
        _this.setActiveBorder();
      };
      animateObj.end = function() {
        cnt.classList.remove(CLS_PROGRESS);
        newCnt.classList.add(CLS_ACTIVE2);
      };
      if (!this.initRender && !isNullOrUndefined2(oldCnt)) {
        this.triggerPrevAnimation(oldCnt, prevIndex);
      }
      this.isPopup = false;
      if (animateObj.name === "") {
        newCnt.classList.add(CLS_ACTIVE2);
      } else {
        new Animation2(animateObj).animate(newCnt);
      }
    };
    Tab2.prototype.keyPressed = function(trg) {
      var trgParent = closest2(trg, "." + CLS_HEADER2 + " ." + CLS_TB_ITEM);
      var trgIndex = this.getEleIndex(trgParent);
      if (!isNullOrUndefined2(this.popEle) && trg.classList.contains("e-hor-nav")) {
        this.popEle.classList.contains(CLS_POPUP_OPEN) ? this.popObj.hide(this.hide) : this.popObj.show(this.show);
      } else if (trg.classList.contains("e-scroll-nav")) {
        trg.click();
      } else {
        if (!isNullOrUndefined2(trgParent) && trgParent.classList.contains(CLS_ACTIVE2) === false) {
          this.selectTab(trgIndex, null, true);
          if (!isNullOrUndefined2(this.popEle)) {
            this.popObj.hide(this.hide);
          }
        }
      }
    };
    Tab2.prototype.getTabHeader = function() {
      if (isNullOrUndefined2(this.element)) {
        return void 0;
      }
      var headers = [].slice.call(this.element.children).filter(function(e) {
        return e.classList.contains(CLS_HEADER2);
      });
      if (headers.length > 0) {
        return headers[0];
      } else {
        var wrap = [].slice.call(this.element.children).filter(function(e) {
          return !e.classList.contains(CLS_BLA_TEM);
        })[0];
        if (!wrap) {
          return void 0;
        }
        return [].slice.call(wrap.children).filter(function(e) {
          return e.classList.contains(CLS_HEADER2);
        })[0];
      }
    };
    Tab2.prototype.getEleIndex = function(item) {
      return Array.prototype.indexOf.call(selectAll2("." + CLS_TB_ITEM, this.getTabHeader()), item);
    };
    Tab2.prototype.extIndex = function(id) {
      return id.replace(CLS_ITEM3 + this.tabId + "_", "");
    };
    Tab2.prototype.getMaxIndicesFromItems = function(tbItems) {
      var _this = this;
      var idList = [];
      tbItems.forEach(function(item) {
        idList.push(_this.getIndexFromEle(item.id));
      });
      return Math.max.apply(Math, idList);
    };
    Tab2.prototype.expTemplateContent = function() {
      var _this = this;
      this.templateEle.forEach(function(eleStr) {
        if (!isNullOrUndefined2(_this.element.querySelector(eleStr))) {
          document.body.appendChild(_this.element.querySelector(eleStr)).style.display = "none";
        }
      });
    };
    Tab2.prototype.templateCompile = function(ele, cnt, index) {
      var tempEle = this.createElement("div");
      this.compileElement(tempEle, cnt, "content", index);
      if (tempEle.childNodes.length !== 0) {
        ele.appendChild(tempEle);
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Tab2.prototype.compileElement = function(ele, val, prop, index) {
      var templateFn;
      if (typeof val === "string") {
        val = val.trim();
        if (this.isVue) {
          templateFn = compile4(this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(val) : val);
        } else {
          ele.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper2.sanitize(val) : val;
        }
      } else {
        templateFn = compile4(val);
      }
      var templateFUN;
      if (!isNullOrUndefined2(templateFn)) {
        templateFUN = templateFn({}, this, prop);
      }
      if (!isNullOrUndefined2(templateFn) && templateFUN.length > 0) {
        [].slice.call(templateFUN).forEach(function(el) {
          ele.appendChild(el);
        });
      }
    };
    Tab2.prototype.headerTextCompile = function(element2, text, index) {
      this.compileElement(element2, text, "headerTemplate", index);
    };
    Tab2.prototype.getContent = function(ele, cnt, callType, index) {
      var eleStr;
      cnt = isNullOrUndefined2(cnt) ? "" : cnt;
      if (typeof cnt === "string" || isNullOrUndefined2(cnt.innerHTML)) {
        if (typeof cnt === "string" && this.enableHtmlSanitizer) {
          cnt = SanitizeHtmlHelper2.sanitize(cnt);
        }
        if (cnt[0] === "." || cnt[0] === "#") {
          if (document.querySelectorAll(cnt).length) {
            var eleVal = document.querySelector(cnt);
            eleStr = eleVal.outerHTML.trim();
            if (callType === "clone") {
              ele.appendChild(eleVal.cloneNode(true));
            } else {
              ele.appendChild(eleVal);
              eleVal.style.display = "";
            }
          } else {
            this.templateCompile(ele, cnt, index);
          }
        } else {
          this.templateCompile(ele, cnt, index);
        }
      } else {
        ele.appendChild(cnt);
      }
      if (!isNullOrUndefined2(eleStr)) {
        if (this.templateEle.indexOf(cnt.toString()) === -1) {
          this.templateEle.push(cnt.toString());
        }
      }
    };
    Tab2.prototype.getTrgContent = function(cntEle, no) {
      var ele;
      if (this.element.classList.contains(CLS_NEST2)) {
        ele = select2("." + CLS_NEST2 + "> ." + CLS_CONTENT2 + " > #" + CLS_CONTENT2 + this.tabId + "_" + no, this.element);
      } else {
        ele = this.findEle(cntEle.children, CLS_CONTENT2 + this.tabId + "_" + no);
      }
      return ele;
    };
    Tab2.prototype.findEle = function(items, key) {
      var ele;
      for (var i = 0; i < items.length; i++) {
        if (items[i].id === key) {
          ele = items[i];
          break;
        }
      }
      return ele;
    };
    Tab2.prototype.isVertical = function() {
      var isVertical = this.headerPlacement === "Left" || this.headerPlacement === "Right" ? true : false;
      this.scrCntClass = isVertical ? CLS_VSCRCNT : CLS_HSCRCNT;
      return isVertical;
    };
    Tab2.prototype.addVerticalClass = function() {
      if (this.isVertical()) {
        var tbPos = this.headerPlacement === "Left" ? CLS_VLEFT : CLS_VRIGHT;
        addClass2([this.hdrEle], [CLS_VERTICAL2, tbPos]);
        if (!this.element.classList.contains(CLS_NEST2)) {
          addClass2([this.element], [CLS_VTAB, tbPos]);
        } else {
          addClass2([this.hdrEle], [CLS_VTAB, tbPos]);
        }
      }
      if (this.headerPlacement === "Bottom") {
        addClass2([this.hdrEle], [CLS_HBOTTOM]);
      }
    };
    Tab2.prototype.updatePopAnimationConfig = function() {
      this.show = {
        name: this.isVertical() ? "FadeIn" : "SlideDown",
        duration: 100
      };
      this.hide = {
        name: this.isVertical() ? "FadeOut" : "SlideUp",
        duration: 100
      };
    };
    Tab2.prototype.changeOrientation = function(place) {
      this.setOrientation(place, this.hdrEle);
      var activeTab = this.hdrEle.querySelector("." + CLS_ACTIVE2);
      var isVertical = this.hdrEle.classList.contains(CLS_VERTICAL2) ? true : false;
      removeClass2([this.element], [CLS_VTAB]);
      removeClass2([this.hdrEle], [CLS_VERTICAL2, CLS_VLEFT, CLS_VRIGHT]);
      if (isVertical !== this.isVertical()) {
        this.changeToolbarOrientation();
        if (!isNullOrUndefined2(activeTab) && activeTab.classList.contains(CLS_TB_POPUP)) {
          this.popupHandler(activeTab);
        }
      }
      this.addVerticalClass();
      this.setActiveBorder();
      this.focusItem();
    };
    Tab2.prototype.focusItem = function() {
      var curActItem = select2(" #" + CLS_ITEM3 + this.tabId + "_" + this.selectedItem, this.hdrEle);
      if (!isNullOrUndefined2(curActItem)) {
        curActItem.firstElementChild.focus();
      }
    };
    Tab2.prototype.changeToolbarOrientation = function() {
      this.tbObj.setProperties({
        height: this.isVertical() ? "100%" : "auto",
        width: this.isVertical() ? "auto" : "100%"
      }, true);
      this.tbObj.changeOrientation();
      this.updatePopAnimationConfig();
    };
    Tab2.prototype.setOrientation = function(place, ele) {
      var headerPos = Array.prototype.indexOf.call(this.element.children, ele);
      var contentPos = Array.prototype.indexOf.call(this.element.children, this.element.querySelector("." + CLS_CONTENT2));
      if (place === "Bottom" && contentPos > headerPos) {
        this.element.appendChild(ele);
      } else {
        removeClass2([ele], [CLS_HBOTTOM]);
        this.element.insertBefore(ele, select2("." + CLS_CONTENT2, this.element));
      }
    };
    Tab2.prototype.setCssClass = function(ele, cls, val) {
      if (cls === "" || isNullOrUndefined2(cls)) {
        return;
      }
      var list = cls.split(" ");
      for (var i = 0; i < list.length; i++) {
        if (val) {
          ele.classList.add(list[i]);
        } else {
          ele.classList.remove(list[i]);
        }
      }
    };
    Tab2.prototype.loadContentInitMode = function(ele) {
      if (!ele) {
        return;
      }
      if (this.loadOn === "Init") {
        for (var i = 0; i < this.items.length; i++) {
          if (this.cntEle.children.item(i)) {
            this.getContent(this.cntEle.children.item(i), this.items[i].content, "render", i);
          }
        }
      }
      if (this.prevIndex !== this.selectedItem) {
        ele.classList.remove(CLS_ACTIVE2);
      }
    };
    Tab2.prototype.loadContentElement = function() {
      if (!this.isTemplate) {
        var ele = this.cntEle.children.item(0);
        this.loadContentInitMode(ele);
      }
    };
    Tab2.prototype.setContentHeight = function(val) {
      if (this.element.classList.contains(CLS_FILL)) {
        removeClass2([this.element], [CLS_FILL]);
      }
      if (isNullOrUndefined2(this.cntEle)) {
        return;
      }
      var hdrEle = this.getTabHeader();
      if (this.heightAdjustMode === "None") {
        this.loadContentElement();
        if (this.height === "auto") {
          return;
        } else {
          if (!this.isVertical()) {
            setStyleAttribute2(this.cntEle, {
              "height": this.element.clientHeight - hdrEle.offsetHeight + "px"
            });
          }
        }
      } else if (this.heightAdjustMode === "Fill") {
        addClass2([this.element], [CLS_FILL]);
        setStyleAttribute2(this.element, {
          "height": "100%"
        });
        this.loadContentElement();
        this.cntEle.style.height = "calc(100% - " + this.hdrEle.offsetHeight + "px)";
      } else if (this.heightAdjustMode === "Auto") {
        if (this.isTemplate === true) {
          var cnt = selectAll2("." + CLS_CONTENT2 + " > ." + CLS_ITEM3, this.element);
          for (var i = 0; i < cnt.length; i++) {
            cnt[i].setAttribute("style", "display:block; visibility: visible");
            this.maxHeight = Math.max(this.maxHeight, this.getHeight(cnt[i]));
            cnt[i].style.removeProperty("display");
            cnt[i].style.removeProperty("visibility");
          }
        } else {
          this.cntEle = select2("." + CLS_CONTENT2, this.element);
          if (val === true && this.loadOn === "Demand") {
            this.cntEle.appendChild(this.createContentElement(Number(this.extIndex(this.itemIndexArray[0]))));
          }
          var ele = this.cntEle.children.item(0);
          for (var i = 0; i < this.items.length; i++) {
            this.getContent(ele, this.items[i].content, "clone", i);
            this.maxHeight = Math.max(this.maxHeight, this.getHeight(ele));
            while (ele.firstChild) {
              ele.removeChild(ele.firstChild);
            }
          }
          if (this.isReact || this.isAngular || this.isVue) {
            this.clearTemplate(["content"]);
          }
          this.templateEle = [];
          if (this.loadOn === "Demand") {
            this.getContent(ele, this.items[0].content, "render", 0);
          }
          this.loadContentInitMode(ele);
        }
        setStyleAttribute2(this.cntEle, {
          "height": this.maxHeight + "px"
        });
      } else {
        this.loadContentElement();
        setStyleAttribute2(this.cntEle, {
          "height": "auto"
        });
      }
    };
    Tab2.prototype.getHeight = function(ele) {
      var cs = window.getComputedStyle(ele);
      return ele.offsetHeight + parseFloat(cs.getPropertyValue("padding-top")) + parseFloat(cs.getPropertyValue("padding-bottom")) + parseFloat(cs.getPropertyValue("margin-top")) + parseFloat(cs.getPropertyValue("margin-bottom"));
    };
    Tab2.prototype.setActiveBorder = function() {
      var trgHdrEle = this.getTabHeader();
      var trg = select2("." + CLS_TB_ITEM + "." + CLS_ACTIVE2, trgHdrEle);
      if (isNullOrUndefined2(trg)) {
        return;
      }
      if (!this.reorderActiveTab) {
        if (trg.classList.contains(CLS_TB_POPUP) && !this.bdrLine.classList.contains(CLS_HIDDEN2)) {
          this.bdrLine.classList.add(CLS_HIDDEN2);
        }
        if (trgHdrEle && !trgHdrEle.classList.contains(CLS_REORDER_ACTIVE_ITEM)) {
          trgHdrEle.classList.add(CLS_REORDER_ACTIVE_ITEM);
        }
      } else if (trgHdrEle) {
        trgHdrEle.classList.remove(CLS_REORDER_ACTIVE_ITEM);
      }
      var root = closest2(trg, "." + CLS_TAB);
      if (this.element !== root) {
        return;
      }
      this.tbItems = select2("." + CLS_TB_ITEMS, trgHdrEle);
      var bar = select2("." + CLS_INDICATOR, trgHdrEle);
      var scrollCnt = select2("." + CLS_TB_ITEMS + " ." + this.scrCntClass, trgHdrEle);
      if (this.isVertical()) {
        setStyleAttribute2(bar, {
          "left": "",
          "right": ""
        });
        var tbHeight = isNullOrUndefined2(scrollCnt) ? this.tbItems.offsetHeight : scrollCnt.offsetHeight;
        if (tbHeight !== 0) {
          setStyleAttribute2(bar, {
            "top": trg.offsetTop + "px",
            "height": trg.offsetHeight + "px"
          });
        } else {
          setStyleAttribute2(bar, {
            "top": 0,
            "height": 0
          });
        }
      } else {
        if (this.overflowMode === "MultiRow") {
          var top_1 = this.headerPlacement === "Bottom" ? trg.offsetTop : trg.offsetHeight + trg.offsetTop;
          setStyleAttribute2(bar, {
            "top": top_1 + "px",
            "height": ""
          });
        } else {
          setStyleAttribute2(bar, {
            "top": "",
            "height": ""
          });
        }
        var tbWidth = isNullOrUndefined2(scrollCnt) ? this.tbItems.offsetWidth : scrollCnt.offsetWidth;
        if (tbWidth !== 0) {
          setStyleAttribute2(bar, {
            "left": trg.offsetLeft + "px",
            "right": tbWidth - (trg.offsetLeft + trg.offsetWidth) + "px"
          });
        } else {
          setStyleAttribute2(bar, {
            "left": "auto",
            "right": "auto"
          });
        }
      }
      if (!isNullOrUndefined2(this.bdrLine) && !trg.classList.contains(CLS_TB_POPUP)) {
        this.bdrLine.classList.remove(CLS_HIDDEN2);
      }
    };
    Tab2.prototype.setActive = function(value, skipDataBind, isInteracted) {
      if (skipDataBind === void 0) {
        skipDataBind = false;
      }
      if (isInteracted === void 0) {
        isInteracted = false;
      }
      this.tbItem = selectAll2("." + CLS_TB_ITEM, this.getTabHeader());
      var trg = this.tbItem[value];
      if (value < 0 || isNaN(value) || this.tbItem.length === 0 || !isNullOrUndefined2(trg) && trg.classList.contains(CLS_DISABLE5)) {
        return;
      }
      if (value >= 0 && !skipDataBind) {
        this.allowServerDataBinding = false;
        this.setProperties({
          selectedItem: value
        }, true);
        this.allowServerDataBinding = true;
        if (!this.initRender) {
          this.serverDataBind();
        }
      }
      if (trg.classList.contains(CLS_ACTIVE2)) {
        this.setActiveBorder();
        return;
      }
      if (!this.isTemplate) {
        attributes2(trg.firstElementChild, {
          "aria-controls": CLS_CONTENT2 + this.tabId + "_" + this.extIndex(trg.id)
        });
      }
      var id = trg.id;
      this.removeActiveClass();
      trg.classList.add(CLS_ACTIVE2);
      trg.firstElementChild.setAttribute("aria-selected", "true");
      var no = Number(this.extIndex(id));
      if (isNullOrUndefined2(this.prevActiveEle)) {
        this.prevActiveEle = CLS_CONTENT2 + this.tabId + "_" + no;
      }
      if (this.isTemplate) {
        if (select2("." + CLS_CONTENT2, this.element).children.length > 0) {
          var trg_1 = this.findEle(select2("." + CLS_CONTENT2, this.element).children, CLS_CONTENT2 + this.tabId + "_" + no);
          if (!isNullOrUndefined2(trg_1)) {
            trg_1.classList.add(CLS_ACTIVE2);
          }
          this.triggerAnimation(id, this.enableAnimation);
        }
      } else {
        this.cntEle = select2("." + CLS_TAB + " > ." + CLS_CONTENT2, this.element);
        while (this.loadOn === "Dynamic" && this.cntEle.firstElementChild) {
          this.cntEle.removeChild(this.cntEle.firstElementChild);
        }
        var item = this.getTrgContent(this.cntEle, this.extIndex(id));
        if (isNullOrUndefined2(item)) {
          this.cntEle.appendChild(this.createElement("div", {
            id: CLS_CONTENT2 + this.tabId + "_" + this.extIndex(id),
            className: CLS_ITEM3 + " " + CLS_ACTIVE2,
            attrs: {
              role: "tabpanel",
              "aria-labelledby": CLS_ITEM3 + this.tabId + "_" + this.extIndex(id)
            }
          }));
          var eleTrg = this.getTrgContent(this.cntEle, this.extIndex(id));
          var itemIndex = Array.prototype.indexOf.call(this.itemIndexArray, id);
          this.getContent(eleTrg, this.items[itemIndex].content, "render", itemIndex);
        } else {
          item.classList.add(CLS_ACTIVE2);
        }
        this.triggerAnimation(id, this.enableAnimation);
      }
      this.setActiveBorder();
      this.refreshItemVisibility(trg);
      if (!this.initRender && !skipDataBind) {
        var eventArg = {
          previousItem: this.prevItem,
          previousIndex: this.prevIndex,
          selectedItem: trg,
          selectedIndex: value,
          selectedContent: select2("#" + CLS_CONTENT2 + this.tabId + "_" + this.selectingID, this.content),
          isSwiped: this.isSwiped,
          isInteracted,
          preventFocus: false
        };
        this.trigger("selected", eventArg, function(selectEventArgs) {
          if (!selectEventArgs.preventFocus) {
            trg.firstElementChild.focus();
          }
        });
      }
    };
    Tab2.prototype.setItems = function(items) {
      this.isReplace = true;
      this.tbItems = select2("." + CLS_TB_ITEMS, this.getTabHeader());
      this.tbObj.items = this.parseObject(items, 0);
      this.tbObj.dataBind();
      this.isReplace = false;
    };
    Tab2.prototype.setRTL = function(value) {
      this.tbObj.enableRtl = value;
      this.tbObj.dataBind();
      this.setCssClass(this.element, CLS_RTL5, value);
      this.refreshActiveBorder();
    };
    Tab2.prototype.refreshActiveBorder = function() {
      if (!isNullOrUndefined2(this.bdrLine)) {
        this.bdrLine.classList.add(CLS_HIDDEN2);
      }
      this.setActiveBorder();
    };
    Tab2.prototype.showPopup = function(config) {
      var tbPop = select2(".e-popup.e-toolbar-pop", this.hdrEle);
      if (tbPop && tbPop.classList.contains("e-popup-close")) {
        var tbPopObj = tbPop && tbPop.ej2_instances[0];
        tbPopObj.position.X = this.headerPlacement === "Left" || this.element.classList.contains(CLS_RTL5) ? "left" : "right";
        tbPopObj.dataBind();
        tbPopObj.show(config);
      }
    };
    Tab2.prototype.bindDraggable = function() {
      var _this = this;
      if (this.allowDragAndDrop) {
        var tabHeader = this.element.querySelector("." + CLS_HEADER2);
        if (tabHeader) {
          var items = Array.prototype.slice.call(tabHeader.querySelectorAll("." + CLS_TB_ITEM));
          items.forEach(function(element2) {
            _this.initializeDrag(element2);
          });
        }
      }
    };
    Tab2.prototype.bindSwipeEvents = function() {
      if (this.swipeMode !== "None") {
        this.touchModule = new Touch2(this.cntEle, {
          swipe: this.swipeHandler.bind(this)
        });
      }
    };
    Tab2.prototype.wireEvents = function() {
      this.bindDraggable();
      window.addEventListener("resize", this.resizeContext);
      EventHandler2.add(this.element, "mouseover", this.hoverHandler, this);
      EventHandler2.add(this.element, "keydown", this.spaceKeyDown, this);
      if (!isNullOrUndefined2(this.cntEle)) {
        this.bindSwipeEvents();
      }
      this.keyModule = new KeyboardEvents2(this.element, {
        keyAction: this.keyHandler.bind(this),
        keyConfigs: this.keyConfigs
      });
      this.tabKeyModule = new KeyboardEvents2(this.element, {
        keyAction: this.keyHandler.bind(this),
        keyConfigs: {
          openPopup: "shift+f10",
          tab: "tab",
          shiftTab: "shift+tab"
        },
        eventName: "keydown"
      });
    };
    Tab2.prototype.unWireEvents = function() {
      if (!isNullOrUndefined2(this.keyModule)) {
        this.keyModule.destroy();
      }
      if (!isNullOrUndefined2(this.tabKeyModule)) {
        this.tabKeyModule.destroy();
      }
      if (!isNullOrUndefined2(this.cntEle) && !isNullOrUndefined2(this.touchModule)) {
        this.touchModule.destroy();
        this.touchModule = null;
      }
      window.removeEventListener("resize", this.resizeContext);
      EventHandler2.remove(this.element, "mouseover", this.hoverHandler);
      EventHandler2.remove(this.element, "keydown", this.spaceKeyDown);
      this.element.classList.remove(CLS_RTL5);
      this.element.classList.remove(CLS_FOCUS);
    };
    Tab2.prototype.clickHandler = function(args) {
      this.element.classList.remove(CLS_FOCUS);
      var trg = args.originalEvent.target;
      var trgParent = closest2(trg, "." + CLS_TB_ITEM);
      var trgIndex = this.getEleIndex(trgParent);
      if (trg.classList.contains(CLS_ICON_CLOSE)) {
        this.removeTab(trgIndex);
      } else if (this.isVertical() && closest2(trg, "." + CLS_HOR_NAV)) {
        this.showPopup(this.show);
      } else {
        this.isPopup = false;
        if (!isNullOrUndefined2(trgParent) && trgIndex !== this.selectedItem) {
          this.selectTab(trgIndex, args.originalEvent, true);
        }
      }
    };
    Tab2.prototype.swipeHandler = function(e) {
      if (e.velocity < 3 && isNullOrUndefined2(e.originalEvent.changedTouches) || this.swipeMode === "Touch" && (e.originalEvent.type === "mouseup" || e.originalEvent.type === "mouseleave") || this.swipeMode === "Mouse" && e.originalEvent.type === "touchend" || this.swipeMode === "None") {
        return;
      }
      if (this.isNested) {
        this.element.setAttribute("data-swipe", "true");
      }
      var nestedTab = this.element.querySelector('[data-swipe="true"]');
      if (nestedTab) {
        nestedTab.removeAttribute("data-swipe");
        return;
      }
      this.isSwiped = true;
      if (e.swipeDirection === "Right" && this.selectedItem !== 0) {
        for (var k = this.selectedItem - 1; k >= 0; k--) {
          if (!this.tbItem[k].classList.contains(CLS_HIDDEN2)) {
            this.selectTab(k, null, true);
            break;
          }
        }
      } else if (e.swipeDirection === "Left" && this.selectedItem !== selectAll2("." + CLS_TB_ITEM, this.element).length - 1) {
        for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
          if (!this.tbItem[i].classList.contains(CLS_HIDDEN2)) {
            this.selectTab(i, null, true);
            break;
          }
        }
      }
      this.isSwiped = false;
    };
    Tab2.prototype.spaceKeyDown = function(e) {
      if (e.keyCode === 32 && e.which === 32 || e.keyCode === 35 && e.which === 35) {
        var clstHead = closest2(e.target, "." + CLS_HEADER2);
        if (!isNullOrUndefined2(clstHead)) {
          e.preventDefault();
        }
      }
    };
    Tab2.prototype.keyHandler = function(e) {
      if (this.element.classList.contains(CLS_DISABLE5)) {
        return;
      }
      this.element.classList.add(CLS_FOCUS);
      var trg = e.target;
      var tabHeader = this.getTabHeader();
      var actEle = select2("." + CLS_ACTIVE2, tabHeader);
      this.popEle = select2("." + CLS_TB_POP, tabHeader);
      if (!isNullOrUndefined2(this.popEle)) {
        this.popObj = this.popEle.ej2_instances[0];
      }
      var item = closest2(document.activeElement, "." + CLS_TB_ITEM);
      var trgParent = closest2(trg, "." + CLS_TB_ITEM);
      switch (e.action) {
        case "space":
        case "enter":
          if (trg.parentElement.classList.contains(CLS_DISABLE5)) {
            return;
          }
          if (e.action === "enter" && trg.classList.contains("e-hor-nav")) {
            this.showPopup(this.show);
            break;
          }
          this.keyPressed(trg);
          break;
        case "tab":
        case "shiftTab":
          if (trg.classList.contains(CLS_WRAP) && closest2(trg, "." + CLS_TB_ITEM).classList.contains(CLS_ACTIVE2) === false) {
            trg.setAttribute("tabindex", trg.getAttribute("data-tabindex"));
          }
          if (this.popObj && isVisible2(this.popObj.element)) {
            this.popObj.hide(this.hide);
          }
          if (!isNullOrUndefined2(actEle) && actEle.children.item(0).getAttribute("tabindex") === "-1") {
            actEle.children.item(0).setAttribute("tabindex", "0");
          }
          break;
        case "moveLeft":
        case "moveRight":
          if (!isNullOrUndefined2(item)) {
            this.refreshItemVisibility(item);
          }
          break;
        case "openPopup":
          e.preventDefault();
          if (!isNullOrUndefined2(this.popEle) && this.popEle.classList.contains(CLS_POPUP_CLOSE)) {
            this.popObj.show(this.show);
          }
          break;
        case "delete":
          if (this.showCloseButton === true && !isNullOrUndefined2(trgParent)) {
            var nxtSib = trgParent.nextSibling;
            if (!isNullOrUndefined2(nxtSib) && nxtSib.classList.contains(CLS_TB_ITEM)) {
              nxtSib.firstElementChild.focus();
            }
            this.removeTab(this.getEleIndex(trgParent));
          }
          this.setActiveBorder();
          break;
      }
    };
    Tab2.prototype.refreshItemVisibility = function(target) {
      var scrCnt = select2("." + this.scrCntClass, this.tbItems);
      if (!this.isVertical() && !isNullOrUndefined2(scrCnt)) {
        var scrBar = select2(".e-hscroll-bar", this.tbItems);
        var scrStart = scrBar.scrollLeft;
        var scrEnd = scrStart + scrBar.offsetWidth;
        var eleStart = target.offsetLeft;
        var eleWidth = target.offsetWidth;
        var eleEnd = target.offsetLeft + target.offsetWidth;
        if (scrStart < eleStart && scrEnd < eleEnd) {
          var eleViewRange = scrEnd - eleStart;
          scrBar.scrollLeft = scrStart + (eleWidth - eleViewRange);
        } else {
          if (scrStart > eleStart && scrEnd > eleEnd) {
            var eleViewRange = eleEnd - scrStart;
            scrBar.scrollLeft = scrStart - (eleWidth - eleViewRange);
          }
        }
      } else {
        return;
      }
    };
    Tab2.prototype.getIndexFromEle = function(id) {
      return parseInt(id.substring(id.lastIndexOf("_") + 1), 10);
    };
    Tab2.prototype.hoverHandler = function(e) {
      var trg = e.target;
      if (!isNullOrUndefined2(trg.classList) && trg.classList.contains(CLS_ICON_CLOSE)) {
        trg.setAttribute("title", new L10n2("tab", {
          closeButtonTitle: this.title
        }, this.locale).getConstant("closeButtonTitle"));
      }
    };
    Tab2.prototype.evalOnPropertyChangeItems = function(newProp, oldProp) {
      var _this = this;
      if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
        var changedProp = Object.keys(newProp.items);
        for (var i = 0; i < changedProp.length; i++) {
          var index = parseInt(Object.keys(newProp.items)[i], 10);
          var properties = Object.keys(newProp.items[index]);
          for (var j = 0; j < properties.length; j++) {
            var oldVal = Object(oldProp.items[index])[properties[j]];
            var newVal = Object(newProp.items[index])[properties[j]];
            var hdr = this.element.querySelectorAll("." + CLS_TB_ITEM)[index];
            var itemIndex = void 0;
            if (hdr && !isNullOrUndefined2(hdr.id) && hdr.id !== "") {
              itemIndex = this.getIndexFromEle(hdr.id);
            } else {
              itemIndex = index;
            }
            var hdrItem = select2("." + CLS_TB_ITEMS + " #" + CLS_ITEM3 + this.tabId + "_" + itemIndex, this.element);
            var cntItem = select2("." + CLS_CONTENT2 + " #" + CLS_CONTENT2 + this.tabId + "_" + itemIndex, this.element);
            if (properties[j] === "header" || properties[j] === "headerTemplate") {
              var icon = isNullOrUndefined2(this.items[index].header) || isNullOrUndefined2(this.items[index].header.iconCss) ? "" : this.items[index].header.iconCss;
              var textVal = this.items[index].headerTemplate || this.items[index].header.text;
              if (properties[j] === "headerTemplate") {
                this.clearTabTemplate(hdrItem, properties[j], CLS_TB_ITEM);
              }
              if (textVal === "" && icon === "") {
                this.removeTab(index);
              } else {
                this.tbId = hdr.id;
                var arr = [];
                arr.push(this.items[index]);
                this.items.splice(index, 1);
                this.itemIndexArray.splice(index, 1);
                this.tbObj.items.splice(index, 1);
                var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN2);
                detach2(hdrItem);
                this.isReplace = true;
                this.addTab(arr, index);
                if (isHiddenEle) {
                  this.hideTab(index);
                }
                this.isReplace = false;
              }
            }
            if (properties[j] === "content" && !isNullOrUndefined2(cntItem)) {
              var strVal = typeof newVal === "string" || isNullOrUndefined2(newVal.innerHTML);
              if (strVal && (newVal[0] === "." || newVal[0] === "#") && newVal.length) {
                var eleVal = document.querySelector(newVal);
                cntItem.appendChild(eleVal);
                eleVal.style.display = "";
              } else if (newVal === "" && oldVal[0] === "#") {
                document.body.appendChild(this.element.querySelector(oldVal)).style.display = "none";
                cntItem.innerHTML = newVal;
              } else if (this.isAngular || this.isReact) {
                this.clearTabTemplate(cntItem, properties[j], CLS_ITEM3);
                cntItem.innerHTML = "";
                this.templateCompile(cntItem, newVal, index);
              } else if (typeof newVal !== "function") {
                cntItem.innerHTML = newVal;
              }
            }
            if (properties[j] === "cssClass") {
              if (!isNullOrUndefined2(hdrItem)) {
                hdrItem.classList.remove(oldVal);
                hdrItem.classList.add(newVal);
              }
              if (!isNullOrUndefined2(cntItem)) {
                cntItem.classList.remove(oldVal);
                cntItem.classList.add(newVal);
              }
            }
            if (properties[j] === "disabled") {
              this.enableTab(index, newVal === true ? false : true);
            }
            if (properties[j] === "visible") {
              this.hideTab(index, newVal === true ? false : true);
            }
          }
        }
        if (this.isReact && this.portals && this.portals.length > 0) {
          this.renderReactTemplates(function() {
            _this.refreshActiveTabBorder();
          });
        }
      } else {
        this.lastIndex = 0;
        if (isNullOrUndefined2(this.tbObj)) {
          this.reRenderItems();
        } else {
          if (this.isReact || this.isAngular) {
            this.clearTemplate();
          }
          this.setItems(newProp.items);
          if (this.templateEle.length > 0) {
            this.expTemplateContent();
          }
          this.templateEle = [];
          var selectElement = select2("." + CLS_TAB + " > ." + CLS_CONTENT2, this.element);
          while (selectElement.firstElementChild) {
            detach2(selectElement.firstElementChild);
          }
          this.select(this.selectedItem);
          this.draggableItems = [];
          this.bindDraggable();
        }
      }
    };
    Tab2.prototype.clearTabTemplate = function(templateEle, templateName, className) {
      if (!this.clearTemplates) {
        return;
      }
      if (this.registeredTemplate && this.registeredTemplate[templateName]) {
        var registeredTemplates = this.registeredTemplate;
        for (var index = 0; index < registeredTemplates[templateName].length; index++) {
          var registeredItem = registeredTemplates[templateName][index].rootNodes[0];
          var closestItem = closest2(registeredItem, "." + className);
          if (!isNullOrUndefined2(closestItem) && closestItem === templateEle) {
            this.clearTemplate([templateName], [registeredTemplates[templateName][index]]);
            break;
          }
        }
      } else if (this.portals && this.portals.length > 0) {
        var portals = this.portals;
        for (var index = 0; index < portals.length; index++) {
          var portalItem = portals[index];
          var closestItem = closest2(portalItem.containerInfo, "." + className);
          if (!isNullOrUndefined2(closestItem) && closestItem === templateEle) {
            this.clearTemplate([templateName], index);
            break;
          }
        }
      }
    };
    Tab2.prototype.initializeDrag = function(target) {
      var _this = this;
      var dragObj = new Draggable2(target, {
        dragArea: this.dragArea,
        dragTarget: "." + CLS_TB_ITEM,
        clone: true,
        helper: this.helper.bind(this),
        dragStart: this.itemDragStart.bind(this),
        drag: function(e) {
          var dragIndex = _this.getEleIndex(_this.dragItem);
          var dropIndex;
          var dropItem;
          var dragArgs = {
            draggedItem: _this.dragItem,
            event: e.event,
            target: e.target,
            droppedItem: e.target.closest("." + CLS_TB_ITEM),
            clonedElement: _this.cloneElement,
            index: dragIndex
          };
          if (!isNullOrUndefined2(e.target.closest("." + CLS_TAB)) && !e.target.closest("." + CLS_TAB).isEqualNode(_this.element) && _this.dragArea !== "." + CLS_HEADER2) {
            _this.trigger("dragging", dragArgs);
          } else {
            if (!e.target.closest(_this.dragArea) && _this.overflowMode !== "Popup") {
              document.body.style.cursor = "not-allowed";
              addClass2([_this.cloneElement], CLS_HIDDEN2);
              if (_this.dragItem.classList.contains(CLS_HIDDEN2)) {
                removeClass2([_this.dragItem], CLS_HIDDEN2);
              }
              _this.dragItem.querySelector("." + CLS_WRAP).style.visibility = "visible";
            } else {
              document.body.style.cursor = "";
              _this.dragItem.querySelector("." + CLS_WRAP).style.visibility = "hidden";
              if (_this.cloneElement.classList.contains(CLS_HIDDEN2)) {
                removeClass2([_this.cloneElement], CLS_HIDDEN2);
              }
            }
            if (_this.overflowMode === "Scrollable" && !isNullOrUndefined2(_this.element.querySelector(".e-hscroll"))) {
              var scrollRightNavEle = _this.element.querySelector(".e-scroll-right-nav");
              var scrollLeftNavEle = _this.element.querySelector(".e-scroll-left-nav");
              var hscrollBar = _this.element.querySelector(".e-hscroll-bar");
              if (!isNullOrUndefined2(scrollRightNavEle) && Math.abs(scrollRightNavEle.offsetWidth / 2 + scrollRightNavEle.offsetLeft) > _this.cloneElement.offsetLeft + _this.cloneElement.offsetWidth) {
                hscrollBar.scrollLeft -= 10;
              }
              if (!isNullOrUndefined2(scrollLeftNavEle) && Math.abs(scrollLeftNavEle.offsetLeft + scrollLeftNavEle.offsetWidth - _this.cloneElement.offsetLeft) > scrollLeftNavEle.offsetWidth / 2) {
                hscrollBar.scrollLeft += 10;
              }
            }
            _this.cloneElement.style.pointerEvents = "none";
            dropItem = closest2(e.target, "." + CLS_TB_ITEM + ".e-draggable");
            var scrollContentWidth = 0;
            if (_this.overflowMode === "Scrollable" && !isNullOrUndefined2(_this.element.querySelector(".e-hscroll"))) {
              scrollContentWidth = _this.element.querySelector(".e-hscroll-content").offsetWidth;
            }
            if (dropItem != null && !dropItem.isSameNode(_this.dragItem) && dropItem.closest("." + CLS_TAB).isSameNode(_this.dragItem.closest("." + CLS_TAB))) {
              dropIndex = _this.getEleIndex(dropItem);
              if (dropIndex < dragIndex && Math.abs(dropItem.offsetLeft + dropItem.offsetWidth - _this.cloneElement.offsetLeft) > dropItem.offsetWidth / 2) {
                _this.dragAction(dropItem, dragIndex, dropIndex);
              }
              if (dropIndex > dragIndex && Math.abs(dropItem.offsetWidth / 2) + dropItem.offsetLeft - scrollContentWidth < _this.cloneElement.offsetLeft + _this.cloneElement.offsetWidth) {
                _this.dragAction(dropItem, dragIndex, dropIndex);
              }
            }
            _this.droppedIndex = _this.getEleIndex(_this.dragItem);
            _this.trigger("dragging", dragArgs);
          }
        },
        dragStop: this.itemDragStop.bind(this)
      });
      this.draggableItems.push(dragObj);
    };
    Tab2.prototype.helper = function(e) {
      this.cloneElement = this.createElement("div");
      if (e.element) {
        this.cloneElement = e.element.cloneNode(true);
        addClass2([this.cloneElement], "e-tab-clone-element");
        if (this.element.querySelector("." + CLS_HEADER2).classList.contains(CLS_CLOSE_SHOW)) {
          addClass2([this.cloneElement], CLS_CLOSE_SHOW);
        }
        removeClass2([this.cloneElement.querySelector("." + CLS_WRAP)], "e-ripple");
        if (!isNullOrUndefined2(this.cloneElement.querySelector(".e-ripple-element"))) {
          remove(this.cloneElement.querySelector(".e-ripple-element"));
        }
        document.body.appendChild(this.cloneElement);
      }
      return this.cloneElement;
    };
    Tab2.prototype.itemDragStart = function(e) {
      var _this = this;
      this.draggingItems = this.items.map(function(x) {
        return x;
      });
      this.dragItem = e.element;
      var dragArgs = {
        draggedItem: e.element,
        event: e.event,
        target: e.target,
        droppedItem: null,
        index: this.getEleIndex(this.dragItem),
        clonedElement: this.cloneElement,
        cancel: false
      };
      this.trigger("onDragStart", dragArgs, function(tabItemDragArgs) {
        if (tabItemDragArgs.cancel) {
          var dragObj = e.element.ej2_instances[0];
          if (!isNullOrUndefined2(dragObj)) {
            dragObj.intDestroy(e.event);
          }
          detach2(_this.cloneElement);
        } else {
          _this.removeActiveClass();
          addClass2([_this.tbItems.querySelector("." + CLS_INDICATOR)], CLS_HIDDEN2);
          _this.dragItem.querySelector("." + CLS_WRAP).style.visibility = "hidden";
        }
      });
    };
    Tab2.prototype.dragAction = function(dropItem, dragsIndex, dropIndex) {
      if (this.items.length > 0) {
        var item = this.draggingItems[dragsIndex];
        this.draggingItems.splice(dragsIndex, 1);
        this.draggingItems.splice(dropIndex, 0, item);
      }
      if (this.overflowMode === "MultiRow") {
        dropItem.parentNode.insertBefore(this.dragItem, dropItem.nextElementSibling);
      }
      if (dragsIndex > dropIndex) {
        if (!this.dragItem.parentElement.isSameNode(dropItem.parentElement)) {
          if (this.overflowMode === "Extended") {
            if (dropItem.isSameNode(dropItem.parentElement.lastChild)) {
              var popupContainer = this.dragItem.parentNode;
              dropItem.parentNode.insertBefore(this.dragItem, dropItem);
              popupContainer.insertBefore(dropItem.parentElement.lastChild, popupContainer.childNodes[0]);
            } else {
              this.dragItem.parentNode.insertBefore(dropItem.parentElement.lastChild, this.dragItem.parentElement.childNodes[0]);
              dropItem.parentNode.insertBefore(this.dragItem, dropItem);
            }
          } else {
            var lastEle = dropItem.parentElement.lastChild;
            if (dropItem.isSameNode(lastEle)) {
              var popupContainer = this.dragItem.parentNode;
              dropItem.parentNode.insertBefore(this.dragItem, dropItem);
              popupContainer.insertBefore(lastEle, popupContainer.childNodes[0]);
            } else {
              this.dragItem.parentNode.insertBefore(dropItem.parentElement.lastChild, this.dragItem.parentElement.childNodes[0]);
              dropItem.parentNode.insertBefore(this.dragItem, dropItem);
            }
          }
        } else {
          this.dragItem.parentNode.insertBefore(this.dragItem, dropItem);
        }
      }
      if (dragsIndex < dropIndex) {
        if (!this.dragItem.parentElement.isSameNode(dropItem.parentElement)) {
          if (this.overflowMode === "Extended") {
            this.dragItem.parentElement.appendChild(dropItem.parentElement.firstElementChild);
            dropItem.parentNode.insertBefore(this.dragItem, dropItem.nextSibling);
          } else {
            this.dragItem.parentNode.insertBefore(dropItem.parentElement.lastChild, this.dragItem.parentElement.childNodes[0]);
            dropItem.parentNode.insertBefore(this.dragItem, dropItem);
          }
        } else {
          this.dragItem.parentNode.insertBefore(this.dragItem, dropItem.nextElementSibling);
        }
      }
    };
    Tab2.prototype.itemDragStop = function(e) {
      var _this = this;
      detach2(this.cloneElement);
      this.cloneElement = null;
      this.dragItem.querySelector("." + CLS_WRAP).style.visibility = "visible";
      document.body.style.cursor = "";
      var dragStopArgs = {
        draggedItem: this.dragItem,
        event: e.event,
        target: e.target,
        droppedItem: this.tbItem[this.droppedIndex],
        clonedElement: null,
        index: this.droppedIndex,
        cancel: false
      };
      this.trigger("dragged", dragStopArgs, function(tabItemDropArgs) {
        if (tabItemDropArgs.cancel) {
          _this.refresh();
        } else {
          if (_this.items.length > 0 && _this.draggingItems.length > 0) {
            _this.items = _this.draggingItems;
            _this.selectedItem = isNullOrUndefined2(_this.droppedIndex) ? _this.getEleIndex(_this.dragItem) : _this.droppedIndex;
            _this.refresh();
          } else {
            _this.dragItem.querySelector("." + CLS_WRAP).style.visibility = "";
            removeClass2([_this.tbItems.querySelector("." + CLS_INDICATOR)], CLS_HIDDEN2);
            _this.droppedIndex = isNullOrUndefined2(_this.droppedIndex) ? _this.getEleIndex(_this.dragItem) : _this.droppedIndex;
            _this.selectTab(_this.droppedIndex, null, true);
          }
        }
      });
      this.dragItem = null;
      this.droppedIndex = null;
    };
    Tab2.prototype.enableTab = function(index, value) {
      var tbItems = selectAll2("." + CLS_TB_ITEM, this.element)[index];
      if (isNullOrUndefined2(tbItems)) {
        return;
      }
      if (value === true) {
        tbItems.classList.remove(CLS_DISABLE5, CLS_OVERLAY3);
        tbItems.firstElementChild.setAttribute("tabindex", tbItems.firstElementChild.getAttribute("data-tabindex"));
      } else {
        tbItems.classList.add(CLS_DISABLE5, CLS_OVERLAY3);
        tbItems.firstElementChild.removeAttribute("tabindex");
        if (tbItems.classList.contains(CLS_ACTIVE2)) {
          this.select(index + 1);
        }
      }
      if (!isNullOrUndefined2(this.items[index])) {
        this.items[index].disabled = !value;
        this.dataBind();
      }
      tbItems.firstElementChild.setAttribute("aria-disabled", value === true ? "false" : "true");
    };
    Tab2.prototype.addTab = function(items, index) {
      var _this = this;
      var addArgs = {
        addedItems: items,
        cancel: false
      };
      if (!this.isReplace) {
        for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
          var item = items_1[_i];
          item.disabled = item.disabled || false;
          item.visible = item.visible || true;
        }
        this.trigger("adding", addArgs, function(tabAddingArgs) {
          if (!tabAddingArgs.cancel) {
            _this.addingTabContent(items, index);
          }
        });
      } else {
        this.addingTabContent(items, index);
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Tab2.prototype.addingTabContent = function(items, index) {
      var _this = this;
      var lastEleIndex = 0;
      this.hdrEle = select2("." + CLS_HEADER2, this.element);
      if (isNullOrUndefined2(this.hdrEle)) {
        this.items = items;
        this.reRenderItems();
        this.bindDraggable();
      } else {
        var tbItems = Array.from(selectAll2(".e-tab-header ." + CLS_TB_ITEM, this.element));
        var itemsCount = tbItems.length;
        if (itemsCount !== 0) {
          lastEleIndex = this.getMaxIndicesFromItems(tbItems) + 1;
        }
        if (isNullOrUndefined2(index)) {
          index = itemsCount - 1;
        }
        if (itemsCount < index || index < 0 || isNaN(index)) {
          return;
        }
        if (itemsCount === 0 && !isNullOrUndefined2(this.hdrEle)) {
          this.hdrEle.style.display = "";
        }
        if (!isNullOrUndefined2(this.bdrLine)) {
          this.bdrLine.classList.add(CLS_HIDDEN2);
        }
        this.tbItems = select2("." + CLS_TB_ITEMS, this.getTabHeader());
        this.isAdd = true;
        var tabItems_2 = this.parseObject(items, index);
        this.isAdd = false;
        var i_1 = 0;
        var textValue_1;
        items.forEach(function(item, place) {
          textValue_1 = item.headerTemplate || item.header.text;
          if (!(isNullOrUndefined2(item.headerTemplate || item.header) || isNullOrUndefined2(textValue_1) || textValue_1.length === 0 && !isNullOrUndefined2(item.header) && isNullOrUndefined2(item.header.iconCss))) {
            if (tabItems_2[place]) {
              if (isNullOrUndefined2(item.id)) {
                item.id = CLS_ITEM3 + _this.tabId + "_" + TABITEMPREFIX + (lastEleIndex + place).toString();
              }
              tabItems_2[place].htmlAttributes["data-id"] = item.id;
            }
            _this.items.splice(index + i_1, 0, item);
            i_1++;
          }
          if (!isNullOrUndefined2(item.header) && !isNullOrUndefined2(item.header.text) && (_this.isTemplate || _this.loadOn === "Init")) {
            var no = lastEleIndex + place;
            var ele = _this.createElement("div", {
              id: CLS_CONTENT2 + _this.tabId + "_" + no,
              className: CLS_ITEM3,
              attrs: {
                role: "tabpanel",
                "aria-labelledby": CLS_ITEM3 + "_" + no
              }
            });
            _this.cntEle.insertBefore(ele, _this.cntEle.children[index + place]);
            var eleTrg = _this.getTrgContent(_this.cntEle, no.toString());
            _this.getContent(eleTrg, item.content, "render", index);
          }
        });
        this.tbObj.addItems(tabItems_2, index);
        if (!this.isReplace) {
          this.trigger("added", {
            addedItems: items
          });
        }
        if (this.selectedItem === index) {
          this.select(index);
        } else {
          this.setActiveBorder();
          this.tbItem = selectAll2("." + CLS_TB_ITEM, this.getTabHeader());
        }
        this.bindDraggable();
      }
    };
    Tab2.prototype.removeTab = function(index) {
      var _this = this;
      var trg = selectAll2("." + CLS_TB_ITEM, this.element)[index];
      if (isNullOrUndefined2(trg)) {
        return;
      }
      var removeArgs = {
        removedItem: trg,
        removedIndex: index,
        cancel: false
      };
      this.trigger("removing", removeArgs, function(tabRemovingArgs) {
        if (!tabRemovingArgs.cancel) {
          var header = select2("#" + CLS_ITEM3 + _this.tabId + "_" + _this.extIndex(trg.id), select2("." + CLS_TB_ITEMS, _this.element));
          if (!isNullOrUndefined2(header)) {
            _this.clearTabTemplate(header, "headerTemplate", CLS_TB_ITEM);
          }
          _this.tbObj.removeItems(index);
          if (_this.allowDragAndDrop && index !== Array.prototype.indexOf.call(_this.itemIndexArray, trg.id)) {
            index = Array.prototype.indexOf.call(_this.itemIndexArray, trg.id);
          }
          var targetEleIndex = _this.itemIndexArray.indexOf(trg.id);
          _this.items.splice(targetEleIndex, 1);
          _this.itemIndexArray.splice(targetEleIndex, 1);
          _this.refreshActiveBorder();
          var cntTrg = select2("#" + CLS_CONTENT2 + _this.tabId + "_" + _this.extIndex(trg.id), select2("." + CLS_CONTENT2, _this.element));
          if (!isNullOrUndefined2(cntTrg)) {
            _this.clearTabTemplate(cntTrg, "content", CLS_ITEM3);
            detach2(cntTrg);
          }
          _this.trigger("removed", tabRemovingArgs);
          if (_this.draggableItems && _this.draggableItems.length > 0) {
            _this.draggableItems[index].destroy();
            _this.draggableItems[index] = null;
            _this.draggableItems.splice(index, 1);
          }
          if (trg.classList.contains(CLS_ACTIVE2)) {
            index = index > selectAll2("." + CLS_TB_ITEM + ":not(." + CLS_TB_POPUP + ")", _this.element).length - 1 ? index - 1 : index;
            _this.enableAnimation = false;
            _this.tbItem = selectAll2("." + CLS_TB_ITEM, _this.getTabHeader());
            index = _this.getSelectingTabIndex(index);
            index = !isNaN(index) && index >= 0 && _this.tbItem.length > index ? index : 0;
            _this.selectedItem = index;
            _this.select(index);
          } else if (index !== _this.selectedItem) {
            if (index < _this.selectedItem) {
              index = _this.itemIndexArray.indexOf(_this.tbItem[_this.selectedItem].id);
              _this.setProperties({
                selectedItem: index > -1 ? index : _this.selectedItem
              }, true);
              _this.prevIndex = _this.selectedItem;
            }
            _this.tbItem = selectAll2("." + CLS_TB_ITEM, _this.getTabHeader());
          }
          if (selectAll2("." + CLS_TB_ITEM, _this.element).length === 0) {
            _this.hdrEle.style.display = "none";
          }
          _this.enableAnimation = true;
        }
      });
    };
    Tab2.prototype.hideTab = function(index, value) {
      var items;
      var item = selectAll2("." + CLS_TB_ITEM, this.element)[index];
      if (isNullOrUndefined2(item)) {
        return;
      }
      if (isNullOrUndefined2(value)) {
        value = true;
      }
      this.bdrLine.classList.add(CLS_HIDDEN2);
      if (value === true) {
        item.classList.add(CLS_HIDDEN2);
        items = selectAll2("." + CLS_TB_ITEM + ":not(." + CLS_HIDDEN2 + ")", this.tbItems);
        if (items.length !== 0 && item.classList.contains(CLS_ACTIVE2)) {
          if (index !== 0) {
            for (var i = index - 1; i >= 0; i--) {
              if (!this.tbItem[i].classList.contains(CLS_HIDDEN2)) {
                this.select(i);
                break;
              } else if (i === 0) {
                for (var k = index + 1; k < this.tbItem.length; k++) {
                  if (!this.tbItem[k].classList.contains(CLS_HIDDEN2)) {
                    this.select(k);
                    break;
                  }
                }
              }
            }
          } else {
            for (var k = index + 1; k < this.tbItem.length; k++) {
              if (!this.tbItem[k].classList.contains(CLS_HIDDEN2)) {
                this.select(k);
                break;
              }
            }
          }
        } else if (items.length === 0) {
          this.element.classList.add(CLS_HIDDEN2);
        }
      } else {
        this.element.classList.remove(CLS_HIDDEN2);
        items = selectAll2("." + CLS_TB_ITEM + ":not(." + CLS_HIDDEN2 + ")", this.tbItems);
        item.classList.remove(CLS_HIDDEN2);
        if (items.length === 0) {
          this.select(index);
        }
      }
      this.setActiveBorder();
      if (!isNullOrUndefined2(this.items[index])) {
        this.items[index].visible = !value;
        this.dataBind();
      }
      if (!isNullOrUndefined2(item.firstElementChild)) {
        item.firstElementChild.setAttribute("aria-hidden", "" + value);
      }
      if (this.overflowMode === "Popup") {
        this.refreshOverflow();
      }
    };
    Tab2.prototype.selectTab = function(args, event2, isInteracted) {
      if (event2 === void 0) {
        event2 = null;
      }
      if (isInteracted === void 0) {
        isInteracted = false;
      }
      this.isInteracted = isInteracted;
      this.select(args, event2);
    };
    Tab2.prototype.select = function(args, event2) {
      var _this = this;
      var tabHeader = this.getTabHeader();
      this.tbItems = select2("." + CLS_TB_ITEMS, tabHeader);
      this.tbItem = selectAll2("." + CLS_TB_ITEM, tabHeader);
      this.content = select2("." + CLS_CONTENT2, this.element);
      this.prevItem = this.tbItem[this.prevIndex];
      if (isNullOrUndefined2(this.selectedItem) || this.selectedItem < 0 || this.tbItem.length <= this.selectedItem || isNaN(this.selectedItem)) {
        this.selectedItem = 0;
      } else {
        this.selectedID = this.extIndex(this.tbItem[this.selectedItem].id);
      }
      var trg = this.tbItem[args];
      if (isNullOrUndefined2(trg)) {
        this.selectedID = "0";
      } else {
        this.selectingID = this.extIndex(trg.id);
      }
      if (!isNullOrUndefined2(this.prevItem) && !this.prevItem.classList.contains(CLS_DISABLE5)) {
        this.prevItem.children.item(0).setAttribute("tabindex", this.prevItem.firstElementChild.getAttribute("tabindex"));
      }
      var eventArg = {
        event: event2,
        previousItem: this.prevItem,
        previousIndex: this.prevIndex,
        selectedItem: this.tbItem[this.selectedItem],
        selectedIndex: this.selectedItem,
        selectedContent: !isNullOrUndefined2(this.content) ? select2("#" + CLS_CONTENT2 + this.tabId + "_" + this.selectedID, this.content) : null,
        selectingItem: trg,
        selectingIndex: args,
        selectingContent: !isNullOrUndefined2(this.content) ? select2("#" + CLS_CONTENT2 + this.tabId + "_" + this.selectingID, this.content) : null,
        isSwiped: this.isSwiped,
        isInteracted: this.isInteracted,
        cancel: false
      };
      if (!this.initRender) {
        this.trigger("selecting", eventArg, function(selectArgs) {
          if (!selectArgs.cancel) {
            _this.selectingContent(args, _this.isInteracted);
          }
        });
      } else {
        this.selectingContent(args, this.isInteracted);
      }
      this.isInteracted = false;
    };
    Tab2.prototype.getSelectingTabIndex = function(args) {
      if (!isNullOrUndefined2(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE5) || this.tbItem[args].classList.contains(CLS_HIDDEN2))) {
        for (var i = args + 1; i < this.items.length; i++) {
          if (this.items[i].disabled === false && this.items[i].visible === true) {
            args = i;
            break;
          } else {
            args = 0;
          }
        }
      }
      return args;
    };
    Tab2.prototype.selectingContent = function(args, isInteracted) {
      if (typeof args === "number") {
        args = this.getSelectingTabIndex(args);
        if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
          this.prevIndex = this.selectedItem;
          this.prevItem = this.tbItem[this.prevIndex];
          if (this.tbItem[args].classList.contains(CLS_TB_POPUP) && this.reorderActiveTab) {
            this.setActive(this.popupHandler(this.tbItem[args]), null, isInteracted);
            if (!isNullOrUndefined2(this.items) && this.items.length > 0 && this.allowDragAndDrop) {
              this.tbItem = selectAll2("." + CLS_TB_ITEMS + " ." + CLS_TB_ITEM, this.hdrEle);
              var item = this.items[args];
              this.items.splice(args, 1);
              this.items.splice(this.tbItem.length - 1, 0, item);
              var itemId = this.itemIndexArray[args];
              this.itemIndexArray.splice(args, 1);
              this.itemIndexArray.splice(this.tbItem.length - 1, 0, itemId);
            }
          } else {
            this.setActive(args, null, isInteracted);
          }
        } else {
          this.setActive(0, null, isInteracted);
        }
      } else if (args instanceof HTMLElement) {
        this.setActive(this.getEleIndex(args), null, isInteracted);
      }
    };
    Tab2.prototype.getItemIndex = function(tabItemId) {
      var tabIndex;
      for (var i = 0; i < this.tbItem.length; i++) {
        var value = this.tbItem[i].getAttribute("data-id");
        if (tabItemId === value) {
          tabIndex = i;
          break;
        }
      }
      return tabIndex;
    };
    Tab2.prototype.disable = function(value) {
      this.setCssClass(this.element, CLS_DISABLE5, value);
      this.element.setAttribute("aria-disabled", "" + value);
    };
    Tab2.prototype.getPersistData = function() {
      return this.addOnPersist(["selectedItem", "actEleId"]);
    };
    Tab2.prototype.getModuleName = function() {
      return "tab";
    };
    Tab2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var _this = this;
      var sortedKeys = Object.keys(newProp).sort(function(a, b) {
        if (a === "items") return -1;
        if (b === "items") return 1;
        return 0;
      });
      for (var _i = 0, sortedKeys_1 = sortedKeys; _i < sortedKeys_1.length; _i++) {
        var prop = sortedKeys_1[_i];
        switch (prop) {
          case "width":
            setStyleAttribute2(this.element, {
              width: formatUnit(newProp.width)
            });
            break;
          case "height":
            setStyleAttribute2(this.element, {
              height: formatUnit(newProp.height)
            });
            this.setContentHeight(false);
            break;
          case "cssClass":
            var headerEle = this.element.querySelector("." + CLS_HEADER2);
            if (oldProp.cssClass !== "" && !isNullOrUndefined2(oldProp.cssClass)) {
              this.setCssClass(this.element, oldProp.cssClass, false);
              this.setCssClass(this.element, newProp.cssClass, true);
              if (!isNullOrUndefined2(headerEle)) {
                this.setCssClass(headerEle, oldProp.cssClass, false);
                this.setCssClass(headerEle, newProp.cssClass, true);
              }
            } else {
              this.setCssClass(this.element, newProp.cssClass, true);
              if (!isNullOrUndefined2(headerEle)) {
                this.setCssClass(headerEle, newProp.cssClass, true);
              }
            }
            break;
          case "items":
            this.evalOnPropertyChangeItems(newProp, oldProp);
            break;
          case "showCloseButton":
            this.setCloseButton(newProp.showCloseButton);
            break;
          case "reorderActiveTab":
            this.refreshActiveTabBorder();
            break;
          case "selectedItem":
            this.selectedItem = oldProp.selectedItem;
            this.select(newProp.selectedItem);
            break;
          case "headerPlacement":
            this.changeOrientation(newProp.headerPlacement);
            break;
          case "enableRtl":
            this.setRTL(newProp.enableRtl);
            break;
          case "overflowMode":
            this.tbObj.overflowMode = newProp.overflowMode;
            this.tbObj.dataBind();
            this.refreshActiveTabBorder();
            break;
          case "heightAdjustMode":
            this.setContentHeight(false);
            this.select(this.selectedItem);
            break;
          case "scrollStep":
            if (this.tbObj) {
              this.tbObj.scrollStep = this.scrollStep;
            }
            break;
          case "allowDragAndDrop":
            this.bindDraggable();
            break;
          case "swipeMode":
            if (this.touchModule) {
              this.touchModule.destroy();
              this.touchModule = null;
            }
            this.bindSwipeEvents();
            break;
          case "dragArea":
            if (this.allowDragAndDrop) {
              this.draggableItems.forEach(function(item) {
                item.dragArea = _this.dragArea;
              });
              this.refresh();
            }
            break;
        }
      }
    };
    Tab2.prototype.refreshActiveTab = function() {
      if (this.isReact && this.isTemplate) {
        this.clearTemplate();
      }
      if (!this.isTemplate) {
        if (this.element.querySelector("." + CLS_TB_ITEM + "." + CLS_ACTIVE2)) {
          detach2(this.element.querySelector("." + CLS_TB_ITEM + "." + CLS_ACTIVE2).children[0]);
          detach2(this.element.querySelector("." + CLS_CONTENT2).querySelector("." + CLS_ACTIVE2).children[0]);
          var item = this.items[this.selectedItem];
          var pos = isNullOrUndefined2(item.header) || isNullOrUndefined2(item.header.iconPosition) ? "" : item.header.iconPosition;
          var css = isNullOrUndefined2(item.header) || isNullOrUndefined2(item.header.iconCss) ? "" : item.header.iconCss;
          var text = item.headerTemplate || item.header.text;
          var txtWrap = this.createElement("div", {
            className: CLS_TEXT,
            attrs: {
              "role": "presentation"
            }
          });
          if (!isNullOrUndefined2(text.tagName)) {
            txtWrap.appendChild(text);
          } else {
            this.headerTextCompile(txtWrap, text, this.selectedItem);
          }
          var tEle = void 0;
          var icon = this.createElement("span", {
            className: CLS_ICONS + " " + CLS_TAB_ICON + " " + CLS_ICON + "-" + pos + " " + css
          });
          var tConts = this.createElement("div", {
            className: CLS_TEXT_WRAP
          });
          tConts.appendChild(txtWrap);
          if (text !== "" && text !== void 0 && css !== "") {
            if (pos === "left" || pos === "top") {
              tConts.insertBefore(icon, tConts.firstElementChild);
            } else {
              tConts.appendChild(icon);
            }
            tEle = txtWrap;
            this.isIconAlone = false;
          } else {
            tEle = css === "" ? txtWrap : icon;
            if (tEle === icon) {
              detach2(txtWrap);
              tConts.appendChild(icon);
              this.isIconAlone = true;
            }
          }
          var tabIndex = isNullOrUndefined2(item.tabIndex) ? "-1" : item.tabIndex.toString();
          var wrapAtt = item.disabled ? {} : {
            tabIndex,
            "data-tabindex": tabIndex,
            role: "tab",
            "aria-selected": "true",
            "aria-disabled": "false"
          };
          tConts.appendChild(this.btnCls.cloneNode(true));
          var wraper = this.createElement("div", {
            className: CLS_WRAP,
            attrs: wrapAtt
          });
          wraper.appendChild(tConts);
          if (pos === "top" || pos === "bottom") {
            this.element.classList.add("e-vertical-icon");
          }
          this.element.querySelector("." + CLS_TB_ITEM + "." + CLS_ACTIVE2).appendChild(wraper);
          var crElem = this.createElement("div");
          var cnt = item.content;
          var eleStr = void 0;
          if (typeof cnt === "string" || isNullOrUndefined2(cnt.innerHTML)) {
            if (typeof cnt === "string" && this.enableHtmlSanitizer) {
              cnt = SanitizeHtmlHelper2.sanitize(cnt);
            }
            if (cnt[0] === "." || cnt[0] === "#") {
              if (document.querySelectorAll(cnt).length) {
                var eleVal = document.querySelector(cnt);
                eleStr = eleVal.outerHTML.trim();
                crElem.appendChild(eleVal);
                eleVal.style.display = "";
              } else {
                this.compileElement(crElem, cnt, "content", this.selectedItem);
              }
            } else {
              this.compileElement(crElem, cnt, "content", this.selectedItem);
            }
          } else {
            crElem.appendChild(cnt);
          }
          if (!isNullOrUndefined2(eleStr)) {
            if (this.templateEle.indexOf(cnt.toString()) === -1) {
              this.templateEle.push(cnt.toString());
            }
          }
          this.element.querySelector("." + CLS_ITEM3 + "." + CLS_ACTIVE2).appendChild(crElem);
        }
      } else {
        var tabItems = this.element.querySelector("." + CLS_TB_ITEMS);
        var element2 = this.element.querySelector("." + CLS_TB_ITEM + "." + CLS_ACTIVE2);
        var index = this.getIndexFromEle(element2.id);
        var header = element2.innerText;
        var detachContent = this.element.querySelector("." + CLS_CONTENT2).querySelector("." + CLS_ACTIVE2).children[0];
        var mainContents = detachContent.innerHTML;
        detach2(element2);
        detach2(detachContent);
        var attr = {
          className: CLS_TB_ITEM + " " + CLS_TEMPLATE2 + " " + CLS_ACTIVE2,
          id: CLS_ITEM3 + this.tabId + "_" + index
        };
        var txtString = this.createElement("span", {
          className: CLS_TEXT,
          innerHTML: header,
          attrs: {
            "role": "presentation"
          }
        }).outerHTML;
        var conte = this.createElement("div", {
          className: CLS_TEXT_WRAP,
          innerHTML: txtString + this.btnCls.outerHTML
        }).outerHTML;
        var tabIndex = element2.firstElementChild.getAttribute("data-tabindex");
        var wrap = this.createElement("div", {
          className: CLS_WRAP,
          innerHTML: conte,
          attrs: {
            tabIndex,
            "data-tabindex": tabIndex,
            role: "tab",
            "aria-controls": CLS_CONTENT2 + this.tabId + "_" + index,
            "aria-selected": "true",
            "aria-disabled": "false"
          }
        });
        tabItems.insertBefore(this.createElement("div", attr), tabItems.children[index + 1]);
        this.element.querySelector("." + CLS_TB_ITEM + "." + CLS_ACTIVE2).appendChild(wrap);
        var crElem = this.createElement("div", {
          innerHTML: mainContents
        });
        this.element.querySelector("." + CLS_CONTENT2).querySelector("." + CLS_ACTIVE2).appendChild(crElem);
      }
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Tab2.prototype.refreshActiveTabBorder = function() {
      if (this.heightAdjustMode === "None" && this.height !== "auto" && this.cntEle && !this.isVertical()) {
        var hdrEle = this.getTabHeader();
        setStyleAttribute2(this.cntEle, {
          "height": this.element.clientHeight - hdrEle.offsetHeight + "px"
        });
      }
      var activeEle = select2("." + CLS_TB_ITEM + "." + CLS_TB_POPUP + "." + CLS_ACTIVE2, this.element);
      if (!isNullOrUndefined2(activeEle) && this.reorderActiveTab) {
        this.select(this.getEleIndex(activeEle));
      }
      this.refreshActiveBorder();
    };
    __decorate75([Collection([], TabItem)], Tab2.prototype, "items", void 0);
    __decorate75([Property2("100%")], Tab2.prototype, "width", void 0);
    __decorate75([Property2("Both")], Tab2.prototype, "swipeMode", void 0);
    __decorate75([Property2("auto")], Tab2.prototype, "height", void 0);
    __decorate75([Property2("")], Tab2.prototype, "cssClass", void 0);
    __decorate75([Property2(0)], Tab2.prototype, "selectedItem", void 0);
    __decorate75([Property2("Top")], Tab2.prototype, "headerPlacement", void 0);
    __decorate75([Property2("Content")], Tab2.prototype, "heightAdjustMode", void 0);
    __decorate75([Property2("Scrollable")], Tab2.prototype, "overflowMode", void 0);
    __decorate75([Property2("Demand")], Tab2.prototype, "loadOn", void 0);
    __decorate75([Property2(false)], Tab2.prototype, "enablePersistence", void 0);
    __decorate75([Property2(true)], Tab2.prototype, "enableHtmlSanitizer", void 0);
    __decorate75([Property2(false)], Tab2.prototype, "showCloseButton", void 0);
    __decorate75([Property2(true)], Tab2.prototype, "reorderActiveTab", void 0);
    __decorate75([Property2()], Tab2.prototype, "scrollStep", void 0);
    __decorate75([Property2()], Tab2.prototype, "dragArea", void 0);
    __decorate75([Property2(false)], Tab2.prototype, "allowDragAndDrop", void 0);
    __decorate75([Property2(true)], Tab2.prototype, "clearTemplates", void 0);
    __decorate75([Complex2({}, TabAnimationSettings)], Tab2.prototype, "animation", void 0);
    __decorate75([Event3()], Tab2.prototype, "created", void 0);
    __decorate75([Event3()], Tab2.prototype, "adding", void 0);
    __decorate75([Event3()], Tab2.prototype, "added", void 0);
    __decorate75([Event3()], Tab2.prototype, "selecting", void 0);
    __decorate75([Event3()], Tab2.prototype, "selected", void 0);
    __decorate75([Event3()], Tab2.prototype, "removing", void 0);
    __decorate75([Event3()], Tab2.prototype, "removed", void 0);
    __decorate75([Event3()], Tab2.prototype, "onDragStart", void 0);
    __decorate75([Event3()], Tab2.prototype, "dragging", void 0);
    __decorate75([Event3()], Tab2.prototype, "dragged", void 0);
    __decorate75([Event3()], Tab2.prototype, "destroyed", void 0);
    Tab2 = __decorate75([NotifyPropertyChanges2], Tab2);
    return Tab2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/treeview/treeview.js
var __extends78 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate76 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ROOT6 = "e-treeview";
var CONTROL3 = "e-control";
var COLLAPSIBLE = "e-icon-collapsible";
var EXPANDABLE = "e-icon-expandable";
var LISTITEM = "e-list-item";
var LISTTEXT = "e-list-text";
var LISTWRAP = "e-text-wrap";
var IELISTWRAP = "e-ie-wrap";
var PARENTITEM = "e-list-parent";
var HOVER = "e-hover";
var ACTIVE3 = "e-active";
var LOAD = "e-icons-spinner";
var PROCESS = "e-process";
var ICON4 = "e-icons";
var TEXTWRAP = "e-text-content";
var INPUT2 = "e-input";
var INPUTGROUP2 = "e-input-group";
var TREEINPUT = "e-tree-input";
var EDITING = "e-editing";
var RTL17 = "e-rtl";
var INTERACTION = "e-interaction";
var DRAGITEM = "e-drag-item";
var DROPPABLE = "e-droppable";
var DRAGGING = "e-dragging";
var SIBLING = "e-sibling";
var DROPIN = "e-drop-in";
var DROPNEXT = "e-drop-next";
var DROPOUT = "e-drop-out";
var NODROP = "e-no-drop";
var FULLROWWRAP = "e-fullrow-wrap";
var FULLROW = "e-fullrow";
var SELECTED3 = "e-selected";
var EXPANDED = "e-expanded";
var NODECOLLAPSED = "e-node-collapsed";
var DISABLE = "e-disable";
var DROPCOUNT = "e-drop-count";
var CHECK3 = "e-check";
var INDETERMINATE3 = "e-stop";
var CHECKBOXWRAP = "e-treeview-checkbox";
var CHECKBOXFRAME = "e-frame";
var CHECKBOXRIPPLE = "e-ripple-container";
var RIPPLE7 = "e-ripple";
var RIPPLEELMENT = "e-ripple-element";
var FOCUS = "e-node-focus";
var IMAGE = "e-list-img";
var BIGGER = "e-bigger";
var SMALL = "e-small";
var CHILD = "e-has-child";
var ITEM_ANIMATION_ACTIVE = "e-animation-active";
var DISABLED11 = "e-disabled";
var PREVENTSELECT = "e-prevent";
var treeAriaAttr = {
  treeRole: "group",
  itemRole: "treeitem",
  listRole: "group",
  itemText: "",
  wrapperRole: ""
};
var FieldsSettings = (
  /** @class */
  function(_super) {
    __extends78(FieldsSettings2, _super);
    function FieldsSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate76([Property2("child")], FieldsSettings2.prototype, "child", void 0);
    __decorate76([Property2([])], FieldsSettings2.prototype, "dataSource", void 0);
    __decorate76([Property2("expanded")], FieldsSettings2.prototype, "expanded", void 0);
    __decorate76([Property2("hasChildren")], FieldsSettings2.prototype, "hasChildren", void 0);
    __decorate76([Property2("htmlAttributes")], FieldsSettings2.prototype, "htmlAttributes", void 0);
    __decorate76([Property2("iconCss")], FieldsSettings2.prototype, "iconCss", void 0);
    __decorate76([Property2("id")], FieldsSettings2.prototype, "id", void 0);
    __decorate76([Property2("imageUrl")], FieldsSettings2.prototype, "imageUrl", void 0);
    __decorate76([Property2("isChecked")], FieldsSettings2.prototype, "isChecked", void 0);
    __decorate76([Property2("parentID")], FieldsSettings2.prototype, "parentID", void 0);
    __decorate76([Property2(null)], FieldsSettings2.prototype, "query", void 0);
    __decorate76([Property2("selectable")], FieldsSettings2.prototype, "selectable", void 0);
    __decorate76([Property2("selected")], FieldsSettings2.prototype, "selected", void 0);
    __decorate76([Property2(null)], FieldsSettings2.prototype, "tableName", void 0);
    __decorate76([Property2("text")], FieldsSettings2.prototype, "text", void 0);
    __decorate76([Property2("tooltip")], FieldsSettings2.prototype, "tooltip", void 0);
    __decorate76([Property2("navigateUrl")], FieldsSettings2.prototype, "navigateUrl", void 0);
    return FieldsSettings2;
  }(ChildProperty2)
);
var ActionSettings = (
  /** @class */
  function(_super) {
    __extends78(ActionSettings2, _super);
    function ActionSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate76([Property2("SlideDown")], ActionSettings2.prototype, "effect", void 0);
    __decorate76([Property2(400)], ActionSettings2.prototype, "duration", void 0);
    __decorate76([Property2("linear")], ActionSettings2.prototype, "easing", void 0);
    return ActionSettings2;
  }(ChildProperty2)
);
var NodeAnimationSettings = (
  /** @class */
  function(_super) {
    __extends78(NodeAnimationSettings2, _super);
    function NodeAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate76([Complex2({
      effect: "SlideUp",
      duration: 400,
      easing: "linear"
    }, ActionSettings)], NodeAnimationSettings2.prototype, "collapse", void 0);
    __decorate76([Complex2({
      effect: "SlideDown",
      duration: 400,
      easing: "linear"
    }, ActionSettings)], NodeAnimationSettings2.prototype, "expand", void 0);
    return NodeAnimationSettings2;
  }(ChildProperty2)
);
var TreeView = (
  /** @class */
  function(_super) {
    __extends78(TreeView2, _super);
    function TreeView2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isRefreshed = false;
      _this.preventExpand = false;
      _this.checkedElement = [];
      _this.disableNode = [];
      _this.validArr = [];
      _this.validNodes = [];
      _this.expandChildren = [];
      _this.isFieldChange = false;
      _this.changeDataSource = false;
      _this.hasTemplate = false;
      _this.isFirstRender = false;
      _this.isNodeDropped = false;
      _this.isInteracted = false;
      _this.isRightClick = false;
      _this.mouseDownStatus = false;
      _this.isDropIn = false;
      _this.OldCheckedData = [];
      _this.isHiddenItem = false;
      return _this;
    }
    TreeView_1 = TreeView2;
    TreeView2.prototype.getModuleName = function() {
      return "treeview";
    };
    TreeView2.prototype.preRender = function() {
      var _this = this;
      this.checkActionNodes = [];
      this.parentNodeCheck = [];
      this.dragStartAction = false;
      this.isAnimate = false;
      this.keyConfigs = {
        escape: "escape",
        end: "end",
        enter: "enter",
        f2: "f2",
        home: "home",
        moveDown: "downarrow",
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        ctrlDown: "ctrl+downarrow",
        ctrlUp: "ctrl+uparrow",
        ctrlEnter: "ctrl+enter",
        ctrlHome: "ctrl+home",
        ctrlEnd: "ctrl+end",
        ctrlA: "ctrl+A",
        shiftDown: "shift+downarrow",
        shiftUp: "shift+uparrow",
        shiftEnter: "shift+enter",
        shiftHome: "shift+home",
        shiftEnd: "shift+end",
        csDown: "ctrl+shift+downarrow",
        csUp: "ctrl+shift+uparrow",
        csEnter: "ctrl+shift+enter",
        csHome: "ctrl+shift+home",
        csEnd: "ctrl+shift+end",
        space: "space",
        shiftSpace: "shift+space",
        ctrlSpace: "ctrl+space"
      };
      this.listBaseOption = {
        expandCollapse: true,
        showIcon: true,
        expandIconClass: EXPANDABLE,
        ariaAttributes: treeAriaAttr,
        expandIconPosition: "Left",
        itemCreated: function(e) {
          _this.beforeNodeCreate(e);
        },
        enableHtmlSanitizer: this.enableHtmlSanitizer,
        itemNavigable: this.fullRowNavigable
      };
      this.updateListProp(this.fields);
      this.aniObj = new Animation2({});
      this.treeList = [];
      this.isLoaded = false;
      this.isInitalExpand = false;
      this.expandChildren = [];
      this.index = 0;
      this.setTouchClass();
      this.DDTTreeData = JSON.parse(JSON.stringify(this.fields.dataSource));
      if (isNullOrUndefined2(this.selectedNodes)) {
        this.setProperties({
          selectedNodes: []
        }, true);
      }
      if (isNullOrUndefined2(this.checkedNodes)) {
        this.setProperties({
          checkedNodes: []
        }, true);
      }
      if (isNullOrUndefined2(this.expandedNodes)) {
        this.setProperties({
          expandedNodes: []
        }, true);
      } else {
        this.isInitalExpand = true;
      }
    };
    TreeView2.prototype.getPersistData = function() {
      var keyEntity = ["selectedNodes", "checkedNodes", "expandedNodes"];
      return this.addOnPersist(keyEntity);
    };
    TreeView2.prototype.render = function() {
      this.initialRender = true;
      this.initialize();
      this.setDataBinding(false);
      this.setDisabledMode();
      this.setExpandOnType();
      if (!this.disabled) {
        this.setRipple();
      }
      this.wireEditingEvents(this.allowEditing);
      this.setDragAndDrop(this.allowDragAndDrop);
      if (!this.disabled) {
        this.wireEvents();
      }
      this.initialRender = false;
      this.renderComplete();
    };
    TreeView2.prototype.initialize = function() {
      this.element.setAttribute("role", "tree");
      this.element.setAttribute("aria-activedescendant", this.element.id + "_active");
      this.setCssClass(null, this.cssClass);
      this.setEnableRtl();
      this.setFullRow(this.fullRowSelect);
      this.setTextWrap();
      this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
    };
    TreeView2.prototype.setDisabledMode = function() {
      if (this.disabled) {
        this.element.classList.add(DISABLED11);
        this.element.setAttribute("aria-disabled", "true");
      } else {
        this.element.classList.remove(DISABLED11);
        this.element.setAttribute("aria-disabled", "false");
      }
    };
    TreeView2.prototype.setEnableRtl = function() {
      (this.enableRtl ? addClass2 : removeClass2)([this.element], RTL17);
    };
    TreeView2.prototype.setRipple = function() {
      var tempStr = "." + FULLROW + ",." + TEXTWRAP;
      var rippleModel = {
        selector: tempStr,
        ignore: "." + TEXTWRAP + " > ." + ICON4 + ",." + INPUTGROUP2 + ",." + INPUT2 + ", ." + CHECKBOXWRAP
      };
      this.rippleFn = rippleEffect(this.element, rippleModel);
      var iconModel = {
        selector: "." + TEXTWRAP + " > ." + ICON4,
        isCenterRipple: true
      };
      this.rippleIconFn = rippleEffect(this.element, iconModel);
    };
    TreeView2.prototype.setFullRow = function(isEnabled) {
      (isEnabled ? addClass2 : removeClass2)([this.element], FULLROWWRAP);
    };
    TreeView2.prototype.setMultiSelect = function(isEnabled) {
      if (isEnabled) {
        this.element.setAttribute("aria-multiselectable", "true");
      } else {
        this.element.setAttribute("aria-multiselectable", "false");
      }
    };
    TreeView2.prototype.templateComplier = function(template) {
      if (template) {
        this.hasTemplate = true;
        this.element.classList.add(INTERACTION);
        try {
          if (typeof template !== "function" && document.querySelectorAll(template).length) {
            return compile4(document.querySelector(template).innerHTML.trim());
          } else {
            return compile4(template);
          }
        } catch (e) {
          return compile4(template);
        }
      }
      this.element.classList.remove(INTERACTION);
      return void 0;
    };
    TreeView2.prototype.setDataBinding = function(changeDataSource) {
      var _this = this;
      this.treeList.push("false");
      if (this.fields.dataSource instanceof DataManager) {
        this.isOffline = this.fields.dataSource.dataSource.offline;
        if (this.fields.dataSource.ready) {
          this.fields.dataSource.ready.then(function(e) {
            _this.isOffline = _this.fields.dataSource.dataSource.offline;
            if (_this.fields.dataSource instanceof DataManager && _this.isOffline) {
              _this.treeList.pop();
              _this.treeData = e.result;
              _this.isNumberTypeId = _this.getType();
              _this.setRootData();
              _this.renderItems(true);
              if (_this.treeList.length === 0 && !_this.isLoaded) {
                _this.finalize();
              }
            }
          }).catch(function(e) {
            _this.trigger("actionFailure", {
              error: e
            });
          });
        } else {
          this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(e) {
            _this.treeList.pop();
            _this.treeData = e.result;
            _this.isNumberTypeId = _this.getType();
            _this.setRootData();
            if (changeDataSource) {
              _this.changeDataSource = true;
            }
            _this.renderItems(true);
            _this.changeDataSource = false;
            if (_this.treeList.length === 0 && !_this.isLoaded) {
              _this.finalize();
            }
          }).catch(function(e) {
            _this.trigger("actionFailure", {
              error: e
            });
          });
        }
      } else {
        this.treeList.pop();
        if (isNullOrUndefined2(this.fields.dataSource)) {
          this.rootData = this.treeData = [];
        } else {
          this.treeData = JSON.parse(JSON.stringify(this.fields.dataSource));
          this.setRootData();
        }
        this.isNumberTypeId = this.getType();
        this.renderItems(false);
      }
      if (this.treeList.length === 0 && !this.isLoaded) {
        this.finalize();
      }
    };
    TreeView2.prototype.getQuery = function(mapper5, value) {
      if (value === void 0) {
        value = null;
      }
      var columns = [];
      var query;
      if (!mapper5.query) {
        query = new Query();
        var prop = this.getActualProperties(mapper5);
        for (var _i = 0, _a = Object.keys(prop); _i < _a.length; _i++) {
          var col = _a[_i];
          if (col !== "dataSource" && col !== "tableName" && col !== "child" && !!mapper5["" + col] && col !== "url" && columns.indexOf(mapper5["" + col]) === -1) {
            columns.push(mapper5["" + col]);
          }
        }
        query.select(columns);
        if (Object.prototype.hasOwnProperty.call(prop, "tableName")) {
          query.from(mapper5.tableName);
        }
      } else {
        query = mapper5.query.clone();
      }
      ListBase.addSorting(this.sortOrder, mapper5.text, query);
      if (!isNullOrUndefined2(value) && !isNullOrUndefined2(mapper5.parentID)) {
        query.where(mapper5.parentID, "equal", this.isNumberTypeId ? parseFloat(value) : value);
      }
      return query;
    };
    TreeView2.prototype.getType = function() {
      return this.treeData[0] ? typeof getValue2(this.fields.id, this.treeData[0]) === "number" ? true : false : false;
    };
    TreeView2.prototype.setRootData = function() {
      this.dataType = this.getDataType(this.treeData, this.fields);
      if (this.dataType === 1) {
        this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
        var rootItems = this.getChildNodes(this.treeData, void 0, true);
        if (isNullOrUndefined2(rootItems)) {
          this.rootData = [];
        } else {
          this.rootData = rootItems;
        }
      } else {
        this.rootData = this.treeData;
      }
    };
    TreeView2.prototype.isChildObject = function() {
      if (typeof this.fields.child === "object") {
        return true;
      } else {
        return false;
      }
    };
    TreeView2.prototype.renderItems = function(isSorted) {
      this.listBaseOption.ariaAttributes.level = 1;
      var sortedData = this.getSortedData(this.rootData);
      this.ulElement = ListBase.createList(this.createElement, isSorted ? this.rootData : sortedData, this.listBaseOption);
      this.element.appendChild(this.ulElement);
      var rootNodes = this.ulElement.querySelectorAll(".e-list-item");
      if (this.loadOnDemand === false) {
        var i = 0;
        while (i < rootNodes.length) {
          this.renderChildNodes(rootNodes[parseInt(i.toString(), 10)], true, null, true);
          i++;
        }
      }
      var parentEle = selectAll2("." + PARENTITEM, this.element);
      if (parentEle.length === 1 && rootNodes && rootNodes.length !== 0 || this.loadOnDemand) {
        this.finalizeNode(this.element);
      }
      this.parentNodeCheck = [];
      this.parentCheckData = [];
      this.updateCheckedStateFromDS();
      if (this.autoCheck && this.showCheckBox && !this.isLoaded) {
        this.updateParentCheckState();
      }
    };
    TreeView2.prototype.updateCheckedStateFromDS = function() {
      this.validNodes = [];
      if (this.treeData && this.showCheckBox) {
        if (this.dataType === 1) {
          var mapper5 = this.fields;
          var resultData = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.isChecked, "equal", true, false));
          for (var i = 0; i < resultData.length; i++) {
            var resultId = resultData[parseInt(i.toString(), 10)][this.fields.id] ? resultData[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
            if (this.checkedNodes.indexOf(resultId) === -1 && !this.isLoaded) {
              this.checkDisabledState(resultId, resultData[i]);
            }
            if (resultData[parseInt(i.toString(), 10)][this.fields.hasChildren]) {
              var id = resultData[parseInt(i.toString(), 10)][this.fields.id];
              var childData = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.parentID, "equal", id, false));
              for (var child = 0; child < childData.length; child++) {
                var childId = childData[parseInt(child.toString(), 10)][this.fields.id] ? childData[parseInt(child.toString(), 10)][this.fields.id].toString() : null;
                if (this.checkedNodes.indexOf(childId) === -1 && this.autoCheck) {
                  this.checkDisabledState(childId, childData[child]);
                }
              }
            }
          }
          for (var i = 0; i < this.checkedNodes.length; i++) {
            var mapper_1 = this.fields;
            var checkState = new DataManager(this.treeData).executeLocal(new Query().where(mapper_1.id, "equal", this.checkedNodes[parseInt(i.toString(), 10)], true));
            if (checkState[0] && this.autoCheck) {
              this.getCheckedNodeDetails(mapper_1, checkState);
              this.checkIndeterminateState(checkState[0]);
            }
            if (checkState.length > 0) {
              var checkedId = checkState[0][this.fields.id] ? checkState[0][this.fields.id].toString() : null;
              if (this.checkedNodes.indexOf(checkedId) > -1 && this.validNodes.indexOf(checkedId) === -1) {
                this.validNodes.push(checkedId);
              }
            }
            var checkedData = new DataManager(this.treeData).executeLocal(new Query().where(mapper_1.parentID, "equal", this.checkedNodes[parseInt(i.toString(), 10)], true));
            for (var index = 0; index < checkedData.length; index++) {
              var checkedId = checkedData[parseInt(index.toString(), 10)][this.fields.id] ? checkedData[parseInt(index.toString(), 10)][this.fields.id].toString() : null;
              if (this.checkedNodes.indexOf(checkedId) === -1 && this.autoCheck) {
                this.checkDisabledState(checkedId, checkedData[index]);
              }
              if (this.checkedNodes.indexOf(checkedId) > -1 && this.validNodes.indexOf(checkedId) === -1) {
                this.validNodes.push(checkedId);
              }
            }
          }
        } else if (this.dataType === 2 || this.fields.dataSource instanceof DataManager && this.isOffline) {
          for (var index = 0; index < this.treeData.length; index++) {
            var fieldId = this.treeData[parseInt(index.toString(), 10)][this.fields.id] ? this.treeData[parseInt(index.toString(), 10)][this.fields.id].toString() : "";
            if (this.treeData[parseInt(index.toString(), 10)][this.fields.isChecked] && !this.isLoaded && this.checkedNodes.indexOf(fieldId) === -1) {
              this.checkDisabledState(fieldId, this.treeData[index]);
            }
            if (this.checkedNodes.indexOf(fieldId) > -1 && this.validNodes.indexOf(fieldId) === -1) {
              this.validNodes.push(fieldId);
            }
            var childItems = getValue2(this.fields.child.toString(), this.treeData[parseInt(index.toString(), 10)]);
            if (childItems) {
              this.updateChildCheckState(childItems, this.treeData[parseInt(index.toString(), 10)]);
            }
          }
          this.validNodes = this.enablePersistence ? this.checkedNodes : this.validNodes;
        }
        this.setProperties({
          checkedNodes: this.validNodes
        }, true);
      }
    };
    TreeView2.prototype.getCheckedNodeDetails = function(mapper5, checkNodes) {
      var id = checkNodes[0][this.fields.parentID] ? checkNodes[0][this.fields.parentID].toString() : null;
      var count = 0;
      var element2 = this.element.querySelector('[data-uid="' + checkNodes[0][this.fields.id] + '"]');
      var parentEle = this.element.querySelector('[data-uid="' + checkNodes[0][this.fields.parentID] + '"]');
      if (!element2 && !parentEle) {
        if (this.parentNodeCheck.indexOf(id) === -1) {
          this.parentNodeCheck.push(id);
        }
        var childNodes = this.getChildNodes(this.treeData, id);
        for (var i = 0; i < childNodes.length; i++) {
          var childId = childNodes[parseInt(i.toString(), 10)][this.fields.id] ? childNodes[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
          if (this.checkedNodes.indexOf(childId) !== -1) {
            count++;
          }
          if (count === childNodes.length && this.checkedNodes.indexOf(id) === -1) {
            this.checkDisabledState(id);
          }
        }
        var preElement = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.id, "equal", id, true));
        this.getCheckedNodeDetails(mapper5, preElement);
      } else if (parentEle) {
        var check = select2("." + CHECK3, parentEle);
        if (!check) {
          this.changeState(parentEle, "indeterminate", null, true, true);
        }
      }
    };
    TreeView2.prototype.updateParentCheckState = function() {
      var indeterminate = selectAll2("." + INDETERMINATE3, this.element);
      var childCheckedElement;
      var data = this.treeData;
      if (this.element.classList.contains("e-filtering")) {
        data = this.DDTTreeData;
      }
      for (var i = 0; i < indeterminate.length; i++) {
        var node = closest2(indeterminate[parseInt(i.toString(), 10)], "." + LISTITEM);
        var nodeId = node.getAttribute("data-uid").toString();
        var OldCheckedNodes = void 0;
        if (this.element.classList.contains("e-filtering")) {
          OldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where("parentID", "equal", nodeId, true));
        }
        if (this.dataType === 1) {
          childCheckedElement = new DataManager(data).executeLocal(new Query().where(this.fields.parentID, "equal", nodeId, true));
        } else {
          childCheckedElement = this.getChildNodes(data, nodeId);
        }
        var count = 0;
        if (childCheckedElement) {
          var _loop_1 = function(j2) {
            var childId = childCheckedElement[parseInt(j2.toString(), 10)][this_1.fields.id].toString();
            if (this_1.checkedNodes.indexOf(childId) !== -1) {
              count++;
            } else if (this_1.element.classList.contains("e-filtering") && OldCheckedNodes.findIndex(function(e) {
              return e["id"] === childId;
            }) !== -1) {
              count++;
            }
          };
          var this_1 = this;
          for (var j = 0; j < childCheckedElement.length; j++) {
            _loop_1(j);
          }
          if (count === childCheckedElement.length) {
            var nodeCheck = node.getAttribute("data-uid");
            if (this.checkedNodes.indexOf(nodeCheck) === -1) {
              this.checkDisabledState(nodeCheck);
            }
            this.changeState(node, "check", null, true, true);
          } else if (count === 0 && this.checkedNodes.length === 0) {
            this.changeState(node, "uncheck", null, true, true);
          }
        }
      }
    };
    TreeView2.prototype.checkIndeterminateState = function(data) {
      var element2;
      if (this.dataType === 1) {
        element2 = this.element.querySelector('[data-uid="' + data[this.fields.parentID] + '"]');
      } else {
        element2 = this.element.querySelector('[data-uid="' + data[this.fields.id] + '"]');
      }
      if (element2) {
        var ariaChecked = element2.getAttribute("aria-checked");
        if (ariaChecked !== "true") {
          this.changeState(element2, "indeterminate", null, true, true);
        }
      } else if (this.dataType === 2) {
        if (this.parentNodeCheck.indexOf(data[this.fields.id].toString()) === -1) {
          this.parentNodeCheck.push(data[this.fields.id].toString());
        }
      }
    };
    TreeView2.prototype.updateChildCheckState = function(childItems, treeData) {
      var count = 0;
      var checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : "";
      for (var index = 0; index < childItems.length; index++) {
        var checkedChild = childItems[parseInt(index.toString(), 10)][this.fields.id] ? childItems[parseInt(index.toString(), 10)][this.fields.id].toString() : "";
        if (childItems[parseInt(index.toString(), 10)][this.fields.isChecked] && !this.isLoaded && this.checkedNodes.indexOf(checkedChild) === -1) {
          this.checkDisabledState(checkedChild, childItems[index]);
        }
        if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1 && this.autoCheck) {
          this.checkDisabledState(checkedChild, childItems[index]);
        }
        if (this.checkedNodes.indexOf(checkedChild) !== -1 && this.autoCheck) {
          count++;
        }
        if (this.checkedNodes.indexOf(checkedChild) > -1 && this.validNodes.indexOf(checkedChild) === -1) {
          this.validNodes.push(checkedChild);
        }
        var subChildItems = getValue2(this.fields.child.toString(), childItems[parseInt(index.toString(), 10)]);
        if (subChildItems && subChildItems.length) {
          if (this.parentCheckData.indexOf(treeData) === -1) {
            this.parentCheckData.push(treeData);
          }
          this.updateChildCheckState(subChildItems, childItems[parseInt(index.toString(), 10)]);
        }
        if (count === childItems.length && this.autoCheck && this.checkedNodes.indexOf(checkedParent) === -1) {
          this.checkDisabledState(checkedParent, treeData);
        }
      }
      if (count !== 0 && this.autoCheck) {
        this.checkIndeterminateState(treeData);
        for (var len = 0; len < this.parentCheckData.length; len++) {
          if (treeData !== this.parentCheckData[parseInt(len.toString(), 10)] && this.parentCheckData[parseInt(len.toString(), 10)]) {
            this.checkIndeterminateState(this.parentCheckData[parseInt(len.toString(), 10)]);
          }
        }
      }
      this.parentCheckData = [];
    };
    TreeView2.prototype.beforeNodeCreate = function(e) {
      if (this.showCheckBox) {
        var checkboxEle = createCheckBox(this.createElement, true, {
          cssClass: this.touchClass
        });
        checkboxEle.classList.add(CHECKBOXWRAP);
        var icon = select2("div." + EXPANDABLE + ", div." + COLLAPSIBLE, e.item);
        var id = e.item.getAttribute("data-uid");
        e.item.childNodes[0].insertBefore(checkboxEle, e.item.childNodes[0].childNodes[isNullOrUndefined2(icon) ? 0 : 1]);
        var checkValue = getValue2(e.fields.isChecked, e.curData);
        if (this.checkedNodes.indexOf(id) > -1) {
          select2("." + CHECKBOXFRAME, checkboxEle).classList.add(CHECK3);
          e.item.setAttribute("aria-checked", "true");
          this.addCheck(e.item);
        } else if (!isNullOrUndefined2(checkValue) && checkValue.toString() === "true") {
          select2("." + CHECKBOXFRAME, checkboxEle).classList.add(CHECK3);
          e.item.setAttribute("aria-checked", "true");
          this.addCheck(e.item);
        } else {
          e.item.setAttribute("aria-checked", "false");
        }
        var frame = select2("." + CHECKBOXFRAME, checkboxEle);
        EventHandler2.add(frame, "mousedown", this.frameMouseHandler, this);
        EventHandler2.add(frame, "mouseup", this.frameMouseHandler, this);
      }
      if (this.fullRowSelect) {
        this.createFullRow(e.item);
      }
      if (this.allowMultiSelection && !e.item.classList.contains(SELECTED3)) {
        e.item.setAttribute("aria-selected", "false");
      }
      var fields = e.fields;
      this.addActionClass(e, fields.selected, SELECTED3);
      this.addActionClass(e, fields.expanded, EXPANDED);
      e.item.setAttribute("tabindex", "-1");
      EventHandler2.add(e.item, "focus", this.focusIn, this);
      if (!isNullOrUndefined2(this.nodeTemplateFn)) {
        var textEle = e.item.querySelector("." + LISTTEXT);
        var dataId = e.item.getAttribute("data-uid");
        textEle.innerHTML = "";
        this.renderNodeTemplate(e.curData, textEle, dataId);
      }
      var eventArgs = {
        node: e.item,
        nodeData: e.curData,
        text: e.text
      };
      if (!this.isRefreshed) {
        this.trigger("drawNode", eventArgs);
        if (e.curData[this.fields.selectable] === false && !this.showCheckBox) {
          e.item.classList.add(PREVENTSELECT);
          e.item.firstElementChild.setAttribute("style", "cursor: not-allowed");
        }
      }
    };
    TreeView2.prototype.frameMouseHandler = function(e) {
      var rippleSpan = select2("." + CHECKBOXRIPPLE, e.target.parentElement);
      rippleMouseHandler(e, rippleSpan);
    };
    TreeView2.prototype.addActionClass = function(e, action, cssClass2) {
      var data = e.curData;
      var actionValue = getValue2(action, data);
      if (!isNullOrUndefined2(actionValue) && actionValue.toString() !== "false") {
        e.item.classList.add(cssClass2);
      }
    };
    TreeView2.prototype.getDataType = function(ds, mapper5) {
      if (this.fields.dataSource instanceof DataManager) {
        for (var i = 0; i < ds.length; i++) {
          if (this.isOffline) {
            if (typeof mapper5.child === "string" && isNullOrUndefined2(getValue2(mapper5.child, ds[parseInt(i.toString(), 10)])) && !isNullOrUndefined2(getValue2(mapper5.parentID, ds[parseInt(i.toString(), 10)]))) {
              return 1;
            }
          } else if (typeof mapper5.child === "string" && isNullOrUndefined2(getValue2(mapper5.child, ds[parseInt(i.toString(), 10)]))) {
            return 1;
          }
        }
        return 2;
      }
      for (var i = 0, len = ds.length; i < len; i++) {
        if (typeof mapper5.child === "string" && (!isNullOrUndefined2(getValue2(mapper5.child, ds[parseInt(i.toString(), 10)])) || Object.prototype.hasOwnProperty.call(ds[parseInt(i.toString(), 10)], mapper5.child))) {
          return 2;
        }
        if (this.isChildObject()) {
          return 2;
        }
        if (!isNullOrUndefined2(getValue2(mapper5.parentID, ds[parseInt(i.toString(), 10)])) || !isNullOrUndefined2(getValue2(mapper5.hasChildren, ds[parseInt(i.toString(), 10)]))) {
          return 1;
        }
      }
      return 1;
    };
    TreeView2.prototype.getGroupedData = function(dataSource, groupBy) {
      var cusQuery = new Query().group(groupBy);
      var ds = ListBase.getDataSource(dataSource, cusQuery);
      var grpItem = [];
      for (var j = 0; j < ds.length; j++) {
        var itemObj = ds[parseInt(j.toString(), 10)].items;
        grpItem.push(itemObj);
      }
      return grpItem;
    };
    TreeView2.prototype.getSortedData = function(list) {
      if (list && this.sortOrder !== "None") {
        list = ListBase.getDataSource(list, ListBase.addSorting(this.sortOrder, this.fields.text));
      }
      return list;
    };
    TreeView2.prototype.finalizeNode = function(element2, isFromExpandAll, expandChild) {
      var _this = this;
      if (!isFromExpandAll) {
        this.updateAttributes(element2);
      }
      if (!expandChild) {
        var eNodes = selectAll2("." + EXPANDED, element2);
        if (!this.loadOnDemand && this.fields.dataSource instanceof DataManager) {
          this.isInitalExpand = this.treeData.filter(function(e) {
            return e[_this.fields.expanded] === true;
          }).length > 0 ? true : this.isInitalExpand;
        }
        if (!this.isInitalExpand) {
          for (var i = 0; i < eNodes.length; i++) {
            this.renderChildNodes(eNodes[parseInt(i.toString(), 10)]);
          }
        }
        removeClass2(eNodes, EXPANDED);
      }
      if (!isFromExpandAll) {
        this.updateList();
      }
      if (this.isLoaded) {
        this.updateCheckedProp();
      }
    };
    TreeView2.prototype.updateAttributes = function(element2) {
      var iNodes = selectAll2("." + IMAGE, element2);
      for (var k = 0; k < iNodes.length; k++) {
        iNodes[parseInt(k.toString(), 10)].setAttribute("alt", IMAGE);
      }
      if (this.isLoaded) {
        var sNodes = selectAll2("." + SELECTED3, element2);
        for (var i = 0; i < sNodes.length; i++) {
          this.selectNode(sNodes[parseInt(i.toString(), 10)], null);
          break;
        }
        removeClass2(sNodes, SELECTED3);
      }
      var cNodes = selectAll2("." + LISTITEM + ":not(." + EXPANDED + ")", element2);
      for (var j = 0; j < cNodes.length; j++) {
        var icon = select2("div." + ICON4, cNodes[parseInt(j.toString(), 10)]);
        if (icon && icon.classList.contains(EXPANDABLE)) {
          this.disableExpandAttr(cNodes[parseInt(j.toString(), 10)]);
        }
      }
    };
    TreeView2.prototype.updateCheckedProp = function() {
      if (this.showCheckBox) {
        var nodes = [].concat([], this.checkedNodes);
        this.setProperties({
          checkedNodes: nodes
        }, true);
      }
    };
    TreeView2.prototype.ensureIndeterminate = function() {
      if (this.autoCheck) {
        var liElement = selectAll2("li", this.element);
        var ulElement = void 0;
        for (var i = 0; i < liElement.length; i++) {
          if (liElement[parseInt(i.toString(), 10)].classList.contains(LISTITEM)) {
            ulElement = select2("." + PARENTITEM, liElement[parseInt(i.toString(), 10)]);
            if (ulElement) {
              this.ensureParentCheckState(liElement[parseInt(i.toString(), 10)]);
            } else {
              this.ensureChildCheckState(liElement[parseInt(i.toString(), 10)]);
            }
          }
        }
      } else {
        var indeterminate = selectAll2("." + INDETERMINATE3, this.element);
        for (var i = 0; i < indeterminate.length; i++) {
          indeterminate[parseInt(i.toString(), 10)].classList.remove(INDETERMINATE3);
        }
      }
    };
    TreeView2.prototype.ensureParentCheckState = function(element2) {
      if (!isNullOrUndefined2(element2)) {
        if (element2.classList.contains(ROOT6)) {
          return;
        }
        var ulElement = element2;
        if (element2.classList.contains(LISTITEM)) {
          ulElement = select2("." + PARENTITEM, element2);
        }
        var checkedNodes = selectAll2("." + CHECKBOXWRAP + " ." + CHECK3, ulElement);
        var indeterminateNodes = selectAll2("." + INDETERMINATE3, ulElement);
        var nodes = selectAll2(this.checkDisabledChildren ? "." + LISTITEM : "." + LISTITEM + ":not(." + DISABLE + ")", ulElement);
        var checkBoxEle = element2.getElementsByClassName(CHECKBOXWRAP)[0];
        var count = nodes.length;
        var checkedCount = checkedNodes.length;
        var matchedChildNodes = [];
        var oldChildCount = [];
        var dataUid_1 = element2.getAttribute("data-uid");
        var rootNodeChecked_1 = true;
        var childNodeChecked_1 = false;
        nodes.forEach(function(childNode) {
          if (childNode instanceof HTMLElement) {
            var ariaChecked = childNode.getAttribute("aria-checked");
            if (ariaChecked === "true") {
              childNodeChecked_1 = true;
            } else {
              rootNodeChecked_1 = false;
            }
          }
        });
        var parentNodeChecked = false;
        if (this.element.classList.contains("e-filtering")) {
          var oldCheckedNodes = new DataManager(this.OldCheckedData).executeLocal(new Query().where("parentID", "equal", dataUid_1, true));
          checkedCount = oldCheckedNodes.length;
          var parentNode = new DataManager(this.OldCheckedData).executeLocal(new Query().where("hasChildren", "equal", true, true));
          if (parentNode.length > 0 && this.OldCheckedData.some(function(oldNode) {
            return oldNode.id === dataUid_1;
          }) && childNodeChecked_1) {
            checkedCount = parentNode.length;
            parentNodeChecked = true;
          }
          var childItems = [];
          if (this.dataType === 1) {
            childItems = new DataManager(this.DDTTreeData).executeLocal(new Query().where(this.fields.parentID, "equal", dataUid_1, true));
          } else {
            childItems = this.getChildNodes(this.DDTTreeData, dataUid_1);
          }
          count = childItems.length;
        }
        if (this.autoCheck && this.showCheckBox && !(this.fields.dataSource instanceof DataManager)) {
          var selectedChildNodeDetails = this.getSelectedChildNodeDetails(dataUid_1);
          matchedChildNodes = selectedChildNodeDetails;
          oldChildCount = new DataManager(this.checkActionNodes).executeLocal(new Query().where("parentID", "equal", dataUid_1, true));
        }
        if (count === 0 && checkedCount === 0) {
          return;
        } else if (count === checkedCount || parentNodeChecked && count > 0 && oldChildCount.length === matchedChildNodes.length && oldChildCount.length !== 0 && matchedChildNodes.length !== 0 && rootNodeChecked_1 && this.autoCheck && this.showCheckBox) {
          this.changeState(checkBoxEle, "check", null, true, true);
        } else if (checkedCount > 0 && !parentNodeChecked && this.autoCheck && this.showCheckBox) {
          this.changeState(checkBoxEle, "indeterminate", null, true, true);
        } else if (checkedCount > 0 || indeterminateNodes.length > 0) {
          this.changeState(checkBoxEle, "indeterminate", null, true, true);
        } else if (checkedCount === 0) {
          this.changeState(checkBoxEle, "uncheck", null, true, true);
        }
        var parentUL = closest2(element2, "." + PARENTITEM);
        if (!isNullOrUndefined2(parentUL)) {
          var currentParent = closest2(parentUL, "." + LISTITEM);
          this.ensureParentCheckState(currentParent);
        }
      }
    };
    TreeView2.prototype.getSelectedChildNodeDetails = function(dataUid) {
      var _this = this;
      return this.checkedNodes.map(function(checkedNodeId) {
        return new DataManager(_this.DDTTreeData).executeLocal(new Query().where("id", "equal", checkedNodeId, true))[0];
      }).filter(function(childNode) {
        if (childNode && typeof childNode === "object" && "pid" in childNode) {
          var childNodePid = childNode.pid;
          if (!isNullOrUndefined2(childNodePid)) {
            return childNodePid.toString() === dataUid;
          }
        }
        return false;
      });
    };
    TreeView2.prototype.ensureChildCheckState = function(element2, e, isFromExpandAll) {
      var _this = this;
      if (!isNullOrUndefined2(element2)) {
        var childElement = select2("." + PARENTITEM, element2);
        var checkBoxes = void 0;
        if (!isNullOrUndefined2(childElement)) {
          var childCheck = Array.from(childElement.querySelectorAll("li"));
          checkBoxes = selectAll2("." + CHECKBOXWRAP, childElement);
          if (this.isFilter) {
            checkBoxes = Array.from(checkBoxes).filter(function(checkbox) {
              var dataUID = checkbox.closest("li").getAttribute("data-uid");
              return dataUID !== null && _this.checkedNodes.indexOf(dataUID) !== -1;
            });
            childCheck = Array.from(childCheck).filter(function(li) {
              var childIds = li.getAttribute("data-uid");
              return childIds !== null && _this.checkedNodes.indexOf(childIds) !== -1;
            });
            if (checkBoxes.length === 0) {
              checkBoxes = selectAll2("." + CHECKBOXWRAP, childElement);
              childCheck = Array.from(childElement.querySelectorAll("li"));
            }
          }
          var isChecked = element2.getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(CHECK3);
          var parentCheck = element2.getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(INDETERMINATE3);
          var checkedState = void 0;
          for (var index = 0; index < checkBoxes.length; index++) {
            var childId = childCheck[parseInt(index.toString(), 10)].getAttribute("data-uid");
            if (!isNullOrUndefined2(this.currentLoadData) && !isNullOrUndefined2(getValue2(this.fields.isChecked, this.currentLoadData[parseInt(index.toString(), 10)]))) {
              checkedState = getValue2(this.fields.isChecked, this.currentLoadData[parseInt(index.toString(), 10)]) ? "check" : "uncheck";
              if (this.ele !== -1) {
                checkedState = isChecked ? "check" : "uncheck";
              }
              if (checkedState === "uncheck" && !isUndefined2(this.parentNodeCheck) && this.autoCheck && this.parentNodeCheck.indexOf(childId) !== -1) {
                this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
                checkedState = "indeterminate";
              }
            } else {
              var isNodeChecked = checkBoxes[parseInt(index.toString(), 10)].getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(CHECK3);
              if (isChecked) {
                checkedState = "check";
              } else if (isNodeChecked && !this.isLoaded) {
                checkedState = "check";
              } else if (this.checkedNodes.indexOf(childId) !== -1 && this.isLoaded && (parentCheck || isChecked)) {
                checkedState = "check";
              } else if (childCheck[parseInt(index.toString(), 10)].classList.contains(CHILD) && !isUndefined2(this.parentNodeCheck) && this.autoCheck && (isChecked || parentCheck) && this.parentNodeCheck.indexOf(childId) !== -1) {
                checkedState = "indeterminate";
                this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
              } else if (this.dataType === 1 && !isUndefined2(this.parentNodeCheck) && this.autoCheck && (isChecked || parentCheck) && this.parentNodeCheck.indexOf(childId) !== -1) {
                checkedState = "indeterminate";
                this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
              } else {
                checkedState = "uncheck";
              }
            }
            this.changeState(checkBoxes[parseInt(index.toString(), 10)], checkedState, e, true, true);
          }
        }
        if (this.autoCheck && this.isLoaded && !isFromExpandAll) {
          this.updateParentCheckState();
        }
      }
    };
    TreeView2.prototype.doCheckBoxAction = function(nodes, doCheck) {
      if (!isNullOrUndefined2(nodes)) {
        nodes.reverse();
        for (var len = nodes.length - 1; len >= 0; len--) {
          var liEle = this.getElement(nodes[parseInt(len.toString(), 10)]);
          if (isNullOrUndefined2(liEle)) {
            var node = nodes[len - nodes.length] ? nodes[len - nodes.length].toString() : nodes[parseInt(len.toString(), 10)] ? nodes[parseInt(len.toString(), 10)].toString() : null;
            if (node !== "" && doCheck && node) {
              this.setValidCheckedNode(node, nodes);
              this.dynamicCheckState(node, doCheck);
            } else if (this.checkedNodes.indexOf(node) !== -1 && node !== "" && !doCheck) {
              this.checkedNodes.splice(this.checkedNodes.indexOf(node), 1);
              var childItems = this.getChildNodes(this.treeData, node);
              if (childItems) {
                for (var i = 0; i < childItems.length; i++) {
                  var id = childItems[parseInt(i.toString(), 10)][this.fields.id] ? childItems[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
                  if (this.checkedNodes.indexOf(id) !== -1) {
                    this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
                    var ele = this.element.querySelector('[data-uid="' + id + '"]');
                    if (ele) {
                      this.changeState(ele, "uncheck", null);
                    }
                  }
                }
                if (this.parentNodeCheck.indexOf(node) !== -1) {
                  this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(node), 1);
                }
              }
              if (node) {
                this.dynamicCheckState(node, doCheck);
              }
              this.updateField(this.treeData, this.fields, node, "isChecked", null);
            }
            continue;
          }
          var checkBox = select2("." + PARENTITEM + " ." + CHECKBOXWRAP, liEle);
          this.validateCheckNode(checkBox, !doCheck, liEle, null);
        }
      } else {
        var checkBoxes = selectAll2("." + CHECKBOXWRAP, this.element);
        if (this.loadOnDemand) {
          for (var index = 0; index < checkBoxes.length; index++) {
            this.updateFieldChecked(checkBoxes[parseInt(index.toString(), 10)], doCheck);
            this.changeState(checkBoxes[parseInt(index.toString(), 10)], doCheck ? "check" : "uncheck", null, null, null, doCheck);
          }
        } else {
          for (var index = 0; index < checkBoxes.length; index++) {
            this.updateFieldChecked(checkBoxes[parseInt(index.toString(), 10)], doCheck);
            this.changeState(checkBoxes[parseInt(index.toString(), 10)], doCheck ? "check" : "uncheck");
          }
        }
      }
      if (nodes) {
        for (var j = 0; j < nodes.length - 1; j++) {
          var node = nodes[parseInt(j.toString(), 10)] ? nodes[parseInt(j.toString(), 10)].toString() : "";
          if (!doCheck) {
            this.updateField(this.treeData, this.fields, node, "isChecked", null);
          }
        }
      }
      if (this.autoCheck) {
        this.updateParentCheckState();
      }
    };
    TreeView2.prototype.updateFieldChecked = function(checkbox, doCheck) {
      var currLi = closest2(checkbox, "." + LISTITEM);
      var id = currLi.getAttribute("data-uid");
      var nodeDetails = this.getNodeData(currLi);
      if (nodeDetails.isChecked === "true" && !doCheck) {
        this.updateField(this.treeData, this.fields, id, "isChecked", null);
      }
    };
    TreeView2.prototype.dynamicCheckState = function(node, doCheck) {
      if (this.dataType === 1) {
        var count = 0;
        var resultId = new DataManager(this.treeData).executeLocal(new Query().where(this.fields.id, "equal", node, true));
        if (resultId[0]) {
          var id = resultId[0][this.fields.id] ? resultId[0][this.fields.id].toString() : null;
          var parent_1 = resultId[0][this.fields.parentID] ? resultId[0][this.fields.parentID].toString() : null;
          var parentElement = this.element.querySelector('[data-uid="' + parent_1 + '"]');
          var element2 = this.element.querySelector('[data-uid="' + id + '"]');
          var childNodes = this.getChildNodes(this.treeData, parent_1);
          if (childNodes) {
            for (var i = 0; i < childNodes.length; i++) {
              var childId = childNodes[parseInt(i.toString(), 10)][this.fields.id] ? childNodes[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
              if (this.checkedNodes.indexOf(childId) !== -1) {
                count++;
              }
            }
          }
          if (this.checkedNodes.indexOf(node) !== -1 && parentElement && id === node && this.autoCheck) {
            this.changeState(parentElement, "indeterminate", null);
          } else if (this.checkedNodes.indexOf(node) === -1 && element2 && id === node && !doCheck) {
            this.changeState(element2, "uncheck", null);
          } else if (this.checkedNodes.indexOf(node) !== -1 && element2 && id === node && doCheck) {
            this.changeState(element2, "check", null);
          } else if (this.checkedNodes.indexOf(node) === -1 && !element2 && parentElement && id === node && this.autoCheck && count !== 0) {
            this.changeState(parentElement, "indeterminate", null);
          } else if (this.checkedNodes.indexOf(node) === -1 && !element2 && parentElement && id === node && this.autoCheck && count === 0) {
            this.changeState(parentElement, "uncheck", null);
          } else if (!element2 && !parentElement && id === node && this.autoCheck) {
            this.updateIndeterminate(node, doCheck);
          }
        }
      } else if (this.dataType === 2 || this.fields.dataSource instanceof DataManager && this.isOffline) {
        var id = void 0;
        var parentElement = void 0;
        var check = void 0;
        for (var i = 0; i < this.treeData.length; i++) {
          id = this.treeData[parseInt(i.toString(), 10)][this.fields.id] ? this.treeData[parseInt(i.toString(), 10)][this.fields.id].toString() : "";
          parentElement = this.element.querySelector('[data-uid="' + id + '"]');
          check = parentElement ? select2("." + CHECK3, parentElement) : null;
          if (this.checkedNodes.indexOf(id) === -1 && parentElement && check && !doCheck) {
            this.changeState(parentElement, "uncheck", null);
          }
          var subChild = getValue2(this.fields.child.toString(), this.treeData[parseInt(i.toString(), 10)]);
          if (subChild) {
            this.updateChildIndeterminate(subChild, id, node, doCheck, id);
          }
        }
      }
    };
    TreeView2.prototype.updateIndeterminate = function(node, doCheck) {
      var indeterminateData = this.getTreeData(node);
      var count = 0;
      var parent;
      if (this.dataType === 1) {
        parent = indeterminateData[0][this.fields.parentID] ? indeterminateData[0][this.fields.parentID].toString() : null;
      }
      var childNodes = this.getChildNodes(this.treeData, parent);
      if (childNodes) {
        for (var i = 0; i < childNodes.length; i++) {
          var childId = childNodes[parseInt(i.toString(), 10)][this.fields.id] ? childNodes[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
          if (this.checkedNodes.indexOf(childId) !== -1) {
            count++;
          }
        }
      }
      var parentElement = this.element.querySelector('[data-uid="' + parent + '"]');
      if (parentElement && doCheck) {
        this.changeState(parentElement, "indeterminate", null);
      } else if (!doCheck && parentElement && this.parentNodeCheck.indexOf(parent) === -1 && count !== 0) {
        this.changeState(parentElement, "indeterminate", null);
      } else if (!doCheck && parentElement && this.parentNodeCheck.indexOf(parent) === -1 && count === 0) {
        this.changeState(parentElement, "uncheck", null);
      } else if (!parentElement) {
        if (!doCheck && this.checkedNodes.indexOf(parent) === -1 && this.parentNodeCheck.indexOf(parent) !== -1) {
          this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(parent), 1);
        } else if (doCheck && this.checkedNodes.indexOf(parent) === -1 && this.parentNodeCheck.indexOf(parent) === -1) {
          this.parentNodeCheck.push(parent);
        } else if (!doCheck && this.checkedNodes.indexOf(parent) !== -1 && this.parentNodeCheck.indexOf(parent) === -1 && count !== 0) {
          this.parentNodeCheck.push(parent);
        }
        this.updateIndeterminate(parent, doCheck);
        if (this.checkedNodes.indexOf(parent) !== -1 && !doCheck) {
          this.checkedNodes.splice(this.checkedNodes.indexOf(parent), 1);
        }
      }
    };
    TreeView2.prototype.updateChildIndeterminate = function(subChild, parent, node, doCheck, child) {
      var count = 0;
      for (var j = 0; j < subChild.length; j++) {
        var subId = subChild[parseInt(j.toString(), 10)][this.fields.id] ? subChild[parseInt(j.toString(), 10)][this.fields.id].toString() : "";
        if (this.checkedNodes.indexOf(subId) !== -1) {
          count++;
        }
        var parentElement = this.element.querySelector('[data-uid="' + parent + '"]');
        var indeterminate = parentElement ? select2("." + INDETERMINATE3, parentElement) : null;
        var check = parentElement ? select2("." + CHECK3, parentElement) : null;
        var element2 = this.element.querySelector('[data-uid="' + subId + '"]');
        var childElementCheck = element2 ? select2("." + CHECK3, element2) : null;
        if (this.checkedNodes.indexOf(node) !== -1 && parentElement && subId === node && this.autoCheck) {
          this.changeState(parentElement, "indeterminate", null);
        } else if (this.checkedNodes.indexOf(node) === -1 && parentElement && !element2 && subId === node && !doCheck) {
          if (this.autoCheck) {
            this.changeState(parentElement, "uncheck", null);
          } else {
            if (count !== 0) {
              this.changeState(parentElement, "indeterminate", null);
            } else {
              this.changeState(parentElement, "uncheck", null);
            }
          }
        } else if (this.checkedNodes.indexOf(node) === -1 && element2 && subId === node && !doCheck) {
          this.changeState(element2, "uncheck", null);
        } else if (this.checkedNodes.indexOf(node) === -1 && indeterminate && subId === node && this.autoCheck && count === 0 && !doCheck) {
          indeterminate.classList.remove(INDETERMINATE3);
        } else if (this.checkedNodes.indexOf(node) === -1 && !element2 && check && subId === node && count === 0) {
          this.changeState(parentElement, "uncheck", null);
        } else if (this.checkedNodes.indexOf(subId) === -1 && element2 && childElementCheck && count === 0) {
          this.changeState(element2, "uncheck", null);
        } else if (!element2 && !parentElement && subId === node || this.parentNodeCheck.indexOf(parent) !== -1 && this.autoCheck) {
          var childElement = this.element.querySelector('[data-uid="' + child + '"]');
          if (doCheck && count !== 0) {
            this.changeState(childElement, "indeterminate", null);
          } else if (doCheck && count === subChild.length && this.checkedNodes.indexOf(parent) === -1) {
            this.checkDisabledState(parent);
          } else if (!doCheck && count === 0 && this.parentNodeCheck.indexOf(parent) !== -1) {
            this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(parent));
          }
          if (this.parentNodeCheck.indexOf(parent) === -1) {
            this.parentNodeCheck.push(parent);
          }
        }
        var innerChild = getValue2(this.fields.child.toString(), subChild[parseInt(j.toString(), 10)]);
        if (innerChild) {
          this.updateChildIndeterminate(innerChild, subId, node, doCheck, child);
        }
      }
    };
    TreeView2.prototype.changeState = function(wrapper, state, e, isPrevent, isAdd, doCheck) {
      var _this = this;
      var eventArgs;
      var currLi = closest2(wrapper, "." + LISTITEM);
      if (!this.checkDisabledChildren && currLi && (currLi.classList.contains(DISABLE) || this.disableNode && this.disableNode.indexOf(currLi.getAttribute("data-uid")) !== -1)) {
        return;
      }
      if (wrapper === currLi) {
        wrapper = select2("." + CHECKBOXWRAP, currLi);
      }
      if (!isPrevent) {
        this.checkActionNodes = [];
        eventArgs = this.getCheckEvent(currLi, state, e);
        this.trigger("nodeChecking", eventArgs, function(observedArgs) {
          if (!observedArgs.cancel) {
            _this.nodeCheckAction(wrapper, state, currLi, observedArgs, e, isPrevent, isAdd, doCheck);
          }
        });
      } else {
        this.nodeCheckAction(wrapper, state, currLi, eventArgs, e, isPrevent, isAdd, doCheck);
      }
    };
    TreeView2.prototype.nodeCheckAction = function(wrapper, state, currLi, eventArgs, e, isPrevent, isAdd, doCheck) {
      var ariaState;
      var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME)[0];
      if (state === "check" && !frameSpan.classList.contains(CHECK3)) {
        frameSpan.classList.remove(INDETERMINATE3);
        frameSpan.classList.add(CHECK3);
        this.addCheck(currLi);
        ariaState = "true";
      } else if (state === "uncheck" && (frameSpan.classList.contains(CHECK3) || frameSpan.classList.contains(INDETERMINATE3))) {
        removeClass2([frameSpan], [CHECK3, INDETERMINATE3]);
        this.removeCheck(currLi);
        ariaState = "false";
      } else if (state === "indeterminate" && this.autoCheck) {
        frameSpan.classList.remove(CHECK3);
        frameSpan.classList.add(INDETERMINATE3);
        this.removeCheck(currLi);
        ariaState = "mixed";
      }
      ariaState = state === "check" ? "true" : state === "uncheck" ? "false" : ariaState;
      if (!isNullOrUndefined2(ariaState)) {
        currLi.setAttribute("aria-checked", ariaState);
      }
      if (isAdd) {
        var data = [].concat([], this.checkActionNodes);
        eventArgs = this.getCheckEvent(currLi, state, e);
        if (isUndefined2(isPrevent)) {
          eventArgs.data = data;
        }
      }
      if (doCheck !== void 0) {
        this.ensureStateChange(currLi, doCheck);
      }
      if (!isPrevent) {
        if (!isNullOrUndefined2(ariaState)) {
          currLi.setAttribute("aria-checked", ariaState);
          eventArgs.data[0].checked = ariaState;
          this.trigger("nodeChecked", eventArgs);
          this.checkActionNodes = [];
        }
      }
    };
    TreeView2.prototype.addCheck = function(liEle) {
      var id = liEle.getAttribute("data-uid");
      if (!isNullOrUndefined2(id) && this.checkedNodes.indexOf(id) === -1) {
        this.checkDisabledState(id);
      }
    };
    TreeView2.prototype.removeCheck = function(liEle) {
      var index = this.checkedNodes.indexOf(liEle.getAttribute("data-uid"));
      if (index > -1) {
        this.checkedNodes.splice(index, 1);
      }
    };
    TreeView2.prototype.getCheckEvent = function(currLi, action, e) {
      this.checkActionNodes.push(this.getNodeData(currLi));
      var nodeData = this.checkActionNodes;
      return {
        action,
        cancel: false,
        isInteracted: isNullOrUndefined2(e) ? false : true,
        node: currLi,
        data: nodeData
      };
    };
    TreeView2.prototype.finalize = function() {
      var firstUl = select2("." + PARENTITEM, this.element);
      if (!isNullOrUndefined2(firstUl)) {
        firstUl.setAttribute("role", treeAriaAttr.treeRole);
        this.setMultiSelect(this.allowMultiSelection);
        this.setNodeFocusable();
        if (this.allowTextWrap) {
          this.updateWrap();
        }
        this.renderReactTemplates();
        this.hasPid = this.rootData[0] ? Object.prototype.hasOwnProperty.call(this.rootData[0], this.fields.parentID) : false;
        this.doExpandAction();
      }
    };
    TreeView2.prototype.setTextWrap = function() {
      (this.allowTextWrap ? addClass2 : removeClass2)([this.element], LISTWRAP);
      if (Browser2.isIE) {
        (this.allowTextWrap ? addClass2 : removeClass2)([this.element], IELISTWRAP);
      }
    };
    TreeView2.prototype.updateWrap = function(ulEle) {
      if (!this.fullRowSelect) {
        return;
      }
      var liEle = ulEle ? selectAll2("." + LISTITEM, ulEle) : this.liList;
      var length = liEle.length;
      for (var i = 0; i < length; i++) {
        this.calculateWrap(liEle[parseInt(i.toString(), 10)]);
      }
    };
    TreeView2.prototype.calculateWrap = function(liEle) {
      var element2 = select2("." + FULLROW, liEle);
      if (element2 && element2.nextElementSibling) {
        element2.style.height = this.allowTextWrap ? element2.nextElementSibling.offsetHeight + "px" : "";
      }
    };
    TreeView2.prototype.doExpandAction = function() {
      var _this = this;
      var eUids = this.expandedNodes;
      if (!this.loadOnDemand && this.fields.dataSource instanceof DataManager) {
        this.isInitalExpand = this.treeData.filter(function(e) {
          return e[_this.fields.expanded] === true;
        }).length > 0 ? true : this.isInitalExpand;
      }
      if (this.isInitalExpand && eUids.length > 0) {
        this.setProperties({
          expandedNodes: []
        }, true);
        if (this.fields.dataSource instanceof DataManager) {
          this.expandGivenNodes(eUids);
        } else {
          for (var i = 0; i < eUids.length; i++) {
            var eNode = select2('[data-uid="' + eUids[parseInt(i.toString(), 10)] + '"]', this.element);
            if (!isNullOrUndefined2(eNode)) {
              var icon = select2("." + EXPANDABLE, select2("." + TEXTWRAP, eNode));
              if (!isNullOrUndefined2(icon)) {
                this.expandAction(eNode, icon, null);
              }
            } else {
              if (eUids[parseInt(i.toString(), 10)] && this.expandChildren.indexOf(eUids[parseInt(i.toString(), 10)]) === -1) {
                this.expandChildren.push(eUids[parseInt(i.toString(), 10)].toString());
              }
              continue;
            }
          }
          this.afterFinalized();
        }
      } else {
        this.afterFinalized();
      }
    };
    TreeView2.prototype.expandGivenNodes = function(arr) {
      var _this = this;
      this.expandCallback(arr[this.index], function() {
        _this.index++;
        if (_this.index < arr.length) {
          _this.expandGivenNodes(arr);
        } else {
          _this.afterFinalized();
        }
      });
      if (this.index > 0) {
        this.index = 0;
      }
    };
    TreeView2.prototype.expandCallback = function(eUid, callback) {
      var eNode = select2('[data-uid="' + eUid + '"]', this.element);
      if (!isNullOrUndefined2(eNode)) {
        var icon = select2("." + EXPANDABLE, select2("." + TEXTWRAP, eNode));
        if (!isNullOrUndefined2(icon)) {
          this.expandAction(eNode, icon, null, false, callback);
        }
        callback();
      } else {
        callback();
      }
    };
    TreeView2.prototype.afterFinalized = function() {
      this.doSelectionAction();
      this.updateCheckedProp();
      this.isAnimate = true;
      this.isInitalExpand = false;
      if ((!this.isLoaded || this.isFieldChange) && !this.isNodeDropped) {
        var eventArgs = {
          data: this.treeData
        };
        this.trigger("dataBound", eventArgs);
      }
      this.isLoaded = true;
      this.isNodeDropped = false;
    };
    TreeView2.prototype.doSelectionAction = function() {
      var sNodes = selectAll2("." + SELECTED3, this.element);
      var sUids = this.selectedNodes;
      if (sUids.length > 0) {
        this.setProperties({
          selectedNodes: []
        }, true);
        for (var i = 0; i < sUids.length; i++) {
          var sNode = select2('[data-uid="' + sUids[parseInt(i.toString(), 10)] + '"]', this.element);
          if (sNode && !sNode.classList.contains("e-active")) {
            this.selectNode(sNode, null, true);
          } else {
            this.selectedNodes.push(sUids[parseInt(i.toString(), 10)]);
          }
          if (!this.allowMultiSelection) {
            break;
          }
        }
      } else {
        this.selectGivenNodes(sNodes);
      }
      removeClass2(sNodes, SELECTED3);
    };
    TreeView2.prototype.selectGivenNodes = function(sNodes) {
      for (var i = 0; i < sNodes.length; i++) {
        if (!sNodes[parseInt(i.toString(), 10)].classList.contains("e-disable")) {
          this.selectNode(sNodes[parseInt(i.toString(), 10)], null, true);
        }
        if (!this.allowMultiSelection) {
          break;
        }
      }
    };
    TreeView2.prototype.clickHandler = function(event2) {
      var target = Browser2.isDevice && event2.originalEvent.changedTouches && !Browser2.isIos ? document.elementFromPoint(event2.originalEvent.changedTouches[0].clientX, event2.originalEvent.changedTouches[0].clientY) : event2.originalEvent.target;
      EventHandler2.remove(this.element, "contextmenu", this.preventContextMenu);
      if (!target || this.dragStartAction) {
        return;
      } else {
        var classList2 = target.classList;
        var li = closest2(target, "." + LISTITEM);
        if (!li || li.classList.contains(PREVENTSELECT) && !(classList2.contains(EXPANDABLE) || classList2.contains(COLLAPSIBLE))) {
          return;
        } else if (event2.originalEvent.which !== 3) {
          var rippleElement = select2("." + RIPPLEELMENT, li);
          var rippleIcons = select2("." + ICON4, li);
          this.removeHover();
          this.setFocusElement(li);
          if (this.showCheckBox && !li.classList.contains("e-disable")) {
            var checkWrapper = closest2(target, "." + CHECKBOXWRAP);
            if (!isNullOrUndefined2(checkWrapper)) {
              var checkElement = select2("." + CHECKBOXFRAME, checkWrapper);
              this.validateCheckNode(checkWrapper, checkElement.classList.contains(CHECK3), li, event2.originalEvent);
              this.triggerClickEvent(event2.originalEvent, li);
              return;
            }
          }
          if (classList2.contains(EXPANDABLE)) {
            this.expandAction(li, target, event2);
          } else if (classList2.contains(COLLAPSIBLE)) {
            this.collapseNode(li, target, event2);
          } else if (rippleElement && rippleIcons) {
            if (rippleIcons.classList.contains(RIPPLE7) && rippleIcons.classList.contains(EXPANDABLE)) {
              this.expandAction(li, rippleIcons, event2);
            } else if (rippleIcons.classList.contains(RIPPLE7) && rippleIcons.classList.contains(COLLAPSIBLE)) {
              this.collapseNode(li, rippleIcons, event2);
            } else if (!classList2.contains(PARENTITEM) && !classList2.contains(LISTITEM)) {
              this.toggleSelect(li, event2.originalEvent, false);
            }
          } else {
            if (!classList2.contains(PARENTITEM) && !classList2.contains(LISTITEM)) {
              this.toggleSelect(li, event2.originalEvent, false);
            }
          }
        }
        if (event2.originalEvent.which === 3) {
          this.isRightClick = true;
        }
        this.triggerClickEvent(event2.originalEvent, li);
      }
    };
    TreeView2.prototype.nodeCheckedEvent = function(wrapper, isCheck, e) {
      var eventArgs = this.getCheckEvent(wrapper, isCheck ? "uncheck" : "check", e);
      eventArgs.data = eventArgs.data.splice(0, eventArgs.data.length - 1);
      this.trigger("nodeChecked", eventArgs);
    };
    TreeView2.prototype.updateOldCheckedData = function(data) {
      var _this = this;
      var dataManager = new DataManager(data);
      var childItems = dataManager.executeLocal(new Query().where("isChecked", "equal", "true", true));
      var uncheckedItems = dataManager.executeLocal(new Query().where("isChecked", "equal", "false", true));
      if (uncheckedItems.length > 0) {
        var index = this.OldCheckedData.findIndex(function(e) {
          return e["id"] === uncheckedItems[0]["id"];
        });
        if (index !== -1) {
          this.OldCheckedData.splice(index, 1);
          var childNodes = this.OldCheckedData.filter(function(e) {
            return e["parentID"] === uncheckedItems[0]["id"];
          });
          if (childNodes.length > 0) {
            childNodes.forEach(function(child) {
              var childIndex = _this.OldCheckedData.findIndex(function(e) {
                return e["id"] === child.id;
              });
              if (childIndex !== -1) {
                _this.OldCheckedData.splice(childIndex, 1);
              }
            });
          }
          return;
        }
      }
      if (childItems.length > 0) {
        var index = this.OldCheckedData.findIndex(function(e) {
          return e["id"] === childItems[0]["id"];
        });
        if (index === -1) {
          this.OldCheckedData.push(childItems[0]);
          return;
        }
      }
    };
    TreeView2.prototype.triggerClickEvent = function(e, li) {
      var eventArgs = {
        event: e,
        node: li
      };
      this.trigger("nodeClicked", eventArgs);
    };
    TreeView2.prototype.expandNode = function(currLi, icon, loaded) {
      var _this = this;
      this.renderReactTemplates();
      if (icon.classList.contains(LOAD)) {
        this.hideSpinner(icon);
      }
      if (!this.initialRender) {
        icon.classList.add("interaction");
      }
      if (loaded !== true || loaded === true && currLi.classList.contains("e-expanded")) {
        if (this.preventExpand !== true) {
          removeClass2([icon], EXPANDABLE);
          addClass2([icon], COLLAPSIBLE);
          var start_1 = 0;
          var end_1 = 0;
          var ul_1 = select2("." + PARENTITEM, currLi);
          var liEle_1 = currLi;
          if (this.isAnimate && !this.isRefreshed) {
            this.setHeight(liEle_1, ul_1);
            var activeElement_1 = select2("." + LISTITEM + "." + ACTIVE3, currLi);
            this.aniObj.animate(ul_1, {
              name: this.animation.expand.effect,
              duration: this.animation.expand.duration === 0 && animationMode2 === "Enable" ? 400 : this.animation.expand.duration,
              timingFunction: this.animation.expand.easing,
              begin: function() {
                liEle_1.style.overflow = "hidden";
                if (!isNullOrUndefined2(activeElement_1) && activeElement_1 instanceof HTMLElement) {
                  activeElement_1.classList.add(ITEM_ANIMATION_ACTIVE);
                }
                start_1 = liEle_1.offsetHeight;
                end_1 = select2("." + TEXTWRAP, currLi).offsetHeight;
              },
              progress: function(args) {
                args.element.style.display = "block";
                _this.animateHeight(args, start_1, end_1);
              },
              end: function(args) {
                args.element.style.display = "block";
                if (!isNullOrUndefined2(activeElement_1) && activeElement_1 instanceof HTMLElement) {
                  activeElement_1.classList.remove(ITEM_ANIMATION_ACTIVE);
                }
                _this.expandedNode(liEle_1, ul_1, icon);
              }
            });
          } else {
            this.expandedNode(liEle_1, ul_1, icon);
          }
        }
      } else {
        var ul = select2("." + PARENTITEM, currLi);
        ul.style.display = "none";
        if (this.fields.dataSource instanceof DataManager === true) {
          this.preventExpand = false;
        }
      }
      if (this.initialRender) {
        icon.classList.add("interaction");
      }
    };
    TreeView2.prototype.expandedNode = function(currLi, ul, icon) {
      ul.style.display = "block";
      currLi.style.display = "block";
      currLi.style.overflow = "";
      currLi.style.height = "";
      removeClass2([icon], PROCESS);
      this.addExpand(currLi);
      if (this.allowTextWrap && this.isLoaded && this.isFirstRender) {
        this.updateWrap(currLi);
        this.isFirstRender = false;
      }
      if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
        this.expandArgs = this.getExpandEvent(currLi, null);
        this.expandArgs.isInteracted = this.isInteracted;
        this.trigger("nodeExpanded", this.expandArgs);
      }
      if (this.isHiddenItem) {
        this.collapseAll([this.getNodeData(currLi).id]);
      }
    };
    TreeView2.prototype.addExpand = function(liEle) {
      liEle.setAttribute("aria-expanded", "true");
      removeClass2([liEle], NODECOLLAPSED);
      var id = liEle.getAttribute("data-uid");
      if (!isNullOrUndefined2(id) && this.expandedNodes.indexOf(id) === -1) {
        this.expandedNodes.push(id);
      }
    };
    TreeView2.prototype.collapseNode = function(currLi, icon, e) {
      var _this = this;
      if (icon.classList.contains(PROCESS)) {
        return;
      } else {
        addClass2([icon], PROCESS);
      }
      var colArgs;
      if (this.isLoaded) {
        colArgs = this.getExpandEvent(currLi, e);
        this.isInteracted = colArgs.isInteracted;
        this.trigger("nodeCollapsing", colArgs, function(observedArgs) {
          if (observedArgs.cancel) {
            removeClass2([icon], PROCESS);
          } else {
            _this.nodeCollapseAction(currLi, icon, observedArgs);
          }
        });
      } else {
        this.nodeCollapseAction(currLi, icon, colArgs);
      }
    };
    TreeView2.prototype.nodeCollapseAction = function(currLi, icon, colArgs) {
      var _this = this;
      removeClass2([icon], COLLAPSIBLE);
      addClass2([icon], EXPANDABLE);
      var start = 0;
      var end = 0;
      var ul = select2("." + PARENTITEM, currLi);
      var liEle = currLi;
      var activeElement = select2("." + LISTITEM + "." + ACTIVE3, currLi);
      if (this.isAnimate) {
        this.aniObj.animate(ul, {
          name: this.animation.collapse.effect,
          duration: this.animation.collapse.duration === 0 && animationMode2 === "Enable" ? 400 : this.animation.collapse.duration,
          timingFunction: this.animation.collapse.easing,
          begin: function() {
            liEle.style.overflow = "hidden";
            if (!isNullOrUndefined2(activeElement) && activeElement instanceof HTMLElement) {
              activeElement.classList.add(ITEM_ANIMATION_ACTIVE);
            }
            start = select2("." + TEXTWRAP, currLi).offsetHeight;
            end = liEle.offsetHeight;
          },
          progress: function(args) {
            _this.animateHeight(args, start, end);
          },
          end: function(args) {
            args.element.style.display = "none";
            if (!isNullOrUndefined2(activeElement) && activeElement instanceof HTMLElement) {
              activeElement.classList.remove(ITEM_ANIMATION_ACTIVE);
            }
            _this.collapsedNode(liEle, ul, icon, colArgs);
          }
        });
      } else {
        this.collapsedNode(liEle, ul, icon, colArgs);
      }
    };
    TreeView2.prototype.collapsedNode = function(liEle, ul, icon, colArgs) {
      ul.style.display = "none";
      liEle.style.overflow = "";
      liEle.style.height = "";
      removeClass2([icon], PROCESS);
      this.removeExpand(liEle);
      if (this.isLoaded) {
        colArgs = this.getExpandEvent(liEle, null);
        colArgs.isInteracted = this.isInteracted;
        this.trigger("nodeCollapsed", colArgs);
      }
    };
    TreeView2.prototype.removeExpand = function(liEle, toRemove) {
      if (toRemove) {
        liEle.removeAttribute("aria-expanded");
      } else {
        this.disableExpandAttr(liEle);
      }
      var index = this.expandedNodes.indexOf(liEle.getAttribute("data-uid"));
      if (index > -1) {
        this.expandedNodes.splice(index, 1);
      }
    };
    TreeView2.prototype.disableExpandAttr = function(liEle) {
      liEle.setAttribute("aria-expanded", "false");
      addClass2([liEle], NODECOLLAPSED);
    };
    TreeView2.prototype.setHeight = function(currLi, ul) {
      ul.style.display = "block";
      ul.style.visibility = "hidden";
      currLi.style.height = currLi.offsetHeight + "px";
      ul.style.display = "none";
      ul.style.visibility = "";
    };
    TreeView2.prototype.animateHeight = function(args, start, end) {
      var remaining = (args.duration - args.timeStamp) / args.duration;
      var currentHeight = (end - start) * remaining + start;
      args.element.parentElement.style.height = currentHeight + "px";
    };
    TreeView2.prototype.renderChildNodes = function(parentLi, expandChild, callback, loaded, isFromExpandAll) {
      var _this = this;
      var eicon = select2("div." + ICON4, parentLi);
      if (isNullOrUndefined2(eicon)) {
        return;
      }
      this.showSpinner(eicon);
      var childItems;
      if (this.fields.dataSource instanceof DataManager) {
        var level = this.parents(parentLi, "." + PARENTITEM).length;
        var mapper_2 = this.getChildFields(this.fields, level, 1);
        if (isNullOrUndefined2(mapper_2) || isNullOrUndefined2(mapper_2.dataSource)) {
          detach2(eicon);
          this.removeExpand(parentLi, true);
          return;
        }
        this.treeList.push("false");
        if (this.fields.dataSource instanceof DataManager && this.isOffline) {
          this.treeList.pop();
          childItems = this.getChildNodes(this.treeData, parentLi.getAttribute("data-uid"));
          this.loadChild(childItems, mapper_2, eicon, parentLi, expandChild, callback, loaded);
        } else {
          mapper_2.dataSource.executeQuery(this.getQuery(mapper_2, parentLi.getAttribute("data-uid"))).then(function(e) {
            _this.treeList.pop();
            childItems = e.result;
            if (_this.dataType === 1) {
              _this.dataType = 2;
            }
            _this.loadChild(childItems, mapper_2, eicon, parentLi, expandChild, callback, loaded);
          }).catch(function(e) {
            _this.trigger("actionFailure", {
              error: e
            });
          });
        }
      } else {
        childItems = this.getChildNodes(this.treeData, parentLi.getAttribute("data-uid"), false, parseFloat(parentLi.getAttribute("aria-level")) + 1);
        this.currentLoadData = this.getSortedData(childItems);
        if (isNullOrUndefined2(childItems) || childItems.length === 0) {
          detach2(eicon);
          if (eicon.classList.contains(LOAD)) {
            this.hideSpinner(eicon);
          }
          this.removeExpand(parentLi, true);
          return;
        } else {
          this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute("aria-level")) + 1;
          parentLi.appendChild(ListBase.createList(this.createElement, this.currentLoadData, this.listBaseOption));
          this.expandNode(parentLi, eicon, loaded);
          this.setSelectionForChildNodes(childItems);
          this.ensureCheckNode(parentLi, isFromExpandAll);
          this.finalizeNode(parentLi, isFromExpandAll, expandChild);
          this.disableTreeNodes(childItems);
          this.renderSubChild(parentLi, expandChild, loaded, isFromExpandAll);
        }
      }
    };
    TreeView2.prototype.loadChild = function(childItems, mapper5, eicon, parentLi, expandChild, callback, loaded) {
      this.currentLoadData = childItems;
      if (isNullOrUndefined2(childItems) || childItems.length === 0) {
        detach2(eicon);
        this.removeExpand(parentLi, true);
      } else {
        this.updateListProp(mapper5);
        if (this.fields.dataSource instanceof DataManager && !this.isOffline) {
          var id = parentLi.getAttribute("data-uid");
          var nodeData = this.getNodeObject(id);
          setValue3("child", childItems, nodeData);
        }
        this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute("aria-level")) + 1;
        parentLi.appendChild(ListBase.createList(this.createElement, childItems, this.listBaseOption));
        this.expandNode(parentLi, eicon, loaded);
        this.setSelectionForChildNodes(childItems);
        this.ensureCheckNode(parentLi);
        this.finalizeNode(parentLi);
        this.disableTreeNodes(childItems);
        this.renderSubChild(parentLi, expandChild, loaded);
      }
      if (callback) {
        callback();
      }
      if (expandChild) {
        this.expandedNodes.push(parentLi.getAttribute("data-uid"));
      }
      if (this.treeList.length === 0 && !this.isLoaded) {
        this.finalize();
      }
    };
    TreeView2.prototype.disableTreeNodes = function(childItems) {
      if (isNullOrUndefined2(this.disableNode) || this.disableNode.length === 0) {
        return;
      }
      var i = 0;
      while (i < childItems.length) {
        var id = childItems[parseInt(i.toString(), 10)][this.fields.id] ? childItems[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
        if (this.disableNode !== void 0 && this.disableNode.indexOf(id) !== -1) {
          this.doDisableAction([id]);
        }
        i++;
      }
    };
    TreeView2.prototype.setSelectionForChildNodes = function(nodes) {
      if (isNullOrUndefined2(this.selectedNodes) || this.selectedNodes.length === 0) {
        return;
      }
      var i;
      for (i = 0; i < nodes.length; i++) {
        var id = nodes[parseInt(i.toString(), 10)][this.fields.id] ? nodes[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
        if (this.selectedNodes !== void 0 && this.selectedNodes.indexOf(id) !== -1) {
          this.doSelectionAction();
        }
      }
    };
    TreeView2.prototype.ensureCheckNode = function(element2, isFromExpandAll) {
      if (this.showCheckBox) {
        this.ele = this.checkedElement ? this.checkedElement.indexOf(element2.getAttribute("data-uid")) : null;
        if (this.autoCheck) {
          this.ensureChildCheckState(element2, null, isFromExpandAll);
          if (isFromExpandAll ? select2("." + CHECK3, this.element) || select2("." + INDETERMINATE3, this.element) : true) {
            this.ensureParentCheckState(element2);
          }
        }
      }
      this.currentLoadData = null;
    };
    TreeView2.prototype.getFields = function(mapper5, nodeLevel, dataLevel) {
      if (nodeLevel === dataLevel) {
        return mapper5;
      } else {
        return this.getFields(this.getChildMapper(mapper5), nodeLevel, dataLevel + 1);
      }
    };
    TreeView2.prototype.getChildFields = function(mapper5, nodeLevel, dataLevel) {
      if (nodeLevel === dataLevel) {
        return this.getChildMapper(mapper5);
      } else {
        return this.getChildFields(this.getChildMapper(mapper5), nodeLevel, dataLevel + 1);
      }
    };
    TreeView2.prototype.getChildMapper = function(mapper5) {
      return typeof mapper5.child === "string" || isNullOrUndefined2(mapper5.child) ? mapper5 : mapper5.child;
    };
    TreeView2.prototype.getChildNodes = function(obj, parentId, isRoot, level) {
      var _this = this;
      if (isRoot === void 0) {
        isRoot = false;
      }
      var childNodes;
      if (isNullOrUndefined2(obj)) {
        return childNodes;
      }
      if (this.dataType === 1) {
        return this.getChildGroup(this.groupedData, parentId, isRoot);
      }
      if (typeof this.fields.child === "string") {
        return this.findChildNodes(obj, this.fields.id, parentId) || this.findNestedChildNodes(obj, parentId, level) || [];
      }
      if (this.isChildObject()) {
        var tempField = !isNullOrUndefined2(level) ? this.fields : this.fields.child;
        var i = 1;
        while (i < level) {
          if (!isNullOrUndefined2(tempField.child)) {
            tempField = tempField.child;
          } else {
            break;
          }
          i++;
        }
        this.updateListProp(tempField);
        var index = obj.findIndex(function(data) {
          return getValue2(_this.fields.id, data) && getValue2(_this.fields.id, data).toString() === parentId;
        });
        if (index !== -1) {
          return getValue2("child", obj[parseInt(index.toString(), 10)]);
        }
        if (index === -1) {
          for (var i_1 = 0, objlen = obj.length; i_1 < objlen; i_1++) {
            var tempArray = getValue2("child", obj[parseInt(i_1.toString(), 10)]);
            var childIndex = !isNullOrUndefined2(tempArray) ? tempArray.findIndex(function(data) {
              return getValue2(_this.fields.child.id, data) && getValue2(_this.fields.child.id, data).toString() === parentId;
            }) : -1;
            if (childIndex !== -1) {
              return getValue2("child", tempArray[parseInt(childIndex.toString(), 10)]);
            } else if (!isNullOrUndefined2(tempArray)) {
              childNodes = this.getChildNodes(tempArray, parentId, false, level);
              if (childNodes !== void 0) {
                break;
              }
            }
          }
        }
      }
      return childNodes;
    };
    TreeView2.prototype.findChildNodes = function(items, idField, parentId) {
      var index = items.findIndex(function(data) {
        var value = getValue2(idField, data);
        return value && value.toString() === parentId;
      });
      if (index !== -1) {
        return getValue2(this.fields.child, items[index]);
      }
      return null;
    };
    TreeView2.prototype.findNestedChildNodes = function(items, parentId, level) {
      for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
        var item = items_1[_i];
        var tempArray = getValue2(this.fields.child, item);
        if (!isNullOrUndefined2(tempArray)) {
          var childNodes = this.findChildNodes(tempArray, this.fields.id, parentId);
          if (childNodes) {
            return childNodes;
          }
          var nestedChildNodes = this.getChildNodes(tempArray, parentId, false, level);
          if (nestedChildNodes && nestedChildNodes.length > 0) {
            return nestedChildNodes;
          }
        }
      }
      return void 0;
    };
    TreeView2.prototype.getChildGroup = function(data, parentId, isRoot) {
      var childNodes;
      if (isNullOrUndefined2(data)) {
        return childNodes;
      }
      for (var i = 0, objlen = data.length; i < objlen; i++) {
        if (!isNullOrUndefined2(data[parseInt(i.toString(), 10)][0]) && !isNullOrUndefined2(getValue2(this.fields.parentID, data[parseInt(i.toString(), 10)][0]))) {
          if (getValue2(this.fields.parentID, data[parseInt(i.toString(), 10)][0]).toString() === parentId) {
            return data[parseInt(i.toString(), 10)];
          }
        } else if (isRoot) {
          return data[parseInt(i.toString(), 10)];
        } else {
          return [];
        }
      }
      return childNodes;
    };
    TreeView2.prototype.renderSubChild = function(element2, expandChild, loaded, isFromExpandAll) {
      if (expandChild) {
        var cIcons = selectAll2("." + EXPANDABLE, element2);
        for (var i = 0, len = cIcons.length; i < len; i++) {
          var icon = cIcons[parseInt(i.toString(), 10)];
          if (element2.querySelector(".e-icons") !== cIcons[parseInt(i.toString(), 10)]) {
            var curLi = closest2(icon, "." + LISTITEM);
            this.expandArgs = this.getExpandEvent(curLi, null);
            if (loaded !== true) {
              this.trigger("nodeExpanding", this.expandArgs);
            }
            this.renderChildNodes(curLi, expandChild, null, loaded, isFromExpandAll);
          }
        }
      }
    };
    TreeView2.prototype.toggleSelect = function(li, e, multiSelect) {
      if (!li.classList.contains("e-disable")) {
        if (this.allowMultiSelection && (e && e.ctrlKey || multiSelect) && this.isActive(li)) {
          this.unselectNode(li, e);
        } else {
          this.selectNode(li, e, multiSelect);
        }
      }
    };
    TreeView2.prototype.isActive = function(li) {
      return li.classList.contains(ACTIVE3) ? true : false;
    };
    TreeView2.prototype.selectNode = function(li, e, multiSelect) {
      var _this = this;
      if (isNullOrUndefined2(li) || !this.allowMultiSelection && this.isActive(li) && !isNullOrUndefined2(e)) {
        this.setFocusElement(li);
        return;
      }
      var eventArgs;
      if (this.isLoaded) {
        eventArgs = this.getSelectEvent(li, "select", e);
        this.trigger("nodeSelecting", eventArgs, function(observedArgs) {
          if (!observedArgs.cancel && !observedArgs.node.classList.contains(PREVENTSELECT)) {
            _this.nodeSelectAction(li, e, observedArgs, multiSelect);
          }
        });
      } else {
        this.nodeSelectAction(li, e, eventArgs, multiSelect);
      }
    };
    TreeView2.prototype.nodeSelectAction = function(li, e, eventArgs, multiSelect) {
      if (!this.allowMultiSelection || !multiSelect && (!e || e && !(e.ctrlKey || e.metaKey))) {
        this.removeSelectAll();
      }
      if (this.allowMultiSelection && e && e.shiftKey) {
        if (!this.startNode) {
          this.startNode = li;
        }
        var startIndex = this.liList.indexOf(this.startNode);
        var endIndex = this.liList.indexOf(li);
        if (startIndex > endIndex) {
          var temp = startIndex;
          startIndex = endIndex;
          endIndex = temp;
        }
        for (var i = startIndex; i <= endIndex; i++) {
          var currNode = this.liList[parseInt(i.toString(), 10)];
          if (isVisible2(currNode) && !currNode.classList.contains("e-disable")) {
            this.addSelect(currNode);
          }
        }
      } else {
        this.startNode = li;
        this.addSelect(li);
      }
      if (this.isLoaded) {
        eventArgs.nodeData = this.getNodeData(li);
        this.trigger("nodeSelected", eventArgs);
        this.isRightClick = false;
      }
      this.isRightClick = false;
    };
    TreeView2.prototype.unselectNode = function(li, e) {
      var _this = this;
      var eventArgs;
      if (this.isLoaded) {
        eventArgs = this.getSelectEvent(li, "un-select", e);
        this.trigger("nodeSelecting", eventArgs, function(observedArgs) {
          if (!observedArgs.cancel) {
            _this.nodeUnselectAction(li, observedArgs);
          }
        });
      } else {
        this.nodeUnselectAction(li, eventArgs);
      }
    };
    TreeView2.prototype.nodeUnselectAction = function(li, eventArgs) {
      this.removeSelect(li);
      this.setFocusElement(li);
      if (this.isLoaded) {
        eventArgs.nodeData = this.getNodeData(li);
        this.trigger("nodeSelected", eventArgs);
      }
    };
    TreeView2.prototype.setFocusElement = function(li) {
      if (!isNullOrUndefined2(li)) {
        var focusedNode = this.getFocusedNode();
        if (focusedNode) {
          removeClass2([focusedNode], FOCUS);
          focusedNode.setAttribute("tabindex", "-1");
        }
        addClass2([li], FOCUS);
        li.setAttribute("tabindex", "0");
        EventHandler2.add(li, "blur", this.focusOut, this);
        this.updateIdAttr(focusedNode, li);
      }
    };
    TreeView2.prototype.addSelect = function(liEle) {
      liEle.setAttribute("aria-selected", "true");
      addClass2([liEle], ACTIVE3);
      var id = liEle.getAttribute("data-uid");
      if (!isNullOrUndefined2(id) && this.selectedNodes.indexOf(id) === -1) {
        this.selectedNodes.push(id);
      }
    };
    TreeView2.prototype.removeSelect = function(liEle) {
      if (this.allowMultiSelection) {
        liEle.setAttribute("aria-selected", "false");
      } else {
        liEle.removeAttribute("aria-selected");
      }
      removeClass2([liEle], ACTIVE3);
      var index = this.selectedNodes.indexOf(liEle.getAttribute("data-uid"));
      if (index > -1) {
        this.selectedNodes.splice(index, 1);
      }
    };
    TreeView2.prototype.removeSelectAll = function() {
      var selectedLI = this.element.querySelectorAll("." + ACTIVE3);
      for (var _i = 0, selectedLI_1 = selectedLI; _i < selectedLI_1.length; _i++) {
        var ele = selectedLI_1[_i];
        if (this.allowMultiSelection) {
          ele.setAttribute("aria-selected", "false");
        } else {
          ele.removeAttribute("aria-selected");
        }
      }
      removeClass2(selectedLI, ACTIVE3);
      this.setProperties({
        selectedNodes: []
      }, true);
    };
    TreeView2.prototype.getSelectEvent = function(currLi, action, e) {
      var nodeData = this.getNodeData(currLi);
      return {
        action,
        cancel: false,
        isInteracted: isNullOrUndefined2(e) ? false : true,
        node: currLi,
        nodeData
      };
    };
    TreeView2.prototype.setExpandOnType = function() {
      this.expandOnType = this.expandOn === "Auto" ? Browser2.isDevice ? "Click" : "DblClick" : this.expandOn;
    };
    TreeView2.prototype.expandHandler = function(e) {
      var target = Browser2.isDevice && e.originalEvent.changedTouches && !Browser2.isIos ? document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY) : e.originalEvent.target;
      if (!target || target.classList.contains(INPUT2) || target.classList.contains(ROOT6) || target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) || target.classList.contains(ICON4) || this.showCheckBox && closest2(target, "." + CHECKBOXWRAP)) {
        return;
      } else {
        this.expandCollapseAction(closest2(target, "." + LISTITEM), e);
      }
    };
    TreeView2.prototype.expandCollapseAction = function(currLi, e) {
      var icon = select2("div." + ICON4, currLi);
      if (!icon || icon.classList.contains(PROCESS)) {
        return;
      } else {
        var classList2 = icon.classList;
        if (classList2.contains(EXPANDABLE)) {
          this.expandAction(currLi, icon, e);
        } else if (classList2.contains(COLLAPSIBLE)) {
          this.collapseNode(currLi, icon, e);
        }
      }
    };
    TreeView2.prototype.expandAction = function(currLi, icon, e, expandChild, callback, isFromExpandAll) {
      var _this = this;
      if (icon.classList.contains(PROCESS)) {
        return;
      } else {
        addClass2([icon], PROCESS);
      }
      if (this.isLoaded && !this.isRefreshed) {
        this.expandArgs = this.getExpandEvent(currLi, e);
        this.isInteracted = this.expandArgs.isInteracted;
        this.trigger("nodeExpanding", this.expandArgs, function(observedArgs) {
          if (observedArgs.cancel) {
            removeClass2([icon], PROCESS);
          } else {
            _this.nodeExpandAction(currLi, icon, expandChild, callback, isFromExpandAll);
          }
        });
      } else {
        this.nodeExpandAction(currLi, icon, expandChild, callback, isFromExpandAll);
      }
    };
    TreeView2.prototype.nodeExpandAction = function(currLi, icon, expandChild, callback, isFromExpandAll) {
      var ul = select2("." + PARENTITEM, currLi);
      if (ul && ul.nodeName === "UL") {
        this.expandNode(currLi, icon);
      } else {
        this.isFirstRender = true;
        this.renderChildNodes(currLi, expandChild, callback, null, isFromExpandAll);
        var liEles = selectAll2("." + LISTITEM, currLi);
        for (var i = 0; i < liEles.length; i++) {
          var id = this.getId(liEles[parseInt(i.toString(), 10)]);
          if (this.expandChildren.indexOf(id) !== -1 && this.expandChildren !== void 0) {
            var icon_1 = select2("." + EXPANDABLE, select2("." + TEXTWRAP, liEles[parseInt(i.toString(), 10)]));
            if (!isNullOrUndefined2(icon_1)) {
              this.expandAction(liEles[parseInt(i.toString(), 10)], icon_1, null);
            }
            this.expandChildren.splice(this.expandChildren.indexOf(id), 1);
          }
        }
      }
    };
    TreeView2.prototype.keyActionHandler = function(e) {
      var _this = this;
      var target = e.target;
      var focusedNode = this.getFocusedNode();
      if (target && target.classList.contains(INPUT2)) {
        var inpEle = target;
        if (e.action === "enter") {
          inpEle.blur();
        } else if (e.action === "escape") {
          inpEle.value = this.oldText;
          inpEle.blur();
        }
        return;
      }
      e.preventDefault();
      var eventArgs = {
        cancel: false,
        event: e,
        node: focusedNode
      };
      this.trigger("keyPress", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          switch (e.action) {
            case "space":
              if (_this.showCheckBox) {
                _this.checkNode(e);
              } else {
                _this.toggleSelect(focusedNode, e);
              }
              break;
            case "moveRight":
              _this.openNode(_this.enableRtl ? false : true, e);
              break;
            case "moveLeft":
              _this.openNode(_this.enableRtl ? true : false, e);
              break;
            case "shiftDown":
              _this.shiftKeySelect(true, e);
              break;
            case "moveDown":
            case "ctrlDown":
            case "csDown":
              _this.navigateNode(true);
              break;
            case "shiftUp":
              _this.shiftKeySelect(false, e);
              break;
            case "moveUp":
            case "ctrlUp":
            case "csUp":
              _this.navigateNode(false);
              break;
            case "home":
            case "shiftHome":
            case "ctrlHome":
            case "csHome":
              _this.navigateRootNode(true);
              break;
            case "end":
            case "shiftEnd":
            case "ctrlEnd":
            case "csEnd":
              _this.navigateRootNode(false);
              break;
            case "enter":
            case "ctrlEnter":
            case "shiftEnter":
            case "csEnter":
            case "shiftSpace":
            case "ctrlSpace":
              _this.toggleSelect(focusedNode, e);
              break;
            case "f2":
              if (_this.allowEditing && !focusedNode.classList.contains("e-disable")) {
                _this.createTextbox(focusedNode);
              }
              break;
            case "ctrlA":
              if (_this.allowMultiSelection) {
                var sNodes = selectAll2("." + LISTITEM + ":not(." + ACTIVE3 + ")", _this.element);
                _this.selectGivenNodes(sNodes);
              }
              break;
          }
        }
      });
    };
    TreeView2.prototype.navigateToFocus = function(isUp) {
      var focusNode = this.getFocusedNode().querySelector("." + TEXTWRAP);
      var pos = focusNode.getBoundingClientRect();
      var parent = this.getScrollParent(this.element);
      if (!isNullOrUndefined2(parent)) {
        var parentPos = parent.getBoundingClientRect();
        if (pos.bottom > parentPos.bottom) {
          parent.scrollTop += pos.bottom - parentPos.bottom;
        } else if (pos.top < parentPos.top) {
          parent.scrollTop -= parentPos.top - pos.top;
        }
      }
      var isVisible4 = this.isVisibleInViewport(focusNode);
      if (!isVisible4) {
        focusNode.scrollIntoView(isUp);
      }
    };
    TreeView2.prototype.isVisibleInViewport = function(txtWrap) {
      var pos = txtWrap.getBoundingClientRect();
      return pos.top >= 0 && pos.left >= 0 && pos.bottom <= (window.innerHeight || document.documentElement.clientHeight) && pos.right <= (window.innerWidth || document.documentElement.clientWidth);
    };
    TreeView2.prototype.getScrollParent = function(node) {
      if (isNullOrUndefined2(node)) {
        return null;
      }
      return node.scrollHeight > node.clientHeight ? node : this.getScrollParent(node.parentElement);
    };
    TreeView2.prototype.shiftKeySelect = function(isTowards, e) {
      if (this.allowMultiSelection) {
        var focusedNode = this.getFocusedNode();
        var nextNode = isTowards ? this.getNextNode(focusedNode) : this.getPrevNode(focusedNode);
        this.removeHover();
        this.setFocusElement(nextNode);
        this.toggleSelect(nextNode, e, false);
        this.navigateToFocus(!isTowards);
      } else {
        this.navigateNode(isTowards);
      }
    };
    TreeView2.prototype.checkNode = function(e) {
      var focusedNode = this.getFocusedNode();
      var checkWrap = select2("." + CHECKBOXWRAP, focusedNode);
      var isChecked = select2(" ." + CHECKBOXFRAME, checkWrap).classList.contains(CHECK3);
      if (!focusedNode.classList.contains("e-disable")) {
        if (focusedNode.getElementsByClassName("e-checkbox-disabled").length === 0) {
          this.validateCheckNode(checkWrap, isChecked, focusedNode, e);
        }
      }
    };
    TreeView2.prototype.validateCheckNode = function(checkWrap, isCheck, li, e) {
      var _this = this;
      var currLi = closest2(checkWrap, "." + LISTITEM);
      this.checkActionNodes = [];
      var ariaState = !isCheck ? "true" : "false";
      if (!isNullOrUndefined2(ariaState)) {
        currLi.setAttribute("aria-checked", ariaState);
      }
      var eventArgs = this.getCheckEvent(currLi, isCheck ? "uncheck" : "check", e);
      this.trigger("nodeChecking", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          _this.nodeCheckingAction(checkWrap, isCheck, li, observedArgs, e);
        }
      });
    };
    TreeView2.prototype.nodeCheckingAction = function(checkWrap, isCheck, li, eventArgs, e) {
      if (this.checkedElement.indexOf(li.getAttribute("data-uid")) === -1) {
        this.checkedElement.push(li.getAttribute("data-uid"));
        if (this.autoCheck) {
          var child = this.getChildNodes(this.treeData, li.getAttribute("data-uid"));
          if (child !== null) {
            this.allCheckNode(child, this.checkedElement, null, null, false);
          } else {
            child = null;
          }
        }
      }
      this.changeState(checkWrap, isCheck ? "uncheck" : "check", e, true);
      if (this.autoCheck) {
        this.ensureChildCheckState(li);
        this.updateOldCheckedData([this.getNodeData(li)]);
        this.ensureParentCheckState(closest2(closest2(li, "." + PARENTITEM), "." + LISTITEM));
        var doCheck = void 0;
        if (eventArgs.action === "check") {
          doCheck = true;
        } else if (eventArgs.action === "uncheck") {
          doCheck = false;
        }
        this.ensureStateChange(li, doCheck);
      }
      this.nodeCheckedEvent(checkWrap, isCheck, e);
    };
    TreeView2.prototype.ensureStateChange = function(li, doCheck) {
      var _this = this;
      var childElement = select2("." + PARENTITEM, li);
      var parentIndex = li.getAttribute("data-uid");
      var mapper5 = this.fields;
      if (this.dataType === 1 && this.autoCheck) {
        var resultData = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.parentID, "equal", parentIndex, true));
        var childMatchesCheckedNodes = resultData.filter(function(item) {
          return _this.checkedNodes.indexOf(item[mapper5.id].toString()) !== -1;
        }, this);
        if (this.checkedNodes.indexOf(parentIndex) !== -1 && childMatchesCheckedNodes.length !== resultData.length && this.isFilter) {
          if (childMatchesCheckedNodes.length > 0) {
            resultData = childMatchesCheckedNodes;
          }
        }
        for (var i = 0; i < resultData.length; i++) {
          var resultId = resultData[parseInt(i.toString(), 10)][this.fields.id] ? resultData[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
          var isCheck = resultData[parseInt(i.toString(), 10)][this.fields.isChecked] ? resultData[parseInt(i.toString(), 10)][this.fields.isChecked].toString() : null;
          if (this.checkedNodes.indexOf(parentIndex) !== -1 && this.checkedNodes.indexOf(resultId) === -1) {
            this.checkDisabledState(resultId, resultData[i]);
            var childItems = this.getChildNodes(this.treeData, resultId);
            this.getChildItems(childItems, doCheck);
            if (this.parentNodeCheck.indexOf(resultId) !== -1) {
              this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(resultId), 1);
            }
          } else if (this.checkedNodes.indexOf(parentIndex) === -1 && childElement === null && this.checkedNodes.indexOf(resultId) !== -1) {
            this.checkedNodes.splice(this.checkedNodes.indexOf(resultId), 1);
            if (isCheck === "true") {
              this.updateField(this.treeData, this.fields, resultId, "isChecked", null);
            }
            if (this.checkedNodes.indexOf(parentIndex) === -1 && childElement === null || this.parentNodeCheck.indexOf(resultId) !== -1) {
              var childNodes = this.getChildNodes(this.treeData, resultId);
              this.getChildItems(childNodes, doCheck);
              if (this.parentNodeCheck.indexOf(resultId) !== -1) {
                this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(resultId), 1);
              }
            }
          } else {
            var childItems = this.getChildNodes(this.treeData, resultId);
            this.getChildItems(childItems, doCheck);
          }
        }
      } else if (this.dataType === 1 && !this.autoCheck) {
        if (!doCheck) {
          var checkedData = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.isChecked, "equal", true, false));
          for (var i = 0; i < checkedData.length; i++) {
            var id = checkedData[parseInt(i.toString(), 10)][this.fields.id] ? checkedData[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
            if (this.checkedNodes.indexOf(id) !== -1) {
              this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
            }
            this.updateField(this.treeData, this.fields, id, "isChecked", null);
          }
          this.checkedNodes = [];
        } else {
          for (var i = 0; i < this.treeData.length; i++) {
            var checkedId = this.treeData[parseInt(i.toString(), 10)][this.fields.id] ? this.treeData[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
            if (this.checkedNodes.indexOf(checkedId) === -1) {
              this.checkDisabledState(checkedId, this.treeData[i]);
            }
          }
        }
      } else {
        var childItems = this.getChildNodes(this.treeData, parentIndex);
        if (childItems) {
          var filteredChildItems = childItems.filter(function(item) {
            var itemValue = String(item[Object.keys(item)[0]]);
            return _this.checkedNodes.indexOf(itemValue) !== -1;
          });
          if (filteredChildItems.length > 0 && childItems.length && this.isFilter) {
            childItems = filteredChildItems;
          }
          this.childStateChange(childItems, parentIndex, childElement, doCheck);
        }
      }
    };
    TreeView2.prototype.checkDisabledState = function(resultId, currentItem) {
      var requiresUpdate = this.checkDisabledChildren;
      if (!requiresUpdate) {
        var shouldPreventUpdate = true;
        if (this.loadOnDemand && this.fields.htmlAttributes) {
          currentItem = isNullOrUndefined2(currentItem) ? currentItem : this.getNodeObject(resultId);
          if (!isNullOrUndefined2(currentItem)) {
            var htmlAttributes = currentItem[this.fields.htmlAttributes];
            if (htmlAttributes && !isNullOrUndefined2(htmlAttributes.class) && htmlAttributes.class.indexOf(DISABLE) !== -1) {
              shouldPreventUpdate = false;
            }
          }
        }
        var liElement = select2('[data-uid="' + resultId + '"]', this.element);
        requiresUpdate = liElement ? !liElement.classList.contains(DISABLE) : this.disableNode.indexOf(resultId) === -1 && shouldPreventUpdate;
      }
      if (requiresUpdate) {
        this.checkedNodes.push(resultId);
      }
    };
    TreeView2.prototype.getChildItems = function(childItems, doCheck) {
      for (var i = 0; i < childItems.length; i++) {
        var childId = childItems[parseInt(i.toString(), 10)][this.fields.id] ? childItems[parseInt(i.toString(), 10)][this.fields.id].toString() : null;
        var childIsCheck = childItems[parseInt(i.toString(), 10)][this.fields.isChecked] ? childItems[parseInt(i.toString(), 10)][this.fields.isChecked].toString() : null;
        if (this.checkedNodes.indexOf(childId) !== -1 && !doCheck) {
          this.checkedNodes.splice(this.checkedNodes.indexOf(childId), 1);
        }
        if (this.checkedNodes.indexOf(childId) === -1 && doCheck) {
          this.checkDisabledState(childId, childItems[i]);
        }
        if (childIsCheck === "true" && !doCheck) {
          this.updateField(this.treeData, this.fields, childId, "isChecked", null);
        }
        var subChildItems = this.getChildNodes(this.treeData, childId);
        if (subChildItems.length > 0) {
          this.getChildItems(subChildItems, doCheck);
        }
      }
    };
    TreeView2.prototype.childStateChange = function(childItems, parent, childElement, doCheck) {
      for (var i = 0; i < childItems.length; i++) {
        var checkedChild = childItems[parseInt(i.toString(), 10)][this.fields.id] ? childItems[parseInt(i.toString(), 10)][this.fields.id].toString() : "";
        var isCheck = childItems[parseInt(i.toString(), 10)][this.fields.isChecked] ? childItems[parseInt(i.toString(), 10)][this.fields.isChecked].toString() : null;
        if (this.autoCheck) {
          if (this.checkedNodes.indexOf(parent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1) {
            this.checkDisabledState(checkedChild, childItems[i]);
            if (this.parentNodeCheck.indexOf(checkedChild) !== -1) {
              this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(checkedChild), 1);
            }
          } else if (this.checkedNodes.indexOf(parent) === -1 && this.checkedNodes.indexOf(checkedChild) !== -1 && !doCheck) {
            this.checkedNodes.splice(this.checkedNodes.indexOf(checkedChild), 1);
            if (isCheck === "true") {
              this.updateField(this.treeData, this.fields, checkedChild, "isChecked", null);
            }
          }
        } else if (!this.autoCheck) {
          if (!doCheck) {
            if (this.checkedNodes.indexOf(checkedChild) !== -1) {
              this.checkedNodes.splice(this.checkedNodes.indexOf(checkedChild), 1);
            }
            this.updateField(this.treeData, this.fields, checkedChild, "isChecked", null);
            this.checkedNodes = [];
          } else {
            if (this.checkedNodes.indexOf(checkedChild) === -1) {
              this.checkDisabledState(checkedChild, childItems[i]);
            }
          }
        }
        var subChild = this.getChildNodes([childItems[parseInt(i.toString(), 10)]], checkedChild);
        if (subChild) {
          this.childStateChange(subChild, parent, childElement, doCheck);
        }
      }
    };
    TreeView2.prototype.allCheckNode = function(child, newCheck, checked, childCheck, validateCheck) {
      if (child) {
        for (var length_1 = 0; length_1 < child.length; length_1++) {
          var childId = getValue2(this.fields.id, child[parseInt(length_1.toString(), 10)]);
          var check = this.element.querySelector('[data-uid="' + childId + '"]');
          if (validateCheck !== false && this.checkedElement.indexOf(childId.toString()) === -1) {
            if (check === null && !isNullOrUndefined2(child[parseInt(length_1.toString(), 10)][this.fields.isChecked]) && newCheck.indexOf(childId.toString()) === -1 || childCheck === 0 || checked === 2) {
              if (child[parseInt(length_1.toString(), 10)][this.fields.isChecked] !== false || checked === 2) {
                newCheck.push(childId.toString());
              } else {
                childCheck = null;
              }
              childCheck = child[parseInt(length_1.toString(), 10)][this.fields.isChecked] !== false || checked === 2 ? 0 : null;
            }
          }
          if (newCheck.indexOf(childId.toString()) === -1 && isNullOrUndefined2(checked)) {
            newCheck.push(childId.toString());
          }
          var hierChildId = getValue2(this.fields.child.toString(), child[parseInt(length_1.toString(), 10)]);
          if (getValue2(this.fields.hasChildren, child[parseInt(length_1.toString(), 10)]) === true || hierChildId) {
            var id = getValue2(this.fields.id, child[parseInt(length_1.toString(), 10)]);
            var childId_1 = void 0;
            if (this.dataType === 1) {
              childId_1 = this.getChildNodes(this.treeData, id.toString());
            } else {
              childId_1 = hierChildId;
            }
            if (childId_1) {
              if (isNullOrUndefined2(validateCheck)) {
                this.allCheckNode(childId_1, newCheck, checked, childCheck);
              } else {
                this.allCheckNode(childId_1, newCheck, checked, childCheck, validateCheck);
              }
              childCheck = null;
            }
          }
          childCheck = null;
        }
      }
    };
    TreeView2.prototype.openNode = function(toBeOpened, e) {
      var focusedNode = this.getFocusedNode();
      var icon = select2("div." + ICON4, focusedNode);
      if (toBeOpened) {
        if (!icon) {
          return;
        } else if (icon.classList.contains(EXPANDABLE)) {
          this.expandAction(focusedNode, icon, e);
        } else {
          this.focusNextNode(focusedNode, true);
        }
      } else {
        if (icon && icon.classList.contains(COLLAPSIBLE)) {
          this.collapseNode(focusedNode, icon, e);
        } else {
          var parentLi = closest2(closest2(focusedNode, "." + PARENTITEM), "." + LISTITEM);
          if (!parentLi) {
            return;
          } else {
            if (!parentLi.classList.contains("e-disable")) {
              this.setFocus(focusedNode, parentLi);
              this.navigateToFocus(true);
            }
          }
        }
      }
    };
    TreeView2.prototype.navigateNode = function(isTowards) {
      var focusedNode = this.getFocusedNode();
      this.focusNextNode(focusedNode, isTowards);
    };
    TreeView2.prototype.navigateRootNode = function(isBackwards) {
      var focusedNode = this.getFocusedNode();
      var rootNode = isBackwards ? this.getRootNode() : this.getEndNode();
      if (!rootNode.classList.contains("e-disable")) {
        this.setFocus(focusedNode, rootNode);
        this.navigateToFocus(isBackwards);
      }
    };
    TreeView2.prototype.getFocusedNode = function() {
      var selectedItem;
      var fNode = select2("." + LISTITEM + '[tabindex="0"]', this.element);
      if (!isNullOrUndefined2(fNode)) {
        var ariaChecked = fNode.getAttribute("aria-checked");
        if (ariaChecked === "mixed" || ariaChecked === "false") {
          this.isFilter = false;
        }
      }
      if (isNullOrUndefined2(fNode)) {
        selectedItem = select2("." + LISTITEM, this.element);
      }
      return isNullOrUndefined2(fNode) ? isNullOrUndefined2(selectedItem) ? this.element.firstElementChild : selectedItem : fNode;
    };
    TreeView2.prototype.focusNextNode = function(li, isTowards) {
      var nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
      this.setFocus(li, nextNode);
      this.navigateToFocus(!isTowards);
      if (nextNode.classList.contains("e-disable")) {
        var lastChild = nextNode.lastChild;
        if (nextNode.previousSibling == null && nextNode.classList.contains("e-level-1")) {
          this.focusNextNode(nextNode, true);
        } else if (nextNode.nextSibling == null && nextNode.classList.contains("e-node-collapsed")) {
          this.focusNextNode(nextNode, false);
        } else if (nextNode.nextSibling == null && lastChild.classList.contains(TEXTWRAP)) {
          this.focusNextNode(nextNode, false);
        } else {
          this.focusNextNode(nextNode, isTowards);
        }
      }
    };
    TreeView2.prototype.getNextNode = function(li) {
      var index = this.liList.indexOf(li);
      var nextNode;
      do {
        index++;
        nextNode = this.liList[parseInt(index.toString(), 10)];
        if (isNullOrUndefined2(nextNode)) {
          return li;
        }
      } while (!isVisible2(nextNode));
      return nextNode;
    };
    TreeView2.prototype.getPrevNode = function(li) {
      var index = this.liList.indexOf(li);
      var prevNode;
      do {
        index--;
        prevNode = this.liList[parseInt(index.toString(), 10)];
        if (isNullOrUndefined2(prevNode)) {
          return li;
        }
      } while (!isVisible2(prevNode));
      return prevNode;
    };
    TreeView2.prototype.getRootNode = function() {
      var index = 0;
      var rootNode;
      do {
        rootNode = this.liList[parseInt(index.toString(), 10)];
        index++;
      } while (!isVisible2(rootNode));
      return rootNode;
    };
    TreeView2.prototype.getEndNode = function() {
      var index = this.liList.length - 1;
      var endNode;
      do {
        endNode = this.liList[parseInt(index.toString(), 10)];
        index--;
      } while (!isVisible2(endNode));
      return endNode;
    };
    TreeView2.prototype.setFocus = function(preNode, nextNode) {
      removeClass2([preNode], FOCUS);
      preNode.setAttribute("tabindex", "-1");
      if (!nextNode.classList.contains("e-disable")) {
        addClass2([nextNode], FOCUS);
        nextNode.setAttribute("tabindex", "0");
        nextNode.focus();
        EventHandler2.add(nextNode, "blur", this.focusOut, this);
        this.updateIdAttr(preNode, nextNode);
      }
    };
    TreeView2.prototype.updateIdAttr = function(preNode, nextNode) {
      this.element.removeAttribute("aria-activedescendant");
      if (preNode) {
        preNode.removeAttribute("id");
      }
      nextNode.setAttribute("id", this.element.id + "_active");
      this.element.setAttribute("aria-activedescendant", this.element.id + "_active");
    };
    TreeView2.prototype.focusIn = function() {
      if (!this.mouseDownStatus) {
        var focusedElement = this.getFocusedNode();
        if (focusedElement.classList.contains("e-disable")) {
          focusedElement.setAttribute("tabindex", "-1");
          this.navigateNode(true);
        } else {
          focusedElement.setAttribute("tabindex", "0");
          addClass2([focusedElement], FOCUS);
          EventHandler2.add(focusedElement, "blur", this.focusOut, this);
        }
        this.mouseDownStatus = false;
      }
    };
    TreeView2.prototype.focusOut = function(event2) {
      var focusedElement = this.getFocusedNode();
      if (event2.target === focusedElement) {
        removeClass2([focusedElement], FOCUS);
        EventHandler2.remove(focusedElement, "blur", this.focusOut);
      }
    };
    TreeView2.prototype.onMouseOver = function(e) {
      if (Browser2.isDevice) {
        return;
      }
      var target = e.target;
      var classList2 = target.classList;
      var currentLi = closest2(target, "." + LISTITEM);
      if (!currentLi || classList2.contains(PARENTITEM) || classList2.contains(LISTITEM)) {
        this.removeHover();
        return;
      } else {
        if (currentLi && !currentLi.classList.contains("e-disable")) {
          this.setHover(currentLi);
        }
      }
    };
    TreeView2.prototype.setHover = function(li) {
      if (!li.classList.contains(HOVER) && !li.classList.contains(PREVENTSELECT)) {
        this.removeHover();
        addClass2([li], HOVER);
      }
    };
    TreeView2.prototype.onMouseLeave = function() {
      this.removeHover();
    };
    TreeView2.prototype.removeHover = function() {
      var hoveredNode = selectAll2("." + HOVER, this.element);
      if (hoveredNode && hoveredNode.length) {
        removeClass2(hoveredNode, HOVER);
      }
    };
    TreeView2.prototype.getNodeData = function(currLi, fromDS) {
      if (!isNullOrUndefined2(currLi) && currLi.classList.contains(LISTITEM) && !isNullOrUndefined2(closest2(currLi, "." + CONTROL3)) && closest2(currLi, "." + CONTROL3).classList.contains(ROOT6)) {
        var id = currLi.getAttribute("data-uid");
        var text = this.getText(currLi, fromDS);
        var pNode = closest2(currLi.parentNode, "." + LISTITEM);
        var pid = pNode ? pNode.getAttribute("data-uid") : null;
        var selected = currLi.classList.contains(ACTIVE3);
        var selectable = currLi.classList.contains(PREVENTSELECT) ? false : true;
        var expanded = currLi.getAttribute("aria-expanded") === "true" ? true : false;
        var hasChildren = currLi.getAttribute("aria-expanded") !== null ? true : (select2("." + EXPANDABLE, currLi) || select2("." + COLLAPSIBLE, currLi)) != null ? true : false;
        var checked = null;
        var checkboxElement = select2("." + CHECKBOXWRAP, currLi);
        if (this.showCheckBox && checkboxElement) {
          checked = currLi.getAttribute("aria-checked");
        }
        return {
          id,
          text,
          parentID: pid,
          selected,
          selectable,
          expanded,
          isChecked: checked,
          hasChildren
        };
      }
      return {
        id: "",
        text: "",
        parentID: "",
        selected: false,
        expanded: false,
        isChecked: "",
        hasChildren: false
      };
    };
    TreeView2.prototype.getText = function(currLi, fromDS) {
      if (fromDS) {
        var nodeData = this.getNodeObject(currLi.getAttribute("data-uid"));
        var level = parseFloat(currLi.getAttribute("aria-level"));
        var nodeFields = this.getFields(this.fields, level, 1);
        return getValue2(nodeFields.text, nodeData);
      }
      return select2("." + LISTTEXT, currLi).textContent;
    };
    TreeView2.prototype.getExpandEvent = function(currLi, e) {
      var nodeData = this.getNodeData(currLi);
      return {
        cancel: false,
        isInteracted: isNullOrUndefined2(e) ? false : true,
        node: currLi,
        nodeData,
        event: e
      };
    };
    TreeView2.prototype.renderNodeTemplate = function(data, textEle, dataId) {
      var tempArr = this.nodeTemplateFn(data, this, "nodeTemplate" + dataId, this.element.id + "nodeTemplate", this.isStringTemplate, void 0, textEle, this.root);
      if (tempArr) {
        tempArr = Array.prototype.slice.call(tempArr);
        append(tempArr, textEle);
      }
    };
    TreeView2.prototype.destroyTemplate = function(liEle) {
      this.clearTemplate(["nodeTemplate" + liEle.getAttribute("data-uid")]);
    };
    TreeView2.prototype.reRenderNodes = function() {
      this.updateListProp(this.fields);
      if (Browser2.isIE) {
        this.ulElement = this.element.querySelector(".e-list-parent.e-ul");
        this.ulElement.parentElement.removeChild(this.ulElement);
      } else {
        this.element.innerHTML = "";
      }
      if (!isNullOrUndefined2(this.nodeTemplateFn)) {
        this.clearTemplate();
      }
      this.setTouchClass();
      this.setProperties({
        selectedNodes: [],
        checkedNodes: [],
        expandedNodes: []
      }, true);
      this.checkedElement = [];
      this.isLoaded = false;
      this.setDataBinding(true);
    };
    TreeView2.prototype.setCssClass = function(oldClass, newClass) {
      if (!isNullOrUndefined2(oldClass) && oldClass !== "") {
        removeClass2([this.element], oldClass.split(" "));
      }
      if (!isNullOrUndefined2(newClass) && newClass !== "") {
        addClass2([this.element], newClass.split(" "));
      }
    };
    TreeView2.prototype.editingHandler = function(e) {
      var target = e.target;
      if (!target || target.classList.contains(ROOT6) || target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) || target.classList.contains(ICON4) || target.classList.contains(INPUT2) || target.classList.contains(INPUTGROUP2)) {
        return;
      } else {
        var liEle = closest2(target, "." + LISTITEM);
        this.createTextbox(liEle);
      }
    };
    TreeView2.prototype.createTextbox = function(liEle) {
      var _this = this;
      var oldInpEle = select2("." + TREEINPUT, this.element);
      if (oldInpEle) {
        oldInpEle.blur();
      }
      var textEle = select2("." + LISTTEXT, liEle);
      this.updateOldText(liEle);
      var innerEle = this.createElement("input", {
        className: TREEINPUT,
        attrs: {
          value: this.oldText
        }
      });
      var eventArgs = this.getEditEvent(liEle, null, innerEle.outerHTML);
      this.trigger("nodeEditing", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          var inpWidth = textEle.offsetWidth + 5;
          var style_1 = "width:" + inpWidth + "px";
          addClass2([liEle], EDITING);
          if (!isNullOrUndefined2(_this.nodeTemplateFn)) {
            _this.destroyTemplate(liEle);
          }
          if (_this.isReact) {
            setTimeout(function() {
              _this.renderTextBox(eventArgs, textEle, style_1);
            }, 5);
          } else {
            _this.renderTextBox(eventArgs, textEle, style_1);
          }
        }
      });
    };
    TreeView2.prototype.renderTextBox = function(eventArgs, textEle, style) {
      textEle.innerHTML = eventArgs.innerHtml;
      var inpEle = select2("." + TREEINPUT, textEle);
      this.inputObj = Input.createInput({
        element: inpEle,
        properties: {
          enableRtl: this.enableRtl
        }
      }, this.createElement);
      this.inputObj.container.setAttribute("style", style);
      inpEle.focus();
      var inputEle = inpEle;
      inputEle.setSelectionRange(0, inputEle.value.length);
      this.wireInputEvents(inpEle);
    };
    TreeView2.prototype.updateOldText = function(liEle) {
      var id = liEle.getAttribute("data-uid");
      this.editData = this.getNodeObject(id);
      var level = parseFloat(liEle.getAttribute("aria-level"));
      this.editFields = this.getFields(this.fields, level, 1);
      this.oldText = getValue2(this.editFields.text, this.editData);
    };
    TreeView2.prototype.inputFocusOut = function(e) {
      if (!select2("." + TREEINPUT, this.element)) {
        return;
      }
      var target = e.target;
      var newText = target.value;
      var txtEle = closest2(target, "." + LISTTEXT);
      var liEle = closest2(target, "." + LISTITEM);
      detach2(this.inputObj.container);
      Input.destroy({
        element: target,
        properties: this.properties
      });
      if (this.fields.dataSource instanceof DataManager && !this.isOffline) {
        this.crudOperation("update", null, liEle, newText, null, null, true);
      } else {
        this.appendNewText(liEle, txtEle, newText, true);
      }
      EventHandler2.remove(target, "blur", this.inputFocusOut);
      this.inputObj = null;
      detach2(target);
      target = null;
    };
    TreeView2.prototype.appendNewText = function(liEle, txtEle, newText, isInput) {
      var _this = this;
      var eventArgs = this.getEditEvent(liEle, newText, null);
      this.trigger("nodeEdited", eventArgs, function(observedArgs) {
        newText = observedArgs.cancel ? observedArgs.oldText : observedArgs.newText;
        _this.updateText(liEle, txtEle, newText, isInput);
        if (observedArgs.oldText !== newText) {
          _this.triggerEvent("nodeEdited", [_this.getNode(liEle)]);
        }
      });
    };
    TreeView2.prototype.updateText = function(liEle, txtEle, newText, isInput) {
      var newData = setValue3(this.editFields.text, newText, this.editData);
      if (!isNullOrUndefined2(this.nodeTemplateFn)) {
        txtEle.innerText = "";
        var dataId = liEle.getAttribute("data-uid");
        this.renderNodeTemplate(newData, txtEle, dataId);
        this.renderReactTemplates();
      } else {
        if (this.enableHtmlSanitizer) {
          txtEle.innerText = SanitizeHtmlHelper2.sanitize(newText);
        } else {
          txtEle.innerHTML = newText;
        }
      }
      if (isInput) {
        removeClass2([liEle], EDITING);
        liEle.focus();
        EventHandler2.add(liEle, "blur", this.focusOut, this);
        addClass2([liEle], FOCUS);
      }
      if (this.allowTextWrap) {
        this.calculateWrap(liEle);
      }
    };
    TreeView2.prototype.getElement = function(ele) {
      if (isNullOrUndefined2(ele)) {
        return null;
      } else if (typeof ele === "string") {
        return this.element.querySelector('[data-uid="' + ele + '"]');
      } else if (typeof ele === "object") {
        return getElement(ele);
      } else {
        return null;
      }
    };
    TreeView2.prototype.getId = function(ele) {
      if (isNullOrUndefined2(ele)) {
        return null;
      } else if (typeof ele === "string") {
        return ele;
      } else if (typeof ele === "object") {
        return getElement(ele).getAttribute("data-uid");
      } else {
        return null;
      }
    };
    TreeView2.prototype.getEditEvent = function(liEle, newText, inpEle) {
      var data = this.getNodeData(liEle);
      return {
        cancel: false,
        newText,
        node: liEle,
        nodeData: data,
        oldText: this.oldText,
        innerHtml: inpEle
      };
    };
    TreeView2.prototype.getNodeObject = function(id) {
      var childNodes;
      if (isNullOrUndefined2(id)) {
        return childNodes;
      } else if (this.dataType === 1) {
        for (var i = 0, objlen = this.treeData.length; i < objlen; i++) {
          var dataId = getValue2(this.fields.id, this.treeData[parseInt(i.toString(), 10)]);
          if (!isNullOrUndefined2(this.treeData[parseInt(i.toString(), 10)]) && !isNullOrUndefined2(dataId) && dataId.toString() === id) {
            return this.treeData[parseInt(i.toString(), 10)];
          }
        }
      } else {
        return this.getChildNodeObject(this.treeData, this.fields, id);
      }
      return childNodes;
    };
    TreeView2.prototype.getChildNodeObject = function(obj, mapper5, id) {
      var newList;
      if (isNullOrUndefined2(obj)) {
        return newList;
      }
      for (var i = 0, objlen = obj.length; i < objlen; i++) {
        var dataId = getValue2(mapper5.id, obj[parseInt(i.toString(), 10)]);
        if (obj[parseInt(i.toString(), 10)] && dataId && dataId.toString() === id) {
          return obj[parseInt(i.toString(), 10)];
        } else if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]))) {
          var childData = getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]);
          newList = this.getChildNodeObject(childData, this.getChildMapper(mapper5), id);
          if (newList !== void 0) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", obj[parseInt(i.toString(), 10)]))) {
          var child = "child";
          newList = this.getChildNodeObject(getValue2(child, obj[parseInt(i.toString(), 10)]), this.getChildMapper(mapper5), id);
          if (newList !== void 0) {
            break;
          }
        } else if (this.isChildObject()) {
          var children = "child";
          var childData = getValue2(children, obj[parseInt(i.toString(), 10)]);
          newList = this.getChildNodeObject(childData, this.getChildMapper(mapper5), id);
          if (newList !== void 0) {
            break;
          }
        }
      }
      return newList;
    };
    TreeView2.prototype.setDragAndDrop = function(toBind) {
      if (toBind && !this.disabled) {
        this.initializeDrag();
      } else {
        this.destroyDrag();
      }
    };
    TreeView2.prototype.initializeDrag = function() {
      var _this = this;
      var virtualEle;
      this.dragObj = new Draggable2(this.element, {
        enableTailMode: true,
        enableAutoScroll: true,
        dragArea: this.dragArea,
        dragTarget: "." + TEXTWRAP,
        enableTapHold: true,
        tapHoldThreshold: 100,
        helper: function(e) {
          _this.dragTarget = e.sender.target;
          var dragRoot = closest2(_this.dragTarget, "." + ROOT6);
          var dragWrap = closest2(_this.dragTarget, "." + TEXTWRAP);
          _this.dragLi = closest2(_this.dragTarget, "." + LISTITEM);
          if (_this.fullRowSelect && !dragWrap && _this.dragTarget.classList.contains(FULLROW)) {
            dragWrap = _this.dragTarget.nextElementSibling;
          }
          if (!_this.dragTarget || !e.element.isSameNode(dragRoot) || !dragWrap || _this.dragTarget.classList.contains(ROOT6) || _this.dragTarget.classList.contains(PARENTITEM) || _this.dragTarget.classList.contains(LISTITEM) || _this.dragLi.classList.contains("e-disable")) {
            return false;
          }
          var cloneEle = dragWrap.cloneNode(true);
          if (isNullOrUndefined2(select2("div." + ICON4, cloneEle))) {
            var icon = _this.createElement("div", {
              className: ICON4 + " " + EXPANDABLE
            });
            cloneEle.insertBefore(icon, cloneEle.children[0]);
          }
          var cssClass2 = DRAGITEM + " " + ROOT6 + " " + _this.cssClass + " " + (_this.enableRtl ? RTL17 : "");
          virtualEle = _this.createElement("div", {
            className: cssClass2
          });
          virtualEle.appendChild(cloneEle);
          var nLen = _this.selectedNodes.length;
          if (nLen > 1 && _this.allowMultiSelection && _this.dragLi.classList.contains(ACTIVE3)) {
            var cNode = _this.createElement("span", {
              className: DROPCOUNT,
              innerHTML: "" + nLen
            });
            virtualEle.appendChild(cNode);
          }
          document.body.appendChild(virtualEle);
          document.body.style.cursor = "";
          _this.dragData = _this.getNodeData(_this.dragLi);
          return virtualEle;
        },
        dragStart: function(e) {
          addClass2([_this.element], DRAGGING);
          var listItem = closest2(e.target, ".e-list-item");
          var level;
          if (listItem) {
            level = parseInt(listItem.getAttribute("aria-level"), 10);
          }
          var eventArgs = _this.getDragEvent(e.event, _this, null, e.target, null, virtualEle, level);
          if (eventArgs.draggedNode.classList.contains(EDITING)) {
            _this.dragObj.intDestroy(e.event);
            _this.dragCancelAction(virtualEle);
          } else {
            _this.trigger("nodeDragStart", eventArgs, function(observedArgs) {
              if (observedArgs.cancel) {
                _this.dragObj.intDestroy(e.event);
                _this.dragCancelAction(virtualEle);
              } else {
                _this.dragStartAction = true;
              }
            });
          }
        },
        drag: function(e) {
          _this.dragObj.setProperties({
            cursorAt: {
              top: !isNullOrUndefined2(e.event.targetTouches) || Browser2.isDevice ? 60 : -20
            }
          });
          _this.dragAction(e, virtualEle);
        },
        dragStop: function(e) {
          removeClass2([_this.element], DRAGGING);
          if (!e.target.classList.contains("e-sibling")) {
            _this.removeVirtualEle();
          }
          var dropTarget = e.target;
          var preventTargetExpand = false;
          var dropRoot = closest2(dropTarget, "." + DROPPABLE);
          var isHelperElement = true;
          if (!dropTarget || !dropRoot) {
            detach2(e.helper);
            document.body.style.cursor = "";
          }
          var listItem = closest2(dropTarget, ".e-list-item");
          var level;
          if (listItem) {
            level = parseInt(listItem.getAttribute("aria-level"), 10);
          }
          var eventArgs = _this.getDragEvent(e.event, _this, dropTarget, dropTarget, null, e.helper, level);
          eventArgs.preventTargetExpand = preventTargetExpand;
          _this.trigger("nodeDragStop", eventArgs, function(observedArgs) {
            _this.dragParent = observedArgs.draggedParentNode;
            _this.preventExpand = observedArgs.preventTargetExpand;
            if (observedArgs.cancel) {
              if (e.helper.parentNode) {
                detach2(e.helper);
              }
              document.body.style.cursor = "";
              isHelperElement = false;
              if (dropTarget.classList.contains("e-sibling")) {
                _this.removeVirtualEle();
              }
            }
            _this.dragStartAction = false;
          });
        }
      });
      this.dropObj = new Droppable2(this.element, {
        out: function(e) {
          if (!isNullOrUndefined2(e) && !e.target.classList.contains(SIBLING) && _this.dropObj.dragData.default && _this.dropObj.dragData.default.helper.classList.contains(ROOT6)) {
            document.body.style.cursor = "not-allowed";
          }
        },
        over: function() {
          document.body.style.cursor = "";
        },
        drop: function(e) {
          _this.dropAction(e);
          _this.removeVirtualEle();
        }
      });
    };
    TreeView2.prototype.dragCancelAction = function(virtualEle) {
      detach2(virtualEle);
      removeClass2([this.element], DRAGGING);
      this.dragStartAction = false;
    };
    TreeView2.prototype.getOffsetX = function(event2, target) {
      var touchList = event2.changedTouches;
      if (touchList && touchList.length > 0) {
        return touchList[0].clientX - target.getBoundingClientRect().left;
      } else {
        return event2.offsetX;
      }
    };
    TreeView2.prototype.getOffsetY = function(event2, target) {
      var touchList = event2.changedTouches;
      if (touchList && touchList.length > 0) {
        return touchList[0].clientY - target.getBoundingClientRect().top;
      } else {
        return event2.offsetY;
      }
    };
    TreeView2.prototype.dragAction = function(e, virtualEle) {
      var dropRoot = closest2(e.target, "." + DROPPABLE);
      var dropWrap = closest2(e.target, "." + TEXTWRAP);
      var icon = select2("div." + ICON4, virtualEle);
      removeClass2([icon], [DROPIN, DROPNEXT, DROPOUT, NODROP]);
      this.isDropIn = false;
      this.removeVirtualEle();
      document.body.style.cursor = "";
      var classList2 = e.target.classList;
      var event2 = e.event;
      var offsetY = this.getOffsetY(event2, e.target);
      var offsetX = this.getOffsetX(event2, e.target);
      if (this.fullRowSelect && !dropWrap && !isNullOrUndefined2(classList2) && classList2.contains(FULLROW)) {
        dropWrap = e.target.nextElementSibling;
      }
      if (dropRoot) {
        var dropLi = closest2(e.target, "." + LISTITEM);
        var checkWrapper = closest2(e.target, "." + CHECKBOXWRAP);
        var collapse = closest2(e.target, "." + COLLAPSIBLE);
        var expand = closest2(e.target, "." + EXPANDABLE);
        if (!dropRoot.classList.contains(ROOT6) || dropWrap && !dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)) {
          if (this.hasTemplate && dropLi) {
            var templateTarget = select2(this.fullRowSelect ? "." + FULLROW : "." + TEXTWRAP, dropLi);
            if (e && !expand && !collapse && offsetY < 7 && !checkWrapper || expand && offsetY < 5 || collapse && offsetX < 3) {
              var index = this.fullRowSelect ? 1 : 0;
              this.appendIndicator(dropLi, icon, index);
            } else if (e && !expand && !collapse && !checkWrapper && templateTarget && offsetY > templateTarget.offsetHeight - 10 || expand && offsetY > 19 || collapse && offsetX > 19) {
              var index = this.fullRowSelect ? 2 : 1;
              this.appendIndicator(dropLi, icon, index);
            } else {
              addClass2([icon], DROPIN);
              this.isDropIn = true;
            }
          } else {
            if (dropLi && e && !expand && !collapse && offsetY < 7 && !checkWrapper || expand && offsetY < 5 || collapse && offsetX < 3) {
              var index = this.fullRowSelect ? 1 : 0;
              this.appendIndicator(dropLi, icon, index);
            } else if (dropLi && e && !expand && !collapse && e.target.offsetHeight > 0 && offsetY > e.target.offsetHeight - 10 && !checkWrapper || expand && offsetY > 19 || collapse && offsetX > 19) {
              var index = this.fullRowSelect ? 2 : 1;
              this.appendIndicator(dropLi, icon, index);
            } else {
              addClass2([icon], DROPIN);
              this.isDropIn = true;
            }
          }
        } else if (e.target.nodeName === "LI" && !dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)) {
          addClass2([icon], DROPNEXT);
          this.renderVirtualEle(e);
        } else if (e.target.classList.contains(SIBLING)) {
          addClass2([icon], DROPNEXT);
        } else {
          addClass2([icon], DROPOUT);
        }
      } else {
        addClass2([icon], NODROP);
        document.body.style.cursor = "not-allowed";
      }
      var listItem = closest2(e.target, ".e-list-item");
      var level;
      if (listItem) {
        level = parseInt(listItem.getAttribute("aria-level"), 10);
      }
      var eventArgs = this.getDragEvent(e.event, this, e.target, e.target, null, virtualEle, level);
      if (eventArgs.dropIndicator) {
        removeClass2([icon], eventArgs.dropIndicator);
      }
      this.trigger("nodeDragging", eventArgs);
      if (eventArgs.dropIndicator) {
        addClass2([icon], eventArgs.dropIndicator);
      }
    };
    TreeView2.prototype.appendIndicator = function(dropLi, icon, index) {
      addClass2([icon], DROPNEXT);
      var virEle = this.createElement("div", {
        className: SIBLING
      });
      dropLi.insertBefore(virEle, dropLi.children[parseInt(index.toString(), 10)]);
    };
    TreeView2.prototype.dropAction = function(e) {
      var event2 = e.event;
      var offsetY = this.getOffsetY(event2, e.target);
      var dropTarget = e.target;
      var dragObj;
      var level;
      var drop = false;
      var nodeData = [];
      var liArray = [];
      var dragInstance = e.dragData.draggable;
      for (var i = 0; i < dragInstance.ej2_instances.length; i++) {
        if (dragInstance.ej2_instances[parseInt(i.toString(), 10)] instanceof TreeView_1) {
          dragObj = dragInstance.ej2_instances[parseInt(i.toString(), 10)];
          break;
        }
      }
      if (dragObj && dragObj.dragTarget) {
        var dragTarget = dragObj.dragTarget;
        var dragLi = closest2(dragTarget, "." + LISTITEM);
        var dropLi = closest2(dropTarget, "." + LISTITEM);
        liArray.push(dragLi);
        if (dropLi == null && dropTarget.classList.contains(ROOT6)) {
          dropLi = dropTarget.firstElementChild;
        }
        detach2(e.droppedElement);
        document.body.style.cursor = "";
        if (!dropLi || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi)) {
          if (this.fields.dataSource instanceof DataManager === false) {
            this.preventExpand = false;
          }
          return;
        }
        if (dragObj.allowMultiSelection && dragLi.classList.contains(ACTIVE3)) {
          var sNodes = selectAll2("." + ACTIVE3, dragObj.element);
          liArray = sNodes;
          if (e.target.offsetHeight <= 33 && offsetY > e.target.offsetHeight - 10 && offsetY > 6) {
            for (var i = sNodes.length - 1; i >= 0; i--) {
              if (dropLi.isSameNode(sNodes[parseInt(i.toString(), 10)]) || this.isDescendant(sNodes[parseInt(i.toString(), 10)], dropLi)) {
                continue;
              }
              this.appendNode(dropTarget, sNodes[parseInt(i.toString(), 10)], dropLi, e, dragObj, offsetY);
            }
          } else {
            for (var i = 0; i < sNodes.length; i++) {
              if (dropLi.isSameNode(sNodes[parseInt(i.toString(), 10)]) || this.isDescendant(sNodes[parseInt(i.toString(), 10)], dropLi)) {
                continue;
              }
              this.appendNode(dropTarget, sNodes[parseInt(i.toString(), 10)], dropLi, e, dragObj, offsetY);
            }
          }
        } else {
          this.appendNode(dropTarget, dragLi, dropLi, e, dragObj, offsetY);
        }
        level = parseInt(dragLi.getAttribute("aria-level"), 10);
        drop = true;
      }
      if (this.fields.dataSource instanceof DataManager === false) {
        this.preventExpand = false;
      }
      for (var i = 0; i < liArray.length; i++) {
        nodeData.push(this.getNode(liArray[parseInt(i.toString(), 10)]));
      }
      this.trigger("nodeDropped", this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
      if (dragObj.element.id !== this.element.id) {
        dragObj.triggerEvent("nodeDropped", nodeData);
        this.isNodeDropped = true;
        this.fields.dataSource = this.treeData;
      }
      this.triggerEvent("nodeDropped", nodeData);
    };
    TreeView2.prototype.appendNode = function(dropTarget, dragLi, dropLi, e, dragObj, offsetY) {
      var checkWrapper = closest2(dropTarget, "." + CHECKBOXWRAP);
      var collapse = closest2(e.target, "." + COLLAPSIBLE);
      var expand = closest2(e.target, "." + EXPANDABLE);
      if (!dragLi.classList.contains("e-disable") && !checkWrapper && (expand && e.event.offsetY < 5 || collapse && e.event.offsetX < 3 || expand && e.event.offsetY > 19 || collapse && e.event.offsetX > 19 || !expand && !collapse)) {
        if (dropTarget.nodeName === "LI") {
          this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
        } else if (dropTarget.firstElementChild && dropTarget.classList.contains(ROOT6)) {
          if (dropTarget.firstElementChild.nodeName === "UL") {
            this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
          }
        } else if (dropTarget.classList.contains("e-icon-collapsible") || dropTarget.classList.contains("e-icon-expandable")) {
          this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
        } else {
          this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY, null, dropTarget);
        }
      } else {
        this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY, true, dropTarget);
      }
      if (this.showCheckBox) {
        this.ensureIndeterminate();
      }
    };
    TreeView2.prototype.dropAsSiblingNode = function(dragLi, dropLi, e, dragObj) {
      var dropUl = closest2(dropLi, "." + PARENTITEM);
      var dragParentUl = closest2(dragLi, "." + PARENTITEM);
      var dragParentLi = closest2(dragParentUl, "." + LISTITEM);
      var pre;
      if (e.target.offsetHeight > 0 && e.event.offsetY > e.target.offsetHeight - 2) {
        pre = false;
      } else if (e.event.offsetY < 2) {
        pre = true;
      } else if (e.target.classList.contains("e-icon-expandable") || e.target.classList.contains("e-icon-collapsible")) {
        if (e.event.offsetY < 5 || e.event.offsetX < 3) {
          pre = true;
        } else if (e.event.offsetY > 15 || e.event.offsetX > 17) {
          pre = false;
        }
      }
      if (e.target.classList.contains("e-icon-expandable") || e.target.classList.contains("e-icon-collapsible")) {
        var target = e.target.closest("li");
        dropUl.insertBefore(dragLi, pre ? target : target.nextElementSibling);
      } else {
        dropUl.insertBefore(dragLi, pre ? e.target : e.target.nextElementSibling);
      }
      this.moveData(dragLi, dropLi, dropUl, pre, dragObj);
      this.updateElement(dragParentUl, dragParentLi);
      this.updateAriaLevel(dragLi);
      if (dragObj.element.id === this.element.id) {
        this.updateList();
      } else {
        dragObj.updateInstance();
        this.updateInstance();
      }
    };
    TreeView2.prototype.dropAsChildNode = function(dragLi, dropLi, dragObj, index, e, pos, isCheck, dropTarget) {
      var dragParentUl = closest2(dragLi, "." + PARENTITEM);
      var dragParentLi = closest2(dragParentUl, "." + LISTITEM);
      var dropParentUl = closest2(dropLi, "." + PARENTITEM);
      var templateTarget;
      if (e && e.target) {
        templateTarget = select2(this.fullRowSelect ? "." + FULLROW : "." + TEXTWRAP, dropLi);
      }
      if (e && (pos < 7 && !dropTarget.classList.contains("e-sibling") || dropTarget.classList.contains("e-sibling") && !dropLi.lastChild.classList.contains("e-sibling")) && !isCheck) {
        dropParentUl.insertBefore(dragLi, dropLi);
        this.moveData(dragLi, dropLi, dropParentUl, true, dragObj);
      } else if (e && e.target.offsetHeight > 0 && pos > e.target.offsetHeight - 10 && !isCheck && !this.hasTemplate) {
        dropParentUl.insertBefore(dragLi, dropLi.nextElementSibling);
        this.moveData(dragLi, dropLi, dropParentUl, false, dragObj);
      } else if (this.hasTemplate && templateTarget && pos > templateTarget.offsetHeight - 10 && !isCheck) {
        dropParentUl.insertBefore(dragLi, dropLi.nextElementSibling);
        this.moveData(dragLi, dropLi, dropParentUl, false, dragObj);
      } else {
        var dropUl = this.expandParent(dropLi);
        var childLi = !isNullOrUndefined2(index) ? dropUl.childNodes[parseInt(index.toString(), 10)] : null;
        dropUl.insertBefore(dragLi, childLi);
        this.moveData(dragLi, childLi, dropUl, true, dragObj);
      }
      this.updateElement(dragParentUl, dragParentLi);
      this.updateAriaLevel(dragLi);
      if (dragObj.element.id === this.element.id) {
        this.updateList();
      } else {
        dragObj.updateInstance();
        this.updateInstance();
      }
    };
    TreeView2.prototype.moveData = function(dragLi, dropLi, dropUl, pre, dragObj) {
      var dropParentLi = closest2(dropUl, "." + LISTITEM);
      var id = this.getId(dragLi);
      var removedData = dragObj.updateChildField(dragObj.treeData, dragObj.fields, id, null, null, true);
      var refId = this.getId(dropLi);
      var index = this.getDataPos(this.treeData, this.fields, refId);
      var parentId = this.getId(dropParentLi);
      if (this.dataType === 1) {
        this.updateField(this.treeData, this.fields, parentId, "hasChildren", true);
        var pos = isNullOrUndefined2(index) ? this.treeData.length : pre ? index : index + 1;
        if (isNullOrUndefined2(parentId) && !this.hasPid) {
          delete removedData[0][this.fields.parentID];
        } else {
          var currPid = this.isNumberTypeId ? parseFloat(parentId) : parentId;
          setValue3(this.fields.parentID, currPid, removedData[0]);
        }
        this.treeData.splice(pos, 0, removedData[0]);
        if (dragObj.element.id !== this.element.id) {
          var childData = dragObj.removeChildNodes(id);
          pos++;
          for (var i = 0, len = childData.length; i < len; i++) {
            this.treeData.splice(pos, 0, childData[parseInt(i.toString(), 10)]);
            pos++;
          }
          dragObj.groupedData = dragObj.getGroupedData(dragObj.treeData, dragObj.fields.parentID);
        }
        this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
      } else {
        this.addChildData(this.treeData, this.fields, parentId, removedData, pre ? index : index + 1);
      }
    };
    TreeView2.prototype.expandParent = function(dropLi) {
      var dropIcon = select2("div." + EXPANDABLE + ", div." + COLLAPSIBLE, dropLi);
      if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && this.preventExpand !== true) {
        this.expandAction(dropLi, dropIcon, null);
      }
      var dropUl = select2("." + PARENTITEM, dropLi);
      if (this.preventExpand === true && !dropUl && dropIcon) {
        this.renderChildNodes(dropLi);
      }
      dropUl = select2("." + PARENTITEM, dropLi);
      if (!isNullOrUndefined2(dropUl) && this.preventExpand && !(dropLi.getAttribute("aria-expanded") === "true")) {
        dropUl.style.display = "none";
      }
      if (!isNullOrUndefined2(dropUl) && this.preventExpand === false) {
        dropUl.style.display = "block";
      }
      if (isNullOrUndefined2(dropUl) && this.preventExpand === true) {
        if (isNullOrUndefined2(dropIcon)) {
          ListBase.generateIcon(this.createElement, dropLi, EXPANDABLE, this.listBaseOption);
        }
        var icon = select2("div." + EXPANDABLE + ", div." + COLLAPSIBLE, dropLi);
        if (icon) {
          icon.classList.add("e-icon-expandable");
        }
        dropUl = ListBase.generateUL(this.createElement, [], null, this.listBaseOption);
        dropLi.appendChild(dropUl);
        if (icon) {
          removeClass2([icon], COLLAPSIBLE);
        } else {
          ListBase.generateIcon(this.createElement, dropLi, EXPANDABLE, this.listBaseOption);
        }
        dropLi.setAttribute("aria-expanded", "false");
        dropUl.style.display = "none";
      }
      if (isNullOrUndefined2(dropUl)) {
        var args = this.expandArgs;
        if (isNullOrUndefined2(args) || args && args.name !== "nodeExpanding") {
          this.trigger("nodeExpanding", this.getExpandEvent(dropLi, null));
        }
        if (isNullOrUndefined2(dropIcon)) {
          ListBase.generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
        }
        var icon = select2("div." + EXPANDABLE + ", div." + COLLAPSIBLE, dropLi);
        if (icon) {
          removeClass2([icon], EXPANDABLE);
        } else {
          ListBase.generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
          icon = select2("div." + ICON4, dropLi);
          removeClass2([icon], EXPANDABLE);
        }
        dropUl = ListBase.generateUL(this.createElement, [], null, this.listBaseOption);
        dropLi.appendChild(dropUl);
        this.addExpand(dropLi);
        this.trigger("nodeExpanded", this.getExpandEvent(dropLi, null));
      }
      var collapseIcon = select2("div." + COLLAPSIBLE, dropLi);
      if (!isNullOrUndefined2(dropUl) && collapseIcon && this.preventExpand && !(dropLi.getAttribute("aria-expanded") === "true")) {
        removeClass2([collapseIcon], COLLAPSIBLE);
        dropLi.setAttribute("aria-expanded", "false");
        addClass2([collapseIcon], EXPANDABLE);
      }
      return dropUl;
    };
    TreeView2.prototype.updateElement = function(dragParentUl, dragParentLi) {
      if (dragParentLi && dragParentUl.childElementCount === 0) {
        var dragIcon = select2("div." + ICON4, dragParentLi);
        detach2(dragParentUl);
        detach2(dragIcon);
        var parentId = this.getId(dragParentLi);
        this.updateField(this.treeData, this.fields, parentId, "hasChildren", false);
        this.removeExpand(dragParentLi, true);
      }
    };
    TreeView2.prototype.updateAriaLevel = function(dragLi) {
      var level = this.parents(dragLi, "." + PARENTITEM).length;
      dragLi.setAttribute("aria-level", "" + level);
      this.updateChildAriaLevel(select2("." + PARENTITEM, dragLi), level + 1);
    };
    TreeView2.prototype.updateChildAriaLevel = function(element2, level) {
      if (!isNullOrUndefined2(element2)) {
        var cNodes = element2.childNodes;
        for (var i = 0, len = cNodes.length; i < len; i++) {
          var liEle = cNodes[parseInt(i.toString(), 10)];
          liEle.setAttribute("aria-level", "" + level);
          this.updateChildAriaLevel(select2("." + PARENTITEM, liEle), level + 1);
        }
      }
    };
    TreeView2.prototype.renderVirtualEle = function(e) {
      var pre;
      var event2 = e.event;
      var offsetY = this.getOffsetY(event2, e.target);
      if (offsetY > e.target.offsetHeight - 2) {
        pre = false;
      } else if (offsetY < 2) {
        pre = true;
      }
      var virEle = this.createElement("div", {
        className: SIBLING
      });
      var index = this.fullRowSelect ? pre ? 1 : 2 : pre ? 0 : 1;
      e.target.insertBefore(virEle, e.target.children[parseInt(index.toString(), 10)]);
    };
    TreeView2.prototype.removeVirtualEle = function() {
      var sibEle = select2("." + SIBLING);
      if (sibEle) {
        detach2(sibEle);
      }
    };
    TreeView2.prototype.destroyDrag = function() {
      if (this.dragObj && this.dropObj) {
        this.dragObj.destroy();
        this.dropObj.destroy();
      }
    };
    TreeView2.prototype.getDragEvent = function(event2, obj, dropTarget, target, dragNode, cloneEle, level, drop) {
      var dropLi = dropTarget ? closest2(dropTarget, "." + LISTITEM) : null;
      var dropData = dropLi ? this.getNodeData(dropLi) : null;
      var draggedNode = obj ? obj.dragLi : dragNode;
      var draggedNodeData = obj ? obj.dragData : null;
      var newParent = dropTarget ? this.parents(dropTarget, "." + LISTITEM) : null;
      var dragLiParent = obj.dragLi.parentElement;
      var dragParent = obj.dragLi ? closest2(dragLiParent, "." + LISTITEM) : null;
      var targetParent = null;
      var indexValue = null;
      var iconCss = [DROPNEXT, DROPIN, DROPOUT, NODROP];
      var iconClass = null;
      var node = drop === true ? draggedNode : dropLi;
      var index = node ? closest2(node, ".e-list-parent") : null;
      var i = 0;
      var position = null;
      dragParent = obj.dragLi && dragParent === null ? closest2(dragLiParent, "." + ROOT6) : dragParent;
      dragParent = drop === true ? this.dragParent : dragParent;
      if (cloneEle) {
        while (i < 4) {
          if (select2("." + ICON4, cloneEle).classList.contains(iconCss[parseInt(i.toString(), 10)])) {
            iconClass = iconCss[parseInt(i.toString(), 10)];
            break;
          }
          i++;
        }
      }
      if (index) {
        var dropTar = 0;
        for (i = 0; i < index.childElementCount; i++) {
          dropTar = drop !== true && index.children[parseInt(i.toString(), 10)] === draggedNode && dropLi !== draggedNode ? ++dropTar : dropTar;
          if (drop !== true && index.children[parseInt(i.toString(), 10)].classList.contains("e-hover")) {
            indexValue = event2.offsetY >= 23 ? i + 1 : i;
            break;
          } else if (index.children[parseInt(i.toString(), 10)] === node) {
            indexValue = event2.offsetY >= 23 ? i : i;
            break;
          }
        }
        indexValue = dropTar !== 0 ? --indexValue : indexValue;
        position = this.isDropIn ? "Inside" : event2.offsetY < 7 ? "Before" : "After";
      }
      if (dropTarget) {
        if (newParent.length === 0) {
          targetParent = null;
        } else if (dropTarget.classList.contains(LISTITEM)) {
          targetParent = newParent[0];
        } else {
          targetParent = newParent[1];
        }
      }
      if (dropLi === draggedNode) {
        targetParent = dropLi;
      }
      if (dropTarget && target.offsetHeight <= 33 && event2.offsetY < target.offsetHeight - 10 && event2.offsetY > 6) {
        targetParent = dropLi;
        if (drop !== true) {
          level = ++level;
          var parent_2 = targetParent ? select2(".e-list-parent", targetParent) : null;
          indexValue = parent_2 ? parent_2.children.length : 0;
          if (!(this.fields.dataSource instanceof DataManager) && parent_2 === null && targetParent) {
            var parent_3 = targetParent.hasAttribute("data-uid") ? this.getChildNodes(this.fields.dataSource, targetParent.getAttribute("data-uid").toString()) : null;
            indexValue = parent_3 ? parent_3.length : 0;
          }
        }
      }
      return {
        cancel: false,
        clonedNode: cloneEle,
        event: event2,
        draggedNode,
        draggedNodeData,
        droppedNode: dropLi,
        droppedNodeData: dropData,
        dropIndex: indexValue,
        dropLevel: level,
        draggedParentNode: dragParent,
        dropTarget: targetParent,
        dropIndicator: iconClass,
        target,
        position
      };
    };
    TreeView2.prototype.addFullRow = function(toAdd) {
      var len = this.liList.length;
      if (toAdd) {
        for (var i = 0; i < len; i++) {
          this.createFullRow(this.liList[parseInt(i.toString(), 10)]);
        }
      } else {
        for (var i = 0; i < len; i++) {
          var rowDiv = select2("." + FULLROW, this.liList[parseInt(i.toString(), 10)]);
          detach2(rowDiv);
        }
      }
    };
    TreeView2.prototype.createFullRow = function(item) {
      var rowDiv = this.createElement("div", {
        className: FULLROW
      });
      item.insertBefore(rowDiv, item.childNodes[0]);
    };
    TreeView2.prototype.addMultiSelect = function(toAdd) {
      if (toAdd) {
        var liEles = selectAll2("." + LISTITEM + ':not([aria-selected="true"])', this.element);
        for (var _i = 0, liEles_1 = liEles; _i < liEles_1.length; _i++) {
          var ele = liEles_1[_i];
          ele.setAttribute("aria-selected", "false");
        }
      } else {
        var liEles = selectAll2("." + LISTITEM + '[aria-selected="false"]', this.element);
        for (var _a = 0, liEles_2 = liEles; _a < liEles_2.length; _a++) {
          var ele = liEles_2[_a];
          ele.removeAttribute("aria-selected");
        }
      }
    };
    TreeView2.prototype.collapseByLevel = function(element2, level, excludeHiddenNodes, currentLevel) {
      currentLevel = isNullOrUndefined2(currentLevel) ? 1 : currentLevel;
      if (level > 0 && !isNullOrUndefined2(element2)) {
        var cNodes = this.getVisibleNodes(excludeHiddenNodes, element2.childNodes);
        for (var i = 0, len = cNodes.length; i < len; i++) {
          var liEle = cNodes[parseInt(i.toString(), 10)];
          var icon = select2("." + COLLAPSIBLE, select2("." + TEXTWRAP, liEle));
          if (currentLevel >= level && !isNullOrUndefined2(icon)) {
            this.collapseNode(liEle, icon, null);
          }
          this.collapseByLevel(select2("." + PARENTITEM, liEle), level, excludeHiddenNodes, currentLevel + 1);
        }
      }
    };
    TreeView2.prototype.collapseAllNodes = function(excludeHiddenNodes) {
      var cIcons = this.getVisibleNodes(excludeHiddenNodes, selectAll2("." + COLLAPSIBLE, this.element));
      for (var i = 0, len = cIcons.length; i < len; i++) {
        var icon = cIcons[parseInt(i.toString(), 10)];
        var liEle = closest2(icon, "." + LISTITEM);
        this.collapseNode(liEle, icon, null);
      }
    };
    TreeView2.prototype.expandByLevel = function(element2, level, excludeHiddenNodes) {
      if (level > 0 && !isNullOrUndefined2(element2)) {
        var eNodes = this.getVisibleNodes(excludeHiddenNodes, element2.childNodes);
        for (var i = 0, len = eNodes.length; i < len; i++) {
          var liEle = eNodes[parseInt(i.toString(), 10)];
          var icon = select2("." + EXPANDABLE, select2("." + TEXTWRAP, liEle));
          if (!isNullOrUndefined2(icon)) {
            this.expandAction(liEle, icon, null);
          }
          this.expandByLevel(select2("." + PARENTITEM, liEle), level - 1, excludeHiddenNodes);
        }
      }
    };
    TreeView2.prototype.expandAllNodes = function(excludeHiddenNodes) {
      var eIcons = this.getVisibleNodes(excludeHiddenNodes, selectAll2("." + EXPANDABLE, this.element));
      for (var _i = 0, eIcons_1 = eIcons; _i < eIcons_1.length; _i++) {
        var icon = eIcons_1[_i];
        var liEle = closest2(icon, "." + LISTITEM);
        this.expandAction(liEle, icon, null, true, null, true);
      }
    };
    TreeView2.prototype.getVisibleNodes = function(excludeHiddenNodes, nodes) {
      var vNodes = Array.prototype.slice.call(nodes);
      if (excludeHiddenNodes) {
        for (var i = 0; i < vNodes.length; i++) {
          if (!isVisible2(vNodes[parseInt(i.toString(), 10)])) {
            vNodes.splice(i, 1);
            i--;
          }
        }
      }
      return vNodes;
    };
    TreeView2.prototype.removeNode = function(node) {
      var dragParentUl = closest2(node, "." + PARENTITEM);
      var dragParentLi = closest2(dragParentUl, "." + LISTITEM);
      if (!isNullOrUndefined2(this.nodeTemplateFn)) {
        this.destroyTemplate(node);
      }
      detach2(node);
      this.updateElement(dragParentUl, dragParentLi);
      this.removeData(node);
    };
    TreeView2.prototype.updateInstance = function() {
      this.updateList();
      this.updateSelectedNodes();
      this.updateExpandedNodes();
    };
    TreeView2.prototype.updateList = function() {
      this.liList = Array.prototype.slice.call(selectAll2("." + LISTITEM, this.element));
    };
    TreeView2.prototype.updateSelectedNodes = function() {
      this.setProperties({
        selectedNodes: []
      }, true);
      var sNodes = selectAll2("." + ACTIVE3, this.element);
      this.selectGivenNodes(sNodes);
    };
    TreeView2.prototype.updateExpandedNodes = function() {
      this.setProperties({
        expandedNodes: []
      }, true);
      var eNodes = selectAll2('[aria-expanded="true"]', this.element);
      for (var i = 0, len = eNodes.length; i < len; i++) {
        this.addExpand(eNodes[parseInt(i.toString(), 10)]);
      }
    };
    TreeView2.prototype.removeData = function(node) {
      if (this.dataType === 1) {
        var dm = new DataManager(this.treeData);
        var id = this.getId(node);
        var data = {};
        var newId = this.isNumberTypeId ? parseFloat(id) : id;
        data[this.fields.id] = newId;
        dm.remove(this.fields.id, data);
        this.removeChildNodes(id);
      } else {
        var id = this.getId(node);
        this.updateChildField(this.treeData, this.fields, id, null, null, true);
      }
    };
    TreeView2.prototype.removeChildNodes = function(parentId) {
      var cNodes = this.getChildGroup(this.groupedData, parentId, false);
      var childData = [];
      if (cNodes) {
        for (var i = 0, len = cNodes.length; i < len; i++) {
          var dm = new DataManager(this.treeData);
          var id = getValue2(this.fields.id, cNodes[parseInt(i.toString(), 10)]).toString();
          var data = {};
          var currId = this.isNumberTypeId ? parseFloat(id) : id;
          data[this.fields.id] = currId;
          var nodeData = dm.remove(this.fields.id, data);
          childData.push(nodeData[0]);
          this.removeChildNodes(id);
        }
      }
      return childData;
    };
    TreeView2.prototype.doGivenAction = function(nodes, selector, toExpand) {
      for (var i = 0, len = nodes.length; i < len; i++) {
        var liEle = this.getElement(nodes[parseInt(i.toString(), 10)]);
        if (isNullOrUndefined2(liEle)) {
          continue;
        }
        var icon = select2("." + selector, select2("." + TEXTWRAP, liEle));
        if (!isNullOrUndefined2(icon)) {
          if (toExpand) {
            this.expandAction(liEle, icon, null);
          } else {
            this.collapseNode(liEle, icon, null);
          }
        }
      }
    };
    TreeView2.prototype.addGivenNodes = function(nodes, dropLi, index, isRemote, dropEle) {
      if (nodes.length === 0) {
        return;
      }
      var sNodes = this.getSortedData(nodes);
      var level = dropLi ? parseFloat(dropLi.getAttribute("aria-level")) + 1 : 1;
      if (isRemote) {
        this.updateMapper(level);
      }
      var li = ListBase.createListItemFromJson(this.createElement, sNodes, this.listBaseOption, level);
      var id = this.getId(dropLi);
      var dropIcon1;
      if (!isNullOrUndefined2(dropLi)) {
        dropIcon1 = select2("div." + ICON4, dropLi);
      }
      if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && this.preventExpand && !isNullOrUndefined2(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains("e-filemanager")) {
        this.preventExpand = true;
      }
      if (this.dataType !== 1) {
        this.addChildData(this.treeData, this.fields, id, nodes, index);
        this.isFirstRender = false;
      }
      var dropUl;
      if (!dropEle) {
        dropUl = dropLi ? this.expandParent(dropLi) : select2("." + PARENTITEM, this.element);
      } else {
        dropUl = dropEle;
      }
      var refNode = !isNullOrUndefined2(index) ? dropUl.childNodes[parseInt(index.toString(), 10)] : null;
      if (!this.isFirstRender || this.dataType === 1) {
        var args = this.expandArgs;
        if (refNode || this.sortOrder === "None") {
          for (var i = 0; i < li.length; i++) {
            dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
          }
          if (this.dataType === 1 && !isNullOrUndefined2(dropLi) && !this.preventExpand && !isNullOrUndefined2(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains("e-filemanager")) {
            this.preventExpand = false;
            var dropIcon = select2("div." + ICON4, dropLi);
            if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined2(args) || args.name !== "nodeExpanding")) {
              this.expandAction(dropLi, dropIcon, null);
            }
          }
        }
        if (!refNode && (this.sortOrder === "Ascending" || this.sortOrder === "Descending")) {
          if (dropUl.childNodes.length === 0) {
            for (var i = 0; i < li.length; i++) {
              dropUl.insertBefore(li[parseInt(i.toString(), 10)], refNode);
            }
            if (this.dataType === 1 && !isNullOrUndefined2(dropLi) && !this.preventExpand && !isNullOrUndefined2(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains("e-filemanager")) {
              this.preventExpand = false;
              var dropIcon = select2("div." + ICON4, dropLi);
              if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNullOrUndefined2(args) || args.name !== "nodeExpanding")) {
                this.expandAction(dropLi, dropIcon, null);
              }
            }
          } else {
            var cNodes = dropUl.childNodes;
            for (var i = 0; i < li.length; i++) {
              for (var j = 0; j < cNodes.length; j++) {
                var returnValue = this.sortOrder === "Ascending" ? cNodes[parseInt(j.toString(), 10)].textContent.toUpperCase() > li[parseInt(i.toString(), 10)].innerText.toUpperCase() : cNodes[parseInt(j.toString(), 10)].textContent.toUpperCase() < li[parseInt(i.toString(), 10)].innerText.toUpperCase();
                if (returnValue) {
                  dropUl.insertBefore(li[parseInt(i.toString(), 10)], cNodes[parseInt(j.toString(), 10)]);
                  break;
                }
                dropUl.insertBefore(li[parseInt(i.toString(), 10)], cNodes[cNodes.length]);
              }
            }
          }
        }
      }
      if (this.dataType === 1) {
        this.updateField(this.treeData, this.fields, id, "hasChildren", true);
        var refId = this.getId(refNode);
        var pos = isNullOrUndefined2(refId) ? this.treeData.length : this.getDataPos(this.treeData, this.fields, refId);
        for (var j = 0; j < nodes.length; j++) {
          if (!isNullOrUndefined2(id)) {
            var currId = this.isNumberTypeId ? parseFloat(id) : id;
            setValue3(this.fields.parentID, currId, nodes[parseInt(j.toString(), 10)]);
          }
          this.treeData.splice(pos, 0, nodes[parseInt(j.toString(), 10)]);
          pos++;
        }
      }
      this.finalizeNode(dropUl);
    };
    TreeView2.prototype.updateMapper = function(level) {
      var mapper5 = level === 1 ? this.fields : this.getChildFields(this.fields, level - 1, 1);
      this.updateListProp(mapper5);
    };
    TreeView2.prototype.updateListProp = function(mapper5) {
      var prop = this.getActualProperties(mapper5);
      this.listBaseOption.fields = prop;
      this.listBaseOption.fields.url = Object.prototype.hasOwnProperty.call(prop, "navigateUrl") ? prop.navigateUrl : "navigateUrl";
    };
    TreeView2.prototype.getDataPos = function(obj, mapper5, id) {
      var pos = null;
      for (var i = 0, objlen = obj.length; i < objlen; i++) {
        var nodeId = getValue2(mapper5.id, obj[parseInt(i.toString(), 10)]);
        if (obj[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === id) {
          return i;
        } else if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]))) {
          var data = getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]);
          pos = this.getDataPos(data, this.getChildMapper(mapper5), id);
          if (pos !== null) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", obj[parseInt(i.toString(), 10)]))) {
          var items = getValue2("child", obj[parseInt(i.toString(), 10)]);
          pos = this.getDataPos(items, this.getChildMapper(mapper5), id);
          if (pos !== null) {
            break;
          }
        }
      }
      return pos;
    };
    TreeView2.prototype.addChildData = function(obj, mapper5, id, data, index) {
      var updated;
      if (isNullOrUndefined2(id)) {
        index = isNullOrUndefined2(index) ? obj.length : index;
        for (var k = 0, len = data.length; k < len; k++) {
          obj.splice(index, 0, data[parseInt(k.toString(), 10)]);
          index++;
        }
        return updated;
      }
      for (var i = 0, objlen = obj.length; i < objlen; i++) {
        var nodeId = getValue2(mapper5.id, obj[parseInt(i.toString(), 10)]);
        if (obj[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === id) {
          if (typeof mapper5.child === "string" && Object.prototype.hasOwnProperty.call(obj[parseInt(i.toString(), 10)], mapper5.child) && obj[parseInt(i.toString(), 10)][mapper5.child] !== null || this.fields.dataSource instanceof DataManager && Object.prototype.hasOwnProperty.call(obj[parseInt(i.toString(), 10)], "child")) {
            var key = typeof mapper5.child === "string" ? mapper5.child : "child";
            var childData = getValue2(key, obj[parseInt(i.toString(), 10)]);
            if (isNullOrUndefined2(childData)) {
              childData = [];
            }
            index = isNullOrUndefined2(index) ? childData.length : index;
            for (var k = 0, len = data.length; k < len; k++) {
              childData.splice(index, 0, data[parseInt(k.toString(), 10)]);
              index++;
            }
          } else {
            var key = typeof mapper5.child === "string" ? mapper5.child : "child";
            obj[parseInt(i.toString(), 10)]["" + key] = data;
          }
          return true;
        } else if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]))) {
          var childObj = getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]);
          updated = this.addChildData(childObj, this.getChildMapper(mapper5), id, data, index);
          if (updated !== void 0) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", obj[parseInt(i.toString(), 10)]))) {
          var childData = getValue2("child", obj[parseInt(i.toString(), 10)]);
          updated = this.addChildData(childData, this.getChildMapper(mapper5), id, data, index);
          if (updated !== void 0) {
            break;
          }
        }
      }
      return updated;
    };
    TreeView2.prototype.doDisableAction = function(nodes) {
      var validNodes = this.nodeType(nodes);
      var validID = this.checkValidId(validNodes);
      this.validArr = [];
      for (var i = 0, len = validID.length; i < len; i++) {
        var id = validID[parseInt(i.toString(), 10)][this.fields.id].toString();
        if (id && this.disableNode.indexOf(id) === -1) {
          this.disableNode.push(id);
        }
        var liEle = this.getElement(id);
        if (liEle) {
          liEle.setAttribute("aria-disabled", "true");
          addClass2([liEle], DISABLE);
        }
      }
    };
    TreeView2.prototype.doEnableAction = function(nodes) {
      var strNodes = this.nodeType(nodes);
      for (var i = 0, len = strNodes.length; i < len; i++) {
        var liEle = this.getElement(strNodes[parseInt(i.toString(), 10)]);
        var id = strNodes[parseInt(i.toString(), 10)];
        if (id && this.disableNode.indexOf(id) !== -1) {
          this.disableNode.splice(this.disableNode.indexOf(id), 1);
        }
        if (liEle) {
          liEle.removeAttribute("aria-disabled");
          removeClass2([liEle], DISABLE);
        }
      }
    };
    TreeView2.prototype.nodeType = function(nodes) {
      var validID = [];
      for (var i = 0, len = nodes.length; i < len; i++) {
        var id = void 0;
        if (typeof nodes[parseInt(i.toString(), 10)] == "string") {
          id = nodes[parseInt(i.toString(), 10)] ? nodes[parseInt(i.toString(), 10)].toString() : null;
        } else if (typeof nodes[parseInt(i.toString(), 10)] === "object") {
          id = nodes[parseInt(i.toString(), 10)] ? nodes[parseInt(i.toString(), 10)].getAttribute("data-uid").toString() : null;
        }
        if (validID.indexOf(id) === -1) {
          validID.push(id);
        }
      }
      return validID;
    };
    TreeView2.prototype.checkValidId = function(node) {
      var _this = this;
      if (this.dataType === 1) {
        this.validArr = this.treeData.filter(function(data) {
          return node.indexOf(data[_this.fields.id] ? data[_this.fields.id].toString() : null) !== -1;
        });
      } else if (this.dataType === 2) {
        for (var k = 0; k < this.treeData.length; k++) {
          var id = this.treeData[parseInt(k.toString(), 10)][this.fields.id] ? this.treeData[parseInt(k.toString(), 10)][this.fields.id].toString() : null;
          if (node.indexOf(id) !== -1) {
            this.validArr.push(this.treeData[parseInt(k.toString(), 10)]);
          }
          var childItems = getValue2(this.fields.child.toString(), this.treeData[parseInt(k.toString(), 10)]);
          if (childItems) {
            this.filterNestedChild(childItems, node);
          }
        }
      }
      return this.validArr;
    };
    TreeView2.prototype.filterNestedChild = function(treeData, nodes) {
      for (var k = 0; k < treeData.length; k++) {
        var id = treeData[parseInt(k.toString(), 10)][this.fields.id] ? treeData[parseInt(k.toString(), 10)][this.fields.id].toString() : null;
        if (nodes.indexOf(id) !== -1) {
          this.validArr.push(treeData[parseInt(k.toString(), 10)]);
        }
        var childItems = getValue2(this.fields.child.toString(), treeData[parseInt(k.toString(), 10)]);
        if (childItems) {
          this.filterNestedChild(childItems, nodes);
        }
      }
    };
    TreeView2.prototype.setTouchClass = function() {
      var ele = closest2(this.element, "." + BIGGER);
      this.touchClass = isNullOrUndefined2(ele) ? "" : SMALL;
    };
    TreeView2.prototype.updatePersistProp = function() {
      this.removeField(this.treeData, this.fields, ["selected", "expanded"]);
      var sleNodes = this.selectedNodes;
      for (var l = 0, slelen = sleNodes.length; l < slelen; l++) {
        this.updateField(this.treeData, this.fields, sleNodes[parseInt(l.toString(), 10)], "selected", true);
      }
      var enodes = this.expandedNodes;
      for (var k = 0, nodelen = enodes.length; k < nodelen; k++) {
        this.updateField(this.treeData, this.fields, enodes[parseInt(k.toString(), 10)], "expanded", true);
      }
      if (this.showCheckBox) {
        this.removeField(this.treeData, this.fields, ["isChecked"]);
        var cnodes = this.checkedNodes;
        for (var m = 0, nodelen = cnodes.length; m < nodelen; m++) {
          this.updateField(this.treeData, this.fields, cnodes[parseInt(m.toString(), 10)], "isChecked", true);
        }
      }
    };
    TreeView2.prototype.removeField = function(obj, mapper5, names) {
      if (isNullOrUndefined2(obj) || isNullOrUndefined2(mapper5)) {
        return;
      }
      for (var i = 0, objlen = obj.length; i < objlen; i++) {
        for (var j = 0; j < names.length; j++) {
          var field = this.getMapperProp(mapper5, names[parseInt(j.toString(), 10)]);
          if (!isNullOrUndefined2(obj[parseInt(i.toString(), 10)]["" + field])) {
            delete obj[parseInt(i.toString(), 10)]["" + field];
          }
        }
        if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]))) {
          this.removeField(getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]), this.getChildMapper(mapper5), names);
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", obj[parseInt(i.toString(), 10)]))) {
          this.removeField(getValue2("child", obj[parseInt(i.toString(), 10)]), this.getChildMapper(mapper5), names);
        }
      }
    };
    TreeView2.prototype.getMapperProp = function(mapper5, fieldName) {
      switch (fieldName) {
        case "selected":
          return !isNullOrUndefined2(mapper5.selected) ? mapper5.selected : "selected";
        case "expanded":
          return !isNullOrUndefined2(mapper5.expanded) ? mapper5.expanded : "expanded";
        case "isChecked":
          return !isNullOrUndefined2(mapper5.isChecked) ? mapper5.isChecked : "isChecked";
        case "hasChildren":
          return !isNullOrUndefined2(mapper5.hasChildren) ? mapper5.hasChildren : "hasChildren";
        default:
          return fieldName;
      }
    };
    TreeView2.prototype.updateField = function(obj, mapper5, id, key, value) {
      if (isNullOrUndefined2(id)) {
        return;
      } else if (this.dataType === 1) {
        var newId = this.isNumberTypeId ? parseFloat(id) : id;
        var resultData = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.id, "equal", newId, false));
        setValue3(this.getMapperProp(mapper5, key), value, resultData[0]);
      } else {
        this.updateChildField(obj, mapper5, id, key, value);
      }
    };
    TreeView2.prototype.updateChildField = function(obj, mapper5, id, key, value, remove3) {
      var removedData;
      if (isNullOrUndefined2(obj)) {
        return removedData;
      }
      for (var i = 0, objlen = obj.length; i < objlen; i++) {
        var nodeId = getValue2(mapper5.id, obj[parseInt(i.toString(), 10)]);
        if (obj[parseInt(i.toString(), 10)] && !isNullOrUndefined2(nodeId) && nodeId.toString() === id) {
          if (remove3) {
            removedData = obj.splice(i, 1);
          } else {
            setValue3(this.getMapperProp(mapper5, key), value, obj[parseInt(i.toString(), 10)]);
            removedData = [];
          }
          return removedData;
        } else if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]))) {
          var childData = getValue2(mapper5.child, obj[parseInt(i.toString(), 10)]);
          removedData = this.updateChildField(childData, this.getChildMapper(mapper5), id, key, value, remove3);
          if (removedData !== void 0) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", obj[parseInt(i.toString(), 10)]))) {
          var childItems = getValue2("child", obj[parseInt(i.toString(), 10)]);
          removedData = this.updateChildField(childItems, this.getChildMapper(mapper5), id, key, value, remove3);
          if (removedData !== void 0) {
            break;
          }
        }
      }
      return removedData;
    };
    TreeView2.prototype.triggerEvent = function(action, node) {
      this.renderReactTemplates();
      if (action === "addNodes") {
        var nodeData = [];
        for (var i = 0; i < node.length; i++) {
          nodeData.push(this.getNode(this.getElement(isNullOrUndefined2(node[parseInt(i.toString(), 10)][this.fields.id]) ? getValue2(this.fields.id, node[parseInt(i.toString(), 10)]).toString() : null)));
        }
        node = nodeData;
      }
      var eventArgs = {
        data: this.treeData,
        action,
        nodeData: node
      };
      this.trigger("dataSourceChanged", eventArgs);
    };
    TreeView2.prototype.wireInputEvents = function(inpEle) {
      EventHandler2.add(inpEle, "blur", this.inputFocusOut, this);
    };
    TreeView2.prototype.wireEditingEvents = function(toBind) {
      var _this = this;
      if (toBind && !this.disabled) {
        this.touchEditObj = new Touch2(this.element, {
          tap: function(e) {
            if (_this.isDoubleTapped(e) && e.tapCount === 2) {
              e.originalEvent.preventDefault();
              _this.editingHandler(e.originalEvent);
            }
          }
        });
      } else {
        if (this.touchEditObj) {
          this.touchEditObj.destroy();
        }
      }
    };
    TreeView2.prototype.wireClickEvent = function(toBind) {
      var _this = this;
      if (toBind) {
        this.touchClickObj = new Touch2(this.element, {
          tap: function(e) {
            _this.clickHandler(e);
          }
        });
      } else {
        if (this.touchClickObj) {
          this.touchClickObj.destroy();
        }
      }
    };
    TreeView2.prototype.wireExpandOnEvent = function(toBind) {
      var _this = this;
      if (toBind) {
        this.touchExpandObj = new Touch2(this.element, {
          tap: function(e) {
            if ((_this.expandOnType === "Click" || _this.expandOnType === "DblClick" && _this.isDoubleTapped(e) && e.tapCount === 2) && e.originalEvent.which !== 3) {
              _this.expandHandler(e);
            }
          }
        });
      } else {
        if (this.touchExpandObj) {
          this.touchExpandObj.destroy();
        }
      }
    };
    TreeView2.prototype.mouseDownHandler = function(e) {
      this.mouseDownStatus = true;
      if (e.shiftKey || e.ctrlKey) {
        e.preventDefault();
      }
      if (e.ctrlKey && this.allowMultiSelection) {
        EventHandler2.add(this.element, "contextmenu", this.preventContextMenu, this);
      }
    };
    TreeView2.prototype.preventContextMenu = function(e) {
      e.preventDefault();
    };
    TreeView2.prototype.wireEvents = function() {
      EventHandler2.add(this.element, "mousedown", this.mouseDownHandler, this);
      this.wireClickEvent(true);
      if (this.expandOnType !== "None") {
        this.wireExpandOnEvent(true);
      }
      EventHandler2.add(this.element, "mouseover", this.onMouseOver, this);
      EventHandler2.add(this.element, "mouseout", this.onMouseLeave, this);
      this.keyboardModule = new KeyboardEvents2(this.element, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    TreeView2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.element, "mousedown", this.mouseDownHandler);
      this.wireClickEvent(false);
      this.wireExpandOnEvent(false);
      EventHandler2.remove(this.element, "mouseover", this.onMouseOver);
      EventHandler2.remove(this.element, "mouseout", this.onMouseLeave);
      if (!this.disabled) {
        this.keyboardModule.destroy();
      }
    };
    TreeView2.prototype.parents = function(element2, selector) {
      var matched = [];
      var el = element2.parentNode;
      while (!isNullOrUndefined2(el)) {
        if (matches2(el, selector)) {
          matched.push(el);
        }
        el = el.parentNode;
      }
      return matched;
    };
    TreeView2.prototype.isDoubleTapped = function(e) {
      var target = e.originalEvent.target;
      var secondTap;
      if (target && e.tapCount) {
        if (e.tapCount === 1) {
          this.firstTap = closest2(target, "." + LISTITEM);
        } else if (e.tapCount === 2) {
          secondTap = closest2(target, "." + LISTITEM);
        }
      }
      return this.firstTap === secondTap;
    };
    TreeView2.prototype.isDescendant = function(parent, child) {
      var node = child.parentNode;
      while (!isNullOrUndefined2(node)) {
        if (node === parent) {
          return true;
        }
        node = node.parentNode;
      }
      return false;
    };
    TreeView2.prototype.showSpinner = function(element2) {
      addClass2([element2], LOAD);
      createSpinner({
        target: element2,
        width: Browser2.isDevice ? 16 : 14
      }, this.createElement);
      showSpinner(element2);
    };
    TreeView2.prototype.hideSpinner = function(element2) {
      hideSpinner(element2);
      element2.innerHTML = "";
      removeClass2([element2], LOAD);
    };
    TreeView2.prototype.setCheckedNodes = function(nodes) {
      nodes = JSON.parse(JSON.stringify(nodes));
      if (nodes.length > 1 && typeof this.nodeChecked === "function" && this.nodeChecked.length > 0) {
        this.isFilter = true;
      }
      this.uncheckAll(this.checkedNodes);
      this.setIndeterminate(nodes);
      if (nodes.length > 0) {
        this.checkAll(nodes);
      }
    };
    TreeView2.prototype.setValidCheckedNode = function(node, nodes) {
      if (nodes === void 0) {
        nodes = [];
      }
      if (this.dataType === 1) {
        var mapper5 = this.fields;
        var resultData = new DataManager(this.treeData).executeLocal(new Query().where(mapper5.id, "equal", node, true));
        if (resultData[0]) {
          this.setChildCheckState(resultData, node, resultData[0], nodes);
          if (this.autoCheck) {
            var parent_4 = resultData[0][this.fields.parentID] ? resultData[0][this.fields.parentID].toString() : null;
            var childNodes = this.getChildNodes(this.treeData, parent_4);
            var count = 0;
            for (var len = 0; len < childNodes.length; len++) {
              var childId = childNodes[parseInt(len.toString(), 10)][this.fields.id].toString();
              if (this.checkedNodes.indexOf(childId) !== -1) {
                count++;
              }
            }
            if (count === childNodes.length && this.checkedNodes.indexOf(parent_4) === -1 && parent_4) {
              this.checkDisabledState(parent_4);
            }
          }
        }
      } else if (this.dataType === 2) {
        for (var a = 0; a < this.treeData.length; a++) {
          var index = this.treeData[parseInt(a.toString(), 10)][this.fields.id] ? this.treeData[parseInt(a.toString(), 10)][this.fields.id].toString() : "";
          if (index === node && this.checkedNodes.indexOf(node) === -1) {
            this.checkDisabledState(node);
            break;
          }
          var childItems = getValue2(this.fields.child.toString(), this.treeData[parseInt(a.toString(), 10)]);
          if (childItems) {
            this.setChildCheckState(childItems, node, this.treeData[parseInt(a.toString(), 10)], nodes);
          }
        }
      }
    };
    TreeView2.prototype.setChildCheckState = function(childItems, node, treeData, nodes) {
      if (nodes === void 0) {
        nodes = [];
      }
      var checkedParent;
      var count = 0;
      if (this.dataType === 1) {
        if (treeData) {
          checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : null;
        }
        for (var index = 0; index < childItems.length; index++) {
          var checkNode = childItems[parseInt(index.toString(), 10)][this.fields.id] ? childItems[parseInt(index.toString(), 10)][this.fields.id].toString() : null;
          if (treeData && checkedParent && this.autoCheck) {
            if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkNode) === -1) {
              this.checkDisabledState(checkNode, childItems[index]);
            }
          }
          if (checkNode === node && this.checkedNodes.indexOf(node) === -1) {
            this.checkDisabledState(node);
          }
          var subChildItems = this.getChildNodes(this.treeData, checkNode);
          var isParentNodeCheck = nodes.length === 1 && nodes[0] === checkNode;
          if (subChildItems.length === node.length || isParentNodeCheck) {
            this.setChildCheckState(subChildItems, node, treeData);
          }
        }
      } else {
        if (treeData) {
          checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : "";
        }
        for (var index = 0; index < childItems.length; index++) {
          var checkedChild = childItems[parseInt(index.toString(), 10)][this.fields.id] ? childItems[parseInt(index.toString(), 10)][this.fields.id].toString() : "";
          var isParentNodeCheck = [node].length === 1 && nodes.length === 0;
          if (treeData && checkedParent && this.autoCheck) {
            if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1 && (checkedChild === node || isParentNodeCheck)) {
              this.checkDisabledState(checkedChild, childItems[index]);
            }
          }
          if (checkedChild === node && this.checkedNodes.indexOf(node) === -1) {
            this.checkDisabledState(node);
          }
          var subChildItems = getValue2(this.fields.child.toString(), childItems[parseInt(index.toString(), 10)]);
          if (subChildItems) {
            this.setChildCheckState(subChildItems, node, childItems[parseInt(index.toString(), 10)]);
          }
          if (this.checkedNodes.indexOf(checkedChild) !== -1 && this.autoCheck) {
            count++;
          }
          if (count === childItems.length && this.checkedNodes.indexOf(checkedParent) === -1 && this.autoCheck) {
            this.checkDisabledState(checkedParent, treeData);
          }
        }
      }
    };
    TreeView2.prototype.setIndeterminate = function(nodes) {
      for (var i = 0; i < nodes.length; i++) {
        this.setValidCheckedNode(nodes[parseInt(i.toString(), 10)], nodes);
      }
    };
    TreeView2.prototype.updatePosition = function(id, newData, isRefreshChild, childValue) {
      if (this.dataType === 1) {
        var pos = this.getDataPos(this.treeData, this.fields, id);
        this.treeData.splice(pos, 1, newData);
        if (isRefreshChild) {
          this.removeChildNodes(id);
          for (var j = 0; j < childValue.length; j++) {
            this.treeData.splice(pos, 0, childValue[parseInt(j.toString(), 10)]);
            pos++;
          }
        }
        this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
      } else {
        this.updateChildPosition(this.treeData, this.fields, id, [newData], void 0);
      }
    };
    TreeView2.prototype.updateChildPosition = function(treeData, mapper5, currID, newData, index) {
      var found;
      for (var i = 0, objlen = treeData.length; i < objlen; i++) {
        var nodeId = getValue2(mapper5.id, treeData[parseInt(i.toString(), 10)]);
        if (treeData[parseInt(i.toString(), 10)] && nodeId && nodeId.toString() === currID) {
          treeData[parseInt(i.toString(), 10)] = newData[0];
          return true;
        } else if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, treeData[parseInt(i.toString(), 10)]))) {
          var childObj = getValue2(mapper5.child, treeData[parseInt(i.toString(), 10)]);
          found = this.updateChildPosition(childObj, this.getChildMapper(mapper5), currID, newData, index);
          if (found !== void 0) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", treeData[parseInt(i.toString(), 10)]))) {
          var childData = getValue2("child", treeData[parseInt(i.toString(), 10)]);
          found = this.updateChildPosition(childData, this.getChildMapper(mapper5), currID, newData, index);
          if (found !== void 0) {
            break;
          }
        }
      }
      return found;
    };
    TreeView2.prototype.dynamicState = function() {
      this.setDragAndDrop(this.allowDragAndDrop);
      this.wireEditingEvents(this.allowEditing);
      if (!this.disabled) {
        this.wireEvents();
        this.setRipple();
      } else {
        this.unWireEvents();
        this.rippleFn();
        this.rippleIconFn();
      }
    };
    TreeView2.prototype.crudOperation = function(operation, nodes, target, newText, newNode, index, prevent) {
      var _this = this;
      var data = this.fields.dataSource;
      var matchedArr = [];
      var query = this.getQuery(this.fields);
      var key = this.fields.id;
      var crud;
      var changes = {
        addedRecords: [],
        deletedRecords: [],
        changedRecords: []
      };
      var nodesID = [];
      if (nodes) {
        nodesID = this.nodeType(nodes);
      } else if (target) {
        if (typeof target == "string") {
          nodesID[0] = target.toString();
        } else if (typeof target === "object") {
          nodesID[0] = target.getAttribute("data-uid").toString();
        }
      }
      for (var i = 0, len = nodesID.length; i < len; i++) {
        var liEle = this.getElement(nodesID[parseInt(i.toString(), 10)]);
        if (isNullOrUndefined2(liEle)) {
          continue;
        }
        var removedData = this.getNodeObject(nodesID[parseInt(i.toString(), 10)]);
        matchedArr.push(removedData);
      }
      switch (operation) {
        case "delete":
          if (nodes.length === 1) {
            crud = data.remove(key, matchedArr[0], query.fromTable, query);
          } else {
            changes.deletedRecords = matchedArr;
            crud = data.saveChanges(changes, key, query.fromTable, query);
          }
          crud.then(function() {
            return _this.deleteSuccess(nodesID);
          }).catch(function(e) {
            return _this.dmFailure(e);
          });
          break;
        case "update":
          matchedArr[0][this.fields.text] = newText;
          crud = data.update(key, matchedArr[0], query.fromTable, query);
          crud.then(function() {
            return _this.editSucess(target, newText, prevent);
          }).catch(function(e) {
            return _this.dmFailure(e, target, prevent);
          });
          break;
        case "insert":
          if (newNode.length === 1) {
            crud = data.insert(newNode[0], query.fromTable, query);
          } else {
            var arr = [];
            for (var i = 0, len = newNode.length; i < len; i++) {
              arr.push(newNode[parseInt(i.toString(), 10)]);
            }
            changes.addedRecords = arr;
            crud = data.saveChanges(changes, key, query.fromTable, query);
          }
          crud.then(function() {
            var dropLi = _this.getElement(target);
            _this.addSuccess(newNode, dropLi, index);
            _this.preventExpand = false;
          }).catch(function(e) {
            return _this.dmFailure(e);
          });
          break;
      }
    };
    TreeView2.prototype.deleteSuccess = function(nodes) {
      var nodeData = [];
      for (var i = 0, len = nodes.length; i < len; i++) {
        var liEle = this.getElement(nodes[parseInt(i.toString(), 10)]);
        nodeData.push(this.getNode(liEle));
        if (isNullOrUndefined2(liEle)) {
          continue;
        }
        this.removeNode(liEle);
      }
      this.updateInstance();
      if (this.dataType === 1) {
        this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
      }
      this.triggerEvent("removeNode", nodeData);
    };
    TreeView2.prototype.editSucess = function(target, newText, prevent) {
      var liEle = this.getElement(target);
      var txtEle = select2("." + LISTTEXT, liEle);
      this.appendNewText(liEle, txtEle, newText, prevent);
    };
    TreeView2.prototype.addSuccess = function(nodes, dropLi, index) {
      var _this = this;
      var dropUl;
      var icon = dropLi ? dropLi.querySelector("." + ICON4) : null;
      if (dropLi && icon && icon.classList.contains(EXPANDABLE) && dropLi.querySelector("." + PARENTITEM) === null) {
        this.renderChildNodes(dropLi, null, function() {
          dropUl = dropLi.querySelector("." + PARENTITEM);
          _this.addGivenNodes(nodes, dropLi, index, true, dropUl);
          _this.triggerEvent("addNodes", nodes);
        });
      } else {
        this.addGivenNodes(nodes, dropLi, index, true);
        this.triggerEvent("addNodes", nodes);
      }
    };
    TreeView2.prototype.dmFailure = function(e, target, prevent) {
      if (target) {
        this.updatePreviousText(target, prevent);
      }
      this.trigger("actionFailure", {
        error: e
      });
    };
    TreeView2.prototype.updatePreviousText = function(target, prevent) {
      var liEle = this.getElement(target);
      var txtEle = select2("." + LISTTEXT, liEle);
      this.updateText(liEle, txtEle, this.oldText, prevent);
    };
    TreeView2.prototype.getHierarchicalParentId = function(node, data, parentsID) {
      var _this = this;
      var index = data.findIndex(function(data2) {
        return data2[_this.fields.id] && data2[_this.fields.id].toString() === node;
      });
      if (index === -1) {
        for (var i = 0; i < data.length; i++) {
          var childItems = getValue2(this.fields.child.toString(), data[parseInt(i.toString(), 10)]);
          if (!isNullOrUndefined2(childItems)) {
            index = childItems.findIndex(function(data2) {
              return data2[_this.fields.id] && data2[_this.fields.id].toString() === node;
            });
            if (index === -1) {
              this.getHierarchicalParentId(node, childItems, parentsID);
            } else {
              parentsID.push(data[parseInt(i.toString(), 10)][this.fields.id].toString());
              this.getHierarchicalParentId(data[parseInt(i.toString(), 10)][this.fields.id].toString(), this.treeData, parentsID);
              break;
            }
          }
        }
      }
      return parentsID;
    };
    TreeView2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "allowDragAndDrop":
            this.setDragAndDrop(this.allowDragAndDrop);
            break;
          case "dragArea":
            if (this.allowDragAndDrop) {
              this.dragObj.dragArea = this.dragArea;
            }
            break;
          case "allowEditing":
            this.wireEditingEvents(this.allowEditing);
            break;
          case "allowMultiSelection":
            if (this.selectedNodes.length > 1) {
              var sNode = this.getElement(this.selectedNodes[0]);
              this.isLoaded = false;
              this.removeSelectAll();
              this.selectNode(sNode, null);
              this.isLoaded = true;
            }
            this.setMultiSelect(this.allowMultiSelection);
            this.addMultiSelect(this.allowMultiSelection);
            break;
          case "allowTextWrap":
            this.setTextWrap();
            this.updateWrap();
            break;
          case "checkedNodes":
            if (this.showCheckBox) {
              this.checkedNodes = oldProp.checkedNodes;
              this.setCheckedNodes(newProp.checkedNodes);
            }
            break;
          case "autoCheck":
            if (this.showCheckBox) {
              this.autoCheck = newProp.autoCheck;
              this.ensureIndeterminate();
            }
            break;
          case "cssClass":
            this.setCssClass(oldProp.cssClass, newProp.cssClass);
            break;
          case "enableRtl":
            this.setEnableRtl();
            break;
          case "expandedNodes":
            this.isAnimate = false;
            this.setProperties({
              expandedNodes: []
            }, true);
            this.collapseAll();
            this.isInitalExpand = true;
            this.setProperties({
              expandedNodes: isNullOrUndefined2(newProp.expandedNodes) ? [] : newProp.expandedNodes
            }, true);
            this.doExpandAction();
            this.isInitalExpand = false;
            this.isAnimate = true;
            break;
          case "expandOn":
            this.wireExpandOnEvent(false);
            this.setExpandOnType();
            if (this.expandOnType !== "None" && !this.disabled) {
              this.wireExpandOnEvent(true);
            }
            break;
          case "disabled":
            this.setDisabledMode();
            this.dynamicState();
            break;
          case "fields":
            this.isAnimate = false;
            this.isFieldChange = true;
            this.initialRender = true;
            if (!this.isReact || this.isReact && !(this.fields.dataSource instanceof DataManager)) {
              if (!this.element.classList.contains("e-filtering")) {
                this.DDTTreeData = JSON.parse(JSON.stringify(this.fields.dataSource));
              }
              this.reRenderNodes();
            }
            this.initialRender = false;
            this.isAnimate = true;
            this.isFieldChange = false;
            break;
          case "fullRowSelect":
            this.setFullRow(this.fullRowSelect);
            this.addFullRow(this.fullRowSelect);
            if (this.allowTextWrap) {
              this.setTextWrap();
              this.updateWrap();
            }
            break;
          case "loadOnDemand":
            if (this.loadOnDemand === false && !this.onLoaded) {
              var nodes = this.element.querySelectorAll("li");
              var i = 0;
              while (i < nodes.length) {
                if (nodes[parseInt(i.toString(), 10)].getAttribute("aria-expanded") !== "true") {
                  this.renderChildNodes(nodes[parseInt(i.toString(), 10)], true, null, true);
                }
                i++;
              }
              this.onLoaded = true;
            }
            break;
          case "nodeTemplate":
            this.hasTemplate = false;
            this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
            this.reRenderNodes();
            break;
          case "selectedNodes":
            this.removeSelectAll();
            this.setProperties({
              selectedNodes: newProp.selectedNodes
            }, true);
            this.doSelectionAction();
            break;
          case "showCheckBox":
          case "checkDisabledChildren":
            this.reRenderNodes();
            break;
          case "sortOrder":
            this.reRenderNodes();
            break;
          case "fullRowNavigable":
            this.setProperties({
              fullRowNavigable: newProp.fullRowNavigable
            }, true);
            this.listBaseOption.itemNavigable = newProp.fullRowNavigable;
            this.reRenderNodes();
            break;
        }
      }
    };
    TreeView2.prototype.destroy = function() {
      this.clearTemplate();
      this.element.removeAttribute("aria-activedescendant");
      this.unWireEvents();
      this.wireEditingEvents(false);
      if (!this.disabled) {
        this.rippleFn();
        this.rippleIconFn();
      }
      this.setCssClass(this.cssClass, null);
      this.setDragAndDrop(false);
      this.setFullRow(false);
      if (this.ulElement && this.ulElement.parentElement) {
        this.ulElement.parentElement.removeChild(this.ulElement);
      }
      this.ulElement = null;
      this.liList = null;
      this.startNode = null;
      this.firstTap = null;
      this.expandArgs = null;
      this.dragLi = null;
      this.dragTarget = null;
      this.dragParent = null;
      this.dragObj = null;
      this.dropObj = null;
      this.inputObj = null;
      this.touchEditObj = null;
      this.touchExpandObj = null;
      this.touchClickObj = null;
      _super.prototype.destroy.call(this);
    };
    TreeView2.prototype.addNodes = function(nodes, target, index, preventTargetExpand) {
      if (isNullOrUndefined2(nodes)) {
        return;
      }
      nodes = JSON.parse(JSON.stringify(nodes));
      var dropLi = this.getElement(target);
      this.preventExpand = preventTargetExpand;
      if (this.fields.dataSource instanceof DataManager) {
        if (!this.isOffline) {
          this.crudOperation("insert", null, target, null, nodes, index, this.preventExpand);
        } else {
          this.addSuccess(nodes, dropLi, index);
        }
      } else if (this.dataType === 2) {
        this.addGivenNodes(nodes, dropLi, index);
      } else {
        if (dropLi) {
          this.addGivenNodes(nodes, dropLi, index);
        } else {
          nodes = this.getSortedData(nodes);
          for (var i = 0; i < nodes.length; i++) {
            var pid = getValue2(this.fields.parentID, nodes[parseInt(i.toString(), 10)]);
            dropLi = pid ? this.getElement(pid.toString()) : pid;
            if (!isNullOrUndefined2(pid) && isNullOrUndefined2(dropLi)) {
              this.isHiddenItem = true;
              this.preventExpand = false;
              this.ensureVisible(pid);
              this.preventExpand = preventTargetExpand;
              this.isHiddenItem = false;
              dropLi = this.getElement(pid.toString());
            }
            this.addGivenNodes([nodes[parseInt(i.toString(), 10)]], dropLi, index);
          }
        }
        this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
      }
      this.setNodeFocusable();
      this.updateCheckedStateFromDS();
      if (this.showCheckBox && dropLi) {
        this.ensureParentCheckState(dropLi);
      }
      if (this.fields.dataSource instanceof DataManager === false) {
        this.preventExpand = false;
        this.triggerEvent("addNodes", nodes);
      }
    };
    TreeView2.prototype.beginEdit = function(node) {
      var ele = this.getElement(node);
      if (isNullOrUndefined2(ele) || this.disabled) {
        return;
      }
      this.createTextbox(ele);
    };
    TreeView2.prototype.checkAll = function(nodes) {
      if (this.showCheckBox) {
        this.doCheckBoxAction(nodes, true);
      }
    };
    TreeView2.prototype.collapseAll = function(nodes, level, excludeHiddenNodes) {
      if (!isNullOrUndefined2(nodes)) {
        this.doGivenAction(nodes, COLLAPSIBLE, false);
      } else {
        if (level > 0) {
          this.collapseByLevel(select2("." + PARENTITEM, this.element), level, excludeHiddenNodes);
        } else {
          this.collapseAllNodes(excludeHiddenNodes);
        }
      }
    };
    TreeView2.prototype.disableNodes = function(nodes) {
      if (!isNullOrUndefined2(nodes)) {
        this.doDisableAction(nodes);
      }
    };
    TreeView2.prototype.enableNodes = function(nodes) {
      if (!isNullOrUndefined2(nodes)) {
        this.doEnableAction(nodes);
      }
    };
    TreeView2.prototype.ensureVisible = function(node) {
      var parentsId = [];
      if (this.dataType === 1) {
        var nodeData = this.getTreeData(node);
        while (nodeData.length !== 0 && !isNullOrUndefined2(nodeData[0][this.fields.parentID])) {
          parentsId.push(nodeData[0][this.fields.parentID].toString());
          nodeData = this.getTreeData(nodeData[0][this.fields.parentID].toString());
        }
      } else if (this.dataType === 2) {
        parentsId = this.getHierarchicalParentId(node, this.treeData, parentsId);
      }
      this.expandAll(parentsId.reverse(), null, null, this.isHiddenItem);
      var liEle = this.getElement(node);
      if (!isNullOrUndefined2(liEle)) {
        if (typeof node == "object") {
          var parents = this.parents(liEle, "." + LISTITEM);
          this.expandAll(parents);
        }
        setTimeout(function() {
          liEle.scrollIntoView({
            behavior: "smooth"
          });
        }, 450);
      }
    };
    TreeView2.prototype.expandAll = function(nodes, level, excludeHiddenNodes, preventAnimation) {
      this.isAnimate = !preventAnimation;
      if (!isNullOrUndefined2(nodes)) {
        this.doGivenAction(nodes, EXPANDABLE, true);
      } else {
        if (level > 0) {
          this.expandByLevel(select2("." + PARENTITEM, this.element), level, excludeHiddenNodes);
        } else {
          this.expandAllNodes(excludeHiddenNodes);
          if (!this.loadOnDemand || this.element.classList.contains("e-filtering")) {
            this.updateAttributes(this.element);
            this.updateList();
          }
        }
      }
      this.isAnimate = true;
    };
    TreeView2.prototype.getAllCheckedNodes = function() {
      var checkNodes = this.checkedNodes;
      return checkNodes;
    };
    TreeView2.prototype.getDisabledNodes = function() {
      var disabledNodes = this.disableNode;
      return disabledNodes;
    };
    TreeView2.prototype.getNode = function(node) {
      var ele = this.getElement(node);
      return this.getNodeData(ele, true);
    };
    TreeView2.prototype.getTreeData = function(node) {
      var id = this.getId(node);
      this.updatePersistProp();
      if (isNullOrUndefined2(id)) {
        return this.treeData;
      } else {
        var data = this.getNodeObject(id);
        return isNullOrUndefined2(data) ? [] : [data];
      }
    };
    TreeView2.prototype.moveNodes = function(sourceNodes, target, index, preventTargetExpand) {
      if (isNullOrUndefined2(sourceNodes) || sourceNodes.length === 0) {
        return;
      }
      var dropLi = this.getElement(target);
      var nodeData = [];
      if (isNullOrUndefined2(dropLi)) {
        this.isHiddenItem = true;
        this.ensureVisible(target);
        this.isHiddenItem = false;
        dropLi = this.getElement(target);
      }
      for (var i = 0; i < sourceNodes.length; i++) {
        var dragLi = this.getElement(sourceNodes[parseInt(i.toString(), 10)]);
        nodeData.push(this.getNode(dragLi));
        if (isNullOrUndefined2(dragLi) || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi)) {
          continue;
        }
        this.preventExpand = preventTargetExpand;
        this.dropAsChildNode(dragLi, dropLi, this, index, null, null, null, dropLi);
      }
      if (this.fields.dataSource instanceof DataManager === false) {
        this.preventExpand = false;
      }
      this.triggerEvent("moveNodes", nodeData);
    };
    TreeView2.prototype.refreshNode = function(target, newData) {
      if (isNullOrUndefined2(target) || isNullOrUndefined2(newData)) {
        return;
      }
      var isRefreshChild = false;
      if (this.dataType === 1 && newData.length > 1) {
        isRefreshChild = true;
      } else if (this.dataType === 2 && newData.length === 1) {
        var updatedChildValue = getValue2(this.fields.child.toString(), newData[0]);
        if (!isNullOrUndefined2(updatedChildValue)) {
          isRefreshChild = true;
        }
      }
      var liEle = this.getElement(target);
      var id = liEle ? liEle.getAttribute("data-uid") : target ? target.toString() : null;
      this.refreshData = this.getNodeObject(id);
      newData = JSON.parse(JSON.stringify(newData));
      var newNodeData;
      var parentData;
      if (this.dataType === 1 && isRefreshChild) {
        for (var k = 0; k < newData.length; k++) {
          if (isNullOrUndefined2(newData[parseInt(k.toString(), 10)][this.fields.parentID])) {
            parentData = newData[parseInt(k.toString(), 10)];
            newData.splice(k, 1);
            break;
          }
        }
        newNodeData = extend2({}, this.refreshData, parentData);
      } else {
        newNodeData = extend2({}, this.refreshData, newData[0]);
      }
      if (isNullOrUndefined2(liEle)) {
        this.updatePosition(id, newNodeData, isRefreshChild, newData);
        return;
      }
      this.isRefreshed = true;
      var level = parseFloat(liEle.getAttribute("aria-level"));
      var newliEle = ListBase.createListItemFromJson(this.createElement, [newNodeData], this.listBaseOption, level);
      var ul = select2("." + PARENTITEM, liEle);
      var childItems = getValue2(this.fields.child.toString(), newNodeData);
      if (isRefreshChild && ul || isRefreshChild && !isNullOrUndefined2(childItems)) {
        var parentEle = liEle.parentElement;
        var index = Array.prototype.indexOf.call(parentEle.childNodes, liEle);
        remove(liEle);
        parentEle.insertBefore(newliEle[0], parentEle.childNodes[parseInt(index.toString(), 10)]);
        this.updatePosition(id, newNodeData, isRefreshChild, newData);
        if (isRefreshChild && ul) {
          this.expandAll([id]);
        }
      } else {
        var txtEle = select2("." + TEXTWRAP, liEle);
        var newTextEle = select2("." + TEXTWRAP, newliEle[0]);
        var icon = select2("div." + ICON4, txtEle);
        var newIcon = select2("div." + ICON4, newTextEle);
        if (icon && newIcon) {
          if (newIcon.classList.contains(EXPANDABLE) && icon.classList.contains(COLLAPSIBLE)) {
            removeClass2([newIcon], EXPANDABLE);
            addClass2([newIcon], COLLAPSIBLE);
          } else if (newIcon.classList.contains(COLLAPSIBLE) && icon.classList.contains(EXPANDABLE)) {
            removeClass2([newIcon], COLLAPSIBLE);
            addClass2([newIcon], EXPANDABLE);
          } else if (icon.classList.contains("interaction")) {
            addClass2([newIcon], "interaction");
          }
        }
        remove(txtEle);
        var fullEle = select2("." + FULLROW, liEle);
        fullEle.parentNode.insertBefore(newTextEle, fullEle.nextSibling);
        this.updatePosition(id, newNodeData, isRefreshChild, newData);
      }
      liEle = this.getElement(target);
      if (newNodeData[this.fields.tooltip]) {
        liEle.setAttribute("title", newNodeData[this.fields.tooltip]);
      }
      if (Object.prototype.hasOwnProperty.call(newNodeData, this.fields.htmlAttributes) && newNodeData[this.fields.htmlAttributes]) {
        var attr = {};
        merge2(attr, newNodeData[this.fields.htmlAttributes]);
        if (attr.class) {
          addClass2([liEle], attr.class.split(" "));
          delete attr.class;
        } else {
          attributes2(liEle, attr);
        }
      }
      if (this.selectedNodes.indexOf(id) !== -1) {
        liEle.setAttribute("aria-selected", "true");
        addClass2([liEle], ACTIVE3);
      }
      this.isRefreshed = false;
      this.triggerEvent("refreshNode", [this.getNode(liEle)]);
    };
    TreeView2.prototype.removeNodes = function(nodes) {
      if (!isNullOrUndefined2(nodes)) {
        if (this.fields.dataSource instanceof DataManager && !this.isOffline) {
          this.crudOperation("delete", nodes);
        } else {
          this.deleteSuccess(nodes);
        }
      }
    };
    TreeView2.prototype.updateNode = function(target, newText) {
      var _this = this;
      if (isNullOrUndefined2(target) || isNullOrUndefined2(newText) || !this.allowEditing) {
        return;
      }
      var liEle = this.getElement(target);
      if (isNullOrUndefined2(liEle)) {
        return;
      }
      var txtEle = select2("." + LISTTEXT, liEle);
      this.updateOldText(liEle);
      var eventArgs = this.getEditEvent(liEle, null, null);
      this.trigger("nodeEditing", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          if (_this.fields.dataSource instanceof DataManager && !_this.isOffline) {
            _this.crudOperation("update", null, target, newText, null, null, false);
          } else {
            _this.appendNewText(liEle, txtEle, newText, false);
          }
        }
      });
    };
    TreeView2.prototype.uncheckAll = function(nodes) {
      if (this.showCheckBox) {
        this.doCheckBoxAction(nodes, false);
      }
    };
    TreeView2.prototype.setNodeFocusable = function() {
      var firstNode = select2("." + LISTITEM, this.element);
      if (firstNode) {
        firstNode.setAttribute("tabindex", "0");
        this.updateIdAttr(null, firstNode);
      }
    };
    var TreeView_1;
    __decorate76([Property2(false)], TreeView2.prototype, "allowDragAndDrop", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "allowEditing", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "allowMultiSelection", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "allowTextWrap", void 0);
    __decorate76([Complex2({}, NodeAnimationSettings)], TreeView2.prototype, "animation", void 0);
    __decorate76([Property2()], TreeView2.prototype, "checkedNodes", void 0);
    __decorate76([Property2(true)], TreeView2.prototype, "checkDisabledChildren", void 0);
    __decorate76([Property2("")], TreeView2.prototype, "cssClass", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "disabled", void 0);
    __decorate76([Property2(null)], TreeView2.prototype, "dragArea", void 0);
    __decorate76([Property2(true)], TreeView2.prototype, "enableHtmlSanitizer", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "enablePersistence", void 0);
    __decorate76([Property2()], TreeView2.prototype, "expandedNodes", void 0);
    __decorate76([Property2("Auto")], TreeView2.prototype, "expandOn", void 0);
    __decorate76([Complex2({}, FieldsSettings)], TreeView2.prototype, "fields", void 0);
    __decorate76([Property2(true)], TreeView2.prototype, "fullRowSelect", void 0);
    __decorate76([Property2(true)], TreeView2.prototype, "loadOnDemand", void 0);
    __decorate76([Property2()], TreeView2.prototype, "locale", void 0);
    __decorate76([Property2()], TreeView2.prototype, "nodeTemplate", void 0);
    __decorate76([Property2()], TreeView2.prototype, "selectedNodes", void 0);
    __decorate76([Property2("None")], TreeView2.prototype, "sortOrder", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "showCheckBox", void 0);
    __decorate76([Property2(true)], TreeView2.prototype, "autoCheck", void 0);
    __decorate76([Property2(false)], TreeView2.prototype, "fullRowNavigable", void 0);
    __decorate76([Event3()], TreeView2.prototype, "actionFailure", void 0);
    __decorate76([Event3()], TreeView2.prototype, "created", void 0);
    __decorate76([Event3()], TreeView2.prototype, "dataBound", void 0);
    __decorate76([Event3()], TreeView2.prototype, "dataSourceChanged", void 0);
    __decorate76([Event3()], TreeView2.prototype, "drawNode", void 0);
    __decorate76([Event3()], TreeView2.prototype, "destroyed", void 0);
    __decorate76([Event3()], TreeView2.prototype, "keyPress", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeChecked", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeChecking", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeClicked", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeCollapsed", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeCollapsing", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeDragging", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeDragStart", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeDragStop", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeDropped", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeEdited", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeEditing", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeExpanded", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeExpanding", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeSelected", void 0);
    __decorate76([Event3()], TreeView2.prototype, "nodeSelecting", void 0);
    TreeView2 = TreeView_1 = __decorate76([NotifyPropertyChanges2], TreeView2);
    return TreeView2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/sidebar/sidebar.js
var __extends79 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate77 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CONTROL4 = "e-control";
var ROOT7 = "e-sidebar";
var DOCKER = "e-dock";
var CLOSE2 = "e-close";
var OPEN = "e-open";
var TRASITION = "e-transition";
var DEFAULTBACKDROP = "e-sidebar-overlay";
var RTL18 = "e-rtl";
var RIGHT = "e-right";
var LEFT = "e-left";
var OVER = "e-over";
var PUSH = "e-push";
var SLIDE = "e-slide";
var VISIBILITY = "e-visibility";
var DISPLAY = "e-sidebar-display";
var MAINCONTENTANIMATION = "e-content-animation";
var DISABLEANIMATION = "e-disable-animation";
var CONTEXT = "e-sidebar-context";
var SIDEBARABSOLUTE = "e-sidebar-absolute";
var Sidebar = (
  /** @class */
  function(_super) {
    __extends79(Sidebar2, _super);
    function Sidebar2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.documentClickContext = _this.documentclickHandler.bind(_this);
      return _this;
    }
    Sidebar2.prototype.preRender = function() {
      this.setWidth();
    };
    Sidebar2.prototype.render = function() {
      this.initialize();
      this.wireEvents();
      this.renderComplete();
    };
    Sidebar2.prototype.initialize = function() {
      this.setTarget();
      this.addClass();
      this.setZindex();
      if (this.enableDock) {
        this.setDock();
      }
      if (this.isOpen) {
        this.show();
        this.firstRender = true;
      } else {
        this.setMediaQuery();
      }
      this.checkType(true);
      this.setType(this.type);
      this.setCloseOnDocumentClick();
      this.setEnableRTL();
      if (Browser2.isDevice) {
        this.windowWidth = window.innerWidth;
      }
    };
    Sidebar2.prototype.setEnableRTL = function() {
      (this.enableRtl ? addClass2 : removeClass2)([this.element], RTL18);
    };
    Sidebar2.prototype.setTarget = function() {
      this.targetEle = this.element.nextElementSibling;
      this.sidebarEleCopy = this.element.cloneNode(true);
      if (typeof this.target === "string") {
        this.setProperties({
          target: document.querySelector(this.target)
        }, true);
      }
      if (this.target) {
        this.target.insertBefore(this.element, this.target.children[0]);
        addClass2([this.element], SIDEBARABSOLUTE);
        addClass2([this.target], CONTEXT);
        this.targetEle = this.getTargetElement();
      }
    };
    Sidebar2.prototype.getTargetElement = function() {
      var siblingElement = this.element.nextElementSibling;
      while (!isNullOrUndefined2(siblingElement)) {
        if (!siblingElement.classList.contains(ROOT7)) {
          break;
        }
        siblingElement = siblingElement.nextElementSibling;
      }
      return siblingElement;
    };
    Sidebar2.prototype.setCloseOnDocumentClick = function() {
      if (this.closeOnDocumentClick) {
        document.addEventListener("mousedown", this.documentClickContext);
        document.addEventListener("touchstart", this.documentClickContext);
      } else {
        document.removeEventListener("mousedown", this.documentClickContext);
        document.removeEventListener("touchstart", this.documentClickContext);
      }
    };
    Sidebar2.prototype.setWidth = function() {
      if (this.enableDock && this.position === "Left") {
        setStyleAttribute2(this.element, {
          "width": this.setDimension(this.dockSize)
        });
      } else if (this.enableDock && this.position === "Right") {
        setStyleAttribute2(this.element, {
          "width": this.setDimension(this.dockSize)
        });
      } else if (!this.enableDock) {
        setStyleAttribute2(this.element, {
          "width": this.setDimension(this.width)
        });
      }
    };
    Sidebar2.prototype.setDimension = function(width) {
      if (typeof width === "number") {
        width = formatUnit(width);
      } else if (typeof width === "string") {
        width = width.match(/px|%|em/) ? width : formatUnit(width);
      } else {
        width = "100%";
      }
      return width;
    };
    Sidebar2.prototype.setZindex = function() {
      setStyleAttribute2(this.element, {
        "z-index": "" + this.zIndex
      });
    };
    Sidebar2.prototype.addClass = function() {
      if (this.element.tagName === "EJS-SIDEBAR") {
        addClass2([this.element], DISPLAY);
      }
      var classELement = document.querySelector(".e-main-content");
      if (!isNullOrUndefined2(classELement || this.targetEle)) {
        addClass2([classELement || this.targetEle], [MAINCONTENTANIMATION]);
      }
      this.tabIndex = this.element.hasAttribute("tabindex") ? this.element.getAttribute("tabindex") : null;
      if (!this.enableDock && this.type !== "Auto") {
        addClass2([this.element], [VISIBILITY]);
      }
      removeClass2([this.element], [OPEN, CLOSE2, RIGHT, LEFT, SLIDE, PUSH, OVER]);
      this.element.classList.add(ROOT7);
      addClass2([this.element], this.position === "Right" ? RIGHT : LEFT);
      if (this.enableDock) {
        addClass2([this.element], DOCKER);
      }
      if (!isNullOrUndefined2(this.tabIndex)) {
        this.element.setAttribute("tabindex", this.tabIndex);
      }
      if (this.type === "Auto" && !Browser2.isDevice) {
        this.show();
      } else if (!this.isOpen) {
        addClass2([this.element], [CLOSE2, DISABLEANIMATION]);
      }
    };
    Sidebar2.prototype.checkType = function(val) {
      if (!(this.type === "Push" || this.type === "Over" || this.type === "Slide")) {
        this.type = "Auto";
      } else {
        if (!this.element.classList.contains(CLOSE2) && !val) {
          this.hide();
        }
      }
    };
    Sidebar2.prototype.transitionEnd = function(e) {
      this.setDock();
      if (!isNullOrUndefined2(e) && !this.firstRender) {
        this.triggerChange();
      }
      this.firstRender = false;
      EventHandler2.remove(this.element, "transitionend", this.transitionEnd);
    };
    Sidebar2.prototype.destroyBackDrop = function() {
      var sibling = document.querySelector(".e-main-content") || this.targetEle;
      if (this.target && this.showBackdrop && sibling && !isNullOrUndefined2(this.defaultBackdropDiv)) {
        removeClass2([this.defaultBackdropDiv], DEFAULTBACKDROP);
      } else if (this.showBackdrop && this.modal) {
        this.modal.style.display = "none";
        this.modal.outerHTML = "";
        this.modal = null;
      }
    };
    Sidebar2.prototype.hide = function(e) {
      var _this = this;
      var closeArguments = {
        model: this,
        element: this.element,
        cancel: false,
        isInteracted: !isNullOrUndefined2(e),
        event: e || null
      };
      this.trigger("close", closeArguments, function(observedcloseArgs) {
        if (!observedcloseArgs.cancel) {
          if (_this.element.classList.contains(CLOSE2)) {
            return;
          }
          if (_this.element.classList.contains(OPEN) && !_this.animate) {
            _this.triggerChange();
          }
          addClass2([_this.element], CLOSE2);
          removeClass2([_this.element], OPEN);
          setStyleAttribute2(_this.element, {
            "width": formatUnit(_this.enableDock ? _this.dockSize : _this.width)
          });
          _this.setType(_this.type);
          var sibling = document.querySelector(".e-main-content") || _this.targetEle;
          if (!_this.enableDock && sibling) {
            sibling.style.transform = "translateX(0px)";
            sibling.style[_this.position === "Left" ? "marginLeft" : "marginRight"] = "0px";
          }
          _this.destroyBackDrop();
          _this.setAnimation();
          if (_this.type === "Slide") {
            document.body.classList.remove("e-sidebar-overflow");
          }
          _this.setProperties({
            isOpen: false
          }, true);
          if (_this.enableDock) {
            setTimeout(function() {
              return _this.setTimeOut();
            }, 50);
          }
          EventHandler2.add(_this.element, "transitionend", _this.transitionEnd, _this);
        }
      });
    };
    Sidebar2.prototype.setTimeOut = function() {
      var sibling = document.querySelector(".e-main-content") || this.targetEle;
      var elementWidth = this.element.getBoundingClientRect().width;
      if (this.element.classList.contains(OPEN) && sibling && !(this.type === "Over" && this.enableDock)) {
        if (this.position === "Left") {
          sibling.style.marginLeft = this.setDimension(this.width === "auto" ? elementWidth : this.width);
        } else {
          sibling.style.marginRight = this.setDimension(this.width === "auto" ? elementWidth : this.width);
        }
      } else if (this.element.classList.contains(CLOSE2) && sibling) {
        if (this.position === "Left") {
          sibling.style.marginLeft = this.setDimension(this.dockSize === "auto" ? elementWidth : this.dockSize);
        } else {
          sibling.style.marginRight = this.setDimension(this.dockSize === "auto" ? elementWidth : this.dockSize);
        }
      }
    };
    Sidebar2.prototype.show = function(e) {
      var _this = this;
      var openArguments = {
        model: this,
        element: this.element,
        cancel: false,
        isInteracted: !isNullOrUndefined2(e),
        event: e || null
      };
      this.trigger("open", openArguments, function(observedopenArgs) {
        if (!observedopenArgs.cancel) {
          removeClass2([_this.element], [VISIBILITY, DISABLEANIMATION]);
          if (_this.element.classList.contains(OPEN)) {
            return;
          }
          if (_this.element.classList.contains(CLOSE2) && !_this.animate) {
            _this.triggerChange();
          }
          addClass2([_this.element], [OPEN, TRASITION]);
          setStyleAttribute2(_this.element, {
            "transform": ""
          });
          removeClass2([_this.element], CLOSE2);
          setStyleAttribute2(_this.element, {
            "width": formatUnit(_this.width)
          });
          _this.setType(_this.type);
          _this.createBackDrop();
          _this.setAnimation();
          if (_this.type === "Slide") {
            document.body.classList.add("e-sidebar-overflow");
          }
          _this.setProperties({
            isOpen: true
          }, true);
          EventHandler2.add(_this.element, "transitionend", _this.transitionEnd, _this);
        }
      });
    };
    Sidebar2.prototype.setAnimation = function() {
      if (this.animate) {
        removeClass2([this.element], DISABLEANIMATION);
      } else {
        addClass2([this.element], DISABLEANIMATION);
      }
    };
    Sidebar2.prototype.triggerChange = function() {
      var changeArguments = {
        name: "change",
        element: this.element
      };
      this.trigger("change", changeArguments);
    };
    Sidebar2.prototype.setDock = function() {
      if (this.enableDock && this.position === "Left" && !this.getState()) {
        setStyleAttribute2(this.element, {
          "transform": "translateX(-100%) translateX(" + this.setDimension(this.dockSize) + ")"
        });
      } else if (this.enableDock && this.position === "Right" && !this.getState()) {
        setStyleAttribute2(this.element, {
          "transform": "translateX(100%) translateX(-" + this.setDimension(this.dockSize) + ")"
        });
      }
      if (this.element.classList.contains(CLOSE2) && this.enableDock) {
        setStyleAttribute2(this.element, {
          "width": this.setDimension(this.dockSize)
        });
      }
    };
    Sidebar2.prototype.createBackDrop = function() {
      if (this.target && this.showBackdrop && this.getState()) {
        var targetString = this.target;
        var sibling = document.querySelector(".e-main-content") || this.targetEle;
        this.defaultBackdropDiv = this.createElement("div");
        addClass2([this.defaultBackdropDiv], DEFAULTBACKDROP);
        setStyleAttribute2(this.defaultBackdropDiv, {
          height: targetString.style.height
        });
        sibling.appendChild(this.defaultBackdropDiv);
      } else if (this.showBackdrop && !this.modal && this.getState()) {
        this.modal = this.createElement("div");
        this.modal.className = DEFAULTBACKDROP;
        this.modal.style.display = "block";
        document.body.appendChild(this.modal);
      }
    };
    Sidebar2.prototype.getPersistData = function() {
      return this.addOnPersist(["type", "position", "isOpen"]);
    };
    Sidebar2.prototype.getModuleName = function() {
      return "sidebar";
    };
    Sidebar2.prototype.toggle = function() {
      if (this.element.classList.contains(OPEN)) {
        this.hide();
      } else {
        this.show();
      }
    };
    Sidebar2.prototype.getState = function() {
      return this.element.classList.contains(OPEN) ? true : false;
    };
    Sidebar2.prototype.setMediaQuery = function() {
      if (this.mediaQuery) {
        var media = false;
        if (typeof this.mediaQuery === "string") {
          media = window.matchMedia(this.mediaQuery).matches;
        } else {
          media = this.mediaQuery.matches;
        }
        if (media && this.windowWidth !== window.innerWidth) {
          this.show();
        } else if (this.getState() && this.windowWidth !== window.innerWidth) {
          this.hide();
        }
      }
    };
    Sidebar2.prototype.resize = function() {
      if (!isNullOrUndefined2(this.width) && this.width !== "auto" && typeof this.width === "string" && !this.width.includes("px")) {
        this.setType(this.type);
      }
      if (this.type === "Auto") {
        if (Browser2.isDevice) {
          addClass2([this.element], OVER);
        } else {
          addClass2([this.element], PUSH);
        }
      }
      this.setMediaQuery();
      if (Browser2.isDevice) {
        this.windowWidth = window.innerWidth;
      }
    };
    Sidebar2.prototype.documentclickHandler = function(e) {
      if (closest2(e.target, "." + CONTROL4 + "." + ROOT7)) {
        return;
      }
      this.hide(e);
    };
    Sidebar2.prototype.enableGestureHandler = function(args) {
      if (!this.isOpen && this.position === "Left" && args.swipeDirection === "Right" && args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5) {
        this.show();
      } else if (this.isOpen && this.position === "Left" && args.swipeDirection === "Left") {
        this.hide(args.originalEvent);
      } else if (this.isOpen && this.position === "Right" && args.swipeDirection === "Right") {
        this.hide(args.originalEvent);
      } else if (!this.isOpen && this.position === "Right" && args.swipeDirection === "Left" && window.innerWidth - args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5) {
        this.show();
      }
    };
    Sidebar2.prototype.setEnableGestures = function() {
      if (this.enableGestures) {
        this.mainContentEle = new Touch2(document.body, {
          swipe: this.enableGestureHandler.bind(this)
        });
        this.sidebarEle = new Touch2(this.element, {
          swipe: this.enableGestureHandler.bind(this)
        });
      } else {
        if (this.mainContentEle && this.sidebarEle) {
          this.mainContentEle.destroy();
          this.sidebarEle.destroy();
        }
      }
    };
    Sidebar2.prototype.wireEvents = function() {
      this.setEnableGestures();
      EventHandler2.add(window, "resize", this.resize, this);
    };
    Sidebar2.prototype.unWireEvents = function() {
      EventHandler2.remove(window, "resize", this.resize);
      EventHandler2.remove(document, "mousedown touchstart", this.documentclickHandler);
      if (this.mainContentEle) {
        this.mainContentEle.destroy();
      }
      if (this.sidebarEle) {
        this.sidebarEle.destroy();
      }
    };
    Sidebar2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var sibling = document.querySelector(".e-main-content") || this.targetEle;
      var isRendered = this.isServerRendered;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "isOpen":
            if (this.isOpen) {
              this.show();
            } else {
              this.hide();
            }
            break;
          case "width":
            this.setWidth();
            if (!this.getState()) {
              this.setDock();
            }
            break;
          case "animate":
            this.setAnimation();
            break;
          case "type":
            this.checkType(false);
            removeClass2([this.element], [VISIBILITY]);
            this.addClass();
            addClass2([this.element], this.type === "Auto" ? Browser2.isDevice ? ["e-over"] : ["e-push"] : ["e-" + this.type.toLowerCase()]);
            break;
          case "position":
            this.element.style.transform = "";
            this.setDock();
            if (sibling) {
              sibling.style[this.position === "Left" ? "marginRight" : "marginLeft"] = "0px";
            }
            if (this.position === "Right") {
              removeClass2([this.element], LEFT);
              addClass2([this.element], RIGHT);
            } else {
              removeClass2([this.element], RIGHT);
              addClass2([this.element], LEFT);
            }
            this.setType(this.type);
            break;
          case "showBackdrop":
            if (this.showBackdrop) {
              this.createBackDrop();
            } else {
              if (this.modal) {
                this.modal.style.display = "none";
                this.modal.outerHTML = "";
                this.modal = null;
              }
            }
            break;
          case "target":
            if (typeof this.target === "string") {
              this.setProperties({
                target: document.querySelector(this.target)
              }, true);
            }
            if (isNullOrUndefined2(this.target)) {
              removeClass2([this.element], SIDEBARABSOLUTE);
              removeClass2([oldProp.target], CONTEXT);
              setStyleAttribute2(sibling, {
                "margin-left": 0,
                "margin-right": 0
              });
              document.body.insertAdjacentElement("afterbegin", this.element);
            }
            this.isServerRendered = false;
            _super.prototype.refresh.call(this);
            this.isServerRendered = isRendered;
            break;
          case "closeOnDocumentClick":
            this.setCloseOnDocumentClick();
            break;
          case "enableDock":
            if (!this.getState()) {
              this.setDock();
            }
            break;
          case "zIndex":
            this.setZindex();
            break;
          case "mediaQuery":
            this.setMediaQuery();
            break;
          case "enableGestures":
            this.setEnableGestures();
            break;
          case "enableRtl":
            this.setEnableRTL();
            break;
        }
      }
    };
    Sidebar2.prototype.setType = function(type) {
      var elementWidth = this.element.getBoundingClientRect().width;
      this.setZindex();
      var sibling = document.querySelector(".e-main-content") || this.targetEle;
      if (sibling) {
        sibling.style.transform = "translateX(0px)";
        if (!Browser2.isDevice && this.type !== "Auto" && !(this.type === "Over" && this.enableDock)) {
          sibling.style[this.position === "Left" ? "marginLeft" : "marginRight"] = "0px";
        }
      }
      var margin = this.position === "Left" ? elementWidth + "px" : elementWidth + "px";
      var eleWidth = this.position === "Left" ? elementWidth : -elementWidth;
      removeClass2([this.element], [PUSH, OVER, SLIDE]);
      switch (type) {
        case "Push":
          addClass2([this.element], [PUSH]);
          if (sibling && (this.enableDock || this.element.classList.contains(OPEN))) {
            sibling.style[this.position === "Left" ? "marginLeft" : "marginRight"] = margin;
          }
          break;
        case "Slide":
          addClass2([this.element], [SLIDE]);
          if (sibling && (this.enableDock || this.element.classList.contains(OPEN))) {
            sibling.style.transform = "translateX(" + eleWidth + "px)";
          }
          break;
        case "Over":
          addClass2([this.element], [OVER]);
          if (this.enableDock && (this.element.classList.contains(CLOSE2) || this.isOpen)) {
            if (sibling) {
              sibling.style[this.position === "Left" ? "marginLeft" : "marginRight"] = this.setDimension(this.dockSize);
            }
          }
          break;
        case "Auto":
          addClass2([this.element], [TRASITION]);
          if (Browser2.isDevice) {
            if (sibling && this.enableDock && !this.getState()) {
              sibling.style[this.position === "Left" ? "marginLeft" : "marginRight"] = margin;
              addClass2([this.element], PUSH);
            } else {
              addClass2([this.element], OVER);
            }
          } else {
            addClass2([this.element], PUSH);
            if (sibling && (this.enableDock || this.element.classList.contains(OPEN))) {
              sibling.style[this.position === "Left" ? "marginLeft" : "marginRight"] = margin;
            }
          }
          this.createBackDrop();
      }
    };
    Sidebar2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      if (this.target) {
        removeClass2([this.target], CONTEXT);
      }
      this.destroyBackDrop();
      if (this.element) {
        removeClass2([this.element], [OPEN, CLOSE2, PUSH, SLIDE, OVER, LEFT, RIGHT, TRASITION, DISABLEANIMATION]);
        removeClass2([this.element], SIDEBARABSOLUTE);
        this.element.style.width = "";
        this.element.style.zIndex = "";
        this.element.style.transform = "";
        if (!isNullOrUndefined2(this.sidebarEleCopy.getAttribute("tabindex"))) {
          this.element.setAttribute("tabindex", this.tabIndex);
        } else {
          this.element.removeAttribute("tabindex");
        }
      }
      this.windowWidth = null;
      var sibling = document.querySelector(".e-main-content") || this.targetEle;
      if (!isNullOrUndefined2(sibling)) {
        sibling.style.margin = "";
        sibling.style.transform = "";
      }
      this.unWireEvents();
    };
    __decorate77([Property2("auto")], Sidebar2.prototype, "dockSize", void 0);
    __decorate77([Property2(null)], Sidebar2.prototype, "mediaQuery", void 0);
    __decorate77([Property2(false)], Sidebar2.prototype, "enableDock", void 0);
    __decorate77([Property2("en-US")], Sidebar2.prototype, "locale", void 0);
    __decorate77([Property2(false)], Sidebar2.prototype, "enablePersistence", void 0);
    __decorate77([Property2(true)], Sidebar2.prototype, "enableGestures", void 0);
    __decorate77([Property2(false)], Sidebar2.prototype, "isOpen", void 0);
    __decorate77([Property2(false)], Sidebar2.prototype, "enableRtl", void 0);
    __decorate77([Property2(true)], Sidebar2.prototype, "animate", void 0);
    __decorate77([Property2("auto")], Sidebar2.prototype, "height", void 0);
    __decorate77([Property2(false)], Sidebar2.prototype, "closeOnDocumentClick", void 0);
    __decorate77([Property2("Left")], Sidebar2.prototype, "position", void 0);
    __decorate77([Property2(null)], Sidebar2.prototype, "target", void 0);
    __decorate77([Property2(false)], Sidebar2.prototype, "showBackdrop", void 0);
    __decorate77([Property2("Auto")], Sidebar2.prototype, "type", void 0);
    __decorate77([Property2("auto")], Sidebar2.prototype, "width", void 0);
    __decorate77([Property2(1e3)], Sidebar2.prototype, "zIndex", void 0);
    __decorate77([Event3()], Sidebar2.prototype, "created", void 0);
    __decorate77([Event3()], Sidebar2.prototype, "close", void 0);
    __decorate77([Event3()], Sidebar2.prototype, "open", void 0);
    __decorate77([Event3()], Sidebar2.prototype, "change", void 0);
    __decorate77([Event3()], Sidebar2.prototype, "destroyed", void 0);
    Sidebar2 = __decorate77([NotifyPropertyChanges2], Sidebar2);
    return Sidebar2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/breadcrumb/breadcrumb.js
var __extends80 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate78 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ICONRIGHT = "e-icon-right";
var ITEMTEXTCLASS = "e-breadcrumb-text";
var ICONCLASS = "e-breadcrumb-icon";
var MENUCLASS = "e-breadcrumb-menu";
var ITEMCLASS = "e-breadcrumb-item";
var POPUPCLASS = "e-breadcrumb-popup";
var WRAPMODECLASS = "e-breadcrumb-wrap-mode";
var SCROLLMODECLASS = "e-breadcrumb-scroll-mode";
var TABINDEX = "tabindex";
var DISABLEDCLASS = "e-disabled";
var ARIADISABLED = "aria-disabled";
var DOT = ".";
var BreadcrumbOverflowMode;
(function(BreadcrumbOverflowMode2) {
  BreadcrumbOverflowMode2["Hidden"] = "Hidden";
  BreadcrumbOverflowMode2["Collapsed"] = "Collapsed";
  BreadcrumbOverflowMode2["Menu"] = "Menu";
  BreadcrumbOverflowMode2["Wrap"] = "Wrap";
  BreadcrumbOverflowMode2["Scroll"] = "Scroll";
  BreadcrumbOverflowMode2["None"] = "None";
})(BreadcrumbOverflowMode || (BreadcrumbOverflowMode = {}));
var BreadcrumbItem = (
  /** @class */
  function(_super) {
    __extends80(BreadcrumbItem2, _super);
    function BreadcrumbItem2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate78([Property2("")], BreadcrumbItem2.prototype, "text", void 0);
    __decorate78([Property2("")], BreadcrumbItem2.prototype, "id", void 0);
    __decorate78([Property2("")], BreadcrumbItem2.prototype, "url", void 0);
    __decorate78([Property2(null)], BreadcrumbItem2.prototype, "iconCss", void 0);
    __decorate78([Property2(false)], BreadcrumbItem2.prototype, "disabled", void 0);
    return BreadcrumbItem2;
  }(ChildProperty2)
);
var Breadcrumb = (
  /** @class */
  function(_super) {
    __extends80(Breadcrumb2, _super);
    function Breadcrumb2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isPopupCreated = false;
      return _this;
    }
    Breadcrumb2.prototype.preRender = function() {
    };
    Breadcrumb2.prototype.render = function() {
      this.initialize();
      this.renderItems(this.items);
      this.wireEvents();
    };
    Breadcrumb2.prototype.initialize = function() {
      this._maxItems = this.maxItems;
      if (isNullOrUndefined2(this.element.getAttribute("aria-label"))) {
        this.element.setAttribute("aria-label", "breadcrumb");
      }
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.enableRtl) {
        this.element.classList.add("e-rtl");
      }
      if (this.disabled) {
        this.element.classList.add(DISABLEDCLASS);
        this.element.setAttribute(ARIADISABLED, "true");
      }
      if (this.overflowMode === "Wrap") {
        this.element.classList.add(WRAPMODECLASS);
      } else if (this.overflowMode === "Scroll") {
        this.element.classList.add(SCROLLMODECLASS);
      }
      this.initItems();
      this.initPvtProps();
    };
    Breadcrumb2.prototype.initPvtProps = function() {
      if (this.overflowMode === "Hidden" && this._maxItems > 0) {
        this.endIndex = this.getEndIndex();
        this.startIndex = this.endIndex + 1 - (this._maxItems - 1);
      }
      if (this.overflowMode === "Menu") {
        if (this._maxItems >= 0) {
          this.startIndex = this._maxItems > 1 ? 1 : 0;
          this.endIndex = this.getEndIndex();
          this.popupUl = this.createElement("ul", {
            attrs: {
              TABINDEX: "0",
              "role": "menu"
            }
          });
        } else {
          this.startIndex = this.endIndex = null;
        }
      }
    };
    Breadcrumb2.prototype.getEndIndex = function() {
      var _this = this;
      var endIndex;
      if (this.activeItem) {
        this.items.forEach(function(item, idx) {
          if (item.url === _this.activeItem || item.text === _this.activeItem) {
            endIndex = idx;
          }
        });
      } else {
        endIndex = this.items.length - 1;
      }
      return endIndex;
    };
    Breadcrumb2.prototype.initItems = function() {
      if (!this.items.length) {
        var baseUri = void 0;
        var uri = void 0;
        var items = [];
        if (this.url) {
          var url = new URL(this.url, window.location.origin);
          baseUri = url.origin + "/";
          uri = url.href.split(baseUri)[1].split("/");
        } else {
          baseUri = window.location.origin + "/";
          uri = window.location.href.split(baseUri)[1].split("/");
        }
        items.push({
          iconCss: "e-icons e-home",
          url: baseUri
        });
        for (var i = 0; i < uri.length; i++) {
          if (uri[i]) {
            items.push({
              text: uri[i],
              url: baseUri + uri[i]
            });
            baseUri += uri[i] + "/";
          }
        }
        this.setProperties({
          items
        }, true);
      }
    };
    Breadcrumb2.prototype.renderItems = function(items) {
      var _this = this;
      var item;
      var isSingleLevel;
      var isIconRight = this.element.classList.contains(ICONRIGHT);
      var itemsLength = items.length;
      if (itemsLength) {
        var isActiveItem = void 0;
        var isLastItem = void 0;
        var isLastItemInPopup_1;
        var j_1 = 0;
        var wrapDiv = void 0;
        var len = itemsLength * 2 - 1;
        var isItemCancelled_1 = false;
        var ol = this.createElement("ol", {
          className: this.overflowMode === "Wrap" ? "e-breadcrumb-wrapped-ol" : ""
        });
        var firstOl = this.createElement("ol", {
          className: this.overflowMode === "Wrap" ? "e-breadcrumb-first-ol" : ""
        });
        var showIcon = this.hasField(items, "iconCss");
        var isCollasped = this.overflowMode === "Collapsed" && this._maxItems > 0 && itemsLength > this._maxItems && !this.isExpanded;
        var isDefaultOverflowMode_1 = this.overflowMode === "Hidden" && this._maxItems > 0;
        if (this.overflowMode === "Menu" && this.popupUl) {
          this.popupUl.innerHTML = "";
        }
        var listBaseOptions = {
          moduleName: this.getModuleName(),
          showIcon,
          itemNavigable: true,
          itemCreated: function(args) {
            var isLastItem2 = args.curData.isLastItem;
            if (isLastItem2 && args.item.children.length && !_this.itemTemplate) {
              delete args.curData.isLastItem;
              if (!isLastItemInPopup_1 && !_this.enableActiveItemNavigation) {
                args.item.innerHTML = _this.createElement("span", {
                  className: ITEMTEXTCLASS,
                  innerHTML: args.item.children[0].innerHTML
                }).outerHTML;
              }
            }
            if (args.curData.iconCss && !args.curData.text && !_this.itemTemplate) {
              args.item.classList.add("e-icon-item");
            }
            if (isDefaultOverflowMode_1) {
              args.item.setAttribute("item-index", j_1.toString());
            }
            var eventArgs = {
              item: extend2({}, args.curData.properties ? args.curData.properties : args.curData),
              element: args.item,
              cancel: false
            };
            _this.trigger("beforeItemRender", eventArgs);
            isItemCancelled_1 = eventArgs.cancel;
            var containsRightIcon = isIconRight || eventArgs.element.classList.contains(ICONRIGHT);
            if (containsRightIcon && args.curData.iconCss && !_this.itemTemplate) {
              args.item.querySelector(".e-anchor-wrap").appendChild(args.item.querySelector(DOT + ICONCLASS));
            }
            if (eventArgs.item.disabled) {
              args.item.setAttribute(ARIADISABLED, "true");
              args.item.classList.add(DISABLEDCLASS);
            }
            if (eventArgs.item.id) {
              args.item.setAttribute("id", eventArgs.item.id);
            }
            if ((eventArgs.item.disabled || _this.disabled) && args.item.children.length && !_this.itemTemplate) {
              args.item.children[0].setAttribute(TABINDEX, "-1");
            }
            if (args.curData.isEmptyUrl) {
              args.item.children[0].removeAttribute("href");
              if ((!isLastItem2 || isLastItem2 && _this.enableActiveItemNavigation) && !(eventArgs.item.disabled || _this.disabled)) {
                args.item.children[0].setAttribute(TABINDEX, "0");
                EventHandler2.add(args.item.children[0], "keydown", _this.keyDownHandler, _this);
              }
            }
            args.item.removeAttribute("role");
            if (isLastItem2) {
              args.item.setAttribute("data-active-item", "");
            }
            if (!_this.itemTemplate) {
              _this.beforeItemRenderChanges(args.curData, eventArgs.item, args.item, containsRightIcon);
            }
          }
        };
        for (var i = 0; i < len; i % 2 && j_1++, i++) {
          isActiveItem = this.activeItem && (this.activeItem === items[j_1].url || this.activeItem === items[j_1].text);
          if (isCollasped && i > 1 && i < len - 2) {
            continue;
          } else if (isDefaultOverflowMode_1 && (j_1 < this.startIndex || j_1 > this.endIndex) && (i % 2 ? j_1 !== this.startIndex - 1 : true) && j_1 !== 0) {
            continue;
          }
          if (i % 2) {
            wrapDiv = this.createElement("div", {
              className: "e-breadcrumb-item-wrapper"
            });
            if (this.separatorTemplate && this.separatorTemplate === "/" || isNullOrUndefined2(this.separatorTemplate)) {
              listBaseOptions.template = initializeCSPTemplate(function() {
                return "/";
              });
            } else {
              listBaseOptions.template = this.separatorTemplate;
            }
            listBaseOptions.itemClass = "e-breadcrumb-separator";
            isSingleLevel = false;
            item = [{
              previousItem: items[j_1],
              nextItem: items[j_1 + 1]
            }];
          } else {
            listBaseOptions.itemClass = "";
            if (this.itemTemplate) {
              listBaseOptions.template = this.itemTemplate;
              isSingleLevel = false;
            } else {
              isSingleLevel = true;
            }
            item = [extend2({}, items[j_1].properties ? items[j_1].properties : items[j_1])];
            if (!item[0].url && !this.itemTemplate) {
              item = [extend2({}, item[0], {
                isEmptyUrl: true,
                url: "#"
              })];
            }
            isLastItem = (isDefaultOverflowMode_1 || this.overflowMode === "Menu") && j_1 === this.endIndex;
            if ((i === len - 1 || isLastItem) && !this.itemTemplate || isActiveItem) {
              item[0].isLastItem = true;
            }
          }
          var parent_1 = ol;
          var lastPopupItemIdx = this.startIndex + this.endIndex - this._maxItems;
          if (this.overflowMode === "Menu" && (j_1 >= this.startIndex && j_1 <= lastPopupItemIdx && (i % 2 ? !(j_1 === lastPopupItemIdx) : true) && this.endIndex >= this._maxItems && this._maxItems > 0 || this._maxItems === 0)) {
            if (i % 2) {
              continue;
            } else {
              parent_1 = this.popupUl;
              if (isLastItem) {
                isLastItemInPopup_1 = true;
              }
            }
          } else if (this.overflowMode === "Wrap") {
            if (i === 0) {
              parent_1 = firstOl;
            } else {
              parent_1 = wrapDiv;
            }
          }
          var li = ListBase.createList(this.createElement, item, listBaseOptions, isSingleLevel, this).childNodes;
          if (!isItemCancelled_1) {
            append(li, parent_1);
          } else if (isDefaultOverflowMode_1 || isCollasped || this.overflowMode === "Menu" || this.overflowMode === "Wrap") {
            items.splice(j_1, 1);
            this.initPvtProps();
            return this.reRenderItems();
          } else if (i === len - 1 || isLastItem) {
            remove(parent_1.lastElementChild);
          }
          if (this.overflowMode === "Wrap" && i !== 0 && i % 2 === 0) {
            ol.appendChild(wrapDiv);
          }
          if (isCollasped && i === 1) {
            var li_1 = this.createElement("li", {
              className: "e-icons e-breadcrumb-collapsed",
              attrs: {
                TABINDEX: "0"
              }
            });
            EventHandler2.add(li_1, "keyup", this.expandHandler, this);
            ol.appendChild(li_1);
          }
          if (this.overflowMode === "Menu" && this.startIndex === i && this.endIndex >= this._maxItems && this._maxItems >= 0) {
            var menu = this.getMenuElement();
            EventHandler2.add(menu, "keyup", this.keyDownHandler, this);
            ol.appendChild(menu);
          }
          if (isActiveItem || isLastItem) {
            break;
          }
          if (isItemCancelled_1) {
            i++;
          }
        }
        if (this.isReact) {
          this.renderReactTemplates();
          setTimeout(function() {
            _this.calculateMaxItems();
          }, 5);
        }
        if (this.overflowMode === "Wrap") {
          this.element.appendChild(firstOl);
        }
        this.element.appendChild(ol);
        if (!this.isReact) {
          this.calculateMaxItems();
        }
      }
    };
    Breadcrumb2.prototype.calculateMaxItems = function() {
      if (this.overflowMode === "Hidden" || this.overflowMode === "Collapsed" || this.overflowMode === "Menu") {
        var maxItems = void 0;
        var width = this.element.offsetWidth;
        var liElems = [].slice.call(this.element.children[0].children).reverse();
        var liWidth = this.overflowMode === "Menu" ? 0 : liElems[liElems.length - 1].offsetWidth + (liElems[liElems.length - 2] ? liElems[liElems.length - 2].offsetWidth : 0);
        if (this.overflowMode === "Menu") {
          var menuEle = this.getMenuElement();
          this.element.appendChild(menuEle);
          liWidth += menuEle.offsetWidth;
          remove(menuEle);
        }
        for (var i = 0; i < liElems.length - 2; i++) {
          if (liWidth > width) {
            maxItems = Math.ceil((i - 1) / 2) + (this.overflowMode === "Menu" && i <= 2 ? 0 : 1);
            if ((this.maxItems > maxItems && !(this.maxItems > -1 && maxItems === -1) || this.maxItems === -1) && this._maxItems !== maxItems) {
              this._maxItems = maxItems;
              this.initPvtProps();
              return this.reRenderItems();
            } else {
              break;
            }
          } else {
            if (this.overflowMode === "Menu" && i === 2) {
              liWidth += liElems[liElems.length - 1].offsetWidth + liElems[liElems.length - 2].offsetWidth;
              if (liWidth > width) {
                this._maxItems = 1;
                this.initPvtProps();
                return this.reRenderItems();
              }
            }
            if (!(this.overflowMode === "Menu" && liElems[i].classList.contains(MENUCLASS))) {
              liWidth += liElems[i].offsetWidth;
            }
          }
        }
      } else if ((this.overflowMode === "Wrap" || this.overflowMode === "Scroll") && this._maxItems > 0) {
        var width = 0;
        var liElems = this.element.querySelectorAll(DOT + ITEMCLASS);
        if (liElems.length > this._maxItems + this._maxItems - 1) {
          for (var i = this.overflowMode === "Wrap" ? 1 : 0; i < this._maxItems + this._maxItems - 1; i++) {
            width += liElems[i].offsetWidth;
          }
          width = width + 5 + parseInt(getComputedStyle(this.element.children[0]).paddingLeft, 10) * 2;
          if (this.overflowMode === "Wrap") {
            this.element.querySelector(".e-breadcrumb-wrapped-ol").style.width = width + "px";
          } else {
            this.element.style.width = width + "px";
          }
        }
      }
    };
    Breadcrumb2.prototype.hasField = function(items, field) {
      for (var i = 0, len = items.length; i < len; i++) {
        if (items[i]["" + field]) {
          return true;
        }
      }
      return false;
    };
    Breadcrumb2.prototype.getMenuElement = function() {
      return this.createElement("li", {
        className: "e-icons e-breadcrumb-menu",
        attrs: {
          TABINDEX: "0"
        }
      });
    };
    Breadcrumb2.prototype.beforeItemRenderChanges = function(prevItem, currItem, elem, isRightIcon) {
      var wrapElem = elem.querySelector(".e-anchor-wrap");
      if (wrapElem) {
        wrapElem.parentElement.setAttribute("aria-label", "home");
      }
      if (currItem.text !== prevItem.text && wrapElem) {
        wrapElem.childNodes.forEach(function(child) {
          if (child.nodeType === Node.TEXT_NODE) {
            child.textContent = currItem.text;
          }
        });
      }
      if (currItem.iconCss !== prevItem.iconCss && wrapElem) {
        var iconElem = elem.querySelector(DOT + ICONCLASS);
        if (iconElem) {
          if (currItem.iconCss) {
            removeClass2([iconElem], prevItem.iconCss.split(" "));
            addClass2([iconElem], currItem.iconCss.split(" "));
          } else {
            remove(iconElem);
          }
        } else if (currItem.iconCss) {
          var iconElem_1 = this.createElement("span", {
            className: ICONCLASS + " " + currItem.iconCss
          });
          if (isRightIcon) {
            append([iconElem_1], wrapElem);
          } else {
            wrapElem.insertBefore(iconElem_1, wrapElem.childNodes[0]);
          }
        }
      }
      if (currItem.url !== prevItem.url && this.enableNavigation) {
        var anchor = elem.querySelector("a." + ITEMTEXTCLASS);
        if (anchor) {
          if (currItem.url) {
            anchor.setAttribute("href", currItem.url);
          } else {
            anchor.removeAttribute("href");
          }
        }
      }
    };
    Breadcrumb2.prototype.reRenderItems = function() {
      if (this.overflowMode === "Menu" && this.popupObj && this.popupObj.element.classList.contains("e-popup-open") && this.popupObj.element.querySelector(".e-edit-template")) {
        this.popupObj.hide();
        this.popupObj.destroy();
        this.isPopupCreated = false;
        detach2(this.popupObj.element);
      }
      this.element.innerHTML = "";
      this.renderItems(this.items);
    };
    Breadcrumb2.prototype.clickHandler = function(e) {
      var li = closest2(e.target, DOT + ITEMCLASS + ":not(.e-breadcrumb-separator)");
      if (!this.enableNavigation) {
        e.preventDefault();
      }
      if (li && (closest2(e.target, DOT + ITEMTEXTCLASS) || this.itemTemplate)) {
        var idx = void 0;
        if (this.overflowMode === "Wrap") {
          idx = [].slice.call(this.element.querySelectorAll(DOT + ITEMCLASS)).indexOf(li);
        } else {
          idx = [].slice.call(li.parentElement.children).indexOf(li);
        }
        if (this.overflowMode === "Menu") {
          if (closest2(e.target, DOT + POPUPCLASS)) {
            idx += this.startIndex;
            this.endIndex = idx;
            if (e.type === "keydown") {
              this.documentClickHandler(e);
            }
          } else if (this.element.querySelector(DOT + MENUCLASS)) {
            if (idx > [].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(DOT + MENUCLASS))) {
              idx += this.popupUl.childElementCount * 2 - 2;
              idx = Math.floor(idx / 2);
              this.endIndex = idx;
            } else {
              this.startIndex = this.endIndex = idx;
            }
          } else {
            idx = Math.floor(idx / 2);
            this.startIndex = this.endIndex = idx;
          }
        } else {
          idx = Math.floor(idx / 2);
        }
        if (this.overflowMode === "Hidden" && this._maxItems > 0 && this.endIndex !== 0) {
          idx = parseInt(li.getAttribute("item-index"), 10);
          if (this.startIndex > 1) {
            this.startIndex -= this.endIndex - idx;
          }
          this.endIndex = idx;
        }
        var itemClickArgs = {
          element: li,
          item: this.items[idx],
          event: e,
          cancel: false
        };
        this.trigger("itemClick", itemClickArgs);
        if (itemClickArgs.cancel) {
          return;
        }
        if (this.items[idx]) {
          this.activeItem = this.items[idx].url || this.items[idx].text;
        }
        this.dataBind();
      }
      if (e.target.classList.contains("e-breadcrumb-collapsed")) {
        this.isExpanded = true;
        this.reRenderItems();
      }
      if (e.target.classList.contains(MENUCLASS) && !this.isPopupCreated) {
        this.renderPopup();
      }
    };
    Breadcrumb2.prototype.renderPopup = function() {
      var _this = this;
      var wrapper = this.createElement("div", {
        className: POPUPCLASS + " " + this.cssClass + (this.enableRtl ? " e-rtl" : "")
      });
      document.body.appendChild(wrapper);
      this.isPopupCreated = true;
      this.popupObj = new Popup(wrapper, {
        content: this.popupUl,
        relateTo: this.element.querySelector(DOT + MENUCLASS),
        enableRtl: this.enableRtl,
        position: {
          X: "left",
          Y: "bottom"
        },
        collision: {
          X: "fit",
          Y: "flip"
        },
        open: function() {
          if (_this.popupUl) {
            _this.popupUl.focus();
          }
        }
      });
      this.popupWireEvents();
      this.popupObj.show();
    };
    Breadcrumb2.prototype.documentClickHandler = function(e) {
      if (this.overflowMode === "Menu" && this.popupObj && this.popupObj.element.classList.contains("e-popup-open") && !closest2(e.target, DOT + MENUCLASS) && !closest2(e.target, DOT + "e-edit-template")) {
        this.popupObj.hide();
        this.popupObj.destroy();
        this.isPopupCreated = false;
        detach2(this.popupObj.element);
      }
    };
    Breadcrumb2.prototype.resize = function() {
      this._maxItems = this.maxItems;
      this.initPvtProps();
      this.reRenderItems();
    };
    Breadcrumb2.prototype.expandHandler = function(e) {
      if (e.key === "Enter") {
        this.isExpanded = true;
        this.reRenderItems();
      }
    };
    Breadcrumb2.prototype.keyDownHandler = function(e) {
      if (e.key === "Enter") {
        this.clickHandler(e);
      }
    };
    Breadcrumb2.prototype.popupKeyDownHandler = function(e) {
      if (e.key === "Escape") {
        this.documentClickHandler(e);
      }
    };
    Breadcrumb2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "items":
          case "enableActiveItemNavigation":
            this.reRenderItems();
            break;
          case "activeItem":
            this._maxItems = this.maxItems;
            this.initPvtProps();
            this.reRenderItems();
            break;
          case "overflowMode":
          case "maxItems":
            this._maxItems = this.maxItems;
            this.initPvtProps();
            this.reRenderItems();
            if (oldProp.overflowMode === "Wrap") {
              this.element.classList.remove(WRAPMODECLASS);
            } else if (newProp.overflowMode === "Wrap") {
              this.element.classList.add(WRAPMODECLASS);
            }
            if (oldProp.overflowMode === "Scroll") {
              this.element.classList.remove(SCROLLMODECLASS);
            } else if (newProp.overflowMode === "Scroll") {
              this.element.classList.add(SCROLLMODECLASS);
            }
            break;
          case "url":
            this.initItems();
            this.reRenderItems();
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.element], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([this.element], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            if (oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1 && !(newProp.cssClass && newProp.cssClass.indexOf(ICONRIGHT) > -1) || !(oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) && newProp.cssClass && newProp.cssClass.indexOf(ICONRIGHT) > -1) {
              this.reRenderItems();
            }
            break;
          case "enableRtl":
            this.element.classList.toggle("e-rtl");
            break;
          case "disabled":
            this.element.classList.toggle(DISABLEDCLASS);
            this.element.setAttribute(ARIADISABLED, newProp.disabled + "");
            break;
        }
      }
    };
    Breadcrumb2.prototype.wireEvents = function() {
      this.delegateClickHanlder = this.documentClickHandler.bind(this);
      EventHandler2.add(document, "click", this.delegateClickHanlder, this);
      EventHandler2.add(this.element, "click", this.clickHandler, this);
      window.addEventListener("resize", this.resize.bind(this));
    };
    Breadcrumb2.prototype.popupWireEvents = function() {
      EventHandler2.add(this.popupObj.element, "click", this.clickHandler, this);
      EventHandler2.add(this.popupObj.element, "keydown", this.popupKeyDownHandler, this);
    };
    Breadcrumb2.prototype.unWireEvents = function() {
      EventHandler2.remove(document, "click", this.delegateClickHanlder);
      EventHandler2.remove(this.element, "click", this.clickHandler);
      window.removeEventListener("resize", this.resize.bind(this));
      if (this.popupObj) {
        EventHandler2.remove(this.popupObj.element, "click", this.clickHandler);
        EventHandler2.remove(this.popupObj.element, "keydown", this.popupKeyDownHandler);
      }
    };
    Breadcrumb2.prototype.getPersistData = function() {
      return this.addOnPersist(["activeItem"]);
    };
    Breadcrumb2.prototype.getModuleName = function() {
      return "breadcrumb";
    };
    Breadcrumb2.prototype.destroy = function() {
      var _this = this;
      if (this.popupObj && this.popupObj.element.classList.contains("e-popup-open")) {
        this.popupObj.destroy();
        this.isPopupCreated = false;
        detach2(this.popupObj.element);
      }
      var classes = [];
      var attributes4 = ["aria-label"];
      if (this.cssClass) {
        classes.concat(this.cssClass.split(" "));
      }
      if (this.enableRtl) {
        classes.push("e-rtl");
      }
      if (this.disabled) {
        classes.push(DISABLEDCLASS);
        attributes4.push(ARIADISABLED);
      }
      if (this.overflowMode === "Wrap") {
        classes.push(WRAPMODECLASS);
      } else if (this.overflowMode === "Scroll") {
        classes.push(SCROLLMODECLASS);
      }
      this.unWireEvents();
      this.element.innerHTML = "";
      removeClass2([this.element], classes);
      attributes4.forEach(function(attribute) {
        _this.element.removeAttribute(attribute);
      });
      _super.prototype.destroy.call(this);
    };
    __decorate78([Property2("")], Breadcrumb2.prototype, "url", void 0);
    __decorate78([Collection([], BreadcrumbItem)], Breadcrumb2.prototype, "items", void 0);
    __decorate78([Property2("")], Breadcrumb2.prototype, "activeItem", void 0);
    __decorate78([Property2(-1)], Breadcrumb2.prototype, "maxItems", void 0);
    __decorate78([Property2("Menu")], Breadcrumb2.prototype, "overflowMode", void 0);
    __decorate78([Property2("")], Breadcrumb2.prototype, "cssClass", void 0);
    __decorate78([Property2(null)], Breadcrumb2.prototype, "itemTemplate", void 0);
    __decorate78([Property2("/")], Breadcrumb2.prototype, "separatorTemplate", void 0);
    __decorate78([Property2(true)], Breadcrumb2.prototype, "enableNavigation", void 0);
    __decorate78([Property2(false)], Breadcrumb2.prototype, "enableActiveItemNavigation", void 0);
    __decorate78([Property2(false)], Breadcrumb2.prototype, "disabled", void 0);
    __decorate78([Property2("")], Breadcrumb2.prototype, "locale", void 0);
    __decorate78([Event3()], Breadcrumb2.prototype, "beforeItemRender", void 0);
    __decorate78([Event3()], Breadcrumb2.prototype, "itemClick", void 0);
    __decorate78([Event3()], Breadcrumb2.prototype, "created", void 0);
    Breadcrumb2 = __decorate78([NotifyPropertyChanges2], Breadcrumb2);
    return Breadcrumb2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/carousel/carousel.js
var __extends81 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate79 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_CAROUSEL = "e-carousel";
var CLS_ACTIVE3 = "e-active";
var CLS_RTL6 = "e-rtl";
var CLS_PARTIAL = "e-partial";
var CLS_SWIPE = "e-swipe";
var CLS_SLIDE_CONTAINER = "e-carousel-slide-container";
var CLS_ITEMS3 = "e-carousel-items";
var CLS_CLONED = "e-cloned";
var CLS_ITEM4 = "e-carousel-item";
var CLS_PREVIOUS = "e-previous";
var CLS_NEXT = "e-next";
var CLS_PREV_ICON = "e-previous-icon";
var CLS_NEXT_ICON = "e-next-icon";
var CLS_NAVIGATORS = "e-carousel-navigators";
var CLS_INDICATORS = "e-carousel-indicators";
var CLS_INDICATOR_BARS = "e-indicator-bars";
var CLS_INDICATOR_BAR = "e-indicator-bar";
var CLS_INDICATOR2 = "e-indicator";
var CLS_ICON2 = "e-icons";
var CLS_PLAY_PAUSE = "e-play-pause";
var CLS_PLAY_ICON = "e-play-icon";
var CLS_PAUSE_ICON = "e-pause-icon";
var CLS_PREV_BUTTON = "e-previous-button";
var CLS_NEXT_BUTTON = "e-next-button";
var CLS_PLAY_BUTTON = "e-play-button";
var CLS_FLAT = "e-flat";
var CLS_ROUND = "e-round";
var CLS_HOVER_ARROWS = "e-hover-arrows";
var CLS_HOVER = "e-carousel-hover";
var CLS_TEMPLATE3 = "e-template";
var CLS_SLIDE_ANIMATION = "e-carousel-slide-animation";
var CLS_FADE_ANIMATION = "e-carousel-fade-animation";
var CLS_CUSTOM_ANIMATION = "e-carousel-custom-animation";
var CLS_ANIMATION_NONE = "e-carousel-animation-none";
var CLS_PREV_SLIDE = "e-prev";
var CLS_NEXT_SLIDE = "e-next";
var CLS_TRANSITION_START = "e-transition-start";
var CLS_TRANSITION_END = "e-transition-end";
var CarouselSwipeMode;
(function(CarouselSwipeMode2) {
  CarouselSwipeMode2[CarouselSwipeMode2["Touch"] = 1] = "Touch";
  CarouselSwipeMode2[CarouselSwipeMode2["Mouse"] = 2] = "Mouse";
})(CarouselSwipeMode || (CarouselSwipeMode = {}));
var CarouselItem = (
  /** @class */
  function(_super) {
    __extends81(CarouselItem2, _super);
    function CarouselItem2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate79([Property2()], CarouselItem2.prototype, "cssClass", void 0);
    __decorate79([Property2()], CarouselItem2.prototype, "interval", void 0);
    __decorate79([Property2()], CarouselItem2.prototype, "template", void 0);
    __decorate79([Property2()], CarouselItem2.prototype, "htmlAttributes", void 0);
    return CarouselItem2;
  }(ChildProperty2)
);
var Carousel = (
  /** @class */
  function(_super) {
    __extends81(Carousel2, _super);
    function Carousel2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isSwipe = false;
      return _this;
    }
    Carousel2.prototype.getModuleName = function() {
      return CLS_CAROUSEL.replace("e-", "");
    };
    Carousel2.prototype.getPersistData = function() {
      return this.addOnPersist(["selectedIndex"]);
    };
    Carousel2.prototype.preRender = function() {
      this.keyConfigs = {
        home: "home",
        end: "end",
        space: "space",
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        moveDown: "downarrow"
      };
      var defaultLocale = {
        nextSlide: "Next slide",
        of: "of",
        pauseSlideTransition: "Pause slide transition",
        playSlideTransition: "Play slide transition",
        previousSlide: "Previous slide",
        slide: "Slide",
        slideShow: "Slide show"
      };
      this.localeObj = new L10n2(this.getModuleName(), defaultLocale, this.locale);
    };
    Carousel2.prototype.render = function() {
      this.initialize();
      this.renderSlides();
      this.renderNavigators();
      this.renderPlayButton();
      this.renderIndicators();
      this.applyAnimation();
      this.wireEvents();
    };
    Carousel2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var target;
      var rtlElement;
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "animationEffect":
            this.applyAnimation();
            break;
          case "cssClass":
            classList(this.element, [newProp.cssClass], [oldProp.cssClass]);
            break;
          case "selectedIndex":
            this.setActiveSlide(this.selectedIndex, oldProp.selectedIndex > this.selectedIndex ? "Previous" : "Next");
            this.autoSlide();
            break;
          case "htmlAttributes":
            if (!isNullOrUndefined2(this.htmlAttributes)) {
              this.setHtmlAttributes(this.htmlAttributes, this.element);
            }
            break;
          case "enableTouchSwipe":
            if (!this.enableTouchSwipe && this.touchModule) {
              this.touchModule.destroy();
            }
            if (this.element.querySelector("." + CLS_ITEMS3)) {
              this.renderTouchActions();
            }
            break;
          case "loop":
            if (this.loop && isNullOrUndefined2(this.autoSlideInterval)) {
              this.applySlideInterval();
            }
            this.handleNavigatorsActions(this.selectedIndex);
            if (this.partialVisible || !(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
              this.reRenderSlides();
            }
            break;
          case "allowKeyboardInteraction":
            if (this.keyModule) {
              this.keyModule.destroy();
              this.keyModule = null;
            }
            if (newProp.allowKeyboardInteraction) {
              this.renderKeyboardActions();
            }
            break;
          case "enableRtl":
            rtlElement = [].slice.call(this.element.querySelectorAll("." + CLS_PREV_BUTTON + ",\n                ." + CLS_NEXT_BUTTON + ", ." + CLS_PLAY_BUTTON));
            rtlElement.push(this.element);
            if (this.enableRtl) {
              addClass2(rtlElement, CLS_RTL6);
            } else {
              removeClass2(rtlElement, CLS_RTL6);
            }
            if (this.partialVisible || !(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
              var cloneCount = this.loop ? this.getNumOfItems() : 0;
              var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
              this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
            }
            break;
          case "buttonsVisibility":
            target = this.element.querySelector("." + CLS_NAVIGATORS);
            if (target) {
              switch (this.buttonsVisibility) {
                case "Hidden":
                  this.resetTemplates(["previousButtonTemplate", "nextButtonTemplate"]);
                  remove(target);
                  break;
                case "VisibleOnHover":
                  addClass2([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
                  break;
                case "Visible":
                  removeClass2([].slice.call(target.childNodes), CLS_HOVER_ARROWS);
                  break;
              }
            } else {
              this.renderNavigators();
              this.renderPlayButton();
            }
            break;
          case "width":
            setStyleAttribute2(this.element, {
              "width": formatUnit(this.width)
            });
            break;
          case "height":
            setStyleAttribute2(this.element, {
              "height": formatUnit(this.height)
            });
            break;
          case "autoPlay":
            if (this.showPlayButton && isNullOrUndefined2(this.playButtonTemplate)) {
              this.playButtonClickHandler(null, true);
            }
            this.autoSlide();
            break;
          case "interval":
            this.autoSlide();
            break;
          case "showIndicators":
          case "indicatorsType":
            target = this.element.querySelector("." + CLS_INDICATORS);
            if (target) {
              this.resetTemplates(["indicatorsTemplate"]);
              remove(target);
            }
            this.renderIndicators();
            break;
          case "showPlayButton":
            target = this.element.querySelector("." + CLS_PLAY_PAUSE);
            if (!this.showPlayButton && target) {
              remove(target);
              this.resetTemplates(["playButtonTemplate"]);
            }
            this.renderPlayButton();
            break;
          case "items":
          case "dataSource": {
            var selectedData = prop === "dataSource" ? this.dataSource : this.items;
            if (!isNullOrUndefined2(selectedData) && selectedData.length > 0 && this.selectedIndex >= selectedData.length) {
              this.setActiveSlide(selectedData.length - 1, "Previous");
              this.autoSlide();
            }
            this.reRenderSlides();
            this.reRenderIndicators();
            break;
          }
          case "partialVisible":
            if (this.partialVisible) {
              addClass2([this.element], CLS_PARTIAL);
            } else {
              removeClass2([this.element], CLS_PARTIAL);
            }
            this.reRenderSlides();
            break;
          case "swipeMode":
            EventHandler2.remove(this.element, "mousedown touchstart", this.swipeStart);
            EventHandler2.remove(this.element, "mousemove touchmove", this.swiping);
            EventHandler2.remove(this.element, "mouseup touchend", this.swipStop);
            this.swipeModehandlers();
            this.reRenderSlides();
            break;
        }
      }
    };
    Carousel2.prototype.reRenderSlides = function() {
      var target = this.element.querySelector("." + CLS_ITEMS3);
      if (target) {
        this.resetTemplates(["itemTemplate"]);
        remove(target);
      }
      this.renderSlides();
    };
    Carousel2.prototype.reRenderIndicators = function() {
      var target = this.element.querySelector("." + CLS_INDICATORS);
      if (target) {
        this.resetTemplates(["indicatorsTemplate"]);
        remove(target);
      }
      this.renderIndicators();
    };
    Carousel2.prototype.initialize = function() {
      var carouselClasses = [];
      carouselClasses.push(CLS_CAROUSEL);
      if (this.cssClass) {
        carouselClasses.push(this.cssClass);
      }
      if (this.enableRtl) {
        carouselClasses.push(CLS_RTL6);
      }
      if (this.partialVisible) {
        carouselClasses.push(CLS_PARTIAL);
      }
      if (!(this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse))) {
        carouselClasses.push(CLS_SWIPE);
      }
      addClass2([this.element], carouselClasses);
      setStyleAttribute2(this.element, {
        "width": formatUnit(this.width),
        "height": formatUnit(this.height)
      });
      attributes2(this.element, {
        "role": "group",
        "aria-roledescription": "carousel",
        "aria-label": this.localeObj.getConstant("slideShow")
      });
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        this.setHtmlAttributes(this.htmlAttributes, this.element);
      }
    };
    Carousel2.prototype.renderSlides = function() {
      var _this = this;
      var slideContainer = this.element.querySelector("." + CLS_SLIDE_CONTAINER);
      if (!slideContainer) {
        slideContainer = this.createElement("div", {
          className: CLS_SLIDE_CONTAINER,
          attrs: {
            "tabindex": "0",
            "role": "tabpanel"
          }
        });
        this.element.appendChild(slideContainer);
      }
      this.itemsContainer = this.createElement("div", {
        className: CLS_ITEMS3,
        attrs: {
          "aria-live": this.autoPlay ? "off" : "polite"
        }
      });
      slideContainer.appendChild(this.itemsContainer);
      var numOfItems = this.getNumOfItems();
      if (numOfItems > 0 && this.loop) {
        if (this.items.length > 0) {
          this.items.slice(-numOfItems).forEach(function(item, index) {
            _this.renderSlide(item, item.template, index, _this.itemsContainer, true);
          });
        } else if (!isNullOrUndefined2(this.dataSource) && this.dataSource.length > 0) {
          this.dataSource.slice(-numOfItems).forEach(function(item, index) {
            _this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer, true);
          });
        }
      }
      if (this.items.length > 0) {
        this.slideItems = this.items;
        this.items.forEach(function(item, index) {
          _this.renderSlide(item, item.template, index, _this.itemsContainer);
        });
      } else if (!isNullOrUndefined2(this.dataSource) && this.dataSource.length > 0) {
        this.slideItems = this.dataSource;
        this.dataSource.forEach(function(item, index) {
          _this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer);
        });
      }
      if (numOfItems > 0 && this.loop) {
        if (this.items.length > 0) {
          this.items.slice(0, numOfItems).forEach(function(item, index) {
            _this.renderSlide(item, item.template, index, _this.itemsContainer, true);
          });
        } else if (!isNullOrUndefined2(this.dataSource) && this.dataSource.length > 0) {
          this.dataSource.slice(0, numOfItems).forEach(function(item, index) {
            _this.renderSlide(item, _this.itemTemplate, index, _this.itemsContainer, true);
          });
        }
      }
      this.renderTemplates();
      this.itemsContainer.style.setProperty("--carousel-items-count", "" + this.itemsContainer.children.length);
      var slideWidth = isNullOrUndefined2(this.itemsContainer.firstElementChild) ? 0 : this.itemsContainer.firstElementChild.clientWidth;
      this.itemsContainer.style.transitionProperty = "none";
      var cloneCount = this.loop ? numOfItems : 0;
      this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + cloneCount);
      this.autoSlide();
      this.renderTouchActions();
      this.renderKeyboardActions();
    };
    Carousel2.prototype.getTranslateX = function(slideWidth, count) {
      if (count === void 0) {
        count = 1;
      }
      return this.enableRtl ? "translateX(" + slideWidth * count + "px)" : "translateX(" + -slideWidth * count + "px)";
    };
    Carousel2.prototype.renderSlide = function(item, itemTemplate, index, container, isClone) {
      if (isClone === void 0) {
        isClone = false;
      }
      var itemEle = this.createElement("div", {
        id: getUniqueID("carousel_item"),
        className: CLS_ITEM4 + " " + (item.cssClass ? item.cssClass : "") + " " + (this.selectedIndex === index && !isClone ? CLS_ACTIVE3 : ""),
        attrs: {
          "aria-hidden": this.selectedIndex === index && !isClone ? "false" : "true",
          "data-index": index.toString(),
          "role": "group",
          "aria-roledescription": "slide"
        }
      });
      if (isClone) {
        itemEle.classList.add(CLS_CLONED);
      }
      if (!isNullOrUndefined2(item.htmlAttributes)) {
        this.setHtmlAttributes(item.htmlAttributes, itemEle);
      }
      var templateId = this.element.id + "_template";
      var template = this.templateParser(itemTemplate)(item, this, "itemTemplate", templateId, false);
      append(template, itemEle);
      container.appendChild(itemEle);
    };
    Carousel2.prototype.renderNavigators = function() {
      if (this.buttonsVisibility === "Hidden") {
        return;
      }
      var navigators = this.createElement("div", {
        className: CLS_NAVIGATORS
      });
      var itemsContainer = this.element.querySelector("." + CLS_SLIDE_CONTAINER);
      itemsContainer.insertAdjacentElement("afterend", navigators);
      if (!isNullOrUndefined2(this.slideItems) && this.slideItems.length > 1) {
        this.renderNavigatorButton("Previous");
        this.renderNavigatorButton("Next");
      }
      this.renderTemplates();
    };
    Carousel2.prototype.renderNavigatorButton = function(direction) {
      var buttonContainer = this.createElement("div", {
        className: (direction === "Previous" ? CLS_PREVIOUS : CLS_NEXT) + " " + (this.buttonsVisibility === "VisibleOnHover" ? CLS_HOVER_ARROWS : "")
      });
      if (direction === "Previous" && this.previousButtonTemplate) {
        addClass2([buttonContainer], CLS_TEMPLATE3);
        var templateId = this.element.id + "_previousButtonTemplate";
        var template = this.templateParser(this.previousButtonTemplate)({
          type: "Previous"
        }, this, "previousButtonTemplate", templateId, false);
        append(template, buttonContainer);
      } else if (direction === "Next" && this.nextButtonTemplate) {
        addClass2([buttonContainer], CLS_TEMPLATE3);
        var templateId = this.element.id + "_nextButtonTemplate";
        var template = this.templateParser(this.nextButtonTemplate)({
          type: "Next"
        }, this, "nextButtonTemplate", templateId, false);
        append(template, buttonContainer);
      } else {
        var button = this.createElement("button", {
          attrs: {
            "aria-label": this.localeObj.getConstant(direction === "Previous" ? "previousSlide" : "nextSlide"),
            "type": "button"
          }
        });
        var buttonObj = new Button({
          cssClass: CLS_FLAT + " " + CLS_ROUND + " " + (direction === "Previous" ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON),
          iconCss: CLS_ICON2 + " " + (direction === "Previous" ? CLS_PREV_ICON : CLS_NEXT_ICON),
          enableRtl: this.enableRtl,
          disabled: !this.loop && this.selectedIndex === (direction === "Previous" ? 0 : this.slideItems.length - 1)
        });
        buttonObj.appendTo(button);
        buttonContainer.appendChild(button);
      }
      this.element.querySelector("." + CLS_NAVIGATORS).appendChild(buttonContainer);
      EventHandler2.add(buttonContainer, "click", this.navigatorClickHandler, this);
    };
    Carousel2.prototype.renderPlayButton = function() {
      if (isNullOrUndefined2(this.slideItems) || this.buttonsVisibility === "Hidden" || !this.showPlayButton || this.slideItems.length <= 1) {
        return;
      }
      var playPauseWrap = this.createElement("div", {
        className: CLS_PLAY_PAUSE + " " + (this.buttonsVisibility === "VisibleOnHover" ? CLS_HOVER_ARROWS : "")
      });
      if (this.playButtonTemplate) {
        addClass2([playPauseWrap], CLS_TEMPLATE3);
        var templateId = this.element.id + "_playButtonTemplate";
        var template = this.templateParser(this.playButtonTemplate)({}, this, "playButtonTemplate", templateId, false);
        append(template, playPauseWrap);
      } else {
        var playButton = this.createElement("button", {
          attrs: {
            "aria-label": this.localeObj.getConstant(this.autoPlay ? "pauseSlideTransition" : "playSlideTransition"),
            "type": "button"
          }
        });
        var isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
        var buttonObj = new Button({
          cssClass: CLS_FLAT + " " + CLS_ROUND + " " + CLS_PLAY_BUTTON,
          iconCss: CLS_ICON2 + " " + (this.autoPlay && !isLastSlide ? CLS_PAUSE_ICON : CLS_PLAY_ICON),
          isToggle: true,
          enableRtl: this.enableRtl
        });
        if (isLastSlide) {
          this.setProperties({
            autoPlay: false
          }, true);
          playButton.setAttribute("aria-label", this.localeObj.getConstant("playSlideTransition"));
          this.itemsContainer.setAttribute("aria-live", "polite");
        }
        buttonObj.appendTo(playButton);
        playPauseWrap.appendChild(playButton);
      }
      var navigators = this.element.querySelector("." + CLS_NAVIGATORS);
      navigators.insertBefore(playPauseWrap, navigators.lastElementChild);
      this.renderTemplates();
      EventHandler2.add(playPauseWrap, "click", this.playButtonClickHandler, this);
    };
    Carousel2.prototype.renderIndicators = function() {
      var _this = this;
      if (!this.showIndicators || isNullOrUndefined2(this.indicatorsType)) {
        return;
      }
      var indicatorClass = "e-default";
      if (!this.indicatorsTemplate) {
        indicatorClass = "e-" + this.indicatorsType.toLowerCase();
      }
      var indicatorWrap = this.createElement("div", {
        className: CLS_INDICATORS + " " + indicatorClass
      });
      var indicatorBars = this.createElement("div", {
        className: CLS_INDICATOR_BARS
      });
      indicatorWrap.appendChild(indicatorBars);
      var progress;
      if (this.slideItems) {
        switch (this.indicatorsType) {
          case "Fraction":
            if (this.indicatorsTemplate) {
              this.renderIndicatorTemplate(indicatorBars, this.selectedIndex + 1);
            } else {
              indicatorBars.innerText = this.selectedIndex + 1 + " / " + this.slideItems.length;
            }
            break;
          case "Progress":
            if (this.indicatorsTemplate) {
              this.renderIndicatorTemplate(indicatorBars, this.selectedIndex + 1);
            } else {
              progress = this.createElement("div", {
                className: CLS_INDICATOR_BAR
              });
              progress.style.setProperty("--carousel-items-current", "" + (this.selectedIndex + 1));
              progress.style.setProperty("--carousel-items-count", "" + this.slideItems.length);
              indicatorBars.appendChild(progress);
            }
            break;
          case "Default":
          case "Dynamic":
            this.slideItems.forEach(function(item, index) {
              var indicatorBar = _this.createElement("div", {
                className: CLS_INDICATOR_BAR + " " + (_this.selectedIndex === index ? CLS_ACTIVE3 : _this.selectedIndex - 1 === index ? CLS_PREV_SLIDE : _this.selectedIndex + 1 === index ? CLS_NEXT_SLIDE : ""),
                attrs: {
                  "data-index": index.toString(),
                  "aria-current": _this.selectedIndex === index ? "true" : "false"
                }
              });
              indicatorBar.style.setProperty("--carousel-items-current", "" + _this.selectedIndex);
              if (_this.indicatorsTemplate) {
                _this.renderIndicatorTemplate(indicatorBar, index);
              } else if (_this.indicatorsType === "Default") {
                var indicator = _this.createElement("button", {
                  className: CLS_INDICATOR2,
                  attrs: {
                    "type": "button",
                    "aria-label": _this.localeObj.getConstant("slide") + " " + (index + 1) + " " + _this.localeObj.getConstant("of") + " " + _this.slideItems.length
                  }
                });
                indicatorBar.appendChild(indicator);
                indicator.appendChild(_this.createElement("div", {}));
                var buttonObj = new Button({
                  cssClass: "e-flat e-small"
                });
                buttonObj.appendTo(indicator);
              }
              indicatorBars.appendChild(indicatorBar);
              if (_this.indicatorsType === "Default") {
                EventHandler2.add(indicatorBar, "click", _this.indicatorClickHandler, _this);
              }
            });
            break;
        }
      }
      this.element.appendChild(indicatorWrap);
    };
    Carousel2.prototype.renderIndicatorTemplate = function(indicatorBar, index) {
      if (index === void 0) {
        index = 0;
      }
      addClass2([indicatorBar], CLS_TEMPLATE3);
      var templateId = this.element.id + "_indicatorsTemplate";
      var template = this.templateParser(this.indicatorsTemplate)({
        index,
        selectedIndex: this.selectedIndex
      }, this, "indicatorsTemplate", templateId, false);
      append(template, indicatorBar);
    };
    Carousel2.prototype.renderKeyboardActions = function() {
      if (!this.allowKeyboardInteraction) {
        return;
      }
      this.keyModule = new KeyboardEvents2(this.element, {
        keyAction: this.keyHandler.bind(this),
        keyConfigs: this.keyConfigs
      });
    };
    Carousel2.prototype.renderTouchActions = function() {
      if (!this.enableTouchSwipe) {
        return;
      }
      this.touchModule = new Touch2(this.element, {
        swipe: this.swipeHandler.bind(this)
      });
    };
    Carousel2.prototype.applyAnimation = function() {
      removeClass2([this.element], [CLS_CUSTOM_ANIMATION, CLS_FADE_ANIMATION, CLS_SLIDE_ANIMATION, CLS_ANIMATION_NONE]);
      switch (this.animationEffect) {
        case "Slide":
          addClass2([this.element], CLS_SLIDE_ANIMATION);
          break;
        case "Fade":
          addClass2([this.element], CLS_FADE_ANIMATION);
          break;
        case "None":
          addClass2([this.element], CLS_ANIMATION_NONE);
          break;
        case "Custom":
          addClass2([this.element], CLS_CUSTOM_ANIMATION);
          break;
      }
    };
    Carousel2.prototype.autoSlide = function() {
      if (isNullOrUndefined2(this.slideItems) || this.slideItems.length <= 1) {
        return;
      }
      this.resetSlideInterval();
      this.applySlideInterval();
    };
    Carousel2.prototype.autoSlideChange = function() {
      var activeSlide = this.element.querySelector("." + CLS_ITEM4 + "." + CLS_ACTIVE3) || this.element.querySelector("." + CLS_INDICATORS + " ." + CLS_ACTIVE3);
      if (isNullOrUndefined2(activeSlide)) {
        return;
      }
      var activeIndex = parseInt(activeSlide.dataset.index, 10);
      if (!this.loop && activeIndex === this.slideItems.length - 1) {
        this.resetSlideInterval();
      } else {
        var index = (activeIndex + 1) % this.slideItems.length;
        if (!this.element.classList.contains(CLS_HOVER)) {
          this.setActiveSlide(index, "Next");
        }
        this.autoSlide();
      }
    };
    Carousel2.prototype.applySlideInterval = function() {
      var _this = this;
      if (!this.autoPlay || this.element.classList.contains(CLS_HOVER)) {
        return;
      }
      var itemInterval = this.interval;
      if (this.items.length > 0 && !isNullOrUndefined2(this.items[this.selectedIndex || 0].interval)) {
        itemInterval = this.items[this.selectedIndex || 0].interval;
      }
      this.autoSlideInterval = setInterval(function() {
        return _this.autoSlideChange();
      }, itemInterval);
    };
    Carousel2.prototype.resetSlideInterval = function() {
      clearInterval(this.autoSlideInterval);
      this.autoSlideInterval = null;
    };
    Carousel2.prototype.getSlideIndex = function(direction) {
      var currentIndex = this.selectedIndex || 0;
      if (direction === "Previous") {
        currentIndex--;
        if (currentIndex < 0) {
          currentIndex = this.slideItems.length - 1;
        }
      } else {
        currentIndex++;
        if (currentIndex === this.slideItems.length) {
          currentIndex = 0;
        }
      }
      return currentIndex;
    };
    Carousel2.prototype.setActiveSlide = function(currentIndex, direction, isSwiped) {
      var _this = this;
      if (isSwiped === void 0) {
        isSwiped = false;
      }
      if (this.element.querySelectorAll("." + CLS_ITEM4 + "." + CLS_PREV_SLIDE + ",." + CLS_ITEM4 + "." + CLS_NEXT_SLIDE).length > 0) {
        return;
      }
      currentIndex = isNullOrUndefined2(currentIndex) ? 0 : currentIndex;
      var allSlides = [].slice.call(this.element.querySelectorAll("." + CLS_ITEM4 + ":not(.e-cloned)"));
      var activeSlide = this.element.querySelector("." + CLS_ITEM4 + "." + CLS_ACTIVE3);
      if (isNullOrUndefined2(activeSlide) && this.showIndicators) {
        var activeIndicator = this.element.querySelector("." + CLS_INDICATOR_BAR + "." + CLS_ACTIVE3);
        var activeIndex_1 = parseInt(activeIndicator.dataset.index, 10);
        addClass2([allSlides[parseInt(activeIndex_1.toString(), 10)]], CLS_ACTIVE3);
        return;
      } else if (isNullOrUndefined2(activeSlide)) {
        addClass2([allSlides[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE3);
        return;
      }
      var activeIndex = parseInt(activeSlide.dataset.index, 10);
      var currentSlide = allSlides[parseInt(currentIndex.toString(), 10)];
      var eventArgs = {
        currentIndex: activeIndex,
        nextIndex: currentIndex,
        currentSlide: activeSlide,
        nextSlide: currentSlide,
        slideDirection: direction,
        isSwiped,
        cancel: false
      };
      this.trigger("slideChanging", eventArgs, function(args) {
        if (args.cancel) {
          return;
        }
        _this.setProperties({
          selectedIndex: currentIndex
        }, true);
        attributes2(args.currentSlide, {
          "aria-hidden": "true"
        });
        attributes2(args.nextSlide, {
          "aria-hidden": "false"
        });
        _this.refreshIndicators(activeIndex, currentIndex);
        _this.slideChangedEventArgs = {
          currentIndex: args.nextIndex,
          previousIndex: args.currentIndex,
          currentSlide: args.nextSlide,
          previousSlide: args.currentSlide,
          slideDirection: direction,
          isSwiped
        };
        var slideWidth = allSlides[parseInt(currentIndex.toString(), 10)].clientWidth;
        var numOfItems = _this.getNumOfItems();
        if (!_this.isSwipe) {
          _this.itemsContainer.style.transitionDuration = "0.6s";
        }
        _this.isSwipe = false;
        if (_this.animationEffect === "Fade") {
          _this.itemsContainer.classList.add("e-fade-in-out");
        } else {
          _this.itemsContainer.style.transitionProperty = "transform";
        }
        if (_this.loop) {
          if (_this.slideChangedEventArgs.currentIndex === 0 && _this.slideChangedEventArgs.slideDirection === "Next") {
            _this.itemsContainer.style.transform = _this.getTranslateX(slideWidth, allSlides.length + numOfItems);
          } else if (_this.slideChangedEventArgs.currentIndex === _this.slideItems.length - 1 && _this.slideChangedEventArgs.slideDirection === "Previous") {
            _this.itemsContainer.style.transform = _this.partialVisible ? _this.getTranslateX(slideWidth) : "translateX(0px)";
          } else {
            _this.itemsContainer.style.transform = _this.getTranslateX(slideWidth, currentIndex + numOfItems);
          }
        } else {
          _this.itemsContainer.style.transform = _this.getTranslateX(slideWidth, currentIndex);
        }
        if (_this.animationEffect === "Slide") {
          if (direction === "Previous") {
            addClass2([args.nextSlide], CLS_PREV_SLIDE);
            args.nextSlide.setAttribute("data-slide-height", args.nextSlide.offsetHeight.toString());
            addClass2([args.currentSlide, args.nextSlide], CLS_TRANSITION_END);
          } else {
            addClass2([args.nextSlide], CLS_NEXT_SLIDE);
            args.nextSlide.setAttribute("data-slide-height", args.nextSlide.offsetHeight.toString());
            addClass2([args.currentSlide, args.nextSlide], CLS_TRANSITION_START);
          }
        } else if (_this.animationEffect === "Fade") {
          removeClass2([args.currentSlide], CLS_ACTIVE3);
          addClass2([args.nextSlide], CLS_ACTIVE3);
        } else if (_this.animationEffect === "Custom") {
          if (direction === "Previous") {
            addClass2([args.nextSlide], CLS_NEXT_SLIDE);
            addClass2([args.currentSlide], CLS_PREV_SLIDE);
          } else {
            addClass2([args.currentSlide], CLS_PREV_SLIDE);
            addClass2([args.nextSlide], CLS_NEXT_SLIDE);
          }
        } else {
          _this.onTransitionEnd();
        }
        _this.handleNavigatorsActions(currentIndex);
      });
    };
    Carousel2.prototype.onTransitionEnd = function() {
      var _this = this;
      removeClass2(this.element.querySelectorAll("." + CLS_ITEMS3), "e-fade-in-out");
      var numOfItems = this.getNumOfItems();
      if (this.slideChangedEventArgs) {
        this.itemsContainer.style.transitionProperty = "none";
        if (this.loop && (this.slideChangedEventArgs.currentIndex === 0 && this.slideChangedEventArgs.slideDirection === "Next" || this.slideChangedEventArgs.currentIndex === this.slideItems.length - 1 && this.slideChangedEventArgs.slideDirection === "Previous")) {
          var slideWidth = this.slideChangedEventArgs.currentSlide.clientWidth;
          this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.slideChangedEventArgs.currentIndex + numOfItems);
        }
        addClass2([this.slideChangedEventArgs.currentSlide], CLS_ACTIVE3);
        removeClass2([this.slideChangedEventArgs.previousSlide], CLS_ACTIVE3);
        this.trigger("slideChanged", this.slideChangedEventArgs, function() {
          removeClass2(_this.element.querySelectorAll("." + CLS_ITEM4), [CLS_PREV_SLIDE, CLS_NEXT_SLIDE, CLS_TRANSITION_START, CLS_TRANSITION_END]);
          _this.slideChangedEventArgs = null;
        });
      }
    };
    Carousel2.prototype.refreshIndicators = function(activeIndex, currentIndex) {
      var _this = this;
      var slideIndicator = this.element.querySelector("." + CLS_INDICATOR_BARS);
      if (isNullOrUndefined2(slideIndicator)) {
        return;
      }
      var indicators = [].slice.call(slideIndicator.childNodes);
      switch (this.indicatorsType) {
        case "Default":
        case "Dynamic":
          attributes2(indicators[parseInt(activeIndex.toString(), 10)], {
            "aria-current": "false"
          });
          attributes2(indicators[parseInt(currentIndex.toString(), 10)], {
            "aria-current": "true"
          });
          removeClass2(indicators, [CLS_ACTIVE3, CLS_PREV_SLIDE, CLS_NEXT_SLIDE]);
          addClass2([indicators[parseInt(currentIndex.toString(), 10)]], CLS_ACTIVE3);
          if (indicators[currentIndex - 1]) {
            addClass2([indicators[currentIndex - 1]], CLS_PREV_SLIDE);
          }
          if (indicators[currentIndex + 1]) {
            addClass2([indicators[currentIndex + 1]], CLS_NEXT_SLIDE);
          }
          indicators.forEach(function(item) {
            return item.style.setProperty("--carousel-items-current", "" + _this.selectedIndex);
          });
          break;
        case "Fraction":
          if (this.indicatorsTemplate) {
            if (slideIndicator.children.length > 0) {
              slideIndicator.removeChild(slideIndicator.firstElementChild);
            }
            this.renderIndicatorTemplate(slideIndicator, currentIndex + 1);
          } else {
            slideIndicator.innerText = this.selectedIndex + 1 + " / " + this.slideItems.length;
          }
          break;
        case "Progress":
          if (this.indicatorsTemplate) {
            if (slideIndicator.children.length > 0) {
              slideIndicator.removeChild(slideIndicator.firstElementChild);
            }
            this.renderIndicatorTemplate(slideIndicator, currentIndex + 1);
          } else {
            slideIndicator.firstElementChild.style.setProperty("--carousel-items-current", "" + (this.selectedIndex + 1));
          }
          break;
      }
    };
    Carousel2.prototype.setHtmlAttributes = function(attribute, element2) {
      var keys4 = Object.keys(attribute);
      for (var _i = 0, keys_1 = keys4; _i < keys_1.length; _i++) {
        var key = keys_1[_i];
        if (key === "class") {
          addClass2([element2], attribute["" + key]);
        } else {
          element2.setAttribute(key, attribute["" + key]);
        }
      }
    };
    Carousel2.prototype.templateParser = function(template) {
      if (template) {
        try {
          if (typeof template !== "function" && document.querySelectorAll(template).length) {
            return compile4(document.querySelector(template).innerHTML.trim());
          } else {
            return compile4(template);
          }
        } catch (error) {
          return compile4(template);
        }
      }
      return void 0;
    };
    Carousel2.prototype.getNavigatorState = function(target, isPrevious) {
      var button = target.querySelector("." + (isPrevious ? CLS_PREV_BUTTON : CLS_NEXT_BUTTON));
      if (button) {
        var buttonObj = getInstance(button, Button);
        return buttonObj.disabled;
      }
      return false;
    };
    Carousel2.prototype.navigatorClickHandler = function(e) {
      var target = e.currentTarget;
      var isDisabled = this.getNavigatorState(target, target.classList.contains(CLS_PREVIOUS));
      if (isDisabled) {
        return;
      }
      var direction = target.classList.contains(CLS_PREVIOUS) ? "Previous" : "Next";
      this.setActiveSlide(this.getSlideIndex(direction), direction);
      this.autoSlide();
    };
    Carousel2.prototype.indicatorClickHandler = function(e) {
      var target = closest2(e.target, "." + CLS_INDICATOR_BAR);
      var index = parseInt(target.dataset.index, 10);
      if (this.selectedIndex !== index) {
        this.setActiveSlide(index, this.selectedIndex > index ? "Previous" : "Next");
        this.autoSlide();
      }
    };
    Carousel2.prototype.playButtonClickHandler = function(e, isPropertyChange) {
      if (isPropertyChange === void 0) {
        isPropertyChange = false;
      }
      var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
      if (playButton) {
        var buttonObj = getInstance(playButton, Button);
        if (!isPropertyChange) {
          this.setProperties({
            autoPlay: !this.autoPlay
          }, true);
        }
        playButton.setAttribute("aria-label", this.localeObj.getConstant(this.autoPlay ? "pauseSlideTransition" : "playSlideTransition"));
        buttonObj.iconCss = CLS_ICON2 + " " + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
        buttonObj.dataBind();
        this.itemsContainer.setAttribute("aria-live", this.autoPlay ? "off" : "polite");
        if (this.autoPlay && !this.loop && this.selectedIndex === this.slideItems.length - 1) {
          this.setActiveSlide(0, "Next");
        }
        this.autoSlide();
      }
    };
    Carousel2.prototype.keyHandler = function(e) {
      if (!this.allowKeyboardInteraction) {
        return;
      }
      var direction;
      var slideIndex;
      var isSlideTransition = false;
      var target = e.target;
      e.preventDefault();
      switch (e.action) {
        case "space":
          if (this.showIndicators && target.classList.contains(CLS_INDICATOR2)) {
            target.click();
          } else if (target.classList.contains(CLS_CAROUSEL) || target.classList.contains(CLS_PLAY_BUTTON)) {
            this.playButtonClickHandler(e);
          } else if (target.classList.contains(CLS_NEXT_BUTTON)) {
            this.next();
          } else if (target.classList.contains(CLS_PREV_BUTTON)) {
            this.prev();
          }
          break;
        case "end":
          slideIndex = this.slideItems.length - 1;
          direction = "Next";
          isSlideTransition = true;
          break;
        case "home":
          slideIndex = 0;
          direction = "Previous";
          isSlideTransition = true;
          break;
        case "moveUp":
        case "moveLeft":
        case "moveDown":
        case "moveRight":
          if (this.showIndicators && isNullOrUndefined2(this.indicatorsTemplate)) {
            this.element.focus();
          }
          direction = e.action === "moveUp" || e.action === "moveLeft" ? "Previous" : "Next";
          slideIndex = this.getSlideIndex(direction);
          isSlideTransition = !this.isSuspendSlideTransition(slideIndex, direction);
          break;
      }
      if (isSlideTransition) {
        this.setActiveSlide(slideIndex, direction);
        this.autoSlide();
        isSlideTransition = false;
      }
    };
    Carousel2.prototype.swipeHandler = function(e) {
      if (this.element.classList.contains(CLS_HOVER) || isNullOrUndefined2(this.slideItems) || this.slideItems.length <= 1) {
        return;
      }
      var direction = e.swipeDirection === "Right" ? "Previous" : "Next";
      var slideIndex = this.getSlideIndex(direction);
      if (!this.isSuspendSlideTransition(slideIndex, direction)) {
        this.setActiveSlide(slideIndex, direction, true);
        this.autoSlide();
      }
    };
    Carousel2.prototype.isSuspendSlideTransition = function(index, direction) {
      return !this.loop && (direction === "Next" && index === 0 || direction === "Previous" && index === this.slideItems.length - 1);
    };
    Carousel2.prototype.handleNavigatorsActions = function(index) {
      if (this.buttonsVisibility === "Hidden") {
        return;
      }
      if (this.showPlayButton) {
        var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
        var isLastSlide = this.selectedIndex === this.slideItems.length - 1 && !this.loop;
        var isButtonUpdate = isNullOrUndefined2(this.playButtonTemplate) && playButton && isLastSlide;
        if (isNullOrUndefined2(this.playButtonTemplate) && playButton && !isLastSlide) {
          isButtonUpdate = !playButton.classList.contains(CLS_ACTIVE3);
        }
        if (isButtonUpdate) {
          this.setProperties({
            autoPlay: !isLastSlide
          }, true);
          playButton.setAttribute("aria-label", this.localeObj.getConstant(this.autoPlay ? "pauseSlideTransition" : "playSlideTransition"));
          this.itemsContainer.setAttribute("aria-live", this.autoPlay ? "off" : "polite");
          var buttonObj = getInstance(playButton, Button);
          buttonObj.iconCss = CLS_ICON2 + " " + (this.autoPlay ? CLS_PAUSE_ICON : CLS_PLAY_ICON);
          buttonObj.dataBind();
        }
      }
      var prevButton = this.element.querySelector("." + CLS_PREV_BUTTON);
      if (prevButton && isNullOrUndefined2(this.previousButtonTemplate)) {
        var buttonObj = getInstance(prevButton, Button);
        buttonObj.disabled = !this.loop && index === 0;
        buttonObj.dataBind();
      }
      var nextButton = this.element.querySelector("." + CLS_NEXT_BUTTON);
      if (nextButton && isNullOrUndefined2(this.nextButtonTemplate)) {
        var buttonObj = getInstance(nextButton, Button);
        buttonObj.disabled = !this.loop && index === this.slideItems.length - 1;
        buttonObj.dataBind();
      }
    };
    Carousel2.prototype.onHoverActions = function(e) {
      var navigator2 = this.element.querySelector("." + CLS_NAVIGATORS);
      switch (e.type) {
        case "mouseenter":
          if (this.buttonsVisibility === "VisibleOnHover" && navigator2) {
            removeClass2([].slice.call(navigator2.childNodes), CLS_HOVER_ARROWS);
          }
          if (this.pauseOnHover) {
            addClass2([this.element], CLS_HOVER);
          }
          break;
        case "mouseleave":
          if (this.buttonsVisibility === "VisibleOnHover" && navigator2) {
            addClass2([].slice.call(navigator2.childNodes), CLS_HOVER_ARROWS);
          }
          removeClass2([this.element], CLS_HOVER);
          if (this.isSwipe) {
            this.swipStop();
          }
          break;
      }
      this.autoSlide();
    };
    Carousel2.prototype.onFocusActions = function(e) {
      switch (e.type) {
        case "focusin":
          addClass2([this.element], CLS_HOVER);
          break;
        case "focusout":
          removeClass2([this.element], CLS_HOVER);
          break;
      }
      this.autoSlide();
    };
    Carousel2.prototype.destroyButtons = function() {
      var buttonCollections = [].slice.call(this.element.querySelectorAll(".e-control.e-btn"));
      for (var _i = 0, buttonCollections_1 = buttonCollections; _i < buttonCollections_1.length; _i++) {
        var button = buttonCollections_1[_i];
        var instance = getInstance(button, Button);
        if (instance) {
          instance.destroy();
        }
      }
    };
    Carousel2.prototype.getNumOfItems = function() {
      return this.partialVisible ? 2 : 1;
    };
    Carousel2.prototype.getTranslateValue = function(element2) {
      var style = getComputedStyle(element2);
      return window.WebKitCSSMatrix ? new WebKitCSSMatrix(style.webkitTransform).m41 : 0;
    };
    Carousel2.prototype.swipeStart = function(e) {
      if (!this.timeStampStart) {
        this.timeStampStart = Date.now();
      }
      e.preventDefault();
      this.isSwipe = false;
      this.itemsContainer.classList.add("e-swipe-start");
      this.prevPageX = e.touches ? e.touches[0].pageX : e.pageX;
      this.initialTranslate = this.getTranslateValue(this.itemsContainer);
    };
    Carousel2.prototype.swiping = function(e) {
      if (!this.itemsContainer.classList.contains("e-swipe-start")) {
        return;
      }
      this.isSwipe = true;
      e.preventDefault();
      var pageX = e.touches ? e.touches[0].pageX : e.pageX;
      var positionDiff = this.prevPageX - pageX;
      if (!this.loop && (this.enableRtl && (this.selectedIndex === 0 && positionDiff > 0 || this.selectedIndex === this.itemsContainer.childElementCount - 1 && positionDiff < 0) || !this.enableRtl && (this.selectedIndex === 0 && positionDiff < 0 || this.selectedIndex === this.itemsContainer.childElementCount - 1 && positionDiff > 0))) {
        return;
      }
      this.itemsContainer.style.transform = "translateX(" + (this.initialTranslate + (this.enableRtl ? positionDiff : -positionDiff)) + "px)";
    };
    Carousel2.prototype.swipStop = function() {
      var time = Date.now() - this.timeStampStart;
      var distanceX = this.getTranslateValue(this.itemsContainer) - this.initialTranslate;
      distanceX = distanceX < 0 ? distanceX * -1 : distanceX;
      if (this.isSwipe) {
        var offsetDist = distanceX * (Browser2.isDevice ? 6 : 1.66);
        this.itemsContainer.style.transitionDuration = (Browser2.isDevice ? distanceX : offsetDist) / time / 10 + "s";
      }
      var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
      var threshold = slideWidth / 2;
      this.itemsContainer.classList.remove("e-swipe-start");
      var value = this.getTranslateValue(this.itemsContainer);
      if (value - this.initialTranslate < -threshold) {
        this.swipeNavigation(!this.enableRtl);
      } else if (value - this.initialTranslate > threshold) {
        this.swipeNavigation(this.enableRtl);
      } else {
        this.itemsContainer.style.transform = "translateX(" + this.initialTranslate + "px)";
        if (this.animationEffect === "Fade") {
          this.itemsContainer.classList.add("e-fade-in-out");
        }
      }
    };
    Carousel2.prototype.swipeNavigation = function(isRtl) {
      if (isRtl) {
        this.next();
      } else {
        this.prev();
      }
    };
    Carousel2.prototype.swipeModehandlers = function() {
      if ((this.swipeMode & CarouselSwipeMode.Touch) === CarouselSwipeMode.Touch) {
        EventHandler2.add(this.itemsContainer, "touchstart", this.swipeStart, this);
        EventHandler2.add(this.itemsContainer, "touchmove", this.swiping, this);
        EventHandler2.add(this.itemsContainer, "touchend", this.swipStop, this);
      }
      if ((this.swipeMode & CarouselSwipeMode.Mouse) === CarouselSwipeMode.Mouse) {
        EventHandler2.add(this.itemsContainer, "mousedown", this.swipeStart, this);
        EventHandler2.add(this.itemsContainer, "mousemove", this.swiping, this);
        EventHandler2.add(this.itemsContainer, "mouseup", this.swipStop, this);
      }
      if (this.swipeMode === 0 && (this.swipeMode & CarouselSwipeMode.Mouse & CarouselSwipeMode.Touch) === (CarouselSwipeMode.Mouse & CarouselSwipeMode.Touch)) {
        EventHandler2.add(this.itemsContainer, "mousedown touchstart", this.swipeStart, this);
        EventHandler2.add(this.itemsContainer, "mousemove touchmove", this.swiping, this);
        EventHandler2.add(this.itemsContainer, "mouseup touchend", this.swipStop, this);
      }
    };
    Carousel2.prototype.resizeHandler = function() {
      if (this.itemsContainer && this.itemsContainer.firstElementChild) {
        var numOfItems = this.getNumOfItems();
        var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
        if (this.loop) {
          this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + numOfItems);
        } else {
          this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex);
        }
      }
    };
    Carousel2.prototype.wireEvents = function() {
      if (this.animationEffect !== "Custom" && this.enableTouchSwipe) {
        this.swipeModehandlers();
      }
      EventHandler2.add(this.element, "focusin focusout", this.onFocusActions, this);
      EventHandler2.add(this.element, "mouseenter mouseleave", this.onHoverActions, this);
      EventHandler2.add(this.element.firstElementChild, "animationend", this.onTransitionEnd, this);
      EventHandler2.add(this.element.firstElementChild, "transitionend", this.onTransitionEnd, this);
      EventHandler2.add(window, "resize", this.resizeHandler, this);
    };
    Carousel2.prototype.unWireEvents = function() {
      var _this = this;
      var indicators = [].slice.call(this.element.querySelectorAll("." + CLS_INDICATOR_BAR));
      indicators.forEach(function(indicator) {
        EventHandler2.remove(indicator, "click", _this.indicatorClickHandler);
      });
      var navigators = [].slice.call(this.element.querySelectorAll("." + CLS_PREVIOUS + ",." + CLS_NEXT));
      navigators.forEach(function(navigator2) {
        EventHandler2.remove(navigator2, "click", _this.navigatorClickHandler);
      });
      var playIcon = this.element.querySelector("." + CLS_PLAY_PAUSE);
      if (playIcon) {
        EventHandler2.remove(playIcon, "click", this.playButtonClickHandler);
      }
      EventHandler2.remove(this.element.firstElementChild, "animationend", this.onTransitionEnd);
      EventHandler2.remove(this.element.firstElementChild, "transitionend", this.onTransitionEnd);
      EventHandler2.clearEvents(this.element);
      EventHandler2.clearEvents(this.itemsContainer);
      EventHandler2.remove(window, "resize", this.resizeHandler);
    };
    Carousel2.prototype.prev = function() {
      if (!this.loop && this.selectedIndex === 0) {
        return;
      }
      var index = this.selectedIndex === 0 ? this.slideItems.length - 1 : this.selectedIndex - 1;
      this.setActiveSlide(index, "Previous");
      this.autoSlide();
    };
    Carousel2.prototype.next = function() {
      if (!this.loop && this.selectedIndex === this.slideItems.length - 1) {
        return;
      }
      var index = this.selectedIndex === this.slideItems.length - 1 ? 0 : this.selectedIndex + 1;
      this.setActiveSlide(index, "Next");
      this.autoSlide();
    };
    Carousel2.prototype.play = function() {
      var playIcon = this.element.querySelector("." + CLS_PLAY_ICON);
      if (this.showPlayButton && playIcon) {
        classList(playIcon, [CLS_PAUSE_ICON], [CLS_PLAY_ICON]);
        var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
        playButton.setAttribute("aria-label", this.localeObj.getConstant("pauseSlideTransition"));
      }
      this.setProperties({
        autoPlay: true
      }, true);
      this.itemsContainer.setAttribute("aria-live", "off");
      this.applySlideInterval();
    };
    Carousel2.prototype.pause = function() {
      var pauseIcon = this.element.querySelector("." + CLS_PAUSE_ICON);
      if (this.showPlayButton && pauseIcon) {
        var playButton = this.element.querySelector("." + CLS_PLAY_BUTTON);
        playButton.setAttribute("aria-label", this.localeObj.getConstant("playSlideTransition"));
        classList(pauseIcon, [CLS_PLAY_ICON], [CLS_PAUSE_ICON]);
      }
      this.setProperties({
        autoPlay: false
      }, true);
      this.itemsContainer.setAttribute("aria-live", "off");
      this.resetSlideInterval();
    };
    Carousel2.prototype.renderTemplates = function() {
      if (this.isAngular || this.isReact) {
        this.renderReactTemplates();
      }
    };
    Carousel2.prototype.resetTemplates = function(templates) {
      if (this.isAngular || this.isReact) {
        this.clearTemplate(templates);
      }
    };
    Carousel2.prototype.destroy = function() {
      var _this = this;
      this.resetTemplates();
      if (this.touchModule) {
        this.touchModule.destroy();
        this.touchModule = null;
      }
      if (this.keyModule) {
        this.keyModule.destroy();
        this.keyModule = null;
      }
      this.resetSlideInterval();
      this.destroyButtons();
      this.unWireEvents();
      [].slice.call(this.element.children).forEach(function(ele) {
        _this.element.removeChild(ele);
      });
      removeClass2([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL6, CLS_SWIPE]);
      ["role", "style"].forEach(function(attr) {
        _this.element.removeAttribute(attr);
      });
      this.itemsContainer = null;
      _super.prototype.destroy.call(this);
    };
    __decorate79([Collection([], CarouselItem)], Carousel2.prototype, "items", void 0);
    __decorate79([Property2("Slide")], Carousel2.prototype, "animationEffect", void 0);
    __decorate79([Property2()], Carousel2.prototype, "previousButtonTemplate", void 0);
    __decorate79([Property2()], Carousel2.prototype, "nextButtonTemplate", void 0);
    __decorate79([Property2()], Carousel2.prototype, "indicatorsTemplate", void 0);
    __decorate79([Property2()], Carousel2.prototype, "playButtonTemplate", void 0);
    __decorate79([Property2()], Carousel2.prototype, "cssClass", void 0);
    __decorate79([Property2([])], Carousel2.prototype, "dataSource", void 0);
    __decorate79([Property2()], Carousel2.prototype, "itemTemplate", void 0);
    __decorate79([Property2(0)], Carousel2.prototype, "selectedIndex", void 0);
    __decorate79([Property2("100%")], Carousel2.prototype, "width", void 0);
    __decorate79([Property2("100%")], Carousel2.prototype, "height", void 0);
    __decorate79([Property2(5e3)], Carousel2.prototype, "interval", void 0);
    __decorate79([Property2(true)], Carousel2.prototype, "autoPlay", void 0);
    __decorate79([Property2(true)], Carousel2.prototype, "pauseOnHover", void 0);
    __decorate79([Property2(true)], Carousel2.prototype, "loop", void 0);
    __decorate79([Property2(false)], Carousel2.prototype, "showPlayButton", void 0);
    __decorate79([Property2(true)], Carousel2.prototype, "enableTouchSwipe", void 0);
    __decorate79([Property2(true)], Carousel2.prototype, "allowKeyboardInteraction", void 0);
    __decorate79([Property2(true)], Carousel2.prototype, "showIndicators", void 0);
    __decorate79([Property2("Default")], Carousel2.prototype, "indicatorsType", void 0);
    __decorate79([Property2("Visible")], Carousel2.prototype, "buttonsVisibility", void 0);
    __decorate79([Property2(false)], Carousel2.prototype, "partialVisible", void 0);
    __decorate79([Property2(CarouselSwipeMode.Touch)], Carousel2.prototype, "swipeMode", void 0);
    __decorate79([Property2()], Carousel2.prototype, "htmlAttributes", void 0);
    __decorate79([Event3()], Carousel2.prototype, "slideChanging", void 0);
    __decorate79([Event3()], Carousel2.prototype, "slideChanged", void 0);
    Carousel2 = __decorate79([NotifyPropertyChanges2], Carousel2);
    return Carousel2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/appbar/appbar.js
var __extends82 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate80 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var CLS_APPBAR = "e-appbar";
var CLS_HORIZONTAL_BOTTOM = "e-horizontal-bottom";
var CLS_STICKY = "e-sticky";
var CLS_PROMINENT = "e-prominent";
var CLS_DENSE = "e-dense";
var CLS_RTL7 = "e-rtl";
var CLS_LIGHT = "e-light";
var CLS_DARK = "e-dark";
var CLS_PRIMARY = "e-primary";
var CLS_INHERIT = "e-inherit";
var AppBar = (
  /** @class */
  function(_super) {
    __extends82(AppBar2, _super);
    function AppBar2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    AppBar2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.element.classList.remove(CLS_APPBAR);
      this.element.removeAttribute("style");
      this.element.removeAttribute("role");
    };
    AppBar2.prototype.getModuleName = function() {
      return "appbar";
    };
    AppBar2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    AppBar2.prototype.preRender = function() {
    };
    AppBar2.prototype.render = function() {
      this.element.classList.add(CLS_APPBAR);
      if (this.element.tagName !== "HEADER") {
        this.element.setAttribute("role", "banner");
      }
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.split(" "));
      }
      if (this.position === "Bottom") {
        this.element.classList.add(CLS_HORIZONTAL_BOTTOM);
      }
      if (this.isSticky) {
        this.element.classList.add(CLS_STICKY);
      }
      if (this.enableRtl) {
        this.element.classList.add(CLS_RTL7);
      }
      this.setHeightMode();
      this.setColorMode();
      if (!isNullOrUndefined2(this.htmlAttributes)) {
        this.setHtmlAttributes(this.htmlAttributes, this.element);
      }
    };
    AppBar2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "mode":
            removeClass2([this.element], [CLS_DENSE, CLS_PROMINENT]);
            this.setHeightMode();
            break;
          case "position":
            if (this.position === "Bottom") {
              addClass2([this.element], CLS_HORIZONTAL_BOTTOM);
            } else {
              removeClass2([this.element], CLS_HORIZONTAL_BOTTOM);
            }
            break;
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.element], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([this.element], newProp.cssClass.split(" "));
            }
            break;
          case "isSticky":
            if (this.isSticky) {
              addClass2([this.element], CLS_STICKY);
            } else {
              removeClass2([this.element], CLS_STICKY);
            }
            break;
          case "htmlAttributes":
            if (!isNullOrUndefined2(this.htmlAttributes)) {
              if (!isNullOrUndefined2(oldProp.htmlAttributes)) {
                var keys4 = Object.keys(oldProp.htmlAttributes);
                for (var _b = 0, keys_1 = keys4; _b < keys_1.length; _b++) {
                  var key = keys_1[_b];
                  if (key === "class") {
                    removeClass2([this.element], oldProp.htmlAttributes["" + key]);
                  } else {
                    this.element.removeAttribute(key);
                  }
                }
              }
              this.setHtmlAttributes(newProp.htmlAttributes, this.element);
            }
            break;
          case "colorMode":
            removeClass2([this.element], [CLS_DARK, CLS_PRIMARY, CLS_INHERIT, CLS_LIGHT]);
            this.setColorMode();
            break;
          case "enableRtl":
            if (this.enableRtl) {
              addClass2([this.element], CLS_RTL7);
            } else {
              removeClass2([this.element], CLS_RTL7);
            }
            break;
        }
      }
    };
    AppBar2.prototype.setHtmlAttributes = function(attribute, element2) {
      var keys4 = Object.keys(attribute);
      for (var _i = 0, keys_2 = keys4; _i < keys_2.length; _i++) {
        var key = keys_2[_i];
        if (key === "class") {
          addClass2([element2], attribute["" + key]);
        } else {
          element2.setAttribute(key, attribute["" + key]);
        }
      }
    };
    AppBar2.prototype.setHeightMode = function() {
      if (this.mode === "Prominent") {
        this.element.classList.add(CLS_PROMINENT);
      } else if (this.mode === "Dense") {
        this.element.classList.add(CLS_DENSE);
      }
    };
    AppBar2.prototype.setColorMode = function() {
      switch (this.colorMode) {
        case "Light":
          this.element.classList.add(CLS_LIGHT);
          break;
        case "Dark":
          this.element.classList.add(CLS_DARK);
          break;
        case "Primary":
          this.element.classList.add(CLS_PRIMARY);
          break;
        case "Inherit":
          this.element.classList.add(CLS_INHERIT);
          break;
      }
    };
    __decorate80([Property2("Regular")], AppBar2.prototype, "mode", void 0);
    __decorate80([Property2("Top")], AppBar2.prototype, "position", void 0);
    __decorate80([Property2()], AppBar2.prototype, "cssClass", void 0);
    __decorate80([Property2(false)], AppBar2.prototype, "isSticky", void 0);
    __decorate80([Property2()], AppBar2.prototype, "htmlAttributes", void 0);
    __decorate80([Property2("Light")], AppBar2.prototype, "colorMode", void 0);
    __decorate80([Event3()], AppBar2.prototype, "created", void 0);
    __decorate80([Event3()], AppBar2.prototype, "destroyed", void 0);
    AppBar2 = __decorate80([NotifyPropertyChanges2], AppBar2);
    return AppBar2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/stepper-base/stepper-base.js
var __extends83 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate81 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var PROGRESSVALUE = "--progress-value";
var PROGRESSPOS = "--progress-position";
var VERTICALSTEP = "e-vertical";
var HORIZSTEP = "e-horizontal";
var ITEMLIST2 = "e-stepper-steps";
var StepStatus;
(function(StepStatus2) {
  StepStatus2["NotStarted"] = "NotStarted";
  StepStatus2["InProgress"] = "InProgress";
  StepStatus2["Completed"] = "Completed";
})(StepStatus || (StepStatus = {}));
var Step = (
  /** @class */
  function(_super) {
    __extends83(Step2, _super);
    function Step2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate81([Property2("")], Step2.prototype, "cssClass", void 0);
    __decorate81([Property2(false)], Step2.prototype, "disabled", void 0);
    __decorate81([Property2("")], Step2.prototype, "iconCss", void 0);
    __decorate81([Property2(null)], Step2.prototype, "isValid", void 0);
    __decorate81([Property2("")], Step2.prototype, "label", void 0);
    __decorate81([Property2(false)], Step2.prototype, "optional", void 0);
    __decorate81([Property2(StepStatus.NotStarted)], Step2.prototype, "status", void 0);
    __decorate81([Property2("")], Step2.prototype, "text", void 0);
    return Step2;
  }(ChildProperty2)
);
var StepperOrientation;
(function(StepperOrientation2) {
  StepperOrientation2["Horizontal"] = "Horizontal";
  StepperOrientation2["Vertical"] = "Vertical";
})(StepperOrientation || (StepperOrientation = {}));
var StepperBase = (
  /** @class */
  function(_super) {
    __extends83(StepperBase2, _super);
    function StepperBase2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    StepperBase2.prototype.preRender = function() {
    };
    StepperBase2.prototype.getModuleName = function() {
      return "stepperBase";
    };
    StepperBase2.prototype.getPersistData = function() {
      return this.addOnPersist([]);
    };
    StepperBase2.prototype.render = function() {
    };
    StepperBase2.prototype.updateOrientaion = function(wrapper) {
      if (wrapper.classList.contains(HORIZSTEP) || wrapper.classList.contains(VERTICALSTEP)) {
        wrapper.classList.remove(HORIZSTEP, VERTICALSTEP);
      }
      if (!isNullOrUndefined2(this.orientation)) {
        wrapper.classList.add("e-" + this.orientation.toLocaleLowerCase());
      }
    };
    StepperBase2.prototype.renderProgressBar = function(wrapper) {
      this.progressStep = this.createElement("div", {
        className: "e-stepper-progressbar"
      });
      this.progressbar = this.createElement("div", {
        className: "e-progressbar-value"
      });
      var beforeLabel = wrapper.querySelector("li").querySelector(".e-step-label-container");
      this.progressStep.appendChild(this.progressbar);
      wrapper.prepend(this.progressStep);
      this.progressbar.style.setProperty(PROGRESSVALUE, "0%");
      if (wrapper.classList.contains(VERTICALSTEP)) {
        if (wrapper.classList.contains("e-label-bottom") || wrapper.classList.contains("e-label-top")) {
          var stepsContainer = wrapper.querySelector("." + ITEMLIST2);
          this.progressStep.style.setProperty(PROGRESSPOS, stepsContainer.offsetWidth / 2 + "px");
        } else {
          this.progressStep.style.setProperty(PROGRESSPOS, this.progressBarPosition / 2 - 1 + "px");
        }
      }
      if (beforeLabel && beforeLabel.classList.contains("e-label-before")) {
        this.progressStep.style.setProperty(PROGRESSPOS, this.progressBarPosition - 1 + 5 + "px");
      }
      if (wrapper.classList.contains(HORIZSTEP)) {
        this.setProgressPosition(wrapper);
      }
    };
    StepperBase2.prototype.setProgressPosition = function(wrapper, isResize) {
      var stepItemContainer = wrapper.querySelector(".e-step-container");
      var stepItemEle = stepItemContainer.firstElementChild;
      if (isResize !== true) {
        var topPos = 0;
        if (wrapper.classList.contains("e-label-before")) {
          topPos = stepItemContainer.offsetParent.offsetHeight - stepItemEle.offsetHeight / 2 - 1;
        } else {
          topPos = stepItemEle.offsetHeight / 2;
        }
        this.progressStep.style.setProperty("--progress-top-position", topPos + "px");
      }
      var lastEle = wrapper.querySelector("." + ITEMLIST2).lastChild.firstChild;
      if (wrapper.classList.contains("e-rtl")) {
        var leftPost = stepItemEle.offsetLeft + stepItemEle.offsetWidth - wrapper.querySelector("." + ITEMLIST2).offsetWidth;
        this.progressStep.style.setProperty("--progress-left-position", Math.abs(leftPost) + "px");
        this.progressStep.style.setProperty("--progress-bar-width", Math.abs(lastEle.offsetLeft - stepItemEle.offsetLeft) + "px");
      } else {
        this.progressStep.style.setProperty("--progress-left-position", stepItemEle.offsetLeft + 1 + "px");
        this.progressStep.style.setProperty("--progress-bar-width", lastEle.offsetWidth + lastEle.offsetLeft - 2 - (stepItemEle.offsetLeft + 2) + "px");
      }
    };
    StepperBase2.prototype.onPropertyChanged = function(newProp, oldProp) {
    };
    __decorate81([Collection([], Step)], StepperBase2.prototype, "steps", void 0);
    __decorate81([Property2("")], StepperBase2.prototype, "cssClass", void 0);
    __decorate81([Property2(false)], StepperBase2.prototype, "readOnly", void 0);
    __decorate81([Property2(StepperOrientation.Horizontal)], StepperBase2.prototype, "orientation", void 0);
    __decorate81([Event3()], StepperBase2.prototype, "created", void 0);
    StepperBase2 = __decorate81([NotifyPropertyChanges2], StepperBase2);
    return StepperBase2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-navigations/src/stepper/stepper.js
var __extends84 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate82 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var ITEMCONTAINER2 = "e-step-container";
var ITEMLIST3 = "e-stepper-steps";
var ICONCSS2 = "e-indicator";
var TEXTCSS = "e-step-text-container";
var STEPLABEL = "e-step-label-container";
var OPTIONAL = "e-step-label-optional";
var SELECTED4 = "e-step-selected";
var INPROGRESS = "e-step-inprogress";
var NOTSTARTED = "e-step-notstarted";
var FOCUS2 = "e-step-focus";
var COMPLETED = "e-step-completed";
var DISABLED12 = "e-step-disabled";
var READONLY2 = "e-stepper-readonly";
var PROGRESSVALUE2 = "--progress-value";
var RTL19 = "e-rtl";
var TEMPLATE = "e-step-template";
var LABELAFTER = "e-label-after";
var LABELBEFORE = "e-label-before";
var VERTICALSTEP2 = "e-vertical";
var HORIZSTEP2 = "e-horizontal";
var STEPICON = "e-step-item";
var STEPTEXT = "e-step-text";
var TEXT = "e-text";
var STEPSLABEL = "e-step-label";
var LABEL6 = "e-label";
var STEPINDICATOR = "e-step-type-indicator";
var LABELINDICATOR = "e-step-type-label";
var INDICATORICON = "e-step-indicator";
var STEPPERTOOLTIP = "e-stepper-tooltip";
var STEPPERIPROGRESSTIP = "e-step-inprogress-tip";
var LINEARSTEP = "e-linear";
var PREVSTEP = "e-previous";
var NEXTSTEP = "e-next";
var StepperAnimationSettings = (
  /** @class */
  function(_super) {
    __extends84(StepperAnimationSettings2, _super);
    function StepperAnimationSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate82([Property2(true)], StepperAnimationSettings2.prototype, "enable", void 0);
    __decorate82([Property2(2e3)], StepperAnimationSettings2.prototype, "duration", void 0);
    __decorate82([Property2(0)], StepperAnimationSettings2.prototype, "delay", void 0);
    return StepperAnimationSettings2;
  }(ChildProperty2)
);
var StepLabelPosition;
(function(StepLabelPosition2) {
  StepLabelPosition2["Top"] = "Top";
  StepLabelPosition2["Bottom"] = "Bottom";
  StepLabelPosition2["Start"] = "Start";
  StepLabelPosition2["End"] = "End";
})(StepLabelPosition || (StepLabelPosition = {}));
var StepType;
(function(StepType2) {
  StepType2["Default"] = "Default";
  StepType2["Label"] = "Label";
  StepType2["Indicator"] = "Indicator";
})(StepType || (StepType = {}));
var Stepper = (
  /** @class */
  function(_super) {
    __extends84(Stepper2, _super);
    function Stepper2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.stepperItemElements = [];
      return _this;
    }
    Stepper2.prototype.preRender = function() {
      if (!this.element.id) {
        this.element.id = getUniqueID("e-" + this.getModuleName());
      }
      var localeText = {
        optional: "Optional"
      };
      this.l10n = new L10n2("stepper", localeText, this.locale);
      this.keyConfigs = {
        downarrow: "downarrow",
        leftarrow: "leftarrow",
        rightarrow: "rightarrow",
        uparrow: "uparrow",
        space: "space",
        enter: "enter",
        home: "home",
        end: "end",
        tab: "tab",
        shiftTab: "shift+tab",
        escape: "escape"
      };
      this.tooltipOpen = false;
    };
    Stepper2.prototype.getModuleName = function() {
      return "stepper";
    };
    Stepper2.prototype.render = function() {
      this.initialize();
      this.navigationHandler(this.activeStep, null, false);
      this.updateStepperStatus(true);
    };
    Stepper2.prototype.initialize = function() {
      this.element.setAttribute("aria-label", this.element.id);
      this.updatePosition();
      this.stepperItemList = this.createElement("ol", {
        className: ITEMLIST3
      });
      this.updateOrientaion(this.element);
      this.updateStepType();
      this.element.appendChild(this.stepperItemList);
      if (this.cssClass) {
        addClass2([this.element], this.cssClass.trim().split(" "));
      }
      if (this.readOnly) {
        this.element.classList.add(READONLY2);
      }
      if (this.enableRtl) {
        this.element.classList.add(RTL19);
      }
      this.wireEvents();
      this.updateTemplateFunction();
      this.renderItems();
      if (this.steps.length > 0) {
        this.initiateProgressBar();
        this.checkValidStep();
        this.updateAnimation();
        this.updateTooltip();
        this.wireKeyboardEvent();
      }
    };
    Stepper2.prototype.initiateProgressBar = function() {
      var _this = this;
      if (this.steps.length > 1) {
        if (this.isAngular && this.template) {
          setTimeout(function() {
            _this.renderProgressBar(_this.element);
          });
        } else {
          this.renderProgressBar(this.element);
        }
      }
    };
    Stepper2.prototype.updatePosition = function() {
      this.progressBarPosition = this.beforeLabelWidth = this.textEleWidth = 0;
    };
    Stepper2.prototype.renderDefault = function(index) {
      var step = this.steps[parseInt(index.toString(), 10)];
      return !step.iconCss && !step.text && !step.label;
    };
    Stepper2.prototype.updateAnimation = function() {
      var progressEle = this.element.querySelector(".e-progressbar-value");
      if (this.animation.enable) {
        if (this.animation.duration >= 0) {
          if (progressEle) {
            progressEle.style.setProperty("--duration", this.animation.duration + "ms");
          }
        }
        if (this.animation.delay >= 0) {
          if (progressEle) {
            progressEle.style.setProperty("--delay", this.animation.delay + "ms");
          }
        }
      } else {
        if (progressEle) {
          progressEle.style.setProperty("--delay", "0ms");
          progressEle.style.setProperty("--duration", "0ms");
        }
      }
    };
    Stepper2.prototype.updateStepType = function() {
      if (!isNullOrUndefined2(this.stepType)) {
        var stepTypeLower = this.stepType.toLowerCase();
        var validStepTypes = ["indicator", "label", "default"];
        if (validStepTypes.indexOf(stepTypeLower) !== -1) {
          if (stepTypeLower !== "default") {
            this.element.classList.add("e-step-type-" + stepTypeLower);
          }
          if ((stepTypeLower === "indicator" || stepTypeLower === "label") && this.labelContainer) {
            this.clearLabelPosition();
          }
        }
      }
    };
    Stepper2.prototype.wireEvents = function() {
      EventHandler2.add(window, "resize", this.updateResize, this);
      EventHandler2.add(window, "click", this.updateStepFocus, this);
    };
    Stepper2.prototype.unWireEvents = function() {
      EventHandler2.remove(window, "resize", this.updateResize);
      EventHandler2.remove(window, "click", this.updateStepFocus);
    };
    Stepper2.prototype.updateResize = function() {
      if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP2)) {
        this.setProgressPosition(this.element, true);
      }
      this.navigateToStep(this.activeStep, null, null, false, false);
    };
    Stepper2.prototype.updateStepFocus = function() {
      if (this.isKeyNavFocus) {
        this.isKeyNavFocus = false;
        var isFocus = this.element.querySelector("." + FOCUS2);
        if (isFocus) {
          isFocus.classList.remove(FOCUS2);
          this.element.classList.remove("e-steps-focus");
        }
      }
    };
    Stepper2.prototype.updateStepperStatus = function(isInitial) {
      for (var index = 0; index < this.steps.length; index++) {
        var item = this.steps[parseInt(index.toString(), 10)];
        var status_1 = item.status.toLowerCase();
        if (isInitial && this.activeStep === 0 && index === 0) {
          var prevOnChange = this.isProtectedOnChange;
          this.isProtectedOnChange = true;
          item.status = StepStatus.InProgress;
          this.isProtectedOnChange = prevOnChange;
        }
        if (item && status_1 !== "notstarted" && index === this.activeStep) {
          for (var i = 0; i < this.steps.length; i++) {
            var itemElement = this.stepperItemElements[parseInt(i.toString(), 10)];
            itemElement.classList.remove(SELECTED4, INPROGRESS, COMPLETED, NOTSTARTED);
            var prevOnChange = this.isProtectedOnChange;
            this.isProtectedOnChange = true;
            if (status_1 === "completed") {
              this.updateStatusClass(i, index, itemElement);
            } else {
              this.updateStatusClass(i, index, itemElement, true);
            }
            this.isProtectedOnChange = prevOnChange;
          }
        } else if (item && status_1 !== "notstarted" && index !== this.activeStep) {
          this.navigationHandler(this.activeStep, null, true);
        }
      }
    };
    Stepper2.prototype.updateStatusClass = function(currentStep, index, ele, isInprogress) {
      var stepItem = this.steps[parseInt(currentStep.toString(), 10)];
      if (currentStep < index) {
        ele.classList.add(COMPLETED);
        stepItem.status = StepStatus.Completed;
      } else if (currentStep === index) {
        ele.classList.add(isInprogress ? INPROGRESS : COMPLETED, SELECTED4);
      } else {
        ele.classList.add(NOTSTARTED);
      }
    };
    Stepper2.prototype.renderItems = function() {
      var _this = this;
      var _a;
      var isHorizontal = this.element.classList.contains(HORIZSTEP2);
      var isVertical = this.element.classList.contains(VERTICALSTEP2);
      var labelPositionLower = !isNullOrUndefined2(this.labelPosition) ? this.labelPosition.toLowerCase() : "";
      for (var index = 0; index < this.steps.length; index++) {
        this.stepperItemContainer = this.createElement("li", {
          className: ITEMCONTAINER2
        });
        var stepSpan = this.createElement("span", {
          className: "e-step"
        });
        var item = this.steps[parseInt(index.toString(), 10)];
        var isItemLabel = item.label ? true : false;
        var isItemText = item.text ? true : false;
        var isIndicator = this.element.classList.contains(STEPINDICATOR);
        this.stepperItemContainer.classList[index === 0 ? "add" : "remove"](SELECTED4, INPROGRESS);
        this.stepperItemContainer.classList[index !== 0 ? "add" : "remove"](NOTSTARTED);
        if (isHorizontal) {
          this.stepperItemContainer.style.setProperty("--max-width", 100 / this.steps.length + "%");
        }
        if (this.renderDefault(index) && (isNullOrUndefined2(this.template) || this.template === "")) {
          var isIndicator_1 = !this.element.classList.contains("e-step-type-default") && this.stepType.toLowerCase() === "indicator";
          if (isIndicator_1) {
            stepSpan.classList.add("e-icons", INDICATORICON);
          }
          if (!isIndicator_1 && item.isValid == null) {
            stepSpan.classList.add("e-step-content");
            stepSpan.innerHTML = (index + 1).toString();
          }
          this.stepperItemContainer.appendChild(stepSpan);
        } else if (isNullOrUndefined2(this.template) || this.template === "") {
          var isRender = true;
          if ((item.iconCss || !item.iconCss && isItemText && isItemLabel) && (!isItemText && !isItemLabel || !this.element.classList.contains(LABELINDICATOR))) {
            if (item.iconCss) {
              var itemIcon = item.iconCss.trim().split(" ");
              (_a = stepSpan.classList).add.apply(_a, [ICONCSS2].concat(itemIcon));
              this.stepperItemContainer.classList.add(STEPICON);
            } else if (!item.iconCss && isItemText && isItemLabel) {
              stepSpan.classList.add(ICONCSS2);
              stepSpan.innerHTML = item.text;
              this.stepperItemContainer.classList.add(STEPICON);
            }
            this.stepperItemContainer.appendChild(stepSpan);
            if ((isHorizontal && (labelPositionLower === "start" || labelPositionLower === "end") && isItemLabel || isVertical && (labelPositionLower === "top" || labelPositionLower === "bottom") && isItemLabel) && !isIndicator) {
              this.element.classList.add("e-label-" + labelPositionLower);
              this.createTextLabelElement(item.label);
              isRender = false;
            }
          }
          if (isItemText && (!item.iconCss || !isIndicator) && isRender && !(item.iconCss && isItemLabel)) {
            if (!item.iconCss && isIndicator || (!item.iconCss || this.element.classList.contains(LABELINDICATOR)) && !isItemLabel) {
              if (!item.iconCss && !isItemLabel) {
                this.element.classList.add("e-step-type-indicator");
              }
              this.checkValidState(item, stepSpan);
              isItemLabel = false;
            } else {
              if (!isItemLabel) {
                this.createTextLabelElement(item.text);
              }
              if (isItemLabel && this.element.classList.contains(LABELINDICATOR)) {
                var textSpan = this.createElement("span", {
                  className: TEXT
                });
                textSpan.innerText = item.label;
              }
              isItemText = isItemLabel ? false : true;
            }
          }
          if (isItemLabel && isItemLabel && (!item.iconCss || !isIndicator) && isRender) {
            if (!item.iconCss && !isItemText && isIndicator) {
              this.checkValidState(item, stepSpan, true);
            } else if (!(this.element.classList.contains(LABELINDICATOR) && isItemText) || this.element.classList.contains(LABELINDICATOR) && isItemLabel) {
              this.createTextLabelElement(item.label, true);
              this.updateLabelPosition();
              if (!item.iconCss && !isItemText && !this.stepperItemContainer.classList.contains(STEPICON) || this.element.classList.contains(LABELINDICATOR)) {
                this.stepperItemContainer.classList.add("e-step-label-only");
                if (item.isValid !== null) {
                  var iconSpan = this.createElement("span", {
                    className: "e-step-validation-icon e-icons"
                  });
                  this.labelContainer.appendChild(iconSpan);
                }
              }
            }
          }
        }
        if (item.optional) {
          var optionalSpan = this.createElement("span", {
            className: OPTIONAL
          });
          this.l10n.setLocale(this.locale);
          var optionalContent = this.l10n.getConstant("optional");
          optionalSpan.innerText = optionalContent;
          if (isItemLabel && this.labelContainer && (this.element.classList.contains(LABELAFTER) && !this.stepperItemContainer.classList.contains("e-step-label-only") || isHorizontal && this.element.classList.contains(LABELBEFORE) && !this.stepperItemContainer.classList.contains("e-step-label-only")) || isVertical && this.element.classList.contains(LABELBEFORE)) {
            this.labelContainer.appendChild(optionalSpan);
          } else {
            this.stepperItemContainer.appendChild(optionalSpan);
          }
          if (item.isValid !== null) {
            this.stepperItemContainer.classList.add(item.isValid ? "e-step-valid" : "e-step-error");
          }
        }
        if (item.cssClass) {
          addClass2([this.stepperItemContainer], item.cssClass.trim().split(" "));
        }
        if (item.disabled) {
          this.stepperItemContainer.classList[item.disabled ? "add" : "remove"](DISABLED12);
          attributes2(this.stepperItemContainer, {
            "tabindex": "-1",
            "aria-disabled": "true"
          });
        }
        if (item.isValid !== null) {
          if (item.isValid) {
            this.stepperItemContainer.classList.add("e-step-valid");
          } else {
            this.stepperItemContainer.classList.add("e-step-error");
          }
        }
        this.renderItemContent(index, false);
        if (this.stepperItemContainer.classList.contains(INPROGRESS)) {
          attributes2(this.stepperItemContainer, {
            "tabindex": "0",
            "aria-current": "true"
          });
        } else {
          attributes2(this.stepperItemContainer, {
            "tabindex": "-1"
          });
        }
        this.wireItemsEvents(this.stepperItemContainer, index);
        this.stepperItemElements.push(this.stepperItemContainer);
        var eventArgs = {
          element: this.stepperItemContainer,
          index
        };
        this.trigger("beforeStepRender", eventArgs, function(args) {
          _this.stepperItemList.appendChild(args.element);
        });
        if (isVertical) {
          if (this.isAngular && this.template) {
            setTimeout(function() {
              _this.calculateProgressBarPosition();
            });
          } else {
            this.calculateProgressBarPosition();
          }
        }
      }
      if (isVertical) {
        if (this.element.classList.contains(LABELBEFORE)) {
          var listItems = this.stepperItemList.querySelectorAll("." + LABEL6);
          for (var i = 0; i < listItems.length; i++) {
            var labelEle = listItems[parseInt(i.toString(), 10)];
            labelEle.style.setProperty("--label-width", this.beforeLabelWidth + 5 + "px");
          }
        }
      }
    };
    Stepper2.prototype.createTextLabelElement = function(content, isLabelEle) {
      if (isLabelEle === void 0) {
        isLabelEle = false;
      }
      var spanEle = this.createElement("span", {
        className: isLabelEle ? LABEL6 : TEXTCSS + " " + TEXT
      });
      spanEle.innerText = content;
      if (isLabelEle) {
        this.labelContainer = this.createElement("span", {
          className: STEPLABEL
        });
        this.labelContainer.appendChild(spanEle);
      } else {
        this.stepperItemContainer.appendChild(spanEle);
      }
      this.stepperItemContainer.classList.add(isLabelEle ? STEPSLABEL : STEPTEXT);
    };
    Stepper2.prototype.calculateProgressBarPosition = function() {
      var isBeforeLabel = this.element.classList.contains(LABELBEFORE) ? true : false;
      var iconOnly = this.stepperItemContainer.classList.contains(STEPICON) && !this.stepperItemContainer.classList.contains(STEPTEXT) && !this.stepperItemContainer.classList.contains(STEPSLABEL);
      var textEle = this.stepperItemContainer.querySelector("." + TEXTCSS);
      if (textEle) {
        this.textEleWidth = this.textEleWidth < textEle.offsetWidth ? textEle.offsetWidth : this.textEleWidth;
      }
      if (isBeforeLabel) {
        var labelWidth = this.stepperItemContainer.querySelector("." + LABEL6).offsetWidth + 15;
        this.beforeLabelWidth = Math.max(this.beforeLabelWidth, labelWidth);
        var iconEle = this.element.querySelector("ol").lastChild.querySelector("." + ICONCSS2);
        var textEle_1 = this.stepperItemContainer.querySelector("." + TEXTCSS);
        if (iconEle || textEle_1) {
          var itemWidth = this.beforeLabelWidth + (this.stepperItemContainer.querySelector("." + ICONCSS2) || textEle_1).offsetWidth / 2;
          this.progressBarPosition = Math.max(this.progressBarPosition, itemWidth);
        } else {
          this.progressBarPosition = Math.max(this.progressBarPosition, this.beforeLabelWidth / 2);
        }
      } else {
        var lastChild = this.element.querySelector("ol").lastChild;
        var lastChildWidth = iconOnly ? this.stepperItemContainer.offsetWidth : lastChild.firstChild.offsetWidth;
        this.progressBarPosition = Math.max(this.progressBarPosition, lastChildWidth);
      }
    };
    Stepper2.prototype.checkValidState = function(item, stepSpan, isLabel) {
      if (item.isValid == null) {
        stepSpan.classList.add("e-step-content");
        if (isLabel) {
          stepSpan.innerHTML = item.label;
        } else {
          stepSpan.innerHTML = item.label ? item.label : item.text;
        }
        this.stepperItemContainer.appendChild(stepSpan);
      } else {
        stepSpan.classList.add(ICONCSS2);
        this.stepperItemContainer.appendChild(stepSpan);
        this.stepperItemContainer.classList.add(STEPICON);
      }
    };
    Stepper2.prototype.updateCurrentLabel = function() {
      var labelPos = this.labelPosition.toLowerCase();
      var currentLabelPos = this.element.classList.contains(HORIZSTEP2) ? labelPos === "top" ? "before" : labelPos === "bottom" ? "after" : labelPos : labelPos === "start" ? "before" : labelPos === "end" ? "after" : labelPos;
      return currentLabelPos;
    };
    Stepper2.prototype.updateLabelPosition = function() {
      this.clearLabelPosition();
      this.labelContainer.classList.add("e-label-" + this.updateCurrentLabel());
      if (this.labelPosition.toLowerCase() === "start" && this.orientation.toLowerCase() === "vertical") {
        if (this.stepperItemContainer.firstChild) {
          this.stepperItemContainer.firstChild.before(this.labelContainer);
        } else {
          this.stepperItemContainer.appendChild(this.labelContainer);
        }
      } else {
        this.stepperItemContainer.appendChild(this.labelContainer);
      }
      this.element.classList.add("e-label-" + this.updateCurrentLabel());
    };
    Stepper2.prototype.clearLabelPosition = function() {
      var removeCss = this.labelContainer.classList.value.match(/(e-label-[after|before]+)/g);
      if (removeCss) {
        removeClass2([this.labelContainer], removeCss);
        removeClass2([this.element], removeCss);
      }
    };
    Stepper2.prototype.checkValidStep = function() {
      var isStepIndicator = this.element.classList.contains(STEPINDICATOR);
      var _loop_1 = function(index2) {
        var item = this_1.steps[parseInt(index2.toString(), 10)];
        var itemElement = this_1.stepperItemElements[parseInt(index2.toString(), 10)];
        if (item.isValid !== null) {
          var indicatorEle = void 0;
          var iconEle_1;
          if (isStepIndicator && !item.iconCss) {
            indicatorEle = itemElement.querySelector("." + ICONCSS2);
          } else {
            iconEle_1 = itemElement.querySelector("." + ICONCSS2);
          }
          if (!indicatorEle && isStepIndicator && this_1.renderDefault(index2)) {
            indicatorEle = itemElement.querySelector("." + INDICATORICON);
          }
          var textLabelIcon = itemElement.querySelector(".e-step-validation-icon");
          var itemIcon = item.iconCss.trim().split(" ");
          var validStep = itemElement.classList.contains("e-step-valid");
          var validIconClass = validStep ? "e-check" : "e-circle-info";
          if (indicatorEle) {
            indicatorEle.classList.remove(INDICATORICON);
            if (indicatorEle.innerHTML !== "") {
              indicatorEle.innerHTML = "";
            }
            indicatorEle.classList.add("e-icons", validIconClass, ICONCSS2);
          }
          if (this_1.renderDefault(index2) && !isStepIndicator) {
            var stepSpan = itemElement.querySelector(".e-step");
            stepSpan.classList.add("e-icons", validIconClass, ICONCSS2);
          }
          if (iconEle_1) {
            if (iconEle_1.innerHTML !== "") {
              iconEle_1.innerHTML = "";
            } else if (itemIcon.length > 0) {
              itemIcon.forEach(function(icon) {
                iconEle_1.classList.remove(icon);
              });
            }
            iconEle_1.classList.add("e-icons", validIconClass);
          }
          if (textLabelIcon) {
            textLabelIcon.classList.add(validStep ? "e-circle-check" : "e-circle-info");
            if (this_1.element.classList.contains(VERTICALSTEP2)) {
              var labelEle = itemElement.querySelector("." + LABEL6);
              var textEle = itemElement.querySelector("." + TEXT);
              var itemWidth = textEle ? textEle.offsetWidth + textEle.getBoundingClientRect().left : labelEle.offsetWidth + labelEle.getBoundingClientRect().left;
              var validationIcon = itemElement.querySelector(".e-step-validation-icon");
              validationIcon.style.setProperty("--icon-position", itemWidth + 20 + "px");
            }
          }
        }
      };
      var this_1 = this;
      for (var index = 0; index < this.steps.length; index++) {
        _loop_1(index);
      }
    };
    Stepper2.prototype.updateTooltip = function() {
      if (this.showTooltip) {
        this.tooltipObj = new Tooltip({
          target: ".e-step-container",
          windowCollision: true,
          opensOn: "Custom",
          cssClass: this.cssClass ? STEPPERTOOLTIP + " " + this.cssClass : STEPPERTOOLTIP,
          position: "TopCenter"
        });
        this.tooltipObj.appendTo(this.stepperItemList);
      } else {
        if (!isNullOrUndefined2(this.tooltipObj)) {
          this.tooltipObj.destroy();
          this.tooltipObj = null;
        }
      }
    };
    Stepper2.prototype.wireItemsEvents = function(itemElement, index) {
      EventHandler2.add(itemElement, "click", this.linearModeHandler.bind(this, itemElement, index), this);
      EventHandler2.add(itemElement, "mouseover", this.openStepperTooltip.bind(this, index), this);
      EventHandler2.add(itemElement, "mouseleave", this.closeStepperTooltip, this);
    };
    Stepper2.prototype.unWireItemsEvents = function() {
      for (var index = 0; index < this.steps.length; index++) {
        var itemElement = this.stepperItemElements[parseInt(index.toString(), 10)];
        EventHandler2.remove(itemElement, "click", this.linearModeHandler.bind(this, itemElement, index));
        EventHandler2.remove(itemElement, "mouseover", this.openStepperTooltip.bind(this, index));
        EventHandler2.remove(itemElement, "mouseleave", this.closeStepperTooltip);
      }
    };
    Stepper2.prototype.linearModeHandler = function(itemElement, index, e) {
      if (this.linear) {
        var linearModeValue = index - this.activeStep;
        if (Math.abs(linearModeValue) === 1) {
          this.stepClickHandler(index, e, itemElement);
        }
      } else {
        this.stepClickHandler(index, e, itemElement);
      }
    };
    Stepper2.prototype.openStepperTooltip = function(index) {
      var currentStep = this.steps[parseInt(index.toString(), 10)];
      if (this.showTooltip && (currentStep.label || currentStep.text)) {
        if (!this.tooltipOpen) {
          this.updateTooltipContent(index);
          this.tooltipObj.open(this.stepperItemElements[parseInt(index.toString(), 10)]);
          if (this.stepType.toLocaleLowerCase() !== "label" && (this.stepType.toLocaleLowerCase() === "indicator" || currentStep.label !== "" && currentStep.iconCss !== "" || currentStep.label === null && currentStep.iconCss === "" && currentStep.text !== "")) {
            var tooltipPopupClass = currentStep.status.toLowerCase() === "inprogress" ? STEPPERTOOLTIP + " " + STEPPERIPROGRESSTIP + " " + (this.cssClass ? this.cssClass : "") : STEPPERTOOLTIP + " " + (this.cssClass ? this.cssClass : "");
            this.tooltipObj.setProperties({
              cssClass: tooltipPopupClass.trim()
            });
          }
          this.tooltipOpen = true;
        }
      }
    };
    Stepper2.prototype.closeStepperTooltip = function() {
      if (this.tooltipOpen) {
        this.tooltipObj.close();
        this.tooltipOpen = false;
      }
    };
    Stepper2.prototype.updateTooltipContent = function(index) {
      if (this.showTooltip) {
        if (this.isReact) {
          this.clearTemplate(["stepperTooltipTemplate"]);
        }
        var content = void 0;
        var currentStep = this.steps[parseInt(index.toString(), 10)];
        if (this.tooltipTemplate) {
          content = this.createElement("span", {
            className: "e-stepper-tooltip-content"
          });
          var templateFunction = this.getTemplateFunction(this.tooltipTemplate);
          append(templateFunction({
            value: currentStep
          }, this, "stepperTooltipTemplate", this.element.id + "tooltipTemplate", this.isStringTemplate), content);
          this.tooltipObj.setProperties({
            content
          }, true);
        } else {
          var content_1 = currentStep.label ? currentStep.label : currentStep.text;
          this.tooltipObj.setProperties({
            content: initializeCSPTemplate(function() {
              return content_1;
            })
          }, true);
        }
        this.renderReactTemplates();
      }
    };
    Stepper2.prototype.stepClickHandler = function(index, e, itemElement) {
      var clickEventArgs = {
        element: itemElement,
        event: e,
        previousStep: this.activeStep,
        activeStep: index
      };
      this.trigger("stepClick", clickEventArgs);
      this.navigateToStep(index, e, itemElement, true);
    };
    Stepper2.prototype.updateTemplateFunction = function() {
      this.templateFunction = this.template ? this.getTemplateFunction(this.template) : null;
    };
    Stepper2.prototype.renderItemContent = function(index, isrerender) {
      var listItems = this.stepperItemList.querySelectorAll("li");
      if (isrerender) {
        this.removeItemContent(listItems[parseInt(index.toString(), 10)]);
      }
      if (this.template) {
        if (isrerender) {
          listItems[parseInt(index.toString(), 10)].classList.add(TEMPLATE);
        } else {
          this.stepperItemContainer.classList.add(TEMPLATE);
        }
        var item = this.steps[parseInt(index.toString(), 10)];
        append(this.templateFunction({
          step: item,
          currentStep: index
        }, this, "stepperTemplate", this.element.id + "_stepperTemplate", this.isStringTemplate), isrerender ? listItems[parseInt(index.toString(), 10)] : this.stepperItemContainer);
      }
      this.renderReactTemplates();
    };
    Stepper2.prototype.removeItemContent = function(ele) {
      ele.classList.remove(TEMPLATE);
      var firstChild = ele.firstElementChild;
      for (var i = 0; i < ele.childElementCount; i++) {
        firstChild.remove();
      }
    };
    Stepper2.prototype.updateContent = function() {
      if (this.isReact) {
        this.clearTemplate(["stepperTemplate"]);
      }
      for (var i = 0; i < this.steps.length; i++) {
        this.renderItemContent(i, true);
      }
    };
    Stepper2.prototype.getTemplateFunction = function(template) {
      if (typeof template === "string") {
        var content = "";
        try {
          var tempEle = select2(template);
          if (tempEle) {
            content = tempEle.tagName === "SCRIPT" ? tempEle.innerHTML : tempEle.outerHTML;
          } else {
            content = template;
          }
        } catch (e) {
          content = template;
        }
        return compile4(content);
      } else {
        return compile4(template);
      }
    };
    Stepper2.prototype.navigateToStep = function(index, e, itemElement, isInteracted, isUpdated) {
      var _this = this;
      var eventArgs = {
        element: itemElement,
        event: e,
        isInteracted,
        previousStep: this.activeStep,
        activeStep: index,
        cancel: false
      };
      if (isUpdated !== false) {
        var previousStep_1 = this.activeStep;
        this.trigger("stepChanging", eventArgs, function(args) {
          if (args.cancel) {
            return;
          }
          _this.navigationHandler(index);
          var eventArgs2 = {
            element: itemElement,
            event: e,
            isInteracted,
            previousStep: previousStep_1,
            activeStep: _this.activeStep
          };
          _this.trigger("stepChanged", eventArgs2);
        });
      } else {
        this.navigationHandler(index);
      }
    };
    Stepper2.prototype.navigationHandler = function(index, stepStatus, isUpdated) {
      index = Math.min(index, this.steps.length - 1);
      var Itemslength = this.stepperItemElements.length;
      if (index >= 0 && index < Itemslength - 1) {
        index = this.stepperItemElements[parseInt(index.toString(), 10)].classList.contains(DISABLED12) ? this.activeStep : index;
      }
      var prevOnChange = this.isProtectedOnChange;
      this.isProtectedOnChange = true;
      this.activeStep = parseInt(index.toString(), 10);
      this.isProtectedOnChange = prevOnChange;
      for (var i = 0; i < this.steps.length; i++) {
        var itemElement = this.stepperItemElements[parseInt(i.toString(), 10)];
        var item = this.steps[parseInt(i.toString(), 10)];
        itemElement.classList.remove(SELECTED4, INPROGRESS, COMPLETED, NOTSTARTED);
        if (i === this.activeStep) {
          itemElement.classList.add(SELECTED4);
        }
        if (this.activeStep >= 0 && this.progressbar) {
          if (this.element.classList.contains(HORIZSTEP2)) {
            this.calculateProgressbarPos();
          } else {
            this.progressbar.style.setProperty(PROGRESSVALUE2, 100 / (this.steps.length - 1) * index + "%");
          }
        } else if (this.activeStep < 0 && this.progressbar) {
          this.progressbar.style.setProperty(PROGRESSVALUE2, "0%");
        }
        if (i === this.activeStep) {
          itemElement.classList.add(INPROGRESS);
        } else if (this.activeStep > 0 && i < this.activeStep) {
          itemElement.classList.add(COMPLETED);
        } else {
          itemElement.classList.add(NOTSTARTED);
        }
        if (itemElement.classList.contains(INPROGRESS)) {
          attributes2(itemElement, {
            "tabindex": "0",
            "aria-current": "true"
          });
        } else {
          attributes2(itemElement, {
            "tabindex": "-1",
            "aria-current": "false"
          });
        }
        var prevOnChange_1 = this.isProtectedOnChange;
        this.isProtectedOnChange = true;
        if (isUpdated !== false) {
          if (i < this.activeStep || this.steps.length - 1 === this.activeStep && item.status.toLowerCase() === "completed") {
            item.status = StepStatus.Completed;
          } else if (i === this.activeStep) {
            item.status = StepStatus.InProgress;
          } else if (i > this.activeStep) {
            item.status = StepStatus.NotStarted;
          }
          if (stepStatus && this.activeStep === i) {
            item.status = stepStatus;
          }
          if (item.status.toLowerCase() === "completed") {
            itemElement.classList.remove(SELECTED4, INPROGRESS, NOTSTARTED);
            itemElement.classList.add(COMPLETED);
          }
          if (item.status.toLowerCase() === "notstarted") {
            itemElement.classList.remove(SELECTED4, INPROGRESS, COMPLETED);
            itemElement.classList.add(NOTSTARTED);
          }
        }
        this.isProtectedOnChange = prevOnChange_1;
        this.updateIndicatorStatus(i, itemElement);
      }
      this.updateStepInteractions();
    };
    Stepper2.prototype.calculateProgressbarPos = function() {
      var _this = this;
      if ((this.element.classList.contains(LABELBEFORE) || this.element.classList.contains(LABELAFTER)) && !this.element.classList.contains(STEPINDICATOR) && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(STEPICON)) {
        var progressPos = this.element.querySelector(".e-stepper-progressbar");
        var selectedEle = this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].firstChild;
        var value = this.activeStep === 0 ? 0 : (selectedEle.offsetLeft - progressPos.offsetLeft + selectedEle.offsetWidth / 2) / progressPos.offsetWidth * 100;
        if (this.element.classList.contains(RTL19)) {
          value = (progressPos.getBoundingClientRect().right - selectedEle.getBoundingClientRect().right + selectedEle.offsetWidth / 2) / progressPos.offsetWidth * 100;
          this.progressbar.style.setProperty(PROGRESSVALUE2, value + "%");
        } else {
          this.progressbar.style.setProperty(PROGRESSVALUE2, value + "%");
        }
      } else {
        var totalLiWidth_1 = 0;
        var activeLiWidth_1 = 0;
        this.stepperItemElements.forEach(function(element2, index) {
          var itemWidth = element2.offsetWidth;
          totalLiWidth_1 += itemWidth;
          if (index <= _this.activeStep) {
            activeLiWidth_1 += index === _this.activeStep && index !== 0 ? itemWidth / 2 : itemWidth;
          }
        });
        var spaceWidth = (this.stepperItemList.offsetWidth - totalLiWidth_1) / (this.stepperItemElements.length - 1);
        var progressValue = (activeLiWidth_1 + spaceWidth * this.activeStep) / this.stepperItemList.offsetWidth * 100;
        this.progressbar.style.setProperty(PROGRESSVALUE2, progressValue + "%");
      }
    };
    Stepper2.prototype.updateIndicatorStatus = function(index, itemElement) {
      if (this.renderDefault(index) && this.element.classList.contains(STEPINDICATOR) && !itemElement.classList.contains("e-step-valid") && !itemElement.classList.contains("e-step-error")) {
        if (itemElement.classList.contains(COMPLETED)) {
          itemElement.firstChild.classList.remove("e-icons", "e-step-indicator");
          itemElement.firstChild.classList.add(ICONCSS2, "e-icons", "e-check");
        } else if (itemElement.classList.contains(INPROGRESS) || itemElement.classList.contains(NOTSTARTED)) {
          itemElement.firstChild.classList.remove(ICONCSS2, "e-icons", "e-check");
          itemElement.firstChild.classList.add("e-icons", "e-step-indicator");
        }
      }
    };
    Stepper2.prototype.updateStepInteractions = function() {
      var _this = this;
      this.element.classList.toggle(LINEARSTEP, this.linear);
      this.stepperItemElements.forEach(function(step, index) {
        step.classList.toggle(PREVSTEP, index === _this.activeStep - 1);
        step.classList.toggle(NEXTSTEP, index === _this.activeStep + 1);
      });
    };
    Stepper2.prototype.removeItemElements = function() {
      for (var i = 0; i < this.stepperItemElements.length; i++) {
        remove(this.stepperItemElements[parseInt(i.toString(), 10)]);
      }
      this.stepperItemElements = [];
    };
    Stepper2.prototype.nextStep = function() {
      if (this.activeStep !== this.steps.length - 1) {
        this.navigateToStep(this.activeStep + 1, null, null, false);
      }
    };
    Stepper2.prototype.previousStep = function() {
      if (this.activeStep > 0) {
        this.navigateToStep(this.activeStep - 1, null, null, false);
      }
    };
    Stepper2.prototype.reset = function() {
      if (this.activeStep === 0) {
        this.updateStepInteractions();
      } else {
        var isDisabled = this.stepperItemElements[0].classList.contains(DISABLED12) ? true : false;
        this.navigateToStep(isDisabled ? -1 : 0, null, null, false);
      }
    };
    Stepper2.prototype.refreshProgressbar = function() {
      if (this.stepperItemList && this.progressbar) {
        this.setProgressPosition(this.element);
      }
      this.navigateToStep(this.activeStep, null, null, false, false);
    };
    Stepper2.prototype.updateElementClassArray = function() {
      var classArray = [RTL19, READONLY2, "e-steps-focus", LABELAFTER, LABELBEFORE, "e-label-top", "e-label-bottom", "e-label-start", "e-label-end", STEPINDICATOR, LABELINDICATOR, VERTICALSTEP2, HORIZSTEP2, LINEARSTEP];
      removeClass2([this.element], classArray);
    };
    Stepper2.prototype.destroy = function() {
      _super.prototype.destroy.call(this);
      this.unWireEvents();
      this.unWireItemsEvents();
      this.removeItemElements();
      this.clearTemplate();
      if (this.stepperItemList) {
        remove(this.stepperItemList);
      }
      this.stepperItemList = null;
      if (this.progressStep) {
        remove(this.progressStep);
      }
      this.progressStep = null;
      this.progressbar = null;
      this.progressBarPosition = null;
      this.stepperItemContainer = null;
      this.textContainer = null;
      this.labelContainer = null;
      this.updateElementClassArray();
      this.element.removeAttribute("aria-label");
      if (this.showTooltip) {
        this.tooltipObj.destroy();
        this.tooltipObj = null;
      }
      if (this.keyboardModuleStepper) {
        this.keyboardModuleStepper.destroy();
      }
      this.keyboardModuleStepper = null;
    };
    Stepper2.prototype.wireKeyboardEvent = function() {
      this.keyboardModuleStepper = new KeyboardEvents2(this.element, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    Stepper2.prototype.keyActionHandler = function(e) {
      if (this.readOnly) {
        return;
      }
      switch (e.action) {
        case "uparrow":
        case "downarrow":
        case "leftarrow":
        case "rightarrow":
        case "tab":
        case "shiftTab":
          this.handleNavigation(this.enableRtl && this.element.classList.contains(HORIZSTEP2) ? e.action === "leftarrow" || e.action === "tab" || e.action === "uparrow" : e.action === "rightarrow" || e.action === "tab" || e.action === "downarrow", e);
          break;
        case "space":
        case "enter":
        case "escape":
          this.handleNavigation(null, e);
          break;
        case "home":
        case "end":
          this.handleNavigation(null, e, this.enableRtl);
          break;
      }
    };
    Stepper2.prototype.handleNavigation = function(isNextStep, e, isRTL) {
      this.isKeyNavFocus = true;
      this.element.classList.add("e-steps-focus");
      var focusedEle = this.element.querySelector("." + FOCUS2);
      if (!focusedEle) {
        focusedEle = this.element.querySelector("." + SELECTED4);
      }
      var stepItems = Array.prototype.slice.call(this.stepperItemList.children);
      var index = stepItems.indexOf(focusedEle);
      if (e.action === "tab" || e.action === "shiftTab" || e.action === "downarrow" || e.action === "uparrow" || e.action === "space" || e.action === "home" || e.action === "end") {
        if (e.action === "tab" && index === stepItems.length - 1 || e.action === "shiftTab" && index === 0) {
          if (focusedEle.classList.contains(FOCUS2)) {
            this.updateStepFocus();
            return;
          }
        } else {
          e.preventDefault();
        }
      }
      if (e.action === "escape") {
        stepItems[parseInt(index.toString(), 10)].classList.remove(FOCUS2);
        this.element.classList.remove("e-steps-focus");
      }
      if (!(e.action === "space" || e.action === "enter")) {
        var prevIndex = index;
        index = isNextStep ? index + 1 : index - 1;
        while (index >= 0 && index < stepItems.length && stepItems[parseInt(index.toString(), 10)].classList.contains(DISABLED12)) {
          index = isNextStep ? index + 1 : index - 1;
        }
        index = index < 0 ? 0 : index > stepItems.length - 1 ? stepItems.length - 1 : index;
        if (stepItems[parseInt(prevIndex.toString(), 10)].classList.contains(FOCUS2)) {
          stepItems[parseInt(prevIndex.toString(), 10)].classList.remove(FOCUS2);
        }
        if (e.action === "home" || e.action === "end") {
          if (e.action === "home") {
            index = isRTL ? stepItems.length - 1 : 0;
          } else {
            index = isRTL ? 0 : stepItems.length - 1;
          }
        }
        if (index >= 0 && index < stepItems.length) {
          stepItems[parseInt(index.toString(), 10)].classList.add(FOCUS2);
        }
      } else if (e.action === "space" || e.action === "enter") {
        var isupdateFocus = false;
        if (this.linear) {
          var linearModeValue = this.activeStep - index;
          if (Math.abs(linearModeValue) === 1) {
            this.navigateToStep(index, null, null, true);
            isupdateFocus = true;
          }
        } else {
          this.navigateToStep(index, null, null, true);
          isupdateFocus = true;
        }
        if (isupdateFocus) {
          this.updateStepFocus();
          this.stepperItemElements[index].focus();
        }
      }
    };
    Stepper2.prototype.renderStepperItems = function(isUpdate, isStepType) {
      this.updateElementClassArray();
      this.removeItemElements();
      this.element.querySelector(".e-stepper-progressbar").remove();
      if (isUpdate) {
        this.updatePosition();
      }
      if (isStepType) {
        this.updateStepType();
      }
      if (this.readOnly && !this.element.classList.contains(READONLY2)) {
        this.element.classList.add(READONLY2);
      }
      if (this.enableRtl && !this.element.classList.contains(RTL19)) {
        this.element.classList.add(RTL19);
      }
      this.updateOrientaion(this.element);
      this.renderItems();
      this.renderProgressBar(this.element);
      this.checkValidStep();
      this.updateAnimation();
      this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
    };
    Stepper2.prototype.updateDynamicSteps = function(steps, prevSteps) {
      if (!(steps instanceof Array && prevSteps instanceof Array)) {
        var stepCounts = Object.keys(steps);
        for (var i = 0; i < stepCounts.length; i++) {
          var index = parseInt(Object.keys(steps)[i], 10);
          var changedPropsCount = Object.keys(steps[index]).length;
          for (var j = 0; j < changedPropsCount; j++) {
            var property = Object.keys(steps[index])[j];
            if (property === "status") {
              if (this.activeStep === index) {
                this.navigationHandler(index, steps[index].status);
              } else {
                this.steps[index].status = prevSteps[index].status;
              }
            } else {
              this.removeItemElements();
              this.renderItems();
              this.updateStepperStatus();
            }
            if (property === "label" && (this.steps[index].iconCss || this.steps[index].text) && this.stepType.toLowerCase() === "default") {
              this.refreshProgressbar();
            }
            this.updateStepInteractions();
            this.checkValidStep();
          }
        }
      } else {
        this.renderStepperItems(true, true);
      }
    };
    Stepper2.prototype.updateDynamicActiveStep = function(activeStep, preActiveStep) {
      this.activeStep = activeStep > this.steps.length - 1 || activeStep < -1 ? preActiveStep : this.activeStep;
      if (this.activeStep >= 0 && this.stepperItemElements[parseInt(this.activeStep.toString(), 10)].classList.contains(DISABLED12)) {
        this.activeStep = preActiveStep;
      }
      if (this.linear) {
        var linearModeValue = preActiveStep - this.activeStep;
        if (Math.abs(linearModeValue) === 1) {
          this.navigateToStep(this.activeStep, null, null, true);
        }
      } else {
        this.navigateToStep(this.activeStep, null, this.stepperItemElements[this.activeStep], true);
      }
    };
    Stepper2.prototype.updateDynamicCssClass = function(cssClass2, prevCssClass) {
      if (prevCssClass) {
        removeClass2([this.element], prevCssClass.trim().split(" "));
      }
      if (cssClass2) {
        addClass2([this.element], cssClass2.trim().split(" "));
      }
      if (this.tooltipObj) {
        this.tooltipObj.setProperties({
          cssClass: this.cssClass ? STEPPERTOOLTIP + " " + this.cssClass : STEPPERTOOLTIP
        });
      }
    };
    Stepper2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "steps": {
            this.updateDynamicSteps(newProp.steps, oldProp.steps);
            break;
          }
          case "orientation":
            this.updateOrientaion(this.element);
            this.renderStepperItems(true);
            break;
          case "activeStep":
            this.updateDynamicActiveStep(newProp.activeStep, oldProp.activeStep);
            break;
          case "enableRtl":
            this.element.classList[this.enableRtl ? "add" : "remove"](RTL19);
            break;
          case "readOnly":
            this.element.classList[this.readOnly ? "add" : "remove"](READONLY2);
            break;
          case "cssClass":
            this.updateDynamicCssClass(newProp.cssClass, oldProp.cssClass);
            break;
          case "labelPosition":
            this.renderStepperItems(true);
            break;
          case "showTooltip":
            this.updateTooltip();
            break;
          case "stepType":
            this.renderStepperItems(true, true);
            break;
          case "template":
            this.updateTemplateFunction();
            this.updateContent();
            break;
          case "animation":
            this.updateAnimation();
            break;
          case "linear":
            this.updateStepInteractions();
            break;
        }
      }
    };
    __decorate82([Property2(0)], Stepper2.prototype, "activeStep", void 0);
    __decorate82([Complex2({}, StepperAnimationSettings)], Stepper2.prototype, "animation", void 0);
    __decorate82([Property2(false)], Stepper2.prototype, "linear", void 0);
    __decorate82([Property2(false)], Stepper2.prototype, "showTooltip", void 0);
    __decorate82([Property2("")], Stepper2.prototype, "template", void 0);
    __decorate82([Property2("")], Stepper2.prototype, "tooltipTemplate", void 0);
    __decorate82([Property2(StepLabelPosition.Bottom)], Stepper2.prototype, "labelPosition", void 0);
    __decorate82([Property2(StepType.Default)], Stepper2.prototype, "stepType", void 0);
    __decorate82([Event3()], Stepper2.prototype, "stepChanged", void 0);
    __decorate82([Event3()], Stepper2.prototype, "stepChanging", void 0);
    __decorate82([Event3()], Stepper2.prototype, "stepClick", void 0);
    __decorate82([Event3()], Stepper2.prototype, "beforeStepRender", void 0);
    Stepper2 = __decorate82([NotifyPropertyChanges2], Stepper2);
    return Stepper2;
  }(StepperBase)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/drop-down-tree/drop-down-tree.js
var __extends85 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate83 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var RTL20 = "e-rtl";
var DROPDOWNTREE = "e-ddt";
var HIDDENELEMENT2 = "e-ddt-hidden";
var DROPDOWNICON = "e-input-group-icon e-ddt-icon e-icons";
var SHOW_CHIP = "e-show-chip";
var SHOW_CLEAR = "e-show-clear";
var SHOW_DD_ICON = "e-show-dd-icon";
var CHIP_INPUT = "e-chip-input";
var INPUTFOCUS = "e-input-focus";
var INPUTGROUP3 = "e-input-group";
var ICONANIMATION = "e-icon-anim";
var CLOSEICON_CLASS = "e-clear-icon e-icons";
var CHIP_WRAPPER = "e-chips-wrapper";
var CHIP_COLLECTION = "e-chips-collection";
var CHIP = "e-chips";
var CHIP_CONTENT = "e-chipcontent";
var CHIP_CLOSE = "e-chips-close";
var HIDEICON = "e-icon-hide";
var DDTHIDEICON = "e-ddt-icon-hide";
var POPUP_CLASS = "e-ddt e-popup";
var PARENTITEM2 = "e-list-parent";
var CONTENT3 = "e-popup-content";
var DROPDOWN = "e-dropdown";
var DISABLED13 = "e-disabled";
var ICONS2 = "e-icons";
var CHECKALLPARENT = "e-selectall-parent";
var CHECKALLHIDE = "e-hide-selectall";
var BIGGER2 = "e-bigger";
var SMALL2 = "e-small";
var ALLTEXT = "e-all-text";
var CHECKBOXFRAME2 = "e-frame";
var CHECK4 = "e-check";
var CHECKBOXWRAP2 = "e-checkbox-wrapper";
var FILTERWRAP = "e-filter-wrap";
var DDTICON = "e-ddt-icon";
var FOOTER = "e-ddt-footer";
var HEADER2 = "e-ddt-header";
var NODATACONTAINER = "e-ddt-nodata";
var NODATA = "e-no-data";
var HEADERTEMPLATE = "HeaderTemplate";
var FOOTERTEMPLATE = "FooterTemplate";
var NORECORDSTEMPLATE = "NoRecordsTemplate";
var ACTIONFAILURETEMPLATE = "ActionFailureTemplate";
var CUSTOMTEMPLATE = "CustomTemplate";
var REMAIN_WRAPPER = "e-remain";
var OVERFLOW_VIEW = "e-overflow";
var SHOW_TEXT = "e-show-text";
var TOTAL_COUNT_WRAPPER = "e-total-count";
var REMAIN_COUNT = "e-wrap-count";
var Fields = (
  /** @class */
  function(_super) {
    __extends85(Fields2, _super);
    function Fields2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate83([Property2("child")], Fields2.prototype, "child", void 0);
    __decorate83([Property2([])], Fields2.prototype, "dataSource", void 0);
    __decorate83([Property2("expanded")], Fields2.prototype, "expanded", void 0);
    __decorate83([Property2("hasChildren")], Fields2.prototype, "hasChildren", void 0);
    __decorate83([Property2("htmlAttributes")], Fields2.prototype, "htmlAttributes", void 0);
    __decorate83([Property2("iconCss")], Fields2.prototype, "iconCss", void 0);
    __decorate83([Property2("imageUrl")], Fields2.prototype, "imageUrl", void 0);
    __decorate83([Property2("parentValue")], Fields2.prototype, "parentValue", void 0);
    __decorate83([Property2(null)], Fields2.prototype, "query", void 0);
    __decorate83([Property2("selectable")], Fields2.prototype, "selectable", void 0);
    __decorate83([Property2("selected")], Fields2.prototype, "selected", void 0);
    __decorate83([Property2(null)], Fields2.prototype, "tableName", void 0);
    __decorate83([Property2("text")], Fields2.prototype, "text", void 0);
    __decorate83([Property2("tooltip")], Fields2.prototype, "tooltip", void 0);
    __decorate83([Property2("value")], Fields2.prototype, "value", void 0);
    return Fields2;
  }(ChildProperty2)
);
var TreeSettings = (
  /** @class */
  function(_super) {
    __extends85(TreeSettings2, _super);
    function TreeSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate83([Property2(false)], TreeSettings2.prototype, "autoCheck", void 0);
    __decorate83([Property2(true)], TreeSettings2.prototype, "checkDisabledChildren", void 0);
    __decorate83([Property2("Auto")], TreeSettings2.prototype, "expandOn", void 0);
    __decorate83([Property2(false)], TreeSettings2.prototype, "loadOnDemand", void 0);
    return TreeSettings2;
  }(ChildProperty2)
);
var DropDownTree = (
  /** @class */
  function(_super) {
    __extends85(DropDownTree2, _super);
    function DropDownTree2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.filterTimer = null;
      _this.isFilteredData = false;
      _this.isFilterRestore = false;
      _this.selectedData = [];
      _this.filterDelayTime = 300;
      _this.isClicked = false;
      _this.documentClickContext = _this.onDocumentClick.bind(_this);
      _this.isCheckAllCalled = false;
      _this.isFromFilterChange = false;
      return _this;
    }
    DropDownTree2.prototype.getPersistData = function() {
      var keyEntity = ["value"];
      return this.addOnPersist(keyEntity);
    };
    DropDownTree2.prototype.getLocaleName = function() {
      return "drop-down-tree";
    };
    DropDownTree2.prototype.preRender = function() {
      this.inputFocus = false;
      this.isPopupOpen = false;
      this.isFirstRender = true;
      this.isInitialized = false;
      this.currentText = null;
      this.currentValue = null;
      this.oldValue = null;
      this.removeValue = false;
      this.selectedText = [];
      this.treeItems = [];
      this.dataValue = null;
      this.isNodeSelected = false;
      this.isDynamicChange = false;
      this.clearIconWidth = 0;
      this.headerTemplateId = "" + this.element.id + HEADERTEMPLATE;
      this.footerTemplateId = "" + this.element.id + FOOTERTEMPLATE;
      this.actionFailureTemplateId = "" + this.element.id + ACTIONFAILURETEMPLATE;
      this.noRecordsTemplateId = "" + this.element.id + NORECORDSTEMPLATE;
      this.customTemplateId = "" + this.element.id + CUSTOMTEMPLATE;
      this.keyConfigs = {
        escape: "escape",
        altUp: "alt+uparrow",
        altDown: "alt+downarrow",
        tab: "tab",
        shiftTab: "shift+tab",
        end: "end",
        enter: "enter",
        home: "home",
        moveDown: "downarrow",
        moveLeft: "leftarrow",
        moveRight: "rightarrow",
        moveUp: "uparrow",
        ctrlDown: "ctrl+downarrow",
        ctrlUp: "ctrl+uparrow",
        ctrlEnter: "ctrl+enter",
        ctrlHome: "ctrl+home",
        ctrlEnd: "ctrl+end",
        shiftDown: "shift+downarrow",
        shiftUp: "shift+uparrow",
        shiftEnter: "shift+enter",
        shiftHome: "shift+home",
        shiftEnd: "shift+end",
        csDown: "ctrl+shift+downarrow",
        csUp: "ctrl+shift+uparrow",
        csEnter: "ctrl+shift+enter",
        csHome: "ctrl+shift+home",
        csEnd: "ctrl+shift+end",
        space: "space",
        ctrlA: "ctrl+A"
      };
    };
    DropDownTree2.prototype.render = function() {
      var isTree = select2("#" + this.element.id + "_tree", document);
      if (isTree) {
        var popupDiv = select2("#" + this.element.id + "_options", document);
        detach2(popupDiv ? popupDiv : isTree.parentElement);
      }
      if (this.element.tagName === "INPUT") {
        this.inputEle = this.element;
        if (isNullOrUndefined2(this.inputEle.getAttribute("role"))) {
          this.inputEle.setAttribute("aria-expanded", "false");
          this.inputEle.setAttribute("role", "combobox");
          this.inputEle.setAttribute("aria-haspopup", "tree");
          this.inputEle.setAttribute("aria-controls", this.element.id + "_options");
        }
        if (isNullOrUndefined2(this.inputEle.getAttribute("type"))) {
          this.inputEle.setAttribute("type", "text");
        }
      } else {
        if (!isNullOrUndefined2(this.element.id)) {
          this.inputEle = this.createElement("input", {
            attrs: {
              role: "textbox",
              type: "text",
              id: this.element.id + "_textbox"
            }
          });
        } else {
          this.inputEle = this.createElement("input", {
            attrs: {
              role: "textbox",
              type: "text"
            }
          });
        }
        this.element.parentElement.insertBefore(this.inputEle, this.element);
      }
      this.inputObj = Input.createInput({
        element: this.inputEle,
        floatLabelType: this.floatLabelType,
        buttons: this.showDropDownIcon ? [DROPDOWNICON] : null,
        properties: {
          readonly: true,
          placeholder: this.placeholder,
          enabled: this.enabled,
          cssClass: this.cssClass,
          enableRtl: this.enableRtl
        }
      }, this.createElement);
      this.inputWrapper = this.inputObj.container;
      if (!this.inputWrapper.classList.contains(INPUTGROUP3)) {
        this.inputWrapper.classList.add(INPUTGROUP3);
      }
      if (this.showDropDownIcon) {
        this.inputWrapper.classList.add(SHOW_DD_ICON);
      }
      if (this.element.tagName === this.getDirective()) {
        this.element.appendChild(this.inputWrapper);
      }
      this.createHiddenElement();
      this.createClearIcon();
      this.inputWrapper.classList.add(DROPDOWNTREE);
      this.setElementWidth(this.width);
      this.updateDataAttribute();
      this.setHTMLAttributes();
      this.setAttributes();
      this.popupDiv = this.createElement("div", {
        className: CONTENT3
      });
      this.popupDiv.classList.add(DROPDOWN);
      this.tree = this.createElement("div", {
        id: this.element.id + "_tree"
      });
      this.popupDiv.appendChild(this.tree);
      if (!this.destroyPopupOnHide) {
        document.body.appendChild(this.popupDiv);
      }
      this.wireTreeEvents();
      addClass2([this.popupDiv], DDTHIDEICON);
      this.renderTree();
      this.isRemoteData = this.fields.dataSource instanceof DataManager;
      if (this.allowMultiSelection || this.showCheckBox) {
        if (this.mode !== "Delimiter") {
          this.createChip();
        }
        if (!this.wrapText && this.mode !== "Custom") {
          this.overFlowWrapper = this.createElement("span", {
            className: OVERFLOW_VIEW + " " + HIDEICON
          });
          this.inputWrapper.insertBefore(this.overFlowWrapper, this.hiddenElement);
          if (this.mode !== "Box") {
            addClass2([this.overFlowWrapper], SHOW_TEXT);
          }
        }
      }
      if (!this.isRemoteData) {
        this.setTreeValue();
        this.setTreeText();
        this.updateHiddenValue();
        this.setSelectedValue();
        if (!this.wrapText) {
          this.updateView();
        }
      }
      this.wireEvents();
      var firstUl = select2("." + PARENTITEM2, this.treeObj.element);
      if (firstUl && firstUl.getAttribute("aria-multiselectable")) {
        firstUl.removeAttribute("aria-multiselectable");
      }
      this.setOldValue();
      if (!this.isRemoteData) {
        this.isInitialized = true;
      }
      this.hasTemplate = this.itemTemplate || this.headerTemplate || this.footerTemplate || this.actionFailureTemplate || this.noRecordsTemplate || this.customTemplate || this.valueTemplate;
      this.renderComplete();
    };
    DropDownTree2.prototype.hideCheckAll = function(flag) {
      var checkAllEle = !isNullOrUndefined2(this.popupEle) ? this.popupEle.querySelector("." + CHECKALLPARENT) : null;
      if (!isNullOrUndefined2(checkAllEle)) {
        if (flag && !checkAllEle.classList.contains(CHECKALLHIDE)) {
          addClass2([checkAllEle], CHECKALLHIDE);
        } else if (!flag && checkAllEle.classList.contains(CHECKALLHIDE)) {
          removeClass2([checkAllEle], CHECKALLHIDE);
        }
      }
    };
    DropDownTree2.prototype.renderFilter = function() {
      this.filterContainer = this.createElement("div", {
        id: this.element.id + "_filter_wrap",
        className: FILTERWRAP
      });
      var filterInput2 = this.createElement("input", {
        id: this.element.id + "_filter",
        attrs: {
          autocomplete: "off",
          "aria-label": this.filterBarPlaceholder
        }
      });
      this.filterContainer.appendChild(filterInput2);
      prepend([this.filterContainer], this.popupEle);
      this.filterObj = new TextBox({
        value: "",
        showClearButton: true,
        placeholder: this.filterBarPlaceholder,
        input: this.filterChangeHandler.bind(this)
      });
      this.filterObj.appendTo("#" + this.element.id + "_filter");
      this.keyboardModule = new KeyboardEvents2(this.filterObj.element, {
        keyAction: this.filterKeyAction.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    DropDownTree2.prototype.filterKeyAction = function(e) {
      var _this = this;
      var eventArgs = {
        cancel: false,
        event: e
      };
      var focusedElement;
      this.trigger("keyPress", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          switch (e.action) {
            case "altUp":
              if (_this.isPopupOpen) {
                _this.hidePopup();
              }
              break;
            case "shiftTab":
              addClass2([_this.inputWrapper], [INPUTFOCUS]);
              break;
            case "moveDown":
              e.preventDefault();
              _this.filterObj.element.blur();
              focusedElement = _this.treeObj.element.querySelector("li");
              if (focusedElement) {
                focusedElement.focus();
              }
              break;
          }
        }
      });
    };
    DropDownTree2.prototype.filterChangeHandler = function(args) {
      var _this = this;
      if (!isNullOrUndefined2(args.value)) {
        window.clearTimeout(this.filterTimer);
        this.filterTimer = window.setTimeout(function() {
          _this.filterHandler(args.value, args.event);
        }, this.filterDelayTime);
      }
    };
    DropDownTree2.prototype.isChildObject = function() {
      if (typeof this.treeObj.fields.child === "object") {
        return true;
      } else {
        return false;
      }
    };
    DropDownTree2.prototype.filterHandler = function(value, event2) {
      var _this = this;
      this.isFromFilterChange = true;
      if (!this.isFilteredData) {
        if (this.isRemoteData) {
          this.treeObj.expandedNodes = [];
        }
        this.treeData = this.treeObj.getTreeData();
      }
      var filterFields = this.cloneFields(this.fields);
      var args = {
        cancel: false,
        preventDefaultAction: false,
        event: event2,
        text: value.trim(),
        fields: filterFields
      };
      this.trigger("filtering", args, function(args2) {
        if (!args2.cancel) {
          var flag = false;
          var fields = void 0;
          _this.isFilteredData = true;
          if (args2.text === "") {
            _this.isFilteredData = false;
            _this.isFilterRestore = true;
            fields = _this.cloneFields(_this.fields);
            _this.treeObj.element.classList.remove("e-filtering");
          } else if (args2.preventDefaultAction) {
            fields = args2.fields;
            _this.treeObj.element.classList.add("e-filtering");
          } else {
            if (_this.treeDataType === 1) {
              fields = _this.selfReferencefilter(args2.text, args2.fields);
            } else {
              if (_this.fields.dataSource instanceof DataManager) {
                fields = _this.remoteDataFilter(args2.text, args2.fields);
                fields.child = _this.fields.child;
                _this.treeObj.fields = _this.getTreeFields(args2.fields);
                _this.treeObj.dataBind();
                flag = true;
              } else {
                fields = _this.nestedFilter(args2.text, args2.fields);
              }
            }
            _this.treeObj.element.classList.add("e-filtering");
          }
          _this.hideCheckAll(_this.isFilteredData);
          if (flag) {
            return;
          }
          if (_this.isRemoteData) {
            if (_this.isChildObject()) {
              fields.child = _this.fields.child;
            } else {
              fields = args2.fields;
            }
          }
          _this.treeObj.fields = _this.getTreeFields(fields);
          _this.treeObj.dataBind();
          if (_this.popupObj) {
            _this.popupObj.refreshPosition();
          }
          if (_this.hasTemplate && _this.portals && _this.treeObj.portals) {
            for (var i = 0; i < _this.treeObj.portals.length; i++) {
              if (_this.portals.indexOf(_this.treeObj.portals[i]) === -1) {
                _this.portals.push(_this.treeObj.portals[i]);
              }
            }
            if (_this.isReact) {
              _this.renderReactTemplates();
            }
          }
        }
      });
    };
    DropDownTree2.prototype.remoteDataFilter = function(value, filteredFields) {
      var _this = this;
      filteredFields.dataSource = this.treeData.map(function(item) {
        return _this.remoteChildFilter(value, item);
      }).filter(function(filteredChild) {
        return !isNullOrUndefined2(filteredChild);
      });
      return filteredFields;
    };
    DropDownTree2.prototype.remoteChildFilter = function(value, node, isChild, isChildFiltering) {
      var children = this.isChildObject() ? node["child"] : node[this.fields.child];
      if (isNullOrUndefined2(children)) {
        return this.isMatchedNode(value, node, isChild, isChildFiltering) ? node : null;
      }
      var matchedChildren = [];
      for (var i = 0; i < children.length; i++) {
        var filteredChild = this.remoteChildFilter(value, children[i], true, true);
        if (!isNullOrUndefined2(filteredChild)) {
          matchedChildren.push(filteredChild);
        }
      }
      var filteredItems = Object.assign({}, node);
      isChildFiltering = false;
      if (matchedChildren.length !== 0) {
        filteredItems.child = matchedChildren;
      } else {
        filteredItems.child = null;
        filteredItems = this.isMatchedNode(value, filteredItems) ? filteredItems : null;
      }
      return filteredItems;
    };
    DropDownTree2.prototype.nestedFilter = function(value, filteredFields) {
      var matchedDataSource = [];
      for (var i = 0; i < this.treeData.length; i++) {
        var filteredChild = this.nestedChildFilter(value, this.treeData[parseInt(i.toString(), 10)]);
        if (!isNullOrUndefined2(filteredChild)) {
          matchedDataSource.push(filteredChild);
        }
      }
      filteredFields.dataSource = matchedDataSource;
      return filteredFields;
    };
    DropDownTree2.prototype.nestedChildFilter = function(value, node) {
      var children = node[this.fields.child];
      if (isNullOrUndefined2(children)) {
        return this.isMatchedNode(value, node) ? node : null;
      } else {
        var matchedChildren = [];
        for (var i = 0; i < children.length; i++) {
          var filteredChild = this.nestedChildFilter(value, children[parseInt(i.toString(), 10)]);
          if (!isNullOrUndefined2(filteredChild)) {
            matchedChildren.push(filteredChild);
          }
        }
        var filteredItems = Object.assign({}, node);
        if (matchedChildren.length !== 0) {
          filteredItems[this.fields.child] = matchedChildren;
          return filteredItems;
        } else {
          filteredItems[this.fields.child] = null;
          return this.isMatchedNode(value, filteredItems) ? filteredItems : null;
        }
      }
    };
    DropDownTree2.prototype.selfReferencefilter = function(value, filteredFields) {
      var matchedData = [];
      var matchedDataSource = [];
      for (var i = 0; i < this.treeData.length; i++) {
        if (this.isMatchedNode(value, this.treeData[i])) {
          matchedData.push(this.treeData[i]);
        }
      }
      for (var i = 0; i < matchedData.length; i++) {
        if (matchedDataSource.indexOf(matchedData[i]) === -1) {
          matchedDataSource.push(matchedData[i]);
          var parentId = matchedData[parseInt(i.toString(), 10)][this.fields.parentValue];
          while (!isNullOrUndefined2(parentId)) {
            var parent_1 = null;
            for (var j = 0; j < this.treeData.length; j++) {
              var value_1 = this.treeData[parseInt(j.toString(), 10)][this.fields.value];
              if (!isNullOrUndefined2(value_1) && value_1 === parentId) {
                parent_1 = this.treeData[j];
                break;
              }
            }
            if (!isNullOrUndefined2(parent_1) && matchedDataSource.indexOf(parent_1) === -1) {
              matchedDataSource.push(parent_1);
              parentId = parent_1[this.fields.parentValue];
            } else {
              break;
            }
          }
        }
      }
      filteredFields.dataSource = matchedDataSource;
      return filteredFields;
    };
    DropDownTree2.prototype.isMatchedNode = function(value, node, isChild, isChildFiltering) {
      var checkValue;
      var isObjectValue = isChild && isChildFiltering && this.isChildObject();
      checkValue = isObjectValue ? node[this.fields.child.text] : node[this.fields.text];
      if (!checkValue && !isNullOrUndefined2(this.fields.child.text)) {
        var tempChild = this.fields.child;
        while (!node[tempChild.text]) {
          tempChild = tempChild.child;
        }
        checkValue = node[tempChild.text];
      }
      if (this.ignoreCase) {
        checkValue = checkValue.toLowerCase();
        value = value.toLowerCase();
      }
      if (this.ignoreAccent) {
        checkValue = DataUtil.ignoreDiacritics(checkValue);
        value = DataUtil.ignoreDiacritics(value);
      }
      if (this.filterType === "StartsWith") {
        return checkValue.slice(0, value.length) === value;
      } else if (this.filterType === "EndsWith") {
        return checkValue.slice(-value.length) === value;
      } else {
        return checkValue.indexOf(value) !== -1;
      }
    };
    DropDownTree2.prototype.wireEvents = function() {
      EventHandler2.add(this.inputWrapper, "mouseup", this.dropDownClick, this);
      EventHandler2.add(this.inputWrapper, "focus", this.focusIn, this);
      EventHandler2.add(this.inputWrapper, "blur", this.focusOut, this);
      EventHandler2.add(this.inputWrapper, "mousemove", this.mouseIn, this);
      EventHandler2.add(this.inputWrapper, "mouseout", this.onMouseLeave, this);
      EventHandler2.add(this.overAllClear, "mousedown", this.clearAll, this);
      EventHandler2.add(window, "resize", this.windowResize, this);
      var formElement = closest2(this.inputWrapper, "form");
      if (formElement) {
        EventHandler2.add(formElement, "reset", this.resetValueHandler, this);
      }
      this.keyboardModule = new KeyboardEvents2(this.inputWrapper, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    DropDownTree2.prototype.wireTreeEvents = function() {
      this.keyboardModule = new KeyboardEvents2(this.tree, {
        keyAction: this.treeAction.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    DropDownTree2.prototype.wireCheckAllWrapperEvents = function() {
      this.keyboardModule = new KeyboardEvents2(this.checkAllParent, {
        keyAction: this.checkAllAction.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
    };
    DropDownTree2.prototype.unWireEvents = function() {
      EventHandler2.remove(this.inputWrapper, "mouseup", this.dropDownClick);
      EventHandler2.remove(this.inputWrapper, "focus", this.focusIn);
      EventHandler2.remove(this.inputWrapper, "blur", this.focusOut);
      EventHandler2.remove(this.inputWrapper, "mousemove", this.mouseIn);
      EventHandler2.remove(this.inputWrapper, "mouseout", this.onMouseLeave);
      EventHandler2.remove(this.overAllClear, "mousedown", this.clearAll);
      EventHandler2.remove(window, "resize", this.windowResize);
      var formElement = closest2(this.inputWrapper, "form");
      if (formElement) {
        EventHandler2.remove(formElement, "reset", this.resetValueHandler);
      }
      this.keyboardModule.destroy();
      if (this.showSelectAll && this.checkAllParent) {
        EventHandler2.remove(this.checkAllParent, "mouseup", this.clickHandler);
      }
      document.removeEventListener("mousedown", this.documentClickContext);
    };
    DropDownTree2.prototype.dropDownClick = function(e) {
      if (!this.enabled || this.readonly) {
        return;
      }
      if (this.isClearButtonClick) {
        this.isClearButtonClick = false;
        return;
      }
      if (this.isPopupOpen) {
        this.hidePopup();
      } else {
        this.focusIn(e);
        this.renderPopup();
      }
      this.showOverAllClear();
    };
    DropDownTree2.prototype.mouseIn = function() {
      if (this.enabled || !this.readonly) {
        this.showOverAllClear();
      }
    };
    DropDownTree2.prototype.onMouseLeave = function() {
      if (!this.inputFocus) {
        addClass2([this.overAllClear], HIDEICON);
        removeClass2([this.inputWrapper], SHOW_CLEAR);
      }
    };
    DropDownTree2.prototype.getDirective = function() {
      return "EJS-DROPDOWNTREE";
    };
    DropDownTree2.prototype.focusOut = function(e) {
      if (!this.enabled || this.readonly || !this.inputFocus) {
        return;
      }
      if ((Browser2.isIE || Browser2.info.name === "edge") && e.target === this.inputWrapper) {
        return;
      }
      var target = e.relatedTarget;
      if (target !== this.inputEle && isNullOrUndefined2(target) && (e.target !== this.inputWrapper || !this.isPopupOpen)) {
        this.onFocusOut(e);
      }
    };
    DropDownTree2.prototype.onFocusOut = function(event2) {
      this.inputFocus = false;
      if (this.isPopupOpen) {
        this.hidePopup();
      }
      if (this.isClearButtonClick) {
        this.isClearButtonClick = false;
      }
      if (this.showClearButton) {
        this.clearIconWidth = select2(".e-clear-icon", this.inputWrapper).offsetWidth;
        addClass2([this.overAllClear], HIDEICON);
        removeClass2([this.inputWrapper], SHOW_CLEAR);
      }
      removeClass2([this.inputWrapper], [INPUTFOCUS]);
      if (this.allowMultiSelection || this.showCheckBox) {
        var isValue = this.value ? this.value.length ? true : false : false;
        if (this.mode !== "Delimiter" && this.mode !== "Custom") {
          if (this.chipWrapper && this.mode === "Default") {
            addClass2([this.chipWrapper], HIDEICON);
            removeClass2([this.inputWrapper], SHOW_CHIP);
            removeClass2([this.inputEle], CHIP_INPUT);
          }
        }
        if (isValue && this.mode !== "Custom") {
          this.showOrHideValueTemplate(true);
        }
        if (!this.wrapText && isValue) {
          this.updateView();
        }
      }
      if (this.changeOnBlur) {
        this.triggerChangeEvent(event2);
      }
      this.removeValue = false;
      this.setOldValue();
      this.trigger("blur");
    };
    DropDownTree2.prototype.updateView = function() {
      if (!this.showCheckBox && !this.allowMultiSelection || this.mode === "Custom" || this.inputFocus) {
        return;
      }
      if (this.mode !== "Box") {
        addClass2([this.inputWrapper, this.overFlowWrapper], SHOW_TEXT);
      } else {
        addClass2([this.inputWrapper], SHOW_CHIP);
      }
      if (this.value && this.value.length !== 0) {
        if (this.inputWrapper.contains(this.chipWrapper)) {
          addClass2([this.chipWrapper], HIDEICON);
        }
        addClass2([this.inputEle], CHIP_INPUT);
        this.updateOverFlowView();
      }
      this.ensurePlaceHolder();
    };
    DropDownTree2.prototype.triggerChangeEvent = function(event2) {
      var isEqual = this.ddtCompareValues(this.oldValue, this.value);
      if ((!isEqual || this.isChipDelete) && !this.removeValue) {
        var eventArgs = {
          e: event2,
          oldValue: this.oldValue,
          value: this.value,
          isInteracted: event2 ? true : false,
          element: this.element
        };
        this.trigger("change", eventArgs);
        this.setOldValue();
      }
    };
    DropDownTree2.prototype.ddtCompareValues = function(oldValue, newValue) {
      if (oldValue === null || newValue === null) {
        var isValid = oldValue === null ? newValue === oldValue ? true : false : oldValue.length === 0 ? newValue === oldValue : false;
        return isValid;
      } else if (oldValue.length !== newValue.length) {
        return false;
      }
      for (var i = 0; i < oldValue.length; i++) {
        if (oldValue[i] !== newValue[i]) {
          return false;
        }
      }
      return true;
    };
    DropDownTree2.prototype.focusIn = function(e) {
      if (!this.enabled || this.readonly || this.inputFocus) {
        return;
      }
      this.showOverAllClear();
      this.inputFocus = true;
      addClass2([this.inputWrapper], [INPUTFOCUS]);
      if (this.allowMultiSelection || this.showCheckBox) {
        if (this.mode !== "Delimiter" && this.inputFocus) {
          if (this.chipWrapper && this.value && this.value.length !== 0) {
            removeClass2([this.chipWrapper], HIDEICON);
            addClass2([this.inputEle], CHIP_INPUT);
            this.showOrHideValueTemplate(false, true);
          }
          addClass2([this.inputWrapper], SHOW_CHIP);
          if (this.popupObj) {
            this.popupObj.refreshPosition();
          }
        }
        if (!this.wrapText && this.mode !== "Custom") {
          if (this.inputWrapper.contains(this.overFlowWrapper)) {
            addClass2([this.overFlowWrapper], HIDEICON);
          }
          if (this.mode === "Delimiter") {
            removeClass2([this.inputWrapper], SHOW_CHIP);
            removeClass2([this.inputEle], CHIP_INPUT);
            this.showOrHideValueTemplate(true);
          } else {
            addClass2([this.inputWrapper], SHOW_CHIP);
          }
          removeClass2([this.inputWrapper], SHOW_TEXT);
          this.ensurePlaceHolder();
        }
      }
      var args = {
        isInteracted: e ? true : false,
        event: e
      };
      this.trigger("focus", args);
    };
    DropDownTree2.prototype.treeAction = function(e) {
      var _this = this;
      var eventArgs = {
        cancel: false,
        event: e
      };
      this.trigger("keyPress", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          switch (e.action) {
            case "escape":
            case "altUp":
              _this.inputWrapper.focus();
              e.preventDefault();
              if (_this.isPopupOpen) {
                _this.hidePopup();
              }
              break;
            case "tab":
              if (_this.isPopupOpen) {
                _this.hidePopup();
              }
              break;
            case "enter":
            case "ctrlEnter":
            case "shiftEnter":
            case "csEnter":
              if (!_this.showCheckBox) {
                _this.isValueChange = true;
                _this.keyEventArgs = e;
              }
              break;
            case "space":
              _this.isValueChange = true;
              _this.keyEventArgs = e;
              break;
            case "ctrlA":
              if (_this.allowMultiSelection) {
                _this.selectAll(true);
              }
              break;
            case "moveRight":
            case "moveLeft":
            case "shiftDown":
            case "moveDown":
            case "ctrlDown":
            case "csDown":
            case "shiftUp":
            case "moveUp":
            case "ctrlUp":
            case "csUp":
            case "home":
            case "shiftHome":
            case "ctrlHome":
            case "csHome":
            case "end":
            case "shiftEnd":
            case "ctrlEnd":
            case "csEnd":
          }
        } else {
          e.stopImmediatePropagation();
        }
      });
    };
    DropDownTree2.prototype.keyActionHandler = function(e) {
      var _this = this;
      var eventArgs = {
        cancel: false,
        event: e
      };
      this.trigger("keyPress", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          switch (e.action) {
            case "escape":
            case "altUp":
              if (_this.isPopupOpen) {
                _this.hidePopup();
              }
              break;
            case "shiftTab":
              if (_this.isPopupOpen) {
                _this.hidePopup();
              }
              if (_this.inputFocus) {
                _this.onFocusOut();
              }
              break;
            case "altDown":
              if (!_this.isPopupOpen) {
                _this.showPopup();
                e.preventDefault();
              }
              break;
            case "moveDown":
              if (_this.showSelectAll && _this.showCheckBox) {
                _this.checkAllParent.focus();
              }
              break;
            case "tab":
              if (!_this.isPopupOpen && _this.inputFocus) {
                _this.onFocusOut();
              }
              break;
          }
        }
      });
    };
    DropDownTree2.prototype.checkAllAction = function(e) {
      var _this = this;
      var eventArgs = {
        cancel: false,
        event: e
      };
      var focusedElement;
      this.trigger("keyPress", eventArgs, function(observedArgs) {
        if (!observedArgs.cancel) {
          switch (e.action) {
            case "space":
              _this.clickHandler(e);
              break;
            case "moveDown":
              e.preventDefault();
              focusedElement = _this.treeObj.element.querySelector('li[tabindex="0"]') || _this.treeObj.element.querySelector("li");
              focusedElement.focus();
              addClass2([focusedElement], ["e-node-focus"]);
              break;
          }
        }
      });
    };
    DropDownTree2.prototype.windowResize = function() {
      if (this.popupObj) {
        this.popupObj.setProperties({
          width: this.setWidth()
        });
        this.popupObj.refreshPosition();
      }
    };
    DropDownTree2.prototype.resetValueHandler = function(e) {
      var formElement = closest2(this.inputWrapper, "form");
      if (formElement && e.target === formElement) {
        this.isDynamicChange = true;
        this.setProperties({
          value: null
        }, true);
        this.resetValue(true);
        this.isDynamicChange = false;
      }
    };
    DropDownTree2.prototype.getAriaAttributes = function() {
      return {};
    };
    DropDownTree2.prototype.updateOverFlowView = function() {
      this.overFlowWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
      removeClass2([this.overFlowWrapper], HIDEICON);
      if (this.value && this.value.length) {
        var data = "";
        var overAllContainer = void 0;
        var temp = void 0;
        var tempData = void 0;
        var tempIndex = 1;
        var wrapperleng = void 0;
        var remaining = void 0;
        var downIconWidth = 0;
        this.overFlowWrapper.innerHTML = "";
        var l10nLocale = {
          overflowCountTemplate: "+${count} more..",
          totalCountTemplate: "${count} selected"
        };
        this.l10n = new L10n2(this.getLocaleName(), l10nLocale, this.locale);
        var remainContent = this.l10n.getConstant("overflowCountTemplate");
        var totalContent = this.l10n.getConstant("totalCountTemplate");
        var remainElement = this.createElement("span", {
          className: REMAIN_WRAPPER
        });
        this.overFlowWrapper.appendChild(remainElement);
        remainElement.innerText = remainContent.replace("${count}", this.value.length.toString());
        var remainSize = remainElement.offsetWidth;
        remove(remainElement);
        if (this.showDropDownIcon) {
          downIconWidth = select2("." + DDTICON, this.inputWrapper).offsetWidth;
        }
        if (!isNullOrUndefined2(this.value)) {
          if (this.mode !== "Box") {
            if (this.valueTemplate) {
              remaining = this.updateChipAndValueTemplate(false, downIconWidth, remainSize);
              this.checkRemainingTemplate(remaining, remainElement, remainContent, totalContent);
              this.updateDelimMode();
              return;
            }
            for (var index = 0; !isNullOrUndefined2(this.value[index]); index++) {
              data += index === 0 ? "" : this.delimiterChar + " ";
              temp = this.getOverflowVal(index);
              data += temp;
              temp = this.overFlowWrapper.innerHTML;
              if (this.enableHtmlSanitizer) {
                this.overFlowWrapper.innerText = SanitizeHtmlHelper2.sanitize(data);
              } else {
                this.overFlowWrapper.innerHTML = data;
              }
              wrapperleng = this.overFlowWrapper.offsetWidth;
              overAllContainer = this.inputWrapper.offsetWidth;
              if (wrapperleng + downIconWidth + this.clearIconWidth > overAllContainer) {
                if (tempData !== void 0 && tempData !== "") {
                  temp = tempData;
                  index = tempIndex + 1;
                }
                this.overFlowWrapper.innerHTML = temp;
                remaining = this.value.length - index;
                wrapperleng = this.overFlowWrapper.offsetWidth;
                while (wrapperleng + remainSize + downIconWidth + this.clearIconWidth >= overAllContainer && wrapperleng !== 0 && this.overFlowWrapper.innerHTML !== "") {
                  var textArr = this.overFlowWrapper.innerHTML.split(this.delimiterChar);
                  textArr.pop();
                  this.overFlowWrapper.innerHTML = textArr.join(this.delimiterChar);
                  remaining++;
                  wrapperleng = this.overFlowWrapper.offsetWidth;
                }
                break;
              } else if (wrapperleng + remainSize + downIconWidth + this.clearIconWidth <= overAllContainer) {
                tempData = data;
                tempIndex = index;
              } else if (index === 0) {
                tempData = "";
                tempIndex = -1;
              }
            }
          } else {
            remaining = this.updateChipAndValueTemplate(true, downIconWidth, remainSize);
          }
        }
        this.checkRemainingTemplate(remaining, remainElement, remainContent, totalContent);
      } else {
        this.overFlowWrapper.innerHTML = "";
        addClass2([this.overFlowWrapper], HIDEICON);
      }
      this.updateDelimMode();
    };
    DropDownTree2.prototype.checkRemainingTemplate = function(remaining, remainElement, remainContent, totalContent) {
      if (remaining > 0) {
        this.overFlowWrapper.appendChild(this.updateRemainTemplate(remainElement, remaining, remainContent, totalContent));
      }
      if (this.mode === "Box" && !this.overFlowWrapper.classList.contains(TOTAL_COUNT_WRAPPER)) {
        addClass2([remainElement], REMAIN_COUNT);
      }
    };
    DropDownTree2.prototype.updateChipAndValueTemplate = function(isChip, downIconWidth, remainSize) {
      if (downIconWidth === void 0) {
        downIconWidth = 0;
      }
      var currentHtmlContent = "";
      var overAllContainer;
      var previousHtmlContent;
      var previousData;
      var index = 1;
      var wrapperLength;
      var remainingItemsCount;
      addClass2([isChip ? this.chipWrapper : this.valueTemplateContainer], HIDEICON);
      var clonedElement = (isChip ? this.chipWrapper : this.valueTemplateContainer).cloneNode(true);
      var valueElements = isChip ? selectAll2("." + CHIP, clonedElement) : Array.prototype.slice.call(clonedElement.children);
      for (var i = 0; i < valueElements.length; i++) {
        previousHtmlContent = this.overFlowWrapper.innerHTML;
        this.overFlowWrapper.appendChild(valueElements[i]);
        currentHtmlContent = this.overFlowWrapper.innerHTML;
        wrapperLength = this.overFlowWrapper.offsetWidth;
        overAllContainer = this.inputWrapper.offsetWidth;
        if (wrapperLength + downIconWidth + this.clearIconWidth > overAllContainer) {
          if (previousData !== void 0 && previousData !== "") {
            previousHtmlContent = previousData;
            i = index + 1;
          }
          this.overFlowWrapper.innerHTML = previousHtmlContent;
          remainingItemsCount = this.value.length - i;
          wrapperLength = this.overFlowWrapper.offsetWidth;
          while (wrapperLength + remainSize + downIconWidth + this.clearIconWidth >= overAllContainer && wrapperLength !== 0 && this.overFlowWrapper.innerHTML !== "") {
            this.overFlowWrapper.removeChild(this.overFlowWrapper.lastChild);
            remainingItemsCount++;
            wrapperLength = this.overFlowWrapper.offsetWidth;
          }
          break;
        } else if (wrapperLength + remainSize + downIconWidth + this.clearIconWidth <= overAllContainer) {
          previousData = currentHtmlContent;
          index = i;
        } else if (i === 0) {
          previousData = "";
          index = -1;
        }
      }
      return remainingItemsCount;
    };
    DropDownTree2.prototype.updateRemainTemplate = function(remainElement, remaining, remainContent, totalContent) {
      if (this.overFlowWrapper.firstChild && this.overFlowWrapper.firstChild.nodeType === 3 && this.overFlowWrapper.firstChild.nodeValue === "") {
        this.overFlowWrapper.removeChild(this.overFlowWrapper.firstChild);
      }
      remainElement.innerHTML = "";
      remainElement.innerText = this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === "Box" || this.valueTemplateContainer) ? remainContent.replace("${count}", remaining.toString()) : totalContent.replace("${count}", remaining.toString());
      if (this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === "Box")) {
        removeClass2([this.overFlowWrapper], TOTAL_COUNT_WRAPPER);
      } else {
        addClass2([this.overFlowWrapper], TOTAL_COUNT_WRAPPER);
        removeClass2([this.overFlowWrapper], REMAIN_COUNT);
      }
      return remainElement;
    };
    DropDownTree2.prototype.getOverflowVal = function(index) {
      var selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
      return getValue2(this.treeSettings.loadOnDemand ? this.fields.text : "text", selectedData);
    };
    DropDownTree2.prototype.updateDelimMode = function() {
      if (this.mode !== "Box") {
        if (select2("." + REMAIN_WRAPPER, this.overFlowWrapper) && !this.overFlowWrapper.classList.contains(TOTAL_COUNT_WRAPPER)) {
          addClass2([this.overFlowWrapper], REMAIN_COUNT);
          addClass2([this.overFlowWrapper], SHOW_TEXT);
        } else {
          this.overFlowWrapper.classList.remove(REMAIN_COUNT);
          removeClass2([this.overFlowWrapper], REMAIN_COUNT);
        }
      } else if (select2("." + REMAIN_WRAPPER, this.overFlowWrapper)) {
        this.overFlowWrapper.classList.remove(REMAIN_COUNT);
      }
    };
    DropDownTree2.prototype.createHiddenElement = function() {
      if (this.allowMultiSelection || this.showCheckBox) {
        this.hiddenElement = this.createElement("select", {
          attrs: {
            "aria-hidden": "true",
            "class": HIDDENELEMENT2,
            "tabindex": "-1",
            "multiple": "",
            "aria-label": this.getModuleName()
          }
        });
      } else {
        this.hiddenElement = this.createElement("select", {
          attrs: {
            "aria-hidden": "true",
            "tabindex": "-1",
            "class": HIDDENELEMENT2,
            "aria-label": this.getModuleName()
          }
        });
      }
      prepend([this.hiddenElement], this.inputWrapper);
      this.validationAttribute();
    };
    DropDownTree2.prototype.createClearIcon = function() {
      this.overAllClear = this.createElement("span", {
        className: CLOSEICON_CLASS
      });
      addClass2([this.overAllClear], HIDEICON);
      removeClass2([this.inputWrapper], SHOW_CLEAR);
      if (this.showClearButton) {
        this.inputWrapper.insertBefore(this.overAllClear, this.inputObj.buttons[0]);
      }
    };
    DropDownTree2.prototype.validationAttribute = function() {
      var name = this.inputEle.getAttribute("name") ? this.inputEle.getAttribute("name") : this.inputEle.getAttribute("id");
      this.hiddenElement.setAttribute("name", name);
      this.inputEle.removeAttribute("name");
      var attributes4 = ["required", "aria-required", "form"];
      for (var i = 0; i < attributes4.length; i++) {
        var attr = this.inputEle.getAttribute(attributes4[i]);
        if (attr) {
          this.hiddenElement.setAttribute(attributes4[i], attr);
          this.inputEle.removeAttribute(attributes4[i]);
        }
      }
    };
    DropDownTree2.prototype.createChip = function() {
      if (!this.inputWrapper.contains(this.chipWrapper)) {
        this.chipWrapper = this.createElement("span", {
          className: CHIP_WRAPPER
        });
        this.chipCollection = this.createElement("span", {
          className: CHIP_COLLECTION
        });
        this.chipWrapper.appendChild(this.chipCollection);
        this.inputWrapper.insertBefore(this.chipWrapper, this.hiddenElement);
        addClass2([this.inputWrapper], SHOW_CHIP);
        var isValid = this.getValidMode();
        if (isValid && this.value !== null && this.value && this.value.length !== 0) {
          addClass2([this.inputEle], CHIP_INPUT);
        } else if (this.value === null || this.value && this.value.length === 0 || this.checkWrapper) {
          addClass2([this.chipWrapper], HIDEICON);
        }
      }
    };
    DropDownTree2.prototype.getValidMode = function() {
      if (this.allowMultiSelection || this.showCheckBox) {
        return this.mode === "Box" ? true : this.mode === "Default" && this.inputFocus ? true : false;
      } else {
        return false;
      }
    };
    DropDownTree2.prototype.createSelectAllWrapper = function() {
      this.checkAllParent = this.createElement("div", {
        className: CHECKALLPARENT,
        attrs: {
          "tabindex": "0"
        }
      });
      this.selectAllSpan = this.createElement("span", {
        className: ALLTEXT
      });
      this.selectAllSpan.textContent = "";
      var ele = closest2(this.element, "." + BIGGER2);
      var touchClass = isNullOrUndefined2(ele) ? "" : SMALL2;
      this.checkBoxElement = createCheckBox(this.createElement, true, {
        cssClass: touchClass
      });
      this.checkBoxElement.setAttribute("role", "checkbox");
      this.checkAllParent.appendChild(this.checkBoxElement);
      this.checkAllParent.appendChild(this.selectAllSpan);
      this.setLocale();
      EventHandler2.add(this.checkAllParent, "mouseup", this.clickHandler, this);
      this.wireCheckAllWrapperEvents();
    };
    DropDownTree2.prototype.clickHandler = function(e) {
      var target;
      if (e.currentTarget && e.currentTarget.classList.contains(CHECKALLPARENT)) {
        target = e.currentTarget.firstElementChild.lastElementChild;
      } else {
        target = e.target;
      }
      this.checkWrapper = closest2(target, "." + CHECKBOXWRAP2);
      if (!isNullOrUndefined2(this.checkWrapper)) {
        this.isClicked = true;
        var checkElement = select2("." + CHECKBOXFRAME2, this.checkWrapper);
        this.changeState(this.checkWrapper, checkElement.classList.contains(CHECK4) ? "uncheck" : "check", e);
        this.isClicked = false;
      }
      e.preventDefault();
    };
    DropDownTree2.prototype.changeState = function(wrapper, state, e) {
      var ariaState;
      var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME2)[0];
      if (state === "check" && !frameSpan.classList.contains(CHECK4)) {
        frameSpan.classList.add(CHECK4);
        ariaState = "true";
        if (!this.isReverseUpdate) {
          this.setOldValue();
          this.isCheckAllCalled = true;
          this.treeObj.checkAll();
          if (!this.changeOnBlur) {
            this.triggerChangeEvent(e);
          }
        }
        this.setLocale(true);
      } else if (state === "uncheck" && frameSpan.classList.contains(CHECK4)) {
        frameSpan.classList.remove(CHECK4);
        ariaState = "false";
        if (!this.isReverseUpdate) {
          this.treeObj.uncheckAll();
          if (!this.changeOnBlur) {
            this.triggerChangeEvent(e);
          }
        }
        this.setLocale(false);
      }
      this.setMultiSelect();
      this.ensurePlaceHolder();
      ariaState = state === "check" ? "true" : "false";
      if (!isNullOrUndefined2(ariaState)) {
        wrapper.parentElement.setAttribute("aria-checked", ariaState);
      }
    };
    DropDownTree2.prototype.setLocale = function(unSelect) {
      if (!this.selectAllSpan) {
        return;
      }
      if (this.selectAllText !== "Select All" || this.unSelectAllText !== "Unselect All") {
        var template = unSelect ? this.unSelectAllText : this.selectAllText;
        this.selectAllSpan.textContent = "";
        var compiledString = compile4(template);
        var templateName = unSelect ? "unSelectAllText" : "selectAllText";
        for (var _i = 0, _a = compiledString({}, this, templateName, null, !this.isStringTemplate); _i < _a.length; _i++) {
          var item = _a[_i];
          this.selectAllSpan.textContent = item.textContent;
        }
      } else {
        this.selectAllSpan.textContent = unSelect ? this.unSelectAllText : this.selectAllText;
      }
    };
    DropDownTree2.prototype.setAttributes = function() {
      this.inputEle.setAttribute("tabindex", "-1");
      this.inputEle.setAttribute("aria-label", this.getModuleName());
      var id = this.element.getAttribute("id");
      this.hiddenElement.id = id + "_hidden";
      this.inputWrapper.setAttribute("tabindex", "0");
      this.inputWrapper.setAttribute("aria-label", this.getModuleName());
      attributes2(this.inputWrapper, this.getAriaAttributes());
    };
    DropDownTree2.prototype.setHTMLAttributes = function() {
      if (Object.keys(this.htmlAttributes).length) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var htmlAttr = _a[_i];
          if (htmlAttr === "class") {
            this.inputWrapper.classList.add(this.htmlAttributes["" + htmlAttr]);
          } else if (htmlAttr === "disabled") {
            this.setProperties({
              enabled: false
            }, true);
            this.setEnable();
          } else if (htmlAttr === "readonly") {
            this.setProperties({
              readonly: true
            }, true);
            this.dataBind();
          } else if (htmlAttr === "style") {
            this.inputWrapper.setAttribute("style", this.htmlAttributes["" + htmlAttr]);
          } else {
            var defaultAttr = ["title", "id", "placeholder", "aria-placeholder", "role", "autocorrect", "autocomplete", "autocapitalize", "spellcheck", "minlength", "maxlength"];
            var validateAttr = ["name", "required"];
            if (htmlAttr.indexOf("data") === 0 || validateAttr.indexOf(htmlAttr) > -1) {
              this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
            } else if (defaultAttr.indexOf(htmlAttr) > -1) {
              if (htmlAttr === "placeholder") {
                Input.setPlaceholder(this.htmlAttributes["" + htmlAttr], this.inputEle);
              } else {
                this.inputEle.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
              }
            } else {
              this.inputEle.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
            }
          }
        }
      }
    };
    DropDownTree2.prototype.updateDataAttribute = function() {
      var value = this.htmlAttributes;
      var invalidAttr = ["class", "style", "id", "type"];
      var attr = {};
      for (var a = 0; a < this.element.attributes.length; a++) {
        if (invalidAttr.indexOf(this.element.attributes[a].name) === -1 && !(this.element.attributes[a].name === "readonly")) {
          attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);
        }
      }
      extend2(attr, value, attr);
      this.setProperties({
        htmlAttributes: attr
      }, true);
    };
    DropDownTree2.prototype.showOverAllClear = function() {
      if (!this.enabled || this.readonly) {
        return;
      }
      if (this.overAllClear) {
        var isValue = this.value ? this.value.length ? true : false : false;
        if (isValue && this.showClearButton) {
          removeClass2([this.overAllClear], HIDEICON);
          addClass2([this.inputWrapper], SHOW_CLEAR);
        } else {
          addClass2([this.overAllClear], HIDEICON);
          removeClass2([this.inputWrapper], SHOW_CLEAR);
        }
      }
    };
    DropDownTree2.prototype.setTreeValue = function() {
      if (this.value !== null && this.value.length !== 0) {
        var data = void 0;
        if (this.showCheckBox || this.allowMultiSelection) {
          for (var i = this.value.length - 1; i >= 0; i--) {
            data = this.treeObj.getTreeData(this.value[i])[0];
            if (isNullOrUndefined2(data)) {
              this.value.splice(i, 1);
            }
          }
          if (this.value.length !== 0) {
            this.setValidValue();
          }
        } else {
          data = this.treeObj.getTreeData(this.value[0])[0];
          if (!isNullOrUndefined2(data)) {
            this.setProperties({
              text: data[this.fields.text]
            }, true);
            this.setValidValue();
          } else {
            this.setProperties({
              value: this.currentValue
            }, true);
          }
        }
      }
    };
    DropDownTree2.prototype.setTreeText = function() {
      if (this.value !== null && !this.isInitialized) {
        return;
      }
      if (this.text !== null) {
        var data = void 0;
        var valArr = [];
        if (this.showCheckBox || this.allowMultiSelection) {
          var textArr = this.text.split(this.delimiterChar);
          for (var i = 0; i < textArr.length; i++) {
            data = this.getItems(textArr[i]);
            if (!isNullOrUndefined2(data)) {
              valArr.push(data[this.fields.value].toString());
            }
          }
          if (valArr.length !== 0) {
            this.setOldValue();
            this.setProperties({
              value: valArr
            }, true);
            this.setValidValue();
          } else {
            this.setProperties({
              text: this.currentText
            }, true);
          }
        } else {
          data = this.getItems(this.text);
          if (!isNullOrUndefined2(data)) {
            this.setOldValue();
            this.setProperties({
              value: [data[this.fields.value].toString()]
            }, true);
            this.setValidValue();
          } else {
            this.setProperties({
              text: this.currentText
            }, true);
          }
        }
      }
    };
    DropDownTree2.prototype.setSelectedValue = function() {
      if (this.value !== null && !(this.value.length === 0)) {
        return;
      }
      if (!this.isInitialized) {
        this.setOldValue();
        if (this.treeObj.selectedNodes.length > 0 && !this.showCheckBox) {
          this.setProperties({
            value: this.treeObj.selectedNodes
          }, true);
          if (this.allowMultiSelection) {
            this.updateMode();
          }
        } else if (this.showCheckBox && this.treeObj.checkedNodes) {
          if (this.treeObj.checkedNodes.length > 0) {
            this.setProperties({
              value: this.treeObj.checkedNodes
            }, true);
            setValue3("selectedNodes", [], this.treeObj);
            this.treeObj.dataBind();
            this.updateMode();
          }
        }
        this.updateSelectedValues();
        this.currentText = this.text;
        this.currentValue = this.value;
      }
    };
    DropDownTree2.prototype.setValueTemplate = function() {
      var _this = this;
      if (this.valueTemplate) {
        var compiledString = this.initializeValueTemplate();
        this.getValueTemplateElement(this.value[0], compiledString);
        if (this.hasTemplate && this.portals) {
          if (this.treeObj.portals) {
            this.portals = this.portals.concat(this.treeObj.portals.filter(function(item) {
              return !_this.portals.includes(item);
            }));
          }
          if (this.isReact) {
            this.renderReactTemplates(this.reactCallBack);
          }
        }
        this.showOrHideValueTemplate(true);
      }
    };
    DropDownTree2.prototype.getValueTemplateElement = function(value, compiledString) {
      var selectedData = this.getNodeData(value, this.isFilteredData ? this.treeData : this.treeItems);
      var templateElements = compiledString(selectedData, this, "valueTemplate", this.element.id + "valueTemplate", this.isStringTemplate, void 0, this.valueTemplateContainer);
      if (templateElements) {
        templateElements = Array.prototype.slice.call(templateElements);
        append(templateElements, this.valueTemplateContainer);
      }
    };
    DropDownTree2.prototype.setValidValue = function() {
      var _this = this;
      if (!this.showCheckBox && !this.allowMultiSelection) {
        Input.setValue(this.text, this.inputEle, this.floatLabelType);
        this.setValueTemplate();
        var id = this.value[0].toString();
        if (this.treeObj.selectedNodes[0] !== id) {
          setValue3("selectedNodes", [id], this.treeObj);
          if (this.fields.dataSource instanceof DataManager) {
            this.updateSelectedValues();
          }
        }
      } else {
        if (this.showCheckBox) {
          var difference = this.value.length !== this.treeObj.checkedNodes.length || this.value.filter(function(e) {
            return _this.treeObj.checkedNodes.indexOf(e) === -1;
          }).length > 0;
          if (difference || this.treeSettings.autoCheck) {
            this.treeObj.checkedNodes = this.value.slice();
            this.treeObj.dataBind();
            this.setMultiSelect();
          }
        } else {
          this.treeObj.selectedNodes = this.value.slice();
          this.selectedText = [];
          this.updateSelectedValues();
        }
        this.treeObj.dataBind();
      }
      this.currentText = this.text;
      this.currentValue = this.value;
      if (!isNullOrUndefined2(this.value) && this.value.length > 0 && !isNullOrUndefined2(this.currentText)) {
        this.inputWrapper.setAttribute("aria-label", this.currentText.replace(/,/g, ", "));
      }
      if (this.isInitialized) {
        this.triggerChangeEvent();
      }
    };
    DropDownTree2.prototype.getItems = function(givenText) {
      var data;
      if (this.treeDataType === 1) {
        for (var i = 0; i < this.treeItems.length; i++) {
          var text = getValue2(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
          if (!isNullOrUndefined2(this.treeItems[i]) && !isNullOrUndefined2(text) && text === givenText) {
            data = this.treeItems[i];
            break;
          }
        }
      } else {
        data = this.getNestedItems(this.treeItems, this.fields, givenText);
      }
      return data;
    };
    DropDownTree2.prototype.getNestedItems = function(data, field, givenText) {
      var newData;
      for (var i = 0, objlen = data.length; i < objlen; i++) {
        var dataId = getValue2(this.fields.text, data[parseInt(i.toString(), 10)]);
        if (data[i] && dataId && dataId.toString() === givenText) {
          return data[i];
        } else if (typeof field.child === "string" && !isNullOrUndefined2(getValue2(field.child, data[i]))) {
          var childData = getValue2(field.child, data[parseInt(i.toString(), 10)]);
          newData = this.getNestedItems(childData, this.getChildType(field), givenText);
          if (newData !== void 0) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", data[i]))) {
          var child = "child";
          newData = this.getNestedItems(getValue2(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
          if (newData !== void 0) {
            break;
          }
        }
      }
      return newData;
    };
    DropDownTree2.prototype.getChildType = function(mapper5) {
      return typeof mapper5.child === "string" || isNullOrUndefined2(mapper5.child) ? mapper5 : mapper5.child;
    };
    DropDownTree2.prototype.renderTree = function() {
      this.treeObj = new TreeView({
        fields: this.getTreeFields(this.fields),
        enableRtl: this.enableRtl,
        nodeSelected: this.onNodeSelected.bind(this),
        nodeChecked: this.onNodeChecked.bind(this),
        nodeChecking: this.beforeCheck.bind(this),
        nodeExpanded: this.onNodeExpanded.bind(this),
        actionFailure: this.onActionFailure.bind(this),
        nodeClicked: this.onNodeClicked.bind(this),
        dataBound: this.OnDataBound.bind(this),
        allowMultiSelection: this.allowMultiSelection,
        enableHtmlSanitizer: this.enableHtmlSanitizer,
        showCheckBox: this.showCheckBox,
        autoCheck: this.treeSettings.autoCheck,
        sortOrder: this.sortOrder,
        expandOn: this.treeSettings.expandOn,
        loadOnDemand: this.treeSettings.loadOnDemand,
        nodeSelecting: this.onBeforeSelect.bind(this),
        nodeTemplate: this.itemTemplate,
        checkDisabledChildren: this.treeSettings.checkDisabledChildren
      });
      this.treeObj.root = this.root ? this.root : this;
      this.treeObj.appendTo(this.tree);
    };
    DropDownTree2.prototype.renderPopup = function() {
      var _this = this;
      if (this.isFilteredData) {
        this.treeObj.element.classList.remove("e-filtering");
        this.filterObj.value = "";
        this.treeObj.fields = this.getTreeFields(this.fields);
        this.isFilterRestore = true;
        this.isFilteredData = false;
        this.hideCheckAll(false);
      }
      var isCancelled = false;
      var args = {
        cancel: false
      };
      this.trigger("beforeOpen", args, function(args2) {
        if (!args2.cancel) {
          addClass2([_this.inputWrapper], [ICONANIMATION]);
          if (_this.isFirstRender) {
            _this.popupEle = _this.createElement("div", {
              id: _this.element.id + "_options",
              className: POPUP_CLASS + " " + (_this.cssClass != null ? _this.cssClass : "")
            });
            _this.popupEle.setAttribute("role", "region");
            _this.popupEle.setAttribute("aria-label", _this.element.id);
            document.body.appendChild(_this.popupEle);
            _this.createPopup(_this.popupEle);
          } else {
            _this.popupEle = _this.popupObj.element;
            if (_this.isReact && _this.isFilterRestore) {
              _this.treeObj.refresh();
              _this.isFilteredData = true;
              _this.popupEle.removeChild(_this.filterContainer);
            }
          }
        } else {
          isCancelled = true;
        }
        if (_this.isFirstRender && !isCancelled || _this.isFilteredData) {
          _this.isFilteredData = false;
          prepend([_this.popupDiv], _this.popupEle);
          removeClass2([_this.popupDiv], DDTHIDEICON);
          if (_this.allowFiltering) {
            _this.renderFilter();
          }
          if (_this.showCheckBox && _this.showSelectAll && !_this.popupDiv.classList.contains(NODATA)) {
            _this.createSelectAllWrapper();
            _this.popupEle.insertBefore(_this.checkAllParent, _this.popupDiv);
          }
          if (_this.headerTemplate) {
            _this.setHeaderTemplate();
          }
          if (_this.footerTemplate) {
            _this.setFooterTemplate();
          }
          _this.isFirstRender = false;
          if (_this.hasTemplate && _this.portals) {
            if (_this.treeObj.portals) {
              _this.portals = _this.portals.concat(_this.treeObj.portals.filter(function(item) {
                return !_this.portals.includes(item);
              }));
            }
            if (_this.isReact) {
              _this.renderReactTemplates(_this.reactCallBack);
            }
          }
        }
        if (!isCancelled) {
          attributes2(_this.inputEle, {
            "aria-expanded": "true"
          });
          _this.popupObj.show(null, _this.zIndex === 1e3 ? _this.inputEle : null);
          removeClass2([_this.popupEle], DDTHIDEICON);
          _this.updatePopupHeight();
          _this.popupObj.refreshPosition();
          if (!(_this.showCheckBox && _this.showSelectAll) && !_this.popupDiv.classList.contains(NODATA) && _this.treeItems.length > 0) {
            var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]') : null;
            if (focusedElement) {
              _this.treeObj.element.querySelector("li").setAttribute("tabindex", "-1");
              focusedElement.setAttribute("tabindex", "0");
            } else {
              var oldFocussedNode = _this.treeObj.element.querySelector(".e-node-focus");
              focusedElement = _this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable)') || _this.treeObj.element.querySelector("li:not(.e-disable)");
              if (oldFocussedNode && oldFocussedNode !== focusedElement) {
                oldFocussedNode.setAttribute("tabindex", "-1");
                removeClass2([oldFocussedNode], "e-node-focus");
              }
            }
            if (!isNullOrUndefined2(focusedElement)) {
              if (!_this.allowFiltering) {
                focusedElement.focus();
              }
              addClass2([focusedElement], ["e-node-focus"]);
            }
          }
          if (_this.treeObj.checkedNodes.length > 0 && !_this.isFilterRestore) {
            var nodes = _this.treeObj.element.querySelectorAll("li");
            var checkedNodes = _this.treeObj.element.querySelectorAll("li[aria-checked=true]");
            if (checkedNodes.length === nodes.length && _this.checkBoxElement) {
              var wrap = closest2(_this.checkBoxElement, "." + CHECKBOXWRAP2);
              _this.changeState(wrap, "check");
              _this.checkSelectAll = false;
            }
          }
          if (_this.allowFiltering) {
            removeClass2([_this.inputWrapper], [INPUTFOCUS]);
            _this.filterObj.element.focus();
          }
          var eventArgs = {
            popup: _this.popupObj
          };
          _this.trigger("open", eventArgs);
        }
      });
    };
    DropDownTree2.prototype.reactCallBack = function() {
      if (!isNullOrUndefined2(this.popupObj)) {
        this.updatePopupHeight();
        this.popupObj.refreshPosition();
      }
    };
    DropDownTree2.prototype.updatePopupHeight = function() {
      if (this.isFirstRender) {
        return;
      }
      var popupHeight = this.getHeight();
      this.popupEle.style.maxHeight = popupHeight;
      if (this.allowFiltering) {
        var height = Math.round(this.filterContainer.getBoundingClientRect().height);
        popupHeight = formatUnit(parseInt(popupHeight, 10) - height + "px");
      }
      if (this.headerTemplate) {
        var height = Math.round(this.header.getBoundingClientRect().height);
        popupHeight = formatUnit(parseInt(popupHeight, 10) - height + "px");
      }
      if (this.showCheckBox && this.showSelectAll && !this.popupDiv.classList.contains(NODATA)) {
        var height = Math.round(this.checkAllParent.getBoundingClientRect().height);
        popupHeight = formatUnit(parseInt(popupHeight, 10) - height + "px");
      }
      if (this.footerTemplate) {
        var height = Math.round(this.footer.getBoundingClientRect().height);
        popupHeight = formatUnit(parseInt(popupHeight, 10) - height + "px");
      }
      var border = parseInt(window.getComputedStyle(this.popupEle).borderTopWidth, 10);
      border = border + parseInt(window.getComputedStyle(this.popupEle).borderBottomWidth, 10);
      popupHeight = formatUnit(parseInt(popupHeight, 10) - border + "px");
      this.popupDiv.style.maxHeight = popupHeight;
    };
    DropDownTree2.prototype.createPopup = function(element2) {
      var _this = this;
      if (this.isFirstRender) {
        this.popupObj = new Popup(element2, {
          width: this.setWidth(),
          targetType: "relative",
          collision: {
            X: "flip",
            Y: "flip"
          },
          relateTo: this.inputWrapper,
          zIndex: this.zIndex,
          enableRtl: this.enableRtl,
          position: {
            X: "left",
            Y: "bottom"
          },
          close: function() {
            _this.isPopupOpen = false;
          },
          open: function() {
            document.addEventListener("mousedown", _this.documentClickContext);
            _this.isPopupOpen = true;
          },
          targetExitViewport: function() {
            if (!Browser2.isDevice) {
              _this.hidePopup();
            }
          }
        });
      }
    };
    DropDownTree2.prototype.setElementWidth = function(inputWidth) {
      var ddElement = this.inputWrapper;
      if (!isNullOrUndefined2(inputWidth)) {
        if (typeof inputWidth === "number") {
          ddElement.style.width = formatUnit(inputWidth);
        } else if (typeof inputWidth === "string") {
          ddElement.style.width = inputWidth.match(/px|%|em/) ? inputWidth : formatUnit(inputWidth);
        }
      }
    };
    DropDownTree2.prototype.setWidth = function() {
      var width = formatUnit(this.popupWidth);
      if (width.indexOf("%") > -1) {
        width = (this.inputWrapper.offsetWidth * parseFloat(width) / 100).toString() + "px";
      } else if (typeof this.popupWidth === "string") {
        width = this.popupWidth.match(/px|em/) ? this.popupWidth : width;
      }
      return width;
    };
    DropDownTree2.prototype.getHeight = function() {
      var height = formatUnit(this.popupHeight);
      if (height.indexOf("%") > -1) {
        height = (document.documentElement.clientHeight * parseFloat(height) / 100).toString() + "px";
      } else if (typeof this.popupHeight === "string") {
        height = this.popupHeight.match(/px|em/) ? this.popupHeight : height;
      }
      return height;
    };
    DropDownTree2.prototype.onDocumentClick = function(e) {
      var target = e.target;
      var isTree = closest2(target, "." + PARENTITEM2);
      var isFilter = closest2(target, "." + FILTERWRAP);
      var isHeader = closest2(target, "." + HEADER2);
      var isFooter = closest2(target, "." + FOOTER);
      var isScroller = target.classList.contains(DROPDOWN) ? true : matches2(target, ".e-ddt .e-popup") || matches2(target, ".e-ddt .e-treeview");
      if (this.isPopupOpen && (!isNullOrUndefined2(this.inputWrapper) && this.inputWrapper.contains(target) || isTree || isScroller || isHeader || isFooter) || (this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) || this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT) || target.classList.contains(CHECKBOXFRAME2)))) {
        this.isDocumentClick = false;
        e.preventDefault();
      } else if (!isNullOrUndefined2(this.inputWrapper) && !this.inputWrapper.contains(target) && this.inputFocus && !isFilter) {
        this.focusOut(e);
      }
    };
    DropDownTree2.prototype.onActionFailure = function(e) {
      this.trigger("actionFailure", e);
      this.l10nUpdate(true);
      addClass2([this.popupDiv], NODATA);
    };
    DropDownTree2.prototype.OnDataBound = function(args) {
      this.treeItems = args.data;
      if (this.treeItems.length <= 0) {
        this.l10nUpdate();
        addClass2([this.popupDiv], NODATA);
        this.hideCheckAll(true);
      } else if (this.popupDiv.classList.contains(NODATA) && this.treeItems.length >= 1) {
        removeClass2([this.popupDiv], NODATA);
        this.hideCheckAll(false);
      }
      if (!this.isFilteredData) {
        this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
      }
      if (this.isFirstRender && this.isRemoteData) {
        this.setTreeValue();
        this.setTreeText();
        this.updateHiddenValue();
        this.setSelectedValue();
        if (!this.wrapText) {
          this.updateView();
        }
        this.treeObj.element.focus();
        this.isInitialized = true;
      }
      var eventArgs = {
        data: args.data
      };
      this.trigger("dataBound", eventArgs);
      if (this.filterObj === null) {
        this.isFilteredData = false;
      }
      if (this.isFilteredData) {
        this.treeObj.expandAll();
      }
      if (this.isFilterRestore) {
        this.restoreFilterSelection();
        if (!this.showSelectAll) {
          this.isFilterRestore = false;
        }
      }
    };
    DropDownTree2.prototype.restoreFilterSelection = function() {
      if (this.showCheckBox) {
        this.treeObj.checkedNodes = this.value ? this.value : [];
      } else {
        this.treeObj.selectedNodes = this.value ? this.value : [];
      }
    };
    DropDownTree2.prototype.setCssClass = function(newClass, oldClass) {
      var elements = this.popupObj ? [this.inputWrapper, this.popupObj.element] : [this.inputWrapper];
      if (!isNullOrUndefined2(oldClass) && oldClass !== "") {
        removeClass2(elements, oldClass.split(" "));
      }
      if (!isNullOrUndefined2(newClass) && newClass !== "") {
        addClass2(elements, newClass.split(" "));
      }
    };
    DropDownTree2.prototype.setEnableRTL = function(state) {
      if (state) {
        this.inputWrapper.classList.add(RTL20);
      } else {
        this.inputWrapper.classList.remove(RTL20);
      }
      if (this.popupObj) {
        this.popupObj.enableRtl = state;
        this.popupObj.dataBind();
      }
      if (this.treeObj) {
        this.treeObj.enableRtl = state;
        this.treeObj.dataBind();
      }
    };
    DropDownTree2.prototype.setEnable = function() {
      Input.setEnabled(this.enabled, this.inputEle);
      if (this.enabled) {
        removeClass2([this.inputWrapper], DISABLED13);
        this.inputEle.setAttribute("aria-disabled", "false");
        this.inputWrapper.setAttribute("aria-disabled", "false");
      } else {
        if (this.isPopupOpen) {
          this.hidePopup();
        }
        addClass2([this.inputWrapper], DISABLED13);
        if (this.inputWrapper && this.inputWrapper.classList.contains(INPUTFOCUS)) {
          removeClass2([this.inputWrapper], [INPUTFOCUS]);
        }
        this.inputEle.setAttribute("aria-disabled", "true");
        this.inputWrapper.setAttribute("aria-disabled", "true");
      }
    };
    DropDownTree2.prototype.cloneFields = function(fields) {
      var clonedField = {
        dataSource: fields.dataSource,
        value: fields.value,
        text: fields.text,
        parentValue: fields.parentValue,
        child: this.cloneChildField(fields.child),
        hasChildren: fields.hasChildren,
        expanded: fields.expanded,
        iconCss: fields.iconCss,
        imageUrl: fields.imageUrl,
        htmlAttributes: fields.htmlAttributes,
        query: fields.query,
        selected: fields.selected,
        selectable: fields.selectable,
        tableName: fields.tableName,
        tooltip: fields.tooltip
      };
      return clonedField;
    };
    DropDownTree2.prototype.cloneChildField = function(fields) {
      if (typeof fields === "string") {
        return fields;
      } else {
        var clonedField = {
          dataSource: fields.dataSource,
          value: fields.value,
          text: fields.text,
          parentValue: fields.parentValue,
          child: fields.child ? this.cloneChildField(fields.child) : null,
          hasChildren: fields.hasChildren,
          expanded: fields.expanded,
          iconCss: fields.iconCss,
          imageUrl: fields.imageUrl,
          htmlAttributes: fields.htmlAttributes,
          query: fields.query,
          selected: fields.selected,
          selectable: fields.selectable,
          tableName: fields.tableName,
          tooltip: fields.tooltip
        };
        return clonedField;
      }
    };
    DropDownTree2.prototype.getTreeFields = function(fields) {
      var treeFields = {
        dataSource: fields.dataSource,
        id: fields.value,
        text: fields.text,
        parentID: fields.parentValue,
        child: this.getTreeChildren(fields.child),
        hasChildren: fields.hasChildren,
        expanded: fields.expanded,
        iconCss: fields.iconCss,
        imageUrl: fields.imageUrl,
        isChecked: fields.selected,
        htmlAttributes: fields.htmlAttributes,
        query: fields.query,
        selectable: fields.selectable,
        selected: fields.selected,
        tableName: fields.tableName,
        tooltip: fields.tooltip
      };
      return treeFields;
    };
    DropDownTree2.prototype.getTreeChildren = function(mapper5) {
      if (typeof mapper5 === "string") {
        return mapper5;
      } else if (!isNullOrUndefined2(mapper5)) {
        mapper5 = this.getActualProperties(mapper5);
        var childFields = mapper5;
        if (mapper5.value) {
          childFields.id = mapper5.value;
        }
        if (mapper5.parentValue) {
          childFields.parentID = mapper5.parentValue;
        }
        if (mapper5.child) {
          childFields.child = this.getTreeChildren(mapper5.child);
        }
        if (mapper5.selected && this.showCheckBox) {
          childFields.isChecked = mapper5.selected;
        }
        return childFields;
      }
      return null;
    };
    DropDownTree2.prototype.getTreeDataType = function(ds, field) {
      if (this.fields.dataSource instanceof DataManager) {
        for (var i = 0; i < ds.length; i++) {
          if (typeof field.child === "string" && isNullOrUndefined2(getValue2(field.child, ds[i]))) {
            return 1;
          }
        }
        return 2;
      }
      if (isNullOrUndefined2(this.fields.dataSource)) {
        this.fields.dataSource = [];
      }
      for (var i = 0, len = this.fields.dataSource.length; i < len; i++) {
        if (typeof field.child === "string" && !isNullOrUndefined2(getValue2(field.child, this.fields.dataSource[i]))) {
          return 2;
        }
        if (!isNullOrUndefined2(getValue2(field.parentValue, this.fields.dataSource[i])) || !isNullOrUndefined2(getValue2(field.hasChildren, this.fields.dataSource[i]))) {
          return 1;
        }
      }
      return 1;
    };
    DropDownTree2.prototype.setFields = function() {
      this.resetValue();
      if (this.hasTemplate) {
        this.updateTemplate();
      }
      this.treeObj.fields = this.getTreeFields(this.fields);
      this.treeObj.dataBind();
    };
    DropDownTree2.prototype.getEventArgs = function(args) {
      var checkData = args.data;
      var selectData = args.nodeData;
      var state;
      if (this.showCheckBox) {
        if (args.action === "check") {
          state = "select";
        } else if (args.action === "uncheck") {
          state = "un-select";
        }
      }
      var eventArgs = {
        action: this.showCheckBox ? state : args.action,
        isInteracted: this.isClicked ? true : args.isInteracted,
        item: args.node,
        itemData: this.showCheckBox ? checkData[0] : selectData
      };
      return eventArgs;
    };
    DropDownTree2.prototype.onBeforeSelect = function(args) {
      if (args.isInteracted) {
        this.setOldValue();
        if (this.value === null) {
          this.setProperties({
            value: []
          }, true);
        }
      }
    };
    DropDownTree2.prototype.updateHiddenValue = function() {
      if (this.allowMultiSelection || this.showCheckBox) {
        return;
      }
      if (this.value && this.value.length) {
        this.hiddenElement.innerHTML = '<option selected value ="' + this.value[0] + '">' + this.text + "</option>";
      } else {
        this.hiddenElement.innerHTML = "";
      }
    };
    DropDownTree2.prototype.onNodeSelected = function(args) {
      if (this.showCheckBox) {
        return;
      }
      var eventArgs = this.getEventArgs(args);
      this.trigger("select", eventArgs);
      var selectedText;
      if (args.isInteracted) {
        var id = getValue2("id", args.nodeData).toString();
        if (!this.allowMultiSelection) {
          this.hiddenElement.innerHTML = "";
          this.setProperties({
            value: [id]
          }, true);
          if (this.itemTemplate) {
            selectedText = getValue2("text", this.treeObj.getNode(id));
          } else {
            selectedText = getValue2("text", args.nodeData).toString();
          }
          Input.setValue(selectedText, this.inputEle, this.floatLabelType);
          this.setProperties({
            text: selectedText
          }, true);
          this.currentText = this.text;
          this.currentValue = this.value;
          this.setValueTemplate();
          if (!isNullOrUndefined2(this.value) && this.value.length > 0) {
            this.inputWrapper.setAttribute("aria-label", args.nodeData.text.toString());
          }
          attributes2(this.inputWrapper, {
            "aria-describedby": this.element.id
          });
          attributes2(this.inputWrapper, {
            "aria-activedescendant": id.toString()
          });
          this.updateHiddenValue();
          this.showOverAllClear();
          this.hidePopup();
          this.isNodeSelected = true;
        } else if (this.allowMultiSelection) {
          this.setMultiSelect();
        }
      }
      if (this.isValueChange && !this.changeOnBlur) {
        this.triggerChangeEvent(this.keyEventArgs);
        this.isValueChange = false;
      }
    };
    DropDownTree2.prototype.onNodeClicked = function(args) {
      if (!this.changeOnBlur && this.isNodeSelected) {
        this.triggerChangeEvent(args.event);
        this.isNodeSelected = false;
      }
      var target = args.event.target;
      if ((target.classList.contains("e-fullrow") || target.classList.contains("e-list-text")) && this.showCheckBox) {
        this.isClicked = true;
        var getNodeDetails = this.treeObj.getNode(args.node);
        if (getNodeDetails.isChecked === "true") {
          this.treeObj.uncheckAll([args.node]);
        } else {
          this.treeObj.checkAll([args.node]);
        }
        this.isClicked = false;
        this.setMultiSelect();
        this.ensurePlaceHolder();
      }
      if (!this.changeOnBlur && (this.allowMultiSelection || this.showCheckBox)) {
        this.triggerChangeEvent(args.event);
      }
    };
    DropDownTree2.prototype.onNodeChecked = function(args) {
      var eventArgs = this.getEventArgs(args);
      this.trigger("select", eventArgs);
      if (this.isFilteredData && args.action === "uncheck") {
        var id = getValue2("id", args.data[0]).toString();
        this.removeSelectedData(id, true);
      }
      if (!this.isChipDelete && args.isInteracted || !this.isFilteredData && args.action === "check" && this.isFromFilterChange) {
        this.setMultiSelect();
        this.ensurePlaceHolder();
      }
      if (this.showSelectAll && this.checkBoxElement) {
        var nodes = this.treeObj.element.querySelectorAll("li");
        var checkedNodes = this.treeObj.element.querySelectorAll("li[aria-checked=true]");
        var wrap = closest2(this.checkBoxElement, "." + CHECKBOXWRAP2);
        if (wrap && args.action === "uncheck" && (args.isInteracted || checkedNodes.length === 0 || !isNullOrUndefined2(args.data[0]) && args.data[0].isChecked === "false") || !args.isInteracted && this.isFilterRestore) {
          this.isFilterRestore = false;
          this.isReverseUpdate = true;
          this.changeState(wrap, "uncheck");
          this.isReverseUpdate = false;
        } else if (wrap && args.action === "check" && checkedNodes.length === nodes.length && (args.isInteracted || this.isCheckAllCalled || !isNullOrUndefined2(args.data[0]) && args.data[0].isChecked === "true")) {
          this.isReverseUpdate = true;
          this.isCheckAllCalled = false;
          this.changeState(wrap, "check");
          this.isReverseUpdate = false;
        }
      }
      if (this.isValueChange && !this.changeOnBlur) {
        this.triggerChangeEvent(this.keyEventArgs);
        this.isValueChange = false;
      }
    };
    DropDownTree2.prototype.beforeCheck = function(args) {
      if (args.isInteracted) {
        this.setOldValue();
      }
    };
    DropDownTree2.prototype.onNodeExpanded = function() {
      if (this.hasTemplate && this.portals && this.treeObj.portals) {
        for (var i = 0; i < this.treeObj.portals.length; i++) {
          if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
            this.portals.push(this.treeObj.portals[i]);
          }
        }
        this.renderReactTemplates();
      }
    };
    DropDownTree2.prototype.updateClearButton = function(state) {
      if (state) {
        if (!this.inputWrapper.contains(this.overAllClear)) {
          this.inputEle.parentElement.insertBefore(this.overAllClear, this.inputEle.nextSibling);
        } else {
          removeClass2([this.overAllClear], HIDEICON);
          addClass2([this.inputWrapper], SHOW_CLEAR);
        }
      } else {
        addClass2([this.overAllClear], HIDEICON);
        removeClass2([this.inputWrapper], SHOW_CLEAR);
      }
      if ((this.allowMultiSelection || this.showCheckBox) && this.chipWrapper) {
        var chipClose = selectAll2("." + CHIP_CLOSE, this.chipWrapper);
        for (var i = 0; i < chipClose.length; i++) {
          if (!state) {
            addClass2([chipClose[i]], HIDEICON);
          } else {
            removeClass2([chipClose[i]], HIDEICON);
          }
        }
      }
    };
    DropDownTree2.prototype.updateDropDownIconState = function(state) {
      var spinIcon = select2("." + DDTICON, this.inputWrapper);
      if (state) {
        if (!spinIcon) {
          Input.appendSpan(DROPDOWNICON, this.inputWrapper, this.createElement);
        } else {
          removeClass2([spinIcon], HIDEICON);
        }
        addClass2([this.inputWrapper], SHOW_DD_ICON);
      } else {
        addClass2([spinIcon], HIDEICON);
        removeClass2([this.inputWrapper], SHOW_DD_ICON);
      }
    };
    DropDownTree2.prototype.updateMode = function() {
      if (this.mode === "Custom") {
        return;
      }
      if (this.mode !== "Delimiter") {
        if (!this.inputWrapper.contains(this.chipWrapper)) {
          this.createChip();
        }
        var isValid = this.getValidMode();
        if (this.chipWrapper.classList.contains(HIDEICON) && isValid) {
          removeClass2([this.chipWrapper], HIDEICON);
          this.showOrHideValueTemplate(false, true);
          addClass2([this.inputWrapper], SHOW_CHIP);
        } else if (!isValid) {
          addClass2([this.chipWrapper], HIDEICON);
          removeClass2([this.inputWrapper], SHOW_CHIP);
          this.showOrHideValueTemplate(true);
        }
        var isValue = this.value !== null ? this.value.length !== 0 ? true : false : false;
        if (isValid && isValue) {
          addClass2([this.inputEle], CHIP_INPUT);
        } else {
          removeClass2([this.inputEle], CHIP_INPUT);
        }
      } else if (this.inputEle.classList.contains(CHIP_INPUT)) {
        removeClass2([this.inputEle], CHIP_INPUT);
        if (this.chipWrapper) {
          addClass2([this.chipWrapper], HIDEICON);
          removeClass2([this.inputWrapper], SHOW_CHIP);
          this.showOrHideValueTemplate(true);
        }
      }
    };
    DropDownTree2.prototype.ensurePlaceHolder = function() {
      if (isNullOrUndefined2(this.value) || this.value !== null && this.value.length === 0) {
        removeClass2([this.inputEle], CHIP_INPUT);
        if (this.chipWrapper) {
          addClass2([this.chipWrapper], HIDEICON);
          this.showOrHideValueTemplate(true);
        }
      }
    };
    DropDownTree2.prototype.ensureClearIconPosition = function(floatLabelType) {
      if (floatLabelType !== "Never") {
        this.inputWrapper.insertBefore(this.overAllClear, this.inputObj.buttons[0]);
      }
    };
    DropDownTree2.prototype.setMultiSelectValue = function(newValues) {
      var _this = this;
      if (!this.isFilteredData) {
        this.setProperties({
          value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues
        }, true);
        this.isFromFilterChange = false;
        if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
          this.treeObj.selectedNodes = this.value.slice();
          this.treeObj.dataBind();
        }
      } else {
        var selectedValues = isNullOrUndefined2(this.value) ? [] : this.value;
        selectedValues = selectedValues.filter(function(selectedValue) {
          var nodeData = _this.treeObj.getTreeData(selectedValue);
          if (Array.isArray(nodeData)) {
            return nodeData.every(function(nodeSelectedData) {
              return nodeSelectedData.selected;
            });
          }
          return true;
        });
        for (var i = 0; i < newValues.length; i++) {
          if (isNullOrUndefined2(this.value) || this.value.indexOf(newValues[i]) === -1) {
            selectedValues.push(newValues[i]);
          }
        }
        this.setProperties({
          value: selectedValues
        }, true);
      }
    };
    DropDownTree2.prototype.setMultiSelect = function() {
      if (this.showCheckBox && !this.isDynamicChange) {
        this.setMultiSelectValue(this.treeObj.checkedNodes.slice());
      } else {
        var ddtValue = this.allowMultiSelection ? this.showCheckBox ? this.treeObj.checkedNodes : this.treeObj.selectedNodes : this.value ? this.showCheckBox ? this.value : [this.value[0]] : null;
        this.setMultiSelectValue(ddtValue);
        if (this.showCheckBox && this.value !== null) {
          this.treeObj.checkedNodes = this.value;
          this.treeObj.dataBind();
        }
      }
      this.selectedText = [];
      var checkSelection = this.allowMultiSelection ? true : this.showCheckBox ? true : false;
      if (this.inputWrapper.contains(this.chipWrapper) && !checkSelection) {
        removeClass2([this.inputEle], CHIP_INPUT);
        detach2(this.chipWrapper);
      }
      var isValid = this.getValidMode();
      if (isValid && this.value !== null) {
        addClass2([this.inputEle], CHIP_INPUT);
        if (this.chipWrapper) {
          removeClass2([this.chipWrapper], HIDEICON);
          this.showOrHideValueTemplate(false, true);
        }
      }
      var isValue = this.value ? this.value.length ? true : false : false;
      if (this.chipWrapper && this.mode === "Box" && !isValue) {
        addClass2([this.chipWrapper], HIDEICON);
        removeClass2([this.inputEle], CHIP_INPUT);
        this.showOrHideValueTemplate(true);
      }
      this.updateSelectedValues();
    };
    DropDownTree2.prototype.getSelectedData = function(value) {
      var data = null;
      if (this.isFilteredData) {
        for (var i = 0; i < this.selectedData.length; i++) {
          if (getValue2(this.treeSettings.loadOnDemand ? this.fields.value : "id", this.selectedData[i]).toString() === value) {
            data = this.selectedData[i];
            break;
          }
        }
      }
      if (isNullOrUndefined2(data)) {
        if (this.treeSettings.loadOnDemand) {
          data = this.getNodeData(value, this.treeItems);
        } else {
          data = this.treeObj.getNode(value);
        }
        if (!isNullOrUndefined2(data)) {
          this.selectedData.push(data);
        }
      }
      return data;
    };
    DropDownTree2.prototype.getNodeData = function(id, dataSource) {
      var childItems;
      if (isNullOrUndefined2(id)) {
        return childItems;
      } else if (this.treeDataType === 1) {
        for (var i = 0, objlen = dataSource.length; i < objlen; i++) {
          var dataId = getValue2(this.fields.value, dataSource[i]);
          if (!isNullOrUndefined2(dataSource[i]) && !isNullOrUndefined2(dataId) && dataId.toString() === id) {
            return dataSource[i];
          }
        }
      } else {
        return this.getChildNodeData(dataSource, this.fields, id);
      }
      return childItems;
    };
    DropDownTree2.prototype.getChildNodeData = function(obj, mapper5, id) {
      var newChildItems;
      if (isNullOrUndefined2(obj)) {
        return newChildItems;
      }
      for (var i = 0, objlen = obj.length; i < objlen; i++) {
        var dataValue = getValue2(mapper5.value, obj[i]);
        if (obj[i] && dataValue && dataValue.toString() === id) {
          return obj[i];
        } else if (typeof mapper5.child === "string" && !isNullOrUndefined2(getValue2(mapper5.child, obj[i]))) {
          var childNodeData = getValue2(mapper5.child, obj[i]);
          newChildItems = this.getChildNodeData(childNodeData, this.getChildMapperFields(mapper5), id);
          if (newChildItems !== void 0) {
            break;
          }
        } else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined2(getValue2("child", obj[i]))) {
          var child = "child";
          newChildItems = this.getChildNodeData(getValue2(child, obj[i]), this.getChildMapperFields(mapper5), id);
          if (newChildItems !== void 0) {
            break;
          }
        }
      }
      return newChildItems;
    };
    DropDownTree2.prototype.getChildMapperFields = function(mapper5) {
      return typeof mapper5.child === "string" || isNullOrUndefined2(mapper5.child) ? mapper5 : mapper5.child;
    };
    DropDownTree2.prototype.removeSelectedData = function(value, muteOnChange) {
      var selectedValues = isNullOrUndefined2(this.value) ? [] : this.value.slice();
      selectedValues.splice(selectedValues.indexOf(value), 1);
      this.setProperties({
        value: selectedValues
      }, muteOnChange);
      for (var i = 0; i < this.selectedData.length; i++) {
        if (getValue2(this.treeSettings.loadOnDemand ? this.fields.value : "id", this.selectedData[i]).toString() === value) {
          this.selectedData.splice(i, 1);
          break;
        }
      }
    };
    DropDownTree2.prototype.initializeValueTemplate = function() {
      if (!this.valueTemplate) {
        return null;
      }
      if (this.valueTemplateContainer) {
        while (this.valueTemplateContainer.firstChild) {
          this.valueTemplateContainer.removeChild(this.valueTemplateContainer.firstChild);
        }
      } else {
        this.valueTemplateContainer = this.createElement("span", {
          className: OVERFLOW_VIEW + " " + SHOW_TEXT + " e-input-value " + HIDEICON
        });
      }
      this.inputWrapper.insertBefore(this.valueTemplateContainer, this.inputEle);
      return this.templateComplier(this.valueTemplate);
    };
    DropDownTree2.prototype.showOrHideValueTemplate = function(show, showChip) {
      if (showChip === void 0) {
        showChip = false;
      }
      if (!this.valueTemplateContainer || this.mode === "Box") {
        return;
      }
      if (show) {
        removeClass2([this.valueTemplateContainer], HIDEICON);
        addClass2([this.inputWrapper], SHOW_CHIP);
        addClass2([this.inputEle], CHIP_INPUT);
      } else {
        addClass2([this.valueTemplateContainer], HIDEICON);
        if (!showChip) {
          removeClass2([this.inputWrapper], SHOW_CHIP);
          removeClass2([this.inputEle], CHIP_INPUT);
        }
      }
    };
    DropDownTree2.prototype.updateSelectedValues = function() {
      var _this = this;
      this.dataValue = "";
      var temp;
      var text;
      var textValue = "";
      var selectedData;
      this.hiddenElement.innerHTML = "";
      var hiddenInputValue = "";
      if ((!this.isChipDelete || this.treeSettings.autoCheck) && this.inputWrapper.contains(this.chipWrapper)) {
        this.chipCollection.innerHTML = "";
      }
      if (!this.isFilteredData) {
        this.selectedData = [];
      }
      if (!isNullOrUndefined2(this.value)) {
        var compiledString = this.initializeValueTemplate();
        for (var i = 0, len = this.value.length; i < len; i++) {
          selectedData = this.getSelectedData(this.value[i]);
          text = getValue2(this.treeSettings.loadOnDemand ? this.fields.text : "text", selectedData);
          this.selectedText.push(text);
          temp = this.selectedText[this.selectedText.length - 1];
          if (this.selectedText.length > 1) {
            this.dataValue += this.delimiterChar + " " + temp;
            textValue += "," + temp;
          } else {
            this.dataValue += temp;
            textValue += temp;
          }
          if (this.mode !== "Custom" && this.mode !== "Delimiter" && (!this.isChipDelete || this.treeSettings.autoCheck) && (this.allowMultiSelection || this.showCheckBox)) {
            this.setChipValues(temp, this.value[i]);
          }
          hiddenInputValue += '<option selected value ="' + this.value[i] + '">' + this.selectedText[this.selectedText.length - 1] + "</option>";
          if (this.valueTemplate) {
            this.getValueTemplateElement(this.value[i], compiledString);
          }
        }
        if (this.hasTemplate && this.portals) {
          if (this.treeObj.portals) {
            this.portals = this.portals.concat(this.treeObj.portals.filter(function(item) {
              return !_this.portals.includes(item);
            }));
          }
          if (this.isReact) {
            this.renderReactTemplates(this.reactCallBack);
          }
        }
        if (this.selectedText.length >= 1) {
          this.setProperties({
            text: textValue
          }, true);
        }
        this.hiddenElement.innerHTML = hiddenInputValue;
        if (this.mode === "Custom" && (this.allowMultiSelection || this.showCheckBox)) {
          this.setTagValues();
        }
      }
      var isValid = this.getValidMode();
      if (this.mode !== "Custom" && this.mode !== "Box" && (this.allowMultiSelection || this.showCheckBox) && !isValid) {
        if (this.chipWrapper) {
          addClass2([this.chipWrapper], HIDEICON);
          removeClass2([this.inputWrapper], SHOW_CHIP);
        }
        this.showOrHideValueTemplate(true);
      }
      Input.setValue(this.dataValue, this.inputEle, this.floatLabelType);
      if (textValue === "") {
        this.setProperties({
          text: null
        }, true);
      } else {
        this.setProperties({
          text: textValue
        }, true);
      }
      if (this.showClearButton && this.inputFocus) {
        this.showOverAllClear();
      }
      if ((this.allowMultiSelection || this.showCheckBox) && this.popupObj) {
        this.popupObj.refreshPosition();
      }
      this.currentText = this.text;
      this.currentValue = this.value;
      if (!isNullOrUndefined2(this.value) && this.value.length > 0 && !isNullOrUndefined2(this.currentText)) {
        this.inputWrapper.setAttribute("aria-label", this.currentText.replace(/,/g, ", "));
      } else {
        this.inputWrapper.setAttribute("aria-label", this.getModuleName());
      }
    };
    DropDownTree2.prototype.setChipValues = function(text, value) {
      if (!this.inputWrapper.contains(this.chipWrapper)) {
        this.createChip();
      }
      var chip = this.createElement("span", {
        className: CHIP,
        attrs: {
          "data-value": value
        }
      });
      var chipContent = this.createElement("span", {
        className: CHIP_CONTENT
      });
      var chipClose = this.createElement("span", {
        className: CHIP_CLOSE + " " + ICONS2
      });
      if (this.enableHtmlSanitizer) {
        chipContent.innerText = SanitizeHtmlHelper2.sanitize(text);
      } else {
        chipContent.innerHTML = text;
      }
      chip.appendChild(chipContent);
      this.chipCollection.appendChild(chip);
      if (this.showClearButton) {
        chip.appendChild(chipClose);
        EventHandler2.add(chipClose, "mousedown", this.removeChip, this);
      }
    };
    DropDownTree2.prototype.setTagValues = function() {
      if (this.value === null || this.text == null || this.value.length === 0) {
        if (this.inputWrapper.contains(this.chipWrapper)) {
          addClass2([this.chipWrapper], HIDEICON);
        }
        return;
      }
      if (!this.inputWrapper.contains(this.chipWrapper)) {
        this.createChip();
      }
      if (!this.inputWrapper.classList.contains(SHOW_CHIP)) {
        addClass2([this.inputWrapper], SHOW_CHIP);
      }
      var chip = this.createElement("span", {
        className: CHIP
      });
      if (!this.inputEle.classList.contains(CHIP_INPUT)) {
        addClass2([this.inputEle], CHIP_INPUT);
      }
      if (this.chipWrapper.classList.contains(HIDEICON)) {
        removeClass2([this.chipWrapper], HIDEICON);
        this.showOrHideValueTemplate(false, true);
      }
      var chipContent = this.createElement("span", {
        className: CHIP_CONTENT
      });
      var template = this.customTemplate;
      var templateId = this.customTemplateId;
      var templatestring = "customTemplate";
      var compiledString = this.templateComplier(template);
      var tempArr = compiledString({
        "value": this.value,
        "text": this.text
      }, this, templatestring, templateId, this.isStringTemplate, void 0, chipContent);
      if (tempArr) {
        tempArr = Array.prototype.slice.call(tempArr);
        append(tempArr, chipContent);
      }
      chip.appendChild(chipContent);
      this.chipCollection.appendChild(chip);
    };
    DropDownTree2.prototype.setSelectAllWrapper = function(state) {
      if (this.isFirstRender) {
        return;
      }
      if (state && !this.popupEle.contains(this.checkAllParent) && this.showCheckBox) {
        this.createSelectAllWrapper();
        this.popupEle.insertBefore(this.checkAllParent, this.popupDiv);
      } else if (this.popupEle.contains(this.checkAllParent)) {
        detach2(this.checkAllParent);
        this.checkAllParent = null;
      }
    };
    DropDownTree2.prototype.setHeaderTemplate = function() {
      if (this.header) {
        this.header.innerHTML = "";
      } else {
        this.header = this.createElement("div");
        addClass2([this.header], HEADER2);
      }
      var compiledString = this.templateComplier(this.headerTemplate);
      var tempArr = compiledString({}, this, "headerTemplate", this.headerTemplateId, this.isStringTemplate, void 0, this.header);
      if (tempArr) {
        tempArr = Array.prototype.slice.call(tempArr);
        append(tempArr, this.header);
      }
      this.popupEle.insertBefore(this.header, this.checkAllParent ? this.checkAllParent : this.popupDiv);
    };
    DropDownTree2.prototype.templateComplier = function(template) {
      if (template) {
        try {
          if (typeof template !== "function" && document.querySelectorAll(template).length) {
            return compile4(document.querySelector(template).innerHTML.trim());
          } else {
            return compile4(template);
          }
        } catch (e) {
          return compile4(template);
        }
      }
      return compile4(template);
    };
    DropDownTree2.prototype.setFooterTemplate = function() {
      if (this.footer) {
        if (this.isReact && typeof this.footerTemplate === "function") {
          this.clearTemplate(["footerTemplate"]);
        } else {
          this.footer.innerHTML = "";
        }
      } else {
        this.footer = this.createElement("div");
        addClass2([this.footer], FOOTER);
      }
      var compiledString = this.templateComplier(this.footerTemplate);
      var tempArr = compiledString({}, this, "footerTemplate", this.footerTemplateId, this.isStringTemplate, void 0, this.footer);
      if (tempArr) {
        tempArr = Array.prototype.slice.call(tempArr);
        append(tempArr, this.footer);
      }
      append([this.footer], this.popupEle);
    };
    DropDownTree2.prototype.clearAll = function(e) {
      if (!this.enabled || this.readonly) {
        return;
      }
      this.resetValue();
      this.showOverAllClear();
      if (this.allowMultiSelection || this.showCheckBox) {
        if (this.popupObj) {
          this.popupObj.refreshPosition();
        }
        if (!this.wrapText) {
          this.updateOverflowWrapper(true);
        }
      }
      if (e) {
        this.isClearButtonClick = true;
      }
      if (!this.changeOnBlur) {
        this.triggerChangeEvent(e);
      }
    };
    DropDownTree2.prototype.removeChip = function(e) {
      if (!this.enabled || this.readonly) {
        return;
      }
      var element2 = e.target.parentElement;
      var value = element2.getAttribute("data-value");
      if (this.chipCollection) {
        if (element2) {
          remove(element2);
        }
      }
      this.isChipDelete = true;
      this.isClearButtonClick = true;
      this.removeSelectedData(value, true);
      this.selectedText = [];
      if (this.allowMultiSelection) {
        this.treeObj.selectedNodes = this.value.slice();
        this.updateSelectedValues();
      }
      if (this.showCheckBox) {
        this.treeObj.uncheckAll([value]);
        this.clearCheckAll();
        this.setMultiSelect();
      }
      this.triggerChangeEvent(e);
      this.isChipDelete = false;
      this.ensurePlaceHolder();
    };
    DropDownTree2.prototype.resetValue = function(isDynamicChange) {
      if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
        return;
      }
      Input.setValue(null, this.inputEle, this.floatLabelType);
      if (!isDynamicChange) {
        this.setOldValue();
        this.setProperties({
          value: []
        }, true);
        this.showOrHideValueTemplate(false);
      }
      if (isNullOrUndefined2(this.value) || this.value.length === 0) {
        this.inputWrapper.setAttribute("aria-label", this.getModuleName());
      }
      this.dataValue = null;
      this.setProperties({
        text: null
      }, true);
      this.selectedData = [];
      setValue3("selectedNodes", [], this.treeObj);
      this.hiddenElement.innerHTML = "";
      if (this.showCheckBox) {
        this.treeObj.uncheckAll();
        this.setMultiSelect();
        this.clearCheckAll();
      }
      if (this.oldValue === null && !isDynamicChange) {
        this.removeValue = true;
      } else if (isDynamicChange) {
        this.triggerChangeEvent();
      }
      if ((this.allowMultiSelection || this.showCheckBox) && this.chipWrapper) {
        this.chipCollection.innerHTML = "";
        if (!this.wrapText) {
          this.updateOverflowWrapper(true);
        }
        this.ensurePlaceHolder();
      }
    };
    DropDownTree2.prototype.clearCheckAll = function() {
      if (this.showSelectAll && this.value && this.value.length === 0) {
        this.setLocale(false);
      }
    };
    DropDownTree2.prototype.setOldValue = function() {
      this.oldValue = Array.isArray(this.value) ? this.value.slice() : this.value;
    };
    DropDownTree2.prototype.selectAllItems = function(state) {
      if (this.showCheckBox) {
        if (state) {
          this.isCheckAllCalled = true;
          this.treeObj.checkAll();
        } else {
          this.treeObj.uncheckAll();
        }
        this.checkSelectAll = state;
      } else if (this.allowMultiSelection) {
        if (!state) {
          this.treeObj.selectedNodes = [];
        } else {
          var li = selectAll2("li", this.treeObj.element);
          var id = void 0;
          var arr = [];
          for (var i = 0; i < li.length; i++) {
            id = li[i].getAttribute("data-uid").toString();
            arr.push(id);
          }
          this.treeObj.selectedNodes = arr;
        }
      }
      this.updateMode();
      this.setMultiSelect();
      if (!this.wrapText) {
        if (state) {
          this.updateView();
        } else {
          this.updateOverflowWrapper(true);
        }
      }
    };
    DropDownTree2.prototype.updateTreeSettings = function(prop) {
      if (prop === "autoCheck") {
        this.treeObj.autoCheck = this.treeSettings.autoCheck;
      } else if (prop === "loadOnDemand") {
        this.treeObj.loadOnDemand = this.treeSettings.loadOnDemand;
      } else if (prop === "expandOn") {
        this.treeObj.expandOn = this.treeSettings.expandOn;
        this.treeObj.dataBind();
        return;
      } else if (prop === "checkDisabledChildren") {
        this.treeObj.checkDisabledChildren = this.treeSettings.checkDisabledChildren;
      }
      this.treeObj.dataBind();
      this.setMultiSelect();
      this.updateValue(this.value);
    };
    DropDownTree2.prototype.updateCheckBoxState = function(checkBox) {
      if (this.hasTemplate) {
        this.updateTemplate();
      }
      if (!this.wrapText) {
        this.updateOverflowWrapper(false);
      }
      this.treeObj.showCheckBox = checkBox;
      this.treeObj.dataBind();
      this.isDynamicChange = true;
      this.setSelectAllWrapper(this.showSelectAll);
      if (this.showSelectAll) {
        this.setLocale();
      }
      if (this.showCheckBox) {
        this.updateMode();
      }
      this.setMultiSelect();
      this.isDynamicChange = false;
    };
    DropDownTree2.prototype.updateTemplate = function() {
      if (this.popupObj) {
        this.clearTemplate();
        this.portals = [];
        this.popupObj.destroy();
        if (this.isPopupOpen) {
          this.hidePopup();
          this.isFirstRender = true;
          this.renderPopup();
        } else {
          this.isFirstRender = true;
        }
      }
    };
    DropDownTree2.prototype.l10nUpdate = function(actionFailure2) {
      if (this.noRecord) {
        this.noRecord.innerHTML = "";
      } else {
        this.noRecord = this.createElement("div");
      }
      if (this.noRecordsTemplate !== "No Records Found" || this.actionFailureTemplate !== "The Request Failed") {
        var template = actionFailure2 ? this.actionFailureTemplate : this.noRecordsTemplate;
        var templateId = actionFailure2 ? this.actionFailureTemplateId : this.noRecordsTemplateId;
        var templatestring = actionFailure2 ? "actionFailureTemplate" : "noRecordsTemplate";
        var compiledString = this.templateComplier(template);
        var tempArr = compiledString({}, this, templatestring, templateId, this.isStringTemplate, void 0, this.noRecord);
        if (tempArr) {
          tempArr = Array.prototype.slice.call(tempArr);
          append(tempArr, this.noRecord);
        }
      } else {
        var l10nLocale = {
          noRecordsTemplate: "No Records Found",
          actionFailureTemplate: "The Request Failed"
        };
        this.l10n = new L10n2(this.getLocaleName(), l10nLocale, this.locale);
        this.noRecord.innerHTML = actionFailure2 ? this.l10n.getConstant("actionFailureTemplate") : this.l10n.getConstant("noRecordsTemplate");
      }
      addClass2([this.noRecord], NODATACONTAINER);
      prepend([this.noRecord], this.popupDiv);
      if (this.treeObj) {
        this.treeObj.element.removeAttribute("aria-activedescendant");
      }
    };
    DropDownTree2.prototype.updateRecordTemplate = function(action) {
      if (this.treeItems && this.treeItems.length <= 0) {
        this.l10nUpdate(action);
        if (this.hasTemplate) {
          this.updateTemplate();
        }
      }
    };
    DropDownTree2.prototype.updateOverflowWrapper = function(state) {
      if (!state) {
        if (!this.inputWrapper.contains(this.overFlowWrapper)) {
          this.overFlowWrapper = this.createElement("span", {
            className: OVERFLOW_VIEW + " " + HIDEICON
          });
          this.inputWrapper.insertBefore(this.overFlowWrapper, this.hiddenElement);
        }
      } else if (this.inputWrapper.contains(this.overFlowWrapper) && state) {
        this.overFlowWrapper.innerHTML = "";
      }
    };
    DropDownTree2.prototype.updateMultiSelection = function(state) {
      if (!this.wrapText) {
        this.updateOverflowWrapper(false);
      }
      this.treeObj.allowMultiSelection = state;
      this.treeObj.dataBind();
      this.updateOption();
      if (this.allowMultiSelection) {
        this.updateMode();
      }
      this.setMultiSelect();
    };
    DropDownTree2.prototype.updateAllowFiltering = function(state) {
      if (!this.isFirstRender) {
        if (state) {
          this.renderFilter();
        } else {
          this.destroyFilter();
        }
      }
    };
    DropDownTree2.prototype.updateFilterPlaceHolder = function() {
      if (this.filterObj) {
        this.filterObj.placeholder = this.filterBarPlaceholder;
        this.filterObj.element.setAttribute("aria-label", this.filterBarPlaceholder);
      }
    };
    DropDownTree2.prototype.updateValue = function(value) {
      this.isDynamicChange = true;
      if (isNullOrUndefined2(value) || value.length === 0) {
        this.resetValue(true);
      } else {
        this.setTreeValue();
        if ((this.allowMultiSelection || this.showCheckBox) && !this.wrapText) {
          this.updateOverflowWrapper(false);
          this.updateView();
        }
      }
      this.updateHiddenValue();
      this.isDynamicChange = false;
    };
    DropDownTree2.prototype.updateText = function(text) {
      if (isNullOrUndefined2(text)) {
        this.resetValue();
      } else {
        this.setTreeText();
        if ((this.allowMultiSelection || this.showCheckBox) && !this.wrapText) {
          this.updateOverflowWrapper(false);
          this.updateView();
        }
      }
      this.updateHiddenValue();
    };
    DropDownTree2.prototype.updateModelMode = function() {
      var validMode = this.allowMultiSelection ? true : this.showCheckBox ? true : false;
      if (!validMode) {
        return;
      }
      if (!this.wrapText) {
        var overFlow = select2(".e-overflow:not(.e-input-value)", this.inputWrapper);
        if (overFlow) {
          overFlow.innerHTML = "";
        }
      }
      this.updateMode();
      this.setMultiSelect();
      if (!this.wrapText && this.value && this.value.length !== 0) {
        this.updateOverFlowView();
        addClass2([this.inputEle], CHIP_INPUT);
        if (this.mode === "Box") {
          removeClass2([this.overFlowWrapper, this.inputWrapper], SHOW_TEXT);
        } else {
          addClass2([this.overFlowWrapper, this.inputWrapper], SHOW_TEXT);
        }
      }
    };
    DropDownTree2.prototype.updateOption = function() {
      if (!this.hiddenElement.hasAttribute("multiple") && (this.allowMultiSelection || this.showCheckBox)) {
        this.hiddenElement.setAttribute("multiple", "");
      } else if (this.hiddenElement.hasAttribute("multiple") && !this.allowMultiSelection && !this.showCheckBox) {
        this.hiddenElement.removeAttribute("multiple");
      }
    };
    DropDownTree2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "width":
            this.setElementWidth(newProp.width);
            if (this.popupObj) {
              this.popupObj.element.style.width = this.setWidth();
            }
            break;
          case "placeholder":
            Input.setPlaceholder(newProp.placeholder, this.inputEle);
            break;
          case "cssClass":
            this.setCssClass(newProp.cssClass, oldProp.cssClass);
            break;
          case "enableRtl":
            this.setEnableRTL(this.enableRtl);
            break;
          case "fields":
            this.setFields();
            break;
          case "readonly":
            Input.setReadonly(newProp.readonly, this.inputEle);
            break;
          case "enabled":
            this.setEnable();
            break;
          case "floatLabelType":
            Input.removeFloating(this.inputObj);
            Input.addFloating(this.inputEle, newProp.floatLabelType, this.placeholder, this.createElement);
            this.ensureClearIconPosition(newProp.floatLabelType);
            break;
          case "showClearButton":
            this.updateClearButton(newProp.showClearButton);
            break;
          case "allowFiltering":
            this.updateAllowFiltering(newProp.allowFiltering);
            break;
          case "filterBarPlaceholder":
            this.updateFilterPlaceHolder();
            break;
          case "value":
            this.oldValue = oldProp.value;
            this.updateValue(newProp.value);
            break;
          case "text":
            this.updateText(newProp.text);
            break;
          case "allowMultiSelection":
            this.updateMultiSelection(newProp.allowMultiSelection);
            break;
          case "mode":
            if (!this.showCheckBox && !this.allowMultiSelection) {
              return;
            }
            if (this.mode === "Custom") {
              if (this.overFlowWrapper) {
                detach2(this.overFlowWrapper);
              }
              if (this.chipWrapper) {
                detach2(this.chipWrapper);
              }
              this.setTagValues();
            } else {
              if (oldProp.mode === "Custom") {
                this.updateOverflowWrapper(this.wrapText);
              }
              this.updateModelMode();
            }
            break;
          case "delimiterChar":
            if (this.mode === "Box") {
              return;
            }
            if (this.showCheckBox || this.allowMultiSelection) {
              this.setMultiSelect();
            }
            break;
          case "selectAllText":
            if (this.showCheckBox && this.showSelectAll) {
              this.setLocale();
            }
            break;
          case "unSelectAllText":
            if (this.showCheckBox && this.showSelectAll) {
              this.setLocale(false);
            }
            break;
          case "showSelectAll":
            if (this.showCheckBox) {
              this.setSelectAllWrapper(newProp.showSelectAll);
              this.updatePopupHeight();
            }
            break;
          case "showCheckBox":
            this.updateCheckBoxState(newProp.showCheckBox);
            if (!this.wrapText) {
              this.updateOverflowWrapper(true);
            }
            this.updatePopupHeight();
            this.updateOption();
            break;
          case "treeSettings":
            for (var _b = 0, _c = Object.keys(newProp.treeSettings); _b < _c.length; _b++) {
              var prop_1 = _c[_b];
              this.updateTreeSettings(prop_1);
            }
            break;
          case "customTemplate":
            if (this.mode !== "Custom") {
              return;
            }
            this.chipCollection.innerHTML = "";
            this.setTagValues();
            break;
          case "sortOrder":
            if (this.hasTemplate) {
              this.updateTemplate();
            }
            this.treeObj.sortOrder = newProp.sortOrder;
            this.treeObj.dataBind();
            this.updateValue(this.value);
            break;
          case "showDropDownIcon":
            this.updateDropDownIconState(newProp.showDropDownIcon);
            break;
          case "popupWidth":
            if (this.popupObj) {
              this.popupObj.element.style.width = this.setWidth();
            }
            break;
          case "popupHeight":
            if (this.popupObj) {
              this.updatePopupHeight();
            }
            break;
          case "zIndex":
            if (this.popupObj) {
              this.popupObj.zIndex = newProp.zIndex;
              this.popupObj.dataBind();
            }
            break;
          case "headerTemplate":
            this.updateTemplate();
            break;
          case "footerTemplate":
            this.updateTemplate();
            break;
          case "itemTemplate":
            this.updateTemplate();
            this.treeObj.nodeTemplate = newProp.itemTemplate;
            this.treeObj.dataBind();
            break;
          case "noRecordsTemplate":
            this.updateRecordTemplate();
            break;
          case "actionFailureTemplate":
            this.updateRecordTemplate(true);
            break;
          case "htmlAttributes":
            this.setHTMLAttributes();
            break;
          case "wrapText":
            this.updateOverflowWrapper(this.wrapText);
            if ((this.allowMultiSelection || this.showCheckBox) && !this.wrapText) {
              this.updateView();
            } else {
              addClass2([this.overFlowWrapper], HIDEICON);
              if (this.chipWrapper && this.mode === "Box") {
                removeClass2([this.chipWrapper], HIDEICON);
              } else {
                removeClass2([this.inputWrapper], SHOW_CHIP);
                removeClass2([this.inputEle], CHIP_INPUT);
              }
              this.ensurePlaceHolder();
            }
            break;
        }
      }
    };
    DropDownTree2.prototype.clear = function() {
      this.clearAll();
      if (this.inputFocus) {
        this.onFocusOut();
      } else {
        if (this.changeOnBlur) {
          this.triggerChangeEvent();
        }
        this.removeValue = false;
      }
    };
    DropDownTree2.prototype.destroy = function() {
      this.clearTemplate();
      this.unWireEvents();
      this.setCssClass(null, this.cssClass);
      this.setProperties({
        text: null
      }, true);
      this.treeObj.destroy();
      this.destroyFilter();
      if (this.popupObj) {
        this.popupObj.destroy();
        detach2(this.popupObj.element);
      }
      if (this.element.tagName !== this.getDirective()) {
        this.inputWrapper.parentElement.insertBefore(this.element, this.inputWrapper);
      }
      Input.setValue(null, this.inputEle, this.floatLabelType);
      detach2(this.inputWrapper);
      detach2(this.popupDiv);
      detach2(this.hiddenElement);
      Input.setRipple(false, [this.inputObj]);
      this.element.classList.remove("e-input");
      if (this.showCheckBox || this.allowMultiSelection || this.value && this.valueTemplateContainer) {
        this.element.classList.remove(CHIP_INPUT);
      }
      detach2(this.inputObj.container);
      if (this.inputObj.buttons.length) {
        detach2(this.inputObj.buttons[0]);
      }
      this.inputObj = null;
      while (this.hiddenElement.options.length > 0) {
        this.hiddenElement.remove(0);
      }
      this.hiddenElement.innerHTML = "";
      this.hiddenElement = null;
      this.inputWrapper.innerHTML = "";
      this.inputWrapper = null;
      this.popupDiv = null;
      this.tree = null;
      this.popupObj = null;
      this.treeObj = null;
      this.overAllClear = null;
      if (this.chipCollection) {
        var chipsIcons = selectAll2(".e-chips-close", this.chipCollection);
        for (var _i = 0, chipsIcons_1 = chipsIcons; _i < chipsIcons_1.length; _i++) {
          var element2 = chipsIcons_1[_i];
          EventHandler2.remove(element2, "mousedown", this.removeChip);
        }
      }
      this.chipWrapper = null;
      this.chipCollection = null;
      this.checkAllParent = null;
      this.selectAllSpan = null;
      this.checkBoxElement = null;
      this.checkWrapper = null;
      this.popupEle = null;
      this.header = null;
      this.footer = null;
      this.overFlowWrapper = null;
      this.keyboardModule = null;
      _super.prototype.destroy.call(this);
      this.setProperties({
        value: []
      }, true);
    };
    DropDownTree2.prototype.destroyFilter = function() {
      if (this.filterObj) {
        this.filterObj.destroy();
        detach2(this.filterObj.element);
        detach2(this.filterContainer);
        this.filterObj = null;
      }
    };
    DropDownTree2.prototype.destroyPopup = function() {
      this.isPopupOpen = false;
      if (this.isReact) {
        this.clearTemplate(["headerTemplate", "footerTemplate", "itemTemplate", "actionFailureTemplate", "noRecordsTemplate"]);
      }
      if (this.popupObj) {
        this.popupObj.destroy();
        detach2(this.popupObj.element);
      }
    };
    DropDownTree2.prototype.ensureVisible = function(item) {
      this.treeObj.ensureVisible(item);
    };
    DropDownTree2.prototype.getData = function(item) {
      return this.treeObj.getTreeData(item);
    };
    DropDownTree2.prototype.hidePopup = function() {
      var eventArgs = {
        popup: this.popupObj,
        cancel: false
      };
      this.trigger("close", eventArgs);
      if (eventArgs.cancel) {
        return;
      }
      this.inputWrapper.classList.remove(ICONANIMATION);
      if (this.popupEle) {
        addClass2([this.popupEle], DDTHIDEICON);
      }
      attributes2(this.inputEle, {
        "aria-expanded": "false"
      });
      if (this.popupObj && this.isPopupOpen) {
        this.popupObj.hide();
        if (this.inputFocus) {
          this.inputWrapper.focus();
          if (this.allowFiltering) {
            addClass2([this.inputWrapper], [INPUTFOCUS]);
          }
        }
        if (this.destroyPopupOnHide) {
          this.isFirstRender = true;
          this.destroyPopup();
        }
      }
    };
    DropDownTree2.prototype.selectAll = function(state) {
      this.selectAllItems(state);
    };
    DropDownTree2.prototype.showPopup = function() {
      if (!this.enabled || this.readonly || this.isPopupOpen) {
        return;
      }
      this.renderPopup();
      this.focusIn();
    };
    DropDownTree2.prototype.getModuleName = function() {
      return "dropdowntree";
    };
    __decorate83([Property2("The Request Failed")], DropDownTree2.prototype, "actionFailureTemplate", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "allowFiltering", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "allowMultiSelection", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "changeOnBlur", void 0);
    __decorate83([Property2("")], DropDownTree2.prototype, "cssClass", void 0);
    __decorate83([Property2("${value.length} item(s) selected")], DropDownTree2.prototype, "customTemplate", void 0);
    __decorate83([Property2(",")], DropDownTree2.prototype, "delimiterChar", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "enabled", void 0);
    __decorate83([Complex2({}, Fields)], DropDownTree2.prototype, "fields", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "filterBarPlaceholder", void 0);
    __decorate83([Property2("StartsWith")], DropDownTree2.prototype, "filterType", void 0);
    __decorate83([Property2("Never")], DropDownTree2.prototype, "floatLabelType", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "footerTemplate", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "ignoreAccent", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "ignoreCase", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "headerTemplate", void 0);
    __decorate83([Property2({})], DropDownTree2.prototype, "htmlAttributes", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "itemTemplate", void 0);
    __decorate83([Property2("Default")], DropDownTree2.prototype, "mode", void 0);
    __decorate83([Property2("No Records Found")], DropDownTree2.prototype, "noRecordsTemplate", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "placeholder", void 0);
    __decorate83([Property2("300px")], DropDownTree2.prototype, "popupHeight", void 0);
    __decorate83([Property2("100%")], DropDownTree2.prototype, "popupWidth", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "readonly", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "showSelectAll", void 0);
    __decorate83([Property2("Select All")], DropDownTree2.prototype, "selectAllText", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "showCheckBox", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "destroyPopupOnHide", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "enableHtmlSanitizer", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "showClearButton", void 0);
    __decorate83([Property2(true)], DropDownTree2.prototype, "showDropDownIcon", void 0);
    __decorate83([Property2("None")], DropDownTree2.prototype, "sortOrder", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "text", void 0);
    __decorate83([Complex2({}, TreeSettings)], DropDownTree2.prototype, "treeSettings", void 0);
    __decorate83([Property2("Unselect All")], DropDownTree2.prototype, "unSelectAllText", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "value", void 0);
    __decorate83([Property2(null)], DropDownTree2.prototype, "valueTemplate", void 0);
    __decorate83([Property2("100%")], DropDownTree2.prototype, "width", void 0);
    __decorate83([Property2(1e3)], DropDownTree2.prototype, "zIndex", void 0);
    __decorate83([Property2(false)], DropDownTree2.prototype, "wrapText", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "actionFailure", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "beforeOpen", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "change", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "close", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "blur", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "created", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "dataBound", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "destroyed", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "filtering", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "focus", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "keyPress", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "open", void 0);
    __decorate83([Event3()], DropDownTree2.prototype, "select", void 0);
    DropDownTree2 = __decorate83([NotifyPropertyChanges2], DropDownTree2);
    return DropDownTree2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/combo-box/combo-box.js
var __extends86 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate84 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SPINNER_CLASS = "e-atc-spinner-icon";
dropDownListClasses.root = "e-combobox";
var inputObject2 = {
  container: null,
  buttons: []
};
var ComboBox = (
  /** @class */
  function(_super) {
    __extends86(ComboBox2, _super);
    function ComboBox2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    ComboBox2.prototype.preRender = function() {
      _super.prototype.preRender.call(this);
    };
    ComboBox2.prototype.getLocaleName = function() {
      return "combo-box";
    };
    ComboBox2.prototype.wireEvent = function() {
      if (this.getModuleName() === "combobox") {
        EventHandler2.add(this.inputWrapper.buttons[0], "mousedown", this.preventBlur, this);
        EventHandler2.add(this.inputWrapper.container, "blur", this.onBlurHandler, this);
      }
      if (!isNullOrUndefined2(this.inputWrapper.buttons[0])) {
        EventHandler2.add(this.inputWrapper.buttons[0], "mousedown", this.dropDownClick, this);
      }
      EventHandler2.add(this.inputElement, "focus", this.targetFocus, this);
      if (!this.readonly) {
        EventHandler2.add(this.inputElement, "input", this.onInput, this);
        EventHandler2.add(this.inputElement, "keyup", this.onFilterUp, this);
        EventHandler2.add(this.inputElement, "keydown", this.onFilterDown, this);
        EventHandler2.add(this.inputElement, "paste", this.pasteHandler, this);
        EventHandler2.add(window, "resize", this.windowResize, this);
      }
      this.bindCommonEvent();
    };
    ComboBox2.prototype.preventBlur = function(e) {
      if (!this.allowFiltering && document.activeElement !== this.inputElement && !document.activeElement.classList.contains(dropDownListClasses.input) && Browser2.isDevice || !Browser2.isDevice) {
        e.preventDefault();
      }
    };
    ComboBox2.prototype.onBlurHandler = function(e) {
      var inputValue = this.inputElement && this.inputElement.value === "" ? null : this.inputElement && this.inputElement.value;
      if (!isNullOrUndefined2(this.listData) && !isNullOrUndefined2(inputValue) && inputValue !== this.text) {
        this.customValue(e);
      }
      _super.prototype.onBlurHandler.call(this, e);
    };
    ComboBox2.prototype.targetElement = function() {
      return this.inputElement;
    };
    ComboBox2.prototype.setOldText = function(text) {
      Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
      this.customValue();
      this.removeSelection();
    };
    ComboBox2.prototype.setOldValue = function(value) {
      if (this.allowCustom) {
        this.selectedLI = this.getElementByValue(this.value);
        this.valueMuteChange(this.value);
      } else {
        this.valueMuteChange(null);
      }
      this.removeSelection();
      this.setHiddenValue();
    };
    ComboBox2.prototype.valueMuteChange = function(value) {
      value = this.allowObjectBinding && !isNullOrUndefined2(value) ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
      var inputValue = isNullOrUndefined2(value) ? null : value.toString();
      Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);
      var changeData = {};
      if (this.allowObjectBinding) {
        value = this.getDataByValue(value);
        if (isNullOrUndefined2(value)) {
          var fields_1 = this.fields;
          var isvalidTextField_1 = false;
          var isValidValue_1 = false;
          if (this.allowObjectBinding) {
            var keys4 = Object.keys(this.value);
            keys4.forEach(function(key) {
              if (key === fields_1.value) {
                isValidValue_1 = true;
                return;
              }
            });
            keys4.forEach(function(key) {
              if (key === fields_1.text) {
                isvalidTextField_1 = true;
                return;
              }
            });
          }
          changeData = {
            text: isValidValue_1 ? isvalidTextField_1 ? getValue2(fields_1.text, this.value) : getValue2(fields_1.value, this.value) : null,
            value: isValidValue_1 ? this.value : null,
            index: null
          };
        }
      }
      if (this.allowObjectBinding) {
        this.setProperties(changeData, true);
      } else {
        this.setProperties({
          value,
          text: value ? value.toString() : value,
          index: null
        }, true);
      }
      this.activeIndex = this.index;
      var fields = this.fields;
      var dataItem = {};
      dataItem[fields.text] = isNullOrUndefined2(value) ? null : value.toString();
      dataItem[fields.value] = isNullOrUndefined2(value) ? null : value.toString();
      this.itemData = dataItem;
      this.item = null;
      if (!this.allowObjectBinding && this.previousValue !== this.value || this.allowObjectBinding && this.previousValue && this.value && !this.isObjectInArray(this.previousValue, [this.value])) {
        this.detachChangeEvent(null);
      }
    };
    ComboBox2.prototype.updateValues = function() {
      if (this.fields.disabled) {
        if (this.value != null) {
          this.value = !this.isDisableItemValue(this.value) ? this.value : null;
        }
        if (this.text != null) {
          this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
        }
        if (this.index != null) {
          this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
          this.activeIndex = this.index;
        }
      }
      if (!isNullOrUndefined2(this.value)) {
        var currentValue = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
        var li = this.getElementByValue(currentValue);
        var doesItemExist = !isNullOrUndefined2(li) ? true : false;
        if (this.enableVirtualization && this.value) {
          var fields = this.fields.value ? this.fields.value : "";
          var currentValue_1 = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
          if (this.dataSource instanceof DataManager) {
            var getItem = new DataManager(this.virtualGroupDataSource).executeLocal(new Query().where(new Predicate(fields, "equal", currentValue_1)));
            if (getItem && getItem.length > 0) {
              this.itemData = getItem[0];
              doesItemExist = true;
              var dataItem = this.getItemData();
              var value = this.allowObjectBinding ? this.getDataByValue(dataItem.value) : dataItem.value;
              if (this.value === dataItem.value && this.text !== dataItem.text || this.value !== dataItem.value && this.text === dataItem.text) {
                this.setProperties({
                  "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
                  "value": value
                });
              }
            }
          } else {
            var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, "equal", currentValue_1)));
            if (getItem && getItem.length > 0) {
              this.itemData = getItem[0];
              doesItemExist = true;
              var dataItem = this.getItemData();
              var value = this.allowObjectBinding ? this.getDataByValue(dataItem.value) : dataItem.value;
              if (this.value === dataItem.value && this.text !== dataItem.text || this.value !== dataItem.value && this.text === dataItem.text) {
                this.setProperties({
                  "text": dataItem.text ? dataItem.text.toString() : dataItem.text,
                  "value": value
                });
              }
            }
          }
        }
        if (li) {
          this.setSelection(li, null);
        } else if (!this.enableVirtualization && this.allowCustom || this.allowCustom && this.enableVirtualization && !doesItemExist) {
          this.valueMuteChange(this.value);
        } else if (!this.enableVirtualization || this.enableVirtualization && !doesItemExist) {
          this.valueMuteChange(null);
        }
      } else if (this.text && isNullOrUndefined2(this.value)) {
        var li = this.getElementByText(this.text);
        if (li) {
          this.setSelection(li, null);
        } else {
          Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
          this.customValue();
        }
      } else {
        this.setSelection(this.liCollections[this.activeIndex], null);
      }
      this.setHiddenValue();
      Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
    };
    ComboBox2.prototype.updateIconState = function() {
      if (this.showClearButton) {
        if (this.inputElement && this.inputElement.value !== "" && !this.readonly) {
          removeClass2([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
        } else {
          addClass2([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
        }
      }
    };
    ComboBox2.prototype.getAriaAttributes = function() {
      var ariaAttributes = {
        "role": "combobox",
        "aria-autocomplete": "both",
        "aria-labelledby": this.hiddenElement.id,
        "aria-expanded": "false",
        "aria-readonly": this.readonly ? this.readonly.toString() : "false",
        "autocomplete": "off",
        "autocapitalize": "off",
        "spellcheck": "false"
      };
      return ariaAttributes;
    };
    ComboBox2.prototype.searchLists = function(e) {
      this.isTyped = true;
      if (this.isFiltering()) {
        _super.prototype.searchLists.call(this, e);
        if (this.ulElement && this.filterInput.value.trim() === "") {
          this.setHoverList(this.ulElement.querySelector("." + dropDownListClasses.li));
        }
      } else {
        if (this.ulElement && this.inputElement.value === "" && this.preventAutoFill) {
          this.setHoverList(this.ulElement.querySelector("." + dropDownListClasses.li));
        }
        this.incrementalSearch(e);
      }
    };
    ComboBox2.prototype.getNgDirective = function() {
      return "EJS-COMBOBOX";
    };
    ComboBox2.prototype.setSearchBox = function() {
      this.filterInput = this.inputElement;
      var searchBoxContainer = this.isFiltering() || this.isReact && this.getModuleName() === "combobox" ? this.inputWrapper : inputObject2;
      return searchBoxContainer;
    };
    ComboBox2.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
      var _this = this;
      _super.prototype.onActionComplete.call(this, ulElement, list, e);
      if (this.isSelectCustom) {
        this.removeSelection();
      }
      if (!this.preventAutoFill && this.getModuleName() === "combobox" && this.isTyped && !this.enableVirtualization) {
        setTimeout(function() {
          _this.inlineSearch();
        });
      }
    };
    ComboBox2.prototype.getFocusElement = function() {
      var dataItem = this.isSelectCustom ? {
        text: ""
      } : this.getItemData();
      var selected = !isNullOrUndefined2(this.list) ? this.list.querySelector("." + dropDownListClasses.selected) : this.list;
      var isSelected = dataItem.text && dataItem.text.toString() === this.inputElement.value && !isNullOrUndefined2(selected);
      if (isSelected) {
        return selected;
      }
      if ((Browser2.isDevice && !this.isDropDownClick || !Browser2.isDevice) && !isNullOrUndefined2(this.liCollections) && this.liCollections.length > 0) {
        var inputValue = this.inputElement.value;
        var dataSource = this.sortedData;
        var type = this.typeOfData(dataSource).typeof;
        var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type, this.ignoreAccent);
        if (this.enableVirtualization && inputValue !== "" && this.getModuleName() !== "autocomplete" && this.isTyped && !this.allowFiltering) {
          var updatingincrementalindex = false;
          var isEndIndexValid = this.viewPortInfo.endIndex >= this.incrementalEndIndex && this.incrementalEndIndex <= this.totalItemCount;
          var isIncrementalEndIndexZero = this.incrementalEndIndex === 0;
          if (isEndIndexValid || isIncrementalEndIndexZero) {
            updatingincrementalindex = true;
            this.incrementalStartIndex = this.incrementalEndIndex;
            if (isIncrementalEndIndexZero) {
              this.incrementalEndIndex = Math.min(100, this.totalItemCount);
            } else {
              this.incrementalEndIndex = Math.min(this.incrementalEndIndex + 100, this.totalItemCount);
            }
            this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
            updatingincrementalindex = true;
          }
          if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
            this.updateIncrementalView(0, this.itemCount);
          }
          activeItem = Search(inputValue, this.incrementalLiCollections, this.filterType, true, dataSource, this.fields, type);
          while (isNullOrUndefined2(activeItem.item) && this.incrementalEndIndex < this.totalItemCount) {
            this.incrementalStartIndex = this.incrementalEndIndex;
            this.incrementalEndIndex = this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100;
            this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
            updatingincrementalindex = true;
            if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
              this.updateIncrementalView(0, this.itemCount);
            }
            activeItem = Search(inputValue, this.incrementalLiCollections, this.filterType, true, dataSource, this.fields, type);
            if (!isNullOrUndefined2(activeItem)) {
              activeItem.index = activeItem.index + this.incrementalStartIndex;
              break;
            }
            if (isNullOrUndefined2(activeItem) && this.incrementalEndIndex >= this.totalItemCount) {
              this.incrementalStartIndex = 0;
              this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;
              break;
            }
          }
          var startIndex = activeItem.index - (this.itemCount / 2 - 2) > 0 ? activeItem.index - (this.itemCount / 2 - 2) : 0;
          var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
          if (startIndex !== this.viewPortInfo.startIndex) {
            this.updateIncrementalView(startIndex, endIndex);
          }
          if (!isNullOrUndefined2(activeItem.item)) {
            var startIndex_1 = this.viewPortInfo.startIndex + (this.itemCount / 2 - 2) < this.totalItemCount ? this.viewPortInfo.startIndex + (this.itemCount / 2 - 2) : this.totalItemCount;
            var endIndex_1 = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
            this.updateIncrementalView(startIndex_1, endIndex_1);
            activeItem.item = this.getElementByValue(activeItem.item.getAttribute("data-value"));
          } else {
            this.updateIncrementalView(0, this.itemCount);
            this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
            this.list.scrollTop = 0;
          }
          if (activeItem && activeItem.item) {
            activeItem.item = this.getElementByValue(activeItem.item.getAttribute("data-value"));
          }
        }
        var activeElement = activeItem.item;
        if (!isNullOrUndefined2(activeElement)) {
          var count = this.getIndexByValue(activeElement.getAttribute("data-value")) - 1;
          var height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue("height"), 10);
          if (!isNaN(height) && this.getModuleName() !== "autocomplete") {
            this.removeFocus();
            var fixedHead = this.fields.groupBy ? this.liCollections[0].offsetHeight : 0;
            if (!this.enableVirtualization) {
              this.list.scrollTop = count * height + fixedHead;
            } else {
              var virtualContent = this.list.getElementsByClassName("e-virtual-ddl-content")[0];
              virtualContent.style = this.getTransformValues();
              if (this.enableVirtualization && !this.fields.groupBy) {
                var selectedLiOffsetTop = activeElement.offsetTop;
                var virtualListInfoStartIndex = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex : 0;
                var virtualListHeight = activeElement.offsetHeight;
                var selectedLiOffsetTopWithStartIndex = selectedLiOffsetTop + virtualListInfoStartIndex * virtualListHeight;
                var virtualListLength = this.list.querySelectorAll(".e-virtual-list").length;
                var scrollTopOffset = virtualListLength * virtualListHeight;
                this.list.scrollTop = selectedLiOffsetTopWithStartIndex - scrollTopOffset;
              }
            }
            addClass2([activeElement], dropDownListClasses.focus);
          }
        } else {
          if (this.isSelectCustom && this.inputElement.value.trim() !== "") {
            this.removeFocus();
            if (!this.enableVirtualization) {
              this.list.scrollTop = 0;
            }
          }
        }
        return activeElement;
      } else {
        return null;
      }
    };
    ComboBox2.prototype.setValue = function(e) {
      if (e && e.type === "keydown" && e.action === "enter" || e && e.type === "click") {
        this.removeFillSelection();
      }
      if (this.autofill && this.getModuleName() === "combobox" && e && e.type === "keydown" && e.action !== "enter") {
        this.preventAutoFill = false;
        this.inlineSearch(e);
        return false;
      } else {
        return _super.prototype.setValue.call(this, e);
      }
    };
    ComboBox2.prototype.checkCustomValue = function() {
      var value = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
      this.itemData = this.getDataByValue(value);
      var dataItem = this.getItemData();
      var setValue5 = this.allowObjectBinding ? this.itemData : dataItem.value;
      if (!(this.allowCustom && isNullOrUndefined2(dataItem.value) && isNullOrUndefined2(dataItem.text))) {
        this.setProperties({
          "value": setValue5
        }, !this.allowCustom);
      }
    };
    ComboBox2.prototype.showSpinner = function() {
      if (isNullOrUndefined2(this.spinnerElement)) {
        this.spinnerElement = this.getModuleName() === "autocomplete" ? this.inputWrapper.buttons[0] || this.inputWrapper.clearButton || Input.appendSpan("e-input-group-icon " + SPINNER_CLASS, this.inputWrapper.container, this.createElement) : this.inputWrapper.buttons[0] || this.inputWrapper.clearButton;
        addClass2([this.spinnerElement], dropDownListClasses.disableIcon);
        createSpinner({
          target: this.spinnerElement,
          width: Browser2.isDevice ? "16px" : "14px"
        }, this.createElement);
        showSpinner(this.spinnerElement);
      }
    };
    ComboBox2.prototype.hideSpinner = function() {
      if (!isNullOrUndefined2(this.spinnerElement)) {
        hideSpinner(this.spinnerElement);
        removeClass2([this.spinnerElement], dropDownListClasses.disableIcon);
        if (this.spinnerElement.classList.contains(SPINNER_CLASS)) {
          detach2(this.spinnerElement);
        } else {
          this.spinnerElement.innerHTML = "";
        }
        this.spinnerElement = null;
      }
    };
    ComboBox2.prototype.setAutoFill = function(activeElement, isHover) {
      if (!isHover) {
        this.setHoverList(activeElement);
      }
      if (this.autofill && !this.preventAutoFill) {
        var currentValue = this.getTextByValue(activeElement.getAttribute("data-value")).toString();
        var currentFillValue = this.getFormattedValue(activeElement.getAttribute("data-value"));
        if (this.getModuleName() === "combobox") {
          if (!this.isSelected && !this.allowObjectBinding && this.previousValue !== currentFillValue || this.allowObjectBinding && this.previousValue && currentFillValue && !this.isObjectInArray(this.previousValue, [this.getDataByValue(currentFillValue)])) {
            this.updateSelectedItem(activeElement, null);
            this.isSelected = true;
            this.previousValue = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(activeElement.getAttribute("data-value"))) : this.getFormattedValue(activeElement.getAttribute("data-value"));
          } else {
            this.updateSelectedItem(activeElement, null, true);
          }
        }
        if (!this.isAndroidAutoFill(currentValue)) {
          this.setAutoFillSelection(currentValue, isHover);
        }
      }
    };
    ComboBox2.prototype.isAndroidAutoFill = function(value) {
      if (Browser2.isAndroid) {
        var currentPoints = this.getSelectionPoints();
        var prevEnd = this.prevSelectPoints.end;
        var curEnd = currentPoints.end;
        var prevStart = this.prevSelectPoints.start;
        var curStart = currentPoints.start;
        if (prevEnd !== 0 && (prevEnd === value.length && prevStart === value.length || prevStart > curStart && prevEnd > curEnd || prevEnd === curEnd && prevStart === curStart)) {
          return true;
        } else {
          return false;
        }
      } else {
        return false;
      }
    };
    ComboBox2.prototype.clearAll = function(e, property) {
      if (isNullOrUndefined2(property) || !isNullOrUndefined2(property) && isNullOrUndefined2(property.dataSource)) {
        _super.prototype.clearAll.call(this, e);
      }
      if (this.isFiltering() && !isNullOrUndefined2(e) && e.target === this.inputWrapper.clearButton) {
        this.typedString = this.filterInput.value;
        this.searchLists(e);
      }
    };
    ComboBox2.prototype.isSelectFocusItem = function(element2) {
      return !isNullOrUndefined2(element2);
    };
    ComboBox2.prototype.inlineSearch = function(e) {
      var isKeyNavigate = e && (e.action === "down" || e.action === "up" || e.action === "home" || e.action === "end" || e.action === "pageUp" || e.action === "pageDown");
      var activeElement = isKeyNavigate ? this.liCollections[this.activeIndex] : this.getFocusElement();
      if (!isNullOrUndefined2(activeElement)) {
        if (!isKeyNavigate) {
          var value = this.getFormattedValue(activeElement.getAttribute("data-value"));
          this.activeIndex = this.getIndexByValue(value);
          this.activeIndex = !isNullOrUndefined2(this.activeIndex) ? this.activeIndex : null;
        }
        this.preventAutoFill = this.inputElement.value === "" ? false : this.preventAutoFill;
        this.setAutoFill(activeElement, isKeyNavigate);
      } else if (!isNullOrUndefined2(this.inputElement) && this.inputElement.value === "") {
        this.activeIndex = null;
        if (!isNullOrUndefined2(this.list)) {
          if (!this.enableVirtualization) {
            this.list.scrollTop = 0;
          }
          var focusItem = this.list.querySelector("." + dropDownListClasses.li);
          this.setHoverList(focusItem);
        }
      } else {
        this.activeIndex = null;
        this.removeSelection();
        if (this.liCollections && this.liCollections.length > 0 && !this.isCustomFilter) {
          this.removeFocus();
        }
      }
    };
    ComboBox2.prototype.incrementalSearch = function(e) {
      this.showPopup(e);
      if (!isNullOrUndefined2(this.listData)) {
        this.inlineSearch(e);
        e.preventDefault();
      }
    };
    ComboBox2.prototype.setAutoFillSelection = function(currentValue, isKeyNavigate) {
      if (isKeyNavigate === void 0) {
        isKeyNavigate = false;
      }
      var selection = this.getSelectionPoints();
      var value = this.inputElement.value.substr(0, selection.start);
      if (value && value.toLowerCase() === currentValue.substr(0, selection.start).toLowerCase()) {
        var inputValue = value + currentValue.substr(value.length, currentValue.length);
        Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);
        this.inputElement.setSelectionRange(selection.start, this.inputElement.value.length);
      } else if (isKeyNavigate) {
        Input.setValue(currentValue, this.inputElement, this.floatLabelType, this.showClearButton);
        this.inputElement.setSelectionRange(0, this.inputElement.value.length);
      }
    };
    ComboBox2.prototype.getValueByText = function(text) {
      return _super.prototype.getValueByText.call(this, text, true, this.ignoreAccent);
    };
    ComboBox2.prototype.unWireEvent = function() {
      if (this.getModuleName() === "combobox") {
        EventHandler2.remove(this.inputWrapper.buttons[0], "mousedown", this.preventBlur);
        EventHandler2.remove(this.inputWrapper.container, "blur", this.onBlurHandler);
      }
      if (!isNullOrUndefined2(this.inputWrapper.buttons[0])) {
        EventHandler2.remove(this.inputWrapper.buttons[0], "mousedown", this.dropDownClick);
      }
      if (this.inputElement) {
        EventHandler2.remove(this.inputElement, "focus", this.targetFocus);
        if (!this.readonly) {
          EventHandler2.remove(this.inputElement, "input", this.onInput);
          EventHandler2.remove(this.inputElement, "keyup", this.onFilterUp);
          EventHandler2.remove(this.inputElement, "keydown", this.onFilterDown);
          EventHandler2.remove(this.inputElement, "paste", this.pasteHandler);
          EventHandler2.remove(window, "resize", this.windowResize);
        }
      }
      this.unBindCommonEvent();
    };
    ComboBox2.prototype.setSelection = function(li, e) {
      _super.prototype.setSelection.call(this, li, e);
      if (!isNullOrUndefined2(li) && !this.autofill && !this.isDropDownClick) {
        this.removeFocus();
      }
    };
    ComboBox2.prototype.selectCurrentItem = function(e) {
      var li;
      if (this.isPopupOpen) {
        if (this.isSelected) {
          li = this.list.querySelector("." + dropDownListClasses.selected);
        } else {
          li = this.list.querySelector("." + dropDownListClasses.focus);
        }
        if (this.isDisabledElement(li)) {
          return;
        }
        if (li) {
          this.setSelection(li, e);
          this.isTyped = false;
        }
        if (this.isSelected) {
          this.isSelectCustom = false;
          this.onChangeEvent(e);
        }
      }
      if (e.action === "enter" && this.inputElement.value === "") {
        this.clearAll(e);
      } else if (this.isTyped && !this.isSelected && isNullOrUndefined2(li)) {
        this.customValue(e);
      }
      this.hidePopup(e);
    };
    ComboBox2.prototype.setHoverList = function(li) {
      this.removeSelection();
      if (this.isValidLI(li) && !li.classList.contains(dropDownListClasses.selected)) {
        this.removeFocus();
        li.classList.add(dropDownListClasses.focus);
      }
    };
    ComboBox2.prototype.targetFocus = function(e) {
      if (Browser2.isDevice && !this.allowFiltering) {
        this.preventFocus = false;
      }
      this.onFocus(e);
      Input.calculateWidth(this.inputElement, this.inputWrapper.container);
    };
    ComboBox2.prototype.dropDownClick = function(e) {
      e.preventDefault();
      if (Browser2.isDevice && !this.isFiltering()) {
        this.preventFocus = true;
      }
      _super.prototype.dropDownClick.call(this, e);
    };
    ComboBox2.prototype.customValue = function(e) {
      var _this = this;
      var value = this.getValueByText(this.inputElement.value);
      if (!this.allowCustom && this.inputElement.value !== "") {
        var previousValue = this.previousValue;
        var currentValue = this.value;
        value = this.allowObjectBinding ? this.getDataByValue(value) : value;
        this.setProperties({
          value
        });
        if (isNullOrUndefined2(this.value)) {
          Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton);
        }
        if (this.autofill && (!this.allowObjectBinding && previousValue === this.value || this.allowObjectBinding && previousValue && this.isObjectInArray(previousValue, [this.value])) && (!this.allowObjectBinding && currentValue !== this.value || this.allowObjectBinding && currentValue && !this.isObjectInArray(currentValue, [this.value]))) {
          this.onChangeEvent(null);
        }
      } else if (this.inputElement.value !== "") {
        var previousValue_1 = this.value;
        if (isNullOrUndefined2(value)) {
          var value_1 = this.inputElement.value === "" ? null : this.inputElement.value;
          var eventArgs = {
            text: value_1,
            item: {}
          };
          this.isObjectCustomValue = true;
          if (!this.initial) {
            this.trigger("customValueSpecifier", eventArgs, function(eventArgs2) {
              _this.updateCustomValueCallback(value_1, eventArgs2, previousValue_1, e);
            });
          } else {
            this.updateCustomValueCallback(value_1, eventArgs, previousValue_1);
          }
        } else {
          this.isSelectCustom = false;
          value = this.allowObjectBinding ? this.getDataByValue(value) : value;
          this.setProperties({
            value
          });
          if (!this.allowObjectBinding && previousValue_1 !== this.value || this.allowObjectBinding && previousValue_1 && this.value && !this.isObjectInArray(previousValue_1, [this.value])) {
            this.onChangeEvent(e);
          }
        }
      } else if (this.allowCustom && this.isFocused) {
        this.isSelectCustom = true;
      }
    };
    ComboBox2.prototype.updateCustomValueCallback = function(value, eventArgs, previousValue, e) {
      var _this = this;
      var fields = this.fields;
      var item = eventArgs.item;
      var dataItem = {};
      if (item && getValue2(fields.text, item) && getValue2(fields.value, item)) {
        dataItem = item;
      } else {
        setValue3(fields.text, value, dataItem);
        setValue3(fields.value, value, dataItem);
      }
      this.itemData = dataItem;
      var emptyObject = {};
      if (this.allowObjectBinding) {
        var keys4 = this.listData && this.listData.length > 0 ? Object.keys(this.listData[0]) : Object.keys(this.itemData);
        if (!(this.listData && this.listData.length > 0) && (this.getModuleName() === "autocomplete" || this.getModuleName() === "combobox" && this.allowFiltering)) {
          keys4 = this.firstItem ? Object.keys(this.firstItem) : Object.keys(this.itemData);
        }
        keys4.forEach(function(key) {
          emptyObject[key] = key === fields.value || key === fields.text ? getValue2(fields.value, _this.itemData) : null;
        });
      }
      var changeData = {
        text: getValue2(fields.text, this.itemData),
        value: this.allowObjectBinding ? emptyObject : getValue2(fields.value, this.itemData),
        index: null
      };
      this.setProperties(changeData, true);
      this.setSelection(null, null);
      this.isSelectCustom = true;
      this.isObjectCustomValue = false;
      if (!this.allowObjectBinding && previousValue !== this.value || this.allowObjectBinding && (previousValue == null && this.value !== null || previousValue && !this.isObjectInArray(previousValue, [this.value]))) {
        this.onChangeEvent(e, true);
      }
    };
    ComboBox2.prototype.onPropertyChanged = function(newProp, oldProp) {
      if (this.getModuleName() === "combobox") {
        this.checkData(newProp);
        this.setUpdateInitial(["fields", "query", "dataSource"], newProp, oldProp);
      }
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "readonly":
            Input.setReadonly(this.readonly, this.inputElement);
            if (this.readonly) {
              EventHandler2.remove(this.inputElement, "input", this.onInput);
              EventHandler2.remove(this.inputElement, "keyup", this.onFilterUp);
              EventHandler2.remove(this.inputElement, "keydown", this.onFilterDown);
            } else {
              EventHandler2.add(this.inputElement, "input", this.onInput, this);
              EventHandler2.add(this.inputElement, "keyup", this.onFilterUp, this);
              EventHandler2.add(this.inputElement, "keydown", this.onFilterDown, this);
            }
            this.setReadOnly();
            break;
          case "allowFiltering":
            this.setSearchBox();
            if (this.isFiltering() && this.getModuleName() === "combobox" && isNullOrUndefined2(this.list)) {
              _super.prototype.renderList.call(this);
            }
            break;
          case "allowCustom":
            break;
          default: {
            var comboProps = this.getPropObject(prop, newProp, oldProp);
            _super.prototype.onPropertyChanged.call(this, comboProps.newProperty, comboProps.oldProperty);
            if (this.isFiltering() && prop === "dataSource" && isNullOrUndefined2(this.list) && this.itemTemplate && this.getModuleName() === "combobox") {
              _super.prototype.renderList.call(this);
            }
            break;
          }
        }
      }
    };
    ComboBox2.prototype.render = function() {
      _super.prototype.render.call(this);
      this.setSearchBox();
      this.renderComplete();
      this.autoFill = this.autofill;
    };
    ComboBox2.prototype.getModuleName = function() {
      return "combobox";
    };
    ComboBox2.prototype.addItem = function(items, itemIndex) {
      _super.prototype.addItem.call(this, items, itemIndex);
    };
    ComboBox2.prototype.filter = function(dataSource, query, fields) {
      _super.prototype.filter.call(this, dataSource, query, fields);
    };
    ComboBox2.prototype.showPopup = function(e) {
      _super.prototype.showPopup.call(this, e);
    };
    ComboBox2.prototype.hidePopup = function(e) {
      var inputValue = this.inputElement && this.inputElement.value === "" ? null : this.inputElement && this.inputElement.value;
      if (!isNullOrUndefined2(this.listData)) {
        var isEscape = this.isEscapeKey;
        if (this.isEscapeKey) {
          Input.setValue(this.typedString, this.inputElement, this.floatLabelType, this.showClearButton);
          this.isEscapeKey = false;
        }
        if (this.autofill) {
          this.removeFillSelection();
        }
        var dataItem = this.isSelectCustom ? {
          text: ""
        } : this.getItemData();
        var selected = !isNullOrUndefined2(this.list) ? this.list.querySelector("." + dropDownListClasses.selected) : null;
        if (this.inputElement && dataItem.text === this.inputElement.value && !isNullOrUndefined2(selected)) {
          if (this.isSelected) {
            this.onChangeEvent(e);
            this.isSelectCustom = false;
          }
          _super.prototype.hidePopup.call(this, e);
          return;
        }
        if (this.getModuleName() === "combobox" && this.inputElement.value.trim() !== "") {
          var dataSource = this.sortedData;
          var type = this.typeOfData(dataSource).typeof;
          var searchItem = Search(this.inputElement.value, this.liCollections, "Equal", true, dataSource, this.fields, type);
          this.selectedLI = searchItem.item;
          if (isNullOrUndefined2(searchItem.index)) {
            searchItem.index = Search(this.inputElement.value, this.liCollections, "StartsWith", true, dataSource, this.fields, type).index;
          }
          this.activeIndex = searchItem.index;
          if (!isNullOrUndefined2(this.selectedLI)) {
            this.updateSelectedItem(this.selectedLI, null, true);
          } else if (isEscape) {
            this.isSelectCustom = true;
            this.removeSelection();
          }
        }
        if (!this.isEscapeKey && this.isTyped && !this.isInteracted) {
          this.customValue(e);
        }
      }
      var value = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
      if (isNullOrUndefined2(this.listData) && this.allowCustom && !isNullOrUndefined2(inputValue) && inputValue !== value) {
        this.customValue();
      }
      _super.prototype.hidePopup.call(this, e);
    };
    ComboBox2.prototype.focusIn = function() {
      if (!this.enabled) {
        return;
      }
      if (Browser2.isDevice && !this.isFiltering()) {
        this.preventFocus = true;
      }
      _super.prototype.focusIn.call(this);
    };
    ComboBox2.prototype.clear = function() {
      this.value = null;
    };
    ComboBox2.prototype.focusOut = function(e) {
      _super.prototype.focusOut.call(this, e);
    };
    ComboBox2.prototype.getItems = function() {
      return _super.prototype.getItems.call(this);
    };
    ComboBox2.prototype.getDataByValue = function(value) {
      return _super.prototype.getDataByValue.call(this, value);
    };
    ComboBox2.prototype.renderHightSearch = function() {
    };
    __decorate84([Property2(false)], ComboBox2.prototype, "autofill", void 0);
    __decorate84([Property2(true)], ComboBox2.prototype, "allowCustom", void 0);
    __decorate84([Property2({})], ComboBox2.prototype, "htmlAttributes", void 0);
    __decorate84([Property2(false)], ComboBox2.prototype, "allowFiltering", void 0);
    __decorate84([Property2(true)], ComboBox2.prototype, "isDeviceFullScreen", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "query", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "index", void 0);
    __decorate84([Property2(true)], ComboBox2.prototype, "showClearButton", void 0);
    __decorate84([Property2(false)], ComboBox2.prototype, "enableRtl", void 0);
    __decorate84([Event3()], ComboBox2.prototype, "customValueSpecifier", void 0);
    __decorate84([Event3()], ComboBox2.prototype, "filtering", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "valueTemplate", void 0);
    __decorate84([Property2("Never")], ComboBox2.prototype, "floatLabelType", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "filterBarPlaceholder", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "cssClass", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "headerTemplate", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "footerTemplate", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "placeholder", void 0);
    __decorate84([Property2("100%")], ComboBox2.prototype, "width", void 0);
    __decorate84([Property2("300px")], ComboBox2.prototype, "popupHeight", void 0);
    __decorate84([Property2("100%")], ComboBox2.prototype, "popupWidth", void 0);
    __decorate84([Property2(false)], ComboBox2.prototype, "readonly", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "text", void 0);
    __decorate84([Property2(null)], ComboBox2.prototype, "value", void 0);
    __decorate84([Property2(false)], ComboBox2.prototype, "allowObjectBinding", void 0);
    ComboBox2 = __decorate84([NotifyPropertyChanges2], ComboBox2);
    return ComboBox2;
  }(DropDownList)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/auto-complete.js
var __extends87 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate85 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
dropDownListClasses.root = "e-autocomplete";
dropDownListClasses.icon = "e-input-group-icon e-ddl-icon e-search-icon";
var AutoComplete = (
  /** @class */
  function(_super) {
    __extends87(AutoComplete2, _super);
    function AutoComplete2(options, element2) {
      var _this_1 = _super.call(this, options, element2) || this;
      _this_1.isFiltered = false;
      _this_1.searchList = false;
      return _this_1;
    }
    AutoComplete2.prototype.preRender = function() {
      _super.prototype.preRender.call(this);
    };
    AutoComplete2.prototype.getLocaleName = function() {
      return "auto-complete";
    };
    AutoComplete2.prototype.getNgDirective = function() {
      return "EJS-AUTOCOMPLETE";
    };
    AutoComplete2.prototype.getQuery = function(query) {
      var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
      var value = this.allowObjectBinding && !isNullOrUndefined2(this.value) ? getValue2(this.fields.value ? this.fields.value : "", this.value) : this.value;
      var filterType = this.queryString === "" && !isNullOrUndefined2(value) ? "equal" : this.filterType;
      var queryString2 = this.queryString === "" && !isNullOrUndefined2(value) ? value : this.queryString;
      if (this.isFiltered) {
        if (this.enableVirtualization && !isNullOrUndefined2(this.customFilterQuery)) {
          filterQuery = this.customFilterQuery.clone();
        } else if (!this.enableVirtualization) {
          return filterQuery;
        }
      }
      if (this.queryString !== null && this.queryString !== "") {
        var dataType = this.typeOfData(this.dataSource).typeof;
        if (!(this.dataSource instanceof DataManager) && dataType === "string" || dataType === "number") {
          filterQuery.where("", filterType, queryString2, this.ignoreCase, this.ignoreAccent);
        } else {
          var mapping = !isNullOrUndefined2(this.fields.value) ? this.fields.value : "";
          filterQuery.where(mapping, filterType, queryString2, this.ignoreCase, this.ignoreAccent);
        }
      }
      if (!isNullOrUndefined2(this.suggestionCount) && !this.enableVirtualization) {
        if (this.suggestionCount !== 20) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onTake") {
              filterQuery.queries.splice(queryElements, 1);
            }
          }
        }
        filterQuery.take(this.suggestionCount);
      }
      if (this.enableVirtualization) {
        var queryTakeValue = 0;
        var querySkipValue = 0;
        var takeValue = this.getTakeValue();
        if (filterQuery && filterQuery.queries.length > 0) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onSkip") {
              querySkipValue = filterQuery.queries[queryElements].e.nos;
            }
            if (filterQuery.queries[queryElements].fn === "onTake") {
              queryTakeValue = takeValue <= filterQuery.queries[queryElements].e.nos ? filterQuery.queries[queryElements].e.nos : takeValue;
            }
          }
        }
        if (queryTakeValue <= 0 && this.query && this.query.queries.length > 0) {
          for (var queryElements = 0; queryElements < this.query.queries.length; queryElements++) {
            if (this.query.queries[queryElements].fn === "onTake") {
              var currentTakeValue = this.query.queries[queryElements].e.nos;
              queryTakeValue = takeValue <= currentTakeValue ? currentTakeValue : takeValue;
            }
          }
        }
        if (filterQuery && filterQuery.queries.length > 0) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onSkip") {
              querySkipValue = filterQuery.queries[queryElements].e.nos;
              filterQuery.queries.splice(queryElements, 1);
              --queryElements;
              continue;
            }
            if (filterQuery.queries[queryElements].fn === "onTake") {
              var currentQueryTakeValue = filterQuery.queries[queryElements].e.nos;
              queryTakeValue = currentQueryTakeValue <= queryTakeValue ? queryTakeValue : currentQueryTakeValue;
              filterQuery.queries.splice(queryElements, 1);
              --queryElements;
            }
          }
        }
        if (querySkipValue > 0 && this.virtualItemStartIndex <= querySkipValue) {
          filterQuery.skip(querySkipValue);
        } else {
          filterQuery.skip(this.virtualItemStartIndex);
        }
        if (queryTakeValue > 0 && takeValue <= queryTakeValue) {
          filterQuery.take(queryTakeValue);
        } else {
          filterQuery.take(takeValue);
        }
        filterQuery.requiresCount();
      }
      return filterQuery;
    };
    AutoComplete2.prototype.searchLists = function(e) {
      var _this_1 = this;
      this.isTyped = true;
      this.isDataFetched = this.isSelectCustom = false;
      this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
      this.checkAndResetCache();
      if (isNullOrUndefined2(this.list)) {
        _super.prototype.renderList.call(this, e, true);
      }
      this.queryString = this.filterInput.value;
      if (e.type !== "mousedown" && (e.keyCode === 40 || e.keyCode === 38)) {
        this.queryString = this.queryString === "" ? null : this.queryString;
        this.beforePopupOpen = true;
        this.resetList(this.dataSource, this.fields, null, e);
        return;
      }
      this.isSelected = false;
      this.activeIndex = null;
      this.isRequesting = false;
      var eventArgs = {
        preventDefaultAction: false,
        text: this.filterInput.value,
        updateData: function(dataSource, query, fields) {
          if (eventArgs.cancel) {
            return;
          }
          _this_1.isFiltered = true;
          _this_1.customFilterQuery = query;
          _this_1.filterAction(dataSource, query, fields);
        },
        cancel: false
      };
      this.trigger("filtering", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel && !_this_1.isFiltered && !eventArgs2.preventDefaultAction) {
          _this_1.searchList = true;
          _this_1.filterAction(_this_1.dataSource, null, _this_1.fields, e);
        }
      });
    };
    AutoComplete2.prototype.filter = function(dataSource, query, fields) {
      this.isFiltered = true;
      this.filterAction(dataSource, query, fields);
    };
    AutoComplete2.prototype.filterAction = function(dataSource, query, fields, e) {
      this.beforePopupOpen = true;
      var isNoDataElement = this.list.classList.contains("e-nodata");
      if (this.queryString !== "" && this.queryString.length >= this.minLength) {
        if (this.enableVirtualization && this.isFiltering() && this.isTyped) {
          this.isPreventScrollAction = true;
          this.list.scrollTop = 0;
          this.previousStartIndex = 0;
          this.virtualListInfo = null;
        }
        this.resetList(dataSource, fields, query, e);
        isNoDataElement = this.list.classList.contains("e-nodata");
        if (this.enableVirtualization && !isNoDataElement) {
          if (!this.list.querySelector(".e-virtual-ddl-content") && this.list.querySelector(".e-list-parent")) {
            var virtualElement = this.createElement("div", {
              className: "e-virtual-ddl-content",
              styles: this.getTransformValues()
            });
            this.list.appendChild(virtualElement).appendChild(this.list.querySelector(".e-list-parent"));
          }
          if (!this.list.querySelector(".e-virtual-ddl") && this.list.parentElement) {
            var virtualElement = this.createElement("div", {
              id: this.element.id + "_popup",
              className: "e-virtual-ddl",
              styles: this.GetVirtualTrackHeight()
            });
            this.list.parentElement.querySelector(".e-dropdownbase").appendChild(virtualElement);
          }
        }
        if (this.getModuleName() === "autocomplete" && !(this.dataSource instanceof DataManager) || this.getModuleName() === "autocomplete" && this.dataSource instanceof DataManager && this.totalItemCount !== 0) {
          this.getFilteringSkeletonCount();
        }
      } else {
        this.hidePopup(e);
        this.beforePopupOpen = false;
      }
      this.renderReactTemplates();
    };
    AutoComplete2.prototype.clearAll = function(e, property) {
      if (isNullOrUndefined2(property) || !isNullOrUndefined2(property) && isNullOrUndefined2(property.dataSource)) {
        _super.prototype.clearAll.call(this, e);
        this.checkAndResetCache();
      }
      if (this.beforePopupOpen) {
        this.hidePopup();
      }
    };
    AutoComplete2.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
      if (!this.enableVirtualization) {
        this.fixedHeaderElement = null;
      }
      if (this.getModuleName() === "autocomplete" && !(this.dataSource instanceof DataManager) || this.getModuleName() === "autocomplete" && this.dataSource instanceof DataManager && this.totalItemCount !== 0) {
        this.getFilteringSkeletonCount();
      }
      _super.prototype.onActionComplete.call(this, ulElement, list, e);
      var item = this.list.querySelector("." + dropDownListClasses.li);
      if (!isNullOrUndefined2(item)) {
        removeClass2([item], dropDownListClasses.focus);
      }
      if (!isNullOrUndefined2(this.itemData) && !this.enableVirtualization) {
        this.focusIndexItem();
      }
      this.postBackAction();
    };
    AutoComplete2.prototype.postBackAction = function() {
      if (this.autofill && !isNullOrUndefined2(this.liCollections[0]) && this.searchList) {
        var items = [this.liCollections[0]];
        var dataSource = this.listData;
        var type = this.typeOfData(dataSource).typeof;
        var searchItem = Search(this.inputElement.value, items, "StartsWith", this.ignoreCase, dataSource, this.fields, type);
        this.searchList = false;
        if (!isNullOrUndefined2(searchItem.item)) {
          _super.prototype.setAutoFill.call(this, this.liCollections[0], true);
        }
      }
    };
    AutoComplete2.prototype.setSelection = function(li, e) {
      if (!this.isValidLI(li)) {
        this.selectedLI = li;
        return;
      }
      if (!isNullOrUndefined2(e) && e.type === "keydown" && e.action !== "enter" && e.action !== "tab" && this.isValidLI(li)) {
        var value = this.getFormattedValue(li.getAttribute("data-value"));
        this.activeIndex = this.getIndexByValue(value);
        this.setHoverList(li);
        this.selectedLI = li;
        this.setScrollPosition(e);
        if (this.autofill && this.isPopupOpen) {
          this.preventAutoFill = false;
          var isKeyNavigate = e && e.action === "down" || e.action === "up" || e.action === "home" || e.action === "end" || e.action === "pageUp" || e.action === "pageDown";
          _super.prototype.setAutoFill.call(this, li, isKeyNavigate);
        }
      } else {
        _super.prototype.setSelection.call(this, li, e);
        this.isFiltered = false;
      }
    };
    AutoComplete2.prototype.listOption = function(dataSource, fieldsSettings) {
      var _this_1 = this;
      var fields = _super.prototype.listOption.call(this, dataSource, fieldsSettings);
      if (isNullOrUndefined2(fields.itemCreated)) {
        fields.itemCreated = function(e) {
          if (_this_1.highlight) {
            if (_this_1.element.tagName === _this_1.getNgDirective() && _this_1.itemTemplate) {
              setTimeout(function() {
                highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);
              }, 0);
            } else {
              highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);
            }
          }
        };
      } else {
        var itemCreated_1 = fields.itemCreated;
        fields.itemCreated = function(e) {
          if (_this_1.highlight) {
            highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);
          }
          itemCreated_1.apply(_this_1, [e]);
        };
      }
      return fields;
    };
    AutoComplete2.prototype.isFiltering = function() {
      return true;
    };
    AutoComplete2.prototype.renderPopup = function(e) {
      if (!this.enableVirtualization) {
        this.list.scrollTop = 0;
      }
      _super.prototype.renderPopup.call(this, e);
    };
    AutoComplete2.prototype.isEditTextBox = function() {
      return false;
    };
    AutoComplete2.prototype.isPopupButton = function() {
      return this.showPopupButton;
    };
    AutoComplete2.prototype.isSelectFocusItem = function(element2) {
      return false;
    };
    AutoComplete2.prototype.setInputValue = function(newProp, oldProp) {
      var oldValue = oldProp && oldProp.text ? oldProp.text : oldProp ? oldProp.value : oldProp;
      var value = newProp && newProp.text ? newProp.text : newProp && newProp.value ? newProp.value : this.value;
      if (this.allowObjectBinding) {
        oldValue = !isNullOrUndefined2(oldValue) ? getValue2(this.fields.value ? this.fields.value : "", oldValue) : oldValue;
        value = !isNullOrUndefined2(value) ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
      }
      if (value && this.typedString === "" && !this.allowCustom && !(this.dataSource instanceof DataManager)) {
        var checkFields1_1 = this.typeOfData(this.dataSource).typeof === "string" ? "" : this.fields.value;
        var listLength_1 = this.getItems().length;
        var query = new Query();
        var _this_2 = this;
        new DataManager(this.dataSource).executeQuery(query.where(new Predicate(checkFields1_1, "equal", value))).then(function(e) {
          if (e.result.length > 0) {
            _this_2.value = checkFields1_1 !== "" ? _this_2.allowObjectBinding ? e.result[0] : e.result[0][_this_2.fields.value].toString() : e.result[0].toString();
            _this_2.addItem(e.result, listLength_1);
            _this_2.updateValues();
          } else {
            if (newProp && newProp.text) {
              _this_2.setOldText(oldValue);
            } else if (newProp && newProp.value) {
              _this_2.setOldValue(oldValue);
            } else {
              _this_2.updateValues();
            }
          }
        });
      } else if (newProp) {
        if (newProp.text) {
          this.setOldText(oldValue);
        } else {
          this.setOldValue(oldValue);
        }
      }
    };
    AutoComplete2.prototype.showPopup = function(e) {
      if (!this.enabled) {
        return;
      }
      if (this.beforePopupOpen) {
        this.refreshPopup();
        return;
      }
      this.beforePopupOpen = true;
      this.preventAutoFill = true;
      if (isNullOrUndefined2(this.list)) {
        this.renderList(e);
      } else {
        this.resetList(this.dataSource, this.fields, null, e);
      }
    };
    AutoComplete2.prototype.hidePopup = function(e) {
      _super.prototype.hidePopup.call(this, e);
      this.activeIndex = null;
      this.virtualListInfo = this.viewPortInfo;
      this.previousStartIndex = this.viewPortInfo.startIndex;
      this.startIndex = this.viewPortInfo.startIndex;
      this.previousEndIndex = this.viewPortInfo.endIndex;
    };
    AutoComplete2.prototype.onPropertyChanged = function(newProp, oldProp) {
      if (this.getModuleName() === "autocomplete") {
        this.setUpdateInitial(["fields", "query", "dataSource"], newProp);
      }
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "showPopupButton":
            if (this.showPopupButton) {
              var button = Input.appendSpan(dropDownListClasses.icon, this.inputWrapper.container, this.createElement);
              this.inputWrapper.buttons[0] = button;
              Input.calculateWidth(this.inputElement, this.inputWrapper.container);
              if (!isNullOrUndefined2(this.inputWrapper.buttons[0]) && !isNullOrUndefined2(this.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0]) && this.floatLabelType !== "Never") {
                this.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon");
              }
              if (this.inputWrapper && this.inputWrapper.buttons && this.inputWrapper.buttons[0]) {
                EventHandler2.add(this.inputWrapper.buttons[0], "click", this.dropDownClick, this);
              }
            } else {
              detach2(this.inputWrapper.buttons[0]);
              this.inputWrapper.buttons[0] = null;
            }
            break;
          default: {
            var atcProps = this.getPropObject(prop, newProp, oldProp);
            _super.prototype.onPropertyChanged.call(this, atcProps.newProperty, atcProps.oldProperty);
            break;
          }
        }
      }
    };
    AutoComplete2.prototype.renderHightSearch = function() {
      if (this.highlight) {
        for (var i = 0; i < this.liCollections.length; i++) {
          var isHighlight = this.ulElement.querySelector(".e-active");
          if (!isHighlight) {
            revertHighlightSearch(this.liCollections[i]);
            highlightSearch(this.liCollections[i], this.queryString, this.ignoreCase, this.filterType);
          }
          isHighlight = null;
        }
      }
    };
    AutoComplete2.prototype.getModuleName = function() {
      return "autocomplete";
    };
    AutoComplete2.prototype.render = function() {
      _super.prototype.render.call(this);
    };
    __decorate85([Complex2({
      value: null,
      iconCss: null,
      groupBy: null,
      disabled: null
    }, FieldSettings2)], AutoComplete2.prototype, "fields", void 0);
    __decorate85([Property2(true)], AutoComplete2.prototype, "ignoreCase", void 0);
    __decorate85([Property2(false)], AutoComplete2.prototype, "showPopupButton", void 0);
    __decorate85([Property2(false)], AutoComplete2.prototype, "highlight", void 0);
    __decorate85([Property2(20)], AutoComplete2.prototype, "suggestionCount", void 0);
    __decorate85([Property2({})], AutoComplete2.prototype, "htmlAttributes", void 0);
    __decorate85([Property2(null)], AutoComplete2.prototype, "query", void 0);
    __decorate85([Property2(1)], AutoComplete2.prototype, "minLength", void 0);
    __decorate85([Property2("Contains")], AutoComplete2.prototype, "filterType", void 0);
    __decorate85([Event3()], AutoComplete2.prototype, "filtering", void 0);
    __decorate85([Property2(null)], AutoComplete2.prototype, "index", void 0);
    __decorate85([Property2("Never")], AutoComplete2.prototype, "floatLabelType", void 0);
    __decorate85([Property2(null)], AutoComplete2.prototype, "valueTemplate", void 0);
    __decorate85([Property2(null)], AutoComplete2.prototype, "filterBarPlaceholder", void 0);
    __decorate85([Property2(false)], AutoComplete2.prototype, "allowFiltering", void 0);
    __decorate85([Property2(null)], AutoComplete2.prototype, "text", void 0);
    AutoComplete2 = __decorate85([NotifyPropertyChanges2], AutoComplete2);
    return AutoComplete2;
  }(ComboBox)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/multi-select/float-label.js
var FLOATLINE = "e-float-line";
var FLOATTEXT = "e-float-text";
var LABELTOP = "e-label-top";
var LABELBOTTOM = "e-label-bottom";
function createFloatLabel(overAllWrapper, searchWrapper, element2, inputElement, value, floatLabelType, placeholder) {
  var floatLinelement = createElement2("span", {
    className: FLOATLINE
  });
  var floatLabelElement = createElement2("label", {
    className: FLOATTEXT
  });
  var id = element2.getAttribute("id") ? element2.getAttribute("id") : getUniqueID("ej2_multiselect");
  element2.id = id;
  if (!isNullOrUndefined2(element2.id) && element2.id !== "") {
    floatLabelElement.id = "label_" + element2.id.replace(/ /g, "_");
    floatLabelElement.setAttribute("for", element2.id);
    attributes2(inputElement, {
      "aria-labelledby": floatLabelElement.id
    });
  }
  if (!isNullOrUndefined2(inputElement.placeholder) && inputElement.placeholder !== "") {
    floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);
    inputElement.removeAttribute("placeholder");
  }
  floatLabelElement.innerText = encodePlaceholder(placeholder);
  searchWrapper.appendChild(floatLinelement);
  searchWrapper.appendChild(floatLabelElement);
  overAllWrapper.classList.add("e-float-input");
  updateFloatLabelState(value, floatLabelElement);
  if (floatLabelType === "Always") {
    if (floatLabelElement.classList.contains(LABELBOTTOM)) {
      removeClass2([floatLabelElement], LABELBOTTOM);
    }
    addClass2([floatLabelElement], LABELTOP);
  }
}
function updateFloatLabelState(value, label) {
  if (value && value.length > 0) {
    addClass2([label], LABELTOP);
    removeClass2([label], LABELBOTTOM);
  } else {
    removeClass2([label], LABELTOP);
    addClass2([label], LABELBOTTOM);
  }
}
function removeFloating(overAllWrapper, componentWrapper, searchWrapper, inputElement, value, floatLabelType, placeholder) {
  var placeholderElement = componentWrapper.querySelector("." + FLOATTEXT);
  var floatLine = componentWrapper.querySelector("." + FLOATLINE);
  var placeholderText;
  if (!isNullOrUndefined2(placeholderElement)) {
    placeholderText = placeholderElement.innerText;
    detach2(searchWrapper.querySelector("." + FLOATTEXT));
    setPlaceHolder(value, inputElement, placeholderText);
    if (!isNullOrUndefined2(floatLine)) {
      detach2(searchWrapper.querySelector("." + FLOATLINE));
    }
  } else {
    placeholderText = placeholder !== null ? placeholder : "";
    setPlaceHolder(value, inputElement, placeholderText);
  }
  overAllWrapper.classList.remove("e-float-input");
}
function setPlaceHolder(value, inputElement, placeholder) {
  if (value && value.length) {
    inputElement.placeholder = "";
  } else {
    inputElement.placeholder = placeholder;
  }
}
function floatLabelFocus(overAllWrapper, componentWrapper) {
  overAllWrapper.classList.add("e-input-focus");
  var label = componentWrapper.querySelector("." + FLOATTEXT);
  if (!isNullOrUndefined2(label)) {
    addClass2([label], LABELTOP);
    if (label.classList.contains(LABELBOTTOM)) {
      removeClass2([label], LABELBOTTOM);
    }
  }
}
function floatLabelBlur(overAllWrapper, componentWrapper, value, floatLabelType, placeholder) {
  overAllWrapper.classList.remove("e-input-focus");
  var label = componentWrapper.querySelector("." + FLOATTEXT);
  if (value && value.length <= 0 && floatLabelType === "Auto" && !isNullOrUndefined2(label)) {
    if (label.classList.contains(LABELTOP)) {
      removeClass2([label], LABELTOP);
    }
    addClass2([label], LABELBOTTOM);
  }
}
function encodePlaceholder(placeholder) {
  var result = "";
  if (!isNullOrUndefined2(placeholder) && placeholder !== "") {
    var spanElement = document.createElement("span");
    spanElement.innerHTML = '<input  placeholder="' + placeholder + '"/>';
    var hiddenInput = spanElement.children[0];
    result = hiddenInput.placeholder;
  }
  return result;
}

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/multi-select/multi-select.js
var __extends88 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate86 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var FOCUS3 = "e-input-focus";
var DISABLED14 = "e-disabled";
var OVER_ALL_WRAPPER = "e-multiselect e-input-group e-control-wrapper";
var ELEMENT_WRAPPER = "e-multi-select-wrapper";
var ELEMENT_MOBILE_WRAPPER = "e-mob-wrapper";
var HIDE_LIST = "e-hide-listitem";
var DELIMITER_VIEW = "e-delim-view";
var CHIP_WRAPPER2 = "e-chips-collection";
var CHIP2 = "e-chips";
var CHIP_CONTENT2 = "e-chipcontent";
var CHIP_CLOSE2 = "e-chips-close";
var CHIP_SELECTED = "e-chip-selected";
var SEARCHBOX_WRAPPER = "e-searcher";
var DELIMITER_VIEW_WRAPPER = "e-delimiter";
var ZERO_SIZE = "e-zero-size";
var REMAIN_WRAPPER2 = "e-remain";
var CLOSEICON_CLASS2 = "e-chips-close e-close-hooker";
var DELIMITER_WRAPPER = "e-delim-values";
var POPUP_WRAPPER = "e-ddl e-popup e-multi-select-list-wrapper";
var INPUT_ELEMENT = "e-dropdownbase";
var RTL_CLASS2 = "e-rtl";
var CLOSE_ICON_HIDE = "e-close-icon-hide";
var MOBILE_CHIP = "e-mob-chip";
var FOOTER2 = "e-ddl-footer";
var HEADER3 = "e-ddl-header";
var DISABLE_ICON = "e-ddl-disable-icon";
var SPINNER_CLASS2 = "e-ms-spinner-icon";
var HIDDEN_ELEMENT = "e-multi-hidden";
var destroy4 = "destroy";
var dropdownIcon = "e-input-group-icon e-ddl-icon";
var iconAnimation = "e-icon-anim";
var TOTAL_COUNT_WRAPPER2 = "e-delim-total";
var BOX_ELEMENT = "e-multiselect-box";
var FILTERPARENT = "e-filter-parent";
var CUSTOM_WIDTH = "e-search-custom-width";
var FILTERINPUT = "e-input-filter";
var RESIZE_ICON = "e-resizer-right e-icons";
var MultiSelect = (
  /** @class */
  function(_super) {
    __extends88(MultiSelect2, _super);
    function MultiSelect2(option, element2) {
      var _this = _super.call(this, option, element2) || this;
      _this.clearIconWidth = 0;
      _this.previousFilterText = "";
      _this.storedSelectAllHeight = 0;
      _this.isUpdateHeaderHeight = false;
      _this.isUpdateFooterHeight = false;
      _this.isBlurDispatching = false;
      _this.isFilterPrevented = false;
      _this.isFilteringAction = false;
      _this.isValidKey = false;
      _this.selectAllEventData = [];
      _this.selectAllEventEle = [];
      _this.preventSetCurrentData = false;
      _this.isSelectAllLoop = false;
      _this.scrollFocusStatus = false;
      _this.keyDownStatus = false;
      return _this;
    }
    MultiSelect2.prototype.enableRTL = function(state) {
      if (state) {
        this.overAllWrapper.classList.add(RTL_CLASS2);
      } else {
        this.overAllWrapper.classList.remove(RTL_CLASS2);
      }
      if (this.popupObj) {
        this.popupObj.enableRtl = state;
        this.popupObj.dataBind();
      }
    };
    MultiSelect2.prototype.requiredModules = function() {
      var modules = [];
      if (this.enableVirtualization) {
        modules.push({
          args: [this],
          member: "VirtualScroll"
        });
      }
      if (this.mode === "CheckBox") {
        this.isGroupChecking = this.enableGroupCheckBox;
        if (this.enableGroupCheckBox) {
          var prevOnChange = this.isProtectedOnChange;
          this.isProtectedOnChange = true;
          this.enableSelectionOrder = false;
          this.isProtectedOnChange = prevOnChange;
        }
        this.allowCustomValue = false;
        this.hideSelectedItem = false;
        this.closePopupOnSelect = false;
        modules.push({
          member: "CheckBoxSelection",
          args: [this]
        });
      }
      return modules;
    };
    MultiSelect2.prototype.updateHTMLAttribute = function() {
      if (Object.keys(this.htmlAttributes).length) {
        for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
          var htmlAttr = _a[_i];
          switch (htmlAttr) {
            case "class": {
              var updatedClassValue = this.htmlAttributes["" + htmlAttr].replace(/\s+/g, " ").trim();
              if (updatedClassValue !== "") {
                addClass2([this.overAllWrapper], updatedClassValue.split(" "));
                addClass2([this.popupWrapper], updatedClassValue.split(" "));
              }
              break;
            }
            case "disabled":
              this.enable(false);
              break;
            case "placeholder":
              if (!this.placeholder) {
                this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
                this.setProperties({
                  placeholder: this.inputElement.placeholder
                }, true);
                this.refreshPlaceHolder();
              }
              break;
            default: {
              var defaultAttr = ["id"];
              var validateAttr = ["name", "required", "aria-required", "form"];
              var containerAttr3 = ["title", "role", "style", "class"];
              if (defaultAttr.indexOf(htmlAttr) > -1) {
                this.element.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
              } else if (htmlAttr.indexOf("data") === 0 || validateAttr.indexOf(htmlAttr) > -1) {
                this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
              } else if (containerAttr3.indexOf(htmlAttr) > -1) {
                this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
              } else if (htmlAttr !== "size" && !isNullOrUndefined2(this.inputElement)) {
                this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
              }
              break;
            }
          }
        }
      }
    };
    MultiSelect2.prototype.updateReadonly = function(state) {
      if (!isNullOrUndefined2(this.inputElement)) {
        if (state || this.mode === "CheckBox") {
          this.inputElement.setAttribute("readonly", "true");
        } else {
          this.inputElement.removeAttribute("readonly");
        }
      }
    };
    MultiSelect2.prototype.updateClearButton = function(state) {
      if (state) {
        if (this.overAllClear.parentNode) {
          this.overAllClear.style.display = "";
        } else {
          this.componentWrapper.appendChild(this.overAllClear);
        }
        this.componentWrapper.classList.remove(CLOSE_ICON_HIDE);
      } else {
        this.overAllClear.style.display = "none";
        this.componentWrapper.classList.add(CLOSE_ICON_HIDE);
      }
    };
    MultiSelect2.prototype.updateCssClass = function() {
      if (!isNullOrUndefined2(this.cssClass) && this.cssClass !== "") {
        var updatedCssClassValues = this.cssClass;
        updatedCssClassValues = this.cssClass.replace(/\s+/g, " ").trim();
        if (updatedCssClassValues !== "") {
          addClass2([this.overAllWrapper], updatedCssClassValues.split(" "));
          addClass2([this.popupWrapper], updatedCssClassValues.split(" "));
        }
      }
    };
    MultiSelect2.prototype.updateOldPropCssClass = function(oldClass) {
      if (!isNullOrUndefined2(oldClass) && oldClass !== "") {
        oldClass = oldClass.replace(/\s+/g, " ").trim();
        if (oldClass !== "") {
          removeClass2([this.overAllWrapper], oldClass.split(" "));
          removeClass2([this.popupWrapper], oldClass.split(" "));
        }
      }
    };
    MultiSelect2.prototype.onPopupShown = function(e) {
      var _this = this;
      if (Browser2.isDevice && this.mode === "CheckBox" && this.allowFiltering) {
        var proxy_1 = this;
        window.onpopstate = function() {
          proxy_1.hidePopup();
          proxy_1.inputElement.focus();
        };
        history.pushState({}, "");
      }
      var animModel = {
        name: "FadeIn",
        duration: 100
      };
      var eventArgs = {
        popup: this.popupObj,
        event: e,
        cancel: false,
        animation: animModel
      };
      this.trigger("open", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel) {
          _this.focusAtFirstListItem(true);
          if (_this.popupObj) {
            document.body.appendChild(_this.popupObj.element);
          }
          if (_this.mode === "CheckBox" && _this.enableGroupCheckBox && !isNullOrUndefined2(_this.fields.groupBy)) {
            _this.updateListItems(_this.list.querySelectorAll("li.e-list-item"), _this.mainList.querySelectorAll("li.e-list-item"));
          }
          if (_this.mode === "CheckBox" || _this.showDropDownIcon) {
            addClass2([_this.overAllWrapper], [iconAnimation]);
          }
          _this.refreshPopup();
          _this.renderReactTemplates();
          if (_this.popupObj) {
            _this.popupObj.show(eventArgs2.animation, _this.zIndex === 1e3 ? _this.element : null);
          }
          if (_this.isReact) {
            setTimeout(function() {
              if (_this.popupHeight && _this.list && _this.popupHeight !== "auto") {
                var popupHeightValue = typeof _this.popupHeight === "string" ? parseInt(_this.popupHeight, 10) : _this.popupHeight;
                if (!_this.isUpdateHeaderHeight && _this.headerTemplate && _this.header) {
                  var listHeight = _this.list.style.maxHeight === "" ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
                  _this.list.style.maxHeight = (listHeight - _this.header.offsetHeight).toString() + "px";
                  _this.isUpdateHeaderHeight = true;
                }
                if (!_this.isUpdateFooterHeight && _this.footerTemplate && _this.footer) {
                  var listHeight = _this.list.style.maxHeight === "" ? popupHeightValue : parseInt(_this.list.style.maxHeight, 10);
                  _this.list.style.maxHeight = (listHeight - _this.footer.offsetHeight).toString() + "px";
                  _this.isUpdateFooterHeight = true;
                }
              }
            }, 15);
          }
          attributes2(_this.inputElement, {
            "aria-expanded": "true",
            "aria-owns": _this.element.id + "_popup",
            "aria-controls": _this.element.id
          });
          _this.updateAriaActiveDescendant();
          if (_this.isFirstClick) {
            if (!_this.enableVirtualization) {
              _this.loadTemplate();
            }
          }
          if (_this.mode === "CheckBox" && _this.showSelectAll) {
            EventHandler2.add(_this.popupObj.element, "click", _this.clickHandler, _this);
          }
        }
      });
    };
    MultiSelect2.prototype.updateVirtualReOrderList = function(isCheckBoxUpdate) {
      var query = this.getForQuery(this.value, true).clone();
      if (this.enableVirtualization && this.dataSource instanceof DataManager) {
        this.resetList(this.selectedListData, this.fields, query);
      } else {
        this.resetList(this.dataSource, this.fields, query);
      }
      this.UpdateSkeleton();
      this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
      this.virtualItemCount = this.itemCount;
      if (this.mode !== "CheckBox") {
        this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
      }
      if (!this.list.querySelector(".e-virtual-ddl")) {
        var virualElement = this.createElement("div", {
          id: this.element.id + "_popup",
          className: "e-virtual-ddl",
          styles: this.GetVirtualTrackHeight()
        });
        this.popupWrapper.querySelector(".e-dropdownbase").appendChild(virualElement);
      } else {
        this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
      }
      if (this.list.querySelector(".e-virtual-ddl-content")) {
        this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
      }
      if (isCheckBoxUpdate) {
        this.loadTemplate();
      }
    };
    MultiSelect2.prototype.updateListItems = function(listItems, mainListItems) {
      for (var i = 0; i < listItems.length; i++) {
        this.findGroupStart(listItems[i]);
        this.findGroupStart(mainListItems[i]);
      }
      this.deselectHeader();
    };
    MultiSelect2.prototype.loadTemplate = function() {
      this.refreshListItems(null);
      if (this.enableVirtualization && this.list && this.mode === "CheckBox") {
        var reOrderList = this.list.querySelectorAll(".e-reorder")[0];
        if (this.list.querySelector(".e-virtual-ddl-content") && reOrderList) {
          this.list.querySelector(".e-virtual-ddl-content").removeChild(reOrderList);
        }
      }
      if (this.mode === "CheckBox") {
        this.removeFocus();
      }
      this.notify("reOrder", {
        module: "CheckBoxSelection",
        enable: this.mode === "CheckBox",
        e: this
      });
      this.isPreventScrollAction = true;
    };
    MultiSelect2.prototype.setScrollPosition = function() {
      if ((!this.hideSelectedItem && this.mode !== "CheckBox" || this.mode === "CheckBox" && !this.enableSelectionOrder) && !isNullOrUndefined2(this.value) && this.value.length > 0) {
        var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[this.value.length - 1]) : this.value[this.value.length - 1];
        var valueEle = this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, "li", "data-value", value);
        if (!isNullOrUndefined2(valueEle)) {
          this.scrollBottom(valueEle, void 0, false, null, true);
        }
      }
      if (this.enableVirtualization) {
        var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
        this.isKeyBoardAction = false;
        this.scrollBottom(focusedItem, void 0, false, null, true);
      }
    };
    MultiSelect2.prototype.focusAtFirstListItem = function(isOpen) {
      if (this.ulElement && this.ulElement.querySelector("li." + dropDownBaseClasses.li)) {
        var element2 = void 0;
        if (this.mode === "CheckBox") {
          this.removeFocus();
          return;
        } else {
          if (this.enableVirtualization) {
            if (this.fields.disabled) {
              element2 = this.ulElement.querySelector("li." + dropDownBaseClasses.li + ":not(.e-virtual-list):not(.e-hide-listitem):not(." + DISABLED14 + ")");
              if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
                var elements = this.ulElement.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-virtual-list):not(.e-hide-listitem)");
                element2 = elements && elements.length > 0 ? elements[2] : element2;
              }
            } else {
              element2 = this.ulElement.querySelector("li." + dropDownBaseClasses.li + ":not(.e-virtual-list):not(.e-hide-listitem)");
              if (isOpen && this.viewPortInfo && this.viewPortInfo.startIndex !== 0) {
                var elements = this.ulElement.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-virtual-list):not(.e-hide-listitem)");
                element2 = elements && elements.length > 0 ? elements[2] : element2;
              }
            }
          } else {
            if (this.fields.disabled) {
              element2 = this.ulElement.querySelector("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(." + DISABLED14 + ")");
            } else {
              element2 = this.ulElement.querySelector("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + ")");
            }
          }
        }
        if (element2 !== null) {
          this.removeFocus();
          this.addListFocus(element2);
        }
      }
    };
    MultiSelect2.prototype.focusAtLastListItem = function(data) {
      var activeElement;
      if (data) {
        activeElement = Search(data, this.liCollections, "StartsWith", this.ignoreCase);
      } else {
        if (this.value && this.value.length) {
          var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[this.value.length - 1]) : this.value[this.value.length - 1];
          Search(value, this.liCollections, "StartsWith", this.ignoreCase);
        } else {
          activeElement = null;
        }
      }
      if (activeElement && activeElement.item !== null) {
        this.addListFocus(activeElement.item);
        if ((this.allowCustomValue || this.allowFiltering) && this.isPopupOpen() && this.closePopupOnSelect && !this.enableVirtualization || this.closePopupOnSelect && !this.enableVirtualization) {
          this.scrollBottom(activeElement.item, activeElement.index);
        }
      }
    };
    MultiSelect2.prototype.getAriaAttributes = function() {
      var ariaAttributes = {
        "aria-disabled": "false",
        "role": "combobox",
        "aria-expanded": "false"
      };
      return ariaAttributes;
    };
    MultiSelect2.prototype.updateListARIA = function() {
      if (!isNullOrUndefined2(this.ulElement)) {
        attributes2(this.ulElement, {
          "id": this.element.id + "_options",
          "role": "listbox",
          "aria-hidden": "false",
          "aria-label": "list"
        });
      }
      var disableStatus = !isNullOrUndefined2(this.inputElement) && this.inputElement.disabled ? true : false;
      if (!this.isPopupOpen() && !isNullOrUndefined2(this.inputElement)) {
        attributes2(this.inputElement, this.getAriaAttributes());
      }
      if (disableStatus) {
        attributes2(this.inputElement, {
          "aria-disabled": "true"
        });
      }
      this.ensureAriaDisabled(disableStatus ? "true" : "false");
    };
    MultiSelect2.prototype.ensureAriaDisabled = function(status) {
      if (this.htmlAttributes && this.htmlAttributes["aria-disabled"]) {
        var attr = this.htmlAttributes;
        extend2(attr, {
          "aria-disabled": status
        }, attr);
        this.setProperties({
          htmlAttributes: attr
        }, true);
      }
    };
    MultiSelect2.prototype.removelastSelection = function(e) {
      var selectedElem = this.chipCollectionWrapper.querySelector("span." + CHIP_SELECTED);
      if (selectedElem !== null) {
        this.removeSelectedChip(e);
        return;
      }
      var elements = this.chipCollectionWrapper.querySelectorAll("span." + CHIP2);
      var value = elements[elements.length - 1].getAttribute("data-value");
      if (!isNullOrUndefined2(this.value)) {
        this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
      }
      var customValue = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(value)) : this.getFormattedValue(value);
      if (this.allowCustomValue && (value !== "false" && customValue === false || !isNullOrUndefined2(customValue) && customValue.toString() === "NaN")) {
        customValue = value;
      }
      this.removeValue(customValue, e);
      this.removeChipSelection();
      this.updateDelimeter(this.delimiterChar, e);
      this.makeTextBoxEmpty();
      if (this.mainList && this.listData) {
        this.refreshSelection();
      }
      this.checkPlaceholderSize();
    };
    MultiSelect2.prototype.onActionFailure = function(e) {
      _super.prototype.onActionFailure.call(this, e);
      this.renderPopup();
      this.onPopupShown();
    };
    MultiSelect2.prototype.targetElement = function() {
      this.targetInputElement = this.inputElement;
      if (this.mode === "CheckBox" && this.allowFiltering) {
        this.notify("targetElement", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox"
        });
      }
      return this.targetInputElement.value;
    };
    MultiSelect2.prototype.getForQuery = function(valuecheck, isCheckbox) {
      var predicate;
      var field = this.isPrimitiveData ? "" : this.fields.value;
      if (this.enableVirtualization && valuecheck) {
        if (isCheckbox) {
          for (var i = 0; i < valuecheck.length; i++) {
            var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", valuecheck[i]) : valuecheck[i];
            if (i === 0) {
              predicate = new Predicate(field, "equal", value);
            } else {
              predicate = predicate.or(field, "equal", value);
            }
          }
          return new Query().where(predicate);
        } else {
          for (var i = 0; i < valuecheck.length; i++) {
            var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", valuecheck[i]) : valuecheck[i];
            if (i === 0) {
              predicate = new Predicate(field, "notequal", value);
            } else {
              predicate = predicate.and(field, "notequal", value);
            }
          }
          return new Query().where(predicate);
        }
      } else {
        for (var i = 0; i < valuecheck.length; i++) {
          if (i === 0) {
            predicate = new Predicate(field, "equal", valuecheck[i]);
          } else {
            predicate = predicate.or(field, "equal", valuecheck[i]);
          }
        }
      }
      if (this.dataSource instanceof DataManager && this.dataSource.adaptor instanceof JsonAdaptor) {
        return new Query().where(predicate);
      } else {
        return this.getQuery(this.query).clone().where(predicate);
      }
    };
    MultiSelect2.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
      var _this = this;
      if (this.dataSource instanceof DataManager && !isNullOrUndefined2(e) && !this.virtualGroupDataSource) {
        this.totalItemCount = e.count;
      }
      if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== "CheckBox" && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue && this.isFilteringAction) {
        var allItemsInValue = list.every(function(item) {
          var itemValue = getValue2(_this.fields.value ? _this.fields.value : "", item);
          return _this.value.some(function(val) {
            var value2 = _this.allowObjectBinding ? getValue2(_this.fields.value ? _this.fields.value : "", val) : val;
            return itemValue === value2;
          });
        });
        if (allItemsInValue) {
          ulElement.innerHTML = "";
          list = [];
        }
      }
      _super.prototype.onActionComplete.call(this, ulElement, list, e);
      this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.totalItemCount <= this.itemCount) ? 0 : this.skeletonCount;
      this.updateSelectElementData(this.allowFiltering);
      var proxy = this;
      if (!isNullOrUndefined2(this.value) && !this.allowCustomValue && !this.enableVirtualization && this.listData && this.listData.length > 0) {
        for (var i = 0; i < this.value.length; i++) {
          var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", proxy.value[i]) : proxy.value[i];
          var checkEle = this.findListElement(this.allowFiltering && !isNullOrUndefined2(this.mainList) ? this.mainList : ulElement, "li", "data-value", value);
          if (!checkEle && !(this.dataSource instanceof DataManager)) {
            this.value.splice(i, 1);
            i -= 1;
          }
        }
      }
      var valuecheck = [];
      if (!isNullOrUndefined2(this.value)) {
        valuecheck = this.presentItemValue(this.ulElement);
      }
      if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined2(this.value) && this.listData != null && !this.enableVirtualization) {
        this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
      } else {
        this.updateActionList(ulElement, list, e);
      }
      if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered && this.inputElement.value && this.inputElement.value !== "") {
        var query = new Query();
        query = this.allowFiltering ? query.where(this.fields.text, "startswith", this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;
        this.checkForCustomValue(query, this.fields);
        this.isCustomRendered = true;
        this.remoteCustomValue = this.enableVirtualization ? false : this.remoteCustomValue;
      }
      if (this.mode === "CheckBox" && this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy) && !isNullOrUndefined2(this.fields.disabled)) {
        this.disableGroupHeader();
      }
      if (this.dataSource instanceof DataManager && this.mode === "CheckBox" && this.allowFiltering) {
        this.removeFocus();
      }
    };
    MultiSelect2.prototype.updateActionList = function(ulElement, list, e, isUpdated) {
      if (this.mode === "CheckBox" && this.showSelectAll) {
        this.notify("selectAll", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox"
        });
      }
      if (!this.mainList && !this.mainData) {
        this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
        this.mainData = list;
        this.mainListCollection = this.liCollections;
      } else if (isNullOrUndefined2(this.mainData) || this.mainData.length === 0) {
        this.mainData = list;
      }
      if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering && this.inputElement.value && this.inputElement.value !== "") {
        this.checkForCustomValue(this.tempQuery, this.fields);
        if (this.isCustomRendered) {
          return;
        }
      }
      if (this.value && this.value.length && (this.mode !== "CheckBox" && !isNullOrUndefined2(this.inputElement) && this.inputElement.value.trim() !== "" || this.mode === "CheckBox" || (this.keyCode === 8 || this.keyCode === 46) && this.allowFiltering && this.allowCustomValue && this.dataSource instanceof DataManager && this.inputElement.value === "")) {
        this.refreshSelection();
      }
      this.updateListARIA();
      this.unwireListEvents();
      this.wireListEvents();
      if (!isNullOrUndefined2(this.setInitialValue)) {
        this.setInitialValue();
      }
      if (!isNullOrUndefined2(this.selectAllAction)) {
        this.selectAllAction();
      }
      if (this.setDynValue) {
        if (!isNullOrUndefined2(this.text) && (isNullOrUndefined2(this.value) || this.value.length === 0)) {
          this.initialTextUpdate();
        }
        if (!this.enableVirtualization || this.enableVirtualization && !(this.dataSource instanceof DataManager)) {
          this.initialValueUpdate();
        } else {
          this.initialValueUpdate(this.listData, true);
        }
        this.initialUpdate();
        this.refreshPlaceHolder();
        if (this.mode !== "CheckBox" && this.changeOnBlur) {
          this.updateValueState(null, this.value, null);
        }
      }
      this.renderPopup();
      if (this.beforePopupOpen) {
        this.beforePopupOpen = false;
        this.onPopupShown(e);
      }
    };
    MultiSelect2.prototype.refreshSelection = function() {
      var value;
      var element2;
      var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
      if (!isNullOrUndefined2(this.value)) {
        for (var index = 0; !isNullOrUndefined2(this.value[index]); index++) {
          value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[index]) : this.value[index];
          element2 = this.findListElement(this.list, "li", "data-value", value);
          if (element2) {
            addClass2([element2], className);
            if (this.hideSelectedItem && element2.previousSibling && element2.previousElementSibling.classList.contains(dropDownBaseClasses.group) && (!element2.nextElementSibling || element2.nextElementSibling.classList.contains(dropDownBaseClasses.group))) {
              addClass2([element2.previousElementSibling], className);
            }
            if (this.hideSelectedItem && this.fields.groupBy && !element2.previousElementSibling.classList.contains(HIDE_LIST)) {
              this.hideGroupItem(value);
            }
            if (this.hideSelectedItem && element2.classList.contains(dropDownBaseClasses.focus)) {
              removeClass2([element2], dropDownBaseClasses.focus);
              var listEle = element2.parentElement.querySelectorAll("." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(." + DISABLED14 + ")");
              if (listEle.length > 0) {
                addClass2([listEle[0]], dropDownBaseClasses.focus);
                this.updateAriaActiveDescendant();
              } else {
                if (!(this.list && this.list.querySelectorAll("." + dropDownBaseClasses.li).length > 0)) {
                  this.l10nUpdate();
                  addClass2([this.list], dropDownBaseClasses.noData);
                }
              }
            }
            element2.setAttribute("aria-selected", "true");
            if (this.mode === "CheckBox" && element2.classList.contains("e-active")) {
              var ariaValue = element2.getElementsByClassName("e-check").length;
              if (ariaValue === 0) {
                var args = {
                  module: "CheckBoxSelection",
                  enable: this.mode === "CheckBox",
                  li: element2,
                  e: null
                };
                this.notify("updatelist", args);
              }
            }
          }
        }
      }
      this.checkSelectAll();
      this.checkMaxSelection();
    };
    MultiSelect2.prototype.hideGroupItem = function(value) {
      var element2;
      var element1;
      var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
      element1 = element2 = this.findListElement(this.ulElement, "li", "data-value", value);
      var i = 0;
      var j = 0;
      var temp = true;
      var temp1 = true;
      do {
        if (element2 && element2.previousElementSibling && !element2.previousElementSibling.classList.contains(HIDE_LIST) && element2.previousElementSibling.classList.contains(dropDownBaseClasses.li)) {
          temp = false;
        }
        if (!temp || !element2 || element2.previousElementSibling && element2.previousElementSibling.classList.contains(dropDownBaseClasses.group)) {
          i = 10;
        } else {
          element2 = element2.previousElementSibling;
        }
        if (element1 && element1.nextElementSibling && !element1.nextElementSibling.classList.contains(HIDE_LIST) && element1.nextElementSibling.classList.contains(dropDownBaseClasses.li)) {
          temp1 = false;
        }
        if (!temp1 || !element1 || element1.nextElementSibling && element1.nextElementSibling.classList.contains(dropDownBaseClasses.group)) {
          j = 10;
        } else {
          element1 = element1.nextElementSibling;
        }
      } while (i < 10 || j < 10);
      if (temp && temp1 && !element2.previousElementSibling.classList.contains(HIDE_LIST)) {
        addClass2([element2.previousElementSibling], className);
      } else if (temp && temp1 && element2.previousElementSibling.classList.contains(HIDE_LIST)) {
        removeClass2([element2.previousElementSibling], className);
      }
    };
    MultiSelect2.prototype.getValidLi = function() {
      var liElement = this.ulElement.querySelector("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + ")");
      return !isNullOrUndefined2(liElement) ? liElement : this.liCollections[0];
    };
    MultiSelect2.prototype.checkSelectAll = function() {
      var groupItemLength = !isNullOrUndefined2(this.fields.disabled) ? this.list.querySelectorAll("li.e-list-group-item.e-active:not(.e-disabled)").length : this.list.querySelectorAll("li.e-list-group-item.e-active").length;
      var listItem = this.list.querySelectorAll("li.e-list-item");
      var searchCount = this.enableVirtualization ? this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-virtual-list)").length : !isNullOrUndefined2(this.fields.disabled) ? this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-disabled)").length : this.list.querySelectorAll("li." + dropDownBaseClasses.li).length;
      var searchActiveCount = this.list.querySelectorAll("li." + dropDownBaseClasses.selected).length;
      if (this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy)) {
        searchActiveCount = searchActiveCount - groupItemLength;
      }
      if (!this.enableVirtualization && (searchCount === searchActiveCount || searchActiveCount === this.maximumSelectionLength) && this.mode === "CheckBox" && this.showSelectAll || this.enableVirtualization && this.mode === "CheckBox" && this.showSelectAll && this.virtualSelectAll && this.value && this.value.length === this.totalItemCount) {
        this.notify("checkSelectAll", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox",
          value: "check"
        });
      } else if (searchCount !== searchActiveCount && this.mode === "CheckBox" && this.showSelectAll && (!this.enableVirtualization || this.enableVirtualization && !this.virtualSelectAll)) {
        this.notify("checkSelectAll", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox",
          value: "uncheck"
        });
      }
      if (this.enableGroupCheckBox && this.fields.groupBy && !this.enableSelectionOrder) {
        for (var i = 0; i < listItem.length; i++) {
          this.findGroupStart(listItem[i]);
        }
        this.deselectHeader();
      }
    };
    MultiSelect2.prototype.openClick = function(e) {
      if (!this.openOnClick && this.mode !== "CheckBox" && !this.isPopupOpen()) {
        if (this.targetElement() !== "") {
          this.showPopup();
        } else {
          this.hidePopup(e);
        }
      } else if (!this.openOnClick && this.mode === "CheckBox" && !this.isPopupOpen()) {
        this.showPopup();
      }
    };
    MultiSelect2.prototype.keyUp = function(e) {
      if (this.mode === "CheckBox" && !this.openOnClick) {
        var char = String.fromCharCode(e.keyCode);
        var isWordCharacter = char.match(/\w/);
        if (!isNullOrUndefined2(isWordCharacter)) {
          this.isValidKey = true;
        }
      }
      this.isValidKey = this.isPopupOpen() && e.keyCode === 8 || this.isValidKey;
      this.isValidKey = e.ctrlKey && e.keyCode === 86 ? false : this.isValidKey;
      if (this.isValidKey && this.inputElement) {
        this.isValidKey = false;
        this.expandTextbox();
        this.showOverAllClear();
        switch (e.keyCode) {
          default:
            this.search(e);
        }
      }
    };
    MultiSelect2.prototype.filter = function(dataSource, query, fields) {
      this.isFiltered = true;
      this.remoteFilterAction = true;
      this.dataUpdater(dataSource, query, fields);
    };
    MultiSelect2.prototype.getQuery = function(query) {
      var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
      if (this.isFiltered) {
        if (this.enableVirtualization && !isNullOrUndefined2(this.customFilterQuery)) {
          filterQuery = this.customFilterQuery.clone();
          return this.virtualFilterQuery(filterQuery);
        } else if (!this.enableVirtualization) {
          return filterQuery;
        }
      }
      if (this.filterAction) {
        if (this.targetElement() !== null && !this.enableVirtualization || this.enableVirtualization && this.targetElement() !== null && this.targetElement().trim() !== "") {
          var dataType = this.typeOfData(this.dataSource).typeof;
          if (!(this.dataSource instanceof DataManager) && dataType === "string" || dataType === "number") {
            filterQuery.where("", this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
          } else if (this.enableVirtualization && this.targetElement() !== "" && !this.isClearAllAction || !this.enableVirtualization) {
            var fields = this.fields;
            filterQuery.where(!isNullOrUndefined2(fields.text) ? fields.text : "", this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
          }
        }
        if (this.enableVirtualization && this.viewPortInfo.endIndex !== 0 && !this.virtualSelectAll) {
          return this.virtualFilterQuery(filterQuery);
        }
        if (this.virtualSelectAll) {
          return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ? this.query.take(this.maximumSelectionLength).requiresCount() : new Query().take(this.maximumSelectionLength).requiresCount();
        }
        return filterQuery;
      } else {
        if (this.enableVirtualization && this.viewPortInfo.endIndex !== 0 && !this.virtualSelectAll) {
          return this.virtualFilterQuery(filterQuery);
        }
        if (this.virtualSelectAll) {
          return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ? this.query.take(this.maximumSelectionLength).requiresCount() : new Query().take(this.maximumSelectionLength).requiresCount();
        }
        return query ? query : this.query ? this.query : new Query();
      }
    };
    MultiSelect2.prototype.virtualFilterQuery = function(filterQuery) {
      var takeValue = this.getTakeValue();
      var isReOrder = true;
      var isSkip = true;
      var isTake = true;
      for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
        if (this.getModuleName() === "multiselect" && (filterQuery.queries[queryElements].e && filterQuery.queries[queryElements].e.condition === "or" || filterQuery.queries[queryElements].e && filterQuery.queries[queryElements].e.operator === "equal")) {
          isReOrder = false;
        }
        if (filterQuery.queries[queryElements].fn === "onSkip") {
          isSkip = false;
        }
        if (filterQuery.queries[queryElements].fn === "onTake") {
          isTake = false;
        }
      }
      var queryTakeValue = 0;
      if (filterQuery && filterQuery.queries.length > 0) {
        for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
          if (filterQuery.queries[queryElements].fn === "onTake") {
            queryTakeValue = takeValue <= filterQuery.queries[queryElements].e.nos ? filterQuery.queries[queryElements].e.nos : takeValue;
          }
        }
      }
      if (queryTakeValue <= 0 && this.query && this.query.queries.length > 0) {
        for (var queryElements = 0; queryElements < this.query.queries.length; queryElements++) {
          if (this.query.queries[queryElements].fn === "onTake") {
            queryTakeValue = takeValue <= this.query.queries[queryElements].e.nos ? this.query.queries[queryElements].e.nos : takeValue;
          }
        }
      }
      if (filterQuery && filterQuery.queries.length > 0) {
        for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
          if (filterQuery.queries[queryElements].fn === "onTake") {
            queryTakeValue = filterQuery.queries[queryElements].e.nos <= queryTakeValue ? queryTakeValue : filterQuery.queries[queryElements].e.nos;
            filterQuery.queries.splice(queryElements, 1);
            --queryElements;
          }
        }
      }
      if (this.allowFiltering && isSkip || !isReOrder || !this.allowFiltering && isSkip) {
        if (!isReOrder) {
          filterQuery.skip(this.viewPortInfo.startIndex);
        } else {
          filterQuery.skip(this.virtualItemStartIndex);
        }
      }
      if (this.isIncrementalRequest) {
        filterQuery.take(this.incrementalEndIndex);
      } else if (queryTakeValue > 0) {
        filterQuery.take(queryTakeValue);
      } else {
        filterQuery.take(takeValue);
      }
      filterQuery.requiresCount();
      return filterQuery;
    };
    MultiSelect2.prototype.getTakeValue = function() {
      return this.allowFiltering && Browser2.isDevice ? Math.round(window.outerHeight / this.listItemHeight) : this.itemCount;
    };
    MultiSelect2.prototype.dataUpdater = function(dataSource, query, fields) {
      this.isDataFetched = false;
      var isNoData = this.list.classList.contains(dropDownBaseClasses.noData);
      if (this.targetElement().trim() === "") {
        var list = this.enableVirtualization ? this.list.cloneNode(true) : this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
        if (this.backCommand || this.enableVirtualization && this.mode === "CheckBox" && this.value && this.value.length > 0) {
          this.remoteCustomValue = false;
          var isReordered = false;
          if (this.allowCustomValue && list.querySelectorAll("li").length === 0 && this.mainData.length > 0) {
            this.mainData = [];
          }
          if (this.enableVirtualization) {
            if (this.allowFiltering) {
              this.isPreventScrollAction = true;
              this.list.scrollTop = 0;
              this.previousStartIndex = 0;
              this.virtualListInfo = null;
            }
            if (this.value && this.value.length > 0 && this.mode === "CheckBox") {
              this.notify("setCurrentViewDataAsync", {
                component: this.getModuleName(),
                module: "VirtualScroll"
              });
              isReordered = true;
            } else {
              this.totalItemCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
              this.resetList(dataSource, fields, query);
              if (this.mode !== "CheckBox") {
                this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
              }
              this.UpdateSkeleton();
              if ((isNoData || this.allowCustomValue) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
                if (!this.list.querySelector(".e-virtual-ddl-content")) {
                  this.list.appendChild(this.createElement("div", {
                    className: "e-virtual-ddl-content",
                    styles: this.getTransformValues()
                  })).appendChild(this.list.querySelector(".e-list-parent"));
                }
                if (!this.list.querySelector(".e-virtual-ddl")) {
                  var virualElement = this.createElement("div", {
                    id: this.element.id + "_popup",
                    className: "e-virtual-ddl",
                    styles: this.GetVirtualTrackHeight()
                  });
                  document.getElementsByClassName("e-multi-select-list-wrapper")[0].querySelector(".e-dropdownbase").appendChild(virualElement);
                }
              }
            }
          }
          this.onActionComplete(list, this.mainData);
          if (this.value && this.value.length) {
            this.refreshSelection();
          }
          if (this.keyCode !== 8) {
            this.focusAtFirstListItem();
          }
          if (!isReordered) {
            this.notify("reOrder", {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox",
              e: this
            });
          }
        }
      } else {
        if (this.enableVirtualization && this.allowFiltering) {
          this.isPreventScrollAction = true;
          this.list.scrollTop = 0;
          this.previousStartIndex = 0;
          this.virtualListInfo = null;
          if (this.list.querySelector(".e-list-parent.e-reorder")) {
            this.list.querySelector(".e-list-parent.e-reorder").remove();
          }
        }
        this.resetList(dataSource, fields, query);
        if (this.enableVirtualization && (isNoData || this.allowCustomValue) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
          if (!this.list.querySelector(".e-virtual-ddl-content")) {
            this.list.appendChild(this.createElement("div", {
              className: "e-virtual-ddl-content",
              styles: this.getTransformValues()
            })).appendChild(this.list.querySelector(".e-list-parent"));
          }
          if (this.mode !== "CheckBox") {
            this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
          }
          if (!this.list.querySelector(".e-virtual-ddl")) {
            var virualElement = this.createElement("div", {
              id: this.element.id + "_popup",
              className: "e-virtual-ddl",
              styles: this.GetVirtualTrackHeight()
            });
            document.getElementsByClassName("e-multi-select-list-wrapper")[0].querySelector(".e-dropdownbase").appendChild(virualElement);
          }
        }
        if (this.allowCustomValue) {
          if (!(dataSource instanceof DataManager)) {
            this.checkForCustomValue(query, fields);
          } else {
            this.remoteCustomValue = true;
            this.tempQuery = query;
          }
        }
      }
      if (this.enableVirtualization && this.allowFiltering) {
        this.getFilteringSkeletonCount();
      }
      this.refreshPopup();
      if (this.allowResize) {
        this.setResize();
      }
      if (this.mode === "CheckBox") {
        this.removeFocus();
      }
    };
    MultiSelect2.prototype.checkForCustomValue = function(query, fields) {
      var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
      var field = fields ? fields : this.fields;
      if (this.allowCustomValue && dataChecks) {
        var value = this.inputElement.value;
        var customData = !isNullOrUndefined2(this.mainData) && this.mainData.length > 0 ? this.mainData[0] : this.mainData;
        if (customData && typeof customData !== "string" && typeof customData !== "number" && typeof customData !== "boolean") {
          var dataItem_1 = {};
          setValue3(field.text, value, dataItem_1);
          if (typeof getValue2(this.fields.value ? this.fields.value : "value", customData) === "number" && this.fields.value !== this.fields.text) {
            setValue3(field.value, Math.random(), dataItem_1);
          } else {
            setValue3(field.value, value, dataItem_1);
          }
          var emptyObject_1 = {};
          if (this.allowObjectBinding) {
            var keys4 = this.listData && this.listData.length > 0 ? Object.keys(this.listData[0]) : this.firstItem ? Object.keys(this.firstItem) : Object.keys(dataItem_1);
            keys4.forEach(function(key) {
              emptyObject_1[key] = key === fields.value || key === fields.text ? getValue2(fields.value, dataItem_1) : null;
            });
          }
          dataItem_1 = this.allowObjectBinding ? emptyObject_1 : dataItem_1;
          if (this.enableVirtualization) {
            this.virtualCustomData = dataItem_1;
            var tempData = this.dataSource instanceof DataManager ? JSON.parse(JSON.stringify(this.listData)) : JSON.parse(JSON.stringify(this.dataSource));
            var totalData = [];
            if (this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
              totalData = tempData.concat(this.virtualCustomSelectData);
            }
            tempData.splice(0, 0, dataItem_1);
            this.isCustomDataUpdated = true;
            var tempCount = this.totalItemCount;
            this.viewPortInfo.startIndex = this.virtualItemStartIndex = 0;
            this.viewPortInfo.endIndex = this.virtualItemEndIndex = this.itemCount;
            this.resetList(tempData, field, query);
            this.isCustomDataUpdated = false;
            this.totalItemCount = this.enableVirtualization && this.dataSource instanceof DataManager ? tempCount : this.totalItemCount;
          } else {
            if (this.dataSource instanceof DataManager && this.allowCustomValue && this.allowFiltering) {
              this.remoteCustomValue = false;
            }
            var tempData = JSON.parse(JSON.stringify(this.listData));
            tempData.splice(0, 0, dataItem_1);
            this.resetList(tempData, field, query);
          }
        } else if (this.listData) {
          var tempData = JSON.parse(JSON.stringify(this.listData));
          tempData.splice(0, 0, this.inputElement.value);
          tempData[0] = typeof customData === "number" && !isNaN(parseFloat(tempData[0])) ? parseFloat(tempData[0]) : tempData[0];
          tempData[0] = typeof customData === "boolean" ? tempData[0] === "true" ? true : tempData[0] === "false" ? false : tempData[0] : tempData[0];
          this.resetList(tempData, field);
        }
      } else if (this.listData && this.mainData && !dataChecks && this.allowCustomValue) {
        if (this.allowFiltering && this.isRemoteSelection && this.remoteCustomValue) {
          this.isRemoteSelection = false;
          if (!this.enableVirtualization) {
            this.resetList(this.listData, field, query);
          }
        } else if (!this.allowFiltering && this.list) {
          var liCollections = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-hide-listitem)");
          var activeElement = Search(this.targetElement(), liCollections, "StartsWith", this.ignoreCase);
          if (activeElement && activeElement.item !== null) {
            this.addListFocus(activeElement.item);
          }
        }
      }
      if (this.value && this.value.length) {
        this.refreshSelection();
      }
    };
    MultiSelect2.prototype.getNgDirective = function() {
      return "EJS-MULTISELECT";
    };
    MultiSelect2.prototype.wrapperClick = function(e) {
      this.setDynValue = false;
      this.keyboardEvent = null;
      this.isKeyBoardAction = false;
      if (!this.enabled) {
        return;
      }
      if (e.target === this.overAllClear) {
        e.preventDefault();
        return;
      }
      if (!this.inputFocus) {
        this.inputElement.focus();
      }
      if (!this.readonly) {
        if (e.target && e.target.classList.toString().indexOf(CHIP_CLOSE2) !== -1) {
          if (this.isPopupOpen()) {
            this.refreshPopup();
          }
          return;
        }
        if (!this.isPopupOpen() && (this.openOnClick || this.showDropDownIcon && e.target && e.target.className === dropdownIcon)) {
          this.showPopup(e);
        } else {
          this.hidePopup(e);
          if (this.mode === "CheckBox") {
            this.showOverAllClear();
            this.inputFocus = true;
            if (!this.overAllWrapper.classList.contains(FOCUS3)) {
              this.overAllWrapper.classList.add(FOCUS3);
            }
          }
        }
      }
      if (!(this.targetElement() && this.targetElement() !== "")) {
        e.preventDefault();
      }
    };
    MultiSelect2.prototype.enable = function(state) {
      if (state) {
        this.overAllWrapper.classList.remove(DISABLED14);
        this.inputElement.removeAttribute("disabled");
        attributes2(this.inputElement, {
          "aria-disabled": "false"
        });
        this.ensureAriaDisabled("false");
      } else {
        this.overAllWrapper.classList.add(DISABLED14);
        this.inputElement.setAttribute("disabled", "true");
        attributes2(this.inputElement, {
          "aria-disabled": "true"
        });
        this.ensureAriaDisabled("true");
      }
      if (this.enabled !== state) {
        this.enabled = state;
      }
      this.hidePopup();
    };
    MultiSelect2.prototype.onBlurHandler = function(eve, isDocClickFromCheck) {
      var target;
      if (this.isBlurDispatching && this.isAngular) {
        this.isBlurDispatching = false;
        return;
      }
      if (!isNullOrUndefined2(eve)) {
        target = eve.relatedTarget;
      }
      if (this.popupObj && document.body.contains(this.popupObj.element) && this.popupObj.element.contains(target)) {
        if (this.mode !== "CheckBox") {
          this.inputElement.focus();
        } else if (this.floatLabelType === "Auto" && (this.overAllWrapper.classList.contains("e-outline") || this.overAllWrapper.classList.contains("e-filled"))) {
          addClass2([this.overAllWrapper], "e-valid-input");
        }
        return;
      }
      if (this.floatLabelType === "Auto" && this.overAllWrapper.classList.contains("e-outline") && this.mode === "CheckBox" && (isNullOrUndefined2(this.value) || this.value.length === 0)) {
        removeClass2([this.overAllWrapper], "e-valid-input");
      }
      if (this.mode === "CheckBox" && Browser2.isIE && !isNullOrUndefined2(eve) && !isDocClickFromCheck) {
        this.inputFocus = false;
        this.overAllWrapper.classList.remove(FOCUS3);
        return;
      }
      if (this.scrollFocusStatus) {
        if (!isNullOrUndefined2(eve)) {
          eve.preventDefault();
        }
        this.inputElement.focus();
        this.scrollFocusStatus = false;
        return;
      }
      this.inputFocus = false;
      this.overAllWrapper.classList.remove(FOCUS3);
      if (this.addTagOnBlur) {
        var dataChecks = this.getValueByText(this.inputElement.value, this.ignoreCase, this.ignoreAccent);
        var listLiElement = this.findListElement(this.list, "li", "data-value", dataChecks);
        var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
        var allowChipAddition = listLiElement && !listLiElement.classList.contains(className) ? true : false;
        if (allowChipAddition) {
          this.updateListSelection(listLiElement, eve);
          if (this.mode === "Delimiter") {
            this.updateDelimeter(this.delimiterChar);
          }
        }
      }
      this.updateDataList();
      this.refreshListItems(null);
      if (this.mode !== "Box" && this.mode !== "CheckBox") {
        this.updateDelimView();
      }
      if (this.changeOnBlur) {
        this.updateValueState(eve, this.value, this.tempValues);
        this.dispatchEvent(this.hiddenElement, "change");
      }
      this.overAllClear.style.display = "none";
      if (this.isPopupOpen()) {
        this.hidePopup(eve);
      }
      this.makeTextBoxEmpty();
      this.trigger("blur");
      this.focused = true;
      if (Browser2.isDevice && this.mode !== "Delimiter" && this.mode !== "CheckBox") {
        this.removeChipFocus();
      }
      this.removeChipSelection();
      this.refreshInputHight();
      floatLabelBlur(this.overAllWrapper, this.componentWrapper, this.value, this.floatLabelType, this.placeholder);
      this.refreshPlaceHolder();
      if ((this.allowFiltering || this.enableSelectionOrder === true && this.mode === "CheckBox") && !isNullOrUndefined2(this.mainList)) {
        this.ulElement = this.mainList;
      }
      this.checkPlaceholderSize();
      Input.createSpanElement(this.overAllWrapper, this.createElement);
      this.calculateWidth();
      if (!isNullOrUndefined2(this.overAllWrapper) && !isNullOrUndefined2(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0] && this.overAllWrapper.getElementsByClassName("e-float-text-content")[0] && this.floatLabelType !== "Never")) {
        this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon");
      }
      this.isBlurDispatching = true;
      if (this.isAngular) {
        this.dispatchEvent(this.inputElement, "blur");
      }
    };
    MultiSelect2.prototype.calculateWidth = function() {
      var elementWidth;
      if (this.overAllWrapper) {
        if (!this.showDropDownIcon || this.overAllWrapper.querySelector(".e-label-top")) {
          elementWidth = this.overAllWrapper.clientWidth - 2 * parseInt(getComputedStyle(this.inputElement).paddingRight, 10);
        } else {
          var downIconWidth = this.dropIcon.offsetWidth + parseInt(getComputedStyle(this.dropIcon).marginRight, 10);
          elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * parseInt(getComputedStyle(this.inputElement).paddingRight, 10));
        }
        if (this.floatLabelType !== "Never") {
          Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());
        }
      }
    };
    MultiSelect2.prototype.checkPlaceholderSize = function() {
      if (this.showDropDownIcon) {
        var downIconWidth = this.dropIcon.offsetWidth + parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
        this.setPlaceholderSize(downIconWidth);
      } else {
        if (!isNullOrUndefined2(this.dropIcon)) {
          this.setPlaceholderSize(this.showDropDownIcon ? this.dropIcon.offsetWidth : 0);
        }
      }
    };
    MultiSelect2.prototype.setPlaceholderSize = function(downIconWidth) {
      if (isNullOrUndefined2(this.value) || this.value.length === 0) {
        if (this.dropIcon.offsetWidth !== 0) {
          this.searchWrapper.style.width = "calc(100% - " + (downIconWidth + 10) + "px";
        } else {
          addClass2([this.searchWrapper], CUSTOM_WIDTH);
        }
      } else if (!isNullOrUndefined2(this.value)) {
        this.searchWrapper.removeAttribute("style");
        removeClass2([this.searchWrapper], CUSTOM_WIDTH);
      }
    };
    MultiSelect2.prototype.refreshInputHight = function() {
      if (!isNullOrUndefined2(this.searchWrapper)) {
        if ((!this.value || !this.value.length) && (isNullOrUndefined2(this.text) || this.text === "")) {
          this.searchWrapper.classList.remove(ZERO_SIZE);
        } else {
          this.searchWrapper.classList.add(ZERO_SIZE);
        }
      }
    };
    MultiSelect2.prototype.validateValues = function(newValue, oldValue) {
      return JSON.stringify(newValue.slice().sort()) !== JSON.stringify(oldValue.slice().sort());
    };
    MultiSelect2.prototype.updateValueState = function(event2, newVal, oldVal) {
      var newValue = newVal ? newVal : [];
      var oldValue = oldVal ? oldVal : [];
      if (this.initStatus && this.validateValues(newValue, oldValue)) {
        var eventArgs = {
          e: event2,
          oldValue: this.allowObjectBinding ? oldVal : oldVal,
          value: this.allowObjectBinding ? newVal : newVal,
          isInteracted: event2 ? true : false,
          element: this.element,
          event: event2
        };
        if (this.isAngular && this.preventChange) {
          this.preventChange = false;
        } else {
          this.trigger("change", eventArgs);
        }
        this.updateTempValue();
        if (!this.changeOnBlur) {
          this.dispatchEvent(this.hiddenElement, "change");
        }
      }
      this.selectedValueInfo = this.viewPortInfo;
    };
    MultiSelect2.prototype.updateTempValue = function() {
      if (!this.value) {
        this.tempValues = this.value;
      } else {
        this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
      }
    };
    MultiSelect2.prototype.updateAriaActiveDescendant = function() {
      if (!isNullOrUndefined2(this.ulElement) && !isNullOrUndefined2(this.ulElement.getElementsByClassName("e-item-focus")[0])) {
        attributes2(this.inputElement, {
          "aria-activedescendant": this.ulElement.getElementsByClassName("e-item-focus")[0].id
        });
      }
    };
    MultiSelect2.prototype.pageUpSelection = function(steps, isVirtualKeyAction) {
      var collection = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
      var previousItem = steps >= 0 ? collection[steps + 1] : collection[0];
      if (this.fields.disabled && previousItem && !this.enableVirtualization) {
        while (previousItem && (previousItem.classList.contains("e-disabled") || previousItem.classList.contains(HIDE_LIST) || previousItem.classList.contains(".e-reorder-hide") || previousItem.classList.contains("e-list-group-item"))) {
          previousItem = previousItem.previousElementSibling;
        }
        if (!previousItem) {
          return;
        }
      }
      if (this.enableVirtualization && isVirtualKeyAction) {
        previousItem = this.liCollections.length >= steps && steps >= 0 ? this.liCollections[steps] : this.liCollections[this.skeletonCount];
      }
      if (!isNullOrUndefined2(previousItem) && previousItem.classList.contains("e-virtual-list")) {
        previousItem = this.liCollections[this.skeletonCount];
      }
      if (this.enableVirtualization) {
        if (!isNullOrUndefined2(previousItem) && !previousItem.classList.contains("e-item-focus")) {
          this.isKeyBoardAction = true;
          this.addListFocus(previousItem);
          this.scrollTop(previousItem, this.getIndexByValue(previousItem.getAttribute("data-value")), this.keyboardEvent.keyCode);
        } else if (this.viewPortInfo.startIndex === 0) {
          this.isKeyBoardAction = true;
          this.scrollTop(previousItem, this.getIndexByValue(previousItem.getAttribute("data-value")), this.keyboardEvent.keyCode);
        }
        this.previousFocusItem = previousItem;
      } else {
        this.isKeyBoardAction = true;
        this.addListFocus(previousItem);
        this.scrollTop(previousItem, this.getIndexByValue(previousItem.getAttribute("data-value")), this.keyboardEvent.keyCode);
      }
    };
    MultiSelect2.prototype.pageDownSelection = function(steps, isVirtualKeyAction) {
      var list = this.getItems();
      var collection = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
      var previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
      if (this.fields.disabled && previousItem && !this.enableVirtualization) {
        while (previousItem && (previousItem.classList.contains("e-disabled") || previousItem.classList.contains(HIDE_LIST) || previousItem.classList.contains(".e-reorder-hide") || previousItem.classList.contains("e-list-group-item"))) {
          previousItem = previousItem.nextElementSibling;
        }
        if (!previousItem) {
          return;
        }
      }
      if (this.enableVirtualization && this.skeletonCount > 0) {
        previousItem = steps < list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
      }
      if (this.enableVirtualization && isVirtualKeyAction) {
        previousItem = steps <= list.length ? this.liCollections[steps] : this.liCollections[list.length - 1];
      }
      this.isKeyBoardAction = true;
      this.addListFocus(previousItem);
      this.previousFocusItem = previousItem;
      this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute("data-value")), false, this.keyboardEvent.keyCode);
    };
    MultiSelect2.prototype.getItems = function() {
      if (!this.list) {
        _super.prototype.render.call(this);
      }
      return this.ulElement && this.ulElement.querySelectorAll("." + dropDownBaseClasses.li).length > 0 ? this.ulElement.querySelectorAll("." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + ")") : [];
    };
    MultiSelect2.prototype.focusInHandler = function(e) {
      var _this = this;
      if (this.enabled) {
        this.showOverAllClear();
        this.inputFocus = true;
        if (this.value && this.value.length) {
          if (this.mode !== "Delimiter" && this.mode !== "CheckBox") {
            this.chipCollectionWrapper.style.display = "";
          } else {
            this.showDelimWrapper();
          }
          if (this.mode !== "CheckBox") {
            this.viewWrapper.style.display = "none";
          }
        }
        if (this.mode !== "CheckBox") {
          this.searchWrapper.classList.remove(ZERO_SIZE);
        }
        this.checkPlaceholderSize();
        if (this.focused) {
          var args = {
            isInteracted: e ? true : false,
            event: e
          };
          this.trigger("focus", args);
          this.focused = false;
        }
        if (!this.overAllWrapper.classList.contains(FOCUS3)) {
          this.overAllWrapper.classList.add(FOCUS3);
        }
        floatLabelFocus(this.overAllWrapper, this.componentWrapper);
        if (this.isPopupOpen()) {
          this.refreshPopup();
        }
        if (this.allowResize) {
          this.setResize();
        }
        setTimeout(function() {
          _this.calculateWidth();
        }, 150);
        return true;
      } else {
        return false;
      }
    };
    MultiSelect2.prototype.showDelimWrapper = function() {
      if (this.mode === "CheckBox") {
        this.viewWrapper.style.display = "";
      } else {
        this.delimiterWrapper.style.display = "";
      }
      this.componentWrapper.classList.add(DELIMITER_VIEW_WRAPPER);
    };
    MultiSelect2.prototype.hideDelimWrapper = function() {
      this.delimiterWrapper.style.display = "none";
      this.componentWrapper.classList.remove(DELIMITER_VIEW_WRAPPER);
    };
    MultiSelect2.prototype.expandTextbox = function() {
      var size = 5;
      if (this.placeholder) {
        var codePoint = this.placeholder.charCodeAt(0);
        var sizeMultiplier = 44032 <= codePoint && codePoint <= 55215 ? 1.5 : 19968 <= codePoint && codePoint <= 40959 ? 2 : 1;
        size = size > this.inputElement.placeholder.length ? size : this.inputElement.placeholder.length * sizeMultiplier;
      }
      if (this.inputElement.value.length > size) {
        this.inputElement.size = this.inputElement.value.length;
      } else {
        this.inputElement.size = size;
      }
    };
    MultiSelect2.prototype.isPopupOpen = function() {
      return this.popupWrapper !== null && this.popupWrapper.parentElement !== null;
    };
    MultiSelect2.prototype.refreshPopup = function() {
      if (this.popupObj && this.mobFilter) {
        this.popupObj.setProperties({
          width: this.calcPopupWidth()
        });
        this.popupObj.refreshPosition(this.overAllWrapper);
        this.popupObj.resolveCollision();
      }
    };
    MultiSelect2.prototype.checkTextLength = function() {
      return this.targetElement().length < 1;
    };
    MultiSelect2.prototype.popupKeyActions = function(e) {
      switch (e.keyCode) {
        case 38:
          this.hidePopup(e);
          if (this.mode === "CheckBox") {
            this.inputElement.focus();
          }
          e.preventDefault();
          break;
        case 40:
          if (!this.isPopupOpen()) {
            this.showPopup(e);
            e.preventDefault();
          }
          break;
      }
    };
    MultiSelect2.prototype.updateAriaAttribute = function() {
      var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
      if (!isNullOrUndefined2(focusedItem)) {
        this.inputElement.setAttribute("aria-activedescendant", focusedItem.id);
        if (this.allowFiltering) {
          var filterInput2 = this.popupWrapper.querySelector("." + FILTERINPUT);
          if (filterInput2) {
            filterInput2.setAttribute("aria-activedescendant", focusedItem.id);
          }
        } else if (this.mode === "CheckBox") {
          this.overAllWrapper.setAttribute("aria-activedescendant", focusedItem.id);
        }
      }
    };
    MultiSelect2.prototype.homeNavigation = function(isHome, isVirtualKeyAction) {
      this.removeFocus();
      if (this.enableVirtualization) {
        if (isHome) {
          if (this.enableVirtualization && this.viewPortInfo.startIndex !== 0) {
            this.viewPortInfo.startIndex = 0;
            this.viewPortInfo.endIndex = this.itemCount;
            this.updateVirtualItemIndex();
            this.resetList(this.dataSource, this.fields, this.query);
          }
        } else {
          if (this.enableVirtualization && (!this.value && this.viewPortInfo.endIndex !== this.totalItemCount || this.value && this.value.length > 0 && this.viewPortInfo.endIndex !== this.totalItemCount + this.value.length)) {
            this.viewPortInfo.startIndex = this.totalItemCount - this.itemCount;
            this.viewPortInfo.endIndex = this.totalItemCount;
            this.updateVirtualItemIndex();
            var query = new Query().clone();
            if (this.value && this.value.length > 0) {
              query = this.getForQuery(this.value).clone();
              query = query.skip(this.totalItemCount - this.itemCount);
            }
            this.resetList(this.dataSource, this.fields, query);
          }
        }
      }
      this.UpdateSkeleton();
      var scrollEle = this.ulElement.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
      if (scrollEle.length > 0) {
        var element2 = scrollEle[isHome ? 0 : scrollEle.length - 1];
        if (this.enableVirtualization && isHome) {
          element2 = scrollEle[this.skeletonCount];
        }
        this.removeFocus();
        element2.classList.add(dropDownBaseClasses.focus);
        if (this.enableVirtualization && isHome) {
          this.scrollTop(element2, void 0, this.keyboardEvent.keyCode);
        } else if (!isVirtualKeyAction) {
          this.scrollBottom(element2, void 0, false, this.keyboardEvent.keyCode);
        }
        this.updateAriaActiveDescendant();
      }
    };
    MultiSelect2.prototype.updateSelectionList = function() {
      if (!isNullOrUndefined2(this.value) && this.value.length) {
        for (var index = 0; index < this.value.length; index++) {
          var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[index]) : this.value[index];
          var selectedItem = this.getElementByValue(value);
          if (selectedItem && !selectedItem.classList.contains(dropDownBaseClasses.selected)) {
            selectedItem.classList.add("e-active");
          }
        }
      }
    };
    MultiSelect2.prototype.handleVirtualKeyboardActions = function(e, pageCount) {
      var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
      var activeIndex;
      this.isKeyBoardAction = true;
      switch (e.keyCode) {
        case 40:
          this.arrowDown(e, true);
          break;
        case 38:
          this.arrowUp(e, true);
          break;
        case 33:
          e.preventDefault();
          if (focusedItem) {
            activeIndex = this.getIndexByValue(this.previousFocusItem.getAttribute("data-value")) - 1;
            this.pageUpSelection(activeIndex, true);
            this.updateAriaAttribute();
          }
          break;
        case 34:
          e.preventDefault();
          if (focusedItem) {
            activeIndex = this.getIndexByValue(this.previousFocusItem.getAttribute("data-value"));
            this.pageDownSelection(activeIndex, true);
            this.updateAriaAttribute();
          }
          break;
        case 35:
        case 36:
          this.isMouseScrollAction = true;
          this.homeNavigation(e.keyCode === 36 ? true : false, true);
          this.isPreventScrollAction = true;
          break;
      }
      this.keyboardEvent = null;
      this.isScrollChanged = true;
      this.isKeyBoardAction = false;
    };
    MultiSelect2.prototype.onKeyDown = function(e) {
      if (this.readonly || !this.enabled && this.mode !== "CheckBox") {
        return;
      }
      this.preventSetCurrentData = false;
      this.keyboardEvent = e;
      if (this.isPreventKeyAction && this.enableVirtualization) {
        e.preventDefault();
      }
      this.keyCode = e.keyCode;
      this.keyDownStatus = true;
      if (e.keyCode > 111 && e.keyCode < 124) {
        return;
      }
      if (e.altKey) {
        this.popupKeyActions(e);
        return;
      } else if (this.isPopupOpen()) {
        var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
        var activeIndex = void 0;
        switch (e.keyCode) {
          case 36:
          case 35:
            this.isMouseScrollAction = true;
            this.isKeyBoardAction = true;
            this.homeNavigation(e.keyCode === 36 ? true : false);
            break;
          case 33:
            e.preventDefault();
            if (focusedItem) {
              activeIndex = this.getIndexByValue(focusedItem.getAttribute("data-value"));
              this.pageUpSelection(activeIndex - this.getPageCount() - 1);
              this.updateAriaAttribute();
            }
            return;
          case 34:
            e.preventDefault();
            if (focusedItem) {
              activeIndex = this.getIndexByValue(focusedItem.getAttribute("data-value"));
              this.pageDownSelection(activeIndex + this.getPageCount());
              this.updateAriaAttribute();
            }
            return;
          case 38:
            this.isKeyBoardAction = true;
            this.arrowUp(e);
            break;
          case 40:
            this.isKeyBoardAction = true;
            this.arrowDown(e);
            break;
          case 27:
            e.preventDefault();
            this.isKeyBoardAction = true;
            this.hidePopup(e);
            if (this.mode === "CheckBox") {
              this.inputElement.focus();
            }
            this.isKeyBoardAction = false;
            return;
          case 13:
            e.preventDefault();
            this.isKeyBoardAction = true;
            if (this.mode !== "CheckBox") {
              this.selectByKey(e);
            }
            this.checkPlaceholderSize();
            this.isKeyBoardAction = false;
            return;
          case 32:
            this.isKeyBoardAction = true;
            this.spaceKeySelection(e);
            this.isKeyBoardAction = false;
            return;
          case 9:
            e.preventDefault();
            this.isKeyBoardAction = true;
            this.hidePopup(e);
            this.inputElement.focus();
            this.overAllWrapper.classList.add(FOCUS3);
        }
      } else {
        switch (e.keyCode) {
          case 13:
          case 9:
          case 16:
          case 17:
          case 20:
            return;
          case 40:
            if (this.openOnClick) {
              this.showPopup();
            }
            break;
          case 27:
            e.preventDefault();
            this.escapeAction();
            return;
        }
      }
      if (this.checkTextLength()) {
        this.keyNavigation(e);
      }
      if (this.mode === "CheckBox" && this.enableSelectionOrder) {
        if (this.allowFiltering) {
          this.previousFilterText = this.targetElement();
        }
        this.checkBackCommand(e);
      }
      this.expandTextbox();
      if (!(this.mode === "CheckBox" && this.showSelectAll)) {
        this.refreshPopup();
      }
      if (this.allowResize) {
        this.setResize();
      }
      this.isKeyBoardAction = false;
    };
    MultiSelect2.prototype.arrowDown = function(e, isVirtualKeyAction) {
      e.preventDefault();
      this.moveByList(1, isVirtualKeyAction);
      this.keyAction = true;
      if (document.activeElement.classList.contains(FILTERINPUT) || this.mode === "CheckBox" && !this.allowFiltering && document.activeElement !== this.list) {
        EventHandler2.add(this.list, "keydown", this.onKeyDown, this);
      }
      this.updateAriaAttribute();
    };
    MultiSelect2.prototype.arrowUp = function(e, isVirtualKeyAction) {
      e.preventDefault();
      this.keyAction = true;
      var list = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
      if (this.enableGroupCheckBox && this.mode === "CheckBox" && !isNullOrUndefined2(this.fields.groupBy)) {
        list = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ",li." + dropDownBaseClasses.group + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
      }
      var focuseElem = this.list.querySelector("li." + dropDownBaseClasses.focus);
      this.focusFirstListItem = !isNullOrUndefined2(this.liCollections[0]) ? this.liCollections[0].classList.contains("e-item-focus") : false;
      var index = Array.prototype.slice.call(list).indexOf(focuseElem);
      if (index <= 0 && this.mode === "CheckBox" && this.allowFiltering) {
        this.keyAction = false;
        this.notify("inputFocus", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox",
          value: "focus"
        });
      }
      this.moveByList(-1, isVirtualKeyAction);
      this.updateAriaAttribute();
    };
    MultiSelect2.prototype.spaceKeySelection = function(e) {
      if (this.mode === "CheckBox") {
        var li = this.list.querySelector("li." + dropDownBaseClasses.focus);
        var selectAllParent = document.getElementsByClassName("e-selectall-parent")[0];
        if (!isNullOrUndefined2(li) || selectAllParent && selectAllParent.classList.contains("e-item-focus")) {
          e.preventDefault();
          this.keyAction = true;
        }
        this.selectByKey(e);
        if (this.keyAction) {
          var li_1 = this.list.querySelector("li." + dropDownBaseClasses.focus);
          if (!isNullOrUndefined2(li_1) && selectAllParent && selectAllParent.classList.contains("e-item-focus")) {
            li_1.classList.remove("e-item-focus");
          }
        }
      }
      this.checkPlaceholderSize();
    };
    MultiSelect2.prototype.checkBackCommand = function(e) {
      if (e.keyCode === 8 && this.allowFiltering ? this.targetElement() !== this.previousFilterText : this.targetElement() === "") {
        this.backCommand = false;
      } else {
        this.backCommand = true;
      }
    };
    MultiSelect2.prototype.keyNavigation = function(e) {
      if (this.mode !== "Delimiter" && this.mode !== "CheckBox" && this.value && this.value.length) {
        switch (e.keyCode) {
          case 37:
            e.preventDefault();
            this.moveBy(-1, e);
            break;
          case 39:
            e.preventDefault();
            this.moveBy(1, e);
            break;
          case 8:
            this.removelastSelection(e);
            break;
          case 46:
            this.removeSelectedChip(e);
            break;
        }
      } else if (e.keyCode === 8 && this.mode === "Delimiter") {
        if (this.value && this.value.length) {
          e.preventDefault();
          var temp = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[this.value.length - 1]) : this.value[this.value.length - 1];
          this.removeValue(this.value[this.value.length - 1], e);
          this.updateDelimeter(this.delimiterChar, e);
          this.focusAtLastListItem(temp);
        }
      }
    };
    MultiSelect2.prototype.selectByKey = function(e) {
      this.removeChipSelection();
      this.selectListByKey(e);
      if (this.hideSelectedItem) {
        this.focusAtFirstListItem();
      }
    };
    MultiSelect2.prototype.escapeAction = function() {
      var temp = this.tempValues ? this.tempValues.slice() : [];
      if (this.allowObjectBinding) {
        temp = this.tempValues ? this.tempValues.slice() : [];
      }
      if (this.value && this.validateValues(this.value, temp)) {
        if (this.mode !== "CheckBox") {
          this.value = temp;
          this.initialValueUpdate();
        }
        if (this.mode !== "Delimiter" && this.mode !== "CheckBox") {
          this.chipCollectionWrapper.style.display = "";
        } else {
          this.showDelimWrapper();
        }
        this.refreshPlaceHolder();
        if (this.value.length) {
          this.showOverAllClear();
        } else {
          this.hideOverAllClear();
        }
      }
      this.makeTextBoxEmpty();
    };
    MultiSelect2.prototype.scrollBottom = function(selectedLI, activeIndex, isInitialSelection, keyCode4, isInitial) {
      if (isInitialSelection === void 0) {
        isInitialSelection = false;
      }
      if (keyCode4 === void 0) {
        keyCode4 = null;
      }
      if (isInitial === void 0) {
        isInitial = false;
      }
      if (!isNullOrUndefined2(selectedLI) && selectedLI.classList.contains("e-virtual-list") || this.enableVirtualization && isNullOrUndefined2(selectedLI)) {
        selectedLI = this.liCollections[this.skeletonCount];
      }
      var selectedListMargin = selectedLI && !isNaN(parseInt(window.getComputedStyle(selectedLI).marginBottom, 10)) ? parseInt(window.getComputedStyle(selectedLI).marginBottom, 10) : 0;
      this.isUpwardScrolling = false;
      var virtualListCount = this.list.querySelectorAll(".e-virtual-list").length;
      var lastElementValue = this.list.querySelector("li:last-of-type") ? this.list.querySelector("li:last-of-type").getAttribute("data-value") : null;
      var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? selectedLI.offsetTop + this.virtualListInfo.startIndex * (selectedLI.offsetHeight + selectedListMargin) : selectedLI.offsetTop;
      var currentOffset = this.list.offsetHeight;
      var nextBottom = selectedLiOffsetTop - virtualListCount * (selectedLI.offsetHeight + selectedListMargin) + (selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
      var nextOffset = this.list.scrollTop + nextBottom - currentOffset;
      var isScrollerCHanged = false;
      var isScrollTopChanged = false;
      var boxRange = selectedLiOffsetTop - virtualListCount * (selectedLI.offsetHeight + selectedListMargin) + (selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
      boxRange = this.fields.groupBy && !isNullOrUndefined2(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.offsetHeight : boxRange;
      if (activeIndex === 0 && !this.enableVirtualization) {
        this.list.scrollTop = 0;
      } else if (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) {
        var currentElementValue = selectedLI ? selectedLI.getAttribute("data-value") : null;
        var liCount = keyCode4 === 34 ? this.getPageCount() - 1 : 1;
        if (!this.enableVirtualization || this.isKeyBoardAction || isInitialSelection) {
          if (this.isKeyBoardAction && this.enableVirtualization && lastElementValue && currentElementValue === lastElementValue && keyCode4 !== 35 && !this.isVirtualScrolling) {
            this.isPreventKeyAction = true;
            this.list.scrollTop += (selectedLI.offsetHeight + selectedListMargin) * liCount;
            this.isPreventKeyAction = this.isScrollerAtEnd() ? false : this.isPreventKeyAction;
            this.isKeyBoardAction = false;
            this.isPreventScrollAction = false;
          } else if (this.enableVirtualization && keyCode4 === 35) {
            this.isPreventKeyAction = false;
            this.isKeyBoardAction = false;
            this.isPreventScrollAction = false;
            this.list.scrollTop = this.list.scrollHeight;
          } else {
            if (keyCode4 === 34 && this.enableVirtualization && !this.isVirtualScrolling) {
              this.isPreventKeyAction = false;
              this.isKeyBoardAction = false;
              this.isPreventScrollAction = false;
            }
            this.list.scrollTop = nextOffset;
          }
        } else {
          this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? isInitial && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight + this.listItemHeight * 2 : this.virtualListInfo.startIndex * this.listItemHeight : 0;
        }
        isScrollerCHanged = this.isKeyBoardAction;
        isScrollTopChanged = true;
      }
      this.isKeyBoardAction = isScrollerCHanged;
    };
    MultiSelect2.prototype.scrollTop = function(selectedLI, activeIndex, keyCode4) {
      if (keyCode4 === void 0) {
        keyCode4 = null;
      }
      var virtualListCount = this.list.querySelectorAll(".e-virtual-list").length;
      var selectedListMargin = selectedLI && !isNaN(parseInt(window.getComputedStyle(selectedLI).marginBottom, 10)) ? parseInt(window.getComputedStyle(selectedLI).marginBottom, 10) : 0;
      var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? selectedLI.offsetTop + this.virtualListInfo.startIndex * (selectedLI.offsetHeight + selectedListMargin) : selectedLI.offsetTop;
      var nextOffset = selectedLiOffsetTop - virtualListCount * (selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
      var firstElementValue = this.list.querySelector("li.e-list-item:not(.e-virtual-list)") ? this.list.querySelector("li.e-list-item:not(.e-virtual-list)").getAttribute("data-value") : null;
      nextOffset = this.fields.groupBy && !isUndefined2(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;
      var boxRange = selectedLiOffsetTop - virtualListCount * (selectedLI.offsetHeight + selectedListMargin) + (selectedLI.offsetHeight + selectedListMargin) - this.list.scrollTop;
      var isPageUpKeyAction = this.enableVirtualization && this.getModuleName() === "autocomplete" && nextOffset <= 0;
      if (activeIndex === 0 && !this.enableVirtualization) {
        this.list.scrollTop = 0;
      } else if (nextOffset < 0 || isPageUpKeyAction) {
        var currentElementValue = selectedLI ? selectedLI.getAttribute("data-value") : null;
        var liCount = keyCode4 === 33 ? this.getPageCount() - 2 : 1;
        if (this.enableVirtualization && this.isKeyBoardAction && firstElementValue && currentElementValue === firstElementValue && keyCode4 !== 36 && !this.isVirtualScrolling) {
          this.isUpwardScrolling = true;
          this.isPreventKeyAction = true;
          this.isKeyBoardAction = false;
          this.list.scrollTop -= (selectedLI.offsetHeight + selectedListMargin) * liCount;
          this.isPreventKeyAction = this.list.scrollTop !== 0 ? this.isPreventKeyAction : false;
          this.isPreventScrollAction = false;
        } else if (this.enableVirtualization && keyCode4 === 36) {
          this.isPreventScrollAction = false;
          this.isPreventKeyAction = true;
          this.isKeyBoardAction = false;
          this.list.scrollTo(0, 0);
        } else {
          if (keyCode4 === 33 && this.enableVirtualization && !this.isVirtualScrolling) {
            this.isPreventKeyAction = false;
            this.isKeyBoardAction = false;
            this.isPreventScrollAction = false;
          }
          this.list.scrollTop = this.list.scrollTop + nextOffset;
        }
      } else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {
        this.list.scrollTop = selectedLI.offsetTop - (this.fields.groupBy && !isNullOrUndefined2(this.fixedHeaderElement) ? this.fixedHeaderElement.offsetHeight : 0);
      }
    };
    MultiSelect2.prototype.isScrollerAtEnd = function() {
      return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
    };
    MultiSelect2.prototype.selectListByKey = function(e) {
      var li = this.list.querySelector("li." + dropDownBaseClasses.focus);
      var limit = this.value && this.value.length ? this.value.length : 0;
      var target;
      if (li !== null) {
        e.preventDefault();
        if (li.classList.contains("e-active")) {
          limit = limit - 1;
        }
        if (this.isValidLI(li) && limit < this.maximumSelectionLength) {
          this.updateListSelection(li, e);
          this.addListFocus(li);
          if (this.mode === "CheckBox") {
            this.updateDelimView();
            this.updateDelimeter(this.delimiterChar, e);
            this.refreshInputHight();
            this.checkPlaceholderSize();
            if (this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy)) {
              target = li.firstElementChild.lastElementChild;
              this.findGroupStart(target);
              this.deselectHeader();
            }
          } else {
            this.updateDelimeter(this.delimiterChar, e);
          }
          var isFilterData = this.targetElement().trim() !== "" ? true : false;
          this.makeTextBoxEmpty();
          if (this.mode !== "CheckBox") {
            this.refreshListItems(li.textContent, isFilterData);
          }
          if (!this.changeOnBlur) {
            this.updateValueState(e, this.value, this.tempValues);
          }
          this.refreshPopup();
        } else {
          if (!this.isValidLI(li) && limit < this.maximumSelectionLength) {
            target = li.firstElementChild.lastElementChild;
            if (target.classList.contains("e-check")) {
              this.selectAllItem(false, e, li);
            } else {
              this.selectAllItem(true, e, li);
            }
          }
        }
        this.refreshSelection();
        if (this.closePopupOnSelect) {
          this.hidePopup(e);
        }
      }
      var selectAllParent = document.getElementsByClassName("e-selectall-parent")[0];
      if (selectAllParent && selectAllParent.classList.contains("e-item-focus")) {
        var selectAllCheckBox = selectAllParent.childNodes[0];
        if (!selectAllCheckBox.classList.contains("e-check")) {
          selectAllCheckBox.classList.add("e-check");
          var args = {
            module: "CheckBoxSelection",
            enable: this.mode === "CheckBox",
            value: "check",
            name: "checkSelectAll"
          };
          this.notify("checkSelectAll", args);
          this.selectAllItem(true, e, li);
        } else {
          selectAllCheckBox.classList.remove("e-check");
          var args = {
            module: "CheckBoxSelection",
            enable: this.mode === "CheckBox",
            value: "check",
            name: "checkSelectAll"
          };
          this.notify("checkSelectAll", args);
          this.selectAllItem(false, e, li);
        }
      }
      this.refreshPlaceHolder();
    };
    MultiSelect2.prototype.refreshListItems = function(data, isFilterData) {
      if ((this.allowFiltering || this.mode === "CheckBox" && this.enableSelectionOrder === true || this.allowCustomValue) && this.mainList && this.listData) {
        var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
        if (this.enableVirtualization) {
          if (this.allowCustomValue && this.virtualCustomData && data == null && this.virtualCustomData && this.viewPortInfo && this.viewPortInfo.startIndex === 0 && this.viewPortInfo.endIndex === this.itemCount) {
            this.virtualCustomData = null;
            this.renderItems(this.mainData, this.fields);
          } else {
            if (this.allowFiltering && isFilterData) {
              this.updateInitialData();
              this.onActionComplete(list, this.mainData);
              this.isVirtualTrackHeight = false;
              if (this.list.getElementsByClassName("e-virtual-ddl")[0]) {
                this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
              } else if (!this.list.querySelector(".e-virtual-ddl") && this.skeletonCount > 0) {
                var virualElement = this.createElement("div", {
                  id: this.element.id + "_popup",
                  className: "e-virtual-ddl",
                  styles: this.GetVirtualTrackHeight()
                });
                this.popupWrapper.querySelector(".e-dropdownbase").appendChild(virualElement);
              }
            } else {
              this.onActionComplete(this.list, this.listData);
            }
          }
        } else {
          this.onActionComplete(list, this.mainData);
        }
        this.focusAtLastListItem(data);
        if (this.value && this.value.length) {
          this.refreshSelection();
        }
      } else if (!isNullOrUndefined2(this.fields.groupBy) && this.value && this.value.length) {
        this.refreshSelection();
      }
    };
    MultiSelect2.prototype.removeSelectedChip = function(e) {
      var selectedElem = this.chipCollectionWrapper.querySelector("span." + CHIP_SELECTED);
      var temp;
      if (selectedElem !== null) {
        if (!isNullOrUndefined2(this.value)) {
          this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
        }
        temp = selectedElem.nextElementSibling;
        if (temp !== null) {
          this.removeChipSelection();
          this.addChipSelection(temp, e);
        }
        var currentChip = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(selectedElem.getAttribute("data-value"))) : selectedElem.getAttribute("data-value");
        this.removeValue(currentChip, e);
        this.updateDelimeter(this.delimiterChar, e);
        this.makeTextBoxEmpty();
      }
      if (this.closePopupOnSelect) {
        this.hidePopup(e);
      }
      this.checkPlaceholderSize();
    };
    MultiSelect2.prototype.moveByTop = function(state) {
      var elements = this.list.querySelectorAll("li." + dropDownBaseClasses.li);
      var index;
      if (elements.length > 1) {
        this.removeFocus();
        index = state ? 0 : elements.length - 1;
        this.addListFocus(elements[index]);
        this.scrollBottom(elements[index], index);
      }
      this.updateAriaAttribute();
    };
    MultiSelect2.prototype.clickHandler = function(e) {
      var targetElement2 = e.target;
      var filterInputClassName = targetElement2.className;
      var selectAllParent = document.getElementsByClassName("e-selectall-parent")[0];
      if ((filterInputClassName === "e-input-filter e-input" || filterInputClassName === "e-input-group e-control-wrapper e-input-focus") && selectAllParent.classList.contains("e-item-focus")) {
        selectAllParent.classList.remove("e-item-focus");
      }
    };
    MultiSelect2.prototype.moveByList = function(position, isVirtualKeyAction) {
      if (this.list) {
        var elements = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
        if (this.mode === "CheckBox" && this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy)) {
          elements = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ",li." + dropDownBaseClasses.group + ":not(." + HIDE_LIST + "):not(.e-reorder-hide)");
        }
        var selectedElem = this.list.querySelector("li." + dropDownBaseClasses.focus);
        if (this.enableVirtualization && isVirtualKeyAction && !isNullOrUndefined2(this.currentFocuedListElement)) {
          selectedElem = this.getElementByValue(this.getFormattedValue(this.currentFocuedListElement.getAttribute("data-value")));
        }
        var temp = -1;
        var selectAllParent = document.getElementsByClassName("e-selectall-parent")[0];
        if (this.mode === "CheckBox" && this.showSelectAll && position === 1 && !isNullOrUndefined2(selectAllParent) && !selectAllParent.classList.contains("e-item-focus") && this.list.getElementsByClassName("e-item-focus").length === 0 && this.liCollections.length > 1) {
          if (!this.focusFirstListItem && selectAllParent.classList.contains("e-item-focus")) {
            selectAllParent.classList.remove("e-item-focus");
          } else if (!selectAllParent.classList.contains("e-item-focus")) {
            selectAllParent.classList.add("e-item-focus");
          }
        } else if (elements.length) {
          if (this.mode === "CheckBox" && this.showSelectAll && !isNullOrUndefined2(selectAllParent && position === -1)) {
            if (!this.focusFirstListItem && selectAllParent.classList.contains("e-item-focus")) {
              selectAllParent.classList.remove("e-item-focus");
            } else if (this.focusFirstListItem && !selectAllParent.classList.contains("e-item-focus")) {
              selectAllParent.classList.add("e-item-focus");
            }
          }
          for (var index = 0; index < elements.length; index++) {
            if (elements[index] === selectedElem) {
              temp = index;
              break;
            }
          }
          if (position > 0) {
            if (temp < elements.length - 1) {
              this.removeFocus();
              if (this.enableVirtualization && isVirtualKeyAction) {
                this.addListFocus(elements[temp]);
              } else {
                if (this.enableVirtualization && elements[temp + 1].classList.contains("e-virtual-list")) {
                  this.addListFocus(elements[this.skeletonCount]);
                } else {
                  this.addListFocus(elements[++temp]);
                }
              }
              if (temp > -1) {
                this.updateCheck(elements[temp]);
                this.scrollBottom(elements[temp], temp);
                this.currentFocuedListElement = elements[temp];
              }
            }
          } else {
            if (temp > 0) {
              if (this.enableVirtualization) {
                var isVirtualElement = elements[temp - 1].classList.contains("e-virtual-list");
                var elementIndex = isVirtualKeyAction ? temp : temp - 1;
                if (isVirtualKeyAction || !isVirtualElement) {
                  this.removeFocus();
                }
                if (isVirtualKeyAction || !isVirtualElement) {
                  this.addListFocus(elements[elementIndex]);
                  this.updateCheck(elements[elementIndex]);
                  this.scrollTop(elements[elementIndex], temp);
                  this.currentFocuedListElement = elements[elementIndex];
                }
              } else {
                this.removeFocus();
                this.addListFocus(elements[--temp]);
                this.updateCheck(elements[temp]);
                this.scrollTop(elements[temp], temp);
              }
            }
          }
        }
      }
      var focusedLi = this.list ? this.list.querySelector(".e-item-focus") : null;
      if (this.isDisabledElement(focusedLi)) {
        if (this.list.querySelectorAll(".e-list-item:not(.e-hide-listitem):not(.e-disabled)").length === 0 || this.keyCode === 38 && this.mode === "CheckBox" && this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy) && focusedLi === this.list.querySelector("li.e-list-group-item")) {
          this.removeFocus();
          return;
        }
        var index = this.getIndexByValue(focusedLi.getAttribute("data-value"));
        if (index === 0) {
          position = 1;
        }
        if (index === this.list.querySelectorAll(".e-list-item:not(.e-hide-listitem)").length - 1) {
          position = -1;
        }
        this.moveByList(position);
      }
    };
    MultiSelect2.prototype.getElementByValue = function(value) {
      var item;
      var listItems = this.getItems();
      for (var _i = 0, listItems_1 = listItems; _i < listItems_1.length; _i++) {
        var liItem = listItems_1[_i];
        if (this.getFormattedValue(liItem.getAttribute("data-value")) === value) {
          item = liItem;
          break;
        }
      }
      return item;
    };
    MultiSelect2.prototype.updateCheck = function(element2) {
      if (this.mode === "CheckBox" && this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy)) {
        var checkElement = element2.firstElementChild.lastElementChild;
        if (checkElement.classList.contains("e-check")) {
          element2.classList.add("e-active");
        } else {
          element2.classList.remove("e-active");
        }
      }
    };
    MultiSelect2.prototype.moveBy = function(position, e) {
      var temp;
      var elements = this.chipCollectionWrapper.querySelectorAll("span." + CHIP2);
      var selectedElem = this.chipCollectionWrapper.querySelector("span." + CHIP_SELECTED);
      if (selectedElem === null) {
        if (position < 0) {
          this.addChipSelection(elements[elements.length - 1], e);
        }
      } else {
        if (position < 0) {
          temp = selectedElem.previousElementSibling;
          if (temp !== null) {
            this.removeChipSelection();
            this.addChipSelection(temp, e);
          }
        } else {
          temp = selectedElem.nextElementSibling;
          this.removeChipSelection();
          if (temp !== null) {
            this.addChipSelection(temp, e);
          }
        }
      }
    };
    MultiSelect2.prototype.chipClick = function(e) {
      if (this.enabled) {
        var elem = closest2(e.target, "." + CHIP2);
        this.removeChipSelection();
        this.addChipSelection(elem, e);
      }
    };
    MultiSelect2.prototype.removeChipSelection = function() {
      if (this.chipCollectionWrapper) {
        this.removeChipFocus();
      }
    };
    MultiSelect2.prototype.addChipSelection = function(element2, e) {
      addClass2([element2], CHIP_SELECTED);
      this.trigger("chipSelection", e);
    };
    MultiSelect2.prototype.onChipRemove = function(e) {
      if (e.which === 3 || e.button === 2) {
        return;
      }
      if (this.enabled && !this.readonly) {
        var element2 = e.target.parentElement;
        var customVal = element2.getAttribute("data-value");
        var value = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(customVal)) : this.getFormattedValue(customVal);
        if (this.allowCustomValue && (customVal !== "false" && value === false || !isNullOrUndefined2(value) && value.toString() === "NaN")) {
          value = customVal;
        }
        if (this.isPopupOpen() && this.mode !== "CheckBox") {
          this.hidePopup(e);
        }
        if (!this.inputFocus) {
          this.inputElement.focus();
        }
        this.removeValue(value, e);
        value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
        if (isNullOrUndefined2(this.findListElement(this.list, "li", "data-value", value)) && this.mainList && this.listData) {
          var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
          this.onActionComplete(list, this.mainData);
        }
        this.updateDelimeter(this.delimiterChar, e);
        if (this.placeholder && this.floatLabelType === "Never") {
          this.makeTextBoxEmpty();
          this.checkPlaceholderSize();
        } else {
          this.inputElement.value = "";
        }
        e.preventDefault();
      }
    };
    MultiSelect2.prototype.makeTextBoxEmpty = function() {
      this.inputElement.value = "";
      this.refreshPlaceHolder();
    };
    MultiSelect2.prototype.refreshPlaceHolder = function() {
      if (this.placeholder && this.floatLabelType === "Never") {
        if (this.value && this.value.length || !isNullOrUndefined2(this.text) && this.text !== "") {
          this.inputElement.placeholder = "";
        } else {
          this.inputElement.placeholder = encodePlaceholder(this.placeholder);
        }
      } else {
        this.setFloatLabelType();
      }
      this.expandTextbox();
    };
    MultiSelect2.prototype.removeAllItems = function(value, eve, isClearAll, element2, mainElement) {
      var index = this.allowObjectBinding ? this.indexOfObjectInArray(value, this.value) : this.value.indexOf(value);
      var removeVal = this.value.slice(0);
      removeVal.splice(index, 1);
      this.setProperties({
        value: [].concat([], removeVal)
      }, true);
      element2.setAttribute("aria-selected", "false");
      var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
      removeClass2([element2], className);
      this.notify("activeList", {
        module: "CheckBoxSelection",
        enable: this.mode === "CheckBox",
        li: element2,
        e: this,
        index
      });
      this.invokeCheckboxSelection(element2, eve, isClearAll);
      var currentValue = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
      this.updateMainList(true, currentValue, mainElement);
      this.updateChipStatus();
    };
    MultiSelect2.prototype.invokeCheckboxSelection = function(element2, eve, isClearAll) {
      this.notify("updatelist", {
        module: "CheckBoxSelection",
        enable: this.mode === "CheckBox",
        li: element2,
        e: eve
      });
      this.updateAriaActiveDescendant();
      if (this.value && this.value.length !== this.mainData.length && this.mode === "CheckBox" && this.showSelectAll && !(this.isSelectAll || isClearAll)) {
        this.notify("checkSelectAll", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox",
          value: "uncheck"
        });
      }
    };
    MultiSelect2.prototype.removeValue = function(value, eve, length, isClearAll) {
      var _this = this;
      var index = this.allowObjectBinding ? this.indexOfObjectInArray(value, this.value) : this.value.indexOf(this.getFormattedValue(value));
      if (index === -1 && this.allowCustomValue && !isNullOrUndefined2(value)) {
        index = this.allowObjectBinding ? this.indexOfObjectInArray(value, this.value) : this.value.indexOf(value.toString());
      }
      var targetEle = eve && eve.target;
      isClearAll = isClearAll || targetEle && targetEle.classList.contains("e-close-hooker") ? true : null;
      var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
      if (index !== -1) {
        var currentValue = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
        var element_1 = this.virtualSelectAll ? null : this.findListElement(this.list, "li", "data-value", currentValue);
        var val_1 = this.allowObjectBinding ? value : this.getDataByValue(value);
        var eventArgs = {
          e: eve,
          item: element_1,
          itemData: val_1,
          isInteracted: eve ? true : false,
          cancel: false
        };
        this.trigger("removing", eventArgs, function(eventArgs2) {
          if (eventArgs2.cancel) {
            _this.removeIndex++;
          } else {
            _this.isRemoveSelection = _this.enableVirtualization ? true : _this.isRemoveSelection;
            _this.currentRemoveValue = _this.allowObjectBinding ? getValue2(_this.fields.value ? _this.fields.value : "", value) : value;
            _this.virtualSelectAll = false;
            var removeVal = _this.value.slice(0);
            removeVal.splice(index, 1);
            if (_this.enableVirtualization && _this.mode === "CheckBox") {
              _this.selectedListData.splice(index, 1);
            }
            _this.setProperties({
              value: [].concat([], removeVal)
            }, true);
            if (_this.enableVirtualization) {
              var currentText = index === 0 && _this.text.split(_this.delimiterChar) && _this.text.split(_this.delimiterChar).length === 1 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index], "") : index === 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, "") : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], "");
              _this.setProperties({
                text: currentText.toString()
              }, true);
            }
            if (element_1 !== null) {
              var currentValue_1 = _this.allowObjectBinding ? getValue2(_this.fields.value ? _this.fields.value : "", value) : value;
              var hideElement = _this.findListElement(_this.mainList, "li", "data-value", currentValue_1);
              element_1.setAttribute("aria-selected", "false");
              removeClass2([element_1], className);
              if (hideElement) {
                hideElement.setAttribute("aria-selected", "false");
                removeClass2([element_1, hideElement], className);
              }
              _this.notify("activeList", {
                module: "CheckBoxSelection",
                enable: _this.mode === "CheckBox",
                li: element_1,
                e: _this,
                index
              });
              _this.invokeCheckboxSelection(element_1, eve, isClearAll);
            }
            var currentValue_2 = _this.allowObjectBinding ? getValue2(_this.fields.value ? _this.fields.value : "", value) : value;
            if (_this.hideSelectedItem && _this.fields.groupBy && element_1) {
              _this.hideGroupItem(currentValue_2);
            }
            if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== "CheckBox" && _this.isPopupOpen()) {
              _super.prototype.scrollStop.call(_this);
            }
            _this.updateMainList(true, currentValue_2);
            _this.removeChip(currentValue_2, isClearAll);
            _this.updateChipStatus();
            var limit = _this.value && _this.value.length ? _this.value.length : 0;
            if (limit < _this.maximumSelectionLength) {
              var collection = _this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-active)");
              removeClass2(collection, "e-disable");
            }
            _this.trigger("removed", eventArgs2);
            var targetEle_1 = eve && eve.currentTarget;
            var isSelectAll = targetEle_1 && targetEle_1.classList.contains("e-selectall-parent") ? true : null;
            if (!_this.changeOnBlur && !isClearAll && eve && length && !isSelectAll && _this.isSelectAllTarget) {
              _this.updateValueState(eve, _this.value, _this.tempValues);
            }
            if (length) {
              _this.selectAllEventData.push(val_1);
              _this.selectAllEventEle.push(element_1);
            }
            if (length === 1) {
              if (!_this.changeOnBlur) {
                _this.updateValueState(eve, _this.value, _this.tempValues);
              }
              var args = {
                event: eve,
                items: _this.selectAllEventEle,
                itemData: _this.selectAllEventData,
                isInteracted: eve ? true : false,
                isChecked: false
              };
              _this.trigger("selectedAll", args);
              _this.selectAllEventData = [];
              _this.selectAllEventEle = [];
            }
            if (isClearAll && (length === 1 || length === null)) {
              _this.clearAllCallback(eve, isClearAll);
            }
            if (_this.isPopupOpen() && element_1 && element_1.parentElement.classList.contains("e-reorder")) {
              if (_this.hideSelectedItem && _this.value && Array.isArray(_this.value) && _this.value.length > 0) {
                _this.totalItemsCount();
              }
              _this.notify("setCurrentViewDataAsync", {
                module: "VirtualScroll"
              });
            }
          }
        });
      }
    };
    MultiSelect2.prototype.updateMainList = function(state, value, mainElement) {
      if (this.allowFiltering || this.mode === "CheckBox") {
        var element2 = mainElement ? mainElement : this.findListElement(this.mainList, "li", "data-value", value);
        if (element2) {
          if (state) {
            element2.setAttribute("aria-selected", "false");
            removeClass2([element2], this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected);
            if (this.mode === "CheckBox") {
              removeClass2([element2.firstElementChild.lastElementChild], "e-check");
            }
          } else {
            element2.setAttribute("aria-selected", "true");
            addClass2([element2], this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected);
            if (this.mode === "CheckBox") {
              addClass2([element2.firstElementChild.lastElementChild], "e-check");
            }
          }
        }
      }
    };
    MultiSelect2.prototype.removeChip = function(value, isClearAll) {
      if (this.chipCollectionWrapper) {
        if (!(this.enableVirtualization && isClearAll)) {
          var element2 = this.findListElement(this.chipCollectionWrapper, "span", "data-value", value);
          if (element2) {
            remove(element2);
          }
        }
      }
    };
    MultiSelect2.prototype.setWidth = function(width) {
      if (!isNullOrUndefined2(width)) {
        if (typeof width === "number") {
          this.overAllWrapper.style.width = formatUnit(width);
        } else if (typeof width === "string") {
          this.overAllWrapper.style.width = width.match(/px|%|em/) ? width : formatUnit(width);
        }
      }
    };
    MultiSelect2.prototype.updateChipStatus = function() {
      if (this.value && this.value.length) {
        if (!isNullOrUndefined2(this.chipCollectionWrapper)) {
          this.chipCollectionWrapper.style.display = "";
        }
        if (this.mode === "Delimiter" || this.mode === "CheckBox") {
          this.showDelimWrapper();
        }
        this.showOverAllClear();
      } else {
        if (!isNullOrUndefined2(this.chipCollectionWrapper)) {
          this.chipCollectionWrapper.style.display = "none";
        }
        if (!isNullOrUndefined2(this.delimiterWrapper)) {
          this.delimiterWrapper.style.display = "none";
        }
        this.hideOverAllClear();
      }
    };
    MultiSelect2.prototype.indexOfObjectInArray = function(objectToFind, array) {
      var _loop_1 = function(i2) {
        var item = array[i2];
        if (Object.keys(objectToFind).every(function(key) {
          return item.hasOwnProperty(key) && item[key] === objectToFind[key];
        })) {
          return {
            value: i2
          };
        }
      };
      for (var i = 0; i < array.length; i++) {
        var state_1 = _loop_1(i);
        if (typeof state_1 === "object") return state_1.value;
      }
      return -1;
    };
    MultiSelect2.prototype.addValue = function(value, text, eve) {
      if (!this.value) {
        this.value = [];
      }
      var currentValue = this.allowObjectBinding ? this.getDataByValue(value) : value;
      if (this.allowObjectBinding && !this.isObjectInArray(this.getDataByValue(value), this.value) || !this.allowObjectBinding && this.value.indexOf(currentValue) < 0) {
        this.setProperties({
          value: [].concat([], this.value, [currentValue])
        }, true);
        if (this.enableVirtualization && !this.isSelectAllLoop) {
          var data = this.viewWrapper.innerHTML;
          var temp = void 0;
          data += this.value.length === 1 ? "" : this.delimiterChar + " ";
          temp = this.getOverflowVal(this.value.length - 1);
          data += temp;
          temp = this.viewWrapper.innerHTML;
          this.updateWrapperText(this.viewWrapper, data);
        }
        if (this.enableVirtualization && this.mode === "CheckBox") {
          var currentText = [];
          var value_1 = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[this.value.length - 1]) : this.value[this.value.length - 1];
          var temp = text;
          var textValues = this.text != null && this.text !== "" ? this.text + this.delimiterChar + temp : temp;
          currentText.push(textValues);
          this.setProperties({
            text: currentText.toString()
          }, true);
        }
      }
      var element2 = this.findListElement(this.list, "li", "data-value", value);
      this.removeFocus();
      if (element2) {
        this.addListFocus(element2);
        this.addListSelection(element2);
      }
      if (this.mode !== "Delimiter" && this.mode !== "CheckBox") {
        this.addChip(text, value, eve);
      }
      if (this.hideSelectedItem && this.fields.groupBy) {
        this.hideGroupItem(value);
      }
      this.updateChipStatus();
      this.checkMaxSelection();
    };
    MultiSelect2.prototype.checkMaxSelection = function() {
      var limit = this.value && this.value.length ? this.value.length : 0;
      if (limit === this.maximumSelectionLength) {
        var activeItems = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ".e-active");
        removeClass2(activeItems, "e-disable");
        var inactiveItems = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-active)");
        addClass2(inactiveItems, "e-disable");
      }
      if (limit < this.maximumSelectionLength) {
        var collection = this.list.querySelectorAll("li." + dropDownBaseClasses.li);
        removeClass2(collection, "e-disable");
      }
    };
    MultiSelect2.prototype.dispatchSelect = function(value, eve, element2, isNotTrigger, length, dataValue, text) {
      var _this = this;
      var list = this.listData;
      if (this.initStatus && !isNotTrigger) {
        value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
        var val_2 = dataValue ? dataValue : this.getDataByValue(value);
        var eventArgs = {
          e: eve,
          item: element2,
          itemData: val_2,
          isInteracted: eve ? true : false,
          cancel: false
        };
        this.trigger("select", eventArgs, function(eventArgs2) {
          if (!eventArgs2.cancel) {
            if (length) {
              _this.selectAllEventData.push(val_2);
              _this.selectAllEventEle.push(element2);
            }
            if (length === 1) {
              var args = {
                event: eve,
                items: _this.selectAllEventEle,
                itemData: _this.selectAllEventData,
                isInteracted: eve ? true : false,
                isChecked: true
              };
              _this.trigger("selectedAll", args);
              _this.selectAllEventData = [];
            }
            if (_this.allowCustomValue && _this.isServerRendered && _this.listData !== list) {
              _this.listData = list;
            }
            value = _this.allowObjectBinding ? _this.getDataByValue(value) : value;
            if (_this.enableVirtualization) {
              if (isNullOrUndefined2(_this.selectedListData)) {
                _this.selectedListData = [_this.getDataByValue(value)];
              } else {
                if (dataValue) {
                  if (Array.isArray(_this.selectedListData)) {
                    _this.selectedListData.push(dataValue);
                  } else {
                    _this.selectedListData = [_this.selectedListData, dataValue];
                  }
                } else {
                  if (Array.isArray(_this.selectedListData)) {
                    _this.selectedListData.push(_this.getDataByValue(value));
                  } else {
                    _this.selectedListData = [_this.selectedListData, _this.getDataByValue(value)];
                  }
                }
              }
            }
            if (_this.enableVirtualization && value || !_this.enableVirtualization) {
              _this.updateListSelectEventCallback(value, element2, eve, text);
            }
            if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== "CheckBox") {
              _super.prototype.scrollStop.call(_this);
            }
          }
        });
      }
    };
    MultiSelect2.prototype.addChip = function(text, value, e) {
      if (this.chipCollectionWrapper) {
        this.getChip(text, value, e);
      }
    };
    MultiSelect2.prototype.removeChipFocus = function() {
      var elements = this.chipCollectionWrapper.querySelectorAll("span." + CHIP2 + "." + CHIP_SELECTED);
      removeClass2(elements, CHIP_SELECTED);
      if (Browser2.isDevice) {
        var closeElements = this.chipCollectionWrapper.querySelectorAll("span." + CHIP_CLOSE2.split(" ")[0]);
        for (var index = 0; index < closeElements.length; index++) {
          closeElements[index].style.display = "none";
        }
      }
    };
    MultiSelect2.prototype.onMobileChipInteraction = function(e) {
      var chipElem = closest2(e.target, "." + CHIP2);
      var chipClose = chipElem.querySelector("span." + CHIP_CLOSE2.split(" ")[0]);
      if (this.enabled && !this.readonly) {
        if (!chipElem.classList.contains(CHIP_SELECTED)) {
          this.removeChipFocus();
          chipClose.style.display = "";
          chipElem.classList.add(CHIP_SELECTED);
        }
        this.refreshPopup();
        e.preventDefault();
      }
    };
    MultiSelect2.prototype.multiCompiler = function(multiselectTemplate) {
      var checkTemplate = false;
      if (typeof multiselectTemplate !== "function" && multiselectTemplate) {
        try {
          checkTemplate = selectAll2(multiselectTemplate, document).length ? true : false;
        } catch (exception) {
          checkTemplate = false;
        }
      }
      return checkTemplate;
    };
    MultiSelect2.prototype.encodeHtmlEntities = function(input2) {
      return input2.replace(/[\u00A0-\u9999<>&]/g, function(match) {
        return "&#" + match.charCodeAt(0) + ";";
      });
    };
    MultiSelect2.prototype.getChip = function(data, value, e) {
      var _this = this;
      var itemData = {
        text: value,
        value
      };
      var chip = this.createElement("span", {
        className: CHIP2,
        attrs: {
          "data-value": value,
          "title": data
        }
      });
      var compiledString;
      var chipContent = this.createElement("span", {
        className: CHIP_CONTENT2
      });
      var chipClose = this.createElement("span", {
        className: CHIP_CLOSE2
      });
      if (this.mainData) {
        itemData = this.getDataByValue(value);
      }
      if (this.valueTemplate && !isNullOrUndefined2(itemData)) {
        var valuecheck = this.multiCompiler(this.valueTemplate);
        if (typeof this.valueTemplate !== "function" && valuecheck) {
          compiledString = compile4(select2(this.valueTemplate, document).innerHTML.trim());
        } else {
          compiledString = compile4(this.valueTemplate);
        }
        var valueCompTemp = compiledString(itemData, this, "valueTemplate", this.valueTemplateId, this.isStringTemplate, null, chipContent);
        if (valueCompTemp && valueCompTemp.length > 0) {
          append(valueCompTemp, chipContent);
        }
        this.renderReactTemplates();
      } else if (this.enableHtmlSanitizer) {
        chipContent.innerText = data;
      } else {
        chipContent.innerHTML = this.encodeHtmlEntities(data.toString());
      }
      chip.appendChild(chipContent);
      var eventArgs = {
        isInteracted: e ? true : false,
        itemData,
        e,
        setClass: function(classes) {
          addClass2([chip], classes);
        },
        cancel: false
      };
      this.isPreventChange = this.isAngular && this.preventChange;
      this.trigger("tagging", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel) {
          if (Browser2.isDevice) {
            chip.classList.add(MOBILE_CHIP);
            append([chipClose], chip);
            chipClose.style.display = "none";
            EventHandler2.add(chip, "click", _this.onMobileChipInteraction, _this);
          } else {
            EventHandler2.add(chip, "mousedown", _this.chipClick, _this);
            if (_this.showClearButton) {
              chip.appendChild(chipClose);
            }
          }
          EventHandler2.add(chipClose, "mousedown", _this.onChipRemove, _this);
          _this.chipCollectionWrapper.appendChild(chip);
          if (!_this.changeOnBlur && e) {
            _this.updateValueState(e, _this.value, _this.tempValues);
          }
        }
      });
    };
    MultiSelect2.prototype.calcPopupWidth = function() {
      var width = formatUnit(this.popupWidth);
      if (width.indexOf("%") > -1) {
        var inputWidth = this.componentWrapper.offsetWidth * parseFloat(width) / 100;
        width = inputWidth.toString() + "px";
      }
      return width;
    };
    MultiSelect2.prototype.mouseIn = function() {
      if (this.enabled && !this.readonly) {
        this.showOverAllClear();
      }
    };
    MultiSelect2.prototype.mouseOut = function() {
      if (!this.inputFocus) {
        this.overAllClear.style.display = "none";
      }
    };
    MultiSelect2.prototype.listOption = function(dataSource, fields) {
      var iconCss = isNullOrUndefined2(fields.iconCss) ? false : true;
      var fieldProperty = isNullOrUndefined2(fields.properties) ? fields : fields.properties;
      this.listCurrentOptions = fields.text !== null || fields.value !== null ? {
        fields: fieldProperty,
        showIcon: iconCss,
        ariaAttributes: {
          groupItemRole: "presentation"
        }
      } : {
        fields: {
          value: "text"
        }
      };
      extend2(this.listCurrentOptions, this.listCurrentOptions, fields, true);
      if (this.mode === "CheckBox") {
        this.notify("listoption", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox",
          dataSource,
          fieldProperty
        });
      }
      return this.listCurrentOptions;
    };
    MultiSelect2.prototype.renderPopup = function() {
      var _this = this;
      if (!this.list) {
        _super.prototype.render.call(this);
      }
      if (this.popupObj && document.body.contains(this.popupObj.element) && this.allowFiltering) {
        this.refreshPopup();
        return;
      }
      if (!this.popupObj) {
        if (!isNullOrUndefined2(this.popupWrapper)) {
          document.body.appendChild(this.popupWrapper);
          var checkboxFilter = this.popupWrapper.querySelector("." + FILTERPARENT);
          if (this.mode === "CheckBox" && !this.allowFiltering && checkboxFilter && this.filterParent) {
            checkboxFilter.remove();
            this.filterParent = null;
          }
          var overAllHeight = parseInt(this.popupHeight, 10);
          this.popupWrapper.style.visibility = "hidden";
          if (this.headerTemplate) {
            this.setHeaderTemplate();
            overAllHeight -= this.header.offsetHeight;
            this.isUpdateHeaderHeight = this.header.offsetHeight !== 0;
          }
          append([this.list], this.popupWrapper);
          if (!this.list.classList.contains(dropDownBaseClasses.noData) && this.getItems()[1]) {
            this.listItemHeight = this.getItems()[1].offsetHeight + parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom, 10);
          }
          if (this.enableVirtualization && !this.list.classList.contains(dropDownBaseClasses.noData)) {
            if (!this.list.querySelector(".e-virtual-ddl-content") && this.list.querySelector(".e-list-parent")) {
              this.list.appendChild(this.createElement("div", {
                className: "e-virtual-ddl-content",
                styles: this.getTransformValues()
              })).appendChild(this.list.querySelector(".e-list-parent"));
            } else if (this.list.querySelector(".e-virtual-ddl-content")) {
              this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
            }
            this.UpdateSkeleton();
            this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
            this.virtualItemCount = this.itemCount;
            if (this.mode !== "CheckBox") {
              this.totalItemsCount();
            }
            if (!this.list.querySelector(".e-virtual-ddl")) {
              var virualElement = this.createElement("div", {
                id: this.element.id + "_popup",
                className: "e-virtual-ddl",
                styles: this.GetVirtualTrackHeight()
              });
              this.popupWrapper.querySelector(".e-dropdownbase").appendChild(virualElement);
            } else {
              this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
            }
          }
          if (this.footerTemplate) {
            this.setFooterTemplate();
            overAllHeight -= this.footer.offsetHeight;
            this.isUpdateFooterHeight = this.footer.offsetHeight !== 0;
          }
          if (this.mode === "CheckBox" && this.showSelectAll) {
            this.notify("selectAll", {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox"
            });
            overAllHeight -= this.selectAllHeight;
          } else if (this.mode === "CheckBox" && !this.showSelectAll && !this.headerTemplate && !this.footerTemplate) {
            this.notify("selectAll", {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox"
            });
            overAllHeight = parseInt(this.popupHeight, 10);
          } else if (this.mode === "CheckBox" && !this.showSelectAll) {
            this.notify("selectAll", {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox"
            });
            overAllHeight = parseInt(this.popupHeight, 10);
            if (this.headerTemplate && this.header) {
              overAllHeight -= this.header.offsetHeight;
            }
            if (this.footerTemplate && this.footer) {
              overAllHeight -= this.footer.offsetHeight;
            }
          }
          if (this.mode === "CheckBox") {
            var args = {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox",
              popupElement: this.popupWrapper
            };
            if (this.allowFiltering) {
              this.notify("searchBox", args);
              overAllHeight -= this.searchBoxHeight;
            }
            addClass2([this.popupWrapper], "e-checkbox");
          }
          if (this.popupHeight !== "auto") {
            this.list.style.maxHeight = formatUnit(overAllHeight);
            this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
          } else {
            this.list.style.maxHeight = formatUnit(this.popupHeight);
          }
          this.popupObj = new Popup(this.popupWrapper, {
            width: this.calcPopupWidth(),
            targetType: "relative",
            position: this.enableRtl ? {
              X: "right",
              Y: "bottom"
            } : {
              X: "left",
              Y: "bottom"
            },
            relateTo: this.overAllWrapper,
            collision: this.enableRtl ? {
              X: "fit",
              Y: "flip"
            } : {
              X: "flip",
              Y: "flip"
            },
            offsetY: 1,
            enableRtl: this.enableRtl,
            zIndex: this.zIndex,
            close: function() {
              if (_this.popupObj.element.parentElement) {
                _this.popupObj.unwireScrollEvents();
                var checkboxFilterInput = _this.popupWrapper.querySelector("." + FILTERINPUT);
                if (_this.mode === "CheckBox" && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
                  checkboxFilterInput.blur();
                }
                detach2(_this.popupObj.element);
              }
            },
            open: function() {
              _this.popupObj.resolveCollision();
              if (!_this.isFirstClick) {
                var ulElement = _this.list.querySelector("ul");
                if (ulElement) {
                  if (!(_this.mode !== "CheckBox" && (_this.allowFiltering || _this.allowCustomValue) && _this.targetElement().trim() !== "")) {
                    _this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
                  }
                }
                _this.isFirstClick = true;
              }
              _this.popupObj.wireScrollEvents();
              if (!(_this.mode !== "CheckBox" && (_this.allowFiltering || _this.allowCustomValue) && _this.targetElement().trim() !== "") && !_this.enableVirtualization) {
                _this.loadTemplate();
                if (_this.enableVirtualization && _this.mode === "CheckBox") {
                  _this.UpdateSkeleton();
                }
              }
              _this.isPreventScrollAction = true;
              _this.setScrollPosition();
              if (!_this.list.classList.contains(dropDownBaseClasses.noData) && _this.getItems()[1] && _this.getItems()[1].offsetHeight !== 0) {
                _this.listItemHeight = _this.getItems()[1].offsetHeight + parseInt(window.getComputedStyle(_this.getItems()[1]).marginBottom, 10);
                if (_this.list.getElementsByClassName("e-virtual-ddl-content")[0]) {
                  _this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = _this.getTransformValues();
                }
              }
              if (_this.allowFiltering) {
                _this.notify("inputFocus", {
                  module: "CheckBoxSelection",
                  enable: _this.mode === "CheckBox",
                  value: "focus"
                });
              }
              if (_this.enableVirtualization) {
                _this.notify("bindScrollEvent", {
                  module: "VirtualScroll",
                  component: _this.getModuleName(),
                  enable: _this.enableVirtualization
                });
                setTimeout(function() {
                  if (_this.value) {
                    _this.updateSelectionList();
                  } else if (_this.viewPortInfo && _this.viewPortInfo.offsets.top) {
                    _this.list.scrollTop = _this.viewPortInfo.offsets.top;
                  }
                }, 5);
              }
            },
            targetExitViewport: function() {
              if (!Browser2.isDevice) {
                _this.hidePopup();
              }
            }
          });
          this.checkCollision(this.popupWrapper);
          this.popupContentElement = this.popupObj.element.querySelector(".e-content");
          if (this.mode === "CheckBox" && Browser2.isDevice && this.allowFiltering && this.isDeviceFullScreen) {
            this.notify("deviceSearchBox", {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox"
            });
          }
          if (this.allowResize) {
            this.setResize();
          }
          this.popupObj.close();
          this.popupWrapper.style.visibility = "";
        }
      }
    };
    MultiSelect2.prototype.checkCollision = function(popupEle) {
      if (!(this.mode === "CheckBox" && Browser2.isDevice && this.allowFiltering && this.isDeviceFullScreen)) {
        var collision = isCollide(popupEle);
        if (collision.length > 0) {
          popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + "px";
        }
        this.popupObj.resolveCollision();
      }
    };
    MultiSelect2.prototype.setHeaderTemplate = function() {
      var compiledString;
      if (this.header) {
        this.header.remove();
      }
      this.header = this.createElement("div");
      addClass2([this.header], HEADER3);
      var headercheck = this.multiCompiler(this.headerTemplate);
      if (typeof this.headerTemplate !== "function" && headercheck) {
        compiledString = compile4(select2(this.headerTemplate, document).innerHTML.trim());
      } else {
        compiledString = compile4(this.headerTemplate);
      }
      var elements = compiledString({}, this, "headerTemplate", this.headerTemplateId, this.isStringTemplate, null, this.header);
      if (elements && elements.length > 0) {
        append(elements, this.header);
      }
      if (this.mode === "CheckBox" && this.showSelectAll) {
        prepend([this.header], this.popupWrapper);
      } else {
        append([this.header], this.popupWrapper);
      }
      EventHandler2.add(this.header, "mousedown", this.onListMouseDown, this);
    };
    MultiSelect2.prototype.setFooterTemplate = function() {
      var compiledString;
      if (this.footer) {
        this.footer.remove();
      }
      this.footer = this.createElement("div");
      addClass2([this.footer], FOOTER2);
      var footercheck = this.multiCompiler(this.footerTemplate);
      if (typeof this.footerTemplate !== "function" && footercheck) {
        compiledString = compile4(select2(this.footerTemplate, document).innerHTML.trim());
      } else {
        compiledString = compile4(this.footerTemplate);
      }
      var elements = compiledString({}, this, "footerTemplate", this.footerTemplateId, this.isStringTemplate, null, this.footer);
      if (elements && elements.length > 0) {
        append(elements, this.footer);
      }
      append([this.footer], this.popupWrapper);
      EventHandler2.add(this.footer, "mousedown", this.onListMouseDown, this);
    };
    MultiSelect2.prototype.updateInitialData = function() {
      var currentData = this.selectData;
      var ulElement = this.renderItems(currentData, this.fields);
      this.list.scrollTop = 0;
      this.virtualListInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: this.itemCount
      };
      this.previousStartIndex = 0;
      this.previousEndIndex = this.itemCount;
      if (this.dataSource instanceof DataManager) {
        if (this.remoteDataCount >= 0) {
          this.totalItemCount = this.dataCount = this.remoteDataCount;
        } else {
          this.resetList(this.dataSource);
        }
      } else {
        this.totalItemCount = this.dataCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
      }
      if (this.mode !== "CheckBox") {
        this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
      }
      this.getSkeletonCount();
      this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.totalItemCount <= this.itemCount) ? 0 : this.skeletonCount;
      this.UpdateSkeleton();
      if (this.list.getElementsByClassName("e-virtual-ddl")[0]) {
        this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
      } else if (!this.list.querySelector(".e-virtual-ddl") && this.skeletonCount > 0) {
        var virualElement = this.createElement("div", {
          id: this.element.id + "_popup",
          className: "e-virtual-ddl",
          styles: this.GetVirtualTrackHeight()
        });
        this.popupWrapper.querySelector(".e-dropdownbase").appendChild(virualElement);
      }
      this.listData = currentData;
      this.liCollections = this.list.querySelectorAll(".e-list-item");
      if (this.list.getElementsByClassName("e-virtual-ddl-content")[0]) {
        this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
      }
      if (this.enableVirtualization) {
        this.notify("setGeneratedData", {
          module: "VirtualScroll"
        });
      }
    };
    MultiSelect2.prototype.clearAll = function(e) {
      if (this.enabled && !this.readonly) {
        var temp = void 0;
        this.setDynValue = false;
        this.isClearAllAction = true;
        if (this.value && this.value.length > 0) {
          if (this.allowFiltering) {
            this.refreshListItems(null);
            if (this.mode === "CheckBox" && this.targetInputElement) {
              this.targetInputElement.value = "";
            }
          }
          var liElement = this.list && this.list.querySelectorAll("li.e-list-item");
          if (liElement && liElement.length > 0) {
            this.selectAllItems(false, e);
          } else {
            this.removeIndex = 0;
            for (temp = this.value[this.removeIndex]; this.removeIndex < this.value.length; temp = this.value[this.removeIndex]) {
              this.removeValue(temp, e, null, true);
            }
          }
          this.selectedElementID = null;
          this.inputElement.removeAttribute("aria-activedescendant");
        } else {
          this.clearAllCallback(e);
        }
        this.checkAndResetCache();
        Input.createSpanElement(this.overAllWrapper, this.createElement);
        this.calculateWidth();
        if (!isNullOrUndefined2(this.overAllWrapper) && !isNullOrUndefined2(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0] && this.overAllWrapper.getElementsByClassName("e-float-text-content")[0] && this.floatLabelType !== "Never")) {
          this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon");
        }
        if (this.enableVirtualization) {
          this.updateInitialData();
          if (this.chipCollectionWrapper) {
            this.chipCollectionWrapper.innerHTML = "";
          }
          if (!this.isCustomDataUpdated) {
            this.notify("setGeneratedData", {
              module: "VirtualScroll"
            });
          }
        }
        if (this.enableVirtualization) {
          this.list.scrollTop = 0;
          this.virtualListInfo = null;
          this.previousStartIndex = 0;
          this.previousEndIndex = this.itemCount;
        }
        this.isClearAllAction = false;
      }
      this.isClearAllItem = true;
      EventHandler2.add(document, "mouseup", this.preventSelection, this);
    };
    MultiSelect2.prototype.preventSelection = function(e) {
      if (this.isClearAllItem) {
        e.stopPropagation();
      }
      this.isClearAllItem = false;
      EventHandler2.remove(document, "mouseup", this.preventSelection);
    };
    MultiSelect2.prototype.clearAllCallback = function(e, isClearAll) {
      var tempValues = this.value ? this.value.slice() : [];
      if (this.mainList && this.listData && (this.allowFiltering && this.mode !== "CheckBox" || this.allowCustomValue)) {
        var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
        this.onActionComplete(list, this.mainData);
      }
      this.focusAtFirstListItem();
      this.updateDelimeter(this.delimiterChar, e);
      if (this.mode !== "Box" && (!this.inputFocus || this.mode === "CheckBox")) {
        this.updateDelimView();
      }
      if (this.inputElement.value !== "") {
        this.makeTextBoxEmpty();
        this.search(null);
      }
      this.checkPlaceholderSize();
      if (this.isPopupOpen()) {
        this.refreshPopup();
      }
      if (this.allowResize) {
        this.setResize();
      }
      if (!this.inputFocus) {
        if (this.changeOnBlur) {
          this.updateValueState(e, this.value, tempValues);
        }
        if (this.mode !== "CheckBox") {
          this.inputElement.focus();
        }
      }
      if (this.mode === "CheckBox") {
        this.refreshPlaceHolder();
        this.refreshInputHight();
        if (this.changeOnBlur && isClearAll && (isNullOrUndefined2(this.value) || this.value.length === 0)) {
          this.updateValueState(e, this.value, this.tempValues);
        }
      }
      if (!this.changeOnBlur && isClearAll && (isNullOrUndefined2(this.value) || this.value.length === 0)) {
        this.updateValueState(e, this.value, this.tempValues);
      }
      if (this.mode === "CheckBox" && this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy)) {
        this.updateListItems(this.list.querySelectorAll("li.e-list-item"), this.mainList.querySelectorAll("li.e-list-item"));
      }
      e.preventDefault();
    };
    MultiSelect2.prototype.windowResize = function() {
      this.refreshPopup();
      if ((!this.inputFocus || this.mode === "CheckBox") && this.viewWrapper && this.viewWrapper.parentElement) {
        this.updateDelimView();
      }
    };
    MultiSelect2.prototype.resetValueHandler = function(e) {
      if (!isNullOrUndefined2(this.inputElement)) {
        var formElement = closest2(this.inputElement, "form");
        if (formElement && e.target === formElement) {
          var textVal = this.element.tagName === this.getNgDirective() ? null : this.element.getAttribute("data-initial-value");
          this.text = textVal;
        }
      }
    };
    MultiSelect2.prototype.wireEvent = function() {
      EventHandler2.add(this.componentWrapper, "mousedown", this.wrapperClick, this);
      EventHandler2.add(window, "resize", this.windowResize, this);
      EventHandler2.add(this.inputElement, "focus", this.focusInHandler, this);
      EventHandler2.add(this.inputElement, "keydown", this.onKeyDown, this);
      EventHandler2.add(this.inputElement, "keyup", this.keyUp, this);
      if (this.mode !== "CheckBox") {
        EventHandler2.add(this.inputElement, "input", this.onInput, this);
      }
      EventHandler2.add(this.inputElement, "blur", this.onBlurHandler, this);
      EventHandler2.add(this.componentWrapper, "mouseover", this.mouseIn, this);
      var formElement = closest2(this.inputElement, "form");
      if (formElement) {
        EventHandler2.add(formElement, "reset", this.resetValueHandler, this);
      }
      EventHandler2.add(this.componentWrapper, "mouseout", this.mouseOut, this);
      EventHandler2.add(this.overAllClear, "mousedown", this.clearAll, this);
      EventHandler2.add(this.inputElement, "paste", this.pasteHandler, this);
    };
    MultiSelect2.prototype.onInput = function(e) {
      if (this.keyDownStatus) {
        this.isValidKey = true;
      } else {
        this.isValidKey = false;
      }
      this.keyDownStatus = false;
      if (Browser2.isDevice && Browser2.info.name === "mozilla") {
        this.search(e);
      }
    };
    MultiSelect2.prototype.pasteHandler = function(event2) {
      var _this = this;
      setTimeout(function() {
        _this.expandTextbox();
        _this.search(event2);
      });
    };
    MultiSelect2.prototype.search = function(e) {
      var _this = this;
      this.preventSetCurrentData = false;
      this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
      if (!isNullOrUndefined2(e)) {
        this.keyCode = e.keyCode;
      }
      if (!this.isPopupOpen() && this.openOnClick) {
        this.showPopup(e);
      }
      this.openClick(e);
      if (this.checkTextLength() && !this.allowFiltering && !isNullOrUndefined2(e) && e.keyCode !== 8) {
        this.focusAtFirstListItem();
      } else {
        var text = this.targetElement();
        if (this.allowFiltering) {
          if (this.allowCustomValue) {
            this.isRemoteSelection = true;
          }
          this.checkAndResetCache();
          this.isRequesting = false;
          var eventArgs_1 = {
            preventDefaultAction: false,
            text: this.targetElement(),
            updateData: function(dataSource, query2, fields) {
              if (eventArgs_1.cancel) {
                return;
              }
              _this.isFiltered = true;
              _this.customFilterQuery = query2;
              _this.remoteFilterAction = true;
              _this.dataUpdater(dataSource, query2, fields);
            },
            event: e,
            cancel: false
          };
          this.trigger("filtering", eventArgs_1, function(eventArgs) {
            _this.isFilterPrevented = eventArgs.cancel;
            if (!eventArgs.cancel) {
              if (!_this.isFiltered && !eventArgs.preventDefaultAction) {
                _this.filterAction = true;
                _this.isFilteringAction = true;
                if (_this.dataSource instanceof DataManager && _this.allowCustomValue) {
                  _this.isCustomRendered = false;
                }
                _this.dataUpdater(_this.dataSource, null, _this.fields);
                _this.isFilteringAction = false;
              }
            }
          });
        } else if (this.allowCustomValue) {
          var query = new Query();
          query = this.allowFiltering && text !== "" ? query.where(this.fields.text, "startswith", text, this.ignoreCase, this.ignoreAccent) : query;
          if (this.enableVirtualization) {
            this.dataUpdater(this.dataSource, query, this.fields);
          } else {
            this.dataUpdater(this.mainData, query, this.fields);
          }
          this.UpdateSkeleton();
        } else {
          var liCollections = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-hide-listitem)");
          var type = this.typeOfData(this.listData).typeof;
          var activeElement = Search(this.targetElement(), liCollections, "StartsWith", this.ignoreCase);
          if (this.enableVirtualization && this.targetElement().trim() !== "" && !this.allowFiltering) {
            var updatingincrementalindex = false;
            if (this.viewPortInfo.endIndex >= this.incrementalEndIndex && this.incrementalEndIndex <= this.totalItemCount || this.incrementalEndIndex === 0) {
              updatingincrementalindex = true;
              this.incrementalStartIndex = 0;
              this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;
              this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
              updatingincrementalindex = false;
            }
            if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
              this.updateIncrementalView(0, this.itemCount);
            }
            activeElement = Search(this.targetElement(), this.incrementalLiCollections, this.filterType, true, this.listData, this.fields, type);
            while (isNullOrUndefined2(activeElement) && this.incrementalEndIndex < this.totalItemCount) {
              this.incrementalStartIndex = this.incrementalEndIndex;
              this.incrementalEndIndex = this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100;
              this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);
              updatingincrementalindex = true;
              if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {
                this.updateIncrementalView(0, this.itemCount);
              }
              activeElement = Search(this.targetElement(), this.incrementalLiCollections, this.filterType, true, this.listData, this.fields, type);
              if (!isNullOrUndefined2(activeElement)) {
                break;
              }
              if (isNullOrUndefined2(activeElement) && this.incrementalEndIndex >= this.totalItemCount) {
                this.incrementalStartIndex = 0;
                this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;
                break;
              }
            }
            if (activeElement.index) {
              if (!(this.viewPortInfo.startIndex >= activeElement.index) || !(activeElement.index >= this.viewPortInfo.endIndex)) {
                var startIndex = activeElement.index - (this.itemCount / 2 - 2) > 0 ? activeElement.index - (this.itemCount / 2 - 2) : 0;
                var endIndex = startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : startIndex + this.itemCount;
                if (startIndex !== this.viewPortInfo.startIndex) {
                  this.updateIncrementalView(startIndex, endIndex);
                }
              }
            }
            if (!isNullOrUndefined2(activeElement.item)) {
              var index1 = this.getIndexByValue(activeElement.item.getAttribute("data-value")) - this.skeletonCount;
              if (index1 > this.itemCount / 2) {
                var startIndex = this.viewPortInfo.startIndex + (this.itemCount / 2 - 2) < this.totalItemCount ? this.viewPortInfo.startIndex + (this.itemCount / 2 - 2) : this.totalItemCount;
                var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;
                this.updateIncrementalView(startIndex, endIndex);
              }
              activeElement.item = this.getElementByValue(activeElement.item.getAttribute("data-value"));
            } else {
              this.updateIncrementalView(0, this.itemCount);
              this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
              this.list.scrollTop = 0;
            }
            if (activeElement && activeElement.item) {
              activeElement.item = this.getElementByValue(activeElement.item.getAttribute("data-value"));
            }
          }
          if (activeElement && activeElement.item) {
            this.addListFocus(activeElement.item);
            this.list.scrollTop = activeElement.item.offsetHeight * activeElement.index;
          } else if (this.targetElement() !== "") {
            this.removeFocus();
          } else {
            this.focusAtFirstListItem();
          }
        }
      }
      if (this.enableVirtualization && this.allowFiltering) {
        this.getFilteringSkeletonCount();
      }
    };
    MultiSelect2.prototype.preRender = function() {
      if (this.allowFiltering === null) {
        this.allowFiltering = this.mode === "CheckBox" ? true : false;
      }
      this.preventSetCurrentData = false;
      this.initializeData();
      this.updateDataAttribute(this.htmlAttributes);
      _super.prototype.preRender.call(this);
    };
    MultiSelect2.prototype.getLocaleName = function() {
      return "multi-select";
    };
    MultiSelect2.prototype.initializeData = function() {
      this.mainListCollection = [];
      this.beforePopupOpen = false;
      this.filterAction = false;
      this.remoteFilterAction = false;
      this.isFirstClick = false;
      this.mobFilter = true;
      this.isFiltered = false;
      this.focused = true;
      this.initial = true;
      this.backCommand = true;
      this.isCustomRendered = false;
      this.isRemoteSelection = false;
      this.isSelectAllTarget = true;
      this.viewPortInfo = {
        currentPageNumber: null,
        direction: null,
        sentinelInfo: {},
        offsets: {},
        startIndex: 0,
        endIndex: this.itemCount
      };
    };
    MultiSelect2.prototype.updateData = function(delimiterChar, e, isInitialVirtualData) {
      var data = "";
      var delim = this.mode === "Delimiter" || this.mode === "CheckBox";
      var text = [];
      var temp;
      var tempData = this.listData;
      if (!this.enableVirtualization) {
        this.listData = this.mainData;
      }
      if (!isNullOrUndefined2(this.hiddenElement) && !this.enableVirtualization) {
        this.hiddenElement.innerHTML = "";
      }
      if (!isNullOrUndefined2(this.value)) {
        var valueLength = this.value.length;
        var hiddenElementContent = "";
        var _loop_2 = function(index2) {
          var valueItem = this_1.allowObjectBinding ? getValue2(this_1.fields.value ? this_1.fields.value : "", this_1.value[index2]) : this_1.value[index2];
          var listValue = this_1.findListElement(!isNullOrUndefined2(this_1.mainList) ? this_1.mainList : this_1.ulElement, "li", "data-value", valueItem);
          if (this_1.enableVirtualization) {
            listValue = this_1.findListElement(!isNullOrUndefined2(this_1.list) ? this_1.list : this_1.ulElement, "li", "data-value", valueItem);
          }
          if (isNullOrUndefined2(listValue) && !this_1.allowCustomValue && !this_1.enableVirtualization && this_1.listData && this_1.listData.length > 0) {
            this_1.value.splice(index2, 1);
            index2 -= 1;
            valueLength -= 1;
          } else {
            if (this_1.listData) {
              if (this_1.enableVirtualization) {
                if (delim && !this_1.isDynamicRemoteVirtualData) {
                  data = this_1.delimiterWrapper && this_1.delimiterWrapper.innerHTML === "" ? data : this_1.delimiterWrapper.innerHTML;
                }
                var value = this_1.allowObjectBinding ? getValue2(this_1.fields.value ? this_1.fields.value : "", this_1.value[this_1.value.length - 1]) : this_1.value[this_1.value.length - 1];
                if (this_1.isRemoveSelection) {
                  data = this_1.text.replace(/,/g, delimiterChar + " ") + delimiterChar + " ";
                  text = this_1.text.split(delimiterChar);
                } else {
                  temp = isInitialVirtualData && delim ? this_1.text : this_1.getTextByValue(value);
                  var textValues = this_1.isDynamicRemoteVirtualData && value != null && value !== "" ? this_1.getTextByValue(value) : isInitialVirtualData ? this_1.text : this_1.text && this_1.text !== "" ? this_1.text + this_1.delimiterChar + temp : temp;
                  data += temp + delimiterChar + " ";
                  text.push(textValues);
                  hiddenElementContent = this_1.hiddenElement.innerHTML;
                }
                if (e && e.currentTarget && e.currentTarget.classList.contains("e-chips-close") || e && e.key === "Backspace") {
                  var item_1 = e.target.parentElement.getAttribute("data-value");
                  if (e.key === "Backspace") {
                    var lastChild = this_1.hiddenElement.lastChild;
                    if (lastChild) {
                      this_1.hiddenElement.removeChild(lastChild);
                    }
                  } else {
                    this_1.hiddenElement.childNodes.forEach(function(option) {
                      if (option.value === item_1) {
                        option.parentNode.removeChild(option);
                      }
                    });
                  }
                  hiddenElementContent = this_1.hiddenElement.innerHTML;
                } else {
                  hiddenElementContent += "<option selected value='" + value + "'>" + index2 + "</option>";
                }
                return out_index_1 = index2, "break";
              } else {
                temp = this_1.getTextByValue(valueItem);
              }
            } else {
              temp = valueItem;
            }
            data += temp + delimiterChar + " ";
            text.push(temp);
          }
          hiddenElementContent += '<option selected value="' + valueItem + '">' + index2 + "</option>";
          out_index_1 = index2;
        };
        var this_1 = this, out_index_1;
        for (var index = 0; index < valueLength; index++) {
          var state_2 = _loop_2(index);
          index = out_index_1;
          if (state_2 === "break") break;
        }
        if (!isNullOrUndefined2(this.hiddenElement)) {
          if (this.isRemoveSelection) {
            if (this.findListElement(this.hiddenElement, "option", "value", this.currentRemoveValue)) {
              this.hiddenElement.removeChild(this.findListElement(this.hiddenElement, "option", "value", this.currentRemoveValue));
            }
            this.isRemoveSelection = false;
          } else {
            this.hiddenElement.innerHTML = hiddenElementContent;
          }
        }
      }
      var isChipRemove = e && e.target && e.target.classList.contains("e-chips-close");
      if (!this.enableVirtualization || this.enableVirtualization && this.mode !== "CheckBox" && !isChipRemove) {
        this.setProperties({
          text: text.toString()
        }, true);
      }
      if (delim) {
        this.updateWrapperText(this.delimiterWrapper, data);
        this.delimiterWrapper.setAttribute("id", getUniqueID("delim_val"));
        this.inputElement.setAttribute("aria-describedby", this.delimiterWrapper.id);
      }
      var targetEle = e && e.target;
      var isClearAll = targetEle && targetEle.classList.contains("e-close-hooker") ? true : null;
      if (!this.changeOnBlur && e && !isClearAll || this.isSelectAll) {
        this.isSelectAll = false;
        this.updateValueState(e, this.value, this.tempValues);
      }
      this.listData = tempData;
      this.addValidInputClass();
    };
    MultiSelect2.prototype.initialTextUpdate = function() {
      if (!isNullOrUndefined2(this.text)) {
        var textArr = this.text.split(this.delimiterChar);
        var textVal = [];
        for (var index = 0; textArr.length > index; index++) {
          var val = this.getValueByText(textArr[index]);
          if (!isNullOrUndefined2(val)) {
            textVal.push(val);
          } else if (this.allowCustomValue) {
            textVal.push(textArr[index]);
          }
        }
        if (textVal && textVal.length) {
          var value = this.allowObjectBinding ? this.getDataByValue(textVal) : textVal;
          this.setProperties({
            value
          }, true);
        }
      } else {
        this.setProperties({
          value: null
        }, true);
      }
    };
    MultiSelect2.prototype.renderList = function(isEmptyData) {
      if (!isEmptyData && this.allowCustomValue && this.list && (this.list.textContent === this.noRecordsTemplate || this.list.querySelector(".e-ul") && this.list.querySelector(".e-ul").childElementCount === 0)) {
        isEmptyData = true;
      }
      _super.prototype.render.call(this, null, isEmptyData);
      this.totalItemCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
      this.unwireListEvents();
      this.wireListEvents();
    };
    MultiSelect2.prototype.initialValueUpdate = function(listItems, isInitialVirtualData) {
      if (this.list) {
        var text = void 0;
        var element2 = void 0;
        var value = void 0;
        if (this.chipCollectionWrapper) {
          this.chipCollectionWrapper.innerHTML = "";
        }
        this.removeListSelection();
        if (!isNullOrUndefined2(this.value)) {
          for (var index = 0; !isNullOrUndefined2(this.value[index]); index++) {
            value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[index]) : this.value[index];
            element2 = this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, "li", "data-value", value);
            var isCustomData = false;
            if (this.enableVirtualization) {
              text = null;
              if (listItems != null && listItems.length > 0) {
                for (var i = 0; i < listItems.length; i++) {
                  if (this.isPrimitiveData && listItems[i] === value || !this.isPrimitiveData && getValue2(this.fields.value ? this.fields.value : "value", listItems[i]) === value) {
                    text = this.isPrimitiveData ? listItems[i] : getValue2(this.fields.text, listItems[i]);
                    if (this.enableVirtualization) {
                      if (isNullOrUndefined2(this.selectedListData)) {
                        this.selectedListData = [listItems[i]];
                      } else {
                        if (Array.isArray(this.selectedListData)) {
                          this.selectedListData.push(listItems[i]);
                        } else {
                          this.selectedListData = [this.selectedListData, listItems[i]];
                        }
                      }
                    }
                    break;
                  }
                }
              }
              if (isNullOrUndefined2(text) && this.allowCustomValue && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && isInitialVirtualData)) {
                text = this.getTextByValue(value);
                isCustomData = true;
              }
            } else {
              text = this.getTextByValue(value);
            }
            if (element2 && element2.getAttribute("aria-selected") !== "true" || element2 && element2.getAttribute("aria-selected") === "true" && this.hideSelectedItem && (this.mode === "Box" || this.mode === "Default") || this.enableVirtualization && value != null && text != null && !isCustomData) {
              var currentText = [];
              var textValues = this.isDynamicRemoteVirtualData && text != null && text !== "" ? text : this.text != null && this.text !== "" ? this.text + this.delimiterChar + text : text;
              currentText.push(textValues);
              this.setProperties({
                text: currentText.toString()
              }, true);
              this.addChip(text, value);
              this.addListSelection(element2);
            } else if (!this.enableVirtualization && value && this.allowCustomValue || this.enableVirtualization && value && this.allowCustomValue && (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && isInitialVirtualData)) {
              var indexItem = this.listData.length;
              var newValue = {};
              setValue3(this.fields.text, value, newValue);
              setValue3(this.fields.value, value, newValue);
              var noDataEle = this.popupWrapper.querySelector("." + dropDownBaseClasses.noData);
              if (!this.enableVirtualization) {
                this.addItem(newValue, indexItem);
              }
              if (this.enableVirtualization) {
                if (this.virtualCustomSelectData && this.virtualCustomSelectData.length >= 0) {
                  this.virtualCustomSelectData.push(newValue);
                } else {
                  this.virtualCustomSelectData = [newValue];
                }
              }
              element2 = element2 ? element2 : this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, "li", "data-value", value);
              if (this.popupWrapper.contains(noDataEle)) {
                this.list.setAttribute("style", noDataEle.getAttribute("style"));
                this.popupWrapper.replaceChild(this.list, noDataEle);
                this.wireListEvents();
              }
              var currentText = [];
              var textValues = this.text != null && this.text !== "" ? this.text + this.delimiterChar + text : text;
              currentText.push(textValues);
              this.setProperties({
                text: currentText.toString()
              }, true);
              this.addChip(text, value);
              this.addListSelection(element2);
            }
          }
        }
        if (this.mode === "CheckBox") {
          this.updateDelimView();
          if (this.changeOnBlur) {
            this.updateValueState(null, this.value, this.tempValues);
          }
          this.updateDelimeter(this.delimiterChar);
          this.refreshInputHight();
        } else {
          this.updateDelimeter(this.delimiterChar, null, isInitialVirtualData);
        }
        if (this.mode === "CheckBox" && this.showSelectAll && (isNullOrUndefined2(this.value) || !this.value.length)) {
          this.notify("checkSelectAll", {
            module: "CheckBoxSelection",
            enable: this.mode === "CheckBox",
            value: "uncheck"
          });
        }
        if (this.mode === "Box" || this.mode === "Default" && this.inputFocus) {
          this.chipCollectionWrapper.style.display = "";
        } else if (this.mode === "Delimiter" || this.mode === "CheckBox") {
          this.showDelimWrapper();
        }
      }
    };
    MultiSelect2.prototype.updateActionCompleteData = function(li, item) {
      if (this.value && (!this.allowObjectBinding && this.value.indexOf(li.getAttribute("data-value")) > -1 || this.allowObjectBinding && this.isObjectInArray(this.getDataByValue(li.getAttribute("data-value")), this.value))) {
        this.mainList = this.ulElement;
        if (this.hideSelectedItem) {
          addClass2([li], HIDE_LIST);
        }
      }
    };
    MultiSelect2.prototype.updateAddItemList = function(list, itemCount) {
      if (this.popupObj && this.popupObj.element && this.popupObj.element.querySelector("." + dropDownBaseClasses.noData) && list) {
        this.list = list;
        this.mainList = this.ulElement = list.querySelector("ul");
        remove(this.popupWrapper.querySelector(".e-content"));
        this.popupObj = null;
        this.renderPopup();
      } else if (this.allowCustomValue) {
        this.list = list;
        this.mainList = this.ulElement = list.querySelector("ul");
      }
    };
    MultiSelect2.prototype.updateDataList = function() {
      if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
        var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
        var isReactTemplateUpdate = this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0 && this.mainList.children[0] && this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount;
        var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0);
        if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
          this.mainList = this.ulElement;
        }
      }
    };
    MultiSelect2.prototype.isValidLI = function(li) {
      return li && !li.classList.contains(dropDownBaseClasses.disabled) && !li.classList.contains(dropDownBaseClasses.group) && li.classList.contains(dropDownBaseClasses.li);
    };
    MultiSelect2.prototype.updateListSelection = function(li, e, length) {
      var customVal = li.getAttribute("data-value");
      var value = this.allowObjectBinding ? this.getDataByValue(this.getFormattedValue(customVal)) : this.getFormattedValue(customVal);
      if (this.allowCustomValue && (customVal !== "false" && value === false || !isNullOrUndefined2(value) && value.toString() === "NaN")) {
        value = customVal;
      }
      this.removeHover();
      if (!this.value || !this.allowObjectBinding && this.value.indexOf(value) === -1 || this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) === -1) {
        this.dispatchSelect(value, e, li, li.getAttribute("aria-selected") === "true", length);
      } else {
        this.removeValue(value, e, length);
      }
    };
    MultiSelect2.prototype.updateListSelectEventCallback = function(value, li, e, currentText) {
      var _this = this;
      value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
      var text = currentText ? currentText : this.getTextByValue(value);
      if ((this.allowCustomValue || this.allowFiltering) && !this.findListElement(this.mainList, "li", "data-value", value) && (!this.enableVirtualization || this.enableVirtualization && this.virtualCustomData)) {
        var temp_1 = li ? li.cloneNode(true) : li;
        var fieldValue = this.fields.value ? this.fields.value : "value";
        if (this.allowCustomValue && this.mainData.length && typeof getValue2(fieldValue, this.mainData[0]) === "number") {
          value = !isNaN(parseFloat(value.toString())) ? parseFloat(value.toString()) : value;
        }
        var data_1 = this.getDataByValue(value);
        var eventArgs = {
          newData: data_1,
          cancel: false
        };
        this.trigger("customValueSelection", eventArgs, function(eventArgs2) {
          if (!eventArgs2.cancel) {
            if (_this.enableVirtualization && _this.virtualCustomData) {
              if (_this.virtualCustomSelectData && _this.virtualCustomSelectData.length >= 0) {
                _this.virtualCustomSelectData.push(data_1);
              } else {
                _this.virtualCustomSelectData = [data_1];
              }
              _this.remoteCustomValue = false;
              _this.addValue(value, text, e);
            } else {
              append([temp_1], _this.mainList);
              _this.mainData.push(data_1);
              _this.remoteCustomValue = false;
              _this.addValue(value, text, e);
            }
          }
        });
      } else {
        this.remoteCustomValue = false;
        this.addValue(value, text, e);
      }
    };
    MultiSelect2.prototype.removeListSelection = function() {
      var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
      var selectedItems = this.list.querySelectorAll("." + className);
      var temp = selectedItems.length;
      if (selectedItems && selectedItems.length) {
        removeClass2(selectedItems, className);
        while (temp > 0) {
          selectedItems[temp - 1].setAttribute("aria-selected", "false");
          temp--;
        }
      }
      if (!isNullOrUndefined2(this.mainList)) {
        var selectItems = this.mainList.querySelectorAll("." + className);
        var temp1 = selectItems.length;
        if (selectItems && selectItems.length) {
          removeClass2(selectItems, className);
          while (temp1 > 0) {
            selectItems[temp1 - 1].setAttribute("aria-selected", "false");
            if (this.mode === "CheckBox") {
              if (selectedItems && selectedItems.length > temp1 - 1) {
                removeClass2([selectedItems[temp1 - 1].firstElementChild.lastElementChild], "e-check");
              }
              removeClass2([selectItems[temp1 - 1].firstElementChild.lastElementChild], "e-check");
            }
            temp1--;
          }
        }
      }
    };
    MultiSelect2.prototype.removeHover = function() {
      var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.hover);
      if (hoveredItem && hoveredItem.length) {
        removeClass2(hoveredItem, dropDownBaseClasses.hover);
      }
    };
    MultiSelect2.prototype.removeFocus = function() {
      if (this.list && this.mainList) {
        var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.focus);
        var mainlist = this.mainList.querySelectorAll("." + dropDownBaseClasses.focus);
        if (hoveredItem && hoveredItem.length) {
          removeClass2(hoveredItem, dropDownBaseClasses.focus);
          removeClass2(mainlist, dropDownBaseClasses.focus);
        }
      }
    };
    MultiSelect2.prototype.addListHover = function(li) {
      if (this.enabled && this.isValidLI(li)) {
        this.removeHover();
        addClass2([li], dropDownBaseClasses.hover);
      } else {
        if (li !== null && li.classList.contains("e-list-group-item") && this.enableGroupCheckBox && this.mode === "CheckBox" && !isNullOrUndefined2(this.fields.groupBy)) {
          this.removeHover();
          addClass2([li], dropDownBaseClasses.hover);
        }
      }
    };
    MultiSelect2.prototype.addListFocus = function(element2) {
      if (this.enabled && (this.isValidLI(element2) || this.fields.disabled && this.isDisabledElement(element2))) {
        this.removeFocus();
        addClass2([element2], dropDownBaseClasses.focus);
        this.updateAriaActiveDescendant();
      } else {
        if (this.enableGroupCheckBox && this.mode === "CheckBox" && !isNullOrUndefined2(this.fields.groupBy)) {
          addClass2([element2], dropDownBaseClasses.focus);
          this.updateAriaActiveDescendant();
        }
      }
    };
    MultiSelect2.prototype.addListSelection = function(element2, mainElement) {
      var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
      if (this.isValidLI(element2) && !element2.classList.contains(dropDownBaseClasses.hover)) {
        addClass2([element2], className);
        this.updateMainList(false, element2.getAttribute("data-value"), mainElement);
        element2.setAttribute("aria-selected", "true");
        if (this.mode === "CheckBox" && element2.classList.contains("e-active")) {
          var ariaCheck = element2.getElementsByClassName("e-check").length;
          if (ariaCheck === 0) {
            this.notify("updatelist", {
              module: "CheckBoxSelection",
              enable: this.mode === "CheckBox",
              li: element2,
              e: this
            });
          }
        }
        this.notify("activeList", {
          module: "CheckBoxSelection",
          enable: this.mode === "CheckBox",
          li: element2,
          e: this
        });
        if (this.chipCollectionWrapper) {
          this.removeChipSelection();
        }
        this.selectedElementID = element2.id;
      }
    };
    MultiSelect2.prototype.updateDelimeter = function(delimChar, e, isInitialVirtualData) {
      this.updateData(delimChar, e, isInitialVirtualData);
    };
    MultiSelect2.prototype.onMouseClick = function(e) {
      var _this = this;
      if (!this.isClearAllItem) {
        this.keyCode = null;
        this.scrollFocusStatus = false;
        this.keyboardEvent = null;
        var target = e.target;
        var li = closest2(target, "." + dropDownBaseClasses.li);
        if (this.enableVirtualization && li && li.classList.contains("e-virtual-list")) {
          return;
        }
        var headerLi = closest2(target, "." + dropDownBaseClasses.group);
        if (headerLi && this.enableGroupCheckBox && this.mode === "CheckBox" && this.fields.groupBy) {
          target = target.classList.contains("e-list-group-item") ? target.firstElementChild.lastElementChild : e.target;
          if (target.classList.contains("e-check")) {
            this.selectAllItem(false, e);
            target.classList.remove("e-check");
            target.classList.remove("e-stop");
            closest2(target, ".e-list-group-item").classList.remove("e-active");
            target.setAttribute("aria-selected", "false");
          } else {
            this.selectAllItem(true, e);
            target.classList.remove("e-stop");
            target.classList.add("e-check");
            closest2(target, ".e-list-group-item").classList.add("e-active");
            target.setAttribute("aria-selected", "true");
          }
          this.refreshSelection();
          this.checkSelectAll();
        } else {
          if (this.isValidLI(li)) {
            var limit = this.value && this.value.length ? this.value.length : 0;
            if (li.classList.contains("e-active")) {
              limit = limit - 1;
            }
            if (limit < this.maximumSelectionLength) {
              this.updateListSelection(li, e);
              this.checkPlaceholderSize();
              this.addListFocus(li);
              if ((this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData) {
                if (this.mode !== "CheckBox") {
                  this.focusAtLastListItem(li.getAttribute("data-value"));
                  this.refreshSelection();
                }
              } else {
                this.makeTextBoxEmpty();
              }
            }
            if (this.mode === "CheckBox") {
              this.updateDelimView();
              if (this.value && this.value.length > 50) {
                setTimeout(function() {
                  _this.updateDelimeter(_this.delimiterChar, e);
                }, 0);
              } else {
                this.updateDelimeter(this.delimiterChar, e);
              }
              this.refreshInputHight();
            } else {
              this.updateDelimeter(this.delimiterChar, e);
            }
            this.checkSelectAll();
            this.refreshPopup();
            if (this.allowResize) {
              this.setResize();
            }
            if (this.hideSelectedItem) {
              this.focusAtFirstListItem();
            }
            if (this.closePopupOnSelect) {
              this.hidePopup(e);
            } else {
              e.preventDefault();
            }
            var isFilterData = this.targetElement().trim() !== "" ? true : false;
            this.makeTextBoxEmpty();
            this.findGroupStart(target);
            if (this.mode !== "CheckBox") {
              this.refreshListItems(isNullOrUndefined2(li) ? null : li.textContent, isFilterData);
            }
          } else {
            e.preventDefault();
          }
          if (this.enableVirtualization && this.hideSelectedItem) {
            var visibleListElements = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide):not(.e-virtual-list)");
            if (visibleListElements.length) {
              var actualCount = this.virtualListHeight > 0 ? Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
              if (visibleListElements.length < actualCount + 2) {
                var query = this.getForQuery(this.value).clone();
                query = query.skip(this.virtualItemStartIndex);
                this.resetList(this.dataSource, this.fields, query);
                this.UpdateSkeleton();
                this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li);
                this.virtualItemCount = this.itemCount;
                if (this.mode !== "CheckBox") {
                  this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
                }
                if (!this.list.querySelector(".e-virtual-ddl")) {
                  var virualElement = this.createElement("div", {
                    id: this.element.id + "_popup",
                    className: "e-virtual-ddl",
                    styles: this.GetVirtualTrackHeight()
                  });
                  this.popupWrapper.querySelector(".e-dropdownbase").appendChild(virualElement);
                } else {
                  this.list.getElementsByClassName("e-virtual-ddl")[0].style = this.GetVirtualTrackHeight();
                }
                if (this.list.querySelector(".e-virtual-ddl-content")) {
                  this.list.getElementsByClassName("e-virtual-ddl-content")[0].style = this.getTransformValues();
                }
              }
            }
          }
          this.refreshPlaceHolder();
          this.deselectHeader();
        }
      }
    };
    MultiSelect2.prototype.findGroupStart = function(target) {
      if (this.enableGroupCheckBox && this.mode === "CheckBox" && !isNullOrUndefined2(this.fields.groupBy)) {
        var count = 0;
        var liChecked = 0;
        var liUnchecked = 0;
        var groupValues = void 0;
        if (this.itemTemplate && !target.getElementsByClassName("e-frame").length) {
          while (!target.getElementsByClassName("e-frame").length) {
            target = target.parentElement;
          }
        }
        if (target.classList.contains("e-frame")) {
          target = target.parentElement.parentElement;
        }
        groupValues = this.findGroupAttrtibutes(target, liChecked, liUnchecked, count, 0);
        groupValues = this.findGroupAttrtibutes(target, groupValues[0], groupValues[1], groupValues[2], 1);
        while (!target.classList.contains("e-list-group-item")) {
          if (target.classList.contains("e-list-icon")) {
            target = target.parentElement;
          }
          target = target.previousElementSibling;
          if (target == null) {
            break;
          }
        }
        this.updateCheckBox(target, groupValues[0], groupValues[1], groupValues[2]);
      }
    };
    MultiSelect2.prototype.findGroupAttrtibutes = function(listElement, checked, unChecked, count, position) {
      while (!listElement.classList.contains("e-list-group-item")) {
        if (!(this.fields.disabled && this.isDisabledElement(listElement))) {
          if (listElement.classList.contains("e-list-icon")) {
            listElement = listElement.parentElement;
          }
          if (listElement.getElementsByClassName("e-frame")[0].classList.contains("e-check") && listElement.classList.contains("e-list-item")) {
            checked++;
          } else if (listElement.classList.contains("e-list-item")) {
            unChecked++;
          }
          count++;
        }
        listElement = position ? listElement.nextElementSibling : listElement.previousElementSibling;
        if (listElement == null) {
          break;
        }
      }
      return [checked, unChecked, count];
    };
    MultiSelect2.prototype.updateCheckBox = function(groupHeader, checked, unChecked, count) {
      if (groupHeader === null || !isNullOrUndefined2(this.fields.disabled) && count === 0) {
        return;
      }
      var checkBoxElement = groupHeader.getElementsByClassName("e-frame")[0];
      if (count === checked) {
        checkBoxElement.classList.remove("e-stop");
        checkBoxElement.classList.add("e-check");
        closest2(checkBoxElement, ".e-list-group-item").classList.add("e-active");
        groupHeader.setAttribute("aria-selected", "true");
      } else if (count === unChecked) {
        checkBoxElement.classList.remove("e-check");
        checkBoxElement.classList.remove("e-stop");
        closest2(checkBoxElement, ".e-list-group-item").classList.remove("e-active");
        groupHeader.setAttribute("aria-selected", "false");
      } else if (this.maximumSelectionLength === checked - 1) {
        checkBoxElement.classList.remove("e-stop");
        groupHeader.setAttribute("aria-selected", "true");
        closest2(checkBoxElement, ".e-list-group-item").classList.add("e-active");
        checkBoxElement.classList.add("e-check");
      } else {
        checkBoxElement.classList.remove("e-check");
        checkBoxElement.classList.add("e-stop");
        closest2(checkBoxElement, ".e-list-group-item").classList.add("e-active");
        groupHeader.setAttribute("aria-selected", "false");
      }
    };
    MultiSelect2.prototype.disableGroupHeader = function() {
      var collection = this.list.querySelectorAll("li.e-list-group-item");
      if (collection) {
        for (var index = 0; index < collection.length; index++) {
          var isDisabled = true;
          var target = collection[index].nextElementSibling;
          while (!target.classList.contains("e-list-group-item")) {
            if (!this.isDisabledElement(target)) {
              isDisabled = false;
              break;
            }
            target = target.nextElementSibling;
            if (target == null) {
              break;
            }
          }
          if (isDisabled) {
            this.disableListItem(collection[index]);
          }
        }
      }
    };
    MultiSelect2.prototype.deselectHeader = function() {
      var limit = this.value && this.value.length ? this.value.length : 0;
      var collection = this.list.querySelectorAll("li.e-list-group-item:not(.e-active)");
      if (limit < this.maximumSelectionLength) {
        removeClass2(collection, "e-disable");
      }
      if (limit === this.maximumSelectionLength) {
        addClass2(collection, "e-disable");
      }
    };
    MultiSelect2.prototype.onMouseOver = function(e) {
      var currentLi = closest2(e.target, "." + dropDownBaseClasses.li);
      if (currentLi === null && this.mode === "CheckBox" && !isNullOrUndefined2(this.fields.groupBy) && this.enableGroupCheckBox) {
        currentLi = closest2(e.target, "." + dropDownBaseClasses.group);
      }
      this.addListHover(currentLi);
    };
    MultiSelect2.prototype.onMouseLeave = function() {
      this.removeHover();
    };
    MultiSelect2.prototype.onListMouseDown = function(e) {
      e.preventDefault();
      this.scrollFocusStatus = true;
    };
    MultiSelect2.prototype.onDocumentClick = function(e) {
      if (this.mode !== "CheckBox") {
        var target = e.target;
        if (!(!isNullOrUndefined2(this.popupObj) && closest2(target, '[id="' + this.popupObj.element.id + '"]')) && !this.overAllWrapper.contains(e.target)) {
          this.scrollFocusStatus = false;
        } else {
          this.scrollFocusStatus = (Browser2.isIE || Browser2.info.name === "edge") && document.activeElement === this.inputElement;
        }
      }
    };
    MultiSelect2.prototype.wireListEvents = function() {
      if (!isNullOrUndefined2(this.list)) {
        EventHandler2.add(document, "mousedown", this.onDocumentClick, this);
        EventHandler2.add(this.list, "mousedown", this.onListMouseDown, this);
        EventHandler2.add(this.list, "mouseup", this.onMouseClick, this);
        EventHandler2.add(this.list, "mouseover", this.onMouseOver, this);
        EventHandler2.add(this.list, "mouseout", this.onMouseLeave, this);
      }
    };
    MultiSelect2.prototype.unwireListEvents = function() {
      EventHandler2.remove(document, "mousedown", this.onDocumentClick);
      if (this.list) {
        EventHandler2.remove(this.list, "mousedown", this.onListMouseDown);
        EventHandler2.remove(this.list, "mouseup", this.onMouseClick);
        EventHandler2.remove(this.list, "mouseover", this.onMouseOver);
        EventHandler2.remove(this.list, "mouseout", this.onMouseLeave);
      }
    };
    MultiSelect2.prototype.hideOverAllClear = function() {
      if (!this.value || !this.value.length || this.inputElement.value === "") {
        this.overAllClear.style.display = "none";
      }
    };
    MultiSelect2.prototype.showOverAllClear = function() {
      if ((this.value && this.value.length || this.inputElement.value !== "") && this.showClearButton && this.readonly !== true) {
        this.overAllClear.style.display = "";
      } else {
        this.overAllClear.style.display = "none";
      }
    };
    MultiSelect2.prototype.focusIn = function() {
      if (document.activeElement !== this.inputElement && this.enabled) {
        this.inputElement.focus();
      }
    };
    MultiSelect2.prototype.focusOut = function() {
      if (document.activeElement === this.inputElement && this.enabled) {
        this.inputElement.blur();
      }
    };
    MultiSelect2.prototype.showSpinner = function() {
      if (isNullOrUndefined2(this.spinnerElement)) {
        var filterClear = this.filterParent && this.filterParent.querySelector(".e-clear-icon.e-icons");
        if (this.overAllClear.style.display !== "none" || filterClear) {
          this.spinnerElement = filterClear ? filterClear : this.overAllClear;
        } else {
          this.spinnerElement = this.createElement("span", {
            className: CLOSEICON_CLASS2 + " " + SPINNER_CLASS2
          });
          this.componentWrapper.appendChild(this.spinnerElement);
        }
        createSpinner({
          target: this.spinnerElement,
          width: Browser2.isDevice ? "16px" : "14px"
        }, this.createElement);
        addClass2([this.spinnerElement], DISABLE_ICON);
        showSpinner(this.spinnerElement);
      }
    };
    MultiSelect2.prototype.hideSpinner = function() {
      if (!isNullOrUndefined2(this.spinnerElement)) {
        hideSpinner(this.spinnerElement);
        removeClass2([this.spinnerElement], DISABLE_ICON);
        if (this.spinnerElement.classList.contains(SPINNER_CLASS2)) {
          detach2(this.spinnerElement);
        } else {
          this.spinnerElement.innerHTML = "";
        }
        this.spinnerElement = null;
      }
    };
    MultiSelect2.prototype.updateWrapperText = function(wrapperType, wrapperData) {
      if (this.valueTemplate || !this.enableHtmlSanitizer) {
        wrapperType.innerHTML = this.encodeHtmlEntities(wrapperData);
      } else {
        wrapperType.innerText = wrapperData;
      }
    };
    MultiSelect2.prototype.updateDelimView = function() {
      if (this.delimiterWrapper) {
        this.hideDelimWrapper();
      }
      if (this.chipCollectionWrapper) {
        this.chipCollectionWrapper.style.display = "none";
      }
      if (!isNullOrUndefined2(this.viewWrapper)) {
        this.viewWrapper.style.display = "";
        this.viewWrapper.style.width = "";
        this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER2);
      }
      if (this.value && this.value.length) {
        var data = "";
        var temp = void 0;
        var tempData = void 0;
        var tempIndex = 1;
        var wrapperleng = void 0;
        var remaining = void 0;
        var downIconWidth = 0;
        var overAllContainer = void 0;
        if (!this.enableVirtualization) {
          this.updateWrapperText(this.viewWrapper, data);
        }
        var l10nLocale = {
          noRecordsTemplate: "No records found",
          actionFailureTemplate: "Request failed",
          overflowCountTemplate: "+${count} more..",
          totalCountTemplate: "${count} selected"
        };
        var l10n = new L10n2(this.getLocaleName(), l10nLocale, this.locale);
        if (l10n.getConstant("actionFailureTemplate") === "") {
          l10n = new L10n2("dropdowns", l10nLocale, this.locale);
        }
        if (l10n.getConstant("noRecordsTemplate") === "") {
          l10n = new L10n2("dropdowns", l10nLocale, this.locale);
        }
        var remainContent = l10n.getConstant("overflowCountTemplate");
        var totalContent = l10n.getConstant("totalCountTemplate");
        var raminElement = this.createElement("span", {
          className: REMAIN_WRAPPER2
        });
        var remainCompildTemp = remainContent.replace("${count}", this.value.length.toString());
        raminElement.innerText = remainCompildTemp;
        this.viewWrapper.appendChild(raminElement);
        this.renderReactTemplates();
        var remainSize = raminElement.offsetWidth;
        remove(raminElement);
        if (this.showDropDownIcon) {
          downIconWidth = this.dropIcon.offsetWidth + parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
        }
        this.checkClearIconWidth();
        if (!isNullOrUndefined2(this.value) && (this.allowCustomValue || this.listData && this.listData.length > 0)) {
          for (var index = 0; !isNullOrUndefined2(this.value[index]); index++) {
            var items = this.text && this.text.split(this.delimiterChar);
            if (!this.enableVirtualization) {
              data += index === 0 ? "" : this.delimiterChar + " ";
              temp = this.getOverflowVal(index);
              data += temp;
              temp = this.viewWrapper.innerHTML;
              this.updateWrapperText(this.viewWrapper, data);
            } else if (items) {
              data += index === 0 ? "" : this.delimiterChar + " ";
              temp = items[index];
              data += temp;
              temp = this.viewWrapper.innerHTML;
              this.updateWrapperText(this.viewWrapper, data);
            }
            wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
            overAllContainer = this.componentWrapper.offsetWidth - parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) - parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
            if (wrapperleng + downIconWidth + this.clearIconWidth > overAllContainer) {
              if (tempData !== void 0 && tempData !== "") {
                temp = tempData;
                index = tempIndex + 1;
              }
              this.updateWrapperText(this.viewWrapper, temp);
              remaining = this.value.length - index;
              wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
              while (wrapperleng + remainSize + downIconWidth + this.clearIconWidth > overAllContainer && wrapperleng !== 0 && this.viewWrapper.innerHTML !== "") {
                var textArr = [];
                this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
                remaining = this.value.length;
                wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
              }
              break;
            } else if (wrapperleng + remainSize + downIconWidth + this.clearIconWidth <= overAllContainer) {
              tempData = data;
              tempIndex = index;
            } else if (index === 0) {
              tempData = "";
              tempIndex = -1;
            }
          }
        }
        if (remaining > 0) {
          var totalWidth = overAllContainer - downIconWidth - this.clearIconWidth;
          this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth));
          this.updateRemainWidth(this.viewWrapper, totalWidth);
          this.updateRemainingText(raminElement, downIconWidth, remaining, remainContent, totalContent);
        }
      } else {
        if (!isNullOrUndefined2(this.viewWrapper)) {
          this.viewWrapper.innerHTML = "";
          this.viewWrapper.style.display = "none";
        }
      }
    };
    MultiSelect2.prototype.checkClearIconWidth = function() {
      if (this.showClearButton) {
        this.clearIconWidth = this.overAllClear.offsetWidth;
      }
    };
    MultiSelect2.prototype.updateRemainWidth = function(viewWrapper, totalWidth) {
      if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER2) && totalWidth < viewWrapper.offsetWidth + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10) + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)) {
        viewWrapper.style.width = totalWidth + "px";
      }
    };
    MultiSelect2.prototype.updateRemainTemplate = function(raminElement, viewWrapper, remaining, remainContent, totalContent, totalWidth) {
      if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 && viewWrapper.firstChild.nodeValue === "") {
        viewWrapper.removeChild(viewWrapper.firstChild);
      }
      raminElement.innerHTML = "";
      var remainTemp = remainContent.replace("${count}", remaining.toString());
      var totalTemp = totalContent.replace("${count}", remaining.toString());
      raminElement.innerText = viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 ? remainTemp : totalTemp;
      if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
        viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER2);
      } else {
        viewWrapper.classList.add(TOTAL_COUNT_WRAPPER2);
        this.updateRemainWidth(viewWrapper, totalWidth);
      }
      return raminElement;
    };
    MultiSelect2.prototype.updateRemainingText = function(raminElement, downIconWidth, remaining, remainContent, totalContent) {
      var overAllContainer = this.componentWrapper.offsetWidth - parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) - parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
      var wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
      if (wrapperleng + downIconWidth >= overAllContainer && wrapperleng !== 0 && this.viewWrapper.firstChild && this.viewWrapper.firstChild.nodeType === 3) {
        while (wrapperleng + downIconWidth > overAllContainer && wrapperleng !== 0 && this.viewWrapper.firstChild && this.viewWrapper.firstChild.nodeType === 3) {
          var textArr = this.viewWrapper.firstChild.nodeValue.split(this.delimiterChar);
          textArr.pop();
          this.viewWrapper.firstChild.nodeValue = textArr.join(this.delimiterChar);
          if (this.viewWrapper.firstChild.nodeValue === "") {
            this.viewWrapper.removeChild(this.viewWrapper.firstChild);
          }
          remaining++;
          wrapperleng = this.viewWrapper.offsetWidth;
        }
        var totalWidth = overAllContainer - downIconWidth;
        this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth);
      }
    };
    MultiSelect2.prototype.getOverflowVal = function(index) {
      var temp;
      if (this.mainData && this.mainData.length) {
        var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[index]) : this.value[index];
        if (this.mode === "CheckBox") {
          var newTemp = this.listData;
          this.listData = this.mainData;
          temp = this.getTextByValue(value);
          this.listData = newTemp;
        } else {
          temp = this.getTextByValue(value);
        }
      } else {
        temp = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[index]) : this.value[index];
      }
      return temp;
    };
    MultiSelect2.prototype.unWireEvent = function() {
      if (!isNullOrUndefined2(this.componentWrapper)) {
        EventHandler2.remove(this.componentWrapper, "mousedown", this.wrapperClick);
      }
      EventHandler2.remove(window, "resize", this.windowResize);
      if (!isNullOrUndefined2(this.inputElement)) {
        EventHandler2.remove(this.inputElement, "focus", this.focusInHandler);
        EventHandler2.remove(this.inputElement, "keydown", this.onKeyDown);
        if (this.mode !== "CheckBox") {
          EventHandler2.remove(this.inputElement, "input", this.onInput);
        }
        EventHandler2.remove(this.inputElement, "keyup", this.keyUp);
        var formElement = closest2(this.inputElement, "form");
        if (formElement) {
          EventHandler2.remove(formElement, "reset", this.resetValueHandler);
        }
        EventHandler2.remove(this.inputElement, "blur", this.onBlurHandler);
      }
      if (!isNullOrUndefined2(this.componentWrapper)) {
        EventHandler2.remove(this.componentWrapper, "mouseover", this.mouseIn);
        EventHandler2.remove(this.componentWrapper, "mouseout", this.mouseOut);
      }
      if (!isNullOrUndefined2(this.overAllClear)) {
        EventHandler2.remove(this.overAllClear, "mousedown", this.clearAll);
      }
      if (!isNullOrUndefined2(this.inputElement)) {
        EventHandler2.remove(this.inputElement, "paste", this.pasteHandler);
      }
    };
    MultiSelect2.prototype.resizingWireEvent = function() {
      EventHandler2.add(document, "mousemove", this.resizePopup, this);
      EventHandler2.add(document, "mouseup", this.stopResizing, this);
      EventHandler2.add(document, "touchmove", this.resizePopup, this);
      EventHandler2.add(document, "touchend", this.stopResizing, this);
    };
    MultiSelect2.prototype.resizingUnWireEvent = function() {
      EventHandler2.remove(document, "mousemove", this.resizePopup);
      EventHandler2.remove(document, "mouseup", this.stopResizing);
      EventHandler2.remove(document, "touchmove", this.resizePopup);
      EventHandler2.remove(document, "touchend", this.stopResizing);
    };
    MultiSelect2.prototype.selectAllItem = function(state, event2, list) {
      var li;
      if (!isNullOrUndefined2(this.list)) {
        li = this.list.querySelectorAll(state ? 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' : 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
      }
      if (this.value && this.value.length && event2 && event2.target && closest2(event2.target, ".e-close-hooker") && this.allowFiltering) {
        li = this.mainList.querySelectorAll(state ? 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' : 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
      }
      if (this.enableGroupCheckBox && this.mode === "CheckBox" && !isNullOrUndefined2(this.fields.groupBy)) {
        var target = event2 ? this.groupTemplate ? closest2(event2.target, ".e-list-group-item") : event2.target : null;
        target = event2 && event2.keyCode === 32 ? list : target;
        target = target && target.classList.contains("e-frame") ? target.parentElement.parentElement : target;
        if (target && target.classList.contains("e-list-group-item")) {
          var listElement = target.nextElementSibling;
          if (isNullOrUndefined2(listElement)) {
            return;
          }
          while (listElement.classList.contains("e-list-item")) {
            if (!(this.fields.disabled && this.isDisabledElement(listElement))) {
              if (state) {
                if (!listElement.firstElementChild.lastElementChild.classList.contains("e-check")) {
                  var selectionLimit = this.value && this.value.length ? this.value.length : 0;
                  if (listElement.classList.contains("e-active")) {
                    selectionLimit -= 1;
                  }
                  if (selectionLimit < this.maximumSelectionLength) {
                    this.updateListSelection(listElement, event2);
                  }
                }
              } else {
                if (listElement.firstElementChild.lastElementChild.classList.contains("e-check")) {
                  this.updateListSelection(listElement, event2);
                }
              }
            }
            listElement = listElement.nextElementSibling;
            if (listElement == null) {
              break;
            }
          }
          if (target.classList.contains("e-list-group-item")) {
            var focusedElement = this.list.getElementsByClassName("e-item-focus")[0];
            if (focusedElement) {
              focusedElement.classList.remove("e-item-focus");
            }
            if (state) {
              target.classList.add("e-active");
            } else {
              target.classList.remove("e-active");
            }
            target.classList.add("e-item-focus");
            this.updateAriaActiveDescendant();
          }
          this.textboxValueUpdate();
          this.checkPlaceholderSize();
          if (!this.changeOnBlur && event2) {
            this.updateValueState(event2, this.value, this.tempValues);
          }
        } else {
          this.updateValue(event2, li, state);
        }
      } else {
        this.updateValue(event2, li, state);
      }
      this.addValidInputClass();
    };
    MultiSelect2.prototype.virtualSelectionAll = function(state, li, event2) {
      var _this = this;
      var index = 0;
      var length = li.length;
      var count = this.maximumSelectionLength;
      if (state) {
        this.virtualSelectAll = true;
        length = this.virtualSelectAllData && this.virtualSelectAllData.length !== 0 ? this.virtualSelectAllData.length : length;
        this.listData = this.virtualSelectAllData;
        var ulElement = this.createListItems(this.virtualSelectAllData.slice(0, 30), this.fields);
        var firstItems = ulElement.querySelectorAll("li");
        var fragment_1 = document.createDocumentFragment();
        firstItems.forEach(function(node) {
          fragment_1.appendChild(node.cloneNode(true));
        });
        li.forEach(function(node) {
          fragment_1.appendChild(node.cloneNode(true));
        });
        var concatenatedNodeList = fragment_1.childNodes;
        if (this.virtualSelectAllData instanceof Array) {
          while (index < length && index <= 50 && index < count) {
            this.isSelectAllTarget = length === index + 1;
            if (concatenatedNodeList[index]) {
              var value = this.allowObjectBinding ? this.getDataByValue(concatenatedNodeList[index].getAttribute("data-value")) : this.getFormattedValue(concatenatedNodeList[index].getAttribute("data-value"));
              if (!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0 || this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0) {
                index++;
                continue;
              }
              this.updateListSelection(concatenatedNodeList[index], event2, length - index);
            } else {
              var value = getValue2(this.fields.value ? this.fields.value : "", this.virtualSelectAllData[index]);
              value = this.allowObjectBinding ? this.getDataByValue(value) : value;
              if (!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0 || this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0) {
                index++;
                continue;
              }
              if (this.value && value != null && Array.isArray(this.value) && (!this.allowObjectBinding && this.value.indexOf(value) < 0 || this.allowObjectBinding && !this.isObjectInArray(value, this.value))) {
                this.dispatchSelect(value, event2, null, false, length);
              }
            }
            index++;
          }
          if (length > 50) {
            setTimeout(function() {
              if (_this.virtualSelectAllData && _this.virtualSelectAllData.length > 0) {
                _this.virtualSelectAllData.map(function(obj) {
                  if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) && (!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0 || _this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value))) {
                    var value2 = obj[_this.fields.value];
                    var text = obj[_this.fields.text].toString();
                    _this.dispatchSelect(value2, event2, null, false, length, obj, text);
                  }
                });
              }
              _this.updatedataValueItems(event2);
              _this.isSelectAllLoop = false;
              if (!_this.changeOnBlur) {
                _this.updateValueState(event2, _this.value, _this.tempValues);
                _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
              }
              _this.updateHiddenElement(true);
              if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains("e-item-focus")) {
                var selectAllParent = document.getElementsByClassName("e-selectall-parent")[0];
                if (selectAllParent && selectAllParent.classList.contains("e-item-focus")) {
                  li[index - 1].classList.remove("e-item-focus");
                }
              }
            }, 0);
          }
        }
      } else {
        if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
          this.virtualSelectAllData.map(function(obj) {
            _this.virtualSelectAll = true;
            _this.removeValue(_this.value[index], event2, _this.value.length - index);
          });
        }
        this.updatedataValueItems(event2);
        if (!this.changeOnBlur) {
          this.updateValueState(event2, this.value, this.tempValues);
          this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
        }
        this.updateHiddenElement();
        this.setProperties({
          value: []
        }, true);
        this.virtualSelectAll = false;
        if (!isNullOrUndefined2(this.viewPortInfo.startIndex) && !isNullOrUndefined2(this.viewPortInfo.endIndex)) {
          this.notify("setCurrentViewDataAsync", {
            component: this.getModuleName(),
            module: "VirtualScroll"
          });
        }
      }
      var virtualTrackElement = this.list.getElementsByClassName("e-virtual-ddl")[0];
      if (virtualTrackElement) {
        virtualTrackElement.style = this.GetVirtualTrackHeight();
      }
      this.UpdateSkeleton();
      var virtualContentElement = this.list.getElementsByClassName("e-virtual-ddl-content")[0];
      if (virtualContentElement) {
        virtualContentElement.style = this.getTransformValues();
      }
    };
    MultiSelect2.prototype.updateValue = function(event2, li, state) {
      var _this = this;
      var length = li.length;
      var beforeSelectArgs = {
        event: event2,
        items: state ? li : [],
        itemData: state ? this.listData : [],
        isInteracted: event2 ? true : false,
        isChecked: state,
        preventSelectEvent: false
      };
      this.trigger("beforeSelectAll", beforeSelectArgs);
      if (li && li.length || this.enableVirtualization && !state) {
        var index_1 = 0;
        var count_1 = 0;
        if (this.enableGroupCheckBox) {
          count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
        } else {
          count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
        }
        if (!beforeSelectArgs.preventSelectEvent) {
          if (this.enableVirtualization) {
            this.virtualSelectAllState = state;
            this.virtualSelectAll = true;
            this.CurrentEvent = event2;
            if (!this.virtualSelectAllData) {
              this.resetList(this.dataSource, this.fields, new Query());
            }
            if (this.virtualSelectAllData) {
              this.virtualSelectionAll(state, li, event2);
            }
          } else {
            while (index_1 < length && index_1 <= 50 && index_1 < count_1) {
              this.isSelectAllTarget = length === index_1 + 1;
              this.updateListSelection(li[index_1], event2, length - index_1);
              if (this.enableGroupCheckBox) {
                this.findGroupStart(li[index_1]);
              }
              index_1++;
            }
            if (length > 50) {
              setTimeout(function() {
                while (index_1 < length && index_1 < count_1) {
                  _this.isSelectAllTarget = length === index_1 + 1;
                  _this.updateListSelection(li[index_1], event2, length - index_1);
                  if (_this.enableGroupCheckBox) {
                    _this.findGroupStart(li[index_1]);
                  }
                  index_1++;
                }
                _this.updatedataValueItems(event2);
                if (!_this.changeOnBlur) {
                  _this.updateValueState(event2, _this.value, _this.tempValues);
                  _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
                }
                _this.updateHiddenElement();
                if (_this.popupWrapper && li[index_1 - 1].classList.contains("e-item-focus")) {
                  var selectAllParent = document.getElementsByClassName("e-selectall-parent")[0];
                  if (selectAllParent && selectAllParent.classList.contains("e-item-focus")) {
                    li[index_1 - 1].classList.remove("e-item-focus");
                  }
                }
              }, 0);
            }
          }
        } else {
          for (var i = 0; i < li.length && i < count_1; i++) {
            this.removeHover();
            var customVal = li[i].getAttribute("data-value");
            var value = this.getFormattedValue(customVal);
            value = this.allowObjectBinding ? this.getDataByValue(value) : value;
            var mainElement = this.mainList ? this.mainList.querySelectorAll(state ? 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' : 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[i] : null;
            if (state) {
              this.value = !this.value ? [] : this.value;
              if (!this.allowObjectBinding && this.value.indexOf(value) < 0 || this.allowObjectBinding && !this.isObjectInArray(value, this.value)) {
                this.setProperties({
                  value: [].concat([], this.value, [value])
                }, true);
              }
              this.removeFocus();
              this.addListSelection(li[i], mainElement);
              this.updateChipStatus();
              this.checkMaxSelection();
            } else {
              this.removeAllItems(value, event2, false, li[i], mainElement);
            }
            if (this.enableGroupCheckBox) {
              this.findGroupStart(li[i]);
            }
          }
          if (!state) {
            var limit = this.value && this.value.length ? this.value.length : 0;
            if (limit < this.maximumSelectionLength) {
              var collection = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-active)");
              removeClass2(collection, "e-disable");
            }
          }
          var args = {
            event: event2,
            items: state ? li : [],
            itemData: state ? this.listData : [],
            isInteracted: event2 ? true : false,
            isChecked: state
          };
          this.trigger("selectedAll", args);
        }
      }
      this.updatedataValueItems(event2);
      this.checkPlaceholderSize();
      if (length <= 50 && !beforeSelectArgs.preventSelectEvent) {
        if (!this.changeOnBlur) {
          this.updateValueState(event2, this.value, this.tempValues);
          this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
        }
        if (this.enableVirtualization && this.value && this.value.length > 0 || !this.enableVirtualization) {
          this.updateHiddenElement();
        }
      }
    };
    MultiSelect2.prototype.updateHiddenElement = function(isVirtualSelectAll) {
      var _this = this;
      var hiddenValue = "";
      var wrapperText = "";
      var data = "";
      var text = [];
      if (this.mode === "CheckBox") {
        this.value.map(function(value, index) {
          hiddenValue += '<option selected value ="' + value + '">' + index + "</option>";
          if (!isVirtualSelectAll) {
            if (_this.listData) {
              data = _this.getTextByValue(value);
            } else {
              data = value;
            }
            wrapperText += data + _this.delimiterChar + " ";
            text.push(data);
          }
        });
        this.hiddenElement.innerHTML = hiddenValue;
        if (!isVirtualSelectAll) {
          this.updateWrapperText(this.delimiterWrapper, wrapperText);
          this.setProperties({
            text: text.toString()
          }, true);
        }
        this.delimiterWrapper.setAttribute("id", getUniqueID("delim_val"));
        this.inputElement.setAttribute("aria-describedby", this.delimiterWrapper.id);
        this.refreshInputHight();
        this.refreshPlaceHolder();
      }
    };
    MultiSelect2.prototype.updatedataValueItems = function(event2) {
      this.deselectHeader();
      this.textboxValueUpdate(event2);
    };
    MultiSelect2.prototype.textboxValueUpdate = function(event2) {
      var isRemoveAll = event2 && event2.target && (closest2(event2.target, ".e-selectall-parent") || closest2(event2.target, ".e-close-hooker"));
      if (this.mode !== "Box" && !this.isPopupOpen() && !(this.mode === "CheckBox" && (this.isSelectAll || isRemoveAll))) {
        this.updateDelimView();
      } else {
        this.searchWrapper.classList.remove(ZERO_SIZE);
      }
      if (this.mode === "CheckBox") {
        this.updateDelimView();
        if (!(isRemoveAll || this.isSelectAll) && this.isSelectAllTarget || this.isSelectAll && this.isSelectAllTarget) {
          this.updateDelimeter(this.delimiterChar, event2);
        }
        this.refreshInputHight();
      } else {
        this.updateDelimeter(this.delimiterChar, event2);
      }
      this.refreshPlaceHolder();
    };
    MultiSelect2.prototype.setZIndex = function() {
      if (this.popupObj) {
        this.popupObj.setProperties({
          "zIndex": this.zIndex
        });
      }
    };
    MultiSelect2.prototype.updateDataSource = function(prop) {
      if (isNullOrUndefined2(this.list)) {
        this.renderPopup();
      } else {
        this.resetList(this.dataSource);
      }
      if (this.value && this.value.length) {
        this.setProperties({
          "value": this.value
        });
        this.refreshSelection();
      }
    };
    MultiSelect2.prototype.onLoadSelect = function() {
      this.setDynValue = true;
      this.renderPopup();
    };
    MultiSelect2.prototype.selectAllItems = function(state, event2) {
      var _this = this;
      if (isNullOrUndefined2(this.list)) {
        this.selectAllAction = function() {
          if (_this.mode === "CheckBox" && _this.showSelectAll) {
            var args2 = {
              module: "CheckBoxSelection",
              enable: _this.mode === "CheckBox",
              value: state ? "check" : "uncheck"
            };
            _this.notify("checkSelectAll", args2);
          }
          _this.selectAllItem(state, event2);
          _this.selectAllAction = null;
        };
        _super.prototype.render.call(this);
      } else {
        this.selectAllAction = null;
        if (this.mode === "CheckBox" && this.showSelectAll) {
          var args = {
            value: state ? "check" : "uncheck",
            enable: this.mode === "CheckBox",
            module: "CheckBoxSelection"
          };
          this.notify("checkSelectAll", args);
        }
        this.selectAllItem(state, event2);
      }
      if (!(this.dataSource instanceof DataManager) || this.dataSource instanceof DataManager && this.virtualSelectAllData) {
        this.virtualSelectAll = false;
      }
    };
    MultiSelect2.prototype.getPersistData = function() {
      return this.addOnPersist(["value"]);
    };
    MultiSelect2.prototype.onPropertyChanged = function(newProp, oldProp) {
      if (newProp.dataSource && !isNullOrUndefined2(Object.keys(newProp.dataSource)) || newProp.query && !isNullOrUndefined2(Object.keys(newProp.query))) {
        this.mainList = null;
        this.mainData = null;
        this.isFirstClick = false;
        this.isDynamicDataChange = true;
      }
      if (this.getModuleName() === "multiselect") {
        this.filterAction = false;
        this.setUpdateInitial(["fields", "query", "dataSource"], newProp);
      }
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "query":
          case "dataSource":
            if (this.mode === "CheckBox" && this.showSelectAll) {
              if (!isNullOrUndefined2(this.popupObj)) {
                this.popupObj.destroy();
                this.popupObj = null;
              }
              this.renderPopup();
            }
            break;
          case "htmlAttributes":
            this.updateHTMLAttribute();
            break;
          case "showClearButton":
            this.updateClearButton(newProp.showClearButton);
            break;
          case "text":
            if (this.fields.disabled) {
              this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
            }
            this.updateVal(this.value, this.value, "text");
            break;
          case "value":
            if (this.fields.disabled) {
              this.removeDisabledItemsValue(this.value);
            }
            this.updateVal(this.value, oldProp.value, "value");
            this.addValidInputClass();
            if (!this.closePopupOnSelect && this.isPopupOpen()) {
              this.refreshPopup();
            }
            if (this.isPopupOpen() && this.mode === "CheckBox" && this.list && this.list.querySelector(".e-active.e-disable")) {
              var activeItems = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ".e-active.e-disable");
              removeClass2(activeItems, "e-disable");
            }
            this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;
            break;
          case "width":
            this.setWidth(newProp.width);
            this.popupObj.setProperties({
              width: this.calcPopupWidth()
            });
            break;
          case "placeholder":
            this.refreshPlaceHolder();
            break;
          case "filterBarPlaceholder":
            if (this.allowFiltering) {
              this.notify("filterBarPlaceholder", {
                filterBarPlaceholder: newProp.filterBarPlaceholder
              });
            }
            break;
          case "delimiterChar":
            if (this.mode !== "Box") {
              this.updateDelimView();
            }
            this.updateData(newProp.delimiterChar);
            break;
          case "cssClass":
            this.updateOldPropCssClass(oldProp.cssClass);
            this.updateCssClass();
            this.calculateWidth();
            break;
          case "enableRtl":
            this.enableRTL(newProp.enableRtl);
            _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
            break;
          case "allowResize":
            this.allowResize = newProp.allowResize;
            if (!this.allowResize && this.popupObj) {
              var overAllHeight = parseInt(this.popupHeight, 10);
              if (this.popupHeight !== "auto") {
                this.list.style.maxHeight = formatUnit(overAllHeight);
                this.popupWrapper.style.height = formatUnit(this.popupHeight);
                this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
              } else {
                this.list.style.maxHeight = formatUnit(this.popupHeight);
              }
            }
            break;
          case "readonly":
            this.updateReadonly(newProp.readonly);
            this.hidePopup();
            break;
          case "enabled":
            this.hidePopup();
            this.enable(newProp.enabled);
            break;
          case "showSelectAll":
            if (this.popupObj) {
              this.popupObj.destroy();
              this.popupObj = null;
            }
            this.renderPopup();
            break;
          case "showDropDownIcon":
            this.dropDownIcon();
            break;
          case "floatLabelType":
            this.setFloatLabelType();
            this.addValidInputClass();
            Input.createSpanElement(this.overAllWrapper, this.createElement);
            this.calculateWidth();
            if (!isNullOrUndefined2(this.overAllWrapper) && !isNullOrUndefined2(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0] && this.overAllWrapper.getElementsByClassName("e-float-text-content")[0] && this.floatLabelType !== "Never")) {
              this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon");
            }
            break;
          case "enableSelectionOrder":
            break;
          case "selectAllText":
            this.notify("selectAllText", false);
            break;
          case "popupHeight":
            if (this.popupObj) {
              var overAllHeight = parseInt(this.popupHeight, 10);
              if (this.popupHeight !== "auto") {
                this.list.style.maxHeight = formatUnit(overAllHeight);
                this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
              } else {
                this.list.style.maxHeight = formatUnit(this.popupHeight);
              }
            }
            break;
          case "headerTemplate":
          case "footerTemplate":
            this.reInitializePoup();
            break;
          case "allowFiltering":
            if (this.mode === "CheckBox" && this.popupObj) {
              this.reInitializePoup();
            }
            this.updateSelectElementData(this.allowFiltering);
            break;
          case "fields":
            if (isNullOrUndefined2(this.fields.groupBy)) {
              this.removeScrollEvent();
            }
            break;
          default:
            {
              var msProps = this.getPropObject(prop, newProp, oldProp);
              _super.prototype.onPropertyChanged.call(this, msProps.newProperty, msProps.oldProperty);
            }
            break;
        }
      }
    };
    MultiSelect2.prototype.reInitializePoup = function() {
      if (this.popupObj) {
        this.popupObj.destroy();
        this.popupObj = null;
      }
      this.renderPopup();
    };
    MultiSelect2.prototype.totalItemsCount = function() {
      var dataSourceCount;
      if (this.dataSource instanceof DataManager) {
        if (this.remoteDataCount >= 0) {
          dataSourceCount = this.totalItemCount = this.dataCount = this.remoteDataCount;
        } else {
          this.resetList(this.dataSource);
        }
      } else {
        dataSourceCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
      }
      if (this.mode === "CheckBox") {
        this.totalItemCount = dataSourceCount !== 0 ? dataSourceCount : this.totalItemCount;
      } else {
        if (this.hideSelectedItem) {
          this.totalItemCount = dataSourceCount !== 0 && this.value ? dataSourceCount - this.value.length : this.totalItemCount;
          if (this.allowCustomValue && this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
            for (var i = 0; i < this.virtualCustomSelectData.length; i++) {
              for (var j = 0; j < this.value.length; j++) {
                var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[j]) : this.value[j];
                var customValue = getValue2(this.fields.value ? this.fields.value : "", this.virtualCustomSelectData[i]);
                if (value === customValue) {
                  this.totalItemCount += 1;
                }
              }
            }
          }
        } else {
          this.totalItemCount = dataSourceCount !== 0 ? dataSourceCount : this.totalItemCount;
          if (this.allowCustomValue && this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
            this.totalItemCount += this.virtualCustomSelectData.length;
          }
        }
      }
    };
    MultiSelect2.prototype.presentItemValue = function(ulElement) {
      var valuecheck = [];
      for (var i = 0; i < this.value.length; i++) {
        var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[i]) : this.value[i];
        var checkEle = this.findListElement(this.allowFiltering && !isNullOrUndefined2(this.mainList) ? this.mainList : ulElement, "li", "data-value", value);
        if (!checkEle) {
          var checkvalue = this.allowObjectBinding ? this.getDataByValue(this.value[i]) : this.value[i];
          valuecheck.push(checkvalue);
        }
      }
      return valuecheck;
    };
    MultiSelect2.prototype.addNonPresentItems = function(valuecheck, ulElement, list, event2) {
      var _this = this;
      this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function(e) {
        if (e.result.length > 0) {
          _this.addItem(e.result, list.length);
        }
        _this.updateActionList(ulElement, list, event2);
      });
    };
    MultiSelect2.prototype.updateVal = function(newProp, oldProp, prop) {
      if (!this.list) {
        this.onLoadSelect();
      } else if (this.dataSource instanceof DataManager && (!this.listData || !(this.mainList && this.mainData))) {
        this.onLoadSelect();
      } else {
        var valuecheck = [];
        if (!isNullOrUndefined2(this.value) && !this.allowCustomValue) {
          valuecheck = this.presentItemValue(this.ulElement);
        }
        if (prop === "value" && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined2(this.value) && this.listData != null && !this.enableVirtualization) {
          this.mainData = null;
          this.setDynValue = true;
          this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
        } else {
          if (prop === "text") {
            this.initialTextUpdate();
            newProp = this.value;
          }
          if (isNullOrUndefined2(this.value) || this.value.length === 0) {
            this.tempValues = oldProp;
          }
          if (this.allowCustomValue && (this.mode === "Default" || this.mode === "Box") && this.isReact && this.inputFocus && this.isPopupOpen() && this.mainData !== this.listData) {
            var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
            this.onActionComplete(list, this.mainData);
          }
          if (!this.enableVirtualization || this.enableVirtualization && !(this.dataSource instanceof DataManager)) {
            this.initialValueUpdate();
          } else if (!this.isInitRemoteVirtualData) {
            this.isDynamicRemoteVirtualData = true;
            this.initialValueUpdate(this.listData, true);
            this.isDynamicRemoteVirtualData = false;
            this.initialUpdate();
          }
          if (this.mode !== "Box" && !this.inputFocus) {
            this.updateDelimView();
          }
          if (!this.inputFocus) {
            this.refreshInputHight();
          }
          this.refreshPlaceHolder();
          if (this.mode !== "CheckBox" && this.changeOnBlur) {
            this.updateValueState(null, newProp, oldProp);
          }
          this.checkPlaceholderSize();
        }
      }
      if (!this.changeOnBlur) {
        this.updateValueState(null, newProp, oldProp);
      }
    };
    MultiSelect2.prototype.addItem = function(items, itemIndex) {
      _super.prototype.addItem.call(this, items, itemIndex);
    };
    MultiSelect2.prototype.hidePopup = function(e) {
      var _this = this;
      var delay = 100;
      if (this.isPopupOpen()) {
        var animModel = {
          name: "FadeOut",
          duration: 100,
          delay: delay ? delay : 0
        };
        this.customFilterQuery = null;
        var eventArgs = {
          popup: this.popupObj,
          cancel: false,
          animation: animModel,
          event: e || null
        };
        this.trigger("close", eventArgs, function(eventArgs2) {
          if (!eventArgs2.cancel) {
            if (_this.fields.groupBy && _this.mode !== "CheckBox" && _this.fixedHeaderElement) {
              remove(_this.fixedHeaderElement);
              _this.fixedHeaderElement = null;
            }
            _this.beforePopupOpen = false;
            _this.overAllWrapper.classList.remove(iconAnimation);
            var typedValue = _this.mode === "CheckBox" ? _this.targetElement() : null;
            _this.popupObj.hide(new Animation2(eventArgs2.animation));
            attributes2(_this.inputElement, {
              "aria-expanded": "false"
            });
            _this.inputElement.removeAttribute("aria-owns");
            _this.inputElement.removeAttribute("aria-activedescendant");
            if (_this.allowFiltering) {
              _this.notify("inputFocus", {
                module: "CheckBoxSelection",
                enable: _this.mode === "CheckBox",
                value: "clear"
              });
            }
            _this.popupObj.hide();
            removeClass2([document.body, _this.popupObj.element], "e-popup-full-page");
            EventHandler2.remove(_this.list, "keydown", _this.onKeyDown);
            if (_this.mode === "CheckBox" && _this.showSelectAll) {
              EventHandler2.remove(_this.popupObj.element, "click", _this.clickHandler);
            }
            if (_this.list && _this.list.parentElement && _this.allowResize) {
              if (_this.resizer && _this.list.parentElement.contains(_this.resizer)) {
                _this.list.parentElement.removeChild(_this.resizer);
              }
              if (_this.list.parentElement.classList.contains("e-resize")) {
                _this.list.parentElement.classList.remove("e-resize");
              }
              _this.list.parentElement.style.boxSizing = "";
              _this.list.parentElement.style.paddingBottom = "";
              var overAllHeight = parseInt(_this.popupHeight, 10);
              _this.list.style.maxHeight = formatUnit(overAllHeight);
              _this.list.parentElement.style.height = formatUnit(_this.popupHeight);
              _this.list.parentElement.style.maxHeight = formatUnit(_this.popupHeight);
            }
            if (_this.resizer) {
              EventHandler2.remove(_this.resizer, "mousedown", _this.startResizing);
              _this.resizer.remove();
            }
            if (_this.enableVirtualization && _this.mode === "CheckBox" && _this.value && _this.value.length > 0 && _this.enableSelectionOrder) {
              _this.viewPortInfo.startIndex = _this.virtualItemStartIndex = 0;
              _this.viewPortInfo.endIndex = _this.virtualItemEndIndex = _this.viewPortInfo.startIndex > 0 ? _this.viewPortInfo.endIndex : _this.itemCount;
              _this.virtualListInfo = _this.viewPortInfo;
              _this.previousStartIndex = 0;
              _this.previousEndIndex = _this.itemCount;
            }
            var dataSourceCount = void 0;
            if (_this.dataSource instanceof DataManager) {
              if (_this.remoteDataCount >= 0) {
                _this.totalItemCount = _this.dataCount = _this.remoteDataCount;
              } else {
                _this.resetList(_this.dataSource);
              }
            } else {
              dataSourceCount = _this.dataSource && _this.dataSource.length ? _this.dataSource.length : 0;
            }
            if (_this.enableVirtualization && (_this.allowFiltering || _this.allowCustomValue) && (_this.targetElement() || typedValue) && _this.totalItemCount !== dataSourceCount) {
              _this.checkAndResetCache();
              _this.updateInitialData();
            }
            if (_this.virtualCustomData && _this.viewPortInfo && _this.viewPortInfo.startIndex === 0 && _this.viewPortInfo.endIndex === _this.itemCount) {
              _this.renderItems(_this.mainData, _this.fields);
            }
            _this.virtualCustomData = null;
            _this.isVirtualTrackHeight = false;
          }
        });
      }
    };
    MultiSelect2.prototype.showPopup = function(e) {
      var _this = this;
      if (!this.enabled) {
        return;
      }
      this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
      var args = {
        cancel: false
      };
      this.trigger("beforeOpen", args, function(args2) {
        if (!args2.cancel) {
          if (!_this.ulElement) {
            _this.beforePopupOpen = true;
            if (_this.mode === "CheckBox" && Browser2.isDevice && _this.allowFiltering && _this.isDeviceFullScreen) {
              _this.notify("popupFullScreen", {
                module: "CheckBoxSelection",
                enable: _this.mode === "CheckBox"
              });
            }
            _super.prototype.render.call(_this, e);
            return;
          }
          if (_this.mode === "CheckBox" && Browser2.isDevice && _this.allowFiltering && _this.isDeviceFullScreen) {
            _this.notify("popupFullScreen", {
              module: "CheckBoxSelection",
              enable: _this.mode === "CheckBox"
            });
          }
          var mainLiLength = _this.ulElement.querySelectorAll("li.e-list-item").length;
          var liLength = _this.ulElement.querySelectorAll("li." + dropDownBaseClasses.li + "." + HIDE_LIST).length;
          if (mainLiLength > 0 && mainLiLength === liLength && liLength === _this.mainData.length && !(_this.targetElement() !== "" && _this.allowCustomValue)) {
            _this.beforePopupOpen = false;
            return;
          }
          _this.onPopupShown(e);
          if (_this.enableVirtualization && _this.listData && _this.listData.length) {
            if (!isNullOrUndefined2(_this.value) && (_this.getModuleName() === "dropdownlist" || _this.getModuleName() === "combobox")) {
              _this.removeHover();
            }
            if (!_this.beforePopupOpen) {
              if (_this.hideSelectedItem && _this.value && Array.isArray(_this.value) && _this.value.length > 0) {
                _this.totalItemsCount();
              }
              if (!_this.preventSetCurrentData && !isNullOrUndefined2(_this.viewPortInfo.startIndex) && !isNullOrUndefined2(_this.viewPortInfo.endIndex)) {
                _this.notify("setCurrentViewDataAsync", {
                  component: _this.getModuleName(),
                  module: "VirtualScroll"
                });
              }
            }
          }
          if (_this.enableVirtualization && !_this.allowFiltering && _this.selectedValueInfo != null && _this.selectedValueInfo.startIndex > 0 && _this.value != null) {
            _this.notify("dataProcessAsync", {
              module: "VirtualScroll",
              isOpen: true
            });
          }
          if (_this.enableVirtualization) {
            _this.updatevirtualizationList();
          } else {
            if (_this.value && _this.value.length) {
              var element2 = void 0;
              var listItems = _this.getItems();
              for (var _i = 0, _a = _this.value; _i < _a.length; _i++) {
                var value = _a[_i];
                var checkValue = _this.allowObjectBinding ? getValue2(_this.fields.value ? _this.fields.value : "", value) : value;
                element2 = _this.getElementByValue(checkValue);
                if (element2) {
                  _this.addListSelection(element2);
                }
              }
            }
          }
          if (_this.allowResize) {
            _this.setResize();
          }
          _this.preventSetCurrentData = true;
        }
      });
    };
    MultiSelect2.prototype.selectAll = function(state) {
      this.isSelectAll = true;
      this.selectAllItems(state);
    };
    MultiSelect2.prototype.getModuleName = function() {
      return "multiselect";
    };
    MultiSelect2.prototype.clear = function() {
      var _this = this;
      this.selectAll(false);
      if (this.value && this.value.length) {
        setTimeout(function() {
          _this.setProperties({
            value: null
          }, true);
        }, 0);
      } else {
        this.setProperties({
          value: null
        }, true);
      }
    };
    MultiSelect2.prototype.render = function() {
      if (!isNullOrUndefined2(this.value) && this.value.length > 0) {
        this.value = this.value.slice();
      }
      this.setDynValue = this.initStatus = false;
      this.isSelectAll = false;
      this.selectAllEventEle = [];
      this.searchWrapper = this.createElement("span", {
        className: SEARCHBOX_WRAPPER + " " + (this.mode === "Box" ? BOX_ELEMENT : "")
      });
      this.viewWrapper = this.createElement("span", {
        className: DELIMITER_VIEW + " " + DELIMITER_WRAPPER,
        styles: "display:none;"
      });
      this.overAllClear = this.createElement("span", {
        className: CLOSEICON_CLASS2,
        styles: "display:none;"
      });
      this.componentWrapper = this.createElement("div", {
        className: ELEMENT_WRAPPER
      });
      this.overAllWrapper = this.createElement("div", {
        className: OVER_ALL_WRAPPER
      });
      if (this.mode === "CheckBox") {
        addClass2([this.overAllWrapper], "e-checkbox");
      }
      if (Browser2.isDevice) {
        this.componentWrapper.classList.add(ELEMENT_MOBILE_WRAPPER);
      }
      this.setWidth(this.width);
      this.overAllWrapper.appendChild(this.componentWrapper);
      this.popupWrapper = this.createElement("div", {
        id: this.element.id + "_popup",
        className: POPUP_WRAPPER
      });
      this.popupWrapper.setAttribute("aria-label", this.element.id);
      this.popupWrapper.setAttribute("role", "dialog");
      if (this.mode === "Delimiter" || this.mode === "CheckBox") {
        this.delimiterWrapper = this.createElement("span", {
          className: DELIMITER_WRAPPER,
          styles: "display:none"
        });
        this.componentWrapper.appendChild(this.delimiterWrapper);
      } else {
        this.chipCollectionWrapper = this.createElement("span", {
          className: CHIP_WRAPPER2,
          styles: "display:none"
        });
        if (this.mode === "Default") {
          this.chipCollectionWrapper.setAttribute("id", getUniqueID("chip_default"));
        } else if (this.mode === "Box") {
          this.chipCollectionWrapper.setAttribute("id", getUniqueID("chip_box"));
        }
        this.componentWrapper.appendChild(this.chipCollectionWrapper);
      }
      if (this.mode !== "Box") {
        this.componentWrapper.appendChild(this.viewWrapper);
      }
      this.componentWrapper.appendChild(this.searchWrapper);
      if (this.showClearButton && !Browser2.isDevice) {
        this.componentWrapper.appendChild(this.overAllClear);
      } else {
        this.componentWrapper.classList.add(CLOSE_ICON_HIDE);
      }
      this.dropDownIcon();
      this.inputElement = this.createElement("input", {
        className: INPUT_ELEMENT,
        attrs: {
          spellcheck: "false",
          type: "text",
          autocomplete: "off",
          tabindex: "0",
          role: "combobox"
        }
      });
      if (this.mode === "Default" || this.mode === "Box") {
        this.inputElement.setAttribute("aria-describedby", this.chipCollectionWrapper.id);
      }
      if (!isNullOrUndefined2(this.inputElement)) {
        attributes2(this.inputElement, {
          "aria-expanded": "false"
        });
        if (!this.inputElement.hasAttribute("aria-label")) {
          this.inputElement.setAttribute("aria-label", this.getModuleName());
        }
      }
      if (this.element.tagName !== this.getNgDirective()) {
        this.element.style.display = "none";
      }
      if (this.element.tagName === this.getNgDirective()) {
        this.element.appendChild(this.overAllWrapper);
        this.searchWrapper.appendChild(this.inputElement);
      } else {
        this.element.parentElement.insertBefore(this.overAllWrapper, this.element);
        this.searchWrapper.appendChild(this.inputElement);
        this.searchWrapper.appendChild(this.element);
        this.element.removeAttribute("tabindex");
      }
      if (this.floatLabelType !== "Never") {
        createFloatLabel(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);
      } else if (this.floatLabelType === "Never") {
        this.refreshPlaceHolder();
      }
      this.addValidInputClass();
      this.element.style.opacity = "";
      var id = this.element.getAttribute("id") ? this.element.getAttribute("id") : getUniqueID("ej2_dropdownlist");
      this.element.id = id;
      this.hiddenElement = this.createElement("select", {
        attrs: {
          "aria-hidden": "true",
          "class": HIDDEN_ELEMENT,
          "tabindex": "-1",
          "multiple": ""
        }
      });
      this.componentWrapper.appendChild(this.hiddenElement);
      this.validationAttribute(this.element, this.hiddenElement);
      if (this.mode !== "CheckBox") {
        this.hideOverAllClear();
      }
      if (!isNullOrUndefined2(closest2(this.element, "fieldset")) && closest2(this.element, "fieldset").disabled) {
        this.enabled = false;
      }
      this.wireEvent();
      this.enable(this.enabled);
      this.enableRTL(this.enableRtl);
      if (this.enableVirtualization) {
        this.updateVirtualizationProperties(this.itemCount, this.allowFiltering, this.mode === "CheckBox");
      }
      this.listItemHeight = this.getListHeight();
      this.getSkeletonCount();
      this.viewPortInfo.startIndex = this.virtualItemStartIndex = 0;
      this.viewPortInfo.endIndex = this.virtualItemEndIndex = this.viewPortInfo.startIndex > 0 ? this.viewPortInfo.endIndex : this.itemCount;
      this.checkInitialValue();
      if (this.element.hasAttribute("data-val")) {
        this.element.setAttribute("data-val", "false");
      }
      Input.createSpanElement(this.overAllWrapper, this.createElement);
      this.calculateWidth();
      if (!isNullOrUndefined2(this.overAllWrapper) && !isNullOrUndefined2(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0] && this.overAllWrapper.getElementsByClassName("e-float-text-content")[0] && this.floatLabelType !== "Never")) {
        this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon");
      }
      this.renderComplete();
    };
    MultiSelect2.prototype.setResize = function() {
      var resizePaddingBottom = 16;
      if (this.list && this.list.parentElement && isNullOrUndefined2(this.list.parentElement.querySelector(".e-resizer-right.e-icons"))) {
        this.resizer = this.createElement("div", {
          id: this.element.id + "_resize-popup",
          className: RESIZE_ICON
        });
      }
      if (this.mode === "CheckBox" && this.showSelectAll && this.selectAllHeight && this.selectAllHeight !== 0) {
        this.storedSelectAllHeight = this.selectAllHeight;
      }
      if (this.list && this.list.parentElement) {
        this.list.parentElement.classList.add("e-resize");
        if (this.popupHeight.toString().toLowerCase() !== "auto") {
          this.list.parentElement.style.height = "100%";
        }
        this.list.parentElement.style.boxSizing = "border-box";
        var paddingBottom = this.mode === "CheckBox" && this.searchBoxHeight ? this.searchBoxHeight + resizePaddingBottom + (this.showSelectAll ? this.storedSelectAllHeight : 0) : resizePaddingBottom;
        this.list.parentElement.style.paddingBottom = paddingBottom + "px";
        this.list.parentElement.appendChild(this.resizer);
        this.list.parentElement.style.width = this.resizeWidth + "px";
        this.list.parentElement.style.height = this.resizeHeight + "px";
        this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
        this.list.style.maxHeight = this.resizeHeight + "px";
      }
      if (this.resizer) {
        EventHandler2.add(this.resizer, "mousedown", this.startResizing, this);
        EventHandler2.add(this.resizer, "touchstart", this.startResizing, this);
      }
    };
    MultiSelect2.prototype.startResizing = function(event2) {
      this.isResizing = true;
      this.trigger("resizeStart", event2);
      var clientX = event2 instanceof MouseEvent ? event2.clientX : event2.touches[0].clientX;
      var clientY = event2 instanceof MouseEvent ? event2.clientY : event2.touches[0].clientY;
      if (this.list && this.list.parentElement) {
        this.originalWidth = this.list.parentElement.offsetWidth;
        this.originalHeight = this.list.parentElement.offsetHeight;
        this.originalMouseX = clientX;
        this.originalMouseY = clientY;
      }
      this.resizingWireEvent();
      if (event2) {
        event2.preventDefault();
      }
    };
    MultiSelect2.prototype.resizePopup = function(event2) {
      if (!this.isResizing) {
        return;
      }
      this.trigger("resizing", event2);
      var clientX = event2 instanceof MouseEvent ? event2.clientX : event2.touches[0].clientX;
      var clientY = event2 instanceof MouseEvent ? event2.clientY : event2.touches[0].clientY;
      var dx = clientX - this.originalMouseX;
      var dy = clientY - this.originalMouseY;
      var minWidth2 = 100;
      var minHeight2 = 130;
      this.resizeWidth = Math.max(this.originalWidth + dx, minWidth2);
      this.resizeHeight = Math.max(this.originalHeight + dy, minHeight2);
      if (this.list && this.list.parentElement) {
        var minWidth_1 = parseInt(window.getComputedStyle(this.list.parentElement).minWidth, 10);
        var minHeight_1 = parseInt(window.getComputedStyle(this.list.parentElement).minHeight, 10);
        minWidth_1 = minWidth_1 || 100;
        minHeight_1 = minHeight_1 || 120;
        this.resizeWidth = Math.max(this.originalWidth + dx, minWidth_1);
        this.resizeHeight = Math.max(this.originalHeight + dy, minHeight_1);
        this.list.parentElement.style.width = this.resizeWidth + "px";
        this.list.parentElement.style.height = this.resizeHeight + "px";
        this.list.parentElement.style.maxHeight = this.resizeHeight + "px";
        this.list.style.maxHeight = this.resizeHeight + "px";
        if (this.fixedHeaderElement && this.ulElement) {
          this.fixedHeaderElement.style.width = this.ulElement.offsetWidth + "px";
        }
      }
      if (event2) {
        event2.preventDefault();
      }
    };
    MultiSelect2.prototype.stopResizing = function(event2) {
      if (this.isResizing) {
        this.isResizing = false;
        this.trigger("resizeStop", event2);
        this.resizingUnWireEvent();
      }
      if (event2) {
        event2.preventDefault();
      }
    };
    MultiSelect2.prototype.getListHeight = function() {
      var listParent = this.createElement("div", {
        className: "e-dropdownbase"
      });
      var item = this.createElement("li", {
        className: "e-list-item"
      });
      var listParentHeight = formatUnit(this.popupHeight);
      listParent.style.height = parseInt(listParentHeight, 10).toString() + "px";
      listParent.appendChild(item);
      document.body.appendChild(listParent);
      this.virtualListHeight = listParent.getBoundingClientRect().height;
      var listItemHeight = Math.ceil(item.getBoundingClientRect().height) + parseInt(window.getComputedStyle(item).marginBottom, 10);
      listParent.remove();
      return listItemHeight;
    };
    MultiSelect2.prototype.removeDisabledItemsValue = function(value) {
      if (value) {
        var data = [];
        var dataIndex = 0;
        for (var index = 0; index < value.length; index++) {
          var indexValue = value[index];
          if (typeof indexValue === "object") {
            indexValue = JSON.parse(JSON.stringify(indexValue))[this.fields.value];
          }
          if (indexValue != null && !this.isDisabledItemByIndex(this.getIndexByValue(indexValue))) {
            data[dataIndex++] = value[index];
          }
        }
        this.value = data.length > 0 ? data : null;
      }
    };
    MultiSelect2.prototype.checkInitialValue = function() {
      var _this = this;
      if (this.fields.disabled) {
        this.removeDisabledItemsValue(this.value);
      }
      var isData = this.dataSource instanceof Array ? this.dataSource.length > 0 : !isNullOrUndefined2(this.dataSource);
      if (!(this.value && this.value.length) && isNullOrUndefined2(this.text) && !isData && this.element.tagName === "SELECT" && this.element.options.length > 0) {
        var optionsElement = this.element.options;
        var valueCol = [];
        var textCol = "";
        for (var index = 0, optionsLen = optionsElement.length; index < optionsLen; index++) {
          var opt = optionsElement[index];
          if (!isNullOrUndefined2(opt.getAttribute("selected"))) {
            if (opt.getAttribute("value")) {
              var value = this.allowObjectBinding ? this.getDataByValue(opt.getAttribute("value")) : opt.getAttribute("value");
              valueCol.push(value);
            } else {
              textCol += opt.text + this.delimiterChar;
            }
          }
        }
        if (valueCol.length > 0) {
          this.setProperties({
            value: valueCol
          }, true);
        } else if (textCol !== "") {
          this.setProperties({
            text: textCol
          }, true);
        }
        if (valueCol.length > 0 || textCol !== "") {
          this.refreshInputHight();
          this.refreshPlaceHolder();
        }
      }
      if (this.value && this.value.length || !isNullOrUndefined2(this.text)) {
        if (!this.list) {
          _super.prototype.render.call(this);
        }
      }
      if (this.fields.disabled) {
        this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
      }
      if (!isNullOrUndefined2(this.text) && (isNullOrUndefined2(this.value) || this.value.length === 0)) {
        this.initialTextUpdate();
      }
      if (this.value && this.value.length) {
        var listItems_2;
        if (this.enableVirtualization) {
          var fields = !this.isPrimitiveData ? this.fields.value : "";
          var predicate = void 0;
          for (var i = 0; i < this.value.length; i++) {
            var value = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", this.value[i]) : this.value[i];
            if (i === 0) {
              predicate = new Predicate(fields, "equal", value);
            } else {
              predicate = predicate.or(fields, "equal", value);
            }
          }
          if (this.dataSource instanceof DataManager) {
            this.dataSource.executeQuery(new Query().where(predicate)).then(function(e) {
              if (e.result.length > 0) {
                listItems_2 = e.result;
                _this.initStatus = false;
                _this.isInitRemoteVirtualData = true;
                setTimeout(function() {
                  _this.initialValueUpdate(listItems_2, true);
                  _this.initialUpdate();
                  _this.isInitRemoteVirtualData = false;
                }, 100);
                _this.initStatus = true;
              }
            });
          } else {
            listItems_2 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
          }
        }
        if (!(this.dataSource instanceof DataManager)) {
          this.initialValueUpdate(listItems_2, true);
          this.initialUpdate();
        } else {
          this.setInitialValue = function() {
            _this.initStatus = false;
            if (!_this.enableVirtualization || _this.enableVirtualization && !(_this.dataSource instanceof DataManager)) {
              _this.initialValueUpdate(listItems_2);
            }
            _this.initialUpdate();
            _this.setInitialValue = null;
            _this.initStatus = true;
          };
        }
        this.updateTempValue();
      } else {
        this.initialUpdate();
      }
      this.initStatus = true;
      this.checkAutoFocus();
      if (!isNullOrUndefined2(this.text)) {
        this.element.setAttribute("data-initial-value", this.text);
      }
    };
    MultiSelect2.prototype.checkAutoFocus = function() {
      if (this.element.hasAttribute("autofocus")) {
        this.inputElement.focus();
      }
    };
    MultiSelect2.prototype.updatevirtualizationList = function() {
      if (this.value && this.value.length) {
        var element2 = void 0;
        for (var _i = 0, _a = this.value; _i < _a.length; _i++) {
          var value = _a[_i];
          var checkValue = this.allowObjectBinding ? getValue2(this.fields.value ? this.fields.value : "", value) : value;
          element2 = this.getElementByValue(checkValue);
          if (element2) {
            this.addListSelection(element2);
          }
        }
        if (this.enableVirtualization && this.hideSelectedItem) {
          var visibleListElements = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST + "):not(.e-reorder-hide):not(.e-virtual-list)");
          if (visibleListElements.length) {
            var actualCount = this.virtualListHeight > 0 ? Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
            if (visibleListElements.length < actualCount + 2) {
              var query = this.getForQuery(this.value).clone();
              query = query.skip(this.viewPortInfo.startIndex);
              this.resetList(this.dataSource, this.fields, query);
            }
          }
        }
      }
    };
    MultiSelect2.prototype.setFloatLabelType = function() {
      removeFloating(this.overAllWrapper, this.componentWrapper, this.searchWrapper, this.inputElement, this.value, this.floatLabelType, this.placeholder);
      if (this.floatLabelType !== "Never") {
        createFloatLabel(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);
      }
    };
    MultiSelect2.prototype.addValidInputClass = function() {
      if (!isNullOrUndefined2(this.overAllWrapper)) {
        if (!isNullOrUndefined2(this.value) && this.value.length || this.floatLabelType === "Always") {
          addClass2([this.overAllWrapper], "e-valid-input");
        } else {
          removeClass2([this.overAllWrapper], "e-valid-input");
        }
      }
    };
    MultiSelect2.prototype.dropDownIcon = function() {
      if (this.showDropDownIcon) {
        this.dropIcon = this.createElement("span", {
          className: dropdownIcon
        });
        this.componentWrapper.appendChild(this.dropIcon);
        addClass2([this.componentWrapper], ["e-down-icon"]);
      } else {
        if (!isNullOrUndefined2(this.dropIcon)) {
          this.dropIcon.parentElement.removeChild(this.dropIcon);
          removeClass2([this.componentWrapper], ["e-down-icon"]);
        }
      }
    };
    MultiSelect2.prototype.initialUpdate = function() {
      if (this.mode !== "Box" && !(this.setDynValue && this.mode === "Default" && this.inputFocus)) {
        this.updateDelimView();
      }
      this.viewPortInfo.startIndex = this.virtualItemStartIndex = 0;
      this.viewPortInfo.endIndex = this.virtualItemEndIndex = this.itemCount;
      this.updateCssClass();
      this.updateHTMLAttribute();
      this.updateReadonly(this.readonly);
      this.refreshInputHight();
      this.checkPlaceholderSize();
    };
    MultiSelect2.prototype.disableItem = function(item) {
      if (this.fields.disabled) {
        if (!this.list) {
          this.renderList();
        }
        var itemIndex = -1;
        if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
          if (typeof item === "string") {
            itemIndex = this.getIndexByValue(item);
          } else if (typeof item === "object") {
            if (item instanceof HTMLLIElement) {
              for (var index = 0; index < this.liCollections.length; index++) {
                if (this.liCollections[index] === item) {
                  itemIndex = this.getIndexByValue(item.getAttribute("data-value"));
                  break;
                }
              }
            } else {
              var value = JSON.parse(JSON.stringify(item))[this.fields.value];
              for (var index = 0; index < this.listData.length; index++) {
                if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
                  itemIndex = this.getIndexByValue(value);
                  break;
                }
              }
            }
          } else {
            itemIndex = item;
          }
          var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
          if (isValidIndex && !JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled]) {
            var li = this.liCollections[itemIndex];
            if (li) {
              this.disableListItem(li);
              var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
              parsedData[this.fields.disabled] = true;
              this.listData[itemIndex] = parsedData;
              if (li.classList.contains(dropDownBaseClasses.focus)) {
                this.removeFocus();
              }
              if (li.classList.contains(HIDE_LIST) || li.classList.contains(dropDownBaseClasses.selected)) {
                var oldValue = this.value;
                this.removeDisabledItemsValue(this.value);
                this.updateVal(this.value, oldValue, "value");
              }
              if (this.mode === "CheckBox" && this.enableGroupCheckBox && !isNullOrUndefined2(this.fields.groupBy)) {
                this.disableGroupHeader();
              }
            }
          }
        }
      }
    };
    MultiSelect2.prototype.destroy = function() {
      if (this.isReact) {
        this.clearTemplate();
      }
      if (!isNullOrUndefined2(this.popupObj)) {
        this.popupObj.hide();
        this.popupObj.destroy();
      }
      this.notify(destroy4, {});
      this.unwireListEvents();
      this.unWireEvent();
      var temp = ["readonly", "aria-disabled", "placeholder", "aria-label", "aria-expanded"];
      var length = temp.length;
      if (!isNullOrUndefined2(this.inputElement)) {
        while (length > 0) {
          this.inputElement.removeAttribute(temp[length - 1]);
          length--;
        }
      }
      if (!isNullOrUndefined2(this.element)) {
        this.element.removeAttribute("data-initial-value");
        this.element.style.display = "block";
      }
      if (this.overAllWrapper && this.overAllWrapper.parentElement) {
        if (this.overAllWrapper.parentElement.tagName === this.getNgDirective()) {
          remove(this.overAllWrapper);
        } else {
          this.overAllWrapper.parentElement.insertBefore(this.element, this.overAllWrapper);
          remove(this.overAllWrapper);
        }
      }
      if (this.popupWrapper && this.popupWrapper.parentElement) {
        this.popupWrapper.parentElement.remove();
      }
      while (this.searchWrapper && this.searchWrapper.firstChild) {
        this.searchWrapper.removeChild(this.searchWrapper.firstChild);
      }
      if (this.searchWrapper && this.searchWrapper.parentElement) {
        this.searchWrapper.parentElement.remove();
      }
      if (this.viewWrapper && this.viewWrapper.parentElement) {
        this.viewWrapper.parentElement.remove();
      }
      if (this.overAllClear && this.overAllClear.parentElement) {
        this.overAllClear.parentElement.remove();
      }
      if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
        this.delimiterWrapper.parentElement.remove();
      }
      var selectElement = this.overAllWrapper.querySelector("select.e-multi-hidden");
      if (selectElement && selectElement.parentElement) {
        selectElement.parentElement.remove();
      }
      while (this.componentWrapper && this.componentWrapper.firstChild) {
        this.componentWrapper.removeChild(this.componentWrapper.firstChild);
      }
      if (this.componentWrapper && this.componentWrapper.parentElement) {
        this.componentWrapper.removeAttribute("class");
        this.componentWrapper.parentElement.remove();
      }
      while (this.popupWrapper && this.popupWrapper.firstChild) {
        this.popupWrapper.removeChild(this.popupWrapper.firstChild);
      }
      if (this.inputElement) {
        var attrArray = ["readonly", "aria-disabled", "placeholder", "aria-labelledby", "aria-expanded", "autocomplete", "aria-readonly", "autocapitalize", "spellcheck", "aria-autocomplete", "aria-live", "aria-label", "aria-hidden", "tabindex", "aria-controls", "aria-describedby", "size", "role", "type", "class"];
        for (var i = 0; i < attrArray.length; i++) {
          this.inputElement.removeAttribute(attrArray[i]);
        }
      }
      if (this.inputElement) {
        this.inputElement.remove();
      }
      this.list = null;
      this.popupObj = null;
      this.mainData = null;
      this.filterParent = null;
      this.ulElement = null;
      this.componentWrapper = null;
      this.overAllClear = null;
      this.overAllWrapper = null;
      this.hiddenElement = null;
      this.searchWrapper = null;
      this.viewWrapper = null;
      this.chipCollectionWrapper = null;
      this.targetInputElement = null;
      this.popupWrapper = null;
      this.inputElement = null;
      this.delimiterWrapper = null;
      this.liCollections = null;
      this.popupContentElement = null;
      this.header = null;
      this.mainList = null;
      this.mainListCollection = null;
      this.footer = null;
      this.selectAllEventEle = null;
      _super.prototype.destroy.call(this);
    };
    __decorate86([Complex2({
      text: null,
      value: null,
      iconCss: null,
      groupBy: null,
      disabled: null
    }, FieldSettings2)], MultiSelect2.prototype, "fields", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "enablePersistence", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "groupTemplate", void 0);
    __decorate86([Property2("No records found")], MultiSelect2.prototype, "noRecordsTemplate", void 0);
    __decorate86([Property2("Request failed")], MultiSelect2.prototype, "actionFailureTemplate", void 0);
    __decorate86([Property2("None")], MultiSelect2.prototype, "sortOrder", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "enabled", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "enableHtmlSanitizer", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "enableVirtualization", void 0);
    __decorate86([Property2([])], MultiSelect2.prototype, "dataSource", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "query", void 0);
    __decorate86([Property2("StartsWith")], MultiSelect2.prototype, "filterType", void 0);
    __decorate86([Property2(1e3)], MultiSelect2.prototype, "zIndex", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "ignoreAccent", void 0);
    __decorate86([Property2()], MultiSelect2.prototype, "locale", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "enableGroupCheckBox", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "cssClass", void 0);
    __decorate86([Property2("100%")], MultiSelect2.prototype, "width", void 0);
    __decorate86([Property2("300px")], MultiSelect2.prototype, "popupHeight", void 0);
    __decorate86([Property2("100%")], MultiSelect2.prototype, "popupWidth", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "placeholder", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "filterBarPlaceholder", void 0);
    __decorate86([Property2({})], MultiSelect2.prototype, "htmlAttributes", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "valueTemplate", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "headerTemplate", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "footerTemplate", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "itemTemplate", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "allowFiltering", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "isDeviceFullScreen", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "changeOnBlur", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "allowCustomValue", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "showClearButton", void 0);
    __decorate86([Property2(1e3)], MultiSelect2.prototype, "maximumSelectionLength", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "readonly", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "allowResize", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "text", void 0);
    __decorate86([Property2(null)], MultiSelect2.prototype, "value", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "allowObjectBinding", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "hideSelectedItem", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "closePopupOnSelect", void 0);
    __decorate86([Property2("Default")], MultiSelect2.prototype, "mode", void 0);
    __decorate86([Property2(",")], MultiSelect2.prototype, "delimiterChar", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "ignoreCase", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "showDropDownIcon", void 0);
    __decorate86([Property2("Never")], MultiSelect2.prototype, "floatLabelType", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "showSelectAll", void 0);
    __decorate86([Property2("Select All")], MultiSelect2.prototype, "selectAllText", void 0);
    __decorate86([Property2("Unselect All")], MultiSelect2.prototype, "unSelectAllText", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "enableSelectionOrder", void 0);
    __decorate86([Property2(true)], MultiSelect2.prototype, "openOnClick", void 0);
    __decorate86([Property2(false)], MultiSelect2.prototype, "addTagOnBlur", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "change", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "removing", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "removed", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "beforeSelectAll", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "selectedAll", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "beforeOpen", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "open", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "close", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "blur", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "focus", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "chipSelection", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "resizeStop", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "resizing", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "resizeStart", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "filtering", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "tagging", void 0);
    __decorate86([Event3()], MultiSelect2.prototype, "customValueSelection", void 0);
    MultiSelect2 = __decorate86([NotifyPropertyChanges2], MultiSelect2);
    return MultiSelect2;
  }(DropDownBase)
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/multi-select/checkbox-selection.js
var ICON5 = "e-icons";
var CHECKBOXFRAME3 = "e-frame";
var CHECK5 = "e-check";
var CHECKBOXWRAP3 = "e-checkbox-wrapper";
var INDETERMINATE4 = "e-stop";
var checkAllParent = "e-selectall-parent";
var searchBackIcon = "e-input-group-icon e-back-icon e-icons";
var filterBarClearIcon = "e-input-group-icon e-clear-icon e-icons";
var filterInput = "e-input-filter";
var filterParent = "e-filter-parent";
var mobileFilter = "e-ddl-device-filter";
var clearIcon = "e-clear-icon";
var popupFullScreen = "e-popup-full-page";
var device = "e-ddl-device";
var FOCUS4 = "e-input-focus";
var CheckBoxSelection = (
  /** @class */
  function() {
    function CheckBoxSelection2(parent) {
      this.activeLi = [];
      this.activeEle = [];
      this.parent = parent;
      this.removeEventListener();
      this.addEventListener();
    }
    CheckBoxSelection2.prototype.getModuleName = function() {
      return "CheckBoxSelection";
    };
    CheckBoxSelection2.prototype.addEventListener = function() {
      if (this.parent.isDestroyed) {
        return;
      }
      this.parent.on("updatelist", this.listSelection, this);
      this.parent.on("listoption", this.listOption, this);
      this.parent.on("selectAll", this.setSelectAll, this);
      this.parent.on("checkSelectAll", this.checkSelectAll, this);
      this.parent.on("searchBox", this.setSearchBox, this);
      this.parent.on("blur", this.onBlurHandler, this);
      this.parent.on("targetElement", this.targetElement, this);
      this.parent.on("deviceSearchBox", this.setDeviceSearchBox, this);
      this.parent.on("inputFocus", this.getFocus, this);
      this.parent.on("reOrder", this.setReorder, this);
      this.parent.on("activeList", this.getActiveList, this);
      this.parent.on("selectAllText", this.setLocale, this);
      this.parent.on("filterBarPlaceholder", this.setPlaceholder, this);
      EventHandler2.add(document, "mousedown", this.onDocumentClick, this);
      this.parent.on("addItem", this.checboxCreate, this);
      this.parent.on("popupFullScreen", this.setPopupFullScreen, this);
    };
    CheckBoxSelection2.prototype.removeEventListener = function() {
      if (this.parent.isDestroyed) {
        return;
      }
      this.parent.off("updatelist", this.listSelection);
      this.parent.off("listoption", this.listOption);
      this.parent.off("selectAll", this.setSelectAll);
      this.parent.off("checkSelectAll", this.checkSelectAll);
      this.parent.off("searchBox", this.setSearchBox);
      this.parent.off("blur", this.onBlurHandler);
      this.parent.off("targetElement", this.targetElement);
      this.parent.off("deviceSearchBox", this.setDeviceSearchBox);
      this.parent.off("inputFocus", this.getFocus);
      this.parent.off("reOrder", this.setReorder);
      this.parent.off("activeList", this.getActiveList);
      this.parent.off("selectAllText", this.setLocale);
      this.parent.off("filterBarPlaceholder", this.setPlaceholder);
      this.parent.off("addItem", this.checboxCreate);
      this.parent.off("popupFullScreen", this.setPopupFullScreen);
    };
    CheckBoxSelection2.prototype.listOption = function(args) {
      var _this = this;
      if (isNullOrUndefined2(this.parent.listCurrentOptions.itemCreated)) {
        this.parent.listCurrentOptions.itemCreated = function(e) {
          _this.checboxCreate(e);
        };
      } else {
        var itemCreated_1 = this.parent.listCurrentOptions.itemCreated;
        this.parent.listCurrentOptions.itemCreated = function(e) {
          _this.checboxCreate(e);
          itemCreated_1.apply(_this, [e]);
        };
      }
    };
    CheckBoxSelection2.prototype.setPlaceholder = function(props) {
      Input.setPlaceholder(props.filterBarPlaceholder, this.filterInput);
    };
    CheckBoxSelection2.prototype.checboxCreate = function(e) {
      var item;
      if (!isNullOrUndefined2(e.item)) {
        item = e.item;
      } else {
        item = e;
      }
      if (this.parent.enableGroupCheckBox || item.className !== "e-list-group-item " && item.className !== "e-list-group-item") {
        var checkboxEle = createCheckBox(this.parent.createElement, true);
        var icon = select2("div." + ICON5, item);
        item.insertBefore(checkboxEle, item.childNodes[isNullOrUndefined2(icon) ? 0 : 1]);
        select2("." + CHECKBOXFRAME3, checkboxEle);
        if (this.parent.enableGroupCheckBox) {
          this.parent.popupWrapper.classList.add("e-multiselect-group");
        }
        return item;
      } else {
        return item;
      }
    };
    CheckBoxSelection2.prototype.setSelectAll = function() {
      if (this.parent.showSelectAll) {
        if (isNullOrUndefined2(this.checkAllParent)) {
          this.checkAllParent = this.parent.createElement("div", {
            className: checkAllParent
          });
          this.selectAllSpan = this.parent.createElement("span", {
            className: "e-all-text"
          });
          this.selectAllSpan.textContent = "";
          this.checkAllParent.appendChild(this.selectAllSpan);
          this.setLocale();
          this.checboxCreate(this.checkAllParent);
          if (this.parent.headerTemplate) {
            if (!isNullOrUndefined2(this.parent.filterParent)) {
              append([this.checkAllParent], this.parent.filterParent);
            } else {
              append([this.checkAllParent], this.parent.popupWrapper);
            }
          }
          if (!this.parent.headerTemplate) {
            if (!isNullOrUndefined2(this.parent.filterParent)) {
              this.parent.filterParent.parentNode.insertBefore(this.checkAllParent, this.parent.filterParent.nextSibling);
            } else {
              prepend([this.checkAllParent], this.parent.popupWrapper);
            }
          }
          EventHandler2.add(this.checkAllParent, "mousedown", this.clickHandler, this);
        }
        if (this.parent.list.classList.contains("e-nodata") || this.parent.listData && this.parent.listData.length <= 1 && !this.parent.enableVirtualization && !this.parent.isDynamicDataChange || this.parent.isDynamicDataChange && this.parent.listData && this.parent.listData.length <= 1) {
          this.checkAllParent.style.display = "none";
        } else {
          this.checkAllParent.style.display = "block";
        }
        this.parent.selectAllHeight = this.checkAllParent.getBoundingClientRect().height;
      } else if (!isNullOrUndefined2(this.checkAllParent)) {
        this.checkAllParent.parentElement.removeChild(this.checkAllParent);
        this.checkAllParent = null;
      }
    };
    CheckBoxSelection2.prototype.destroy = function() {
      this.removeEventListener();
      EventHandler2.remove(document, "mousedown", this.onDocumentClick);
      this.checkAllParent = null;
      this.clearIconElement = null;
      this.filterInput = null;
      this.filterInputObj = null;
      this.checkWrapper = null;
      this.selectAllSpan = null;
    };
    CheckBoxSelection2.prototype.listSelection = function(args) {
      var target;
      if (!isNullOrUndefined2(args.e)) {
        var frameElm = args.li.querySelector(".e-checkbox-wrapper .e-frame");
        target = !isNullOrUndefined2(args.e.target) ? args.e.target.classList.contains("e-frame") && (!this.parent.showSelectAll || this.checkAllParent && !this.checkAllParent.contains(args.e.target)) ? args.e.target : args.li.querySelector(".e-checkbox-wrapper").childNodes[1] : args.li.querySelector(".e-checkbox-wrapper").childNodes[1];
      } else {
        var checkboxWrapper = args.li.querySelector(".e-checkbox-wrapper");
        target = checkboxWrapper ? checkboxWrapper.childNodes[1] : args.li.lastElementChild.childNodes[1];
      }
      if (this.parent.itemTemplate || this.parent.enableGroupCheckBox) {
        target = args.li.firstElementChild.childNodes[1];
      }
      if (!isNullOrUndefined2(target)) {
        this.checkWrapper = closest2(target, "." + CHECKBOXWRAP3);
      }
      if (!isNullOrUndefined2(this.checkWrapper)) {
        var checkElement = select2("." + CHECKBOXFRAME3, this.checkWrapper);
        var selectAll4 = false;
        this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK5), args.li, args.e, selectAll4);
      }
    };
    CheckBoxSelection2.prototype.validateCheckNode = function(checkWrap, isCheck, li, e, selectAll4) {
      this.changeState(checkWrap, isCheck ? "uncheck" : "check", e, true, selectAll4);
    };
    CheckBoxSelection2.prototype.clickHandler = function(e) {
      var target;
      if (e.currentTarget.classList.contains(this.checkAllParent.className) || e.currentTarget.classList.value === this.checkAllParent.className) {
        target = e.currentTarget.firstElementChild.lastElementChild;
      } else {
        target = e.currentTarget;
      }
      this.checkWrapper = closest2(target, "." + CHECKBOXWRAP3);
      var selectAll4 = true;
      if (!isNullOrUndefined2(this.checkWrapper)) {
        var checkElement = select2("." + CHECKBOXFRAME3, this.checkWrapper);
        this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK5), null, e, selectAll4);
      }
      e.preventDefault();
    };
    CheckBoxSelection2.prototype.changeState = function(wrapper, state, e, isPrevent, selectAll4) {
      var ariaState;
      var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME3)[0];
      if (state === "check" && !frameSpan.classList.contains(CHECK5)) {
        frameSpan.classList.remove(INDETERMINATE4);
        frameSpan.classList.add(CHECK5);
        ariaState = "true";
        if (selectAll4) {
          this.parent.selectAllItems(true, e);
          this.setLocale(true);
        }
      } else if (state === "uncheck" && (frameSpan.classList.contains(CHECK5) || frameSpan.classList.contains(INDETERMINATE4))) {
        removeClass2([frameSpan], [CHECK5, INDETERMINATE4]);
        ariaState = "false";
        if (selectAll4) {
          this.parent.selectAllItems(false, e);
          this.setLocale();
        }
      } else if (state === "indeterminate" && !frameSpan.classList.contains(INDETERMINATE4)) {
        removeClass2([frameSpan], [CHECK5]);
        frameSpan.classList.add(INDETERMINATE4);
        ariaState = "false";
        if (selectAll4) {
          this.parent.selectAllItems(false, e);
          this.setLocale();
        }
      }
    };
    CheckBoxSelection2.prototype.setSearchBox = function(args) {
      if (isNullOrUndefined2(this.parent.filterParent)) {
        this.parent.filterParent = this.parent.createElement("span", {
          className: filterParent
        });
        this.filterInput = this.parent.createElement("input", {
          attrs: {
            type: "text"
          },
          className: filterInput
        });
        this.parent.element.parentNode.insertBefore(this.filterInput, this.parent.element);
        var backIcon = false;
        if (Browser2.isDevice && this.parent.isDeviceFullScreen) {
          backIcon = true;
          this.parent.mobFilter = false;
        }
        this.filterInputObj = Input.createInput({
          element: this.filterInput,
          buttons: backIcon ? [searchBackIcon, filterBarClearIcon] : [filterBarClearIcon],
          properties: {
            placeholder: this.parent.filterBarPlaceholder
          }
        }, this.parent.createElement);
        if (!isNullOrUndefined2(this.parent.cssClass)) {
          if (this.parent.cssClass.split(" ").indexOf("e-outline") !== -1) {
            addClass2([this.filterInputObj.container], "e-outline");
          } else if (this.parent.cssClass.split(" ").indexOf("e-filled") !== -1) {
            addClass2([this.filterInputObj.container], "e-filled");
          }
        }
        append([this.filterInputObj.container], this.parent.filterParent);
        prepend([this.parent.filterParent], args.popupElement);
        attributes2(this.filterInput, {
          "aria-disabled": "false",
          "role": "combobox",
          "autocomplete": "off",
          "autocapitalize": "off",
          "spellcheck": "false",
          "aria-label": "multiselect",
          "aria-expanded": "true",
          "aria-controls": args.popupElement.id
        });
        this.clearIconElement = this.filterInput.parentElement.querySelector("." + clearIcon);
        if (!Browser2.isDevice && this.clearIconElement) {
          EventHandler2.add(this.clearIconElement, "mousedown", this.clearText, this);
          this.clearIconElement.style.visibility = "hidden";
        }
        EventHandler2.add(this.filterInput, "input", this.parent.onInput, this.parent);
        EventHandler2.add(this.filterInput, "keyup", this.parent.keyUp, this.parent);
        EventHandler2.add(this.filterInput, "keydown", this.parent.onKeyDown, this.parent);
        EventHandler2.add(this.filterInput, "blur", this.onBlurHandler, this);
        EventHandler2.add(this.filterInput, "paste", this.parent.pasteHandler, this.parent);
        this.parent.searchBoxHeight = this.filterInputObj.container.parentElement.getBoundingClientRect().height;
        return this.filterInputObj;
      }
    };
    CheckBoxSelection2.prototype.clickOnBackIcon = function(e) {
      this.parent.hidePopup();
      removeClass2([document.body, this.parent.popupObj.element], popupFullScreen);
      this.parent.inputElement.focus();
    };
    CheckBoxSelection2.prototype.clearText = function(e) {
      this.parent.targetInputElement.value = "";
      if (this.parent.allowFiltering && this.parent.targetInputElement.value === "") {
        this.parent.search(null);
      }
      this.parent.refreshListItems(null);
      this.parent.refreshPopup();
      this.clearIconElement.style.visibility = "hidden";
      this.filterInput.focus();
      if (!this.parent.enableVirtualization || this.parent.enableVirtualization && (isNullOrUndefined2(this.parent.value) || this.parent.value && this.parent.value.length === 0)) {
        this.setReorder(e);
      }
      this.boundPreventListSelection = this.preventListSelection.bind(this);
      this.parent.popupWrapper.addEventListener("mouseup", this.boundPreventListSelection, true);
      e.preventDefault();
    };
    CheckBoxSelection2.prototype.preventListSelection = function(e) {
      e.stopPropagation();
      this.parent.popupWrapper.removeEventListener("mouseup", this.boundPreventListSelection, true);
      this.boundPreventListSelection = null;
    };
    CheckBoxSelection2.prototype.setDeviceSearchBox = function() {
      this.parent.popupObj.element.classList.add(device);
      this.parent.popupObj.element.classList.add(mobileFilter);
      this.parent.popupObj.position = {
        X: 0,
        Y: 0
      };
      this.parent.popupObj.dataBind();
      this.setSearchBoxPosition();
      this.backIconElement = this.filterInputObj.container.querySelector(".e-back-icon");
      this.clearIconElement = this.filterInputObj.container.querySelector("." + clearIcon);
      this.clearIconElement.style.visibility = "hidden";
      EventHandler2.add(this.backIconElement, "click", this.clickOnBackIcon, this);
      EventHandler2.add(this.clearIconElement, "click", this.clearText, this);
    };
    CheckBoxSelection2.prototype.setSearchBoxPosition = function() {
      var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
      var selectAllHeight = 0;
      var footerHeight = 0;
      var headerHeight = 0;
      if (this.checkAllParent) {
        selectAllHeight = this.checkAllParent.getBoundingClientRect().height;
      }
      if (this.parent.header) {
        headerHeight = this.parent.header.getBoundingClientRect().height;
      }
      if (this.parent.footer) {
        footerHeight = this.parent.footer.getBoundingClientRect().height;
      }
      this.parent.popupObj.element.style.maxHeight = "100%";
      this.parent.popupObj.element.style.width = "100%";
      this.parent.list.style.maxHeight = window.innerHeight - searchBoxHeight - selectAllHeight - headerHeight - footerHeight + "px";
      this.parent.list.style.height = window.innerHeight - searchBoxHeight - selectAllHeight - headerHeight - footerHeight + "px";
      var clearElement = this.filterInput.parentElement.querySelector("." + clearIcon);
      detach2(this.filterInput);
      clearElement.parentElement.insertBefore(this.filterInput, clearElement);
    };
    CheckBoxSelection2.prototype.setPopupFullScreen = function() {
      if (this.parent && this.parent.popupObj) {
        attributes2(this.parent.popupObj.element, {
          style: "left:0px;right:0px;top:0px;bottom:0px;"
        });
        addClass2([document.body, this.parent.popupObj.element], popupFullScreen);
        this.parent.popupObj.element.style.maxHeight = "100%";
        this.parent.popupObj.element.style.width = "100%";
      }
    };
    CheckBoxSelection2.prototype.targetElement = function() {
      if (!isNullOrUndefined2(this.clearIconElement)) {
        this.parent.targetInputElement = this.filterInput;
        this.clearIconElement.style.visibility = this.parent.targetInputElement.value === "" ? "hidden" : "visible";
      }
      return this.parent.targetInputElement.value;
    };
    CheckBoxSelection2.prototype.onBlurHandler = function(e) {
      if (!this.parent.element.classList.contains("e-listbox")) {
        var target = void 0;
        if (this.parent.keyAction) {
          return;
        }
        if (Browser2.isIE) {
          target = !isNullOrUndefined2(e) && e.target;
        }
        if (!Browser2.isIE) {
          target = !isNullOrUndefined2(e) && e.relatedTarget;
        }
        if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && this.parent.popupObj.element.contains(target) && !Browser2.isIE && this.filterInput) {
          this.filterInput.focus();
          return;
        }
        if (this.parent.scrollFocusStatus && this.filterInput) {
          e.preventDefault();
          this.filterInput.focus();
          this.parent.scrollFocusStatus = false;
          return;
        }
        if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains("e-popup-close")) {
          this.parent.inputFocus = false;
          this.parent.updateValueState(e, this.parent.value, this.parent.tempValues);
          this.parent.dispatchEvent(this.parent.hiddenElement, "change");
        }
        if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains("e-popup-close")) {
          this.parent.inputFocus = false;
          this.parent.overAllWrapper.classList.remove(FOCUS4);
          this.parent.trigger("blur");
          this.parent.focused = true;
        }
        if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains("e-popup-close") && !Browser2.isDevice) {
          this.parent.hidePopup();
        }
      }
    };
    CheckBoxSelection2.prototype.onDocumentClick = function(e) {
      if (this.parent.getLocaleName() !== "listbox") {
        var target = e.target;
        if (!isNullOrUndefined2(this.parent.popupObj) && closest2(target, '[id="' + this.parent.popupObj.element.id + '"]')) {
          if (!(this.filterInput && this.filterInput.value !== "")) {
            e.preventDefault();
          }
        }
        if (!(!isNullOrUndefined2(this.parent.popupObj) && closest2(target, '[id="' + this.parent.popupObj.element.id + '"]')) && !isNullOrUndefined2(this.parent.overAllWrapper) && !this.parent.overAllWrapper.contains(e.target)) {
          if (this.parent.overAllWrapper.classList.contains(dropDownBaseClasses.focus) || this.parent.isPopupOpen()) {
            this.parent.inputFocus = false;
            this.parent.scrollFocusStatus = false;
            this.parent.hidePopup();
            this.parent.onBlurHandler(e, true);
            this.parent.focused = true;
          }
        } else {
          this.parent.scrollFocusStatus = (Browser2.isIE || Browser2.info.name === "edge") && document.activeElement === this.filterInput;
        }
        if (!isNullOrUndefined2(this.parent.overAllWrapper) && !this.parent.overAllWrapper.contains(e.target) && this.parent.overAllWrapper.classList.contains("e-input-focus") && !this.parent.isPopupOpen()) {
          if (Browser2.isIE) {
            this.parent.onBlurHandler();
          } else {
            this.parent.onBlurHandler(e);
          }
        }
        if (this.filterInput === target) {
          this.filterInput.focus();
        }
      }
    };
    CheckBoxSelection2.prototype.getFocus = function(e) {
      this.parent.overAllWrapper.classList.remove(FOCUS4);
      if (this.parent.keyAction && e.value !== "clear" && e.value !== "focus") {
        this.parent.keyAction = false;
        return;
      }
      if (e.value === "focus") {
        this.filterInput.focus();
        this.parent.removeFocus();
        EventHandler2.remove(this.parent.list, "keydown", this.parent.onKeyDown);
      }
      if (e.value === "clear") {
        this.filterInput.value = "";
        this.clearIconElement.style.visibility = "hidden";
      }
    };
    CheckBoxSelection2.prototype.checkSelectAll = function(e) {
      if (e.value === "check") {
        this.changeState(this.checkAllParent, e.value, null, null, false);
        this.setLocale(true);
      }
      if (e.value === "uncheck") {
        this.changeState(this.checkAllParent, e.value, null, null, false);
        this.setLocale();
      }
      if (e.value === "indeterminate") {
        this.changeState(this.checkAllParent, e.value, null, null, false);
        this.setLocale();
      }
    };
    CheckBoxSelection2.prototype.setLocale = function(unSelect) {
      if (this.parent.selectAllText !== "Select All" || this.parent.unSelectAllText !== "Unselect All") {
        var template = unSelect ? this.parent.unSelectAllText : this.parent.selectAllText;
        this.selectAllSpan.textContent = "";
        var compiledString = compile4(template);
        var templateName = unSelect ? "unSelectAllText" : "selectAllText";
        for (var _i = 0, _a = compiledString({}, this.parent, templateName, null, !this.parent.isStringTemplate); _i < _a.length; _i++) {
          var item = _a[_i];
          this.selectAllSpan.textContent = item.textContent;
        }
      } else {
        var l10nLocale = {
          selectAllText: "Select All",
          unSelectAllText: "Unselect All"
        };
        var l10n = new L10n2(this.parent.getLocaleName(), {}, this.parent.locale);
        if (l10n.getConstant("selectAllText") === "") {
          l10n = new L10n2("dropdowns", l10nLocale, this.parent.locale);
        }
        if (!isNullOrUndefined2(this.selectAllSpan)) {
          this.selectAllSpan.textContent = unSelect ? l10n.getConstant("unSelectAllText") : l10n.getConstant("selectAllText");
        }
      }
    };
    CheckBoxSelection2.prototype.getActiveList = function(args) {
      if (args.li.classList.contains("e-active")) {
        this.activeLi.push(args.li.cloneNode(true));
      } else {
        this.activeLi.splice(args.index, 1);
      }
    };
    CheckBoxSelection2.prototype.setReorder = function(args) {
      if (this.parent.enableSelectionOrder && !isNullOrUndefined2(this.parent.value)) {
        var activeLiCount = this.parent.ulElement.querySelectorAll("li.e-active").length;
        var remLi = void 0;
        var ulEle_1 = this.parent.createElement("ul", {
          className: "e-list-parent e-ul e-reorder"
        });
        if (activeLiCount > 0) {
          var activeListItems = this.parent.ulElement.querySelectorAll("li.e-active");
          activeListItems.forEach(function(item) {
            ulEle_1.appendChild(item);
          });
          remLi = this.parent.ulElement.querySelectorAll("li.e-active");
          addClass2(remLi, "e-reorder-hide");
          if (this.parent.enableVirtualization) {
            var virtualUlElement = this.parent.list.querySelector(".e-virtual-ddl-content");
            prepend([ulEle_1], virtualUlElement);
          } else {
            prepend([ulEle_1], this.parent.list);
          }
        }
        this.parent.focusAtFirstListItem();
      }
    };
    return CheckBoxSelection2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/list-box/list-box.js
var __extends89 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate87 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SelectionSettings = (
  /** @class */
  function(_super) {
    __extends89(SelectionSettings2, _super);
    function SelectionSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate87([Property2("Multiple")], SelectionSettings2.prototype, "mode", void 0);
    __decorate87([Property2(false)], SelectionSettings2.prototype, "showCheckbox", void 0);
    __decorate87([Property2(false)], SelectionSettings2.prototype, "showSelectAll", void 0);
    __decorate87([Property2("Left")], SelectionSettings2.prototype, "checkboxPosition", void 0);
    return SelectionSettings2;
  }(ChildProperty2)
);
var ToolbarSettings = (
  /** @class */
  function(_super) {
    __extends89(ToolbarSettings2, _super);
    function ToolbarSettings2() {
      return _super !== null && _super.apply(this, arguments) || this;
    }
    __decorate87([Property2([])], ToolbarSettings2.prototype, "items", void 0);
    __decorate87([Property2("Right")], ToolbarSettings2.prototype, "position", void 0);
    return ToolbarSettings2;
  }(ChildProperty2)
);
var ListBox = (
  /** @class */
  function(_super) {
    __extends89(ListBox2, _super);
    function ListBox2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.isValidKey = false;
      _this.isDataSourceUpdate = false;
      _this.keyDownStatus = false;
      return _this;
    }
    ListBox_1 = ListBox2;
    ListBox2.prototype.addItem = function(items, itemIndex) {
      _super.prototype.addItem.call(this, items, itemIndex);
      if (this.allowFiltering && this.filterInput.value !== "") {
        this.filteringAction(this.jsonData, new Query(), this.fields);
      }
    };
    ListBox2.prototype.render = function() {
      if (this.isAngular && this.allowFiltering) {
        var originalElement = this.element;
        var clonedElement = originalElement.cloneNode(true);
        originalElement.parentNode.replaceChild(clonedElement, originalElement);
        this.element = clonedElement;
        setValue3("ej2_instances", [this], this.element);
      }
      this.inputString = "";
      this.initLoad = true;
      this.isCustomFiltering = false;
      this.initialSelectedOptions = this.value;
      this.inputFormName = this.element.getAttribute("name");
      _super.prototype.render.call(this);
      this.setEnabled();
      this.renderComplete();
    };
    ListBox2.prototype.initWrapper = function() {
      var hiddenSelect = this.createElement("select", {
        className: "e-hidden-select",
        attrs: {
          "multiple": ""
        }
      });
      hiddenSelect.style.visibility = "hidden";
      this.list.classList.add("e-listbox-wrapper");
      this.list.querySelector(".e-list-parent").setAttribute("role", "presentation");
      var groupHdrs = this.list.querySelectorAll(".e-list-group-item");
      for (var i = 0; i < groupHdrs.length; i++) {
        groupHdrs[i].removeAttribute("tabindex");
        groupHdrs[i].setAttribute("role", "option");
      }
      if (this.itemTemplate) {
        this.list.classList.add("e-list-template");
      }
      this.list.classList.add("e-wrapper");
      this.list.classList.add("e-lib");
      if (this.element.tagName === "EJS-LISTBOX") {
        this.element.setAttribute("tabindex", "0");
        if (this.initLoad) {
          this.element.appendChild(this.list);
        }
      } else {
        if (this.initLoad && this.element.parentElement) {
          this.element.parentElement.insertBefore(this.list, this.element);
        }
        this.list.insertBefore(this.element, this.list.firstChild);
        this.element.style.display = "none";
      }
      this.list.insertBefore(hiddenSelect, this.list.firstChild);
      if (this.list.getElementsByClassName("e-list-item")[0]) {
        this.list.getElementsByClassName("e-list-item")[0].classList.remove(dropDownBaseClasses.focus);
      }
      if (this.itemTemplate) {
        this.renderReactTemplates();
      }
      removeClass2([this.list], [dropDownBaseClasses.content, dropDownBaseClasses.root]);
      this.validationAttribute(this.element, hiddenSelect);
      this.list.setAttribute("role", "listbox");
      attributes2(this.list, {
        "role": "listbox",
        "aria-label": "listbox",
        "aria-multiselectable": this.selectionSettings.mode === "Multiple" ? "true" : "false"
      });
      this.updateSelectionSettings();
    };
    ListBox2.prototype.updateSelectionSettings = function() {
      if (this.selectionSettings.showCheckbox && this.selectionSettings.showSelectAll && this.liCollections.length) {
        var l10nSelect = new L10n2(this.getModuleName(), {
          selectAllText: "Select All",
          unSelectAllText: "Unselect All"
        }, this.locale);
        this.showSelectAll = true;
        this.selectAllText = l10nSelect.getConstant("selectAllText");
        this.unSelectAllText = l10nSelect.getConstant("unSelectAllText");
        this.popupWrapper = this.list;
        this.checkBoxSelectionModule.checkAllParent = null;
        this.notify("selectAll", {});
      }
    };
    ListBox2.prototype.initDraggable = function() {
      var _this = this;
      if (this.ulElement) {
        this.ulElement.id = this.element.id + "_parent";
      }
      if (this.allowDragAndDrop) {
        new Sortable(this.ulElement, {
          scope: this.scope,
          itemClass: "e-list-item",
          beforeDragStart: this.triggerDragStart.bind(this),
          drag: this.triggerDrag.bind(this),
          beforeDrop: this.beforeDragEnd.bind(this),
          drop: this.dragEnd.bind(this),
          placeHolder: function() {
            return _this.createElement("span", {
              className: "e-placeholder"
            });
          },
          helper: function(e) {
            var wrapper = _this.list.cloneNode();
            var ele = e.sender.cloneNode(true);
            wrapper.appendChild(ele);
            var refEle = _this.getItems()[0];
            wrapper.style.width = refEle.offsetWidth + "px";
            wrapper.style.height = refEle.offsetHeight + "px";
            if ((_this.value && _this.value.length) > 1 && _this.isSelected(ele)) {
              ele.appendChild(_this.createElement("span", {
                className: "e-list-badge",
                innerHTML: _this.value.length + ""
              }));
            }
            wrapper.style.zIndex = getZindexPartial(_this.element) + "";
            return wrapper;
          }
        });
      }
    };
    ListBox2.prototype.updateActionCompleteData = function(li, item, index) {
      this.jsonData.splice(index === null ? this.jsonData.length : index, 0, item);
    };
    ListBox2.prototype.initToolbar = function() {
      var pos = this.toolbarSettings.position;
      var prevScope = this.element.getAttribute("data-value");
      this.toolbarSettings.items = isNullOrUndefined2(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
      if (this.toolbarSettings.items.length) {
        var toolElem = this.createElement("div", {
          className: "e-listbox-tool",
          attrs: {
            "role": "toolbar"
          }
        });
        var wrapper = this.createElement("div", {
          className: "e-listboxtool-wrapper e-lib e-" + pos.toLowerCase()
        });
        this.list.parentElement.insertBefore(wrapper, this.list);
        wrapper.appendChild(pos === "Right" ? this.list : toolElem);
        wrapper.appendChild(pos === "Right" ? toolElem : this.list);
        this.createButtons(toolElem);
        if (!this.element.id) {
          this.element.id = getUniqueID("e-" + this.getModuleName());
        }
        if (this.scope) {
          document.querySelector(this.scope).setAttribute("data-value", this.element.id);
        } else {
          this.updateToolBarState();
        }
      }
      var scope = this.element.getAttribute("data-value");
      if (prevScope && scope && prevScope !== scope) {
        this.tBListBox = getComponent(document.getElementById(prevScope), this.getModuleName());
        this.tBListBox.updateToolBarState();
      } else if (scope) {
        this.tBListBox = getComponent(document.getElementById(scope), this.getModuleName());
        this.tBListBox.updateToolBarState();
      }
    };
    ListBox2.prototype.createButtons = function(toolElem) {
      var _this = this;
      var btn;
      var ele;
      var title;
      var l10n = new L10n2(this.getModuleName(), {
        moveUp: "Move Up",
        moveDown: "Move Down",
        moveTo: "Move To",
        moveFrom: "Move From",
        moveAllTo: "Move All To",
        moveAllFrom: "Move All From"
      }, this.locale);
      this.toolbarSettings.items.forEach(function(value) {
        title = l10n.getConstant(value);
        ele = _this.createElement("button", {
          attrs: {
            "type": "button",
            "data-value": value,
            "title": title,
            "aria-label": title
          }
        });
        toolElem.appendChild(ele);
        btn = new Button({
          iconCss: "e-icons e-" + value.toLowerCase()
        }, ele);
        btn.createElement = _this.createElement;
      });
    };
    ListBox2.prototype.validationAttribute = function(input2, hiddenSelect) {
      if (this.inputFormName) {
        input2.setAttribute("name", this.inputFormName);
      }
      _super.prototype.validationAttribute.call(this, input2, hiddenSelect);
      hiddenSelect.required = input2.required;
      input2.required = false;
    };
    ListBox2.prototype.setHeight = function() {
      var ele = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
      ele.style.height = formatUnit(this.height);
      if (this.allowFiltering && this.height.toString().indexOf("%") < 0) {
        addClass2([this.list], "e-filter-list");
      } else {
        removeClass2([this.list], "e-filter-list");
      }
    };
    ListBox2.prototype.setCssClass = function() {
      var wrap = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
      if (this.cssClass) {
        addClass2([wrap], this.cssClass.replace(/\s+/g, " ").trim().split(" "));
      }
      if (this.enableRtl) {
        addClass2([this.list], "e-rtl");
      }
    };
    ListBox2.prototype.setEnable = function() {
      var ele = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
      if (this.enabled) {
        removeClass2([ele], cssClass.disabled);
      } else {
        addClass2([ele], cssClass.disabled);
      }
    };
    ListBox2.prototype.showSpinner = function() {
      if (!this.spinner) {
        this.spinner = this.createElement("div", {
          className: "e-listbox-wrapper"
        });
      }
      this.spinner.style.height = formatUnit(this.height);
      if (this.element.parentElement) {
        this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
      }
      createSpinner({
        target: this.spinner
      }, this.createElement);
      showSpinner(this.spinner);
    };
    ListBox2.prototype.hideSpinner = function() {
      if (this.spinner.querySelector(".e-spinner-pane")) {
        hideSpinner(this.spinner);
      }
      if (this.spinner.parentElement) {
        detach2(this.spinner);
      }
    };
    ListBox2.prototype.onInput = function() {
      this.isDataSourceUpdate = false;
      if (this.keyDownStatus) {
        this.isValidKey = true;
      } else {
        this.isValidKey = false;
      }
      this.keyDownStatus = false;
      this.refreshClearIcon();
    };
    ListBox2.prototype.clearText = function() {
      this.filterInput.value = "";
      this.refreshClearIcon();
      var event2 = document.createEvent("KeyboardEvent");
      this.isValidKey = true;
      this.KeyUp(event2);
    };
    ListBox2.prototype.refreshClearIcon = function() {
      if (this.filterInput.parentElement.querySelector("." + listBoxClasses.clearIcon)) {
        var clearElement = this.filterInput.parentElement.querySelector("." + listBoxClasses.clearIcon);
        clearElement.style.visibility = this.filterInput.value === "" ? "hidden" : "visible";
      }
    };
    ListBox2.prototype.onActionComplete = function(ulElement, list, e) {
      var searchEle;
      var filterElem;
      var txtLength;
      if (this.allowFiltering && this.list.getElementsByClassName("e-filter-parent")[0]) {
        searchEle = this.list.getElementsByClassName("e-filter-parent")[0].cloneNode(true);
      }
      if (list.length === 0) {
        var noRecElem = ulElement.childNodes[0];
        if (noRecElem) {
          ulElement.removeChild(noRecElem);
        }
      }
      if (this.allowFiltering) {
        filterElem = this.list.getElementsByClassName("e-input-filter")[0];
        if (filterElem) {
          txtLength = filterElem.selectionStart;
        }
      }
      _super.prototype.onActionComplete.call(this, ulElement, list, e);
      if (this.allowFiltering && !isNullOrUndefined2(searchEle)) {
        this.list.insertBefore(searchEle, this.list.firstElementChild);
        this.filterParent = this.list.getElementsByClassName("e-filter-parent")[0];
        this.filterWireEvents(searchEle);
        var inputSearch = searchEle.querySelector(".e-input-filter");
        if (inputSearch) {
          inputSearch.addEventListener("focus", function() {
            if (!searchEle.childNodes[0].classList.contains("e-input-focus")) {
              searchEle.childNodes[0].classList.add("e-input-focus");
            }
          });
          inputSearch.addEventListener("blur", function() {
            if (searchEle.childNodes[0].classList.contains("e-input-focus")) {
              searchEle.childNodes[0].classList.remove("e-input-focus");
            }
          });
        }
      }
      this.initWrapper();
      this.setSelection(this.value, true, false, !this.isRendered);
      this.initDraggable();
      this.mainList = this.ulElement;
      if (this.initLoad) {
        this.jsonData = [];
        extend2(this.jsonData, list, []);
        this.initToolbarAndStyles();
        this.wireEvents();
        if (this.showCheckbox) {
          this.setCheckboxPosition();
        }
        if (this.allowFiltering) {
          this.setFiltering();
        }
      } else {
        if (this.isDataSourceUpdate) {
          this.jsonData = [];
          extend2(this.jsonData, list, []);
          this.isDataSourceUpdate = false;
        }
        if (this.allowFiltering) {
          filterElem = this.list.getElementsByClassName("e-input-filter")[0];
          if (isNullOrUndefined2(filterElem)) {
            return;
          }
          filterElem.selectionStart = txtLength;
          filterElem.selectionEnd = txtLength;
          if (filterElem.value !== "") {
            filterElem.focus();
          }
        }
      }
      if (this.toolbarSettings.items.length && this.scope && this.scope.indexOf("#") > -1 && !isNullOrUndefined2(e)) {
        var scope = this.scope.replace("#", "");
        var scopedLB = getComponent(document.getElementById(scope), this.getModuleName());
        scopedLB.initToolbar();
      }
      this.initLoad = false;
    };
    ListBox2.prototype.initToolbarAndStyles = function() {
      this.initToolbar();
      this.setCssClass();
      this.setEnable();
      this.setHeight();
    };
    ListBox2.prototype.triggerDragStart = function(args) {
      var _this = this;
      var badge;
      var extendedArgs = extend2(this.getDragArgs(args), {
        dragSelected: true
      }, {
        cancel: false
      });
      if (Browser2.isIos) {
        this.list.style.overflow = "hidden";
      }
      this.trigger("dragStart", extendedArgs, function(dragEventArgs) {
        _this.allowDragAll = dragEventArgs.dragSelected;
        if (!_this.allowDragAll) {
          badge = _this.ulElement.getElementsByClassName("e-list-badge")[0];
          if (badge) {
            detach2(badge);
          }
        }
        if (dragEventArgs.cancel) {
          args.cancel = true;
        }
      });
    };
    ListBox2.prototype.triggerDrag = function(args) {
      var _this = this;
      var scrollParent;
      var boundRect;
      var scrollMoved = 36;
      var scrollHeight = 10;
      if (this.itemTemplate && args.target) {
        if (args.target && args.target.closest(".e-list-item")) {
          scrollHeight = args.target.closest(".e-list-item").scrollHeight;
        } else {
          var listItem = args.element.querySelector(".e-list-item");
          if (listItem) {
            scrollHeight = listItem.scrollHeight;
          }
        }
      }
      var event2 = args.event;
      var wrapper;
      this.stopTimer();
      if (args.target && (args.target.classList.contains("e-listbox-wrapper") || args.target.classList.contains("e-list-item") || args.target.classList.contains("e-filter-parent") || args.target.classList.contains("e-input-group") || args.target.closest(".e-list-item"))) {
        if (args.target.classList.contains("e-list-item") || args.target.classList.contains("e-filter-parent") || args.target.classList.contains("e-input-group") || args.target.closest(".e-list-item")) {
          wrapper = args.target.closest(".e-listbox-wrapper");
        } else {
          wrapper = args.target;
        }
        if (this.allowFiltering) {
          scrollParent = wrapper.querySelector(".e-list-parent");
        } else {
          scrollParent = wrapper;
        }
        if (scrollParent) {
          boundRect = scrollParent.getBoundingClientRect();
          if (boundRect.y + scrollParent.offsetHeight - (event2.clientY + scrollMoved) < 1) {
            this.timer = window.setInterval(function() {
              _this.setScrollDown(scrollParent, scrollHeight, true);
            }, 70);
          } else if (event2.clientY - scrollMoved - boundRect.y < 1) {
            this.timer = window.setInterval(function() {
              _this.setScrollDown(scrollParent, scrollHeight, false);
            }, 70);
          }
        }
      }
      if (args.target === null) {
        return;
      }
      this.trigger("drag", this.getDragArgs(args));
    };
    ListBox2.prototype.setScrollDown = function(scrollElem, scrollPixel, isScrollDown) {
      if (isScrollDown) {
        scrollElem.scrollTop = scrollElem.scrollTop + scrollPixel;
      } else {
        scrollElem.scrollTop = scrollElem.scrollTop - scrollPixel;
      }
    };
    ListBox2.prototype.stopTimer = function() {
      window.clearInterval(this.timer);
    };
    ListBox2.prototype.beforeDragEnd = function(args) {
      this.stopTimer();
      var items = [];
      this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute("data-value"));
      if (this.value.indexOf(this.dragValue) > -1) {
        args.items = this.getDataByValues(this.value);
      } else {
        args.items = this.getDataByValues([this.dragValue]);
      }
      extend2(items, args.items);
      this.trigger("beforeDrop", args);
      if (JSON.stringify(args.items) !== JSON.stringify(items)) {
        this.customDraggedItem = args.items;
      }
    };
    ListBox2.prototype.dragEnd = function(args) {
      var _this = this;
      var listData;
      var liColl;
      var jsonData;
      var droppedData;
      var selectedOptions;
      var sortedData;
      var dropValue = this.getFormattedValue(args.droppedElement.getAttribute("data-value"));
      var listObj = this.getComponent(args.droppedElement);
      var getArgs = this.getDragArgs({
        target: args.droppedElement
      }, true);
      var sourceArgs = {
        previousData: this.dataSource
      };
      var destArgs = {
        previousData: listObj.dataSource
      };
      var dragArgs = extend2({}, getArgs, {
        target: args.target,
        source: {
          previousData: this.dataSource
        },
        previousIndex: args.previousIndex,
        currentIndex: args.currentIndex
      });
      if (listObj !== this) {
        var sourceArgs1 = extend2(sourceArgs, {
          currentData: this.listData
        });
        dragArgs = extend2(dragArgs, {
          source: sourceArgs1,
          destination: destArgs
        });
      }
      if (Browser2.isIos) {
        this.list.style.overflow = "";
      }
      var targetListObj = this.getComponent(args.target);
      if (targetListObj && targetListObj.listData.length === 0) {
        var noRecElem = targetListObj.ulElement.childNodes[0];
        if (noRecElem) {
          targetListObj.ulElement.removeChild(noRecElem);
        }
      }
      if (listObj === this) {
        var ul_1 = this.ulElement;
        listData = [].slice.call(this.listData);
        liColl = [].slice.call(this.liCollections);
        jsonData = [].slice.call(this.jsonData);
        sortedData = [].slice.call(this.sortedData);
        var toSortIdx_1 = args.currentIndex;
        var toIdx_1 = args.currentIndex = this.getCurIdx(this, args.currentIndex);
        var rIdx = listData.indexOf(this.getDataByValue(dropValue));
        var jsonIdx = jsonData.indexOf(this.getDataByValue(dropValue));
        var sIdx = sortedData.indexOf(this.getDataByValue(dropValue));
        listData.splice(toIdx_1, 0, listData.splice(rIdx, 1)[0]);
        sortedData.splice(toSortIdx_1, 0, sortedData.splice(sIdx, 1)[0]);
        jsonData.splice(toIdx_1, 0, jsonData.splice(jsonIdx, 1)[0]);
        liColl.splice(toIdx_1, 0, liColl.splice(rIdx, 1)[0]);
        if (this.allowDragAll) {
          selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
          if (!isNullOrUndefined2(this.customDraggedItem)) {
            selectedOptions = [];
            this.customDraggedItem.forEach(function(item) {
              selectedOptions.push(getValue2(_this.fields.value, item));
            });
          }
          selectedOptions.forEach(function(value) {
            if (value !== dropValue) {
              var idx = listData.indexOf(_this.getDataByValue(value));
              var jsonIdx_1 = jsonData.indexOf(_this.getDataByValue(value));
              var sIdx_1 = sortedData.indexOf(_this.getDataByValue(value));
              if (idx > toIdx_1) {
                toIdx_1++;
              }
              jsonData.splice(toIdx_1, 0, jsonData.splice(jsonIdx_1, 1)[0]);
              listData.splice(toIdx_1, 0, listData.splice(idx, 1)[0]);
              sortedData.splice(toSortIdx_1, 0, sortedData.splice(sIdx_1, 1)[0]);
              liColl.splice(toIdx_1, 0, liColl.splice(idx, 1)[0]);
              ul_1.insertBefore(_this.getItems()[_this.getIndexByValue(value)], ul_1.getElementsByClassName("e-placeholder")[0]);
            }
          });
        }
        this.listData = listData;
        this.jsonData = jsonData;
        this.sortedData = sortedData;
        this.liCollections = liColl;
      } else {
        var li_1;
        var fLiColl_1 = [].slice.call(this.liCollections);
        var currIdx_1 = args.currentIndex = this.getCurIdx(listObj, args.currentIndex);
        var ul_2 = listObj.ulElement;
        listData = [].slice.call(listObj.listData);
        liColl = [].slice.call(listObj.liCollections);
        jsonData = [].slice.call(listObj.jsonData);
        sortedData = [].slice.call(listObj.sortedData);
        selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll ? this.value : [dropValue];
        if (!isNullOrUndefined2(this.customDraggedItem)) {
          selectedOptions = [];
          this.customDraggedItem.forEach(function(item) {
            selectedOptions.push(getValue2(_this.fields.value, item));
          });
        }
        var fListData_1 = [].slice.call(this.listData);
        var fSortData_1 = [].slice.call(this.sortedData);
        selectedOptions.forEach(function(value) {
          droppedData = _this.getDataByValue(value);
          var srcIdx = _this.listData.indexOf(droppedData);
          var jsonSrcIdx = _this.jsonData.indexOf(droppedData);
          var sortIdx = _this.sortedData.indexOf(droppedData);
          fListData_1.splice(srcIdx, 1);
          _this.jsonData.splice(jsonSrcIdx, 1);
          fSortData_1.splice(sortIdx, 1);
          _this.listData = fListData_1;
          _this.sortedData = fSortData_1;
          var destIdx = value === dropValue ? args.currentIndex : currIdx_1;
          listData.splice(destIdx, 0, droppedData);
          jsonData.splice(destIdx, 0, droppedData);
          sortedData.splice(destIdx, 0, droppedData);
          liColl.splice(destIdx, 0, fLiColl_1.splice(srcIdx, 1)[0]);
          if (!value) {
            var liCollElem_1 = _this.getItems();
            for (var i2 = 0; i2 < liCollElem_1.length; i2++) {
              if (liCollElem_1[i2].getAttribute("data-value") === null && liCollElem_1[i2].classList.contains("e-list-item")) {
                li_1 = liCollElem_1[i2];
                break;
              }
            }
          } else {
            li_1 = _this.getItems()[_this.getIndexByValue(value)];
          }
          if (!li_1) {
            li_1 = args.helper;
          }
          _this.removeSelected(_this, value === dropValue ? [args.droppedElement] : [li_1]);
          ul_2.insertBefore(li_1, ul_2.getElementsByClassName("e-placeholder")[0]);
          currIdx_1++;
        });
        if (this.fields.groupBy) {
          var sourceElem = this.renderItems(this.listData, this.fields);
          this.updateListItems(sourceElem, this.ulElement);
          this.setSelection();
        }
        if (listObj.sortOrder !== "None" || this.selectionSettings.showCheckbox !== listObj.selectionSettings.showCheckbox || listObj.fields.groupBy || listObj.itemTemplate || this.itemTemplate) {
          var sortable = getComponent(ul_2, "sortable");
          var sourceElem = listObj.renderItems(listData, listObj.fields);
          listObj.updateListItems(sourceElem, ul_2);
          this.setSelection();
          if (sortable.placeHolderElement) {
            ul_2.appendChild(sortable.placeHolderElement);
          }
          ul_2.appendChild(args.helper);
          listObj.setSelection();
        }
        this.liCollections = fLiColl_1;
        listObj.liCollections = liColl;
        listObj.jsonData = extend2([], [], jsonData, false);
        listObj.listData = extend2([], [], listData, false);
        if (listObj.sortOrder === "None") {
          listObj.sortedData = extend2([], [], sortedData, false);
        }
        if (this.listData.length === 0) {
          this.l10nUpdate();
        }
      }
      if (this === listObj) {
        var sourceArgs1 = extend2(sourceArgs, {
          currentData: listData
        });
        dragArgs = extend2(dragArgs, {
          source: sourceArgs1
        });
      } else {
        var dragArgs1 = extend2(destArgs, {
          currentData: listData
        });
        dragArgs = extend2(dragArgs, {
          destination: dragArgs1
        });
      }
      if (!isNullOrUndefined2(this.customDraggedItem)) {
        dragArgs.items = this.customDraggedItem;
      }
      this.trigger("drop", dragArgs);
      var liCollElem = dragArgs.elements;
      if (liCollElem.length) {
        for (var i = 0; i < liCollElem.length; i++) {
          liCollElem[i].classList.remove("e-grabbed");
        }
      }
      if (this.toolbarSettings.items.length > 0) {
        this.updateToolBarState();
      } else if (this.tBListBox && this.tBListBox.toolbarSettings.items.length > 0) {
        this.tBListBox.updateToolBarState();
      }
    };
    ListBox2.prototype.updateListItems = function(sourceElem, destElem) {
      destElem.innerHTML = "";
      destElem.append.apply(destElem, sourceElem.childNodes);
    };
    ListBox2.prototype.removeSelected = function(listObj, elems) {
      if (listObj.selectionSettings.showCheckbox) {
        elems.forEach(function(ele) {
          ele.getElementsByClassName("e-frame")[0].classList.remove("e-check");
        });
      } else {
        removeClass2(elems, cssClass.selected);
      }
    };
    ListBox2.prototype.getCurIdx = function(listObj, idx) {
      if (listObj.fields.groupBy) {
        idx -= [].slice.call(listObj.ulElement.children).slice(0, idx).filter(function(ele) {
          return ele.classList.contains(cssClass.group);
        }).length;
      }
      return idx;
    };
    ListBox2.prototype.getComponent = function(li) {
      var listObj;
      var ele = this.element.tagName === "EJS-LISTBOX" ? closest2(li, ".e-listbox") : closest2(li, ".e-listbox-wrapper") && closest2(li, ".e-listbox-wrapper").querySelector(".e-listbox");
      if (ele) {
        listObj = getComponent(ele, this.getModuleName());
      }
      return listObj;
    };
    ListBox2.prototype.setEnabled = function() {
      this.element.setAttribute("aria-disabled", this.enabled ? "false" : "true");
    };
    ListBox2.prototype.listOption = function(dataSource, fields) {
      this.listCurrentOptions = _super.prototype.listOption.call(this, dataSource, fields);
      this.listCurrentOptions = extend2({}, this.listCurrentOptions, {
        itemCreated: this.triggerBeforeItemRender.bind(this)
      }, true);
      this.notify("listoption", {
        module: "CheckBoxSelection"
      });
      return this.listCurrentOptions;
    };
    ListBox2.prototype.triggerBeforeItemRender = function(e) {
      e.item.setAttribute("tabindex", "-1");
      this.trigger("beforeItemRender", {
        element: e.item,
        item: e.curData
      });
    };
    ListBox2.prototype.requiredModules = function() {
      var modules = [];
      if (this.selectionSettings.showCheckbox) {
        modules.push({
          member: "CheckBoxSelection",
          args: [this]
        });
      }
      return modules;
    };
    ListBox2.prototype.enableItems = function(items, enable, isValue) {
      var _this = this;
      if (enable === void 0) {
        enable = true;
      }
      var li;
      items.forEach(function(item) {
        var text = item;
        li = _this.findListElement(_this.list, "li", "data-value", isValue ? text : _this.getValueByText(text));
        if (!li) {
          return;
        }
        if (enable) {
          removeClass2([li], cssClass.disabled);
          li.removeAttribute("aria-disabled");
        } else {
          addClass2([li], cssClass.disabled);
          li.setAttribute("aria-disabled", "true");
        }
      });
      if (this.allowFiltering && this.filterInput && this.filterInput.value !== "" && this.toolbarSettings.items.length > 0) {
        var canDisable_1 = false;
        this.ulElement.childNodes.forEach(function(li2) {
          if (!li2.classList.contains("e-disabled")) {
            canDisable_1 = true;
          }
        });
        if (!canDisable_1) {
          var wrap = this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];
          var btn = wrap.querySelector('[data-value="moveAllTo"]');
          btn.disabled = true;
        }
      }
    };
    ListBox2.prototype.selectItems = function(items, state, isValue) {
      if (state === void 0) {
        state = true;
      }
      if (state && !this.selectionSettings.showCheckbox && this.selectionSettings.mode === "Single") {
        this.getSelectedItems().forEach(function(li) {
          li.classList.remove("e-active");
          li.removeAttribute("aria-selected");
          removeClass2([li], cssClass.selected);
        });
      }
      this.setSelection(items, state, !isValue);
      this.updateSelectedOptions();
      var selElems = [];
      for (var i = 0; i < items.length; i++) {
        var liColl = this.list.querySelectorAll('[aria-selected="true"]');
        for (var j = 0; j < liColl.length; j++) {
          if (items[i] === this.getFormattedValue(liColl[j].getAttribute("data-value"))) {
            selElems.push(liColl[j]);
          }
        }
      }
      this.triggerChange(selElems, null);
    };
    ListBox2.prototype.selectAll = function(state) {
      if (state === void 0) {
        state = true;
      }
      this.selectAllItems(state);
    };
    ListBox2.prototype.addItems = function(items, itemIndex) {
      _super.prototype.addItem.call(this, items, itemIndex);
      if (this.allowFiltering && this.filterInput.value !== "") {
        this.filteringAction(this.jsonData, new Query(), this.fields);
      }
    };
    ListBox2.prototype.removeItems = function(items, itemIndex) {
      this.removeItem(items, itemIndex);
    };
    ListBox2.prototype.removeItem = function(items, itemIndex) {
      var _this = this;
      var liCollections = [];
      var liElement = this.list.querySelectorAll("." + dropDownBaseClasses.li);
      if (items) {
        items = items instanceof Array ? items : [items];
        var fields = this.fields;
        var dataValue = void 0;
        var objValue = {};
        var dupData = [];
        extend2(dupData, [], this.jsonData);
        var removeIdxes = [];
        var removeLiIdxes = [];
        for (var i = 0; i < dupData.length; i++) {
          var value = dupData[i] instanceof Object ? dupData[i][fields.value] : dupData[i].toString();
          objValue[value] = i;
        }
        for (var j = 0; j < items.length; j++) {
          dataValue = items[j] instanceof Object ? items[j][fields.value] : items[j].toString();
          if (Object.prototype.hasOwnProperty.call(objValue, dataValue)) {
            var idx = objValue[dataValue];
            liCollections.push(liElement[idx]);
            removeIdxes.push(idx);
            removeLiIdxes.push(idx);
          }
        }
        var validRemoveIdxes = removeIdxes.sort(function(a, b) {
          return b - a;
        });
        validRemoveIdxes.forEach(function(idx2) {
          _this.listData.splice(idx2, 1);
          _this.jsonData.splice(idx2, 1);
        });
        for (var k = removeLiIdxes.length - 1; k >= 0; k--) {
          this.updateLiCollection(removeLiIdxes[k]);
        }
      } else {
        itemIndex = itemIndex ? itemIndex : 0;
        liCollections.push(liElement[itemIndex]);
        this.listData.splice(itemIndex, 1);
        this.jsonData.splice(itemIndex, 1);
        this.updateLiCollection(itemIndex);
      }
      for (var i = 0; i < liCollections.length; i++) {
        this.ulElement.removeChild(liCollections[i]);
      }
      if (this.listData.length === 0) {
        this.l10nUpdate();
      }
      if (this.listData.length !== this.sortedData.length) {
        this.sortedData = this.listData;
      }
      this.value = [];
      this.updateToolBarState();
    };
    ListBox2.prototype.getDataByValues = function(value) {
      var data = [];
      for (var i = 0; i < value.length; i++) {
        data.push(this.getDataByValue(value[i]));
      }
      return data;
    };
    ListBox2.prototype.moveUp = function(value) {
      var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
      this.moveUpDown(true, false, elem);
    };
    ListBox2.prototype.moveDown = function(value) {
      var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
      this.moveUpDown(false, false, elem);
    };
    ListBox2.prototype.moveTop = function(value) {
      var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
      this.moveUpDown(null, false, elem, true);
    };
    ListBox2.prototype.moveBottom = function(value) {
      var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
      this.moveUpDown(true, false, elem, false, true);
    };
    ListBox2.prototype.moveTo = function(value, index, targetId) {
      var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
      var tlistbox = targetId ? getComponent(targetId, ListBox_1) : this.getScopedListBox();
      this.moveData(this, tlistbox, false, elem, index);
    };
    ListBox2.prototype.moveAllTo = function(targetId, index) {
      this.toolbarAction = "moveAllTo";
      if (this.listData.length > 0) {
        var tlistbox = targetId ? getComponent(targetId, ListBox_1) : this.getScopedListBox();
        this.moveAllData(this, tlistbox, false, index);
      }
    };
    ListBox2.prototype.getDataList = function() {
      return this.jsonData;
    };
    ListBox2.prototype.getSortedList = function() {
      var sortData;
      var tempData;
      sortData = tempData = this.sortedData;
      if (this.fields.groupBy) {
        sortData = [];
        for (var i = 0; i < tempData.length; i++) {
          if (tempData[i].isHeader) {
            continue;
          }
          sortData.push(tempData[i]);
        }
      }
      return sortData;
    };
    ListBox2.prototype.getElemByValue = function(value) {
      var elem = [];
      for (var i = 0; i < value.length; i++) {
        elem.push(this.ulElement.querySelector('[data-value ="' + value[i] + '"]'));
      }
      return elem;
    };
    ListBox2.prototype.updateLiCollection = function(index) {
      var tempLi = [].slice.call(this.liCollections);
      tempLi.splice(index, 1);
      this.liCollections = tempLi;
    };
    ListBox2.prototype.selectAllItems = function(state, event2) {
      var _this = this;
      [].slice.call(this.getItems()).forEach(function(li) {
        if (!li.classList.contains(cssClass.disabled)) {
          if (_this.selectionSettings.showCheckbox) {
            var ele = li.getElementsByClassName("e-check")[0];
            if (!ele && state || ele && !state) {
              _this.notify("updatelist", {
                li,
                module: "listbox"
              });
              if (_this.maximumSelectionLength >= _this.list.querySelectorAll(".e-list-item span.e-check").length) {
                _this.checkMaxSelection();
              }
            }
          } else {
            if (state) {
              li.classList.add(cssClass.selected);
            } else {
              li.classList.remove(cssClass.selected);
            }
          }
        }
      });
      this.updateSelectedOptions();
      if (this.allowFiltering && this.selectionSettings.showCheckbox) {
        var liEle = this.list.getElementsByTagName("li");
        var index = 0;
        if (state) {
          var _loop_1 = function() {
            var dataValue1 = this_1.getFormattedValue(liEle[index].getAttribute("data-value"));
            if (!this_1.value.some(function(e) {
              return e === dataValue1;
            })) {
              this_1.value.push(this_1.getFormattedValue(liEle[index].getAttribute("data-value")));
            }
          };
          var this_1 = this;
          for (index = 0; index < liEle.length; index++) {
            _loop_1();
          }
        } else {
          var _loop_2 = function() {
            var dataValue2 = this_2.getFormattedValue(liEle[index].getAttribute("data-value"));
            this_2.value = this_2.value.filter(function(e) {
              return e !== dataValue2;
            });
          };
          var this_2 = this;
          for (index = 0; index < liEle.length; index++) {
            _loop_2();
          }
        }
        if (document.querySelectorAll("ul").length < 2) {
          this.updateMainList();
        }
      }
      this.triggerChange(this.getSelectedItems(), event2);
    };
    ListBox2.prototype.updateMainList = function() {
      var mainList = this.mainList.querySelectorAll(".e-list-item");
      var ulList = this.ulElement.querySelectorAll(".e-list-item");
      var mainCount = mainList.length;
      var ulEleCount = ulList.length;
      if (this.selectionSettings.showCheckbox || document.querySelectorAll("ul").length > 1 || mainCount !== ulEleCount) {
        var listindex = 0;
        var valueindex = 0;
        var count = 0;
        for (listindex; listindex < mainCount; ) {
          if (this.value) {
            for (valueindex; valueindex < this.value.length; valueindex++) {
              if (mainList[listindex].getAttribute("data-value") === this.value[valueindex]) {
                count++;
              }
            }
          }
          if (!count && this.selectionSettings.showCheckbox) {
            mainList[listindex].getElementsByClassName("e-frame")[0].classList.remove("e-check");
          }
          if (document.querySelectorAll("ul").length > 1 && count && mainCount !== ulEleCount) {
            this.mainList.removeChild(this.mainList.getElementsByTagName("li")[listindex]);
            listindex = 0;
          } else {
            listindex++;
          }
          count = 0;
          valueindex = 0;
        }
      }
    };
    ListBox2.prototype.wireEvents = function() {
      var form = closest2(this.element, "form");
      var wrapper = this.element.tagName === "EJS-LISTBOX" ? this.element : this.list;
      EventHandler2.add(this.list, "click", this.clickHandler, this);
      EventHandler2.add(wrapper, "keydown", this.keyDownHandler, this);
      EventHandler2.add(wrapper, "focusout", this.focusOutHandler, this);
      this.wireToolbarEvent();
      if (this.selectionSettings.showCheckbox) {
        EventHandler2.remove(document, "mousedown", this.checkBoxSelectionModule.onDocumentClick);
      }
      if (this.fields.groupBy || this.element.querySelector("select>optgroup")) {
        EventHandler2.remove(this.list, "scroll", this.setFloatingHeader);
      }
      if (form) {
        EventHandler2.add(form, "reset", this.formResetHandler, this);
      }
      window.addEventListener("resize", this.resizeHandler.bind(this));
    };
    ListBox2.prototype.wireToolbarEvent = function() {
      if (this.toolbarSettings.items.length) {
        EventHandler2.add(this.getToolElem(), "click", this.toolbarClickHandler, this);
      }
    };
    ListBox2.prototype.unwireEvents = function() {
      var form = closest2(this.element, "form");
      var wrapper = this.element.tagName === "EJS-LISTBOX" ? this.element : this.list;
      EventHandler2.remove(this.list, "click", this.clickHandler);
      EventHandler2.remove(wrapper, "keydown", this.keyDownHandler);
      EventHandler2.remove(wrapper, "focusout", this.focusOutHandler);
      if (this.allowFiltering && this.clearFilterIconElem) {
        EventHandler2.remove(this.clearFilterIconElem, "click", this.clearText);
      }
      if (this.toolbarSettings.items.length) {
        EventHandler2.remove(this.getToolElem(), "click", this.toolbarClickHandler);
      }
      if (form) {
        EventHandler2.remove(form, "reset", this.formResetHandler);
      }
      window.removeEventListener("resize", this.resizeHandler.bind(this));
    };
    ListBox2.prototype.clickHandler = function(e) {
      var li = closest2(e.target, ".e-list-item");
      if (isNullOrUndefined2(li)) {
        return;
      }
      this.selectHandler(e);
    };
    ListBox2.prototype.checkSelectAll = function() {
      var searchCount = 0;
      var liItems = this.list.querySelectorAll("li." + dropDownBaseClasses.li);
      for (var i = 0; i < liItems.length; i++) {
        if (!liItems[i].classList.contains("e-disabled")) {
          searchCount++;
        }
      }
      var len = this.getSelectedItems().length;
      if (this.showSelectAll && searchCount) {
        this.notify("checkSelectAll", {
          module: "CheckBoxSelection",
          value: searchCount === len ? "check" : len === 0 ? "uncheck" : "indeterminate"
        });
      }
    };
    ListBox2.prototype.getQuery = function(query) {
      var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
      if (this.allowFiltering) {
        var filterType = this.inputString === "" ? "contains" : this.filterType;
        var dataType = this.typeOfData(this.dataSource).typeof;
        if (dataType === null) {
          dataType = this.typeOfData(this.jsonData).typeof;
        }
        if (!(this.dataSource instanceof DataManager) && dataType === "string" || dataType === "number") {
          filterQuery.where("", filterType, this.inputString, this.ignoreCase, this.ignoreAccent);
        } else {
          var fields = this.fields.text ? this.fields.text : "";
          filterQuery.where(fields, filterType, this.inputString, this.ignoreCase, this.ignoreAccent);
        }
      } else {
        filterQuery = query ? query : this.query ? this.query : new Query();
      }
      return filterQuery;
    };
    ListBox2.prototype.setFiltering = function() {
      var filterInputObj;
      if (this.initLoad || isNullOrUndefined2(this.filterParent)) {
        this.filterParent = this.createElement("span", {
          className: listBoxClasses.filterParent
        });
        this.filterInput = this.createElement("input", {
          attrs: {
            type: "text"
          },
          className: listBoxClasses.filterInput
        });
        this.element.parentNode.insertBefore(this.filterInput, this.element);
        filterInputObj = Input.createInput({
          element: this.filterInput,
          buttons: [listBoxClasses.filterBarClearIcon],
          properties: {
            placeholder: this.filterBarPlaceholder
          }
        }, this.createElement);
        append([filterInputObj.container], this.filterParent);
        prepend([this.filterParent], this.list);
        attributes2(this.filterInput, {
          "aria-disabled": "false",
          "aria-label": "search list item",
          "autocomplete": "off",
          "autocorrect": "off",
          "autocapitalize": "off",
          "spellcheck": "false",
          "role": "textbox"
        });
        if (this.height.toString().indexOf("%") < 0) {
          addClass2([this.list], "e-filter-list");
        } else if (this.height.toString().indexOf("%") > 0) {
          this.ulElement.style.height = this.ulElement.offsetHeight - this.filterParent.offsetHeight + "px";
        }
        this.inputString = this.filterInput.value;
        this.filterWireEvents();
        this.ulElement.style.setProperty("height", "calc(100% - " + this.filterParent.offsetHeight + "px)", "important");
        return filterInputObj;
      }
    };
    ListBox2.prototype.filterWireEvents = function(filterElem) {
      if (filterElem) {
        this.filterInput = filterElem.querySelector(".e-input-filter");
      }
      this.clearFilterIconElem = this.filterInput.parentElement.querySelector("." + listBoxClasses.clearIcon);
      if (this.clearFilterIconElem) {
        EventHandler2.add(this.clearFilterIconElem, "click", this.clearText, this);
        if (!filterElem) {
          this.clearFilterIconElem.style.visibility = "hidden";
        }
      }
      EventHandler2.add(this.filterInput, "input", this.onInput, this);
      EventHandler2.add(this.filterInput, "keyup", this.KeyUp, this);
      EventHandler2.add(this.filterInput, "keydown", this.onKeyDown, this);
    };
    ListBox2.prototype.selectHandler = function(e, isKey) {
      var isSelect = true;
      var currSelIdx;
      var li = closest2(e.target, ".e-list-item");
      var selectedLi = [li];
      if (li && li.parentElement) {
        currSelIdx = [].slice.call(li.parentElement.children).indexOf(li);
        if (!this.selectionSettings.showCheckbox) {
          if ((e.ctrlKey || e.metaKey || Browser2.isDevice) && this.isSelected(li)) {
            li.classList.remove(cssClass.selected);
            li.removeAttribute("aria-selected");
            isSelect = false;
          } else if (!(this.selectionSettings.mode === "Multiple" && (e.ctrlKey || e.metaKey || Browser2.isDevice))) {
            this.getSelectedItems().forEach(function(ele) {
              ele.removeAttribute("aria-selected");
            });
            removeClass2(this.getSelectedItems(), cssClass.selected);
          }
        } else {
          isSelect = !li.getElementsByClassName("e-frame")[0].classList.contains("e-check");
        }
        if (e.shiftKey && !this.selectionSettings.showCheckbox && this.selectionSettings.mode !== "Single") {
          selectedLi = [].slice.call(li.parentElement.children).slice(Math.min(currSelIdx, this.prevSelIdx), Math.max(currSelIdx, this.prevSelIdx) + 1).filter(function(ele) {
            return ele.classList.contains("e-list-item");
          });
        } else {
          this.prevSelIdx = [].slice.call(li.parentElement.children).indexOf(li);
        }
        if (isSelect) {
          if (!this.selectionSettings.showCheckbox) {
            addClass2(selectedLi, cssClass.selected);
          }
          selectedLi.forEach(function(ele) {
            ele.setAttribute("aria-selected", "true");
          });
          this.list.setAttribute("aria-activedescendant", li.id);
        } else {
          selectedLi.forEach(function(ele) {
            ele.setAttribute("aria-selected", "false");
          });
        }
        if (!isKey && (this.maximumSelectionLength > (this.value && this.value.length) || !isSelect) && (this.maximumSelectionLength >= (this.value && this.value.length) || !isSelect) && !(this.maximumSelectionLength < (this.value && this.value.length))) {
          this.notify("updatelist", {
            li,
            e,
            module: "listbox"
          });
        }
        if (this.allowFiltering && !isKey) {
          var liDataValue_1 = this.getFormattedValue(li.getAttribute("data-value"));
          if (!isSelect) {
            this.value = this.value.filter(function(value1) {
              return value1 !== liDataValue_1;
            });
          } else {
            var values = [];
            extend2(values, this.value);
            values.push(liDataValue_1);
            this.value = values;
          }
          if (document.querySelectorAll("ul").length < 2) {
            this.updateMainList();
          }
        }
        this.updateSelectedOptions();
        this.triggerChange(this.getSelectedItems(), e);
        if (this.list) {
          this.checkMaxSelection();
        }
      }
    };
    ListBox2.prototype.triggerChange = function(selectedLis, event2) {
      this.trigger("change", {
        elements: selectedLis,
        items: this.getDataByElements(selectedLis),
        value: this.value,
        event: event2
      });
    };
    ListBox2.prototype.getDataByElems = function(elems) {
      var data = [];
      var len = elems.length;
      for (var i = 0; i < len; i++) {
        var elem = elems[i];
        var value = elem.getAttribute("data-value");
        var formattedValue = this.getFormattedValue(value);
        data.push(this.getDataByValue(formattedValue));
      }
      return data;
    };
    ListBox2.prototype.getDataByElements = function(elems) {
      var data = [];
      var value;
      var sIdx = 0;
      if (!isNullOrUndefined2(this.listData)) {
        var type = this.typeOfData(this.listData).typeof;
        if (type === "string" || type === "number" || type === "boolean") {
          for (var _i = 0, _a = this.listData; _i < _a.length; _i++) {
            var item = _a[_i];
            for (var i = sIdx, len = elems.length; i < len; i++) {
              value = this.getFormattedValue(elems[i].getAttribute("data-value"));
              if (!isNullOrUndefined2(item) && item === value) {
                sIdx = i;
                data.push(item);
                break;
              }
            }
            if (elems.length === data.length) {
              break;
            }
          }
        } else {
          for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
            var item = _c[_b];
            for (var i = sIdx, len = elems.length; i < len; i++) {
              value = this.getFormattedValue(elems[i].getAttribute("data-value"));
              if (!isNullOrUndefined2(item) && getValue2(this.fields.value ? this.fields.value : "value", item) === value) {
                sIdx = i;
                data.push(item);
                break;
              }
            }
            if (elems.length === data.length) {
              break;
            }
          }
        }
        return data;
      }
      return null;
    };
    ListBox2.prototype.checkMaxSelection = function() {
      var limit = this.list.querySelectorAll(".e-list-item span.e-check").length;
      if (this.selectionSettings.showCheckbox) {
        var index = 0;
        var liCollElem = this.list.getElementsByClassName("e-list-item");
        for (index; index < liCollElem.length; index++) {
          if (!liCollElem[index].querySelector(".e-frame.e-check")) {
            if (limit === this.maximumSelectionLength) {
              liCollElem[index].classList.add("e-disable");
            } else if (liCollElem[index].classList.contains("e-disable")) {
              liCollElem[index].classList.remove("e-disable");
            }
          }
        }
      }
    };
    ListBox2.prototype.toolbarClickHandler = function(e) {
      var btn = closest2(e.target, "button");
      if (btn) {
        this.toolbarAction = btn.getAttribute("data-value");
        if (btn.disabled) {
          return;
        }
        switch (this.toolbarAction) {
          case "moveUp":
            this.moveUpDown(true);
            break;
          case "moveDown":
            this.moveUpDown();
            break;
          case "moveTo":
            this.moveItemTo();
            break;
          case "moveFrom":
            this.moveItemFrom();
            break;
          case "moveAllTo":
            this.moveAllItemTo();
            break;
          case "moveAllFrom":
            this.moveAllItemFrom();
            break;
          default:
            this.trigger("actionBegin", {
              cancel: false,
              items: this.getDataByElems(this.getSelectedItems()),
              eventName: this.toolbarAction
            });
            break;
        }
      }
    };
    ListBox2.prototype.moveUpDown = function(isUp, isKey, value, isTop, isBottom) {
      var _this = this;
      var elems = this.getSelectedItems();
      if (value) {
        elems = value;
      }
      if ((isUp && this.isSelected(this.ulElement.firstElementChild) || !isUp && this.isSelected(this.ulElement.lastElementChild)) && !value) {
        return;
      }
      var tempItems = this.getDataByElems(elems);
      var localDataArgs = {
        cancel: false,
        items: tempItems,
        eventName: this.toolbarAction
      };
      this.trigger("actionBegin", localDataArgs);
      if (localDataArgs.cancel) {
        return;
      }
      (isUp ? elems : elems.reverse()).forEach(function(ele) {
        var jsonToIdx = Array.prototype.indexOf.call(_this.ulElement.querySelectorAll(".e-list-item"), ele);
        var idx = Array.prototype.indexOf.call(_this.ulElement.children, ele);
        if (isTop) {
          moveTo(_this.ulElement, _this.ulElement, [idx], 0);
          _this.changeData(idx, 0, jsonToIdx, ele);
        } else if (isBottom) {
          moveTo(_this.ulElement, _this.ulElement, [idx], _this.ulElement.querySelectorAll(".e-list-item").length);
          _this.changeData(idx, _this.ulElement.querySelectorAll(".e-list-item").length, jsonToIdx, ele);
        } else {
          moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
          _this.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
        }
      });
      this.trigger("actionComplete", {
        items: tempItems,
        eventName: this.toolbarAction
      });
      elems[0].focus();
      if (!isKey && this.toolbarSettings.items.length) {
        this.getToolElem().querySelector("[data-value=" + (isUp ? "moveUp" : "moveDown") + "]").focus();
      }
      this.updateToolBarState();
    };
    ListBox2.prototype.moveItemTo = function() {
      this.moveData(this, this.getScopedListBox());
    };
    ListBox2.prototype.moveItemFrom = function() {
      this.moveData(this.getScopedListBox(), this);
    };
    ListBox2.prototype.moveData = function(fListBox, tListBox, isKey, value, index) {
      var idx = [];
      var dataIdx = [];
      var jsonIdx = [];
      var sortIdx = [];
      var listData = [].slice.call(fListBox.listData);
      var tListData = [].slice.call(tListBox.listData);
      var sortData = [].slice.call(fListBox.sortedData);
      var tSortData = [].slice.call(tListBox.sortedData);
      var fliCollections = [].slice.call(fListBox.liCollections);
      var dataLiIdx = [];
      var tliCollections = [].slice.call(tListBox.liCollections);
      var tempItems = [];
      var data = [];
      var elems = fListBox.getSelectedItems();
      if (value) {
        elems = value;
      }
      var isRefresh = tListBox.sortOrder !== "None" || tListBox.selectionSettings.showCheckbox !== fListBox.selectionSettings.showCheckbox || tListBox.fields.groupBy || tListBox.itemTemplate || fListBox.itemTemplate;
      fListBox.value = [];
      if (elems.length) {
        this.removeSelected(fListBox, elems);
        var ulChildren_1 = Array.prototype.slice.call(fListBox.ulElement.children);
        var listItems_1 = Array.prototype.slice.call(fListBox.ulElement.querySelectorAll(".e-list-item"));
        var lData_1 = fListBox.listData;
        var sData_1 = fListBox.sortedData;
        var jData_1 = fListBox.jsonData;
        var eData_1;
        var listDataMap_1 = {};
        if (elems.length > 199) {
          for (var _i = 0, _a = fListBox.listData; _i < _a.length; _i++) {
            var item = _a[_i];
            if (!isNullOrUndefined2(item)) {
              var key = fListBox.getFormattedValue(getValue2(fListBox.fields.value ? fListBox.fields.value : "value", item));
              listDataMap_1[key] = item;
            }
          }
        }
        elems.forEach(function(ele) {
          if (elems.length < 200) {
            eData_1 = fListBox.getDataByElems([ele])[0];
          } else {
            var value_1 = ele.getAttribute("data-value");
            var formattedValue = fListBox.getFormattedValue(value_1);
            eData_1 = listDataMap_1[formattedValue];
          }
          idx.push(ulChildren_1.indexOf(ele));
          dataLiIdx.push(listItems_1.indexOf(ele));
          dataIdx.push(lData_1.indexOf(eData_1));
          sortIdx.push(sData_1.indexOf(eData_1));
          jsonIdx.push(jData_1.indexOf(eData_1));
        });
        if (this.sortOrder !== "None") {
          sortIdx.forEach(function(i2) {
            tempItems.push(fListBox.sortedData[i2]);
          });
        } else {
          jsonIdx.forEach(function(i2) {
            tempItems.push(fListBox.jsonData[i2]);
          });
        }
        var localDataArgs = {
          cancel: false,
          items: tempItems,
          eventName: this.toolbarAction
        };
        fListBox.trigger("actionBegin", localDataArgs);
        if (localDataArgs.cancel) {
          return;
        }
        var rLiCollection_1 = [];
        dataLiIdx.sort(function(n1, n2) {
          return n1 - n2;
        }).reverse().forEach(function(i2) {
          rLiCollection_1.push(fliCollections.splice(i2, 1)[0]);
        });
        fListBox.liCollections = fliCollections;
        if (index) {
          var toColl = tliCollections.splice(0, index);
          tListBox.liCollections = toColl.concat(rLiCollection_1.reverse()).concat(tliCollections);
        } else {
          tListBox.liCollections = tliCollections.concat(rLiCollection_1.reverse());
        }
        if (tListBox.listData.length === 0) {
          var noRecElem = tListBox.ulElement.childNodes[0];
          if (noRecElem) {
            tListBox.ulElement.removeChild(noRecElem);
          }
        }
        dataIdx.sort(function(n1, n2) {
          return n2 - n1;
        }).forEach(function(i2) {
          listData.splice(i2, 1)[0];
        });
        sortIdx.sort(function(n1, n2) {
          return n2 - n1;
        }).forEach(function(i2) {
          sortData.splice(i2, 1)[0];
        });
        jsonIdx.slice().reverse().forEach(function(i2) {
          data.push(fListBox.jsonData.splice(i2, 1)[0]);
        });
        if (isRefresh) {
          if (fListBox.fields.groupBy) {
            var sourceElem = fListBox.renderItems(listData, fListBox.fields);
            fListBox.updateListItems(sourceElem, fListBox.ulElement);
          } else {
            elems.forEach(function(ele) {
              detach2(ele);
            });
          }
        } else {
          moveTo(fListBox.ulElement, tListBox.ulElement, idx, index);
          fListBox.trigger("actionComplete", {
            items: tempItems,
            eventName: this.toolbarAction
          });
        }
        if (tListBox.mainList.childElementCount !== tListBox.jsonData.length) {
          tListBox.mainList = tListBox.ulElement;
        }
        var tJsonData = [].slice.call(tListBox.jsonData);
        tSortData = [].slice.call(tListBox.sortedData);
        this.selectNextList(elems, dataLiIdx, dataIdx, fListBox);
        if (isKey) {
          this.list.focus();
        }
        fListBox.listData = listData;
        fListBox.sortedData = sortData;
        index = index ? index : tListData.length;
        for (var i = tempItems.length - 1; i >= 0; i--) {
          tListData.splice(index, 0, tempItems[i]);
          tJsonData.splice(index, 0, tempItems[i]);
          tSortData.splice(index, 0, tempItems[i]);
        }
        tListBox.listData = tListData;
        tListBox.jsonData = tJsonData;
        tListBox.sortedData = tSortData;
        if (isRefresh) {
          var sourceElem = tListBox.renderItems(tListData, tListBox.fields);
          tListBox.updateListItems(sourceElem, tListBox.ulElement);
          tListBox.setSelection();
          fListBox.trigger("actionComplete", {
            items: tempItems,
            eventName: this.toolbarAction
          });
        }
        fListBox.updateSelectedOptions();
        if (fListBox.listData.length === 0) {
          fListBox.l10nUpdate();
        }
      }
      if (fListBox.value.length === 1 && fListBox.getSelectedItems().length) {
        fListBox.value[0] = fListBox.getFormattedValue(fListBox.getSelectedItems()[0].getAttribute("data-value"));
      }
      if (fListBox.liCollections.length === fListBox.ulElement.querySelectorAll(".e-disabled").length && this.toolbarAction) {
        var wrap = this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];
        var toolbarAction = this.toolbarAction === "moveFrom" ? "moveAllFrom" : "moveAllTo";
        if (wrap) {
          var btn = wrap.querySelector('[data-value="' + toolbarAction + '"]');
          btn.disabled = true;
        }
      }
    };
    ListBox2.prototype.selectNextList = function(elems, dataLiIdx, dataIdx, inst) {
      var childCnt = inst.ulElement.querySelectorAll(".e-list-item").length;
      var ele;
      var liIdx;
      var validIdx = -1;
      if (elems.length === 1 && childCnt && !inst.selectionSettings.showCheckbox) {
        liIdx = childCnt <= dataLiIdx[0] ? childCnt - 1 : dataLiIdx[0];
        ele = inst.ulElement.querySelectorAll(".e-list-item")[liIdx];
        validIdx = inst.getValidIndex(ele, liIdx, childCnt === dataIdx[0] ? 38 : 40);
        if (validIdx > -1) {
          inst.ulElement.querySelectorAll(".e-list-item")[validIdx].classList.add(cssClass.selected);
        }
      }
    };
    ListBox2.prototype.moveAllItemTo = function() {
      this.moveAllData(this, this.getScopedListBox());
    };
    ListBox2.prototype.moveAllItemFrom = function() {
      this.moveAllData(this.getScopedListBox(), this);
    };
    ListBox2.prototype.moveAllData = function(fListBox, tListBox, isKey, index) {
      var listData = [].slice.call(tListBox.listData);
      var jsonData = [].slice.call(tListBox.jsonData);
      var isRefresh = tListBox.sortOrder !== "None" || tListBox.selectionSettings.showCheckbox !== fListBox.selectionSettings.showCheckbox || tListBox.fields.groupBy || tListBox.itemTemplate || fListBox.itemTemplate;
      var tempLiColl = [];
      var tempData = [];
      var flistboxarray = [];
      this.removeSelected(fListBox, fListBox.getSelectedItems());
      var tempItems = [].slice.call(fListBox.listData);
      var localDataArgs = {
        cancel: false,
        items: tempItems,
        eventName: this.toolbarAction
      };
      fListBox.trigger("actionBegin", localDataArgs);
      if (localDataArgs.cancel) {
        return;
      }
      if (tListBox.listData.length === 0) {
        var noRecElem = tListBox.ulElement.childNodes[0];
        if (noRecElem) {
          tListBox.ulElement.removeChild(noRecElem);
        }
      }
      if (fListBox.listData.length > 0) {
        flistboxarray = Array.apply(null, {
          length: fListBox.ulElement.childElementCount
        }).map(Number.call, Number);
      }
      var childNodes = fListBox.ulElement.childNodes;
      var childElementCount = fListBox.ulElement.childElementCount;
      var newFlistboxArray = [];
      for (var i = 0; i < childElementCount; i++) {
        var childNode = childNodes[i];
        if (childNode.classList.contains("e-disabled")) {
          tempLiColl.push(childNode);
          if (this.sortOrder != null) {
            tempData.push(fListBox.sortedData[i]);
          } else {
            tempData.push(fListBox.listData[i]);
          }
        } else {
          newFlistboxArray.push(i);
        }
      }
      flistboxarray = newFlistboxArray;
      moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
      fListBox.trigger("actionComplete", {
        items: tempItems,
        eventName: this.toolbarAction
      });
      if (isKey) {
        this.list.focus();
      }
      index = index ? index : listData.length;
      for (var i = 0; i < flistboxarray.length; i++) {
        if (this.sortOrder != null) {
          listData.splice(index + i, 0, fListBox.sortedData[flistboxarray[i]]);
        } else {
          listData.splice(index + i, 0, fListBox.listData[flistboxarray[i]]);
        }
      }
      for (var i = 0; i < flistboxarray.length; i++) {
        jsonData.splice(index + i, 0, fListBox.jsonData[flistboxarray[i]]);
      }
      var fliCollections = [];
      if (tempLiColl.length > 0) {
        fListBox.liCollections = tempLiColl;
        fliCollections = [].slice.call(fListBox.liCollections);
      } else {
        fliCollections = [].slice.call(fListBox.liCollections);
        fListBox.liCollections = [];
      }
      var tliCollections = [].slice.call(tListBox.liCollections);
      if (index) {
        var toColl = tliCollections.splice(0, index);
        tListBox.liCollections = toColl.concat(fliCollections).concat(tliCollections);
      } else {
        tListBox.liCollections = tliCollections.concat(fliCollections);
      }
      fListBox.value = [];
      listData = listData.filter(function(data) {
        return data !== void 0;
      });
      listData = listData.filter(function(data) {
        return data.isHeader !== true;
      });
      var sortedData = listData.filter(function(val) {
        return tListBox.jsonData.indexOf(val) === -1;
      });
      for (var i = 0; i < sortedData.length; i++) {
        tListBox.jsonData.splice(index + i, 0, sortedData[i]);
      }
      tListBox.listData = listData;
      if (fListBox.listData.length === fListBox.jsonData.length) {
        fListBox.listData = fListBox.sortedData = fListBox.jsonData = tempData;
      } else if (fListBox.allowFiltering) {
        var disabledData_1 = [];
        if (tempLiColl.length > 0) {
          for (var i = 0; i < tempLiColl.length; i++) {
            disabledData_1.push(fListBox.getDataByValue(tempLiColl[i].getAttribute("data-value")));
          }
          fListBox.listData = fListBox.listData.filter(function(obj1) {
            return !disabledData_1.some(function(obj2) {
              return obj1 === obj2;
            });
          });
        }
        for (var i = 0; i < fListBox.listData.length; i++) {
          for (var j = 0; j < fListBox.jsonData.length; j++) {
            if (fListBox.listData[i] === fListBox.jsonData[j]) {
              fListBox.jsonData.splice(j, 1);
            }
          }
        }
        if (tempLiColl.length > 0) {
          fListBox.listData = disabledData_1;
          fListBox.sortedData = [];
        } else {
          fListBox.listData = fListBox.sortedData = [];
        }
      }
      if (isRefresh) {
        var sourceElem = tListBox.renderItems(listData, tListBox.fields);
        tListBox.updateListItems(sourceElem, tListBox.ulElement);
      } else {
        tListBox.sortedData = listData;
      }
      fListBox.updateSelectedOptions();
      if (tempLiColl.length > 0) {
        var wrap = this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];
        var btn = wrap.querySelector('[data-value="' + this.toolbarAction + '"]');
        btn.disabled = true;
      }
      if (fListBox.listData.length === 0 && tempLiColl.length === 0) {
        fListBox.l10nUpdate();
      }
    };
    ListBox2.prototype.changeData = function(fromIdx, toIdx, jsonToIdx, ele) {
      var listData = [].slice.call(this.listData);
      var jsonData = [].slice.call(this.jsonData);
      var sortData = [].slice.call(this.sortedData);
      var jsonIdx = Array.prototype.indexOf.call(this.jsonData, this.getDataByElems([ele])[0]);
      var sortIdx = Array.prototype.indexOf.call(this.sortedData, this.getDataByElems([ele])[0]);
      var liColl = [].slice.call(this.liCollections);
      listData.splice(toIdx, 0, listData.splice(fromIdx, 1)[0]);
      jsonData.splice(jsonToIdx, 0, jsonData.splice(jsonIdx, 1)[0]);
      sortData.splice(toIdx, 0, sortData.splice(sortIdx, 1)[0]);
      liColl.splice(toIdx, 0, liColl.splice(fromIdx, 1)[0]);
      this.listData = listData;
      this.jsonData = jsonData;
      this.liCollections = liColl;
      this.sortedData = sortData;
    };
    ListBox2.prototype.getSelectedItems = function() {
      var ele = [];
      if (this.selectionSettings.showCheckbox) {
        [].slice.call(this.ulElement.getElementsByClassName("e-check")).forEach(function(cbox) {
          ele.push(closest2(cbox, ".e-list-item"));
        });
      } else {
        ele = [].slice.call(this.ulElement.getElementsByClassName(cssClass.selected));
      }
      return ele;
    };
    ListBox2.prototype.getScopedListBox = function() {
      var _this = this;
      var listObj;
      if (this.scope) {
        [].slice.call(document.querySelectorAll(this.scope)).forEach(function(ele) {
          if (getComponent(ele, _this.getModuleName())) {
            listObj = getComponent(ele, _this.getModuleName());
          }
        });
      }
      return listObj;
    };
    ListBox2.prototype.getGrabbedItems = function(args) {
      var grabbItems = false;
      for (var i = 0; i < this.value.length; i++) {
        if (this.value[i] === this.getFormattedValue(args.target.getAttribute("data-value"))) {
          grabbItems = true;
          break;
        }
      }
      if (grabbItems) {
        for (var i = 0; i < this.value.length; i++) {
          var liColl = this.list.querySelectorAll('[aria-selected="true"]');
          for (var j = 0; j < liColl.length; j++) {
            if (this.value[i] === this.getFormattedValue(liColl[j].getAttribute("data-value"))) {
              liColl[j].classList.add("e-grabbed");
            }
          }
        }
      }
      var elems;
      if (this.isAngular) {
        elems = Array.prototype.slice.call(this.element.getElementsByClassName("e-list-parent")[0].querySelectorAll(".e-grabbed"));
      } else {
        elems = Array.prototype.slice.call(this.element.nextElementSibling.querySelectorAll(".e-grabbed"));
      }
      return elems;
    };
    ListBox2.prototype.getDragArgs = function(args, isDragEnd) {
      var elems = this.getGrabbedItems(args);
      if (elems.length) {
        if (isDragEnd) {
          elems.push(args.target);
        }
      } else {
        elems = [args.target];
      }
      return {
        elements: elems,
        event: args.event,
        items: this.getDataByElems(elems)
      };
    };
    ListBox2.prototype.onKeyDown = function(e) {
      this.keyDownHandler(e);
      e.stopPropagation();
    };
    ListBox2.prototype.keyDownHandler = function(e) {
      if ([32, 35, 36, 37, 38, 39, 40, 65].indexOf(e.keyCode) > -1 && (!this.allowFiltering || this.allowFiltering && e.target !== this.filterInput)) {
        if (e.target && e.target.className.indexOf("e-edit-template") > -1) {
          return;
        }
        e.preventDefault();
        if (e.keyCode === 32 && this.ulElement.children.length) {
          this.selectHandler({
            target: this.ulElement.getElementsByClassName("e-focused")[0],
            ctrlKey: e.ctrlKey,
            shiftKey: e.shiftKey
          });
        } else if (e.keyCode === 65 && e.ctrlKey && this.selectionSettings.mode === "Multiple") {
          this.selectAll();
        } else if ((e.keyCode === 38 || e.keyCode === 40) && e.ctrlKey && e.shiftKey) {
          this.moveUpDown(e.keyCode === 38 ? true : false, true);
        } else if ((this.toolbarSettings.items.length || this.tBListBox) && (e.keyCode === 39 || e.keyCode === 37) && e.ctrlKey) {
          var listObj = this.tBListBox || this.getScopedListBox();
          if (e.keyCode === 39) {
            if (e.shiftKey) {
              this.moveAllData(this, listObj, true);
            } else {
              this.moveData(this, listObj, true);
            }
          } else {
            if (e.shiftKey) {
              this.moveAllData(listObj, this, true);
            } else {
              this.moveData(listObj, this, true);
            }
          }
        } else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== "KeyA") {
          this.upDownKeyHandler(e);
        }
      } else if (this.allowFiltering) {
        if (e.keyCode === 40 || e.keyCode === 38) {
          this.upDownKeyHandler(e);
        }
      }
    };
    ListBox2.prototype.upDownKeyHandler = function(e) {
      var ul = this.ulElement;
      var defaultIdx = e.keyCode === 40 || e.keyCode === 36 ? 0 : ul.childElementCount - 1;
      var fliIdx = defaultIdx;
      var fli = ul.getElementsByClassName("e-focused")[0] || ul.getElementsByClassName(cssClass.selected)[0];
      if (fli) {
        if (e.keyCode !== 35 && e.keyCode !== 36) {
          fliIdx = Array.prototype.indexOf.call(ul.children, fli);
          if (e.keyCode === 40) {
            fliIdx++;
          } else {
            fliIdx--;
          }
          if (fliIdx < 0 || fliIdx > ul.childElementCount - 1) {
            return;
          }
        }
        removeClass2([fli], "e-focused");
      }
      var cli = ul.children[fliIdx];
      if (cli) {
        fliIdx = this.getValidIndex(cli, fliIdx, e.keyCode);
        if (fliIdx === -1) {
          addClass2([fli], "e-focused");
          return;
        }
        ul.children[fliIdx].focus();
        ul.children[fliIdx].classList.add("e-focused");
        if (!e.ctrlKey || !this.selectionSettings.showCheckbox && e.shiftKey && (e.keyCode === 36 || e.keyCode === 35)) {
          this.selectHandler({
            target: ul.children[fliIdx],
            ctrlKey: e.ctrlKey,
            shiftKey: e.shiftKey
          }, true);
        }
        if (this.selectionSettings.showCheckbox && e.ctrlKey && e.shiftKey && (e.keyCode === 36 || e.keyCode === 35)) {
          var selectedidx = Array.prototype.indexOf.call(ul.children, fli);
          var sidx = e.code === "Home" ? 0 : selectedidx;
          var eidx = e.code === "Home" ? selectedidx : ul.children.length - 1;
          for (var i = sidx; i <= eidx; i++) {
            var item = ul.children[i];
            this.notify("updatelist", {
              li: item,
              e: {
                target: this.ulElement.getElementsByClassName("e-focused")[0],
                ctrlKey: e.ctrlKey,
                shiftKey: e.shiftKey
              },
              module: "listbox"
            });
          }
        }
      }
    };
    ListBox2.prototype.KeyUp = function(e) {
      var _this = this;
      if (this.allowFiltering && (e.ctrlKey && e.keyCode === 65 || e.keyCode === 8 && !this.filterInput.value)) {
        e.preventDefault();
        return;
      }
      var char = String.fromCharCode(e.keyCode);
      var isWordCharacter = char.match(/\w/);
      if (!isNullOrUndefined2(isWordCharacter)) {
        this.isValidKey = true;
      }
      this.isValidKey = e.keyCode === 8 || e.keyCode === 46 || this.isValidKey;
      if (this.isValidKey) {
        this.isValidKey = false;
        switch (e.keyCode) {
          default:
            if (this.allowFiltering) {
              var eventArgsData_1 = {
                preventDefaultAction: false,
                text: this.targetElement(),
                updateData: function(dataSource, query, fields) {
                  if (eventArgsData_1.cancel) {
                    return;
                  }
                  _this.isFiltered = true;
                  _this.remoteFilterAction = true;
                  _this.preventDefActionFilter = eventArgsData_1.preventDefaultAction;
                  _this.dataUpdater(dataSource, query, fields);
                  _this.preventDefActionFilter = false;
                },
                event: e,
                cancel: false
              };
              this.trigger("filtering", eventArgsData_1, function(args) {
                _this.isDataFetched = false;
                if (args.cancel || _this.filterInput.value !== "" && _this.isFiltered) {
                  return;
                }
                _this.preventDefActionFilter = false;
                if (!args.cancel && !_this.isCustomFiltering && !args.preventDefaultAction) {
                  _this.inputString = _this.filterInput.value;
                  _this.filteringAction(_this.jsonData, new Query(), _this.fields);
                  if (_this.toolbarSettings.items.length > 0) {
                    _this.updateToolBarState();
                  }
                }
                if (!_this.isFiltered && !_this.isCustomFiltering && !args.preventDefaultAction) {
                  _this.dataUpdater(_this.jsonData, new Query(), _this.fields);
                }
              });
            }
        }
      }
    };
    ListBox2.prototype.filter = function(dataSource, query, fields) {
      this.isCustomFiltering = true;
      this.filteringAction(dataSource, query, fields);
    };
    ListBox2.prototype.filteringAction = function(dataSource, query, fields) {
      this.resetList(dataSource, fields, query);
    };
    ListBox2.prototype.targetElement = function() {
      this.targetInputElement = this.list.getElementsByClassName("e-input-filter")[0];
      return isNullOrUndefined2(this.targetInputElement) ? null : this.targetInputElement.value;
    };
    ListBox2.prototype.dataUpdater = function(dataSource, query, fields) {
      this.isDataFetched = false;
      var backCommand = true;
      if (this.targetElement() && this.targetElement().trim() === "") {
        var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
        if (backCommand) {
          this.remoteCustomValue = false;
          if (this.isAngular && this.itemTemplate) {
            list = this.renderItems(this.listData, fields);
          }
          this.onActionComplete(list, this.jsonData);
          this.notify("reOrder", {
            module: "CheckBoxSelection",
            enable: this.selectionSettings.showCheckbox,
            e: this
          });
        }
      } else {
        this.resetList(dataSource, fields, query);
      }
    };
    ListBox2.prototype.focusOutHandler = function() {
      var ele = this.list.getElementsByClassName("e-focused")[0];
      if (ele) {
        ele.classList.remove("e-focused");
      }
      if (this.allowFiltering) {
        this.refreshClearIcon();
      }
    };
    ListBox2.prototype.resizeHandler = function() {
      if (this.list && !(this.cssClass && this.cssClass.indexOf("e-horizontal-listbox") > -1)) {
        if (this.list.getElementsByClassName("e-filter-parent").length > 0 && this.allowFiltering) {
          this.ulElement.style.setProperty("height", "calc(100% - " + this.filterParent.offsetHeight + "px)", "important");
        }
      }
    };
    ListBox2.prototype.getValidIndex = function(cli, index, keyCode4) {
      var cul = this.ulElement;
      if (cli.classList.contains("e-disabled") || cli.classList.contains(cssClass.group)) {
        if (keyCode4 === 40 || keyCode4 === 36) {
          index++;
        } else {
          index--;
        }
      }
      if (index < 0 || index === cul.childElementCount) {
        return -1;
      }
      cli = cul.childNodes[index];
      if (cli.classList.contains("e-disabled") || cli.classList.contains(cssClass.group)) {
        index = this.getValidIndex(cli, index, keyCode4);
      }
      return index;
    };
    ListBox2.prototype.updateSelectedOptions = function() {
      var _this = this;
      var selectedOptions = [];
      var values = [];
      extend2(values, this.value);
      this.getSelectedItems().forEach(function(ele) {
        if (!ele.classList.contains("e-grabbed")) {
          selectedOptions.push(_this.getFormattedValue(ele.getAttribute("data-value")));
        }
      });
      if (this.mainList.childElementCount === this.ulElement.childElementCount) {
        if (this.allowFiltering && this.selectionSettings.showCheckbox) {
          for (var i = 0; i < selectedOptions.length; i++) {
            if (values.indexOf(selectedOptions[i]) > -1) {
              continue;
            } else {
              values.push(selectedOptions[i]);
            }
          }
          this.setProperties({
            value: values
          }, true);
        } else {
          this.setProperties({
            value: selectedOptions
          }, true);
        }
      }
      this.updateSelectTag();
      this.updateToolBarState();
      if (this.tBListBox) {
        this.tBListBox.updateToolBarState();
      }
    };
    ListBox2.prototype.clearSelection = function(values) {
      var _this = this;
      if (values === void 0) {
        values = this.value;
      }
      if (this.selectionSettings.showCheckbox) {
        var dvalue_1;
        this.getSelectedItems().forEach(function(li) {
          dvalue_1 = _this.getFormattedValue(li.getAttribute("data-value"));
          if (values.indexOf(dvalue_1) < 0) {
            li.getElementsByClassName("e-check")[0].classList.remove("e-check");
            li.removeAttribute("aria-selected");
          }
        });
      }
    };
    ListBox2.prototype.setSelection = function(values, isSelect, isText, canFocus) {
      var _this = this;
      if (values === void 0) {
        values = this.value;
      }
      if (isSelect === void 0) {
        isSelect = true;
      }
      if (isText === void 0) {
        isText = false;
      }
      if (canFocus === void 0) {
        canFocus = true;
      }
      var li;
      var liselect;
      if (values) {
        values.forEach(function(value) {
          var text;
          if (isText) {
            text = _this.getValueByText(value);
          } else {
            text = value;
          }
          if (typeof text === "string") {
            text = text.split("\\").join("\\\\");
            li = _this.list.querySelector('[data-value="' + text.replace(/"/g, '\\"') + '"]');
          } else {
            li = _this.list.querySelector('[data-value="' + text + '"]');
          }
          if (li) {
            if (_this.selectionSettings.showCheckbox && !li.classList.contains("e-disabled")) {
              liselect = li.getElementsByClassName("e-frame")[0].classList.contains("e-check");
            } else {
              liselect = li.classList.contains("e-selected");
            }
            if (!isSelect && liselect || isSelect && !liselect && li) {
              if (_this.selectionSettings.showCheckbox && !li.classList.contains("e-disabled")) {
                _this.notify("updatelist", {
                  li,
                  module: "listbox"
                });
                if (canFocus) {
                  li.focus();
                }
              } else {
                if (isSelect && !li.classList.contains("e-disabled")) {
                  li.classList.add(cssClass.selected);
                  li.setAttribute("aria-selected", "true");
                  if (canFocus) {
                    li.focus();
                  }
                } else {
                  li.classList.remove(cssClass.selected);
                  li.removeAttribute("aria-selected");
                }
              }
            }
          }
        });
      }
      this.updateSelectTag();
    };
    ListBox2.prototype.updateSelectTag = function() {
      var ele = this.getSelectTag();
      var innerHTML = "";
      if (isNullOrUndefined2(ele)) {
        return;
      }
      ele.innerHTML = "";
      if (this.value) {
        for (var i = 0, len = this.value.length; i < len; i++) {
          innerHTML += "<option selected>" + this.value[i] + "</option>";
        }
        ele.innerHTML += innerHTML;
        for (var i = 0, len = ele.childNodes.length; i < len; i++) {
          ele.childNodes[i].setAttribute("value", this.value[i].toString());
        }
      }
      this.checkSelectAll();
    };
    ListBox2.prototype.checkDisabledState = function(inst) {
      if (isNullOrUndefined2(inst.ulElement)) {
        if (!isNullOrUndefined2(this.dataSource) && isNullOrUndefined2(this.dataSource.length)) {
          return false;
        } else {
          return true;
        }
      } else {
        if (inst.ulElement.querySelectorAll(".e-disabled").length > 0) {
          return inst.liCollections.length === inst.ulElement.querySelectorAll(".e-disabled").length;
        }
        return inst.ulElement.querySelectorAll("." + cssClass.li).length === 0;
      }
    };
    ListBox2.prototype.updateToolBarState = function() {
      var _this = this;
      if (this.toolbarSettings.items.length) {
        var listObj_1 = this.getScopedListBox();
        var wrap_1 = this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];
        this.toolbarSettings.items.forEach(function(value) {
          var btn = wrap_1.querySelector('[data-value="' + value + '"]');
          switch (value) {
            case "moveAllTo":
              btn.disabled = _this.checkDisabledState(_this);
              break;
            case "moveAllFrom":
              btn.disabled = _this.checkDisabledState(listObj_1);
              break;
            case "moveFrom":
              btn.disabled = listObj_1.value && listObj_1.value.length ? false : true;
              break;
            case "moveUp":
              btn.disabled = _this.value && _this.value.length && !_this.isSelected(_this.ulElement.children[0]) ? false : true;
              break;
            case "moveDown":
              btn.disabled = _this.value && _this.value.length && !_this.isSelected(_this.ulElement.children[_this.ulElement.childElementCount - 1]) ? false : true;
              break;
            default:
              btn.disabled = _this.value && _this.value.length ? false : true;
              break;
          }
        });
      }
    };
    ListBox2.prototype.setCheckboxPosition = function() {
      var listWrap = this.list;
      if (!this.initLoad && this.selectionSettings.checkboxPosition === "Left") {
        listWrap.classList.remove("e-right");
      }
      if (this.selectionSettings.checkboxPosition === "Right") {
        listWrap.classList.add("e-right");
      }
    };
    ListBox2.prototype.showCheckbox = function(showCheckbox) {
      var index = 0;
      var liColl = this.list.lastElementChild.querySelectorAll("li");
      var liCollLen = this.list.lastElementChild.getElementsByClassName("e-list-item").length;
      if (showCheckbox) {
        this.ulElement = this.renderItems(this.listData, this.fields);
        this.mainList = this.ulElement;
        this.list.removeChild(this.list.getElementsByTagName("ul")[0]);
        this.list.appendChild(this.ulElement);
        if (this.selectionSettings.showSelectAll && !this.list.getElementsByClassName("e-selectall-parent")[0]) {
          var l10nShow = new L10n2(this.getModuleName(), {
            selectAllText: "Select All",
            unSelectAllText: "Unselect All"
          }, this.locale);
          this.showSelectAll = true;
          this.selectAllText = l10nShow.getConstant("selectAllText");
          this.unSelectAllText = l10nShow.getConstant("unSelectAllText");
          this.popupWrapper = this.list;
          this.checkBoxSelectionModule.checkAllParent = null;
          this.notify("selectAll", {});
          this.checkSelectAll();
        }
      } else {
        if (this.list.getElementsByClassName("e-selectall-parent")[0]) {
          this.list.removeChild(this.list.getElementsByClassName("e-selectall-parent")[0]);
        }
        for (index; index < liCollLen; index++) {
          if (liColl[index].classList.contains("e-list-item")) {
            liColl[index].removeChild(liColl[index].getElementsByClassName("e-checkbox-wrapper")[0]);
          }
          if (liColl[index].hasAttribute("aria-selected")) {
            liColl[index].removeAttribute("aria-selected");
          }
        }
        this.mainList = this.ulElement;
      }
      this.value = [];
    };
    ListBox2.prototype.isSelected = function(ele) {
      if (!isNullOrUndefined2(ele)) {
        return ele.classList.contains(cssClass.selected) || ele.querySelector(".e-check") !== null;
      } else {
        return false;
      }
    };
    ListBox2.prototype.getSelectTag = function() {
      return this.list.getElementsByClassName("e-hidden-select")[0];
    };
    ListBox2.prototype.getToolElem = function() {
      return this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];
    };
    ListBox2.prototype.formResetHandler = function() {
      this.value = this.initialSelectedOptions;
    };
    ListBox2.prototype.getModuleName = function() {
      return "listbox";
    };
    ListBox2.prototype.getPersistData = function() {
      return this.addOnPersist(["value"]);
    };
    ListBox2.prototype.getLocaleName = function() {
      return "listbox";
    };
    ListBox2.prototype.destroy = function() {
      this.unwireEvents();
      if (this.element.tagName === "EJS-LISTBOX") {
        this.element.innerHTML = "";
      } else {
        this.element.style.display = "inline-block";
        if (this.toolbarSettings.items.length) {
          this.list.parentElement.parentElement.insertBefore(this.list, this.list.parentElement);
          detach2(this.list.nextElementSibling);
        }
        this.list.parentElement.insertBefore(this.element, this.list);
      }
      _super.prototype.destroy.call(this);
      this.enableRtlElements = [];
      this.liCollections = null;
      this.list = null;
      this.ulElement = null;
      this.mainList = null;
      this.spinner = null;
      this.rippleFun = null;
      if (this.itemTemplate) {
        this.clearTemplate();
      }
    };
    ListBox2.prototype.onPropertyChanged = function(newProp, oldProp) {
      var wrap = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
      _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
      this.setUpdateInitial(["fields", "query", "dataSource"], newProp);
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([wrap], oldProp.cssClass.split(" "));
            }
            if (newProp.cssClass) {
              addClass2([wrap], newProp.cssClass.replace(/\s+/g, " ").trim().split(" "));
            }
            break;
          case "enableRtl":
            if (newProp.enableRtl) {
              this.list.classList.add("e-rtl");
            } else {
              this.list.classList.remove("e-rtl");
            }
            break;
          case "value":
            removeClass2(this.list.querySelectorAll("." + cssClass.selected), cssClass.selected);
            this.clearSelection(this.value);
            this.setSelection();
            break;
          case "height":
            this.setHeight();
            break;
          case "enabled":
            this.setEnable();
            break;
          case "allowDragAndDrop":
            if (newProp.allowDragAndDrop) {
              this.initDraggable();
            } else {
              if (this.ulElement.classList.contains("e-sortable")) {
                getComponent(this.ulElement, "sortable").destroy();
              }
            }
            break;
          case "allowFiltering":
            if (this.allowFiltering) {
              this.setFiltering();
            } else {
              this.list.removeChild(this.list.getElementsByClassName("e-filter-parent")[0]);
              this.filterParent = null;
              removeClass2([this.list], "e-filter-list");
            }
            break;
          case "filterBarPlaceholder":
            if (this.allowFiltering) {
              if (this.filterInput) {
                Input.setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);
              }
            }
            break;
          case "scope":
            if (this.allowDragAndDrop) {
              getComponent(this.ulElement, "sortable").scope = newProp.scope;
            }
            if (this.toolbarSettings.items.length) {
              if (oldProp.scope) {
                getComponent(document.querySelector(oldProp.scope), this.getModuleName()).tBListBox = null;
              }
              if (newProp.scope) {
                getComponent(document.querySelector(newProp.scope), this.getModuleName()).tBListBox = this;
              }
            }
            break;
          case "toolbarSettings": {
            var ele = void 0;
            var pos = newProp.toolbarSettings.position;
            var toolElem = this.getToolElem();
            if (pos) {
              removeClass2([wrap], ["e-right", "e-left"]);
              wrap.classList.add("e-" + pos.toLowerCase());
              if (pos === "Left") {
                wrap.insertBefore(toolElem, this.list);
              } else {
                wrap.appendChild(toolElem);
              }
            }
            if (newProp.toolbarSettings.items) {
              oldProp.toolbarSettings.items = isNullOrUndefined2(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
              if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
                ele = this.list.parentElement;
                ele.parentElement.insertBefore(this.list, ele);
                detach2(ele);
              }
              this.initToolbarAndStyles();
              this.wireToolbarEvent();
            }
            break;
          }
          case "selectionSettings": {
            var showSelectAll = newProp.selectionSettings.showSelectAll;
            var showCheckbox = newProp.selectionSettings.showCheckbox;
            if (!isNullOrUndefined2(showSelectAll)) {
              this.showSelectAll = showSelectAll;
              if (this.showSelectAll) {
                var l10nSel = new L10n2(this.getModuleName(), {
                  selectAllText: "Select All",
                  unSelectAllText: "Unselect All"
                }, this.locale);
                this.checkBoxSelectionModule.checkAllParent = null;
                this.showSelectAll = true;
                this.selectAllText = l10nSel.getConstant("selectAllText");
                this.unSelectAllText = l10nSel.getConstant("selectAllText");
                this.popupWrapper = this.list;
              }
              this.notify("selectAll", {});
              this.checkSelectAll();
            }
            if (!isNullOrUndefined2(showCheckbox)) {
              this.showCheckbox(showCheckbox);
            }
            if (this.selectionSettings.showCheckbox) {
              this.setCheckboxPosition();
            }
            break;
          }
          case "dataSource":
            this.isDataSourceUpdate = true;
            this.jsonData = [].slice.call(this.dataSource);
            break;
        }
      }
    };
    var ListBox_1;
    __decorate87([Property2("")], ListBox2.prototype, "cssClass", void 0);
    __decorate87([Property2([])], ListBox2.prototype, "value", void 0);
    __decorate87([Property2("")], ListBox2.prototype, "height", void 0);
    __decorate87([Property2(true)], ListBox2.prototype, "enabled", void 0);
    __decorate87([Property2(false)], ListBox2.prototype, "enablePersistence", void 0);
    __decorate87([Property2(false)], ListBox2.prototype, "allowDragAndDrop", void 0);
    __decorate87([Property2(1e3)], ListBox2.prototype, "maximumSelectionLength", void 0);
    __decorate87([Property2(false)], ListBox2.prototype, "allowFiltering", void 0);
    __decorate87([Property2("")], ListBox2.prototype, "scope", void 0);
    __decorate87([Property2(true)], ListBox2.prototype, "ignoreCase", void 0);
    __decorate87([Property2(null)], ListBox2.prototype, "filterBarPlaceholder", void 0);
    __decorate87([Property2("None")], ListBox2.prototype, "sortOrder", void 0);
    __decorate87([Event3()], ListBox2.prototype, "beforeItemRender", void 0);
    __decorate87([Event3()], ListBox2.prototype, "filtering", void 0);
    __decorate87([Event3()], ListBox2.prototype, "select", void 0);
    __decorate87([Event3()], ListBox2.prototype, "change", void 0);
    __decorate87([Event3()], ListBox2.prototype, "beforeDrop", void 0);
    __decorate87([Event3()], ListBox2.prototype, "dragStart", void 0);
    __decorate87([Event3()], ListBox2.prototype, "drag", void 0);
    __decorate87([Event3()], ListBox2.prototype, "drop", void 0);
    __decorate87([Event3()], ListBox2.prototype, "dataBound", void 0);
    __decorate87([Property2(null)], ListBox2.prototype, "groupTemplate", void 0);
    __decorate87([Property2("Request failed")], ListBox2.prototype, "actionFailureTemplate", void 0);
    __decorate87([Property2(1e3)], ListBox2.prototype, "zIndex", void 0);
    __decorate87([Property2(false)], ListBox2.prototype, "ignoreAccent", void 0);
    __decorate87([Complex2({}, ToolbarSettings)], ListBox2.prototype, "toolbarSettings", void 0);
    __decorate87([Complex2({}, SelectionSettings)], ListBox2.prototype, "selectionSettings", void 0);
    ListBox2 = ListBox_1 = __decorate87([NotifyPropertyChanges2], ListBox2);
    return ListBox2;
  }(DropDownBase)
);
var listBoxClasses = {
  backIcon: "e-input-group-icon e-back-icon e-icons",
  filterBarClearIcon: "e-input-group-icon e-clear-icon e-icons",
  filterInput: "e-input-filter",
  filterParent: "e-filter-parent",
  clearIcon: "e-clear-icon"
};

// node_modules/@syncfusion/ej2-kanban/node_modules/@syncfusion/ej2-dropdowns/src/mention/mention.js
var __extends90 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate88 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Mention = (
  /** @class */
  function(_super) {
    __extends90(Mention2, _super);
    function Mention2(options, element2) {
      return _super.call(this, options, element2) || this;
    }
    Mention2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "minLength":
            this.minLength = newProp.minLength;
            break;
          case "suffixText":
            this.suffixText = newProp.suffixText;
            break;
          case "allowSpaces":
            this.allowSpaces = newProp.allowSpaces;
            break;
          case "mentionChar":
            this.mentionChar = newProp.mentionChar;
            break;
          case "showMentionChar":
            this.showMentionChar = newProp.showMentionChar;
            break;
          case "cssClass":
            this.updateCssClass(newProp.cssClass, oldProp.cssClass);
            break;
        }
      }
    };
    Mention2.prototype.updateCssClass = function(newClass, oldClass) {
      if (!isNullOrUndefined2(oldClass)) {
        oldClass = oldClass.replace(/\s+/g, " ").trim();
      }
      if (!isNullOrUndefined2(newClass)) {
        newClass = newClass.replace(/\s+/g, " ").trim();
      }
      this.setCssClass(newClass, [this.inputElement], oldClass);
      if (this.popupObj) {
        this.setCssClass(newClass, [this.popupObj.element], oldClass);
      }
    };
    Mention2.prototype.setCssClass = function(cssClass2, elements, oldClass) {
      if (!isNullOrUndefined2(oldClass) && oldClass !== "") {
        removeClass2(elements, oldClass.split(" "));
      }
      if (!isNullOrUndefined2(cssClass2) && cssClass2 !== "") {
        addClass2(elements, cssClass2.split(" "));
      }
    };
    Mention2.prototype.initializeData = function() {
      this.isSelected = false;
      this.isFiltered = false;
      this.beforePopupOpen = false;
      this.initRemoteRender = false;
      this.isListResetted = false;
      this.isPopupOpen = false;
      this.isCollided = false;
      this.lineBreak = false;
      this.isRTE = false;
      this.keyEventName = "mousedown";
    };
    Mention2.prototype.preRender = function() {
      this.initializeData();
      _super.prototype.preRender.call(this);
    };
    Mention2.prototype.render = function() {
      var isSelector = typeof this.target === "string";
      this.inputElement = !isNullOrUndefined2(this.target) ? this.checkAndUpdateInternalComponent(isSelector ? document.querySelector(this.target) : this.target) : this.element;
      if (this.isContentEditable(this.inputElement)) {
        if (!this.inputElement.hasAttribute("contenteditable")) {
          this.inputElement.setAttribute("contenteditable", "true");
        }
        addClass2([this.inputElement], ["e-mention"]);
        if (isNullOrUndefined2(this.target)) {
          addClass2([this.inputElement], ["e-editable-element"]);
        }
      }
      this.inputElement.setAttribute("role", "textbox");
      this.inputElement.setAttribute("aria-label", "mention");
      this.queryString = this.elementValue();
      this.wireEvent();
    };
    Mention2.prototype.wireEvent = function() {
      EventHandler2.add(this.inputElement, "keyup", this.onKeyUp, this);
      this.bindCommonEvent();
    };
    Mention2.prototype.unWireEvent = function() {
      EventHandler2.remove(this.inputElement, "keyup", this.onKeyUp);
      this.unBindCommonEvent();
    };
    Mention2.prototype.bindCommonEvent = function() {
      if (!Browser2.isDevice) {
        this.inputElement.addEventListener("keydown", this.keyDownHandler.bind(this), !this.isRTE);
      }
    };
    Mention2.prototype.hideSpinner = function() {
      this.hideWaitingSpinner();
    };
    Mention2.prototype.hideWaitingSpinner = function() {
      if (!isNullOrUndefined2(this.spinnerElement)) {
        hideSpinner(this.spinnerElement);
      }
      if (!isNullOrUndefined2(this.spinnerTemplate) && !isNullOrUndefined2(this.spinnerTemplateElement)) {
        detach2(this.spinnerTemplateElement);
      }
    };
    Mention2.prototype.checkAndUpdateInternalComponent = function(targetElement2) {
      if (!this.isVue && targetElement2.classList.contains("e-richtexteditor")) {
        return targetElement2.querySelector(".e-content");
      }
      if (this.isVue && targetElement2.nodeName === "TEXTAREA" && targetElement2.classList.contains("e-rte-hidden")) {
        var parentElement = targetElement2.parentElement;
        if (parentElement && parentElement.classList.contains("e-richtexteditor")) {
          return parentElement.querySelector(".e-content");
        }
      }
      if (targetElement2 && targetElement2.parentElement && targetElement2.parentElement.classList.contains("e-rte-content")) {
        this.isRTE = true;
        this.keyEventName = "click";
      }
      return targetElement2;
    };
    Mention2.prototype.showWaitingSpinner = function() {
      if (!isNullOrUndefined2(this.popupObj)) {
        if (isNullOrUndefined2(this.spinnerTemplate) && isNullOrUndefined2(this.spinnerElement)) {
          this.spinnerElement = this.popupObj.element;
          createSpinner({
            target: this.spinnerElement,
            width: Browser2.isDevice ? "16px" : "14px"
          }, this.createElement);
          showSpinner(this.spinnerElement);
        }
        if (!isNullOrUndefined2(this.spinnerTemplate)) {
          this.setSpinnerTemplate();
        }
      }
    };
    Mention2.prototype.keyDownHandler = function(e) {
      var isKeyAction = true;
      switch (e.keyCode) {
        case 38:
          e.action = e.altKey ? "hide" : "up";
          break;
        case 40:
          e.action = e.altKey ? "open" : "down";
          break;
        case 33:
          e.action = "pageUp";
          break;
        case 34:
          e.action = "pageDown";
          break;
        case 36:
          e.action = "home";
          break;
        case 35:
          e.action = "end";
          break;
        case 9:
          e.action = e.shiftKey ? "close" : "tab";
          break;
        case 27:
          e.action = "escape";
          break;
        case 32:
          e.action = "space";
          break;
        case 13:
          e.action = "enter";
          break;
        default:
          isKeyAction = false;
          break;
      }
      if (isKeyAction) {
        this.keyActionHandler(e);
      }
    };
    Mention2.prototype.keyActionHandler = function(e) {
      var isNavigation = e.action === "down" || e.action === "up" || e.action === "pageUp" || e.action === "pageDown" || e.action === "home" || e.action === "end";
      var isTabAction = e.action === "tab" || e.action === "close";
      if (this.list === void 0 && !this.isRequested && !isTabAction && e.action !== "escape" && e.action !== "space" && this.mentionChar.charCodeAt(0) === this.getLastLetter(this.getTextRange()).charCodeAt(0)) {
        this.renderList();
      }
      if (isNullOrUndefined2(this.list) || !isNullOrUndefined2(this.liCollections) && isNavigation && this.liCollections.length === 0 || this.isRequested) {
        return;
      }
      if (e.action === "escape") {
        e.preventDefault();
      }
      this.isSelected = e.action === "escape" ? false : this.isSelected;
      switch (e.action) {
        case "down":
        case "up":
          this.isUpDownKey = true;
          this.updateUpDownAction(e);
          break;
        case "tab":
          if (this.isPopupOpen) {
            e.preventDefault();
            var li = this.list.querySelector("." + dropDownBaseClasses.selected);
            if (li) {
              this.isSelected = true;
              this.setSelection(li, e);
            }
            if (this.isPopupOpen) {
              this.hidePopup(e);
            }
          }
          break;
        case "enter":
          if (this.isPopupOpen) {
            e.preventDefault();
            if (this.popupObj && this.popupObj.element.contains(this.selectedLI)) {
              this.updateSelectedItem(this.selectedLI, e, false, true);
            }
          }
          break;
        case "escape":
          if (this.isPopupOpen) {
            this.hidePopup(e);
          }
          break;
      }
    };
    Mention2.prototype.updateUpDownAction = function(e) {
      if (this.fields.disabled && this.list && this.list.querySelectorAll(".e-list-item:not(.e-disabled)").length === 0) {
        return;
      }
      var focusEle = this.list.querySelector("." + dropDownBaseClasses.focus);
      if (this.isSelectFocusItem(focusEle)) {
        this.setSelection(focusEle, e);
      } else if (!isNullOrUndefined2(this.liCollections)) {
        var li = this.list.querySelector("." + dropDownBaseClasses.selected);
        if (!isNullOrUndefined2(li)) {
          var value = this.getFormattedValue(li.getAttribute("data-value"));
          this.activeIndex = this.getIndexByValue(value);
        }
        var index = e.action === "down" ? this.activeIndex + 1 : this.activeIndex - 1;
        var startIndex = 0;
        startIndex = e.action === "down" && isNullOrUndefined2(this.activeIndex) ? 0 : this.liCollections.length - 1;
        index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
        var nextItem = isNullOrUndefined2(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index];
        if (!isNullOrUndefined2(nextItem)) {
          this.setSelection(nextItem, e);
        }
      }
      var itemIndex;
      for (var index = 0; index < this.liCollections.length; index++) {
        if (this.liCollections[index].classList.contains(dropDownBaseClasses.focus) || this.liCollections[index].classList.contains(dropDownBaseClasses.selected)) {
          itemIndex = index;
          break;
        }
      }
      if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
        this.updateUpDownAction(e);
      }
      if (this.isPopupOpen) {
        e.preventDefault();
      }
    };
    Mention2.prototype.isSelectFocusItem = function(element2) {
      return !isNullOrUndefined2(element2);
    };
    Mention2.prototype.unBindCommonEvent = function() {
      if (!Browser2.isDevice) {
        this.inputElement.removeEventListener("keydown", this.keyDownHandler.bind(this), !this.isRTE);
      }
    };
    Mention2.prototype.onKeyUp = function(e) {
      var rangetextContent;
      if (this.isUpDownKey && this.isPopupOpen && e.keyCode === 229) {
        this.isUpDownKey = false;
        return;
      }
      this.isTyped = e.code !== "Enter" && e.code !== "Space" && e.code !== "ArrowDown" && e.code !== "ArrowUp" ? true : false;
      var isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector(".e-rte-image") ? true : false;
      if (document.activeElement !== this.inputElement && !isRteImage) {
        this.inputElement.focus();
      }
      if (this.isContentEditable(this.inputElement)) {
        this.range = this.getCurrentRange();
        rangetextContent = this.range.startContainer.textContent.split("");
      }
      var currentRange = this.getTextRange();
      var lastWordRange = this.getLastLetter(currentRange);
      var lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
      var Regex = new RegExp(this.mentionChar.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "g");
      var charRegex = new RegExp("[a-zA-Z]", "g");
      if (e.key === "Shift" || e.keyCode === 37 || e.keyCode === 39) {
        return;
      }
      if (this.beforePopupOpen && this.isPopupOpen && lastWordRange === lastTwoLetters) {
        this.hidePopup();
        return;
      }
      if (!currentRange || !lastWordRange || e.code === "Enter" || e.keyCode === 27 || lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1 || this.isContentEditable(this.inputElement) && this.range.startContainer && this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== "BR" && this.range.startContainer.textContent.split("").length > 0 && (rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf("") === -1 || this.range.startContainer.nodeType === 1)) {
        if (this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== "" && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1 && !this.isMatchedText() && currentRange.length > 1 && currentRange.replace(/\u00A0/g, " ").charAt(currentRange.length - 2) !== " " && this.list && this.list.querySelectorAll("ul").length > 0 && e.code !== "Enter") {
          this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace(" ", " ");
          this.searchLists(e);
        } else if (this.isPopupOpen && (!this.allowSpaces || !lastWordRange) && e.code !== "ArrowDown" && e.code !== "ArrowUp") {
          this.hidePopup();
          this.lineBreak = true;
        } else if ((e.key === "Backspace" || e.key === "Delete") && this.range && this.range.startOffset !== this.range.endOffset) {
          this.range.deleteContents();
        }
        return;
      }
      if (lastWordRange.includes(this.mentionChar)) {
        this.queryString = lastWordRange.replace(this.mentionChar, "");
      }
      if (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) && this.queryString !== "" && e.keyCode !== 38 && e.keyCode !== 40 && !this.lineBreak) {
        this.searchLists(e);
        if (!this.isPopupOpen && this.queryString.length >= this.minLength) {
          if (!this.isContentEditable(this.inputElement)) {
            this.showPopup();
          } else if (this.isContentEditable(this.inputElement) && this.range && this.range.startContainer !== this.inputElement && e.keyCode !== 9) {
            this.showPopup();
          }
        }
      } else if (lastWordRange.indexOf(this.mentionChar) === 0 && !this.isPopupOpen && e.keyCode !== 8 && (!this.popupObj || isNullOrUndefined2(this.target) && !document.body.contains(this.popupObj.element) || !isNullOrUndefined2(this.target) && document.body.contains(this.popupObj.element))) {
        if (this.initRemoteRender && this.list && this.list.classList.contains("e-nodata")) {
          this.searchLists(e);
        }
        this.resetList(this.dataSource, this.fields);
        if (isNullOrUndefined2(this.list)) {
          this.initValue();
        }
        if (!this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40 && this.queryString.length >= this.minLength) {
          this.didPopupOpenByTypingInitialChar = true;
          this.showPopup();
          if (this.initRemoteRender && this.list.querySelectorAll("li").length === 0) {
            this.showWaitingSpinner();
          }
          this.lineBreak = false;
        }
      } else if (this.allowSpaces && this.queryString !== "" && currentRange && currentRange.trim() !== "" && currentRange.replace(" ", " ").lastIndexOf(" ") < currentRange.length - 1 && e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) || this.liCollections && this.liCollections.length > 0)) {
        this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace(" ", " ");
        this.searchLists(e);
      } else if (this.queryString === "" && this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40 && this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0)) {
        this.searchLists(e);
        if (!this.isListResetted) {
          this.resetList(this.dataSource, this.fields);
        }
      }
      this.isListResetted = false;
    };
    Mention2.prototype.isMatchedText = function() {
      var isMatched = false;
      for (var i = 0; i < (this.liCollections && this.liCollections.length); i++) {
        if (this.getTextRange() && this.getTextRange().substring(this.getTextRange().lastIndexOf(this.mentionChar) + 1).replace(" ", " ").trim() === this.liCollections[i].getAttribute("data-value").toLowerCase()) {
          isMatched = true;
        }
      }
      return isMatched;
    };
    Mention2.prototype.getCurrentRange = function() {
      this.range = this.inputElement.ownerDocument.getSelection().getRangeAt(0);
      return this.range;
    };
    Mention2.prototype.searchLists = function(e) {
      var _this = this;
      this.isDataFetched = false;
      if (isNullOrUndefined2(this.list)) {
        _super.prototype.render.call(this);
        this.unWireListEvents();
        this.wireListEvents();
      }
      if (e.type !== "mousedown" && (e.keyCode === 40 || e.keyCode === 38)) {
        this.queryString = this.queryString === "" ? null : this.queryString;
        this.beforePopupOpen = true;
        this.resetList(this.dataSource, this.fields);
        return;
      }
      this.isSelected = false;
      this.activeIndex = null;
      var eventArgs = {
        preventDefaultAction: false,
        text: this.queryString,
        updateData: function(dataSource, query, fields) {
          if (eventArgs.cancel) {
            return;
          }
          _this.isFiltered = true;
          _this.filterAction(dataSource, query, fields);
        },
        cancel: false
      };
      this.trigger("filtering", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel && !_this.isFiltered && !eventArgs2.preventDefaultAction) {
          _this.filterAction(_this.dataSource, null, _this.fields);
        }
      });
    };
    Mention2.prototype.filterAction = function(dataSource, query, fields) {
      this.beforePopupOpen = true;
      if (this.queryString.length >= this.minLength) {
        this.resetList(dataSource, fields, query);
        this.isListResetted = true;
      } else {
        if (this.isPopupOpen) {
          this.hidePopup();
        }
        this.beforePopupOpen = false;
      }
      this.setDataIndex();
      this.renderReactTemplates();
    };
    Mention2.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
      _super.prototype.onActionComplete.call(this, ulElement, list, e);
      if (this.isActive) {
        if (!isNullOrUndefined2(ulElement)) {
          attributes2(ulElement, {
            "id": this.inputElement.id + "_options",
            "role": "listbox",
            "aria-hidden": "false"
          });
          var isRTESlashMenuPopup = this.isRTE && this.cssClass && this.cssClass.indexOf("e-slash-menu") > -1;
          if (isRTESlashMenuPopup) {
            ulElement.id = this.inputElement.id + "_slash_menu_options";
          }
        }
        var focusItem = this.fields.disabled ? ulElement.querySelector("." + dropDownBaseClasses.li + ":not(.e-disabled)") : ulElement.querySelector("." + dropDownBaseClasses.li);
        if (focusItem) {
          focusItem.classList.add(dropDownBaseClasses.selected);
          this.selectedLI = focusItem;
          var value = this.getFormattedValue(focusItem.getAttribute("data-value"));
          this.selectEventCallback(focusItem, this.getDataByValue(value), value, true);
        }
        if (this.beforePopupOpen && this.isPopupOpen) {
          if (!isNullOrUndefined2(this.popupObj.element)) {
            this.popupObj.element.remove();
          }
          this.renderPopup();
        }
      }
    };
    Mention2.prototype.setDataIndex = function() {
      for (var i = 0; this.liCollections && i < this.liCollections.length; i++) {
        this.liCollections[i].setAttribute("data-index", i.toString());
      }
    };
    Mention2.prototype.listOption = function(dataSource, fieldsSettings) {
      var _this = this;
      var fields = _super.prototype.listOption.call(this, dataSource, fieldsSettings);
      if (isNullOrUndefined2(fields.itemCreated)) {
        fields.itemCreated = function(e) {
          if (_this.highlight) {
            if (_this.inputElement.tagName === _this.getNgDirective() && _this.itemTemplate) {
              setTimeout(function() {
                highlightSearch(e.item, _this.queryString, _this.ignoreCase, _this.filterType);
              }, 0);
            } else {
              highlightSearch(e.item, _this.queryString, _this.ignoreCase, _this.filterType);
            }
          }
        };
      } else {
        var itemCreated_1 = fields.itemCreated;
        fields.itemCreated = function(e) {
          if (_this.highlight) {
            highlightSearch(e.item, _this.queryString, _this.ignoreCase, _this.filterType);
          }
          itemCreated_1.apply(_this, [e]);
        };
      }
      return fields;
    };
    Mention2.prototype.elementValue = function() {
      if (!this.isContentEditable(this.inputElement)) {
        return this.inputElement.value.replace(this.mentionChar, "");
      } else {
        return this.inputElement.textContent.replace(this.mentionChar, "");
      }
    };
    Mention2.prototype.getQuery = function(query) {
      var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
      var filterType = this.queryString === "" && !isNullOrUndefined2(this.elementValue()) ? "equal" : this.filterType;
      var queryString2 = this.queryString === "" && !isNullOrUndefined2(this.elementValue()) ? this.elementValue() : this.queryString;
      if (this.isFiltered) {
        return filterQuery;
      }
      if (this.queryString !== null && this.queryString !== "") {
        var dataType = this.typeOfData(this.dataSource).typeof;
        if (!(this.dataSource instanceof DataManager) && dataType === "string" || dataType === "number") {
          filterQuery.where("", filterType, queryString2, this.ignoreCase, this.ignoreAccent);
        } else {
          var mapping = !isNullOrUndefined2(this.fields.text) ? this.fields.text : "";
          filterQuery.where(mapping, filterType, queryString2, this.ignoreCase, this.ignoreAccent);
        }
      }
      if (!isNullOrUndefined2(this.suggestionCount)) {
        if (this.suggestionCount !== 25) {
          for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
            if (filterQuery.queries[queryElements].fn === "onTake") {
              filterQuery.queries.splice(queryElements, 1);
            }
          }
        }
        filterQuery.take(this.suggestionCount);
      }
      return filterQuery;
    };
    Mention2.prototype.renderHightSearch = function() {
      if (this.highlight) {
        for (var i = 0; i < this.liCollections.length; i++) {
          var isHighlight = this.ulElement.querySelector(".e-active");
          if (!isHighlight) {
            revertHighlightSearch(this.liCollections[i]);
            highlightSearch(this.liCollections[i], this.queryString, this.ignoreCase, this.filterType);
          }
        }
      }
    };
    Mention2.prototype.getTextRange = function() {
      var text;
      if (!this.isContentEditable(this.inputElement)) {
        var component = this.inputElement;
        if (!isNullOrUndefined2(component)) {
          var startPos = component.selectionStart;
          if (component.value && startPos >= 0) {
            text = component.value.substring(0, startPos);
          }
        }
      } else {
        if (this.range) {
          var selectedElem = this.range.startContainer;
          if (!isNullOrUndefined2(selectedElem)) {
            var workingNodeContent = selectedElem.textContent;
            var selectStartOffset = this.range.startOffset;
            if (workingNodeContent && selectStartOffset >= 0) {
              text = workingNodeContent.substring(0, selectStartOffset);
            }
          }
        }
      }
      return text;
    };
    Mention2.prototype.getLastLetter = function(text) {
      if (isNullOrUndefined2(text)) {
        return "";
      }
      var textValue = text.indexOf("​") > -1 ? text.replace(/\u200B/g, "").replace(/\u00A0/g, " ") : text.replace(/\u00A0/g, " ");
      var words = textValue.split(/\s+/);
      var wordCnt = words.length - 1;
      return words[wordCnt].trim();
    };
    Mention2.prototype.isContentEditable = function(element2) {
      return element2 && element2.nodeName !== "INPUT" && element2.nodeName !== "TEXTAREA";
    };
    Mention2.prototype.showPopup = function() {
      this.beforePopupOpen = true;
      if (document.activeElement !== this.inputElement) {
        this.inputElement.focus();
      }
      this.queryString = this.didPopupOpenByTypingInitialChar ? this.queryString : "";
      this.didPopupOpenByTypingInitialChar = false;
      if (this.isContentEditable(this.inputElement)) {
        this.range = this.getCurrentRange();
      }
      if (!this.isTyped) {
        this.resetList(this.dataSource, this.fields);
      }
      if (isNullOrUndefined2(this.list)) {
        this.initValue();
      }
      this.renderPopup();
      attributes2(this.inputElement, {
        "aria-activedescendant": this.selectedElementID
      });
      if (this.selectedElementID == null) {
        this.inputElement.removeAttribute("aria-activedescendant");
      }
    };
    Mention2.prototype.hidePopup = function(e) {
      this.removeSelection();
      this.closePopup(0, e);
    };
    Mention2.prototype.closePopup = function(delay, e) {
      var _this = this;
      if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
        return;
      }
      EventHandler2.remove(document, "mousedown", this.onDocumentClick);
      this.inputElement.removeAttribute("aria-owns");
      this.inputElement.removeAttribute("aria-activedescendant");
      this.beforePopupOpen = false;
      var animModel = {
        name: "FadeOut",
        duration: 100,
        delay: delay ? delay : 0
      };
      var popupInstance = this.popupObj;
      var eventArgs = {
        popup: popupInstance,
        cancel: false,
        animation: animModel,
        event: e || null
      };
      this.trigger("closed", eventArgs, function(eventArgs2) {
        if (!eventArgs2.cancel && _this.popupObj) {
          if (_this.isPopupOpen) {
            _this.popupObj.hide(new Animation2(eventArgs2.animation));
          } else {
            _this.destroyPopup();
          }
        }
      });
    };
    Mention2.prototype.renderPopup = function() {
      var _this = this;
      var args = {
        cancel: false
      };
      this.trigger("beforeOpen", args, function(args2) {
        if (!args2.cancel) {
          var popupEle_1;
          if (isNullOrUndefined2(_this.target)) {
            popupEle_1 = _this.createElement("div", {
              id: _this.inputElement.id + "_popup",
              className: "e-mention e-popup " + (_this.cssClass != null ? _this.cssClass : "")
            });
          } else {
            popupEle_1 = _this.element;
            if (_this.cssClass != null) {
              addClass2([popupEle_1], _this.cssClass.split(" "));
            }
          }
          var isRTESlashMenuPopup = _this.isRTE && _this.cssClass && _this.cssClass.indexOf("e-slash-menu") > -1;
          if (isRTESlashMenuPopup) {
            popupEle_1.id = _this.inputElement.id + "_slash_menu_popup";
          } else {
            if (!isNullOrUndefined2(_this.target)) {
              popupEle_1.id = _this.inputElement.id + "_popup";
            }
          }
          _this.listHeight = formatUnit(_this.popupHeight);
          if (!isNullOrUndefined2(_this.list.querySelector("li")) && !_this.initRemoteRender) {
            var li = _this.list.querySelector("." + dropDownBaseClasses.focus);
            if (!isNullOrUndefined2(li)) {
              _this.selectedLI = li;
              var value = _this.getFormattedValue(li.getAttribute("data-value"));
              _this.selectEventCallback(li, _this.getDataByValue(value), value, true);
            }
          }
          append([_this.list], popupEle_1);
          if (_this.inputElement.parentElement) {
            var rteRootElement = _this.inputElement.parentElement.closest(".e-richtexteditor");
            if (rteRootElement && popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
              popupEle_1.firstElementChild.setAttribute("aria-owns", rteRootElement.id);
              addClass2([popupEle_1], "e-rte-elements");
            }
          }
          if (!_this.popupObj || !document.body.contains(_this.popupObj.element) || !document.contains(popupEle_1) && isNullOrUndefined2(_this.target)) {
            document.body.appendChild(popupEle_1);
          }
          var coordinates_1;
          popupEle_1.style.visibility = "hidden";
          _this.setHeight(popupEle_1);
          var offsetValue = 0;
          var left = 0;
          _this.initializePopup(popupEle_1, offsetValue, left);
          _this.checkCollision(popupEle_1);
          popupEle_1.style.visibility = "visible";
          var popupLeft_1 = popupEle_1.parentElement.offsetWidth - popupEle_1.offsetWidth;
          var popupHeight_1 = popupEle_1.offsetHeight;
          addClass2([popupEle_1], ["e-mention", "e-popup", "e-popup-close"]);
          if (!isNullOrUndefined2(_this.list)) {
            _this.unWireListEvents();
            _this.wireListEvents();
          }
          _this.selectedElementID = _this.selectedLI ? _this.selectedLI.id : null;
          attributes2(_this.inputElement, {
            "aria-owns": _this.inputElement.id + "_options",
            "aria-activedescendant": _this.selectedElementID
          });
          if (_this.selectedElementID == null) {
            _this.inputElement.removeAttribute("aria-activedescendant");
          }
          var animModel = {
            name: "FadeIn",
            duration: 100
          };
          _this.beforePopupOpen = true;
          var popupInstance = _this.popupObj;
          var eventArgs = {
            popup: popupInstance,
            cancel: false,
            animation: animModel
          };
          _this.trigger("opened", eventArgs, function(eventArgs2) {
            if (!eventArgs2.cancel) {
              _this.renderReactTemplates();
              if (_this.popupObj) {
                _this.popupObj.show(new Animation2(eventArgs2.animation), _this.zIndex === 1e3 ? _this.inputElement : null);
              }
              if (isNullOrUndefined2(_this.getTriggerCharPosition())) {
                return;
              }
              coordinates_1 = _this.getCoordinates(_this.inputElement, _this.getTriggerCharPosition());
              if (!_this.isCollided) {
                popupEle_1.style.cssText = "top: ".concat(coordinates_1.top.toString(), "px;\n left: ").concat(coordinates_1.left.toString(), "px;\nposition: absolute;\n display: block;");
              } else {
                if (_this.collision.length > 0 && _this.collision.indexOf("right") > -1 && _this.collision.indexOf("bottom") === -1) {
                  popupEle_1.style.cssText = "top: ".concat(coordinates_1.top.toString(), "px;\n left: ").concat(popupLeft_1.toString(), "px;\nposition: absolute;\n display: block;");
                } else if (_this.collision && _this.collision.length > 0 && _this.collision.indexOf("bottom") > -1 && _this.collision.indexOf("right") === -1) {
                  popupEle_1.style.left = formatUnit(coordinates_1.left);
                  popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(popupHeight_1.toString(), 10));
                } else if (_this.collision && _this.collision.length > 0 && _this.collision.indexOf("bottom") > -1 && _this.collision.indexOf("right") > -1) {
                  popupEle_1.style.left = formatUnit(popupLeft_1);
                  popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(popupHeight_1.toString(), 10));
                } else {
                  popupEle_1.style.left = formatUnit(coordinates_1.left);
                  popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(_this.popupHeight.toString(), 10));
                }
                _this.isCollided = false;
                _this.collision = [];
              }
              popupEle_1.style.width = _this.popupWidth !== "100%" && !isNullOrUndefined2(_this.popupWidth) ? formatUnit(_this.popupWidth) : "auto";
              _this.setHeight(popupEle_1);
              popupEle_1.style.zIndex = _this.zIndex === 1e3 ? getZindexPartial(popupEle_1).toString() : _this.zIndex.toString();
            } else {
              _this.beforePopupOpen = false;
              _this.destroyPopup();
            }
          });
        } else {
          _this.beforePopupOpen = false;
        }
      });
    };
    Mention2.prototype.setHeight = function(popupEle) {
      if (this.popupHeight !== "auto" && this.list) {
        this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + "px";
        popupEle.style.maxHeight = formatUnit(this.popupHeight);
      } else {
        popupEle.style.height = "auto";
      }
    };
    Mention2.prototype.checkCollision = function(popupEle) {
      if (!Browser2.isDevice || Browser2.isDevice && !(this.getModuleName() === "mention")) {
        var coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
        this.collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
        if (this.collision.length > 0) {
          popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + "px";
          this.isCollided = true;
        }
        this.popupObj.resolveCollision();
      }
    };
    Mention2.prototype.getTriggerCharPosition = function() {
      var mostRecentTriggerCharPos;
      var currentRange = this.getTextRange();
      if (currentRange !== void 0 && currentRange !== null) {
        mostRecentTriggerCharPos = 0;
        var idx = currentRange.lastIndexOf(this.mentionChar);
        if (idx >= mostRecentTriggerCharPos) {
          mostRecentTriggerCharPos = idx;
        }
      }
      return mostRecentTriggerCharPos ? mostRecentTriggerCharPos : 0;
    };
    Mention2.prototype.initializePopup = function(element2, offsetValue, left) {
      var _this = this;
      this.popupObj = new Popup(element2, {
        width: this.setWidth(),
        targetType: "relative",
        relateTo: this.inputElement,
        collision: {
          X: "flip",
          Y: "flip"
        },
        offsetY: offsetValue,
        enableRtl: this.enableRtl,
        offsetX: left,
        position: {
          X: "left",
          Y: "bottom"
        },
        actionOnScroll: "hide",
        zIndex: this.zIndex,
        close: function() {
          _this.destroyPopup();
        },
        open: function() {
          EventHandler2.add(document, "mousedown", _this.onDocumentClick, _this);
          _this.isPopupOpen = true;
          _this.setDataIndex();
        }
      });
    };
    Mention2.prototype.setWidth = function() {
      var width = formatUnit(this.popupWidth);
      if (width.indexOf("%") > -1) {
        var inputWidth = this.inputElement.offsetWidth * parseFloat(width) / 100;
        width = inputWidth.toString() + "px";
      }
      return width;
    };
    Mention2.prototype.destroyPopup = function() {
      this.isPopupOpen = false;
      this.popupObj.destroy();
      if (isNullOrUndefined2(this.target)) {
        detach2(this.popupObj.element);
      } else {
        this.popupObj.element.innerHTML = "";
        this.popupObj.element.removeAttribute("style");
        this.popupObj.element.removeAttribute("aria-disabled");
      }
      if (this.list.classList.contains("e-nodata")) {
        this.list = null;
      }
    };
    Mention2.prototype.onDocumentClick = function(e) {
      var target = e.target;
      if (!(!isNullOrUndefined2(this.popupObj) && closest2(target, "#" + this.popupObj.element.id))) {
        this.hidePopup(e);
      }
    };
    Mention2.prototype.getCoordinates = function(element2, position) {
      var properties = ["direction", "boxSizing", "width", "height", "overflowX", "overflowY", "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "fontStyle", "fontVariant", "fontWeight", "fontStretch", "fontSize", "fontSizeAdjust", "lineHeight", "fontFamily", "textAlign", "textTransform", "textIndent", "textDecoration", "letterSpacing", "wordSpacing"];
      var div;
      var span;
      var range;
      var globalRange;
      var coordinates;
      var computed;
      var rect;
      if (!this.isContentEditable(this.inputElement)) {
        div = this.createElement("div", {
          className: "e-form-mirror-div"
        });
        document.body.appendChild(div);
        computed = getComputedStyle(element2);
        div.style.position = "absolute";
        div.style.visibility = "hidden";
        properties.forEach(function(prop) {
          div.style[prop] = computed[prop];
        });
        div.textContent = element2.value.substring(0, position);
        if (this.inputElement.nodeName === "INPUT") {
          div.textContent = div.textContent.replace(/\s/g, " ");
        }
        span = this.createElement("span");
        span.textContent = element2.value.substring(position) || ".";
        div.appendChild(span);
        rect = element2.getBoundingClientRect();
      } else {
        var selectedNodePosition = this.getTriggerCharPosition();
        globalRange = this.range;
        range = document.createRange();
        if (this.getTextRange() && this.getTextRange().lastIndexOf(this.mentionChar) !== -1) {
          range.setStart(globalRange.startContainer, selectedNodePosition);
          range.setEnd(globalRange.startContainer, selectedNodePosition);
        } else {
          range.setStart(globalRange.startContainer, globalRange.startOffset);
          range.setEnd(globalRange.startContainer, globalRange.endOffset);
        }
        this.isTyped = false;
        range.collapse(false);
        rect = range.getBoundingClientRect().top === 0 ? range.startContainer.getClientRects()[0] : range.getBoundingClientRect();
      }
      var rectTop = rect.top;
      var rectLeft = rect.left;
      var iframes = document.querySelectorAll("iframe");
      if (iframes.length > 0) {
        for (var i = 0; i < iframes.length; i++) {
          var iframe = iframes[i];
          if (iframe.contentDocument && iframe.contentDocument.contains(element2)) {
            var iframeRect = iframe.getBoundingClientRect();
            rectTop += iframeRect.top;
            rectLeft += iframeRect.left;
          }
        }
      }
      var doc = document.documentElement;
      var windowLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
      var windowTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
      var width = 0;
      if (!isNullOrUndefined2(range) && range.getBoundingClientRect().top === 0) {
        for (var i = 0; i < this.range.startContainer.childNodes.length; i++) {
          if (this.range.startContainer.childNodes[i].nodeType !== Node.TEXT_NODE && this.range.startContainer.childNodes[i].textContent.trim() !== "") {
            width += this.range.startContainer.childNodes[i].getClientRects()[0].width;
          } else if (this.range.startContainer.childNodes[i].textContent !== "") {
            var span_1 = document.createElement("span");
            span_1.innerHTML = this.range.startContainer.childNodes[i].nodeValue;
            document.body.appendChild(span_1);
            var textNodeWidth = span_1.offsetWidth;
            document.body.removeChild(span_1);
            width += textNodeWidth;
          }
        }
      }
      if (!this.isContentEditable(this.inputElement)) {
        coordinates = {
          top: rectTop + windowTop + span.offsetTop + parseInt(computed.borderTopWidth, 10) + parseInt(computed.fontSize, 10) + 3 - element2.scrollTop - (this.isCollided ? 10 : 0),
          left: rectLeft + windowLeft + span.offsetLeft + parseInt(computed.borderLeftWidth, 10)
        };
        document.body.removeChild(div);
      } else {
        if (this.collision && this.collision.length > 0 && this.collision.indexOf("right") > -1 && this.collision.indexOf("bottom") === -1) {
          coordinates = {
            top: rectTop + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
            left: rectLeft + windowLeft + width
          };
        } else {
          coordinates = {
            top: rectTop + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
            left: rectLeft + windowLeft + width
          };
        }
      }
      return coordinates;
    };
    Mention2.prototype.initValue = function() {
      this.isDataFetched = false;
      this.renderList();
      if (this.dataSource instanceof DataManager) {
        this.initRemoteRender = true;
      } else {
        this.updateValues();
      }
    };
    Mention2.prototype.updateValues = function() {
      var li = this.list.querySelector("." + dropDownBaseClasses.focus);
      if (!isNullOrUndefined2(li)) {
        this.setSelection(li, null);
      }
    };
    Mention2.prototype.renderList = function() {
      _super.prototype.render.call(this);
      this.unWireListEvents();
      this.wireListEvents();
    };
    Mention2.prototype.wireListEvents = function() {
      EventHandler2.add(this.list, this.keyEventName, this.onMouseClick, this);
      EventHandler2.add(this.list, "mouseover", this.onMouseOver, this);
      EventHandler2.add(this.list, "mouseout", this.onMouseLeave, this);
    };
    Mention2.prototype.unWireListEvents = function() {
      EventHandler2.remove(this.list, this.keyEventName, this.onMouseClick);
      EventHandler2.remove(this.list, "mouseover", this.onMouseOver);
      EventHandler2.remove(this.list, "mouseout", this.onMouseLeave);
    };
    Mention2.prototype.onMouseClick = function(e) {
      var target = e.target;
      var li = closest2(target, "." + dropDownBaseClasses.li);
      if (!this.isValidLI(li) || this.isDisabledElement(li)) {
        return;
      }
      this.isSelected = true;
      this.setSelection(li, e);
      var delay = 100;
      this.closePopup(delay, e);
      this.inputElement.focus();
      if (!this.isRTE) {
        e.preventDefault();
      }
    };
    Mention2.prototype.updateSelectedItem = function(li, e, preventSelect, isSelection) {
      var _this = this;
      this.removeSelection();
      li.classList.add(dropDownBaseClasses.selected);
      this.removeHover();
      var value = this.getFormattedValue(li.getAttribute("data-value"));
      var selectedData = this.getDataByValue(value);
      if (!preventSelect && !isNullOrUndefined2(e) && !(e.action === "down" || e.action === "up")) {
        var items = this.detachChanges(selectedData);
        this.isSelected = true;
        var eventArgs = {
          e,
          item: li,
          itemData: items,
          isInteracted: e ? true : false,
          cancel: false
        };
        this.trigger("select", eventArgs, function(eventArgs2) {
          if (eventArgs2.cancel) {
            li.classList.remove(dropDownBaseClasses.selected);
            _this.isSelected = false;
            _this.isSelectCancel = true;
          } else {
            _this.selectEventCallback(li, selectedData, value);
            if (isSelection) {
              _this.setSelectOptions(li, e);
            }
          }
        });
      } else {
        this.selectEventCallback(li, selectedData, value);
        if (isSelection) {
          this.setSelectOptions(li, e);
        }
      }
    };
    Mention2.prototype.setSelection = function(li, e) {
      if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || this.isPopupOpen && this.isSelected && li.classList.contains(dropDownBaseClasses.selected))) {
        this.updateSelectedItem(li, e, false, true);
      } else {
        this.setSelectOptions(li, e);
      }
    };
    Mention2.prototype.setSelectOptions = function(li, e) {
      if (this.list) {
        this.removeHover();
      }
      this.previousSelectedLI = !isNullOrUndefined2(this.selectedLI) ? this.selectedLI : null;
      this.selectedLI = li;
      if (this.isPopupOpen && !isNullOrUndefined2(this.selectedLI)) {
        this.setScrollPosition(e);
      }
      if (e && (e.keyCode === 38 || e.keyCode === 40)) {
        return;
      }
      if (isNullOrUndefined2(e) || this.setValue(e)) {
        return;
      }
    };
    Mention2.prototype.setScrollPosition = function(e) {
      if (!isNullOrUndefined2(e)) {
        switch (e.action) {
          case "pageDown":
          case "down":
          case "end":
            this.scrollBottom();
            break;
          default:
            this.scrollTop();
            break;
        }
      } else {
        this.scrollBottom(true);
      }
    };
    Mention2.prototype.scrollBottom = function(isInitial) {
      if (!isNullOrUndefined2(this.selectedLI)) {
        var currentOffset = this.list.offsetHeight;
        var nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
        var nextOffset = this.list.scrollTop + nextBottom - currentOffset;
        nextOffset = isInitial ? nextOffset + parseInt(getComputedStyle(this.list).paddingTop, 10) * 2 : nextOffset;
        var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
        if (this.activeIndex === 0) {
          this.list.scrollTop = 0;
        } else if (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) {
          this.list.scrollTop = nextOffset;
        }
      }
    };
    Mention2.prototype.scrollTop = function() {
      if (!isNullOrUndefined2(this.selectedLI)) {
        var nextOffset = !isNullOrUndefined2(this.fields.groupBy) && !isNullOrUndefined2(this.fixedHeaderElement) ? this.selectedLI.offsetTop - (this.list.scrollTop + this.fixedHeaderElement.offsetHeight) : this.selectedLI.offsetTop - this.list.scrollTop;
        nextOffset = this.fields.groupBy && nextOffset;
        var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
        if (this.activeIndex === 0) {
          this.list.scrollTop = 0;
        } else if (nextOffset < 0) {
          this.list.scrollTop = this.list.scrollTop + nextOffset;
        } else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {
          this.list.scrollTop = this.selectedLI.offsetTop;
        }
      }
    };
    Mention2.prototype.selectEventCallback = function(li, selectedData, value, selectLi) {
      this.previousItemData = !isNullOrUndefined2(this.itemData) ? this.itemData : null;
      this.item = li;
      this.itemData = selectedData;
      var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
      if (focusedItem) {
        removeClass2([focusedItem], dropDownBaseClasses.focus);
      }
      if (selectLi) {
        addClass2([li], dropDownBaseClasses.selected);
      }
      li.setAttribute("aria-selected", "true");
      this.activeIndex = this.getIndexByValue(value);
    };
    Mention2.prototype.detachChanges = function(value) {
      var items;
      if (typeof value === "string" || typeof value === "boolean" || typeof value === "number") {
        items = Object.defineProperties({}, {
          value: {
            value,
            enumerable: true
          },
          text: {
            value,
            enumerable: true
          }
        });
      } else {
        items = value;
      }
      return items;
    };
    Mention2.prototype.setValue = function(e) {
      if (!this.isReact) {
        if (!isNullOrUndefined2(this.displayTemplate)) {
          this.setDisplayTemplate();
        }
        this.updateMentionValue(e);
        return true;
      } else {
        if (!isNullOrUndefined2(this.displayTemplate)) {
          this.setDisplayTemplate(e);
        } else {
          this.updateMentionValue(e);
        }
        return true;
      }
    };
    Mention2.prototype.updateMentionValue = function(e) {
      var dataItem = this.getItemData();
      var textSuffix = typeof this.suffixText === "string" ? this.suffixText : "";
      var value;
      var endPos;
      var range;
      var globalRange;
      var selection = this.inputElement.ownerDocument.getSelection();
      var startPos = this.getTriggerCharPosition();
      if (this.isSelectCancel) {
        this.isSelectCancel = false;
        return;
      }
      if (dataItem.text !== null) {
        value = this.mentionVal(dataItem.text);
      }
      if (!this.isContentEditable(this.inputElement)) {
        var myField = this.inputElement;
        var currentTriggerSnippet = this.getTextRange().substring(startPos + this.mentionChar.length, this.getTextRange().length);
        value += textSuffix;
        endPos = startPos + this.mentionChar.length;
        endPos += currentTriggerSnippet.length;
        myField.value = myField.value.substring(0, startPos) + value + myField.value.substring(endPos, myField.value.length);
        myField.selectionStart = startPos + value.length;
        myField.selectionEnd = startPos + value.length;
        if (this.isPopupOpen) {
          this.hidePopup();
        }
        this.onChangeEvent(e);
      } else {
        endPos = this.getTriggerCharPosition() + this.mentionChar.length;
        if (this.range && this.range.startContainer.textContent.trim() !== this.mentionChar) {
          endPos = this.range.endOffset;
        }
        globalRange = this.range;
        range = document.createRange();
        if (this.getTextRange() && this.getTextRange().lastIndexOf(this.mentionChar) !== -1 || this.getTextRange() && this.getTextRange().trim() === this.mentionChar) {
          range.setStart(globalRange.startContainer, startPos);
          range.setEnd(globalRange.startContainer, endPos);
        } else {
          if (globalRange.commonAncestorContainer.textContent.trim() !== "" && !isNullOrUndefined2(globalRange.commonAncestorContainer.textContent.trim()) && this.getTextRange() && this.getTextRange().lastIndexOf(this.mentionChar) !== -1) {
            range.setStart(globalRange.startContainer, globalRange.startOffset - 1);
            range.setEnd(globalRange.startContainer, globalRange.endOffset - 1);
          } else {
            range.setStart(globalRange.startContainer, globalRange.startOffset);
            range.setEnd(globalRange.startContainer, globalRange.endOffset);
          }
        }
        this.isTyped = false;
        range.deleteContents();
        range.startContainer.parentElement.normalize();
        var element2 = this.createElement("div");
        element2.innerHTML = value;
        var frag = document.createDocumentFragment();
        var node = void 0;
        var lastNode = void 0;
        while (node = element2.firstChild) {
          lastNode = frag.appendChild(node);
        }
        range.insertNode(frag);
        if (lastNode) {
          range = range.cloneRange();
          if (this.isRTE) {
            range.setStart(lastNode, 0);
            range.setEnd(lastNode, lastNode.textContent.length);
          } else {
            range.setStartAfter(lastNode);
          }
          range.collapse(true);
          selection.removeAllRanges();
          selection.addRange(range);
        }
        if (this.isPopupOpen) {
          this.hidePopup();
        }
        if (!isNullOrUndefined2(e.pointerType) && e.pointerType === "mouse") {
          var event_1 = new CustomEvent("content-changed", {
            detail: {
              click: true
            }
          });
          this.inputElement.dispatchEvent(event_1);
        }
        this.onChangeEvent(e);
      }
    };
    Mention2.prototype.mentionVal = function(value) {
      var showChar = this.showMentionChar ? this.mentionChar : "";
      if (!isNullOrUndefined2(this.displayTemplate) && !isNullOrUndefined2(this.displayTempElement)) {
        value = this.displayTempElement.innerHTML;
      }
      if (this.isContentEditable(this.inputElement)) {
        if (Browser2.isAndroid) {
          return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + "</span>".concat(typeof this.suffixText === "string" ? this.suffixText : "&#8203;");
        } else {
          return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + "</span>".concat(typeof this.suffixText === "string" ? this.suffixText : "&#8203;");
        }
      } else {
        return showChar + value;
      }
    };
    Mention2.prototype.setDisplayTemplate = function(e) {
      var _this = this;
      if (this.isReact) {
        this.clearTemplate(["displayTemplate"]);
        if (this.displayTempElement) {
          detach2(this.displayTempElement);
          this.displayTempElement = null;
        }
      }
      if (!this.displayTempElement) {
        this.displayTempElement = this.createElement("div");
      }
      if (!this.isReact) {
        this.displayTempElement.innerHTML = "";
      }
      var compiledString = compile4(this.displayTemplate);
      var displayCompTemp = compiledString(this.itemData, this, "displayTemplate", this.displayTemplateId, this.isStringTemplate, null, this.displayTempElement);
      if (displayCompTemp && displayCompTemp.length > 0) {
        append(displayCompTemp, this.displayTempElement);
      }
      if (!this.isReact) {
        this.renderTemplates();
      } else {
        this.renderTemplates(function() {
          _this.updateMentionValue(e);
        });
      }
    };
    Mention2.prototype.renderTemplates = function(callBack) {
      this.renderReactTemplates(callBack);
    };
    Mention2.prototype.setSpinnerTemplate = function() {
      var _this = this;
      if (this.isReact) {
        this.clearTemplate(["spinnerTemplate"]);
        if (this.spinnerTemplateElement) {
          detach2(this.spinnerTemplateElement);
          this.spinnerTemplateElement = null;
        }
      }
      if (!this.spinnerTemplateElement) {
        this.spinnerTemplateElement = this.createElement("div");
      }
      if (!this.isReact) {
        this.spinnerTemplateElement.innerHTML = "";
      }
      var compiledString = compile4(this.spinnerTemplate);
      var spinnerCompTemp = compiledString(null, this, "spinnerTemplate", this.spinnerTemplateId, this.isStringTemplate, null, this.spinnerTemplateElement);
      if (spinnerCompTemp && spinnerCompTemp.length > 0) {
        for (var i = 0; i < spinnerCompTemp.length; i++) {
          this.spinnerTemplateElement.appendChild(spinnerCompTemp[i]);
        }
      }
      if (!this.isReact) {
        this.renderTemplates();
        this.popupObj.element.appendChild(this.spinnerTemplateElement);
      } else {
        this.renderTemplates(function() {
          _this.popupObj.element.appendChild(_this.spinnerTemplateElement);
        });
      }
    };
    Mention2.prototype.onChangeEvent = function(eve) {
      this.isSelected = false;
      var items = this.detachMentionChanges(this.itemData);
      var preItems;
      if (typeof this.previousItemData === "string" || typeof this.previousItemData === "boolean" || typeof this.previousItemData === "number") {
        preItems = Object.defineProperties({}, {
          value: {
            value: this.previousItemData,
            enumerable: true
          },
          text: {
            value: this.previousItemData,
            enumerable: true
          }
        });
      } else {
        preItems = this.previousItemData;
      }
      var eventArgs = {
        e: eve,
        item: this.item,
        itemData: items,
        previousItem: this.previousSelectedLI,
        previousItemData: preItems,
        isInteracted: eve ? true : false,
        value: this.item.innerHTML,
        element: this.inputElement
      };
      this.trigger("change", eventArgs);
    };
    Mention2.prototype.detachMentionChanges = function(value) {
      var items;
      if (typeof value === "string" || typeof value === "boolean" || typeof value === "number") {
        items = Object.defineProperties({}, {
          value: {
            value,
            enumerable: true
          },
          text: {
            value,
            enumerable: true
          }
        });
      } else {
        items = value;
      }
      return items;
    };
    Mention2.prototype.getItemData = function() {
      var fields = this.fields;
      var dataItem = null;
      dataItem = this.itemData;
      var dataValue;
      var dataText;
      if (!isNullOrUndefined2(dataItem)) {
        dataValue = getValue2(fields.value, dataItem);
        dataText = getValue2(fields.text, dataItem);
      }
      var value = !isNullOrUndefined2(dataItem) && !isUndefined2(dataValue) ? dataValue : dataItem;
      var text = !isNullOrUndefined2(dataItem) && !isUndefined2(dataValue) ? dataText : dataItem;
      return {
        value,
        text
      };
    };
    Mention2.prototype.removeSelection = function() {
      if (this.list) {
        var selectedItems = this.list.querySelectorAll("." + dropDownBaseClasses.selected);
        if (selectedItems.length) {
          removeClass2(selectedItems, dropDownBaseClasses.selected);
          selectedItems[0].removeAttribute("aria-selected");
        }
      }
    };
    Mention2.prototype.onMouseOver = function(e) {
      var currentLi = closest2(e.target, "." + dropDownBaseClasses.li);
      this.setHover(currentLi);
    };
    Mention2.prototype.setHover = function(li) {
      if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
        this.removeHover();
        addClass2([li], dropDownBaseClasses.hover);
      }
    };
    Mention2.prototype.removeHover = function() {
      if (this.list) {
        var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.hover);
        if (hoveredItem && hoveredItem.length) {
          removeClass2(hoveredItem, dropDownBaseClasses.hover);
        }
      }
    };
    Mention2.prototype.isValidLI = function(li) {
      return li && li.hasAttribute("role") && li.getAttribute("role") === "option";
    };
    Mention2.prototype.onMouseLeave = function() {
      this.removeHover();
    };
    Mention2.prototype.search = function(text, positionX, positionY) {
      if (this.isContentEditable(this.inputElement)) {
        this.range = this.getCurrentRange();
      }
      var currentRange = this.getTextRange();
      var lastWordRange = this.getLastLetter(currentRange);
      if (this.ignoreCase && (text === lastWordRange || text === lastWordRange.toLowerCase()) || !this.ignoreCase && text === lastWordRange) {
        this.resetList(this.dataSource, this.fields);
      } else {
        if (this.isPopupOpen) {
          this.hidePopup();
        }
        return;
      }
      if (isNullOrUndefined2(this.list)) {
        this.renderList();
        this.renderPopup();
      } else {
        this.showPopup();
      }
      this.popupObj.element.style.left = formatUnit(positionX);
      this.popupObj.element.style.top = formatUnit(positionY);
    };
    Mention2.prototype.disableItem = function(item) {
      if (this.fields.disabled) {
        if (!this.list) {
          this.renderList();
        }
        var itemIndex = -1;
        if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
          if (typeof item === "string") {
            itemIndex = this.getIndexByValue(item);
          } else if (typeof item === "object") {
            if (item instanceof HTMLLIElement) {
              for (var index = 0; index < this.liCollections.length; index++) {
                if (this.liCollections[index] === item) {
                  itemIndex = this.getIndexByValue(item.getAttribute("data-value"));
                  break;
                }
              }
            } else {
              var value = JSON.parse(JSON.stringify(item))[this.fields.value];
              for (var index = 0; index < this.listData.length; index++) {
                if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
                  itemIndex = this.getIndexByValue(value);
                  break;
                }
              }
            }
          } else {
            itemIndex = item;
          }
          var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
          if (isValidIndex && !JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled]) {
            var li = this.liCollections[itemIndex];
            if (li) {
              this.disableListItem(li);
              var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
              parsedData[this.fields.disabled] = true;
              this.listData[itemIndex] = parsedData;
              this.dataSource = this.listData;
            }
          }
        }
      }
    };
    Mention2.prototype.destroy = function() {
      this.hidePopup();
      this.unWireEvent();
      if (this.list) {
        this.unWireListEvents();
      }
      if (this.inputElement && !this.inputElement.classList.contains("e-" + this.getModuleName())) {
        return;
      }
      this.previousSelectedLI = null;
      this.item = null;
      this.selectedLI = null;
      this.popupObj = null;
      _super.prototype.destroy.call(this);
    };
    Mention2.prototype.getLocaleName = function() {
      return "mention";
    };
    Mention2.prototype.getNgDirective = function() {
      return "EJS-MENTION";
    };
    Mention2.prototype.getModuleName = function() {
      return "mention";
    };
    __decorate88([Property2(null)], Mention2.prototype, "cssClass", void 0);
    __decorate88([Property2("@")], Mention2.prototype, "mentionChar", void 0);
    __decorate88([Property2(false)], Mention2.prototype, "showMentionChar", void 0);
    __decorate88([Property2(false)], Mention2.prototype, "allowSpaces", void 0);
    __decorate88([Property2(null)], Mention2.prototype, "suffixText", void 0);
    __decorate88([Property2(25)], Mention2.prototype, "suggestionCount", void 0);
    __decorate88([Property2(0)], Mention2.prototype, "minLength", void 0);
    __decorate88([Property2("None")], Mention2.prototype, "sortOrder", void 0);
    __decorate88([Property2(true)], Mention2.prototype, "ignoreCase", void 0);
    __decorate88([Property2(false)], Mention2.prototype, "highlight", void 0);
    __decorate88([Property2()], Mention2.prototype, "locale", void 0);
    __decorate88([Property2("auto")], Mention2.prototype, "popupWidth", void 0);
    __decorate88([Property2("300px")], Mention2.prototype, "popupHeight", void 0);
    __decorate88([Property2(null)], Mention2.prototype, "displayTemplate", void 0);
    __decorate88([Property2(null)], Mention2.prototype, "itemTemplate", void 0);
    __decorate88([Property2("No records found")], Mention2.prototype, "noRecordsTemplate", void 0);
    __decorate88([Property2(null)], Mention2.prototype, "spinnerTemplate", void 0);
    __decorate88([Property2()], Mention2.prototype, "target", void 0);
    __decorate88([Property2([])], Mention2.prototype, "dataSource", void 0);
    __decorate88([Property2(null)], Mention2.prototype, "query", void 0);
    __decorate88([Property2("Contains")], Mention2.prototype, "filterType", void 0);
    __decorate88([Complex2({
      text: null,
      value: null,
      iconCss: null,
      groupBy: null
    }, FieldSettings2)], Mention2.prototype, "fields", void 0);
    __decorate88([Event3()], Mention2.prototype, "actionBegin", void 0);
    __decorate88([Event3()], Mention2.prototype, "actionComplete", void 0);
    __decorate88([Event3()], Mention2.prototype, "actionFailure", void 0);
    __decorate88([Event3()], Mention2.prototype, "change", void 0);
    __decorate88([Event3()], Mention2.prototype, "beforeOpen", void 0);
    __decorate88([Event3()], Mention2.prototype, "opened", void 0);
    __decorate88([Event3()], Mention2.prototype, "closed", void 0);
    __decorate88([Event3()], Mention2.prototype, "select", void 0);
    __decorate88([Event3()], Mention2.prototype, "filtering", void 0);
    __decorate88([Event3()], Mention2.prototype, "created", void 0);
    __decorate88([Event3()], Mention2.prototype, "destroyed", void 0);
    Mention2 = __decorate88([NotifyPropertyChanges2], Mention2);
    return Mention2;
  }(DropDownBase)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/dialog.js
var KanbanDialog = (
  /** @class */
  function() {
    function KanbanDialog2(parent) {
      this.preventUpdate = false;
      this.parent = parent;
    }
    KanbanDialog2.prototype.openDialog = function(action, data) {
      this.action = action;
      this.parent.activeCardData.data = data;
      this.renderDialog(data, action);
      this.dialogObj.show();
    };
    KanbanDialog2.prototype.closeDialog = function() {
      this.dialogObj.hide();
    };
    KanbanDialog2.prototype.renderDialog = function(args, action) {
      this.element = createElement2("div", {
        id: this.parent.element.id + "_dialog_wrapper"
      });
      this.parent.element.appendChild(this.element);
      var dialogModel = {
        buttons: this.getDialogButtons(action),
        content: this.getDialogContent(args, action),
        cssClass: DIALOG_CLASS,
        enableRtl: this.parent.enableRtl,
        header: this.parent.localeObj.getConstant(action === "Add" ? "addTitle" : action === "Edit" ? "editTitle" : "deleteTitle"),
        height: "auto",
        isModal: true,
        showCloseIcon: true,
        width: action === "Delete" ? 400 : 350,
        visible: false,
        beforeOpen: this.onBeforeDialogOpen.bind(this),
        beforeClose: this.onBeforeDialogClose.bind(this)
      };
      this.dialogObj = new Dialog(extend2(dialogModel, action !== "Delete" ? this.parent.dialogSettings.model || {} : {}), this.element);
      if (action !== "Delete") {
        this.applyFormValidation();
      }
      this.dialogObj.element.querySelector(".e-dlg-closeicon-btn").title = this.parent.localeObj.getConstant("close");
    };
    KanbanDialog2.prototype.getDialogContent = function(args, action) {
      if (action === "Delete") {
        return this.parent.localeObj.getConstant("deleteContent");
      } else {
        var container = createElement2("div", {
          className: FORM_WRAPPER_CLASS
        });
        var form = createElement2("form", {
          id: this.parent.element.id + "EditForm",
          className: FORM_CLASS,
          attrs: {
            onsubmit: "return false;"
          }
        });
        if (this.parent.dialogSettings.template) {
          if (args) {
            this.destroyComponents();
            [].slice.call(form.childNodes).forEach(function(node) {
              return remove(node);
            });
          }
          var templateId = this.parent.element.id + "_dialogTemplate";
          var dialogTemplate = this.parent.templateParser(this.parent.dialogSettings.template)(args, this.parent, "dialogTemplate", templateId, false);
          append(dialogTemplate, form);
          this.parent.renderTemplates();
        } else {
          var dialogWrapper = createElement2("div", {
            className: DIALOG_CONTENT_CONTAINER
          });
          form.appendChild(dialogWrapper);
          var table = createElement2("table");
          dialogWrapper.appendChild(table);
          var dialogFields = this.getDialogFields();
          for (var _i = 0, dialogFields_1 = dialogFields; _i < dialogFields_1.length; _i++) {
            var field = dialogFields_1[_i];
            var tr = createElement2("tr");
            table.appendChild(tr);
            tr.appendChild(createElement2("td", {
              className: "e-label",
              innerHTML: field.text ? field.text : field.key
            }));
            var td = createElement2("td");
            tr.appendChild(td);
            td.appendChild(this.renderComponents(field));
          }
        }
        container.appendChild(form);
        return container;
      }
    };
    KanbanDialog2.prototype.getDialogFields = function() {
      var fields = this.parent.dialogSettings.fields;
      if (fields.length === 0) {
        fields = [{
          text: "ID",
          key: this.parent.cardSettings.headerField,
          type: "TextBox"
        }, {
          key: this.parent.keyField,
          type: "DropDown"
        }, {
          key: this.parent.cardSettings.contentField,
          type: "TextArea"
        }];
        if (this.parent.sortSettings.field) {
          fields.splice(fields.length - 1, 0, {
            key: this.parent.sortSettings.field,
            type: "TextBox"
          });
        }
        if (this.parent.swimlaneSettings.keyField) {
          fields.splice(fields.length - 1, 0, {
            key: this.parent.swimlaneSettings.keyField,
            type: "DropDown"
          });
        }
      }
      return fields;
    };
    KanbanDialog2.prototype.getDialogButtons = function(action) {
      var primaryButtonClass = action === "Delete" ? "e-dialog-yes" : action === "Add" ? "e-dialog-add" : "e-dialog-edit";
      var flatButtonClass = action === "Delete" ? "e-dialog-no" : "e-dialog-cancel";
      var dialogButtons = [{
        buttonModel: {
          cssClass: "e-flat " + primaryButtonClass,
          isPrimary: true,
          content: this.parent.localeObj.getConstant(action === "Add" || action === "Edit" ? "save" : "yes")
        },
        click: this.dialogButtonClick.bind(this)
      }, {
        buttonModel: {
          cssClass: "e-flat " + flatButtonClass,
          isPrimary: false,
          content: this.parent.localeObj.getConstant(action === "Add" || action === "Edit" ? "cancel" : "no")
        },
        click: this.dialogButtonClick.bind(this)
      }];
      if (action === "Edit") {
        var deleteButton = {
          buttonModel: {
            cssClass: "e-flat e-dialog-delete",
            isPrimary: false,
            content: this.parent.localeObj.getConstant("delete")
          },
          click: this.dialogButtonClick.bind(this)
        };
        dialogButtons.splice(0, 0, deleteButton);
      }
      return dialogButtons;
    };
    KanbanDialog2.prototype.renderComponents = function(field) {
      var wrapper = createElement2("div", {
        className: field.key + "_wrapper"
      });
      var element2 = createElement2("input", {
        className: FIELD_CLASS,
        attrs: {
          "name": field.key
        }
      });
      wrapper.appendChild(element2);
      var divElement;
      var dropDownOptions;
      var controlObj;
      var fieldValue = this.parent.activeCardData.data ? this.parent.activeCardData.data[field.key] : null;
      switch (field.type) {
        case "DropDown":
          if (field.key === this.parent.keyField) {
            var currentKeys = this.parent.enableVirtualization ? this.parent.virtualLayoutModule.columnKeys : this.parent.layoutModule.columnKeys;
            if (this.parent.actionModule.hideColumnKeys.length > 0) {
              currentKeys = [];
              for (var i = 0; i < this.parent.columns.length; i++) {
                var isColumnVisible = this.parent.enableVirtualization ? this.parent.virtualLayoutModule.isColumnVisible(this.parent.columns[i]) : this.parent.layoutModule.isColumnVisible(this.parent.columns[i]);
                if (isColumnVisible) {
                  var isNumeric = typeof this.parent.columns[i].keyField === "number";
                  if (isNumeric) {
                    currentKeys = currentKeys.concat(this.parent.columns[i].keyField.toString());
                  } else {
                    currentKeys = currentKeys.concat(this.parent.columns[i].keyField.split(",").map(function(e) {
                      return e.trim();
                    }));
                  }
                }
              }
            }
            dropDownOptions = {
              dataSource: currentKeys,
              value: fieldValue ? fieldValue.toString() : fieldValue
            };
          } else if (field.key === this.parent.swimlaneSettings.keyField) {
            dropDownOptions = {
              dataSource: [].slice.call(this.parent.enableVirtualization ? this.parent.virtualLayoutModule.kanbanRows : this.parent.layoutModule.kanbanRows),
              fields: {
                text: "textField",
                value: "keyField"
              },
              value: fieldValue
            };
          }
          controlObj = new DropDownList(dropDownOptions);
          break;
        case "Numeric":
          controlObj = new NumericTextBox({
            value: fieldValue
          });
          break;
        case "TextBox":
          controlObj = new TextBox({
            value: fieldValue
          });
          if (fieldValue && this.parent.cardSettings.headerField === field.key) {
            controlObj.enabled = false;
          }
          break;
        case "TextArea":
          remove(element2);
          divElement = createElement2("div");
          element2 = createElement2("textarea", {
            className: FIELD_CLASS,
            attrs: {
              "name": field.key,
              "rows": "3",
              "aria-label": this.parent.cardSettings.contentField
            },
            innerHTML: fieldValue
          });
          wrapper.appendChild(divElement).appendChild(element2);
          break;
        default:
          break;
      }
      if (controlObj) {
        controlObj.appendTo(element2);
      }
      return wrapper;
    };
    KanbanDialog2.prototype.onBeforeDialogOpen = function(args) {
      var _this = this;
      var eventProp = {
        data: this.parent.activeCardData.data,
        cancel: false,
        element: this.element,
        target: this.parent.activeCardData.element,
        requestType: this.action
      };
      this.storeElement = document.activeElement;
      if (parseInt(args.maxHeight, 10) <= 250) {
        args.maxHeight = "250px";
      }
      this.parent.trigger(dialogOpen, eventProp, function(openArgs) {
        args.cancel = openArgs.cancel;
        if (openArgs.cancel) {
          _this.destroy();
        }
      });
    };
    KanbanDialog2.prototype.onBeforeDialogClose = function(args) {
      var _this = this;
      var formInputs = this.getFormElements();
      var cardObj = {};
      if (args.isInteracted) {
        this.preventUpdate = true;
      }
      if (!this.preventUpdate) {
        for (var _i = 0, formInputs_1 = formInputs; _i < formInputs_1.length; _i++) {
          var input2 = formInputs_1[_i];
          var columnName = input2.name || this.getColumnName(input2);
          if (!isNullOrUndefined2(columnName) && columnName !== "") {
            var value = this.getValueFromElement(input2);
            if (columnName === this.parent.cardSettings.headerField) {
              value = this.getIDType() === "string" ? value : parseInt(value, 10);
            }
            cardObj[columnName] = value;
          }
        }
      }
      this.preventUpdate = false;
      cardObj = extend2(this.parent.activeCardData.data, cardObj);
      var eventProp = {
        data: cardObj,
        cancel: false,
        element: this.element,
        requestType: this.action
      };
      this.parent.trigger(dialogClose, eventProp, function(closeArgs) {
        args.cancel = closeArgs.cancel;
        if (!closeArgs.cancel) {
          _this.cardData = eventProp.data;
          _this.destroy();
          _this.parent.actionModule.SingleCardSelection(_this.cardData);
        }
      });
    };
    KanbanDialog2.prototype.getIDType = function() {
      if (this.parent.kanbanData.length !== 0) {
        return typeof this.parent.kanbanData[0][this.parent.cardSettings.headerField];
      }
      return "string";
    };
    KanbanDialog2.prototype.applyFormValidation = function() {
      var _this = this;
      var form = this.element.querySelector("." + FORM_CLASS);
      var rules = {};
      for (var _i = 0, _a = this.parent.dialogSettings.fields; _i < _a.length; _i++) {
        var field = _a[_i];
        rules[field.key] = field.validationRules && Object.keys(field.validationRules).length > 0 ? field.validationRules : null;
      }
      this.formObj = new FormValidator(form, {
        rules,
        customPlacement: function(inputElement, error) {
          var id = error.getAttribute("for");
          var elem = _this.element.querySelector("#" + id + "_Error");
          if (!elem) {
            _this.createTooltip(inputElement, error, id, "");
          }
        },
        validationComplete: function(args) {
          var elem = _this.element.querySelector("#" + args.inputName + "_Error");
          if (elem) {
            elem.style.display = args.status === "failure" ? "" : "none";
          }
        }
      });
    };
    KanbanDialog2.prototype.createTooltip = function(element2, error, name, display) {
      var dlgContent;
      var client;
      var inputClient = element2.parentElement.getBoundingClientRect();
      if (this.element.classList.contains(DIALOG_CLASS)) {
        dlgContent = this.element;
        client = this.element.getBoundingClientRect();
      } else {
        dlgContent = this.element.querySelector(".e-kanban-dialog .e-dlg-content");
        client = dlgContent.getBoundingClientRect();
      }
      var div = createElement2("div", {
        className: "e-tooltip-wrap e-popup " + ERROR_VALIDATION_CLASS,
        id: name + "_Error",
        styles: "display:" + display + ";top:" + (inputClient.bottom - client.top + dlgContent.scrollTop + 9) + "px;left:" + (inputClient.left - client.left + dlgContent.scrollLeft + inputClient.width / 2) + "px;"
      });
      var content = createElement2("div", {
        className: "e-tip-content"
      });
      content.appendChild(error);
      var arrow = createElement2("div", {
        className: "e-arrow-tip e-tip-top"
      });
      arrow.appendChild(createElement2("div", {
        className: "e-arrow-tip-outer e-tip-top"
      }));
      arrow.appendChild(createElement2("div", {
        className: "e-arrow-tip-inner e-tip-top"
      }));
      div.appendChild(content);
      div.appendChild(arrow);
      dlgContent.appendChild(div);
      div.style.left = parseInt(div.style.left, 10) - div.offsetWidth / 2 + "px";
    };
    KanbanDialog2.prototype.destroyToolTip = function() {
      if (this.element) {
        this.element.querySelectorAll("." + ERROR_VALIDATION_CLASS).forEach(function(node) {
          return remove(node);
        });
      }
      if (this.formObj && this.formObj.element) {
        this.formObj.reset();
      }
    };
    KanbanDialog2.prototype.dialogButtonClick = function(event2) {
      var target = event2.target.cloneNode(true);
      if (!isNullOrUndefined2(event2.keyCode) && event2.keyCode === 13) {
        var valTrg = this.dialogObj.element.querySelector(".e-footer-content button.e-primary");
        target = valTrg.cloneNode(true);
      }
      var id = this.formObj.element.id;
      if (document.getElementById(id) && this.formObj.validate() && (target.classList.contains("e-dialog-edit") || target.classList.contains("e-dialog-add"))) {
        this.dialogObj.hide();
        if (!isNullOrUndefined2(this.cardData)) {
          if (target.classList.contains("e-dialog-edit")) {
            var activeCard = this.parent.activeCardData;
            var updateIndex = void 0;
            if (activeCard.data[this.parent.keyField] === this.cardData[this.parent.keyField] && activeCard.element) {
              updateIndex = [].slice.call(activeCard.element.parentElement.children).indexOf(activeCard.element);
            }
            if (this.parent.enableHtmlSanitizer) {
              if (typeof this.cardData[this.parent.cardSettings.contentField] === "string") {
                this.cardData[this.parent.cardSettings.contentField] = SanitizeHtmlHelper2.sanitize(this.cardData[this.parent.cardSettings.contentField]);
              }
            }
            this.parent.crudModule.updateCard(this.cardData, updateIndex);
          }
          if (target.classList.contains("e-dialog-add")) {
            this.parent.crudModule.addCard(this.cardData);
          }
          this.parent.actionModule.SingleCardSelection(this.cardData);
          this.cardData = null;
        }
      }
      if (!target.classList.contains("e-dialog-edit") && !target.classList.contains("e-dialog-add")) {
        if (target.classList.contains("e-dialog-cancel")) {
          this.preventUpdate = true;
        }
        this.dialogObj.hide();
        if (target.classList.contains("e-dialog-yes")) {
          this.parent.crudModule.deleteCard(this.parent.activeCardData.data);
        } else if (target.classList.contains("e-dialog-no")) {
          this.openDialog("Edit", this.parent.activeCardData.data);
        } else if (target.classList.contains("e-dialog-delete")) {
          this.openDialog("Delete", this.parent.activeCardData.data);
        }
      }
    };
    KanbanDialog2.prototype.getFormElements = function() {
      var elements = [].slice.call(this.element.querySelectorAll("." + FIELD_CLASS));
      var validElements = [];
      for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
        var element2 = elements_1[_i];
        if (element2.classList.contains("e-control")) {
          validElements.push(element2);
        } else if (element2.querySelector(".e-control")) {
          validElements.push(element2.querySelector(".e-control"));
        } else {
          validElements.push(element2);
        }
      }
      return validElements;
    };
    KanbanDialog2.prototype.getColumnName = function(element2) {
      var attrName = element2.getAttribute("data-name") || "";
      if (attrName === "") {
        var isDropDowns = false;
        var fieldSelector = "";
        if (element2.classList.contains("e-dropdownlist") || element2.classList.contains("e-multiselect")) {
          fieldSelector = element2.classList.contains("e-dropdownlist") ? "e-ddl" : "e-multiselect";
          isDropDowns = true;
        } else if (element2.classList.contains("e-numerictextbox")) {
          fieldSelector = "e-numeric";
        }
        var classSelector = isDropDowns ? "." + fieldSelector + ":not(.e-control)" : "." + fieldSelector;
        var control = closest2(element2, classSelector) || element2.querySelector("." + fieldSelector);
        if (control) {
          var attrEle = control.querySelector("[name]");
          if (attrEle) {
            attrName = attrEle.name;
          }
        }
      }
      return attrName;
    };
    KanbanDialog2.prototype.getValueFromElement = function(element2) {
      var value;
      if (element2.classList.contains("e-dropdownlist")) {
        value = element2.ej2_instances[0].value;
      } else if (element2.classList.contains("e-multiselect")) {
        value = element2.ej2_instances[0].value;
      } else if (element2.classList.contains("e-checkbox")) {
        value = element2.ej2_instances[0].checked;
      } else {
        if (element2.type === "checkbox") {
          value = element2.checked;
        } else {
          value = element2.value;
        }
      }
      return value;
    };
    KanbanDialog2.prototype.destroyComponents = function() {
      var formelement = this.getFormElements();
      for (var _i = 0, formelement_1 = formelement; _i < formelement_1.length; _i++) {
        var element2 = formelement_1[_i];
        var instance = element2.ej2_instances;
        if (instance && instance.length > 0) {
          instance.forEach(function(node) {
            return node.destroy();
          });
        }
        if (this.parent.isReact && this.formObj) {
          this.formObj.element.remove();
        }
      }
    };
    KanbanDialog2.prototype.destroy = function() {
      this.destroyToolTip();
      this.destroyComponents();
      if (this.dialogObj) {
        this.dialogObj.destroy();
        this.storeElement.focus();
        this.dialogObj = null;
        remove(this.element);
        this.element = null;
      }
    };
    return KanbanDialog2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/keyboard.js
var Keyboard = (
  /** @class */
  function() {
    function Keyboard2(parent) {
      this.keyConfigs = {
        firstCardSelection: "36",
        lastCardSelection: "35",
        upArrow: "38",
        downArrow: "40",
        rightArrow: "39",
        leftArrow: "37",
        multiSelectionEnter: "ctrl+13",
        multiSelectionSpace: "ctrl+32",
        multiSelectionByUpArrow: "shift+38",
        multiSelectionByDownArrow: "shift+40",
        shiftTab: "shift+tab",
        enter: "13",
        tab: "tab",
        delete: "46",
        escape: "27",
        space: "32"
      };
      this.parent = parent;
      this.parent.element.tabIndex = this.parent.element.tabIndex === -1 ? 0 : this.parent.element.tabIndex;
      this.keyboardModule = new KeyboardEvents2(this.parent.element, {
        keyAction: this.keyActionHandler.bind(this),
        keyConfigs: this.keyConfigs,
        eventName: "keydown"
      });
      this.multiSelection = false;
    }
    Keyboard2.prototype.keyActionHandler = function(e) {
      var _this = this;
      var selectedCard = this.parent.element.querySelectorAll("." + CARD_CLASS + "." + CARD_SELECTION_CLASS).item(0);
      if (!selectedCard && !closest2(document.activeElement, "." + ROOT_CLASS)) {
        return;
      }
      var contentCell;
      var selectedCards;
      var selectedCardsData = [];
      switch (e.action) {
        case "upArrow":
        case "downArrow":
        case "multiSelectionByUpArrow":
        case "multiSelectionByDownArrow":
          e.preventDefault();
          this.processUpDownArrow(e.action, selectedCard);
          break;
        case "rightArrow":
        case "leftArrow":
          this.processLeftRightArrow(e);
          break;
        case "firstCardSelection":
        case "lastCardSelection":
          this.processCardSelection(e.action, selectedCard);
          break;
        case "multiSelectionEnter":
        case "multiSelectionSpace":
          if (document.activeElement) {
            this.parent.actionModule.cardSelection(document.activeElement, true, false);
          }
          break;
        case "space":
        case "enter":
          this.processEnter(e, selectedCard);
          break;
        case "escape":
          if (document.activeElement.classList.contains(CARD_CLASS) || document.activeElement.classList.contains(SHOW_ADD_BUTTON)) {
            if (document.activeElement.classList.contains(CARD_SELECTION_CLASS)) {
              removeClass2([document.activeElement], CARD_SELECTION_CLASS);
              document.activeElement.focus();
            } else {
              var ele = closest2(document.activeElement, "." + CONTENT_CELLS_CLASS);
              var cards = [].slice.call(ele.querySelectorAll("." + CARD_CLASS));
              removeClass2(cards, CARD_SELECTION_CLASS);
              ele.focus();
              this.cardTabIndexRemove();
              this.addRemoveTabIndex("Add");
            }
          }
          break;
        case "tab":
        case "shiftTab":
          contentCell = closest2(document.activeElement, "." + CONTENT_CELLS_CLASS);
          if (document.activeElement.classList.contains(CARD_CLASS)) {
            if (!document.activeElement.nextElementSibling && e.action === "tab") {
              e.preventDefault();
            }
            if (!document.activeElement.previousElementSibling && contentCell.querySelector("." + SHOW_ADD_BUTTON) && e.action === "tab") {
              addClass2([contentCell.querySelector("." + SHOW_ADD_BUTTON)], SHOW_ADD_FOCUS);
            }
          }
          if (document.activeElement.classList.contains(SHOW_ADD_BUTTON)) {
            if (!contentCell.querySelector("." + CARD_CLASS) && e.action === "tab" || e.action === "shiftTab") {
              e.preventDefault();
            }
          }
          if (document.activeElement.classList.contains(ROOT_CLASS)) {
            this.cardTabIndexRemove();
            this.parent.keyboardModule.addRemoveTabIndex("Add");
          }
          break;
        case "delete":
          selectedCards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_CLASS + "." + CARD_SELECTION_CLASS));
          selectedCards.forEach(function(selected) {
            selectedCardsData.push(_this.parent.getCardDetails(selected));
          });
          this.parent.crudModule.deleteCard(selectedCardsData);
          break;
      }
    };
    Keyboard2.prototype.processCardSelection = function(action, selectedCard) {
      if (selectedCard) {
        removeClass2([selectedCard], CARD_SELECTION_CLASS);
        if (this.parent.enableVirtualization) {
          this.parent.virtualLayoutModule.disableAttributeSelection(selectedCard);
        } else {
          this.parent.layoutModule.disableAttributeSelection(selectedCard);
        }
        var selection = this.parent.actionModule.selectionArray;
        selection.splice(selection.indexOf(selectedCard.getAttribute("data-id")), 1);
      }
      this.cardTabIndexRemove();
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_CLASS));
      var element2 = action === "firstCardSelection" ? cards[0] : cards[cards.length - 1];
      this.parent.actionModule.cardSelection(element2, false, false);
      this.addRemoveTabIndex("Remove");
      element2.focus();
      var card = [].slice.call(closest2(element2, "." + CONTENT_CELLS_CLASS).querySelectorAll("." + CARD_CLASS));
      card.forEach(function(element3) {
        element3.setAttribute("tabindex", "0");
      });
    };
    Keyboard2.prototype.processLeftRightArrow = function(e) {
      if (document.activeElement.classList.contains(CONTENT_CELLS_CLASS)) {
        if (e.action === "rightArrow" && document.activeElement.nextElementSibling) {
          document.activeElement.nextElementSibling.focus();
        } else if (e.action === "leftArrow" && document.activeElement.previousElementSibling) {
          document.activeElement.previousElementSibling.focus();
        }
      }
    };
    Keyboard2.prototype.processUpDownArrow = function(action, selectedCard) {
      if (action === "upArrow" && document.activeElement) {
        if (document.activeElement.classList.contains(CARD_CLASS) && document.activeElement.previousElementSibling) {
          document.activeElement.previousElementSibling.focus();
        } else if (document.activeElement.classList.contains(SHOW_ADD_BUTTON)) {
          document.activeElement.setAttribute("tabindex", "-1");
          removeClass2([document.activeElement], SHOW_ADD_FOCUS);
          var cell = closest2(document.activeElement, "." + CONTENT_CELLS_CLASS);
          if (cell.querySelectorAll("." + CARD_CLASS).length > 0) {
            [].slice.call(cell.querySelectorAll("." + CARD_CLASS)).slice(-1)[0].focus();
          }
        }
        this.removeSelection();
      } else if (action === "downArrow" && document.activeElement && document.activeElement.classList.contains(CARD_CLASS)) {
        if (document.activeElement.nextElementSibling) {
          document.activeElement.nextElementSibling.focus();
        } else if (closest2(document.activeElement, "." + CARD_WRAPPER_CLASS).nextElementSibling) {
          var ele = closest2(document.activeElement, "." + CARD_WRAPPER_CLASS).nextElementSibling;
          ele.setAttribute("tabindex", "0");
          addClass2([ele], SHOW_ADD_FOCUS);
          ele.focus();
        }
        this.removeSelection();
      }
      if ((action === "multiSelectionByUpArrow" || action === "multiSelectionByDownArrow") && selectedCard && this.parent.cardSettings.selectionType === "Multiple") {
        var card = void 0;
        if (action === "multiSelectionByUpArrow") {
          card = document.activeElement.previousElementSibling;
        } else {
          card = document.activeElement.nextElementSibling;
        }
        if (card) {
          this.parent.actionModule.cardSelection(card, false, true);
          card.focus();
          this.multiSelection = true;
        }
      }
    };
    Keyboard2.prototype.removeSelection = function() {
      if (this.multiSelection) {
        var cards = this.parent.getSelectedCards();
        if (cards.length > 0) {
          removeClass2(cards, CARD_SELECTION_CLASS);
          if (this.parent.enableVirtualization) {
            this.parent.virtualLayoutModule.disableAttributeSelection(cards);
          } else {
            this.parent.layoutModule.disableAttributeSelection(cards);
          }
        }
        this.multiSelection = false;
      }
    };
    Keyboard2.prototype.cardTabIndexRemove = function() {
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_CLASS));
      cards.forEach(function(card) {
        card.setAttribute("tabindex", "-1");
      });
      var addButton = [].slice.call(this.parent.element.querySelectorAll("." + SHOW_ADD_BUTTON));
      addButton.forEach(function(add) {
        add.setAttribute("tabindex", "-1");
        removeClass2([add], SHOW_ADD_FOCUS);
      });
    };
    Keyboard2.prototype.processEnter = function(e, selectedCard) {
      if (e.action === "space") {
        e.preventDefault();
      }
      var element2 = e.target;
      if (element2.classList.contains(HEADER_ICON_CLASS)) {
        this.parent.actionModule.columnExpandCollapse(e);
      }
      if (element2.classList.contains(SWIMLANE_ROW_EXPAND_CLASS) || element2.classList.contains(SWIMLANE_ROW_COLLAPSE_CLASS)) {
        this.parent.actionModule.rowExpandCollapse(e);
      }
      if (document.activeElement.classList.contains(CARD_CLASS)) {
        this.parent.actionModule.cardSelection(document.activeElement, false, false);
      }
      if (document.activeElement.classList.contains(SHOW_ADD_BUTTON)) {
        if (!this.parent.dialogModule.dialogObj) {
          this.parent.actionModule.addButtonClick(document.activeElement);
        }
        document.activeElement.focus();
      }
      if (element2.classList.contains(CONTENT_CELLS_CLASS)) {
        var cards = [].slice.call(element2.querySelectorAll("." + CARD_CLASS));
        this.addRemoveTabIndex("Remove");
        if (cards.length > 0) {
          element2.querySelector("." + CARD_CLASS).focus();
          cards.forEach(function(element3) {
            element3.setAttribute("tabindex", "0");
          });
        }
        if (element2.querySelector("." + SHOW_ADD_BUTTON)) {
          element2.querySelector("." + SHOW_ADD_BUTTON).setAttribute("tabindex", "0");
          element2.querySelector("." + SHOW_ADD_BUTTON).focus();
        }
      }
      if (selectedCard === document.activeElement && this.parent.element.querySelectorAll("." + CARD_SELECTION_CLASS).length === 1) {
        this.parent.activeCardData = {
          data: this.parent.getCardDetails(selectedCard),
          element: selectedCard
        };
        if (!this.parent.dialogModule.dialogObj) {
          this.parent.dialogModule.openDialog("Edit", this.parent.getCardDetails(selectedCard));
        }
        selectedCard.focus();
      }
    };
    Keyboard2.prototype.addRemoveTabIndex = function(action) {
      var attribute = action === "Add" ? "0" : "-1";
      var headerIcon = [].slice.call(this.parent.element.querySelectorAll("." + HEADER_ICON_CLASS));
      if (headerIcon.length > 0) {
        headerIcon.forEach(function(element2) {
          element2.setAttribute("tabindex", attribute);
        });
      }
      var swimlaneIcon = [].slice.call(this.parent.element.querySelectorAll("." + SWIMLANE_ROW_EXPAND_CLASS));
      if (swimlaneIcon.length > 0) {
        swimlaneIcon.forEach(function(element2) {
          element2.setAttribute("tabindex", attribute);
        });
      }
      var className = "." + CONTENT_ROW_CLASS + ":not(." + SWIMLANE_ROW_CLASS + ") ." + CONTENT_CELLS_CLASS;
      var contentCell = [].slice.call(this.parent.element.querySelectorAll(className));
      contentCell.forEach(function(element2) {
        element2.setAttribute("tabindex", attribute);
      });
    };
    Keyboard2.prototype.destroy = function() {
      this.keyboardModule.destroy();
    };
    return Keyboard2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/tooltip.js
var KanbanTooltip = (
  /** @class */
  function() {
    function KanbanTooltip2(parent) {
      this.parent = parent;
      this.renderTooltip();
    }
    KanbanTooltip2.prototype.renderTooltip = function() {
      this.tooltipObj = new Tooltip({
        cssClass: this.parent.cssClass + " " + TOOLTIP_CLASS,
        enableRtl: this.parent.enableRtl,
        mouseTrail: !this.parent.isAdaptive,
        offsetY: 5,
        position: "BottomCenter",
        showTipPointer: true,
        target: "." + TOOLTIP_TEXT_CLASS,
        beforeRender: this.onBeforeRender.bind(this),
        beforeClose: this.onBeforeClose.bind(this)
      });
      this.tooltipObj.appendTo(this.parent.element);
      this.tooltipObj.isStringTemplate = true;
    };
    KanbanTooltip2.prototype.onBeforeRender = function(args) {
      if (this.parent.dragAndDropModule.isDragging) {
        args.cancel = true;
        return;
      }
      var tooltipContent;
      if (this.parent.tooltipTemplate) {
        tooltipContent = createElement2("div");
        var target = closest2(args.target, "." + CARD_CLASS);
        var data = this.parent.getCardDetails(target);
        var templateId = this.parent.element.id + "_tooltipTemplate";
        var tooltipTemplate = this.parent.templateParser(this.parent.tooltipTemplate)(data, this.parent, "tooltipTemplate", templateId, false);
        append(tooltipTemplate, tooltipContent);
        this.parent.renderTemplates();
      } else {
        tooltipContent = initializeCSPTemplate(function() {
          return '<div class="e-card-header-caption">' + args.target.innerText + "</div>";
        });
      }
      this.tooltipObj.setProperties({
        content: tooltipContent
      }, true);
    };
    KanbanTooltip2.prototype.onBeforeClose = function() {
      this.parent.resetTemplates(["tooltipTemplate"]);
    };
    KanbanTooltip2.prototype.destroy = function() {
      this.tooltipObj.destroy();
      addClass2([this.parent.element], "e-control");
      this.tooltipObj = null;
    };
    return KanbanTooltip2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/actions/touch.js
var KanbanTouch = (
  /** @class */
  function() {
    function KanbanTouch2(parent) {
      this.parent = parent;
      this.tabHold = false;
    }
    KanbanTouch2.prototype.wireTouchEvents = function() {
      this.element = this.parent.element.querySelector("." + CONTENT_CLASS);
      this.touchObj = new Touch2(this.element, {
        tapHold: this.tapHoldHandler.bind(this)
      });
    };
    KanbanTouch2.prototype.tapHoldHandler = function(e) {
      this.tabHold = true;
      var target = closest2(e.originalEvent.target, "." + CARD_CLASS);
      if (target && this.parent.cardSettings.selectionType === "Multiple") {
        this.parent.actionModule.cardSelection(target, true, false);
        if (!this.mobilePopup) {
          this.renderMobilePopup();
          this.mobilePopup.show();
        }
        this.updatePopupContent();
      }
    };
    KanbanTouch2.prototype.renderMobilePopup = function() {
      if (this.parent.cardSettings.selectionType === "Multiple") {
        var mobilePopupWrapper = createElement2("div", {
          className: POPUP_WRAPPER_CLASS + " e-popup-close",
          innerHTML: '<div class="' + POPUP_HEADER_CLASS + '"><button class="' + CLOSE_CLASS + '"></button></div>' + ('<div class="' + POPUP_CONTENT_CLASS + '"></div>')
        });
        document.body.appendChild(mobilePopupWrapper);
        addClass2([mobilePopupWrapper], DEVICE_CLASS);
        this.mobilePopup = new Popup(mobilePopupWrapper, {
          targetType: "container",
          enableRtl: this.parent.enableRtl,
          hideAnimation: {
            name: "ZoomOut"
          },
          showAnimation: {
            name: "ZoomIn"
          },
          collision: {
            X: "fit",
            Y: "fit"
          },
          position: {
            X: "left",
            Y: "top"
          },
          viewPortElement: document.body,
          zIndex: 1004,
          close: this.popupClose.bind(this)
        });
        var closeIcon = this.mobilePopup.element.querySelector("." + CLOSE_CLASS);
        var buttonObj = new Button({
          cssClass: "e-flat e-round e-small",
          enableRtl: this.parent.enableRtl,
          iconCss: ICON_CLASS + " " + CLOSE_ICON_CLASS
        });
        buttonObj.appendTo(closeIcon);
        buttonObj.isStringTemplate = true;
        EventHandler2.add(closeIcon, "click", this.closeClick, this);
      }
    };
    KanbanTouch2.prototype.getPopupContent = function() {
      var popupContent;
      var selectedCards = this.parent.getSelectedCards();
      if (selectedCards.length > 1) {
        popupContent = "(" + selectedCards.length + ") " + this.parent.localeObj.getConstant("cardsSelected");
      } else if (selectedCards.length === 1) {
        popupContent = " " + this.parent.getCardDetails(selectedCards[0])[this.parent.cardSettings.headerField];
      }
      return popupContent;
    };
    KanbanTouch2.prototype.updatePopupContent = function() {
      if (!this.mobilePopup) {
        return;
      }
      var popupContent = this.getPopupContent();
      if (popupContent) {
        this.mobilePopup.element.querySelector("." + POPUP_CONTENT_CLASS).textContent = popupContent;
      } else {
        this.mobilePopup.hide();
      }
    };
    KanbanTouch2.prototype.closeClick = function() {
      this.parent.touchModule.mobilePopup.hide();
    };
    KanbanTouch2.prototype.popupClose = function() {
      this.popupDestroy();
    };
    KanbanTouch2.prototype.popupDestroy = function() {
      if (this.mobilePopup && this.mobilePopup.element) {
        var instance = this.mobilePopup.element.querySelector(".e-control.e-btn").ej2_instances[0];
        if (instance) {
          instance.destroy();
        }
        this.mobilePopup.destroy();
        remove(this.mobilePopup.element);
        this.mobilePopup = null;
      }
    };
    KanbanTouch2.prototype.unWireTouchEvents = function() {
      if (this.touchObj) {
        this.touchObj.destroy();
      }
      this.touchObj = null;
      this.element = null;
    };
    KanbanTouch2.prototype.destroy = function() {
      this.popupDestroy();
      this.unWireTouchEvents();
      this.tabHold = false;
    };
    return KanbanTouch2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/mobile-layout.js
var MobileLayout = (
  /** @class */
  function() {
    function MobileLayout2(parent) {
      this.parent = parent;
    }
    MobileLayout2.prototype.renderSwimlaneHeader = function() {
      var toolbarWrapper = createElement2("div", {
        className: SWIMLANE_HEADER_CLASS,
        innerHTML: '<div class="' + SWIMLANE_HEADER_TOOLBAR_CLASS + '"><div class="' + TOOLBAR_MENU_CLASS + '"><div class="e-icons ' + TOOLBAR_MENU_ICON_CLASS + '"></div></div><div class="' + TOOLBAR_LEVEL_TITLE_CLASS + '"><div class="' + TOOLBAR_SWIMLANE_NAME_CLASS + '"></div></div></div>'
      });
      this.parent.element.appendChild(toolbarWrapper);
      EventHandler2.add(toolbarWrapper.querySelector("." + TOOLBAR_MENU_ICON_CLASS), "click", this.menuClick, this);
    };
    MobileLayout2.prototype.renderSwimlaneTree = function() {
      var height = this.parent.element.querySelector("." + SWIMLANE_HEADER_CLASS).offsetHeight;
      var treeHeight = window.innerHeight - height;
      this.popupOverlay = createElement2("div", {
        className: SWIMLANE_OVERLAY_CLASS,
        styles: "height: " + treeHeight + "px;"
      });
      var wrapper = createElement2("div", {
        className: SWIMLANE_CONTENT_CLASS,
        styles: "top:" + height + "px;"
      });
      var treeWrapper = createElement2("div", {
        className: SWIMLANE_RESOURCE_CLASS + " e-popup-close",
        styles: "height: " + treeHeight + "px;"
      });
      wrapper.appendChild(treeWrapper);
      wrapper.appendChild(this.popupOverlay);
      this.parent.element.appendChild(wrapper);
      var swimlaneTree = createElement2("div", {
        className: SWIMLANE_TREE_CLASS
      });
      treeWrapper.appendChild(swimlaneTree);
      var dataSource = this.parent.enableVirtualization ? this.parent.virtualLayoutModule.kanbanRows : this.parent.layoutModule.kanbanRows;
      this.treeViewObj = new TreeView({
        cssClass: this.parent.cssClass,
        enableRtl: this.parent.enableRtl,
        fields: {
          dataSource,
          id: "keyField",
          text: "textField"
        },
        nodeTemplate: this.parent.swimlaneSettings.template,
        nodeClicked: this.treeSwimlaneClick.bind(this),
        drawNode: this.drawNode.bind(this)
      });
      this.treeViewObj.appendTo(swimlaneTree);
      var popupObj = {
        targetType: "relative",
        actionOnScroll: "none",
        enableRtl: this.parent.enableRtl,
        zIndex: 10,
        hideAnimation: {
          name: "SlideLeftOut",
          duration: 500
        },
        showAnimation: {
          name: "SlideLeftIn",
          duration: 500
        },
        viewPortElement: this.parent.element.querySelector("." + CONTENT_CLASS)
      };
      popupObj.content = this.treeViewObj.element;
      this.treePopup = new Popup(treeWrapper, popupObj);
    };
    MobileLayout2.prototype.menuClick = function() {
      if (this.parent.element.querySelector("." + SWIMLANE_RESOURCE_CLASS).classList.contains("e-popup-open")) {
        this.treePopup.hide();
        removeClass2([this.popupOverlay], "e-enable");
      } else {
        var treeNodes = [].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item"));
        removeClass2(treeNodes, "e-active");
        addClass2([treeNodes[this.parent.layoutModule.swimlaneIndex]], "e-active");
        this.treePopup.show();
        addClass2([this.popupOverlay], "e-enable");
      }
    };
    MobileLayout2.prototype.treeSwimlaneClick = function(args) {
      this.treePopup.hide();
      var treeNodes = [].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item"));
      this.parent.layoutModule.swimlaneIndex = treeNodes.indexOf(args.node);
      this.parent.layoutModule.scrollLeft = 0;
      this.parent.notify(dataReady, {
        processedData: this.parent.kanbanData
      });
      args.event.preventDefault();
    };
    MobileLayout2.prototype.hidePopup = function() {
      this.treePopup.hide();
      removeClass2([this.popupOverlay], "e-enable");
    };
    MobileLayout2.prototype.getWidth = function() {
      return window.innerWidth * 80 / 100;
    };
    MobileLayout2.prototype.drawNode = function(args) {
      if (this.parent.swimlaneSettings.template && this.parent.isReact) {
        var templateId = this.parent.element.id + "_treeviewTemplate";
        var treeViewTemplate = this.parent.templateParser(this.parent.swimlaneSettings.template)(args.nodeData, this.parent, "nodeTemplate", templateId, false);
        append(treeViewTemplate, args.node.querySelector(".e-list-text"));
      }
    };
    return MobileLayout2;
  }()
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/layout-render.js
var __extends91 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var LayoutRender = (
  /** @class */
  function(_super) {
    __extends91(LayoutRender2, _super);
    function LayoutRender2(parent) {
      var _this = _super.call(this, parent) || this;
      _this.kanbanRows = [];
      _this.parent = parent;
      _this.columnKeys = [];
      _this.swimlaneIndex = 0;
      _this.swimlaneData = {};
      _this.scrollLeft = 0;
      _this.frozenOrder = 0;
      _this.parent.on(dataReady, _this.initRender, _this);
      _this.parent.on(contentReady, _this.scrollUiUpdate, _this);
      return _this;
    }
    LayoutRender2.prototype.initRender = function() {
      if (this.parent.columns.length === 0) {
        return;
      }
      this.columnData = this.getColumnCards();
      this.kanbanRows = this.getRows();
      this.swimlaneData = this.getSwimlaneCards();
      if (this.parent.isAdaptive) {
        var parent_1 = this.parent.element.querySelector("." + CONTENT_CLASS);
        if (parent_1) {
          this.scrollLeft = parent_1.scrollLeft;
        }
      }
      this.destroy();
      this.parent.on(dataReady, this.initRender, this);
      this.parent.on(contentReady, this.scrollUiUpdate, this);
      if (this.parent.isAdaptive && this.parent.swimlaneSettings.keyField && this.parent.kanbanData.length !== 0) {
        this.renderSwimlaneHeader();
      }
      var header = createElement2("div", {
        className: HEADER_CLASS
      });
      this.parent.element.appendChild(header);
      this.renderHeader(header);
      this.renderContent();
      this.renderCards();
      this.renderValidation();
      this.parent.renderTemplates();
      this.parent.notify(contentReady, {});
      this.wireEvents();
      if (this.parent.isInitialRender) {
        this.parent.isInitialRender = false;
      }
    };
    LayoutRender2.prototype.renderHeader = function(header) {
      var headerWrap = createElement2("div", {
        className: this.parent.swimlaneSettings.keyField ? SWIMLANE_CLASS : ""
      });
      header.appendChild(headerWrap);
      var headerTable = createElement2("table", {
        className: TABLE_CLASS + " " + HEADER_TABLE_CLASS
      });
      headerWrap.appendChild(headerTable);
      this.renderColGroup(headerTable);
      var tableHead = createElement2("thead");
      var tableBody = createElement2("tbody", {
        className: "e-hide",
        innerHTML: "<tr><td></td></tr>",
        attrs: {
          "role": "rowgroup"
        }
      });
      headerTable.appendChild(tableBody);
      headerTable.appendChild(tableHead);
      if (this.parent.stackedHeaders.length > 0) {
        tableHead.appendChild(this.createStackedRow(this.parent.stackedHeaders));
      }
      var tr = createElement2("tr", {
        className: HEADER_ROW_CLASS
      });
      tableHead.appendChild(tr);
      var _loop_1 = function(column2) {
        if (this_1.isColumnVisible(column2)) {
          var index = this_1.parent.actionModule.columnToggleArray.indexOf(column2.keyField.toString());
          var th_1 = createElement2("th", {
            className: index === -1 ? HEADER_CELLS_CLASS : HEADER_CELLS_CLASS + " " + COLLAPSED_CLASS,
            attrs: {
              "data-role": "kanban-column",
              "data-key": column2.keyField.toString(),
              "scope": "col"
            }
          });
          var classList2 = [];
          if (column2.allowToggle) {
            classList2.push(HEADER_ROW_TOGGLE_CLASS);
            if (!column2.isExpanded) {
              classList2.push(COLLAPSED_CLASS);
            }
          }
          addClass2([th_1], classList2);
          var headerWrapper = createElement2("div", {
            className: HEADER_WRAP_CLASS
          });
          th_1.appendChild(headerWrapper);
          this_1.columnData = this_1.getColumnCards(this_1.parent.kanbanData);
          var noOfCard = this_1.columnData[column2.keyField].length;
          var headerTitle = createElement2("div", {
            className: HEADER_TITLE_CLASS
          });
          headerWrapper.appendChild(headerTitle);
          if (column2.template) {
            var templateArgs = {
              keyField: column2.keyField,
              headerText: column2.headerText,
              minCount: column2.minCount,
              maxCount: column2.maxCount,
              allowToggle: column2.allowToggle,
              isExpanded: column2.isExpanded,
              showItemCount: column2.showItemCount,
              count: noOfCard
            };
            addClass2([th_1], TEMPLATE_CLASS);
            var templateId = this_1.parent.element.id + "_columnTemplate";
            var templateHeader = this_1.parent.templateParser(column2.template)(templateArgs, this_1.parent, "columnTemplate", templateId, false);
            append(templateHeader, headerTitle);
          } else {
            var header_1 = createElement2("div", {
              className: HEADER_TEXT_CLASS,
              innerHTML: column2.headerText
            });
            headerTitle.appendChild(header_1);
            if (column2.showItemCount) {
              var itemCount = createElement2("div", {
                className: CARD_ITEM_COUNT_CLASS,
                innerHTML: "- " + noOfCard.toString() + " " + this_1.parent.localeObj.getConstant("items")
              });
              headerTitle.appendChild(itemCount);
            }
          }
          if (column2.allowToggle) {
            var isExpand = column2.isExpanded && index === -1 ? true : false;
            var name_1 = isExpand ? COLUMN_EXPAND_CLASS : COLUMN_COLLAPSE_CLASS;
            var icon = createElement2("div", {
              className: HEADER_ICON_CLASS + " " + ICON_CLASS + " " + name_1,
              attrs: {
                "tabindex": "0",
                "role": "button"
              }
            });
            icon.setAttribute("aria-label", isExpand ? column2.keyField + " Expand" : column2.keyField + " Collapse");
            th_1.setAttribute("aria-expanded", isExpand.toString());
            headerWrapper.appendChild(icon);
          }
          var dataObj = [{
            keyField: column2.keyField,
            textField: column2.headerText,
            count: noOfCard
          }];
          var args = {
            data: dataObj,
            element: tr,
            cancel: false,
            requestType: "headerRow"
          };
          this_1.parent.trigger(queryCellInfo, args, function(columnArgs) {
            if (!columnArgs.cancel) {
              tr.appendChild(th_1);
            }
          });
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
        var column = _a[_i];
        _loop_1(column);
      }
    };
    LayoutRender2.prototype.renderContent = function() {
      var content = createElement2("div", {
        className: CONTENT_CLASS
      });
      this.parent.element.appendChild(content);
      var contentWrap = createElement2("div", {
        className: this.parent.swimlaneSettings.keyField ? SWIMLANE_CLASS : ""
      });
      content.appendChild(contentWrap);
      var contentTable = createElement2("table", {
        className: TABLE_CLASS + " " + CONTENT_TABLE_CLASS,
        attrs: {
          "role": "presentation"
        }
      });
      contentWrap.appendChild(contentTable);
      this.renderColGroup(contentTable);
      var tHead = createElement2("thead", {
        className: "e-hide",
        attrs: {
          "role": "none"
        }
      });
      for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
        var column = _a[_i];
        var thElem = createElement2("th", {
          id: column.keyField,
          innerHTML: column.keyField,
          attrs: {
            "scope": "col"
          }
        });
        thElem.style.display = "none";
        tHead.appendChild(thElem);
      }
      contentTable.appendChild(tHead);
      var tBody = createElement2("tbody", {
        attrs: {
          "role": "treegrid",
          "aria-label": "Kanban Content"
        }
      });
      contentTable.appendChild(tBody);
      var isCollaspsed = false;
      this.swimlaneRow = this.kanbanRows;
      this.initializeSwimlaneTree();
      for (var _b = 0, _c = this.swimlaneRow; _b < _c.length; _b++) {
        var row = _c[_b];
        if (this.parent.swimlaneSettings.keyField && this.parent.swimlaneToggleArray.length !== 0) {
          var index = this.parent.swimlaneToggleArray.indexOf(row.keyField);
          isCollaspsed = index !== -1;
        }
        if (this.parent.swimlaneSettings.keyField && !this.parent.isAdaptive) {
          this.renderSwimlaneRow(tBody, row, isCollaspsed);
        }
        this.renderSingleContent(tBody, row, isCollaspsed);
      }
    };
    LayoutRender2.prototype.renderSingleContent = function(tBody, row, isCollaspsed) {
      var className = isCollaspsed ? CONTENT_ROW_CLASS + " " + COLLAPSED_CLASS : CONTENT_ROW_CLASS;
      var tr = createElement2("tr", {
        className,
        attrs: {
          "role": "row",
          "aria-label": row.keyField + "row content"
        }
      });
      for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
        var column = _a[_i];
        if (this.isColumnVisible(column)) {
          var index = this.parent.actionModule.columnToggleArray.indexOf(column.keyField.toString());
          var className_1 = index === -1 ? CONTENT_CELLS_CLASS : CONTENT_CELLS_CLASS + " " + COLLAPSED_CLASS;
          var dragClass = (column.allowDrag ? " " + DRAG_CLASS : "") + (column.allowDrop ? " " + DROP_CLASS + " " + DROPPABLE_CLASS : "");
          var td = createElement2("td", {
            className: className_1 + dragClass,
            attrs: {
              "data-role": "kanban-column",
              "data-key": column.keyField.toString(),
              "tabindex": "0",
              "aria-describedby": column.keyField.toString(),
              "role": "gridcell"
            }
          });
          if (column.allowToggle && !column.isExpanded || index !== -1) {
            addClass2([td], COLLAPSED_CLASS);
            var text = (column.showItemCount ? "[" + this.getColumnData(column.keyField, this.swimlaneData[row.keyField]).length + "] " : "") + column.headerText;
            td.appendChild(createElement2("div", {
              className: COLLAPSE_HEADER_TEXT_CLASS,
              innerHTML: text
            }));
            td.setAttribute("aria-expanded", "false");
          }
          if (column.showAddButton) {
            var button = createElement2("div", {
              className: SHOW_ADD_BUTTON,
              attrs: {
                "tabindex": "-1"
              }
            });
            button.appendChild(createElement2("div", {
              className: SHOW_ADD_ICON + " " + ICON_CLASS
            }));
            td.appendChild(button);
          }
          tr.appendChild(td);
        }
      }
      var dataObj = [{
        keyField: row.keyField,
        textField: row.textField,
        count: row.count
      }];
      var args = {
        data: dataObj,
        element: tr,
        cancel: false,
        requestType: "contentRow"
      };
      this.parent.trigger(queryCellInfo, args, function(columnArgs) {
        if (!columnArgs.cancel) {
          if (tBody.classList.contains("e-swimlane-row")) {
            tBody.insertAdjacentElement("beforebegin", tr);
          } else {
            tBody.appendChild(tr);
          }
        }
      });
    };
    LayoutRender2.prototype.initializeSwimlaneTree = function() {
      if (this.parent.swimlaneSettings.keyField && this.parent.isAdaptive && this.parent.kanbanData.length !== 0) {
        var swimlaneHeaderName = this.parent.element.querySelector("." + TOOLBAR_SWIMLANE_NAME_CLASS);
        this.swimlaneRow = [this.kanbanRows[this.swimlaneIndex]];
        this.renderSwimlaneTree();
        if (this.parent.swimlaneSettings.template) {
          var cardCount = this.swimlaneData[this.swimlaneRow[0].keyField].length;
          var templateArgs = extend2({}, this.swimlaneRow[0], {
            count: cardCount
          }, true);
          var swimlaneTemplate = this.parent.templateParser(this.parent.swimlaneSettings.template)(templateArgs, this.parent, "swimlaneTemplate", "", false);
          swimlaneHeaderName.appendChild(swimlaneTemplate[0]);
        } else {
          swimlaneHeaderName.innerHTML = this.swimlaneRow[0].textField;
        }
      }
    };
    LayoutRender2.prototype.renderSwimlaneRow = function(tBody, row, isCollapsed) {
      var name = CONTENT_ROW_CLASS + " " + SWIMLANE_ROW_CLASS;
      var className = isCollapsed ? " " + COLLAPSED_CLASS : "";
      var tr = createElement2("tr", {
        className: name + className,
        attrs: {
          "aria-label": row.keyField + " row header",
          "role": "row",
          "data-key": row.keyField,
          "aria-expanded": (!isCollapsed).toString()
        }
      });
      var col = this.parent.columns.length - this.parent.actionModule.hideColumnKeys.length;
      var td = createElement2("td", {
        className: CONTENT_CELLS_CLASS,
        attrs: {
          "data-role": "kanban-column",
          "role": "gridcell",
          colspan: col.toString()
        }
      });
      var swimlaneHeader = createElement2("div", {
        className: SWIMLANE_HEADER_CLASS
      });
      td.appendChild(swimlaneHeader);
      var iconClass = isCollapsed ? SWIMLANE_ROW_COLLAPSE_CLASS : SWIMLANE_ROW_EXPAND_CLASS;
      var iconDiv = createElement2("div", {
        className: ICON_CLASS + " " + iconClass,
        attrs: {
          "tabindex": "0",
          "role": "button",
          "aria-label": isCollapsed ? row.keyField + " Collapse" : row.keyField + " Expand"
        }
      });
      swimlaneHeader.appendChild(iconDiv);
      var headerWrap = createElement2("div", {
        className: HEADER_WRAP_CLASS
      });
      swimlaneHeader.appendChild(headerWrap);
      var cardCount = this.swimlaneData[row.keyField].length;
      if (this.parent.swimlaneSettings.template) {
        var templateArgs = extend2({}, row, {
          count: cardCount
        }, true);
        addClass2([td], TEMPLATE_CLASS);
        var templateId = this.parent.element.id + "_swimlaneTemplate";
        var swimlaneTemplate = this.parent.templateParser(this.parent.swimlaneSettings.template)(templateArgs, this.parent, "swimlaneTemplate", templateId, false);
        append(swimlaneTemplate, headerWrap);
      } else {
        headerWrap.appendChild(createElement2("div", {
          className: SWIMLANE_ROW_TEXT_CLASS,
          innerHTML: row.textField,
          attrs: {
            "data-role": row.textField
          }
        }));
      }
      if (this.parent.swimlaneSettings.showItemCount) {
        swimlaneHeader.appendChild(createElement2("div", {
          className: CARD_ITEM_COUNT_CLASS,
          innerHTML: "- " + cardCount.toString() + " " + this.parent.localeObj.getConstant("items")
        }));
      }
      tr.appendChild(td);
      var dataObj = [{
        keyField: row.keyField,
        textField: row.textField,
        count: row.count
      }];
      var args = {
        data: dataObj,
        element: tr,
        cancel: false,
        requestType: "swimlaneRow"
      };
      this.parent.trigger(queryCellInfo, args, function(columnArgs) {
        if (!columnArgs.cancel) {
          if (tBody.classList.contains("e-swimlane-row")) {
            tBody.insertAdjacentElement("beforebegin", tr);
          } else {
            tBody.appendChild(tr);
          }
        }
      });
    };
    LayoutRender2.prototype.renderCards = function() {
      var _this = this;
      var rows = this.swimlaneRow;
      var cardRows = [].slice.call(this.parent.element.querySelectorAll(".e-content-row:not(.e-swimlane-row)"));
      var swimlaneRows = [].slice.call(this.parent.element.querySelectorAll(".e-content-row.e-swimlane-row"));
      var removeTrs = [];
      var columnTransition = false;
      cardRows.forEach(function(tr, index) {
        var dataCount = 0;
        var _loop_2 = function(column2) {
          if (_this.isColumnVisible(column2)) {
            var columnData = _this.parent.swimlaneSettings.keyField ? _this.getColumnData(column2.keyField, _this.parent.swimlaneSettings.showEmptyRow && isNullOrUndefined2(_this.swimlaneData[rows[index].keyField]) ? [] : _this.swimlaneData[rows[index].keyField]) : _this.columnData[column2.keyField];
            dataCount += columnData.length;
            var columnWrapper = tr.querySelector('[data-key="' + column2.keyField + '"]');
            var cardWrapper_1 = createElement2("div", {
              className: CARD_WRAPPER_CLASS,
              attrs: {
                "role": "listbox",
                "tabindex": "0",
                "aria-label": column2.keyField.toString()
              }
            });
            if (column2.transitionColumns.length > 0) {
              columnTransition = true;
            }
            if (!columnTransition && isNullOrUndefined2(_this.parent.swimlaneSettings.keyField)) {
              var borderElem = createElement2("div", {
                className: BORDER_CLASS
              });
              columnWrapper.appendChild(borderElem);
            }
            columnWrapper.appendChild(cardWrapper_1);
            if (columnData.length > 0) {
              var _loop_3 = function(data2) {
                var cardText = data2[_this.parent.cardSettings.headerField];
                var cardIndex = _this.parent.actionModule.selectionArray.indexOf(cardText);
                var cardElement = _this.renderCard(data2);
                if (cardIndex !== -1) {
                  cardElement.setAttribute("aria-selected", "true");
                  addClass2([cardElement], CARD_SELECTION_CLASS);
                }
                var args = {
                  data: data2,
                  element: cardElement,
                  cancel: false
                };
                _this.parent.trigger(cardRendered, args, function(cardArgs) {
                  if (!cardArgs.cancel) {
                    cardWrapper_1.appendChild(cardElement);
                  }
                });
              };
              for (var _i2 = 0, _a2 = columnData; _i2 < _a2.length; _i2++) {
                var data = _a2[_i2];
                _loop_3(data);
              }
            } else {
              cardWrapper_1.appendChild(_this.renderEmptyCard());
            }
          }
        };
        for (var _i = 0, _a = _this.parent.columns; _i < _a.length; _i++) {
          var column = _a[_i];
          _loop_2(column);
        }
        if (dataCount === 0) {
          removeTrs.push(tr);
          if (swimlaneRows.length > 0) {
            removeTrs.push(swimlaneRows[index]);
          }
        }
      });
      if (!this.parent.swimlaneSettings.showEmptyRow && this.parent.kanbanData.length === 0 && !this.parent.showEmptyColumn) {
        removeTrs.forEach(function(tr) {
          return remove(tr);
        });
      }
    };
    LayoutRender2.prototype.renderCard = function(data) {
      var cardElement = createElement2("div", {
        className: CARD_CLASS,
        attrs: {
          "data-id": data[this.parent.cardSettings.headerField],
          "data-key": data[this.parent.keyField],
          "aria-selected": "false",
          "tabindex": "-1",
          "role": "option",
          "aria-roledescription": "Card"
        }
      });
      if (this.parent.cardHeight !== "auto") {
        cardElement.style.height = formatUnit(this.parent.cardHeight);
      }
      if (this.parent.cardSettings.template) {
        addClass2([cardElement], TEMPLATE_CLASS);
        var templateId = this.parent.element.id + "_cardTemplate";
        var cardTemplate = this.parent.templateParser(this.parent.cardSettings.template)(data, this.parent, "cardTemplate", templateId, false);
        append(cardTemplate, cardElement);
      } else {
        var tooltipClass = this.parent.enableTooltip ? " " + TOOLTIP_TEXT_CLASS : "";
        if (this.parent.cardSettings.showHeader) {
          var cardHeader = createElement2("div", {
            className: CARD_HEADER_CLASS
          });
          var cardCaption = createElement2("div", {
            className: CARD_HEADER_TEXT_CLASS
          });
          var cardText = createElement2("div", {
            className: CARD_HEADER_TITLE_CLASS + tooltipClass,
            innerHTML: data[this.parent.cardSettings.headerField] || ""
          });
          cardHeader.appendChild(cardCaption);
          cardCaption.appendChild(cardText);
          cardElement.appendChild(cardHeader);
        }
        var cardContent = createElement2("div", {
          className: CARD_CONTENT_CLASS + tooltipClass,
          innerHTML: data[this.parent.cardSettings.contentField] || ""
        });
        cardElement.appendChild(cardContent);
        if (this.parent.cardSettings.tagsField && data[this.parent.cardSettings.tagsField]) {
          var cardTags = createElement2("div", {
            className: CARD_TAGS_CLASS
          });
          var tags = data[this.parent.cardSettings.tagsField].toString().split(",");
          for (var _i = 0, tags_1 = tags; _i < tags_1.length; _i++) {
            var tag = tags_1[_i];
            cardTags.appendChild(createElement2("div", {
              className: CARD_TAG_CLASS + " " + CARD_LABEL_CLASS,
              innerHTML: tag
            }));
          }
          cardElement.appendChild(cardTags);
        }
        if (this.parent.cardSettings.grabberField && data[this.parent.cardSettings.grabberField]) {
          addClass2([cardElement], CARD_COLOR_CLASS);
          cardElement.style.borderLeftColor = data[this.parent.cardSettings.grabberField];
        }
        if (this.parent.cardSettings.footerCssField) {
          var cardFields = createElement2("div", {
            className: CARD_FOOTER_CLASS
          });
          var keys4 = data[this.parent.cardSettings.footerCssField].split(",");
          for (var _a = 0, keys_1 = keys4; _a < keys_1.length; _a++) {
            var key = keys_1[_a];
            cardFields.appendChild(createElement2("div", {
              className: key.trim() + " " + CARD_FOOTER_CSS_CLASS
            }));
          }
          cardElement.appendChild(cardFields);
        }
      }
      return cardElement;
    };
    LayoutRender2.prototype.renderEmptyCard = function() {
      var emptyCard = createElement2("span", {
        className: EMPTY_CARD_CLASS,
        innerHTML: this.parent.localeObj.getConstant("noCard"),
        attrs: {
          "aria-label": this.parent.localeObj.getConstant("noCard"),
          "role": "option"
        }
      });
      return emptyCard;
    };
    LayoutRender2.prototype.renderColGroup = function(table) {
      var _this = this;
      var colGroup = createElement2("colgroup");
      this.parent.columns.forEach(function(column) {
        if (_this.isColumnVisible(column)) {
          var index = _this.parent.actionModule.columnToggleArray.indexOf(column.keyField.toString());
          var isToggle = column.allowToggle && !column.isExpanded;
          var className = index === -1 ? isToggle ? COLLAPSED_CLASS : "" : COLLAPSED_CLASS;
          var col = createElement2("col", {
            className,
            attrs: {
              "data-key": column.keyField.toString()
            },
            styles: _this.parent.isAdaptive ? "width: " + (isToggle ? formatUnit(toggleWidth) : formatUnit(_this.getWidth())) : ""
          });
          colGroup.appendChild(col);
        }
      });
      table.appendChild(colGroup);
    };
    LayoutRender2.prototype.getRows = function() {
      var _this = this;
      var kanbanRows = [];
      if (this.parent.swimlaneSettings.keyField) {
        this.parent.kanbanData.map(function(obj) {
          if (!_this.parent.swimlaneSettings.showEmptyRow) {
            if (isNullOrUndefined2(obj[_this.parent.keyField]) || obj[_this.parent.keyField] === "" || obj[_this.parent.keyField] && _this.columnKeys.indexOf(obj[_this.parent.keyField].toString()) === -1) {
              return;
            }
          }
          var textField = obj[_this.parent.swimlaneSettings.textField] || obj[_this.parent.swimlaneSettings.keyField];
          var keyField = obj[_this.parent.swimlaneSettings.keyField];
          if (!obj[_this.parent.swimlaneSettings.keyField]) {
            if (_this.parent.swimlaneSettings.showUnassignedRow) {
              textField = _this.parent.localeObj.getConstant("unassigned");
              keyField = "";
            } else {
              return;
            }
          }
          kanbanRows.push({
            keyField,
            textField
          });
        });
        kanbanRows = kanbanRows.filter(function(item, index, arr) {
          return index === arr.map(function(item2) {
            return item2.keyField;
          }).indexOf(item.keyField);
        });
        kanbanRows = this.swimlaneSorting(kanbanRows);
        kanbanRows.forEach(function(row) {
          row.count = _this.parent.kanbanData.filter(function(obj) {
            return _this.columnKeys.indexOf(obj[_this.parent.keyField]) > -1 && obj[_this.parent.swimlaneSettings.keyField] === row.keyField;
          }).length;
        });
        if (kanbanRows.length === 0) {
          kanbanRows.push({
            keyField: "",
            textField: ""
          });
        }
      } else {
        kanbanRows.push({
          keyField: "",
          textField: ""
        });
      }
      return kanbanRows;
    };
    LayoutRender2.prototype.swimlaneSorting = function(rows) {
      if (this.parent.swimlaneSettings.sortComparer) {
        rows = this.parent.swimlaneSettings.sortComparer.call(this.parent, rows);
      } else {
        rows.sort(function(a, b) {
          return a.textField.localeCompare(b.textField, void 0, {
            numeric: true
          });
        });
        if (this.parent.swimlaneSettings.sortDirection === "Descending") {
          rows.reverse();
        }
      }
      return rows;
    };
    LayoutRender2.prototype.createStackedRow = function(rows) {
      var tr = createElement2("tr", {
        className: HEADER_ROW_CLASS + " " + STACKED_HEADER_ROW_CLASS
      });
      var stackedHeaders = [];
      this.parent.columns.forEach(function(column) {
        var headerText = "";
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
          var row = rows_1[_i];
          if (row.keyFields.indexOf(column.keyField.toString()) !== -1) {
            headerText = row.text;
          }
        }
        stackedHeaders.push(headerText);
      });
      for (var h = 0; h < stackedHeaders.length; h++) {
        var colSpan = 1;
        for (var j = h + 1; j < stackedHeaders.length; j++) {
          if (stackedHeaders[h] !== "" && stackedHeaders[j] !== "" && stackedHeaders[h] === stackedHeaders[j]) {
            colSpan++;
          } else {
            break;
          }
        }
        var div = createElement2("div", {
          className: HEADER_TEXT_CLASS,
          innerHTML: stackedHeaders[h]
        });
        var th = createElement2("th", {
          className: HEADER_CELLS_CLASS + " " + STACKED_HEADER_CELL_CLASS,
          attrs: {
            "colspan": colSpan.toString(),
            "scope": "col"
          }
        });
        tr.appendChild(th).appendChild(div);
        h += colSpan - 1;
      }
      return tr;
    };
    LayoutRender2.prototype.scrollUiUpdate = function() {
      var _this = this;
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      var height = this.parent.element.offsetHeight - header.offsetHeight;
      if (this.parent.isAdaptive) {
        height = window.innerHeight - (header.offsetHeight + bottomSpace);
        var swimlaneToolbar = this.parent.element.querySelector("." + SWIMLANE_HEADER_CLASS);
        if (swimlaneToolbar) {
          height -= swimlaneToolbar.offsetHeight;
        }
        var cardWrappers = [].slice.call(this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS));
        cardWrappers.forEach(function(cell) {
          var cardWrapper = cell.querySelector("." + CARD_WRAPPER_CLASS);
          if (!cardWrapper.classList.contains(MULTI_CARD_WRAPPER_CLASS)) {
            cardWrapper.style.height = formatUnit(height);
            EventHandler2.add(cell, "touchmove", _this.onAdaptiveScroll, _this);
          }
        });
      }
      if (this.parent.height !== "auto" && this.parent.height !== "100%") {
        content.style.height = formatUnit(height);
      }
      [].slice.call(header.children).forEach(function(node) {
        var paddingValue = 0;
        if (content.offsetWidth - content.clientWidth > 0) {
          paddingValue = 17;
          if (content.offsetHeight - content.clientHeight > 0) {
            node.style.width = formatUnit(content.clientWidth);
          }
        }
        if (_this.parent.enableRtl) {
          node.style.paddingLeft = formatUnit(paddingValue);
        } else {
          node.style.paddingRight = formatUnit(paddingValue);
        }
      });
      this.updateScrollPosition();
    };
    LayoutRender2.prototype.onContentScroll = function(e) {
      var target = e.target;
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      [].slice.call(header.children).forEach(function(node) {
        node.scrollLeft = target.scrollLeft;
      });
      this.parent.scrollPosition.content = {
        left: target.scrollLeft,
        top: target.scrollTop
      };
      if (!isNullOrUndefined2(this.parent.swimlaneSettings.keyField) && this.parent.swimlaneSettings.enableFrozenRows) {
        this.frozenRows(e);
      }
    };
    LayoutRender2.prototype.addFrozenSwimlaneDataKey = function(currentElem) {
      var frozenKey = currentElem.getAttribute("data-key");
      if (!isNullOrUndefined2(frozenKey)) {
        this.frozenSwimlaneRow.setAttribute("data-key", frozenKey);
      }
    };
    LayoutRender2.prototype.frozenRows = function(e) {
      var firstSwimlane = this.parent.element.querySelector("." + SWIMLANE_ROW_CLASS);
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (isNullOrUndefined2(this.frozenSwimlaneRow)) {
        this.frozenSwimlaneRow = createElement2("div", {
          className: FROZEN_SWIMLANE_ROW_CLASS
        });
        var frozenRow = createElement2("div", {
          className: FROZEN_ROW_CLASS
        });
        this.frozenSwimlaneRow.appendChild(frozenRow);
        this.parent.element.insertBefore(this.frozenSwimlaneRow, this.parent.element.firstElementChild);
        frozenRow.appendChild(firstSwimlane.querySelector("." + SWIMLANE_HEADER_CLASS).cloneNode(true));
        this.addFrozenSwimlaneDataKey(firstSwimlane);
        setStyleAttribute2(this.frozenSwimlaneRow, {
          height: formatUnit(firstSwimlane.getBoundingClientRect().height),
          width: formatUnit(content.querySelector(".e-swimlane").getBoundingClientRect().width),
          top: formatUnit(header.getBoundingClientRect().height.toString())
        });
        setStyleAttribute2(header, {
          position: "relative",
          top: formatUnit(-this.frozenSwimlaneRow.getBoundingClientRect().height)
        });
        setStyleAttribute2(content, {
          position: "relative",
          top: formatUnit(-this.frozenSwimlaneRow.getBoundingClientRect().height)
        });
      } else {
        var swimlaneRows = [].slice.call(this.parent.element.querySelectorAll("." + SWIMLANE_ROW_CLASS));
        var curSwim = swimlaneRows[this.frozenOrder];
        var prevSwim = swimlaneRows[this.frozenOrder - 1];
        var nextSwim = swimlaneRows[this.frozenOrder + 1];
        var curSwimHeight = void 0;
        var prevSwimHeight = void 0;
        var nextSwimHeight = void 0;
        if (curSwim) {
          curSwimHeight = curSwim.getBoundingClientRect().top + curSwim.getBoundingClientRect().height;
        }
        if (prevSwim) {
          prevSwimHeight = prevSwim.getBoundingClientRect().top + prevSwim.getBoundingClientRect().height;
        }
        if (nextSwim) {
          nextSwimHeight = nextSwim.getBoundingClientRect().top + nextSwim.getBoundingClientRect().height;
        }
        var frozenSwimHeight = content.getBoundingClientRect().top + this.frozenSwimlaneRow.getBoundingClientRect().height;
        var frozenRowsElement = this.frozenSwimlaneRow.querySelector("." + FROZEN_ROW_CLASS);
        if (nextSwimHeight && frozenSwimHeight >= nextSwimHeight && this.frozenOrder < swimlaneRows.length - 1) {
          if (frozenRowsElement) {
            remove(frozenRowsElement.querySelector("." + SWIMLANE_HEADER_CLASS));
            frozenRowsElement.appendChild(nextSwim.querySelector("." + SWIMLANE_HEADER_CLASS).cloneNode(true));
            this.addFrozenSwimlaneDataKey(nextSwim);
          }
          ++this.frozenOrder;
        } else if (prevSwimHeight && frozenSwimHeight < curSwimHeight && frozenSwimHeight > prevSwimHeight && this.frozenOrder > 0) {
          if (frozenRowsElement) {
            remove(frozenRowsElement.querySelector("." + SWIMLANE_HEADER_CLASS));
            frozenRowsElement.appendChild(prevSwim.querySelector("." + SWIMLANE_HEADER_CLASS).cloneNode(true));
            this.addFrozenSwimlaneDataKey(prevSwim);
          }
          --this.frozenOrder;
        }
      }
      if (e && e.target.scrollTop === 0) {
        this.removeFrozenRows();
      }
    };
    LayoutRender2.prototype.removeFrozenRows = function() {
      remove(this.frozenSwimlaneRow);
      this.frozenSwimlaneRow = null;
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      setStyleAttribute2(header, {
        position: "",
        top: ""
      });
      setStyleAttribute2(content, {
        position: "",
        top: ""
      });
      this.parent.scrollPosition.content = {
        left: this.parent.scrollPosition.content.left,
        top: 0
      };
      content.scrollTop = 0;
      this.frozenOrder = 0;
    };
    LayoutRender2.prototype.onColumnScroll = function(e) {
      var target = e.target;
      if (target.offsetParent) {
        var columnKey = target.offsetParent.getAttribute("data-key");
        this.parent.scrollPosition.column["" + columnKey] = {
          left: target.scrollLeft,
          top: target.scrollTop
        };
      }
    };
    LayoutRender2.prototype.onAdaptiveScroll = function(e) {
      if (this.parent.touchModule.tabHold && !this.parent.touchModule.mobilePopup) {
        e.preventDefault();
      }
    };
    LayoutRender2.prototype.isColumnVisible = function(column) {
      var _this = this;
      var isVisible4 = false;
      var isNumeric = typeof column.keyField === "number";
      if (isNumeric) {
        isVisible4 = this.parent.actionModule.hideColumnKeys.indexOf(column.keyField.toString()) === -1;
      } else {
        column.keyField.split(",").forEach(function(key) {
          isVisible4 = _this.parent.actionModule.hideColumnKeys.indexOf(key) === -1;
        });
      }
      return isVisible4;
    };
    LayoutRender2.prototype.renderLimits = function(column, target) {
      var limits = createElement2("div", {
        className: LIMITS_CLASS
      });
      if (column.minCount) {
        limits.appendChild(createElement2("div", {
          className: MIN_COUNT_CLASS,
          innerHTML: this.parent.localeObj.getConstant("min") + ": " + column.minCount.toString()
        }));
      }
      if (column.maxCount) {
        limits.appendChild(createElement2("div", {
          className: MAX_COUNT_CLASS,
          innerHTML: this.parent.localeObj.getConstant("max") + ": " + column.maxCount.toString()
        }));
      }
      if (limits.childElementCount > 0) {
        if (target.querySelector("." + CARD_WRAPPER_CLASS)) {
          target.insertBefore(limits, target.firstElementChild);
        } else {
          target.appendChild(limits);
        }
      }
    };
    LayoutRender2.prototype.renderValidation = function() {
      var _this = this;
      this.parent.columns.forEach(function(column) {
        if (!column.minCount && !column.maxCount) {
          return;
        }
        var cardData = _this.columnData[column.keyField];
        var keySelector = '[data-key="' + column.keyField + '"]';
        var headerCell = _this.parent.element.querySelector("." + (HEADER_CELLS_CLASS + keySelector));
        var rowCells = [].slice.call(_this.parent.element.querySelectorAll("." + (CONTENT_CELLS_CLASS + keySelector)));
        if (_this.parent.constraintType === "Swimlane" && _this.parent.swimlaneSettings.keyField) {
          _this.swimlaneRow.forEach(function(row, index) {
            _this.renderLimits(column, rowCells[index]);
            var rowCards = cardData.filter(function(card) {
              return card[_this.parent.swimlaneSettings.keyField] === row.keyField;
            });
            var colorClass2 = _this.getValidationClass(column, rowCards.length);
            if (colorClass2) {
              addClass2([rowCells[index]], colorClass2);
            }
          });
        } else {
          _this.renderLimits(column, headerCell);
          var colorClass = _this.getValidationClass(column, cardData.length);
          if (colorClass) {
            addClass2(rowCells.concat(headerCell), colorClass);
          }
        }
      });
    };
    LayoutRender2.prototype.getValidationClass = function(column, count) {
      var colorClass;
      if (column.maxCount && count > column.maxCount) {
        colorClass = MAX_COLOR_CLASS;
      } else if (column.minCount && count < column.minCount) {
        colorClass = MIN_COLOR_CLASS;
      }
      return colorClass;
    };
    LayoutRender2.prototype.refreshValidation = function() {
      var validations = [].slice.call(this.parent.element.querySelectorAll("." + LIMITS_CLASS));
      validations.forEach(function(node) {
        remove(node);
      });
      var minClass = [].slice.call(this.parent.element.querySelectorAll("." + MIN_COLOR_CLASS));
      removeClass2(minClass, MIN_COLOR_CLASS);
      var maxClass = [].slice.call(this.parent.element.querySelectorAll("." + MAX_COLOR_CLASS));
      removeClass2(maxClass, MAX_COLOR_CLASS);
      this.renderValidation();
    };
    LayoutRender2.prototype.getColumnData = function(columnValue, dataSource) {
      var _this = this;
      if (dataSource === void 0) {
        dataSource = this.parent.kanbanData;
      }
      var cardData = [];
      var isNumeric = typeof columnValue === "number";
      if (isNumeric) {
        var keyData = dataSource.filter(function(cardObj) {
          return cardObj[_this.parent.keyField] === columnValue;
        });
        cardData = cardData.concat(keyData);
      } else {
        var columnKeys = columnValue.split(",");
        var _loop_4 = function(key2) {
          var keyData2 = dataSource.filter(function(cardObj) {
            return cardObj[_this.parent.keyField] === key2.trim();
          });
          cardData = cardData.concat(keyData2);
        };
        for (var _i = 0, columnKeys_1 = columnKeys; _i < columnKeys_1.length; _i++) {
          var key = columnKeys_1[_i];
          _loop_4(key);
        }
      }
      this.sortCategory(cardData);
      return cardData;
    };
    LayoutRender2.prototype.sortCategory = function(cardData) {
      var key = this.parent.cardSettings.headerField;
      var direction = this.parent.sortSettings.direction;
      switch (this.parent.sortSettings.sortBy) {
        case "DataSourceOrder":
          this.sortOrder(key, direction, cardData);
          break;
        case "Custom":
        case "Index":
          if (this.parent.sortSettings.field) {
            key = this.parent.sortSettings.field;
          }
          this.sortOrder(key, direction, cardData);
          break;
      }
      return cardData;
    };
    LayoutRender2.prototype.sortOrder = function(key, direction, cardData) {
      var isNumeric = true;
      if (this.parent.kanbanData.length > 0) {
        isNumeric = typeof this.parent.kanbanData[0]["" + key] === "number";
      }
      if (!isNumeric && this.parent.sortSettings.sortBy === "Index") {
        return cardData;
      }
      var first;
      var second;
      cardData = cardData.sort(function(firstData, secondData) {
        if (!isNumeric) {
          first = firstData["" + key] ? firstData["" + key].toLowerCase() : "";
          second = secondData["" + key] ? secondData["" + key].toLowerCase() : "";
        } else {
          first = firstData["" + key];
          second = secondData["" + key];
        }
        return first > second ? 1 : second > first ? -1 : 0;
      });
      if (direction === "Descending") {
        cardData.reverse();
      }
      return cardData;
    };
    LayoutRender2.prototype.documentClick = function(args) {
      if (args.target.classList.contains(SWIMLANE_OVERLAY_CLASS) && this.parent.element.querySelector("." + SWIMLANE_RESOURCE_CLASS).classList.contains("e-popup-open")) {
        this.treePopup.hide();
        removeClass2([this.popupOverlay], "e-enable");
      }
      if (closest2(args.target, "." + ROOT_CLASS)) {
        return;
      }
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_CLASS + "." + CARD_SELECTION_CLASS));
      removeClass2(cards, CARD_SELECTION_CLASS);
      this.disableAttributeSelection(cards);
    };
    LayoutRender2.prototype.disableAttributeSelection = function(cards) {
      if (cards instanceof Element) {
        cards.setAttribute("aria-selected", "false");
      } else {
        cards.forEach(function(card) {
          card.setAttribute("aria-selected", "false");
        });
      }
    };
    LayoutRender2.prototype.getColumnCards = function(data) {
      var _this = this;
      var columnData = {};
      this.columnKeys = [];
      this.parent.columns.forEach(function(column) {
        var isNumeric = typeof column.keyField === "number";
        if (isNumeric) {
          _this.columnKeys = _this.columnKeys.concat(column.keyField.toString());
        } else {
          _this.columnKeys = _this.columnKeys.concat(column.keyField.split(",").map(function(e) {
            return e.trim();
          }));
        }
        var cardData = _this.getColumnData(column.keyField, data);
        columnData[column.keyField] = cardData;
      });
      return columnData;
    };
    LayoutRender2.prototype.getSwimlaneCards = function() {
      var _this = this;
      var swimlaneData = {};
      if (this.parent.swimlaneSettings.keyField) {
        this.kanbanRows.forEach(function(row) {
          return swimlaneData[row.keyField] = _this.parent.kanbanData.filter(function(obj) {
            return !isNullOrUndefined2(obj[_this.parent.keyField]) && _this.columnKeys.indexOf(obj[_this.parent.keyField].toString()) > -1 && (!obj[_this.parent.swimlaneSettings.keyField] && _this.parent.swimlaneSettings.showUnassignedRow ? "" : obj[_this.parent.swimlaneSettings.keyField]) === row.keyField;
          });
        });
      }
      return swimlaneData;
    };
    LayoutRender2.prototype.refreshHeaders = function() {
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      [].slice.call(header.children).forEach(function(child) {
        return remove(child);
      });
      this.renderHeader(header);
    };
    LayoutRender2.prototype.refreshCards = function() {
      this.parent.resetTemplates(["cardTemplate"]);
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      cards.forEach(function(card) {
        return remove(card);
      });
      this.renderCards();
      this.wireDragEvent();
      this.parent.renderTemplates();
    };
    LayoutRender2.prototype.refresh = function() {
      var _this = this;
      var isColumnTemplateRefreshed = false;
      this.parent.columns.forEach(function(column) {
        if (column.showItemCount) {
          if (column && column.template && !isColumnTemplateRefreshed) {
            _this.refreshHeaders();
            isColumnTemplateRefreshed = true;
          }
          var countSelector = "." + HEADER_CELLS_CLASS + '[data-key="' + column.keyField + '"] .' + CARD_ITEM_COUNT_CLASS;
          var itemCount = _this.parent.element.querySelector(countSelector);
          if (itemCount) {
            var isNumeric = typeof column.keyField === "number";
            var cardLength = 0;
            if (isNumeric) {
              cardLength = [].slice.call(_this.parent.element.querySelectorAll("." + CARD_CLASS + '[data-key="' + column.keyField + '"]')).length;
            } else {
              var keys4 = column.keyField.split(",");
              for (var _i = 0, keys_2 = keys4; _i < keys_2.length; _i++) {
                var key = keys_2[_i];
                var cards = [].slice.call(_this.parent.element.querySelectorAll("." + CARD_CLASS + '[data-key="' + key.trim() + '"]'));
                cardLength = cards.length + cardLength;
              }
            }
            itemCount.innerHTML = "- " + cardLength + " " + _this.parent.localeObj.getConstant("items");
          }
        }
      });
      if (this.parent.swimlaneSettings.keyField) {
        var swimlaneRows = [].slice.call(this.parent.element.querySelectorAll("." + SWIMLANE_ROW_CLASS));
        swimlaneRows.forEach(function(swimlane) {
          var swimlaneKey = swimlane.getAttribute("data-key");
          var itemCount = swimlane.querySelector("." + CARD_ITEM_COUNT_CLASS);
          if (itemCount && swimlaneKey) {
            var cards = [].slice.call(swimlane.nextElementSibling.querySelectorAll("." + CARD_CLASS));
            itemCount.innerHTML = "- " + cards.length + " " + _this.parent.localeObj.getConstant("items");
          }
        });
      }
      this.refreshValidation();
    };
    LayoutRender2.prototype.updateScrollPosition = function() {
      var _this = this;
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (content) {
        if (!Browser2.isIE) {
          content.scrollTo(this.parent.scrollPosition.content.left, this.parent.scrollPosition.content.top);
        } else {
          content.scrollTop = this.parent.scrollPosition.content.top;
          content.scrollLeft = this.parent.scrollPosition.content.left;
        }
      }
      var cardWrapper = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      cardWrapper.forEach(function(wrapper) {
        if (wrapper.offsetParent) {
          var scrollData = _this.parent.scrollPosition.column[wrapper.offsetParent.getAttribute("data-key")];
          if (scrollData) {
            if (!Browser2.isIE) {
              wrapper.scrollTo(scrollData.left, scrollData.top);
            } else {
              wrapper.scrollTop = scrollData.top;
              wrapper.scrollLeft = scrollData.left;
            }
          }
        }
      });
    };
    LayoutRender2.prototype.renderCardBasedOnIndex = function(data, index) {
      var _this = this;
      var key = data[this.parent.keyField];
      var cardRow = this.parent.element.querySelector(".e-content-row:not(.e-swimlane-row)");
      if (this.parent.swimlaneSettings.keyField && !this.parent.isAdaptive) {
        var rowSelector = '.e-content-row.e-swimlane-row[data-key="' + data[this.parent.swimlaneSettings.keyField] + '"]';
        if (this.parent.element.querySelector(rowSelector)) {
          cardRow = this.parent.element.querySelector(rowSelector).nextElementSibling;
        } else {
          var columnIndex = this.columnKeys.indexOf(key);
          if (columnIndex !== -1 && this.parent.actionModule.hideColumnKeys.indexOf(key) === -1) {
            var index_1 = this.kanbanRows.findIndex(function(rowData) {
              return rowData["keyField"] === data[_this.parent.swimlaneSettings.keyField];
            });
            var swim = [].slice.call(this.parent.element.querySelectorAll(".e-swimlane-row"));
            var swimRow = this.parent.element.querySelector("." + CONTENT_TABLE_CLASS + " tbody");
            if (swim[index_1]) {
              swimRow = swim[index_1];
            }
            this.renderSwimlaneRow(swimRow, this.kanbanRows[index_1], false);
            this.renderSingleContent(swimRow, this.kanbanRows[index_1], false);
          }
          cardRow = this.parent.element.querySelector(rowSelector).nextElementSibling;
          [].slice.call(cardRow.children).forEach(function(cell) {
            var cardWrapper = createElement2("div", {
              className: CARD_WRAPPER_CLASS
            });
            cell.appendChild(cardWrapper);
            cardWrapper.appendChild(_this.renderEmptyCard());
          });
        }
      }
      if (this.parent.sortSettings.sortBy !== "Index") {
        var field_1 = this.parent.cardSettings.headerField;
        if (this.parent.sortSettings.sortBy === "Custom") {
          field_1 = this.parent.sortSettings.field;
        }
        if (isNullOrUndefined2(this.parent.swimlaneSettings.keyField)) {
          index = this.getColumnData(key, this.parent.kanbanData).findIndex(function(colData) {
            return colData["" + field_1] === data["" + field_1];
          });
        } else {
          var swimlaneDatas = this.parent.getSwimlaneData(data[this.parent.swimlaneSettings.keyField]);
          index = this.getColumnData(key, swimlaneDatas).findIndex(function(colData) {
            return colData["" + field_1] === data["" + field_1];
          });
        }
      } else if (this.parent.sortSettings.sortBy === "Index" && this.parent.sortSettings.field && this.parent.sortSettings.direction === "Ascending") {
        index = data[this.parent.sortSettings.field] - 1;
      }
      if (cardRow) {
        var td = [].slice.call(cardRow.children).filter(function(e) {
          return e.getAttribute("data-key").replace(/\s/g, "").split(",").indexOf(key.toString().replace(/\s/g, "")) !== -1;
        })[0];
        var cardWrapper_2 = td.querySelector("." + CARD_WRAPPER_CLASS);
        var emptyCard = cardWrapper_2.querySelector("." + EMPTY_CARD_CLASS);
        if (emptyCard) {
          remove(emptyCard);
        }
        var cardElement_1 = this.renderCard(data);
        if (this.parent.allowDragAndDrop && td.classList.contains(DRAG_CLASS)) {
          this.parent.dragAndDropModule.wireDragEvents(cardElement_1);
          addClass2([cardElement_1], DROPPABLE_CLASS);
        }
        var args = {
          data,
          element: cardElement_1,
          cancel: false
        };
        this.parent.trigger(cardRendered, args, function(cardArgs) {
          if (!cardArgs.cancel) {
            if (isNullOrUndefined2(index) || cardWrapper_2.children.length === 0) {
              cardWrapper_2.appendChild(cardElement_1);
            } else {
              cardWrapper_2.insertBefore(cardElement_1, cardWrapper_2.childNodes[index]);
            }
          }
        });
      }
    };
    LayoutRender2.prototype.removeCard = function(data) {
      var cardKey = data[this.parent.cardSettings.headerField];
      var cardElement = this.parent.element.querySelector("." + CARD_CLASS + '[data-id="' + cardKey + '"]');
      if (cardElement) {
        this.isSelectedCard = cardElement.classList.contains(CARD_SELECTION_CLASS) ? true : false;
        var cardContainer = cardElement.parentElement;
        remove(cardElement);
        if (cardContainer.querySelectorAll("." + CARD_CLASS + ":not(." + CLONED_CARD_CLASS + ")").length === 0) {
          cardContainer.appendChild(this.renderEmptyCard());
        }
      }
    };
    LayoutRender2.prototype.wireEvents = function() {
      var _this = this;
      EventHandler2.add(this.parent.element, "click", this.parent.actionModule.clickHandler, this.parent.actionModule);
      EventHandler2.add(this.parent.element, "dblclick", this.parent.actionModule.doubleClickHandler, this.parent.actionModule);
      EventHandler2.add(document, Browser2.touchStartEvent, this.documentClick, this);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      EventHandler2.add(content, "scroll", this.onContentScroll, this);
      var cardWrapper = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      cardWrapper.forEach(function(wrapper) {
        if (_this.parent.isInitialRender && wrapper.offsetParent) {
          _this.parent.scrollPosition.column[wrapper.offsetParent.getAttribute("data-key")] = {
            left: 0,
            top: 0
          };
        }
        EventHandler2.add(wrapper, "scroll", _this.onColumnScroll, _this);
      });
      if (this.parent.isAdaptive) {
        this.parent.touchModule.wireTouchEvents();
        content.scrollLeft = this.scrollLeft;
      }
      this.wireDragEvent();
    };
    LayoutRender2.prototype.unWireEvents = function() {
      var _this = this;
      EventHandler2.remove(this.parent.element, "click", this.parent.actionModule.clickHandler);
      EventHandler2.remove(this.parent.element, "dblclick", this.parent.actionModule.doubleClickHandler);
      EventHandler2.remove(document, Browser2.touchStartEvent, this.documentClick);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (content) {
        EventHandler2.remove(content, "scroll", this.onContentScroll);
        if (this.parent.allowDragAndDrop) {
          this.unWireDragEvent();
        }
      }
      var cardWrapper = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      if (cardWrapper.length > 0) {
        cardWrapper.forEach(function(wrapper) {
          EventHandler2.remove(wrapper, "scroll", _this.onColumnScroll);
        });
      }
      if (this.parent.isAdaptive) {
        this.parent.touchModule.unWireTouchEvents();
      }
    };
    LayoutRender2.prototype.wireDragEvent = function() {
      var _this = this;
      if (this.parent.allowDragAndDrop) {
        var cards = [].slice.call(this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS + "." + DRAG_CLASS + " ." + CARD_CLASS));
        addClass2(cards, DROPPABLE_CLASS);
        cards.forEach(function(card) {
          return _this.parent.dragAndDropModule.wireDragEvents(card);
        });
      }
    };
    LayoutRender2.prototype.unWireDragEvent = function() {
      var _this = this;
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS + "." + DRAG_CLASS + " ." + CARD_CLASS));
      removeClass2(cards, DROPPABLE_CLASS);
      cards.forEach(function(card) {
        return _this.parent.dragAndDropModule.unWireDragEvents(card);
      });
    };
    LayoutRender2.prototype.destroy = function() {
      this.parent.resetTemplates();
      this.parent.off(dataReady, this.initRender);
      this.parent.off(contentReady, this.scrollUiUpdate);
      this.unWireEvents();
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      if (header) {
        remove(header);
      }
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (content) {
        remove(content);
      }
      if (this.treeViewObj) {
        this.treeViewObj.destroy();
        this.treeViewObj = null;
      }
      if (this.treePopup) {
        this.treePopup.destroy();
        this.treePopup = null;
      }
      var swimlaneToolBarEle = this.parent.element.querySelector("." + SWIMLANE_HEADER_CLASS);
      if (swimlaneToolBarEle) {
        remove(swimlaneToolBarEle);
      }
      var swimlaneContent = this.parent.element.querySelector("." + SWIMLANE_CONTENT_CLASS);
      if (swimlaneContent) {
        remove(swimlaneContent);
      }
    };
    return LayoutRender2;
  }(MobileLayout)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/virtual-layout-render.js
var __extends92 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var VirtualLayoutRender = (
  /** @class */
  function(_super) {
    __extends92(VirtualLayoutRender2, _super);
    function VirtualLayoutRender2(parent) {
      var _this = _super.call(this, parent) || this;
      _this.parent = parent;
      _this.kanbanRows = [];
      _this.scrollStatus = {};
      _this.offsets = {};
      _this.tempOffsets = {};
      _this.offsetKeys = [];
      _this.columnKeys = [];
      _this.scrollLeft = 0;
      _this.frozenOrder = 0;
      _this.winResize = _this.windowResize.bind(_this);
      if (_this.parent.enableVirtualization) {
        _this.parent.on(dataReady, _this.initRender, _this);
        _this.parent.on(contentReady, _this.scrollUiUpdate, _this);
      }
      return _this;
    }
    VirtualLayoutRender2.prototype.initRender = function() {
      this.isSwimlane = !isNullOrUndefined2(this.parent.swimlaneSettings.keyField) && this.parent.swimlaneSettings.keyField.trim().length > 1 ? true : false;
      this.query = this.parent.query instanceof Query ? this.parent.query : new Query();
      if (this.parent.columns.length === 0) {
        return;
      }
      this.cardHeight = this.cardHeightCalculate();
      this.columnData = this.getColumnCards();
      this.kanbanRows = this.getRows();
      if (this.parent.isAdaptive) {
        var parent_1 = this.parent.element.querySelector("." + CONTENT_CLASS);
        if (parent_1) {
          this.scrollLeft = parent_1.scrollLeft;
        }
      }
      this.destroy();
      this.parent.on(dataReady, this.initRender, this);
      this.parent.on(contentReady, this.scrollUiUpdate, this);
      var header = createElement2("div", {
        className: HEADER_CLASS
      });
      this.parent.element.appendChild(header);
      this.renderHeader(header);
      if (!this.isSwimlane) {
        this.renderContent();
        this.renderCards();
      }
      this.renderValidation();
      this.parent.renderTemplates();
      this.parent.notify(contentReady, {});
      this.wireEvents();
      if (this.parent.isInitialRender) {
        this.parent.isInitialRender = false;
      }
    };
    VirtualLayoutRender2.prototype.cardHeightCalculate = function() {
      var cardHeight;
      if (this.parent.cardHeight === "auto") {
        cardHeight = 100 + 8;
      } else {
        cardHeight = parseInt(formatUnit(this.parent.cardHeight).split("px")[0], 10) + 8;
      }
      return cardHeight;
    };
    VirtualLayoutRender2.prototype.renderHeader = function(header) {
      var headerWrap = createElement2("div", {
        className: this.parent.swimlaneSettings.keyField ? SWIMLANE_CLASS : ""
      });
      header.appendChild(headerWrap);
      var headerTable = createElement2("table", {
        className: TABLE_CLASS + " " + HEADER_TABLE_CLASS,
        attrs: {
          "role": "presentation"
        }
      });
      headerWrap.appendChild(headerTable);
      this.renderColGroup(headerTable);
      var tableHead = createElement2("thead");
      headerTable.appendChild(tableHead);
      if (this.parent.stackedHeaders.length > 0) {
        tableHead.appendChild(this.createStackedRow(this.parent.stackedHeaders));
      }
      var tr = createElement2("tr", {
        className: HEADER_ROW_CLASS
      });
      tableHead.appendChild(tr);
      var _loop_1 = function(column2) {
        if (this_1.isColumnVisible(column2)) {
          var index = this_1.parent.actionModule.columnToggleArray.indexOf(column2.keyField.toString());
          var th_1 = createElement2("th", {
            className: index === -1 ? HEADER_CELLS_CLASS : HEADER_CELLS_CLASS + " " + COLLAPSED_CLASS,
            attrs: {
              "data-role": "kanban-column",
              "data-key": column2.keyField.toString()
            }
          });
          var classList2 = [];
          if (column2.allowToggle) {
            classList2.push(HEADER_ROW_TOGGLE_CLASS);
            if (!column2.isExpanded) {
              classList2.push(COLLAPSED_CLASS);
            }
          }
          addClass2([th_1], classList2);
          var headerWrapper = createElement2("div", {
            className: HEADER_WRAP_CLASS
          });
          th_1.appendChild(headerWrapper);
          var noOfCard = this_1.parent.dataModule.isRemote() ? this_1.parent.columnDataCount[column2.keyField] : this_1.columnData[column2.keyField].length;
          var headerTitle = createElement2("div", {
            className: HEADER_TITLE_CLASS
          });
          headerWrapper.appendChild(headerTitle);
          if (column2.template) {
            var templateArgs = {
              keyField: column2.keyField,
              headerText: column2.headerText,
              minCount: column2.minCount,
              maxCount: column2.maxCount,
              allowToggle: column2.allowToggle,
              isExpanded: column2.isExpanded,
              showItemCount: column2.showItemCount,
              count: noOfCard
            };
            addClass2([th_1], TEMPLATE_CLASS);
            var templateId = this_1.parent.element.id + "_columnTemplate";
            var templateHeader = this_1.parent.templateParser(column2.template)(templateArgs, this_1.parent, "columnTemplate", templateId, false);
            append(templateHeader, headerTitle);
          } else {
            var header_1 = createElement2("div", {
              className: HEADER_TEXT_CLASS,
              innerHTML: column2.headerText
            });
            headerTitle.appendChild(header_1);
            if (column2.showItemCount) {
              var itemCount = createElement2("div", {
                className: CARD_ITEM_COUNT_CLASS,
                innerHTML: "- " + noOfCard.toString() + " " + this_1.parent.localeObj.getConstant("items")
              });
              headerTitle.appendChild(itemCount);
            }
          }
          if (column2.allowToggle) {
            var isExpand = column2.isExpanded && index === -1 ? true : false;
            var name_1 = isExpand ? COLUMN_EXPAND_CLASS : COLUMN_COLLAPSE_CLASS;
            var icon = createElement2("div", {
              className: HEADER_ICON_CLASS + " " + ICON_CLASS + " " + name_1,
              attrs: {
                "tabindex": "0"
              }
            });
            icon.setAttribute("aria-label", isExpand ? column2.keyField + " Expand" : column2.keyField + " Collapse");
            th_1.setAttribute("aria-expanded", isExpand.toString());
            headerWrapper.appendChild(icon);
          }
          var dataObj = [{
            keyField: column2.keyField,
            textField: column2.headerText,
            count: noOfCard
          }];
          var args = {
            data: dataObj,
            element: tr,
            cancel: false,
            requestType: "headerRow"
          };
          this_1.parent.trigger(queryCellInfo, args, function(columnArgs) {
            if (!columnArgs.cancel) {
              tr.appendChild(th_1);
            }
          });
        }
      };
      var this_1 = this;
      for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
        var column = _a[_i];
        _loop_1(column);
      }
    };
    VirtualLayoutRender2.prototype.renderContent = function() {
      var content = createElement2("div", {
        className: CONTENT_CLASS
      });
      this.parent.element.appendChild(content);
      var contentWrap = createElement2("div", {
        className: this.parent.swimlaneSettings.keyField ? SWIMLANE_CLASS : ""
      });
      content.appendChild(contentWrap);
      var contentTable = createElement2("table", {
        className: TABLE_CLASS + " " + CONTENT_TABLE_CLASS,
        attrs: {
          "role": "presentation"
        }
      });
      contentWrap.appendChild(contentTable);
      this.renderColGroup(contentTable);
      var tBody = createElement2("tbody");
      contentTable.appendChild(tBody);
      var isCollaspsed = false;
      for (var _i = 0, _a = this.kanbanRows; _i < _a.length; _i++) {
        var row = _a[_i];
        if (this.parent.swimlaneSettings.keyField && this.parent.swimlaneToggleArray.length !== 0) {
          var index = this.parent.swimlaneToggleArray.indexOf(row.keyField);
          isCollaspsed = index !== -1;
        }
        this.renderSingleContent(tBody, row, isCollaspsed);
      }
    };
    VirtualLayoutRender2.prototype.renderSingleContent = function(tBody, row, isCollaspsed) {
      var className = isCollaspsed ? CONTENT_ROW_CLASS + " " + COLLAPSED_CLASS : CONTENT_ROW_CLASS;
      var tr = createElement2("tr", {
        className,
        attrs: {
          "aria-expanded": "true"
        }
      });
      for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
        var column = _a[_i];
        if (this.isColumnVisible(column)) {
          var index = this.parent.actionModule.columnToggleArray.indexOf(column.keyField.toString());
          var className_1 = index === -1 ? CONTENT_CELLS_CLASS : CONTENT_CELLS_CLASS + " " + COLLAPSED_CLASS;
          var dragClass = (column.allowDrag ? " " + DRAG_CLASS : "") + (column.allowDrop ? " " + DROP_CLASS + " " + DROPPABLE_CLASS : "");
          var td = createElement2("td", {
            className: className_1 + dragClass,
            attrs: {
              "data-role": "kanban-column",
              "data-key": column.keyField.toString(),
              "aria-expanded": "true",
              "tabindex": "0",
              "role": "navigation"
            }
          });
          if (column.allowToggle && !column.isExpanded || index !== -1) {
            addClass2([td], COLLAPSED_CLASS);
            var text = (column.showItemCount ? "[" + (this.parent.dataModule.isRemote() ? this.parent.columnDataCount[column.keyField] : this.getColumnData(column.keyField).length) + "] " : "") + column.headerText;
            td.appendChild(createElement2("div", {
              className: COLLAPSE_HEADER_TEXT_CLASS,
              innerHTML: text
            }));
            td.setAttribute("aria-expanded", "false");
          }
          if (column.showAddButton) {
            var button = createElement2("div", {
              className: SHOW_ADD_BUTTON,
              attrs: {
                "tabindex": "-1"
              }
            });
            button.appendChild(createElement2("div", {
              className: SHOW_ADD_ICON + " " + ICON_CLASS
            }));
            td.appendChild(button);
          }
          tr.appendChild(td);
          if (this.parent.enableVirtualization) {
            var headerHeight = this.parent.element.querySelector(".e-kanban-header").getBoundingClientRect().height;
            if (this.parent.height === "auto") {
              td.style.height = window.innerHeight - (headerHeight + this.parent.element.getBoundingClientRect().top + 15) + "px";
            } else {
              td.style.height = parseInt(formatUnit(this.parent.height).split("px")[0], 10) - (headerHeight + 15) + "px";
            }
          }
        }
      }
      var dataObj = [{
        keyField: row.keyField,
        textField: row.textField,
        count: row.count
      }];
      var args = {
        data: dataObj,
        element: tr,
        cancel: false,
        requestType: "contentRow"
      };
      this.parent.trigger(queryCellInfo, args, function(columnArgs) {
        if (!columnArgs.cancel) {
          if (tBody.classList.contains("e-swimlane-row")) {
            tBody.insertAdjacentElement("beforebegin", tr);
          } else {
            tBody.appendChild(tr);
          }
        }
      });
    };
    VirtualLayoutRender2.prototype.windowResize = function() {
      var cloumnsTDElem = this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS);
      var headerHeight = this.parent.element.querySelector(".e-kanban-header").getBoundingClientRect().height;
      for (var j = 0; j < cloumnsTDElem.length; j++) {
        if (this.parent.height === "auto") {
          cloumnsTDElem[j].style.height = window.innerHeight - (headerHeight + this.parent.element.getBoundingClientRect().top + 15) + "px";
        } else {
          cloumnsTDElem[j].style.height = parseInt(formatUnit(this.parent.height).split("px")[0], 10) - (headerHeight + 15) + "px";
        }
      }
    };
    VirtualLayoutRender2.prototype.refreshColumnData = function(draggedColumnKey, droppedColumnKey, requestType, crudKeyField) {
      var _this = this;
      var cardRows = [].slice.call(this.parent.element.querySelectorAll(".e-content-row:not(.e-swimlane-row)"));
      var isCRUD = (requestType === "cardChanged" || requestType === "cardCreated" || requestType === "cardRemoved") && !isNullOrUndefined2(crudKeyField);
      cardRows.forEach(function(tr) {
        var _loop_2 = function(column2) {
          if (_this.isColumnVisible(column2) && (column2.keyField === draggedColumnKey || column2.keyField === droppedColumnKey) || isCRUD) {
            var cards_1 = 0;
            var blocks = [];
            var columnData = _this.getColumnCards()[column2.keyField];
            var currentColumnDataCount = _this.parent.dataModule.isRemote() ? _this.parent.columnDataCount[column2.keyField] : columnData.length;
            var overallHeight = _this.cardHeight * currentColumnDataCount;
            blocks = Array.apply(null, Array(currentColumnDataCount)).map(function() {
              return ++cards_1;
            });
            var columnWrapper = tr.querySelector('[data-key="' + column2.keyField + '"]');
            var singleIndexCardCount = Math.ceil(parseInt(columnWrapper.style.height.split("px")[0], 10) / _this.cardHeight);
            _this.offsets[1] = singleIndexCardCount * _this.cardHeight;
            for (var i = 1; i < blocks.length; i++) {
              _this.offsets[blocks[i]] = _this.offsets[blocks[i - 1]] + singleIndexCardCount * _this.cardHeight;
              _this.tempOffsets[blocks[i]] = _this.offsets[blocks[i] - 1] | 0;
            }
            var cardWrapper = columnWrapper.querySelector("." + CARD_WRAPPER_CLASS);
            var maxBlock = currentColumnDataCount % 2 === 0 ? currentColumnDataCount - 2 : currentColumnDataCount - 1;
            var viewInfo = _this.getInfoFromView(_this.scrollStatus[column2.keyField]);
            var transformY = _this.getTranslateY(viewInfo);
            var cardVirtualElement = cardWrapper.querySelector("." + CARD_VIRTUAL_WRAPPER_CLASS);
            cardVirtualElement.style.maxHeight = currentColumnDataCount * _this.cardHeight + "px";
            _this.setPadding(transformY, cardVirtualElement, currentColumnDataCount);
            _this.currentStatus = {
              column: column2.keyField,
              columnOverAllHeight: overallHeight,
              columnHeight: parseInt(columnWrapper.style.height.split("px")[0], 10),
              previousScrollTop: _this.scrollStatus[column2.keyField].currentScrollTop,
              currentScrollTop: cardWrapper.scrollTop,
              scrollDirection: _this.scrollStatus[column2.keyField].scrollDirection,
              currentBlockIndex: _this.scrollStatus[column2.keyField].currentBlockIndex,
              oldBlockIndex: _this.scrollStatus[column2.keyField].oldBlockIndex,
              offsets: _this.offsets,
              tempOffsets: _this.tempOffsets,
              totalColumnData: currentColumnDataCount,
              singleIndexCardCount,
              maxBlock
            };
            _this.scrollStatus[column2.keyField] = _this.currentStatus;
          }
        };
        for (var _i = 0, _a = _this.parent.columns; _i < _a.length; _i++) {
          var column = _a[_i];
          _loop_2(column);
        }
      });
    };
    VirtualLayoutRender2.prototype.renderCards = function() {
      var _this = this;
      var cardRows = [].slice.call(this.parent.element.querySelectorAll(".e-content-row:not(.e-swimlane-row)"));
      var swimlaneRows = [].slice.call(this.parent.element.querySelectorAll(".e-content-row.e-swimlane-row"));
      var removeTrs = [];
      var columnTransition = false;
      cardRows.forEach(function(tr, index) {
        var dataCount = 0;
        var _loop_3 = function(column2) {
          if (_this.isColumnVisible(column2)) {
            var cards_2 = 0;
            var currentScrollIndex = 0;
            var blocks = [];
            _this.offsets = {};
            _this.tempOffsets = {};
            var columnData = _this.columnData[column2.keyField];
            var currentColumnDataCount = _this.parent.dataModule.isRemote() ? _this.parent.columnDataCount[column2.keyField] : columnData.length;
            dataCount += currentColumnDataCount;
            var overallHeight = _this.cardHeight * currentColumnDataCount + 7;
            var columnWrapper = tr.querySelector('[data-key="' + column2.keyField + '"]');
            var singleIndexCardCount = Math.ceil(parseFloat(columnWrapper.style.height.split("px")[0]) / _this.cardHeight);
            var currentColumnBlock = singleIndexCardCount > currentColumnDataCount ? currentColumnDataCount : Math.floor(currentColumnDataCount / singleIndexCardCount);
            blocks = Array.apply(null, Array(currentColumnDataCount)).map(function() {
              return ++cards_2;
            });
            _this.offsets[1] = singleIndexCardCount * _this.cardHeight + 7;
            for (var i = 1; i < blocks.length; i++) {
              _this.offsets[blocks[i]] = _this.offsets[blocks[i - 1]] + singleIndexCardCount * _this.cardHeight;
              _this.tempOffsets[blocks[i]] = _this.offsets[blocks[i] - 1] | 0;
            }
            var cardWrapper = createElement2("div", {
              className: CARD_WRAPPER_CLASS,
              attrs: {
                "role": "listbox"
              }
            });
            var cardVirtualWrapper_1 = createElement2("div", {
              className: CARD_VIRTUAL_WRAPPER_CLASS,
              attrs: {
                "role": "listbox"
              }
            });
            cardWrapper.appendChild(cardVirtualWrapper_1);
            var maxBlock = currentColumnBlock % 2 === 0 ? currentColumnBlock : currentColumnBlock + 1;
            _this.currentStatus = {
              column: column2.keyField,
              columnOverAllHeight: overallHeight,
              columnHeight: parseInt(columnWrapper.style.height.split("px")[0], 10),
              previousScrollTop: null,
              currentScrollTop: cardWrapper.scrollTop,
              scrollDirection: null,
              currentBlockIndex: [1, 2],
              oldBlockIndex: [1, 2],
              offsets: _this.offsets,
              tempOffsets: _this.tempOffsets,
              totalColumnData: currentColumnDataCount,
              singleIndexCardCount,
              maxBlock
            };
            _this.scrollStatus[column2.keyField] = _this.currentStatus;
            if (column2.transitionColumns.length > 0) {
              columnTransition = true;
            }
            if (!columnTransition && isNullOrUndefined2(_this.parent.swimlaneSettings.keyField)) {
              var borderElem = createElement2("div", {
                className: BORDER_CLASS
              });
              columnWrapper.appendChild(borderElem);
            }
            columnWrapper.appendChild(cardWrapper);
            if (currentColumnDataCount > 0) {
              var _loop_4 = function(i2) {
                var cardText = columnData[i2][_this.parent.cardSettings.headerField];
                var cardIndex = _this.parent.actionModule.selectionArray.indexOf(cardText);
                var cardElement = _this.renderCard(columnData[i2]);
                if (cardIndex !== -1) {
                  cardElement.setAttribute("aria-selected", "true");
                  addClass2([cardElement], CARD_SELECTION_CLASS);
                }
                var args = {
                  data: columnData[i2],
                  element: cardElement,
                  cancel: false
                };
                _this.parent.trigger(cardRendered, args, function(cardArgs) {
                  if (!cardArgs.cancel) {
                    cardVirtualWrapper_1.appendChild(cardElement);
                  }
                });
              };
              for (var i = currentScrollIndex; i < singleIndexCardCount * 2 && i < columnData.length; i++) {
                _loop_4(i);
              }
              cardVirtualWrapper_1.style.maxHeight = _this.cardHeight * currentColumnDataCount + "px";
            } else {
              cardVirtualWrapper_1.appendChild(_this.renderEmptyCard());
            }
            _this.setPadding(0, cardVirtualWrapper_1, currentColumnDataCount);
          }
        };
        for (var _i = 0, _a = _this.parent.columns; _i < _a.length; _i++) {
          var column = _a[_i];
          _loop_3(column);
        }
        if (dataCount === 0) {
          removeTrs.push(tr);
          if (swimlaneRows.length > 0) {
            removeTrs.push(swimlaneRows[index]);
          }
        }
      });
      if (!this.parent.swimlaneSettings.showEmptyRow && this.parent.kanbanData.length === 0 && !this.parent.showEmptyColumn) {
        removeTrs.forEach(function(tr) {
          return remove(tr);
        });
      }
    };
    VirtualLayoutRender2.prototype.renderCard = function(data) {
      var cardElement = createElement2("div", {
        className: CARD_CLASS,
        attrs: {
          "data-id": data[this.parent.cardSettings.headerField],
          "data-key": data[this.parent.keyField],
          "aria-selected": "false",
          "tabindex": "-1",
          "role": "option"
        }
      });
      cardElement.style.height = this.cardHeight - 8 + "px";
      if (this.parent.cardSettings.template) {
        addClass2([cardElement], TEMPLATE_CLASS);
        var templateId = this.parent.element.id + "_cardTemplate";
        var cardTemplate = this.parent.templateParser(this.parent.cardSettings.template)(data, this.parent, "cardTemplate", templateId, false);
        append(cardTemplate, cardElement);
      } else {
        var tooltipClass = this.parent.enableTooltip ? " " + TOOLTIP_TEXT_CLASS : "";
        if (this.parent.cardSettings.showHeader) {
          var cardHeader = createElement2("div", {
            className: CARD_HEADER_CLASS
          });
          var cardCaption = createElement2("div", {
            className: CARD_HEADER_TEXT_CLASS
          });
          var cardText = createElement2("div", {
            className: CARD_HEADER_TITLE_CLASS + tooltipClass,
            innerHTML: data[this.parent.cardSettings.headerField] || ""
          });
          cardHeader.appendChild(cardCaption);
          cardCaption.appendChild(cardText);
          cardElement.appendChild(cardHeader);
        }
        var cardContent = createElement2("div", {
          className: CARD_CONTENT_CLASS + tooltipClass,
          innerHTML: data[this.parent.cardSettings.contentField] || ""
        });
        cardElement.appendChild(cardContent);
        if (this.parent.cardSettings.tagsField && data[this.parent.cardSettings.tagsField]) {
          var cardTags = createElement2("div", {
            className: CARD_TAGS_CLASS
          });
          var tags = data[this.parent.cardSettings.tagsField].toString().split(",");
          for (var _i = 0, tags_1 = tags; _i < tags_1.length; _i++) {
            var tag = tags_1[_i];
            cardTags.appendChild(createElement2("div", {
              className: CARD_TAG_CLASS + " " + CARD_LABEL_CLASS,
              innerHTML: tag
            }));
          }
          cardElement.appendChild(cardTags);
        }
        if (this.parent.cardSettings.grabberField && data[this.parent.cardSettings.grabberField]) {
          addClass2([cardElement], CARD_COLOR_CLASS);
          cardElement.style.borderLeftColor = data[this.parent.cardSettings.grabberField];
        }
        if (this.parent.cardSettings.footerCssField) {
          var cardFields = createElement2("div", {
            className: CARD_FOOTER_CLASS
          });
          var keys4 = data[this.parent.cardSettings.footerCssField].split(",");
          for (var _a = 0, keys_1 = keys4; _a < keys_1.length; _a++) {
            var key = keys_1[_a];
            cardFields.appendChild(createElement2("div", {
              className: key.trim() + " " + CARD_FOOTER_CSS_CLASS
            }));
          }
          cardElement.appendChild(cardFields);
        }
      }
      return cardElement;
    };
    VirtualLayoutRender2.prototype.renderEmptyCard = function() {
      var emptyCard = createElement2("span", {
        className: EMPTY_CARD_CLASS,
        innerHTML: this.parent.localeObj.getConstant("noCard")
      });
      return emptyCard;
    };
    VirtualLayoutRender2.prototype.renderColGroup = function(table) {
      var _this = this;
      var colGroup = createElement2("colgroup");
      this.parent.columns.forEach(function(column) {
        if (_this.isColumnVisible(column)) {
          var index = _this.parent.actionModule.columnToggleArray.indexOf(column.keyField.toString());
          var isToggle = column.allowToggle && !column.isExpanded;
          var className = index === -1 ? isToggle ? COLLAPSED_CLASS : "" : COLLAPSED_CLASS;
          var col = createElement2("col", {
            className,
            attrs: {
              "data-key": column.keyField.toString()
            },
            styles: _this.parent.isAdaptive ? "width: " + (isToggle ? formatUnit(toggleWidth) : formatUnit(_this.getWidth())) : ""
          });
          colGroup.appendChild(col);
        }
      });
      table.appendChild(colGroup);
    };
    VirtualLayoutRender2.prototype.getRows = function() {
      var kanbanRows = [];
      kanbanRows.push({
        keyField: "",
        textField: ""
      });
      return kanbanRows;
    };
    VirtualLayoutRender2.prototype.createStackedRow = function(rows) {
      var tr = createElement2("tr", {
        className: HEADER_ROW_CLASS + " " + STACKED_HEADER_ROW_CLASS
      });
      var stackedHeaders = [];
      this.parent.columns.forEach(function(column) {
        var headerText = "";
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
          var row = rows_1[_i];
          if (row.keyFields.indexOf(column.keyField.toString()) !== -1) {
            headerText = row.text;
          }
        }
        stackedHeaders.push(headerText);
      });
      for (var h = 0; h < stackedHeaders.length; h++) {
        var colSpan = 1;
        for (var j = h + 1; j < stackedHeaders.length; j++) {
          if (stackedHeaders[h] !== "" && stackedHeaders[j] !== "" && stackedHeaders[h] === stackedHeaders[j]) {
            colSpan++;
          } else {
            break;
          }
        }
        var div = createElement2("div", {
          className: HEADER_TEXT_CLASS,
          innerHTML: stackedHeaders[h]
        });
        var th = createElement2("th", {
          className: HEADER_CELLS_CLASS + " " + STACKED_HEADER_CELL_CLASS,
          attrs: {
            "colspan": colSpan.toString()
          }
        });
        tr.appendChild(th).appendChild(div);
        h += colSpan - 1;
      }
      return tr;
    };
    VirtualLayoutRender2.prototype.scrollUiUpdate = function() {
      var _this = this;
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      var height = this.parent.element.offsetHeight - header.offsetHeight;
      if (this.parent.isAdaptive) {
        height = window.innerHeight - (header.offsetHeight + bottomSpace);
        var swimlaneToolbar = this.parent.element.querySelector("." + SWIMLANE_HEADER_CLASS);
        if (swimlaneToolbar) {
          height -= swimlaneToolbar.offsetHeight;
        }
        var cardWrappers = [].slice.call(this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS));
        cardWrappers.forEach(function(cell) {
          var cardWrapper = cell.querySelector("." + CARD_WRAPPER_CLASS);
          if (!cardWrapper.classList.contains(MULTI_CARD_WRAPPER_CLASS)) {
            cardWrapper.style.height = formatUnit(height);
            EventHandler2.add(cell, "touchmove", _this.onAdaptiveScroll, _this);
          }
        });
      }
      if (this.parent.height !== "auto" && this.parent.height !== "100%") {
        content.style.height = formatUnit(height);
      }
      [].slice.call(header.children).forEach(function(node) {
        var paddingValue = 0;
        if (content.offsetWidth - content.clientWidth > 0) {
          paddingValue = 17;
          if (content.offsetHeight - content.clientHeight > 0) {
            node.style.width = formatUnit(content.clientWidth);
          }
        }
        if (_this.parent.enableRtl) {
          node.style.paddingLeft = formatUnit(paddingValue);
        } else {
          node.style.paddingRight = formatUnit(paddingValue);
        }
      });
      this.updateScrollPosition();
    };
    VirtualLayoutRender2.prototype.onContentScroll = function(e) {
      var target = e.target;
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      [].slice.call(header.children).forEach(function(node) {
        node.scrollLeft = target.scrollLeft;
      });
      this.parent.scrollPosition.content = {
        left: target.scrollLeft,
        top: target.scrollTop
      };
    };
    VirtualLayoutRender2.prototype.getOffset = function(block, viewInfo) {
      return Math.min(viewInfo.offsets[block] | 0, viewInfo.offsets[viewInfo.maxBlock] | 0);
    };
    VirtualLayoutRender2.prototype.getTranslateY = function(viewInfo) {
      var block = (viewInfo.newBlockIndex[0] || 1) - 1;
      var translate = this.getOffset(block, viewInfo);
      var endTranslate = this.getOffset(viewInfo.newBlockIndex[viewInfo.newBlockIndex.length - 1], viewInfo);
      var result = translate > viewInfo.currentScrollTop ? this.getOffset(block - 1, viewInfo) : endTranslate < viewInfo.currentScrollTop + viewInfo.columnHeight ? this.getOffset(block + 1, viewInfo) : translate;
      return result;
    };
    VirtualLayoutRender2.prototype.setPadding = function(paddingTop, scrollElem, dataCount, isScrolledToLast, direction) {
      if (isScrolledToLast && direction === "down") {
        scrollElem.style.paddingTop = paddingTop + "px";
        scrollElem.style.paddingBottom = "0px";
      } else {
        scrollElem.style.paddingTop = paddingTop + "px";
        scrollElem.style.paddingBottom = this.cardHeight * dataCount - paddingTop + "px";
      }
    };
    VirtualLayoutRender2.prototype.getData = function(keyField, column, take, skip) {
      var query = this.query.clone();
      var predicate = new Predicate(keyField, "equal", column, true);
      query.where(predicate);
      query.take(take);
      query.skip(skip);
      query.addParams("KanbanVirtualScroll", "KanbanVirtualScroll");
      if (this.parent.dataSource && "result" in this.parent.dataSource) {
        var def = this.eventPromise({
          requestType: ""
        }, query);
        return def.promise;
      }
      return this.parent.dataModule.dataManager.executeQuery(query);
    };
    VirtualLayoutRender2.prototype.eventPromise = function(args, query) {
      var state = this.getStateEventArgument(query);
      var def = new Deferred();
      state.updateData = def.resolve;
      state.action = args;
      return def;
    };
    VirtualLayoutRender2.prototype.getStateEventArgument = function(query) {
      var adaptr = new UrlAdaptor();
      var dm = new DataManager({
        url: "",
        adaptor: new UrlAdaptor()
      });
      var state = adaptr.processQuery(dm, query);
      var data = JSON.parse(state.data);
      return extend2(data, state.pvtData);
    };
    VirtualLayoutRender2.prototype.dataManagerSuccess = function(e, type) {
      var _this = this;
      var resultData;
      if (type) {
        resultData = extend2([], !isNullOrUndefined2(e.result.result) ? e.result.result : e.result, null, true);
      } else {
        this.parent.trigger(dataBinding, e, function(args) {
          resultData = extend2([], !isNullOrUndefined2(args.result.result) ? args.result.result : args.result, null, true);
          _this.parent.trigger(dataBound, null, function() {
            return _this.parent.hideSpinner();
          });
        });
      }
      return resultData;
    };
    VirtualLayoutRender2.prototype.dataManagerFailure = function(e) {
      var _this = this;
      if (this.parent.isDestroyed) {
        return;
      }
      this.parent.trigger(actionFailure, {
        error: e
      }, function() {
        return _this.parent.hideSpinner();
      });
    };
    VirtualLayoutRender2.prototype.onColScrollShowSkeleton = function(args) {
      var target = args.target;
      if (this.parent.element.querySelectorAll(".e-card-skeleton-wrapper").length > 0) {
        return;
      }
      var key = target.parentElement.getAttribute("data-key");
      var previousScrollTop = this.scrollStatus[key].previousScrollTop;
      var parentElemHeight = target.parentElement.clientHeight;
      if (target.scrollTop - previousScrollTop > parentElemHeight || previousScrollTop - target.scrollTop > parentElemHeight) {
        this.showSkeleton(target, this.scrollStatus[key].singleIndexCardCount);
      }
    };
    VirtualLayoutRender2.prototype.showSkeleton = function(cardWrapper, skeletonCount) {
      var cardVirtualSkeletonWrapper = createElement2("div", {
        className: "e-card-virtual-skeleton-wrapper",
        attrs: {
          "role": "listbox"
        }
      });
      cardWrapper.parentElement.insertBefore(cardVirtualSkeletonWrapper, cardWrapper);
      cardVirtualSkeletonWrapper.style.position = "absolute";
      cardVirtualSkeletonWrapper.style.zIndex = "10";
      for (var j = 0; j < skeletonCount; j++) {
        var skeletonWrapper = createElement2("div", {
          className: "e-card-skeleton-wrapper"
        });
        var skeleton = createElement2("span", {
          className: "e-skeleton e-skeleton-text e-shimmer-wave"
        });
        skeleton.style.height = this.cardHeight + "px";
        if (!isNullOrUndefined2(cardWrapper.querySelector(".e-card"))) {
          skeleton.style.width = cardWrapper.querySelector(".e-card").getBoundingClientRect().width + "px";
        }
        skeletonWrapper.appendChild(skeleton);
        cardVirtualSkeletonWrapper.appendChild(skeletonWrapper);
      }
    };
    VirtualLayoutRender2.prototype.hideSkeleton = function(cardWrapper) {
      setTimeout(function() {
        var skeletonWrapper = cardWrapper.querySelectorAll(".e-card-virtual-skeleton-wrapper");
        for (var i = 0; i < skeletonWrapper.length; i++) {
          detach2(skeletonWrapper[i]);
        }
      }, 50);
    };
    VirtualLayoutRender2.prototype.onColumnScroll = function(e) {
      var _this = this;
      var target = e.target;
      var currentScrolledHeight = target.scrollTop;
      var columnKey;
      if (target.offsetParent) {
        columnKey = target.offsetParent.getAttribute("data-key");
        this.parent.scrollPosition.column[columnKey] = {
          left: target.scrollLeft,
          top: target.scrollTop
        };
      }
      if (this.parent.enableVirtualization) {
        var cardWrapper_1 = target;
        var dataCount = 0;
        var columnData = this.getColumnCards()[columnKey];
        var currentColumnDataCount = this.parent.dataModule.isRemote() ? this.parent.columnDataCount[columnKey] : columnData.length;
        dataCount += currentColumnDataCount;
        var overallHeight = this.cardHeight * dataCount;
        var removeIndex = [];
        var addIndex = [];
        this.checkScrollDirection(columnKey, currentScrolledHeight);
        if (this.findScrollSpeed(target, columnKey) === "fast" && currentScrolledHeight > overallHeight) {
          this.hideSkeleton(cardWrapper_1.parentElement);
          return;
        }
        var maxBlock = this.scrollStatus[columnKey].maxBlock;
        var isLastBlockRendered = this.scrollStatus[columnKey].currentBlockIndex.indexOf(maxBlock) > -1;
        var isDuplicateScroll = e.timeStamp - this.scrollStatus[columnKey].previousTimeStamps < 300;
        if (isLastBlockRendered && !isNullOrUndefined2(this.scrollStatus[columnKey].previousTimeStamps) && isDuplicateScroll) {
          this.hideSkeleton(cardWrapper_1.parentElement);
          return;
        }
        this.scrollStatus[columnKey].previousTimeStamps = e.timeStamp;
        var viewInfo_1 = this.getInfoFromView(this.scrollStatus[columnKey]);
        removeIndex = viewInfo_1.currentBlockIndex.filter(function(val) {
          return viewInfo_1.newBlockIndex.indexOf(val) === -1;
        });
        addIndex = viewInfo_1.newBlockIndex.filter(function(val) {
          return viewInfo_1.currentBlockIndex.indexOf(val) === -1;
        });
        var isScrolledToLast = currentScrolledHeight + target.clientHeight >= overallHeight;
        var transformY = isScrolledToLast ? overallHeight - cardWrapper_1.querySelector("." + CARD_VIRTUAL_WRAPPER_CLASS).childElementCount * this.cardHeight : this.getTranslateY(viewInfo_1);
        var cardVirtualElement_1 = cardWrapper_1.querySelector("." + CARD_VIRTUAL_WRAPPER_CLASS);
        if (removeIndex.length > 0) {
          var removeStartIndex = void 0;
          var removeEndIndex = void 0;
          if (removeIndex[0] === 1) {
            removeStartIndex = 0;
            removeEndIndex = removeIndex.length * this.scrollStatus[columnKey].singleIndexCardCount - 1;
          } else {
            removeStartIndex = (removeIndex[0] - 1) * this.scrollStatus[columnKey].singleIndexCardCount;
            removeEndIndex = removeStartIndex + removeIndex.length * this.scrollStatus[columnKey].singleIndexCardCount;
          }
          this.removeCardsOnScroll(cardVirtualElement_1, this.scrollStatus[columnKey].scrollDirection === "down" ? true : false, removeStartIndex, removeEndIndex);
        }
        if (addIndex.length > 0) {
          if (this.parent.dataModule.isRemote()) {
            var visibleStartIndex = (addIndex[0] - 1) * this.scrollStatus[columnKey].singleIndexCardCount;
            var resultData_1 = [];
            var dataManager = this.getData(this.parent.keyField, columnKey, this.scrollStatus[columnKey].singleIndexCardCount * addIndex.length, visibleStartIndex);
            dataManager.then(function(e2) {
              resultData_1 = _this.dataManagerSuccess(e2);
              _this.scrollCardInsert(columnKey, cardVirtualElement_1, target, currentScrolledHeight, cardWrapper_1, _this.scrollStatus[columnKey].scrollDirection === "down" ? 0 : resultData_1.length - 1, true, resultData_1, null);
            }).catch(function(e2) {
              return _this.dataManagerFailure(e2);
            });
          } else {
            var visibleStartIndex = this.scrollStatus[columnKey].scrollDirection === "down" ? (addIndex[0] - 1) * this.scrollStatus[columnKey].singleIndexCardCount : (addIndex[0] - 1) * this.scrollStatus[columnKey].singleIndexCardCount + this.scrollStatus[columnKey].singleIndexCardCount * addIndex.length - 1;
            var visibleLength = this.scrollStatus[columnKey].scrollDirection === "down" ? visibleStartIndex + this.scrollStatus[columnKey].singleIndexCardCount * addIndex.length : (addIndex[0] - 1) * this.scrollStatus[columnKey].singleIndexCardCount;
            this.scrollCardInsert(columnKey, cardVirtualElement_1, target, currentScrolledHeight, cardWrapper_1, visibleStartIndex, false, columnData, visibleLength);
          }
        }
        this.scrollStatus[columnKey].currentBlockIndex = this.scrollStatus[columnKey].newBlockIndex;
        this.setPadding(transformY, cardVirtualElement_1, currentColumnDataCount, isScrolledToLast, this.scrollStatus[columnKey].scrollDirection);
        viewInfo_1.currentBlockIndex = viewInfo_1.newBlockIndex;
        this.parent.renderTemplates();
        this.hideSkeleton(cardWrapper_1.parentElement);
      }
    };
    VirtualLayoutRender2.prototype.checkScrollDirection = function(columnKey, currentScrolledHeight) {
      this.scrollStatus[columnKey].previousScrollTop = this.scrollStatus[columnKey].currentScrollTop;
      this.scrollStatus[columnKey].currentScrollTop = currentScrolledHeight;
      if (currentScrolledHeight > this.scrollStatus[columnKey].previousScrollTop) {
        this.scrollStatus[columnKey].scrollDirection = "down";
      } else {
        this.scrollStatus[columnKey].scrollDirection = "up";
      }
    };
    VirtualLayoutRender2.prototype.findScrollSpeed = function(target, columnKey) {
      if (this.scrollStatus[columnKey].scrollDirection === "down" && target.scrollTop - this.scrollStatus[columnKey].previousScrollTop > target.clientHeight) {
        return "fast";
      } else if (this.scrollStatus[columnKey].scrollDirection === "up" && this.scrollStatus[columnKey].previousScrollTop - target.scrollTop > target.clientHeight) {
        return "fast";
      }
      return "slow";
    };
    VirtualLayoutRender2.prototype.removeCardsOnScroll = function(cardVirtualElement, isDown, removeStartIndex, removeEndIndex) {
      for (var j = removeStartIndex; j < removeEndIndex; j++) {
        var removableElem = isDown ? cardVirtualElement.firstChild : cardVirtualElement.lastChild;
        while (!isNullOrUndefined2(removableElem) && (removableElem.classList.contains(DRAGGED_CARD_CLASS) || removableElem.classList.contains(DRAGGED_CLONE_CLASS) || removableElem.classList.contains(DROPPED_CLONE_CLASS) || removableElem.classList.contains(CLONED_CARD_CLASS))) {
          removableElem = isDown ? removableElem.nextSibling : removableElem.previousSibling;
        }
        if (!isNullOrUndefined2(removableElem)) {
          detach2(removableElem);
        }
      }
    };
    VirtualLayoutRender2.prototype.scrollCardInsert = function(columnKey, cardVirtualElement, target, currentScrolledHeight, cardWrapper, startNumber, isRemote, resultData, visibleLength) {
      var _this = this;
      var conditonsScrollDownCase = isRemote ? resultData.length : visibleLength;
      var conditonsScrollUpCase = isRemote ? 0 : visibleLength;
      if (resultData.length > 0) {
        var _loop_5 = function(j2) {
          if (!isNullOrUndefined2(resultData[j2])) {
            var cardText = resultData[j2][this_2.parent.cardSettings.headerField];
            var cardIndex = this_2.parent.actionModule.selectionArray.indexOf(cardText);
            var cardElement_1 = this_2.renderCard(resultData[j2]);
            if (cardIndex !== -1) {
              cardElement_1.setAttribute("aria-selected", "true");
              addClass2([cardElement_1], CARD_SELECTION_CLASS);
            }
            var args = {
              data: resultData[j2],
              element: cardElement_1,
              cancel: false
            };
            this_2.parent.trigger(cardRendered, args, function(cardArgs) {
              if (!cardArgs.cancel) {
                if (_this.scrollStatus[columnKey].scrollDirection === "down") {
                  cardVirtualElement.appendChild(cardElement_1);
                } else {
                  cardVirtualElement.insertBefore(cardElement_1, cardVirtualElement.firstChild);
                }
                _this.parent.dragAndDropModule.wireDragEvents(cardElement_1);
                addClass2([cardElement_1], DROPPABLE_CLASS);
              }
            });
          }
        };
        var this_2 = this;
        for (var j = startNumber; this.scrollStatus[columnKey].scrollDirection === "down" ? j < conditonsScrollDownCase : j >= conditonsScrollUpCase; this.scrollStatus[columnKey].scrollDirection === "down" ? j++ : j--) {
          _loop_5(j);
        }
        target.scrollTop = currentScrolledHeight;
      } else {
        cardWrapper.appendChild(this.renderEmptyCard());
      }
    };
    VirtualLayoutRender2.prototype.ensureColumnNotEmpty = function(draggedColumnKey) {
      var singleIndexCardCount = this.scrollStatus[draggedColumnKey].singleIndexCardCount;
      var draggedColumnData = this.columnData[draggedColumnKey];
      var draggedTdColummElement = this.parent.element.querySelector('.e-content-row:not(.e-swimlane-row) [data-key="' + draggedColumnKey + '"]');
      var wrapperELement = draggedTdColummElement.querySelector("." + CARD_VIRTUAL_WRAPPER_CLASS);
      var cardsList = wrapperELement.querySelectorAll("." + CARD_CLASS);
      if (cardsList.length > 0) {
        var lastCardDataId = cardsList[cardsList.length - 1].getAttribute("data-id");
        var firstCardDataId = cardsList[0].getAttribute("data-id");
        var lastCardIndex = void 0;
        var firstCardIndex = void 0;
        if (cardsList.length < singleIndexCardCount * 2) {
          for (var i = 0; i < draggedColumnData.length; i++) {
            if (lastCardDataId === draggedColumnData[i][this.parent.cardSettings.headerField].toString()) {
              lastCardIndex = i;
            }
            if (firstCardDataId === draggedColumnData[i][this.parent.cardSettings.headerField].toString()) {
              firstCardIndex = i;
            }
          }
          var cardCount = cardsList.length;
          for (var i = cardCount; i < singleIndexCardCount * 2; i++) {
            var isLast = lastCardIndex === draggedColumnData.length - 1 ? true : false;
            var nextCardIndex = lastCardIndex < draggedColumnData.length ? lastCardIndex + 1 : firstCardIndex - 1;
            if (nextCardIndex <= draggedColumnData.length) {
              var nextCardData = draggedColumnData[nextCardIndex];
              if (!isNullOrUndefined2(nextCardData)) {
                var nextCard = this.renderCard(nextCardData);
                this.triggerCardRendering(nextCard, nextCardIndex, draggedColumnData, wrapperELement, isLast);
                if (isLast) {
                  firstCardIndex = nextCardIndex;
                } else {
                  lastCardIndex = nextCardIndex;
                }
              }
            }
          }
        }
      }
    };
    VirtualLayoutRender2.prototype.triggerCardRendering = function(nextCard, nextCardIndex, draggedColumnData, wrapperELement, isLast) {
      var _this = this;
      var cardText = draggedColumnData[nextCardIndex][this.parent.cardSettings.headerField];
      var cardIndex = this.parent.actionModule.selectionArray.indexOf(cardText);
      if (cardIndex !== -1) {
        nextCard.setAttribute("aria-selected", "true");
        addClass2([nextCard], CARD_SELECTION_CLASS);
      }
      var args = {
        data: draggedColumnData[nextCardIndex],
        element: nextCard,
        cancel: false
      };
      this.parent.trigger(cardRendered, args, function(cardArgs) {
        if (!cardArgs.cancel) {
          if (!isLast) {
            wrapperELement.appendChild(nextCard);
          } else {
            wrapperELement.insertBefore(nextCard, wrapperELement.querySelectorAll("." + CARD_CLASS)[0]);
          }
          _this.parent.dragAndDropModule.wireDragEvents(nextCard);
          addClass2([nextCard], DROPPABLE_CLASS);
        }
      });
    };
    VirtualLayoutRender2.prototype.ensureBlocks = function(info) {
      var index = info.newBlockIndex[info.block];
      var maxPage = Math.ceil(info.totalColumnData / info.singleIndexCardCount);
      var max = Math.max;
      var indexes;
      if (info.scrollDirection === "down") {
        indexes = index >= maxPage ? [max(index, 1), --index, --index].reverse() : index + 1 >= maxPage ? [max(index - 1, 1), index, ++index] : [max(index, 1), ++index, ++index];
      } else {
        indexes = index === maxPage ? [max(index - 2, 1), max(index - 1, 1), index] : [max(index - 1, 1), index, index + 1];
      }
      return indexes.filter(function(indexRemoveZero) {
        return indexRemoveZero > 0;
      });
    };
    VirtualLayoutRender2.prototype.getInfoFromView = function(scrollStatus) {
      var isBlockAdded = false;
      var infoType = scrollStatus;
      infoType.page = this.getPageFromTop(scrollStatus);
      infoType.newBlockIndex = this.getBlockIndexes(infoType.page);
      var blocks = this.ensureBlocks(infoType);
      if (infoType.newBlockIndex.toString() !== blocks.toString()) {
        var newBlock = blocks[blocks.length - 1];
        if (infoType.newBlockIndex.indexOf(newBlock) === -1) {
          isBlockAdded = true;
        }
      }
      infoType.newBlockIndex = isBlockAdded ? blocks : infoType.newBlockIndex;
      return infoType;
    };
    VirtualLayoutRender2.prototype.getBlockIndexes = function(page) {
      return [page + (page - 1), page * 2];
    };
    VirtualLayoutRender2.prototype.getPageFromTop = function(info) {
      var _this = this;
      var total = info.totalColumnData;
      var page = 0;
      this.offsetKeys = Object.keys(info.offsets);
      this.offsetKeys.some(function(offset) {
        var iOffset = Number(offset);
        var border = info.currentScrollTop <= info.offsets[parseInt(offset, 10)] || iOffset === total && info.currentScrollTop > info.offsets[parseInt(offset, 10)];
        if (border) {
          var maxPage = Math.ceil(total / info.singleIndexCardCount);
          if (_this.offsetKeys.length % 2 !== 0 && iOffset.toString() === _this.offsetKeys[_this.offsetKeys.length - 2] && info.currentScrollTop <= info.offsets[_this.offsetKeys.length - 1]) {
            iOffset = iOffset + 1 > maxPage ? maxPage : iOffset + 1;
          }
          iOffset = iOffset > maxPage ? maxPage : iOffset;
          info.block = iOffset % 2 === 0 ? 1 : 0;
          page = Math.max(1, Math.min(_this.getPage(iOffset, maxPage), maxPage));
        }
        return border;
      });
      return page;
    };
    VirtualLayoutRender2.prototype.getPage = function(block, maxPage) {
      if (block + 1 > maxPage) {
        return block % 2 === 0 ? block / 2 : (block - 1) / 2;
      } else {
        return block % 2 === 0 ? block / 2 : (block + 1) / 2;
      }
    };
    VirtualLayoutRender2.prototype.onAdaptiveScroll = function(e) {
      if (this.parent.touchModule.tabHold && !this.parent.touchModule.mobilePopup) {
        e.preventDefault();
      }
    };
    VirtualLayoutRender2.prototype.isColumnVisible = function(column) {
      var _this = this;
      var isVisible4 = false;
      var isNumeric = typeof column.keyField === "number";
      if (isNumeric) {
        isVisible4 = this.parent.actionModule.hideColumnKeys.indexOf(column.keyField.toString()) === -1;
      } else {
        column.keyField.split(",").forEach(function(key) {
          isVisible4 = _this.parent.actionModule.hideColumnKeys.indexOf(key) === -1;
        });
      }
      return isVisible4;
    };
    VirtualLayoutRender2.prototype.renderLimits = function(column, target) {
      var limits = createElement2("div", {
        className: LIMITS_CLASS
      });
      if (column.minCount) {
        limits.appendChild(createElement2("div", {
          className: MIN_COUNT_CLASS,
          innerHTML: this.parent.localeObj.getConstant("min") + ": " + column.minCount.toString()
        }));
      }
      if (column.maxCount) {
        limits.appendChild(createElement2("div", {
          className: MAX_COUNT_CLASS,
          innerHTML: this.parent.localeObj.getConstant("max") + ": " + column.maxCount.toString()
        }));
      }
      if (limits.childElementCount > 0) {
        if (target.querySelector("." + CARD_WRAPPER_CLASS)) {
          target.insertBefore(limits, target.firstElementChild);
        } else {
          target.appendChild(limits);
        }
      }
    };
    VirtualLayoutRender2.prototype.renderValidation = function() {
      var _this = this;
      this.parent.columns.forEach(function(column) {
        if (!column.minCount && !column.maxCount) {
          return;
        }
        var cardData = _this.columnData[column.keyField];
        var keySelector = '[data-key="' + column.keyField + '"]';
        var headerCell = _this.parent.element.querySelector("." + (HEADER_CELLS_CLASS + keySelector));
        var rowCells = [].slice.call(_this.parent.element.querySelectorAll("." + (CONTENT_CELLS_CLASS + keySelector)));
        _this.renderLimits(column, headerCell);
        var colorClass = _this.getValidationClass(column, cardData.length);
        if (colorClass) {
          addClass2(rowCells.concat(headerCell), colorClass);
        }
      });
    };
    VirtualLayoutRender2.prototype.getValidationClass = function(column, count) {
      var colorClass;
      if (column.maxCount && count > column.maxCount) {
        colorClass = MAX_COLOR_CLASS;
      } else if (column.minCount && count < column.minCount) {
        colorClass = MIN_COLOR_CLASS;
      }
      return colorClass;
    };
    VirtualLayoutRender2.prototype.refreshValidation = function() {
      var validations = [].slice.call(this.parent.element.querySelectorAll("." + LIMITS_CLASS));
      validations.forEach(function(node) {
        remove(node);
      });
      var minClass = [].slice.call(this.parent.element.querySelectorAll("." + MIN_COLOR_CLASS));
      removeClass2(minClass, MIN_COLOR_CLASS);
      var maxClass = [].slice.call(this.parent.element.querySelectorAll("." + MAX_COLOR_CLASS));
      removeClass2(maxClass, MAX_COLOR_CLASS);
      this.renderValidation();
    };
    VirtualLayoutRender2.prototype.getColumnData = function(columnValue, dataSource) {
      var _this = this;
      if (dataSource === void 0) {
        dataSource = this.parent.kanbanData;
      }
      var cardData = [];
      var isNumeric = typeof columnValue === "number";
      if (isNumeric) {
        var keyData = dataSource.filter(function(cardObj) {
          return cardObj[_this.parent.keyField] === columnValue;
        });
        cardData = cardData.concat(keyData);
      } else {
        var columnKeys = columnValue.split(",");
        var _loop_6 = function(key2) {
          var keyData2 = dataSource.filter(function(cardObj) {
            return cardObj[_this.parent.keyField] === key2.trim();
          });
          cardData = cardData.concat(keyData2);
        };
        for (var _i = 0, columnKeys_1 = columnKeys; _i < columnKeys_1.length; _i++) {
          var key = columnKeys_1[_i];
          _loop_6(key);
        }
      }
      this.sortCategory(cardData);
      return cardData;
    };
    VirtualLayoutRender2.prototype.sortCategory = function(cardData) {
      var key = this.parent.cardSettings.headerField;
      var direction = this.parent.sortSettings.direction;
      switch (this.parent.sortSettings.sortBy) {
        case "DataSourceOrder":
          this.sortOrder(key, direction, cardData);
          break;
        case "Custom":
        case "Index":
          if (this.parent.sortSettings.field) {
            key = this.parent.sortSettings.field;
          }
          this.sortOrder(key, direction, cardData);
          break;
      }
      return cardData;
    };
    VirtualLayoutRender2.prototype.sortOrder = function(key, direction, cardData) {
      var isNumeric = true;
      if (this.parent.kanbanData.length > 0) {
        isNumeric = typeof this.parent.kanbanData[0][key] === "number";
      }
      if (!isNumeric && this.parent.sortSettings.sortBy === "Index") {
        return cardData;
      }
      var first;
      var second;
      cardData = cardData.sort(function(firstData, secondData) {
        if (!isNumeric) {
          first = firstData[key].toLowerCase();
          second = secondData[key].toLowerCase();
        } else {
          first = firstData[key];
          second = secondData[key];
        }
        return first > second ? 1 : second > first ? -1 : 0;
      });
      if (direction === "Descending") {
        cardData.reverse();
      }
      return cardData;
    };
    VirtualLayoutRender2.prototype.documentClick = function(args) {
      if (args.target.classList.contains(SWIMLANE_OVERLAY_CLASS) && this.parent.element.querySelector("." + SWIMLANE_RESOURCE_CLASS).classList.contains("e-popup-open")) {
        this.treePopup.hide();
        removeClass2([this.popupOverlay], "e-enable");
      }
      if (closest2(args.target, "." + ROOT_CLASS)) {
        return;
      }
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_CLASS + "." + CARD_SELECTION_CLASS));
      removeClass2(cards, CARD_SELECTION_CLASS);
      this.disableAttributeSelection(cards);
    };
    VirtualLayoutRender2.prototype.disableAttributeSelection = function(cards) {
      if (cards instanceof Element) {
        cards.setAttribute("aria-selected", "false");
      } else {
        cards.forEach(function(card) {
          card.setAttribute("aria-selected", "false");
        });
      }
    };
    VirtualLayoutRender2.prototype.getColumnCards = function(data) {
      var _this = this;
      var columnData = {};
      this.columnKeys = [];
      this.parent.columns.forEach(function(column) {
        var isNumeric = typeof column.keyField === "number";
        if (isNumeric) {
          _this.columnKeys = _this.columnKeys.concat(column.keyField.toString());
        } else {
          _this.columnKeys = _this.columnKeys.concat(column.keyField.split(",").map(function(e) {
            return e.trim();
          }));
        }
        var cardData = _this.getColumnData(column.keyField, data);
        columnData[column.keyField] = cardData;
      });
      return columnData;
    };
    VirtualLayoutRender2.prototype.refreshHeaders = function() {
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      [].slice.call(header.children).forEach(function(child) {
        return remove(child);
      });
      this.renderHeader(header);
    };
    VirtualLayoutRender2.prototype.refreshCards = function() {
      this.parent.resetTemplates(["cardTemplate"]);
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CARD_VIRTUAL_WRAPPER_CLASS));
      cards.forEach(function(card) {
        return remove(card);
      });
      this.renderCards();
      this.wireDragEvent();
      this.parent.renderTemplates();
    };
    VirtualLayoutRender2.prototype.refresh = function() {
      var _this = this;
      var isColumnTemplateRefreshed = false;
      this.parent.columns.forEach(function(column) {
        if (column.showItemCount) {
          if (column && column.template && !isColumnTemplateRefreshed) {
            _this.refreshHeaders();
            isColumnTemplateRefreshed = true;
          }
          var countSelector = "." + HEADER_CELLS_CLASS + '[data-key="' + column.keyField + '"] .' + CARD_ITEM_COUNT_CLASS;
          var itemCount = _this.parent.element.querySelector(countSelector);
          if (itemCount) {
            var columnDataLength = _this.parent.dataModule.isRemote() ? _this.parent.columnDataCount[column.keyField] : _this.columnData[column.keyField].length;
            var isNumeric = typeof column.keyField === "number";
            var cardLength = 0;
            if (isNumeric) {
              cardLength = [].slice.call(_this.parent.element.querySelectorAll("." + CARD_CLASS + '[data-key="' + column.keyField + '"]')).length;
            } else {
              var keys4 = column.keyField.split(",");
              for (var _i = 0, keys_2 = keys4; _i < keys_2.length; _i++) {
                var key = keys_2[_i];
                var cards = [].slice.call(_this.parent.element.querySelectorAll("." + CARD_CLASS + '[data-key="' + key.trim() + '"]'));
                cardLength = cards.length + cardLength;
              }
            }
            itemCount.innerHTML = "- " + columnDataLength + " " + _this.parent.localeObj.getConstant("items");
          }
        }
      });
      this.refreshValidation();
    };
    VirtualLayoutRender2.prototype.updateScrollPosition = function() {
      var _this = this;
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (content) {
        if (!Browser2.isIE) {
          content.scrollTo(this.parent.scrollPosition.content.left, this.parent.scrollPosition.content.top);
        } else {
          content.scrollTop = this.parent.scrollPosition.content.top;
          content.scrollLeft = this.parent.scrollPosition.content.left;
        }
      }
      var cardWrapper = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      cardWrapper.forEach(function(wrapper) {
        if (wrapper.offsetParent) {
          var scrollData = _this.parent.scrollPosition.column[wrapper.offsetParent.getAttribute("data-key")];
          if (scrollData) {
            if (!Browser2.isIE) {
              wrapper.scrollTo(scrollData.left, scrollData.top);
            } else {
              wrapper.scrollTop = scrollData.top;
              wrapper.scrollLeft = scrollData.left;
            }
          }
        }
      });
    };
    VirtualLayoutRender2.prototype.renderCardBasedOnIndex = function(data, index, isDropped, requestType) {
      var _this = this;
      var key = data[this.parent.keyField];
      var cardRow = this.parent.element.querySelector(".e-content-row:not(.e-swimlane-row)");
      if (this.parent.sortSettings.sortBy !== "Index") {
        var field_1 = this.parent.cardSettings.headerField;
        if (this.parent.sortSettings.sortBy === "Custom") {
          field_1 = this.parent.sortSettings.field;
        }
        if (isNullOrUndefined2(this.parent.swimlaneSettings.keyField)) {
          index = this.getColumnData(key, this.parent.kanbanData).findIndex(function(colData) {
            return colData[field_1] === data[field_1];
          });
        } else {
          var swimlaneDatas = this.parent.getSwimlaneData(data[this.parent.swimlaneSettings.keyField]);
          index = this.getColumnData(key, swimlaneDatas).findIndex(function(colData) {
            return colData[field_1] === data[field_1];
          });
        }
      } else if (this.parent.sortSettings.sortBy === "Index" && this.parent.sortSettings.field && this.parent.sortSettings.direction === "Ascending") {
        index = data[this.parent.sortSettings.field] - 1;
      }
      if (cardRow) {
        var td = [].slice.call(cardRow.children).filter(function(e) {
          return e.getAttribute("data-key").replace(/\s/g, "").split(",").indexOf(key.toString().replace(/\s/g, "")) !== -1;
        })[0];
        var cardWrapper_2 = td.querySelector("." + CARD_VIRTUAL_WRAPPER_CLASS);
        var emptyCard = cardWrapper_2.querySelector("." + EMPTY_CARD_CLASS);
        if (emptyCard) {
          remove(emptyCard);
        }
        var cardElement_2 = this.renderCard(data);
        if (this.parent.allowDragAndDrop && td.classList.contains(DRAG_CLASS)) {
          this.parent.dragAndDropModule.wireDragEvents(cardElement_2);
          addClass2([cardElement_2], DROPPABLE_CLASS);
        }
        var args = {
          data,
          element: cardElement_2,
          cancel: false
        };
        this.parent.trigger(cardRendered, args, function(cardArgs) {
          var addCardCondition = isDropped ? true : cardWrapper_2.childNodes.length < _this.scrollStatus[key].singleIndexCardCount;
          if (!cardArgs.cancel && addCardCondition || !isNullOrUndefined2(requestType)) {
            if (isNullOrUndefined2(index) || cardWrapper_2.children.length === 0) {
              cardWrapper_2.appendChild(cardElement_2);
            } else {
              cardWrapper_2.insertBefore(cardElement_2, cardWrapper_2.childNodes[index]);
            }
          }
        });
      }
    };
    VirtualLayoutRender2.prototype.removeCard = function(data) {
      var cardKey = data[this.parent.cardSettings.headerField];
      var cardElement = this.parent.element.querySelector("." + CARD_CLASS + '[data-id="' + cardKey + '"]');
      if (cardElement) {
        this.isSelectedCard = cardElement.classList.contains(CARD_SELECTION_CLASS) ? true : false;
        var cardContainer = cardElement.parentElement;
        remove(cardElement);
        if (cardContainer.querySelectorAll("." + CARD_CLASS + ":not(." + CLONED_CARD_CLASS + ")").length === 0) {
          cardContainer.appendChild(this.renderEmptyCard());
        }
      }
    };
    VirtualLayoutRender2.prototype.wireEvents = function() {
      var _this = this;
      EventHandler2.add(this.parent.element, "click", this.parent.actionModule.clickHandler, this.parent.actionModule);
      EventHandler2.add(this.parent.element, "dblclick", this.parent.actionModule.doubleClickHandler, this.parent.actionModule);
      EventHandler2.add(document, Browser2.touchStartEvent, this.documentClick, this);
      window.addEventListener("resize", this.winResize);
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      EventHandler2.add(content, "scroll", this.onContentScroll, this);
      var cardWrapper = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      cardWrapper.forEach(function(wrapper) {
        if (_this.parent.isInitialRender && wrapper.offsetParent) {
          _this.parent.scrollPosition.column[wrapper.offsetParent.getAttribute("data-key")] = {
            left: 0,
            top: 0
          };
        }
        EventHandler2.add(wrapper, "scroll", _this.onColScrollShowSkeleton, _this);
        EventHandler2.add(wrapper, "scroll", debounce2(_this.onColumnScroll, 200), _this);
      });
      if (this.parent.isAdaptive) {
        this.parent.touchModule.wireTouchEvents();
        content.scrollLeft = this.scrollLeft;
      }
      this.wireDragEvent();
    };
    VirtualLayoutRender2.prototype.unWireEvents = function() {
      var _this = this;
      EventHandler2.remove(this.parent.element, "click", this.parent.actionModule.clickHandler);
      EventHandler2.remove(this.parent.element, "dblclick", this.parent.actionModule.doubleClickHandler);
      EventHandler2.remove(document, Browser2.touchStartEvent, this.documentClick);
      window.removeEventListener("resize", this.winResize);
      this.winResize = null;
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (content) {
        EventHandler2.remove(content, "scroll", this.onContentScroll);
        EventHandler2.remove(content, "scroll", this.onColScrollShowSkeleton);
        if (this.parent.allowDragAndDrop) {
          this.unWireDragEvent();
        }
      }
      var cardWrapper = [].slice.call(this.parent.element.querySelectorAll("." + CARD_WRAPPER_CLASS));
      if (cardWrapper.length > 0) {
        cardWrapper.forEach(function(wrapper) {
          EventHandler2.remove(wrapper, "scroll", debounce2(_this.onColumnScroll, 200));
        });
      }
      if (this.parent.isAdaptive) {
        this.parent.touchModule.unWireTouchEvents();
      }
    };
    VirtualLayoutRender2.prototype.wireDragEvent = function() {
      var _this = this;
      if (this.parent.allowDragAndDrop) {
        var cards = [].slice.call(this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS + "." + DRAG_CLASS + " ." + CARD_CLASS));
        addClass2(cards, DROPPABLE_CLASS);
        if (cards.length > 0) {
          cards.forEach(function(card) {
            return _this.parent.dragAndDropModule.wireDragEvents(card);
          });
        }
      }
    };
    VirtualLayoutRender2.prototype.unWireDragEvent = function() {
      var _this = this;
      var cards = [].slice.call(this.parent.element.querySelectorAll("." + CONTENT_CELLS_CLASS + "." + DRAG_CLASS + " ." + CARD_CLASS));
      removeClass2(cards, DROPPABLE_CLASS);
      if (cards.length > 0) {
        cards.forEach(function(card) {
          return _this.parent.dragAndDropModule.unWireDragEvents(card);
        });
      }
    };
    VirtualLayoutRender2.prototype.destroy = function() {
      this.parent.resetTemplates();
      this.parent.off(dataReady, this.initRender);
      this.parent.off(contentReady, this.scrollUiUpdate);
      this.unWireEvents();
      var header = this.parent.element.querySelector("." + HEADER_CLASS);
      if (header) {
        remove(header);
      }
      var content = this.parent.element.querySelector("." + CONTENT_CLASS);
      if (content) {
        remove(content);
      }
      if (this.treeViewObj) {
        this.treeViewObj.destroy();
        this.treeViewObj = null;
      }
      if (this.treePopup) {
        this.treePopup.destroy();
        this.treePopup = null;
      }
      var swimlaneToolBarEle = this.parent.element.querySelector("." + SWIMLANE_HEADER_CLASS);
      if (swimlaneToolBarEle) {
        remove(swimlaneToolBarEle);
      }
      var swimlaneContent = this.parent.element.querySelector("." + SWIMLANE_CONTENT_CLASS);
      if (swimlaneContent) {
        remove(swimlaneContent);
      }
    };
    return VirtualLayoutRender2;
  }(MobileLayout)
);

// node_modules/@syncfusion/ej2-kanban/src/kanban/base/kanban.js
var __extends93 = /* @__PURE__ */ function() {
  var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf || {
      __proto__: []
    } instanceof Array && function(d2, b2) {
      d2.__proto__ = b2;
    } || function(d2, b2) {
      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
    };
    return extendStatics(d, b);
  };
  return function(d, b) {
    extendStatics(d, b);
    function __() {
      this.constructor = d;
    }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  };
}();
var __decorate89 = function(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Kanban = (
  /** @class */
  function(_super) {
    __extends93(Kanban2, _super);
    function Kanban2(options, element2) {
      var _this = _super.call(this, options, element2) || this;
      _this.columnDataCount = {};
      _this.needsID = true;
      return _this;
    }
    Kanban2.prototype.preRender = function() {
      this.isAdaptive = Browser2.isDevice;
      this.kanbanData = [];
      if (!this.enablePersistence || !this.swimlaneToggleArray) {
        this.swimlaneToggleArray = [];
      }
      this.activeCardData = {
        data: null,
        element: null
      };
      var defaultLocale = {
        items: "items",
        min: "Min",
        max: "Max",
        cardsSelected: "Cards Selected",
        addTitle: "Add New Card",
        editTitle: "Edit Card Details",
        deleteTitle: "Delete Card",
        deleteContent: "Are you sure you want to delete this card?",
        save: "Save",
        delete: "Delete",
        cancel: "Cancel",
        yes: "Yes",
        no: "No",
        close: "Close",
        noCard: "No cards to display",
        unassigned: "Unassigned",
        cards: "Cards"
      };
      this.localeObj = new L10n2(this.getModuleName(), defaultLocale, this.locale);
      this.scrollPosition = {
        content: {
          left: 0,
          top: 0
        },
        column: {}
      };
      this.isInitialRender = true;
    };
    Kanban2.prototype.requiredModules = function() {
      var modules = [];
      return modules;
    };
    Kanban2.prototype.getPersistData = function() {
      if (this.dataSource.length > 0) {
        return this.addOnPersist(["columns", "dataSource", "swimlaneToggleArray"]);
      } else {
        return this.addOnPersist(["columns", "kanbanData", "swimlaneToggleArray"]);
      }
    };
    Kanban2.prototype.getModuleName = function() {
      return "kanban";
    };
    Kanban2.prototype.render = function() {
      var addClasses = [ROOT_CLASS];
      var removeClasses = [];
      if (this.enableRtl) {
        addClasses.push(RTL_CLASS);
      } else {
        removeClasses.push(RTL_CLASS);
      }
      if (this.isAdaptive) {
        addClasses.push(DEVICE_CLASS);
      } else {
        removeClasses.push(DEVICE_CLASS);
      }
      if (this.cssClass) {
        addClasses.push(this.cssClass);
      }
      classList(this.element, addClasses, removeClasses);
      this.element.style.width = formatUnit(this.width);
      this.element.style.height = formatUnit(this.height);
      this.element.setAttribute("role", "application");
      this.element.setAttribute("aria-label", "Kanban Board");
      createSpinner({
        target: this.element
      });
      this.showSpinner();
      this.initializeModules();
    };
    Kanban2.prototype.onPropertyChanged = function(newProp, oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "cssClass":
            if (oldProp.cssClass) {
              removeClass2([this.element], oldProp.cssClass);
            }
            if (newProp.cssClass) {
              addClass2([this.element], newProp.cssClass);
            }
            break;
          case "enableRtl":
          case "locale":
            this.refresh();
            break;
          case "width":
            this.element.style.width = formatUnit(newProp.width);
            this.element.querySelector("." + HEADER_CLASS).firstElementChild.style.width = "auto";
            this.notify(contentReady, {});
            break;
          case "height":
            this.element.style.height = formatUnit(newProp.height);
            this.element.querySelector("." + CONTENT_CLASS).style.height = "auto";
            this.notify(contentReady, {});
            break;
          case "dataSource":
          case "query":
            if (this.dataModule) {
              this.dataModule.setState({
                isDataChanged: false
              });
            }
            this.dataModule = new Data(this);
            break;
          case "columns":
          case "constraintType":
            this.notify(dataReady, {
              processedData: this.kanbanData
            });
            break;
          case "swimlaneSettings":
            this.onSwimlaneSettingsPropertyChanged(newProp.swimlaneSettings, oldProp.swimlaneSettings);
            break;
          case "cardSettings":
            this.onCardSettingsPropertyChanged(newProp.cardSettings, oldProp.cardSettings);
            break;
          case "allowDragAndDrop":
            if (newProp.allowDragAndDrop) {
              if (this.enableVirtualization) {
                this.virtualLayoutModule.wireDragEvent();
              } else {
                this.layoutModule.wireDragEvent();
              }
            } else {
              if (this.enableVirtualization) {
                this.virtualLayoutModule.unWireDragEvent();
              } else {
                this.layoutModule.unWireDragEvent();
              }
            }
            break;
          case "enableTooltip":
            if (this.tooltipModule) {
              this.tooltipModule.destroy();
              this.tooltipModule = null;
            }
            if (newProp.enableTooltip) {
              this.tooltipModule = new KanbanTooltip(this);
              if (this.enableVirtualization) {
                this.virtualLayoutModule.refreshCards();
              } else {
                this.layoutModule.refreshCards();
              }
            }
            break;
          case "dialogSettings":
            if (newProp.dialogSettings) {
              this.dialogModule = new KanbanDialog(this);
            }
            break;
          case "allowKeyboard":
            if (this.keyboardModule) {
              this.keyboardModule.destroy();
              this.keyboardModule = null;
            }
            if (newProp.allowKeyboard) {
              this.keyboardModule = new Keyboard(this);
            }
            break;
          case "stackedHeaders":
            if (this.enableVirtualization) {
              this.virtualLayoutModule.refreshHeaders();
            } else {
              this.layoutModule.refreshHeaders();
            }
            break;
          case "sortSettings":
            this.notify(dataReady, {
              processedData: this.kanbanData
            });
            break;
          default:
            break;
        }
      }
    };
    Kanban2.prototype.onSwimlaneSettingsPropertyChanged = function(newProp, _oldProp) {
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "keyField":
          case "textField":
          case "showEmptyRow":
          case "showItemCount":
          case "template":
          case "sortDirection":
            this.notify(dataReady, {
              processedData: this.kanbanData
            });
            break;
          case "enableFrozenRows":
            if (this.layoutModule.frozenSwimlaneRow && !this.swimlaneSettings.enableFrozenRows) {
              this.layoutModule.removeFrozenRows();
            }
            break;
        }
      }
    };
    Kanban2.prototype.onCardSettingsPropertyChanged = function(newProp, _oldProp) {
      var cards = [];
      for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
        var prop = _a[_i];
        switch (prop) {
          case "showHeader":
          case "headerField":
          case "contentField":
          case "template":
          case "tagsField":
          case "grabberField":
          case "footerCssField":
            if (this.enableVirtualization) {
              this.virtualLayoutModule.refreshCards();
            } else {
              this.layoutModule.refreshCards();
            }
            break;
          case "selectionType":
            cards = this.getSelectedCards();
            if (cards.length > 0) {
              removeClass2(cards, CARD_SELECTION_CLASS);
              if (this.enableVirtualization) {
                this.virtualLayoutModule.disableAttributeSelection(cards);
              } else {
                this.layoutModule.disableAttributeSelection(cards);
              }
            }
            break;
        }
      }
    };
    Kanban2.prototype.initializeModules = function() {
      this.dataModule = new Data(this);
      if (this.enableVirtualization) {
        this.virtualLayoutModule = new VirtualLayoutRender(this);
      } else {
        this.layoutModule = new LayoutRender(this);
      }
      if (this.allowKeyboard) {
        this.keyboardModule = new Keyboard(this);
      }
      this.actionModule = new Action(this);
      this.crudModule = new Crud(this);
      this.dragAndDropModule = new DragAndDrop(this);
      this.dialogModule = new KanbanDialog(this);
      if (this.enableTooltip) {
        this.tooltipModule = new KanbanTooltip(this);
      }
      if (Browser2.isDevice || Browser2.isTouch) {
        this.touchModule = new KanbanTouch(this);
      }
    };
    Kanban2.prototype.renderTemplates = function() {
      if (this.isReact) {
        this.renderReactTemplates();
      }
    };
    Kanban2.prototype.resetTemplates = function(templates) {
      if (this.isReact) {
        this.clearTemplate(templates);
      }
    };
    Kanban2.prototype.destroyModules = function() {
      if (this.layoutModule) {
        this.layoutModule.destroy();
        this.layoutModule = null;
      }
      if (this.keyboardModule) {
        this.keyboardModule.destroy();
        this.keyboardModule = null;
      }
      if (this.touchModule) {
        this.touchModule.destroy();
        this.touchModule = null;
      }
      if (this.tooltipModule) {
        this.tooltipModule.destroy();
        this.tooltipModule = null;
      }
      if (this.virtualLayoutModule) {
        this.virtualLayoutModule.destroy();
        this.virtualLayoutModule = null;
      }
      this.dialogModule = null;
      this.actionModule = null;
      this.crudModule = null;
      this.dataModule = null;
      this.dragAndDropModule = null;
    };
    Kanban2.prototype.templateParser = function(template) {
      if (template) {
        try {
          if (typeof template === "function") {
            return compile4(template);
          } else if (document.querySelectorAll(template).length) {
            return compile4(document.querySelector(template).innerHTML.trim());
          } else {
            return compile4(template);
          }
        } catch (error) {
          return compile4(template);
        }
      }
      return void 0;
    };
    Kanban2.prototype.getCardDetails = function(target) {
      var _this = this;
      var isNumeric = typeof this.kanbanData[0][this.cardSettings.headerField] === "number";
      var targetId = isNumeric ? parseInt(target.getAttribute("data-id"), 10) : target.getAttribute("data-id");
      var cardObj = this.kanbanData.filter(function(data) {
        return data[_this.cardSettings.headerField] === targetId;
      })[0];
      return cardObj;
    };
    Kanban2.prototype.getColumnData = function(columnKey, dataSource) {
      if (this.enableVirtualization) {
        return this.virtualLayoutModule.getColumnCards(dataSource)["" + columnKey] || [];
      }
      return this.layoutModule.getColumnCards(dataSource)["" + columnKey] || [];
    };
    Kanban2.prototype.getSwimlaneData = function(keyField) {
      return this.layoutModule.getSwimlaneCards()["" + keyField] || [];
    };
    Kanban2.prototype.getSelectedCards = function() {
      return [].slice.call(this.element.querySelectorAll("." + CARD_CLASS + "." + CARD_SELECTION_CLASS));
    };
    Kanban2.prototype.showSpinner = function() {
      showSpinner(this.element);
    };
    Kanban2.prototype.hideSpinner = function() {
      hideSpinner(this.element);
    };
    Kanban2.prototype.openDialog = function(action, data) {
      this.dialogModule.openDialog(action, data);
    };
    Kanban2.prototype.closeDialog = function() {
      this.dialogModule.closeDialog();
    };
    Kanban2.prototype.addCard = function(cardData, index) {
      this.crudModule.addCard(cardData, index);
    };
    Kanban2.prototype.updateCard = function(cardData, index) {
      this.crudModule.updateCard(cardData, index);
    };
    Kanban2.prototype.deleteCard = function(cardData) {
      this.crudModule.deleteCard(cardData);
    };
    Kanban2.prototype.addColumn = function(columnOptions, index) {
      this.actionModule.addColumn(columnOptions, index);
    };
    Kanban2.prototype.deleteColumn = function(index) {
      this.actionModule.deleteColumn(index);
    };
    Kanban2.prototype.showColumn = function(key) {
      this.actionModule.showColumn(key);
    };
    Kanban2.prototype.hideColumn = function(key) {
      this.actionModule.hideColumn(key);
    };
    Kanban2.prototype.refreshUI = function(args, index) {
      index = index ? index : 0;
      this.dataModule.refreshUI(args, index);
    };
    Kanban2.prototype.refreshHeader = function() {
      this.resetTemplates(["columnTemplate"]);
      if (this.enableVirtualization) {
        this.virtualLayoutModule.refreshHeaders();
      } else {
        this.layoutModule.refreshHeaders();
      }
      this.renderTemplates();
    };
    Kanban2.prototype.destroy = function() {
      this.destroyModules();
      [].slice.call(this.element.childNodes).forEach(function(node) {
        detach2(node);
      });
      var removeClasses = [ROOT_CLASS];
      if (this.cssClass) {
        removeClasses = removeClasses.concat(this.cssClass.split(" "));
      }
      removeClass2([this.element], removeClasses);
      _super.prototype.destroy.call(this);
    };
    __decorate89([Property2()], Kanban2.prototype, "cssClass", void 0);
    __decorate89([Property2("auto")], Kanban2.prototype, "width", void 0);
    __decorate89([Property2("auto")], Kanban2.prototype, "height", void 0);
    __decorate89([Property2("auto")], Kanban2.prototype, "cardHeight", void 0);
    __decorate89([Property2()], Kanban2.prototype, "enableVirtualization", void 0);
    __decorate89([Property2([])], Kanban2.prototype, "dataSource", void 0);
    __decorate89([Property2()], Kanban2.prototype, "query", void 0);
    __decorate89([Property2()], Kanban2.prototype, "keyField", void 0);
    __decorate89([Property2("Column")], Kanban2.prototype, "constraintType", void 0);
    __decorate89([Property2([])], Kanban2.prototype, "externalDropId", void 0);
    __decorate89([Collection([], Columns)], Kanban2.prototype, "columns", void 0);
    __decorate89([Property2(true)], Kanban2.prototype, "allowKeyboard", void 0);
    __decorate89([Property2(true)], Kanban2.prototype, "enableHtmlSanitizer", void 0);
    __decorate89([Collection([], StackedHeaders)], Kanban2.prototype, "stackedHeaders", void 0);
    __decorate89([Complex2({}, SwimlaneSettings)], Kanban2.prototype, "swimlaneSettings", void 0);
    __decorate89([Complex2({}, CardSettings)], Kanban2.prototype, "cardSettings", void 0);
    __decorate89([Complex2({}, SortSettings)], Kanban2.prototype, "sortSettings", void 0);
    __decorate89([Complex2({}, DialogSettings)], Kanban2.prototype, "dialogSettings", void 0);
    __decorate89([Property2(true)], Kanban2.prototype, "allowDragAndDrop", void 0);
    __decorate89([Property2(false)], Kanban2.prototype, "enableTooltip", void 0);
    __decorate89([Property2(false)], Kanban2.prototype, "showEmptyColumn", void 0);
    __decorate89([Property2(false)], Kanban2.prototype, "enablePersistence", void 0);
    __decorate89([Property2()], Kanban2.prototype, "tooltipTemplate", void 0);
    __decorate89([Event3()], Kanban2.prototype, "actionBegin", void 0);
    __decorate89([Event3()], Kanban2.prototype, "actionComplete", void 0);
    __decorate89([Event3()], Kanban2.prototype, "actionFailure", void 0);
    __decorate89([Event3()], Kanban2.prototype, "created", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dataBinding", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dataBound", void 0);
    __decorate89([Event3()], Kanban2.prototype, "cardClick", void 0);
    __decorate89([Event3()], Kanban2.prototype, "cardDoubleClick", void 0);
    __decorate89([Event3()], Kanban2.prototype, "queryCellInfo", void 0);
    __decorate89([Event3()], Kanban2.prototype, "cardRendered", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dragStart", void 0);
    __decorate89([Event3()], Kanban2.prototype, "drag", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dragStop", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dialogOpen", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dialogClose", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dataStateChange", void 0);
    __decorate89([Event3()], Kanban2.prototype, "dataSourceChanged", void 0);
    Kanban2 = __decorate89([NotifyPropertyChanges2], Kanban2);
    return Kanban2;
  }(Component3)
);

// node_modules/@syncfusion/ej2-angular-kanban/fesm2015/syncfusion-ej2-angular-kanban.mjs
var _c0 = ["template"];
var _c1 = ["tooltipTemplate"];
var _c2 = ["columnsTemplate"];
var _c3 = ["swimlaneSettingsTemplate"];
var _c4 = ["cardSettingsTemplate"];
var _c5 = ["dialogSettingsTemplate"];
var input$1 = ["allowDrag", "allowDrop", "allowToggle", "headerText", "isExpanded", "keyField", "maxCount", "minCount", "showAddButton", "showItemCount", "template", "transitionColumns"];
var outputs$2 = [];
var ColumnDirective = class extends ComplexBase {
  constructor(viewContainerRef) {
    super();
    this.viewContainerRef = viewContainerRef;
    setValue2("currentInstance", this, this.viewContainerRef);
    this.registerEvents(outputs$2);
    this.directivePropList = input$1;
  }
};
ColumnDirective.ɵfac = function ColumnDirective_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || ColumnDirective)(ɵɵdirectiveInject(ViewContainerRef));
};
ColumnDirective.ɵdir = ɵɵdefineDirective({
  type: ColumnDirective,
  selectors: [["e-column"]],
  contentQueries: function ColumnDirective_ContentQueries(rf, ctx, dirIndex) {
    if (rf & 1) {
      ɵɵcontentQuery(dirIndex, _c0, 5);
    }
    if (rf & 2) {
      let _t;
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.template = _t.first);
    }
  },
  inputs: {
    allowDrag: "allowDrag",
    allowDrop: "allowDrop",
    allowToggle: "allowToggle",
    headerText: "headerText",
    isExpanded: "isExpanded",
    keyField: "keyField",
    maxCount: "maxCount",
    minCount: "minCount",
    showAddButton: "showAddButton",
    showItemCount: "showItemCount",
    template: "template",
    transitionColumns: "transitionColumns"
  },
  features: [ɵɵInheritDefinitionFeature]
});
__decorate([Template()], ColumnDirective.prototype, "template", void 0);
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ColumnDirective, [{
    type: Directive,
    args: [{
      selector: "e-columns>e-column",
      inputs: input$1,
      outputs: outputs$2,
      queries: {}
    }]
  }], function() {
    return [{
      type: ViewContainerRef
    }];
  }, {
    template: [{
      type: ContentChild,
      args: ["template"]
    }]
  });
})();
var ColumnsDirective = class extends ArrayBase {
  constructor() {
    super("columns");
  }
};
ColumnsDirective.ɵfac = function ColumnsDirective_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || ColumnsDirective)();
};
ColumnsDirective.ɵdir = ɵɵdefineDirective({
  type: ColumnsDirective,
  selectors: [["e-columns"]],
  contentQueries: function ColumnsDirective_ContentQueries(rf, ctx, dirIndex) {
    if (rf & 1) {
      ɵɵcontentQuery(dirIndex, ColumnDirective, 4);
    }
    if (rf & 2) {
      let _t;
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.children = _t);
    }
  },
  features: [ɵɵInheritDefinitionFeature]
});
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ColumnsDirective, [{
    type: Directive,
    args: [{
      selector: "ejs-kanban>e-columns",
      queries: {
        children: new ContentChildren(ColumnDirective)
      }
    }]
  }], function() {
    return [];
  }, null);
})();
var input = ["keyFields", "text"];
var outputs$1 = [];
var StackedHeaderDirective = class extends ComplexBase {
  constructor(viewContainerRef) {
    super();
    this.viewContainerRef = viewContainerRef;
    setValue2("currentInstance", this, this.viewContainerRef);
    this.registerEvents(outputs$1);
    this.directivePropList = input;
  }
};
StackedHeaderDirective.ɵfac = function StackedHeaderDirective_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || StackedHeaderDirective)(ɵɵdirectiveInject(ViewContainerRef));
};
StackedHeaderDirective.ɵdir = ɵɵdefineDirective({
  type: StackedHeaderDirective,
  selectors: [["e-stackedHeader"]],
  inputs: {
    keyFields: "keyFields",
    text: "text"
  },
  features: [ɵɵInheritDefinitionFeature]
});
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(StackedHeaderDirective, [{
    type: Directive,
    args: [{
      selector: "e-stackedHeaders>e-stackedHeader",
      inputs: input,
      outputs: outputs$1,
      queries: {}
    }]
  }], function() {
    return [{
      type: ViewContainerRef
    }];
  }, null);
})();
var StackedHeadersDirective = class extends ArrayBase {
  constructor() {
    super("stackedheaders");
  }
};
StackedHeadersDirective.ɵfac = function StackedHeadersDirective_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || StackedHeadersDirective)();
};
StackedHeadersDirective.ɵdir = ɵɵdefineDirective({
  type: StackedHeadersDirective,
  selectors: [["e-stackedHeaders"]],
  contentQueries: function StackedHeadersDirective_ContentQueries(rf, ctx, dirIndex) {
    if (rf & 1) {
      ɵɵcontentQuery(dirIndex, StackedHeaderDirective, 4);
    }
    if (rf & 2) {
      let _t;
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.children = _t);
    }
  },
  features: [ɵɵInheritDefinitionFeature]
});
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(StackedHeadersDirective, [{
    type: Directive,
    args: [{
      selector: "ejs-kanban>e-stackedHeaders",
      queries: {
        children: new ContentChildren(StackedHeaderDirective)
      }
    }]
  }], function() {
    return [];
  }, null);
})();
var inputs = ["allowDragAndDrop", "allowKeyboard", "cardHeight", "cardSettings", "columns", "constraintType", "cssClass", "dataSource", "dialogSettings", "enableHtmlSanitizer", "enablePersistence", "enableRtl", "enableTooltip", "enableVirtualization", "externalDropId", "height", "keyField", "locale", "query", "showEmptyColumn", "sortSettings", "stackedHeaders", "swimlaneSettings", "tooltipTemplate", "width"];
var outputs = ["actionBegin", "actionComplete", "actionFailure", "cardClick", "cardDoubleClick", "cardRendered", "created", "dataBinding", "dataBound", "dataSourceChanged", "dataStateChange", "dialogClose", "dialogOpen", "drag", "dragStart", "dragStop", "queryCellInfo"];
var twoWays = [""];
var KanbanComponent = class KanbanComponent2 extends Kanban {
  constructor(ngEle, srenderer, viewContainerRef, injector) {
    super();
    this.ngEle = ngEle;
    this.srenderer = srenderer;
    this.viewContainerRef = viewContainerRef;
    this.injector = injector;
    this.tags = ["columns", "stackedHeaders"];
    this.element = this.ngEle.nativeElement;
    this.injectedModules = this.injectedModules || [];
    this.registerEvents(outputs);
    this.addTwoWay.call(this, twoWays);
    setValue2("currentInstance", this, this.viewContainerRef);
    this.context = new ComponentBase();
  }
  ngOnInit() {
    this.context.ngOnInit(this);
  }
  ngAfterViewInit() {
    this.context.ngAfterViewInit(this);
  }
  ngOnDestroy() {
    this.context.ngOnDestroy(this);
  }
  ngAfterContentChecked() {
    this.tagObjects[0].instance = this.childColumns;
    if (this.childStackedHeaders) {
      this.tagObjects[1].instance = this.childStackedHeaders;
    }
    this.context.ngAfterContentChecked(this);
  }
};
KanbanComponent.ɵfac = function KanbanComponent_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || KanbanComponent)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(Injector));
};
KanbanComponent.ɵcmp = ɵɵdefineComponent({
  type: KanbanComponent,
  selectors: [["ejs-kanban"]],
  contentQueries: function KanbanComponent_ContentQueries(rf, ctx, dirIndex) {
    if (rf & 1) {
      ɵɵcontentQuery(dirIndex, _c1, 5);
      ɵɵcontentQuery(dirIndex, _c2, 5);
      ɵɵcontentQuery(dirIndex, _c3, 5);
      ɵɵcontentQuery(dirIndex, _c4, 5);
      ɵɵcontentQuery(dirIndex, _c5, 5);
      ɵɵcontentQuery(dirIndex, ColumnsDirective, 5);
      ɵɵcontentQuery(dirIndex, StackedHeadersDirective, 5);
    }
    if (rf & 2) {
      let _t;
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.columns_template = _t.first);
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.swimlaneSettings_template = _t.first);
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.cardSettings_template = _t.first);
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.dialogSettings_template = _t.first);
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.childColumns = _t.first);
      ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.childStackedHeaders = _t.first);
    }
  },
  inputs: {
    allowDragAndDrop: "allowDragAndDrop",
    allowKeyboard: "allowKeyboard",
    cardHeight: "cardHeight",
    cardSettings: "cardSettings",
    columns: "columns",
    constraintType: "constraintType",
    cssClass: "cssClass",
    dataSource: "dataSource",
    dialogSettings: "dialogSettings",
    enableHtmlSanitizer: "enableHtmlSanitizer",
    enablePersistence: "enablePersistence",
    enableRtl: "enableRtl",
    enableTooltip: "enableTooltip",
    enableVirtualization: "enableVirtualization",
    externalDropId: "externalDropId",
    height: "height",
    keyField: "keyField",
    locale: "locale",
    query: "query",
    showEmptyColumn: "showEmptyColumn",
    sortSettings: "sortSettings",
    stackedHeaders: "stackedHeaders",
    swimlaneSettings: "swimlaneSettings",
    tooltipTemplate: "tooltipTemplate",
    width: "width"
  },
  outputs: {
    actionBegin: "actionBegin",
    actionComplete: "actionComplete",
    actionFailure: "actionFailure",
    cardClick: "cardClick",
    cardDoubleClick: "cardDoubleClick",
    cardRendered: "cardRendered",
    created: "created",
    dataBinding: "dataBinding",
    dataBound: "dataBound",
    dataSourceChanged: "dataSourceChanged",
    dataStateChange: "dataStateChange",
    dialogClose: "dialogClose",
    dialogOpen: "dialogOpen",
    drag: "drag",
    dragStart: "dragStart",
    dragStop: "dragStop",
    queryCellInfo: "queryCellInfo"
  },
  features: [ɵɵInheritDefinitionFeature],
  decls: 0,
  vars: 0,
  template: function KanbanComponent_Template(rf, ctx) {
  },
  encapsulation: 2,
  changeDetection: 0
});
__decorate([Template()], KanbanComponent.prototype, "tooltipTemplate", void 0);
__decorate([Template()], KanbanComponent.prototype, "columns_template", void 0);
__decorate([Template()], KanbanComponent.prototype, "swimlaneSettings_template", void 0);
__decorate([Template()], KanbanComponent.prototype, "cardSettings_template", void 0);
__decorate([Template()], KanbanComponent.prototype, "dialogSettings_template", void 0);
KanbanComponent = __decorate([ComponentMixins([ComponentBase])], KanbanComponent);
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(KanbanComponent, [{
    type: Component,
    args: [{
      selector: "ejs-kanban",
      inputs,
      outputs,
      template: "",
      changeDetection: ChangeDetectionStrategy.OnPush,
      queries: {
        childColumns: new ContentChild(ColumnsDirective),
        childStackedHeaders: new ContentChild(StackedHeadersDirective)
      }
    }]
  }], function() {
    return [{
      type: ElementRef
    }, {
      type: Renderer2
    }, {
      type: ViewContainerRef
    }, {
      type: Injector
    }];
  }, {
    tooltipTemplate: [{
      type: ContentChild,
      args: ["tooltipTemplate"]
    }],
    columns_template: [{
      type: ContentChild,
      args: ["columnsTemplate"]
    }],
    swimlaneSettings_template: [{
      type: ContentChild,
      args: ["swimlaneSettingsTemplate"]
    }],
    cardSettings_template: [{
      type: ContentChild,
      args: ["cardSettingsTemplate"]
    }],
    dialogSettings_template: [{
      type: ContentChild,
      args: ["dialogSettingsTemplate"]
    }]
  });
})();
var KanbanModule = class {
};
KanbanModule.ɵfac = function KanbanModule_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || KanbanModule)();
};
KanbanModule.ɵmod = ɵɵdefineNgModule({
  type: KanbanModule,
  declarations: [KanbanComponent, ColumnDirective, ColumnsDirective, StackedHeaderDirective, StackedHeadersDirective],
  imports: [CommonModule],
  exports: [KanbanComponent, ColumnDirective, ColumnsDirective, StackedHeaderDirective, StackedHeadersDirective]
});
KanbanModule.ɵinj = ɵɵdefineInjector({
  imports: [[CommonModule]]
});
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(KanbanModule, [{
    type: NgModule,
    args: [{
      imports: [CommonModule],
      declarations: [KanbanComponent, ColumnDirective, ColumnsDirective, StackedHeaderDirective, StackedHeadersDirective],
      exports: [KanbanComponent, ColumnDirective, ColumnsDirective, StackedHeaderDirective, StackedHeadersDirective]
    }]
  }], null, null);
})();
var KanbanAllModule = class {
};
KanbanAllModule.ɵfac = function KanbanAllModule_Factory(__ngFactoryType__) {
  return new (__ngFactoryType__ || KanbanAllModule)();
};
KanbanAllModule.ɵmod = ɵɵdefineNgModule({
  type: KanbanAllModule,
  imports: [CommonModule, KanbanModule],
  exports: [KanbanModule]
});
KanbanAllModule.ɵinj = ɵɵdefineInjector({
  providers: [],
  imports: [[CommonModule, KanbanModule], KanbanModule]
});
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(KanbanAllModule, [{
    type: NgModule,
    args: [{
      imports: [CommonModule, KanbanModule],
      exports: [KanbanModule],
      providers: []
    }]
  }], null, null);
})();
export {
  ColumnDirective,
  ColumnsDirective,
  Kanban,
  KanbanAllModule,
  KanbanComponent,
  KanbanModule,
  StackedHeaderDirective,
  StackedHeadersDirective,
  actionBegin,
  actionComplete,
  actionFailure,
  bottomSpace,
  cardClick,
  cardDoubleClick,
  cardRendered,
  cardSpace,
  contentReady,
  dataBinding,
  dataBound,
  dataReady,
  dataSourceChanged,
  dataStateChange,
  dialogClose,
  dialogOpen,
  documentClick,
  drag,
  dragStart,
  dragStop,
  queryCellInfo,
  toggleWidth
};
//# sourceMappingURL=@syncfusion_ej2-angular-kanban.js.map
