scheduler
Advanced tools
Comparing version 0.0.0-9f395904c to 0.0.0-a1dbb852c
{ | ||
"branch": "master", | ||
"buildNumber": "28552", | ||
"checksum": "9794260", | ||
"commit": "9f395904c", | ||
"buildNumber": "33869", | ||
"checksum": "2fe1c5c", | ||
"commit": "a1dbb852c", | ||
"environment": "ci", | ||
"reactVersion": "16.8.6-canary-9f395904c" | ||
"reactVersion": "16.8.6-canary-a1dbb852c" | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-tracing.development.js | ||
@@ -71,2 +71,5 @@ * | ||
// Experimental Host Component support. | ||
// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107 | ||
@@ -81,2 +84,6 @@ | ||
// For tests, we flush suspense fallbacks in an act scope; | ||
// *except* in some of our own tests, where we test incremental loading states. | ||
// Changes priority of some events like mousemove to user-blocking priority, | ||
@@ -86,2 +93,12 @@ // but without making them discrete. The flag exists in case it causes | ||
// Add a callback property to suspense to notify which promises are currently | ||
// in the update queue. This allows reporting and tracing of what is causing | ||
// the user to see a loading state. | ||
// Part of the simplification of React.createElement so we can eventually move | ||
// from React.createElement to React.jsx | ||
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md | ||
var DEFAULT_THREAD_ID = 0; | ||
@@ -88,0 +105,0 @@ |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-tracing.production.min.js | ||
@@ -3,0 +3,0 @@ * |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-tracing.profiling.min.js | ||
@@ -3,0 +3,0 @@ * |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-unstable_mock.development.js | ||
@@ -315,10 +315,4 @@ * | ||
var expirationTime = task.expirationTime; | ||
var continuationTask = { | ||
callback: continuationCallback, | ||
priorityLevel: task.priorityLevel, | ||
startTime: task.startTime, | ||
expirationTime: expirationTime, | ||
next: null, | ||
previous: null | ||
}; | ||
var continuationTask = task; | ||
continuationTask.callback = continuationCallback; | ||
@@ -325,0 +319,0 @@ // Insert the new callback into the list, sorted by its timeout. This is |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-unstable_mock.production.min.js | ||
@@ -12,4 +12,4 @@ * | ||
var y=null,z=null,A=null,B=3,C=!1,D=!1,E=!1; | ||
function F(a,b){var c=a.next;if(c===a)y=null;else{a===y&&(y=c);var f=a.previous;f.next=c;c.previous=f}a.next=a.previous=null;c=a.callback;f=B;var p=A;B=a.priorityLevel;A=a;try{var h=a.expirationTime<=b;switch(B){case 1:var m=c(h);break;case 2:m=c(h);break;case 3:m=c(h);break;case 4:m=c(h);break;case 5:m=c(h)}}catch(L){throw L;}finally{B=f,A=p}if("function"===typeof m)if(b=a.expirationTime,a={callback:m,priorityLevel:a.priorityLevel,startTime:a.startTime,expirationTime:b,next:null,previous:null},null=== | ||
y)y=a.next=a.previous=a;else{m=null;h=y;do{if(b<=h.expirationTime){m=h;break}h=h.next}while(h!==y);null===m?m=y:m===y&&(y=a);b=m.previous;b.next=m.previous=a;a.next=m;a.previous=b}}function G(a){if(null!==z&&z.startTime<=a){do{var b=z,c=b.next;if(b===c)z=null;else{z=c;var f=b.previous;f.next=c;c.previous=f}b.next=b.previous=null;H(b,b.expirationTime)}while(null!==z&&z.startTime<=a)}}function I(a){E=!1;G(a);D||(null!==y?(D=!0,e=J):null!==z&&(a=z.startTime-a,g=I,k=d+a))} | ||
function F(a,b){var c=a.next;if(c===a)y=null;else{a===y&&(y=c);var f=a.previous;f.next=c;c.previous=f}a.next=a.previous=null;c=a.callback;f=B;var p=A;B=a.priorityLevel;A=a;try{var h=a.expirationTime<=b;switch(B){case 1:var m=c(h);break;case 2:m=c(h);break;case 3:m=c(h);break;case 4:m=c(h);break;case 5:m=c(h)}}catch(L){throw L;}finally{B=f,A=p}if("function"===typeof m)if(b=a.expirationTime,a.callback=m,null===y)y=a.next=a.previous=a;else{m=null;h=y;do{if(b<=h.expirationTime){m=h;break}h=h.next}while(h!== | ||
y);null===m?m=y:m===y&&(y=a);b=m.previous;b.next=m.previous=a;a.next=m;a.previous=b}}function G(a){if(null!==z&&z.startTime<=a){do{var b=z,c=b.next;if(b===c)z=null;else{z=c;var f=b.previous;f.next=c;c.previous=f}b.next=b.previous=null;H(b,b.expirationTime)}while(null!==z&&z.startTime<=a)}}function I(a){E=!1;G(a);D||(null!==y?(D=!0,e=J):null!==z&&(a=z.startTime-a,g=I,k=d+a))} | ||
function J(a,b){D=!1;E&&(E=!1,g=null,k=-1);G(b);C=!0;try{if(!a)for(;null!==y&&y.expirationTime<=b;)F(y,b),b=d,G(b);else if(null!==y){do F(y,b),b=d,G(b);while(null!==y&&!v())}if(null!==y)return!0;if(null!==z){var c=z.startTime-b;g=I;k=d+c}return!1}finally{C=!1}}function K(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}} | ||
@@ -16,0 +16,0 @@ function H(a,b){if(null===y)y=a.next=a.previous=a;else{var c=null,f=y;do{if(b<f.expirationTime){c=f;break}f=f.next}while(f!==y);null===c?c=y:c===y&&(y=a);b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}}exports.unstable_flushAllWithoutAsserting=x;exports.unstable_flushNumberOfYields=function(a){if(r)throw Error("Already flushing work.");if(null!==e){var b=e;n=a;r=!0;try{a=!0;do a=b(!0,d);while(a&&!q);a||(e=null)}finally{n=-1,r=q=!1}}};exports.unstable_flushExpired=w; |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler.development.js | ||
@@ -22,2 +22,5 @@ * | ||
var enableIsInputPending = false; | ||
var requestIdleCallbackBeforeFirstFrame = false; | ||
var requestTimerEventBeforeFirstFrame = false; | ||
var enableMessageLoopImplementation = false; | ||
@@ -41,54 +44,2 @@ // The DOM Scheduler implementation is similar to requestIdleCallback. It | ||
var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function'; | ||
// We capture a local reference to any global, in case it gets polyfilled after | ||
// this module is initially evaluated. We want to be using a | ||
// consistent implementation. | ||
var localDate = Date; | ||
// This initialization code may run even on server environments if a component | ||
// just imports ReactDOM (e.g. for findDOMNode). Some environments might not | ||
// have setTimeout or clearTimeout. However, we always expect them to be defined | ||
// on the client. https://github.com/facebook/react/pull/13088 | ||
var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; | ||
var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; | ||
// We don't expect either of these to necessarily be defined, but we will error | ||
// later if they are missing on the client. | ||
var localRequestAnimationFrame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined; | ||
var localCancelAnimationFrame = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : undefined; | ||
// requestAnimationFrame does not run when the tab is in the background. If | ||
// we're backgrounded we prefer for that work to happen so that the page | ||
// continues to load in the background. So we also schedule a 'setTimeout' as | ||
// a fallback. | ||
// TODO: Need a better heuristic for backgrounded work. | ||
var ANIMATION_FRAME_TIMEOUT = 100; | ||
var rAFID = void 0; | ||
var rAFTimeoutID = void 0; | ||
var requestAnimationFrameWithTimeout = function (callback) { | ||
// schedule rAF and also a setTimeout | ||
rAFID = localRequestAnimationFrame(function (timestamp) { | ||
// cancel the setTimeout | ||
localClearTimeout(rAFTimeoutID); | ||
callback(timestamp); | ||
}); | ||
rAFTimeoutID = localSetTimeout(function () { | ||
// cancel the requestAnimationFrame | ||
localCancelAnimationFrame(rAFID); | ||
callback(exports.unstable_now()); | ||
}, ANIMATION_FRAME_TIMEOUT); | ||
}; | ||
if (hasNativePerformanceNow) { | ||
var Performance = performance; | ||
exports.unstable_now = function () { | ||
return Performance.now(); | ||
}; | ||
} else { | ||
exports.unstable_now = function () { | ||
return localDate.now(); | ||
}; | ||
} | ||
if ( | ||
@@ -117,2 +68,5 @@ // If Scheduler runs in a non-DOM environment, it falls back to a naive | ||
}; | ||
exports.unstable_now = function () { | ||
return Date.now(); | ||
}; | ||
requestHostCallback = function (cb) { | ||
@@ -138,8 +92,17 @@ if (_callback !== null) { | ||
} else { | ||
// Capture local references to native APIs, in case a polyfill overrides them. | ||
var performance = window.performance; | ||
var _Date = window.Date; | ||
var _setTimeout = window.setTimeout; | ||
var _clearTimeout = window.clearTimeout; | ||
var requestAnimationFrame = window.requestAnimationFrame; | ||
var cancelAnimationFrame = window.cancelAnimationFrame; | ||
var requestIdleCallback = window.requestIdleCallback; | ||
if (typeof console !== 'undefined') { | ||
// TODO: Remove fb.me link | ||
if (typeof localRequestAnimationFrame !== 'function') { | ||
if (typeof requestAnimationFrame !== 'function') { | ||
console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills'); | ||
} | ||
if (typeof localCancelAnimationFrame !== 'function') { | ||
if (typeof cancelAnimationFrame !== 'function') { | ||
console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills'); | ||
@@ -149,15 +112,29 @@ } | ||
var requestIdleCallbackBeforeFirstFrame$1 = requestIdleCallbackBeforeFirstFrame && typeof requestIdleCallback === 'function' && typeof cancelIdleCallback === 'function'; | ||
exports.unstable_now = typeof performance === 'object' && typeof performance.now === 'function' ? function () { | ||
return performance.now(); | ||
} : function () { | ||
return _Date.now(); | ||
}; | ||
var isRAFLoopRunning = false; | ||
var isMessageLoopRunning = false; | ||
var scheduledHostCallback = null; | ||
var isMessageEventScheduled = false; | ||
var rAFTimeoutID = -1; | ||
var taskTimeoutID = -1; | ||
var isAnimationFrameScheduled = false; | ||
var frameLength = enableMessageLoopImplementation ? // We won't attempt to align with the vsync. Instead we'll yield multiple | ||
// times per frame, often enough to keep it responsive even at really | ||
// high frame rates > 120. | ||
5 : // Use a heuristic to measure the frame rate and yield at the end of the | ||
// frame. We start out assuming that we run at 30fps but then the | ||
// heuristic tracking will adjust this value to a faster fps if we get | ||
// more frequent animation frames. | ||
33.33; | ||
var timeoutID = -1; | ||
var prevRAFTime = -1; | ||
var prevRAFInterval = -1; | ||
var frameDeadline = 0; | ||
var frameDeadline = 0; | ||
// We start out assuming that we run at 30fps but then the heuristic tracking | ||
// will adjust this value to a faster fps if we get more frequent animation | ||
// frames. | ||
var previousFrameTime = 33; | ||
var activeFrameTime = 33; | ||
var fpsLocked = false; | ||
@@ -216,7 +193,7 @@ | ||
if (fps > 0) { | ||
activeFrameTime = Math.floor(1000 / fps); | ||
frameLength = Math.floor(1000 / fps); | ||
fpsLocked = true; | ||
} else { | ||
// reset the framerate | ||
activeFrameTime = 33; | ||
frameLength = 33.33; | ||
fpsLocked = false; | ||
@@ -226,28 +203,27 @@ } | ||
// We use the postMessage trick to defer idle work until after the repaint. | ||
var channel = new MessageChannel(); | ||
var port = channel.port2; | ||
channel.port1.onmessage = function (event) { | ||
isMessageEventScheduled = false; | ||
if (scheduledHostCallback !== null) { | ||
var currentTime = exports.unstable_now(); | ||
var hasTimeRemaining = frameDeadline - currentTime > 0; | ||
try { | ||
var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); | ||
if (hasMoreWork) { | ||
// Ensure the next frame is scheduled. | ||
if (!isAnimationFrameScheduled) { | ||
isAnimationFrameScheduled = true; | ||
requestAnimationFrameWithTimeout(animationTick); | ||
var performWorkUntilDeadline = function () { | ||
if (enableMessageLoopImplementation) { | ||
if (scheduledHostCallback !== null) { | ||
var currentTime = exports.unstable_now(); | ||
// Yield after `frameLength` ms, regardless of where we are in the vsync | ||
// cycle. This means there's always time remaining at the beginning of | ||
// the message event. | ||
frameDeadline = currentTime + frameLength; | ||
var hasTimeRemaining = true; | ||
try { | ||
var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); | ||
if (!hasMoreWork) { | ||
isMessageLoopRunning = false; | ||
scheduledHostCallback = null; | ||
} else { | ||
// If there's more work, schedule the next message event at the end | ||
// of the preceding one. | ||
port.postMessage(null); | ||
} | ||
} else { | ||
scheduledHostCallback = null; | ||
} catch (error) { | ||
// If a scheduler task throws, exit the current browser task so the | ||
// error can be observed. | ||
port.postMessage(null); | ||
throw error; | ||
} | ||
} catch (error) { | ||
// If a scheduler task throws, exit the current browser task so the | ||
// error can be observed, and post a new task as soon as possible | ||
// so we can continue where we left off. | ||
isMessageEventScheduled = true; | ||
port.postMessage(undefined); | ||
throw error; | ||
} | ||
@@ -257,58 +233,151 @@ // Yielding to the browser will give it a chance to paint, so we can | ||
needsPaint = false; | ||
} else { | ||
if (scheduledHostCallback !== null) { | ||
var _currentTime = exports.unstable_now(); | ||
var _hasTimeRemaining = frameDeadline - _currentTime > 0; | ||
try { | ||
var _hasMoreWork = scheduledHostCallback(_hasTimeRemaining, _currentTime); | ||
if (!_hasMoreWork) { | ||
scheduledHostCallback = null; | ||
} | ||
} catch (error) { | ||
// If a scheduler task throws, exit the current browser task so the | ||
// error can be observed, and post a new task as soon as possible | ||
// so we can continue where we left off. | ||
port.postMessage(null); | ||
throw error; | ||
} | ||
} | ||
// Yielding to the browser will give it a chance to paint, so we can | ||
// reset this. | ||
needsPaint = false; | ||
} | ||
}; | ||
var animationTick = function (rafTime) { | ||
if (scheduledHostCallback !== null) { | ||
// Eagerly schedule the next animation callback at the beginning of the | ||
// frame. If the scheduler queue is not empty at the end of the frame, it | ||
// will continue flushing inside that callback. If the queue *is* empty, | ||
// then it will exit immediately. Posting the callback at the start of the | ||
// frame ensures it's fired within the earliest possible frame. If we | ||
// waited until the end of the frame to post the callback, we risk the | ||
// browser skipping a frame and not firing the callback until the frame | ||
// after that. | ||
requestAnimationFrameWithTimeout(animationTick); | ||
} else { | ||
// No pending work. Exit. | ||
isAnimationFrameScheduled = false; | ||
var channel = new MessageChannel(); | ||
var port = channel.port2; | ||
channel.port1.onmessage = performWorkUntilDeadline; | ||
var onAnimationFrame = function (rAFTime) { | ||
if (scheduledHostCallback === null) { | ||
// No scheduled work. Exit. | ||
prevRAFTime = -1; | ||
prevRAFInterval = -1; | ||
isRAFLoopRunning = false; | ||
return; | ||
} | ||
var nextFrameTime = rafTime - frameDeadline + activeFrameTime; | ||
if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime && !fpsLocked) { | ||
if (nextFrameTime < 8) { | ||
// Defensive coding. We don't support higher frame rates than 120hz. | ||
// If the calculated frame time gets lower than 8, it is probably a bug. | ||
nextFrameTime = 8; | ||
// Eagerly schedule the next animation callback at the beginning of the | ||
// frame. If the scheduler queue is not empty at the end of the frame, it | ||
// will continue flushing inside that callback. If the queue *is* empty, | ||
// then it will exit immediately. Posting the callback at the start of the | ||
// frame ensures it's fired within the earliest possible frame. If we | ||
// waited until the end of the frame to post the callback, we risk the | ||
// browser skipping a frame and not firing the callback until the frame | ||
// after that. | ||
isRAFLoopRunning = true; | ||
requestAnimationFrame(function (nextRAFTime) { | ||
_clearTimeout(rAFTimeoutID); | ||
onAnimationFrame(nextRAFTime); | ||
}); | ||
// requestAnimationFrame is throttled when the tab is backgrounded. We | ||
// don't want to stop working entirely. So we'll fallback to a timeout loop. | ||
// TODO: Need a better heuristic for backgrounded work. | ||
var onTimeout = function () { | ||
frameDeadline = exports.unstable_now() + frameLength / 2; | ||
performWorkUntilDeadline(); | ||
rAFTimeoutID = _setTimeout(onTimeout, frameLength * 3); | ||
}; | ||
rAFTimeoutID = _setTimeout(onTimeout, frameLength * 3); | ||
if (prevRAFTime !== -1 && | ||
// Make sure this rAF time is different from the previous one. This check | ||
// could fail if two rAFs fire in the same frame. | ||
rAFTime - prevRAFTime > 0.1) { | ||
var rAFInterval = rAFTime - prevRAFTime; | ||
if (!fpsLocked && prevRAFInterval !== -1) { | ||
// We've observed two consecutive frame intervals. We'll use this to | ||
// dynamically adjust the frame rate. | ||
// | ||
// If one frame goes long, then the next one can be short to catch up. | ||
// If two frames are short in a row, then that's an indication that we | ||
// actually have a higher frame rate than what we're currently | ||
// optimizing. For example, if we're running on 120hz display or 90hz VR | ||
// display. Take the max of the two in case one of them was an anomaly | ||
// due to missed frame deadlines. | ||
if (rAFInterval < frameLength && prevRAFInterval < frameLength) { | ||
frameLength = rAFInterval < prevRAFInterval ? prevRAFInterval : rAFInterval; | ||
if (frameLength < 8.33) { | ||
// Defensive coding. We don't support higher frame rates than 120hz. | ||
// If the calculated frame length gets lower than 8, it is probably | ||
// a bug. | ||
frameLength = 8.33; | ||
} | ||
} | ||
} | ||
// If one frame goes long, then the next one can be short to catch up. | ||
// If two frames are short in a row, then that's an indication that we | ||
// actually have a higher frame rate than what we're currently optimizing. | ||
// We adjust our heuristic dynamically accordingly. For example, if we're | ||
// running on 120hz display or 90hz VR display. | ||
// Take the max of the two in case one of them was an anomaly due to | ||
// missed frame deadlines. | ||
activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime; | ||
} else { | ||
previousFrameTime = nextFrameTime; | ||
prevRAFInterval = rAFInterval; | ||
} | ||
frameDeadline = rafTime + activeFrameTime; | ||
if (!isMessageEventScheduled) { | ||
isMessageEventScheduled = true; | ||
port.postMessage(undefined); | ||
} | ||
prevRAFTime = rAFTime; | ||
frameDeadline = rAFTime + frameLength; | ||
// We use the postMessage trick to defer idle work until after the repaint. | ||
port.postMessage(null); | ||
}; | ||
requestHostCallback = function (callback) { | ||
if (scheduledHostCallback === null) { | ||
scheduledHostCallback = callback; | ||
if (!isAnimationFrameScheduled) { | ||
// If rAF didn't already schedule one, we need to schedule a frame. | ||
// TODO: If this rAF doesn't materialize because the browser throttles, | ||
// we might want to still have setTimeout trigger rIC as a backup to | ||
// ensure that we keep performing work. | ||
isAnimationFrameScheduled = true; | ||
requestAnimationFrameWithTimeout(animationTick); | ||
scheduledHostCallback = callback; | ||
if (enableMessageLoopImplementation) { | ||
if (!isMessageLoopRunning) { | ||
isMessageLoopRunning = true; | ||
port.postMessage(null); | ||
} | ||
} else { | ||
if (!isRAFLoopRunning) { | ||
// Start a rAF loop. | ||
isRAFLoopRunning = true; | ||
requestAnimationFrame(function (rAFTime) { | ||
if (requestIdleCallbackBeforeFirstFrame$1) { | ||
cancelIdleCallback(idleCallbackID); | ||
} | ||
if (requestTimerEventBeforeFirstFrame) { | ||
_clearTimeout(idleTimeoutID); | ||
} | ||
onAnimationFrame(rAFTime); | ||
}); | ||
// If we just missed the last vsync, the next rAF might not happen for | ||
// another frame. To claim as much idle time as possible, post a | ||
// callback with `requestIdleCallback`, which should fire if there's | ||
// idle time left in the frame. | ||
// | ||
// This should only be an issue for the first rAF in the loop; | ||
// subsequent rAFs are scheduled at the beginning of the | ||
// preceding frame. | ||
var idleCallbackID = void 0; | ||
if (requestIdleCallbackBeforeFirstFrame$1) { | ||
idleCallbackID = requestIdleCallback(function onIdleCallbackBeforeFirstFrame() { | ||
if (requestTimerEventBeforeFirstFrame) { | ||
_clearTimeout(idleTimeoutID); | ||
} | ||
frameDeadline = exports.unstable_now() + frameLength; | ||
performWorkUntilDeadline(); | ||
}); | ||
} | ||
// Alternate strategy to address the same problem. Scheduler a timer | ||
// with no delay. If this fires before the rAF, that likely indicates | ||
// that there's idle time before the next vsync. This isn't always the | ||
// case, but we'll be aggressive and assume it is, as a trade off to | ||
// prevent idle periods. | ||
var idleTimeoutID = void 0; | ||
if (requestTimerEventBeforeFirstFrame) { | ||
idleTimeoutID = _setTimeout(function onTimerEventBeforeFirstFrame() { | ||
if (requestIdleCallbackBeforeFirstFrame$1) { | ||
cancelIdleCallback(idleCallbackID); | ||
} | ||
frameDeadline = exports.unstable_now() + frameLength; | ||
performWorkUntilDeadline(); | ||
}, 0); | ||
} | ||
} | ||
} | ||
@@ -318,3 +387,3 @@ }; | ||
requestHostTimeout = function (callback, ms) { | ||
timeoutID = localSetTimeout(function () { | ||
taskTimeoutID = _setTimeout(function () { | ||
callback(exports.unstable_now()); | ||
@@ -325,4 +394,4 @@ }, ms); | ||
cancelHostTimeout = function () { | ||
localClearTimeout(timeoutID); | ||
timeoutID = -1; | ||
_clearTimeout(taskTimeoutID); | ||
taskTimeoutID = -1; | ||
}; | ||
@@ -443,10 +512,4 @@ } | ||
var expirationTime = task.expirationTime; | ||
var continuationTask = { | ||
callback: continuationCallback, | ||
priorityLevel: task.priorityLevel, | ||
startTime: task.startTime, | ||
expirationTime: expirationTime, | ||
next: null, | ||
previous: null | ||
}; | ||
var continuationTask = task; | ||
continuationTask.callback = continuationCallback; | ||
@@ -453,0 +516,0 @@ // Insert the new callback into the list, sorted by its timeout. This is |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler.production.min.js | ||
@@ -10,15 +10,15 @@ * | ||
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d=void 0,e=void 0,g=void 0,m=void 0,n=void 0;exports.unstable_now=void 0;exports.unstable_forceFrameRate=void 0;var p=Date,q="function"===typeof setTimeout?setTimeout:void 0,r="function"===typeof clearTimeout?clearTimeout:void 0,t="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,u="function"===typeof cancelAnimationFrame?cancelAnimationFrame:void 0,v=void 0,w=void 0; | ||
function x(a){v=t(function(b){r(w);a(b)});w=q(function(){u(v);a(exports.unstable_now())},100)}if("object"===typeof performance&&"function"===typeof performance.now){var y=performance;exports.unstable_now=function(){return y.now()}}else exports.unstable_now=function(){return p.now()}; | ||
if("undefined"===typeof window||"function"!==typeof MessageChannel){var z=null,A=null,B=function(){if(null!==z)try{var a=exports.unstable_now();z(!0,a);z=null}catch(b){throw setTimeout(B,0),b;}};d=function(a){null!==z?setTimeout(d,0,a):(z=a,setTimeout(B,0))};e=function(a,b){A=setTimeout(a,b)};g=function(){clearTimeout(A)};m=function(){return!1};n=exports.unstable_forceFrameRate=function(){}}else{"undefined"!==typeof console&&("function"!==typeof t&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"), | ||
"function"!==typeof u&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var C=null,D=!1,E=!1,F=-1,G=0,H=33,I=33,J=!1;m=function(){return exports.unstable_now()>=G};n=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):0<a?(I=Math.floor(1E3/a),J=!0):(I= | ||
33,J=!1)};var K=new MessageChannel,L=K.port2;K.port1.onmessage=function(){D=!1;if(null!==C){var a=exports.unstable_now(),b=0<G-a;try{C(b,a)?E||(E=!0,x(M)):C=null}catch(c){throw D=!0,L.postMessage(void 0),c;}}};var M=function(a){if(null!==C){x(M);var b=a-G+I;b<I&&H<I&&!J?(8>b&&(b=8),I=b<H?H:b):H=b;G=a+I;D||(D=!0,L.postMessage(void 0))}else E=!1};d=function(a){null===C&&(C=a,E||(E=!0,x(M)))};e=function(a,b){F=q(function(){a(exports.unstable_now())},b)};g=function(){r(F);F=-1}} | ||
var N=null,O=null,P=null,Q=3,R=!1,S=!1,T=!1; | ||
function U(a,b){var c=a.next;if(c===a)N=null;else{a===N&&(N=c);var f=a.previous;f.next=c;c.previous=f}a.next=a.previous=null;c=a.callback;f=Q;var l=P;Q=a.priorityLevel;P=a;try{var h=a.expirationTime<=b;switch(Q){case 1:var k=c(h);break;case 2:k=c(h);break;case 3:k=c(h);break;case 4:k=c(h);break;case 5:k=c(h)}}catch(aa){throw aa;}finally{Q=f,P=l}if("function"===typeof k)if(b=a.expirationTime,a={callback:k,priorityLevel:a.priorityLevel,startTime:a.startTime,expirationTime:b,next:null,previous:null}, | ||
null===N)N=a.next=a.previous=a;else{k=null;h=N;do{if(b<=h.expirationTime){k=h;break}h=h.next}while(h!==N);null===k?k=N:k===N&&(N=a);b=k.previous;b.next=k.previous=a;a.next=k;a.previous=b}}function V(a){if(null!==O&&O.startTime<=a){do{var b=O,c=b.next;if(b===c)O=null;else{O=c;var f=b.previous;f.next=c;c.previous=f}b.next=b.previous=null;W(b,b.expirationTime)}while(null!==O&&O.startTime<=a)}}function X(a){T=!1;V(a);S||(null!==N?(S=!0,d(Y)):null!==O&&e(X,O.startTime-a))} | ||
function Y(a,b){S=!1;T&&(T=!1,g());V(b);R=!0;try{if(!a)for(;null!==N&&N.expirationTime<=b;)U(N,b),b=exports.unstable_now(),V(b);else if(null!==N){do U(N,b),b=exports.unstable_now(),V(b);while(null!==N&&!m())}if(null!==N)return!0;null!==O&&e(X,O.startTime-b);return!1}finally{R=!1}}function Z(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}} | ||
function W(a,b){if(null===N)N=a.next=a.previous=a;else{var c=null,f=N;do{if(b<f.expirationTime){c=f;break}f=f.next}while(f!==N);null===c?c=N:c===N&&(N=a);b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}}var ba=n;exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4; | ||
exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=Q;Q=a;try{return b()}finally{Q=c}};exports.unstable_next=function(a){switch(Q){case 1:case 2:case 3:var b=3;break;default:b=Q}var c=Q;Q=b;try{return a()}finally{Q=c}}; | ||
exports.unstable_scheduleCallback=function(a,b,c){var f=exports.unstable_now();if("object"===typeof c&&null!==c){var l=c.delay;l="number"===typeof l&&0<l?f+l:f;c="number"===typeof c.timeout?c.timeout:Z(a)}else c=Z(a),l=f;c=l+c;a={callback:b,priorityLevel:a,startTime:l,expirationTime:c,next:null,previous:null};if(l>f){c=l;if(null===O)O=a.next=a.previous=a;else{b=null;var h=O;do{if(c<h.startTime){b=h;break}h=h.next}while(h!==O);null===b?b=O:b===O&&(O=a);c=b.previous;c.next=b.previous=a;a.next=b;a.previous= | ||
c}null===N&&O===a&&(T?g():T=!0,e(X,l-f))}else W(a,c),S||R||(S=!0,d(Y));return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(a===b)a===N?N=null:a===O&&(O=null);else{a===N?N=b:a===O&&(O=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=Q;return function(){var c=Q;Q=b;try{return a.apply(this,arguments)}finally{Q=c}}};exports.unstable_getCurrentPriorityLevel=function(){return Q}; | ||
exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);return null!==P&&null!==N&&N.startTime<=a&&N.expirationTime<P.expirationTime||m()};exports.unstable_requestPaint=ba;exports.unstable_continueExecution=function(){S||R||(S=!0,d(Y))};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return N}; | ||
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d=void 0,e=void 0,g=void 0,m=void 0,n=void 0;exports.unstable_now=void 0;exports.unstable_forceFrameRate=void 0; | ||
if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,r=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(r,0),b;}};exports.unstable_now=function(){return Date.now()};d=function(a){null!==p?setTimeout(d,0,a):(p=a,setTimeout(r,0))};e=function(a,b){q=setTimeout(a,b)};g=function(){clearTimeout(q)};m=function(){return!1};n=exports.unstable_forceFrameRate=function(){}}else{var t=window.performance,u=window.Date,v=window.setTimeout, | ||
w=window.clearTimeout,x=window.requestAnimationFrame,y=window.cancelAnimationFrame;"undefined"!==typeof console&&("function"!==typeof x&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));exports.unstable_now="object"===typeof t&& | ||
"function"===typeof t.now?function(){return t.now()}:function(){return u.now()};var z=!1,A=null,B=-1,C=-1,D=33.33,E=-1,F=-1,G=0,H=!1;m=function(){return exports.unstable_now()>=G};n=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):0<a?(D=Math.floor(1E3/a),H=!0):(D=33.33,H=!1)};var J=function(){if(null!==A){var a=exports.unstable_now(),b=0<G-a;try{A(b, | ||
a)||(A=null)}catch(c){throw I.postMessage(null),c;}}},K=new MessageChannel,I=K.port2;K.port1.onmessage=J;var L=function(a){if(null===A)F=E=-1,z=!1;else{z=!0;x(function(a){w(B);L(a)});var b=function(){G=exports.unstable_now()+D/2;J();B=v(b,3*D)};B=v(b,3*D);if(-1!==E&&.1<a-E){var c=a-E;!H&&-1!==F&&c<D&&F<D&&(D=c<F?F:c,8.33>D&&(D=8.33));F=c}E=a;G=a+D;I.postMessage(null)}};d=function(a){A=a;z||(z=!0,x(function(a){L(a)}))};e=function(a,b){C=v(function(){a(exports.unstable_now())},b)};g=function(){w(C); | ||
C=-1}}var M=null,N=null,O=null,P=3,Q=!1,R=!1,S=!1; | ||
function T(a,b){var c=a.next;if(c===a)M=null;else{a===M&&(M=c);var f=a.previous;f.next=c;c.previous=f}a.next=a.previous=null;c=a.callback;f=P;var l=O;P=a.priorityLevel;O=a;try{var h=a.expirationTime<=b;switch(P){case 1:var k=c(h);break;case 2:k=c(h);break;case 3:k=c(h);break;case 4:k=c(h);break;case 5:k=c(h)}}catch(Z){throw Z;}finally{P=f,O=l}if("function"===typeof k)if(b=a.expirationTime,a.callback=k,null===M)M=a.next=a.previous=a;else{k=null;h=M;do{if(b<=h.expirationTime){k=h;break}h=h.next}while(h!== | ||
M);null===k?k=M:k===M&&(M=a);b=k.previous;b.next=k.previous=a;a.next=k;a.previous=b}}function U(a){if(null!==N&&N.startTime<=a){do{var b=N,c=b.next;if(b===c)N=null;else{N=c;var f=b.previous;f.next=c;c.previous=f}b.next=b.previous=null;V(b,b.expirationTime)}while(null!==N&&N.startTime<=a)}}function W(a){S=!1;U(a);R||(null!==M?(R=!0,d(X)):null!==N&&e(W,N.startTime-a))} | ||
function X(a,b){R=!1;S&&(S=!1,g());U(b);Q=!0;try{if(!a)for(;null!==M&&M.expirationTime<=b;)T(M,b),b=exports.unstable_now(),U(b);else if(null!==M){do T(M,b),b=exports.unstable_now(),U(b);while(null!==M&&!m())}if(null!==M)return!0;null!==N&&e(W,N.startTime-b);return!1}finally{Q=!1}}function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}} | ||
function V(a,b){if(null===M)M=a.next=a.previous=a;else{var c=null,f=M;do{if(b<f.expirationTime){c=f;break}f=f.next}while(f!==M);null===c?c=M:c===M&&(M=a);b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}}var aa=n;exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4; | ||
exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};exports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}}; | ||
exports.unstable_scheduleCallback=function(a,b,c){var f=exports.unstable_now();if("object"===typeof c&&null!==c){var l=c.delay;l="number"===typeof l&&0<l?f+l:f;c="number"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),l=f;c=l+c;a={callback:b,priorityLevel:a,startTime:l,expirationTime:c,next:null,previous:null};if(l>f){c=l;if(null===N)N=a.next=a.previous=a;else{b=null;var h=N;do{if(c<h.startTime){b=h;break}h=h.next}while(h!==N);null===b?b=N:b===N&&(N=a);c=b.previous;c.next=b.previous=a;a.next=b;a.previous= | ||
c}null===M&&N===a&&(S?g():S=!0,e(W,l-f))}else V(a,c),R||Q||(R=!0,d(X));return a};exports.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(a===b)a===M?M=null:a===N&&(N=null);else{a===M?M=b:a===N&&(N=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};exports.unstable_getCurrentPriorityLevel=function(){return P}; | ||
exports.unstable_shouldYield=function(){var a=exports.unstable_now();U(a);return null!==O&&null!==M&&M.startTime<=a&&M.expirationTime<O.expirationTime||m()};exports.unstable_requestPaint=aa;exports.unstable_continueExecution=function(){R||Q||(R=!0,d(X))};exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return M}; |
{ | ||
"name": "scheduler", | ||
"version": "0.0.0-9f395904c", | ||
"version": "0.0.0-a1dbb852c", | ||
"description": "Cooperative scheduler for the browser environment.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-unstable_mock.development.js | ||
@@ -313,10 +313,4 @@ * | ||
var expirationTime = task.expirationTime; | ||
var continuationTask = { | ||
callback: continuationCallback, | ||
priorityLevel: task.priorityLevel, | ||
startTime: task.startTime, | ||
expirationTime: expirationTime, | ||
next: null, | ||
previous: null | ||
}; | ||
var continuationTask = task; | ||
continuationTask.callback = continuationCallback; | ||
@@ -323,0 +317,0 @@ // Insert the new callback into the list, sorted by its timeout. This is |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-9f395904c | ||
/** @license React v0.0.0-a1dbb852c | ||
* scheduler-unstable_mock.production.min.js | ||
@@ -10,10 +10,10 @@ * | ||
'use strict';(function(d,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports):"function"===typeof define&&define.amd?define(["exports"],t):t(d.SchedulerMock={})})(this,function(d){function t(){return-1!==y&&null!==n&&n.length>=y||A&&B?u=!0:!1}function E(){if(m)throw Error("Already flushing work.");if(null!==f){m=!0;try{f(!1,l)||(f=null)}finally{m=!1}}}function F(){if(m)throw Error("Already flushing work.");if(null!==f){var a=f;m=!0;try{var b=!0;do b=a(!0,l);while(b);b||(f=null);return!0}finally{m= | ||
!1}}else return!1}function G(a,b){var c=a.next;if(c===a)e=null;else{a===e&&(e=c);var d=a.previous;d.next=c;c.previous=d}a.next=a.previous=null;c=a.callback;d=g;var h=v;g=a.priorityLevel;v=a;try{var k=a.expirationTime<=b;switch(g){case 1:var f=c(k);break;case 2:f=c(k);break;case 3:f=c(k);break;case 4:f=c(k);break;case 5:f=c(k)}}catch(J){throw J;}finally{g=d,v=h}if("function"===typeof f)if(b=a.expirationTime,a={callback:f,priorityLevel:a.priorityLevel,startTime:a.startTime,expirationTime:b,next:null, | ||
previous:null},null===e)e=a.next=a.previous=a;else{f=null;k=e;do{if(b<=k.expirationTime){f=k;break}k=k.next}while(k!==e);null===f?f=e:f===e&&(e=a);b=f.previous;b.next=f.previous=a;a.next=f;a.previous=b}}function w(a){if(null!==h&&h.startTime<=a){do{var b=h,c=b.next;if(b===c)h=null;else{h=c;var d=b.previous;d.next=c;c.previous=d}b.next=b.previous=null;H(b,b.expirationTime)}while(null!==h&&h.startTime<=a)}}function C(a){x=!1;w(a);q||(null!==e?(q=!0,f=D):null!==h&&(a=h.startTime-a,p=C,r=l+a))}function D(a, | ||
b){q=!1;x&&(x=!1,p=null,r=-1);w(b);z=!0;try{if(!a)for(;null!==e&&e.expirationTime<=b;)G(e,b),b=l,w(b);else if(null!==e){do G(e,b),b=l,w(b);while(null!==e&&!t())}if(null!==e)return!0;if(null!==h){var c=h.startTime-b;p=C;r=l+c}return!1}finally{z=!1}}function I(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}function H(a,b){if(null===e)e=a.next=a.previous=a;else{var c=null,d=e;do{if(b<d.expirationTime){c=d;break}d=d.next}while(d!==e);null=== | ||
c?c=e:c===e&&(e=a);b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}}var l=0,f=null,p=null,r=-1,n=null,y=-1,u=!1,m=!1,B=!1,A=!1,e=null,h=null,v=null,g=3,z=!1,q=!1,x=!1;d.unstable_flushAllWithoutAsserting=F;d.unstable_flushNumberOfYields=function(a){if(m)throw Error("Already flushing work.");if(null!==f){var b=f;y=a;m=!0;try{a=!0;do a=b(!0,l);while(a&&!u);a||(f=null)}finally{y=-1,m=u=!1}}};d.unstable_flushExpired=E;d.unstable_clearYields=function(){if(null===n)return[];var a=n;n=null;return a}; | ||
d.unstable_flushUntilNextPaint=function(){if(m)throw Error("Already flushing work.");if(null!==f){var a=f;A=!0;B=!1;m=!0;try{var b=!0;do b=a(!0,l);while(b&&!u);b||(f=null)}finally{m=u=A=!1}}};d.unstable_flushAll=function(){if(null!==n)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");F();if(null!==n)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"); | ||
};d.unstable_yieldValue=function(a){null===n?n=[a]:n.push(a)};d.unstable_advanceTime=function(a){l+=a;m||(null!==p&&r<=l&&(p(l),r=-1,p=null),E())};d.unstable_ImmediatePriority=1;d.unstable_UserBlockingPriority=2;d.unstable_NormalPriority=3;d.unstable_IdlePriority=5;d.unstable_LowPriority=4;d.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=g;g=a;try{return b()}finally{g=c}};d.unstable_next=function(a){switch(g){case 1:case 2:case 3:var b= | ||
3;break;default:b=g}var c=g;g=b;try{return a()}finally{g=c}};d.unstable_scheduleCallback=function(a,b,c){var d=l;if("object"===typeof c&&null!==c){var g=c.delay;g="number"===typeof g&&0<g?d+g:d;c="number"===typeof c.timeout?c.timeout:I(a)}else c=I(a),g=d;c=g+c;a={callback:b,priorityLevel:a,startTime:g,expirationTime:c,next:null,previous:null};if(g>d){c=g;if(null===h)h=a.next=a.previous=a;else{b=null;var k=h;do{if(c<k.startTime){b=k;break}k=k.next}while(k!==h);null===b?b=h:b===h&&(h=a);c=b.previous; | ||
c.next=b.previous=a;a.next=b;a.previous=c}null===e&&h===a&&(x?(p=null,r=-1):x=!0,p=C,r=l+(g-d))}else H(a,c),q||z||(q=!0,f=D);return a};d.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(a===b)a===e?e=null:a===h&&(h=null);else{a===e?e=b:a===h&&(h=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};d.unstable_wrapCallback=function(a){var b=g;return function(){var c=g;g=b;try{return a.apply(this,arguments)}finally{g=c}}};d.unstable_getCurrentPriorityLevel=function(){return g}; | ||
d.unstable_shouldYield=function(){var a=l;w(a);return null!==v&&null!==e&&e.startTime<=a&&e.expirationTime<v.expirationTime||t()};d.unstable_requestPaint=function(){B=!0};d.unstable_continueExecution=function(){q||z||(q=!0,f=D)};d.unstable_pauseExecution=function(){};d.unstable_getFirstCallbackNode=function(){return e};d.unstable_now=function(){return l};d.unstable_forceFrameRate=function(){};Object.defineProperty(d,"__esModule",{value:!0})}); | ||
!1}}else return!1}function G(a,b){var c=a.next;if(c===a)e=null;else{a===e&&(e=c);var d=a.previous;d.next=c;c.previous=d}a.next=a.previous=null;c=a.callback;d=g;var h=v;g=a.priorityLevel;v=a;try{var k=a.expirationTime<=b;switch(g){case 1:var f=c(k);break;case 2:f=c(k);break;case 3:f=c(k);break;case 4:f=c(k);break;case 5:f=c(k)}}catch(J){throw J;}finally{g=d,v=h}if("function"===typeof f)if(b=a.expirationTime,a.callback=f,null===e)e=a.next=a.previous=a;else{f=null;k=e;do{if(b<=k.expirationTime){f=k; | ||
break}k=k.next}while(k!==e);null===f?f=e:f===e&&(e=a);b=f.previous;b.next=f.previous=a;a.next=f;a.previous=b}}function w(a){if(null!==h&&h.startTime<=a){do{var b=h,c=b.next;if(b===c)h=null;else{h=c;var d=b.previous;d.next=c;c.previous=d}b.next=b.previous=null;H(b,b.expirationTime)}while(null!==h&&h.startTime<=a)}}function C(a){x=!1;w(a);q||(null!==e?(q=!0,f=D):null!==h&&(a=h.startTime-a,p=C,r=l+a))}function D(a,b){q=!1;x&&(x=!1,p=null,r=-1);w(b);z=!0;try{if(!a)for(;null!==e&&e.expirationTime<=b;)G(e, | ||
b),b=l,w(b);else if(null!==e){do G(e,b),b=l,w(b);while(null!==e&&!t())}if(null!==e)return!0;if(null!==h){var c=h.startTime-b;p=C;r=l+c}return!1}finally{z=!1}}function I(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}function H(a,b){if(null===e)e=a.next=a.previous=a;else{var c=null,d=e;do{if(b<d.expirationTime){c=d;break}d=d.next}while(d!==e);null===c?c=e:c===e&&(e=a);b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}}var l=0,f=null, | ||
p=null,r=-1,n=null,y=-1,u=!1,m=!1,B=!1,A=!1,e=null,h=null,v=null,g=3,z=!1,q=!1,x=!1;d.unstable_flushAllWithoutAsserting=F;d.unstable_flushNumberOfYields=function(a){if(m)throw Error("Already flushing work.");if(null!==f){var b=f;y=a;m=!0;try{a=!0;do a=b(!0,l);while(a&&!u);a||(f=null)}finally{y=-1,m=u=!1}}};d.unstable_flushExpired=E;d.unstable_clearYields=function(){if(null===n)return[];var a=n;n=null;return a};d.unstable_flushUntilNextPaint=function(){if(m)throw Error("Already flushing work.");if(null!== | ||
f){var a=f;A=!0;B=!1;m=!0;try{var b=!0;do b=a(!0,l);while(b&&!u);b||(f=null)}finally{m=u=A=!1}}};d.unstable_flushAll=function(){if(null!==n)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");F();if(null!==n)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");};d.unstable_yieldValue=function(a){null===n?n=[a]:n.push(a)};d.unstable_advanceTime= | ||
function(a){l+=a;m||(null!==p&&r<=l&&(p(l),r=-1,p=null),E())};d.unstable_ImmediatePriority=1;d.unstable_UserBlockingPriority=2;d.unstable_NormalPriority=3;d.unstable_IdlePriority=5;d.unstable_LowPriority=4;d.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=g;g=a;try{return b()}finally{g=c}};d.unstable_next=function(a){switch(g){case 1:case 2:case 3:var b=3;break;default:b=g}var c=g;g=b;try{return a()}finally{g=c}};d.unstable_scheduleCallback= | ||
function(a,b,c){var d=l;if("object"===typeof c&&null!==c){var g=c.delay;g="number"===typeof g&&0<g?d+g:d;c="number"===typeof c.timeout?c.timeout:I(a)}else c=I(a),g=d;c=g+c;a={callback:b,priorityLevel:a,startTime:g,expirationTime:c,next:null,previous:null};if(g>d){c=g;if(null===h)h=a.next=a.previous=a;else{b=null;var k=h;do{if(c<k.startTime){b=k;break}k=k.next}while(k!==h);null===b?b=h:b===h&&(h=a);c=b.previous;c.next=b.previous=a;a.next=b;a.previous=c}null===e&&h===a&&(x?(p=null,r=-1):x=!0,p=C,r= | ||
l+(g-d))}else H(a,c),q||z||(q=!0,f=D);return a};d.unstable_cancelCallback=function(a){var b=a.next;if(null!==b){if(a===b)a===e?e=null:a===h&&(h=null);else{a===e?e=b:a===h&&(h=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}};d.unstable_wrapCallback=function(a){var b=g;return function(){var c=g;g=b;try{return a.apply(this,arguments)}finally{g=c}}};d.unstable_getCurrentPriorityLevel=function(){return g};d.unstable_shouldYield=function(){var a=l;w(a);return null!==v&&null!==e&&e.startTime<= | ||
a&&e.expirationTime<v.expirationTime||t()};d.unstable_requestPaint=function(){B=!0};d.unstable_continueExecution=function(){q||z||(q=!0,f=D)};d.unstable_pauseExecution=function(){};d.unstable_getFirstCallbackNode=function(){return e};d.unstable_now=function(){return l};d.unstable_forceFrameRate=function(){};Object.defineProperty(d,"__esModule",{value:!0})}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129437
3218