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 lines
3.3 KiB
1 lines
3.3 KiB
{"ast":null,"code":"import { useEffect, useRef } from 'react';\nexport function createElementObject(instance, context, container) {\n return Object.freeze({\n instance,\n context,\n container\n });\n}\nexport function createElementHook(createElement, updateElement) {\n if (updateElement == null) {\n return function useImmutableLeafletElement(props, context) {\n return useRef(createElement(props, context));\n };\n }\n\n return function useMutableLeafletElement(props, context) {\n const elementRef = useRef(createElement(props, context));\n const propsRef = useRef(props);\n const {\n instance\n } = elementRef.current;\n useEffect(function updateElementProps() {\n if (propsRef.current !== props) {\n updateElement(instance, props, propsRef.current);\n propsRef.current = props;\n }\n }, [instance, props, context]);\n return elementRef;\n };\n}","map":{"version":3,"names":["useEffect","useRef","createElementObject","instance","context","container","Object","freeze","createElementHook","createElement","updateElement","useImmutableLeafletElement","props","useMutableLeafletElement","elementRef","propsRef","current","updateElementProps"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/@react-leaflet/core/lib/element.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nexport function createElementObject(instance, context, container) {\n return Object.freeze({\n instance,\n context,\n container\n });\n}\nexport function createElementHook(createElement, updateElement) {\n if (updateElement == null) {\n return function useImmutableLeafletElement(props, context) {\n return useRef(createElement(props, context));\n };\n }\n return function useMutableLeafletElement(props, context) {\n const elementRef = useRef(createElement(props, context));\n const propsRef = useRef(props);\n const { instance } = elementRef.current;\n useEffect(function updateElementProps() {\n if (propsRef.current !== props) {\n updateElement(instance, props, propsRef.current);\n propsRef.current = props;\n }\n }, [\n instance,\n props,\n context\n ]);\n return elementRef;\n };\n}\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,MAApB,QAAkC,OAAlC;AACA,OAAO,SAASC,mBAAT,CAA6BC,QAA7B,EAAuCC,OAAvC,EAAgDC,SAAhD,EAA2D;EAC9D,OAAOC,MAAM,CAACC,MAAP,CAAc;IACjBJ,QADiB;IAEjBC,OAFiB;IAGjBC;EAHiB,CAAd,CAAP;AAKH;AACD,OAAO,SAASG,iBAAT,CAA2BC,aAA3B,EAA0CC,aAA1C,EAAyD;EAC5D,IAAIA,aAAa,IAAI,IAArB,EAA2B;IACvB,OAAO,SAASC,0BAAT,CAAoCC,KAApC,EAA2CR,OAA3C,EAAoD;MACvD,OAAOH,MAAM,CAACQ,aAAa,CAACG,KAAD,EAAQR,OAAR,CAAd,CAAb;IACH,CAFD;EAGH;;EACD,OAAO,SAASS,wBAAT,CAAkCD,KAAlC,EAAyCR,OAAzC,EAAkD;IACrD,MAAMU,UAAU,GAAGb,MAAM,CAACQ,aAAa,CAACG,KAAD,EAAQR,OAAR,CAAd,CAAzB;IACA,MAAMW,QAAQ,GAAGd,MAAM,CAACW,KAAD,CAAvB;IACA,MAAM;MAAET;IAAF,IAAgBW,UAAU,CAACE,OAAjC;IACAhB,SAAS,CAAC,SAASiB,kBAAT,GAA8B;MACpC,IAAIF,QAAQ,CAACC,OAAT,KAAqBJ,KAAzB,EAAgC;QAC5BF,aAAa,CAACP,QAAD,EAAWS,KAAX,EAAkBG,QAAQ,CAACC,OAA3B,CAAb;QACAD,QAAQ,CAACC,OAAT,GAAmBJ,KAAnB;MACH;IACJ,CALQ,EAKN,CACCT,QADD,EAECS,KAFD,EAGCR,OAHD,CALM,CAAT;IAUA,OAAOU,UAAP;EACH,CAfD;AAgBH"},"metadata":{},"sourceType":"module"} |