1 line
7.0 KiB
JSON
1 line
7.0 KiB
JSON
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js!D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\utils\\scroll-to.js","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\utils\\scroll-to.js","mtime":1718070786036},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\babel.config.js","mtime":1718070785981},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":1718764959024},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\eslint-loader\\index.js","mtime":1718764957746}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:TWF0aC5lYXNlSW5PdXRRdWFkID0gZnVuY3Rpb24gKHQsIGIsIGMsIGQpIHsKICB0IC89IGQgLyAyOwogIGlmICh0IDwgMSkgewogICAgcmV0dXJuIGMgLyAyICogdCAqIHQgKyBiOwogIH0KICB0LS07CiAgcmV0dXJuIC1jIC8gMiAqICh0ICogKHQgLSAyKSAtIDEpICsgYjsKfTsKCi8vIHJlcXVlc3RBbmltYXRpb25GcmFtZSBmb3IgU21hcnQgQW5pbWF0aW5nIGh0dHA6Ly9nb28uZ2wvc3g1c3RzCnZhciByZXF1ZXN0QW5pbUZyYW1lID0gZnVuY3Rpb24gKCkgewogIHJldHVybiB3aW5kb3cucmVxdWVzdEFuaW1hdGlvbkZyYW1lIHx8IHdpbmRvdy53ZWJraXRSZXF1ZXN0QW5pbWF0aW9uRnJhbWUgfHwgd2luZG93Lm1velJlcXVlc3RBbmltYXRpb25GcmFtZSB8fCBmdW5jdGlvbiAoY2FsbGJhY2spIHsKICAgIHdpb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bWF0ZVNjcm9sbCgpIHsKICAgIC8vIGluY3JlbWVudCB0aGUgdGltZQogICAgY3VycmVudFRpbWUgKz0gaW5jcmVtZW50OwogICAgLy8gZmluZCB0aGUgdmFsdWUgd2l0aCB0aGUgcXVhZHJhdGljIGluLW91dCBlYXNpbmcgZnVuY3Rpb24KICAgIHZhciB2YWwgPSBNYXRoLmVhc2VJbk91dFF1YWQoY3VycmVudFRpbWUsIHN0YXJ0LCBjaGFuZ2UsIGR1cmF0aW9uKTsKICAgIC8vIG1vdmUgdGhlIGRvY3VtZW50LmJvZHkKICAgIG1vdmUodmFsKTsKICAgIC8vIGRvIHRoZSBhbmltYXRpb24gdW5sZXNzIGl0cyBvdmVyCiAgICBpZiAoY3VycmVudFRpbWUgPCBkdXJhdGlvbikgewogICAgICByZXF1ZXN0QW5pbUZyYW1lKGFuaW1hdGVTY3JvbGwpOwogICAgfSBlbHNlIHsKICAgICAgaWYgKGNhbGxiYWNrICYmIHR5cGVvZiBjYWxsYmFjayA9PT0gJ2Z1bmN0aW9uJykgewogICAgICAgIC8vIHRoZSBhbmltYXRpb24gaXMgZG9uZSBzbyBsZXRzIGNhbGxiYWNrCiAgICAgICAgY2FsbGJhY2soKTsKICAgICAgfQogICAgfQogIH07CiAgYW5pbWF0ZVNjcm9sbCgpOwp9"},{"version":3,"names":["Math","easeInOutQuad","t","b","c","d","requestAnimFrame","window","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","callback","setTimeout","move","amount","document","documentElement","scrollTop","body","parentNode","position","scrollTo","to","duration","start","change","increment","currentTime","animateScroll","val"],"sources":["D:/phpstudy_pro/WWW/travel/admin/src/utils/scroll-to.js"],"sourcesContent":["Math.easeInOutQuad = function(t, b, c, d) {\r\n t /= d / 2\r\n if (t < 1) {\r\n return c / 2 * t * t + b\r\n }\r\n t--\r\n return -c / 2 * (t * (t - 2) - 1) + b\r\n}\r\n\r\n// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts\r\nvar requestAnimFrame = (function() {\r\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }\r\n})()\r\n\r\n/**\r\n * Because it's so fucking difficult to detect the scrolling element, just move them all\r\n * @param {number} amount\r\n */\r\nfunction move(amount) {\r\n document.documentElement.scrollTop = amount\r\n document.body.parentNode.scrollTop = amount\r\n document.body.scrollTop = amount\r\n}\r\n\r\nfunction position() {\r\n return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop\r\n}\r\n\r\n/**\r\n * @param {number} to\r\n * @param {number} duration\r\n * @param {Function} callback\r\n */\r\nexport function scrollTo(to, duration, callback) {\r\n const start = position()\r\n const change = to - start\r\n const increment = 20\r\n let currentTime = 0\r\n duration = (typeof (duration) === 'undefined') ? 500 : duration\r\n var animateScroll = function() {\r\n // increment the time\r\n currentTime += increment\r\n // find the value with the quadratic in-out easing function\r\n var val = Math.easeInOutQuad(currentTime, start, change, duration)\r\n // move the document.body\r\n move(val)\r\n // do the animation unless its over\r\n if (currentTime < duration) {\r\n requestAnimFrame(animateScroll)\r\n } else {\r\n if (callback && typeof (callback) === 'function') {\r\n // the animation is done so lets callback\r\n callback()\r\n }\r\n }\r\n }\r\n animateScroll()\r\n}\r\n"],"mappings":"AAAAA,IAAI,CAACC,aAAa,GAAG,UAASC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAE;EACxCH,CAAC,IAAIG,CAAC,GAAG,CAAC;EACV,IAAIH,CAAC,GAAG,CAAC,EAAE;IACT,OAAOE,CAAC,GAAG,CAAC,GAAGF,CAAC,GAAGA,CAAC,GAAGC,CAAC;EAC1B;EACAD,CAAC,EAAE;EACH,OAAO,CAACE,CAAC,GAAG,CAAC,IAAIF,CAAC,IAAIA,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAGC,CAAC;AACvC,CAAC;;AAED;AACA,IAAIG,gBAAgB,GAAI,YAAW;EACjC,OA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