mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2026-02-06 06:30:32 -07:00
10 lines
3.7 KiB
JavaScript
10 lines
3.7 KiB
JavaScript
var N={exports:{}},z={};/**
|
|
* @license React
|
|
* scheduler.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/(function(l){function g(e,a){var n=e.length;e.push(a);e:for(;0<n;){var u=n-1>>>1,t=e[u];if(0<m(t,a))e[u]=a,e[n]=t,n=u;else break e}}function s(e){return e.length===0?null:e[0]}function _(e){if(e.length===0)return null;var a=e[0],n=e.pop();if(n!==a){e[0]=n;e:for(var u=0,t=e.length,P=t>>>1;u<P;){var T=2*(u+1)-1,U=e[T],o=T+1,C=e[o];if(0>m(U,n))o<t&&0>m(C,U)?(e[u]=C,e[o]=n,u=o):(e[u]=U,e[T]=n,u=T);else if(o<t&&0>m(C,n))e[u]=C,e[o]=n,u=o;else break e}}return a}function m(e,a){var n=e.sortIndex-a.sortIndex;return n!==0?n:e.id-a.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var A=performance;l.unstable_now=function(){return A.now()}}else{var j=Date,G=j.now();l.unstable_now=function(){return j.now()-G}}var c=[],i=[],J=1,f=null,r=3,H=!1,d=!1,y=!1,S=!1,q=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function w(e){for(var a=s(i);a!==null;){if(a.callback===null)_(i);else if(a.startTime<=e)_(i),a.sortIndex=a.expirationTime,g(c,a);else break;a=s(i)}}function D(e){if(y=!1,w(e),!d)if(s(c)!==null)d=!0,b||(b=!0,v());else{var a=s(i);a!==null&&R(D,a.startTime-e)}}var b=!1,k=-1,Y=5,B=-1;function E(){return S?!0:!(l.unstable_now()-B<Y)}function I(){if(S=!1,b){var e=l.unstable_now();B=e;var a=!0;try{e:{d=!1,y&&(y=!1,F(k),k=-1),H=!0;var n=r;try{n:{for(w(e),f=s(c);f!==null&&!(f.expirationTime>e&&E());){var u=f.callback;if(typeof u=="function"){f.callback=null,r=f.priorityLevel;var t=u(f.expirationTime<=e);if(e=l.unstable_now(),typeof t=="function"){f.callback=t,w(e),a=!0;break n}f===s(c)&&_(c),w(e)}else _(c);f=s(c)}if(f!==null)a=!0;else{var P=s(i);P!==null&&R(D,P.startTime-e),a=!1}}break e}finally{f=null,r=n,H=!1}a=void 0}}finally{a?v():b=!1}}}var v;if(typeof Q=="function")v=function(){Q(I)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,K=M.port2;M.port1.onmessage=I,v=function(){K.postMessage(null)}}else v=function(){q(I,0)};function R(e,a){k=q(function(){e(l.unstable_now())},a)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(e){e.callback=null},l.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<e?Math.floor(1e3/e):5},l.unstable_getCurrentPriorityLevel=function(){return r},l.unstable_next=function(e){switch(r){case 1:case 2:case 3:var a=3;break;default:a=r}var n=r;r=a;try{return e()}finally{r=n}},l.unstable_requestPaint=function(){S=!0},l.unstable_runWithPriority=function(e,a){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=r;r=e;try{return a()}finally{r=n}},l.unstable_scheduleCallback=function(e,a,n){var u=l.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?u+n:u):n=u,e){case 1:var t=-1;break;case 2:t=250;break;case 5:t=1073741823;break;case 4:t=1e4;break;default:t=5e3}return t=n+t,e={id:J++,callback:a,priorityLevel:e,startTime:n,expirationTime:t,sortIndex:-1},n>u?(e.sortIndex=n,g(i,e),s(c)===null&&e===s(i)&&(y?(F(k),k=-1):y=!0,R(D,n-u))):(e.sortIndex=t,g(c,e),d||H||(d=!0,b||(b=!0,v()))),e},l.unstable_shouldYield=E,l.unstable_wrapCallback=function(e){var a=r;return function(){var n=r;r=a;try{return e.apply(this,arguments)}finally{r=n}}}})(z);N.exports=z;var O=N.exports;export{O as s};
|