worker-timers 8.0.19 → 8.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/es5/bundle.js +1 -1
  2. package/package.json +23 -25
@@ -24,7 +24,7 @@
24
24
  };
25
25
 
26
26
  // This is the minified and stringified code of the worker-timers-worker package.
27
- var worker = "(()=>{var t={45:(t,e,r)=>{var n=r(738).default;t.exports=function(t,e){if(\"object\"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||\"default\");if(\"object\"!=n(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},79:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},122:(t,e,r)=>{var n=r(79);t.exports=function(t,e){if(t){if(\"string\"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},156:t=>{t.exports=function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}},t.exports.__esModule=!0,t.exports.default=t.exports},293:t=>{function e(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,\"next\",t)}function c(t){e(a,o,i,u,c,\"throw\",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},389:function(t,e){!function(t){\"use strict\";var e=function(t){return function(e){var r=t(e);return e.add(r),r}},r=function(t){return function(e,r){return t.set(e,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,i=2*o,a=function(t,e){return function(r){var a=e.get(r),u=void 0===a?r.size:a<i?a+1:0;if(!r.has(u))return t(r,u);if(r.size<o){for(;r.has(u);)u=Math.floor(Math.random()*i);return t(r,u)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(u);)u=Math.floor(Math.random()*n);return t(r,u)}},u=new WeakMap,c=r(u),s=a(c,u),f=e(s);t.addUniqueNumber=f,t.generateUniqueNumber=s}(e)},472:function(t,e,r){!function(t,e,r,n){\"use strict\";var o=function(t){return function(e){var r=t.get(e);if(void 0===r)return Promise.resolve(!1);var o=n(r,2),i=o[0],a=o[1];return clearTimeout(i),t.delete(e),a(!1),Promise.resolve(!0)}},i=function(t,e,r){return function(n,o,i){var a=t(n,o),u=a.expected,c=a.remainingDelay;return new Promise((function(t){e.set(i,[setTimeout(r,c,u,e,t,i),t])}))}},a=function(t,e){var r=performance.now(),n=t+e-r-performance.timeOrigin;return{expected:r+n,remainingDelay:n}},u=function(t,e,r,n){var o=t-performance.now();o>0?e.set(n,[setTimeout(u,o,t,e,r,n),r]):(e.delete(n),r(!0))},c=new Map,s=o(c),f=new Map,l=o(f),p=i(a,c,u),h=i(a,f,u);r.createWorker(self,{clear:function(){var r=t(e.mark((function t(r){var n,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.timerId,o=r.timerType,t.next=3,\"interval\"===o?s(n):l(n);case 3:return t.t0=t.sent,t.abrupt(\"return\",{result:t.t0});case 5:case\"end\":return t.stop()}}),t)})));function n(t){return r.apply(this,arguments)}return n}(),set:function(){var r=t(e.mark((function t(r){var n,o,i,a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.delay,o=r.now,i=r.timerId,a=r.timerType,t.next=3,(\"interval\"===a?p:h)(n,o,i);case 3:return t.t0=t.sent,t.abrupt(\"return\",{result:t.t0});case 5:case\"end\":return t.stop()}}),t)})));function n(t){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},623:function(t,e,r){!function(t,e,r,n,o){\"use strict\";var i={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(t,e){return Object.assign(new Error(t),{status:e})},u=function(t){return a('The requested method called \"'.concat(t,'\" is not supported.'),i.METHOD_NOT_FOUND)},c=function(t){return a('The handler of the method called \"'.concat(t,'\" returned no required result.'),i.INTERNAL_ERROR)},s=function(t){return a('The handler of the method called \"'.concat(t,'\" returned an unexpected result.'),i.INTERNAL_ERROR)},f=function(t){return a('The specified parameter called \"portId\" with the given value \"'.concat(t,'\" does not identify a port connected to this worker.'),i.INVALID_PARAMS)},l=function(t,n){return function(){var o=e(r.mark((function e(o){var i,a,f,l,p,h,d,v,y,m,x,g,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=o.data,a=i.id,f=i.method,l=i.params,p=n[f],e.prev=2,void 0!==p){e.next=5;break}throw u(f);case 5:if(void 0!==(h=void 0===l?p():p(l))){e.next=8;break}throw c(f);case 8:if(!(h instanceof Promise)){e.next=14;break}return e.next=11,h;case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=h;case 15:if(d=e.t0,null!==a){e.next=21;break}if(void 0===d.result){e.next=19;break}throw s(f);case 19:e.next=25;break;case 21:if(void 0!==d.result){e.next=23;break}throw s(f);case 23:v=d.result,y=d.transferables,m=void 0===y?[]:y,t.postMessage({id:a,result:v},m);case 25:e.next=31;break;case 27:e.prev=27,e.t1=e.catch(2),x=e.t1.message,g=e.t1.status,b=void 0===g?-32603:g,t.postMessage({error:{code:b,message:x},id:a});case 31:case\"end\":return e.stop()}}),e,null,[[2,27]])})));return function(t){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(t){var e=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(e){var r=e.data;return t(null!==r)},o.postMessage(e,[e])}))};function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var v=new Map,y=function(t,n,i){return d(d({},n),{},{connect:function(e){var r=e.port;r.start();var i=t(r,n),a=o.generateUniqueNumber(v);return v.set(a,(function(){i(),r.close(),v.delete(a)})),{result:a}},disconnect:function(t){var e=t.portId,r=v.get(e);if(void 0===r)throw f(e);return r(),{result:null}},isSupported:function(){var t=e(r.mark((function t(){var e,n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p();case 2:if(!t.sent){t.next=14;break}if(!((e=i())instanceof Promise)){t.next=11;break}return t.next=8,e;case 8:t.t0=t.sent,t.next=12;break;case 11:t.t0=e;case 12:return n=t.t0,t.abrupt(\"return\",{result:n});case 14:return t.abrupt(\"return\",{result:!1});case 15:case\"end\":return t.stop()}}),t)})));function n(){return t.apply(this,arguments)}return n}()})},m=function(t,e){var r=y(m,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(t,r);return t.addEventListener(\"message\",n),function(){return t.removeEventListener(\"message\",n)}};t.createWorker=m,t.isSupported=p}(e,r(293),r(756),r(693),r(389))},633:(t,e,r)=>{var n=r(738).default;function o(){\"use strict\";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},c=\"function\"==typeof Symbol?Symbol:{},s=c.iterator||\"@@iterator\",f=c.asyncIterator||\"@@asyncIterator\",l=c.toStringTag||\"@@toStringTag\";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},\"\")}catch(e){p=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),a=new A(n||[]);return u(i,\"_invoke\",{value:k(t,r,a)}),i}function d(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}r.wrap=h;var v=\"suspendedStart\",y=\"suspendedYield\",m=\"executing\",x=\"completed\",g={};function b(){}function w(){}function _(){}var O={};p(O,s,(function(){return this}));var E=Object.getPrototypeOf,j=E&&E(E(I([])));j&&j!==i&&a.call(j,s)&&(O=j);var L=_.prototype=b.prototype=Object.create(O);function M(t){[\"next\",\"throw\",\"return\"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,u,c){var s=d(t[o],t,i);if(\"throw\"!==s.type){var f=s.arg,l=f.value;return l&&\"object\"==n(l)&&a.call(l,\"__await\")?e.resolve(l.__await).then((function(t){r(\"next\",t,u,c)}),(function(t){r(\"throw\",t,u,c)})):e.resolve(l).then((function(t){f.value=t,u(f)}),(function(t){return r(\"throw\",t,u,c)}))}c(s.arg)}var o;u(this,\"_invoke\",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=v;return function(i,a){if(o===m)throw Error(\"Generator is already running\");if(o===x){if(\"throw\"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=N(u,n);if(c){if(c===g)continue;return c}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(o===v)throw o=x,n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);o=m;var s=d(t,r,n);if(\"normal\"===s.type){if(o=n.done?x:y,s.arg===g)continue;return{value:s.arg,done:n.done}}\"throw\"===s.type&&(o=x,n.method=\"throw\",n.arg=s.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,\"throw\"===n&&t.iterator.return&&(r.method=\"return\",r.arg=e,N(t,r),\"throw\"===r.method)||\"return\"!==n&&(r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a '\"+n+\"' method\")),g;var i=d(o,t.iterator,r.arg);if(\"throw\"===i.type)return r.method=\"throw\",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=e),r.delegate=null,g):a:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(T,this),this.reset(!0)}function I(t){if(t||\"\"===t){var r=t[s];if(r)return r.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+\" is not iterable\")}return w.prototype=_,u(L,\"constructor\",{value:_,configurable:!0}),u(_,\"constructor\",{value:w,configurable:!0}),w.displayName=p(_,l,\"GeneratorFunction\"),r.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===w||\"GeneratorFunction\"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,p(t,l,\"GeneratorFunction\")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},M(P.prototype),p(P.prototype,f,(function(){return this})),r.AsyncIterator=P,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new P(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},M(L),p(L,l,\"Generator\"),p(L,s,(function(){return this})),p(L,\"toString\",(function(){return\"[object Generator]\"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=I,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)\"t\"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(\"throw\"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type=\"throw\",u.arg=t,r.next=n,o&&(r.method=\"next\",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if(\"root\"===i.tryLoc)return n(\"end\");if(i.tryLoc<=this.prev){var c=a.call(i,\"catchLoc\"),s=a.call(i,\"finallyLoc\");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error(\"try statement without catch or finally\");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,\"finallyLoc\")&&this.prev<n.finallyLoc){var o=n;break}}o&&(\"break\"===t||\"continue\"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method=\"next\",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if(\"throw\"===t.type)throw t.arg;return\"break\"===t.type||\"continue\"===t.type?this.next=t.arg:\"return\"===t.type?(this.rval=this.arg=t.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if(\"throw\"===n.type){var o=n.arg;S(r)}return o}}throw Error(\"illegal catch attempt\")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},693:(t,e,r)=>{var n=r(736);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},715:(t,e,r)=>{var n=r(987),o=r(156),i=r(122),a=r(752);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},736:(t,e,r)=>{var n=r(738).default,o=r(45);t.exports=function(t){var e=o(t,\"string\");return\"symbol\"==n(e)?e:e+\"\"},t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(r){return t.exports=e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},752:t=>{t.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},t.exports.__esModule=!0,t.exports.default=t.exports},756:(t,e,r)=>{var n=r(633)();t.exports=n;try{regeneratorRuntime=n}catch(t){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=n:Function(\"r\",\"regeneratorRuntime = r\")(n)}},987:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\"use strict\";r(472)})()})();"; // tslint:disable-line:max-line-length
27
+ var worker = "(()=>{var t={45:(t,e,r)=>{var n=r(738).default;t.exports=function(t,e){if(\"object\"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||\"default\");if(\"object\"!=n(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},79:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},122:(t,e,r)=>{var n=r(79);t.exports=function(t,e){if(t){if(\"string\"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},156:t=>{t.exports=function(t,e){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}},t.exports.__esModule=!0,t.exports.default=t.exports},293:t=>{function e(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,s,\"next\",t)}function s(t){e(a,o,i,u,s,\"throw\",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},389:function(t,e){!function(t){\"use strict\";var e=function(t){return function(e){var r=t(e);return e.add(r),r}},r=function(t){return function(e,r){return t.set(e,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,i=2*o,a=function(t,e){return function(r){var a=e.get(r),u=void 0===a?r.size:a<i?a+1:0;if(!r.has(u))return t(r,u);if(r.size<o){for(;r.has(u);)u=Math.floor(Math.random()*i);return t(r,u)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(u);)u=Math.floor(Math.random()*n);return t(r,u)}},u=new WeakMap,s=r(u),c=a(s,u),f=e(c);t.addUniqueNumber=f,t.generateUniqueNumber=c}(e)},472:function(t,e,r){!function(t,e,r,n){\"use strict\";var o=function(t){return function(e){var r=t.get(e);if(void 0===r)return Promise.resolve(!1);var o=n(r,2),i=o[0],a=o[1];return clearTimeout(i),t.delete(e),a(!1),Promise.resolve(!0)}},i=function(t,e,r){return function(n,o,i){var a=t(n,o),u=a.expected,s=a.remainingDelay;return new Promise((function(t){e.set(i,[setTimeout(r,s,u,e,t,i),t])}))}},a=function(t,e){var r=performance.now(),n=t+e-r-performance.timeOrigin;return{expected:r+n,remainingDelay:n}},u=function(t,e,r,n){var o=t-performance.now();o>0?e.set(n,[setTimeout(u,o,t,e,r,n),r]):(e.delete(n),r(!0))},s=new Map,c=o(s),f=new Map,l=o(f),p=i(a,s,u),h=i(a,f,u);r.createWorker(self,{clear:function(){var r=t(e.mark((function t(r){var n,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.timerId,o=r.timerType,t.next=3,\"interval\"===o?c(n):l(n);case 3:return t.t0=t.sent,t.abrupt(\"return\",{result:t.t0});case 5:case\"end\":return t.stop()}}),t)})));function n(t){return r.apply(this,arguments)}return n}(),set:function(){var r=t(e.mark((function t(r){var n,o,i,a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.delay,o=r.now,i=r.timerId,a=r.timerType,t.next=3,(\"interval\"===a?p:h)(n,o,i);case 3:return t.t0=t.sent,t.abrupt(\"return\",{result:t.t0});case 5:case\"end\":return t.stop()}}),t)})));function n(t){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},623:function(t,e,r){!function(t,e,r,n,o){\"use strict\";var i={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(t,e){return Object.assign(new Error(t),{status:e})},u=function(t){return a('The requested method called \"'.concat(t,'\" is not supported.'),i.METHOD_NOT_FOUND)},s=function(t){return a('The handler of the method called \"'.concat(t,'\" returned no required result.'),i.INTERNAL_ERROR)},c=function(t){return a('The handler of the method called \"'.concat(t,'\" returned an unexpected result.'),i.INTERNAL_ERROR)},f=function(t){return a('The specified parameter called \"portId\" with the given value \"'.concat(t,'\" does not identify a port connected to this worker.'),i.INVALID_PARAMS)},l=function(t,n){return function(){var o=e(r.mark((function e(o){var i,a,f,l,p,h,d,v,y,m,x,g,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=o.data,a=i.id,f=i.method,l=i.params,p=n[f],e.prev=2,void 0!==p){e.next=5;break}throw u(f);case 5:if(void 0!==(h=void 0===l?p():p(l))){e.next=8;break}throw s(f);case 8:if(!(h instanceof Promise)){e.next=14;break}return e.next=11,h;case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=h;case 15:if(d=e.t0,null!==a){e.next=21;break}if(void 0===d.result){e.next=19;break}throw c(f);case 19:e.next=25;break;case 21:if(void 0!==d.result){e.next=23;break}throw c(f);case 23:v=d.result,y=d.transferables,m=void 0===y?[]:y,t.postMessage({id:a,result:v},m);case 25:e.next=31;break;case 27:e.prev=27,e.t1=e.catch(2),x=e.t1.message,g=e.t1.status,b=void 0===g?-32603:g,t.postMessage({error:{code:b,message:x},id:a});case 31:case\"end\":return e.stop()}}),e,null,[[2,27]])})));return function(t){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(t){var e=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(e){var r=e.data;return t(null!==r)},o.postMessage(e,[e])}))};function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var v=new Map,y=function(t,n,i){return d(d({},n),{},{connect:function(e){var r=e.port;r.start();var i=t(r,n),a=o.generateUniqueNumber(v);return v.set(a,(function(){i(),r.close(),v.delete(a)})),{result:a}},disconnect:function(t){var e=t.portId,r=v.get(e);if(void 0===r)throw f(e);return r(),{result:null}},isSupported:function(){var t=e(r.mark((function t(){var e,n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p();case 2:if(!t.sent){t.next=14;break}if(!((e=i())instanceof Promise)){t.next=11;break}return t.next=8,e;case 8:t.t0=t.sent,t.next=12;break;case 11:t.t0=e;case 12:return n=t.t0,t.abrupt(\"return\",{result:n});case 14:return t.abrupt(\"return\",{result:!1});case 15:case\"end\":return t.stop()}}),t)})));function n(){return t.apply(this,arguments)}return n}()})},m=function(t,e){var r=y(m,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(t,r);return t.addEventListener(\"message\",n),function(){return t.removeEventListener(\"message\",n)}};t.createWorker=m,t.isSupported=p}(e,r(293),r(756),r(693),r(389))},633:(t,e,r)=>{var n=r(738).default;function o(){\"use strict\";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},i=Object.prototype,a=i.hasOwnProperty,u=\"function\"==typeof Symbol?Symbol:{},s=u.iterator||\"@@iterator\",c=u.asyncIterator||\"@@asyncIterator\",f=u.toStringTag||\"@@toStringTag\";function l(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{l({},\"\")}catch(e){l=function(t,e,r){return t[e]=r}}function p(t,r,n,o){var i=r&&r.prototype instanceof v?r:v,a=Object.create(i.prototype);return l(a,\"_invoke\",function(t,r,n){var o=1;return function(i,a){if(3===o)throw Error(\"Generator is already running\");if(4===o){if(\"throw\"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=E(u,n);if(s){if(s===d)continue;return s}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);o=3;var c=h(t,r,n);if(\"normal\"===c.type){if(o=n.done?4:2,c.arg===d)continue;return{value:c.arg,done:n.done}}\"throw\"===c.type&&(o=4,n.method=\"throw\",n.arg=c.arg)}}}(t,n,new k(o||[])),!0),a}function h(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}r.wrap=p;var d={};function v(){}function y(){}function m(){}var x={};l(x,s,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(P([])));b&&b!==i&&a.call(b,s)&&(x=b);var w=m.prototype=v.prototype=Object.create(x);function _(t){[\"next\",\"throw\",\"return\"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,u,s){var c=h(t[o],t,i);if(\"throw\"!==c.type){var f=c.arg,l=f.value;return l&&\"object\"==n(l)&&a.call(l,\"__await\")?e.resolve(l.__await).then((function(t){r(\"next\",t,u,s)}),(function(t){r(\"throw\",t,u,s)})):e.resolve(l).then((function(t){f.value=t,u(f)}),(function(t){return r(\"throw\",t,u,s)}))}s(c.arg)}var o;l(this,\"_invoke\",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(t,r){var n=r.method,o=t.i[n];if(o===e)return r.delegate=null,\"throw\"===n&&t.i.return&&(r.method=\"return\",r.arg=e,E(t,r),\"throw\"===r.method)||\"return\"!==n&&(r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a '\"+n+\"' method\")),d;var i=h(o,t.i,r.arg);if(\"throw\"===i.type)return r.method=\"throw\",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[t.r]=a.value,r.next=t.n,\"return\"!==r.method&&(r.method=\"next\",r.arg=e),r.delegate=null,d):a:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,d)}function j(t){this.tryEntries.push(t)}function M(t){var r=t[4]||{};r.type=\"normal\",r.arg=e,t[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(j,this),this.reset(!0)}function P(t){if(null!=t){var r=t[s];if(r)return r.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+\" is not iterable\")}return y.prototype=m,l(w,\"constructor\",m),l(m,\"constructor\",y),y.displayName=l(m,f,\"GeneratorFunction\"),r.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===y||\"GeneratorFunction\"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,f,\"GeneratorFunction\")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},_(O.prototype),l(O.prototype,c,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new O(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(w),l(w,f,\"Generator\"),l(w,s,(function(){return this})),l(w,\"toString\",(function(){return\"[object Generator]\"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},r.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=e,this.tryEntries.forEach(M),!t)for(var r in this)\"t\"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if(\"throw\"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(e){a.type=\"throw\",a.arg=t,r.next=e}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,s=i[1],c=i[2];if(-1===i[0])return n(\"end\"),!1;if(!s&&!c)throw Error(\"try statement without catch or finally\");if(null!=i[0]&&i[0]<=u){if(u<s)return this.method=\"next\",this.arg=e,n(s),!0;if(u<c)return n(c),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&(\"break\"===t||\"continue\"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method=\"next\",this.next=o[2],d):this.complete(i)},complete:function(t,e){if(\"throw\"===t.type)throw t.arg;return\"break\"===t.type||\"continue\"===t.type?this.next=t.arg:\"return\"===t.type?(this.rval=this.arg=t.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),M(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if(\"throw\"===n.type){var o=n.arg;M(r)}return o}}throw Error(\"illegal catch attempt\")},delegateYield:function(t,r,n){return this.delegate={i:P(t),r,n},\"next\"===this.method&&(this.arg=e),d}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},693:(t,e,r)=>{var n=r(736);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},715:(t,e,r)=>{var n=r(987),o=r(156),i=r(122),a=r(752);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},736:(t,e,r)=>{var n=r(738).default,o=r(45);t.exports=function(t){var e=o(t,\"string\");return\"symbol\"==n(e)?e:e+\"\"},t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(r){return t.exports=e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},752:t=>{t.exports=function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},t.exports.__esModule=!0,t.exports.default=t.exports},756:(t,e,r)=>{var n=r(633)();t.exports=n;try{regeneratorRuntime=n}catch(t){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=n:Function(\"r\",\"regeneratorRuntime = r\")(n)}},987:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{\"use strict\";r(472)})()})();"; // tslint:disable-line:max-line-length
28
28
 
29
29
  var loadOrReturnBroker = createLoadOrReturnBroker(workerTimersBroker.load, worker);
30
30
  var clearInterval = function clearInterval(timerId) {
package/package.json CHANGED
@@ -15,21 +15,21 @@
15
15
  }
16
16
  ],
17
17
  "dependencies": {
18
- "@babel/runtime": "^7.26.10",
18
+ "@babel/runtime": "^7.27.1",
19
19
  "tslib": "^2.8.1",
20
- "worker-timers-broker": "^8.0.5",
21
- "worker-timers-worker": "^9.0.5"
20
+ "worker-timers-broker": "^8.0.7",
21
+ "worker-timers-worker": "^9.0.7"
22
22
  },
23
23
  "description": "A replacement for setInterval() and setTimeout() which works in unfocused windows.",
24
24
  "devDependencies": {
25
- "@babel/cli": "^7.26.4",
26
- "@babel/core": "^7.26.10",
27
- "@babel/plugin-external-helpers": "^7.25.9",
28
- "@babel/plugin-transform-runtime": "^7.26.10",
29
- "@babel/preset-env": "^7.26.9",
30
- "@babel/register": "^7.25.9",
31
- "@commitlint/cli": "^19.8.0",
32
- "@commitlint/config-angular": "^19.8.0",
25
+ "@babel/cli": "^7.27.2",
26
+ "@babel/core": "^7.27.1",
27
+ "@babel/plugin-external-helpers": "^7.27.1",
28
+ "@babel/plugin-transform-runtime": "^7.27.1",
29
+ "@babel/preset-env": "^7.27.2",
30
+ "@babel/register": "^7.27.1",
31
+ "@commitlint/cli": "^19.8.1",
32
+ "@commitlint/config-angular": "^19.8.1",
33
33
  "@rollup/plugin-babel": "^6.0.4",
34
34
  "@rollup/plugin-replace": "^6.0.2",
35
35
  "babel-loader": "^10.0.0",
@@ -37,10 +37,7 @@
37
37
  "commitizen": "^4.3.1",
38
38
  "cz-conventional-changelog": "^3.3.0",
39
39
  "eslint": "^8.57.0",
40
- "eslint-config-holy-grail": "^60.0.25",
41
- "grunt": "^1.6.1",
42
- "grunt-cli": "^1.5.0",
43
- "grunt-sh": "^0.2.1",
40
+ "eslint-config-holy-grail": "^60.0.34",
44
41
  "husky": "^9.1.7",
45
42
  "karma": "^6.4.4",
46
43
  "karma-chrome-launcher": "^3.2.0",
@@ -50,13 +47,12 @@
50
47
  "karma-sinon-chai": "^2.0.2",
51
48
  "karma-webkit-launcher": "^2.6.0",
52
49
  "karma-webpack": "^5.0.1",
53
- "lint-staged": "^15.4.3",
54
- "load-grunt-config": "^4.0.1",
55
- "memfs": "^4.17.0",
56
- "mocha": "^11.1.0",
50
+ "lint-staged": "^15.5.0",
51
+ "memfs": "^4.17.1",
52
+ "mocha": "^11.2.2",
57
53
  "prettier": "^3.5.3",
58
54
  "rimraf": "^6.0.1",
59
- "rollup": "^4.35.0",
55
+ "rollup": "^4.40.2",
60
56
  "sinon": "^17.0.2",
61
57
  "sinon-chai": "^3.7.0",
62
58
  "terser-webpack-plugin": "^5.3.14",
@@ -64,8 +60,8 @@
64
60
  "tsconfig-holy-grail": "^15.0.2",
65
61
  "tslint": "^6.1.3",
66
62
  "tslint-config-holy-grail": "^56.0.6",
67
- "typescript": "^5.8.2",
68
- "webpack": "^5.98.0",
63
+ "typescript": "^5.8.3",
64
+ "webpack": "^5.99.8",
69
65
  "webpack-cli": "^6.0.1"
70
66
  },
71
67
  "files": [
@@ -94,13 +90,15 @@
94
90
  "scripts": {
95
91
  "build": "rimraf build/* && webpack --config config/webpack/worker-es2019.js && tsc --project src/tsconfig.json && rollup --config config/rollup/bundle.mjs && babel ./build/es2019 --config-file ./config/babel/build.json --out-dir ./build/node",
96
92
  "lint": "npm run lint:config && npm run lint:src && npm run lint:test",
97
- "lint:config": "eslint --config config/eslint/config.json --ext .js --report-unused-disable-directives config/",
93
+ "lint:config": "eslint --config config/eslint/config.json --ext .cjs --ext .js --ext .mjs --report-unused-disable-directives config/",
98
94
  "lint:src": "tslint --config config/tslint/src.json --project src/tsconfig.json src/*.ts src/**/*.ts",
99
95
  "lint:test": "eslint --config config/eslint/test.json --ext .js --report-unused-disable-directives test/",
100
96
  "prepare": "husky",
101
97
  "prepublishOnly": "npm run build",
102
- "test": "npm run lint && grunt test"
98
+ "test": "npm run lint && npm run build && npm run test:integration-browser && npm run test:integration-node",
99
+ "test:integration-browser": "if [ \"$TYPE\" = \"\" -o \"$TYPE\" = \"integration\" ] && [ \"$TARGET\" = \"\" -o \"$TARGET\" = \"chrome\" -o \"$TARGET\" = \"firefox\" -o \"$TARGET\" = \"safari\" ]; then karma start config/karma/config-integration.js --single-run; fi",
100
+ "test:integration-node": "if [ \"$TYPE\" = \"\" -o \"$TYPE\" = \"integration\" ] && [ \"$TARGET\" = \"\" -o \"$TARGET\" = \"node\" ]; then mocha --bail --parallel --recursive --require config/mocha/config-integration.js test/integration; fi"
103
101
  },
104
102
  "types": "build/es2019/module.d.ts",
105
- "version": "8.0.19"
103
+ "version": "8.0.21"
106
104
  }