{"ast":null,"code":"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 = ['mapPane', 'markerPane', 'overlayPane', 'popupPane', 'shadowPane', 'tilePane', 'tooltipPane'];\nfunction omitPane(obj, pane) {\n  const {\n    [pane]: _p,\n    ...others\n  } = 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, [paneElement]);\n  const context = useLeafletContext();\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  const newContext = useMemo(() => ({\n    ...context,\n    pane: paneName\n  }), [context]);\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(\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 const 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","createPane","name","props","context","indexOf","Error","map","getPane","parentPaneName","parentPane","undefined","element","className","style","Object","keys","forEach","key","PaneComponent","forwardedRef","paneName","paneElement","setPaneElement","newContext","removeCreatedPane","remove","_panes","_paneRenderers","children","createElement","value","Pane"],"sources":["C:/Users/user/Desktop/projet dashboard/dashboard/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    }, props.children), paneElement) : null;\n}\nexport const Pane = /*#__PURE__*/ forwardRef(PaneComponent);\n"],"mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,iBAAiB,QAAQ,qBAAqB;AACtF,OAAOC,KAAK,IAAIC,UAAU,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,mBAAmB,EAAEC,OAAO,QAAQ,OAAO;AAC5F,SAASC,YAAY,QAAQ,WAAW;AACxC,MAAMC,aAAa,GAAG,CAClB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,CAChB;AACD,SAASC,QAAQA,CAACC,GAAG,EAAEC,IAAI,EAAE;EACzB,MAAM;IAAE,CAACA,IAAI,GAAGC,EAAE;IAAG,GAAGC;EAAO,CAAC,GAAGH,GAAG;EACtC,OAAOG,MAAM;AACjB;AACA,SAASC,UAAUA,CAACC,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAE;EACtC,IAAIT,aAAa,CAACU,OAAO,CAACH,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;IACpC,MAAM,IAAII,KAAK,CAAE,6EAA4EJ,IAAK,EAAC,CAA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