Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextgis/utils

Package Overview
Dependencies
Maintainers
3
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/utils - npm Package Compare versions

Comparing version 1.16.1 to 1.16.2

8

lib/index.d.ts

@@ -49,3 +49,9 @@ /// <reference types="node" />

export declare function camelize(str: string): string;
/**
* Camelize a string, cutting the string by separator character.
* @param text to camelize
* @param separator Word separator (string or regexp)
* @return string Camelized text
*/
export declare function camelize(text: string, separator?: RegExp): string;

@@ -52,0 +58,0 @@ export declare function capitalize(str: string): string;

28

lib/utils.cjs.js

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 1.16.1; author: NextGIS */
/** Bundle of @nextgis/utils; version: 1.16.2; author: NextGIS */
'use strict';

@@ -637,10 +637,20 @@

function camelize(str) {
return str
.replace(/^[_.\- ]+/, '')
.toLocaleLowerCase()
.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, function (_, p1) {
return p1.toLocaleUpperCase();
})
.replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, function (m) { return m.toLocaleUpperCase(); });
/**
* Camelize a string, cutting the string by separator character.
* @param text to camelize
* @param separator Word separator (string or regexp)
* @return string Camelized text
*/
function camelize(text, separator) {
if (separator === void 0) { separator = /[_.\- ]/; }
// Cut the string into words
var words = text.split(separator);
// Concatenate all capitalized words to get camelized string
var result = "";
for (var i = 0; i < words.length; i++) {
var word = words[i];
var capitalizedWord = word.charAt(0).toUpperCase() + word.slice(1);
result += capitalizedWord;
}
return result;
}

@@ -647,0 +657,0 @@

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function r(t){return function(t,e){void 0===e&&(e=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++)-1==e.indexOf(r[n])&&e.push(r[n]);return e}(t)}function n(t,e){return t.length===e.length&&t.every((function(t,r){return t===e[r]}))}function o(t){return null!=t}function i(t,e){var r;function n(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];n.clear(),r=setTimeout((function(){r=null,t.apply(o,i)}),e)}return void 0===e&&(e=10),n.clear=function(){r&&(clearTimeout(r),r=null)},n}var a=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,e){this._eventsStatus[t]=e},t.prototype.onLoad=function(t){var e=this,r=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(r){e.getEventStatus(t)?r(e):e.emitter.once(t,(function(){e.setEventStatus(t,!0),r(e)}))}))}));return Promise.all(r).then((function(){return e}))},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return void 0!==e&&!!e},t}();function u(t){return{type:"Polygon",coordinates:[c(t)]}}function c(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var s=Math.PI/180,p=180/Math.PI;function f(t,e,r,n){void 0===r&&(r=10),void 0===n&&(n=6);for(var o=r/6371*p,i=o/Math.cos(e*s),a=[],u=0;u<n+1;u++){var c=Math.PI*(u/(n/2)),f=t+i*Math.cos(c),l=e+o*Math.sin(c);a.push([f,l])}return a}function l(t,e){y(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var r=0,n=t.coordinates;r<n.length;r++){n[r].forEach((function(t){return e(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return e(t)}))}))}else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var a=0,u=t.coordinates;a<u.length;a++){e(u[a])}return t}))}function y(t,e){if("FeatureCollection"===t.type)for(var r=0,n=t.features;r<n.length;r++){e(n[r].geometry)}else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function d(t,e,r,n){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===r?e===n:g(t,e));return t===e}function g(t,e){var r=Object.keys(t).sort(),n=Object.keys(e).sort();if(r.length!==n.length)return!1;if(r.join("")!==n.join(""))return!1;for(var o=0;o<r.length;o++){if(!d(t[r[o]],e[n[o]],t,e))return!1}return!0}function v(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(m(t)?x(t):!!j(t)&&h(t))}function h(t){return!!j(t)&&t.every(v)}function x(t){if(m(t))for(var e in t)if(!v(e))return!1;return!1}function b(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function m(t){return"[object Object]"===Object.prototype.toString.call(t)}function j(t){return"[object Array]"===Object.prototype.toString.call(t)}var P=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(e){return(new t).copy(e)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();exports.Clipboard=P,exports.DebounceDecorator=function(t){return void 0===t&&(t=10),function(e,r,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:n.enumerable,value:i(n.value,t)}),this[r]}}}},exports.EARTHS_RADIUS=6371,exports.Events=a,exports.allProperties=r,exports.applyMixins=function(t,e,n){void 0===n&&(n={});var o=r(t.prototype),i=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(r){var n=-1!==o.indexOf(r);if(!i&&!n||i){var a=Object.getOwnPropertyDescriptor(e.prototype,r);a&&Object.defineProperty(t.prototype,r,a)}}))}))},exports.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},(function(r,n){return t.slice(n*e,n*e+e)}))},exports.arrayCompare=function(t,e){return n(t=Array.from(t).sort(),e=Array.from(e).sort())},exports.arrayCompareStrict=function(t,e){return n(t=Array.from(t),e=Array.from(e))},exports.arrayUnique=function(t){return t.filter((function(t,e,r){return r.indexOf(t)==e}))},exports.camelize=function(t){return t.replace(/^[_.\- ]+/,"").toLocaleLowerCase().replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu,(function(t,e){return e.toLocaleUpperCase()})).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu,(function(t){return t.toLocaleUpperCase()}))},exports.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},exports.coordinatesCount=function(t){var e=0;return l(t,(function(){return e++})),e},exports.debounce=i,exports.debugLog=function(t){return!1},exports.deepmerge=function t(e,r,n){void 0===n&&(n=!1);var o=e,i=r,a=Array.isArray(i),u=a&&[]||{};return a&&Array.isArray(i)?n?(u=u.concat(o=o||[]),i.forEach((function(e,r){void 0===u[r]?u[r]=e:"object"==typeof e?u[r]=t(o[r],e,n):-1===o.indexOf(e)&&u.push(e)}))):u=i:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){u[t]=o[t]})),Object.keys(i).forEach((function(e){u[e]="object"==typeof i[e]&&i[e]&&"object"==typeof o[e]&&"object"==typeof i[e]?t(o[e],i[e],n):i[e]}))),u},exports.defined=o,exports.degrees2Radian=function(t){return t*Math.PI/180},exports.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var r=20037508.34*t/180,n=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[r,n=20037508.34*n/180]},exports.deprecatedMapClick=function(t){return!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]),t},exports.deprecatedWarn=function(t){console.warn("DEPRECATED WARN: ".concat(t))},exports.eachCoordinates=l,exports.eachGeometry=y,exports.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},exports.flatten=function(t,e){var r;void 0===e&&(e={});var n=null===(r=e.flatArray)||void 0===r||r,o={};return function t(e,r){if(Object(e)!==e)o[r]=e;else if(Array.isArray(e)&&n){for(var i=e.length,a=0;a<i;a++)t(e[a],r+"["+a+"]");0===i&&(o[r]=[])}else{var u=!0;for(var c in e)u=!1,t(e[c],r?r+"."+c:c);u&&r&&(o[r]={})}}(t,""),o},exports.full=function(t){return"string"==typeof t?!!t:o(t)},exports.getBoundsCoordinates=c,exports.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:u(t)}},exports.getBoundsPolygon=u,exports.getCircleFeature=function(t,e,r,n){return void 0===r&&(r=10),void 0===n&&(n=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[f(t,e,r,n)]}}},exports.getCirclePolygonCoordinates=f,exports.getCoordinates=function(t){var e=[];return l(t,(function(t){return e.push(t)})),e},exports.getGlobalVariable=function(){return t?window:global},exports.getIdentifyRadius=function(t,e,r){return(r=null!=r?r:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},exports.getPolygons=function(t){var e=[];return y(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return e.push(t)}));else if("MultiPolygon"===t.type)for(var r=0,n=t.coordinates;r<n.length;r++)for(var o=0,i=n[r];o<i.length;o++){e.push(i[o])}return t})),e},exports.isAnyJson=v,exports.isArray=j,exports.isBrowser=t,exports.isJsonArray=h,exports.isJsonMap=x,exports.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))},exports.isObjKey=b,exports.isObject=m,exports.keyInObj=function(t,e){return b(t,e)},exports.latLngToLngLatArray=function(t){return[t.lng,t.lat]},exports.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},exports.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},exports.mixinProperties=function(t,e,r){r.forEach((function(r){var n=Object.getOwnPropertyDescriptor(e.prototype,r);n&&Object.defineProperty(t.prototype,r,n)}))},exports.numberWithSpaces=function(t){var e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},exports.objectAssign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,o=e;n<o.length;n++)for(var i=o[n],a=0,u=Object.getOwnPropertyNames(i);a<u.length;a++){var c=u[a];t[c]=i[c]}},exports.objectDeepEqual=g,exports.objectRemoveEmpty=function t(e){var r={};return Object.keys(e).forEach((function(n){e[n]instanceof Array||e[n]!==Object(e[n])?void 0!==e[n]&&(r[n]=e[n]):r[n]=t(e[n])})),r},exports.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},exports.round=function(t,e){var r=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*r)/r},exports.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},exports.type=e,exports.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;var e=/\.?([^.[\]]+)|\[(\d+)\]/g,r={};for(var n in t){for(var o=r,i="",a=void 0;a=e.exec(n);)o=o[i]||(o[i]=a[2]?[]:{}),i=a[2]||a[1];o[i]=t[n]}return r[""]||r};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof window&&void 0!==window.document,e=t?"browser":"node";function r(t){return function(t,e){void 0===e&&(e=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++)-1==e.indexOf(r[n])&&e.push(r[n]);return e}(t)}function n(t,e){return t.length===e.length&&t.every((function(t,r){return t===e[r]}))}function o(t){return null!=t}function i(t,e){var r;function n(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];n.clear(),r=setTimeout((function(){r=null,t.apply(o,i)}),e)}return void 0===e&&(e=10),n.clear=function(){r&&(clearTimeout(r),r=null)},n}var a=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,e){this._eventsStatus[t]=e},t.prototype.onLoad=function(t){var e=this,r=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(r){e.getEventStatus(t)?r(e):e.emitter.once(t,(function(){e.setEventStatus(t,!0),r(e)}))}))}));return Promise.all(r).then((function(){return e}))},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return void 0!==e&&!!e},t}();function u(t){return{type:"Polygon",coordinates:[c(t)]}}function c(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var s=Math.PI/180,f=180/Math.PI;function p(t,e,r,n){void 0===r&&(r=10),void 0===n&&(n=6);for(var o=r/6371*f,i=o/Math.cos(e*s),a=[],u=0;u<n+1;u++){var c=Math.PI*(u/(n/2)),p=t+i*Math.cos(c),l=e+o*Math.sin(c);a.push([p,l])}return a}function l(t,e){y(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var r=0,n=t.coordinates;r<n.length;r++){n[r].forEach((function(t){return e(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return e(t)}))}))}else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var a=0,u=t.coordinates;a<u.length;a++){e(u[a])}return t}))}function y(t,e){if("FeatureCollection"===t.type)for(var r=0,n=t.features;r<n.length;r++){e(n[r].geometry)}else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function d(t,e,r,n){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===r?e===n:g(t,e));return t===e}function g(t,e){var r=Object.keys(t).sort(),n=Object.keys(e).sort();if(r.length!==n.length)return!1;if(r.join("")!==n.join(""))return!1;for(var o=0;o<r.length;o++){if(!d(t[r[o]],e[n[o]],t,e))return!1}return!0}function v(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(m(t)?x(t):!!j(t)&&h(t))}function h(t){return!!j(t)&&t.every(v)}function x(t){if(m(t))for(var e in t)if(!v(e))return!1;return!1}function b(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function m(t){return"[object Object]"===Object.prototype.toString.call(t)}function j(t){return"[object Array]"===Object.prototype.toString.call(t)}var P=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(e){return(new t).copy(e)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();exports.Clipboard=P,exports.DebounceDecorator=function(t){return void 0===t&&(t=10),function(e,r,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:n.enumerable,value:i(n.value,t)}),this[r]}}}},exports.EARTHS_RADIUS=6371,exports.Events=a,exports.allProperties=r,exports.applyMixins=function(t,e,n){void 0===n&&(n={});var o=r(t.prototype),i=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(r){var n=-1!==o.indexOf(r);if(!i&&!n||i){var a=Object.getOwnPropertyDescriptor(e.prototype,r);a&&Object.defineProperty(t.prototype,r,a)}}))}))},exports.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},(function(r,n){return t.slice(n*e,n*e+e)}))},exports.arrayCompare=function(t,e){return n(t=Array.from(t).sort(),e=Array.from(e).sort())},exports.arrayCompareStrict=function(t,e){return n(t=Array.from(t),e=Array.from(e))},exports.arrayUnique=function(t){return t.filter((function(t,e,r){return r.indexOf(t)==e}))},exports.camelize=function(t,e){void 0===e&&(e=/[_.\- ]/);for(var r=t.split(e),n="",o=0;o<r.length;o++){var i=r[o];n+=i.charAt(0).toUpperCase()+i.slice(1)}return n},exports.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},exports.coordinatesCount=function(t){var e=0;return l(t,(function(){return e++})),e},exports.debounce=i,exports.debugLog=function(t){return!1},exports.deepmerge=function t(e,r,n){void 0===n&&(n=!1);var o=e,i=r,a=Array.isArray(i),u=a&&[]||{};return a&&Array.isArray(i)?n?(u=u.concat(o=o||[]),i.forEach((function(e,r){void 0===u[r]?u[r]=e:"object"==typeof e?u[r]=t(o[r],e,n):-1===o.indexOf(e)&&u.push(e)}))):u=i:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){u[t]=o[t]})),Object.keys(i).forEach((function(e){u[e]="object"==typeof i[e]&&i[e]&&"object"==typeof o[e]&&"object"==typeof i[e]?t(o[e],i[e],n):i[e]}))),u},exports.defined=o,exports.degrees2Radian=function(t){return t*Math.PI/180},exports.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var r=20037508.34*t/180,n=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[r,n=20037508.34*n/180]},exports.deprecatedMapClick=function(t){return!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]),t},exports.deprecatedWarn=function(t){console.warn("DEPRECATED WARN: ".concat(t))},exports.eachCoordinates=l,exports.eachGeometry=y,exports.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},exports.flatten=function(t,e){var r;void 0===e&&(e={});var n=null===(r=e.flatArray)||void 0===r||r,o={};return function t(e,r){if(Object(e)!==e)o[r]=e;else if(Array.isArray(e)&&n){for(var i=e.length,a=0;a<i;a++)t(e[a],r+"["+a+"]");0===i&&(o[r]=[])}else{var u=!0;for(var c in e)u=!1,t(e[c],r?r+"."+c:c);u&&r&&(o[r]={})}}(t,""),o},exports.full=function(t){return"string"==typeof t?!!t:o(t)},exports.getBoundsCoordinates=c,exports.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:u(t)}},exports.getBoundsPolygon=u,exports.getCircleFeature=function(t,e,r,n){return void 0===r&&(r=10),void 0===n&&(n=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[p(t,e,r,n)]}}},exports.getCirclePolygonCoordinates=p,exports.getCoordinates=function(t){var e=[];return l(t,(function(t){return e.push(t)})),e},exports.getGlobalVariable=function(){return t?window:global},exports.getIdentifyRadius=function(t,e,r){return(r=null!=r?r:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},exports.getPolygons=function(t){var e=[];return y(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return e.push(t)}));else if("MultiPolygon"===t.type)for(var r=0,n=t.coordinates;r<n.length;r++)for(var o=0,i=n[r];o<i.length;o++){e.push(i[o])}return t})),e},exports.isAnyJson=v,exports.isArray=j,exports.isBrowser=t,exports.isJsonArray=h,exports.isJsonMap=x,exports.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))},exports.isObjKey=b,exports.isObject=m,exports.keyInObj=function(t,e){return b(t,e)},exports.latLngToLngLatArray=function(t){return[t.lng,t.lat]},exports.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},exports.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},exports.mixinProperties=function(t,e,r){r.forEach((function(r){var n=Object.getOwnPropertyDescriptor(e.prototype,r);n&&Object.defineProperty(t.prototype,r,n)}))},exports.numberWithSpaces=function(t){var e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},exports.objectAssign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,o=e;n<o.length;n++)for(var i=o[n],a=0,u=Object.getOwnPropertyNames(i);a<u.length;a++){var c=u[a];t[c]=i[c]}},exports.objectDeepEqual=g,exports.objectRemoveEmpty=function t(e){var r={};return Object.keys(e).forEach((function(n){e[n]instanceof Array||e[n]!==Object(e[n])?void 0!==e[n]&&(r[n]=e[n]):r[n]=t(e[n])})),r},exports.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},exports.round=function(t,e){var r=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*r)/r},exports.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},exports.type=e,exports.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;var e=/\.?([^.[\]]+)|\[(\d+)\]/g,r={};for(var n in t){for(var o=r,i="",a=void 0;a=e.exec(n);)o=o[i]||(o[i]=a[2]?[]:{}),i=a[2]||a[1];o[i]=t[n]}return r[""]||r};
//# sourceMappingURL=utils.cjs.prod.js.map

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 1.16.1; author: NextGIS */
/** Bundle of @nextgis/utils; version: 1.16.2; author: NextGIS */
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';

@@ -633,10 +633,20 @@ var type = isBrowser ? 'browser' : 'node';

function camelize(str) {
return str
.replace(/^[_.\- ]+/, '')
.toLocaleLowerCase()
.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, function (_, p1) {
return p1.toLocaleUpperCase();
})
.replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, function (m) { return m.toLocaleUpperCase(); });
/**
* Camelize a string, cutting the string by separator character.
* @param text to camelize
* @param separator Word separator (string or regexp)
* @return string Camelized text
*/
function camelize(text, separator) {
if (separator === void 0) { separator = /[_.\- ]/; }
// Cut the string into words
var words = text.split(separator);
// Concatenate all capitalized words to get camelized string
var result = "";
for (var i = 0; i < words.length; i++) {
var word = words[i];
var capitalizedWord = word.charAt(0).toUpperCase() + word.slice(1);
result += capitalizedWord;
}
return result;
}

@@ -643,0 +653,0 @@

@@ -1,2 +0,2 @@

var t="undefined"!=typeof window&&void 0!==window.document,n=t?"browser":"node";function r(){return t?window:global}function e(t,n,r){void 0===r&&(r={});var e=o(t.prototype),i=void 0===r.replace||r.replace;n.forEach((function(n){Object.getOwnPropertyNames(n.prototype).forEach((function(r){var o=-1!==e.indexOf(r);if(!i&&!o||i){var u=Object.getOwnPropertyDescriptor(n.prototype,r);u&&Object.defineProperty(t.prototype,r,u)}}))}))}function o(t){return function(t,n){void 0===n&&(n=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var r=Object.getOwnPropertyNames(t),e=0;e<r.length;e++)-1==n.indexOf(r[e])&&n.push(r[e]);return n}(t)}function i(t,n,r){r.forEach((function(r){var e=Object.getOwnPropertyDescriptor(n.prototype,r);e&&Object.defineProperty(t.prototype,r,e)}))}function u(t,n){return a(t=Array.from(t).sort(),n=Array.from(n).sort())}function c(t,n){return a(t=Array.from(t),n=Array.from(n))}function a(t,n){return t.length===n.length&&t.every((function(t,r){return t===n[r]}))}function f(t){return t.filter((function(t,n,r){return r.indexOf(t)==n}))}function l(t,n){return Array.from({length:Math.ceil(t.length/n)},(function(r,e){return t.slice(e*n,e*n+n)}))}function p(t){return null!=t}function s(t){return"string"==typeof t?!!t:p(t)}function y(t,n,r){void 0===r&&(r=!1);var e=t,o=n,i=Array.isArray(o),u=i&&[]||{};return i&&Array.isArray(o)?r?(u=u.concat(e=e||[]),o.forEach((function(t,n){void 0===u[n]?u[n]=t:"object"==typeof t?u[n]=y(e[n],t,r):-1===e.indexOf(t)&&u.push(t)}))):u=o:(e&&"object"==typeof e&&Object.keys(e).forEach((function(t){u[t]=e[t]})),Object.keys(o).forEach((function(t){u[t]="object"==typeof o[t]&&o[t]&&"object"==typeof e[t]&&"object"==typeof o[t]?y(e[t],o[t],r):o[t]}))),u}function v(t){return!1}function h(t){!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function d(t){console.warn("DEPRECATED WARN: ".concat(t))}function g(t,n){var r;function e(){for(var o=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];e.clear(),r=setTimeout((function(){r=null,t.apply(o,i)}),n)}return void 0===n&&(n=10),e.clear=function(){r&&(clearTimeout(r),r=null)},e}function b(t){return void 0===t&&(t=10),function(n,r,e){return{configurable:!0,enumerable:e.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:e.enumerable,value:g(e.value,t)}),this[r]}}}}var m=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,n){this._eventsStatus[t]=n},t.prototype.onLoad=function(t){var n=this,r=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(r){n.getEventStatus(t)?r(n):n.emitter.once(t,(function(){n.setEventStatus(t,!0),r(n)}))}))}));return Promise.all(r).then((function(){return n}))},t.prototype.getEventStatus=function(t){var n=this._eventsStatus[t];return void 0!==n&&!!n},t}();function j(t){return[t.lng,t.lat]}function O(t){return{lat:t[1],lng:t[0]}}var P=6371;function A(t){return{type:"Polygon",coordinates:[M(t)]}}function M(t){var n=[t[0],t[1]];return[n,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],n]}function w(t){return{type:"Feature",properties:{},geometry:A(t)}}var E=Math.PI/180,C=180/Math.PI;function S(t,n,r,e){void 0===r&&(r=10),void 0===e&&(e=6);for(var o=r/6371*C,i=o/Math.cos(n*E),u=[],c=0;c<e+1;c++){var a=Math.PI*(c/(e/2)),f=t+i*Math.cos(a),l=n+o*Math.sin(a);u.push([f,l])}return u}function L(t,n,r,e){return void 0===r&&(r=10),void 0===e&&(e=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[S(t,n,r,e)]}}}function N(t,n){n=n>85.06?85.06:n<-85.06?-85.06:n;var r=20037508.34*t/180,e=Math.log(Math.tan((90+n)*Math.PI/360))/(Math.PI/180);return[r,e=20037508.34*e/180]}function x(t,n){return[180*t/20037508.34,360*Math.atan(Math.exp(n*Math.PI/20037508.34))/Math.PI-90]}function I(t){return t*Math.PI/180}function D(t){var n=0;return _(t,(function(){return n++})),n}function T(t){var n=[];return _(t,(function(t){return n.push(t)})),n}function _(t,n){k(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++){e[r].forEach((function(t){return n(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return n(t)}))}))}else if("Point"===t.type)n(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var u=0,c=t.coordinates;u<c.length;u++){n(c[u])}return t}))}function F(t){var n=[];return k(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return n.push(t)}));else if("MultiPolygon"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++)for(var o=0,i=e[r];o<i.length;o++){n.push(i[o])}return t})),n}function k(t,n){if("FeatureCollection"===t.type)for(var r=0,e=t.features;r<e.length;r++){n(e[r].geometry)}else"Feature"===t.type?n(t.geometry):"coordinates"in t&&n(t)}function $(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}function R(t,n,r){return(r=null!=r?r:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,n+8))*5e-4}function U(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0,o=n;e<o.length;e++)for(var i=o[e],u=0,c=Object.getOwnPropertyNames(i);u<c.length;u++){var a=c[u];t[a]=i[a]}}function B(t,n,r,e){if(t instanceof Array)return n instanceof Array&&n.sort().join("")===t.sort().join("");if(t instanceof Date)return n instanceof Date&&""+t==""+n;if(t instanceof Function){if(!(n instanceof Function))return!1}else if(t instanceof Object)return n instanceof Object&&(t===r?n===e:W(t,n));return t===n}function W(t,n){var r=Object.keys(t).sort(),e=Object.keys(n).sort();if(r.length!==e.length)return!1;if(r.join("")!==e.join(""))return!1;for(var o=0;o<r.length;o++){if(!B(t[r[o]],n[e[o]],t,n))return!1}return!0}function q(t){var n={};return Object.keys(t).forEach((function(r){t[r]instanceof Array||t[r]!==Object(t[r])?void 0!==t[r]&&(n[r]=t[r]):n[r]=q(t[r])})),n}function z(t,n){var r;void 0===n&&(n={});var e=null===(r=n.flatArray)||void 0===r||r,o={};return function t(n,r){if(Object(n)!==n)o[r]=n;else if(Array.isArray(n)&&e){for(var i=n.length,u=0;u<i;u++)t(n[u],r+"["+u+"]");0===i&&(o[r]=[])}else{var c=!0;for(var a in n)c=!1,t(n[a],r?r+"."+a:a);c&&r&&(o[r]={})}}(t,""),o}function G(t){if(Object(t)!==t||Array.isArray(t))return t;var n=/\.?([^.[\]]+)|\[(\d+)\]/g,r={};for(var e in t){for(var o=r,i="",u=void 0;u=n.exec(e);)o=o[i]||(o[i]=u[2]?[]:{}),i=u[2]||u[1];o[i]=t[e]}return r[""]||r}function H(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function J(t){return void 0===t&&(t=0),new Promise((function(n){return setTimeout(n,t)}))}function K(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function Q(t){return t.replace(/^[_.\- ]+/,"").toLocaleLowerCase().replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu,(function(t,n){return n.toLocaleUpperCase()})).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu,(function(t){return t.toLocaleUpperCase()}))}function V(t){var n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")}function X(t,n){var r=n?Number("1e+"+n):1;return Math.round((t+Number.EPSILON)*r)/r}function Y(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(et(t)?tt(t):!!ot(t)&&Z(t))}function Z(t){return!!ot(t)&&t.every(Y)}function tt(t){if(et(t))for(var n in t)if(!Y(n))return!1;return!1}function nt(t,n){return("string"==typeof n||"number"==typeof n)&&n in t}function rt(t,n){return nt(t,n)}function et(t){return"[object Object]"===Object.prototype.toString.call(t)}function ot(t){return"[object Array]"===Object.prototype.toString.call(t)}function it(t){return t.replace(/([^:]\/)\/+/g,"$1")}var ut=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(n){return(new t).copy(n)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(n){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();export{ut as Clipboard,b as DebounceDecorator,P as EARTHS_RADIUS,m as Events,o as allProperties,e as applyMixins,l as arrayChunk,u as arrayCompare,c as arrayCompareStrict,f as arrayUnique,Q as camelize,K as capitalize,D as coordinatesCount,g as debounce,v as debugLog,y as deepmerge,p as defined,I as degrees2Radian,N as degrees2meters,h as deprecatedMapClick,d as deprecatedWarn,_ as eachCoordinates,k as eachGeometry,it as fixUrlStr,z as flatten,s as full,M as getBoundsCoordinates,w as getBoundsFeature,A as getBoundsPolygon,L as getCircleFeature,S as getCirclePolygonCoordinates,T as getCoordinates,r as getGlobalVariable,R as getIdentifyRadius,F as getPolygons,Y as isAnyJson,ot as isArray,t as isBrowser,Z as isJsonArray,tt as isJsonMap,$ as isLngLatBoundsArray,nt as isObjKey,et as isObject,rt as keyInObj,j as latLngToLngLatArray,O as lngLatArrayToLatLng,x as meters2degrees,i as mixinProperties,V as numberWithSpaces,U as objectAssign,W as objectDeepEqual,q as objectRemoveEmpty,H as reEscape,X as round,J as sleep,n as type,G as unflatten};
var t="undefined"!=typeof window&&void 0!==window.document,n=t?"browser":"node";function r(){return t?window:global}function e(t,n,r){void 0===r&&(r={});var e=o(t.prototype),i=void 0===r.replace||r.replace;n.forEach((function(n){Object.getOwnPropertyNames(n.prototype).forEach((function(r){var o=-1!==e.indexOf(r);if(!i&&!o||i){var u=Object.getOwnPropertyDescriptor(n.prototype,r);u&&Object.defineProperty(t.prototype,r,u)}}))}))}function o(t){return function(t,n){void 0===n&&(n=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var r=Object.getOwnPropertyNames(t),e=0;e<r.length;e++)-1==n.indexOf(r[e])&&n.push(r[e]);return n}(t)}function i(t,n,r){r.forEach((function(r){var e=Object.getOwnPropertyDescriptor(n.prototype,r);e&&Object.defineProperty(t.prototype,r,e)}))}function u(t,n){return a(t=Array.from(t).sort(),n=Array.from(n).sort())}function c(t,n){return a(t=Array.from(t),n=Array.from(n))}function a(t,n){return t.length===n.length&&t.every((function(t,r){return t===n[r]}))}function f(t){return t.filter((function(t,n,r){return r.indexOf(t)==n}))}function l(t,n){return Array.from({length:Math.ceil(t.length/n)},(function(r,e){return t.slice(e*n,e*n+n)}))}function s(t){return null!=t}function p(t){return"string"==typeof t?!!t:s(t)}function y(t,n,r){void 0===r&&(r=!1);var e=t,o=n,i=Array.isArray(o),u=i&&[]||{};return i&&Array.isArray(o)?r?(u=u.concat(e=e||[]),o.forEach((function(t,n){void 0===u[n]?u[n]=t:"object"==typeof t?u[n]=y(e[n],t,r):-1===e.indexOf(t)&&u.push(t)}))):u=o:(e&&"object"==typeof e&&Object.keys(e).forEach((function(t){u[t]=e[t]})),Object.keys(o).forEach((function(t){u[t]="object"==typeof o[t]&&o[t]&&"object"==typeof e[t]&&"object"==typeof o[t]?y(e[t],o[t],r):o[t]}))),u}function v(t){return!1}function h(t){!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function d(t){console.warn("DEPRECATED WARN: ".concat(t))}function g(t,n){var r;function e(){for(var o=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];e.clear(),r=setTimeout((function(){r=null,t.apply(o,i)}),n)}return void 0===n&&(n=10),e.clear=function(){r&&(clearTimeout(r),r=null)},e}function b(t){return void 0===t&&(t=10),function(n,r,e){return{configurable:!0,enumerable:e.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:e.enumerable,value:g(e.value,t)}),this[r]}}}}var m=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,n){this._eventsStatus[t]=n},t.prototype.onLoad=function(t){var n=this,r=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(r){n.getEventStatus(t)?r(n):n.emitter.once(t,(function(){n.setEventStatus(t,!0),r(n)}))}))}));return Promise.all(r).then((function(){return n}))},t.prototype.getEventStatus=function(t){var n=this._eventsStatus[t];return void 0!==n&&!!n},t}();function j(t){return[t.lng,t.lat]}function O(t){return{lat:t[1],lng:t[0]}}var P=6371;function A(t){return{type:"Polygon",coordinates:[M(t)]}}function M(t){var n=[t[0],t[1]];return[n,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],n]}function w(t){return{type:"Feature",properties:{},geometry:A(t)}}var E=Math.PI/180,C=180/Math.PI;function S(t,n,r,e){void 0===r&&(r=10),void 0===e&&(e=6);for(var o=r/6371*C,i=o/Math.cos(n*E),u=[],c=0;c<e+1;c++){var a=Math.PI*(c/(e/2)),f=t+i*Math.cos(a),l=n+o*Math.sin(a);u.push([f,l])}return u}function x(t,n,r,e){return void 0===r&&(r=10),void 0===e&&(e=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[S(t,n,r,e)]}}}function I(t,n){n=n>85.06?85.06:n<-85.06?-85.06:n;var r=20037508.34*t/180,e=Math.log(Math.tan((90+n)*Math.PI/360))/(Math.PI/180);return[r,e=20037508.34*e/180]}function L(t,n){return[180*t/20037508.34,360*Math.atan(Math.exp(n*Math.PI/20037508.34))/Math.PI-90]}function D(t){return t*Math.PI/180}function N(t){var n=0;return F(t,(function(){return n++})),n}function T(t){var n=[];return F(t,(function(t){return n.push(t)})),n}function F(t,n){_(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++){e[r].forEach((function(t){return n(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return n(t)}))}))}else if("Point"===t.type)n(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var u=0,c=t.coordinates;u<c.length;u++){n(c[u])}return t}))}function k(t){var n=[];return _(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return n.push(t)}));else if("MultiPolygon"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++)for(var o=0,i=e[r];o<i.length;o++){n.push(i[o])}return t})),n}function _(t,n){if("FeatureCollection"===t.type)for(var r=0,e=t.features;r<e.length;r++){n(e[r].geometry)}else"Feature"===t.type?n(t.geometry):"coordinates"in t&&n(t)}function R(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}function $(t,n,r){return(r=null!=r?r:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,n+8))*5e-4}function U(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0,o=n;e<o.length;e++)for(var i=o[e],u=0,c=Object.getOwnPropertyNames(i);u<c.length;u++){var a=c[u];t[a]=i[a]}}function B(t,n,r,e){if(t instanceof Array)return n instanceof Array&&n.sort().join("")===t.sort().join("");if(t instanceof Date)return n instanceof Date&&""+t==""+n;if(t instanceof Function){if(!(n instanceof Function))return!1}else if(t instanceof Object)return n instanceof Object&&(t===r?n===e:W(t,n));return t===n}function W(t,n){var r=Object.keys(t).sort(),e=Object.keys(n).sort();if(r.length!==e.length)return!1;if(r.join("")!==e.join(""))return!1;for(var o=0;o<r.length;o++){if(!B(t[r[o]],n[e[o]],t,n))return!1}return!0}function q(t){var n={};return Object.keys(t).forEach((function(r){t[r]instanceof Array||t[r]!==Object(t[r])?void 0!==t[r]&&(n[r]=t[r]):n[r]=q(t[r])})),n}function z(t,n){var r;void 0===n&&(n={});var e=null===(r=n.flatArray)||void 0===r||r,o={};return function t(n,r){if(Object(n)!==n)o[r]=n;else if(Array.isArray(n)&&e){for(var i=n.length,u=0;u<i;u++)t(n[u],r+"["+u+"]");0===i&&(o[r]=[])}else{var c=!0;for(var a in n)c=!1,t(n[a],r?r+"."+a:a);c&&r&&(o[r]={})}}(t,""),o}function G(t){if(Object(t)!==t||Array.isArray(t))return t;var n=/\.?([^.[\]]+)|\[(\d+)\]/g,r={};for(var e in t){for(var o=r,i="",u=void 0;u=n.exec(e);)o=o[i]||(o[i]=u[2]?[]:{}),i=u[2]||u[1];o[i]=t[e]}return r[""]||r}function H(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function J(t){return void 0===t&&(t=0),new Promise((function(n){return setTimeout(n,t)}))}function K(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function Q(t,n){void 0===n&&(n=/[_.\- ]/);for(var r=t.split(n),e="",o=0;o<r.length;o++){var i=r[o];e+=i.charAt(0).toUpperCase()+i.slice(1)}return e}function V(t){var n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")}function X(t,n){var r=n?Number("1e+"+n):1;return Math.round((t+Number.EPSILON)*r)/r}function Y(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(et(t)?tt(t):!!ot(t)&&Z(t))}function Z(t){return!!ot(t)&&t.every(Y)}function tt(t){if(et(t))for(var n in t)if(!Y(n))return!1;return!1}function nt(t,n){return("string"==typeof n||"number"==typeof n)&&n in t}function rt(t,n){return nt(t,n)}function et(t){return"[object Object]"===Object.prototype.toString.call(t)}function ot(t){return"[object Array]"===Object.prototype.toString.call(t)}function it(t){return t.replace(/([^:]\/)\/+/g,"$1")}var ut=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(n){return(new t).copy(n)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(n){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();export{ut as Clipboard,b as DebounceDecorator,P as EARTHS_RADIUS,m as Events,o as allProperties,e as applyMixins,l as arrayChunk,u as arrayCompare,c as arrayCompareStrict,f as arrayUnique,Q as camelize,K as capitalize,N as coordinatesCount,g as debounce,v as debugLog,y as deepmerge,s as defined,D as degrees2Radian,I as degrees2meters,h as deprecatedMapClick,d as deprecatedWarn,F as eachCoordinates,_ as eachGeometry,it as fixUrlStr,z as flatten,p as full,M as getBoundsCoordinates,w as getBoundsFeature,A as getBoundsPolygon,x as getCircleFeature,S as getCirclePolygonCoordinates,T as getCoordinates,r as getGlobalVariable,$ as getIdentifyRadius,k as getPolygons,Y as isAnyJson,ot as isArray,t as isBrowser,Z as isJsonArray,tt as isJsonMap,R as isLngLatBoundsArray,nt as isObjKey,et as isObject,rt as keyInObj,j as latLngToLngLatArray,O as lngLatArrayToLatLng,L as meters2degrees,i as mixinProperties,V as numberWithSpaces,U as objectAssign,W as objectDeepEqual,q as objectRemoveEmpty,H as reEscape,X as round,J as sleep,n as type,G as unflatten};
//# sourceMappingURL=utils.esm-browser.prod.js.map

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 1.16.1; author: NextGIS */
/** Bundle of @nextgis/utils; version: 1.16.2; author: NextGIS */
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';

@@ -634,10 +634,20 @@ var type = isBrowser ? 'browser' : 'node';

function camelize(str) {
return str
.replace(/^[_.\- ]+/, '')
.toLocaleLowerCase()
.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, function (_, p1) {
return p1.toLocaleUpperCase();
})
.replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, function (m) { return m.toLocaleUpperCase(); });
/**
* Camelize a string, cutting the string by separator character.
* @param text to camelize
* @param separator Word separator (string or regexp)
* @return string Camelized text
*/
function camelize(text, separator) {
if (separator === void 0) { separator = /[_.\- ]/; }
// Cut the string into words
var words = text.split(separator);
// Concatenate all capitalized words to get camelized string
var result = "";
for (var i = 0; i < words.length; i++) {
var word = words[i];
var capitalizedWord = word.charAt(0).toUpperCase() + word.slice(1);
result += capitalizedWord;
}
return result;
}

@@ -644,0 +654,0 @@

@@ -1,2 +0,2 @@

var t="undefined"!=typeof window&&void 0!==window.document,n=t?"browser":"node";function r(){return t?window:global}function e(t,n,r){void 0===r&&(r={});var e=o(t.prototype),i=void 0===r.replace||r.replace;n.forEach((function(n){Object.getOwnPropertyNames(n.prototype).forEach((function(r){var o=-1!==e.indexOf(r);if(!i&&!o||i){var u=Object.getOwnPropertyDescriptor(n.prototype,r);u&&Object.defineProperty(t.prototype,r,u)}}))}))}function o(t){return function(t,n){void 0===n&&(n=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var r=Object.getOwnPropertyNames(t),e=0;e<r.length;e++)-1==n.indexOf(r[e])&&n.push(r[e]);return n}(t)}function i(t,n,r){r.forEach((function(r){var e=Object.getOwnPropertyDescriptor(n.prototype,r);e&&Object.defineProperty(t.prototype,r,e)}))}function u(t,n){return a(t=Array.from(t).sort(),n=Array.from(n).sort())}function c(t,n){return a(t=Array.from(t),n=Array.from(n))}function a(t,n){return t.length===n.length&&t.every((function(t,r){return t===n[r]}))}function f(t){return t.filter((function(t,n,r){return r.indexOf(t)==n}))}function l(t,n){return Array.from({length:Math.ceil(t.length/n)},(function(r,e){return t.slice(e*n,e*n+n)}))}function p(t){return null!=t}function s(t){return"string"==typeof t?!!t:p(t)}function y(t,n,r){void 0===r&&(r=!1);var e=t,o=n,i=Array.isArray(o),u=i&&[]||{};return i&&Array.isArray(o)?r?(u=u.concat(e=e||[]),o.forEach((function(t,n){void 0===u[n]?u[n]=t:"object"==typeof t?u[n]=y(e[n],t,r):-1===e.indexOf(t)&&u.push(t)}))):u=o:(e&&"object"==typeof e&&Object.keys(e).forEach((function(t){u[t]=e[t]})),Object.keys(o).forEach((function(t){u[t]="object"==typeof o[t]&&o[t]&&"object"==typeof e[t]&&"object"==typeof o[t]?y(e[t],o[t],r):o[t]}))),u}function v(t){return"production"!==process.env.NODE_ENV&&(console.trace("DEBUG: "+t),!0)}function h(t){!t.lngLat&&t.latLng&&(v("deprecated use of latLng in MapClickEvent, use lngLat instead"),t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function d(t){console.warn("DEPRECATED WARN: ".concat(t))}function g(t,n){var r;function e(){for(var o=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];e.clear(),r=setTimeout((function(){r=null,t.apply(o,i)}),n)}return void 0===n&&(n=10),e.clear=function(){r&&(clearTimeout(r),r=null)},e}function b(t){return void 0===t&&(t=10),function(n,r,e){return{configurable:!0,enumerable:e.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:e.enumerable,value:g(e.value,t)}),this[r]}}}}var m=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,n){this._eventsStatus[t]=n},t.prototype.onLoad=function(t){var n=this,r=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(r){n.getEventStatus(t)?r(n):n.emitter.once(t,(function(){n.setEventStatus(t,!0),r(n)}))}))}));return Promise.all(r).then((function(){return n}))},t.prototype.getEventStatus=function(t){var n=this._eventsStatus[t];return void 0!==n&&!!n},t}();function j(t){return[t.lng,t.lat]}function O(t){return{lat:t[1],lng:t[0]}}var P=6371;function A(t){return{type:"Polygon",coordinates:[M(t)]}}function M(t){var n=[t[0],t[1]];return[n,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],n]}function w(t){return{type:"Feature",properties:{},geometry:A(t)}}var E=Math.PI/180,C=180/Math.PI;function L(t,n,r,e){void 0===r&&(r=10),void 0===e&&(e=6);for(var o=r/6371*C,i=o/Math.cos(n*E),u=[],c=0;c<e+1;c++){var a=Math.PI*(c/(e/2)),f=t+i*Math.cos(a),l=n+o*Math.sin(a);u.push([f,l])}return u}function S(t,n,r,e){return void 0===r&&(r=10),void 0===e&&(e=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[L(t,n,r,e)]}}}function N(t,n){n=n>85.06?85.06:n<-85.06?-85.06:n;var r=20037508.34*t/180,e=Math.log(Math.tan((90+n)*Math.PI/360))/(Math.PI/180);return[r,e=20037508.34*e/180]}function D(t,n){return[180*t/20037508.34,360*Math.atan(Math.exp(n*Math.PI/20037508.34))/Math.PI-90]}function x(t){return t*Math.PI/180}function I(t){var n=0;return _(t,(function(){return n++})),n}function T(t){var n=[];return _(t,(function(t){return n.push(t)})),n}function _(t,n){F(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++){e[r].forEach((function(t){return n(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return n(t)}))}))}else if("Point"===t.type)n(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var u=0,c=t.coordinates;u<c.length;u++){n(c[u])}return t}))}function k(t){var n=[];return F(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return n.push(t)}));else if("MultiPolygon"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++)for(var o=0,i=e[r];o<i.length;o++){n.push(i[o])}return t})),n}function F(t,n){if("FeatureCollection"===t.type)for(var r=0,e=t.features;r<e.length;r++){n(e[r].geometry)}else"Feature"===t.type?n(t.geometry):"coordinates"in t&&n(t)}function $(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}function U(t,n,r){return(r=null!=r?r:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,n+8))*5e-4}function R(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0,o=n;e<o.length;e++)for(var i=o[e],u=0,c=Object.getOwnPropertyNames(i);u<c.length;u++){var a=c[u];t[a]=i[a]}}function B(t,n,r,e){if(t instanceof Array)return n instanceof Array&&n.sort().join("")===t.sort().join("");if(t instanceof Date)return n instanceof Date&&""+t==""+n;if(t instanceof Function){if(!(n instanceof Function))return!1}else if(t instanceof Object)return n instanceof Object&&(t===r?n===e:G(t,n));return t===n}function G(t,n){var r=Object.keys(t).sort(),e=Object.keys(n).sort();if(r.length!==e.length)return!1;if(r.join("")!==e.join(""))return!1;for(var o=0;o<r.length;o++){if(!B(t[r[o]],n[e[o]],t,n))return!1}return!0}function V(t){var n={};return Object.keys(t).forEach((function(r){t[r]instanceof Array||t[r]!==Object(t[r])?void 0!==t[r]&&(n[r]=t[r]):n[r]=V(t[r])})),n}function W(t,n){var r;void 0===n&&(n={});var e=null===(r=n.flatArray)||void 0===r||r,o={};return function t(n,r){if(Object(n)!==n)o[r]=n;else if(Array.isArray(n)&&e){for(var i=n.length,u=0;u<i;u++)t(n[u],r+"["+u+"]");0===i&&(o[r]=[])}else{var c=!0;for(var a in n)c=!1,t(n[a],r?r+"."+a:a);c&&r&&(o[r]={})}}(t,""),o}function q(t){if(Object(t)!==t||Array.isArray(t))return t;var n=/\.?([^.[\]]+)|\[(\d+)\]/g,r={};for(var e in t){for(var o=r,i="",u=void 0;u=n.exec(e);)o=o[i]||(o[i]=u[2]?[]:{}),i=u[2]||u[1];o[i]=t[e]}return r[""]||r}function z(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function H(t){return void 0===t&&(t=0),new Promise((function(n){return setTimeout(n,t)}))}function J(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function K(t){return t.replace(/^[_.\- ]+/,"").toLocaleLowerCase().replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu,(function(t,n){return n.toLocaleUpperCase()})).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu,(function(t){return t.toLocaleUpperCase()}))}function Q(t){var n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")}function X(t,n){var r=n?Number("1e+"+n):1;return Math.round((t+Number.EPSILON)*r)/r}function Y(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(et(t)?tt(t):!!ot(t)&&Z(t))}function Z(t){return!!ot(t)&&t.every(Y)}function tt(t){if(et(t))for(var n in t)if(!Y(n))return!1;return!1}function nt(t,n){return("string"==typeof n||"number"==typeof n)&&n in t}function rt(t,n){return nt(t,n)}function et(t){return"[object Object]"===Object.prototype.toString.call(t)}function ot(t){return"[object Array]"===Object.prototype.toString.call(t)}function it(t){return t.replace(/([^:]\/)\/+/g,"$1")}var ut=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(n){return(new t).copy(n)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(n){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();export{ut as Clipboard,b as DebounceDecorator,P as EARTHS_RADIUS,m as Events,o as allProperties,e as applyMixins,l as arrayChunk,u as arrayCompare,c as arrayCompareStrict,f as arrayUnique,K as camelize,J as capitalize,I as coordinatesCount,g as debounce,v as debugLog,y as deepmerge,p as defined,x as degrees2Radian,N as degrees2meters,h as deprecatedMapClick,d as deprecatedWarn,_ as eachCoordinates,F as eachGeometry,it as fixUrlStr,W as flatten,s as full,M as getBoundsCoordinates,w as getBoundsFeature,A as getBoundsPolygon,S as getCircleFeature,L as getCirclePolygonCoordinates,T as getCoordinates,r as getGlobalVariable,U as getIdentifyRadius,k as getPolygons,Y as isAnyJson,ot as isArray,t as isBrowser,Z as isJsonArray,tt as isJsonMap,$ as isLngLatBoundsArray,nt as isObjKey,et as isObject,rt as keyInObj,j as latLngToLngLatArray,O as lngLatArrayToLatLng,D as meters2degrees,i as mixinProperties,Q as numberWithSpaces,R as objectAssign,G as objectDeepEqual,V as objectRemoveEmpty,z as reEscape,X as round,H as sleep,n as type,q as unflatten};
var t="undefined"!=typeof window&&void 0!==window.document,n=t?"browser":"node";function r(){return t?window:global}function e(t,n,r){void 0===r&&(r={});var e=o(t.prototype),i=void 0===r.replace||r.replace;n.forEach((function(n){Object.getOwnPropertyNames(n.prototype).forEach((function(r){var o=-1!==e.indexOf(r);if(!i&&!o||i){var u=Object.getOwnPropertyDescriptor(n.prototype,r);u&&Object.defineProperty(t.prototype,r,u)}}))}))}function o(t){return function(t,n){void 0===n&&(n=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var r=Object.getOwnPropertyNames(t),e=0;e<r.length;e++)-1==n.indexOf(r[e])&&n.push(r[e]);return n}(t)}function i(t,n,r){r.forEach((function(r){var e=Object.getOwnPropertyDescriptor(n.prototype,r);e&&Object.defineProperty(t.prototype,r,e)}))}function u(t,n){return a(t=Array.from(t).sort(),n=Array.from(n).sort())}function c(t,n){return a(t=Array.from(t),n=Array.from(n))}function a(t,n){return t.length===n.length&&t.every((function(t,r){return t===n[r]}))}function f(t){return t.filter((function(t,n,r){return r.indexOf(t)==n}))}function l(t,n){return Array.from({length:Math.ceil(t.length/n)},(function(r,e){return t.slice(e*n,e*n+n)}))}function s(t){return null!=t}function p(t){return"string"==typeof t?!!t:s(t)}function y(t,n,r){void 0===r&&(r=!1);var e=t,o=n,i=Array.isArray(o),u=i&&[]||{};return i&&Array.isArray(o)?r?(u=u.concat(e=e||[]),o.forEach((function(t,n){void 0===u[n]?u[n]=t:"object"==typeof t?u[n]=y(e[n],t,r):-1===e.indexOf(t)&&u.push(t)}))):u=o:(e&&"object"==typeof e&&Object.keys(e).forEach((function(t){u[t]=e[t]})),Object.keys(o).forEach((function(t){u[t]="object"==typeof o[t]&&o[t]&&"object"==typeof e[t]&&"object"==typeof o[t]?y(e[t],o[t],r):o[t]}))),u}function v(t){return"production"!==process.env.NODE_ENV&&(console.trace("DEBUG: "+t),!0)}function h(t){!t.lngLat&&t.latLng&&(v("deprecated use of latLng in MapClickEvent, use lngLat instead"),t.lngLat=[t.latLng.lng,t.latLng.lat]);return t}function d(t){console.warn("DEPRECATED WARN: ".concat(t))}function g(t,n){var r;function e(){for(var o=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];e.clear(),r=setTimeout((function(){r=null,t.apply(o,i)}),n)}return void 0===n&&(n=10),e.clear=function(){r&&(clearTimeout(r),r=null)},e}function b(t){return void 0===t&&(t=10),function(n,r,e){return{configurable:!0,enumerable:e.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:e.enumerable,value:g(e.value,t)}),this[r]}}}}var m=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,n){this._eventsStatus[t]=n},t.prototype.onLoad=function(t){var n=this,r=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(r){n.getEventStatus(t)?r(n):n.emitter.once(t,(function(){n.setEventStatus(t,!0),r(n)}))}))}));return Promise.all(r).then((function(){return n}))},t.prototype.getEventStatus=function(t){var n=this._eventsStatus[t];return void 0!==n&&!!n},t}();function j(t){return[t.lng,t.lat]}function O(t){return{lat:t[1],lng:t[0]}}var P=6371;function M(t){return{type:"Polygon",coordinates:[A(t)]}}function A(t){var n=[t[0],t[1]];return[n,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],n]}function E(t){return{type:"Feature",properties:{},geometry:M(t)}}var w=Math.PI/180,C=180/Math.PI;function S(t,n,r,e){void 0===r&&(r=10),void 0===e&&(e=6);for(var o=r/6371*C,i=o/Math.cos(n*w),u=[],c=0;c<e+1;c++){var a=Math.PI*(c/(e/2)),f=t+i*Math.cos(a),l=n+o*Math.sin(a);u.push([f,l])}return u}function L(t,n,r,e){return void 0===r&&(r=10),void 0===e&&(e=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[S(t,n,r,e)]}}}function D(t,n){n=n>85.06?85.06:n<-85.06?-85.06:n;var r=20037508.34*t/180,e=Math.log(Math.tan((90+n)*Math.PI/360))/(Math.PI/180);return[r,e=20037508.34*e/180]}function N(t,n){return[180*t/20037508.34,360*Math.atan(Math.exp(n*Math.PI/20037508.34))/Math.PI-90]}function x(t){return t*Math.PI/180}function I(t){var n=0;return k(t,(function(){return n++})),n}function T(t){var n=[];return k(t,(function(t){return n.push(t)})),n}function k(t,n){_(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++){e[r].forEach((function(t){return n(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return n(t)}))}))}else if("Point"===t.type)n(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var u=0,c=t.coordinates;u<c.length;u++){n(c[u])}return t}))}function F(t){var n=[];return _(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return n.push(t)}));else if("MultiPolygon"===t.type)for(var r=0,e=t.coordinates;r<e.length;r++)for(var o=0,i=e[r];o<i.length;o++){n.push(i[o])}return t})),n}function _(t,n){if("FeatureCollection"===t.type)for(var r=0,e=t.features;r<e.length;r++){n(e[r].geometry)}else"Feature"===t.type?n(t.geometry):"coordinates"in t&&n(t)}function R(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))}function U(t,n,r){return(r=null!=r?r:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,n+8))*5e-4}function $(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0,o=n;e<o.length;e++)for(var i=o[e],u=0,c=Object.getOwnPropertyNames(i);u<c.length;u++){var a=c[u];t[a]=i[a]}}function B(t,n,r,e){if(t instanceof Array)return n instanceof Array&&n.sort().join("")===t.sort().join("");if(t instanceof Date)return n instanceof Date&&""+t==""+n;if(t instanceof Function){if(!(n instanceof Function))return!1}else if(t instanceof Object)return n instanceof Object&&(t===r?n===e:G(t,n));return t===n}function G(t,n){var r=Object.keys(t).sort(),e=Object.keys(n).sort();if(r.length!==e.length)return!1;if(r.join("")!==e.join(""))return!1;for(var o=0;o<r.length;o++){if(!B(t[r[o]],n[e[o]],t,n))return!1}return!0}function V(t){var n={};return Object.keys(t).forEach((function(r){t[r]instanceof Array||t[r]!==Object(t[r])?void 0!==t[r]&&(n[r]=t[r]):n[r]=V(t[r])})),n}function W(t,n){var r;void 0===n&&(n={});var e=null===(r=n.flatArray)||void 0===r||r,o={};return function t(n,r){if(Object(n)!==n)o[r]=n;else if(Array.isArray(n)&&e){for(var i=n.length,u=0;u<i;u++)t(n[u],r+"["+u+"]");0===i&&(o[r]=[])}else{var c=!0;for(var a in n)c=!1,t(n[a],r?r+"."+a:a);c&&r&&(o[r]={})}}(t,""),o}function q(t){if(Object(t)!==t||Array.isArray(t))return t;var n=/\.?([^.[\]]+)|\[(\d+)\]/g,r={};for(var e in t){for(var o=r,i="",u=void 0;u=n.exec(e);)o=o[i]||(o[i]=u[2]?[]:{}),i=u[2]||u[1];o[i]=t[e]}return r[""]||r}function z(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function H(t){return void 0===t&&(t=0),new Promise((function(n){return setTimeout(n,t)}))}function J(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)}function K(t,n){void 0===n&&(n=/[_.\- ]/);for(var r=t.split(n),e="",o=0;o<r.length;o++){var i=r[o];e+=i.charAt(0).toUpperCase()+i.slice(1)}return e}function Q(t){var n=t.toString().split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),n.join(".")}function X(t,n){var r=n?Number("1e+"+n):1;return Math.round((t+Number.EPSILON)*r)/r}function Y(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(et(t)?tt(t):!!ot(t)&&Z(t))}function Z(t){return!!ot(t)&&t.every(Y)}function tt(t){if(et(t))for(var n in t)if(!Y(n))return!1;return!1}function nt(t,n){return("string"==typeof n||"number"==typeof n)&&n in t}function rt(t,n){return nt(t,n)}function et(t){return"[object Object]"===Object.prototype.toString.call(t)}function ot(t){return"[object Array]"===Object.prototype.toString.call(t)}function it(t){return t.replace(/([^:]\/)\/+/g,"$1")}var ut=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(n){return(new t).copy(n)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(n){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var n=document.createElement("input");n.value=t;try{document.body.appendChild(n),this.copyNodeContentsToClipboard(n)}finally{document.body.removeChild(n)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();export{ut as Clipboard,b as DebounceDecorator,P as EARTHS_RADIUS,m as Events,o as allProperties,e as applyMixins,l as arrayChunk,u as arrayCompare,c as arrayCompareStrict,f as arrayUnique,K as camelize,J as capitalize,I as coordinatesCount,g as debounce,v as debugLog,y as deepmerge,s as defined,x as degrees2Radian,D as degrees2meters,h as deprecatedMapClick,d as deprecatedWarn,k as eachCoordinates,_ as eachGeometry,it as fixUrlStr,W as flatten,p as full,A as getBoundsCoordinates,E as getBoundsFeature,M as getBoundsPolygon,L as getCircleFeature,S as getCirclePolygonCoordinates,T as getCoordinates,r as getGlobalVariable,U as getIdentifyRadius,F as getPolygons,Y as isAnyJson,ot as isArray,t as isBrowser,Z as isJsonArray,tt as isJsonMap,R as isLngLatBoundsArray,nt as isObjKey,et as isObject,rt as keyInObj,j as latLngToLngLatArray,O as lngLatArrayToLatLng,N as meters2degrees,i as mixinProperties,Q as numberWithSpaces,$ as objectAssign,G as objectDeepEqual,V as objectRemoveEmpty,z as reEscape,X as round,H as sleep,n as type,q as unflatten};
//# sourceMappingURL=utils.esm-bundler.prod.js.map

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/utils; version: 1.16.1; author: NextGIS */
/** Bundle of @nextgis/utils; version: 1.16.2; author: NextGIS */
var Utils = (function (exports) {

@@ -636,10 +636,20 @@ 'use strict';

function camelize(str) {
return str
.replace(/^[_.\- ]+/, '')
.toLocaleLowerCase()
.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, function (_, p1) {
return p1.toLocaleUpperCase();
})
.replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, function (m) { return m.toLocaleUpperCase(); });
/**
* Camelize a string, cutting the string by separator character.
* @param text to camelize
* @param separator Word separator (string or regexp)
* @return string Camelized text
*/
function camelize(text, separator) {
if (separator === void 0) { separator = /[_.\- ]/; }
// Cut the string into words
var words = text.split(separator);
// Concatenate all capitalized words to get camelized string
var result = "";
for (var i = 0; i < words.length; i++) {
var word = words[i];
var capitalizedWord = word.charAt(0).toUpperCase() + word.slice(1);
result += capitalizedWord;
}
return result;
}

@@ -646,0 +656,0 @@

@@ -1,2 +0,2 @@

var Utils=function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.document,n=e?"browser":"node";function r(t){return function(t,e){void 0===e&&(e=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)-1==e.indexOf(n[r])&&e.push(n[r]);return e}(t)}function o(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function i(t){return null!=t}function a(t,e){var n;function r(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];r.clear(),n=setTimeout((function(){n=null,t.apply(o,i)}),e)}return void 0===e&&(e=10),r.clear=function(){n&&(clearTimeout(n),n=null)},r}var u=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,e){this._eventsStatus[t]=e},t.prototype.onLoad=function(t){var e=this,n=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(n){e.getEventStatus(t)?n(e):e.emitter.once(t,(function(){e.setEventStatus(t,!0),n(e)}))}))}));return Promise.all(n).then((function(){return e}))},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return void 0!==e&&!!e},t}();function c(t){return{type:"Polygon",coordinates:[f(t)]}}function f(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var l=Math.PI/180,s=180/Math.PI;function p(t,e,n,r){void 0===n&&(n=10),void 0===r&&(r=6);for(var o=n/6371*s,i=o/Math.cos(e*l),a=[],u=0;u<r+1;u++){var c=Math.PI*(u/(r/2)),f=t+i*Math.cos(c),p=e+o*Math.sin(c);a.push([f,p])}return a}function y(t,e){d(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var n=0,r=t.coordinates;n<r.length;n++){r[n].forEach((function(t){return e(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return e(t)}))}))}else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var a=0,u=t.coordinates;a<u.length;a++){e(u[a])}return t}))}function d(t,e){if("FeatureCollection"===t.type)for(var n=0,r=t.features;n<r.length;n++){e(r[n].geometry)}else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function g(t,e,n,r){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===r:v(t,e));return t===e}function v(t,e){var n=Object.keys(t).sort(),r=Object.keys(e).sort();if(n.length!==r.length)return!1;if(n.join("")!==r.join(""))return!1;for(var o=0;o<n.length;o++){if(!g(t[n[o]],e[r[o]],t,e))return!1}return!0}function h(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(P(t)?m(t):!!O(t)&&b(t))}function b(t){return!!O(t)&&t.every(h)}function m(t){if(P(t))for(var e in t)if(!h(e))return!1;return!1}function j(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function P(t){return"[object Object]"===Object.prototype.toString.call(t)}function O(t){return"[object Array]"===Object.prototype.toString.call(t)}var A=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(e){return(new t).copy(e)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();return t.Clipboard=A,t.DebounceDecorator=function(t){return void 0===t&&(t=10),function(e,n,r){return{configurable:!0,enumerable:r.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:r.enumerable,value:a(r.value,t)}),this[n]}}}},t.EARTHS_RADIUS=6371,t.Events=u,t.allProperties=r,t.applyMixins=function(t,e,n){void 0===n&&(n={});var o=r(t.prototype),i=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){var r=-1!==o.indexOf(n);if(!i&&!r||i){var a=Object.getOwnPropertyDescriptor(e.prototype,n);a&&Object.defineProperty(t.prototype,n,a)}}))}))},t.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},(function(n,r){return t.slice(r*e,r*e+e)}))},t.arrayCompare=function(t,e){return o(t=Array.from(t).sort(),e=Array.from(e).sort())},t.arrayCompareStrict=function(t,e){return o(t=Array.from(t),e=Array.from(e))},t.arrayUnique=function(t){return t.filter((function(t,e,n){return n.indexOf(t)==e}))},t.camelize=function(t){return t.replace(/^[_.\- ]+/,"").toLocaleLowerCase().replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu,(function(t,e){return e.toLocaleUpperCase()})).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu,(function(t){return t.toLocaleUpperCase()}))},t.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},t.coordinatesCount=function(t){var e=0;return y(t,(function(){return e++})),e},t.debounce=a,t.debugLog=function(t){return!1},t.deepmerge=function t(e,n,r){void 0===r&&(r=!1);var o=e,i=n,a=Array.isArray(i),u=a&&[]||{};return a&&Array.isArray(i)?r?(u=u.concat(o=o||[]),i.forEach((function(e,n){void 0===u[n]?u[n]=e:"object"==typeof e?u[n]=t(o[n],e,r):-1===o.indexOf(e)&&u.push(e)}))):u=i:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){u[t]=o[t]})),Object.keys(i).forEach((function(e){u[e]="object"==typeof i[e]&&i[e]&&"object"==typeof o[e]&&"object"==typeof i[e]?t(o[e],i[e],r):i[e]}))),u},t.defined=i,t.degrees2Radian=function(t){return t*Math.PI/180},t.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var n=20037508.34*t/180,r=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[n,r=20037508.34*r/180]},t.deprecatedMapClick=function(t){return!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]),t},t.deprecatedWarn=function(t){console.warn("DEPRECATED WARN: ".concat(t))},t.eachCoordinates=y,t.eachGeometry=d,t.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},t.flatten=function(t,e){var n;void 0===e&&(e={});var r=null===(n=e.flatArray)||void 0===n||n,o={};return function t(e,n){if(Object(e)!==e)o[n]=e;else if(Array.isArray(e)&&r){for(var i=e.length,a=0;a<i;a++)t(e[a],n+"["+a+"]");0===i&&(o[n]=[])}else{var u=!0;for(var c in e)u=!1,t(e[c],n?n+"."+c:c);u&&n&&(o[n]={})}}(t,""),o},t.full=function(t){return"string"==typeof t?!!t:i(t)},t.getBoundsCoordinates=f,t.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:c(t)}},t.getBoundsPolygon=c,t.getCircleFeature=function(t,e,n,r){return void 0===n&&(n=10),void 0===r&&(r=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[p(t,e,n,r)]}}},t.getCirclePolygonCoordinates=p,t.getCoordinates=function(t){var e=[];return y(t,(function(t){return e.push(t)})),e},t.getGlobalVariable=function(){return e?window:global},t.getIdentifyRadius=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},t.getPolygons=function(t){var e=[];return d(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return e.push(t)}));else if("MultiPolygon"===t.type)for(var n=0,r=t.coordinates;n<r.length;n++)for(var o=0,i=r[n];o<i.length;o++){e.push(i[o])}return t})),e},t.isAnyJson=h,t.isArray=O,t.isBrowser=e,t.isJsonArray=b,t.isJsonMap=m,t.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))},t.isObjKey=j,t.isObject=P,t.keyInObj=function(t,e){return j(t,e)},t.latLngToLngLatArray=function(t){return[t.lng,t.lat]},t.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},t.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},t.mixinProperties=function(t,e,n){n.forEach((function(n){var r=Object.getOwnPropertyDescriptor(e.prototype,n);r&&Object.defineProperty(t.prototype,n,r)}))},t.numberWithSpaces=function(t){var e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},t.objectAssign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++)for(var i=o[r],a=0,u=Object.getOwnPropertyNames(i);a<u.length;a++){var c=u[a];t[c]=i[c]}},t.objectDeepEqual=v,t.objectRemoveEmpty=function t(e){var n={};return Object.keys(e).forEach((function(r){e[r]instanceof Array||e[r]!==Object(e[r])?void 0!==e[r]&&(n[r]=e[r]):n[r]=t(e[r])})),n},t.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},t.round=function(t,e){var n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n},t.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},t.type=n,t.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;var e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(var r in t){for(var o=n,i="",a=void 0;a=e.exec(r);)o=o[i]||(o[i]=a[2]?[]:{}),i=a[2]||a[1];o[i]=t[r]}return n[""]||n},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
var Utils=function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.document,n=e?"browser":"node";function r(t){return function(t,e){void 0===e&&(e=[]);for(;null!==t;t=Object.getPrototypeOf(t))for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)-1==e.indexOf(n[r])&&e.push(n[r]);return e}(t)}function o(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}function i(t){return null!=t}function a(t,e){var n;function r(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];r.clear(),n=setTimeout((function(){n=null,t.apply(o,i)}),e)}return void 0===e&&(e=10),r.clear=function(){n&&(clearTimeout(n),n=null)},r}var u=function(){function t(t){this.emitter=t,this._eventsStatus={}}return t.prototype.setEventStatus=function(t,e){this._eventsStatus[t]=e},t.prototype.onLoad=function(t){var e=this,n=(Array.isArray(t)?t:[t]).map((function(t){return new Promise((function(n){e.getEventStatus(t)?n(e):e.emitter.once(t,(function(){e.setEventStatus(t,!0),n(e)}))}))}));return Promise.all(n).then((function(){return e}))},t.prototype.getEventStatus=function(t){var e=this._eventsStatus[t];return void 0!==e&&!!e},t}();function c(t){return{type:"Polygon",coordinates:[f(t)]}}function f(t){var e=[t[0],t[1]];return[e,[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],e]}var s=Math.PI/180,l=180/Math.PI;function p(t,e,n,r){void 0===n&&(n=10),void 0===r&&(r=6);for(var o=n/6371*l,i=o/Math.cos(e*s),a=[],u=0;u<r+1;u++){var c=Math.PI*(u/(r/2)),f=t+i*Math.cos(c),p=e+o*Math.sin(c);a.push([f,p])}return a}function y(t,e){d(t,(function(t){if("coordinates"in t)if("Polygon"===t.type||"MultiLineString"===t.type)for(var n=0,r=t.coordinates;n<r.length;n++){r[n].forEach((function(t){return e(t)}))}else if("MultiPolygon"===t.type)for(var o=0,i=t.coordinates;o<i.length;o++){i[o].forEach((function(t){return t.forEach((function(t){return e(t)}))}))}else if("Point"===t.type)e(t.coordinates);else if("MultiPoint"===t.type||"LineString"===t.type)for(var a=0,u=t.coordinates;a<u.length;a++){e(u[a])}return t}))}function d(t,e){if("FeatureCollection"===t.type)for(var n=0,r=t.features;n<r.length;n++){e(r[n].geometry)}else"Feature"===t.type?e(t.geometry):"coordinates"in t&&e(t)}function g(t,e,n,r){if(t instanceof Array)return e instanceof Array&&e.sort().join("")===t.sort().join("");if(t instanceof Date)return e instanceof Date&&""+t==""+e;if(t instanceof Function){if(!(e instanceof Function))return!1}else if(t instanceof Object)return e instanceof Object&&(t===n?e===r:v(t,e));return t===e}function v(t,e){var n=Object.keys(t).sort(),r=Object.keys(e).sort();if(n.length!==r.length)return!1;if(n.join("")!==r.join(""))return!1;for(var o=0;o<n.length;o++){if(!g(t[n[o]],e[r[o]],t,e))return!1}return!0}function h(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||(P(t)?m(t):!!O(t)&&b(t))}function b(t){return!!O(t)&&t.every(h)}function m(t){if(P(t))for(var e in t)if(!h(e))return!1;return!1}function j(t,e){return("string"==typeof e||"number"==typeof e)&&e in t}function P(t){return"[object Object]"===Object.prototype.toString.call(t)}function O(t){return"[object Array]"===Object.prototype.toString.call(t)}var A=function(){function t(t){this.silent=!0,t&&this.copy(t)}return t.copy=function(e){return(new t).copy(e)},t.prototype.copy=function(t){try{return navigator.clipboard?navigator.clipboard.writeText(t):window.clipboardData?window.clipboardData.setData("text",t):this.copyToClipboard(t),!this.silent&&console.log("Copied to Clipboard"),!0}catch(e){!this.silent&&console.log("Please copy manually")}return!1},t.prototype.copyToClipboard=function(t){var e=document.createElement("input");e.value=t;try{document.body.appendChild(e),this.copyNodeContentsToClipboard(e)}finally{document.body.removeChild(e)}},t.prototype.copyNodeContentsToClipboard=function(t){t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")},t}();return t.Clipboard=A,t.DebounceDecorator=function(t){return void 0===t&&(t=10),function(e,n,r){return{configurable:!0,enumerable:r.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:r.enumerable,value:a(r.value,t)}),this[n]}}}},t.EARTHS_RADIUS=6371,t.Events=u,t.allProperties=r,t.applyMixins=function(t,e,n){void 0===n&&(n={});var o=r(t.prototype),i=void 0===n.replace||n.replace;e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){var r=-1!==o.indexOf(n);if(!i&&!r||i){var a=Object.getOwnPropertyDescriptor(e.prototype,n);a&&Object.defineProperty(t.prototype,n,a)}}))}))},t.arrayChunk=function(t,e){return Array.from({length:Math.ceil(t.length/e)},(function(n,r){return t.slice(r*e,r*e+e)}))},t.arrayCompare=function(t,e){return o(t=Array.from(t).sort(),e=Array.from(e).sort())},t.arrayCompareStrict=function(t,e){return o(t=Array.from(t),e=Array.from(e))},t.arrayUnique=function(t){return t.filter((function(t,e,n){return n.indexOf(t)==e}))},t.camelize=function(t,e){void 0===e&&(e=/[_.\- ]/);for(var n=t.split(e),r="",o=0;o<n.length;o++){var i=n[o];r+=i.charAt(0).toUpperCase()+i.slice(1)}return r},t.capitalize=function(t){return(t=String(t).toLowerCase())[0].toUpperCase()+t.slice(1)},t.coordinatesCount=function(t){var e=0;return y(t,(function(){return e++})),e},t.debounce=a,t.debugLog=function(t){return!1},t.deepmerge=function t(e,n,r){void 0===r&&(r=!1);var o=e,i=n,a=Array.isArray(i),u=a&&[]||{};return a&&Array.isArray(i)?r?(u=u.concat(o=o||[]),i.forEach((function(e,n){void 0===u[n]?u[n]=e:"object"==typeof e?u[n]=t(o[n],e,r):-1===o.indexOf(e)&&u.push(e)}))):u=i:(o&&"object"==typeof o&&Object.keys(o).forEach((function(t){u[t]=o[t]})),Object.keys(i).forEach((function(e){u[e]="object"==typeof i[e]&&i[e]&&"object"==typeof o[e]&&"object"==typeof i[e]?t(o[e],i[e],r):i[e]}))),u},t.defined=i,t.degrees2Radian=function(t){return t*Math.PI/180},t.degrees2meters=function(t,e){e=e>85.06?85.06:e<-85.06?-85.06:e;var n=20037508.34*t/180,r=Math.log(Math.tan((90+e)*Math.PI/360))/(Math.PI/180);return[n,r=20037508.34*r/180]},t.deprecatedMapClick=function(t){return!t.lngLat&&t.latLng&&(t.lngLat=[t.latLng.lng,t.latLng.lat]),t},t.deprecatedWarn=function(t){console.warn("DEPRECATED WARN: ".concat(t))},t.eachCoordinates=y,t.eachGeometry=d,t.fixUrlStr=function(t){return t.replace(/([^:]\/)\/+/g,"$1")},t.flatten=function(t,e){var n;void 0===e&&(e={});var r=null===(n=e.flatArray)||void 0===n||n,o={};return function t(e,n){if(Object(e)!==e)o[n]=e;else if(Array.isArray(e)&&r){for(var i=e.length,a=0;a<i;a++)t(e[a],n+"["+a+"]");0===i&&(o[n]=[])}else{var u=!0;for(var c in e)u=!1,t(e[c],n?n+"."+c:c);u&&n&&(o[n]={})}}(t,""),o},t.full=function(t){return"string"==typeof t?!!t:i(t)},t.getBoundsCoordinates=f,t.getBoundsFeature=function(t){return{type:"Feature",properties:{},geometry:c(t)}},t.getBoundsPolygon=c,t.getCircleFeature=function(t,e,n,r){return void 0===n&&(n=10),void 0===r&&(r=6),{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[p(t,e,n,r)]}}},t.getCirclePolygonCoordinates=p,t.getCoordinates=function(t){var e=[];return y(t,(function(t){return e.push(t)})),e},t.getGlobalVariable=function(){return e?window:global},t.getIdentifyRadius=function(t,e,n){return(n=null!=n?n:10)*(40075016.686*Math.abs(Math.cos(180*t[1]/Math.PI))/Math.pow(2,e+8))*5e-4},t.getPolygons=function(t){var e=[];return d(t,(function(t){if("coordinates"in t)if("Polygon"===t.type)t.coordinates.forEach((function(t){return e.push(t)}));else if("MultiPolygon"===t.type)for(var n=0,r=t.coordinates;n<r.length;n++)for(var o=0,i=r[n];o<i.length;o++){e.push(i[o])}return t})),e},t.isAnyJson=h,t.isArray=O,t.isBrowser=e,t.isJsonArray=b,t.isJsonMap=m,t.isLngLatBoundsArray=function(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return"number"==typeof t}))},t.isObjKey=j,t.isObject=P,t.keyInObj=function(t,e){return j(t,e)},t.latLngToLngLatArray=function(t){return[t.lng,t.lat]},t.lngLatArrayToLatLng=function(t){return{lat:t[1],lng:t[0]}},t.meters2degrees=function(t,e){return[180*t/20037508.34,360*Math.atan(Math.exp(e*Math.PI/20037508.34))/Math.PI-90]},t.mixinProperties=function(t,e,n){n.forEach((function(n){var r=Object.getOwnPropertyDescriptor(e.prototype,n);r&&Object.defineProperty(t.prototype,n,r)}))},t.numberWithSpaces=function(t){var e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),e.join(".")},t.objectAssign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++)for(var i=o[r],a=0,u=Object.getOwnPropertyNames(i);a<u.length;a++){var c=u[a];t[c]=i[c]}},t.objectDeepEqual=v,t.objectRemoveEmpty=function t(e){var n={};return Object.keys(e).forEach((function(r){e[r]instanceof Array||e[r]!==Object(e[r])?void 0!==e[r]&&(n[r]=e[r]):n[r]=t(e[r])})),n},t.reEscape=function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},t.round=function(t,e){var n=e?Number("1e+"+e):1;return Math.round((t+Number.EPSILON)*n)/n},t.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},t.type=n,t.unflatten=function(t){if(Object(t)!==t||Array.isArray(t))return t;var e=/\.?([^.[\]]+)|\[(\d+)\]/g,n={};for(var r in t){for(var o=n,i="",a=void 0;a=e.exec(r);)o=o[i]||(o[i]=a[2]?[]:{}),i=a[2]||a[1];o[i]=t[r]}return n[""]||n},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
//# sourceMappingURL=utils.global.prod.js.map
{
"name": "@nextgis/utils",
"version": "1.16.1",
"version": "1.16.2",
"description": "Common development tools",

@@ -12,3 +12,3 @@ "main": "index.js",

"devDependencies": {
"@nextgis/build-tools": "^1.16.1",
"@nextgis/build-tools": "^1.16.2",
"@types/geojson": "^7946.0.8"

@@ -50,3 +50,3 @@ },

},
"gitHead": "1e745d6b4ef4da1eca52c19ab17a1dd3198fa73f"
"gitHead": "3bb21edf6017753d9d8148eaae2b8edf86bac00a"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc