PromoCursed/node_modules/.cache/babel-loader/954b58ba23c29c8b4325de5819c2c1bdea860feacd54a66f36bc4c6a936790d5.json

1 line
2.0 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import React from 'react';\nimport { useEvent } from 'rc-util';\nimport raf from \"rc-util/es/raf\";\n/**\n * Callback will only execute last one for each raf\n */\nexport default function useRafDebounce(callback) {\n const executeRef = React.useRef(false);\n const rafRef = React.useRef();\n const wrapperCallback = useEvent(callback);\n return () => {\n if (executeRef.current) {\n return;\n }\n executeRef.current = true;\n wrapperCallback();\n rafRef.current = raf(() => {\n executeRef.current = false;\n });\n };\n}","map":{"version":3,"names":["React","useEvent","raf","useRafDebounce","callback","executeRef","useRef","rafRef","wrapperCallback","current"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/watermark/useRafDebounce.js"],"sourcesContent":["import React from 'react';\nimport { useEvent } from 'rc-util';\nimport raf from \"rc-util/es/raf\";\n/**\n * Callback will only execute last one for each raf\n */\nexport default function useRafDebounce(callback) {\n const executeRef = React.useRef(false);\n const rafRef = React.useRef();\n const wrapperCallback = useEvent(callback);\n return () => {\n if (executeRef.current) {\n return;\n }\n executeRef.current = true;\n wrapperCallback();\n rafRef.current = raf(() => {\n executeRef.current = false;\n });\n };\n}"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,SAAS;AAClC,OAAOC,GAAG,MAAM,gBAAgB;AAChC;AACA;AACA;AACA,eAAe,SAASC,cAAcA,CAACC,QAAQ,EAAE;EAC/C,MAAMC,UAAU,GAAGL,KAAK,CAACM,MAAM,CAAC,KAAK,CAAC;EACtC,MAAMC,MAAM,GAAGP,KAAK,CAACM,MAAM,CAAC,CAAC;EAC7B,MAAME,eAAe,GAAGP,QAAQ,CAACG,QAAQ,CAAC;EAC1C,OAAO,MAAM;IACX,IAAIC,UAAU,CAACI,OAAO,EAAE;MACtB;IACF;IACAJ,UAAU,CAACI,OAAO,GAAG,IAAI;IACzBD,eAAe,CAAC,CAAC;IACjBD,MAAM,CAACE,OAAO,GAAGP,GAAG,CAAC,MAAM;MACzBG,UAAU,CAACI,OAAO,GAAG,KAAK;IAC5B,CAAC,CAAC;EACJ,CAAC;AACH","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}