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
2.4 KiB
1 line
2.4 KiB
2 years ago
|
{"ast":null,"code":"var rafSchd = function rafSchd(fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n return wrapperFn;\n};\n\nexport default rafSchd;","map":{"version":3,"names":["rafSchd","fn","lastArgs","frameId","wrapperFn","_len","arguments","length","args","Array","_key","requestAnimationFrame","apply","cancel","cancelAnimationFrame"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/raf-schd/dist/raf-schd.esm.js"],"sourcesContent":["var rafSchd = function rafSchd(fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n return wrapperFn;\n};\n\nexport default rafSchd;\n"],"mappings":"AAAA,IAAIA,OAAO,GAAG,SAASA,OAAT,CAAiBC,EAAjB,EAAqB;EACjC,IAAIC,QAAQ,GAAG,EAAf;EACA,IAAIC,OAAO,GAAG,IAAd;;EAEA,IAAIC,SAAS,GAAG,SAASA,SAAT,GAAqB;IACnC,KAAK,IAAIC,IAAI,GAAGC,SAAS,CAACC,MAArB,EAA6BC,IAAI,GAAG,IAAIC,KAAJ,CAAUJ,IAAV,CAApC,EAAqDK,IAAI,GAAG,CAAjE,EAAoEA,IAAI,GAAGL,IAA3E,EAAiFK,IAAI,EAArF,EAAyF;MACvFF,IAAI,CAACE,IAAD,CAAJ,GAAaJ,SAAS,CAACI,IAAD,CAAtB;IACD;;IAEDR,QAAQ,GAAGM,IAAX;;IAEA,IAAIL,OAAJ,EAAa;MACX;IACD;;IAEDA,OAAO,GAAGQ,qBAAqB,CAAC,YAAY;MAC1CR,OAAO,GAAG,IAAV;MACAF,EAAE,CAACW,KAAH,CAAS,KAAK,CAAd,EAAiBV,QAAjB;IACD,CAH8B,CAA/B;EAID,CAfD;;EAiBAE,SAAS,CAACS,MAAV,GAAmB,YAAY;IAC7B,IAAI,CAACV,OAAL,EAAc;MACZ;IACD;;IAEDW,oBAAoB,CAACX,OAAD,CAApB;IACAA,OAAO,GAAG,IAAV;EACD,CAPD;;EASA,OAAOC,SAAP;AACD,CA/BD;;AAiCA,eAAeJ,OAAf"},"metadata":{},"sourceType":"module"}
|