async-array-buffer
Advanced tools
Comparing version 4.0.35 to 4.0.36
@@ -1,2 +0,2 @@ | ||
export declare const worker = "(()=>{var e={834:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},640:(e,t,r)=>{var n=r(834);e.exports=function(e){if(Array.isArray(e))return n(e)}},942:e=>{e.exports=function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},841:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}},545:(e,t,r)=>{var n=r(640),o=r(942),a=r(798),i=r(841);e.exports=function(e){return n(e)||o(e)||a(e)||i()}},798:(e,t,r)=>{var n=r(834);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},775:function(e,t,r){!function(e,t,r,n){\"use strict\";function o(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var a=o(t),i=o(r),s=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return\"\".concat(r).concat(n)}return\"dashify\"===t?i.default(e):\"prependIndefiniteArticle\"===t?\"\".concat(s.default(e),\" \").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")},d=function(e,t){for(var r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var i={modifiers:[],name:o[1]};if(void 0!==o[3])for(var s=/\\.[^(]+\\(\\)/g,d=s.exec(o[2]);null!==d;)i.modifiers.push(d[0].slice(1,-2)),d=s.exec(o[2]);n.push(i),o=r.exec(e)}var f=n.reduce((function(e,r){return e.map((function(e){return\"string\"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[u(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return f.reduce((function(t,r){return[].concat(a.default(t),\"string\"==typeof r?[r]:[r(e)])}),[]).join(\"\")}},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:d(e.code,t),n=void 0===e.message?void 0:d(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},i=a.cause,s=a.missingParameters,u=void 0===n?new Error:new Error(n(s));return null!==i&&(u.cause=i),void 0!==r&&(u.code=r(s)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=f,Object.defineProperty(e,\"__esModule\",{value:!0})}(t,r(545),r(881),r(507))},881:e=>{\"use strict\";e.exports=(e,t)=>{if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(e=>/[\u00C0-\u017E]/.test(e)?e:\"-\")).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(e=>t&&t.condense?\"-\":e)).toLowerCase()}},107:function(e,t){!function(e){\"use strict\";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,i=function(e,t){return function(r){var i=t.get(r),s=void 0===i?r.size:i<a?i+1:0;if(!r.has(s))return e(r,s);if(r.size<o){for(;r.has(s);)s=Math.floor(Math.random()*a);return e(r,s)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(s);)s=Math.floor(Math.random()*n);return e(r,s)}},s=new WeakMap,u=r(s),c=i(u,s),d=t(c);e.addUniqueNumber=d,e.generateUniqueNumber=c,Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),a=[\"honest\",\"hour\",\"hono\"];for(t in a)if(0==o.indexOf(a[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var i=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<i.length;t++)if(o.match(i[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(()=>{\"use strict\";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called \"${method}\" is not supported.',status:o}),i=(0,e.compile)({message:'The handler of the method called \"${method}\" returned no required result.',status:t}),s=(0,e.compile)({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:n});var c=r(107);const d=new Map,f=(e,t,r)=>({...t,connect:({port:r})=>{r.start();const n=e(r,t),o=(0,c.generateUniqueNumber)(d);return d.set(o,(()=>{n(),r.close(),d.delete(o)})),{result:o}},disconnect:({portId:e})=>{const t=d.get(e);if(void 0===t)throw u({portId:e.toString()});return t(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),l=(e,t,r=(()=>!0))=>{const n=f(l,t,r),o=((e,t)=>async({data:{id:r,method:n,params:o}})=>{const u=t[n];try{if(void 0===u)throw a({method:n});const t=void 0===o?u():u(o);if(void 0===t)throw i({method:n});const c=t instanceof Promise?await t:t;if(null===r){if(void 0!==c.result)throw s({method:n})}else{if(void 0===c.result)throw s({method:n});const{result:t,transferables:o=[]}=c;e.postMessage({id:r,result:t},o)}}catch(t){const{message:n,status:o=-32603}=t;e.postMessage({error:{code:o,message:n},id:r})}})(e,n);return e.addEventListener(\"message\",o),()=>e.removeEventListener(\"message\",o)};l(self,{allocate:({length:e})=>{const t=(e=>new ArrayBuffer(e))(e);return{result:t,transferables:[t]}},deallocate:()=>({result:void 0})})})()})();"; | ||
export declare const worker = "(()=>{var e={682:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0},33:(e,t,r)=>{var n=r(682);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},487:e=>{e.exports=function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},392:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.default=e.exports,e.exports.__esModule=!0},603:(e,t,r)=>{var n=r(33),o=r(487),a=r(20),s=r(392);e.exports=function(e){return n(e)||o(e)||a(e)||s()},e.exports.default=e.exports,e.exports.__esModule=!0},20:(e,t,r)=>{var n=r(682);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},775:function(e,t,r){!function(e,t,r,n){\"use strict\";function o(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var a=o(t),s=o(r),i=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return\"\".concat(r).concat(n)}return\"dashify\"===t?s.default(e):\"prependIndefiniteArticle\"===t?\"\".concat(i.default(e),\" \").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")},d=function(e,t){for(var r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var s={modifiers:[],name:o[1]};if(void 0!==o[3])for(var i=/\\.[^(]+\\(\\)/g,d=i.exec(o[2]);null!==d;)s.modifiers.push(d[0].slice(1,-2)),d=i.exec(o[2]);n.push(s),o=r.exec(e)}var l=n.reduce((function(e,r){return e.map((function(e){return\"string\"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[u(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return l.reduce((function(t,r){return[].concat(a.default(t),\"string\"==typeof r?[r]:[r(e)])}),[]).join(\"\")}},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:d(e.code,t),n=void 0===e.message?void 0:d(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},s=a.cause,i=a.missingParameters,u=void 0===n?new Error:new Error(n(i));return null!==s&&(u.cause=s),void 0!==r&&(u.code=r(i)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=l,Object.defineProperty(e,\"__esModule\",{value:!0})}(t,r(603),r(881),r(507))},881:e=>{\"use strict\";e.exports=(e,t)=>{if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(e=>/[\u00C0-\u017E]/.test(e)?e:\"-\")).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(e=>t&&t.condense?\"-\":e)).toLowerCase()}},107:function(e,t){!function(e){\"use strict\";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,s=function(e,t){return function(r){var s=t.get(r),i=void 0===s?r.size:s<a?s+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*a);return e(r,i)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,u=r(i),c=s(u,i),d=t(c);e.addUniqueNumber=d,e.generateUniqueNumber=c,Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),a=[\"honest\",\"hour\",\"hono\"];for(t in a)if(0==o.indexOf(a[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var s=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<s.length;t++)if(o.match(s[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(()=>{\"use strict\";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called \"${method}\" is not supported.',status:o}),s=(0,e.compile)({message:'The handler of the method called \"${method}\" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:n});var c=r(107);const d=new Map,l=(e,t,r)=>({...t,connect:({port:r})=>{r.start();const n=e(r,t),o=(0,c.generateUniqueNumber)(d);return d.set(o,(()=>{n(),r.close(),d.delete(o)})),{result:o}},disconnect:({portId:e})=>{const t=d.get(e);if(void 0===t)throw u({portId:e.toString()});return t(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),f=(e,t,r=(()=>!0))=>{const n=l(f,t,r),o=((e,t)=>async({data:{id:r,method:n,params:o}})=>{const u=t[n];try{if(void 0===u)throw a({method:n});const t=void 0===o?u():u(o);if(void 0===t)throw s({method:n});const c=t instanceof Promise?await t:t;if(null===r){if(void 0!==c.result)throw i({method:n})}else{if(void 0===c.result)throw i({method:n});const{result:t,transferables:o=[]}=c;e.postMessage({id:r,result:t},o)}}catch(t){const{message:n,status:o=-32603}=t;e.postMessage({error:{code:o,message:n},id:r})}})(e,n);return e.addEventListener(\"message\",o),()=>e.removeEventListener(\"message\",o)};f(self,{allocate:({length:e})=>{const t=(e=>new ArrayBuffer(e))(e);return{result:t,transferables:[t]}},deallocate:()=>({result:void 0})})})()})();"; | ||
//# sourceMappingURL=worker.d.ts.map |
// This is the minified and stringified code of the async-array-buffer-worker package. | ||
export const worker = `(()=>{var e={834:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},640:(e,t,r)=>{var n=r(834);e.exports=function(e){if(Array.isArray(e))return n(e)}},942:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},841:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},545:(e,t,r)=>{var n=r(640),o=r(942),a=r(798),i=r(841);e.exports=function(e){return n(e)||o(e)||a(e)||i()}},798:(e,t,r)=>{var n=r(834);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},775:function(e,t,r){!function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t),i=o(r),s=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return"".concat(r).concat(n)}return"dashify"===t?i.default(e):"prependIndefiniteArticle"===t?"".concat(s.default(e)," ").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},d=function(e,t){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var i={modifiers:[],name:o[1]};if(void 0!==o[3])for(var s=/\\.[^(]+\\(\\)/g,d=s.exec(o[2]);null!==d;)i.modifiers.push(d[0].slice(1,-2)),d=s.exec(o[2]);n.push(i),o=r.exec(e)}var f=n.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[u(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return f.reduce((function(t,r){return[].concat(a.default(t),"string"==typeof r?[r]:[r(e)])}),[]).join("")}},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:d(e.code,t),n=void 0===e.message?void 0:d(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},i=a.cause,s=a.missingParameters,u=void 0===n?new Error:new Error(n(s));return null!==i&&(u.cause=i),void 0!==r&&(u.code=r(s)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=f,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(545),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,i=function(e,t){return function(r){var i=t.get(r),s=void 0===i?r.size:i<a?i+1:0;if(!r.has(s))return e(r,s);if(r.size<o){for(;r.has(s);)s=Math.floor(Math.random()*a);return e(r,s)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(s);)s=Math.floor(Math.random()*n);return e(r,s)}},s=new WeakMap,u=r(s),c=i(u,s),d=t(c);e.addUniqueNumber=d,e.generateUniqueNumber=c,Object.defineProperty(e,"__esModule",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),a=["honest","hour","hono"];for(t in a)if(0==o.indexOf(a[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var i=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<i.length;t++)if(o.match(i[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),s=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n});var c=r(107);const d=new Map,f=(e,t,r)=>({...t,connect:({port:r})=>{r.start();const n=e(r,t),o=(0,c.generateUniqueNumber)(d);return d.set(o,(()=>{n(),r.close(),d.delete(o)})),{result:o}},disconnect:({portId:e})=>{const t=d.get(e);if(void 0===t)throw u({portId:e.toString()});return t(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),l=(e,t,r=(()=>!0))=>{const n=f(l,t,r),o=((e,t)=>async({data:{id:r,method:n,params:o}})=>{const u=t[n];try{if(void 0===u)throw a({method:n});const t=void 0===o?u():u(o);if(void 0===t)throw i({method:n});const c=t instanceof Promise?await t:t;if(null===r){if(void 0!==c.result)throw s({method:n})}else{if(void 0===c.result)throw s({method:n});const{result:t,transferables:o=[]}=c;e.postMessage({id:r,result:t},o)}}catch(t){const{message:n,status:o=-32603}=t;e.postMessage({error:{code:o,message:n},id:r})}})(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)};l(self,{allocate:({length:e})=>{const t=(e=>new ArrayBuffer(e))(e);return{result:t,transferables:[t]}},deallocate:()=>({result:void 0})})})()})();`; // tslint:disable-line:max-line-length | ||
export const worker = `(()=>{var e={682:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0},33:(e,t,r)=>{var n=r(682);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},487:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},392:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},603:(e,t,r)=>{var n=r(33),o=r(487),a=r(20),s=r(392);e.exports=function(e){return n(e)||o(e)||a(e)||s()},e.exports.default=e.exports,e.exports.__esModule=!0},20:(e,t,r)=>{var n=r(682);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},775:function(e,t,r){!function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t),s=o(r),i=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return"".concat(r).concat(n)}return"dashify"===t?s.default(e):"prependIndefiniteArticle"===t?"".concat(i.default(e)," ").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},d=function(e,t){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var s={modifiers:[],name:o[1]};if(void 0!==o[3])for(var i=/\\.[^(]+\\(\\)/g,d=i.exec(o[2]);null!==d;)s.modifiers.push(d[0].slice(1,-2)),d=i.exec(o[2]);n.push(s),o=r.exec(e)}var l=n.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[u(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return l.reduce((function(t,r){return[].concat(a.default(t),"string"==typeof r?[r]:[r(e)])}),[]).join("")}},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:d(e.code,t),n=void 0===e.message?void 0:d(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},s=a.cause,i=a.missingParameters,u=void 0===n?new Error:new Error(n(i));return null!==s&&(u.cause=s),void 0!==r&&(u.code=r(i)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=l,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(603),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,s=function(e,t){return function(r){var s=t.get(r),i=void 0===s?r.size:s<a?s+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*a);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,u=r(i),c=s(u,i),d=t(c);e.addUniqueNumber=d,e.generateUniqueNumber=c,Object.defineProperty(e,"__esModule",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),a=["honest","hour","hono"];for(t in a)if(0==o.indexOf(a[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var s=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<s.length;t++)if(o.match(s[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),s=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n});var c=r(107);const d=new Map,l=(e,t,r)=>({...t,connect:({port:r})=>{r.start();const n=e(r,t),o=(0,c.generateUniqueNumber)(d);return d.set(o,(()=>{n(),r.close(),d.delete(o)})),{result:o}},disconnect:({portId:e})=>{const t=d.get(e);if(void 0===t)throw u({portId:e.toString()});return t(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),f=(e,t,r=(()=>!0))=>{const n=l(f,t,r),o=((e,t)=>async({data:{id:r,method:n,params:o}})=>{const u=t[n];try{if(void 0===u)throw a({method:n});const t=void 0===o?u():u(o);if(void 0===t)throw s({method:n});const c=t instanceof Promise?await t:t;if(null===r){if(void 0!==c.result)throw i({method:n})}else{if(void 0===c.result)throw i({method:n});const{result:t,transferables:o=[]}=c;e.postMessage({id:r,result:t},o)}}catch(t){const{message:n,status:o=-32603}=t;e.postMessage({error:{code:o,message:n},id:r})}})(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)};f(self,{allocate:({length:e})=>{const t=(e=>new ArrayBuffer(e))(e);return{result:t,transferables:[t]}},deallocate:()=>({result:void 0})})})()})();`; // tslint:disable-line:max-line-length | ||
//# sourceMappingURL=worker.js.map |
@@ -8,3 +8,3 @@ (function (global, factory) { | ||
// This is the minified and stringified code of the async-array-buffer-worker package. | ||
var worker = "(()=>{var t={228:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},646:(t,e,r)=>{var n=r(228);t.exports=function(t){if(Array.isArray(t))return n(t)}},926: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)}))}}},713:t=>{t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},860:t=>{t.exports=function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},206:t=>{t.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}},319:(t,e,r)=>{var n=r(646),o=r(860),i=r(379),a=r(206);t.exports=function(t){return n(t)||o(t)||i(t)||a()}},379:(t,e,r)=>{var n=r(228);t.exports=function(t,e){if(t){if(\"string\"==typeof t)return n(t,e);var r=Object.prototype.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}}},757:(t,e,r)=>{t.exports=r(666)},582:function(t,e,r){!function(t){\"use strict\";var e=function(t){return new ArrayBuffer(t)};t.createWorker(self,{allocate:function(t){var r=t.length,n=e(r);return{result:n,transferables:[n]}},deallocate:function(){return{result:void 0}}})}(r(868))},881:t=>{\"use strict\";t.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"expected a string\");return t.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(function(t){return/[\xC0-\u017E]/.test(t)?t:\"-\"})).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(function(t){return e&&e.condense?\"-\":t})).toLowerCase()}},404:function(t,e,r){!function(t,e,r,n){\"use strict\";function o(t){return t&&\"object\"==typeof t&&\"default\"in t?t:{default:t}}var i=o(e),a=o(r),u=o(n),c=function(t,e){return void 0===e?t:e.reduce((function(t,e){if(\"capitalize\"===e){var r=t.charAt(0).toUpperCase(),n=t.slice(1);return\"\".concat(r).concat(n)}return\"dashify\"===e?a.default(t):\"prependIndefiniteArticle\"===e?\"\".concat(u.default(t),\" \").concat(t):t}),t)},s=function(t){var e=t.name+t.modifiers.map((function(t){return\"\\\\.\".concat(t,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(e,\"}\"),\"g\")},f=function(t,e){for(var r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(t);null!==o;){var a={modifiers:[],name:o[1]};if(void 0!==o[3])for(var u=/\\.[^(]+\\(\\)/g,f=u.exec(o[2]);null!==f;)a.modifiers.push(f[0].slice(1,-2)),f=u.exec(o[2]);n.push(a),o=r.exec(t)}var l=n.reduce((function(t,r){return t.map((function(t){return\"string\"==typeof t?t.split(s(r)).reduce((function(t,n,o){return 0===o?[n]:r.name in e?[].concat(i.default(t),[c(e[r.name],r.modifiers),n]):[].concat(i.default(t),[function(t){return c(t[r.name],r.modifiers)},n])}),[]):[t]})).reduce((function(t,e){return[].concat(i.default(t),i.default(e))}),[])}),[t]);return function(t){return l.reduce((function(e,r){return[].concat(i.default(e),\"string\"==typeof r?[r]:[r(t)])}),[]).join(\"\")}},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===t.code?void 0:f(t.code,e),n=void 0===t.message?void 0:f(t.message,e);function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,i=void 0===o&&(e instanceof Error||void 0!==e.code&&\"Exception\"===e.code.slice(-9))?{cause:e,missingParameters:{}}:{cause:o,missingParameters:e},a=i.cause,u=i.missingParameters,c=void 0===n?new Error:new Error(n(u));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(u)),void 0!==t.status&&(c.status=t.status),c}return o};t.compile=l,Object.defineProperty(t,\"__esModule\",{value:!0})}(e,r(319),r(881),r(932))},650: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,Object.defineProperty(t,\"__esModule\",{value:!0})}(e)},932:t=>{var e=function(t){var e,r,n=/\\w+/.exec(t);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),i=[\"honest\",\"hour\",\"hono\"];for(e in i)if(0==o.indexOf(i[e]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(e=0;e<a.length;e++)if(o.match(a[e]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==t.exports?t.exports=e:window.indefiniteArticle=e},666:t=>{var e=function(t){\"use strict\";var e,r=Object.prototype,n=r.hasOwnProperty,o=\"function\"==typeof Symbol?Symbol:{},i=o.iterator||\"@@iterator\",a=o.asyncIterator||\"@@asyncIterator\",u=o.toStringTag||\"@@toStringTag\";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},\"\")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new A(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===d)throw new Error(\"Generator is already running\");if(n===p){if(\"throw\"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=j(a,r);if(u){if(u===v)continue;return u}}if(\"next\"===r.method)r.sent=r._sent=r.arg;else if(\"throw\"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else\"return\"===r.method&&r.abrupt(\"return\",r.arg);n=d;var c=f(t,e,r);if(\"normal\"===c.type){if(n=r.done?p:h,c.arg===v)continue;return{value:c.arg,done:r.done}}\"throw\"===c.type&&(n=p,r.method=\"throw\",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}t.wrap=s;var l=\"suspendedStart\",h=\"suspendedYield\",d=\"executing\",p=\"completed\",v={};function m(){}function y(){}function g(){}var w={};w[i]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(P([])));x&&x!==r&&n.call(x,i)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(t){[\"next\",\"throw\",\"return\"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if(\"throw\"!==c.type){var s=c.arg,l=s.value;return l&&\"object\"==typeof l&&n.call(l,\"__await\")?e.resolve(l.__await).then((function(t){r(\"next\",t,a,u)}),(function(t){r(\"throw\",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r(\"throw\",t,a,u)}))}u(c.arg)}var o;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()}}function j(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,\"throw\"===r.method){if(t.iterator.return&&(r.method=\"return\",r.arg=e,j(t,r),\"throw\"===r.method))return v;r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return v}var o=f(n,t.iterator,r.arg);if(\"throw\"===o.type)return r.method=\"throw\",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=e),r.delegate=null,v):i:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,v)}function _(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 N(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(_,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return y.prototype=O.constructor=g,g.constructor=y,y.displayName=c(g,u,\"GeneratorFunction\"),t.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===y||\"GeneratorFunction\"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,\"GeneratorFunction\")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},E(L.prototype),L.prototype[a]=function(){return this},t.AsyncIterator=L,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new L(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(O),c(O,u,\"Generator\"),O[i]=function(){return this},O.toString=function(){return\"[object Generator]\"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,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(N),!t)for(var r in this)\"t\"===r.charAt(0)&&n.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 o(n,o){return u.type=\"throw\",u.arg=t,r.next=n,o&&(r.method=\"next\",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if(\"root\"===a.tryLoc)return o(\"end\");if(a.tryLoc<=this.prev){var c=n.call(a,\"catchLoc\"),s=n.call(a,\"finallyLoc\");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error(\"try statement without catch or finally\");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,\"finallyLoc\")&&this.prev<o.finallyLoc){var i=o;break}}i&&(\"break\"===t||\"continue\"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method=\"next\",this.next=i.finallyLoc,v):this.complete(a)},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),v},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),N(r),v}},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;N(r)}return o}}throw new Error(\"illegal catch attempt\")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function(\"r\",\"regeneratorRuntime = r\")(e)}},868:function(t,e,r){!function(t,e,r,n,o,i){\"use strict\";function a(t){return t&&\"object\"==typeof t&&\"default\"in t?t:{default:t}}var u=a(e),c=a(r),s=a(o),f={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},l=n.compile({message:'The requested method called \"${method}\" is not supported.',status:f.METHOD_NOT_FOUND}),h=n.compile({message:'The handler of the method called \"${method}\" returned no required result.',status:f.INTERNAL_ERROR}),d=n.compile({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:f.INTERNAL_ERROR}),p=n.compile({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:f.INVALID_PARAMS}),v=function(t,e){return function(){var r=c.default(u.default.mark((function r(n){var o,i,a,c,s,f,p,v,m,y,g,w,b;return u.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=n.data,i=o.id,a=o.method,c=o.params,s=e[a],r.prev=2,void 0!==s){r.next=5;break}throw l({method:a});case 5:if(void 0!==(f=void 0===c?s():s(c))){r.next=8;break}throw h({method:a});case 8:if(!(f instanceof Promise)){r.next=14;break}return r.next=11,f;case 11:r.t0=r.sent,r.next=15;break;case 14:r.t0=f;case 15:if(p=r.t0,null!==i){r.next=21;break}if(void 0===p.result){r.next=19;break}throw d({method:a});case 19:r.next=25;break;case 21:if(void 0!==p.result){r.next=23;break}throw d({method:a});case 23:v=p.result,m=p.transferables,y=void 0===m?[]:m,t.postMessage({id:i,result:v},y);case 25:r.next=31;break;case 27:r.prev=27,r.t1=r.catch(2),g=r.t1.message,w=r.t1.status,b=void 0===w?-32603:w,t.postMessage({error:{code:b,message:g},id:i});case 31:case\"end\":return r.stop()}}),r,null,[[2,27]])})));return function(t){return r.apply(this,arguments)}}()},m=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 y(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 g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){s.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var w=new Map,b=function(t,e,r){return g(g({},e),{},{connect:function(r){var n=r.port;n.start();var o=t(n,e),a=i.generateUniqueNumber(w);return w.set(a,(function(){o(),n.close(),w.delete(a)})),{result:a}},disconnect:function(t){var e=t.portId,r=w.get(e);if(void 0===r)throw p({portId:e.toString()});return r(),{result:null}},isSupported:function(){var t=c.default(u.default.mark((function t(){var e,n;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m();case 2:if(!t.sent){t.next=14;break}if(!((e=r())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 e(){return t.apply(this,arguments)}return e}()})},x=function t(e,r){var n=b(t,r,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),o=v(e,n);return e.addEventListener(\"message\",o),function(){return e.removeEventListener(\"message\",o)}};t.createWorker=x,t.isSupported=m,Object.defineProperty(t,\"__esModule\",{value:!0})}(e,r(757),r(926),r(404),r(713),r(650))}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.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(582)})()})();"; // tslint:disable-line:max-line-length | ||
var worker = "(()=>{var e={774:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0},962:(e,t,r)=>{var n=r(774);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},477:e=>{function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,\"next\",e)}function c(e){t(a,o,i,u,c,\"throw\",e)}u(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},862:e=>{e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},190:e=>{e.exports=function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},709:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.default=e.exports,e.exports.__esModule=!0},93:(e,t,r)=>{var n=r(962),o=r(190),i=r(470),a=r(709);e.exports=function(e){return n(e)||o(e)||i(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},470:(e,t,r)=>{var n=r(774);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},757:(e,t,r)=>{e.exports=r(666)},582:function(e,t,r){!function(e){\"use strict\";var t=function(e){return new ArrayBuffer(e)};e.createWorker(self,{allocate:function(e){var r=e.length,n=t(r);return{result:n,transferables:[n]}},deallocate:function(){return{result:void 0}}})}(r(868))},881:e=>{\"use strict\";e.exports=function(e,t){if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(function(e){return/[\xC0-\u017E]/.test(e)?e:\"-\"})).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(function(e){return t&&t.condense?\"-\":e})).toLowerCase()}},404:function(e,t,r){!function(e,t,r,n){\"use strict\";function o(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var i=o(t),a=o(r),u=o(n),c=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return\"\".concat(r).concat(n)}return\"dashify\"===t?a.default(e):\"prependIndefiniteArticle\"===t?\"\".concat(u.default(e),\" \").concat(e):e}),e)},s=function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")},f=function(e,t){for(var r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var a={modifiers:[],name:o[1]};if(void 0!==o[3])for(var u=/\\.[^(]+\\(\\)/g,f=u.exec(o[2]);null!==f;)a.modifiers.push(f[0].slice(1,-2)),f=u.exec(o[2]);n.push(a),o=r.exec(e)}var l=n.reduce((function(e,r){return e.map((function(e){return\"string\"==typeof e?e.split(s(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(i.default(e),[c(t[r.name],r.modifiers),n]):[].concat(i.default(e),[function(e){return c(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(i.default(e),i.default(t))}),[])}),[e]);return function(e){return l.reduce((function(t,r){return[].concat(i.default(t),\"string\"==typeof r?[r]:[r(e)])}),[]).join(\"\")}},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:f(e.code,t),n=void 0===e.message?void 0:f(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,i=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=i.cause,u=i.missingParameters,c=void 0===n?new Error:new Error(n(u));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(u)),void 0!==e.status&&(c.status=e.status),c}return o};e.compile=l,Object.defineProperty(e,\"__esModule\",{value:!0})}(t,r(93),r(881),r(932))},650:function(e,t){!function(e){\"use strict\";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,i=2*o,a=function(e,t){return function(r){var a=t.get(r),u=void 0===a?r.size:a<i?a+1:0;if(!r.has(u))return e(r,u);if(r.size<o){for(;r.has(u);)u=Math.floor(Math.random()*i);return e(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 e(r,u)}},u=new WeakMap,c=r(u),s=a(c,u),f=t(s);e.addUniqueNumber=f,e.generateUniqueNumber=s,Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},932:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),i=[\"honest\",\"hour\",\"hono\"];for(t in i)if(0==o.indexOf(i[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},666:e=>{var t=function(e){\"use strict\";var t,r=Object.prototype,n=r.hasOwnProperty,o=\"function\"==typeof Symbol?Symbol:{},i=o.iterator||\"@@iterator\",a=o.asyncIterator||\"@@asyncIterator\",u=o.toStringTag||\"@@toStringTag\";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},\"\")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(e,t,r){var n=l;return function(o,i){if(n===d)throw new Error(\"Generator is already running\");if(n===h){if(\"throw\"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=L(a,r);if(u){if(u===v)continue;return u}}if(\"next\"===r.method)r.sent=r._sent=r.arg;else if(\"throw\"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else\"return\"===r.method&&r.abrupt(\"return\",r.arg);n=d;var c=f(e,t,r);if(\"normal\"===c.type){if(n=r.done?h:p,c.arg===v)continue;return{value:c.arg,done:r.done}}\"throw\"===c.type&&(n=h,r.method=\"throw\",r.arg=c.arg)}}}(e,r,a),i}function f(e,t,r){try{return{type:\"normal\",arg:e.call(t,r)}}catch(e){return{type:\"throw\",arg:e}}}e.wrap=s;var l=\"suspendedStart\",p=\"suspendedYield\",d=\"executing\",h=\"completed\",v={};function m(){}function y(){}function g(){}var x={};x[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(A([])));b&&b!==r&&n.call(b,i)&&(x=b);var O=g.prototype=m.prototype=Object.create(x);function _(e){[\"next\",\"throw\",\"return\"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if(\"throw\"!==c.type){var s=c.arg,l=s.value;return l&&\"object\"==typeof l&&n.call(l,\"__await\")?t.resolve(l.__await).then((function(e){r(\"next\",e,a,u)}),(function(e){r(\"throw\",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return r(\"throw\",e,a,u)}))}u(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function L(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,\"throw\"===r.method){if(e.iterator.return&&(r.method=\"return\",r.arg=t,L(e,r),\"throw\"===r.method))return v;r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return v}var o=f(n,e.iterator,r.arg);if(\"throw\"===o.type)return r.method=\"throw\",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=t),r.delegate=null,v):i:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(j,this),this.reset(!0)}function A(e){if(e){var r=e[i];if(r)return r.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return y.prototype=O.constructor=g,g.constructor=y,y.displayName=c(g,u,\"GeneratorFunction\"),e.isGeneratorFunction=function(e){var t=\"function\"==typeof e&&e.constructor;return!!t&&(t===y||\"GeneratorFunction\"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,\"GeneratorFunction\")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},_(E.prototype),E.prototype[a]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(O),c(O,u,\"Generator\"),O[i]=function(){return this},O.toString=function(){return\"[object Generator]\"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=A,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)\"t\"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(\"throw\"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type=\"throw\",u.arg=e,r.next=n,o&&(r.method=\"next\",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if(\"root\"===a.tryLoc)return o(\"end\");if(a.tryLoc<=this.prev){var c=n.call(a,\"catchLoc\"),s=n.call(a,\"finallyLoc\");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error(\"try statement without catch or finally\");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,\"finallyLoc\")&&this.prev<o.finallyLoc){var i=o;break}}i&&(\"break\"===e||\"continue\"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method=\"next\",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if(\"throw\"===e.type)throw e.arg;return\"break\"===e.type||\"continue\"===e.type?this.next=e.arg:\"return\"===e.type?(this.rval=this.arg=e.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if(\"throw\"===n.type){var o=n.arg;M(r)}return o}}throw new Error(\"illegal catch attempt\")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function(\"r\",\"regeneratorRuntime = r\")(t)}},868:function(e,t,r){!function(e,t,r,n,o,i){\"use strict\";function a(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var u=a(t),c=a(r),s=a(o),f={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},l=n.compile({message:'The requested method called \"${method}\" is not supported.',status:f.METHOD_NOT_FOUND}),p=n.compile({message:'The handler of the method called \"${method}\" returned no required result.',status:f.INTERNAL_ERROR}),d=n.compile({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:f.INTERNAL_ERROR}),h=n.compile({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:f.INVALID_PARAMS}),v=function(e,t){return function(){var r=u.default(c.default.mark((function r(n){var o,i,a,u,s,f,h,v,m,y,g,x,w;return c.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=n.data,i=o.id,a=o.method,u=o.params,s=t[a],r.prev=2,void 0!==s){r.next=5;break}throw l({method:a});case 5:if(void 0!==(f=void 0===u?s():s(u))){r.next=8;break}throw p({method:a});case 8:if(!(f instanceof Promise)){r.next=14;break}return r.next=11,f;case 11:r.t0=r.sent,r.next=15;break;case 14:r.t0=f;case 15:if(h=r.t0,null!==i){r.next=21;break}if(void 0===h.result){r.next=19;break}throw d({method:a});case 19:r.next=25;break;case 21:if(void 0!==h.result){r.next=23;break}throw d({method:a});case 23:v=h.result,m=h.transferables,y=void 0===m?[]:m,e.postMessage({id:i,result:v},y);case 25:r.next=31;break;case 27:r.prev=27,r.t1=r.catch(2),g=r.t1.message,x=r.t1.status,w=void 0===x?-32603:x,e.postMessage({error:{code:w,message:g},id:i});case 31:case\"end\":return r.stop()}}),r,null,[[2,27]])})));return function(e){return r.apply(this,arguments)}}()},m=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){s.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=new Map,w=function(e,t,r){return g(g({},t),{},{connect:function(r){var n=r.port;n.start();var o=e(n,t),a=i.generateUniqueNumber(x);return x.set(a,(function(){o(),n.close(),x.delete(a)})),{result:a}},disconnect:function(e){var t=e.portId,r=x.get(t);if(void 0===r)throw h({portId:t.toString()});return r(),{result:null}},isSupported:function(){var e=u.default(c.default.mark((function e(){var t,n;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m();case 2:if(!e.sent){e.next=14;break}if(!((t=r())instanceof Promise)){e.next=11;break}return e.next=8,t;case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=t;case 12:return n=e.t0,e.abrupt(\"return\",{result:n});case 14:return e.abrupt(\"return\",{result:!1});case 15:case\"end\":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()})},b=function e(t,r){var n=w(e,r,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),o=v(t,n);return t.addEventListener(\"message\",o),function(){return t.removeEventListener(\"message\",o)}};e.createWorker=b,e.isSupported=m,Object.defineProperty(e,\"__esModule\",{value:!0})}(t,r(477),r(757),r(404),r(862),r(650))}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(582)})()})();"; // tslint:disable-line:max-line-length | ||
@@ -11,0 +11,0 @@ var blob = new Blob([worker], { |
@@ -12,5 +12,5 @@ { | ||
"dependencies": { | ||
"@babel/runtime": "^7.12.18", | ||
"async-array-buffer-broker": "^4.0.31", | ||
"async-array-buffer-worker": "^6.0.32", | ||
"@babel/runtime": "^7.13.6", | ||
"async-array-buffer-broker": "^4.0.32", | ||
"async-array-buffer-worker": "^6.0.33", | ||
"tslib": "^2.1.0" | ||
@@ -20,10 +20,10 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "^7.12.17", | ||
"@babel/core": "^7.13.1", | ||
"@babel/plugin-external-helpers": "^7.12.13", | ||
"@babel/plugin-transform-runtime": "^7.12.17", | ||
"@babel/preset-env": "^7.12.17", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-angular": "^11.0.0", | ||
"@babel/plugin-transform-runtime": "^7.13.6", | ||
"@babel/preset-env": "^7.13.5", | ||
"@commitlint/cli": "^12.0.0", | ||
"@commitlint/config-angular": "^12.0.0", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-replace": "^2.3.4", | ||
"@rollup/plugin-replace": "^2.4.1", | ||
"babel-loader": "^8.2.2", | ||
@@ -38,3 +38,3 @@ "chai": "^4.3.0", | ||
"grunt-contrib-clean": "^2.0.0", | ||
"grunt-replace": "^1.0.1", | ||
"grunt-replace": "^2.0.0", | ||
"grunt-sh": "^0.2.0", | ||
@@ -56,3 +56,3 @@ "grunt-webpack": "^4.0.2", | ||
"pretty-quick": "^3.1.0", | ||
"rollup": "^2.39.0", | ||
"rollup": "^2.39.1", | ||
"sinon": "^9.2.4", | ||
@@ -64,5 +64,5 @@ "sinon-chai": "^3.5.0", | ||
"tslint": "^6.1.3", | ||
"tslint-config-holy-grail": "^53.2.3", | ||
"tslint-config-holy-grail": "^53.2.4", | ||
"typescript": "^4.1.5", | ||
"webpack": "^5.23.0" | ||
"webpack": "^5.24.0" | ||
}, | ||
@@ -94,3 +94,3 @@ "files": [ | ||
"types": "build/es2019/module.d.ts", | ||
"version": "4.0.35" | ||
"version": "4.0.36" | ||
} |
// This is the minified and stringified code of the async-array-buffer-worker package. | ||
export const worker = `(()=>{var e={834:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},640:(e,t,r)=>{var n=r(834);e.exports=function(e){if(Array.isArray(e))return n(e)}},942:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},841:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},545:(e,t,r)=>{var n=r(640),o=r(942),a=r(798),i=r(841);e.exports=function(e){return n(e)||o(e)||a(e)||i()}},798:(e,t,r)=>{var n=r(834);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},775:function(e,t,r){!function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t),i=o(r),s=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return"".concat(r).concat(n)}return"dashify"===t?i.default(e):"prependIndefiniteArticle"===t?"".concat(s.default(e)," ").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},d=function(e,t){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var i={modifiers:[],name:o[1]};if(void 0!==o[3])for(var s=/\\.[^(]+\\(\\)/g,d=s.exec(o[2]);null!==d;)i.modifiers.push(d[0].slice(1,-2)),d=s.exec(o[2]);n.push(i),o=r.exec(e)}var f=n.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[u(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return f.reduce((function(t,r){return[].concat(a.default(t),"string"==typeof r?[r]:[r(e)])}),[]).join("")}},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:d(e.code,t),n=void 0===e.message?void 0:d(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},i=a.cause,s=a.missingParameters,u=void 0===n?new Error:new Error(n(s));return null!==i&&(u.cause=i),void 0!==r&&(u.code=r(s)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=f,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(545),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,i=function(e,t){return function(r){var i=t.get(r),s=void 0===i?r.size:i<a?i+1:0;if(!r.has(s))return e(r,s);if(r.size<o){for(;r.has(s);)s=Math.floor(Math.random()*a);return e(r,s)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(s);)s=Math.floor(Math.random()*n);return e(r,s)}},s=new WeakMap,u=r(s),c=i(u,s),d=t(c);e.addUniqueNumber=d,e.generateUniqueNumber=c,Object.defineProperty(e,"__esModule",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),a=["honest","hour","hono"];for(t in a)if(0==o.indexOf(a[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var i=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<i.length;t++)if(o.match(i[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),s=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n});var c=r(107);const d=new Map,f=(e,t,r)=>({...t,connect:({port:r})=>{r.start();const n=e(r,t),o=(0,c.generateUniqueNumber)(d);return d.set(o,(()=>{n(),r.close(),d.delete(o)})),{result:o}},disconnect:({portId:e})=>{const t=d.get(e);if(void 0===t)throw u({portId:e.toString()});return t(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),l=(e,t,r=(()=>!0))=>{const n=f(l,t,r),o=((e,t)=>async({data:{id:r,method:n,params:o}})=>{const u=t[n];try{if(void 0===u)throw a({method:n});const t=void 0===o?u():u(o);if(void 0===t)throw i({method:n});const c=t instanceof Promise?await t:t;if(null===r){if(void 0!==c.result)throw s({method:n})}else{if(void 0===c.result)throw s({method:n});const{result:t,transferables:o=[]}=c;e.postMessage({id:r,result:t},o)}}catch(t){const{message:n,status:o=-32603}=t;e.postMessage({error:{code:o,message:n},id:r})}})(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)};l(self,{allocate:({length:e})=>{const t=(e=>new ArrayBuffer(e))(e);return{result:t,transferables:[t]}},deallocate:()=>({result:void 0})})})()})();`; // tslint:disable-line:max-line-length | ||
export const worker = `(()=>{var e={682:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0},33:(e,t,r)=>{var n=r(682);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},487:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},392:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},603:(e,t,r)=>{var n=r(33),o=r(487),a=r(20),s=r(392);e.exports=function(e){return n(e)||o(e)||a(e)||s()},e.exports.default=e.exports,e.exports.__esModule=!0},20:(e,t,r)=>{var n=r(682);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},775:function(e,t,r){!function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t),s=o(r),i=o(n),u=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var r=e.charAt(0).toUpperCase(),n=e.slice(1);return"".concat(r).concat(n)}return"dashify"===t?s.default(e):"prependIndefiniteArticle"===t?"".concat(i.default(e)," ").concat(e):e}),e)},c=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},d=function(e,t){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[],o=r.exec(e);null!==o;){var s={modifiers:[],name:o[1]};if(void 0!==o[3])for(var i=/\\.[^(]+\\(\\)/g,d=i.exec(o[2]);null!==d;)s.modifiers.push(d[0].slice(1,-2)),d=i.exec(o[2]);n.push(s),o=r.exec(e)}var l=n.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(c(r)).reduce((function(e,n,o){return 0===o?[n]:r.name in t?[].concat(a.default(e),[u(t[r.name],r.modifiers),n]):[].concat(a.default(e),[function(e){return u(e[r.name],r.modifiers)},n])}),[]):[e]})).reduce((function(e,t){return[].concat(a.default(e),a.default(t))}),[])}),[e]);return function(e){return l.reduce((function(t,r){return[].concat(a.default(t),"string"==typeof r?[r]:[r(e)])}),[]).join("")}},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:d(e.code,t),n=void 0===e.message?void 0:d(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},s=a.cause,i=a.missingParameters,u=void 0===n?new Error:new Error(n(i));return null!==s&&(u.cause=s),void 0!==r&&(u.code=r(i)),void 0!==e.status&&(u.status=e.status),u}return o};e.compile=l,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(603),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,s=function(e,t){return function(r){var s=t.get(r),i=void 0===s?r.size:s<a?s+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*a);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,u=r(i),c=s(u,i),d=t(c);e.addUniqueNumber=d,e.generateUniqueNumber=c,Object.defineProperty(e,"__esModule",{value:!0})}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),a=["honest","hour","hono"];for(t in a)if(0==o.indexOf(a[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var s=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<s.length;t++)if(o.match(s[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,a=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),s=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),u=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n});var c=r(107);const d=new Map,l=(e,t,r)=>({...t,connect:({port:r})=>{r.start();const n=e(r,t),o=(0,c.generateUniqueNumber)(d);return d.set(o,(()=>{n(),r.close(),d.delete(o)})),{result:o}},disconnect:({portId:e})=>{const t=d.get(e);if(void 0===t)throw u({portId:e.toString()});return t(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=({data:t})=>e(null!==t),n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),f=(e,t,r=(()=>!0))=>{const n=l(f,t,r),o=((e,t)=>async({data:{id:r,method:n,params:o}})=>{const u=t[n];try{if(void 0===u)throw a({method:n});const t=void 0===o?u():u(o);if(void 0===t)throw s({method:n});const c=t instanceof Promise?await t:t;if(null===r){if(void 0!==c.result)throw i({method:n})}else{if(void 0===c.result)throw i({method:n});const{result:t,transferables:o=[]}=c;e.postMessage({id:r,result:t},o)}}catch(t){const{message:n,status:o=-32603}=t;e.postMessage({error:{code:o,message:n},id:r})}})(e,n);return e.addEventListener("message",o),()=>e.removeEventListener("message",o)};f(self,{allocate:({length:e})=>{const t=(e=>new ArrayBuffer(e))(e);return{result:t,transferables:[t]}},deallocate:()=>({result:void 0})})})()})();`; // tslint:disable-line:max-line-length |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
47285
205
1