P(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[o]=n,r=o):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[o]=n,r=o}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var N=[],z=[],O=1,M=null,R=3,I=!1,F=!1,D=!1;function L(e){for(var t=C(z);null!==t;){if(null===t.callback)_(z);else{if(!(t.startTime<=e))break;_(z),t.sortIndex=t.expirationTime,S(N,t)}t=C(z)}}function A(e){if(D=!1,L(e),!F)if(null!==C(N))F=!0,r(U);else{var t=C(z);null!==t&&l(A,t.startTime-e)}}function U(e,n){F=!1,D&&(D=!1,i()),I=!0;var r=R;try{for(L(n),M=C(N);null!==M&&(!(M.expirationTime>n)||e&&!a());){var o=M.callback;if(null!==o){M.callback=null,R=M.priorityLevel;var u=o(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?M.callback=u:M===C(N)&&_(N),L(n)}else _(N);M=C(N)}if(null!==M)var c=!0;else{var s=C(z);null!==s&&l(A,s.startTime-n),c=!1}return c}finally{M=null,R=r,I=!1}}function j(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||I||(F=!0,r(U))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return C(N)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var o=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0o?(e.sortIndex=u,S(z,e),null===C(N)&&e===C(z)&&(D?i():D=!0,l(A,u-o))):(e.sortIndex=a,S(N,e),F||I||(F=!0,r(U))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=C(N);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime