/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","./arrayUtils","./has","./maybe","./typedArrayUtil"],(function(t,e,n,r,o){"use strict";function i(t,e){let n;if(e)for(n in t)t.hasOwnProperty(n)&&(void 0===t[n]?delete t[n]:t[n]instanceof Object&&i(t[n],!0));else for(n in t)t.hasOwnProperty(n)&&void 0===t[n]&&delete t[n];return t}function f(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const e=y(t);if(r.isSome(e))return e;if(u(t))return t.clone();if(s(t))return t.map(f);if(a(t))return t.clone();const n={};for(const r of Object.getOwnPropertyNames(t))n[r]=f(t[r]);return n}function c(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const e=y(t);if(r.isSome(e))return e;if(s(t)){let e=!0;const n=t.map((t=>{const n=c(t);return null!=t&&null==n&&(e=!1),n}));return e?n:null}if(u(t))return t.clone();if(!a(t)){const e=new(0,Object.getPrototypeOf(t).constructor);for(const n of Object.getOwnPropertyNames(t)){const r=t[n],o=c(r);if(null!=r&&null==o)return null;e[n]=o}return e}return null}function u(t){return"function"==typeof t.clone}function s(t){return"function"==typeof t.map&&"function"==typeof t.forEach}function a(t){return"function"==typeof t.notifyChange&&"function"==typeof t.watch}function l(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function y(t){if(o.isInt8Array(t)||o.isUint8Array(t)||o.isUint8ClampedArray(t)||o.isInt16Array(t)||o.isUint16Array(t)||o.isInt32Array(t)||o.isUint32Array(t)||o.isFloat32Array(t)||o.isFloat64Array(t))return o.slice(t);if(t instanceof Date)return new Date(t.getTime());if(t instanceof ArrayBuffer){return t.slice(0,t.byteLength)}if(t instanceof Map){const e=new Map;return t.forEach(((t,n)=>{e.set(n,f(t))})),e}if(t instanceof Set){const e=new Set;return t.forEach((t=>{e.add(f(t))})),e}return null}function p(t,e){return t===e||"number"==typeof t&&isNaN(t)&&"number"==typeof e&&isNaN(e)||"function"==typeof(t||{}).getTime&&"function"==typeof(e||{}).getTime&&t.getTime()===e.getTime()||!1}function b(t,n){return t===n||(null==t||"string"==typeof t?t===n:"number"==typeof t?t===n||"number"==typeof n&&isNaN(t)&&isNaN(n):t instanceof Date?n instanceof Date&&t.getTime()===n.getTime():Array.isArray(t)?Array.isArray(n)&&e.equals(t,n):t instanceof Set?n instanceof Set&&m(t,n):t instanceof Map?n instanceof Map&&O(t,n):!!l(t)&&(l(n)&&g(t,n)))}function g(t,e){if(null===t||null===e)return!1;const n=Object.keys(t);if(null===e||Object.keys(e).length!==n.length)return!1;for(const r of n)if(t[r]!==e[r]||!Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}function m(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function O(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t){const t=e.get(n);if(t!==r||void 0===t&&!e.has(n))return!1}return!0}const j=function(t={},...e){return n("esri-deprecation-warnings")&&console.warn("[esri.core.lang] 🛑 DEPRECATED - Function: mixin()\n\t🛠️ Replacement: Use Object.assign() directly\n\t⚙️ Version: 4.19"),Object.assign(t,...e)};t.clone=f,t.equals=p,t.equalsShallow=b,t.fixJson=i,t.isAccessorLike=a,t.isPlainObject=l,t.mixin=j,t.tryClone=c,t.tryCloneBuiltInObject=y,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
