You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
4.6 KiB

2 years ago
{"ast":null,"code":"import { createElementHook, createElementObject, createLayerHook, updateMediaOverlay } from '@react-leaflet/core';\nimport { SVGOverlay as LeafletSVGOverlay } from 'leaflet';\nimport { forwardRef, useImperativeHandle } from 'react';\nimport { createPortal } from 'react-dom';\nexport const useSVGOverlayElement = createElementHook(function createSVGOverlay(props, context) {\n const {\n attributes,\n bounds,\n ...options\n } = props;\n const container = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n container.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n if (attributes != null) {\n Object.keys(attributes).forEach(name => {\n container.setAttribute(name, attributes[name]);\n });\n }\n\n const overlay = new LeafletSVGOverlay(container, bounds, options);\n return createElementObject(overlay, context, container);\n}, updateMediaOverlay);\nexport const useSVGOverlay = createLayerHook(useSVGOverlayElement);\n\nfunction SVGOverlayComponent(_ref, forwardedRef) {\n let {\n children,\n ...options\n } = _ref;\n const {\n instance,\n container\n } = useSVGOverlay(options).current;\n useImperativeHandle(forwardedRef, () => instance);\n return container == null || children == null ? null : /*#__PURE__*/createPortal(children, container);\n}\n\nexport const SVGOverlay = /*#__PURE__*/forwardRef(SVGOverlayComponent);","map":{"version":3,"names":["createElementHook","createElementObject","createLayerHook","updateMediaOverlay","SVGOverlay","LeafletSVGOverlay","forwardRef","useImperativeHandle","createPortal","useSVGOverlayElement","createSVGOverlay","props","context","attributes","bounds","options","container","document","createElementNS","setAttribute","Object","keys","forEach","name","overlay","useSVGOverlay","SVGOverlayComponent","forwardedRef","children","instance","current"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/react-leaflet/lib/SVGOverlay.js"],"sourcesContent":["import { createElementHook, createElementObject, createLayerHook, updateMediaOverlay } from '@react-leaflet/core';\nimport { SVGOverlay as LeafletSVGOverlay } from 'leaflet';\nimport { forwardRef, useImperativeHandle } from 'react';\nimport { createPortal } from 'react-dom';\nexport const useSVGOverlayElement = createElementHook(function createSVGOverlay(props, context) {\n const { attributes , bounds , ...options } = props;\n const container = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n container.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n if (attributes != null) {\n Object.keys(attributes).forEach((name)=>{\n container.setAttribute(name, attributes[name]);\n });\n }\n const overlay = new LeafletSVGOverlay(container, bounds, options);\n return createElementObject(overlay, context, container);\n}, updateMediaOverlay);\nexport const useSVGOverlay = createLayerHook(useSVGOverlayElement);\nfunction SVGOverlayComponent({ children , ...options }, forwardedRef) {\n const { instance , container } = useSVGOverlay(options).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n return container == null || children == null ? null : /*#__PURE__*/ createPortal(children, container);\n}\nexport const SVGOverlay = /*#__PURE__*/ forwardRef(SVGOverlayComponent);\n"],"mappings":"AAAA,SAASA,iBAAT,EAA4BC,mBAA5B,EAAiDC,eAAjD,EAAkEC,kBAAlE,QAA4F,qBAA5F;AACA,SAASC,UAAU,IAAIC,iBAAvB,QAAgD,SAAhD;AACA,SAASC,UAAT,EAAqBC,mBAArB,QAAgD,OAAhD;AACA,SAASC,YAAT,QAA6B,WAA7B;AACA,OAAO,MAAMC,oBAAoB,GAAGT,iBAAiB,CAAC,SAASU,gBAAT,CAA0BC,KAA1B,EAAiCC,OAAjC,EAA0C;EAC5F,MAAM;IAAEC,UAAF;IAAeC,MAAf;IAAwB,GAAGC;EAA3B,IAAuCJ,KAA7C;EACA,MAAMK,SAAS,GAAGC,QAAQ,CAACC,eAAT,CAAyB,4BAAzB,EAAuD,KAAvD,CAAlB;EACAF,SAAS,CAACG,YAAV,CAAuB,OAAvB,EAAgC,4BAAhC;;EACA,IAAIN,UAAU,IAAI,IAAlB,EAAwB;IACpBO,MAAM,CAACC,IAAP,CAAYR,UAAZ,EAAwBS,OAAxB,CAAiCC,IAAD,IAAQ;MACpCP,SAAS,CAACG,YAAV,CAAuBI,IAAvB,EAA6BV,UAAU,CAACU,IAAD,CAAvC;IACH,CAFD;EAGH;;EACD,MAAMC,OAAO,GAAG,IAAInB,iBAAJ,CAAsBW,SAAtB,EAAiCF,MAAjC,EAAyC