/**
 * DevExtreme (cjs/core/utils/type.js)
 * Version: 23.2.6 (build 24140-0112)
 * Build date: Sun May 19 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
exports.type = exports.isWindow = exports.isString = exports.isRenderer = exports.isPromise = exports.isPrimitive = exports.isPlainObject = exports.isObject = exports.isNumeric = exports.isFunction = exports.isExponential = exports.isEvent = exports.isEmptyObject = exports.isDefined = exports.isDeferred = exports.isDate = exports.isBoolean = void 0;
const types = {
    "[object Array]": "array",
    "[object Date]": "date",
    "[object Object]": "object",
    "[object String]": "string"
};
const type = function(object) {
    if (null === object) {
        return "null"
    }
    const typeOfObject = Object.prototype.toString.call(object);
    return "object" === typeof object ? types[typeOfObject] || "object" : typeof object
};
exports.type = type;
const isBoolean = function(object) {
    return "boolean" === typeof object
};
exports.isBoolean = isBoolean;
const isExponential = function(value) {
    return isNumeric(value) && -1 !== value.toString().indexOf("e")
};
exports.isExponential = isExponential;
const isDate = function(object) {
    return "date" === type(object)
};
exports.isDate = isDate;
const isDefined = function(object) {
    return null !== object && void 0 !== object
};
exports.isDefined = isDefined;
const isFunction = function(object) {
    return "function" === typeof object
};
exports.isFunction = isFunction;
const isString = function(object) {
    return "string" === typeof object
};
exports.isString = isString;
const isNumeric = function(object) {
    return "number" === typeof object && isFinite(object) || !isNaN(object - parseFloat(object))
};
exports.isNumeric = isNumeric;
const isObject = function(object) {
    return "object" === type(object)
};
exports.isObject = isObject;
const isEmptyObject = function(object) {
    let property;
    for (property in object) {
        return false
    }
    return true
};
exports.isEmptyObject = isEmptyObject;
const isPlainObject = function(object) {
    if (!object || "object" !== type(object)) {
        return false
    }
    const proto = Object.getPrototypeOf(object);
    if (!proto) {
        return true
    }
    const ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
    return "function" === typeof ctor && Object.toString.call(ctor) === Object.toString.call(Object)
};
exports.isPlainObject = isPlainObject;
const isPrimitive = function(value) {
    return -1 === ["object", "array", "function"].indexOf(type(value))
};
exports.isPrimitive = isPrimitive;
const isWindow = function(object) {
    return null != object && object === object.window
};
exports.isWindow = isWindow;
const isRenderer = function(object) {
    return !!object && !!(object.jquery || object.dxRenderer)
};
exports.isRenderer = isRenderer;
const isPromise = function(object) {
    return !!object && isFunction(object.then)
};
exports.isPromise = isPromise;
const isDeferred = function(object) {
    return !!object && isFunction(object.done) && isFunction(object.fail)
};
exports.isDeferred = isDeferred;
const isEvent = function(object) {
    return !!(object && object.preventDefault)
};
exports.isEvent = isEvent;
