{"ast":null,"code":"import _objectSpread from \"C:/Users/user/Desktop/projet dashboard/dashboard1/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport _slicedToArray from \"C:/Users/user/Desktop/projet dashboard/dashboard1/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _objectWithoutProperties from \"C:/Users/user/Desktop/projet dashboard/dashboard1/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";\nimport _toPropertyKey from \"C:/Users/user/Desktop/projet dashboard/dashboard1/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js\";\nimport { LeafletProvider, addClassName, useLeafletContext } from '@react-leaflet/core';\nimport React, { forwardRef, useState, useEffect, useImperativeHandle, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nvar DEFAULT_PANES = ['mapPane', 'markerPane', 'overlayPane', 'popupPane', 'shadowPane', 'tilePane', 'tooltipPane'];\nfunction omitPane(obj, pane) {\n  var _p = obj[pane],\n    others = _objectWithoutProperties(obj, [pane].map(_toPropertyKey));\n  return others;\n}\nfunction createPane(name, props, context) {\n  var _props$pane;\n  if (DEFAULT_PANES.indexOf(name) !== -1) {\n    throw new Error(\"You must use a unique name for a pane that is not a default Leaflet pane: \".concat(name));\n  }\n  if (context.map.getPane(name) != null) {\n    throw new Error(\"A pane with this name already exists: \".concat(name));\n  }\n  var parentPaneName = (_props$pane = props.pane) !== null && _props$pane !== void 0 ? _props$pane : context.pane;\n  var parentPane = parentPaneName ? context.map.getPane(parentPaneName) : undefined;\n  var element = context.map.createPane(name, parentPane);\n  if (props.className != null) {\n    addClassName(element, props.className);\n  }\n  if (props.style != null) {\n    Object.keys(props.style).forEach(function (key) {\n      // @ts-ignore\n      element.style[key] = props.style[key];\n    });\n  }\n  return element;\n}\nfunction PaneComponent(props, forwardedRef) {\n  var _useState = useState(props.name),\n    _useState2 = _slicedToArray(_useState, 1),\n    paneName = _useState2[0];\n  var _useState3 = useState(null),\n    _useState4 = _slicedToArray(_useState3, 2),\n    paneElement = _useState4[0],\n    setPaneElement = _useState4[1];\n  useImperativeHandle(forwardedRef, function () {\n    return paneElement;\n  }, [paneElement]);\n  var context = useLeafletContext();\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  var newContext = useMemo(function () {\n    return _objectSpread(_objectSpread({}, context), {}, {\n      pane: paneName\n    });\n  }, [context]);\n  useEffect(function () {\n    setPaneElement(createPane(paneName, props, context));\n    return function removeCreatedPane() {\n      var _pane$remove;\n      var pane = context.map.getPane(paneName);\n      pane === null || pane === void 0 ? void 0 : (_pane$remove = pane.remove) === null || _pane$remove === void 0 ? void 0 : _pane$remove.call(pane);\n      // @ts-ignore map internals\n      if (context.map._panes != null) {\n        // @ts-ignore map internals\n        context.map._panes = omitPane(context.map._panes, paneName);\n        // @ts-ignore map internals\n        context.map._paneRenderers = omitPane(\n        // @ts-ignore map internals\n        context.map._paneRenderers, paneName);\n      }\n    };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n  return props.children != null && paneElement != null ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(LeafletProvider, {\n    value: newContext\n  }, props.children), paneElement) : null;\n}\nexport var Pane = /*#__PURE__*/forwardRef(PaneComponent);","map":{"version":3,"names":["LeafletProvider","addClassName","useLeafletContext","React","forwardRef","useState","useEffect","useImperativeHandle","useMemo","createPortal","DEFAULT_PANES","omitPane","obj","pane","_p","others","_objectWithoutProperties","map","_toPropertyKey","createPane","name","props","context","_props$pane","indexOf","Error","concat","getPane","parentPaneName","parentPane","undefined","element","className","style","Object","keys","forEach","key","PaneComponent","forwardedRef","_useState","_useState2","_slicedToArray","paneName","_useState3","_useState4","paneElement","setPaneElement","newContext","_objectSpread","removeCreatedPane","_pane$remove","remove","call","_panes","_paneRenderers","children","createElement","value","Pane"],"sources":["C:/Users/user/Desktop/projet dashboard/dashboard1/node_modules/react-leaflet/lib/Pane.js"],"sourcesContent":["import { LeafletProvider, addClassName, useLeafletContext } from '@react-leaflet/core';\nimport React, { forwardRef, useState, useEffect, useImperativeHandle, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nconst DEFAULT_PANES = [\n    'mapPane',\n    'markerPane',\n    'overlayPane',\n    'popupPane',\n    'shadowPane',\n    'tilePane',\n    'tooltipPane'\n];\nfunction omitPane(obj, pane) {\n    const { [pane]: _p , ...others } = obj;\n    return others;\n}\nfunction createPane(name, props, context) {\n    if (DEFAULT_PANES.indexOf(name) !== -1) {\n        throw new Error(`You must use a unique name for a pane that is not a default Leaflet pane: ${name}`);\n    }\n    if (context.map.getPane(name) != null) {\n        throw new Error(`A pane with this name already exists: ${name}`);\n    }\n    const parentPaneName = props.pane ?? context.pane;\n    const parentPane = parentPaneName ? context.map.getPane(parentPaneName) : undefined;\n    const element = context.map.createPane(name, parentPane);\n    if (props.className != null) {\n        addClassName(element, props.className);\n    }\n    if (props.style != null) {\n        Object.keys(props.style).forEach((key)=>{\n            // @ts-ignore\n            element.style[key] = props.style[key];\n        });\n    }\n    return element;\n}\nfunction PaneComponent(props, forwardedRef) {\n    const [paneName] = useState(props.name);\n    const [paneElement, setPaneElement] = useState(null);\n    useImperativeHandle(forwardedRef, ()=>paneElement, [\n        paneElement\n    ]);\n    const context = useLeafletContext();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    const newContext = useMemo(()=>({\n            ...context,\n            pane: paneName\n        }), [\n        context\n    ]);\n    useEffect(()=>{\n        setPaneElement(createPane(paneName, props, context));\n        return function removeCreatedPane() {\n            const pane = context.map.getPane(paneName);\n            pane?.remove?.();\n            // @ts-ignore map internals\n            if (context.map._panes != null) {\n                // @ts-ignore map internals\n                context.map._panes = omitPane(context.map._panes, paneName);\n                // @ts-ignore map internals\n                context.map._paneRenderers = omitPane(// @ts-ignore map internals\n                context.map._paneRenderers, paneName);\n            }\n        };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, []);\n    return props.children != null && paneElement != null ? /*#__PURE__*/ createPortal(/*#__PURE__*/ React.createElement(LeafletProvider, {\n        value: newContext\n    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