/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports"],(function(e){"use strict";function t(e){const t=null==e?void 0:e.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function i(e){const t=null==e?void 0:e.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function r(e){return"voxel"===(null==e?void 0:e.type)}function n(e){return"imagery-tile"===(null==e?void 0:e.type)}function l(e){var t;return"esri.Basemap"===(null==(t=e.parent)?void 0:t.declaredClass)&&e.parent.baseLayers.includes(e)}function a(e){var t;return"feature"===(null==e?void 0:e.type)&&!e.url&&"memory"===(null==(t=e.source)?void 0:t.type)}function o(e){var t;return"feature"===(null==e?void 0:e.type)&&"feature-layer"===(null==(t=e.source)?void 0:t.type)}function u(e){const t=/[:;]/,i=[];let r=!1;if(e&&(e.forEach(((e,n)=>{i.push([n,e]),!r&&t.test(e)&&(r=!0)})),i.length>0)){let e;if(r){const t={};i.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];i.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function s(e){if(!e)return;const t=[];return e.forEach(((e,i)=>{t.push('"'+i+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function c(e,t){const i=[];if(e>0&&t)for(let r=0;r<t.length;r++)if(!(t[r].parentLayerId>=0&&!i.includes(t[r].parentLayerId)&&t.some((e=>e.id===t[r].parentLayerId)))&&t[r].id>=0){let n=!0;const l=t[r].maxScale,a=t[r].minScale;(l>0||a>0)&&(l>0&&a>0?n=l<=e&&e<=a:l>0?n=l<=e:a>0&&(n=e<=a)),n&&i.push(t[r].id)}return i}function f(e){return!0===e.labelsVisible&&null!=e.labelingInfo&&e.labelingInfo.length>0}function y(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const i=e.activeLayer.tileMatrixSets;if(i)return i}return null}e.areLabelsVisible=f,e.getLayersForScale=c,e.getTileMaxtrixSetFromActiveLayer=y,e.isBaseLayer=l,e.isBasemapSupportedLayer=t,e.isFeatureCollectionLayer=a,e.isFeatureServiceLayer=o,e.isImageryTileLayer=n,e.isTiledLayer=i,e.isVoxelLayer=r,e.serializeLayerDefinitions=u,e.serializeTimeOptions=s,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
