parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;ce.id)}),r.children.forEach(e)}(e),t}function t(e,t){return e.map((r,n)=>{return r-(0===n?1e6*t:e[n-1])})}function r(r){return{samples:r.samples,startTime:1e6*r.startTime,endTime:1e6*r.endTime,nodes:e(r.head),timeDeltas:t(r.timestamps,r.startTime)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.chromeTreeToNodes=r; },{}],"kWV1":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isChromeTimeline=i,exports.isChromeTimelineObject=o,exports.importFromChromeTimeline=l,exports.importFromChromeCPUProfile=c,exports.importFromOldV8CPUProfile=f;var e=require("../lib/profile"),t=require("../lib/utils"),n=require("../lib/value-formatters"),r=require("./v8cpuFormatter");function i(e){if(!Array.isArray(e))return!1;if(e.length<1)return!1;const t=e[0];return"pid"in t&&"tid"in t&&"ph"in t&&"cat"in t&&!!e.find(e=>"CpuProfile"===e.name||"Profile"===e.name||"ProfileChunk"===e.name)}function o(e){return"traceEvents"in e&&i(e.traceEvents)}function l(e,n){const r=new Map,i=new Map,o=new Map;(0,t.sortBy)(e,e=>e.ts);for(let t of e){if("CpuProfile"===t.name){const e=`${t.pid}:${t.tid}`,n=t.id||e;r.set(n,t.args.data.cpuProfile),i.set(n,e)}if("Profile"===t.name){const e=`${t.pid}:${t.tid}`;r.set(t.id||e,Object.assign({startTime:0,endTime:0,nodes:[],samples:[],timeDeltas:[]},t.args.data)),t.id&&i.set(t.id,`${t.pid}:${t.tid}`)}if("thread_name"===t.name&&o.set(`${t.pid}:${t.tid}`,t.args.name),"ProfileChunk"===t.name){const e=`${t.pid}:${t.tid}`,n=r.get(t.id||e);if(n){const e=t.args.data;e.cpuProfile&&(e.cpuProfile.nodes&&(n.nodes=n.nodes.concat(e.cpuProfile.nodes)),e.cpuProfile.samples&&(n.samples=n.samples.concat(e.cpuProfile.samples))),e.timeDeltas&&(n.timeDeltas=n.timeDeltas.concat(e.timeDeltas)),null!=e.startTime&&(n.startTime=e.startTime),null!=e.endTime&&(n.endTime=e.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${t.id||e}`)}}if(r.size>0){const e=[];let l=0;return(0,t.itForEach)(r.keys(),t=>{let s=null,a=i.get(t);a&&(s=o.get(a)||null);const m=c(r.get(t));s&&r.size>1?(m.setName(`${n} - ${s}`),"CrRendererMain"===s&&(l=e.length)):m.setName(`${n}`),e.push(m)}),{name:n,indexToView:l,profiles:e}}throw new Error("Could not find CPU profile in Timeline")}const s=new Map;function a(e){return(0,t.getOrInsert)(s,e,e=>{const t=e.url;let n=e.lineNumber;null!=n&&n++;let r=e.columnNumber;null!=r&&r++;const i=e.functionName||(t?`(anonymous ${t.split("/").pop()}:${n})`:"(anonymous)");return{key:`${i}:${t}:${n}:${r}`,name:i,file:t,line:n,col:r}})}function m(e){const{functionName:t,url:n}=e;return"native dummy.js"===n||("(root)"===t||"(idle)"===t)}function u(e){return"(garbage collector)"===e||"(program)"===e}function c(r){const i=new e.CallTreeProfileBuilder(r.endTime-r.startTime),o=new Map;for(let e of r.nodes)o.set(e.id,e);for(let e of r.nodes)if("number"==typeof e.parent&&(e.parent=o.get(e.parent)),e.children)for(let t of e.children){const n=o.get(t);n&&(n.parent=e)}const l=[],s=[];let c=r.timeDeltas[0],f=c,p=NaN;for(let e=0;e0&&(0,t.lastOf)(d)!=f;){const e=a(d.pop().callFrame);i.leaveFrame(e,n)}const p=[];for(let e=c;e&&e!=f&&!m(e.callFrame);e=u(e.callFrame.functionName)?(0,t.lastOf)(d):e.parent||null)p.push(e);p.reverse();for(let e of p)i.enterFrame(a(e.callFrame),n);d=d.concat(p)}for(let e=d.length-1;e>=0;e--)i.leaveFrame(a(d[e].callFrame),(0,t.lastOf)(s));return i.setValueFormatter(new n.TimeFormatter("microseconds")),i.build()}function f(e){return c((0,r.chromeTreeToNodes)(e))} },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4","./v8cpuFormatter":"y1V0"}],"I37H":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromStackprof=a;var e=require("../lib/profile"),t=require("../lib/value-formatters");function a(a){const{frames:r,mode:l,raw:o,raw_timestamp_deltas:n,interval:i}=a,s=new e.StackListProfileBuilder;s.setValueFormatter(new t.TimeFormatter("microseconds"));let c=0,m=[];for(let e=0;e=0;)e[t]=0}var i=0,l=1,d=2,f=3,o=258,b=29,s=256,u=s+1+b,c=30,p=19,h=2*u+1,v=15,y=16,x=7,g=256,m=16,w=17,A=18,k=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=512,B=new Array(2*(u+2));a(B);var C=new Array(2*c);a(C);var D=new Array(j);a(D);var E=new Array(o-f+1);a(E);var F=new Array(b);a(F);var G,H,I,J=new Array(c);function K(e,t,n,_,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=_,this.max_length=r,this.has_stree=e&&e.length}function L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function M(e){return e<256?D[e]:D[256+(e>>>7)]}function N(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function O(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function R(e){16===e.bi_valid?(N(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function T(e,t){var n,_,r,a,i,l,d=t.dyn_tree,f=t.max_code,o=t.stat_desc.static_tree,b=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,c=t.stat_desc.max_length,p=0;for(a=0;a<=v;a++)e.bl_count[a]=0;for(d[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nc&&(a=c,p++),d[2*_+1]=a,_>f||(e.bl_count[a]++,i=0,_>=u&&(i=s[_-u]),l=d[2*_],e.opt_len+=l*(a+i),b&&(e.static_len+=l*(o[2*_+1]+i)));if(0!==p){do{for(a=c-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[c]--,p-=2}while(p>0);for(a=c;0!==a;a--)for(_=e.bl_count[a];0!==_;)(r=e.heap[--n])>f||(d[2*r+1]!==a&&(e.opt_len+=(a-d[2*r+1])*d[2*r],d[2*r+1]=a),_--)}}function U(e,t,n){var _,r,a=new Array(v+1),i=0;for(_=1;_<=v;_++)a[_]=i=i+n[_-1]<<1;for(r=0;r<=t;r++){var l=e[2*r+1];0!==l&&(e[2*r]=Q(a[l]++,l))}}function V(){var e,t,n,_,r,a=new Array(v+1);for(n=0,_=0;_>=7;_8?N(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Y(t,n,_,r){X(t),r&&(N(t,_),N(t,~_)),e.arraySet(t.pending_buf,t.window,n,_,t.pending),t.pending+=_}function Z(e,t,n,_){var r=2*t,a=2*n;return e[r]>1;n>=1;n--)$(e,a,n);r=d;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$(e,a,1),_=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=_,a[2*r]=a[2*n]+a[2*_],e.depth[r]=(e.depth[n]>=e.depth[_]?e.depth[n]:e.depth[_])+1,a[2*n+1]=a[2*_+1]=r,e.heap[1]=r++,$(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],T(e,t),U(a,f,e.bl_count)}function ne(e,t,n){var _,r,a=-1,i=t[1],l=0,d=7,f=4;for(0===i&&(d=138,f=3),t[2*(n+1)+1]=65535,_=0;_<=n;_++)r=i,i=t[2*(_+1)+1],++l=3&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function ae(e,t,n,_){var r;for(O(e,t-257,5),O(e,n-1,5),O(e,_-4,4),r=0;r<_;r++)O(e,e.bl_tree[2*S[r]+1],3);_e(e,e.dyn_ltree,t-1),_e(e,e.dyn_dtree,n-1)}function ie(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return n;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return _;for(t=32;t0?(e.strm.data_type===r&&(e.strm.data_type=ie(e)),te(e,e.l_desc),te(e,e.d_desc),o=re(e),i=e.opt_len+3+7>>>3,(f=e.static_len+3+7>>>3)<=i&&(i=f)):i=f=_+5,_+4<=i&&-1!==n?fe(e,n,_,a):e.strategy===t||f===i?(O(e,(l<<1)+(a?1:0),3),ee(e,B,C)):(O(e,(d<<1)+(a?1:0),3),ae(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ee(e,e.dyn_ltree,e.dyn_dtree)),W(e),a&&X(e)}function se(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(E[n]+s+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1}exports._tr_init=de,exports._tr_stored_block=fe,exports._tr_flush_block=be,exports._tr_tally=se,exports._tr_align=oe; },{"../utils/common":"tbG5"}],"uxo6":[function(require,module,exports) { "use strict";function e(e,r,o,t){for(var u=65535&e|0,i=e>>>16&65535|0,n=0;0!==o;){o-=n=o>2e3?2e3:o;do{i=i+(u=u+r[t++]|0)|0}while(--n);u%=65521,i%=65521}return u|i<<16|0}module.exports=e; },{}],"X4kj":[function(require,module,exports) { "use strict";function r(){for(var r,o=[],t=0;t<256;t++){r=t;for(var n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;o[t]=r}return o}var o=r();function t(r,t,n,u){var a=o,e=u+n;r^=-1;for(var f=u;f>>8^a[255&(r^t[f])];return-1^r}module.exports=t; },{}],"gMAY":[function(require,module,exports) { "use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}; },{}],"BLBk":[function(require,module,exports) { "use strict";var t,a=require("../utils/common"),e=require("./trees"),s=require("./adler32"),i=require("./crc32"),r=require("./messages"),n=0,h=1,l=3,_=4,d=5,o=0,u=1,g=-2,f=-3,c=-5,p=-1,m=1,w=2,v=3,k=4,z=0,b=2,x=8,y=9,B=15,S=8,q=29,I=256,A=I+1+q,C=30,R=19,j=2*A+1,D=15,E=3,H=258,K=H+E+1,N=32,F=42,G=69,J=73,L=91,M=103,O=113,P=666,Q=1,T=2,U=3,V=4,W=3;function X(t,a){return t.msg=r[a],a}function Y(t){return(t<<1)-(t>4?9:0)}function Z(t){for(var a=t.length;--a>=0;)t[a]=0}function $(t){var e=t.state,s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(a.arraySet(t.output,e.pending_buf,e.pending_out,s,t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))}function tt(t,a){e._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,a),t.block_start=t.strstart,$(t.strm)}function at(t,a){t.pending_buf[t.pending++]=a}function et(t,a){t.pending_buf[t.pending++]=a>>>8&255,t.pending_buf[t.pending++]=255&a}function st(t,e,r,n){var h=t.avail_in;return h>n&&(h=n),0===h?0:(t.avail_in-=h,a.arraySet(e,t.input,t.next_in,h,r),1===t.state.wrap?t.adler=s(t.adler,e,h,r):2===t.state.wrap&&(t.adler=i(t.adler,e,h,r)),t.next_in+=h,t.total_in+=h,h)}function it(t,a){var e,s,i=t.max_chain_length,r=t.strstart,n=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-K?t.strstart-(t.w_size-K):0,_=t.window,d=t.w_mask,o=t.prev,u=t.strstart+H,g=_[r+n-1],f=_[r+n];t.prev_length>=t.good_match&&(i>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(e=a)+n]===f&&_[e+n-1]===g&&_[e]===_[r]&&_[++e]===_[r+1]){r+=2,e++;do{}while(_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&_[++r]===_[++e]&&rn){if(t.match_start=a,n=s,s>=h)break;g=_[r+n-1],f=_[r+n]}}}while((a=o[a&d])>l&&0!=--i);return n<=t.lookahead?n:t.lookahead}function rt(t){var e,s,i,r,n,h=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=h+(h-K)){a.arraySet(t.window,t.window,h,h,0),t.match_start-=h,t.strstart-=h,t.block_start-=h,e=s=t.hash_size;do{i=t.head[--e],t.head[e]=i>=h?i-h:0}while(--s);e=s=h;do{i=t.prev[--e],t.prev[e]=i>=h?i-h:0}while(--s);r+=h}if(0===t.strm.avail_in)break;if(s=st(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=s,t.lookahead+t.insert>=E)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(rt(t),0===t.lookahead&&a===n)return Q;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var s=t.block_start+e;if((0===t.strstart||t.strstart>=s)&&(t.lookahead=t.strstart-s,t.strstart=s,tt(t,!1),0===t.strm.avail_out))return Q;if(t.strstart-t.block_start>=t.w_size-K&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):(t.strstart>t.block_start&&(tt(t,!1),t.strm.avail_out),Q)}function ht(t,a){for(var s,i;;){if(t.lookahead=E&&(t.ins_h=(t.ins_h<=E)if(i=e._tr_tally(t,t.strstart-t.match_start,t.match_length-E),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=E){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=E&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=E-1)),t.prev_length>=E&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-E,i=e._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-E),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<=E&&t.strstart>0&&(i=l[r=t.strstart-1])===l[++r]&&i===l[++r]&&i===l[++r]){h=t.strstart+H;do{}while(i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&i===l[++r]&&rt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=E?(s=e._tr_tally(t,1,t.match_length-E),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):t.last_lit&&(tt(t,!1),0===t.strm.avail_out)?Q:T}function dt(t,a){for(var s;;){if(0===t.lookahead&&(rt(t),0===t.lookahead)){if(a===n)return Q;break}if(t.match_length=0,s=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=0,a===_?(tt(t,!0),0===t.strm.avail_out?U:V):t.last_lit&&(tt(t,!1),0===t.strm.avail_out)?Q:T}function ot(t,a,e,s,i){this.good_length=t,this.max_lazy=a,this.nice_length=e,this.max_chain=s,this.func=i}function ut(a){a.window_size=2*a.w_size,Z(a.head),a.max_lazy_match=t[a.level].max_lazy,a.good_match=t[a.level].good_length,a.nice_match=t[a.level].nice_length,a.max_chain_length=t[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=E-1,a.match_available=0,a.ins_h=0}function gt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*j),this.dyn_dtree=new a.Buf16(2*(2*C+1)),this.bl_tree=new a.Buf16(2*(2*R+1)),Z(this.dyn_ltree),Z(this.dyn_dtree),Z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(D+1),this.heap=new a.Buf16(2*A+1),Z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*A+1),Z(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ft(t){var a;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=b,(a=t.state).pending=0,a.pending_out=0,a.wrap<0&&(a.wrap=-a.wrap),a.status=a.wrap?F:O,t.adler=2===a.wrap?0:1,a.last_flush=n,e._tr_init(a),o):X(t,g)}function ct(t){var a=ft(t);return a===o&&ut(t.state),a}function pt(t,a){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=a,o):g}function mt(t,e,s,i,r,n){if(!t)return g;var h=1;if(e===p&&(e=6),i<0?(h=0,i=-i):i>15&&(h=2,i-=16),r<1||r>y||s!==x||i<8||i>15||e<0||e>9||n<0||n>k)return X(t,g);8===i&&(i=9);var l=new gt;return t.state=l,l.strm=t,l.wrap=h,l.gzhead=null,l.w_bits=i,l.w_size=1<d||s<0)return a?X(a,g):g;if(f=a.state,!a.output||!a.input&&0!==a.avail_in||f.status===P&&s!==_)return X(a,0===a.avail_out?c:g);if(f.strm=a,r=f.last_flush,f.last_flush=s,f.status===F)if(2===f.wrap)a.adler=0,at(f,31),at(f,139),at(f,8),f.gzhead?(at(f,(f.gzhead.text?1:0)+(f.gzhead.hcrc?2:0)+(f.gzhead.extra?4:0)+(f.gzhead.name?8:0)+(f.gzhead.comment?16:0)),at(f,255&f.gzhead.time),at(f,f.gzhead.time>>8&255),at(f,f.gzhead.time>>16&255),at(f,f.gzhead.time>>24&255),at(f,9===f.level?2:f.strategy>=w||f.level<2?4:0),at(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(at(f,255&f.gzhead.extra.length),at(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(a.adler=i(a.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=G):(at(f,0),at(f,0),at(f,0),at(f,0),at(f,0),at(f,9===f.level?2:f.strategy>=w||f.level<2?4:0),at(f,W),f.status=O);else{var k=x+(f.w_bits-8<<4)<<8;k|=(f.strategy>=w||f.level<2?0:f.level<6?1:6===f.level?2:3)<<6,0!==f.strstart&&(k|=N),k+=31-k%31,f.status=O,et(f,k),0!==f.strstart&&(et(f,a.adler>>>16),et(f,65535&a.adler)),a.adler=1}if(f.status===G)if(f.gzhead.extra){for(p=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending!==f.pending_buf_size));)at(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=J)}else f.status=J;if(f.status===J)if(f.gzhead.name){p=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending===f.pending_buf_size)){m=1;break}m=f.gzindexp&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),0===m&&(f.gzindex=0,f.status=L)}else f.status=L;if(f.status===L)if(f.gzhead.comment){p=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>p&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),$(a),p=f.pending,f.pending===f.pending_buf_size)){m=1;break}m=f.gzindexp&&(a.adler=i(a.adler,f.pending_buf,f.pending-p,p)),0===m&&(f.status=M)}else f.status=M;if(f.status===M&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&$(a),f.pending+2<=f.pending_buf_size&&(at(f,255&a.adler),at(f,a.adler>>8&255),a.adler=0,f.status=O)):f.status=O),0!==f.pending){if($(a),0===a.avail_out)return f.last_flush=-1,o}else if(0===a.avail_in&&Y(s)<=Y(r)&&s!==_)return X(a,c);if(f.status===P&&0!==a.avail_in)return X(a,c);if(0!==a.avail_in||0!==f.lookahead||s!==n&&f.status!==P){var z=f.strategy===w?dt(f,s):f.strategy===v?_t(f,s):t[f.level].func(f,s);if(z!==U&&z!==V||(f.status=P),z===Q||z===U)return 0===a.avail_out&&(f.last_flush=-1),o;if(z===T&&(s===h?e._tr_align(f):s!==d&&(e._tr_stored_block(f,0,0,!1),s===l&&(Z(f.head),0===f.lookahead&&(f.strstart=0,f.block_start=0,f.insert=0))),$(a),0===a.avail_out))return f.last_flush=-1,o}return s!==_?o:f.wrap<=0?u:(2===f.wrap?(at(f,255&a.adler),at(f,a.adler>>8&255),at(f,a.adler>>16&255),at(f,a.adler>>24&255),at(f,255&a.total_in),at(f,a.total_in>>8&255),at(f,a.total_in>>16&255),at(f,a.total_in>>24&255)):(et(f,a.adler>>>16),et(f,65535&a.adler)),$(a),f.wrap>0&&(f.wrap=-f.wrap),0!==f.pending?o:u)}function kt(t){var a;return t&&t.state?(a=t.state.status)!==F&&a!==G&&a!==J&&a!==L&&a!==M&&a!==O&&a!==P?X(t,g):(t.state=null,a===O?X(t,f):o):g}function zt(t,e){var i,r,n,h,l,_,d,u,f=e.length;if(!t||!t.state)return g;if(2===(h=(i=t.state).wrap)||1===h&&i.status!==F||i.lookahead)return g;for(1===h&&(t.adler=s(t.adler,e,f,0)),i.wrap=0,f>=i.w_size&&(0===h&&(Z(i.head),i.strstart=0,i.block_start=0,i.insert=0),u=new a.Buf8(i.w_size),a.arraySet(u,e,f-i.w_size,i.w_size,0),e=u,f=i.w_size),l=t.avail_in,_=t.next_in,d=t.input,t.avail_in=f,t.next_in=0,t.input=e,rt(i);i.lookahead>=E;){r=i.strstart,n=i.lookahead-(E-1);do{i.ins_h=(i.ins_h<=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function f(e,o){if(o<65537&&(e.subarray&&t||!e.subarray&&n))return String.fromCharCode.apply(null,r.shrinkBuf(e,o));for(var f="",u=0;u>>6,t[u++]=128|63&e):e<65536?(t[u++]=224|e>>>12,t[u++]=128|e>>>6&63,t[u++]=128|63&e):(t[u++]=240|e>>>18,t[u++]=128|e>>>12&63,t[u++]=128|e>>>6&63,t[u++]=128|63&e);return t},exports.buf2binstring=function(r){return f(r,r.length)},exports.binstring2buf=function(n){for(var t=new r.Buf8(n.length),e=0,o=t.length;e4)h[o++]=65533,t+=a-1;else{for(u&=2===a?31:3===a?15:7;a>1&&t1?h[o++]=65533:u<65536?h[o++]=u:(u-=65536,h[o++]=55296|u>>10&1023,h[o++]=56320|1023&u)}return f(h,o)},exports.utf8border=function(r,n){var t;for((n=n||r.length)>r.length&&(n=r.length),t=n-1;t>=0&&128==(192&r[t]);)t--;return t<0?n:0===t?n:t+e[r[t]]>n?t:n}; },{"./common":"tbG5"}],"bdtv":[function(require,module,exports) { "use strict";function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}module.exports=t; },{}],"nFS2":[function(require,module,exports) { "use strict";var t=require("./zlib/deflate"),i=require("./utils/common"),e=require("./utils/strings"),n=require("./zlib/messages"),r=require("./zlib/zstream"),s=Object.prototype.toString,o=0,a=4,u=0,h=1,d=2,l=-1,f=0,p=8;function w(o){if(!(this instanceof w))return new w(o);this.options=i.assign({level:l,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},o||{});var a=this.options;a.raw&&a.windowBits>0?a.windowBits=-a.windowBits:a.gzip&&a.windowBits>0&&a.windowBits<16&&(a.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var h=t.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(h!==u)throw new Error(n[h]);if(a.header&&t.deflateSetHeader(this.strm,a.header),a.dictionary){var d;if(d="string"==typeof a.dictionary?e.string2buf(a.dictionary):"[object ArrayBuffer]"===s.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,(h=t.deflateSetDictionary(this.strm,d))!==u)throw new Error(n[h]);this._dict_set=!0}}function c(t,i){var e=new w(i);if(e.push(t,!0),e.err)throw e.msg||n[e.err];return e.result}function m(t,i){return(i=i||{}).raw=!0,c(t,i)}function g(t,i){return(i=i||{}).gzip=!0,c(t,i)}w.prototype.push=function(n,r){var l,f,p=this.strm,w=this.options.chunkSize;if(this.ended)return!1;f=r===~~r?r:!0===r?a:o,"string"==typeof n?p.input=e.string2buf(n):"[object ArrayBuffer]"===s.call(n)?p.input=new Uint8Array(n):p.input=n,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(w),p.next_out=0,p.avail_out=w),(l=t.deflate(p,f))!==h&&l!==u)return this.onEnd(l),this.ended=!0,!1;0!==p.avail_out&&(0!==p.avail_in||f!==a&&f!==d)||("string"===this.options.to?this.onData(e.buf2binstring(i.shrinkBuf(p.output,p.next_out))):this.onData(i.shrinkBuf(p.output,p.next_out)))}while((p.avail_in>0||0===p.avail_out)&&l!==h);return f===a?(l=t.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===u):f!==d||(this.onEnd(u),p.avail_out=0,!0)},w.prototype.onData=function(t){this.chunks.push(t)},w.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},exports.Deflate=w,exports.deflate=c,exports.deflateRaw=m,exports.gzip=g; },{"./zlib/deflate":"BLBk","./utils/common":"tbG5","./utils/strings":"Q3ZD","./zlib/messages":"gMAY","./zlib/zstream":"bdtv"}],"LP5M":[function(require,module,exports) { "use strict";var i=30,e=12;module.exports=function(o,a){var t,d,n,l,s,f,r,b,c,u,v,m,w,h,k,_,x,g,p,z,j,q,y,A,B;t=o.state,d=o.next_in,A=o.input,n=d+(o.avail_in-5),l=o.next_out,B=o.output,s=l-(a-o.avail_out),f=l+(o.avail_out-257),r=t.dmax,b=t.wsize,c=t.whave,u=t.wnext,v=t.window,m=t.hold,w=t.bits,h=t.lencode,k=t.distcode,_=(1<>>=p=g>>>24,w-=p,0===(p=g>>>16&255))B[l++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=h[(65535&g)+(m&(1<>>=p,w-=p),w<15&&(m+=A[d++]<>>=p=g>>>24,w-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=k[(65535&g)+(m&(1<r){o.msg="invalid distance too far back",t.mode=i;break i}if(m>>>=p,w-=p,j>(p=l-s)){if((p=j-p)>c&&t.sane){o.msg="invalid distance too far back",t.mode=i;break i}if(q=0,y=v,0===u){if(q+=b-p,p2;)B[l++]=y[q++],B[l++]=y[q++],B[l++]=y[q++],z-=3;z&&(B[l++]=y[q++],z>1&&(B[l++]=y[q++]))}else{q=l-j;do{B[l++]=B[q++],B[l++]=B[q++],B[l++]=B[q++],z-=3}while(z>2);z&&(B[l++]=B[q++],z>1&&(B[l++]=B[q++]))}break}}break}}while(d>3,m&=(1<<(w-=z<<3))-1,o.next_in=d,o.next_out=l,o.avail_in=d=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return d[v++]=20971520,d[v++]=20971520,h.bits=1,0;for(F=1;F0&&(a===e||1!==G))return-1;for(Q[1]=0,D=1;Di||a===t&&L>o)return 1;for(;;){y=D-J,B[E]j?(z=R[S+B[E]],A=N[O+B[E]]):(z=96,A=0),k=1<>J)+(p-=k)]=y<<24|z<<16|A|0}while(0!==p);for(k=1<>=1;if(0!==k?(M&=k-1,M+=k):M=0,E++,0==--P[D]){if(D===G)break;D=c[m+B[E]]}if(D>H&&(M&x)!==q){for(0===J&&(J=H),g+=F,K=1<<(I=D-J);I+Ji||a===t&&L>o)return 1;d[q=M&x]=H<<24|I<<16|g-v|0}}return 0!==M&&(d[g+M]=D-J<<24|64<<16|0),h.bits=H,0}; },{"../utils/common":"tbG5"}],"GIDK":[function(require,module,exports) { "use strict";var e=require("../utils/common"),a=require("./adler32"),t=require("./crc32"),i=require("./inffast"),s=require("./inftrees"),n=0,r=1,o=2,d=4,l=5,f=6,c=0,h=1,k=2,b=-2,m=-3,w=-4,u=-5,g=8,v=1,x=2,p=3,_=4,y=5,z=6,B=7,S=8,q=9,C=10,I=11,R=12,j=13,A=14,D=15,E=16,G=17,H=18,K=19,N=20,F=21,J=22,L=23,M=24,O=25,P=26,Q=27,T=28,U=29,V=30,W=31,X=32,Y=852,Z=592,$=15,ee=$;function ae(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function te(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ie(a){var t;return a&&a.state?(t=a.state,a.total_in=a.total_out=t.total=0,a.msg="",t.wrap&&(a.adler=1&t.wrap),t.mode=v,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new e.Buf32(Y),t.distcode=t.distdyn=new e.Buf32(Z),t.sane=1,t.back=-1,c):b}function se(e){var a;return e&&e.state?((a=e.state).wsize=0,a.whave=0,a.wnext=0,ie(e)):b}function ne(e,a){var t,i;return e&&e.state?(i=e.state,a<0?(t=0,a=-a):(t=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?b:(null!==i.window&&i.wbits!==a&&(i.window=null),i.wrap=t,i.wbits=a,se(e))):b}function re(e,a){var t,i;return e?(i=new te,e.state=i,i.window=null,(t=ne(e,a))!==c&&(e.state=null),t):b}function oe(e){return re(e,ee)}var de,le,fe=!0;function ce(a){if(fe){var t;for(de=new e.Buf32(512),le=new e.Buf32(32),t=0;t<144;)a.lens[t++]=8;for(;t<256;)a.lens[t++]=9;for(;t<280;)a.lens[t++]=7;for(;t<288;)a.lens[t++]=8;for(s(r,a.lens,0,288,de,0,a.work,{bits:9}),t=0;t<32;)a.lens[t++]=5;s(o,a.lens,0,32,le,0,a.work,{bits:5}),fe=!1}a.lencode=de,a.lenbits=9,a.distcode=le,a.distbits=5}function he(a,t,i,s){var n,r=a.state;return null===r.window&&(r.wsize=1<=r.wsize?(e.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((n=r.wsize-r.wnext)>s&&(n=s),e.arraySet(r.window,t,i-s,n,r.wnext),(s-=n)?(e.arraySet(r.window,t,i-s,s,0),r.wnext=s,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,$.check=t($.check,qe,2,0),oe=0,de=0,$.mode=x;break}if($.flags=0,$.head&&($.head.done=!1),!(1&$.wrap)||(((255&oe)<<8)+(oe>>8))%31){Y.msg="incorrect header check",$.mode=V;break}if((15&oe)!==g){Y.msg="unknown compression method",$.mode=V;break}if(de-=4,_e=8+(15&(oe>>>=4)),0===$.wbits)$.wbits=_e;else if(_e>$.wbits){Y.msg="invalid window size",$.mode=V;break}$.dmax=1<<_e,Y.adler=$.check=1,$.mode=512&oe?C:R,oe=0,de=0;break;case x:for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>8&1),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0,$.mode=p;case p:for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>8&255,qe[2]=oe>>>16&255,qe[3]=oe>>>24&255,$.check=t($.check,qe,4,0)),oe=0,de=0,$.mode=_;case _:for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>8),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0,$.mode=y;case y:if(1024&$.flags){for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>8&255,$.check=t($.check,qe,2,0)),oe=0,de=0}else $.head&&($.head.extra=null);$.mode=z;case z:if(1024&$.flags&&((ke=$.length)>ne&&(ke=ne),ke&&($.head&&(_e=$.head.extra_len-$.length,$.head.extra||($.head.extra=new Array($.head.extra_len)),e.arraySet($.head.extra,ee,ie,ke,_e)),512&$.flags&&($.check=t($.check,ee,ke,ie)),ne-=ke,ie+=ke,$.length-=ke),$.length))break e;$.length=0,$.mode=B;case B:if(2048&$.flags){if(0===ne)break e;ke=0;do{_e=ee[ie+ke++],$.head&&_e&&$.length<65536&&($.head.name+=String.fromCharCode(_e))}while(_e&&ke>9&1,$.head.done=!0),Y.adler=$.check=0,$.mode=R;break;case C:for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=7&de,de-=7&de,$.mode=Q;break}for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=1)){case 0:$.mode=A;break;case 1:if(ce($),$.mode=N,Z===f){oe>>>=2,de-=2;break e}break;case 2:$.mode=G;break;case 3:Y.msg="invalid block type",$.mode=V}oe>>>=2,de-=2;break;case A:for(oe>>>=7&de,de-=7&de;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>16^65535)){Y.msg="invalid stored block lengths",$.mode=V;break}if($.length=65535&oe,oe=0,de=0,$.mode=D,Z===f)break e;case D:$.mode=E;case E:if(ke=$.length){if(ke>ne&&(ke=ne),ke>re&&(ke=re),0===ke)break e;e.arraySet(te,ee,ie,ke,se),ne-=ke,ie+=ke,re-=ke,se+=ke,$.length-=ke;break}$.mode=R;break;case G:for(;de<14;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=5,de-=5,$.ndist=1+(31&oe),oe>>>=5,de-=5,$.ncode=4+(15&oe),oe>>>=4,de-=4,$.nlen>286||$.ndist>30){Y.msg="too many length or distance symbols",$.mode=V;break}$.have=0,$.mode=H;case H:for(;$.have<$.ncode;){for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=3,de-=3}for(;$.have<19;)$.lens[Ce[$.have++]]=0;if($.lencode=$.lendyn,$.lenbits=7,ze={bits:$.lenbits},ye=s(n,$.lens,0,19,$.lencode,0,$.work,ze),$.lenbits=ze.bits,ye){Y.msg="invalid code lengths set",$.mode=V;break}$.have=0,$.mode=K;case K:for(;$.have<$.nlen+$.ndist;){for(;ue=(Se=$.lencode[oe&(1<<$.lenbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=we,de-=we,$.lens[$.have++]=ge;else{if(16===ge){for(Be=we+2;de>>=we,de-=we,0===$.have){Y.msg="invalid bit length repeat",$.mode=V;break}_e=$.lens[$.have-1],ke=3+(3&oe),oe>>>=2,de-=2}else if(17===ge){for(Be=we+3;de>>=we)),oe>>>=3,de-=3}else{for(Be=we+7;de>>=we)),oe>>>=7,de-=7}if($.have+ke>$.nlen+$.ndist){Y.msg="invalid bit length repeat",$.mode=V;break}for(;ke--;)$.lens[$.have++]=_e}}if($.mode===V)break;if(0===$.lens[256]){Y.msg="invalid code -- missing end-of-block",$.mode=V;break}if($.lenbits=9,ze={bits:$.lenbits},ye=s(r,$.lens,0,$.nlen,$.lencode,0,$.work,ze),$.lenbits=ze.bits,ye){Y.msg="invalid literal/lengths set",$.mode=V;break}if($.distbits=6,$.distcode=$.distdyn,ze={bits:$.distbits},ye=s(o,$.lens,$.nlen,$.ndist,$.distcode,0,$.work,ze),$.distbits=ze.bits,ye){Y.msg="invalid distances set",$.mode=V;break}if($.mode=N,Z===f)break e;case N:$.mode=F;case F:if(ne>=6&&re>=258){Y.next_out=se,Y.avail_out=re,Y.next_in=ie,Y.avail_in=ne,$.hold=oe,$.bits=de,i(Y,fe),se=Y.next_out,te=Y.output,re=Y.avail_out,ie=Y.next_in,ee=Y.input,ne=Y.avail_in,oe=$.hold,de=$.bits,$.mode===R&&($.back=-1);break}for($.back=0;ue=(Se=$.lencode[oe&(1<<$.lenbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=ve,de-=ve,$.back+=ve}if(oe>>>=we,de-=we,$.back+=we,$.length=ge,0===ue){$.mode=P;break}if(32&ue){$.back=-1,$.mode=R;break}if(64&ue){Y.msg="invalid literal/length code",$.mode=V;break}$.extra=15&ue,$.mode=J;case J:if($.extra){for(Be=$.extra;de>>=$.extra,de-=$.extra,$.back+=$.extra}$.was=$.length,$.mode=L;case L:for(;ue=(Se=$.distcode[oe&(1<<$.distbits)-1])>>>16&255,ge=65535&Se,!((we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<>>=ve,de-=ve,$.back+=ve}if(oe>>>=we,de-=we,$.back+=we,64&ue){Y.msg="invalid distance code",$.mode=V;break}$.offset=ge,$.extra=15&ue,$.mode=M;case M:if($.extra){for(Be=$.extra;de>>=$.extra,de-=$.extra,$.back+=$.extra}if($.offset>$.dmax){Y.msg="invalid distance too far back",$.mode=V;break}$.mode=O;case O:if(0===re)break e;if(ke=fe-re,$.offset>ke){if((ke=$.offset-ke)>$.whave&&$.sane){Y.msg="invalid distance too far back",$.mode=V;break}ke>$.wnext?(ke-=$.wnext,be=$.wsize-ke):be=$.wnext-ke,ke>$.length&&(ke=$.length),me=$.window}else me=te,be=se-$.offset,ke=$.length;ke>re&&(ke=re),re-=ke,$.length-=ke;do{te[se++]=me[be++]}while(--ke);0===$.length&&($.mode=F);break;case P:if(0===re)break e;te[se++]=$.length,re--,$.mode=F;break;case Q:if($.wrap){for(;de<32;){if(0===ne)break e;ne--,oe|=ee[ie++]<=0&&u.windowBits<16&&(u.windowBits=-u.windowBits,0===u.windowBits&&(u.windowBits=-15)),!(u.windowBits>=0&&u.windowBits<16)||n&&n.windowBits||(u.windowBits+=32),u.windowBits>15&&u.windowBits<48&&0==(15&u.windowBits)&&(u.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new e,this.strm.avail_out=0;var h=t.inflateInit2(this.strm,u.windowBits);if(h!==s.Z_OK)throw new Error(r[h]);this.header=new o,t.inflateGetHeader(this.strm,this.header)}function h(t,i){var n=new a(i);if(n.push(t,!0),n.err)throw n.msg||r[n.err];return n.result}function _(t,i){return(i=i||{}).raw=!0,h(t,i)}a.prototype.push=function(r,e){var o,a,h,_,w,l,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,c=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof r?d.input=n.binstring2buf(r):"[object ArrayBuffer]"===u.call(r)?d.input=new Uint8Array(r):d.input=r,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(o=t.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(l="string"==typeof p?n.string2buf(p):"[object ArrayBuffer]"===u.call(p)?new Uint8Array(p):p,o=t.inflateSetDictionary(this.strm,l)),o===s.Z_BUF_ERROR&&!0===c&&(o=s.Z_OK,c=!1),o!==s.Z_STREAM_END&&o!==s.Z_OK)return this.onEnd(o),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&o!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(h=n.utf8border(d.output,d.next_out),_=d.next_out-h,w=n.buf2string(d.output,h),d.next_out=_,d.avail_out=f-_,_&&i.arraySet(d.output,d.output,h,_,0),this.onData(w)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(c=!0)}while((d.avail_in>0||0===d.avail_out)&&o!==s.Z_STREAM_END);return o===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(o=t.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},a.prototype.onData=function(t){this.chunks.push(t)},a.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},exports.Inflate=a,exports.inflate=h,exports.inflateRaw=_,exports.ungzip=h; },{"./zlib/inflate":"GIDK","./utils/common":"tbG5","./utils/strings":"Q3ZD","./zlib/constants":"xUUw","./zlib/messages":"gMAY","./zlib/zstream":"bdtv","./zlib/gzheader":"WIli"}],"f4vO":[function(require,module,exports) { "use strict";var e=require("./lib/utils/common").assign,i=require("./lib/deflate"),r=require("./lib/inflate"),l=require("./lib/zlib/constants"),s={};e(s,i,r,l),module.exports=s; },{"./lib/utils/common":"tbG5","./lib/deflate":"nFS2","./lib/inflate":"faQk","./lib/zlib/constants":"xUUw"}],"DstG":[function(require,module,exports) { !function(e){var a=String.fromCharCode;function s(e,s,c){for(var n=e[s],r=1,i=0,t=0;t=32&&n<=126?"Unexpected character "+a(n)+" in JSON at position "+s+" (line "+r+", column "+i+")":"Unexpected byte 0x"+n.toString(16)+" in JSON at position "+s+" (line "+r+", column "+i+")"))}e.JSON_parse=function(e){if(!(e instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");for(var c,n=[],r=[],i=[],t=e.length,o=null,u=0,f=0;f=t&&s(e,t),34!==(p=e[f++]);)if(92===p)switch(e[f++]){case 34:l+='"';break;case 47:l+="/";break;case 92:l+="\\";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+="\n";break;case 114:l+="\r";break;case 116:l+="\t";break;case 117:for(var k=0,h=0;h<4;h++)k<<=4,(p=e[f++])>=48&&p<=57?k|=p-48:p>=97&&p<=102?k|=p+-87:p>=65&&p<=70?k|=p+-55:s(e,--f);l+=a(k);break;default:s(e,--f)}else if(p<=127)l+=a(p);else if(192==(224&p))l+=a((31&p)<<6|63&e[f++]);else if(224==(240&p))l+=a((15&p)<<12|(63&e[f++])<<6|63&e[f++]);else if(240==(248&p)){var d=(7&p)<<18|(63&e[f++])<<12|(63&e[f++])<<6|63&e[f++];d>65535&&(l+=a((d-=65536)>>10&1023|55296),d=56320|1023&d),l+=a(d)}l[0];break;case 91:l=[],n.push(o),r.push(c),i.push(u),o=null,c=l,u=1;continue;case 123:l={},n.push(o),r.push(c),i.push(u),o=null,c=l,u=2;continue;case 93:1!==u&&s(e,--f),l=c,o=n.pop(),c=r.pop(),u=i.pop();break;case 125:2!==u&&s(e,--f),l=c,o=n.pop(),c=r.pop(),u=i.pop();break;default:s(e,--f)}for(p=e[f];p<=32;)p=e[++f];switch(u){case 0:if(f===t)return l;break;case 1:if(c.push(l),44===p){f++;continue}if(93===p)continue;break;case 2:if(null===o){if(o=l,58===p){f++;continue}}else{if(c[o]=l,o=null,44===p){f++;continue}if(125===p)continue}}break}}s(e,f)}}("undefined"!=typeof exports?exports:this); },{}],"QTYz":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withMockedFileChunkSizeForTests=o,exports.MaybeCompressedDataReader=exports.TextProfileDataSource=exports.StringBackedTextFileContent=exports.BufferBackedTextFileContent=void 0;var e=n(require("pako")),t=require("uint8array-json-parser");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var s=function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{a(n.next(e))}catch(t){i(t)}}function u(e){try{a(n.throw(e))}catch(t){i(t)}}function a(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,u)}a((n=n.apply(e,t||[])).next())})};let i=1<<27;function o(e,t){return s(this,void 0,void 0,function*(){const r=i;i=e;try{yield t()}finally{i=r}})}function u(e){return"["===(e=e.trim())[0]&&"]"!==(e=e.replace(/,\s*$/,""))[e.length-1]&&(e+="]"),JSON.parse(e)}function a(e){let r=0;for(let t=0;t0&&/\s/.exec(String.fromCharCode(e[t-1]));)t--;if(","===String.fromCharCode(e[t-1])&&t--,"]"!==String.fromCharCode(e[t-1])){const r=new Uint8Array(t+1);r.set(e.subarray(0,t)),r[t]="]".charCodeAt(0),e=r}}return(0,t.JSON_parse)(e)}class c{constructor(e){this.chunks=[];const t=this.byteArray=new Uint8Array(e);let r="utf-8";if(t.length>2&&(255===t[0]&&254===t[1]?r="utf-16le":254===t[0]&&255===t[1]&&(r="utf-16be")),"undefined"!=typeof TextDecoder){const t=new TextDecoder(r);for(let r=0;r=i&&this.chunks.push("")}}splitLines(){return{[Symbol.iterator]:function*(){let e="";for(let t of this.chunks){const r=t.split("\n");for(let t=0;ts(this,void 0,void 0,function*(){try{return e.inflate(new Uint8Array(t)).buffer}catch(r){return t}}))}name(){return s(this,void 0,void 0,function*(){return yield this.namePromise})}readAsArrayBuffer(){return s(this,void 0,void 0,function*(){return yield this.uncompressedData})}readAsText(){return s(this,void 0,void 0,function*(){const e=yield this.readAsArrayBuffer();return new c(e)})}static fromFile(e){const t=new Promise(t=>{const r=new FileReader;r.addEventListener("loadend",()=>{if(!(r.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");t(r.result)}),r.readAsArrayBuffer(e)});return new l(Promise.resolve(e.name),t)}static fromArrayBuffer(e,t){return new l(Promise.resolve(e),Promise.resolve(t))}}exports.MaybeCompressedDataReader=l; },{"pako":"f4vO","uint8array-json-parser":"DstG"}],"G28U":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromInstrumentsDeepCopy=a,exports.importFromInstrumentsTrace=w,exports.importRunFromInstrumentsTrace=g,exports.importThreadFromInstrumentsTrace=b,exports.readInstrumentsKeyedArchive=y,exports.decodeUTF8=v,exports.UID=void 0;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters"),n=require("./utils"),s=function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,a)}c((n=n.apply(e,t||[])).next())})};function i(e){const t=[...e.splitLines()].map(e=>e.split("\t")),r=t.shift();if(!r)return[];const n=new Map;for(let i=0;i0;){const e=a.pop();c=Math.max(c,e.endValue),n.leaveFrame(e,c)}return"Bytes Used"in s[0]?n.setValueFormatter(new r.ByteFormatter):("Weight"in s[0]||"Running Time"in s[0])&&n.setValueFormatter(new r.TimeFormatter("milliseconds")),n.build()}function c(e){return s(this,void 0,void 0,function*(){const t={name:e.name,files:new Map,subdirectories:new Map},r=yield new Promise((t,r)=>{e.createReader().readEntries(e=>{t(e)},r)});for(let e of r)if(e.isDirectory){const r=yield c(e);t.subdirectories.set(r.name,r)}else{const r=yield new Promise((t,r)=>{e.file(t,r)});t.files.set(r.name,r)}return t})}function l(e){return n.MaybeCompressedDataReader.fromFile(e).readAsArrayBuffer()}function u(e){return n.MaybeCompressedDataReader.fromFile(e).readAsText()}function f(e,r){const n=(0,t.getOrThrow)(e.subdirectories,"corespace"),s=(0,t.getOrThrow)(n.subdirectories,`run${r}`);return(0,t.getOrThrow)(s.subdirectories,"core")}class h{constructor(e){this.bytePos=0,this.view=new DataView(e)}seek(e){this.bytePos=e}skip(e){this.bytePos+=e}hasMore(){return this.bytePosthis.view.byteLength?0:this.view.getUint8(this.bytePos-1)}readUint32(){return this.bytePos+=4,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-4,!0)}readUint48(){return this.bytePos+=6,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-6,!0)+this.view.getUint16(this.bytePos-2,!0)*Math.pow(2,32)}readUint64(){return this.bytePos+=8,this.bytePos>this.view.byteLength?0:this.view.getUint32(this.bytePos-8,!0)+this.view.getUint32(this.bytePos-4,!0)*Math.pow(2,32)}}function p(e){return s(this,void 0,void 0,function*(){const r=(0,t.getOrThrow)(e.subdirectories,"stores");for(let e of r.subdirectories.values()){const r=e.files.get("schema.xml");if(!r)continue;const n=yield u(r);if(!/name="time-profile"/.exec(n.firstChunk()))continue;const s=new h(yield l((0,t.getOrThrow)(e.files,"bulkstore")));s.readUint32(),s.readUint32(),s.readUint32();const i=s.readUint32(),o=s.readUint32();s.seek(i);const a=[];for(;;){const e=s.readUint48();if(0===e)break;const t=s.readUint32();s.skip(o-6-4-4);const r=s.readUint32();a.push({timestamp:e,threadID:t,backtraceID:r})}return a}throw new Error("Could not find sample list")})}function d(e,r){return s(this,void 0,void 0,function*(){const e=(0,t.getOrThrow)(r.subdirectories,"uniquing"),n=(0,t.getOrThrow)(e.subdirectories,"arrayUniquer"),s=(0,t.getOrThrow)(n.files,"integeruniquer.index"),i=(0,t.getOrThrow)(n.files,"integeruniquer.data"),o=new h(yield l(s)),a=new h(yield l(i));o.seek(32);let c=[];for(;o.hasMore();){const e=o.readUint32()+1048576*o.readUint32();if(0===e)continue;a.seek(e);let t=a.readUint32(),r=[];for(;t--;)r.push(a.readUint64());c.push(r)}return c})}function m(e){return s(this,void 0,void 0,function*(){const r=(0,t.getOrThrow)(e.files,"form.template"),n=y(yield l(r)),s=n["com.apple.xray.owner.template.version"];let i=1;"com.apple.xray.owner.template"in n&&(i=n["com.apple.xray.owner.template"].get("_selectedRunNumber"));let o=n.$1;"stubInfoByUUID"in n&&(o=Array.from(n.stubInfoByUUID.keys())[0]);const a=n["com.apple.xray.run.data"],c=[];for(let e of a.runNumbers){const r=(0,t.getOrThrow)(a.runData,e),n=(0,t.getOrThrow)(r,"symbolsByPid"),s=new Map;for(let i of n.values()){for(let e of i.symbols){if(!e)continue;const{sourcePath:r,symbolName:n,addressToLine:i}=e;for(let e of i.keys())(0,t.getOrInsert)(s,e,()=>{const s=n||`0x${(0,t.zeroPad)(e.toString(16),16)}`,i={key:`${r}:${s}`,name:s};return r&&(i.file=r),i})}c.push({number:e,addressToFrameMap:s})}}return{version:s,instrument:o,selectedRunNumber:i,runs:c}})}function w(e){return s(this,void 0,void 0,function*(){const t=yield c(e),{version:r,runs:n,instrument:s,selectedRunNumber:i}=yield m(t);if("com.apple.xray.instrument-type.coresampler2"!==s)throw new Error(`The only supported instrument from .trace import is "com.apple.xray.instrument-type.coresampler2". Got ${s}`);console.log("version: ",r),console.log("Importing time profile");const o=[];let a=0;for(let c of n){const{addressToFrameMap:r,number:n}=c,s=yield g({fileName:e.name,tree:t,addressToFrameMap:r,runNumber:n});c.number===i&&(a=o.length+s.indexToView),o.push(...s.profiles)}return{name:e.name,indexToView:a,profiles:o}})}function g(e){return s(this,void 0,void 0,function*(){const{fileName:r,tree:n,addressToFrameMap:s,runNumber:i}=e,o=f(n,i);let a=yield p(o);const c=yield d(a,o),l=new Map;for(let e of a)l.set(e.threadID,(0,t.getOrElse)(l,e.threadID,()=>0)+1);const u=Array.from(l.entries());(0,t.sortBy)(u,e=>-e[1]);const h=u.map(e=>e[0]);return{name:r,indexToView:0,profiles:h.map(e=>b({threadID:e,fileName:r,arrays:c,addressToFrameMap:s,samples:a}))}})}function b(n){let{fileName:s,addressToFrameMap:i,arrays:o,threadID:a,samples:c}=n;const l=new Map;c=c.filter(e=>e.threadID===a);const u=new e.StackListProfileBuilder((0,t.lastOf)(c).timestamp);function f(e,r){const n=i.get(e);if(n)r.push(n);else if(e in o)for(let t of o[e])f(t,r);else{const n={key:e,name:`0x${(0,t.zeroPad)(e.toString(16),16)}`};i.set(e,n),r.push(n)}}u.setName(`${s} - thread ${a}`);let h=null;for(let e of c){const r=(0,t.getOrInsert)(l,e.backtraceID,e=>{const t=[];return f(e,t),t.reverse(),t});if(null===h&&(u.appendSampleWithWeight([],e.timestamp),h=e.timestamp),e.timestamp{switch(e){case"NSTextStorage":case"NSParagraphStyle":case"NSFont":return null;case"PFTSymbolData":{const e=Object.create(null);e.symbolName=t.$0,e.sourcePath=t.$1,e.addressToLine=new Map;for(let r=3;;r+=2){const n=t["$"+r],s=t["$"+(r+1)];if(null==n||null==s)break;e.addressToLine.set(n,s)}return e}case"PFTOwnerData":{const e=Object.create(null);return e.ownerName=t.$0,e.ownerPath=t.$1,e}case"PFTPersistentSymbols":{const e=Object.create(null),r=t.$4;e.threadNames=t.$3,e.symbols=[];for(let n=1;ne)){if(1e5!==e.$version||"NSKeyedArchiver"!==e.$archiver||!S(e.$top)||!U(e.$objects))throw new Error("Invalid keyed archive");"$null"===e.$objects[0]&&(e.$objects[0]=null);for(let n=0;n{if(t instanceof x)return e.$objects[t.index];if(U(t))for(let e=0;ee)){if(S(t)&&t.$class){let n=N(e,t.$class).$classname;switch(n){case"NSDecimalNumberPlaceholder":{let e=t["NS.length"],r=t["NS.exponent"],n=t["NS.mantissa.bo"],s=t["NS.negative"],i=new Uint16Array(new Uint8Array(t["NS.mantissa"]).buffer),o=0;for(let t=0;t>8|(255&e)<<8),o+=e*Math.pow(65536,t)}return o*=Math.pow(10,r),s?-o:o}case"NSData":case"NSMutableData":return t["NS.bytes"]||t["NS.data"];case"NSString":case"NSMutableString":return t["NS.string"]?t["NS.string"]:t["NS.bytes"]?v(t["NS.bytes"]):(console.warn(`Unexpected ${n} format: `,t),null);case"NSArray":case"NSMutableArray":if("NS.objects"in t)return t["NS.objects"];let e=[];for(;;){let r="NS.object."+e.length;if(!(r in t))break;e.push(t[r])}return e;case"_NSKeyedCoderOldStyleArray":{const e=t["NS.count"];let r=[];for(let n=0;n>4){case 0:return this.parseSingleton(e,r);case 1:return this.parseInteger(e,1<({key:e,name:e})),duration:parseInt(i,10)})}return t}function r(r){const n=t(r),i=n.reduce((e,t)=>e+t.duration,0),o=new e.StackListProfileBuilder(i);if(0===n.length)return null;for(let e of n)o.appendSampleWithWeight(e.stack,e.duration);return o.build()} },{"../lib/profile":"YG8z"}],"uNW1":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromFirefox=l;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters");function l(l){const n=l.profile,s=1===n.threads.length?n.threads[0]:n.threads.filter(e=>"GeckoMain"===e.name)[0],a=new Map;function o(e){let r=e[0];const l=[];for(;null!=r;){const e=s.stackTable.data[r],[t,n]=e;l.push(n),r=t}return l.reverse(),l.map(e=>{const r=s.frameTable.data[e],l=s.stringTable[r[0]],n=/(.*)\s+\((.*?)(?::(\d+))?(?::(\d+))?\)$/.exec(l);return n?n[2].startsWith("resource:")||"self-hosted"===n[2]||n[2].startsWith("self-hosted:")?null:(0,t.getOrInsert)(a,l,()=>({key:l,name:n[1],file:n[2],line:n[3]?parseInt(n[3]):void 0,col:n[4]?parseInt(n[4])+1:void 0})):null}).filter(e=>null!=e)}const i=new e.CallTreeProfileBuilder(l.duration);let u=[];for(let e of s.samples.data){const t=o(e),r=e[1];let l=-1;for(let e=0;el;e--)i.leaveFrame(u[e],r);for(let e=l+1;e0?e[1]:t?`(anonymous ${t.split("/").pop()}:${a})`:"(anonymous)",file:t.length>0?t:"(unknown file)",line:a,col:n}}break}case"CODE":switch(e.kind){case"LoadIC":case"StoreIC":case"KeyedStoreIC":case"KeyedLoadIC":case"LoadGlobalIC":case"Handler":r="(IC) "+r;break;case"BytecodeHandler":r="(bytecode) ~"+r;break;case"Stub":r="(stub) "+r;break;case"Builtin":r="(builtin) "+r;break;case"RegExp":r="(regexp) "+r}break;default:r=`(${e.type}) ${r}`}return{key:r,name:r}}function n(n){const o=new e.StackListProfileBuilder,s=new Map;let c=0;(0,t.sortBy)(n.ticks,e=>e.tm);for(let e of n.ticks){const r=[];for(let o=e.s.length-2;o>=0;o-=2){const c=e.s[o];-1!==c&&(c>n.code.length?r.push({key:c,name:`0x${c.toString(16)}`}):r.push((i=c,(0,t.getOrInsert)(s,i,e=>a(n.code[e],n)))))}o.appendSampleWithWeight(r,e.tm-c),c=e.tm}var i;return o.setValueFormatter(new r.TimeFormatter("microseconds")),o.build()} },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"f2sa":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromLinuxPerf=l;var e=require("../lib/profile"),t=require("../lib/utils"),n=require("../lib/value-formatters");function*r(e){let t=[];for(let n of e.splitLines())""===n?(yield s(t),t=[]):t.push(n);t.length>0&&(yield s(t))}function s(e){const t=e.filter(e=>!/^\s*#/.exec(e)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},r=t.shift();if(!r)return null;const s=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(r);if(!s)return null;n.command=s[1],s[3]?(n.processID=parseInt(s[2],10),n.threadID=parseInt(s[3],10)):n.threadID=parseInt(s[2],10);const l=/\s+(\d+\.\d+):\s+/.exec(r);l&&(n.time=parseFloat(l[1]));const i=/(\S+):\s*$/.exec(r);i&&(n.eventType=i[1]);for(let o of t){const e=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(o);if(!e)continue;let[,t,r,s]=e;r=r.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${t}`,symbolName:r,file:s})}return n.stack.reverse(),n}function l(s){const l=new Map;let i=null;for(let o of r(s)){if(null==o)continue;if(null!=i&&i!=o.eventType)continue;if(null==o.time)continue;i=o.eventType;let r=[];o.command&&r.push(o.command),o.processID&&r.push(`pid: ${o.processID}`),o.threadID&&r.push(`tid: ${o.threadID}`);const s=r.join(" ");(0,t.getOrInsert)(l,s,()=>{const t=new e.StackListProfileBuilder;return t.setName(s),t.setValueFormatter(new n.TimeFormatter("seconds")),t}).appendSampleWithTimestamp(o.stack.map(({symbolName:e,file:t})=>({key:`${e} (${t})`,name:"[unknown]"===e?`??? (${t})`:e,file:t})),o.time)}return 0===l.size?null:{name:1===l.size?Array.from(l.keys())[0]:"",indexToView:0,profiles:Array.from((0,t.itMap)(l.values(),e=>e.build()))}} },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"jm73":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromHaskell=l;var e=require("../lib/profile"),r=require("../lib/value-formatters");function t(e,r,l,o,i){if(0===e.ticks&&0===e.entries&&0===e.alloc&&0===e.children.length)return r;let a=r,s=o.get(e.id);l.enterFrame(s,a);for(let n of e.children)a=t(n,a,l,o,i);return a+=i(e),l.leaveFrame(s,a),a}function l(l){const o=new Map;for(let e of l.cost_centres){const r={key:e.id,name:`${e.module}.${e.label}`};e.src_loc.startsWith("<")||(r.file=e.src_loc),o.set(e.id,r)}const i=new e.CallTreeProfileBuilder(l.total_ticks);t(l.profile,0,i,o,e=>e.ticks),i.setValueFormatter(new r.TimeFormatter("milliseconds")),i.setName(`${l.program} time`);const a=new e.CallTreeProfileBuilder(l.total_ticks);return t(l.profile,0,a,o,e=>e.alloc),a.setValueFormatter(new r.ByteFormatter),a.setName(`${l.program} allocation`),{name:l.program,indexToView:0,profiles:[i.build(),a.build()]}} },{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"jP3w":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromSafari=i;var e=require("../lib/profile"),r=require("../lib/value-formatters");function t(e){return e.map(({name:e,url:r,line:t,column:i})=>({key:`${e}:${r}:${t}:${i}`,file:r,line:t,col:i,name:e||(r?`(anonymous ${r.split("/").pop()}:${t})`:"(anonymous)")})).reverse()}function i(i){1!==i.version&&console.warn(`Unknown Safari profile version ${i.version}... Might be incompatible.`);const{recording:n}=i,{sampleStackTraces:a,sampleDurations:o}=n,s=a.length;if(s<1)return console.warn("Empty profile"),null;const l=a[s-1].timestamp-a[0].timestamp+o[0],m=new e.StackListProfileBuilder(l);let p=Number.MAX_VALUE;return a.forEach((e,r)=>{const i=e.timestamp,n=o[r],a=i-n-p;a>.002&&m.appendSampleWithWeight([],a),m.appendSampleWithWeight(t(e.stackFrames),n),p=i}),m.setValueFormatter(new r.TimeFormatter("seconds")),m.setName(n.displayName),m.build()} },{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"oU4k":[function(require,module,exports) { "use strict";function n(n,e){for(var r=new Array(arguments.length-1),t=0,l=2,o=!0;l1&&"="===r.charAt(e);)++a;return Math.ceil(3*r.length)/4-a};for(var e=new Array(64),a=new Array(123),t=0;t<64;)a[e[t]=t<26?t+65:t<52?t+71:t<62?t-4:t-59|43]=t++;r.encode=function(r,a,t){for(var n,i=null,o=[],c=0,s=0;a>2],n=(3&h)<<4,s=1;break;case 1:o[c++]=e[n|h>>4],n=(15&h)<<2,s=2;break;case 2:o[c++]=e[n|h>>6],o[c++]=e[63&h],s=0}c>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),c=0)}return s&&(o[c++]=e[n],o[c++]=61,1===s&&(o[c++]=61)),i?(c&&i.push(String.fromCharCode.apply(String,o.slice(0,c))),i.join("")):String.fromCharCode.apply(String,o.slice(0,c))};var n="invalid encoding";r.decode=function(r,e,t){for(var i,o=t,c=0,s=0;s1)break;if(void 0===(h=a[h]))throw Error(n);switch(c){case 0:i=h,c=1;break;case 1:e[t++]=i<<2|(48&h)>>4,i=h,c=2;break;case 2:e[t++]=(15&i)<<4|(60&h)>>2,i=h,c=3;break;case 3:e[t++]=(3&i)<<6|h,c=0}}if(1===c)throw Error(n);return t-o},r.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}; },{}],"wJQW":[function(require,module,exports) { "use strict";function t(){this._listeners={}}module.exports=t,t.prototype.on=function(t,s,e){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:s,ctx:e||this}),this},t.prototype.off=function(t,s){if(void 0===t)this._listeners={};else if(void 0===s)this._listeners[t]=[];else for(var e=this._listeners[t],i=0;i0?0:2147483648,t,r);else if(isNaN(e))n(2143289344,t,r);else if(e>3.4028234663852886e38)n((o<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)n((o<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var u=Math.floor(Math.log(e)/Math.LN2);n((o<<31|u+127<<23|8388607&Math.round(e*Math.pow(2,-u)*8388608))>>>0,t,r)}}function i(n,e,t){var r=n(e,t),o=2*(r>>31)+1,u=r>>>23&255,i=8388607&r;return 255===u?i?NaN:o*(1/0):0===u?1.401298464324817e-45*o*i:o*Math.pow(2,u-150)*(i+8388608)}n.writeFloatLE=u.bind(null,e),n.writeFloatBE=u.bind(null,t),n.readFloatLE=i.bind(null,r),n.readFloatBE=i.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),r=128===t[7];function o(n,r,o){e[0]=n,r[o]=t[0],r[o+1]=t[1],r[o+2]=t[2],r[o+3]=t[3],r[o+4]=t[4],r[o+5]=t[5],r[o+6]=t[6],r[o+7]=t[7]}function u(n,r,o){e[0]=n,r[o]=t[7],r[o+1]=t[6],r[o+2]=t[5],r[o+3]=t[4],r[o+4]=t[3],r[o+5]=t[2],r[o+6]=t[1],r[o+7]=t[0]}function i(n,r){return t[0]=n[r],t[1]=n[r+1],t[2]=n[r+2],t[3]=n[r+3],t[4]=n[r+4],t[5]=n[r+5],t[6]=n[r+6],t[7]=n[r+7],e[0]}function a(n,r){return t[7]=n[r],t[6]=n[r+1],t[5]=n[r+2],t[4]=n[r+3],t[3]=n[r+4],t[2]=n[r+5],t[1]=n[r+6],t[0]=n[r+7],e[0]}n.writeDoubleLE=r?o:u,n.writeDoubleBE=r?u:o,n.readDoubleLE=r?i:a,n.readDoubleBE=r?a:i}():function(){function u(n,e,t,r,o,u){var i=r<0?1:0;if(i&&(r=-r),0===r)n(0,o,u+e),n(1/r>0?0:2147483648,o,u+t);else if(isNaN(r))n(0,o,u+e),n(2146959360,o,u+t);else if(r>1.7976931348623157e308)n(0,o,u+e),n((i<<31|2146435072)>>>0,o,u+t);else{var a;if(r<2.2250738585072014e-308)n((a=r/5e-324)>>>0,o,u+e),n((i<<31|a/4294967296)>>>0,o,u+t);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),n(4503599627370496*(a=r*Math.pow(2,-l))>>>0,o,u+e),n((i<<31|l+1023<<20|1048576*a&1048575)>>>0,o,u+t)}}}function i(n,e,t,r,o){var u=n(r,o+e),i=n(r,o+t),a=2*(i>>31)+1,l=i>>>20&2047,f=4294967296*(1048575&i)+u;return 2047===l?f?NaN:a*(1/0):0===l?5e-324*a*f:a*Math.pow(2,l-1075)*(f+4503599627370496)}n.writeDoubleLE=u.bind(null,e,0,4),n.writeDoubleBE=u.bind(null,t,4,0),n.readDoubleLE=i.bind(null,r,0,4),n.readDoubleBE=i.bind(null,o,4,0)}(),n}function e(n,e,t){e[t]=255&n,e[t+1]=n>>>8&255,e[t+2]=n>>>16&255,e[t+3]=n>>>24}function t(n,e,t){e[t]=n>>>24,e[t+1]=n>>>16&255,e[t+2]=n>>>8&255,e[t+3]=255&n}function r(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24)>>>0}function o(n,e){return(n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3])>>>0}module.exports=n(n); },{}],"XRF3":[function(require,module,exports) { "use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire; },{}],"nie5":[function(require,module,exports) { "use strict";var r=exports;r.length=function(r){for(var t=0,n=0,e=0;e191&&e<224?a[i++]=(31&e)<<6|63&r[t++]:e>239&&e<365?(e=((7&e)<<18|(63&r[t++])<<12|(63&r[t++])<<6|63&r[t++])-65536,a[i++]=55296+(e>>10),a[i++]=56320+(1023&e)):a[i++]=(15&e)<<12|(63&r[t++])<<6|63&r[t++],i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),i=0);return o?(i&&o.push(String.fromCharCode.apply(String,a.slice(0,i))),o.join("")):String.fromCharCode.apply(String,a.slice(0,i))},r.write=function(r,t,n){for(var e,o,a=n,i=0;i>6|192,t[n++]=63&e|128):55296==(64512&e)&&56320==(64512&(o=r.charCodeAt(i+1)))?(e=65536+((1023&e)<<10)+(1023&o),++i,t[n++]=e>>18|240,t[n++]=e>>12&63|128,t[n++]=e>>6&63|128,t[n++]=63&e|128):(t[n++]=e>>12|224,t[n++]=e>>6&63|128,t[n++]=63&e|128);return n-a}; },{}],"YX4y":[function(require,module,exports) { "use strict";function r(r,n,t){var u=t||8192,e=u>>>1,l=null,c=u;return function(t){if(t<1||t>e)return r(t);c+t>u&&(l=r(u),c=0);var i=n.call(l,c,c+=t);return 7&c&&(c=1+(7|c)),i}}module.exports=r; },{}],"Ty7D":[function(require,module,exports) { "use strict";module.exports=i;var t=require("../util/minimal");function i(t,i){this.lo=t>>>0,this.hi=i>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var r=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var r=t<0;r&&(t=-t);var h=t>>>0,n=(t-h)/4294967296>>>0;return r&&(n=~n>>>0,h=~h>>>0,++h>4294967295&&(h=0,++n>4294967295&&(n=0))),new i(h,n)},i.from=function(r){if("number"==typeof r)return i.fromNumber(r);if(t.isString(r)){if(!t.Long)return i.fromNumber(parseInt(r,10));r=t.Long.fromString(r)}return r.low||r.high?new i(r.low>>>0,r.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,o=~this.hi>>>0;return i||(o=o+1>>>0),-(i+4294967296*o)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(i){return t.Long?new t.Long(0|this.lo,0|this.hi,Boolean(i)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(i)}};var h=String.prototype.charCodeAt;i.fromHash=function(t){return t===r?o:new i((h.call(t,0)|h.call(t,1)<<8|h.call(t,2)<<16|h.call(t,3)<<24)>>>0,(h.call(t,4)|h.call(t,5)<<8|h.call(t,6)<<16|h.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return 0===o?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:o<128?9:10}; },{"../util/minimal":"KgKa"}],"yh9p":[function(require,module,exports) { "use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; },{}],"JgNJ":[function(require,module,exports) { exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; },{}],"REa7":[function(require,module,exports) { var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; },{}],"dskh":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} },{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"KgKa":[function(require,module,exports) { var global = arguments[3]; var Buffer = require("buffer").Buffer; var e=arguments[3],r=require("buffer").Buffer,t=exports;function n(e,r,t){for(var n=Object.keys(r),o=0;o0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(r){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(Boolean(r))},t.merge=n,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=o,t.ProtocolError=o("ProtocolError"),t.oneOfGetter=function(e){for(var r={},t=0;t-1;--t)if(1===r[e[t]]&&void 0!==this[e[t]]&&null!==this[e[t]])return e[t]}},t.oneOfSetter=function(e){return function(r){for(var t=0;t127;)i[n++]=127&t|128,t>>>=7;i[n]=t}function a(t,i){this.len=t,this.next=void 0,this.val=i}function f(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function c(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}u.create=i.Buffer?function(){return(u.create=function(){return new t})()}:function(){return new u},u.alloc=function(t){return new i.Array(t)},i.Array!==Array&&(u.alloc=i.pool(u.alloc,i.Array.prototype.subarray)),u.prototype._push=function(t,i,n){return this.tail=this.tail.next=new r(t,i,n),this.len+=i,this},a.prototype=Object.create(r.prototype),a.prototype.fn=p,u.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new a((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},u.prototype.int32=function(t){return t<0?this._push(f,10,n.fromNumber(t)):this.uint32(t)},u.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},u.prototype.uint64=function(t){var i=n.from(t);return this._push(f,i.length(),i)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(t){var i=n.from(t).zzEncode();return this._push(f,i.length(),i)},u.prototype.bool=function(t){return this._push(l,1,t?1:0)},u.prototype.fixed32=function(t){return this._push(c,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(t){var i=n.from(t);return this._push(c,4,i.lo)._push(c,4,i.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this._push(i.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this._push(i.float.writeDoubleLE,8,t)};var y=i.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var e=0;e>>0;if(!n)return this._push(l,1,0);if(i.isString(t)){var o=u.alloc(n=e.length(t));e.decode(t,o,0),t=o}return this.uint32(n)._push(y,n,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i)._push(o.write,i,t):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new h(this),this.head=this.tail=new r(s,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(s,0,0),this.len=0),this},u.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},u.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},u._configure=function(i){t=i}; },{"./util/minimal":"KgKa"}],"BjCp":[function(require,module,exports) { "use strict";module.exports=n;var t=require("./writer");(n.prototype=Object.create(t.prototype)).constructor=n;var e=require("./util/minimal"),r=e.Buffer;function n(){t.call(this)}n.alloc=function(t){return(n.alloc=e._Buffer_allocUnsafe)(t)};var i=r&&r.prototype instanceof Uint8Array&&"set"===r.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n>>0;return this.uint32(r),r&&this._push(i,r,t),this},n.prototype.string=function(t){var e=r.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this}; },{"./writer":"DEsF","./util/minimal":"KgKa"}],"z4LV":[function(require,module,exports) { "use strict";module.exports=h;var t,i=require("./util/minimal"),s=i.LongBits,r=i.utf8;function o(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}var n="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function e(){var t=new s(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw o(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw o(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function u(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw o(this,8);return new s(u(this.buf,this.pos+=4),u(this.buf,this.pos+=4))}h.create=i.Buffer?function(s){return(h.create=function(s){return i.Buffer.isBuffer(s)?new t(s):n(s)})(s)}:n,h.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,h.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return t}}(),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return u(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|u(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,s=this.pos+t;if(s>this.len)throw o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,s):i===s?new this.buf.constructor(0):this._slice.call(this.buf,i,s)},h.prototype.string=function(){var t=this.bytes();return r.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},h.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h._configure=function(s){t=s;var r=i.Long?"toLong":"toNumber";i.merge(h.prototype,{int64:function(){return e.call(this)[r](!1)},uint64:function(){return e.call(this)[r](!0)},sint64:function(){return e.call(this).zzDecode()[r](!1)},fixed64:function(){return f.call(this)[r](!0)},sfixed64:function(){return f.call(this)[r](!1)}})}; },{"./util/minimal":"KgKa"}],"Rkr2":[function(require,module,exports) { "use strict";module.exports=r;var t=require("./reader");(r.prototype=Object.create(t.prototype)).constructor=r;var e=require("./util/minimal");function r(e){t.call(this,e)}e.Buffer&&(r.prototype._slice=e.Buffer.prototype.slice),r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}; },{"./reader":"z4LV","./util/minimal":"KgKa"}],"eoks":[function(require,module,exports) { "use strict";module.exports=t;var e=require("../util/minimal");function t(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(r,i,n,o,l){if(!o)throw TypeError("request must be specified");var u=this;if(!l)return e.asPromise(t,u,r,i,n,o);if(u.rpcImpl)try{return u.rpcImpl(r,i[u.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return u.emit("error",e,r),l(e);if(null!==t){if(!(t instanceof n))try{t=n[u.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return u.emit("error",e,r),l(e)}return u.emit("data",t,r),l(null,t)}u.end(!0)})}catch(c){return u.emit("error",c,r),void setTimeout(function(){l(c)},0)}else setTimeout(function(){l(Error("already ended"))},0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}; },{"../util/minimal":"KgKa"}],"ay75":[function(require,module,exports) { "use strict";var e=exports;e.Service=require("./rpc/service"); },{"./rpc/service":"eoks"}],"Nr0F":[function(require,module,exports) { "use strict";module.exports={}; },{}],"qETn":[function(require,module,exports) { "use strict";var r=exports;function e(){r.Reader._configure(r.BufferReader),r.util._configure()}r.build="minimal",r.Writer=require("./writer"),r.BufferWriter=require("./writer_buffer"),r.Reader=require("./reader"),r.BufferReader=require("./reader_buffer"),r.util=require("./util/minimal"),r.rpc=require("./rpc"),r.roots=require("./roots"),r.configure=e,r.Writer._configure(r.BufferWriter),e(); },{"./writer":"DEsF","./writer_buffer":"BjCp","./reader":"z4LV","./reader_buffer":"Rkr2","./util/minimal":"KgKa","./rpc":"ay75","./roots":"Nr0F"}],"Myh2":[function(require,module,exports) { "use strict";module.exports=require("./src/index-minimal"); },{"./src/index-minimal":"qETn"}],"YdJi":[function(require,module,exports) { "use strict";var e=require("protobufjs/minimal"),n=e.Reader,t=e.Writer,o=e.util,r=e.roots.default||(e.roots.default={});r.perftools=function(){var i,l={};return l.profiles=((i={}).Profile=function(){function i(e){if(this.sampleType=[],this.sample=[],this.mapping=[],this.location=[],this.function=[],this.stringTable=[],this.comment=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.sampleType&&i.sampleType.length||(i.sampleType=[]),i.sampleType.push(r.perftools.profiles.ValueType.decode(e,e.uint32()));break;case 2:i.sample&&i.sample.length||(i.sample=[]),i.sample.push(r.perftools.profiles.Sample.decode(e,e.uint32()));break;case 3:i.mapping&&i.mapping.length||(i.mapping=[]),i.mapping.push(r.perftools.profiles.Mapping.decode(e,e.uint32()));break;case 4:i.location&&i.location.length||(i.location=[]),i.location.push(r.perftools.profiles.Location.decode(e,e.uint32()));break;case 5:i.function&&i.function.length||(i.function=[]),i.function.push(r.perftools.profiles.Function.decode(e,e.uint32()));break;case 6:i.stringTable&&i.stringTable.length||(i.stringTable=[]),i.stringTable.push(e.string());break;case 7:i.dropFrames=e.int64();break;case 8:i.keepFrames=e.int64();break;case 9:i.timeNanos=e.int64();break;case 10:i.durationNanos=e.int64();break;case 11:i.periodType=r.perftools.profiles.ValueType.decode(e,e.uint32());break;case 12:i.period=e.int64();break;case 13:if(i.comment&&i.comment.length||(i.comment=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos>>0,e.dropFrames.high>>>0).toNumber())),null!=e.keepFrames&&(o.Long?(n.keepFrames=o.Long.fromValue(e.keepFrames)).unsigned=!1:"string"==typeof e.keepFrames?n.keepFrames=parseInt(e.keepFrames,10):"number"==typeof e.keepFrames?n.keepFrames=e.keepFrames:"object"==typeof e.keepFrames&&(n.keepFrames=new o.LongBits(e.keepFrames.low>>>0,e.keepFrames.high>>>0).toNumber())),null!=e.timeNanos&&(o.Long?(n.timeNanos=o.Long.fromValue(e.timeNanos)).unsigned=!1:"string"==typeof e.timeNanos?n.timeNanos=parseInt(e.timeNanos,10):"number"==typeof e.timeNanos?n.timeNanos=e.timeNanos:"object"==typeof e.timeNanos&&(n.timeNanos=new o.LongBits(e.timeNanos.low>>>0,e.timeNanos.high>>>0).toNumber())),null!=e.durationNanos&&(o.Long?(n.durationNanos=o.Long.fromValue(e.durationNanos)).unsigned=!1:"string"==typeof e.durationNanos?n.durationNanos=parseInt(e.durationNanos,10):"number"==typeof e.durationNanos?n.durationNanos=e.durationNanos:"object"==typeof e.durationNanos&&(n.durationNanos=new o.LongBits(e.durationNanos.low>>>0,e.durationNanos.high>>>0).toNumber())),null!=e.periodType){if("object"!=typeof e.periodType)throw TypeError(".perftools.profiles.Profile.periodType: object expected");n.periodType=r.perftools.profiles.ValueType.fromObject(e.periodType)}if(null!=e.period&&(o.Long?(n.period=o.Long.fromValue(e.period)).unsigned=!1:"string"==typeof e.period?n.period=parseInt(e.period,10):"number"==typeof e.period?n.period=e.period:"object"==typeof e.period&&(n.period=new o.LongBits(e.period.low>>>0,e.period.high>>>0).toNumber())),e.comment){if(!Array.isArray(e.comment))throw TypeError(".perftools.profiles.Profile.comment: array expected");for(n.comment=[],t=0;t>>0,e.comment[t].high>>>0).toNumber())}return null!=e.defaultSampleType&&(o.Long?(n.defaultSampleType=o.Long.fromValue(e.defaultSampleType)).unsigned=!1:"string"==typeof e.defaultSampleType?n.defaultSampleType=parseInt(e.defaultSampleType,10):"number"==typeof e.defaultSampleType?n.defaultSampleType=e.defaultSampleType:"object"==typeof e.defaultSampleType&&(n.defaultSampleType=new o.LongBits(e.defaultSampleType.low>>>0,e.defaultSampleType.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if((n.arrays||n.defaults)&&(t.sampleType=[],t.sample=[],t.mapping=[],t.location=[],t.function=[],t.stringTable=[],t.comment=[]),n.defaults){if(o.Long){var i=new o.Long(0,0,!1);t.dropFrames=n.longs===String?i.toString():n.longs===Number?i.toNumber():i}else t.dropFrames=n.longs===String?"0":0;o.Long?(i=new o.Long(0,0,!1),t.keepFrames=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.keepFrames=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.timeNanos=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.timeNanos=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.durationNanos=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.durationNanos=n.longs===String?"0":0,t.periodType=null,o.Long?(i=new o.Long(0,0,!1),t.period=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.period=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!1),t.defaultSampleType=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.defaultSampleType=n.longs===String?"0":0}if(e.sampleType&&e.sampleType.length){t.sampleType=[];for(var l=0;l>>0,e.dropFrames.high>>>0).toNumber():e.dropFrames),null!=e.keepFrames&&e.hasOwnProperty("keepFrames")&&("number"==typeof e.keepFrames?t.keepFrames=n.longs===String?String(e.keepFrames):e.keepFrames:t.keepFrames=n.longs===String?o.Long.prototype.toString.call(e.keepFrames):n.longs===Number?new o.LongBits(e.keepFrames.low>>>0,e.keepFrames.high>>>0).toNumber():e.keepFrames),null!=e.timeNanos&&e.hasOwnProperty("timeNanos")&&("number"==typeof e.timeNanos?t.timeNanos=n.longs===String?String(e.timeNanos):e.timeNanos:t.timeNanos=n.longs===String?o.Long.prototype.toString.call(e.timeNanos):n.longs===Number?new o.LongBits(e.timeNanos.low>>>0,e.timeNanos.high>>>0).toNumber():e.timeNanos),null!=e.durationNanos&&e.hasOwnProperty("durationNanos")&&("number"==typeof e.durationNanos?t.durationNanos=n.longs===String?String(e.durationNanos):e.durationNanos:t.durationNanos=n.longs===String?o.Long.prototype.toString.call(e.durationNanos):n.longs===Number?new o.LongBits(e.durationNanos.low>>>0,e.durationNanos.high>>>0).toNumber():e.durationNanos),null!=e.periodType&&e.hasOwnProperty("periodType")&&(t.periodType=r.perftools.profiles.ValueType.toObject(e.periodType,n)),null!=e.period&&e.hasOwnProperty("period")&&("number"==typeof e.period?t.period=n.longs===String?String(e.period):e.period:t.period=n.longs===String?o.Long.prototype.toString.call(e.period):n.longs===Number?new o.LongBits(e.period.low>>>0,e.period.high>>>0).toNumber():e.period),e.comment&&e.comment.length)for(t.comment=[],l=0;l>>0,e.comment[l].high>>>0).toNumber():e.comment[l];return null!=e.defaultSampleType&&e.hasOwnProperty("defaultSampleType")&&("number"==typeof e.defaultSampleType?t.defaultSampleType=n.longs===String?String(e.defaultSampleType):e.defaultSampleType:t.defaultSampleType=n.longs===String?o.Long.prototype.toString.call(e.defaultSampleType):n.longs===Number?new o.LongBits(e.defaultSampleType.low>>>0,e.defaultSampleType.high>>>0).toNumber():e.defaultSampleType),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.ValueType=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.type=e.int64();break;case 2:i.unit=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!(o.isInteger(e.type)||e.type&&o.isInteger(e.type.low)&&o.isInteger(e.type.high))?"type: integer|Long expected":null!=e.unit&&e.hasOwnProperty("unit")&&!(o.isInteger(e.unit)||e.unit&&o.isInteger(e.unit.low)&&o.isInteger(e.unit.high))?"unit: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.ValueType)return e;var n=new r.perftools.profiles.ValueType;return null!=e.type&&(o.Long?(n.type=o.Long.fromValue(e.type)).unsigned=!1:"string"==typeof e.type?n.type=parseInt(e.type,10):"number"==typeof e.type?n.type=e.type:"object"==typeof e.type&&(n.type=new o.LongBits(e.type.low>>>0,e.type.high>>>0).toNumber())),null!=e.unit&&(o.Long?(n.unit=o.Long.fromValue(e.unit)).unsigned=!1:"string"==typeof e.unit?n.unit=parseInt(e.unit,10):"number"==typeof e.unit?n.unit=e.unit:"object"==typeof e.unit&&(n.unit=new o.LongBits(e.unit.low>>>0,e.unit.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!1);t.type=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.type=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.unit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.unit=n.longs===String?"0":0}return null!=e.type&&e.hasOwnProperty("type")&&("number"==typeof e.type?t.type=n.longs===String?String(e.type):e.type:t.type=n.longs===String?o.Long.prototype.toString.call(e.type):n.longs===Number?new o.LongBits(e.type.low>>>0,e.type.high>>>0).toNumber():e.type),null!=e.unit&&e.hasOwnProperty("unit")&&("number"==typeof e.unit?t.unit=n.longs===String?String(e.unit):e.unit:t.unit=n.longs===String?o.Long.prototype.toString.call(e.unit):n.longs===Number?new o.LongBits(e.unit.low>>>0,e.unit.high>>>0).toNumber():e.unit),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Sample=function(){function i(e){if(this.locationId=[],this.value=[],this.label=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:if(i.locationId&&i.locationId.length||(i.locationId=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos>>0,e.locationId[t].high>>>0).toNumber(!0))}if(e.value){if(!Array.isArray(e.value))throw TypeError(".perftools.profiles.Sample.value: array expected");for(n.value=[],t=0;t>>0,e.value[t].high>>>0).toNumber())}if(e.label){if(!Array.isArray(e.label))throw TypeError(".perftools.profiles.Sample.label: array expected");for(n.label=[],t=0;t>>0,e.locationId[i].high>>>0).toNumber(!0):e.locationId[i]}if(e.value&&e.value.length)for(t.value=[],i=0;i>>0,e.value[i].high>>>0).toNumber():e.value[i];if(e.label&&e.label.length)for(t.label=[],i=0;i>>3){case 1:i.key=e.int64();break;case 2:i.str=e.int64();break;case 3:i.num=e.int64();break;case 4:i.numUnit=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(o.isInteger(e.key)||e.key&&o.isInteger(e.key.low)&&o.isInteger(e.key.high))?"key: integer|Long expected":null!=e.str&&e.hasOwnProperty("str")&&!(o.isInteger(e.str)||e.str&&o.isInteger(e.str.low)&&o.isInteger(e.str.high))?"str: integer|Long expected":null!=e.num&&e.hasOwnProperty("num")&&!(o.isInteger(e.num)||e.num&&o.isInteger(e.num.low)&&o.isInteger(e.num.high))?"num: integer|Long expected":null!=e.numUnit&&e.hasOwnProperty("numUnit")&&!(o.isInteger(e.numUnit)||e.numUnit&&o.isInteger(e.numUnit.low)&&o.isInteger(e.numUnit.high))?"numUnit: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Label)return e;var n=new r.perftools.profiles.Label;return null!=e.key&&(o.Long?(n.key=o.Long.fromValue(e.key)).unsigned=!1:"string"==typeof e.key?n.key=parseInt(e.key,10):"number"==typeof e.key?n.key=e.key:"object"==typeof e.key&&(n.key=new o.LongBits(e.key.low>>>0,e.key.high>>>0).toNumber())),null!=e.str&&(o.Long?(n.str=o.Long.fromValue(e.str)).unsigned=!1:"string"==typeof e.str?n.str=parseInt(e.str,10):"number"==typeof e.str?n.str=e.str:"object"==typeof e.str&&(n.str=new o.LongBits(e.str.low>>>0,e.str.high>>>0).toNumber())),null!=e.num&&(o.Long?(n.num=o.Long.fromValue(e.num)).unsigned=!1:"string"==typeof e.num?n.num=parseInt(e.num,10):"number"==typeof e.num?n.num=e.num:"object"==typeof e.num&&(n.num=new o.LongBits(e.num.low>>>0,e.num.high>>>0).toNumber())),null!=e.numUnit&&(o.Long?(n.numUnit=o.Long.fromValue(e.numUnit)).unsigned=!1:"string"==typeof e.numUnit?n.numUnit=parseInt(e.numUnit,10):"number"==typeof e.numUnit?n.numUnit=e.numUnit:"object"==typeof e.numUnit&&(n.numUnit=new o.LongBits(e.numUnit.low>>>0,e.numUnit.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!1);t.key=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.key=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.str=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.str=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.num=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.num=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.numUnit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.numUnit=n.longs===String?"0":0}return null!=e.key&&e.hasOwnProperty("key")&&("number"==typeof e.key?t.key=n.longs===String?String(e.key):e.key:t.key=n.longs===String?o.Long.prototype.toString.call(e.key):n.longs===Number?new o.LongBits(e.key.low>>>0,e.key.high>>>0).toNumber():e.key),null!=e.str&&e.hasOwnProperty("str")&&("number"==typeof e.str?t.str=n.longs===String?String(e.str):e.str:t.str=n.longs===String?o.Long.prototype.toString.call(e.str):n.longs===Number?new o.LongBits(e.str.low>>>0,e.str.high>>>0).toNumber():e.str),null!=e.num&&e.hasOwnProperty("num")&&("number"==typeof e.num?t.num=n.longs===String?String(e.num):e.num:t.num=n.longs===String?o.Long.prototype.toString.call(e.num):n.longs===Number?new o.LongBits(e.num.low>>>0,e.num.high>>>0).toNumber():e.num),null!=e.numUnit&&e.hasOwnProperty("numUnit")&&("number"==typeof e.numUnit?t.numUnit=n.longs===String?String(e.numUnit):e.numUnit:t.numUnit=n.longs===String?o.Long.prototype.toString.call(e.numUnit):n.longs===Number?new o.LongBits(e.numUnit.low>>>0,e.numUnit.high>>>0).toNumber():e.numUnit),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Mapping=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.memoryStart=e.uint64();break;case 3:i.memoryLimit=e.uint64();break;case 4:i.fileOffset=e.uint64();break;case 5:i.filename=e.int64();break;case 6:i.buildId=e.int64();break;case 7:i.hasFunctions=e.bool();break;case 8:i.hasFilenames=e.bool();break;case 9:i.hasLineNumbers=e.bool();break;case 10:i.hasInlineFrames=e.bool();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high))?"id: integer|Long expected":null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&!(o.isInteger(e.memoryStart)||e.memoryStart&&o.isInteger(e.memoryStart.low)&&o.isInteger(e.memoryStart.high))?"memoryStart: integer|Long expected":null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&!(o.isInteger(e.memoryLimit)||e.memoryLimit&&o.isInteger(e.memoryLimit.low)&&o.isInteger(e.memoryLimit.high))?"memoryLimit: integer|Long expected":null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&!(o.isInteger(e.fileOffset)||e.fileOffset&&o.isInteger(e.fileOffset.low)&&o.isInteger(e.fileOffset.high))?"fileOffset: integer|Long expected":null!=e.filename&&e.hasOwnProperty("filename")&&!(o.isInteger(e.filename)||e.filename&&o.isInteger(e.filename.low)&&o.isInteger(e.filename.high))?"filename: integer|Long expected":null!=e.buildId&&e.hasOwnProperty("buildId")&&!(o.isInteger(e.buildId)||e.buildId&&o.isInteger(e.buildId.low)&&o.isInteger(e.buildId.high))?"buildId: integer|Long expected":null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&"boolean"!=typeof e.hasFunctions?"hasFunctions: boolean expected":null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&"boolean"!=typeof e.hasFilenames?"hasFilenames: boolean expected":null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&"boolean"!=typeof e.hasLineNumbers?"hasLineNumbers: boolean expected":null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&"boolean"!=typeof e.hasInlineFrames?"hasInlineFrames: boolean expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Mapping)return e;var n=new r.perftools.profiles.Mapping;return null!=e.id&&(o.Long?(n.id=o.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?n.id=parseInt(e.id,10):"number"==typeof e.id?n.id=e.id:"object"==typeof e.id&&(n.id=new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.memoryStart&&(o.Long?(n.memoryStart=o.Long.fromValue(e.memoryStart)).unsigned=!0:"string"==typeof e.memoryStart?n.memoryStart=parseInt(e.memoryStart,10):"number"==typeof e.memoryStart?n.memoryStart=e.memoryStart:"object"==typeof e.memoryStart&&(n.memoryStart=new o.LongBits(e.memoryStart.low>>>0,e.memoryStart.high>>>0).toNumber(!0))),null!=e.memoryLimit&&(o.Long?(n.memoryLimit=o.Long.fromValue(e.memoryLimit)).unsigned=!0:"string"==typeof e.memoryLimit?n.memoryLimit=parseInt(e.memoryLimit,10):"number"==typeof e.memoryLimit?n.memoryLimit=e.memoryLimit:"object"==typeof e.memoryLimit&&(n.memoryLimit=new o.LongBits(e.memoryLimit.low>>>0,e.memoryLimit.high>>>0).toNumber(!0))),null!=e.fileOffset&&(o.Long?(n.fileOffset=o.Long.fromValue(e.fileOffset)).unsigned=!0:"string"==typeof e.fileOffset?n.fileOffset=parseInt(e.fileOffset,10):"number"==typeof e.fileOffset?n.fileOffset=e.fileOffset:"object"==typeof e.fileOffset&&(n.fileOffset=new o.LongBits(e.fileOffset.low>>>0,e.fileOffset.high>>>0).toNumber(!0))),null!=e.filename&&(o.Long?(n.filename=o.Long.fromValue(e.filename)).unsigned=!1:"string"==typeof e.filename?n.filename=parseInt(e.filename,10):"number"==typeof e.filename?n.filename=e.filename:"object"==typeof e.filename&&(n.filename=new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber())),null!=e.buildId&&(o.Long?(n.buildId=o.Long.fromValue(e.buildId)).unsigned=!1:"string"==typeof e.buildId?n.buildId=parseInt(e.buildId,10):"number"==typeof e.buildId?n.buildId=e.buildId:"object"==typeof e.buildId&&(n.buildId=new o.LongBits(e.buildId.low>>>0,e.buildId.high>>>0).toNumber())),null!=e.hasFunctions&&(n.hasFunctions=Boolean(e.hasFunctions)),null!=e.hasFilenames&&(n.hasFilenames=Boolean(e.hasFilenames)),null!=e.hasLineNumbers&&(n.hasLineNumbers=Boolean(e.hasLineNumbers)),null!=e.hasInlineFrames&&(n.hasInlineFrames=Boolean(e.hasInlineFrames)),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.id=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.id=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!0),t.memoryStart=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.memoryStart=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!0),t.memoryLimit=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.memoryLimit=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!0),t.fileOffset=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.fileOffset=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.filename=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.filename=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.buildId=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.buildId=n.longs===String?"0":0,t.hasFunctions=!1,t.hasFilenames=!1,t.hasLineNumbers=!1,t.hasInlineFrames=!1}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?t.id=n.longs===String?String(e.id):e.id:t.id=n.longs===String?o.Long.prototype.toString.call(e.id):n.longs===Number?new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&("number"==typeof e.memoryStart?t.memoryStart=n.longs===String?String(e.memoryStart):e.memoryStart:t.memoryStart=n.longs===String?o.Long.prototype.toString.call(e.memoryStart):n.longs===Number?new o.LongBits(e.memoryStart.low>>>0,e.memoryStart.high>>>0).toNumber(!0):e.memoryStart),null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&("number"==typeof e.memoryLimit?t.memoryLimit=n.longs===String?String(e.memoryLimit):e.memoryLimit:t.memoryLimit=n.longs===String?o.Long.prototype.toString.call(e.memoryLimit):n.longs===Number?new o.LongBits(e.memoryLimit.low>>>0,e.memoryLimit.high>>>0).toNumber(!0):e.memoryLimit),null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&("number"==typeof e.fileOffset?t.fileOffset=n.longs===String?String(e.fileOffset):e.fileOffset:t.fileOffset=n.longs===String?o.Long.prototype.toString.call(e.fileOffset):n.longs===Number?new o.LongBits(e.fileOffset.low>>>0,e.fileOffset.high>>>0).toNumber(!0):e.fileOffset),null!=e.filename&&e.hasOwnProperty("filename")&&("number"==typeof e.filename?t.filename=n.longs===String?String(e.filename):e.filename:t.filename=n.longs===String?o.Long.prototype.toString.call(e.filename):n.longs===Number?new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber():e.filename),null!=e.buildId&&e.hasOwnProperty("buildId")&&("number"==typeof e.buildId?t.buildId=n.longs===String?String(e.buildId):e.buildId:t.buildId=n.longs===String?o.Long.prototype.toString.call(e.buildId):n.longs===Number?new o.LongBits(e.buildId.low>>>0,e.buildId.high>>>0).toNumber():e.buildId),null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&(t.hasFunctions=e.hasFunctions),null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&(t.hasFilenames=e.hasFilenames),null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&(t.hasLineNumbers=e.hasLineNumbers),null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&(t.hasInlineFrames=e.hasInlineFrames),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Location=function(){function i(e){if(this.line=[],e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.mappingId=e.uint64();break;case 3:i.address=e.uint64();break;case 4:i.line&&i.line.length||(i.line=[]),i.line.push(r.perftools.profiles.Line.decode(e,e.uint32()));break;case 5:i.isFolded=e.bool();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high)))return"id: integer|Long expected";if(null!=e.mappingId&&e.hasOwnProperty("mappingId")&&!(o.isInteger(e.mappingId)||e.mappingId&&o.isInteger(e.mappingId.low)&&o.isInteger(e.mappingId.high)))return"mappingId: integer|Long expected";if(null!=e.address&&e.hasOwnProperty("address")&&!(o.isInteger(e.address)||e.address&&o.isInteger(e.address.low)&&o.isInteger(e.address.high)))return"address: integer|Long expected";if(null!=e.line&&e.hasOwnProperty("line")){if(!Array.isArray(e.line))return"line: array expected";for(var n=0;n>>0,e.id.high>>>0).toNumber(!0))),null!=e.mappingId&&(o.Long?(n.mappingId=o.Long.fromValue(e.mappingId)).unsigned=!0:"string"==typeof e.mappingId?n.mappingId=parseInt(e.mappingId,10):"number"==typeof e.mappingId?n.mappingId=e.mappingId:"object"==typeof e.mappingId&&(n.mappingId=new o.LongBits(e.mappingId.low>>>0,e.mappingId.high>>>0).toNumber(!0))),null!=e.address&&(o.Long?(n.address=o.Long.fromValue(e.address)).unsigned=!0:"string"==typeof e.address?n.address=parseInt(e.address,10):"number"==typeof e.address?n.address=e.address:"object"==typeof e.address&&(n.address=new o.LongBits(e.address.low>>>0,e.address.high>>>0).toNumber(!0))),e.line){if(!Array.isArray(e.line))throw TypeError(".perftools.profiles.Location.line: array expected");n.line=[];for(var t=0;t>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.mappingId&&e.hasOwnProperty("mappingId")&&("number"==typeof e.mappingId?t.mappingId=n.longs===String?String(e.mappingId):e.mappingId:t.mappingId=n.longs===String?o.Long.prototype.toString.call(e.mappingId):n.longs===Number?new o.LongBits(e.mappingId.low>>>0,e.mappingId.high>>>0).toNumber(!0):e.mappingId),null!=e.address&&e.hasOwnProperty("address")&&("number"==typeof e.address?t.address=n.longs===String?String(e.address):e.address:t.address=n.longs===String?o.Long.prototype.toString.call(e.address):n.longs===Number?new o.LongBits(e.address.low>>>0,e.address.high>>>0).toNumber(!0):e.address),e.line&&e.line.length){t.line=[];for(var l=0;l>>3){case 1:i.functionId=e.uint64();break;case 2:i.line=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.functionId&&e.hasOwnProperty("functionId")&&!(o.isInteger(e.functionId)||e.functionId&&o.isInteger(e.functionId.low)&&o.isInteger(e.functionId.high))?"functionId: integer|Long expected":null!=e.line&&e.hasOwnProperty("line")&&!(o.isInteger(e.line)||e.line&&o.isInteger(e.line.low)&&o.isInteger(e.line.high))?"line: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Line)return e;var n=new r.perftools.profiles.Line;return null!=e.functionId&&(o.Long?(n.functionId=o.Long.fromValue(e.functionId)).unsigned=!0:"string"==typeof e.functionId?n.functionId=parseInt(e.functionId,10):"number"==typeof e.functionId?n.functionId=e.functionId:"object"==typeof e.functionId&&(n.functionId=new o.LongBits(e.functionId.low>>>0,e.functionId.high>>>0).toNumber(!0))),null!=e.line&&(o.Long?(n.line=o.Long.fromValue(e.line)).unsigned=!1:"string"==typeof e.line?n.line=parseInt(e.line,10):"number"==typeof e.line?n.line=e.line:"object"==typeof e.line&&(n.line=new o.LongBits(e.line.low>>>0,e.line.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.functionId=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.functionId=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.line=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.line=n.longs===String?"0":0}return null!=e.functionId&&e.hasOwnProperty("functionId")&&("number"==typeof e.functionId?t.functionId=n.longs===String?String(e.functionId):e.functionId:t.functionId=n.longs===String?o.Long.prototype.toString.call(e.functionId):n.longs===Number?new o.LongBits(e.functionId.low>>>0,e.functionId.high>>>0).toNumber(!0):e.functionId),null!=e.line&&e.hasOwnProperty("line")&&("number"==typeof e.line?t.line=n.longs===String?String(e.line):e.line:t.line=n.longs===String?o.Long.prototype.toString.call(e.line):n.longs===Number?new o.LongBits(e.line.low>>>0,e.line.high>>>0).toNumber():e.line),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Function=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t>>3){case 1:i.id=e.uint64();break;case 2:i.name=e.int64();break;case 3:i.systemName=e.int64();break;case 4:i.filename=e.int64();break;case 5:i.startLine=e.int64();break;default:e.skipType(7&l)}}return i},i.decodeDelimited=function(e){return e instanceof n||(e=new n(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.id&&e.hasOwnProperty("id")&&!(o.isInteger(e.id)||e.id&&o.isInteger(e.id.low)&&o.isInteger(e.id.high))?"id: integer|Long expected":null!=e.name&&e.hasOwnProperty("name")&&!(o.isInteger(e.name)||e.name&&o.isInteger(e.name.low)&&o.isInteger(e.name.high))?"name: integer|Long expected":null!=e.systemName&&e.hasOwnProperty("systemName")&&!(o.isInteger(e.systemName)||e.systemName&&o.isInteger(e.systemName.low)&&o.isInteger(e.systemName.high))?"systemName: integer|Long expected":null!=e.filename&&e.hasOwnProperty("filename")&&!(o.isInteger(e.filename)||e.filename&&o.isInteger(e.filename.low)&&o.isInteger(e.filename.high))?"filename: integer|Long expected":null!=e.startLine&&e.hasOwnProperty("startLine")&&!(o.isInteger(e.startLine)||e.startLine&&o.isInteger(e.startLine.low)&&o.isInteger(e.startLine.high))?"startLine: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Function)return e;var n=new r.perftools.profiles.Function;return null!=e.id&&(o.Long?(n.id=o.Long.fromValue(e.id)).unsigned=!0:"string"==typeof e.id?n.id=parseInt(e.id,10):"number"==typeof e.id?n.id=e.id:"object"==typeof e.id&&(n.id=new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),null!=e.name&&(o.Long?(n.name=o.Long.fromValue(e.name)).unsigned=!1:"string"==typeof e.name?n.name=parseInt(e.name,10):"number"==typeof e.name?n.name=e.name:"object"==typeof e.name&&(n.name=new o.LongBits(e.name.low>>>0,e.name.high>>>0).toNumber())),null!=e.systemName&&(o.Long?(n.systemName=o.Long.fromValue(e.systemName)).unsigned=!1:"string"==typeof e.systemName?n.systemName=parseInt(e.systemName,10):"number"==typeof e.systemName?n.systemName=e.systemName:"object"==typeof e.systemName&&(n.systemName=new o.LongBits(e.systemName.low>>>0,e.systemName.high>>>0).toNumber())),null!=e.filename&&(o.Long?(n.filename=o.Long.fromValue(e.filename)).unsigned=!1:"string"==typeof e.filename?n.filename=parseInt(e.filename,10):"number"==typeof e.filename?n.filename=e.filename:"object"==typeof e.filename&&(n.filename=new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber())),null!=e.startLine&&(o.Long?(n.startLine=o.Long.fromValue(e.startLine)).unsigned=!1:"string"==typeof e.startLine?n.startLine=parseInt(e.startLine,10):"number"==typeof e.startLine?n.startLine=e.startLine:"object"==typeof e.startLine&&(n.startLine=new o.LongBits(e.startLine.low>>>0,e.startLine.high>>>0).toNumber())),n},i.toObject=function(e,n){n||(n={});var t={};if(n.defaults){if(o.Long){var r=new o.Long(0,0,!0);t.id=n.longs===String?r.toString():n.longs===Number?r.toNumber():r}else t.id=n.longs===String?"0":0;o.Long?(r=new o.Long(0,0,!1),t.name=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.name=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.systemName=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.systemName=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.filename=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.filename=n.longs===String?"0":0,o.Long?(r=new o.Long(0,0,!1),t.startLine=n.longs===String?r.toString():n.longs===Number?r.toNumber():r):t.startLine=n.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?t.id=n.longs===String?String(e.id):e.id:t.id=n.longs===String?o.Long.prototype.toString.call(e.id):n.longs===Number?new o.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),null!=e.name&&e.hasOwnProperty("name")&&("number"==typeof e.name?t.name=n.longs===String?String(e.name):e.name:t.name=n.longs===String?o.Long.prototype.toString.call(e.name):n.longs===Number?new o.LongBits(e.name.low>>>0,e.name.high>>>0).toNumber():e.name),null!=e.systemName&&e.hasOwnProperty("systemName")&&("number"==typeof e.systemName?t.systemName=n.longs===String?String(e.systemName):e.systemName:t.systemName=n.longs===String?o.Long.prototype.toString.call(e.systemName):n.longs===Number?new o.LongBits(e.systemName.low>>>0,e.systemName.high>>>0).toNumber():e.systemName),null!=e.filename&&e.hasOwnProperty("filename")&&("number"==typeof e.filename?t.filename=n.longs===String?String(e.filename):e.filename:t.filename=n.longs===String?o.Long.prototype.toString.call(e.filename):n.longs===Number?new o.LongBits(e.filename.low>>>0,e.filename.high>>>0).toNumber():e.filename),null!=e.startLine&&e.hasOwnProperty("startLine")&&("number"==typeof e.startLine?t.startLine=n.longs===String?String(e.startLine):e.startLine:t.startLine=n.longs===String?o.Long.prototype.toString.call(e.startLine):n.longs===Number?new o.LongBits(e.startLine.low>>>0,e.startLine.high>>>0).toNumber():e.startLine),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i),l}(),module.exports=r; },{"protobufjs/minimal":"Myh2"}],"YvD4":[function(require,module,exports) { module.exports=t;var i=null;try{i=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(L){}function t(i,t,n){this.low=0|i,this.high=0|t,this.unsigned=!!n}function n(i){return!0===(i&&i.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0}),t.isLong=n;var h={},s={};function e(i,t){var n,e,r;return t?(r=0<=(i>>>=0)&&i<256)&&(e=s[i])?e:(n=u(i,(0|i)<0?-1:0,!0),r&&(s[i]=n),n):(r=-128<=(i|=0)&&i<128)&&(e=h[i])?e:(n=u(i,i<0?-1:0,!1),r&&(h[i]=n),n)}function r(i,t){if(isNaN(i))return t?N:m;if(t){if(i<0)return N;if(i>=c)return p}else{if(i<=-w)return _;if(i+1>=w)return q}return i<0?r(-i,t).neg():u(i%d|0,i/d|0,t)}function u(i,n,h){return new t(i,n,h)}t.fromInt=e,t.fromNumber=r,t.fromBits=u;var o=Math.pow;function g(i,t,n){if(0===i.length)throw Error("empty string");if("NaN"===i||"Infinity"===i||"+Infinity"===i||"-Infinity"===i)return m;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===h)return g(i.substring(1),t,n).neg();for(var s=r(o(n,8)),e=m,u=0;u>>0:this.low},B.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},B.toString=function(i){if((i=i||10)<2||36>>0).toString(i);if((e=g).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},B.getHighBits=function(){return this.high},B.getHighBitsUnsigned=function(){return this.high>>>0},B.getLowBits=function(){return this.low},B.getLowBitsUnsigned=function(){return this.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var i=0!=this.high?this.high:this.low,t=31;t>0&&0==(i&1<=0},B.isOdd=function(){return 1==(1&this.low)},B.isEven=function(){return 0==(1&this.low)},B.equals=function(i){return n(i)||(i=f(i)),(this.unsigned===i.unsigned||this.high>>>31!=1||i.high>>>31!=1)&&(this.high===i.high&&this.low===i.low)},B.eq=B.equals,B.notEquals=function(i){return!this.eq(i)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(i){return this.comp(i)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(i){return this.comp(i)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(i){return this.comp(i)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(i){return this.comp(i)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(i){if(n(i)||(i=f(i)),this.eq(i))return 0;var t=this.isNegative(),h=i.isNegative();return t&&!h?-1:!t&&h?1:this.unsigned?i.high>>>0>this.high>>>0||i.high===this.high&&i.low>>>0>this.low>>>0?-1:1:this.sub(i).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(E)},B.neg=B.negate,B.add=function(i){n(i)||(i=f(i));var t=this.high>>>16,h=65535&this.high,s=this.low>>>16,e=65535&this.low,r=i.high>>>16,o=65535&i.high,g=i.low>>>16,l=0,a=0,d=0,c=0;return d+=(c+=e+(65535&i.low))>>>16,a+=(d+=s+g)>>>16,l+=(a+=h+o)>>>16,l+=t+r,u((d&=65535)<<16|(c&=65535),(l&=65535)<<16|(a&=65535),this.unsigned)},B.subtract=function(i){return n(i)||(i=f(i)),this.add(i.neg())},B.sub=B.subtract,B.multiply=function(t){if(this.isZero())return m;if(n(t)||(t=f(t)),i)return u(i.mul(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned);if(t.isZero())return m;if(this.eq(_))return t.isOdd()?_:m;if(t.eq(_))return this.isOdd()?_:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return r(this.toNumber()*t.toNumber(),this.unsigned);var h=this.high>>>16,s=65535&this.high,e=this.low>>>16,o=65535&this.low,g=t.high>>>16,l=65535&t.high,a=t.low>>>16,d=65535&t.low,c=0,w=0,N=0,E=0;return N+=(E+=o*d)>>>16,w+=(N+=e*d)>>>16,N&=65535,w+=(N+=o*a)>>>16,c+=(w+=s*d)>>>16,w&=65535,c+=(w+=e*a)>>>16,w&=65535,c+=(w+=o*l)>>>16,c+=h*d+s*a+e*l+o*g,u((N&=65535)<<16|(E&=65535),(c&=65535)<<16|(w&=65535),this.unsigned)},B.mul=B.multiply,B.divide=function(t){if(n(t)||(t=f(t)),t.isZero())throw Error("division by zero");var h,s,e;if(i)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?u((this.unsigned?i.div_u:i.div_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?N:m;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return N;if(t.gt(this.shru(1)))return y;e=N}else{if(this.eq(_))return t.eq(E)||t.eq(b)?_:t.eq(_)?E:(h=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?E:b:(s=this.sub(t.mul(h)),e=h.add(s.div(t)));if(t.eq(_))return this.unsigned?N:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=m}for(s=this;s.gte(t);){h=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var g=Math.ceil(Math.log(h)/Math.LN2),l=g<=48?1:o(2,g-48),a=r(h),d=a.mul(t);d.isNegative()||d.gt(s);)d=(a=r(h-=l,this.unsigned)).mul(t);a.isZero()&&(a=E),e=e.add(a),s=s.sub(d)}return e},B.div=B.divide,B.modulo=function(t){return n(t)||(t=f(t)),i?u((this.unsigned?i.rem_u:i.rem_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){return u(~this.low,~this.high,this.unsigned)},B.and=function(i){return n(i)||(i=f(i)),u(this.low&i.low,this.high&i.high,this.unsigned)},B.or=function(i){return n(i)||(i=f(i)),u(this.low|i.low,this.high|i.high,this.unsigned)},B.xor=function(i){return n(i)||(i=f(i)),u(this.low^i.low,this.high^i.high,this.unsigned)},B.shiftLeft=function(i){return n(i)&&(i=i.toInt()),0==(i&=63)?this:i<32?u(this.low<>>32-i,this.unsigned):u(0,this.low<>>i|this.high<<32-i,this.high>>i,this.unsigned):u(this.high>>i-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(i){if(n(i)&&(i=i.toInt()),0===(i&=63))return this;var t=this.high;return i<32?u(this.low>>>i|t<<32-i,t>>>i,this.unsigned):u(32===i?t:t>>>i-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},B.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},B.toBytes=function(i){return i?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){var i=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&i,i>>>8&255,i>>>16&255,i>>>24]},B.toBytesBE=function(){var i=this.high,t=this.low;return[i>>>24,i>>>16&255,i>>>8&255,255&i,t>>>24,t>>>16&255,t>>>8&255,255&t]},t.fromBytes=function(i,n,h){return h?t.fromBytesLE(i,n):t.fromBytesBE(i,n)},t.fromBytesLE=function(i,n){return new t(i[0]|i[1]<<8|i[2]<<16|i[3]<<24,i[4]|i[5]<<8|i[6]<<16|i[7]<<24,n)},t.fromBytesBE=function(i,n){return new t(i[4]<<24|i[5]<<16|i[6]<<8|i[7],i[0]<<24|i[1]<<16|i[2]<<8|i[3],n)}; },{}],"VmHy":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importAsPprofProfile=o;var e=require("./profile.proto.js"),n=require("../lib/profile"),t=require("../lib/utils"),l=require("../lib/value-formatters"),r=u(require("long"));function u(e){return e&&e.__esModule?e:{default:e}}function i(e){const n=e.defaultSampleType,t=e.sampleType,l=t.length-1;if(!n||!+n)return l;const r=t.findIndex(e=>e.type===n);return-1===r?l:r}function o(u){if(0===u.byteLength)return null;let o;try{o=e.perftools.profiles.Profile.decode(new Uint8Array(u))}catch(w){return null}function s(e){return"number"==typeof e?e:e.low}function a(e){return o.stringTable[s(e)]||null}const c=new Map;function f(e){const{name:n,filename:t,startLine:l}=e,r=null!=n&&a(n)||"(unknown)",u=null!=t?a(t):null,i=null!=l?+l:null,o={key:`${r}:${u}:${i}`,name:r};return null!=u&&(o.file=u),null!=i&&(o.line=i),o}for(let e of o.function)if(e.id){const n=f(e);null!=n&&c.set(s(e.id),n)}function p(e){const{line:n}=e;if(null==n)return null;const l=(0,t.lastOf)(n);if(null==l)return null;if(l.functionId){let e=c.get(s(l.functionId));const n=l.line instanceof r.default?l.line.toNumber():l.line;return n&&n>0&&null!=e&&(e.line=n),e||null}return null}const d=new Map;for(let e of o.location)if(null!=e.id){const n=p(e);n&&d.set(s(e.id),n)}const m=o.sampleType.map(e=>({type:e.type&&a(e.type)||"samples",unit:e.unit&&a(e.unit)||"count"})),y=i(o);if(y<0||y>=m.length)return null;const b=m[y],g=new n.StackListProfileBuilder;switch(b.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":g.setValueFormatter(new l.TimeFormatter(b.unit));break;case"bytes":g.setValueFormatter(new l.ByteFormatter)}for(let e of o.sample){const n=e.locationId?e.locationId.map(e=>d.get(s(e))):[];if(n.reverse(),null==e.value||e.value.length<=y)return null;const t=e.value[y];g.appendSampleWithWeight(n.filter(e=>null!=e),+t)}return g.build()} },{"./profile.proto.js":"YdJi","../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4","long":"YvD4"}],"bNW7":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromChromeHeapProfile=i;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters");const n=new Map;function o(e){return(0,t.getOrInsert)(n,e,e=>{const t=e.url,r=e.lineNumber,n=e.columnNumber,o=e.functionName||(t?`(anonymous ${t.split("/").pop()}:${r})`:"(anonymous)");return{key:`${o}:${t}:${r}:${n}`,name:o,file:t,line:r,col:n}})}function i(t){const n=new Map;let i=0;const l=(e,t)=>{e.id=i++,n.set(e.id,e),t&&(e.parent=t.id),e.children.forEach(t=>l(t,e))};l(t.head);const s=e=>{if(0===e.children.length)return e.selfSize||0;const t=e.children.reduce((e,t)=>e+=s(t),e.selfSize);return e.totalSize=t,t},u=s(t.head),a=[];for(let e of n.values()){let t=[];for(t.push(e);void 0!==e.parent;){const r=n.get(e.parent);if(void 0===r)break;t.unshift(r),e=r}a.push(t)}const c=new e.StackListProfileBuilder(u);for(let e of a){const t=e[e.length-1];c.appendSampleWithWeight(e.map(e=>o(e.callFrame)),t.selfSize)}return c.setValueFormatter(new r.ByteFormatter),c.build()} },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"KFvE":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTraceEventFormatted=S,exports.importTraceEvents=W;var e,t=require("../lib/utils"),n=require("../lib/profile"),r=require("../lib/value-formatters");!function(e){e.HERMES="HERMES",e.UNKNOWN="UNKNOWN"}(e||(e={}));const s=["line","column","name","category","url","params","allocatedCategory","allocatedName"];function o(e,n){return`${(0,t.zeroPad)(""+e,10)}:${(0,t.zeroPad)(""+n,10)}`}function i(e){const n=new Map;for(let r of e){(0,t.getOrInsert)(n,o(Number(r.pid),Number(r.tid)),()=>[]).push(r)}return n}function a(e,t){if(0===e.length&&0===t.length)throw new Error("This method should not be given both queues empty");if(0===t.length)return"B";if(0===e.length)return"E";const n=e[0],r=t[0],s=n.ts,o=r.ts;return s0){let t=Number.MAX_SAFE_INTEGER;for(let n of e)t=Math.min(t,n.ts);for(let n of e)n.ts-=t}const r=[];for(let i of e)switch(i.ph){case"B":t.push(i);break;case"E":n.push(i);break;case"X":r.push(i);break;default:return i}function s(e){var t,n;return null!==(n=null!==(t=e.dur)&&void 0!==t?t:e.tdur)&&void 0!==n?n:0}r.sort((e,t)=>{if(e.tst.ts)return 1;const n=s(e),r=s(t);return n>r?-1:nt.ts?1:0}return t.sort(o),n.sort(o),[t,n]}function c(e){const t=[];for(let n of e)switch(n.ph){case"B":case"E":case"X":t.push(n)}return t}function f(e){const t=new Map;for(let n of e)"M"===n.ph&&"process_name"===n.name&&n.args&&n.args.name&&t.set(n.pid,n.args.name);return t}function l(e){const t=new Map;for(let n of e)"M"===n.ph&&"thread_name"===n.name&&n.args&&n.args.name&&t.set(o(n.pid,n.tid),n.args.name);return t}function h(e){return`${e.name||"(unnamed)"}`}function m(e){let t=h(e);return e.args&&(t+=` ${JSON.stringify(e.args)}`),t}function d(t,n=e.UNKNOWN){if(n===e.HERMES){const e=`${t.name}:${t.args.url}:${t.args.line}:${t.args.column}`;return{name:h(t),key:e,file:t.args.url,line:t.args.line,col:t.args.column}}const r=m(t);return{name:r,key:r}}function p(e,t,n,r){return null!=e&&null!=t?`${e} (pid ${n}), ${t} (tid ${r})`:null!=e?`${e} (pid ${n}, tid ${r})`:null!=t?`${t} (pid ${n}, tid ${r})`:`pid ${n}, tid ${r}`}function g(e,t){const n=f(e),r=l(e),s=new Map;return t.forEach(e=>{if(0===e.length)return;const t=Number(e[0].pid),i=Number(e[0].tid),a=o(t,i),u=p(n.get(t),r.get(a),t,i);s.set(a,u)}),s}function E(e,t){const n=f(e),r=l(e),s=new Map;return t.forEach(e=>{if(0===e.length)return;const{pid:t,tid:i}=e[0],a=o(t,i),u=p(n.get(t),r.get(a),t,i);s.set(a,u)}),s}function $(s,o,i=e.UNKNOWN){const[c,f]=u(s),l=new n.CallTreeProfileBuilder;l.setValueFormatter(new r.TimeFormatter("microseconds")),l.setName(o);const h=[],m=e=>{const n=(0,t.lastOf)(h);if(null==n)return void console.warn(`Tried to end frame "${d(e,i).key}", but the stack was empty. Doing nothing instead.`);const r=d(e,i),s=d(n,i);e.name===n.name?(r.key!==s.key&&console.warn(`ts=${e.ts}: Tried to end "${r.key}" when "${s.key}" was on the top of the stack. Ending ${s.key} instead.`),h.pop(),l.leaveFrame(s,e.ts)):console.warn(`ts=${e.ts}: Tried to end "${r.key}" when "${s.key}" was on the top of the stack. Doing nothing instead.`)};for(;c.length>0||f.length>0;){const e=a(c,f);switch(e){case"B":p=c.shift(),h.push(p),l.enterFrame(d(p,i),p.ts);break;case"E":{const e=(0,t.lastOf)(h);if(null!=e){const t=d(e,i);let n=!1;for(let e=1;ef[0].ts)break;const s=d(r,i);if(t.key===s.key){const t=f[0];f[0]=f[e],f[e]=t,n=!0;break}}if(!n)for(let r=1;rf[0].ts)break;if(t.name===e.name){const e=f[0];f[0]=f[r],f[r]=e,n=!0;break}}}m(f.shift());break}default:return e}}var p;for(let e=h.length-1;e>=0;e--){const t=d(h[e],i);console.warn(`Frame "${t.key}" was still open at end of profile. Closing automatically.`),l.leaveFrame(t,l.getTotalWeight())}return l.build()}function w(e){const t=[];let n=Number(e[0].ts);return e.forEach((e,r)=>{if(0===r)return;const s=Number(e.ts)-n;n=Number(e.ts),t.push(s)}),t.push(0),t}function k({name:e,category:t}){return{key:`${e}:${t}`,name:e}}function b(e,t){const n=[];let r=t;for(;r;){const t=e[r];if(!t)throw new Error(`Could not find frame for id ${r}`);n.push(k(t)),r=t.parent}return n.reverse()}function y(e,t,s){const o=new n.StackListProfileBuilder;o.setValueFormatter(new r.TimeFormatter("microseconds")),o.setName(s);const i=w(t);return t.forEach((t,n)=>{const r=i[n],s=b(e.stackFrames,t.sf);o.appendSampleWithWeight(s,r)}),o.build()}function N(n,r=e.UNKNOWN){const s=i(c(n)),o=E(n,s),a=[];return o.forEach((e,t)=>{const n=s.get(t);if(!n)throw new Error(`Could not find events for key: ${n}`);a.push([t,$(n,e,r)])}),(0,t.sortBy)(a,e=>e[0]),{name:"",indexToView:0,profiles:a.map(e=>e[1])}}function v(e){const n=i(e.samples),r=g(e.traceEvents,n),s=[];return r.forEach((t,r)=>{const o=n.get(r);if(!o)throw new Error(`Could not find samples for key: ${o}`);0!==o.length&&s.push([r,y(e,o,t)])}),(0,t.sortBy)(s,e=>e[0]),{name:"",indexToView:0,profiles:s.map(e=>e[1])}}function M(e){if(!Array.isArray(e))return!1;if(0===e.length)return!1;for(let t of e){if(!("ph"in t))return!1;switch(t.ph){case"B":case"E":case"X":if(!("ts"in t))return!1}}return!0}function O(e){return!!e&&s.every(t=>t in e)}function T(e){return!!M(e)&&O(e[0].args)}function B(e){return"traceEvents"in e&&M(e.traceEvents)}function F(e){return"traceEvents"in e&&"stackFrames"in e&&"samples"in e&&M(e.traceEvents)}function S(e){return B(e)||M(e)}function W(t){if(F(t))return v(t);if(B(t))return N(t.traceEvents);if(T(t))return N(t,e.HERMES);if(M(t))return N(t);return t} },{"../lib/utils":"ucYa","../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"TZYa":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromCallgrind=r;var e=require("../lib/profile"),t=require("../lib/utils"),i=require("../lib/value-formatters");class s{constructor(e,i){this.fileName=e,this.fieldName=i,this.frameSet=new t.KeyedSet,this.totalWeights=new Map,this.childrenTotalWeights=new Map}getOrInsertFrame(t){return e.Frame.getOrInsert(this.frameSet,t)}addToTotalWeight(e,t){this.totalWeights.has(e)?this.totalWeights.set(e,this.totalWeights.get(e)+t):this.totalWeights.set(e,t)}addSelfWeight(e,t){this.addToTotalWeight(this.getOrInsertFrame(e),t)}addChildWithTotalWeight(e,i,s){const n=this.getOrInsertFrame(e),r=this.getOrInsertFrame(i),a=(0,t.getOrInsert)(this.childrenTotalWeights,n,e=>new Map);a.has(r)?a.set(r,a.get(r)+s):a.set(r,s),this.addToTotalWeight(n,s)}toProfile(){const s=new e.CallTreeProfileBuilder;let n=1;"Time_(10ns)"===this.fieldName?(s.setName(`${this.fileName} -- Time`),n=10,s.setValueFormatter(new i.TimeFormatter("nanoseconds"))):"Memory_(bytes)"==this.fieldName?(s.setName(`${this.fileName} -- Memory`),s.setValueFormatter(new i.ByteFormatter)):s.setName(`${this.fileName} -- ${this.fieldName}`);let r=0;const a=new Set;let l=0;for(let[e,t]of this.totalWeights)l=Math.max(l,t);const o=(e,i)=>{if(a.has(e))return;if(i<1e-4*l)return;const h=(0,t.getOrElse)(this.totalWeights,e,()=>0);if(0===h)return;let m=i;s.enterFrame(e,Math.round(r*n)),a.add(e);for(let[t,s]of this.childrenTotalWeights.get(e)||[]){let e=r;o(t,i*(s/h)),m-=r-e}a.delete(e),r+=m,s.leaveFrame(e,Math.round(r*n))},h=new Set(this.frameSet);for(let[e,t]of this.childrenTotalWeights)for(let[i,s]of t)h.delete(i);for(let e of h)o(e,this.totalWeights.get(e));return s.build()}}class n{constructor(e,t){this.importedFileName=t,this.callGraphs=null,this.eventsLine=null,this.filename=null,this.functionName=null,this.calleeFilename=null,this.calleeFunctionName=null,this.savedFileNames={},this.savedFunctionNames={},this.prevCostLineNumbers=[],this.lines=[...e.splitLines()],this.lineNum=0}parse(){for(;this.lineNume.toProfile())}:null}frameInfo(){const e=this.filename||"(unknown)",t=this.functionName||"(unknown)";return{key:`${e}:${t}`,name:t,file:e}}calleeFrameInfo(){const e=this.calleeFilename||this.filename||"(unknown)",t=this.calleeFunctionName||"(unknown)";return{key:`${e}:${t}`,name:t,file:e}}parseHeaderLine(e){const t=/^\s*(\w+):\s*(.*)+$/.exec(e);if(!t)return!1;if("events"!==t[1])return!0;const i=t[2].split(" ");if(null!=this.callGraphs)throw new Error(`Duplicate "events: " lines specified. First was "${this.eventsLine}", now received "${e}" on ${this.lineNum}.`);return this.callGraphs=i.map(e=>new s(this.importedFileName,e)),!0}parseAssignmentLine(e){const t=/^(\w+)=\s*(.*)$/.exec(e);if(!t)return!1;const i=t[1],s=t[2];switch(i){case"fe":case"fi":this.parseNameWithCompression(s,this.savedFileNames);break;case"fl":this.filename=this.parseNameWithCompression(s,this.savedFileNames);break;case"fn":this.functionName=this.parseNameWithCompression(s,this.savedFunctionNames);break;case"cfi":case"cfl":this.calleeFilename=this.parseNameWithCompression(s,this.savedFileNames);break;case"cfn":this.calleeFunctionName=this.parseNameWithCompression(s,this.savedFunctionNames);break;case"calls":this.parseCostLine(this.lines[this.lineNum++],"child"),this.calleeFilename=null,this.calleeFunctionName=null;break;case"cob":case"ob":break;default:console.log(`Ignoring assignment to unrecognized key "${e}" on line ${this.lineNum}`)}return!0}parseNameWithCompression(e,t){{const i=/^\((\d+)\)\s*(.+)$/.exec(e);if(i){const e=i[1],s=i[2];if(e in t)throw new Error(`Redefinition of name with id: ${e}. Original value was "${t[e]}". Tried to redefine as "${s}" on line ${this.lineNum}.`);return t[e]=s,s}}{const i=/^\((\d+)\)$/.exec(e);if(i){const e=i[1];if(!(e in t))throw new Error(`Tried to use name with id ${e} on line ${this.lineNum} before it was defined.`);return t[e]}}return e}parseCostLine(e,t){const i=e.split(/\s+/),s=[];for(let n=0;n!/^$|^Log closed$|log opened/.exec(e));let s=-1;const o=I(l[0]);if(null===o)throw Error;s=o.at;const i=(0,t.lastOf)(l);if(null===i)throw Error;const c=I(i);if(null===c)throw Error;const u=c.at,f=new t.KeyedSet,h=[];let m,p=0,v=-1;function d(t,n,r){function l(t,n){h.push(n),a.enterFrame(e.Frame.getOrInsert(f,{name:n,key:n}),t),p=t}v>-1&&(v=-1,m===r&&v>=p&&d(t,v,`QUEUE ${r}`));const s=`STACK ${t}`;[...h].reverse().find(e=>e.startsWith("STACK "))!==s&&(1===h.length&&g(p),l(n,s)),l(n,r)}function g(n){const r=h.pop();if(void 0===r)throw Error("Tried to leave frame when nothing was on stack.");a.leaveFrame(e.Frame.getOrInsert(f,{name:r,key:r}),n);let l=(0,t.lastOf)(h);null!==l&&l.startsWith("QUEUE ")&&(g(n),l=(0,t.lastOf)(h)),h.length>1&&null!==l&&l.startsWith("STACK ")&&g(n),p=n}function w(e,n,r){(0,t.lastOf)(h)===r?g(n):0===p?(console.log(`Tried to leave frame "${r}" which was never entered. Assuming it has been running since the start.`),d(e,0,r),g(n)):console.log(`Tried to leave frame "${r}" which was never entered. Other events have happened since the start, ignoring line.`)}function I(e){if(void 0===e)throw Error("Probably tried to import empty file.");const t=e.split(":");return t.length<3?null:-1!==s?{at:parseInt(t[0])-s,event:t[1],stackInt:parseInt(t[2]),name:t[5]}:{at:parseInt(t[0]),event:t[1],stackInt:parseInt(t[2]),name:t[5]}}for(l.forEach((e,t,n)=>{const r=I(e);if(null!==r)if("PUSH"===r.event){d(r.stackInt,r.at,r.name);let e=I(n[t+=1]);for(;null!==e&&e.at===r.at;)e.name===r.name&&e.stackInt===r.stackInt&&"POP"===e.event?(w(e.stackInt,e.at,e.name),n.splice(t,1),e=null):(t+=1)0;)g(u);return a.build()} },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"uRa7":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importProfileGroupFromText=C,exports.importProfileGroupFromBase64=I,exports.importProfilesFromFile=x,exports.importProfilesFromArrayBuffer=y,exports.importFromFileSystemDirectoryEntry=T;var r=require("./chrome"),e=require("./stackprof"),o=require("./instruments"),i=require("./bg-flamegraph"),t=require("./firefox"),n=require("../lib/file-format"),s=require("./v8proflog"),l=require("./linux-tools-perf"),m=require("./haskell"),p=require("./safari"),a=require("./utils"),f=require("./pprof"),c=require("../lib/utils"),u=require("./v8heapalloc"),d=require("./trace-event"),g=require("./callgrind"),h=require("./papyrus"),F=function(r,e,o,i){return new(o||(o=Promise))(function(t,n){function s(r){try{m(i.next(r))}catch(e){n(e)}}function l(r){try{m(i.throw(r))}catch(e){n(e)}}function m(r){var e;r.done?t(r.value):(e=r.value,e instanceof o?e:new o(function(r){r(e)})).then(s,l)}m((i=i.apply(r,e||[])).next())})};function C(r,e){return F(this,void 0,void 0,function*(){return yield P(new a.TextProfileDataSource(r,e))})}function I(r,e){return F(this,void 0,void 0,function*(){return yield P(a.MaybeCompressedDataReader.fromArrayBuffer(r,(0,c.decodeBase64)(e).buffer))})}function x(r){return F(this,void 0,void 0,function*(){return P(a.MaybeCompressedDataReader.fromFile(r))})}function y(r,e){return F(this,void 0,void 0,function*(){return P(a.MaybeCompressedDataReader.fromArrayBuffer(r,e))})}function P(r){return F(this,void 0,void 0,function*(){const e=yield r.name(),o=yield S(r);if(o){o.name||(o.name=e);for(let r of o.profiles)r&&!r.getName()&&r.setName(e);return o}return null})}function v(r){return r?{name:r.getName(),indexToView:0,profiles:[r]}:null}function S(a){return F(this,void 0,void 0,function*(){const c=yield a.name(),F=yield a.readAsArrayBuffer();{const r=(0,f.importAsPprofProfile)(F);if(r)return console.log("Importing as protobuf encoded pprof file"),v(r)}const C=yield a.readAsText();if(c.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(C.parseAsJSON());if(/Trace-\d{8}T\d{6}/.exec(c))return console.log("Importing as Chrome Timeline Object"),(0,r.importFromChromeTimeline)(C.parseAsJSON().traceEvents,c);if(c.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(c))return console.log("Importing as Chrome Timeline"),(0,r.importFromChromeTimeline)(C.parseAsJSON(),c);if(c.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),v((0,e.importFromStackprof)(C.parseAsJSON()));if(c.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(C));if(c.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),(0,l.importFromLinuxPerf)(C);if(c.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),v((0,i.importFromBGFlameGraph)(C));if(c.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(C.parseAsJSON()));if(c.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),v((0,u.importFromChromeHeapProfile)(C.parseAsJSON()));if(c.endsWith("-recording.json"))return console.log("Importing as Safari profile"),v((0,p.importFromSafari)(C.parseAsJSON()));if(c.startsWith("callgrind."))return console.log("Importing as Callgrind profile"),(0,g.importFromCallgrind)(C,c);let I;try{I=C.parseAsJSON()}catch(x){}if(I){if("https://www.speedscope.app/file-format-schema.json"===I.$schema)return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(I);if(I.systemHost&&"Firefox"==I.systemHost.name)return console.log("Importing as Firefox profile"),v((0,t.importFromFirefox)(I));if((0,r.isChromeTimeline)(I))return console.log("Importing as Chrome Timeline"),(0,r.importFromChromeTimeline)(I,c);if((0,r.isChromeTimelineObject)(I))return console.log("Importing as Chrome Timeline Object"),(0,r.importFromChromeTimeline)(I.traceEvents,c);if("nodes"in I&&"samples"in I&&"timeDeltas"in I)return console.log("Importing as Chrome CPU Profile"),v((0,r.importFromChromeCPUProfile)(I));if((0,d.isTraceEventFormatted)(I))return console.log("Importing as Trace Event Format profile"),(0,d.importTraceEvents)(I);if("head"in I&&"samples"in I&&"timestamps"in I)return console.log("Importing as Chrome CPU Profile (old format)"),v((0,r.importFromOldV8CPUProfile)(I));if("mode"in I&&"frames"in I&&"raw_timestamp_deltas"in I)return console.log("Importing as stackprof profile"),v((0,e.importFromStackprof)(I));if("code"in I&&"functions"in I&&"ticks"in I)return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(I));if("head"in I&&"selfSize"in I.head)return console.log("Importing as Chrome Heap Profile"),v((0,u.importFromChromeHeapProfile)(I));if("rts_arguments"in I&&"initial_capabilities"in I)return console.log("Importing as Haskell GHC JSON Profile"),(0,m.importFromHaskell)(I);if("recording"in I&&"sampleStackTraces"in I.recording)return console.log("Importing as Safari profile"),v((0,p.importFromSafari)(I))}else{if(/^# callgrind format/.exec(C.firstChunk())||/^events:/m.exec(C.firstChunk())&&/^fn=/m.exec(C.firstChunk()))return console.log("Importing as Callgrind profile"),(0,g.importFromCallgrind)(C,c);if(/^[\w \t\(\)]*\tSymbol Name/.exec(C.firstChunk()))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(C));if(/^(Stack_|Script_|Obj_)\S+ log opened \(PC\)\n/.exec(C.firstChunk()))return console.log("Importing as Papyrus profile"),v((0,h.importFromPapyrus)(C));const r=(0,l.importFromLinuxPerf)(C);if(r)return console.log("Importing from linux perf script output"),r;const e=(0,i.importFromBGFlameGraph)(C);if(e)return console.log("Importing as collapsed stack format"),v(e)}return null})}function T(r){return F(this,void 0,void 0,function*(){return(0,o.importFromInstrumentsTrace)(r)})} },{"./chrome":"kWV1","./stackprof":"I37H","./instruments":"G28U","./bg-flamegraph":"flbo","./firefox":"uNW1","../lib/file-format":"Xzb6","./v8proflog":"QV03","./linux-tools-perf":"f2sa","./haskell":"jm73","./safari":"jP3w","./utils":"QTYz","./pprof":"VmHy","../lib/utils":"ucYa","./v8heapalloc":"bNW7","./trace-event":"KFvE","./callgrind":"TZYa","./papyrus":"duFC"}]},{},[], null) //# sourceMappingURL=import.7f8cb9f9.js.map