@demostf/parser-worker
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,1 +0,1 @@ | ||
self.webpackChunk([1],[,function(t,n,r){"use strict";(function(t){r.d(n,"u",(function(){return g})),r.d(n,"k",(function(){return b})),r.d(n,"m",(function(){return x})),r.d(n,"l",(function(){return j})),r.d(n,"j",(function(){return O})),r.d(n,"i",(function(){return A})),r.d(n,"r",(function(){return P})),r.d(n,"s",(function(){return q})),r.d(n,"o",(function(){return D})),r.d(n,"n",(function(){return E})),r.d(n,"q",(function(){return L})),r.d(n,"p",(function(){return M})),r.d(n,"t",(function(){return U})),r.d(n,"a",(function(){return I})),r.d(n,"b",(function(){return T})),r.d(n,"c",(function(){return C})),r.d(n,"e",(function(){return F})),r.d(n,"d",(function(){return z})),r.d(n,"f",(function(){return G})),r.d(n,"g",(function(){return H})),r.d(n,"h",(function(){return J}));var e=r(2);const u=new Array(32).fill(void 0);u.push(void 0,null,!0,!1);let i=u.length;function o(t){i===u.length&&u.push(u.length+1);const n=i;return i=u[n],u[n]=t,n}function c(t){return u[t]}function f(t){const n=c(t);return function(t){t<36||(u[t]=i,i=t)}(t),n}let s=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});s.decode();let a=new Uint8Array;function d(){return 0===a.byteLength&&(a=new Uint8Array(e.M.buffer)),a}function _(t,n){return s.decode(d().subarray(t,t+n))}function p(t,n){if(!(t instanceof n))throw new Error("expected instance of "+n.name);return t.ptr}let l=0;let y=32;let h=new Int32Array;function v(){return 0===h.byteLength&&(h=new Int32Array(e.M.buffer)),h}function g(t,n){try{const o=e.v(-16),c=function(t,n){const r=n(1*t.length);return d().set(t,r/1),l=t.length,r}(t,e.y),s=l;e.N(o,c,s,function(t){if(1==y)throw new Error("out of js stack");return u[--y]=t,y}(n));var r=v()[o/4+0],i=v()[o/4+1];if(v()[o/4+2])throw f(i);return I.__wrap(r)}finally{e.v(16),u[y++]=void 0}}function w(t,n){return d().subarray(t/1,t/1+n)}function b(t){try{const o=e.v(-16);p(t,I);var n=t.ptr;t.ptr=0,e.C(o,n);var r=v()[o/4+0],u=v()[o/4+1],i=w(r,u).slice();return e.x(r,1*u),i}finally{e.v(16)}}function x(t){try{const u=e.v(-16);p(t,I),e.E(u,t.ptr);var n=v()[u/4+0],r=v()[u/4+1];return _(n,r)}finally{e.v(16),e.x(n,r)}}let m=new Uint32Array;function k(t,n){return(0===m.byteLength&&(m=new Uint32Array(e.M.buffer)),m).subarray(t/4,t/4+n)}function j(t){try{const i=e.v(-16);p(t,I),e.D(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=k(n,r).slice();return e.x(n,4*r),u}finally{e.v(16)}}function O(t){try{const i=e.v(-16);p(t,I),e.B(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=w(n,r).slice();return e.x(n,1*r),u}finally{e.v(16)}}function A(t){try{const i=e.v(-16);p(t,I),e.A(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=w(n,r).slice();return e.x(n,1*r),u}finally{e.v(16)}}function P(t){try{const i=e.v(-16);p(t,I),e.J(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=w(n,r).slice();return e.x(n,1*r),u}finally{e.v(16)}}function q(t,n){try{const i=e.v(-16);p(t,I),e.K(i,t.ptr,n);var r=v()[i/4+0],u=v()[i/4+1];return _(r,u)}finally{e.v(16),e.x(r,u)}}function D(t,n){try{const i=e.v(-16);p(t,I),e.G(i,t.ptr,n);var r=v()[i/4+0],u=v()[i/4+1];return _(r,u)}finally{e.v(16),e.x(r,u)}}function E(t,n){p(t,I);return e.F(t.ptr,n)>>>0}function L(t,n){p(t,I);return e.I(t.ptr,n)}function M(t,n){try{const i=e.v(-16);p(t,I),e.H(i,t.ptr,n);var r=v()[i/4+0],u=v()[i/4+1];return _(r,u)}finally{e.v(16),e.x(r,u)}}function U(){e.L()}function B(t,n){try{return t.apply(this,n)}catch(t){e.w(o(t))}}class I{static __wrap(t){const n=Object.create(I.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();e.a(t)}get player_count(){return e.e(this.ptr)>>>0}set player_count(t){e.n(this.ptr,t)}get building_count(){return e.c(this.ptr)>>>0}set building_count(t){e.l(this.ptr,t)}get boundaries(){const t=e.b(this.ptr);return T.__wrap(t)}set boundaries(t){p(t,T);var n=t.ptr;t.ptr=0,e.k(this.ptr,n)}get interval_per_tick(){return e.d(this.ptr)}set interval_per_tick(t){e.m(this.ptr,t)}get tick_count(){return e.f(this.ptr)>>>0}set tick_count(t){e.o(this.ptr,t)}}class T{static __wrap(t){const n=Object.create(T.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();e.t(t)}get boundary_min(){const t=e.h(this.ptr);return C.__wrap(t)}set boundary_min(t){p(t,C);var n=t.ptr;t.ptr=0,e.q(this.ptr,n)}get boundary_max(){const t=e.g(this.ptr);return C.__wrap(t)}set boundary_max(t){p(t,C);var n=t.ptr;t.ptr=0,e.p(this.ptr,n)}}class C{static __wrap(t){const n=Object.create(C.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();e.u(t)}get x(){return e.i(this.ptr)}set x(t){e.r(this.ptr,t)}get y(){return e.j(this.ptr)}set y(t){e.s(this.ptr,t)}}function F(t){return o(t)}function z(){return B((function(t,n,r){return o(c(t).call(c(n),c(r)))}),arguments)}function G(t){f(t)}function H(t,n){return o(_(t,n))}function J(t,n){throw new Error(_(t,n))}}).call(this,r(3)(t))},function(t,n,r){"use strict";var e=r.w[t.i];t.exports=e;r(1);e.O()},function(t,n){t.exports=function(t){if(!t.webpackPolyfill){var n=Object.create(t);n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),Object.defineProperty(n,"exports",{enumerable:!0}),n.webpackPolyfill=1}return n}},function(t,n,r){"use strict";r.r(n);var e=r(2),u=r(1);r.d(n,"parse_demo",(function(){return u.u})),r.d(n,"get_data",(function(){return u.k})),r.d(n,"get_map",(function(){return u.m})),r.d(n,"get_kill_ticks",(function(){return u.l})),r.d(n,"get_attacker_ids",(function(){return u.j})),r.d(n,"get_assister_ids",(function(){return u.i})),r.d(n,"get_victim_ids",(function(){return u.r})),r.d(n,"get_weapon",(function(){return u.s})),r.d(n,"get_player_name",(function(){return u.o})),r.d(n,"get_player_entity_id",(function(){return u.n})),r.d(n,"get_player_user_id",(function(){return u.q})),r.d(n,"get_player_steam_id",(function(){return u.p})),r.d(n,"main_js",(function(){return u.t})),r.d(n,"FlatState",(function(){return u.a})),r.d(n,"WorldBoundaries",(function(){return u.b})),r.d(n,"XY",(function(){return u.c})),r.d(n,"__wbindgen_number_new",(function(){return u.e})),r.d(n,"__wbg_call_65af9f665ab6ade5",(function(){return u.d})),r.d(n,"__wbindgen_object_drop_ref",(function(){return u.f})),r.d(n,"__wbindgen_string_new",(function(){return u.g})),r.d(n,"__wbindgen_throw",(function(){return u.h})),e.z()}]); | ||
self.webpackChunk([1],[,function(t,n,r){"use strict";(function(t){r.d(n,"u",(function(){return g})),r.d(n,"k",(function(){return b})),r.d(n,"m",(function(){return x})),r.d(n,"l",(function(){return j})),r.d(n,"j",(function(){return O})),r.d(n,"i",(function(){return A})),r.d(n,"r",(function(){return P})),r.d(n,"s",(function(){return q})),r.d(n,"o",(function(){return D})),r.d(n,"n",(function(){return E})),r.d(n,"q",(function(){return L})),r.d(n,"p",(function(){return M})),r.d(n,"t",(function(){return U})),r.d(n,"a",(function(){return I})),r.d(n,"b",(function(){return T})),r.d(n,"c",(function(){return C})),r.d(n,"e",(function(){return F})),r.d(n,"d",(function(){return z})),r.d(n,"f",(function(){return G})),r.d(n,"g",(function(){return H})),r.d(n,"h",(function(){return J}));var e=r(2);const u=new Array(32).fill(void 0);u.push(void 0,null,!0,!1);let i=u.length;function o(t){i===u.length&&u.push(u.length+1);const n=i;return i=u[n],u[n]=t,n}function c(t){return u[t]}function f(t){const n=c(t);return function(t){t<36||(u[t]=i,i=t)}(t),n}let s=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});s.decode();let a=new Uint8Array;function d(){return 0===a.byteLength&&(a=new Uint8Array(e.M.buffer)),a}function _(t,n){return s.decode(d().subarray(t,t+n))}function p(t,n){if(!(t instanceof n))throw new Error("expected instance of "+n.name);return t.ptr}let l=0;let y=32;let h=new Int32Array;function v(){return 0===h.byteLength&&(h=new Int32Array(e.M.buffer)),h}function g(t,n){try{const o=e.v(-16),c=function(t,n){const r=n(1*t.length);return d().set(t,r/1),l=t.length,r}(t,e.y),s=l;e.N(o,c,s,function(t){if(1==y)throw new Error("out of js stack");return u[--y]=t,y}(n));var r=v()[o/4+0],i=v()[o/4+1];if(v()[o/4+2])throw f(i);return I.__wrap(r)}finally{e.v(16),u[y++]=void 0}}function w(t,n){return d().subarray(t/1,t/1+n)}function b(t){try{const o=e.v(-16);p(t,I);var n=t.ptr;t.ptr=0,e.C(o,n);var r=v()[o/4+0],u=v()[o/4+1],i=w(r,u).slice();return e.x(r,1*u),i}finally{e.v(16)}}function x(t){try{const u=e.v(-16);p(t,I),e.E(u,t.ptr);var n=v()[u/4+0],r=v()[u/4+1];return _(n,r)}finally{e.v(16),e.x(n,r)}}let m=new Uint32Array;function k(t,n){return(0===m.byteLength&&(m=new Uint32Array(e.M.buffer)),m).subarray(t/4,t/4+n)}function j(t){try{const i=e.v(-16);p(t,I),e.D(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=k(n,r).slice();return e.x(n,4*r),u}finally{e.v(16)}}function O(t){try{const i=e.v(-16);p(t,I),e.B(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=w(n,r).slice();return e.x(n,1*r),u}finally{e.v(16)}}function A(t){try{const i=e.v(-16);p(t,I),e.A(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=w(n,r).slice();return e.x(n,1*r),u}finally{e.v(16)}}function P(t){try{const i=e.v(-16);p(t,I),e.J(i,t.ptr);var n=v()[i/4+0],r=v()[i/4+1],u=w(n,r).slice();return e.x(n,1*r),u}finally{e.v(16)}}function q(t,n){try{const i=e.v(-16);p(t,I),e.K(i,t.ptr,n);var r=v()[i/4+0],u=v()[i/4+1];return _(r,u)}finally{e.v(16),e.x(r,u)}}function D(t,n){try{const i=e.v(-16);p(t,I),e.G(i,t.ptr,n);var r=v()[i/4+0],u=v()[i/4+1];return _(r,u)}finally{e.v(16),e.x(r,u)}}function E(t,n){p(t,I);return e.F(t.ptr,n)>>>0}function L(t,n){p(t,I);return e.I(t.ptr,n)}function M(t,n){try{const i=e.v(-16);p(t,I),e.H(i,t.ptr,n);var r=v()[i/4+0],u=v()[i/4+1];return _(r,u)}finally{e.v(16),e.x(r,u)}}function U(){e.L()}function B(t,n){try{return t.apply(this,n)}catch(t){e.w(o(t))}}class I{static __wrap(t){const n=Object.create(I.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();e.a(t)}get player_count(){return e.e(this.ptr)>>>0}set player_count(t){e.n(this.ptr,t)}get building_count(){return e.c(this.ptr)>>>0}set building_count(t){e.l(this.ptr,t)}get boundaries(){const t=e.b(this.ptr);return T.__wrap(t)}set boundaries(t){p(t,T);var n=t.ptr;t.ptr=0,e.k(this.ptr,n)}get interval_per_tick(){return e.d(this.ptr)}set interval_per_tick(t){e.m(this.ptr,t)}get tick_count(){return e.f(this.ptr)>>>0}set tick_count(t){e.o(this.ptr,t)}}class T{static __wrap(t){const n=Object.create(T.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();e.t(t)}get boundary_min(){const t=e.h(this.ptr);return C.__wrap(t)}set boundary_min(t){p(t,C);var n=t.ptr;t.ptr=0,e.q(this.ptr,n)}get boundary_max(){const t=e.g(this.ptr);return C.__wrap(t)}set boundary_max(t){p(t,C);var n=t.ptr;t.ptr=0,e.p(this.ptr,n)}}class C{static __wrap(t){const n=Object.create(C.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();e.u(t)}get x(){return e.i(this.ptr)}set x(t){e.r(this.ptr,t)}get y(){return e.j(this.ptr)}set y(t){e.s(this.ptr,t)}}function F(t){return o(t)}function z(){return B((function(t,n,r){return o(c(t).call(c(n),c(r)))}),arguments)}function G(t){f(t)}function H(t,n){return o(_(t,n))}function J(t,n){throw new Error(_(t,n))}}).call(this,r(3)(t))},function(t,n,r){"use strict";var e=r.w[t.i];t.exports=e;r(1);e.O()},function(t,n){t.exports=function(t){if(!t.webpackPolyfill){var n=Object.create(t);n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),Object.defineProperty(n,"exports",{enumerable:!0}),n.webpackPolyfill=1}return n}},function(t,n,r){"use strict";r.r(n);var e=r(2),u=r(1);r.d(n,"parse_demo",(function(){return u.u})),r.d(n,"get_data",(function(){return u.k})),r.d(n,"get_map",(function(){return u.m})),r.d(n,"get_kill_ticks",(function(){return u.l})),r.d(n,"get_attacker_ids",(function(){return u.j})),r.d(n,"get_assister_ids",(function(){return u.i})),r.d(n,"get_victim_ids",(function(){return u.r})),r.d(n,"get_weapon",(function(){return u.s})),r.d(n,"get_player_name",(function(){return u.o})),r.d(n,"get_player_entity_id",(function(){return u.n})),r.d(n,"get_player_user_id",(function(){return u.q})),r.d(n,"get_player_steam_id",(function(){return u.p})),r.d(n,"main_js",(function(){return u.t})),r.d(n,"FlatState",(function(){return u.a})),r.d(n,"WorldBoundaries",(function(){return u.b})),r.d(n,"XY",(function(){return u.c})),r.d(n,"__wbindgen_number_new",(function(){return u.e})),r.d(n,"__wbg_call_168da88779e35f61",(function(){return u.d})),r.d(n,"__wbindgen_object_drop_ref",(function(){return u.f})),r.d(n,"__wbindgen_string_new",(function(){return u.g})),r.d(n,"__wbindgen_throw",(function(){return u.h})),e.z()}]); |
@@ -1,1 +0,1 @@ | ||
!function(e,n){for(var t in n)e[t]=n[t]}(exports,function(e){self.webpackChunk=function(n,r){for(var i in r)e[i]=r[i];for(;n.length;)t[n.pop()]=1};var n={},t={0:1},r={};var i={2:function(){return{"./index_bg.js":{__wbindgen_number_new:function(e){return n[1].exports.e(e)},__wbg_call_65af9f665ab6ade5:function(e,t,r){return n[1].exports.d(e,t,r)},__wbindgen_object_drop_ref:function(e){return n[1].exports.f(e)},__wbindgen_string_new:function(e,t){return n[1].exports.g(e,t)},__wbindgen_throw:function(e,t){return n[1].exports.h(e,t)}}}}};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.e=function(e){var n=[];return n.push(Promise.resolve().then((function(){t[e]||importScripts(o.p+""+({}[e]||e)+".js")}))),({1:[2]}[e]||[]).forEach((function(e){var t=r[e];if(t)n.push(t);else{var u,a=i[e](),l=fetch(o.p+""+{2:"d324fd171cde3f29e9b0"}[e]+".module.wasm");if(a instanceof Promise&&"function"==typeof WebAssembly.compileStreaming)u=Promise.all([WebAssembly.compileStreaming(l),a]).then((function(e){return WebAssembly.instantiate(e[0],e[1])}));else if("function"==typeof WebAssembly.instantiateStreaming)u=WebAssembly.instantiateStreaming(l,a);else{u=l.then((function(e){return e.arrayBuffer()})).then((function(e){return WebAssembly.instantiate(e,a)}))}n.push(r[e]=u.then((function(n){return o.w[e]=(n.instance||n).exports})))}})),Promise.all(n)},o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o.w={},o(o.s=0)}([function(e,n,t){"use strict";t.r(n),t.d(n,"parseDemo",(function(){return l})),t.d(n,"ParsedDemo",(function(){return f})),t.d(n,"Class",(function(){return i})),t.d(n,"Team",(function(){return r})),t.d(n,"BuildingType",(function(){return o}));var r,i,o,u=function(e,n,t,r){return new(t||(t=Promise))((function(i,o){function u(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(u,a)}l((r=r.apply(e,n||[])).next())}))},a=function(e,n){var t,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(e,u)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function l(e,n){return u(this,void 0,void 0,(function(){var r,i,o,u,l,s,c,p,d,y,b,_,h,m,g,v;return a(this,(function(a){switch(a.label){case 0:return[4,t.e(1).then(t.bind(null,4))];case 1:for(r=a.sent(),i=r.parse_demo(e,n),o=i.player_count,u=i.building_count,l=i.boundaries,s=i.interval_per_tick,c=i.tick_count,p=r.get_kill_ticks(i),d=r.get_attacker_ids(i),y=r.get_assister_ids(i),b=r.get_victim_ids(i),_=[],m=0;m<o;m++)_.push({name:r.get_player_name(i,m),steamId:r.get_player_steam_id(i,m),entityId:r.get_player_entity_id(i,m),userId:r.get_player_user_id(i,m)});for(h=[],m=0;m<p.length;m++)h.push({tick:p[m],attacker:d[m],assister:y[m],victim:b[m],weapon:r.get_weapon(i,m)});return g=r.get_map(i),v=r.get_data(i),[2,new f(o,u,{boundary_min:{x:l.boundary_min.x,y:l.boundary_min.y},boundary_max:{x:l.boundary_max.x,y:l.boundary_max.y}},{map:g,interval_per_tick:s},v,h,_,c)]}}))}))}function s(e,n,t){return e/(Math.pow(2,16)-1)*(t-n)+n}function c(e){return 360*(e/(Math.pow(2,8)-1))}!function(e){e[e.Other=0]="Other",e[e.Spectator=1]="Spectator",e[e.Red=2]="Red",e[e.Blue=3]="Blue"}(r||(r={})),function(e){e[e.Other=0]="Other",e[e.Scout=1]="Scout",e[e.Sniper=2]="Sniper",e[e.Solder=3]="Solder",e[e.Demoman=4]="Demoman",e[e.Medic=5]="Medic",e[e.Heavy=6]="Heavy",e[e.Pyro=7]="Pyro",e[e.Spy=8]="Spy",e[e.Engineer=9]="Engineer"}(i||(i={})),function(e){e[e.TeleporterEntrance=0]="TeleporterEntrance",e[e.TeleporterExit=1]="TeleporterExit",e[e.Dispenser=2]="Dispenser",e[e.Level1Sentry=3]="Level1Sentry",e[e.Level2Sentry=4]="Level2Sentry",e[e.Level3Sentry=5]="Level3Sentry",e[e.MiniSentry=6]="MiniSentry",e[e.Unknown=7]="Unknown"}(o||(o={}));var f=function(){function e(e,n,t,r,i,o,u,a){this.playerCount=e,this.buildingCount=n,this.world=t,this.header=r,this.data=i,this.kills=o,this.playerInfo=u,this.tickCount=a}return e.prototype.getPlayer=function(e,n){if(n>=this.playerCount)throw new Error("Player out of bounds");var t=(n*this.tickCount+e)*p;return function(e,n,t,r){var i=s(e[n]+(e[n+1]<<8),t.boundary_min.x,t.boundary_max.x),o=s(e[n+2]+(e[n+3]<<8),t.boundary_min.y,t.boundary_max.y),u=e[n+4]+(e[n+5]<<8),a=c(e[n+6]),l=1013&u,f=u>>14,p=u>>10&15,d=e[n+7];return{position:{x:i,y:o},angle:a,health:l,team:f,playerClass:p,info:r,charge:d}}(this.data,t,this.world,this.playerInfo[n])},e.prototype.getBuilding=function(e,n){if(n>=this.buildingCount)throw new Error("Building out of bounds");var t=this.playerCount*this.tickCount*p+(n*this.tickCount+e)*d;return function(e,n,t){var i=s(e[n]+(e[n+1]<<8),t.boundary_min.x,t.boundary_max.x),o=s(e[n+2]+(e[n+3]<<8),t.boundary_min.y,t.boundary_max.y),u=e[n+4]+(e[n+5]<<8),a=c(e[n+6]),l=1013&u,f=0==(u>>13&1)?r.Blue:r.Red;return{position:{x:i,y:o},angle:a,health:l,team:f,buildingType:u>>10&7,level:u>>14}}(this.data,t,this.world)},e}(),p=8,d=7}])); | ||
!function(e,n){for(var t in n)e[t]=n[t]}(exports,function(e){self.webpackChunk=function(n,r){for(var i in r)e[i]=r[i];for(;n.length;)t[n.pop()]=1};var n={},t={0:1},r={};var i={2:function(){return{"./index_bg.js":{__wbindgen_number_new:function(e){return n[1].exports.e(e)},__wbg_call_168da88779e35f61:function(e,t,r){return n[1].exports.d(e,t,r)},__wbindgen_object_drop_ref:function(e){return n[1].exports.f(e)},__wbindgen_string_new:function(e,t){return n[1].exports.g(e,t)},__wbindgen_throw:function(e,t){return n[1].exports.h(e,t)}}}}};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.e=function(e){var n=[];return n.push(Promise.resolve().then((function(){t[e]||importScripts(o.p+""+({}[e]||e)+".js")}))),({1:[2]}[e]||[]).forEach((function(e){var t=r[e];if(t)n.push(t);else{var u,a=i[e](),l=fetch(o.p+""+{2:"9639ce2417486338c585"}[e]+".module.wasm");if(a instanceof Promise&&"function"==typeof WebAssembly.compileStreaming)u=Promise.all([WebAssembly.compileStreaming(l),a]).then((function(e){return WebAssembly.instantiate(e[0],e[1])}));else if("function"==typeof WebAssembly.instantiateStreaming)u=WebAssembly.instantiateStreaming(l,a);else{u=l.then((function(e){return e.arrayBuffer()})).then((function(e){return WebAssembly.instantiate(e,a)}))}n.push(r[e]=u.then((function(n){return o.w[e]=(n.instance||n).exports})))}})),Promise.all(n)},o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o.w={},o(o.s=0)}([function(e,n,t){"use strict";t.r(n),t.d(n,"parseDemo",(function(){return l})),t.d(n,"ParsedDemo",(function(){return f})),t.d(n,"Class",(function(){return i})),t.d(n,"Team",(function(){return r})),t.d(n,"BuildingType",(function(){return o}));var r,i,o,u=function(e,n,t,r){return new(t||(t=Promise))((function(i,o){function u(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(u,a)}l((r=r.apply(e,n||[])).next())}))},a=function(e,n){var t,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(e,u)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function l(e,n){return u(this,void 0,void 0,(function(){var r,i,o,u,l,c,s,p,y,d,b,_,h,m,g,v;return a(this,(function(a){switch(a.label){case 0:return[4,t.e(1).then(t.bind(null,4))];case 1:for(r=a.sent(),i=r.parse_demo(e,n),o=i.player_count,u=i.building_count,l=i.boundaries,c=i.interval_per_tick,s=i.tick_count,p=r.get_kill_ticks(i),y=r.get_attacker_ids(i),d=r.get_assister_ids(i),b=r.get_victim_ids(i),_=[],m=0;m<o;m++)_.push({name:r.get_player_name(i,m),steamId:r.get_player_steam_id(i,m),entityId:r.get_player_entity_id(i,m),userId:r.get_player_user_id(i,m)});for(h=[],m=0;m<p.length;m++)h.push({tick:p[m],attacker:y[m],assister:d[m],victim:b[m],weapon:r.get_weapon(i,m)});return g=r.get_map(i),v=r.get_data(i),[2,new f(o,u,{boundary_min:{x:l.boundary_min.x,y:l.boundary_min.y},boundary_max:{x:l.boundary_max.x,y:l.boundary_max.y}},{map:g,interval_per_tick:c},v,h,_,s)]}}))}))}function c(e,n,t){return e/(Math.pow(2,16)-1)*(t-n)+n}function s(e){return 360*(e/(Math.pow(2,8)-1))}!function(e){e[e.Other=0]="Other",e[e.Spectator=1]="Spectator",e[e.Red=2]="Red",e[e.Blue=3]="Blue"}(r||(r={})),function(e){e[e.Other=0]="Other",e[e.Scout=1]="Scout",e[e.Sniper=2]="Sniper",e[e.Solder=3]="Solder",e[e.Demoman=4]="Demoman",e[e.Medic=5]="Medic",e[e.Heavy=6]="Heavy",e[e.Pyro=7]="Pyro",e[e.Spy=8]="Spy",e[e.Engineer=9]="Engineer"}(i||(i={})),function(e){e[e.TeleporterEntrance=0]="TeleporterEntrance",e[e.TeleporterExit=1]="TeleporterExit",e[e.Dispenser=2]="Dispenser",e[e.Level1Sentry=3]="Level1Sentry",e[e.Level2Sentry=4]="Level2Sentry",e[e.Level3Sentry=5]="Level3Sentry",e[e.MiniSentry=6]="MiniSentry",e[e.Unknown=7]="Unknown"}(o||(o={}));var f=function(){function e(e,n,t,r,i,o,u,a){this.playerCount=e,this.buildingCount=n,this.world=t,this.header=r,this.data=i,this.kills=o,this.playerInfo=u,this.tickCount=a}return e.prototype.getPlayer=function(e,n){if(n>=this.playerCount)throw new Error("Player out of bounds");var t=(n*this.tickCount+e)*p;return function(e,n,t,r){var i=c(e[n]+(e[n+1]<<8),t.boundary_min.x,t.boundary_max.x),o=c(e[n+2]+(e[n+3]<<8),t.boundary_min.y,t.boundary_max.y),u=e[n+4]+(e[n+5]<<8),a=s(e[n+6]),l=1013&u,f=u>>14,p=u>>10&15,y=e[n+7];return{position:{x:i,y:o},angle:a,health:l,team:f,playerClass:p,info:r,charge:y}}(this.data,t,this.world,this.playerInfo[n])},e.prototype.getBuilding=function(e,n){if(n>=this.buildingCount)throw new Error("Building out of bounds");var t=this.playerCount*this.tickCount*p+(n*this.tickCount+e)*y;return function(e,n,t){var i=c(e[n]+(e[n+1]<<8),t.boundary_min.x,t.boundary_max.x),o=c(e[n+2]+(e[n+3]<<8),t.boundary_min.y,t.boundary_max.y),u=e[n+4]+(e[n+5]<<8),a=s(e[n+6]),l=1013&u,f=0==(u>>13&1)?r.Blue:r.Red;return{position:{x:i,y:o},angle:a,health:l,team:f,buildingType:u>>10&7,level:u>>14}}(this.data,t,this.world)},e}(),p=8,y=7}])); |
{ | ||
"author": "Robin Appelman <robin@icewind.nl>", | ||
"name": "@demostf/parser-worker", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "build": "rimraf dist pkg && webpack", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
1660868