diff --git a/dist/index.cjs.js b/dist/index.cjs.js index 44efc96..d058469 100644 --- a/dist/index.cjs.js +++ b/dist/index.cjs.js @@ -29,265 +29,36 @@ function _mergeNamespaces(n, m) { var React__default = /*#__PURE__*/_interopDefaultLegacy(React); var L__default = /*#__PURE__*/_interopDefaultLegacy(L); -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty$1(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} - -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} - -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; -} - -function _defineProperty$1(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; +function _defineProperty$1(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; } - function _extends() { - _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - return _extends.apply(this, arguments); -} - -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - Object.defineProperty(subClass, "prototype", { - writable: false - }); - if (superClass) _setPrototypeOf(subClass, superClass); -} - -function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); -} - -function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - - var target = _objectWithoutPropertiesLoose(source, excluded); - - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; + return _extends = Object.assign ? Object.assign.bind() : function (n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } - } - - return target; -} - -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; + return n; + }, _extends.apply(null, arguments); } - -function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } else if (call !== void 0) { - throw new TypeError("Derived constructors may only return object or undefined"); +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); } - - return _assertThisInitialized(self); -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return _possibleConstructorReturn(this, result); - }; -} - -function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; + return ("string" === r ? String : Number)(t); } - -function _iterableToArrayLimit(arr, i) { - var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; - - if (_i == null) return; - var _arr = []; - var _n = true; - var _d = false; - - var _s, _e; - - try { - for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; -} - -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -10182,7 +9953,10 @@ var _baseConvert = baseConvert$1; var _ = lodash_min.exports.runInContext(); var fp = _baseConvert(_, _); -var pixelWidth = 0.00028; // Compute resolutions from CRS info and tile matrix parameters. +// From OGC Standard +const pixelWidth = 0.00028; + +// Compute resolutions from CRS info and tile matrix parameters. // // The user must supply one of `scaleDenominator` or // `metersPerUnit`, `tileMatrixMinX`, `tileMatrixMaxX`, and `tileWidth` or @@ -10194,41 +9968,41 @@ var pixelWidth = 0.00028; // Compute resolutions from CRS info and tile matrix p // value can be derived, in our particular case from fundamental information // about the tileset, namely its extents or bounds. (For details, see // https://github.com/pacificclimate/pcic-react-leaflet-components/issues/1#issuecomment-818194664) - function resolutions(_ref) { - var metersPerUnit = _ref.metersPerUnit, - scaleDenominator = _ref.scaleDenominator, - tileMatrixMinX = _ref.tileMatrixMinX, - tileMatrixMaxX = _ref.tileMatrixMaxX, - tileWidth = _ref.tileWidth, - tileMatrixMinY = _ref.tileMatrixMinY, - tileMatrixMaxY = _ref.tileMatrixMaxY, - tileHeight = _ref.tileHeight, - numResolutions = _ref.numResolutions; - var maxResolution; - + let { + metersPerUnit, + scaleDenominator, + tileMatrixMinX, + tileMatrixMaxX, + tileWidth, + tileMatrixMinY, + tileMatrixMaxY, + tileHeight, + numResolutions + } = _ref; + let maxResolution; if (!fp.isUndefined(scaleDenominator)) { maxResolution = scaleDenominator * pixelWidth; } else { - var pixelSpan = !fp.isUndefined(tileMatrixMinX) ? (tileMatrixMaxX - tileMatrixMinX) / tileWidth : (tileMatrixMaxY - tileMatrixMinY) / tileHeight; + const pixelSpan = !fp.isUndefined(tileMatrixMinX) ? (tileMatrixMaxX - tileMatrixMinX) / tileWidth : (tileMatrixMaxY - tileMatrixMinY) / tileHeight; maxResolution = pixelSpan * metersPerUnit; } + return fp.map(i => maxResolution / Math.pow(2, i))(fp.range(0, numResolutions)); +} - return fp.map(function (i) { - return maxResolution / Math.pow(2, i); - })(fp.range(0, numResolutions)); -} // Compute options for `L.Proj.CRS` from CRS info and tile matrix parameters. +// Compute options for `L.Proj.CRS` from CRS info and tile matrix parameters. // // See comments to `resolutions` re. resolution computations. // // The values for `origin` and `bounds` are also derived from the extents. (See // https://github.com/pacificclimate/pcic-react-leaflet-components/issues/1#issuecomment-818231259) - function projCRSOptions(tileMatrixParams) { - var tileMatrixMinX = tileMatrixParams.tileMatrixMinX, - tileMatrixMinY = tileMatrixParams.tileMatrixMinY, - tileMatrixMaxX = tileMatrixParams.tileMatrixMaxX, - tileMatrixMaxY = tileMatrixParams.tileMatrixMaxY; + const { + tileMatrixMinX, + tileMatrixMinY, + tileMatrixMaxX, + tileMatrixMaxY + } = tileMatrixParams; return { bounds: L__default["default"].bounds(L__default["default"].point(tileMatrixMinX, tileMatrixMinY), L__default["default"].point(tileMatrixMaxX, tileMatrixMaxY)), origin: [tileMatrixMinX, tileMatrixMaxY], @@ -10236,24 +10010,27 @@ function projCRSOptions(tileMatrixParams) { }; } -var _excluded$4 = ["tileset", "center", "zoom", "mapRef", "children"]; - function GenericBaseMap(_ref) { - var _ref$tileset = _ref.tileset, - url = _ref$tileset.url, - projection = _ref$tileset.projection, - tileMatrix = _ref$tileset.tileMatrix, - attribution = _ref$tileset.attribution, - center = _ref.center, - zoom = _ref.zoom; - _ref.mapRef; - var children = _ref.children, - rest = _objectWithoutProperties(_ref, _excluded$4); - + let { + tileset: { + url, + projection, + tileMatrix, + attribution + }, + center, + zoom, + mapRef, + children, + ...rest + } = _ref; // Create Leaflet CRS object. This is where the magic of this component // lies ... converting the tileMatrix specification to a correct CRS. // TODO: Memoize? - var crs = new L__default["default"].Proj.CRS(projection.code, projection.proj4def, _objectSpread2(_objectSpread2({}, projCRSOptions(tileMatrix)), projection.options)); + const crs = new L__default["default"].Proj.CRS(projection.code, projection.proj4def, { + ...projCRSOptions(tileMatrix), + ...projection.options + }); return /*#__PURE__*/React__default["default"].createElement(reactLeaflet.MapContainer, _extends({ crs: crs, minZoom: 0, @@ -10267,10 +10044,10 @@ function GenericBaseMap(_ref) { maxZoom: tileMatrix.numResolutions }), children); } - GenericBaseMap.propTypes = { // Only props added by this component are defined here. // All other valid props for MapContainer are passed through to it. + // Describes the tileset. tileset: propTypes.exports.shape({ // Full URL of tileset, including `x`, `y`, `z` params. @@ -10291,49 +10068,28 @@ GenericBaseMap.propTypes = { }).isRequired }; -var _excluded$3 = ["children"]; - -var BCBaseMap = /*#__PURE__*/function (_PureComponent) { - _inherits(BCBaseMap, _PureComponent); - - var _super = _createSuper(BCBaseMap); - - function BCBaseMap() { - _classCallCheck(this, BCBaseMap); - - return _super.apply(this, arguments); +class BCBaseMap extends React.PureComponent { + render() { + const { + children, + ...rest + } = this.props; + return /*#__PURE__*/React__default["default"].createElement(GenericBaseMap, _extends({ + tileset: BCBaseMap.tileset + }, rest), children); } - - _createClass(BCBaseMap, [{ - key: "render", - value: function render() { - var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, _excluded$3); - - return /*#__PURE__*/React__default["default"].createElement(GenericBaseMap, _extends({ - tileset: BCBaseMap.tileset - }, rest), children); - } - }]); - - return BCBaseMap; -}(React.PureComponent); - +} _defineProperty$1(BCBaseMap, "propTypes", { // Only props added by this component are defined here. // All other valid props for Map component are passed through to it. - mapRef: propTypes.exports.func // Callback to which a ref to the Map component is passed. - // Allows parent components to diddle with the map established here. + mapRef: propTypes.exports.func + // Callback to which a ref to the Map component is passed. + // Allows parent components to diddle with the map established here. }); - _defineProperty$1(BCBaseMap, "defaultProps", { - mapRef: function mapRef() { - return null; - } + mapRef: () => null }); - _defineProperty$1(BCBaseMap, "tileset", { url: process.env.REACT_APP_BC_BASE_MAP_TILES_URL, projection: { @@ -10344,6 +10100,7 @@ _defineProperty$1(BCBaseMap, "tileset", { // From the definition of the projection (SRS) metersPerUnit: 1, // Proj.4: +units=m + // From tile generation tileMatrixMinX: -20037508, tileMatrixMaxX: 20037508, @@ -10354,7 +10111,6 @@ _defineProperty$1(BCBaseMap, "tileset", { }, attribution: '© OpenStreetMap contributors' }); - _defineProperty$1(BCBaseMap, "initialViewport", { center: { lat: 55.0, @@ -10363,49 +10119,28 @@ _defineProperty$1(BCBaseMap, "initialViewport", { zoom: 6 }); -var _excluded$2 = ["children"]; - -var YNWTBaseMap = /*#__PURE__*/function (_PureComponent) { - _inherits(YNWTBaseMap, _PureComponent); - - var _super = _createSuper(YNWTBaseMap); - - function YNWTBaseMap() { - _classCallCheck(this, YNWTBaseMap); - - return _super.apply(this, arguments); +class YNWTBaseMap extends React.PureComponent { + render() { + const { + children, + ...rest + } = this.props; + return /*#__PURE__*/React__default["default"].createElement(GenericBaseMap, _extends({ + tileset: YNWTBaseMap.tileset + }, rest), children); } - - _createClass(YNWTBaseMap, [{ - key: "render", - value: function render() { - var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, _excluded$2); - - return /*#__PURE__*/React__default["default"].createElement(GenericBaseMap, _extends({ - tileset: YNWTBaseMap.tileset - }, rest), children); - } - }]); - - return YNWTBaseMap; -}(React.PureComponent); - +} _defineProperty$1(YNWTBaseMap, "propTypes", { // Only props added by this component are defined here. // All other valid props for Map component are passed through to it. - mapRef: propTypes.exports.func // Callback to which a ref to the Map component is passed. - // Allows parent components to diddle with the map established here. + mapRef: propTypes.exports.func + // Callback to which a ref to the Map component is passed. + // Allows parent components to diddle with the map established here. }); - _defineProperty$1(YNWTBaseMap, "defaultProps", { - mapRef: function mapRef() { - return null; - } + mapRef: () => null }); - _defineProperty$1(YNWTBaseMap, "tileset", { url: process.env.REACT_APP_YNWT_BASE_MAP_TILES_URL, projection: { @@ -10416,6 +10151,7 @@ _defineProperty$1(YNWTBaseMap, "tileset", { // From the definition of the projection (SRS) metersPerUnit: 1, // Proj.4: +units=m + // From tile generation tileMatrixMinX: -20037508, tileMatrixMaxX: 20037508, @@ -10426,7 +10162,6 @@ _defineProperty$1(YNWTBaseMap, "tileset", { }, attribution: '© OpenStreetMap contributors' }); - _defineProperty$1(YNWTBaseMap, "initialViewport", { center: { lat: 65.0, @@ -10436,38 +10171,33 @@ _defineProperty$1(YNWTBaseMap, "initialViewport", { }); // Sets the view (center, zoom) of the `MapContainer` inside which it is - -var printView = function printView(view) { - return JSON.stringify({ - lat: view.center.lat, - lng: view.center.lng, - zoom: view.zoom - }); -}; - -var SetView = function SetView(_ref) { - var view = _ref.view, - _ref$debug = _ref.debug, - debug = _ref$debug === void 0 ? false : _ref$debug; - var map = reactLeaflet.useMap(); - var currCenter = map.getCenter(); - var currZoom = map.getZoom(); - var tag = "SetView ".concat(map._container.id, ":"); - +const printView = view => JSON.stringify({ + lat: view.center.lat, + lng: view.center.lng, + zoom: view.zoom +}); +const SetView = _ref => { + let { + view, + debug = false + } = _ref; + const map = reactLeaflet.useMap(); + const currCenter = map.getCenter(); + const currZoom = map.getZoom(); + const tag = "SetView ".concat(map._container.id, ":"); if (debug) { console.log(tag, "from:", printView({ center: currCenter, zoom: currZoom }), "to:", printView(view)); - } // It's important to wrap side-effect updates like this with useEffect! - + } - React.useEffect(function () { + // It's important to wrap side-effect updates like this with useEffect! + React.useEffect(() => { if (currCenter.lat !== view.center.lat || currCenter.lng !== view.center.lng || currZoom !== view.zoom) { if (debug) { console.log(tag, "!setting"); } - map.setView(view.center, view.zoom, { animate: false }); @@ -10477,30 +10207,26 @@ var SetView = function SetView(_ref) { }; L__default["default"].Control.Static = L__default["default"].Control.extend({ - onAdd: function onAdd(map) { - var container = L__default["default"].DomUtil.create('div', 'leaflet-control-static leaflet-control'); + onAdd: map => { + const container = L__default["default"].DomUtil.create('div', 'leaflet-control-static leaflet-control'); return container; }, - onRemove: function onRemove(map) {} + onRemove: map => {} }); - -L__default["default"].control.static = function (opts) { - return new L__default["default"].Control.Static(opts); -}; - -var _excluded$1 = ["children"]; +L__default["default"].control.static = opts => new L__default["default"].Control.Static(opts); function StaticControl(_ref) { - var children = _ref.children, - rest = _objectWithoutProperties(_ref, _excluded$1); - - var context = core.useLeafletContext(); - React.useEffect(function () { - var control = L__default["default"].control.static(rest); + let { + children, + ...rest + } = _ref; + const context = core.useLeafletContext(); + React.useEffect(() => { + const control = L__default["default"].control.static(rest); control.addTo(context.map); - var root = client.createRoot(control.getContainer()); + const root = client.createRoot(control.getContainer()); root.render(children); - return function () { + return () => { control.remove(); }; }); @@ -10577,10 +10303,10 @@ function require_root () { return _root; } -var root$9 = require_root(); +var root$8 = require_root(); /** Built-in value references. */ -var Symbol$5 = root$9.Symbol; +var Symbol$5 = root$8.Symbol; var _Symbol = Symbol$5; @@ -11059,7 +10785,7 @@ function createCtor$4(Ctor) { var _createCtor = createCtor$4; var createCtor$3 = _createCtor, - root$8 = require_root(); + root$7 = require_root(); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$6 = 1; @@ -11079,7 +10805,7 @@ function createBind$1(func, bitmask, thisArg) { Ctor = createCtor$3(func); function wrapper() { - var fn = (this && this !== root$8 && this instanceof wrapper) ? Ctor : func; + var fn = (this && this !== root$7 && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; @@ -12327,7 +12053,7 @@ var composeArgs$1 = _composeArgs, getHolder$1 = _getHolder, reorder = _reorder, replaceHolders$2 = _replaceHolders, - root$7 = require_root(); + root$6 = require_root(); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$3 = 1, @@ -12402,7 +12128,7 @@ function createHybrid$2(func, bitmask, thisArg, partials, holders, partialsRight if (isAry && ary < length) { args.length = ary; } - if (this && this !== root$7 && this instanceof wrapper) { + if (this && this !== root$6 && this instanceof wrapper) { fn = Ctor || createCtor$2(fn); } return fn.apply(thisBinding, args); @@ -12418,7 +12144,7 @@ var apply$1 = require_apply(), createRecurry = _createRecurry, getHolder = _getHolder, replaceHolders$1 = _replaceHolders, - root$6 = require_root(); + root$5 = require_root(); /** * Creates a function that wraps `func` to enable currying. @@ -12451,7 +12177,7 @@ function createCurry$1(func, bitmask, arity) { func, bitmask, createHybrid$1, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } - var fn = (this && this !== root$6 && this instanceof wrapper) ? Ctor : func; + var fn = (this && this !== root$5 && this instanceof wrapper) ? Ctor : func; return apply$1(fn, this, args); } return wrapper; @@ -12461,7 +12187,7 @@ var _createCurry = createCurry$1; var apply = require_apply(), createCtor = _createCtor, - root$5 = require_root(); + root$4 = require_root(); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$2 = 1; @@ -12488,7 +12214,7 @@ function createPartial$1(func, bitmask, thisArg, partials) { leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), - fn = (this && this !== root$5 && this instanceof wrapper) ? Ctor : func; + fn = (this && this !== root$4 && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; @@ -13988,10 +13714,10 @@ function stackHas$1(key) { var _stackHas = stackHas$1; var getNative$4 = require_getNative(), - root$4 = require_root(); + root$3 = require_root(); /* Built-in method references that are verified to be native. */ -var Map$3 = getNative$4(root$4, 'Map'); +var Map$3 = getNative$4(root$3, 'Map'); var _Map = Map$3; @@ -14763,26 +14489,26 @@ function getAllKeysIn$1(object) { var _getAllKeysIn = getAllKeysIn$1; var getNative$2 = require_getNative(), - root$3 = require_root(); + root$2 = require_root(); /* Built-in method references that are verified to be native. */ -var DataView$2 = getNative$2(root$3, 'DataView'); +var DataView$2 = getNative$2(root$2, 'DataView'); var _DataView = DataView$2; var getNative$1 = require_getNative(), - root$2 = require_root(); + root$1 = require_root(); /* Built-in method references that are verified to be native. */ -var Promise$2 = getNative$1(root$2, 'Promise'); +var Promise$2 = getNative$1(root$1, 'Promise'); var _Promise = Promise$2; var getNative = require_getNative(), - root$1 = require_root(); + root = require_root(); /* Built-in method references that are verified to be native. */ -var Set$1 = getNative(root$1, 'Set'); +var Set$1 = getNative(root, 'Set'); var _Set = Set$1; @@ -14873,14 +14599,22 @@ function initCloneArray$1(array) { var _initCloneArray = initCloneArray$1; -var root = require_root(); +var _Uint8Array; +var hasRequired_Uint8Array; -/** Built-in value references. */ -var Uint8Array$2 = root.Uint8Array; +function require_Uint8Array () { + if (hasRequired_Uint8Array) return _Uint8Array; + hasRequired_Uint8Array = 1; + var root = require_root(); -var _Uint8Array = Uint8Array$2; + /** Built-in value references. */ + var Uint8Array = root.Uint8Array; -var Uint8Array$1 = _Uint8Array; + _Uint8Array = Uint8Array; + return _Uint8Array; +} + +var Uint8Array$1 = require_Uint8Array(); /** * Creates a clone of `arrayBuffer`. @@ -15852,7 +15586,7 @@ function require_equalByTag () { if (hasRequired_equalByTag) return _equalByTag; hasRequired_equalByTag = 1; var Symbol = _Symbol, - Uint8Array = _Uint8Array, + Uint8Array = require_Uint8Array(), eq = eq_1, equalArrays = require_equalArrays(), mapToArray = require_mapToArray(), @@ -17418,39 +17152,23 @@ var convert$3 = convert_1, func$3.placeholder = requirePlaceholder(); var keys = func$3; -var _excluded = ["spinner", "x", "y", "stroke"]; - function MapSpinner(_ref) { - var _ref$spinner = _ref.spinner, - spinner = _ref$spinner === void 0 ? "Bars" : _ref$spinner, - _ref$x = _ref.x, - x = _ref$x === void 0 ? "40%" : _ref$x, - _ref$y = _ref.y, - y = _ref$y === void 0 ? "40%" : _ref$y, - _ref$stroke = _ref.stroke, - stroke = _ref$stroke === void 0 ? "#98ff98" : _ref$stroke, - rest = _objectWithoutProperties(_ref, _excluded); - - var _useState = React.useState(reactLeaflet.useMap().getBounds()), - _useState2 = _slicedToArray(_useState, 2), - bounds = _useState2[0], - setBounds = _useState2[1]; // This could be replaced by a call to callbackOnMapEvents, but it's a bit + let { + spinner = "Bars", + x = "40%", + y = "40%", + stroke = "#98ff98", + ...rest + } = _ref; + const [bounds, setBounds] = React.useState(reactLeaflet.useMap().getBounds()); + // This could be replaced by a call to callbackOnMapEvents, but it's a bit // less clear and not much shorter. - - - var onEvent = function onEvent(map) { - return setBounds(map.getBounds()); - }; - - var map = reactLeaflet.useMapEvents({ - zoomend: function zoomend() { - return onEvent(map); - }, - moveend: function moveend() { - return onEvent(map); - } + const onEvent = map => setBounds(map.getBounds()); + const map = reactLeaflet.useMapEvents({ + zoomend: () => onEvent(map), + moveend: () => onEvent(map) }); - var Spinner = SVGLoaders[spinner]; + const Spinner = SVGLoaders[spinner]; return /*#__PURE__*/React__default["default"].createElement(reactLeaflet.SVGOverlay, { bounds: bounds }, /*#__PURE__*/React__default["default"].createElement(Spinner, _extends({ @@ -17459,7 +17177,6 @@ function MapSpinner(_ref) { stroke: stroke }, rest))); } - MapSpinner.propTypes = { spinner: propTypes.exports.oneOf(keys(SVGLoaders)).isRequired, x: propTypes.exports.string, @@ -17890,13 +17607,13 @@ var fromPairs = func; // Factory (higher order component) returning a functional component that -var callbackOnMapEvents = function callbackOnMapEvents(eventNames, callback) { - return function () { - var leafletMap = reactLeaflet.useMapEvents(flow(map(function (name) { - return [name, function () { - callback(leafletMap); - }]; - }), fromPairs)(eventNames)); +// TODO: Memoize. + +const callbackOnMapEvents = (eventNames, callback) => { + return () => { + const leafletMap = reactLeaflet.useMapEvents(flow(map(name => [name, () => { + callback(leafletMap); + }]), fromPairs)(eventNames)); return null; }; }; diff --git a/dist/index.esm.js b/dist/index.esm.js index 1fe18e2..8ff7ad3 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -20,265 +20,36 @@ function _mergeNamespaces(n, m) { return Object.freeze(n); } -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty$1(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} - -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} - -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; -} - -function _defineProperty$1(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; +function _defineProperty$1(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; } - function _extends() { - _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - return _extends.apply(this, arguments); -} - -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - Object.defineProperty(subClass, "prototype", { - writable: false - }); - if (superClass) _setPrototypeOf(subClass, superClass); -} - -function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); -} - -function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - - var target = _objectWithoutPropertiesLoose(source, excluded); - - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; + return _extends = Object.assign ? Object.assign.bind() : function (n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } - } - - return target; -} - -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; + return n; + }, _extends.apply(null, arguments); } - -function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } else if (call !== void 0) { - throw new TypeError("Derived constructors may only return object or undefined"); +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); } - - return _assertThisInitialized(self); -} - -function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return _possibleConstructorReturn(this, result); - }; -} - -function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; + return ("string" === r ? String : Number)(t); } - -function _iterableToArrayLimit(arr, i) { - var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; - - if (_i == null) return; - var _arr = []; - var _n = true; - var _d = false; - - var _s, _e; - - try { - for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; -} - -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -10173,7 +9944,10 @@ var _baseConvert = baseConvert$1; var _ = lodash_min.exports.runInContext(); var fp = _baseConvert(_, _); -var pixelWidth = 0.00028; // Compute resolutions from CRS info and tile matrix parameters. +// From OGC Standard +const pixelWidth = 0.00028; + +// Compute resolutions from CRS info and tile matrix parameters. // // The user must supply one of `scaleDenominator` or // `metersPerUnit`, `tileMatrixMinX`, `tileMatrixMaxX`, and `tileWidth` or @@ -10185,41 +9959,41 @@ var pixelWidth = 0.00028; // Compute resolutions from CRS info and tile matrix p // value can be derived, in our particular case from fundamental information // about the tileset, namely its extents or bounds. (For details, see // https://github.com/pacificclimate/pcic-react-leaflet-components/issues/1#issuecomment-818194664) - function resolutions(_ref) { - var metersPerUnit = _ref.metersPerUnit, - scaleDenominator = _ref.scaleDenominator, - tileMatrixMinX = _ref.tileMatrixMinX, - tileMatrixMaxX = _ref.tileMatrixMaxX, - tileWidth = _ref.tileWidth, - tileMatrixMinY = _ref.tileMatrixMinY, - tileMatrixMaxY = _ref.tileMatrixMaxY, - tileHeight = _ref.tileHeight, - numResolutions = _ref.numResolutions; - var maxResolution; - + let { + metersPerUnit, + scaleDenominator, + tileMatrixMinX, + tileMatrixMaxX, + tileWidth, + tileMatrixMinY, + tileMatrixMaxY, + tileHeight, + numResolutions + } = _ref; + let maxResolution; if (!fp.isUndefined(scaleDenominator)) { maxResolution = scaleDenominator * pixelWidth; } else { - var pixelSpan = !fp.isUndefined(tileMatrixMinX) ? (tileMatrixMaxX - tileMatrixMinX) / tileWidth : (tileMatrixMaxY - tileMatrixMinY) / tileHeight; + const pixelSpan = !fp.isUndefined(tileMatrixMinX) ? (tileMatrixMaxX - tileMatrixMinX) / tileWidth : (tileMatrixMaxY - tileMatrixMinY) / tileHeight; maxResolution = pixelSpan * metersPerUnit; } + return fp.map(i => maxResolution / Math.pow(2, i))(fp.range(0, numResolutions)); +} - return fp.map(function (i) { - return maxResolution / Math.pow(2, i); - })(fp.range(0, numResolutions)); -} // Compute options for `L.Proj.CRS` from CRS info and tile matrix parameters. +// Compute options for `L.Proj.CRS` from CRS info and tile matrix parameters. // // See comments to `resolutions` re. resolution computations. // // The values for `origin` and `bounds` are also derived from the extents. (See // https://github.com/pacificclimate/pcic-react-leaflet-components/issues/1#issuecomment-818231259) - function projCRSOptions(tileMatrixParams) { - var tileMatrixMinX = tileMatrixParams.tileMatrixMinX, - tileMatrixMinY = tileMatrixParams.tileMatrixMinY, - tileMatrixMaxX = tileMatrixParams.tileMatrixMaxX, - tileMatrixMaxY = tileMatrixParams.tileMatrixMaxY; + const { + tileMatrixMinX, + tileMatrixMinY, + tileMatrixMaxX, + tileMatrixMaxY + } = tileMatrixParams; return { bounds: L.bounds(L.point(tileMatrixMinX, tileMatrixMinY), L.point(tileMatrixMaxX, tileMatrixMaxY)), origin: [tileMatrixMinX, tileMatrixMaxY], @@ -10227,24 +10001,27 @@ function projCRSOptions(tileMatrixParams) { }; } -var _excluded$4 = ["tileset", "center", "zoom", "mapRef", "children"]; - function GenericBaseMap(_ref) { - var _ref$tileset = _ref.tileset, - url = _ref$tileset.url, - projection = _ref$tileset.projection, - tileMatrix = _ref$tileset.tileMatrix, - attribution = _ref$tileset.attribution, - center = _ref.center, - zoom = _ref.zoom; - _ref.mapRef; - var children = _ref.children, - rest = _objectWithoutProperties(_ref, _excluded$4); - + let { + tileset: { + url, + projection, + tileMatrix, + attribution + }, + center, + zoom, + mapRef, + children, + ...rest + } = _ref; // Create Leaflet CRS object. This is where the magic of this component // lies ... converting the tileMatrix specification to a correct CRS. // TODO: Memoize? - var crs = new L.Proj.CRS(projection.code, projection.proj4def, _objectSpread2(_objectSpread2({}, projCRSOptions(tileMatrix)), projection.options)); + const crs = new L.Proj.CRS(projection.code, projection.proj4def, { + ...projCRSOptions(tileMatrix), + ...projection.options + }); return /*#__PURE__*/React.createElement(MapContainer, _extends({ crs: crs, minZoom: 0, @@ -10258,10 +10035,10 @@ function GenericBaseMap(_ref) { maxZoom: tileMatrix.numResolutions }), children); } - GenericBaseMap.propTypes = { // Only props added by this component are defined here. // All other valid props for MapContainer are passed through to it. + // Describes the tileset. tileset: propTypes.exports.shape({ // Full URL of tileset, including `x`, `y`, `z` params. @@ -10282,49 +10059,28 @@ GenericBaseMap.propTypes = { }).isRequired }; -var _excluded$3 = ["children"]; - -var BCBaseMap = /*#__PURE__*/function (_PureComponent) { - _inherits(BCBaseMap, _PureComponent); - - var _super = _createSuper(BCBaseMap); - - function BCBaseMap() { - _classCallCheck(this, BCBaseMap); - - return _super.apply(this, arguments); +class BCBaseMap extends PureComponent { + render() { + const { + children, + ...rest + } = this.props; + return /*#__PURE__*/React.createElement(GenericBaseMap, _extends({ + tileset: BCBaseMap.tileset + }, rest), children); } - - _createClass(BCBaseMap, [{ - key: "render", - value: function render() { - var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, _excluded$3); - - return /*#__PURE__*/React.createElement(GenericBaseMap, _extends({ - tileset: BCBaseMap.tileset - }, rest), children); - } - }]); - - return BCBaseMap; -}(PureComponent); - +} _defineProperty$1(BCBaseMap, "propTypes", { // Only props added by this component are defined here. // All other valid props for Map component are passed through to it. - mapRef: propTypes.exports.func // Callback to which a ref to the Map component is passed. - // Allows parent components to diddle with the map established here. + mapRef: propTypes.exports.func + // Callback to which a ref to the Map component is passed. + // Allows parent components to diddle with the map established here. }); - _defineProperty$1(BCBaseMap, "defaultProps", { - mapRef: function mapRef() { - return null; - } + mapRef: () => null }); - _defineProperty$1(BCBaseMap, "tileset", { url: process.env.REACT_APP_BC_BASE_MAP_TILES_URL, projection: { @@ -10335,6 +10091,7 @@ _defineProperty$1(BCBaseMap, "tileset", { // From the definition of the projection (SRS) metersPerUnit: 1, // Proj.4: +units=m + // From tile generation tileMatrixMinX: -20037508, tileMatrixMaxX: 20037508, @@ -10345,7 +10102,6 @@ _defineProperty$1(BCBaseMap, "tileset", { }, attribution: '© OpenStreetMap contributors' }); - _defineProperty$1(BCBaseMap, "initialViewport", { center: { lat: 55.0, @@ -10354,49 +10110,28 @@ _defineProperty$1(BCBaseMap, "initialViewport", { zoom: 6 }); -var _excluded$2 = ["children"]; - -var YNWTBaseMap = /*#__PURE__*/function (_PureComponent) { - _inherits(YNWTBaseMap, _PureComponent); - - var _super = _createSuper(YNWTBaseMap); - - function YNWTBaseMap() { - _classCallCheck(this, YNWTBaseMap); - - return _super.apply(this, arguments); +class YNWTBaseMap extends PureComponent { + render() { + const { + children, + ...rest + } = this.props; + return /*#__PURE__*/React.createElement(GenericBaseMap, _extends({ + tileset: YNWTBaseMap.tileset + }, rest), children); } - - _createClass(YNWTBaseMap, [{ - key: "render", - value: function render() { - var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, _excluded$2); - - return /*#__PURE__*/React.createElement(GenericBaseMap, _extends({ - tileset: YNWTBaseMap.tileset - }, rest), children); - } - }]); - - return YNWTBaseMap; -}(PureComponent); - +} _defineProperty$1(YNWTBaseMap, "propTypes", { // Only props added by this component are defined here. // All other valid props for Map component are passed through to it. - mapRef: propTypes.exports.func // Callback to which a ref to the Map component is passed. - // Allows parent components to diddle with the map established here. + mapRef: propTypes.exports.func + // Callback to which a ref to the Map component is passed. + // Allows parent components to diddle with the map established here. }); - _defineProperty$1(YNWTBaseMap, "defaultProps", { - mapRef: function mapRef() { - return null; - } + mapRef: () => null }); - _defineProperty$1(YNWTBaseMap, "tileset", { url: process.env.REACT_APP_YNWT_BASE_MAP_TILES_URL, projection: { @@ -10407,6 +10142,7 @@ _defineProperty$1(YNWTBaseMap, "tileset", { // From the definition of the projection (SRS) metersPerUnit: 1, // Proj.4: +units=m + // From tile generation tileMatrixMinX: -20037508, tileMatrixMaxX: 20037508, @@ -10417,7 +10153,6 @@ _defineProperty$1(YNWTBaseMap, "tileset", { }, attribution: '© OpenStreetMap contributors' }); - _defineProperty$1(YNWTBaseMap, "initialViewport", { center: { lat: 65.0, @@ -10427,38 +10162,33 @@ _defineProperty$1(YNWTBaseMap, "initialViewport", { }); // Sets the view (center, zoom) of the `MapContainer` inside which it is - -var printView = function printView(view) { - return JSON.stringify({ - lat: view.center.lat, - lng: view.center.lng, - zoom: view.zoom - }); -}; - -var SetView = function SetView(_ref) { - var view = _ref.view, - _ref$debug = _ref.debug, - debug = _ref$debug === void 0 ? false : _ref$debug; - var map = useMap(); - var currCenter = map.getCenter(); - var currZoom = map.getZoom(); - var tag = "SetView ".concat(map._container.id, ":"); - +const printView = view => JSON.stringify({ + lat: view.center.lat, + lng: view.center.lng, + zoom: view.zoom +}); +const SetView = _ref => { + let { + view, + debug = false + } = _ref; + const map = useMap(); + const currCenter = map.getCenter(); + const currZoom = map.getZoom(); + const tag = "SetView ".concat(map._container.id, ":"); if (debug) { console.log(tag, "from:", printView({ center: currCenter, zoom: currZoom }), "to:", printView(view)); - } // It's important to wrap side-effect updates like this with useEffect! - + } - useEffect(function () { + // It's important to wrap side-effect updates like this with useEffect! + useEffect(() => { if (currCenter.lat !== view.center.lat || currCenter.lng !== view.center.lng || currZoom !== view.zoom) { if (debug) { console.log(tag, "!setting"); } - map.setView(view.center, view.zoom, { animate: false }); @@ -10468,30 +10198,26 @@ var SetView = function SetView(_ref) { }; L.Control.Static = L.Control.extend({ - onAdd: function onAdd(map) { - var container = L.DomUtil.create('div', 'leaflet-control-static leaflet-control'); + onAdd: map => { + const container = L.DomUtil.create('div', 'leaflet-control-static leaflet-control'); return container; }, - onRemove: function onRemove(map) {} + onRemove: map => {} }); - -L.control.static = function (opts) { - return new L.Control.Static(opts); -}; - -var _excluded$1 = ["children"]; +L.control.static = opts => new L.Control.Static(opts); function StaticControl(_ref) { - var children = _ref.children, - rest = _objectWithoutProperties(_ref, _excluded$1); - - var context = useLeafletContext(); - useEffect(function () { - var control = L.control.static(rest); + let { + children, + ...rest + } = _ref; + const context = useLeafletContext(); + useEffect(() => { + const control = L.control.static(rest); control.addTo(context.map); - var root = createRoot(control.getContainer()); + const root = createRoot(control.getContainer()); root.render(children); - return function () { + return () => { control.remove(); }; }); @@ -10568,10 +10294,10 @@ function require_root () { return _root; } -var root$9 = require_root(); +var root$8 = require_root(); /** Built-in value references. */ -var Symbol$5 = root$9.Symbol; +var Symbol$5 = root$8.Symbol; var _Symbol = Symbol$5; @@ -11050,7 +10776,7 @@ function createCtor$4(Ctor) { var _createCtor = createCtor$4; var createCtor$3 = _createCtor, - root$8 = require_root(); + root$7 = require_root(); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$6 = 1; @@ -11070,7 +10796,7 @@ function createBind$1(func, bitmask, thisArg) { Ctor = createCtor$3(func); function wrapper() { - var fn = (this && this !== root$8 && this instanceof wrapper) ? Ctor : func; + var fn = (this && this !== root$7 && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; @@ -12318,7 +12044,7 @@ var composeArgs$1 = _composeArgs, getHolder$1 = _getHolder, reorder = _reorder, replaceHolders$2 = _replaceHolders, - root$7 = require_root(); + root$6 = require_root(); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$3 = 1, @@ -12393,7 +12119,7 @@ function createHybrid$2(func, bitmask, thisArg, partials, holders, partialsRight if (isAry && ary < length) { args.length = ary; } - if (this && this !== root$7 && this instanceof wrapper) { + if (this && this !== root$6 && this instanceof wrapper) { fn = Ctor || createCtor$2(fn); } return fn.apply(thisBinding, args); @@ -12409,7 +12135,7 @@ var apply$1 = require_apply(), createRecurry = _createRecurry, getHolder = _getHolder, replaceHolders$1 = _replaceHolders, - root$6 = require_root(); + root$5 = require_root(); /** * Creates a function that wraps `func` to enable currying. @@ -12442,7 +12168,7 @@ function createCurry$1(func, bitmask, arity) { func, bitmask, createHybrid$1, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } - var fn = (this && this !== root$6 && this instanceof wrapper) ? Ctor : func; + var fn = (this && this !== root$5 && this instanceof wrapper) ? Ctor : func; return apply$1(fn, this, args); } return wrapper; @@ -12452,7 +12178,7 @@ var _createCurry = createCurry$1; var apply = require_apply(), createCtor = _createCtor, - root$5 = require_root(); + root$4 = require_root(); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG$2 = 1; @@ -12479,7 +12205,7 @@ function createPartial$1(func, bitmask, thisArg, partials) { leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), - fn = (this && this !== root$5 && this instanceof wrapper) ? Ctor : func; + fn = (this && this !== root$4 && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; @@ -13979,10 +13705,10 @@ function stackHas$1(key) { var _stackHas = stackHas$1; var getNative$4 = require_getNative(), - root$4 = require_root(); + root$3 = require_root(); /* Built-in method references that are verified to be native. */ -var Map$3 = getNative$4(root$4, 'Map'); +var Map$3 = getNative$4(root$3, 'Map'); var _Map = Map$3; @@ -14754,26 +14480,26 @@ function getAllKeysIn$1(object) { var _getAllKeysIn = getAllKeysIn$1; var getNative$2 = require_getNative(), - root$3 = require_root(); + root$2 = require_root(); /* Built-in method references that are verified to be native. */ -var DataView$2 = getNative$2(root$3, 'DataView'); +var DataView$2 = getNative$2(root$2, 'DataView'); var _DataView = DataView$2; var getNative$1 = require_getNative(), - root$2 = require_root(); + root$1 = require_root(); /* Built-in method references that are verified to be native. */ -var Promise$2 = getNative$1(root$2, 'Promise'); +var Promise$2 = getNative$1(root$1, 'Promise'); var _Promise = Promise$2; var getNative = require_getNative(), - root$1 = require_root(); + root = require_root(); /* Built-in method references that are verified to be native. */ -var Set$1 = getNative(root$1, 'Set'); +var Set$1 = getNative(root, 'Set'); var _Set = Set$1; @@ -14864,14 +14590,22 @@ function initCloneArray$1(array) { var _initCloneArray = initCloneArray$1; -var root = require_root(); +var _Uint8Array; +var hasRequired_Uint8Array; -/** Built-in value references. */ -var Uint8Array$2 = root.Uint8Array; +function require_Uint8Array () { + if (hasRequired_Uint8Array) return _Uint8Array; + hasRequired_Uint8Array = 1; + var root = require_root(); -var _Uint8Array = Uint8Array$2; + /** Built-in value references. */ + var Uint8Array = root.Uint8Array; -var Uint8Array$1 = _Uint8Array; + _Uint8Array = Uint8Array; + return _Uint8Array; +} + +var Uint8Array$1 = require_Uint8Array(); /** * Creates a clone of `arrayBuffer`. @@ -15843,7 +15577,7 @@ function require_equalByTag () { if (hasRequired_equalByTag) return _equalByTag; hasRequired_equalByTag = 1; var Symbol = _Symbol, - Uint8Array = _Uint8Array, + Uint8Array = require_Uint8Array(), eq = eq_1, equalArrays = require_equalArrays(), mapToArray = require_mapToArray(), @@ -17409,39 +17143,23 @@ var convert$3 = convert_1, func$3.placeholder = requirePlaceholder(); var keys = func$3; -var _excluded = ["spinner", "x", "y", "stroke"]; - function MapSpinner(_ref) { - var _ref$spinner = _ref.spinner, - spinner = _ref$spinner === void 0 ? "Bars" : _ref$spinner, - _ref$x = _ref.x, - x = _ref$x === void 0 ? "40%" : _ref$x, - _ref$y = _ref.y, - y = _ref$y === void 0 ? "40%" : _ref$y, - _ref$stroke = _ref.stroke, - stroke = _ref$stroke === void 0 ? "#98ff98" : _ref$stroke, - rest = _objectWithoutProperties(_ref, _excluded); - - var _useState = useState(useMap().getBounds()), - _useState2 = _slicedToArray(_useState, 2), - bounds = _useState2[0], - setBounds = _useState2[1]; // This could be replaced by a call to callbackOnMapEvents, but it's a bit + let { + spinner = "Bars", + x = "40%", + y = "40%", + stroke = "#98ff98", + ...rest + } = _ref; + const [bounds, setBounds] = useState(useMap().getBounds()); + // This could be replaced by a call to callbackOnMapEvents, but it's a bit // less clear and not much shorter. - - - var onEvent = function onEvent(map) { - return setBounds(map.getBounds()); - }; - - var map = useMapEvents({ - zoomend: function zoomend() { - return onEvent(map); - }, - moveend: function moveend() { - return onEvent(map); - } + const onEvent = map => setBounds(map.getBounds()); + const map = useMapEvents({ + zoomend: () => onEvent(map), + moveend: () => onEvent(map) }); - var Spinner = SVGLoaders[spinner]; + const Spinner = SVGLoaders[spinner]; return /*#__PURE__*/React.createElement(SVGOverlay, { bounds: bounds }, /*#__PURE__*/React.createElement(Spinner, _extends({ @@ -17450,7 +17168,6 @@ function MapSpinner(_ref) { stroke: stroke }, rest))); } - MapSpinner.propTypes = { spinner: propTypes.exports.oneOf(keys(SVGLoaders)).isRequired, x: propTypes.exports.string, @@ -17881,13 +17598,13 @@ var fromPairs = func; // Factory (higher order component) returning a functional component that -var callbackOnMapEvents = function callbackOnMapEvents(eventNames, callback) { - return function () { - var leafletMap = useMapEvents(flow(map(function (name) { - return [name, function () { - callback(leafletMap); - }]; - }), fromPairs)(eventNames)); +// TODO: Memoize. + +const callbackOnMapEvents = (eventNames, callback) => { + return () => { + const leafletMap = useMapEvents(flow(map(name => [name, () => { + callback(leafletMap); + }]), fromPairs)(eventNames)); return null; }; }; diff --git a/docs/installation.md b/docs/installation.md index e51d324..0d573a8 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -8,11 +8,14 @@ Client applications will need to install these as dependencies (or, possibly, peer dependencies). ```json -"leaflet": "^1.7.1", -"react": "^17.0.2", -"react-dom": "^17.0.2", -"@react-leaflet/core": "1.0.2", -"react-leaflet": "3.1.0" +"peerDependencies": { + "@react-leaflet/core": "2.0.0", + "leaflet": "^1.8.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-leaflet": "^4.2.1" +} + ``` IMPORTANT: Note the exact (and out of date) version specifications for diff --git a/package-lock.json b/package-lock.json index 17a6374..a04510f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pcic-react-leaflet-components", - "version": "2.0.1", + "version": "3.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pcic-react-leaflet-components", - "version": "2.0.1", + "version": "3.1.0", "dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", @@ -21,7 +21,7 @@ }, "devDependencies": { "@babel/cli": "^7.17.10", - "@babel/core": "^7.18.5", + "@babel/core": "7.18.6", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", @@ -37,7 +37,7 @@ "leaflet": "^1.8.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-leaflet": "4.0.0" + "react-leaflet": "^4.2.1" } }, "node_modules/@ampproject/remapping": { @@ -82,39 +82,40 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.5.tgz", - "integrity": "sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.5.tgz", - "integrity": "sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", + "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", "dependencies": { "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-compilation-targets": "^7.18.2", - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helpers": "^7.18.2", - "@babel/parser": "^7.18.5", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.5", - "@babel/types": "^7.18.4", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helpers": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -175,12 +176,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", "dependencies": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -188,13 +190,13 @@ } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -224,22 +226,33 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", - "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", "dependencies": { - "@babel/compat-data": "^7.17.10", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.20.2", - "semver": "^6.3.0" + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, "node_modules/@babel/helper-create-class-features-plugin": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz", @@ -294,9 +307,12 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, "engines": { "node": ">=6.9.0" } @@ -313,23 +329,23 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dependencies": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -347,32 +363,33 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz", - "integrity": "sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-optimise-call-expression": { @@ -423,11 +440,12 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz", - "integrity": "sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dependencies": { - "@babel/types": "^7.18.2" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -445,28 +463,36 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", "engines": { "node": ">=6.9.0" } @@ -486,35 +512,35 @@ } }, "node_modules/@babel/helpers": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.2.tgz", - "integrity": "sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.5.tgz", - "integrity": "sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1822,32 +1848,32 @@ } }, "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.5.tgz", - "integrity": "sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA==", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.5", - "@babel/types": "^7.18.4", - "debug": "^4.1.0", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1855,11 +1881,12 @@ } }, "node_modules/@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2856,17 +2883,17 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { "node": ">=6.0.0" } @@ -2894,17 +2921,17 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@leichtgewicht/ip-codec": { @@ -5202,9 +5229,9 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, "node_modules/browserslist": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.0.tgz", - "integrity": "sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==", + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", "funding": [ { "type": "opencollective", @@ -5213,13 +5240,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001358", - "electron-to-chromium": "^1.4.164", - "node-releases": "^2.0.5", - "update-browserslist-db": "^1.0.0" + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" }, "bin": { "browserslist": "cli.js" @@ -5320,9 +5351,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001358", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz", - "integrity": "sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw==", + "version": "1.0.30001636", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", + "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", "funding": [ { "type": "opencollective", @@ -5331,6 +5362,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -6559,9 +6594,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.167", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.167.tgz", - "integrity": "sha512-lPHuHXBwpkr4RcfaZBKm6TKOWG/1N9mVggUpP4fY3l1JIUU2x4fkM8928smYdZ5lF+6KCTAxo1aK9JmqT+X71Q==" + "version": "1.4.805", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.805.tgz", + "integrity": "sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==" }, "node_modules/emittery": { "version": "0.8.1", @@ -6702,9 +6737,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "engines": { "node": ">=6" } @@ -11911,9 +11946,9 @@ } }, "node_modules/leaflet": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.8.0.tgz", - "integrity": "sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA==", + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", "peer": true }, "node_modules/leven": { @@ -12432,9 +12467,9 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, "node_modules/node-releases": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", - "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -12913,9 +12948,9 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -14699,15 +14734,26 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "node_modules/react-leaflet": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-4.0.0.tgz", - "integrity": "sha512-qJJvoCNe12XHSWVUwhXYmMObPoSYy8h/hn0aDNvcBuq3O8zmVI5S2RdabhaDg/iWMCJ2jbCWZWtIU5VtztO9sg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-4.2.1.tgz", + "integrity": "sha512-p9chkvhcKrWn/H/1FFeVSqLdReGwn2qmiobOQGO3BifX+/vV/39qhY8dGqbdcPh1e6jxh/QHriLXr7a4eLFK4Q==", "peer": true, "dependencies": { - "@react-leaflet/core": "^2.0.0" + "@react-leaflet/core": "^2.1.0" }, "peerDependencies": { - "leaflet": "^1.8.0", + "leaflet": "^1.9.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, + "node_modules/react-leaflet/node_modules/@react-leaflet/core": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz", + "integrity": "sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==", + "peer": true, + "peerDependencies": { + "leaflet": "^1.9.0", "react": "^18.0.0", "react-dom": "^18.0.0" } @@ -15401,9 +15447,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -16628,9 +16674,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "funding": [ { "type": "opencollective", @@ -16639,14 +16685,18 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -17693,33 +17743,34 @@ } }, "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" } }, "@babel/compat-data": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.5.tgz", - "integrity": "sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==" }, "@babel/core": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.5.tgz", - "integrity": "sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", + "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", "requires": { "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-compilation-targets": "^7.18.2", - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helpers": "^7.18.2", - "@babel/parser": "^7.18.5", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.5", - "@babel/types": "^7.18.4", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helpers": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -17759,23 +17810,24 @@ } }, "@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", "requires": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "requires": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } } } @@ -17798,14 +17850,30 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", - "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", "requires": { - "@babel/compat-data": "^7.17.10", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.20.2", - "semver": "^6.3.0" + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } } }, "@babel/helper-create-class-features-plugin": { @@ -17847,9 +17915,12 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "requires": { + "@babel/types": "^7.24.7" + } }, "@babel/helper-explode-assignable-expression": { "version": "7.16.7", @@ -17860,20 +17931,20 @@ } }, "@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "requires": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.24.7" } }, "@babel/helper-member-expression-to-functions": { @@ -17885,26 +17956,24 @@ } }, "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "requires": { - "@babel/types": "^7.16.7" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/helper-module-transforms": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz", - "integrity": "sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" } }, "@babel/helper-optimise-call-expression": { @@ -17943,11 +18012,12 @@ } }, "@babel/helper-simple-access": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz", - "integrity": "sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "requires": { - "@babel/types": "^7.18.2" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/helper-skip-transparent-expression-wrappers": { @@ -17959,22 +18029,27 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.24.7" } }, + "@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==" + }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==" }, "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==" }, "@babel/helper-wrap-function": { "version": "7.16.8", @@ -17988,29 +18063,29 @@ } }, "@babel/helpers": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.2.tgz", - "integrity": "sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" } }, "@babel/parser": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.5.tgz", - "integrity": "sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.17.12", @@ -18850,38 +18925,39 @@ } }, "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/traverse": { - "version": "7.18.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.5.tgz", - "integrity": "sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA==", - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.5", - "@babel/types": "^7.18.4", - "debug": "^4.1.0", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" } }, @@ -19559,14 +19635,14 @@ } }, "@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==" }, "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==" }, "@jridgewell/source-map": { "version": "0.3.2", @@ -19590,17 +19666,17 @@ } }, "@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@leichtgewicht/ip-codec": { @@ -21311,14 +21387,14 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, "browserslist": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.0.tgz", - "integrity": "sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==", + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", "requires": { - "caniuse-lite": "^1.0.30001358", - "electron-to-chromium": "^1.4.164", - "node-releases": "^2.0.5", - "update-browserslist-db": "^1.0.0" + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" } }, "bser": { @@ -21389,9 +21465,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001358", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz", - "integrity": "sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw==" + "version": "1.0.30001636", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", + "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==" }, "case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -22285,9 +22361,9 @@ } }, "electron-to-chromium": { - "version": "1.4.167", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.167.tgz", - "integrity": "sha512-lPHuHXBwpkr4RcfaZBKm6TKOWG/1N9mVggUpP4fY3l1JIUU2x4fkM8928smYdZ5lF+6KCTAxo1aK9JmqT+X71Q==" + "version": "1.4.805", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.805.tgz", + "integrity": "sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==" }, "emittery": { "version": "0.8.1", @@ -22398,9 +22474,9 @@ } }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==" }, "escape-html": { "version": "1.0.3", @@ -26138,9 +26214,9 @@ } }, "leaflet": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.8.0.tgz", - "integrity": "sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA==", + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", "peer": true }, "leven": { @@ -26536,9 +26612,9 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, "node-releases": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz", - "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "normalize-package-data": { "version": "2.5.0", @@ -26881,9 +26957,9 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "picomatch": { "version": "2.3.1", @@ -28005,12 +28081,21 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "react-leaflet": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-4.0.0.tgz", - "integrity": "sha512-qJJvoCNe12XHSWVUwhXYmMObPoSYy8h/hn0aDNvcBuq3O8zmVI5S2RdabhaDg/iWMCJ2jbCWZWtIU5VtztO9sg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-4.2.1.tgz", + "integrity": "sha512-p9chkvhcKrWn/H/1FFeVSqLdReGwn2qmiobOQGO3BifX+/vV/39qhY8dGqbdcPh1e6jxh/QHriLXr7a4eLFK4Q==", "peer": true, "requires": { - "@react-leaflet/core": "^2.0.0" + "@react-leaflet/core": "^2.1.0" + }, + "dependencies": { + "@react-leaflet/core": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz", + "integrity": "sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==", + "peer": true, + "requires": {} + } } }, "react-refresh": { @@ -28502,9 +28587,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "send": { "version": "0.18.0", @@ -29444,12 +29529,12 @@ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, "update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" } }, "uri-js": { diff --git a/package.json b/package.json index 22c84f3..39fa7d9 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "i-pg": "cd playground && npm i", "i-all": "npm i && cd playground && npm i", "rei-all": "(rm -rf node_modules ; npm i) && (cd playground && rm -rf node_modules ; npm i)", - "dev": "npm-run-all --parallel build-watch start-playground", + "dev": "npm-run-all --parallel build-watch start-pg", "start": "react-scripts start", "test": "react-scripts test", "eject": "react-scripts eject" @@ -49,7 +49,7 @@ }, "devDependencies": { "@babel/cli": "^7.17.10", - "@babel/core": "^7.18.5", + "@babel/core": "7.18.6", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", @@ -65,6 +65,6 @@ "leaflet": "^1.8.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-leaflet": "4.0.0" + "react-leaflet": "^4.2.1" } } diff --git a/playground/package-lock.json b/playground/package-lock.json index 1ec7e92..afa8f2e 100644 --- a/playground/package-lock.json +++ b/playground/package-lock.json @@ -24,7 +24,7 @@ } }, "..": { - "version": "2.0.1", + "version": "3.1.0", "dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", @@ -39,7 +39,7 @@ }, "devDependencies": { "@babel/cli": "^7.17.10", - "@babel/core": "^7.18.5", + "@babel/core": "7.18.6", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", @@ -55,7 +55,7 @@ "leaflet": "^1.8.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-leaflet": "4.0.0" + "react-leaflet": "^4.2.1" } }, "../node_modules/react": { @@ -2336,7 +2336,7 @@ "version": "file:..", "requires": { "@babel/cli": "^7.17.10", - "@babel/core": "^7.18.5", + "@babel/core": "7.18.6", "@babel/preset-env": "^7.18.2", "@babel/preset-react": "^7.17.12", "@rollup/plugin-babel": "^5.3.1", diff --git a/playground/public/index.html b/playground/public/index.html index aa069f2..f25283e 100644 --- a/playground/public/index.html +++ b/playground/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> -