Socket
Socket
Sign inDemoInstall

scheduler

Package Overview
Dependencies
Maintainers
9
Versions
1874
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scheduler - npm Package Compare versions

Comparing version 0.0.0-experimental-d7feeb25a to 0.0.0-experimental-ea6ed3dbb

8

build-info.json
{
"branch": "master",
"buildNumber": "52787",
"checksum": "f7a286d",
"commit": "d7feeb25a",
"buildNumber": "88382",
"checksum": "1d4644b",
"commit": "ea6ed3dbb",
"environment": "ci",
"reactVersion": "16.10.2-experimental-d7feeb25a"
"reactVersion": "16.12.0-experimental-ea6ed3dbb"
}

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-tracing.development.js

@@ -20,9 +20,5 @@ *

// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
// Helps identify side effects in render-phase lifecycle hooks and setState
// reducers by double invoking them in Strict Mode.
// In some cases, StrictMode should also double-render lifecycles.
// This can be confusing for tests though,
// And it can be bad for performance in production.
// This feature flag can be used to control the behavior:
// To preserve the "Pause on caught exceptions" behavior of the debugger, we

@@ -40,2 +36,4 @@ // replay the begin phase of a failed component inside invokeGuardedCallback.

// Flight experiments
// Only used in www builds.

@@ -47,5 +45,2 @@

// React Fire: prevent the value and checked attributes from syncing
// with their related DOM properties
// These APIs will no longer be "unstable" in the upcoming 16.7 release,

@@ -64,3 +59,3 @@ // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.

// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
// Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
// Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version

@@ -80,2 +75,45 @@ // For tests, we flush suspense fallbacks in an act scope;

// Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance
// Controls sequence of passive effect destroy and create functions.
// If this flag is off, destroy and create functions may be interleaved.
// When the falg is on, all destroy functions will be run (for all fibers)
// before any create functions are run, similar to how layout effects work.
// This flag provides a killswitch if that proves to break existing code somehow.
// Controls behavior of deferred effect destroy functions during unmount.
// Previously these functions were run during commit (along with layout effects).
// Ideally we should delay these until after commit for performance reasons.
// This flag provides a killswitch if that proves to break existing code somehow.
//
// WARNING This flag only has an affect if used with runAllPassiveEffectDestroysBeforeCreates.
// --------------------------
// Future APIs to be deprecated
// --------------------------
// Prevent the value and checked attributes from syncing
// with their related DOM properties
// Disables React.createFactory
// Disables hydrate, render, findDOMNode, unmountComponentAtNode
// Disables children for <textarea> elements
// Disables Maps as ReactElement children
// Disables ReactDOM.unstable_renderSubtreeIntoContainer
// We should remove this flag once the above flag becomes enabled
// Disables ReactDOM.unstable_createPortal
// Modern event system where events get registered at roots
var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.

@@ -82,0 +120,0 @@

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-tracing.production.min.js

@@ -3,0 +3,0 @@ *

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-tracing.profiling.min.js

@@ -3,0 +3,0 @@ *

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-unstable_mock.development.js

@@ -22,3 +22,2 @@ *

var enableProfiling = true;

@@ -197,10 +196,6 @@

if (!isFlushing) {
if (scheduledTimeout !== null && timeoutTime <= currentTime) {
scheduledTimeout(currentTime);
timeoutTime = -1;
scheduledTimeout = null;
}
unstable_flushExpired();
if (scheduledTimeout !== null && timeoutTime <= currentTime) {
scheduledTimeout(currentTime);
timeoutTime = -1;
scheduledTimeout = null;
}

@@ -242,3 +237,3 @@ }

while (true) {
var parentIndex = Math.floor((index - 1) / 2);
var parentIndex = index - 1 >>> 1;
var parent = heap[parentIndex];

@@ -351,3 +346,4 @@

if (eventLogSize > MAX_EVENT_LOG_SIZE) {
console.error("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
// Using console['error'] to evade Babel and ESLint
console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
stopLoggingProfilingEvents();

@@ -354,0 +350,0 @@ return;

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-unstable_mock.production.min.js

@@ -10,12 +10,12 @@ *

'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var f=0,g=null,h=null,k=-1,l=null,m=-1,n=!1,p=!1,q=!1,r=!1;function t(){return-1!==m&&null!==l&&l.length>=m||r&&q?n=!0:!1}function x(){if(p)throw Error("Already flushing work.");if(null!==g){p=!0;try{g(!1,f)||(g=null)}finally{p=!1}}}function z(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;p=!0;try{var b=!0;do b=a(!0,f);while(b);b||(g=null);return!0}finally{p=!1}}else return!1}
function A(a,b){var c=a.length;a.push(b);a:for(;;){var d=Math.floor((c-1)/2),e=a[d];if(void 0!==e&&0<B(e,b))a[d]=b,a[c]=e,c=d;else break a}}function C(a){a=a[0];return void 0===a?null:a}function D(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var u=2*(d+1)-1,v=a[u],w=u+1,y=a[w];if(void 0!==v&&0>B(v,c))void 0!==y&&0>B(y,v)?(a[d]=y,a[w]=c,d=w):(a[d]=v,a[u]=c,d=u);else if(void 0!==y&&0>B(y,c))a[d]=y,a[w]=c,d=w;else break a}}return b}return null}
function B(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var E=[],F=[],G=1,H=null,I=3,J=!1,K=!1,L=!1;function M(a){for(var b=C(F);null!==b;){if(null===b.callback)D(F);else if(b.startTime<=a)D(F),b.sortIndex=b.expirationTime,A(E,b);else break;b=C(F)}}function N(a){L=!1;M(a);if(!K)if(null!==C(E))K=!0,g=O;else{var b=C(F);null!==b&&(a=b.startTime-a,h=N,k=f+a)}}
function O(a,b){K=!1;L&&(L=!1,h=null,k=-1);J=!0;var c=I;try{M(b);for(H=C(E);null!==H&&(!(H.expirationTime>b)||a&&!t());){var d=H.callback;if(null!==d){H.callback=null;I=H.priorityLevel;var e=d(H.expirationTime<=b);b=f;"function"===typeof e?H.callback=e:H===C(E)&&D(E);M(b)}else D(E);H=C(E)}if(null!==H)var u=!0;else{var v=C(F);if(null!==v){var w=v.startTime-b;h=N;k=f+w}u=!1}return u}finally{H=null,I=c,J=!1}}
function P(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}exports.unstable_flushAllWithoutAsserting=z;exports.unstable_flushNumberOfYields=function(a){if(p)throw Error("Already flushing work.");if(null!==g){var b=g;m=a;p=!0;try{a=!0;do a=b(!0,f);while(a&&!n);a||(g=null)}finally{m=-1,p=n=!1}}};exports.unstable_flushExpired=x;exports.unstable_clearYields=function(){if(null===l)return[];var a=l;l=null;return a};
exports.unstable_flushUntilNextPaint=function(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;r=!0;q=!1;p=!0;try{var b=!0;do b=a(!0,f);while(b&&!n);b||(g=null)}finally{p=n=r=!1}}};
exports.unstable_flushAll=function(){if(null!==l)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");z();if(null!==l)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([...])");};exports.unstable_yieldValue=function(a){null===l?l=[a]:l.push(a)};exports.unstable_advanceTime=function(a){f+=a;p||(null!==h&&k<=f&&(h(f),k=-1,h=null),x())};
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=I;I=a;try{return b()}finally{I=c}};exports.unstable_next=function(a){switch(I){case 1:case 2:case 3:var b=3;break;default:b=I}var c=I;I=b;try{return a()}finally{I=c}};
exports.unstable_scheduleCallback=function(a,b,c){var d=f;if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:P(a)}else c=P(a),e=d;c=e+c;a={id:G++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,A(F,a),null===C(E)&&a===C(F)&&(L?(h=null,k=-1):L=!0,h=N,k=f+(e-d))):(a.sortIndex=c,A(E,a),K||J||(K=!0,g=O));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
exports.unstable_wrapCallback=function(a){var b=I;return function(){var c=I;I=b;try{return a.apply(this,arguments)}finally{I=c}}};exports.unstable_getCurrentPriorityLevel=function(){return I};exports.unstable_shouldYield=function(){var a=f;M(a);var b=C(E);return b!==H&&null!==H&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<H.expirationTime||t()};exports.unstable_requestPaint=function(){q=!0};exports.unstable_continueExecution=function(){K||J||(K=!0,g=O)};
exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return C(E)};exports.unstable_now=function(){return f};exports.unstable_forceFrameRate=function(){};exports.unstable_Profiling=null;
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var f=0,g=null,h=null,k=-1,l=null,m=-1,n=!1,p=!1,q=!1,r=!1;function t(){return-1!==m&&null!==l&&l.length>=m||r&&q?n=!0:!1}function x(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;p=!0;try{var b=!0;do b=a(!0,f);while(b);b||(g=null);return!0}finally{p=!1}}else return!1}function z(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<A(e,b))a[d]=b,a[c]=e,c=d;else break a}}
function B(a){a=a[0];return void 0===a?null:a}function C(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var u=2*(d+1)-1,v=a[u],w=u+1,y=a[w];if(void 0!==v&&0>A(v,c))void 0!==y&&0>A(y,v)?(a[d]=y,a[w]=c,d=w):(a[d]=v,a[u]=c,d=u);else if(void 0!==y&&0>A(y,c))a[d]=y,a[w]=c,d=w;else break a}}return b}return null}function A(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var D=[],E=[],F=1,G=null,H=3,I=!1,J=!1,K=!1;
function L(a){for(var b=B(E);null!==b;){if(null===b.callback)C(E);else if(b.startTime<=a)C(E),b.sortIndex=b.expirationTime,z(D,b);else break;b=B(E)}}function M(a){K=!1;L(a);if(!J)if(null!==B(D))J=!0,g=N;else{var b=B(E);null!==b&&(a=b.startTime-a,h=M,k=f+a)}}
function N(a,b){J=!1;K&&(K=!1,h=null,k=-1);I=!0;var c=H;try{L(b);for(G=B(D);null!==G&&(!(G.expirationTime>b)||a&&!t());){var d=G.callback;if(null!==d){G.callback=null;H=G.priorityLevel;var e=d(G.expirationTime<=b);b=f;"function"===typeof e?G.callback=e:G===B(D)&&C(D);L(b)}else C(D);G=B(D)}if(null!==G)var u=!0;else{var v=B(E);if(null!==v){var w=v.startTime-b;h=M;k=f+w}u=!1}return u}finally{G=null,H=c,I=!1}}
function O(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}exports.unstable_flushAllWithoutAsserting=x;exports.unstable_flushNumberOfYields=function(a){if(p)throw Error("Already flushing work.");if(null!==g){var b=g;m=a;p=!0;try{a=!0;do a=b(!0,f);while(a&&!n);a||(g=null)}finally{m=-1,p=n=!1}}};exports.unstable_flushExpired=function(){if(p)throw Error("Already flushing work.");if(null!==g){p=!0;try{g(!1,f)||(g=null)}finally{p=!1}}};
exports.unstable_clearYields=function(){if(null===l)return[];var a=l;l=null;return a};exports.unstable_flushUntilNextPaint=function(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;r=!0;q=!1;p=!0;try{var b=!0;do b=a(!0,f);while(b&&!n);b||(g=null)}finally{p=n=r=!1}}};
exports.unstable_flushAll=function(){if(null!==l)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");x();if(null!==l)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([...])");};exports.unstable_yieldValue=function(a){null===l?l=[a]:l.push(a)};exports.unstable_advanceTime=function(a){f+=a;null!==h&&k<=f&&(h(f),k=-1,h=null)};
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=H;H=a;try{return b()}finally{H=c}};exports.unstable_next=function(a){switch(H){case 1:case 2:case 3:var b=3;break;default:b=H}var c=H;H=b;try{return a()}finally{H=c}};
exports.unstable_scheduleCallback=function(a,b,c){var d=f;if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:O(a)}else c=O(a),e=d;c=e+c;a={id:F++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,z(E,a),null===B(D)&&a===B(E)&&(K?(h=null,k=-1):K=!0,h=M,k=f+(e-d))):(a.sortIndex=c,z(D,a),J||I||(J=!0,g=N));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
exports.unstable_wrapCallback=function(a){var b=H;return function(){var c=H;H=b;try{return a.apply(this,arguments)}finally{H=c}}};exports.unstable_getCurrentPriorityLevel=function(){return H};exports.unstable_shouldYield=function(){var a=f;L(a);var b=B(D);return b!==G&&null!==G&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<G.expirationTime||t()};exports.unstable_requestPaint=function(){q=!0};exports.unstable_continueExecution=function(){J||I||(J=!0,g=N)};
exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return B(D)};exports.unstable_now=function(){return f};exports.unstable_forceFrameRate=function(){};exports.unstable_Profiling=null;

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler.development.js

@@ -22,12 +22,4 @@ *

var enableIsInputPending = false;
var enableMessageLoopImplementation = true;
var enableProfiling = true;
// works by scheduling a requestAnimationFrame, storing the time for the start
// of the frame, then scheduling a postMessage which gets scheduled after paint.
// Within the postMessage handler do as much work as possible until time + frame
// rate. By separating the idle call into a separate event tick we ensure that
// layout, paint and other browser work is counted against the available time.
// The frame rate is dynamically adjusted.
var requestHostCallback;

@@ -102,13 +94,18 @@

var _clearTimeout = window.clearTimeout;
var requestAnimationFrame = window.requestAnimationFrame;
var cancelAnimationFrame = window.cancelAnimationFrame;
if (typeof console !== 'undefined') {
// TODO: Remove fb.me link
// TODO: Scheduler no longer requires these methods to be polyfilled. But
// maybe we want to continue warning if they don't exist, to preserve the
// option to rely on it in the future?
var requestAnimationFrame = window.requestAnimationFrame;
var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link
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');
// Using console['error'] to evade Babel and ESLint
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 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');
// Using console['error'] to evade Babel and ESLint
console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
}

@@ -129,22 +126,14 @@ }

var isRAFLoopRunning = false;
var isMessageLoopRunning = false;
var scheduledHostCallback = null;
var rAFTimeoutID = -1;
var taskTimeoutID = -1;
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 prevRAFTime = -1;
var prevRAFInterval = -1;
var frameDeadline = 0;
var fpsLocked = false; // TODO: Make this configurable
var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
// thread, like user events. By default, it yields multiple times per frame.
// It does not attempt to align with frame boundaries, since most tasks don't
// need to be frame aligned; for those that do, use requestAnimationFrame.
var yieldInterval = 5;
var deadline = 0; // TODO: Make this configurable
// TODO: Adjust this based on priority?
var maxFrameLength = 300;
var maxYieldInterval = 300;
var needsPaint = false;

@@ -158,9 +147,9 @@

if (currentTime >= frameDeadline) {
// There's no time left in the frame. We may want to yield control of
// the main thread, so the browser can perform high priority tasks. The
// main ones are painting and user input. If there's a pending paint or
// a pending input, then we should yield. But if there's neither, then
// we can yield less often while remaining responsive. We'll eventually
// yield regardless, since there could be a pending paint that wasn't
if (currentTime >= deadline) {
// There's no time left. We may want to yield control of the main
// thread, so the browser can perform high priority tasks. The main ones
// are painting and user input. If there's a pending paint or a pending
// input, then we should yield. But if there's neither, then we can
// yield less often while remaining responsive. We'll eventually yield
// regardless, since there could be a pending paint that wasn't
// accompanied by a call to `requestPaint`, or other main thread tasks

@@ -172,6 +161,6 @@ // like network events.

} // There's no pending input. Only yield if we've reached the max
// frame length.
// yield interval.
return currentTime >= frameDeadline + maxFrameLength;
return currentTime >= maxYieldInterval;
} else {

@@ -190,3 +179,3 @@ // There's still time left in the frame.

shouldYieldToHost = function () {
return exports.unstable_now() >= frameDeadline;
return exports.unstable_now() >= deadline;
}; // Since we yield every frame regardless, `requestPaint` has no effect.

@@ -200,3 +189,4 @@

if (fps < 0 || fps > 125) {
console.error('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
// Using console['error'] to evade Babel and ESLint
console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
return;

@@ -206,8 +196,6 @@ }

if (fps > 0) {
frameLength = Math.floor(1000 / fps);
fpsLocked = true;
yieldInterval = Math.floor(1000 / fps);
} else {
// reset the framerate
frameLength = 33.33;
fpsLocked = false;
yieldInterval = 5;
}

@@ -217,60 +205,34 @@ };

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.
if (scheduledHostCallback !== null) {
var currentTime = exports.unstable_now(); // Yield after `yieldInterval` 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;
deadline = currentTime + yieldInterval;
var hasTimeRemaining = true;
try {
var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
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);
}
} catch (error) {
// If a scheduler task throws, exit the current browser task so the
// error can be observed.
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);
throw error;
}
} else {
isMessageLoopRunning = false;
} // Yielding to the browser will give it a chance to paint, so we can
// reset this.
needsPaint = false;
} catch (error) {
// If a scheduler task throws, exit the current browser task so the
// error can be observed.
port.postMessage(null);
throw error;
}
} else {
if (scheduledHostCallback !== null) {
var _currentTime = exports.unstable_now();
isMessageLoopRunning = false;
} // Yielding to the browser will give it a chance to paint, so we can
// reset this.
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;
}
needsPaint = false;
};

@@ -282,88 +244,8 @@

var onAnimationFrame = function (rAFTime) {
if (scheduledHostCallback === null) {
// No scheduled work. Exit.
prevRAFTime = -1;
prevRAFInterval = -1;
isRAFLoopRunning = false;
return;
} // 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;
}
}
}
prevRAFInterval = rAFInterval;
}
prevRAFTime = rAFTime;
frameDeadline = rAFTime + frameLength; // We use the postMessage trick to defer idle work until after the repaint.
port.postMessage(null);
};
requestHostCallback = function (callback) {
scheduledHostCallback = callback;
if (enableMessageLoopImplementation) {
if (!isMessageLoopRunning) {
isMessageLoopRunning = true;
port.postMessage(null);
}
} else {
if (!isRAFLoopRunning) {
// Start a rAF loop.
isRAFLoopRunning = true;
requestAnimationFrame(function (rAFTime) {
onAnimationFrame(rAFTime);
});
}
if (!isMessageLoopRunning) {
isMessageLoopRunning = true;
port.postMessage(null);
}

@@ -415,3 +297,3 @@ };

while (true) {
var parentIndex = Math.floor((index - 1) / 2);
var parentIndex = index - 1 >>> 1;
var parent = heap[parentIndex];

@@ -524,3 +406,4 @@

if (eventLogSize > MAX_EVENT_LOG_SIZE) {
console.error("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
// Using console['error'] to evade Babel and ESLint
console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
stopLoggingProfilingEvents();

@@ -527,0 +410,0 @@ return;

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler.production.min.js

@@ -12,12 +12,12 @@ *

if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
y=window.setTimeout,z=window.clearTimeout,A=window.requestAnimationFrame,B=window.cancelAnimationFrame;"undefined"!==typeof console&&("function"!==typeof A&&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 B&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));if("object"===typeof w&&
"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var C=x.now();exports.unstable_now=function(){return x.now()-C}}var D=!1,E=null,F=-1,G=5,H=0;k=function(){return exports.unstable_now()>=H};l=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"):G=0<a?Math.floor(1E3/a):33.33};var I=new MessageChannel,J=I.port2;I.port1.onmessage=
function(){if(null!==E){var a=exports.unstable_now();H=a+G;try{E(!0,a)?J.postMessage(null):(D=!1,E=null)}catch(b){throw J.postMessage(null),b;}}else D=!1};f=function(a){E=a;D||(D=!0,J.postMessage(null))};g=function(a,b){F=y(function(){a(exports.unstable_now())},b)};h=function(){z(F);F=-1}}function K(a,b){var c=a.length;a.push(b);a:for(;;){var d=Math.floor((c-1)/2),e=a[d];if(void 0!==e&&0<L(e,b))a[d]=b,a[c]=e,c=d;else break a}}function M(a){a=a[0];return void 0===a?null:a}
function N(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>L(n,c))void 0!==r&&0>L(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>L(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function L(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var O=[],P=[],Q=1,R=null,S=3,T=!1,U=!1,V=!1;
function W(a){for(var b=M(P);null!==b;){if(null===b.callback)N(P);else if(b.startTime<=a)N(P),b.sortIndex=b.expirationTime,K(O,b);else break;b=M(P)}}function X(a){V=!1;W(a);if(!U)if(null!==M(O))U=!0,f(Y);else{var b=M(P);null!==b&&g(X,b.startTime-a)}}
function Y(a,b){U=!1;V&&(V=!1,h());T=!0;var c=S;try{W(b);for(R=M(O);null!==R&&(!(R.expirationTime>b)||a&&!k());){var d=R.callback;if(null!==d){R.callback=null;S=R.priorityLevel;var e=d(R.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?R.callback=e:R===M(O)&&N(O);W(b)}else N(O);R=M(O)}if(null!==R)var m=!0;else{var n=M(P);null!==n&&g(X,n.startTime-b);m=!1}return m}finally{R=null,S=c,T=!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}}var aa=l;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=S;S=a;try{return b()}finally{S=c}};
exports.unstable_next=function(a){switch(S){case 1:case 2:case 3:var b=3;break;default:b=S}var c=S;S=b;try{return a()}finally{S=c}};
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Z(a)}else c=Z(a),e=d;c=e+c;a={id:Q++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,K(P,a),null===M(O)&&a===M(P)&&(V?h():V=!0,g(X,e-d))):(a.sortIndex=c,K(O,a),U||T||(U=!0,f(Y)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
exports.unstable_wrapCallback=function(a){var b=S;return function(){var c=S;S=b;try{return a.apply(this,arguments)}finally{S=c}}};exports.unstable_getCurrentPriorityLevel=function(){return S};exports.unstable_shouldYield=function(){var a=exports.unstable_now();W(a);var b=M(O);return b!==R&&null!==R&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<R.expirationTime||k()};exports.unstable_requestPaint=aa;exports.unstable_continueExecution=function(){U||T||(U=!0,f(Y))};
exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return M(O)};exports.unstable_Profiling=null;
y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&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 A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===
typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=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"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=
function(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}
function M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;
function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}
function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!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}}var Z=l;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=R;R=a;try{return b()}finally{R=c}};
exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_requestPaint=Z;exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};
exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_Profiling=null;
{
"name": "scheduler",
"version": "0.0.0-experimental-d7feeb25a",
"version": "0.0.0-experimental-ea6ed3dbb",
"description": "Cooperative scheduler for the browser environment.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,4 +17,4 @@ /**

: typeof define === 'function' && define.amd // eslint-disable-line no-undef
? define(['react'], factory) // eslint-disable-line no-undef
: (global.SchedulerTracing = factory(global));
? define(['react'], factory) // eslint-disable-line no-undef
: (global.SchedulerTracing = factory(global));
})(this, function(global) {

@@ -21,0 +21,0 @@ function unstable_clear() {

@@ -17,4 +17,4 @@ /**

: typeof define === 'function' && define.amd // eslint-disable-line no-undef
? define(['react'], factory) // eslint-disable-line no-undef
: (global.SchedulerTracing = factory(global));
? define(['react'], factory) // eslint-disable-line no-undef
: (global.SchedulerTracing = factory(global));
})(this, function(global) {

@@ -21,0 +21,0 @@ function unstable_clear() {

@@ -17,4 +17,4 @@ /**

: typeof define === 'function' && define.amd // eslint-disable-line no-undef
? define(['react'], factory) // eslint-disable-line no-undef
: (global.SchedulerTracing = factory(global));
? define(['react'], factory) // eslint-disable-line no-undef
: (global.SchedulerTracing = factory(global));
})(this, function(global) {

@@ -21,0 +21,0 @@ function unstable_clear() {

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-unstable_mock.development.js

@@ -20,3 +20,2 @@ *

var enableProfiling = true;

@@ -195,10 +194,6 @@

if (!isFlushing) {
if (scheduledTimeout !== null && timeoutTime <= currentTime) {
scheduledTimeout(currentTime);
timeoutTime = -1;
scheduledTimeout = null;
}
unstable_flushExpired();
if (scheduledTimeout !== null && timeoutTime <= currentTime) {
scheduledTimeout(currentTime);
timeoutTime = -1;
scheduledTimeout = null;
}

@@ -240,3 +235,3 @@ }

while (true) {
var parentIndex = Math.floor((index - 1) / 2);
var parentIndex = index - 1 >>> 1;
var parent = heap[parentIndex];

@@ -349,3 +344,4 @@

if (eventLogSize > MAX_EVENT_LOG_SIZE) {
console.error("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
// Using console['error'] to evade Babel and ESLint
console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
stopLoggingProfilingEvents();

@@ -352,0 +348,0 @@ return;

@@ -1,2 +0,2 @@

/** @license React v0.0.0-experimental-d7feeb25a
/** @license React v0.0.0-experimental-ea6ed3dbb
* scheduler-unstable_mock.production.min.js

@@ -9,10 +9,10 @@ *

*/
'use strict';(function(b,w){"object"===typeof exports&&"undefined"!==typeof module?w(exports):"function"===typeof define&&define.amd?define(["exports"],w):w(b.SchedulerMock={})})(this,function(b){function w(){return-1!==y&&null!==k&&k.length>=y||D&&E?t=!0:!1}function J(){if(h)throw Error("Already flushing work.");if(null!==f){h=!0;try{f(!1,g)||(f=null)}finally{h=!1}}}function K(){if(h)throw Error("Already flushing work.");if(null!==f){var a=f;h=!0;try{var c=!0;do c=a(!0,g);while(c);c||(f=null);return!0}finally{h=
!1}}else return!1}function F(a,c){var G=a.length;a.push(c);a:for(;;){var b=Math.floor((G-1)/2),p=a[b];if(void 0!==p&&0<z(p,c))a[b]=c,a[G]=p,G=b;else break a}}function l(a){a=a[0];return void 0===a?null:a}function A(a){var c=a[0];if(void 0!==c){var b=a.pop();if(b!==c){a[0]=b;a:for(var n=0,p=a.length;n<p;){var e=2*(n+1)-1,f=a[e],d=e+1,g=a[d];if(void 0!==f&&0>z(f,b))void 0!==g&&0>z(g,f)?(a[n]=g,a[d]=b,n=d):(a[n]=f,a[e]=b,n=e);else if(void 0!==g&&0>z(g,b))a[n]=g,a[d]=b,n=d;else break a}}return c}return null}
function z(a,c){var b=a.sortIndex-c.sortIndex;return 0!==b?b:a.id-c.id}function B(a){for(var c=l(q);null!==c;){if(null===c.callback)A(q);else if(c.startTime<=a)A(q),c.sortIndex=c.expirationTime,F(m,c);else break;c=l(q)}}function H(a){x=!1;B(a);if(!u)if(null!==l(m))u=!0,f=I;else{var c=l(q);null!==c&&(a=c.startTime-a,r=H,v=g+a)}}function I(a,c){u=!1;x&&(x=!1,r=null,v=-1);C=!0;var b=e;try{B(c);for(d=l(m);null!==d&&(!(d.expirationTime>c)||a&&!w());){var f=d.callback;if(null!==f){d.callback=null;e=d.priorityLevel;
var p=f(d.expirationTime<=c);c=g;"function"===typeof p?d.callback=p:d===l(m)&&A(m);B(c)}else A(m);d=l(m)}if(null!==d)var h=!0;else{var k=l(q);if(null!==k){var t=k.startTime-c;r=H;v=g+t}h=!1}return h}finally{d=null,e=b,C=!1}}function L(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var g=0,f=null,r=null,v=-1,k=null,y=-1,t=!1,h=!1,E=!1,D=!1,m=[],q=[],M=1,d=null,e=3,C=!1,u=!1,x=!1;b.unstable_flushAllWithoutAsserting=K;b.unstable_flushNumberOfYields=
function(a){if(h)throw Error("Already flushing work.");if(null!==f){var c=f;y=a;h=!0;try{a=!0;do a=c(!0,g);while(a&&!t);a||(f=null)}finally{y=-1,h=t=!1}}};b.unstable_flushExpired=J;b.unstable_clearYields=function(){if(null===k)return[];var a=k;k=null;return a};b.unstable_flushUntilNextPaint=function(){if(h)throw Error("Already flushing work.");if(null!==f){var a=f;D=!0;E=!1;h=!0;try{var c=!0;do c=a(!0,g);while(c&&!t);c||(f=null)}finally{h=t=D=!1}}};b.unstable_flushAll=function(){if(null!==k)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");
K();if(null!==k)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([...])");};b.unstable_yieldValue=function(a){null===k?k=[a]:k.push(a)};b.unstable_advanceTime=function(a){g+=a;h||(null!==r&&v<=g&&(r(g),v=-1,r=null),J())};b.unstable_ImmediatePriority=1;b.unstable_UserBlockingPriority=2;b.unstable_NormalPriority=3;b.unstable_IdlePriority=5;b.unstable_LowPriority=4;b.unstable_runWithPriority=
function(a,c){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var b=e;e=a;try{return c()}finally{e=b}};b.unstable_next=function(a){switch(e){case 1:case 2:case 3:var c=3;break;default:c=e}var b=e;e=c;try{return a()}finally{e=b}};b.unstable_scheduleCallback=function(a,c,b){var e=g;if("object"===typeof b&&null!==b){var d=b.delay;d="number"===typeof d&&0<d?e+d:e;b="number"===typeof b.timeout?b.timeout:L(a)}else b=L(a),d=e;b=d+b;a={id:M++,callback:c,priorityLevel:a,startTime:d,expirationTime:b,
sortIndex:-1};d>e?(a.sortIndex=d,F(q,a),null===l(m)&&a===l(q)&&(x?(r=null,v=-1):x=!0,r=H,v=g+(d-e))):(a.sortIndex=b,F(m,a),u||C||(u=!0,f=I));return a};b.unstable_cancelCallback=function(a){a.callback=null};b.unstable_wrapCallback=function(a){var b=e;return function(){var c=e;e=b;try{return a.apply(this,arguments)}finally{e=c}}};b.unstable_getCurrentPriorityLevel=function(){return e};b.unstable_shouldYield=function(){var a=g;B(a);var b=l(m);return b!==d&&null!==d&&null!==b&&null!==b.callback&&b.startTime<=
a&&b.expirationTime<d.expirationTime||w()};b.unstable_requestPaint=function(){E=!0};b.unstable_continueExecution=function(){u||C||(u=!0,f=I)};b.unstable_pauseExecution=function(){};b.unstable_getFirstCallbackNode=function(){return l(m)};b.unstable_now=function(){return g};b.unstable_forceFrameRate=function(){};b.unstable_Profiling=null;Object.defineProperty(b,"__esModule",{value:!0})});
'use strict';(function(b,w){"object"===typeof exports&&"undefined"!==typeof module?w(exports):"function"===typeof define&&define.amd?define(["exports"],w):w(b.SchedulerMock={})})(this,function(b){function w(){return-1!==y&&null!==k&&k.length>=y||D&&E?t=!0:!1}function J(){if(h)throw Error("Already flushing work.");if(null!==f){var a=f;h=!0;try{var c=!0;do c=a(!0,g);while(c);c||(f=null);return!0}finally{h=!1}}else return!1}function F(a,c){var G=a.length;a.push(c);a:for(;;){var b=G-1>>>1,p=a[b];if(void 0!==
p&&0<z(p,c))a[b]=c,a[G]=p,G=b;else break a}}function l(a){a=a[0];return void 0===a?null:a}function A(a){var c=a[0];if(void 0!==c){var b=a.pop();if(b!==c){a[0]=b;a:for(var n=0,p=a.length;n<p;){var e=2*(n+1)-1,f=a[e],d=e+1,g=a[d];if(void 0!==f&&0>z(f,b))void 0!==g&&0>z(g,f)?(a[n]=g,a[d]=b,n=d):(a[n]=f,a[e]=b,n=e);else if(void 0!==g&&0>z(g,b))a[n]=g,a[d]=b,n=d;else break a}}return c}return null}function z(a,c){var b=a.sortIndex-c.sortIndex;return 0!==b?b:a.id-c.id}function B(a){for(var c=l(q);null!==
c;){if(null===c.callback)A(q);else if(c.startTime<=a)A(q),c.sortIndex=c.expirationTime,F(m,c);else break;c=l(q)}}function H(a){x=!1;B(a);if(!u)if(null!==l(m))u=!0,f=I;else{var c=l(q);null!==c&&(a=c.startTime-a,r=H,v=g+a)}}function I(a,c){u=!1;x&&(x=!1,r=null,v=-1);C=!0;var b=e;try{B(c);for(d=l(m);null!==d&&(!(d.expirationTime>c)||a&&!w());){var f=d.callback;if(null!==f){d.callback=null;e=d.priorityLevel;var p=f(d.expirationTime<=c);c=g;"function"===typeof p?d.callback=p:d===l(m)&&A(m);B(c)}else A(m);
d=l(m)}if(null!==d)var h=!0;else{var k=l(q);if(null!==k){var t=k.startTime-c;r=H;v=g+t}h=!1}return h}finally{d=null,e=b,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}}var g=0,f=null,r=null,v=-1,k=null,y=-1,t=!1,h=!1,E=!1,D=!1,m=[],q=[],L=1,d=null,e=3,C=!1,u=!1,x=!1;b.unstable_flushAllWithoutAsserting=J;b.unstable_flushNumberOfYields=function(a){if(h)throw Error("Already flushing work.");if(null!==f){var c=f;y=a;h=!0;try{a=
!0;do a=c(!0,g);while(a&&!t);a||(f=null)}finally{y=-1,h=t=!1}}};b.unstable_flushExpired=function(){if(h)throw Error("Already flushing work.");if(null!==f){h=!0;try{f(!1,g)||(f=null)}finally{h=!1}}};b.unstable_clearYields=function(){if(null===k)return[];var a=k;k=null;return a};b.unstable_flushUntilNextPaint=function(){if(h)throw Error("Already flushing work.");if(null!==f){var a=f;D=!0;E=!1;h=!0;try{var c=!0;do c=a(!0,g);while(c&&!t);c||(f=null)}finally{h=t=D=!1}}};b.unstable_flushAll=function(){if(null!==
k)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");J();if(null!==k)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([...])");};b.unstable_yieldValue=function(a){null===k?k=[a]:k.push(a)};b.unstable_advanceTime=function(a){g+=a;null!==r&&v<=g&&(r(g),v=-1,r=null)};b.unstable_ImmediatePriority=1;b.unstable_UserBlockingPriority=2;b.unstable_NormalPriority=
3;b.unstable_IdlePriority=5;b.unstable_LowPriority=4;b.unstable_runWithPriority=function(a,c){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var b=e;e=a;try{return c()}finally{e=b}};b.unstable_next=function(a){switch(e){case 1:case 2:case 3:var c=3;break;default:c=e}var b=e;e=c;try{return a()}finally{e=b}};b.unstable_scheduleCallback=function(a,c,b){var e=g;if("object"===typeof b&&null!==b){var d=b.delay;d="number"===typeof d&&0<d?e+d:e;b="number"===typeof b.timeout?b.timeout:K(a)}else b=
K(a),d=e;b=d+b;a={id:L++,callback:c,priorityLevel:a,startTime:d,expirationTime:b,sortIndex:-1};d>e?(a.sortIndex=d,F(q,a),null===l(m)&&a===l(q)&&(x?(r=null,v=-1):x=!0,r=H,v=g+(d-e))):(a.sortIndex=b,F(m,a),u||C||(u=!0,f=I));return a};b.unstable_cancelCallback=function(a){a.callback=null};b.unstable_wrapCallback=function(a){var b=e;return function(){var c=e;e=b;try{return a.apply(this,arguments)}finally{e=c}}};b.unstable_getCurrentPriorityLevel=function(){return e};b.unstable_shouldYield=function(){var a=
g;B(a);var b=l(m);return b!==d&&null!==d&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<d.expirationTime||w()};b.unstable_requestPaint=function(){E=!0};b.unstable_continueExecution=function(){u||C||(u=!0,f=I)};b.unstable_pauseExecution=function(){};b.unstable_getFirstCallbackNode=function(){return l(m)};b.unstable_now=function(){return g};b.unstable_forceFrameRate=function(){};b.unstable_Profiling=null;Object.defineProperty(b,"__esModule",{value:!0})});

@@ -19,4 +19,4 @@ /**

: typeof define === 'function' && define.amd // eslint-disable-line no-undef
? define(['react'], factory) // eslint-disable-line no-undef
: (global.Scheduler = factory(global));
? define(['react'], factory) // eslint-disable-line no-undef
: (global.Scheduler = factory(global));
})(this, function(global) {

@@ -23,0 +23,0 @@ function unstable_now() {

@@ -19,4 +19,4 @@ /**

: typeof define === 'function' && define.amd // eslint-disable-line no-undef
? define(['react'], factory) // eslint-disable-line no-undef
: (global.Scheduler = factory(global));
? define(['react'], factory) // eslint-disable-line no-undef
: (global.Scheduler = factory(global));
})(this, function(global) {

@@ -23,0 +23,0 @@ function unstable_now() {

@@ -19,4 +19,4 @@ /**

: typeof define === 'function' && define.amd // eslint-disable-line no-undef
? define(['react'], factory) // eslint-disable-line no-undef
: (global.Scheduler = factory(global));
? define(['react'], factory) // eslint-disable-line no-undef
: (global.Scheduler = factory(global));
})(this, function(global) {

@@ -23,0 +23,0 @@ function unstable_now() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc