rack-mini-profiler 2.2.1 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +33 -11
  4. data/lib/html/includes.css +9 -11
  5. data/lib/html/includes.js +28 -2
  6. data/lib/html/includes.scss +3 -11
  7. data/lib/html/includes.tmpl +6 -3
  8. data/lib/html/profile_handler.js +1 -1
  9. data/lib/html/speedscope/LICENSE +21 -0
  10. data/lib/html/speedscope/README.md +3 -0
  11. data/lib/html/speedscope/demangle-cpp.1768f4cc.js +4 -0
  12. data/lib/html/speedscope/favicon-16x16.f74b3187.png +0 -0
  13. data/lib/html/speedscope/favicon-32x32.bc503437.png +0 -0
  14. data/lib/html/speedscope/file-format-schema.json +324 -0
  15. data/lib/html/speedscope/fonts/source-code-pro-regular.css +8 -0
  16. data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff +0 -0
  17. data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff2 +0 -0
  18. data/lib/html/speedscope/import.cf0fa83f.js +115 -0
  19. data/lib/html/speedscope/index.html +2 -0
  20. data/lib/html/speedscope/release.txt +3 -0
  21. data/lib/html/speedscope/reset.8c46b7a1.css +2 -0
  22. data/lib/html/speedscope/source-map.438fa06b.js +24 -0
  23. data/lib/html/speedscope/speedscope.44364064.js +200 -0
  24. data/lib/html/vendor.js +2 -2
  25. data/lib/mini_profiler/asset_version.rb +1 -1
  26. data/lib/mini_profiler/client_settings.rb +5 -5
  27. data/lib/mini_profiler/config.rb +21 -1
  28. data/lib/mini_profiler/profiler.rb +101 -23
  29. data/lib/mini_profiler/profiling_methods.rb +3 -1
  30. data/lib/mini_profiler/storage/abstract_store.rb +1 -1
  31. data/lib/mini_profiler/timer_struct/page.rb +9 -3
  32. data/lib/mini_profiler/version.rb +2 -1
  33. data/lib/mini_profiler_rails/railtie.rb +1 -1
  34. data/lib/patches/db/mysql2/alias_method.rb +30 -0
  35. data/lib/patches/db/mysql2/prepend.rb +34 -0
  36. data/lib/patches/db/mysql2.rb +4 -27
  37. data/lib/patches/db/riak.rb +1 -1
  38. data/lib/prepend_mysql2_patch.rb +5 -0
  39. data/rack-mini-profiler.gemspec +3 -2
  40. metadata +36 -4
@@ -0,0 +1,8 @@
1
+ @font-face {
2
+ font-family: 'Source Code Pro';
3
+ font-style: normal;
4
+ font-weight: 400;
5
+ src: local(''),
6
+ url('./source-code-pro-v13-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
7
+ url('./source-code-pro-v13-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
8
+ }
@@ -0,0 +1,115 @@
1
+ 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;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"y1V0":[function(require,module,exports) {
2
+ "use strict";function e(e){const t=[];return function e(r){t.push({id:r.id,callFrame:{columnNumber:0,functionName:r.functionName,lineNumber:r.lineNumber,scriptId:r.scriptId,url:r.url},hitCount:r.hitCount,children:r.children.map(e=>e.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;
3
+ },{}],"kWV1":[function(require,module,exports) {
4
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isChromeTimeline=i,exports.importFromChromeTimeline=l,exports.importFromChromeCPUProfile=u,exports.importFromOldV8CPUProfile=f;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters"),n=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 l(e,r){const n=new Map,i=new Map,l=new Map;(0,t.sortBy)(e,e=>e.ts);for(let t of e){if("CpuProfile"===t.name){const e=`${t.pid}:${t.tid}`,r=t.id||e;n.set(r,t.args.data.cpuProfile),i.set(r,e)}if("Profile"===t.name){const e=`${t.pid}:${t.tid}`;n.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&&l.set(`${t.pid}:${t.tid}`,t.args.name),"ProfileChunk"===t.name){const e=`${t.pid}:${t.tid}`,r=n.get(t.id||e);if(r){const e=t.args.data;e.cpuProfile&&(e.cpuProfile.nodes&&(r.nodes=r.nodes.concat(e.cpuProfile.nodes)),e.cpuProfile.samples&&(r.samples=r.samples.concat(e.cpuProfile.samples))),e.timeDeltas&&(r.timeDeltas=r.timeDeltas.concat(e.timeDeltas)),null!=e.startTime&&(r.startTime=e.startTime),null!=e.endTime&&(r.endTime=e.endTime)}else console.warn(`Ignoring ProfileChunk for undeclared Profile with id ${t.id||e}`)}}if(n.size>0){const e=[];let o=0;return(0,t.itForEach)(n.keys(),t=>{let s=null,a=i.get(t);a&&(s=l.get(a)||null);const m=u(n.get(t));s&&n.size>1?(m.setName(`${r} - ${s}`),"CrRendererMain"===s&&(o=e.length)):m.setName(`${r}`),e.push(m)}),{name:r,indexToView:o,profiles:e}}throw new Error("Could not find CPU profile in Timeline")}const o=new Map;function s(e){return(0,t.getOrInsert)(o,e,e=>{const t=e.functionName||"(anonymous)",r=e.url;let n=e.lineNumber;null!=n&&n++;let i=e.columnNumber;return null!=i&&i++,{key:`${t}:${r}:${n}:${i}`,name:t,file:r,line:n,col:i}})}function a(e){const{functionName:t,url:r}=e;return"native dummy.js"===r||("(root)"===t||"(idle)"===t)}function m(e){return"(garbage collector)"===e||"(program)"===e}function u(n){const i=new e.CallTreeProfileBuilder(n.endTime-n.startTime),l=new Map;for(let e of n.nodes)l.set(e.id,e);for(let e of n.nodes)if("number"==typeof e.parent&&(e.parent=l.get(e.parent)),e.children)for(let t of e.children){const r=l.get(t);r&&(r.parent=e)}const o=[],u=[];let f=n.timeDeltas[0],c=f,p=NaN;for(let e=0;e<n.samples.length;e++){const t=n.samples[e];if(t!=p&&(o.push(t),f<c?u.push(c):(u.push(f),c=f)),e===n.samples.length-1)isNaN(p)||(o.push(p),f<c?u.push(c):(u.push(f),c=f));else{f+=n.timeDeltas[e+1],p=t}}let d=[];for(let e=0;e<o.length;e++){const r=u[e],n=o[e];let f=l.get(n);if(!f)continue;let c=null;for(c=f;c&&-1===d.indexOf(c);c=m(c.callFrame.functionName)?(0,t.lastOf)(d):c.parent||null);for(;d.length>0&&(0,t.lastOf)(d)!=c;){const e=s(d.pop().callFrame);i.leaveFrame(e,r)}const p=[];for(let e=f;e&&e!=c&&!a(e.callFrame);e=m(e.callFrame.functionName)?(0,t.lastOf)(d):e.parent||null)p.push(e);p.reverse();for(let e of p)i.enterFrame(s(e.callFrame),r);d=d.concat(p)}for(let e=d.length-1;e>=0;e--)i.leaveFrame(s(d[e].callFrame),(0,t.lastOf)(u));return i.setValueFormatter(new r.TimeFormatter("microseconds")),i.build()}function f(e){return u((0,n.chromeTreeToNodes)(e))}
5
+ },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4","./v8cpuFormatter":"y1V0"}],"I37H":[function(require,module,exports) {
6
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromStackprof=r;var e=require("../lib/profile"),t=require("../lib/value-formatters");function r(r){const o=r.raw_timestamp_deltas.reduce((e,t)=>e+t,0),a=new e.StackListProfileBuilder(o),{frames:l,raw:s,raw_timestamp_deltas:i}=r;let n=0,c=[];for(let e=0;e<s.length;){const t=s[e++];let r=[];for(let a=0;a<t;a++){const t=s[e++];r.push(Object.assign({key:t},l[t]))}1===r.length&&"(garbage collection)"===r[0].name&&(r=c.concat(r));const o=s[e++];let m=0;for(let e=0;e<o;e++)m+=i[n++];a.appendSampleWithWeight(r,m),c=r}return a.setValueFormatter(new t.TimeFormatter("microseconds")),a.build()}
7
+ },{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"tbG5":[function(require,module,exports) {
8
+ "use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function t(r,t){return Object.prototype.hasOwnProperty.call(r,t)}exports.assign=function(r){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)t(n,a)&&(r[a]=n[a])}}return r},exports.shrinkBuf=function(r,t){return r.length===t?r:r.subarray?r.subarray(0,t):(r.length=t,r)};var e={arraySet:function(r,t,e,n,a){if(t.subarray&&r.subarray)r.set(t.subarray(e,e+n),a);else for(var o=0;o<n;o++)r[a+o]=t[e+o]},flattenChunks:function(r){var t,e,n,a,o,s;for(n=0,t=0,e=r.length;t<e;t++)n+=r[t].length;for(s=new Uint8Array(n),a=0,t=0,e=r.length;t<e;t++)o=r[t],s.set(o,a),a+=o.length;return s}},n={arraySet:function(r,t,e,n,a){for(var o=0;o<n;o++)r[a+o]=t[e+o]},flattenChunks:function(r){return[].concat.apply([],r)}};exports.setTyped=function(r){r?(exports.Buf8=Uint8Array,exports.Buf16=Uint16Array,exports.Buf32=Int32Array,exports.assign(exports,e)):(exports.Buf8=Array,exports.Buf16=Array,exports.Buf32=Array,exports.assign(exports,n))},exports.setTyped(r);
9
+ },{}],"sRJQ":[function(require,module,exports) {
10
+ "use strict";var e=require("../utils/common"),t=4,n=0,_=1,r=2;function a(e){for(var t=e.length;--t>=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<<e.bi_valid&65535,N(e,e.bi_buf),e.bi_buf=t>>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function P(e,t,n){O(e,n[2*t],n[2*t+1])}function Q(e,t){var n=0;do{n|=1&e,e>>>=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;n<h;n++)(a=d[2*d[2*(_=e.heap[n])+1]+1]+1)>c&&(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;_<b-1;_++)for(F[_]=n,e=0;e<1<<k[_];e++)E[n++]=_;for(E[n-1]=_,r=0,_=0;_<16;_++)for(J[_]=r,e=0;e<1<<q[_];e++)D[r++]=_;for(r>>=7;_<c;_++)for(J[_]=r<<7,e=0;e<1<<q[_]-7;e++)D[256+r++]=_;for(t=0;t<=v;t++)a[t]=0;for(e=0;e<=143;)B[2*e+1]=8,e++,a[8]++;for(;e<=255;)B[2*e+1]=9,e++,a[9]++;for(;e<=279;)B[2*e+1]=7,e++,a[7]++;for(;e<=287;)B[2*e+1]=8,e++,a[8]++;for(U(B,u+1,a),e=0;e<c;e++)C[2*e+1]=5,C[2*e]=Q(e,5);G=new K(B,k,s+1,u,v),H=new K(C,q,0,c,v),I=new K(new Array(0),z,0,p,x)}function W(e){var t;for(t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<c;t++)e.dyn_dtree[2*t]=0;for(t=0;t<p;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*g]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function X(e){e.bi_valid>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]<e[a]||e[r]===e[a]&&_[t]<=_[n]}function $(e,t,n){for(var _=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&Z(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!Z(t,_,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=_}function ee(e,t,n){var _,r,a,i,l=0;if(0!==e.last_lit)do{_=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],r=e.pending_buf[e.l_buf+l],l++,0===_?P(e,r,t):(P(e,(a=E[r])+s+1,t),0!==(i=k[a])&&O(e,r-=F[a],i),P(e,a=M(--_),n),0!==(i=q[a])&&O(e,_-=J[a],i))}while(l<e.last_lit);P(e,g,t)}function te(e,t){var n,_,r,a=t.dyn_tree,i=t.stat_desc.static_tree,l=t.stat_desc.has_stree,d=t.stat_desc.elems,f=-1;for(e.heap_len=0,e.heap_max=h,n=0;n<d;n++)0!==a[2*n]?(e.heap[++e.heap_len]=f=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)a[2*(r=e.heap[++e.heap_len]=f<2?++f:0)]=1,e.depth[r]=0,e.opt_len--,l&&(e.static_len-=i[2*r+1]);for(t.max_code=f,n=e.heap_len>>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<d&&r===i||(l<f?e.bl_tree[2*r]+=l:0!==r?(r!==a&&e.bl_tree[2*r]++,e.bl_tree[2*m]++):l<=10?e.bl_tree[2*w]++:e.bl_tree[2*A]++,l=0,a=r,0===i?(d=138,f=3):r===i?(d=6,f=3):(d=7,f=4))}function _e(e,t,n){var _,r,a=-1,i=t[1],l=0,d=7,f=4;for(0===i&&(d=138,f=3),_=0;_<=n;_++)if(r=i,i=t[2*(_+1)+1],!(++l<d&&r===i)){if(l<f)do{P(e,r,e.bl_tree)}while(0!=--l);else 0!==r?(r!==a&&(P(e,r,e.bl_tree),l--),P(e,m,e.bl_tree),O(e,l-3,2)):l<=10?(P(e,w,e.bl_tree),O(e,l-3,3)):(P(e,A,e.bl_tree),O(e,l-11,7));l=0,a=r,0===i?(d=138,f=3):r===i?(d=6,f=3):(d=7,f=4)}}function re(e){var t;for(ne(e,e.dyn_ltree,e.l_desc.max_code),ne(e,e.dyn_dtree,e.d_desc.max_code),te(e,e.bl_desc),t=p-1;t>=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;t<s;t++)if(0!==e.dyn_ltree[2*t])return _;return n}a(J);var le=!1;function de(e){le||(V(),le=!0),e.l_desc=new L(e.dyn_ltree,G),e.d_desc=new L(e.dyn_dtree,H),e.bl_desc=new L(e.bl_tree,I),e.bi_buf=0,e.bi_valid=0,W(e)}function fe(e,t,n,_){O(e,(i<<1)+(_?1:0),3),Y(e,t,n,!0)}function oe(e){O(e,l<<1,3),P(e,g,B),R(e)}function be(e,n,_,a){var i,f,o=0;e.level>0?(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;
11
+ },{"../utils/common":"tbG5"}],"uxo6":[function(require,module,exports) {
12
+ "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;
13
+ },{}],"X4kj":[function(require,module,exports) {
14
+ "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<e;f++)r=r>>>8^a[255&(r^t[f])];return-1^r}module.exports=t;
15
+ },{}],"gMAY":[function(require,module,exports) {
16
+ "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"};
17
+ },{}],"BLBk":[function(require,module,exports) {
18
+ "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]&&r<u);if(s=H-(u-r),r=u-H,s>n){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.hash_shift^t.window[n+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[n+E-1])&t.hash_mask,t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<E)););}while(t.lookahead<K&&0!==t.strm.avail_in)}function nt(t,a){var e=65535;for(e>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<K){if(rt(t),t.lookahead<K&&a===n)return Q;if(0===t.lookahead)break}if(s=0,t.lookahead>=E&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+E-1])&t.hash_mask,s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-K&&(t.match_length=it(t,s)),t.match_length>=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<<t.hash_shift^t.window[t.strstart+E-1])&t.hash_mask,s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=e._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(tt(t,!1),0===t.strm.avail_out))return Q}return t.insert=t.strstart<E-1?t.strstart:E-1,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 lt(t,a){for(var s,i,r;;){if(t.lookahead<K){if(rt(t),t.lookahead<K&&a===n)return Q;if(0===t.lookahead)break}if(s=0,t.lookahead>=E&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+E-1])&t.hash_mask,s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=E-1,0!==s&&t.prev_length<t.max_lazy_match&&t.strstart-s<=t.w_size-K&&(t.match_length=it(t,s),t.match_length<=5&&(t.strategy===m||t.match_length===E&&t.strstart-t.match_start>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<<t.hash_shift^t.window[t.strstart+E-1])&t.hash_mask,s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=E-1,t.strstart++,i&&(tt(t,!1),0===t.strm.avail_out))return Q}else if(t.match_available){if((i=e._tr_tally(t,0,t.window[t.strstart-1]))&&tt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return Q}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=e._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<E-1?t.strstart:E-1,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 _t(t,a){for(var s,i,r,h,l=t.window;;){if(t.lookahead<=H){if(rt(t),t.lookahead<=H&&a===n)return Q;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=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]&&r<h);t.match_length=H-(h-r),t.match_length>t.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<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=r+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+E-1)/E),l.window=new a.Buf8(2*l.w_size),l.head=new a.Buf16(l.hash_size),l.prev=new a.Buf16(l.w_size),l.lit_bufsize=1<<r+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new a.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=n,l.method=s,ct(t)}function wt(t,a){return mt(t,a,x,B,S,z)}function vt(a,s){var r,f,p,m;if(!a||!a.state||s>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.gzindex<f.gzhead.name.length?255&f.gzhead.name.charCodeAt(f.gzindex++):0,at(f,m)}while(0!==m);f.gzhead.hcrc&&f.pending>p&&(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.gzindex<f.gzhead.comment.length?255&f.gzhead.comment.charCodeAt(f.gzindex++):0,at(f,m)}while(0!==m);f.gzhead.hcrc&&f.pending>p&&(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<<i.hash_shift^i.window[r+E-1])&i.hash_mask,i.prev[r&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=r,r++}while(--n);i.strstart=r,i.lookahead=E-1,rt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=E-1,i.match_available=0,t.next_in=_,t.input=d,t.avail_in=l,i.wrap=h,o}t=[new ot(0,0,0,0,nt),new ot(4,4,8,4,ht),new ot(4,5,16,8,ht),new ot(4,6,32,32,ht),new ot(4,4,16,16,lt),new ot(8,16,32,32,lt),new ot(8,16,128,128,lt),new ot(8,32,128,256,lt),new ot(32,128,258,1024,lt),new ot(32,258,258,4096,lt)],exports.deflateInit=wt,exports.deflateInit2=mt,exports.deflateReset=ct,exports.deflateResetKeep=ft,exports.deflateSetHeader=pt,exports.deflate=vt,exports.deflateEnd=kt,exports.deflateSetDictionary=zt,exports.deflateInfo="pako deflate (from Nodeca project)";
19
+ },{"../utils/common":"tbG5","./trees":"sRJQ","./adler32":"uxo6","./crc32":"X4kj","./messages":"gMAY"}],"Q3ZD":[function(require,module,exports) {
20
+ "use strict";var r=require("./common"),n=!0,t=!0;try{String.fromCharCode.apply(null,[0])}catch(u){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(u){t=!1}for(var e=new r.Buf8(256),o=0;o<256;o++)e[o]=o>=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<o;u++)f+=String.fromCharCode(e[u]);return f}e[254]=e[254]=1,exports.string2buf=function(n){var t,e,o,f,u,a=n.length,i=0;for(f=0;f<a;f++)55296==(64512&(e=n.charCodeAt(f)))&&f+1<a&&56320==(64512&(o=n.charCodeAt(f+1)))&&(e=65536+(e-55296<<10)+(o-56320),f++),i+=e<128?1:e<2048?2:e<65536?3:4;for(t=new r.Buf8(i),u=0,f=0;u<i;f++)55296==(64512&(e=n.charCodeAt(f)))&&f+1<a&&56320==(64512&(o=n.charCodeAt(f+1)))&&(e=65536+(e-55296<<10)+(o-56320),f++),e<128?t[u++]=e:e<2048?(t[u++]=192|e>>>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;e<o;e++)t[e]=n.charCodeAt(e);return t},exports.buf2string=function(r,n){var t,o,u,a,i=n||r.length,h=new Array(2*i);for(o=0,t=0;t<i;)if((u=r[t++])<128)h[o++]=u;else if((a=e[u])>4)h[o++]=65533,t+=a-1;else{for(u&=2===a?31:3===a?15:7;a>1&&t<i;)u=u<<6|63&r[t++],a--;a>1?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};
21
+ },{"./common":"tbG5"}],"bdtv":[function(require,module,exports) {
22
+ "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;
23
+ },{}],"nFS2":[function(require,module,exports) {
24
+ "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;
25
+ },{"./zlib/deflate":"BLBk","./utils/common":"tbG5","./utils/strings":"Q3ZD","./zlib/messages":"gMAY","./zlib/zstream":"bdtv"}],"LP5M":[function(require,module,exports) {
26
+ "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<<t.lenbits)-1,x=(1<<t.distbits)-1;i:do{w<15&&(m+=A[d++]<<w,w+=8,m+=A[d++]<<w,w+=8),g=h[m&_];e:for(;;){if(m>>>=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)-1)];continue e}if(32&p){t.mode=e;break i}o.msg="invalid literal/length code",t.mode=i;break i}z=65535&g,(p&=15)&&(w<p&&(m+=A[d++]<<w,w+=8),z+=m&(1<<p)-1,m>>>=p,w-=p),w<15&&(m+=A[d++]<<w,w+=8,m+=A[d++]<<w,w+=8),g=k[m&x];o:for(;;){if(m>>>=p=g>>>24,w-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=k[(65535&g)+(m&(1<<p)-1)];continue o}o.msg="invalid distance code",t.mode=i;break i}if(j=65535&g,w<(p&=15)&&(m+=A[d++]<<w,(w+=8)<p&&(m+=A[d++]<<w,w+=8)),(j+=m&(1<<p)-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,p<z){z-=p;do{B[l++]=v[q++]}while(--p);q=l-j,y=B}}else if(u<p){if(q+=b+u-p,(p-=u)<z){z-=p;do{B[l++]=v[q++]}while(--p);if(q=0,u<z){z-=p=u;do{B[l++]=v[q++]}while(--p);q=l-j,y=B}}}else if(q+=u-p,p<z){z-=p;do{B[l++]=v[q++]}while(--p);q=l-j,y=B}for(;z>2;)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<n&&l<f);d-=z=w>>3,m&=(1<<(w-=z<<3))-1,o.next_in=d,o.next_out=l,o.avail_in=d<n?n-d+5:5-(d-n),o.avail_out=l<f?f-l+257:257-(l-f),t.hold=m,t.bits=w};
27
+ },{}],"uNlq":[function(require,module,exports) {
28
+ "use strict";var r=require("../utils/common"),f=15,i=852,o=592,e=0,u=1,t=2,n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],b=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];module.exports=function(a,c,m,w,d,v,B,h){var k,p,q,x,g,j,y,z,A,C=h.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new r.Buf16(f+1),Q=new r.Buf16(f+1),R=null,S=0;for(D=0;D<=f;D++)P[D]=0;for(E=0;E<w;E++)P[c[m+E]]++;for(H=C,G=f;G>=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;F<G&&0===P[F];F++);for(H<F&&(H=F),K=1,D=1;D<=f;D++)if(K<<=1,(K-=P[D])<0)return-1;if(K>0&&(a===e||1!==G))return-1;for(Q[1]=0,D=1;D<f;D++)Q[D+1]=Q[D]+P[D];for(E=0;E<w;E++)0!==c[m+E]&&(B[Q[c[m+E]]++]=E);if(a===e?(N=R=B,j=19):a===u?(N=n,O-=257,R=l,S-=257,j=256):(N=s,R=b,j=-1),M=0,E=0,D=F,g=v,I=H,J=0,q=-1,x=(L=1<<H)-1,a===u&&L>i||a===t&&L>o)return 1;for(;;){y=D-J,B[E]<j?(z=0,A=B[E]):B[E]>j?(z=R[S+B[E]],A=N[O+B[E]]):(z=96,A=0),k=1<<D-J,F=p=1<<I;do{d[g+(M>>J)+(p-=k)]=y<<24|z<<16|A|0}while(0!==p);for(k=1<<D-1;M&k;)k>>=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+J<G&&!((K-=P[I+J])<=0);)I++,K<<=1;if(L+=1<<I,a===u&&L>i||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};
29
+ },{"../utils/common":"tbG5"}],"GIDK":[function(require,module,exports) {
30
+ "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.wbits,r.wnext=0,r.whave=0,r.window=new e.Buf8(r.wsize)),s>=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<r.wsize&&(r.whave+=n))),0}function ke(Y,Z){var $,ee,te,ie,se,ne,re,oe,de,le,fe,ke,be,me,we,ue,ge,ve,xe,pe,_e,ye,ze,Be,Se=0,qe=new e.Buf8(4),Ce=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Y||!Y.state||!Y.output||!Y.input&&0!==Y.avail_in)return b;($=Y.state).mode===R&&($.mode=j),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,le=ne,fe=re,ye=c;e:for(;;)switch($.mode){case v:if(0===$.wrap){$.mode=j;break}for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}if(2&$.wrap&&35615===oe){$.check=0,qe[0]=255&oe,qe[1]=oe>>>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++]<<de,de+=8}if($.flags=oe,(255&$.flags)!==g){Y.msg="unknown compression method",$.mode=V;break}if(57344&$.flags){Y.msg="unknown header flags set",$.mode=V;break}$.head&&($.head.text=oe>>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++]<<de,de+=8}$.head&&($.head.time=oe),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>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++]<<de,de+=8}$.head&&($.head.xflags=255&oe,$.head.os=oe>>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++]<<de,de+=8}$.length=oe,$.head&&($.head.extra_len=oe),512&$.flags&&(qe[0]=255&oe,qe[1]=oe>>>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<ne);if(512&$.flags&&($.check=t($.check,ee,ke,ie)),ne-=ke,ie+=ke,_e)break e}else $.head&&($.head.name=null);$.length=0,$.mode=S;case S:if(4096&$.flags){if(0===ne)break e;ke=0;do{_e=ee[ie+ke++],$.head&&_e&&$.length<65536&&($.head.comment+=String.fromCharCode(_e))}while(_e&&ke<ne);if(512&$.flags&&($.check=t($.check,ee,ke,ie)),ne-=ke,ie+=ke,_e)break e}else $.head&&($.head.comment=null);$.mode=q;case q:if(512&$.flags){for(;de<16;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}if(oe!==(65535&$.check)){Y.msg="header crc mismatch",$.mode=V;break}oe=0,de=0}$.head&&($.head.hcrc=$.flags>>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++]<<de,de+=8}Y.adler=$.check=ae(oe),oe=0,de=0,$.mode=I;case I:if(0===$.havedict)return Y.next_out=se,Y.avail_out=re,Y.next_in=ie,Y.avail_in=ne,$.hold=oe,$.bits=de,k;Y.adler=$.check=1,$.mode=R;case R:if(Z===l||Z===f)break e;case j:if($.last){oe>>>=7&de,de-=7&de,$.mode=Q;break}for(;de<3;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}switch($.last=1&oe,de-=1,3&(oe>>>=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++]<<de,de+=8}if((65535&oe)!=(oe>>>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++]<<de,de+=8}if($.nlen=257+(31&oe),oe>>>=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++]<<de,de+=8}$.lens[Ce[$.have++]]=7&oe,oe>>>=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++]<<de,de+=8}if(ge<16)oe>>>=we,de-=we,$.lens[$.have++]=ge;else{if(16===ge){for(Be=we+2;de<Be;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}if(oe>>>=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<Be;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}de-=we,_e=0,ke=3+(7&(oe>>>=we)),oe>>>=3,de-=3}else{for(Be=we+7;de<Be;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}de-=we,_e=0,ke=11+(127&(oe>>>=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++]<<de,de+=8}if(ue&&0==(240&ue)){for(ve=we,xe=ue,pe=ge;ue=(Se=$.lencode[pe+((oe&(1<<ve+xe)-1)>>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}oe>>>=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<Be;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}$.length+=oe&(1<<$.extra)-1,oe>>>=$.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++]<<de,de+=8}if(0==(240&ue)){for(ve=we,xe=ue,pe=ge;ue=(Se=$.distcode[pe+((oe&(1<<ve+xe)-1)>>ve)])>>>16&255,ge=65535&Se,!(ve+(we=Se>>>24)<=de);){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}oe>>>=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<Be;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}$.offset+=oe&(1<<$.extra)-1,oe>>>=$.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++]<<de,de+=8}if(fe-=re,Y.total_out+=fe,$.total+=fe,fe&&(Y.adler=$.check=$.flags?t($.check,te,fe,se-fe):a($.check,te,fe,se-fe)),fe=re,($.flags?oe:ae(oe))!==$.check){Y.msg="incorrect data check",$.mode=V;break}oe=0,de=0}$.mode=T;case T:if($.wrap&&$.flags){for(;de<32;){if(0===ne)break e;ne--,oe+=ee[ie++]<<de,de+=8}if(oe!==(4294967295&$.total)){Y.msg="incorrect length check",$.mode=V;break}oe=0,de=0}$.mode=U;case U:ye=h;break e;case V:ye=m;break e;case W:return w;case X:default:return b}return Y.next_out=se,Y.avail_out=re,Y.next_in=ie,Y.avail_in=ne,$.hold=oe,$.bits=de,($.wsize||fe!==Y.avail_out&&$.mode<V&&($.mode<Q||Z!==d))&&he(Y,Y.output,Y.next_out,fe-Y.avail_out)?($.mode=W,w):(le-=Y.avail_in,fe-=Y.avail_out,Y.total_in+=le,Y.total_out+=fe,$.total+=fe,$.wrap&&fe&&(Y.adler=$.check=$.flags?t($.check,te,fe,Y.next_out-fe):a($.check,te,fe,Y.next_out-fe)),Y.data_type=$.bits+($.last?64:0)+($.mode===R?128:0)+($.mode===N||$.mode===D?256:0),(0===le&&0===fe||Z===d)&&ye===c&&(ye=u),ye)}function be(e){if(!e||!e.state)return b;var a=e.state;return a.window&&(a.window=null),e.state=null,c}function me(e,a){var t;return e&&e.state?0==(2&(t=e.state).wrap)?b:(t.head=a,a.done=!1,c):b}function we(e,t){var i,s=t.length;return e&&e.state?0!==(i=e.state).wrap&&i.mode!==I?b:i.mode===I&&a(1,t,s,0)!==i.check?m:he(e,t,s,s)?(i.mode=W,w):(i.havedict=1,c):b}exports.inflateReset=se,exports.inflateReset2=ne,exports.inflateResetKeep=ie,exports.inflateInit=oe,exports.inflateInit2=re,exports.inflate=ke,exports.inflateEnd=be,exports.inflateGetHeader=me,exports.inflateSetDictionary=we,exports.inflateInfo="pako inflate (from Nodeca project)";
31
+ },{"../utils/common":"tbG5","./adler32":"uxo6","./crc32":"X4kj","./inffast":"LP5M","./inftrees":"uNlq"}],"xUUw":[function(require,module,exports) {
32
+ "use strict";module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};
33
+ },{}],"WIli":[function(require,module,exports) {
34
+ "use strict";function t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}module.exports=t;
35
+ },{}],"faQk":[function(require,module,exports) {
36
+ "use strict";var t=require("./zlib/inflate"),i=require("./utils/common"),n=require("./utils/strings"),s=require("./zlib/constants"),r=require("./zlib/messages"),e=require("./zlib/zstream"),o=require("./zlib/gzheader"),u=Object.prototype.toString;function a(n){if(!(this instanceof a))return new a(n);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},n||{});var u=this.options;u.raw&&u.windowBits>=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;
37
+ },{"./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) {
38
+ "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;
39
+ },{"./lib/utils/common":"tbG5","./lib/deflate":"nFS2","./lib/inflate":"faQk","./lib/zlib/constants":"xUUw"}],"QTYz":[function(require,module,exports) {
40
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MaybeCompressedDataReader=exports.TextProfileDataSource=void 0;var e=t(require("pako"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function t(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={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var n=function(e,r,t,n){return new(t||(t=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(r){i(r)}}function a(e){try{u(n.throw(e))}catch(r){i(r)}}function u(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(s,a)}u((n=n.apply(e,r||[])).next())})};class o{constructor(e,r){this.fileName=e,this.contents=r}name(){return n(this,void 0,void 0,function*(){return this.fileName})}readAsArrayBuffer(){return n(this,void 0,void 0,function*(){return new ArrayBuffer(0)})}readAsText(){return n(this,void 0,void 0,function*(){return this.contents})}}exports.TextProfileDataSource=o;class i{constructor(r,t){this.namePromise=r,this.uncompressedData=t.then(r=>n(this,void 0,void 0,function*(){try{return e.inflate(new Uint8Array(r)).buffer}catch(t){return r}}))}name(){return n(this,void 0,void 0,function*(){return yield this.namePromise})}readAsArrayBuffer(){return n(this,void 0,void 0,function*(){return yield this.uncompressedData})}readAsText(){return n(this,void 0,void 0,function*(){const e=yield this.readAsArrayBuffer();let r="utf-8";const t=new Uint8Array(e);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){return new TextDecoder(r).decode(e)}{console.warn("This browser does not support TextDecoder. Decoding text as ASCII.");let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}})}static fromFile(e){const r=new Promise(r=>{const t=new FileReader;t.addEventListener("loadend",()=>{if(!(t.result instanceof ArrayBuffer))throw new Error("Expected reader.result to be an instance of ArrayBuffer");r(t.result)}),t.readAsArrayBuffer(e)});return new i(Promise.resolve(e.name),r)}static fromArrayBuffer(e,r){return new i(Promise.resolve(e),Promise.resolve(r))}}exports.MaybeCompressedDataReader=i;
41
+ },{"pako":"f4vO"}],"G28U":[function(require,module,exports) {
42
+ "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{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};function i(e){const t=e.split("\n").map(e=>e.split("\t")),r=t.shift();if(!r)return[];const n=new Map;for(let i=0;i<r.length;i++)n.set(i,r[i]);const s=[];for(let i of t){const e={};for(let t=0;t<i.length;t++)e[n.get(t)]=i[t];s.push(e)}return s}function o(e){if("Bytes Used"in e){const t=e["Bytes Used"],r=/\s*(\d+(?:[.]\d+)?) (\w+)\s+(?:\d+(?:[.]\d+))%/.exec(t);if(!r)return 0;const n=parseInt(r[1],10),s=r[2];switch(s){case"Bytes":return n;case"KB":return 1024*n;case"MB":return 1048576*n;case"GB":return 1073741824*n}throw new Error(`Unrecognized units ${s}`)}if("Weight"in e||"Running Time"in e){const t=e.Weight||e["Running Time"],r=/\s*(\d+(?:[.]\d+)?) ?(\w+)\s+(?:\d+(?:[.]\d+))%/.exec(t);if(!r)return 0;const n=parseInt(r[1],10),s=r[2];switch(s){case"ms":return n;case"s":case"min":return 1e3*n}throw new Error(`Unrecognized units ${s}`)}return-1}function a(t){const n=new e.CallTreeProfileBuilder,s=i(t),a=[];let l=0;for(let e of s){const t=e["Symbol Name"];if(!t)continue;const r=t.trim();let s=t.length-r.length;if(a.length-s<0)throw new Error("Invalid format");let i=[];for(;s<a.length;){const e=a.pop();i.push(e)}for(let e of i)l=Math.max(l,e.endValue),n.leaveFrame(e,l);const c={key:`${e["Source Path"]||""}:${r}`,name:r,file:e["Source Path"],endValue:l+o(e)};n.enterFrame(c,l),a.push(c)}for(;a.length>0;){const e=a.pop();l=Math.max(l,e.endValue),n.leaveFrame(e,l)}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 l(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 l(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 c(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.bytePos<this.view.byteLength}bytesLeft(){return this.view.byteLength-this.bytePos}readUint8(){return this.bytePos++,this.bytePos>this.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))continue;const s=new h(yield c((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 c(s)),a=new h(yield c(i));o.seek(32);let l=[];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());l.push(r)}return l})}function m(e){return s(this,void 0,void 0,function*(){const r=(0,t.getOrThrow)(e.files,"form.template"),n=y(yield c(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"],l=[];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})}l.push({number:e,addressToFrameMap:s})}}return{version:s,instrument:o,selectedRunNumber:i,runs:l}})}function w(e){return s(this,void 0,void 0,function*(){const t=yield l(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 l of n){const{addressToFrameMap:r,number:n}=l,s=yield g({fileName:e.name,tree:t,addressToFrameMap:r,runNumber:n});l.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 l=yield d(a,o),c=new Map;for(let e of a)c.set(e.threadID,(0,t.getOrElse)(c,e.threadID,()=>0)+1);const u=Array.from(c.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:l,addressToFrameMap:s,samples:a}))}})}function b(n){let{fileName:s,addressToFrameMap:i,arrays:o,threadID:a,samples:l}=n;const c=new Map;l=l.filter(e=>e.threadID===a);const u=new e.StackListProfileBuilder((0,t.lastOf)(l).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 l){const r=(0,t.getOrInsert)(c,e.backtraceID,e=>{const t=[];return f(e,t),t.reverse(),t});if(null===h&&(u.appendSampleWithWeight([],e.timestamp),h=e.timestamp),e.timestamp<h)throw new Error("Timestamps out of order!");u.appendSampleWithWeight(r,e.timestamp-h),h=e.timestamp}return u.setValueFormatter(new r.TimeFormatter("nanoseconds")),u.build()}function y(e){return T(I(new Uint8Array(e)),(e,t)=>{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;n<r;n++)e.symbols.push(t["$"+(4+n)]);return e}case"XRRunListData":{const e=Object.create(null);return e.runNumbers=t.$0,e.runData=t.$1,e}case"XRIntKeyedDictionary":{const e=new Map,r=t.$0;for(let n=0;n<r;n++){const r=t["$"+(1+2*n)],s=t["$"+(2*n+1+1)];e.set(r,s)}return e}case"XRCore":{const e=Object.create(null);return e.number=t.$0,e.name=t.$1,e}}return t})}function v(e){let t=String.fromCharCode.apply(String,Array.from(e));return"\0"===t.slice(-1)&&(t=t.slice(0,-1)),decodeURIComponent(escape(t))}function U(e){return e instanceof Array}function S(e){return null!==e&&"object"==typeof e&&null===Object.getPrototypeOf(e)}function N(e,t){return t instanceof x?e[t.index]:t}function T(e,t=(e=>e)){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<e.$objects.length;n++)e.$objects[n]=$(e.$objects,e.$objects[n],t);let r=t=>{if(t instanceof x)return e.$objects[t.index];if(U(t))for(let e=0;e<t.length;e++)t[e]=r(t[e]);else if(S(t))for(let e in t)t[e]=r(t[e]);else if(t instanceof Map){const e=new Map(t);t.clear();for(let[n,s]of e.entries())t.set(r(n),r(s))}return t};for(let n=0;n<e.$objects.length;n++)r(e.$objects[n]);return r(e.$top)}function $(e,t,r=(e=>e)){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<e;t++){let e=i[t];1!==n&&(e=(65280&e)>>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<e;n++){const e=t["$"+n];r.push(e)}return r}case"NSDictionary":case"NSMutableDictionary":let s=new Map;if("NS.keys"in t&&"NS.objects"in t)for(let r=0;r<t["NS.keys"].length;r++)s.set(t["NS.keys"][r],t["NS.objects"][r]);else for(;;){let e="NS.key."+s.size,r="NS.object."+s.size;if(!(e in t&&r in t))break;s.set(t[e],t[r])}return s;default:const i=r(n,t);if(i!==t)return i}}return t}class x{constructor(e){this.index=e}}function I(e){for(let t=0;t<8;t++)if(e[t]!=="bplist00".charCodeAt(t))throw new Error("File is not a binary plist");return new P(new DataView(e.buffer,e.byteOffset,e.byteLength)).parseRoot()}exports.UID=x;class P{constructor(e){this.view=e,this.referenceSize=0,this.objects=[],this.offsetTable=[]}parseRoot(){let e=this.view.byteLength-32,t=this.view.getUint8(e+6);this.referenceSize=this.view.getUint8(e+7);let r=this.view.getUint32(e+12,!1),n=this.view.getUint32(e+20,!1),s=this.view.getUint32(e+28,!1);for(let i=0;i<r;i++)this.offsetTable.push(this.parseInteger(s,t)),s+=t;return this.parseObject(this.offsetTable[n])}parseLengthAndOffset(e,t){if(15!==t)return{length:t,offset:0};let r=this.view.getUint8(e++);if(16!=(240&r))throw new Error("Unexpected non-integer length at offset "+e);let n=1<<(15&r);return{length:this.parseInteger(e,n),offset:n+1}}parseSingleton(e,t){if(0===t)return null;if(8===t)return!1;if(9===t)return!0;throw new Error("Unexpected extra value "+t+" at offset "+e)}parseInteger(e,t){if(1===t)return this.view.getUint8(e);if(2===t)return this.view.getUint16(e,!1);if(4===t)return this.view.getUint32(e,!1);if(8===t)return Math.pow(2,32)*this.view.getUint32(e+0,!1)+Math.pow(2,0)*this.view.getUint32(e+4,!1);if(16===t)return Math.pow(2,96)*this.view.getUint32(e+0,!1)+Math.pow(2,64)*this.view.getUint32(e+4,!1)+Math.pow(2,32)*this.view.getUint32(e+8,!1)+Math.pow(2,0)*this.view.getUint32(e+12,!1);throw new Error("Unexpected integer of size "+t+" at offset "+e)}parseFloat(e,t){if(4===t)return this.view.getFloat32(e,!1);if(8===t)return this.view.getFloat64(e,!1);throw new Error("Unexpected float of size "+t+" at offset "+e)}parseDate(e,t){if(8!==t)throw new Error("Unexpected date of size "+t+" at offset "+e);let r=this.view.getFloat64(e,!1);return new Date(9783072e5+1e3*r)}parseData(e,t){let r=this.parseLengthAndOffset(e,t);return new Uint8Array(this.view.buffer,e+r.offset,r.length)}parseStringASCII(e,t){let r=this.parseLengthAndOffset(e,t),n="";e+=r.offset;for(let s=0;s<r.length;s++)n+=String.fromCharCode(this.view.getUint8(e++));return n}parseStringUTF16(e,t){let r=this.parseLengthAndOffset(e,t),n="";e+=r.offset;for(let s=0;s<r.length;s++)n+=String.fromCharCode(this.view.getUint16(e,!1)),e+=2;return n}parseUID(e,t){return new x(this.parseInteger(e,t))}parseArray(e,t){let r=this.parseLengthAndOffset(e,t),n=[],s=this.referenceSize;e+=r.offset;for(let i=0;i<r.length;i++)n.push(this.parseObject(this.offsetTable[this.parseInteger(e,s)])),e+=s;return n}parseDictionary(e,t){let r=this.parseLengthAndOffset(e,t),n=Object.create(null),s=this.referenceSize,i=e+r.offset,o=i+r.length*s;for(let a=0;a<r.length;a++){let e=this.parseObject(this.offsetTable[this.parseInteger(i,s)]),t=this.parseObject(this.offsetTable[this.parseInteger(o,s)]);if("string"!=typeof e)throw new Error("Unexpected non-string key at offset "+i);n[e]=t,i+=s,o+=s}return n}parseObject(e){let t=this.view.getUint8(e++),r=15&t;switch(t>>4){case 0:return this.parseSingleton(e,r);case 1:return this.parseInteger(e,1<<r);case 2:return this.parseFloat(e,1<<r);case 3:return this.parseDate(e,1<<r);case 4:return this.parseData(e,r);case 5:return this.parseStringASCII(e,r);case 6:return this.parseStringUTF16(e,r);case 8:return this.parseUID(e,r+1);case 10:return this.parseArray(e,r);case 13:return this.parseDictionary(e,r)}throw new Error("Unexpected marker "+t+" at offset "+--e)}}
43
+ },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4","./utils":"QTYz"}],"flbo":[function(require,module,exports) {
44
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromBGFlameGraph=t;var e=require("../lib/profile");function r(e){const r=[];return e.replace(/^(.*) (\d+)$/gm,(e,t,i)=>(r.push({stack:t.split(";").map(e=>({key:e,name:e})),duration:parseInt(i,10)}),e)),r}function t(t){const i=r(t),n=i.reduce((e,r)=>e+r.duration,0),o=new e.StackListProfileBuilder(n);if(0===i.length)return null;for(let e of i)o.appendSampleWithWeight(e.stack,e.duration);return o.build()}
45
+ },{"../lib/profile":"YG8z"}],"uNW1":[function(require,module,exports) {
46
+ "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;e<Math.min(t.length,u.length)&&u[e]===t[e];e++)l=e;for(let e=u.length-1;e>l;e--)i.leaveFrame(u[e],r);for(let e=l+1;e<t.length;e++)i.enterFrame(t[e],r);u=t}return i.setValueFormatter(new r.TimeFormatter("milliseconds")),i.build()}
47
+ },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"QV03":[function(require,module,exports) {
48
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromV8ProfLog=n;var e=require("../lib/profile"),t=require("../lib/utils"),r=require("../lib/value-formatters");function a(e,t){if(!e||!e.type)return{key:"(unknown type)",name:"(unknown type)"};let r=e.name;switch(e.type){case"CPP":{const e=r.match(/[tT] ([^(<]*)/);e&&(r=`(c++) ${e[1]}`);break}case"SHARED_LIB":r="(LIB) "+r;break;case"JS":{const e=r.match(/([a-zA-Z0-9\._\-$]*) ([a-zA-Z0-9\.\-_\/$]*):(\d+):(\d+)/);if(e)return{key:r,name:e[1].length>0?e[1]:"(anonymous)",file:e[2].length>0?e[2]:"(unknown file)",line:parseInt(e[3],10),col:parseInt(e[4],10)};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 s=new e.StackListProfileBuilder,o=new Map;let c=0;(0,t.sortBy)(n.ticks,e=>e.tm);for(let e of n.ticks){const r=[];for(let s=e.s.length-2;s>=0;s-=2){const c=e.s[s];-1!==c&&(c>n.code.length?r.push({key:c,name:`0x${c.toString(16)}`}):r.push((i=c,(0,t.getOrInsert)(o,i,e=>a(n.code[e],n)))))}s.appendSampleWithWeight(r,e.tm-c),c=e.tm}var i;return s.setValueFormatter(new r.TimeFormatter("microseconds")),s.build()}
49
+ },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"f2sa":[function(require,module,exports) {
50
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromLinuxPerf=r;var e=require("../lib/profile"),t=require("../lib/utils"),n=require("../lib/value-formatters");function s(e){const t=e.split("\n").filter(e=>!/^\s*#/.exec(e)),n={command:null,processID:null,threadID:null,time:null,eventType:"",stack:[]},s=t.shift();if(!s)return null;const r=/^(\S.+?)\s+(\d+)(?:\/?(\d+))?\s+/.exec(s);if(!r)return null;n.command=r[1],r[3]?(n.processID=parseInt(r[2],10),n.threadID=parseInt(r[3],10)):n.threadID=parseInt(r[2],10);const l=/\s+(\d+\.\d+):\s+/.exec(s);l&&(n.time=parseFloat(l[1]));const i=/(\S+):\s*$/.exec(s);i&&(n.eventType=i[1]);for(let o of t){const e=/^\s*(\w+)\s*(.+) \((\S*)\)/.exec(o);if(!e)continue;let[,t,s,r]=e;s=s.replace(/\+0x[\da-f]+$/,""),n.stack.push({address:`0x${t}`,symbolName:s,file:r})}return n.stack.reverse(),n}function r(r){const l=new Map;let i=null;const o=r.split("\n\n").map(s);for(let s of o){if(null==s)continue;if(null!=i&&i!=s.eventType)continue;if(null==s.time)continue;i=s.eventType;let r=[];s.command&&r.push(s.command),s.processID&&r.push(`pid: ${s.processID}`),s.threadID&&r.push(`tid: ${s.threadID}`);const o=r.join(" ");(0,t.getOrInsert)(l,o,()=>{const t=new e.StackListProfileBuilder;return t.setName(o),t.setValueFormatter(new n.TimeFormatter("seconds")),t}).appendSampleWithTimestamp(s.stack.map(({symbolName:e,file:t})=>({key:`${e} (${t})`,name:"[unknown]"===e?`??? (${t})`:e,file:t})),s.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()))}}
51
+ },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"jm73":[function(require,module,exports) {
52
+ "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()]}}
53
+ },{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"jP3w":[function(require,module,exports) {
54
+ "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||"(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()}
55
+ },{"../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"oU4k":[function(require,module,exports) {
56
+ "use strict";function n(n,e){for(var r=new Array(arguments.length-1),t=0,l=2,o=!0;l<arguments.length;)r[t++]=arguments[l++];return new Promise(function(l,u){r[t]=function(n){if(o)if(o=!1,n)u(n);else{for(var e=new Array(arguments.length-1),r=0;r<e.length;)e[r++]=arguments[r];l.apply(null,e)}};try{n.apply(e||null,r)}catch(a){o&&(o=!1,u(a))}})}module.exports=n;
57
+ },{}],"SASd":[function(require,module,exports) {
58
+ "use strict";var r=exports;r.length=function(r){var e=r.length;if(!e)return 0;for(var a=0;--e%4>1&&"="===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<t;){var h=r[a++];switch(s){case 0:o[c++]=e[h>>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;s<r.length;){var h=r.charCodeAt(s++);if(61===h&&c>1)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)};
59
+ },{}],"wJQW":[function(require,module,exports) {
60
+ "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;i<e.length;)e[i].fn===s?e.splice(i,1):++i;return this},t.prototype.emit=function(t){var s=this._listeners[t];if(s){for(var e=[],i=1;i<arguments.length;)e.push(arguments[i++]);for(i=0;i<s.length;)s[i].fn.apply(s[i++].ctx,e)}return this};
61
+ },{}],"SGHJ":[function(require,module,exports) {
62
+ "use strict";function n(n){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),r=128===t[3];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]}function u(n,r,o){e[0]=n,r[o]=t[3],r[o+1]=t[2],r[o+2]=t[1],r[o+3]=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],e[0]}function a(n,r){return t[3]=n[r],t[2]=n[r+1],t[1]=n[r+2],t[0]=n[r+3],e[0]}n.writeFloatLE=r?o:u,n.writeFloatBE=r?u:o,n.readFloatLE=r?i:a,n.readFloatBE=r?a:i}():function(){function u(n,e,t,r){var o=e<0?1:0;if(o&&(e=-e),0===e)n(1/e>0?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);
63
+ },{}],"XRF3":[function(require,module,exports) {
64
+ "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;
65
+ },{}],"nie5":[function(require,module,exports) {
66
+ "use strict";var r=exports;r.length=function(r){for(var t=0,n=0,e=0;e<r.length;++e)(n=r.charCodeAt(e))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&r.charCodeAt(e+1))?(++e,t+=4):t+=3;return t},r.read=function(r,t,n){if(n-t<1)return"";for(var e,o=null,a=[],i=0;t<n;)(e=r[t++])<128?a[i++]=e:e>191&&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<r.length;++i)(e=r.charCodeAt(i))<128?t[n++]=e:e<2048?(t[n++]=e>>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};
67
+ },{}],"YX4y":[function(require,module,exports) {
68
+ "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;
69
+ },{}],"Ty7D":[function(require,module,exports) {
70
+ "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};
71
+ },{"../util/minimal":"KgKa"}],"yh9p":[function(require,module,exports) {
72
+ "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;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)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<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>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;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?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;
73
+ },{}],"JgNJ":[function(require,module,exports) {
74
+ exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>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<<e)-1,N=i>>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<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
75
+ },{}],"REa7":[function(require,module,exports) {
76
+ var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
77
+ },{}],"dskh":[function(require,module,exports) {
78
+
79
+ var global = arguments[3];
80
+ 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()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=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;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(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;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?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);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(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;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)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||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.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<o;++i)t[e+i]=(r&255<<8*(n?i:1-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<o;++i)t[e+i]=r>>>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),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(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<r&&(i*=256);)n+=this[t+o]*i;return n>=(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<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=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=e-1,o=1;for(this[r+i]=255&t;--i>=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<e&&(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.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<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&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<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>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<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
81
+ },{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"KgKa":[function(require,module,exports) {
82
+ var global = arguments[3];
83
+ var Buffer = require("buffer").Buffer;
84
+ var e=arguments[3],r=require("buffer").Buffer,t=exports;function n(e,r,t){for(var n=Object.keys(r),o=0;o<n.length;++o)void 0!==e[n[o]]&&t||(e[n[o]]=r[n[o]]);return e}function o(e){function r(e,t){if(!(this instanceof r))return new r(e,t);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),t&&n(this,t)}return(r.prototype=Object.create(Error.prototype)).constructor=r,Object.defineProperty(r.prototype,"name",{get:function(){return e}}),r.prototype.toString=function(){return this.name+": "+this.message},r}t.asPromise=require("@protobufjs/aspromise"),t.base64=require("@protobufjs/base64"),t.EventEmitter=require("@protobufjs/eventemitter"),t.float=require("@protobufjs/float"),t.inquire=require("@protobufjs/inquire"),t.utf8=require("@protobufjs/utf8"),t.pool=require("@protobufjs/pool"),t.LongBits=require("./longbits"),t.global="undefined"!=typeof window&&window||void 0!==e&&e||"undefined"!=typeof self&&self||this,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isNode=Boolean(t.global.process&&t.global.process.versions&&t.global.process.versions.node),t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isObject=function(e){return e&&"object"==typeof e},t.isset=t.isSet=function(e,r){var t=e[r];return!(null==t||!e.hasOwnProperty(r))&&("object"!=typeof t||(Array.isArray(t)?t.length:Object.keys(t).length)>0)},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<e.length;++t)r[e[t]]=1;return function(){for(var e=Object.keys(this),t=e.length-1;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;t<e.length;++t)e[t]!==r&&delete this[e[t]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;e?(t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(r,t){return new e(r,t)},t._Buffer_allocUnsafe=e.allocUnsafe||function(r){return new e(r)}):t._Buffer_from=t._Buffer_allocUnsafe=null};
85
+ },{"@protobufjs/aspromise":"oU4k","@protobufjs/base64":"SASd","@protobufjs/eventemitter":"wJQW","@protobufjs/float":"SGHJ","@protobufjs/inquire":"XRF3","@protobufjs/utf8":"nie5","@protobufjs/pool":"YX4y","./longbits":"Ty7D","buffer":"dskh"}],"DEsF":[function(require,module,exports) {
86
+ "use strict";module.exports=u;var t,i=require("./util/minimal"),n=i.LongBits,e=i.base64,o=i.utf8;function r(t,i,n){this.fn=t,this.len=i,this.next=void 0,this.val=n}function s(){}function h(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function u(){this.len=0,this.head=new r(s,0,0),this.tail=this.head,this.states=null}function l(t,i,n){i[n]=255&t}function p(t,i,n){for(;t>127;)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<t.length;++e)i[n+e]=t[e]};u.prototype.bytes=function(t){var n=t.length>>>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};
87
+ },{"./util/minimal":"KgKa"}],"BjCp":[function(require,module,exports) {
88
+
89
+ "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<t.length;)e[r++]=t[n++]};function o(t,r,n){t.length<40?e.utf8.write(t,r,n):r.utf8Write(t,n)}n.prototype.bytes=function(t){e.isString(t)&&(t=e._Buffer_from(t,"base64"));var r=t.length>>>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};
90
+ },{"./writer":"DEsF","./util/minimal":"KgKa"}],"z4LV":[function(require,module,exports) {
91
+ "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)}})};
92
+ },{"./util/minimal":"KgKa"}],"Rkr2":[function(require,module,exports) {
93
+ "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))};
94
+ },{"./reader":"z4LV","./util/minimal":"KgKa"}],"eoks":[function(require,module,exports) {
95
+ "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};
96
+ },{"../util/minimal":"KgKa"}],"ay75":[function(require,module,exports) {
97
+ "use strict";var e=exports;e.Service=require("./rpc/service");
98
+ },{"./rpc/service":"eoks"}],"Nr0F":[function(require,module,exports) {
99
+ "use strict";module.exports={};
100
+ },{}],"qETn":[function(require,module,exports) {
101
+ "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();
102
+ },{"./writer":"DEsF","./writer_buffer":"BjCp","./reader":"z4LV","./reader_buffer":"Rkr2","./util/minimal":"KgKa","./rpc":"ay75","./roots":"Nr0F"}],"Myh2":[function(require,module,exports) {
103
+ "use strict";module.exports=require("./src/index-minimal");
104
+ },{"./src/index-minimal":"qETn"}],"YdJi":[function(require,module,exports) {
105
+ "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<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.sampleType=o.emptyArray,i.prototype.sample=o.emptyArray,i.prototype.mapping=o.emptyArray,i.prototype.location=o.emptyArray,i.prototype.function=o.emptyArray,i.prototype.stringTable=o.emptyArray,i.prototype.dropFrames=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.keepFrames=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.timeNanos=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.durationNanos=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.periodType=null,i.prototype.period=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.comment=o.emptyArray,i.prototype.defaultSampleType=o.Long?o.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,n){if(n||(n=t.create()),null!=e.sampleType&&e.sampleType.length)for(var o=0;o<e.sampleType.length;++o)r.perftools.profiles.ValueType.encode(e.sampleType[o],n.uint32(10).fork()).ldelim();if(null!=e.sample&&e.sample.length)for(o=0;o<e.sample.length;++o)r.perftools.profiles.Sample.encode(e.sample[o],n.uint32(18).fork()).ldelim();if(null!=e.mapping&&e.mapping.length)for(o=0;o<e.mapping.length;++o)r.perftools.profiles.Mapping.encode(e.mapping[o],n.uint32(26).fork()).ldelim();if(null!=e.location&&e.location.length)for(o=0;o<e.location.length;++o)r.perftools.profiles.Location.encode(e.location[o],n.uint32(34).fork()).ldelim();if(null!=e.function&&e.function.length)for(o=0;o<e.function.length;++o)r.perftools.profiles.Function.encode(e.function[o],n.uint32(42).fork()).ldelim();if(null!=e.stringTable&&e.stringTable.length)for(o=0;o<e.stringTable.length;++o)n.uint32(50).string(e.stringTable[o]);if(null!=e.dropFrames&&e.hasOwnProperty("dropFrames")&&n.uint32(56).int64(e.dropFrames),null!=e.keepFrames&&e.hasOwnProperty("keepFrames")&&n.uint32(64).int64(e.keepFrames),null!=e.timeNanos&&e.hasOwnProperty("timeNanos")&&n.uint32(72).int64(e.timeNanos),null!=e.durationNanos&&e.hasOwnProperty("durationNanos")&&n.uint32(80).int64(e.durationNanos),null!=e.periodType&&e.hasOwnProperty("periodType")&&r.perftools.profiles.ValueType.encode(e.periodType,n.uint32(90).fork()).ldelim(),null!=e.period&&e.hasOwnProperty("period")&&n.uint32(96).int64(e.period),null!=e.comment&&e.comment.length){for(n.uint32(106).fork(),o=0;o<e.comment.length;++o)n.int64(e.comment[o]);n.ldelim()}return null!=e.defaultSampleType&&e.hasOwnProperty("defaultSampleType")&&n.uint32(112).int64(e.defaultSampleType),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Profile;e.pos<o;){var l=e.uint32();switch(l>>>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<s;)i.comment.push(e.int64());else i.comment.push(e.int64());break;case 14:i.defaultSampleType=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){if("object"!=typeof e||null===e)return"object expected";if(null!=e.sampleType&&e.hasOwnProperty("sampleType")){if(!Array.isArray(e.sampleType))return"sampleType: array expected";for(var n=0;n<e.sampleType.length;++n)if(t=r.perftools.profiles.ValueType.verify(e.sampleType[n]))return"sampleType."+t}if(null!=e.sample&&e.hasOwnProperty("sample")){if(!Array.isArray(e.sample))return"sample: array expected";for(n=0;n<e.sample.length;++n)if(t=r.perftools.profiles.Sample.verify(e.sample[n]))return"sample."+t}if(null!=e.mapping&&e.hasOwnProperty("mapping")){if(!Array.isArray(e.mapping))return"mapping: array expected";for(n=0;n<e.mapping.length;++n)if(t=r.perftools.profiles.Mapping.verify(e.mapping[n]))return"mapping."+t}if(null!=e.location&&e.hasOwnProperty("location")){if(!Array.isArray(e.location))return"location: array expected";for(n=0;n<e.location.length;++n)if(t=r.perftools.profiles.Location.verify(e.location[n]))return"location."+t}if(null!=e.function&&e.hasOwnProperty("function")){if(!Array.isArray(e.function))return"function: array expected";for(n=0;n<e.function.length;++n)if(t=r.perftools.profiles.Function.verify(e.function[n]))return"function."+t}if(null!=e.stringTable&&e.hasOwnProperty("stringTable")){if(!Array.isArray(e.stringTable))return"stringTable: array expected";for(n=0;n<e.stringTable.length;++n)if(!o.isString(e.stringTable[n]))return"stringTable: string[] expected"}if(null!=e.dropFrames&&e.hasOwnProperty("dropFrames")&&!(o.isInteger(e.dropFrames)||e.dropFrames&&o.isInteger(e.dropFrames.low)&&o.isInteger(e.dropFrames.high)))return"dropFrames: integer|Long expected";if(null!=e.keepFrames&&e.hasOwnProperty("keepFrames")&&!(o.isInteger(e.keepFrames)||e.keepFrames&&o.isInteger(e.keepFrames.low)&&o.isInteger(e.keepFrames.high)))return"keepFrames: integer|Long expected";if(null!=e.timeNanos&&e.hasOwnProperty("timeNanos")&&!(o.isInteger(e.timeNanos)||e.timeNanos&&o.isInteger(e.timeNanos.low)&&o.isInteger(e.timeNanos.high)))return"timeNanos: integer|Long expected";if(null!=e.durationNanos&&e.hasOwnProperty("durationNanos")&&!(o.isInteger(e.durationNanos)||e.durationNanos&&o.isInteger(e.durationNanos.low)&&o.isInteger(e.durationNanos.high)))return"durationNanos: integer|Long expected";var t;if(null!=e.periodType&&e.hasOwnProperty("periodType")&&(t=r.perftools.profiles.ValueType.verify(e.periodType)))return"periodType."+t;if(null!=e.period&&e.hasOwnProperty("period")&&!(o.isInteger(e.period)||e.period&&o.isInteger(e.period.low)&&o.isInteger(e.period.high)))return"period: integer|Long expected";if(null!=e.comment&&e.hasOwnProperty("comment")){if(!Array.isArray(e.comment))return"comment: array expected";for(n=0;n<e.comment.length;++n)if(!(o.isInteger(e.comment[n])||e.comment[n]&&o.isInteger(e.comment[n].low)&&o.isInteger(e.comment[n].high)))return"comment: integer|Long[] expected"}return null!=e.defaultSampleType&&e.hasOwnProperty("defaultSampleType")&&!(o.isInteger(e.defaultSampleType)||e.defaultSampleType&&o.isInteger(e.defaultSampleType.low)&&o.isInteger(e.defaultSampleType.high))?"defaultSampleType: integer|Long expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Profile)return e;var n=new r.perftools.profiles.Profile;if(e.sampleType){if(!Array.isArray(e.sampleType))throw TypeError(".perftools.profiles.Profile.sampleType: array expected");n.sampleType=[];for(var t=0;t<e.sampleType.length;++t){if("object"!=typeof e.sampleType[t])throw TypeError(".perftools.profiles.Profile.sampleType: object expected");n.sampleType[t]=r.perftools.profiles.ValueType.fromObject(e.sampleType[t])}}if(e.sample){if(!Array.isArray(e.sample))throw TypeError(".perftools.profiles.Profile.sample: array expected");for(n.sample=[],t=0;t<e.sample.length;++t){if("object"!=typeof e.sample[t])throw TypeError(".perftools.profiles.Profile.sample: object expected");n.sample[t]=r.perftools.profiles.Sample.fromObject(e.sample[t])}}if(e.mapping){if(!Array.isArray(e.mapping))throw TypeError(".perftools.profiles.Profile.mapping: array expected");for(n.mapping=[],t=0;t<e.mapping.length;++t){if("object"!=typeof e.mapping[t])throw TypeError(".perftools.profiles.Profile.mapping: object expected");n.mapping[t]=r.perftools.profiles.Mapping.fromObject(e.mapping[t])}}if(e.location){if(!Array.isArray(e.location))throw TypeError(".perftools.profiles.Profile.location: array expected");for(n.location=[],t=0;t<e.location.length;++t){if("object"!=typeof e.location[t])throw TypeError(".perftools.profiles.Profile.location: object expected");n.location[t]=r.perftools.profiles.Location.fromObject(e.location[t])}}if(e.function){if(!Array.isArray(e.function))throw TypeError(".perftools.profiles.Profile.function: array expected");for(n.function=[],t=0;t<e.function.length;++t){if("object"!=typeof e.function[t])throw TypeError(".perftools.profiles.Profile.function: object expected");n.function[t]=r.perftools.profiles.Function.fromObject(e.function[t])}}if(e.stringTable){if(!Array.isArray(e.stringTable))throw TypeError(".perftools.profiles.Profile.stringTable: array expected");for(n.stringTable=[],t=0;t<e.stringTable.length;++t)n.stringTable[t]=String(e.stringTable[t])}if(null!=e.dropFrames&&(o.Long?(n.dropFrames=o.Long.fromValue(e.dropFrames)).unsigned=!1:"string"==typeof e.dropFrames?n.dropFrames=parseInt(e.dropFrames,10):"number"==typeof e.dropFrames?n.dropFrames=e.dropFrames:"object"==typeof e.dropFrames&&(n.dropFrames=new o.LongBits(e.dropFrames.low>>>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<e.comment.length;++t)o.Long?(n.comment[t]=o.Long.fromValue(e.comment[t])).unsigned=!1:"string"==typeof e.comment[t]?n.comment[t]=parseInt(e.comment[t],10):"number"==typeof e.comment[t]?n.comment[t]=e.comment[t]:"object"==typeof e.comment[t]&&(n.comment[t]=new o.LongBits(e.comment[t].low>>>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<e.sampleType.length;++l)t.sampleType[l]=r.perftools.profiles.ValueType.toObject(e.sampleType[l],n)}if(e.sample&&e.sample.length)for(t.sample=[],l=0;l<e.sample.length;++l)t.sample[l]=r.perftools.profiles.Sample.toObject(e.sample[l],n);if(e.mapping&&e.mapping.length)for(t.mapping=[],l=0;l<e.mapping.length;++l)t.mapping[l]=r.perftools.profiles.Mapping.toObject(e.mapping[l],n);if(e.location&&e.location.length)for(t.location=[],l=0;l<e.location.length;++l)t.location[l]=r.perftools.profiles.Location.toObject(e.location[l],n);if(e.function&&e.function.length)for(t.function=[],l=0;l<e.function.length;++l)t.function[l]=r.perftools.profiles.Function.toObject(e.function[l],n);if(e.stringTable&&e.stringTable.length)for(t.stringTable=[],l=0;l<e.stringTable.length;++l)t.stringTable[l]=e.stringTable[l];if(null!=e.dropFrames&&e.hasOwnProperty("dropFrames")&&("number"==typeof e.dropFrames?t.dropFrames=n.longs===String?String(e.dropFrames):e.dropFrames:t.dropFrames=n.longs===String?o.Long.prototype.toString.call(e.dropFrames):n.longs===Number?new o.LongBits(e.dropFrames.low>>>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<e.comment.length;++l)"number"==typeof e.comment[l]?t.comment[l]=n.longs===String?String(e.comment[l]):e.comment[l]:t.comment[l]=n.longs===String?o.Long.prototype.toString.call(e.comment[l]):n.longs===Number?new o.LongBits(e.comment[l].low>>>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<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.type=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.unit=o.Long?o.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,n){return n||(n=t.create()),null!=e.type&&e.hasOwnProperty("type")&&n.uint32(8).int64(e.type),null!=e.unit&&e.hasOwnProperty("unit")&&n.uint32(16).int64(e.unit),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.ValueType;e.pos<o;){var l=e.uint32();switch(l>>>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<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.locationId=o.emptyArray,i.prototype.value=o.emptyArray,i.prototype.label=o.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,n){if(n||(n=t.create()),null!=e.locationId&&e.locationId.length){n.uint32(10).fork();for(var o=0;o<e.locationId.length;++o)n.uint64(e.locationId[o]);n.ldelim()}if(null!=e.value&&e.value.length){for(n.uint32(18).fork(),o=0;o<e.value.length;++o)n.int64(e.value[o]);n.ldelim()}if(null!=e.label&&e.label.length)for(o=0;o<e.label.length;++o)r.perftools.profiles.Label.encode(e.label[o],n.uint32(26).fork()).ldelim();return n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Sample;e.pos<o;){var l=e.uint32();switch(l>>>3){case 1:if(i.locationId&&i.locationId.length||(i.locationId=[]),2==(7&l))for(var s=e.uint32()+e.pos;e.pos<s;)i.locationId.push(e.uint64());else i.locationId.push(e.uint64());break;case 2:if(i.value&&i.value.length||(i.value=[]),2==(7&l))for(s=e.uint32()+e.pos;e.pos<s;)i.value.push(e.int64());else i.value.push(e.int64());break;case 3:i.label&&i.label.length||(i.label=[]),i.label.push(r.perftools.profiles.Label.decode(e,e.uint32()));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.locationId&&e.hasOwnProperty("locationId")){if(!Array.isArray(e.locationId))return"locationId: array expected";for(var n=0;n<e.locationId.length;++n)if(!(o.isInteger(e.locationId[n])||e.locationId[n]&&o.isInteger(e.locationId[n].low)&&o.isInteger(e.locationId[n].high)))return"locationId: integer|Long[] expected"}if(null!=e.value&&e.hasOwnProperty("value")){if(!Array.isArray(e.value))return"value: array expected";for(n=0;n<e.value.length;++n)if(!(o.isInteger(e.value[n])||e.value[n]&&o.isInteger(e.value[n].low)&&o.isInteger(e.value[n].high)))return"value: integer|Long[] expected"}if(null!=e.label&&e.hasOwnProperty("label")){if(!Array.isArray(e.label))return"label: array expected";for(n=0;n<e.label.length;++n){var t=r.perftools.profiles.Label.verify(e.label[n]);if(t)return"label."+t}}return null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Sample)return e;var n=new r.perftools.profiles.Sample;if(e.locationId){if(!Array.isArray(e.locationId))throw TypeError(".perftools.profiles.Sample.locationId: array expected");n.locationId=[];for(var t=0;t<e.locationId.length;++t)o.Long?(n.locationId[t]=o.Long.fromValue(e.locationId[t])).unsigned=!0:"string"==typeof e.locationId[t]?n.locationId[t]=parseInt(e.locationId[t],10):"number"==typeof e.locationId[t]?n.locationId[t]=e.locationId[t]:"object"==typeof e.locationId[t]&&(n.locationId[t]=new o.LongBits(e.locationId[t].low>>>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<e.value.length;++t)o.Long?(n.value[t]=o.Long.fromValue(e.value[t])).unsigned=!1:"string"==typeof e.value[t]?n.value[t]=parseInt(e.value[t],10):"number"==typeof e.value[t]?n.value[t]=e.value[t]:"object"==typeof e.value[t]&&(n.value[t]=new o.LongBits(e.value[t].low>>>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<e.label.length;++t){if("object"!=typeof e.label[t])throw TypeError(".perftools.profiles.Sample.label: object expected");n.label[t]=r.perftools.profiles.Label.fromObject(e.label[t])}}return n},i.toObject=function(e,n){n||(n={});var t={};if((n.arrays||n.defaults)&&(t.locationId=[],t.value=[],t.label=[]),e.locationId&&e.locationId.length){t.locationId=[];for(var i=0;i<e.locationId.length;++i)"number"==typeof e.locationId[i]?t.locationId[i]=n.longs===String?String(e.locationId[i]):e.locationId[i]:t.locationId[i]=n.longs===String?o.Long.prototype.toString.call(e.locationId[i]):n.longs===Number?new o.LongBits(e.locationId[i].low>>>0,e.locationId[i].high>>>0).toNumber(!0):e.locationId[i]}if(e.value&&e.value.length)for(t.value=[],i=0;i<e.value.length;++i)"number"==typeof e.value[i]?t.value[i]=n.longs===String?String(e.value[i]):e.value[i]:t.value[i]=n.longs===String?o.Long.prototype.toString.call(e.value[i]):n.longs===Number?new o.LongBits(e.value[i].low>>>0,e.value[i].high>>>0).toNumber():e.value[i];if(e.label&&e.label.length)for(t.label=[],i=0;i<e.label.length;++i)t.label[i]=r.perftools.profiles.Label.toObject(e.label[i],n);return t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Label=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.key=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.str=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.num=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.numUnit=o.Long?o.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,n){return n||(n=t.create()),null!=e.key&&e.hasOwnProperty("key")&&n.uint32(8).int64(e.key),null!=e.str&&e.hasOwnProperty("str")&&n.uint32(16).int64(e.str),null!=e.num&&e.hasOwnProperty("num")&&n.uint32(24).int64(e.num),null!=e.numUnit&&e.hasOwnProperty("numUnit")&&n.uint32(32).int64(e.numUnit),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Label;e.pos<o;){var l=e.uint32();switch(l>>>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<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.id=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.memoryStart=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.memoryLimit=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.fileOffset=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.filename=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.buildId=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.hasFunctions=!1,i.prototype.hasFilenames=!1,i.prototype.hasLineNumbers=!1,i.prototype.hasInlineFrames=!1,i.create=function(e){return new i(e)},i.encode=function(e,n){return n||(n=t.create()),null!=e.id&&e.hasOwnProperty("id")&&n.uint32(8).uint64(e.id),null!=e.memoryStart&&e.hasOwnProperty("memoryStart")&&n.uint32(16).uint64(e.memoryStart),null!=e.memoryLimit&&e.hasOwnProperty("memoryLimit")&&n.uint32(24).uint64(e.memoryLimit),null!=e.fileOffset&&e.hasOwnProperty("fileOffset")&&n.uint32(32).uint64(e.fileOffset),null!=e.filename&&e.hasOwnProperty("filename")&&n.uint32(40).int64(e.filename),null!=e.buildId&&e.hasOwnProperty("buildId")&&n.uint32(48).int64(e.buildId),null!=e.hasFunctions&&e.hasOwnProperty("hasFunctions")&&n.uint32(56).bool(e.hasFunctions),null!=e.hasFilenames&&e.hasOwnProperty("hasFilenames")&&n.uint32(64).bool(e.hasFilenames),null!=e.hasLineNumbers&&e.hasOwnProperty("hasLineNumbers")&&n.uint32(72).bool(e.hasLineNumbers),null!=e.hasInlineFrames&&e.hasOwnProperty("hasInlineFrames")&&n.uint32(80).bool(e.hasInlineFrames),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Mapping;e.pos<o;){var l=e.uint32();switch(l>>>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<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.id=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.mappingId=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.address=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.line=o.emptyArray,i.prototype.isFolded=!1,i.create=function(e){return new i(e)},i.encode=function(e,n){if(n||(n=t.create()),null!=e.id&&e.hasOwnProperty("id")&&n.uint32(8).uint64(e.id),null!=e.mappingId&&e.hasOwnProperty("mappingId")&&n.uint32(16).uint64(e.mappingId),null!=e.address&&e.hasOwnProperty("address")&&n.uint32(24).uint64(e.address),null!=e.line&&e.line.length)for(var o=0;o<e.line.length;++o)r.perftools.profiles.Line.encode(e.line[o],n.uint32(34).fork()).ldelim();return null!=e.isFolded&&e.hasOwnProperty("isFolded")&&n.uint32(40).bool(e.isFolded),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Location;e.pos<o;){var l=e.uint32();switch(l>>>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<e.line.length;++n){var t=r.perftools.profiles.Line.verify(e.line[n]);if(t)return"line."+t}}return null!=e.isFolded&&e.hasOwnProperty("isFolded")&&"boolean"!=typeof e.isFolded?"isFolded: boolean expected":null},i.fromObject=function(e){if(e instanceof r.perftools.profiles.Location)return e;var n=new r.perftools.profiles.Location;if(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.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<e.line.length;++t){if("object"!=typeof e.line[t])throw TypeError(".perftools.profiles.Location.line: object expected");n.line[t]=r.perftools.profiles.Line.fromObject(e.line[t])}}return null!=e.isFolded&&(n.isFolded=Boolean(e.isFolded)),n},i.toObject=function(e,n){n||(n={});var t={};if((n.arrays||n.defaults)&&(t.line=[]),n.defaults){if(o.Long){var i=new o.Long(0,0,!0);t.id=n.longs===String?i.toString():n.longs===Number?i.toNumber():i}else t.id=n.longs===String?"0":0;o.Long?(i=new o.Long(0,0,!0),t.mappingId=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.mappingId=n.longs===String?"0":0,o.Long?(i=new o.Long(0,0,!0),t.address=n.longs===String?i.toString():n.longs===Number?i.toNumber():i):t.address=n.longs===String?"0":0,t.isFolded=!1}if(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.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<e.line.length;++l)t.line[l]=r.perftools.profiles.Line.toObject(e.line[l],n)}return null!=e.isFolded&&e.hasOwnProperty("isFolded")&&(t.isFolded=e.isFolded),t},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i}(),i.Line=function(){function i(e){if(e)for(var n=Object.keys(e),t=0;t<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.functionId=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.line=o.Long?o.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,n){return n||(n=t.create()),null!=e.functionId&&e.hasOwnProperty("functionId")&&n.uint32(8).uint64(e.functionId),null!=e.line&&e.hasOwnProperty("line")&&n.uint32(16).int64(e.line),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Line;e.pos<o;){var l=e.uint32();switch(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<n.length;++t)null!=e[n[t]]&&(this[n[t]]=e[n[t]])}return i.prototype.id=o.Long?o.Long.fromBits(0,0,!0):0,i.prototype.name=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.systemName=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.filename=o.Long?o.Long.fromBits(0,0,!1):0,i.prototype.startLine=o.Long?o.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,n){return n||(n=t.create()),null!=e.id&&e.hasOwnProperty("id")&&n.uint32(8).uint64(e.id),null!=e.name&&e.hasOwnProperty("name")&&n.uint32(16).int64(e.name),null!=e.systemName&&e.hasOwnProperty("systemName")&&n.uint32(24).int64(e.systemName),null!=e.filename&&e.hasOwnProperty("filename")&&n.uint32(32).int64(e.filename),null!=e.startLine&&e.hasOwnProperty("startLine")&&n.uint32(40).int64(e.startLine),n},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,t){e instanceof n||(e=n.create(e));for(var o=void 0===t?e.len:e.pos+t,i=new r.perftools.profiles.Function;e.pos<o;){var l=e.uint32();switch(l>>>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;
106
+ },{"protobufjs/minimal":"Myh2"}],"VmHy":[function(require,module,exports) {
107
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importAsPprofProfile=r;var e=require("./profile.proto.js"),n=require("../lib/profile"),t=require("../lib/utils"),l=require("../lib/value-formatters");function r(r){if(0===r.byteLength)return null;let o;try{o=e.perftools.profiles.Profile.decode(new Uint8Array(r))}catch(b){return null}function i(e){return"number"==typeof e?e:e.low}function u(e){return o.stringTable[i(e)]||null}const s=new Map;function a(e){const{name:n,filename:t,startLine:l}=e,r=null!=n&&u(n)||"(unknown)",o=null!=t?u(t):null,i=null!=l?+l:null,s={key:`${r}:${o}:${i}`,name:r};return null!=o&&(s.file=o),null!=i&&(s.line=i),s}for(let e of o.function)if(e.id){const n=a(e);null!=n&&s.set(i(e.id),n)}function c(e){const{line:n}=e;if(null==n)return null;const l=(0,t.lastOf)(n);return null==l?null:l.functionId&&s.get(i(l.functionId))||null}const f=new Map;for(let e of o.location)if(null!=e.id){const n=c(e);n&&f.set(i(e.id),n)}const p=o.sampleType.map(e=>({type:e.type&&u(e.type)||"samples",unit:e.unit&&u(e.unit)||"count"})),d=o.defaultSampleType?+o.defaultSampleType:p.length-1,m=p[d],y=new n.StackListProfileBuilder;switch(m.unit){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":y.setValueFormatter(new l.TimeFormatter(m.unit));break;case"bytes":y.setValueFormatter(new l.ByteFormatter)}for(let e of o.sample){const n=e.locationId?e.locationId.map(e=>f.get(i(e))):[];n.reverse();const t=e.value[d];y.appendSampleWithWeight(n.filter(e=>null!=e),+t)}return y.build()}
108
+ },{"./profile.proto.js":"YdJi","../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"bNW7":[function(require,module,exports) {
109
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importFromChromeHeapProfile=o;var e=require("../lib/profile"),r=require("../lib/utils"),t=require("../lib/value-formatters");const n=new Map;function i(e){return(0,r.getOrInsert)(n,e,e=>{const r=e.functionName||"(anonymous)",t=e.url,n=e.lineNumber,i=e.columnNumber;return{key:`${r}:${t}:${n}:${i}`,name:r,file:t,line:n,col:i}})}function o(r){const n=new Map;let o=0;const l=(e,r)=>{e.id=o++,n.set(e.id,e),r&&(e.parent=r.id),e.children.forEach(r=>l(r,e))};l(r.head);const u=e=>{if(0===e.children.length)return e.selfSize||0;const r=e.children.reduce((e,r)=>e+=u(r),e.selfSize);return e.totalSize=r,r},a=u(r.head),s=[];for(let e of n.values()){let r=[];for(r.push(e);void 0!==e.parent;){const t=n.get(e.parent);if(void 0===t)break;r.unshift(t),e=t}s.push(r)}const c=new e.StackListProfileBuilder(a);for(let e of s){const r=e[e.length-1];c.appendSampleWithWeight(e.map(e=>i(e.callFrame)),r.selfSize)}return c.setValueFormatter(new t.ByteFormatter),c.build()}
110
+ },{"../lib/profile":"YG8z","../lib/utils":"ucYa","../lib/value-formatters":"LsM4"}],"KFvE":[function(require,module,exports) {
111
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTraceEventFormatted=m,exports.importTraceEvents=g;var e=require("../lib/utils"),t=require("../lib/profile"),n=require("../lib/value-formatters");function r(t,n){return`${(0,e.zeroPad)(""+t,10)}:${(0,e.zeroPad)(""+n,10)}`}function s(t){const n=new Map;for(let s of t){(0,e.getOrInsert)(n,r(s.pid,s.tid),()=>[]).push(s)}return n}function o(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 s<o?"B":o<s?"E":n.name===r.name?"B":"E"}function a(e){const t=[],n=[];if(e.length>0){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 a of e)switch(a.ph){case"B":t.push(a);break;case"E":n.push(a);break;case"X":r.push(a);break;default:return a}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.ts<t.ts)return-1;if(e.ts>t.ts)return 1;const n=s(e),r=s(t);return n>r?-1:n<r?1:0});for(let a of r){const e=s(a);t.push(Object.assign(Object.assign({},a),{ph:"B"})),n.push(Object.assign(Object.assign({},a),{ph:"E",ts:a.ts+e}))}function o(e,t){return e.ts<t.ts?-1:e.ts>t.ts?1:0}return t.sort(o),n.sort(o),[t,n]}function i(e){const t=[];for(let n of e)switch(n.ph){case"B":case"E":case"X":t.push(n)}return t}function u(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 c(e){const t=new Map;for(let n of e)"M"===n.ph&&"thread_name"===n.name&&n.args&&n.args.name&&t.set(r(n.pid,n.tid),n.args.name);return t}function f(e){let t=`${e.name||"(unnamed)"}`;return e.args&&(t+=` ${JSON.stringify(e.args)}`),t}function l(e){const t=f(e);return{name:t,key:t}}function h(f){const h=s(i(f)),d=u(f),p=c(f),m=[];return h.forEach(s=>{if(0===s.length)return;const{pid:i,tid:u}=s[0],c=new t.CallTreeProfileBuilder;c.setValueFormatter(new n.TimeFormatter("microseconds"));const f=d.get(i),h=p.get(r(i,u));null!=f&&null!=h?c.setName(`${f} (pid ${i}), ${h} (tid ${u})`):null!=f?c.setName(`${f} (pid ${i}, tid ${u})`):null!=h?c.setName(`${h} (pid ${i}, tid ${u})`):c.setName(`pid ${i}, tid ${u}`);const[g,$]=a(s),k=[],b=e=>{k.push(e),c.enterFrame(l(e),e.ts)},w=t=>{const n=(0,e.lastOf)(k);if(null==n)return void console.warn(`Tried to end frame "${l(t).key}", but the stack was empty. Doing nothing instead.`);const r=l(t),s=l(n);t.name===n.name?(r.key!==s.key&&console.warn(`ts=${t.ts}: Tried to end "${r.key}" when "${s.key}" was on the top of the stack. Ending ${s.key} instead.`),k.pop(),c.leaveFrame(s,t.ts)):console.warn(`ts=${t.ts}: Tried to end "${r.key}" when "${s.key}" was on the top of the stack. Doing nothing instead.`)};for(;g.length>0||$.length>0;){const t=o(g,$);switch(t){case"B":b(g.shift());break;case"E":{const t=(0,e.lastOf)(k);if(null!=t){const e=l(t);let n=!1;for(let t=1;t<$.length;t++){const r=$[t];if(r.ts>$[0].ts)break;const s=l(r);if(e.key===s.key){const e=$[0];$[0]=$[t],$[t]=e,n=!0;break}}if(!n)for(let r=1;r<$.length;r++){const e=$[r];if(e.ts>$[0].ts)break;if(e.name===t.name){const e=$[0];$[0]=$[r],$[r]=e,n=!0;break}}}w($.shift());break}default:return t}}for(let e=k.length-1;e>=0;e--){const t=l(k[e]);console.warn(`Frame "${t.key}" was still open at end of profile. Closing automatically.`),c.leaveFrame(t,c.getTotalWeight())}m.push([r(i,u),c.build()])}),(0,e.sortBy)(m,e=>e[0]),{name:"",indexToView:0,profiles:m.map(e=>e[1])}}function d(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 p(e){return"traceEvents"in e&&d(e.traceEvents)}function m(e){return p(e)||d(e)}function g(e){if(p(e))return h(e.traceEvents);if(d(e))return h(e);return e}
112
+ },{"../lib/utils":"ucYa","../lib/profile":"YG8z","../lib/value-formatters":"LsM4"}],"uRa7":[function(require,module,exports) {
113
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importProfileGroupFromText=h,exports.importProfileGroupFromBase64=F,exports.importProfilesFromFile=y,exports.importProfilesFromArrayBuffer=I,exports.importFromFileSystemDirectoryEntry=C;var e=require("./chrome"),r=require("./stackprof"),o=require("./instruments"),i=require("./bg-flamegraph"),t=require("./firefox"),n=require("../lib/file-format"),s=require("./v8proflog"),p=require("./linux-tools-perf"),l=require("./haskell"),m=require("./safari"),a=require("./utils"),f=require("./pprof"),u=require("../lib/utils"),c=require("./v8heapalloc"),d=require("./trace-event"),g=function(e,r,o,i){return new(o||(o=Promise))(function(t,n){function s(e){try{l(i.next(e))}catch(r){n(r)}}function p(e){try{l(i.throw(e))}catch(r){n(r)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o(function(e){e(r)})).then(s,p)}l((i=i.apply(e,r||[])).next())})};function h(e,r){return g(this,void 0,void 0,function*(){return yield P(new a.TextProfileDataSource(e,r))})}function F(e,r){return g(this,void 0,void 0,function*(){return yield P(a.MaybeCompressedDataReader.fromArrayBuffer(e,(0,u.decodeBase64)(r).buffer))})}function y(e){return g(this,void 0,void 0,function*(){return P(a.MaybeCompressedDataReader.fromFile(e))})}function I(e,r){return g(this,void 0,void 0,function*(){return P(a.MaybeCompressedDataReader.fromArrayBuffer(e,r))})}function P(e){return g(this,void 0,void 0,function*(){const r=yield e.name(),o=yield S(e);if(o){o.name||(o.name=r);for(let e of o.profiles)e&&!e.getName()&&e.setName(r);return o}return null})}function v(e){return e?{name:e.getName(),indexToView:0,profiles:[e]}:null}function x(e){return"["===(e=e.trim())[0]&&"]"!==(e=e.replace(/,\s*$/,""))[e.length-1]&&(e+="]"),e}function S(a){return g(this,void 0,void 0,function*(){const u=yield a.name(),g=yield a.readAsArrayBuffer();{const e=(0,f.importAsPprofProfile)(g);if(e)return console.log("Importing as protobuf encoded pprof file"),v(e)}const h=yield a.readAsText();if(u.endsWith(".speedscope.json"))return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(JSON.parse(h));if(u.endsWith(".chrome.json")||/Profile-\d{8}T\d{6}/.exec(u))return console.log("Importing as Chrome Timeline"),(0,e.importFromChromeTimeline)(JSON.parse(h),u);if(u.endsWith(".stackprof.json"))return console.log("Importing as stackprof profile"),v((0,r.importFromStackprof)(JSON.parse(h)));if(u.endsWith(".instruments.txt"))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(h));if(u.endsWith(".linux-perf.txt"))return console.log("Importing as output of linux perf script"),(0,p.importFromLinuxPerf)(h);if(u.endsWith(".collapsedstack.txt"))return console.log("Importing as collapsed stack format"),v((0,i.importFromBGFlameGraph)(h));if(u.endsWith(".v8log.json"))return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(JSON.parse(h)));if(u.endsWith(".heapprofile"))return console.log("Importing as Chrome Heap Profile"),v((0,c.importFromChromeHeapProfile)(JSON.parse(h)));if(u.endsWith("-recording.json"))return console.log("Importing as Safari profile"),v((0,m.importFromSafari)(JSON.parse(h)));let F;try{F=JSON.parse(x(h))}catch(y){}if(F){if("https://www.speedscope.app/file-format-schema.json"===F.$schema)return console.log("Importing as speedscope json file"),(0,n.importSpeedscopeProfiles)(JSON.parse(h));if(F.systemHost&&"Firefox"==F.systemHost.name)return console.log("Importing as Firefox profile"),v((0,t.importFromFirefox)(F));if((0,e.isChromeTimeline)(F))return console.log("Importing as Chrome Timeline"),(0,e.importFromChromeTimeline)(F,u);if("nodes"in F&&"samples"in F&&"timeDeltas"in F)return console.log("Importing as Chrome CPU Profile"),v((0,e.importFromChromeCPUProfile)(F));if((0,d.isTraceEventFormatted)(F))return console.log("Importing as Trace Event Format profile"),(0,d.importTraceEvents)(F);if("head"in F&&"samples"in F&&"timestamps"in F)return console.log("Importing as Chrome CPU Profile (old format)"),v((0,e.importFromOldV8CPUProfile)(F));if("mode"in F&&"frames"in F&&"raw_timestamp_deltas"in F)return console.log("Importing as stackprof profile"),v((0,r.importFromStackprof)(F));if("code"in F&&"functions"in F&&"ticks"in F)return console.log("Importing as --prof-process v8 log"),v((0,s.importFromV8ProfLog)(F));if("head"in F&&"selfSize"in F.head)return console.log("Importing as Chrome Heap Profile"),v((0,c.importFromChromeHeapProfile)(JSON.parse(h)));if("rts_arguments"in F&&"initial_capabilities"in F)return console.log("Importing as Haskell GHC JSON Profile"),(0,l.importFromHaskell)(F);if("recording"in F&&"sampleStackTraces"in F.recording)return console.log("Importing as Safari profile"),v((0,m.importFromSafari)(JSON.parse(h)))}else{if(/^[\w \t\(\)]*\tSymbol Name/.exec(h))return console.log("Importing as Instruments.app deep copy"),v((0,o.importFromInstrumentsDeepCopy)(h));const e=h.split(/\n/).length;if(e>=1&&e===h.split(/ \d+\r?\n/).length)return console.log("Importing as collapsed stack format"),v((0,i.importFromBGFlameGraph)(h));const r=(0,p.importFromLinuxPerf)(h);if(r)return console.log("Importing from linux perf script output"),r}return null})}function C(e){return g(this,void 0,void 0,function*(){return(0,o.importFromInstrumentsTrace)(e)})}
114
+ },{"./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"}]},{},[], null)
115
+ //# sourceMappingURL=import.cf0fa83f.js.map
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>speedscope</title><link href="fonts/source-code-pro-regular.css" rel="stylesheet"><script></script><link rel="stylesheet" href="reset.8c46b7a1.css"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.bc503437.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.f74b3187.png"></head><body> <script src="speedscope.44364064.js"></script>
2
+ </body></html>
@@ -0,0 +1,3 @@
1
+ speedscope@1.12.1
2
+ Thu Nov 12 02:36:50 PST 2020
3
+ 6a979bb568f548dd347dba5b18e69e4401a2dda3
@@ -0,0 +1,2 @@
1
+ a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{overflow:hidden}body,html{height:100%}body{overflow:auto}
2
+ /*# sourceMappingURL=reset.8c46b7a1.css.map */
@@ -0,0 +1,24 @@
1
+ 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;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"YNEz":[function(require,module,exports) {
2
+ var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");exports.encode=function(n){if(0<=n&&n<e.length)return e[n];throw new TypeError("Must be between 0 and 63: "+n)},exports.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};
3
+ },{}],"iWlY":[function(require,module,exports) {
4
+ var e=require("./base64"),r=5,n=1<<r,o=n-1,t=n;function i(e){return e<0?1+(-e<<1):0+(e<<1)}function d(e){var r=e>>1;return 1==(1&e)?-r:r}exports.encode=function(n){var d,a="",c=i(n);do{d=c&o,(c>>>=r)>0&&(d|=t),a+=e.encode(d)}while(c>0);return a},exports.decode=function(n,i,a){var c,u,h=n.length,s=0,v=0;do{if(i>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(u=e.decode(n.charCodeAt(i++))))throw new Error("Invalid base64 digit: "+n.charAt(i-1));c=!!(u&t),s+=(u&=o)<<v,v+=r}while(c);a.value=d(s),a.rest=i};
5
+ },{"./base64":"YNEz"}],"XUQW":[function(require,module,exports) {
6
+ function e(e,r,n){if(r in e)return e[r];if(3===arguments.length)return n;throw new Error('"'+r+'" is a required argument.')}exports.getArg=e;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function t(e){var n=e.match(r);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var r="";return e.scheme&&(r+=e.scheme+":"),r+="//",e.auth&&(r+=e.auth+"@"),e.host&&(r+=e.host),e.port&&(r+=":"+e.port),e.path&&(r+=e.path),r}function a(e){var r=e,n=t(e);if(n){if(!n.path)return e;r=n.path}for(var a,i=exports.isAbsolute(r),u=r.split(/\/+/),c=0,s=u.length-1;s>=0;s--)"."===(a=u[s])?u.splice(s,1):".."===a?c++:c>0&&(""===a?(u.splice(s+1,c),c=0):(u.splice(s,2),c--));return""===(r=u.join("/"))&&(r=i?"/":"."),n?(n.path=r,o(n)):r}function i(e,r){""===e&&(e="."),""===r&&(r=".");var i=t(r),u=t(e);if(u&&(e=u.path||"/"),i&&!i.scheme)return u&&(i.scheme=u.scheme),o(i);if(i||r.match(n))return r;if(u&&!u.host&&!u.path)return u.host=r,o(u);var c="/"===r.charAt(0)?r:a(e.replace(/\/+$/,"")+"/"+r);return u?(u.path=c,o(u)):c}function u(e,r){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==r.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return r;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(e.length+1)}exports.urlParse=t,exports.urlGenerate=o,exports.normalize=a,exports.join=i,exports.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},exports.relative=u;var c=!("__proto__"in Object.create(null));function s(e){return e}function l(e){return p(e)?"$"+e:e}function h(e){return p(e)?e.slice(1):e}function p(e){if(!e)return!1;var r=e.length;if(r<9)return!1;if(95!==e.charCodeAt(r-1)||95!==e.charCodeAt(r-2)||111!==e.charCodeAt(r-3)||116!==e.charCodeAt(r-4)||111!==e.charCodeAt(r-5)||114!==e.charCodeAt(r-6)||112!==e.charCodeAt(r-7)||95!==e.charCodeAt(r-8)||95!==e.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,r,n){var t=d(e.source,r.source);return 0!==t?t:0!==(t=e.originalLine-r.originalLine)?t:0!==(t=e.originalColumn-r.originalColumn)||n?t:0!==(t=e.generatedColumn-r.generatedColumn)?t:0!==(t=e.generatedLine-r.generatedLine)?t:d(e.name,r.name)}function g(e,r,n){var t=e.generatedLine-r.generatedLine;return 0!==t?t:0!==(t=e.generatedColumn-r.generatedColumn)||n?t:0!==(t=d(e.source,r.source))?t:0!==(t=e.originalLine-r.originalLine)?t:0!==(t=e.originalColumn-r.originalColumn)?t:d(e.name,r.name)}function d(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}function m(e,r){var n=e.generatedLine-r.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-r.generatedColumn)?n:0!==(n=d(e.source,r.source))?n:0!==(n=e.originalLine-r.originalLine)?n:0!==(n=e.originalColumn-r.originalColumn)?n:d(e.name,r.name)}function C(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function v(e,r,n){if(r=r||"",e&&("/"!==e[e.length-1]&&"/"!==r[0]&&(e+="/"),r=e+r),n){var u=t(n);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var c=u.path.lastIndexOf("/");c>=0&&(u.path=u.path.substring(0,c+1))}r=i(o(u),r)}return a(r)}exports.toSetString=c?s:l,exports.fromSetString=c?s:h,exports.compareByOriginalPositions=f,exports.compareByGeneratedPositionsDeflated=g,exports.compareByGeneratedPositionsInflated=m,exports.parseSourceMapInput=C,exports.computeSourceURL=v;
7
+ },{}],"dghU":[function(require,module,exports) {
8
+ var t=require("./util"),e=Object.prototype.hasOwnProperty,r="undefined"!=typeof Map;function n(){this._array=[],this._set=r?new Map:Object.create(null)}n.fromArray=function(t,e){for(var r=new n,i=0,s=t.length;i<s;i++)r.add(t[i],e);return r},n.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(n,i){var s=r?n:t.toSetString(n),o=r?this.has(n):e.call(this._set,s),a=this._array.length;o&&!i||this._array.push(n),o||(r?this._set.set(n,a):this._set[s]=a)},n.prototype.has=function(n){if(r)return this._set.has(n);var i=t.toSetString(n);return e.call(this._set,i)},n.prototype.indexOf=function(n){if(r){var i=this._set.get(n);if(i>=0)return i}else{var s=t.toSetString(n);if(e.call(this._set,s))return this._set[s]}throw new Error('"'+n+'" is not in the set.')},n.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},n.prototype.toArray=function(){return this._array.slice()},exports.ArraySet=n;
9
+ },{"./util":"XUQW"}],"AUTm":[function(require,module,exports) {
10
+ var t=require("./util");function e(e,r){var a=e.generatedLine,n=r.generatedLine,o=e.generatedColumn,s=r.generatedColumn;return n>a||n==a&&s>=o||t.compareByGeneratedPositionsInflated(e,r)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},r.prototype.add=function(t){e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},exports.MappingList=r;
11
+ },{"./util":"XUQW"}],"Wwhl":[function(require,module,exports) {
12
+ var e=require("./base64-vlq"),n=require("./util"),o=require("./array-set").ArraySet,t=require("./mapping-list").MappingList;function r(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new t,this._sourcesContents=null}r.prototype._version=3,r.fromSourceMap=function(e){var o=e.sourceRoot,t=new r({file:e.file,sourceRoot:o});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=o&&(r.source=n.relative(o,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)}),e.sources.forEach(function(r){var i=r;null!==o&&(i=n.relative(o,r)),t._sources.has(i)||t._sources.add(i);var s=e.sourceContentFor(r);null!=s&&t.setSourceContent(r,s)}),t},r.prototype.addMapping=function(e){var o=n.getArg(e,"generated"),t=n.getArg(e,"original",null),r=n.getArg(e,"source",null),i=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(o,t,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:o.line,generatedColumn:o.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:i})},r.prototype.setSourceContent=function(e,o){var t=e;null!=this._sourceRoot&&(t=n.relative(this._sourceRoot,t)),null!=o?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(t)]=o):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,r){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=n.relative(s,i));var l=new o,u=new o;this._mappings.unsortedForEach(function(o){if(o.source===i&&null!=o.originalLine){var t=e.originalPositionFor({line:o.originalLine,column:o.originalColumn});null!=t.source&&(o.source=t.source,null!=r&&(o.source=n.join(r,o.source)),null!=s&&(o.source=n.relative(s,o.source)),o.originalLine=t.line,o.originalColumn=t.column,null!=t.name&&(o.name=t.name))}var a=o.source;null==a||l.has(a)||l.add(a);var c=o.name;null==c||u.has(c)||u.add(c)},this),this._sources=l,this._names=u,e.sources.forEach(function(o){var t=e.sourceContentFor(o);null!=t&&(null!=r&&(o=n.join(r,o)),null!=s&&(o=n.relative(s,o)),this.setSourceContent(o,t))},this)},r.prototype._validateMapping=function(e,n,o,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||o||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&o))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:o,original:n,name:t}))},r.prototype._serializeMappings=function(){for(var o,t,r,i,s=0,l=1,u=0,a=0,c=0,p=0,g="",h=this._mappings.toArray(),m=0,f=h.length;m<f;m++){if(o="",(t=h[m]).generatedLine!==l)for(s=0;t.generatedLine!==l;)o+=";",l++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(t,h[m-1]))continue;o+=","}o+=e.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),o+=e.encode(i-p),p=i,o+=e.encode(t.originalLine-1-a),a=t.originalLine-1,o+=e.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),o+=e.encode(r-c),c=r)),g+=o}return g},r.prototype._generateSourcesContent=function(e,o){return e.map(function(e){if(!this._sourcesContents)return null;null!=o&&(e=n.relative(o,e));var t=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},exports.SourceMapGenerator=r;
13
+ },{"./base64-vlq":"iWlY","./util":"XUQW","./array-set":"dghU","./mapping-list":"AUTm"}],"rdpJ":[function(require,module,exports) {
14
+ function r(t,e,E,n,o,_){var U=Math.floor((e-t)/2)+t,s=o(E,n[U],!0);return 0===s?U:s>0?e-U>1?r(U,e,E,n,o,_):_==exports.LEAST_UPPER_BOUND?e<n.length?e:-1:U:U-t>1?r(t,U,E,n,o,_):_==exports.LEAST_UPPER_BOUND?U:t<0?-1:t}exports.GREATEST_LOWER_BOUND=1,exports.LEAST_UPPER_BOUND=2,exports.search=function(t,e,E,n){if(0===e.length)return-1;var o=r(-1,e.length,t,e,E,n||exports.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===E(e[o],e[o-1],!0);)--o;return o};
15
+ },{}],"lFls":[function(require,module,exports) {
16
+ function n(n,r,t){var o=n[r];n[r]=n[t],n[t]=o}function r(n,r){return Math.round(n+Math.random()*(r-n))}function t(o,a,u,f){if(u<f){var i=u-1;n(o,r(u,f),f);for(var c=o[f],v=u;v<f;v++)a(o[v],c)<=0&&n(o,i+=1,v);n(o,i+1,v);var e=i+1;t(o,a,u,e-1),t(o,a,e+1,f)}}exports.quickSort=function(n,r){t(n,r,0,n.length-1)};
17
+ },{}],"fmOz":[function(require,module,exports) {
18
+ var e=require("./util"),n=require("./binary-search"),r=require("./array-set").ArraySet,t=require("./base64-vlq"),o=require("./quick-sort").quickSort;function i(n,r){var t=n;return"string"==typeof n&&(t=e.parseSourceMapInput(n)),null!=t.sections?new u(t,r):new s(t,r)}function s(n,t){var o=n;"string"==typeof n&&(o=e.parseSourceMapInput(n));var i=e.getArg(o,"version"),s=e.getArg(o,"sources"),a=e.getArg(o,"names",[]),u=e.getArg(o,"sourceRoot",null),l=e.getArg(o,"sourcesContent",null),g=e.getArg(o,"mappings"),p=e.getArg(o,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);u&&(u=e.normalize(u)),s=s.map(String).map(e.normalize).map(function(n){return u&&e.isAbsolute(u)&&e.isAbsolute(n)?e.relative(u,n):n}),this._names=r.fromArray(a.map(String),!0),this._sources=r.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(n){return e.computeSourceURL(u,n,t)}),this.sourceRoot=u,this.sourcesContent=l,this._mappings=g,this._sourceMapURL=t,this.file=p}function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function u(n,t){var o=n;"string"==typeof n&&(o=e.parseSourceMapInput(n));var s=e.getArg(o,"version"),a=e.getArg(o,"sections");if(s!=this._version)throw new Error("Unsupported version: "+s);this._sources=new r,this._names=new r;var u={line:-1,column:0};this._sections=a.map(function(n){if(n.url)throw new Error("Support for url field in sections not implemented.");var r=e.getArg(n,"offset"),o=e.getArg(r,"line"),s=e.getArg(r,"column");if(o<u.line||o===u.line&&s<u.column)throw new Error("Section offsets must be ordered and non-overlapping.");return u=r,{generatedOffset:{generatedLine:o+1,generatedColumn:s+1},consumer:new i(e.getArg(n,"map"),t)}})}i.fromSourceMap=function(e,n){return s.fromSourceMap(e,n)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},i.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(n,r,t){var o,s=r||null;switch(t||i.GENERATED_ORDER){case i.GENERATED_ORDER:o=this._generatedMappings;break;case i.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(n){var r=null===n.source?null:this._sources.at(n.source);return{source:r=e.computeSourceURL(a,r,this._sourceMapURL),generatedLine:n.generatedLine,generatedColumn:n.generatedColumn,originalLine:n.originalLine,originalColumn:n.originalColumn,name:null===n.name?null:this._names.at(n.name)}},this).forEach(n,s)},i.prototype.allGeneratedPositionsFor=function(r){var t=e.getArg(r,"line"),o={source:e.getArg(r,"source"),originalLine:t,originalColumn:e.getArg(r,"column",0)};if(o.source=this._findSourceIndex(o.source),o.source<0)return[];var i=[],s=this._findMapping(o,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(void 0===r.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var l=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==l;)i.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},exports.SourceMapConsumer=i,s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.prototype._findSourceIndex=function(n){var r,t=n;if(null!=this.sourceRoot&&(t=e.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==n)return r;return-1},s.fromSourceMap=function(n,t){var i=Object.create(s.prototype),u=i._names=r.fromArray(n._names.toArray(),!0),l=i._sources=r.fromArray(n._sources.toArray(),!0);i.sourceRoot=n._sourceRoot,i.sourcesContent=n._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=n._file,i._sourceMapURL=t,i._absoluteSources=i._sources.toArray().map(function(n){return e.computeSourceURL(i.sourceRoot,n,t)});for(var g=n._mappings.toArray().slice(),p=i.__generatedMappings=[],c=i.__originalMappings=[],h=0,m=g.length;h<m;h++){var f=g[h],_=new a;_.generatedLine=f.generatedLine,_.generatedColumn=f.generatedColumn,f.source&&(_.source=l.indexOf(f.source),_.originalLine=f.originalLine,_.originalColumn=f.originalColumn,f.name&&(_.name=u.indexOf(f.name)),c.push(_)),p.push(_)}return o(i.__originalMappings,e.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),s.prototype._parseMappings=function(n,r){for(var i,s,u,l,g,p=1,c=0,h=0,m=0,f=0,_=0,d=n.length,C=0,A={},L={},v=[],y=[];C<d;)if(";"===n.charAt(C))p++,C++,c=0;else if(","===n.charAt(C))C++;else{for((i=new a).generatedLine=p,l=C;l<d&&!this._charIsMappingSeparator(n,l);l++);if(u=A[s=n.slice(C,l)])C+=s.length;else{for(u=[];C<l;)t.decode(n,C,L),g=L.value,C=L.rest,u.push(g);if(2===u.length)throw new Error("Found a source, but no line and column");if(3===u.length)throw new Error("Found a source and line, but no column");A[s]=u}i.generatedColumn=c+u[0],c=i.generatedColumn,u.length>1&&(i.source=f+u[1],f+=u[1],i.originalLine=h+u[2],h=i.originalLine,i.originalLine+=1,i.originalColumn=m+u[3],m=i.originalColumn,u.length>4&&(i.name=_+u[4],_+=u[4])),y.push(i),"number"==typeof i.originalLine&&v.push(i)}o(y,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,o(v,e.compareByOriginalPositions),this.__originalMappings=v},s.prototype._findMapping=function(e,r,t,o,i,s){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[o]);return n.search(e,r,i,s)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(n){var r={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},t=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(t>=0){var o=this._generatedMappings[t];if(o.generatedLine===r.generatedLine){var s=e.getArg(o,"source",null);null!==s&&(s=this._sources.at(s),s=e.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=e.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:e.getArg(o,"originalLine",null),column:e.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},s.prototype.sourceContentFor=function(n,r){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var o,i=n;if(null!=this.sourceRoot&&(i=e.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=e.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(n){var r=e.getArg(n,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var t={source:r,originalLine:e.getArg(n,"line"),originalColumn:e.getArg(n,"column")},o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(o>=0){var s=this._originalMappings[o];if(s.source===t.source)return{line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},exports.BasicSourceMapConsumer=s,u.prototype=Object.create(i.prototype),u.prototype.constructor=i,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),u.prototype.originalPositionFor=function(r){var t={generatedLine:e.getArg(r,"line"),generatedColumn:e.getArg(r,"column")},o=n.search(t,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r||e.generatedColumn-n.generatedOffset.generatedColumn}),i=this._sections[o];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:r.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r].consumer.sourceContentFor(e,!0);if(t)return t}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r];if(-1!==t.consumer._findSourceIndex(e.getArg(n,"source"))){var o=t.consumer.generatedPositionFor(n);if(o)return{line:o.line+(t.generatedOffset.generatedLine-1),column:o.column+(t.generatedOffset.generatedLine===o.line?t.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},u.prototype._parseMappings=function(n,r){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var i=this._sections[t],s=i.consumer._generatedMappings,a=0;a<s.length;a++){var u=s[a],l=i.consumer._sources.at(u.source);l=e.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var g=null;u.name&&(g=i.consumer._names.at(u.name),this._names.add(g),g=this._names.indexOf(g));var p={source:l,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:g};this.__generatedMappings.push(p),"number"==typeof p.originalLine&&this.__originalMappings.push(p)}o(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),o(this.__originalMappings,e.compareByOriginalPositions)},exports.IndexedSourceMapConsumer=u;
19
+ },{"./util":"XUQW","./binary-search":"rdpJ","./array-set":"dghU","./base64-vlq":"iWlY","./quick-sort":"lFls"}],"Qm02":[function(require,module,exports) {
20
+ var n=require("./source-map-generator").SourceMapGenerator,e=require("./util"),r=/(\r?\n)/,t=10,o="$$$isSourceNode$$$";function i(n,e,r,t,i){this.children=[],this.sourceContents={},this.line=null==n?null:n,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=t&&this.add(t)}i.fromStringWithSourceMap=function(n,t,o){var l=new i,u=n.split(r),s=0,c=function(){return n()+(n()||"");function n(){return s<u.length?u[s++]:void 0}},a=1,h=0,d=null;return t.eachMapping(function(n){if(null!==d){if(!(a<n.generatedLine)){var e=(r=u[s]||"").substr(0,n.generatedColumn-h);return u[s]=r.substr(n.generatedColumn-h),h=n.generatedColumn,p(d,e),void(d=n)}p(d,c()),a++,h=0}for(;a<n.generatedLine;)l.add(c()),a++;if(h<n.generatedColumn){var r=u[s]||"";l.add(r.substr(0,n.generatedColumn)),u[s]=r.substr(n.generatedColumn),h=n.generatedColumn}d=n},this),s<u.length&&(d&&p(d,c()),l.add(u.splice(s).join(""))),t.sources.forEach(function(n){var r=t.sourceContentFor(n);null!=r&&(null!=o&&(n=e.join(o,n)),l.setSourceContent(n,r))}),l;function p(n,r){if(null===n||void 0===n.source)l.add(r);else{var t=o?e.join(o,n.source):n.source;l.add(new i(n.originalLine,n.originalColumn,t,r,n.name))}}},i.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(n){this.add(n)},this);else{if(!n[o]&&"string"!=typeof n)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);n&&this.children.push(n)}return this},i.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else{if(!n[o]&&"string"!=typeof n)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);this.children.unshift(n)}return this},i.prototype.walk=function(n){for(var e,r=0,t=this.children.length;r<t;r++)(e=this.children[r])[o]?e.walk(n):""!==e&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})},i.prototype.join=function(n){var e,r,t=this.children.length;if(t>0){for(e=[],r=0;r<t-1;r++)e.push(this.children[r]),e.push(n);e.push(this.children[r]),this.children=e}return this},i.prototype.replaceRight=function(n,e){var r=this.children[this.children.length-1];return r[o]?r.replaceRight(n,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(n,e):this.children.push("".replace(n,e)),this},i.prototype.setSourceContent=function(n,r){this.sourceContents[e.toSetString(n)]=r},i.prototype.walkSourceContents=function(n){for(var r=0,t=this.children.length;r<t;r++)this.children[r][o]&&this.children[r].walkSourceContents(n);var i=Object.keys(this.sourceContents);for(r=0,t=i.length;r<t;r++)n(e.fromSetString(i[r]),this.sourceContents[i[r]])},i.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n},i.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},o=new n(e),i=!1,l=null,u=null,s=null,c=null;return this.walk(function(n,e){r.code+=n,null!==e.source&&null!==e.line&&null!==e.column?(l===e.source&&u===e.line&&s===e.column&&c===e.name||o.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:r.line,column:r.column},name:e.name}),l=e.source,u=e.line,s=e.column,c=e.name,i=!0):i&&(o.addMapping({generated:{line:r.line,column:r.column}}),l=null,i=!1);for(var a=0,h=n.length;a<h;a++)n.charCodeAt(a)===t?(r.line++,r.column=0,a+1===h?(l=null,i=!1):i&&o.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:r.line,column:r.column},name:e.name})):r.column++}),this.walkSourceContents(function(n,e){o.setSourceContent(n,e)}),{code:r.code,map:o}},exports.SourceNode=i;
21
+ },{"./source-map-generator":"Wwhl","./util":"XUQW"}],"aRf0":[function(require,module,exports) {
22
+ exports.SourceMapGenerator=require("./lib/source-map-generator").SourceMapGenerator,exports.SourceMapConsumer=require("./lib/source-map-consumer").SourceMapConsumer,exports.SourceNode=require("./lib/source-node").SourceNode;
23
+ },{"./lib/source-map-generator":"Wwhl","./lib/source-map-consumer":"fmOz","./lib/source-node":"Qm02"}]},{},["aRf0"], null)
24
+ //# sourceMappingURL=source-map.438fa06b.js.map
@@ -0,0 +1,200 @@
1
+ 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;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"aSor":[function(require,module,exports) {
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.render=L,exports.hydrate=M,exports.h=exports.createElement=a,exports.Fragment=v,exports.createRef=h,exports.Component=y,exports.cloneElement=F,exports.createContext=R,exports.toChildArray=C,exports._unmount=W,exports.options=exports.isValidElement=void 0;var e,t,n,o,_,l,r,i,u={},s=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function a(e,t,n){var o,_=arguments,l={};for(o in t)"key"!==o&&"ref"!==o&&(l[o]=t[o]);if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(_[o]);if(null!=n&&(l.children=n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===l[o]&&(l[o]=e.defaultProps[o]);return d(e,l,t&&t.key,t&&t.ref,null)}function d(t,n,o,_,l){var r={type:t,props:n,key:o,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:l};return null==l&&(r.__v=r),e.vnode&&e.vnode(r),r}function h(){return{}}function v(e){return e.children}function y(e,t){this.props=e,this.context=t}function m(e,t){if(null==t)return e.__?m(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?m(e):null}function k(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return k(e)}}function g(t){(!t.__d&&(t.__d=!0)&&n.push(t)&&!o++||l!==e.debounceRendering)&&((l=e.debounceRendering)||_)(x)}function x(){for(var e;o=n.length;)e=n.sort(function(e,t){return e.__v.__b-t.__v.__b}),n=[],e.some(function(e){var t,n,o,_,l,r,i;e.__d&&(r=(l=(t=e).__v).__e,(i=t.__P)&&(n=[],(o=p({},l)).__v=o,_=N(i,l,o,t.__n,void 0!==i.ownerSVGElement,null,n,null==r?m(l):r),U(n,l),_!=r&&k(l)))})}function b(e,t,n,o,_,l,r,i,c){var p,a,d,h,v,y,k,g=n&&n.__k||s,x=g.length;if(i==u&&(i=null!=l?l[0]:x?m(n,0):null),p=0,t.__k=C(t.__k,function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=g[p])||d&&n.key==d.key&&n.type===d.type)g[p]=void 0;else for(a=0;a<x;a++){if((d=g[a])&&n.key==d.key&&n.type===d.type){g[a]=void 0;break}d=null}if(h=N(e,n,d=d||u,o,_,l,r,i,c),(a=n.ref)&&d.ref!=a&&(k||(k=[]),d.ref&&k.push(d.ref,null,n),k.push(a,n.__c||h,n)),null!=h){var s;if(null==y&&(y=h),void 0!==n.__d)s=n.__d,n.__d=void 0;else if(l==d||h!=i||null==h.parentNode){e:if(null==i||i.parentNode!==e)e.appendChild(h),s=null;else{for(v=i,a=0;(v=v.nextSibling)&&a<x;a+=2)if(v==h)break e;e.insertBefore(h,i),s=i}"option"==t.type&&(e.value="")}i=void 0!==s?s:h.nextSibling,"function"==typeof t.type&&(t.__d=i)}else i&&d.__e==i&&i.parentNode!=e&&(i=m(d))}return p++,n}),t.__e=y,null!=l&&"function"!=typeof t.type)for(p=l.length;p--;)null!=l[p]&&f(l[p]);for(p=x;p--;)null!=g[p]&&W(g[p],g[p]);if(k)for(p=0;p<k.length;p++)T(k[p],k[++p],k[++p])}function C(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var o=0;o<e.length;o++)C(e[o],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?d(null,e,null,null,e):null!=e.__e||null!=e.__c?d(e.type,e.props,e.key,null,e.__v):e):e);return n}function w(e,t,n,o,_){var l;for(l in n)"children"===l||"key"===l||l in t||P(e,l,null,n[l],o);for(l in t)_&&"function"!=typeof t[l]||"children"===l||"key"===l||"value"===l||"checked"===l||n[l]===t[l]||P(e,l,t[l],n[l],o)}function S(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===c.test(t)?n+"px":null==n?"":n}function P(e,t,n,o,_){var l,r,i,u,s;if(_?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(l=e.style,"string"==typeof n)l.cssText=n;else{if("string"==typeof o&&(l.cssText="",o=null),o)for(u in o)n&&u in n||S(l,u,"");if(n)for(s in n)o&&n[s]===o[s]||S(l,s,n[s])}else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),i=t.toLowerCase(),t=(i in e?i:t).slice(2),n?(o||e.addEventListener(t,E,r),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,E,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!_&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function E(t){this.l[t.type](e.event?e.event(t):t)}function N(t,n,o,_,l,r,i,u,s){var c,f,a,d,h,m,k,g,x,C,w=n.type;if(void 0!==n.constructor)return null;(c=e.__b)&&c(n);try{e:if("function"==typeof w){if(g=n.props,x=(c=w.contextType)&&_[c.__c],C=c?x?x.props.value:c.__:_,o.__c?k=(f=n.__c=o.__c).__=f.__E:("prototype"in w&&w.prototype.render?n.__c=f=new w(g,C):(n.__c=f=new y(g,C),f.constructor=w,f.render=A),x&&x.sub(f),f.props=g,f.state||(f.state={}),f.context=C,f.__n=_,a=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=w.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,w.getDerivedStateFromProps(g,f.__s))),d=f.props,h=f.state,a)null==w.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==w.getDerivedStateFromProps&&g!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,C),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,C)||n.__v===o.__v&&!f.__){for(f.props=g,f.state=f.__s,n.__v!==o.__v&&(f.__d=!1),f.__v=n,n.__e=o.__e,n.__k=o.__k,f.__h.length&&i.push(f),c=0;c<n.__k.length;c++)n.__k[c]&&(n.__k[c].__=n);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(g,f.__s,C),null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(d,h,m)})}f.context=C,f.props=g,f.state=f.__s,(c=e.__r)&&c(n),f.__d=!1,f.__v=n,f.__P=t,c=f.render(f.props,f.state,f.context),n.__k=null!=c&&c.type==v&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=f.getChildContext&&(_=p(p({},_),f.getChildContext())),a||null==f.getSnapshotBeforeUpdate||(m=f.getSnapshotBeforeUpdate(d,h)),b(t,n,o,_,l,r,i,u,s),f.base=n.__e,f.__h.length&&i.push(f),k&&(f.__E=f.__=null),f.__e=!1}else null==r&&n.__v===o.__v?(n.__k=o.__k,n.__e=o.__e):n.__e=D(o.__e,n,o,_,l,r,i,s);(c=e.diffed)&&c(n)}catch(t){n.__v=null,e.__e(t,n,o)}return n.__e}function U(t,n){e.__c&&e.__c(n,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(e){e.call(n)})}catch(t){e.__e(t,n.__v)}})}function D(e,t,n,o,_,l,r,i){var c,p,f,a,d,h=n.props,v=t.props;if(_="svg"===t.type||_,null!=l)for(c=0;c<l.length;c++)if(null!=(p=l[c])&&((null===t.type?3===p.nodeType:p.localName===t.type)||e==p)){e=p,l[c]=null;break}if(null==e){if(null===t.type)return document.createTextNode(v);e=_?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,v.is&&{is:v.is}),l=null,i=!1}if(null===t.type)h!==v&&e.data!=v&&(e.data=v);else{if(null!=l&&(l=s.slice.call(e.childNodes)),f=(h=n.props||u).dangerouslySetInnerHTML,a=v.dangerouslySetInnerHTML,!i){if(h===u)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(a||f)&&(a&&f&&a.__html==f.__html||(e.innerHTML=a&&a.__html||""))}w(e,v,h,_,i),a?t.__k=[]:(t.__k=t.props.children,b(e,t,n,o,"foreignObject"!==t.type&&_,l,r,u,i)),i||("value"in v&&void 0!==(c=v.value)&&c!==e.value&&P(e,"value",c,h.value,!1),"checked"in v&&void 0!==(c=v.checked)&&c!==e.checked&&P(e,"checked",c,h.checked,!1))}return e}function T(t,n,o){try{"function"==typeof t?t(n):t.current=n}catch(t){e.__e(t,o)}}function W(t,n,o){var _,l,r;if(e.unmount&&e.unmount(t),(_=t.ref)&&(_.current&&_.current!==t.__e||T(_,null,n)),o||"function"==typeof t.type||(o=null!=(l=t.__e)),t.__e=t.__d=void 0,null!=(_=t.__c)){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(t){e.__e(t,n)}_.base=_.__P=null}if(_=t.__k)for(r=0;r<_.length;r++)_[r]&&W(_[r],n,o);null!=l&&f(l)}function A(e,t,n){return this.constructor(e,n)}function L(t,n,o){var _,l,i;e.__&&e.__(t,n),l=(_=o===r)?null:o&&o.__k||n.__k,t=a(v,null,[t]),i=[],N(n,(_?n:o||n).__k=t,l||u,u,void 0!==n.ownerSVGElement,o&&!_?[o]:l?null:s.slice.call(n.childNodes),i,o||u,_),U(i,t)}function M(e,t){L(e,t,r)}function F(e,t){var n,o;for(o in t=p(p({},e.props),t),arguments.length>2&&(t.children=s.slice.call(arguments,2)),n={},t)"key"!==o&&"ref"!==o&&(n[o]=t[o]);return d(e.type,n,t.key||e.key,t.ref||e.ref,null)}function R(e){var t={},n={__c:"__cC"+i++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var o,_=this;return this.getChildContext||(o=[],this.getChildContext=function(){return t[n.__c]=_,t},this.shouldComponentUpdate=function(e){_.props.value!==e.value&&o.some(function(t){t.context=e.value,g(t)})},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}exports.isValidElement=t,exports.options=e,exports.options=e={__e:function(e,t){for(var n,o;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(o=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(o=!0,n.componentDidCatch(e)),o)return g(n.__E=n)}catch(t){e=t}throw e}},exports.isValidElement=t=function(e){return null!=e&&void 0===e.constructor},y.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),g(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},y.prototype.render=v,n=[],o=0,_="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=u,i=0;
3
+ },{}],"UDzr":[function(require,module,exports) {
4
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.actionCreator=o,exports.setter=r,exports.bindActionCreator=s,exports.StatelessComponent=void 0;var e=require("preact");const t=new Set;function o(e){if(t.has(e))throw new Error(`Cannot re-use action type name: ${e}`);const o=(t={})=>({type:e,payload:t});return o.matches=(t=>t.type===e),o}function r(e,t){return(o=t,r)=>e.matches(r)?r.payload:o}class n extends e.Component{}function s(e,t){return o=>{e(t(o))}}exports.StatelessComponent=n;
5
+ },{"preact":"aSor"}],"tDuZ":[function(require,module,exports) {
6
+ "use strict";function t(t,i,s){return t<i?i:t>s?s:t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.clamp=t,exports.Rect=exports.AffineTransform=exports.Vec2=void 0;let i=(()=>{class i{constructor(t,i){this.x=t,this.y=i}withX(t){return new i(t,this.y)}withY(t){return new i(this.x,t)}plus(t){return new i(this.x+t.x,this.y+t.y)}minus(t){return new i(this.x-t.x,this.y-t.y)}times(t){return new i(this.x*t,this.y*t)}timesPointwise(t){return new i(this.x*t.x,this.y*t.y)}dividedByPointwise(t){return new i(this.x/t.x,this.y/t.y)}dot(t){return this.x*t.x+this.y*t.y}equals(t){return this.x===t.x&&this.y===t.y}approxEquals(t,i=1e-9){return Math.abs(this.x-t.x)<i&&Math.abs(this.y-t.y)<i}length2(){return this.dot(this)}length(){return Math.sqrt(this.length2())}abs(){return new i(Math.abs(this.x),Math.abs(this.y))}static min(t,s){return new i(Math.min(t.x,s.x),Math.min(t.y,s.y))}static max(t,s){return new i(Math.max(t.x,s.x),Math.max(t.y,s.y))}static clamp(s,e,r){return new i(t(s.x,e.x,r.x),t(s.y,e.y,r.y))}flatten(){return[this.x,this.y]}}return i.zero=new i(0,0),i.unit=new i(1,1),i})();exports.Vec2=i;class s{constructor(t=1,i=0,s=0,e=0,r=1,n=0){this.m00=t,this.m01=i,this.m02=s,this.m10=e,this.m11=r,this.m12=n}withScale(t){let{m00:i,m01:e,m02:r,m10:n,m11:h,m12:m}=this;return i=t.x,h=t.y,new s(i,e,r,n,h,m)}static withScale(t){return(new s).withScale(t)}scaledBy(t){return s.withScale(t).times(this)}getScale(){return new i(this.m00,this.m11)}withTranslation(t){let{m00:i,m01:e,m02:r,m10:n,m11:h,m12:m}=this;return r=t.x,m=t.y,new s(i,e,r,n,h,m)}static withTranslation(t){return(new s).withTranslation(t)}getTranslation(){return new i(this.m02,this.m12)}translatedBy(t){return s.withTranslation(t).times(this)}static betweenRects(t,e){return s.withTranslation(t.origin.times(-1)).scaledBy(new i(e.size.x/t.size.x,e.size.y/t.size.y)).translatedBy(e.origin)}times(t){const i=this.m00*t.m00+this.m01*t.m10,e=this.m00*t.m01+this.m01*t.m11,r=this.m00*t.m02+this.m01*t.m12+this.m02,n=this.m10*t.m00+this.m11*t.m10,h=this.m10*t.m01+this.m11*t.m11,m=this.m10*t.m02+this.m11*t.m12+this.m12;return new s(i,e,r,n,h,m)}equals(t){return this.m00==t.m00&&this.m01==t.m01&&this.m02==t.m02&&this.m10==t.m10&&this.m11==t.m11&&this.m12==t.m12}approxEquals(t,i=1e-9){return Math.abs(this.m00-t.m00)<i&&Math.abs(this.m01-t.m01)<i&&Math.abs(this.m02-t.m02)<i&&Math.abs(this.m10-t.m10)<i&&Math.abs(this.m11-t.m11)<i&&Math.abs(this.m12-t.m12)<i}timesScalar(t){const{m00:i,m01:e,m02:r,m10:n,m11:h,m12:m}=this;return new s(t*i,t*e,t*r,t*n,t*h,t*m)}det(){const{m00:t,m01:i,m02:s,m10:e,m11:r,m12:n}=this;return t*(1*r-0*n)-i*(1*e-0*n)+s*(0*e-0*r)}adj(){const{m00:t,m01:i,m02:e,m10:r,m11:n,m12:h}=this;return new s(+(1*n-0*h),-(1*i-0*e),+(i*h-e*n),-(1*r-0*h),+(1*t-0*e),-(t*h-e*r))}inverted(){const t=this.det();return 0===t?null:this.adj().timesScalar(1/t)}transformVector(t){return new i(t.x*this.m00+t.y*this.m01,t.x*this.m10+t.y*this.m11)}inverseTransformVector(t){const i=this.inverted();return i?i.transformVector(t):null}transformPosition(t){return new i(t.x*this.m00+t.y*this.m01+this.m02,t.x*this.m10+t.y*this.m11+this.m12)}inverseTransformPosition(t){const i=this.inverted();return i?i.transformPosition(t):null}transformRect(t){const i=this.transformVector(t.size),s=this.transformPosition(t.origin);return i.x<0&&i.y<0?new e(s.plus(i),i.abs()):i.x<0?new e(s.withX(s.x+i.x),i.abs()):i.y<0?new e(s.withY(s.y+i.y),i.abs()):new e(s,i)}inverseTransformRect(t){const i=this.inverted();return i?i.transformRect(t):null}flatten(){return[this.m00,this.m10,0,this.m01,this.m11,0,this.m02,this.m12,1]}}exports.AffineTransform=s;let e=(()=>{class s{constructor(t,i){this.origin=t,this.size=i}isEmpty(){return 0==this.width()||0==this.height()}width(){return this.size.x}height(){return this.size.y}left(){return this.origin.x}right(){return this.left()+this.width()}top(){return this.origin.y}bottom(){return this.top()+this.height()}topLeft(){return this.origin}topRight(){return this.origin.plus(new i(this.width(),0))}bottomRight(){return this.origin.plus(this.size)}bottomLeft(){return this.origin.plus(new i(0,this.height()))}withOrigin(t){return new s(t,this.size)}withSize(t){return new s(this.origin,t)}closestPointTo(s){return new i(t(s.x,this.left(),this.right()),t(s.y,this.top(),this.bottom()))}distanceFrom(t){return t.minus(this.closestPointTo(t)).length()}contains(t){return 0===this.distanceFrom(t)}hasIntersectionWith(t){const i=Math.max(this.top(),t.top());if(Math.max(i,Math.min(this.bottom(),t.bottom()))-i==0)return!1;const s=Math.max(this.left(),t.left());return Math.max(s,Math.min(this.right(),t.right()))-s!=0}intersectWith(t){const e=i.max(this.topLeft(),t.topLeft()),r=i.max(e,i.min(this.bottomRight(),t.bottomRight()));return new s(e,r.minus(e))}equals(t){return this.origin.equals(t.origin)&&this.size.equals(t.size)}approxEquals(t){return this.origin.approxEquals(t.origin)&&this.size.approxEquals(t.size)}area(){return this.size.x*this.size.y}}return s.empty=new s(i.zero,i.zero),s.unit=new s(i.zero,i.unit),s.NDC=new s(new i(-1,-1),new i(2,2)),s})();exports.Rect=e;
7
+ },{}],"n9w8":[function(require,module,exports) {
8
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createFlamechartViewStateReducer=c,exports.FlamechartID=void 0;var e,t=require("../lib/math"),a=require("./actions");function c(e,c){let r={hover:null,selectedNode:null,configSpaceViewportRect:t.Rect.empty,logicalSpaceViewportSize:t.Vec2.zero};function s(t){const{payload:a}=t;return a.args.id===e&&a.profileIndex===c}return(e=r,t)=>{if(a.actions.flamechart.setHoveredNode.matches(t)&&s(t)){const{hover:a}=t.payload.args;return Object.assign(Object.assign({},e),{hover:a})}if(a.actions.flamechart.setSelectedNode.matches(t)&&s(t)){const{selectedNode:a}=t.payload.args;return Object.assign(Object.assign({},e),{selectedNode:a})}if(a.actions.flamechart.setConfigSpaceViewportRect.matches(t)&&s(t)){const{configSpaceViewportRect:a}=t.payload.args;return Object.assign(Object.assign({},e),{configSpaceViewportRect:a})}if(a.actions.flamechart.setLogicalSpaceViewportSize.matches(t)&&s(t)){const{logicalSpaceViewportSize:a}=t.payload.args;return Object.assign(Object.assign({},e),{logicalSpaceViewportSize:a})}return a.actions.setViewMode.matches(t)?Object.assign(Object.assign({},e),{hover:null}):e}}exports.FlamechartID=e,function(e){e.LEFT_HEAVY="LEFT_HEAVY",e.CHRONO="CHRONO",e.SANDWICH_INVERTED_CALLERS="SANDWICH_INVERTED_CALLERS",e.SANDWICH_CALLEES="SANDWICH_CALLEES"}(e||(exports.FlamechartID=e={}));
9
+ },{"../lib/math":"tDuZ","./actions":"M9Ab"}],"kAzy":[function(require,module,exports) {
10
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createSandwichView=l;var e=require("./flamechart-view-state"),a=require("./actions");function l(l){const r=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.SANDWICH_CALLEES,l),t=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.SANDWICH_INVERTED_CALLERS,l);return(e={callerCallee:null},c)=>{if(a.actions.sandwichView.setSelectedFrame.matches(c)&&function(e){const{payload:a}=e;return a.profileIndex===l}(c))return null==c.payload.args?Object.assign(Object.assign({},e),{callerCallee:null}):Object.assign(Object.assign({},e),{callerCallee:{selectedFrame:c.payload.args,calleeFlamegraph:r(void 0,c),invertedCallerFlamegraph:t(void 0,c)}});const{callerCallee:s}=e;if(s){const{calleeFlamegraph:a,invertedCallerFlamegraph:l}=s,n=r(a,c),i=t(l,c);return n===a&&i===l?e:Object.assign(Object.assign({},e),{callerCallee:Object.assign(Object.assign({},s),{calleeFlamegraph:n,invertedCallerFlamegraph:i})})}return e}}
11
+ },{"./flamechart-view-state":"n9w8","./actions":"M9Ab"}],"ucYa":[function(require,module,exports) {
12
+ "use strict";function t(t){return t[t.length-1]||null}function e(t,e){t.sort(function(t,r){const n=e(t),o=e(r);return n<o?-1:n>o?1:0})}function r(t,e,r){return t.has(e)||t.set(e,r(e)),t.get(e)}function n(t,e,r){return t.has(e)?t.get(e):r(e)}function o(t,e){if(!t.has(e))throw new Error(`Expected key ${e}`);return t.get(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.lastOf=t,exports.sortBy=e,exports.getOrInsert=r,exports.getOrElse=n,exports.getOrThrow=o,exports.itMap=l,exports.itForEach=u,exports.itReduce=i,exports.zeroPad=c,exports.formatPercent=a,exports.fract=f,exports.triangle=h,exports.findValueBisect=g,exports.findIndexBisect=p,exports.noop=x,exports.objectsHaveShallowEquality=d,exports.memoizeByShallowEquality=y,exports.memoizeByReference=w,exports.lazyStatic=E,exports.decodeBase64=A,exports.KeyedSet=void 0;class s{constructor(){this.map=new Map}getOrInsert(t){const e=t.key,r=this.map.get(e);return r||(this.map.set(e,t),t)}forEach(t){this.map.forEach(t)}[Symbol.iterator](){return this.map.values()}}function*l(t,e){for(let r of t)yield e(r)}function u(t,e){for(let r of t)e(r)}function i(t,e,r){let n=r;for(let o of t)n=e(n,o);return n}function c(t,e){return new Array(Math.max(e-t.length,0)+1).join("0")+t}function a(t){let e=`${t.toFixed(0)}%`;return 100===t?e="100%":t>99?e=">99%":t<.01?e="<0.01%":t<1?e=`${t.toFixed(2)}%`:t<10&&(e=`${t.toFixed(1)}%`),e}function f(t){return t-Math.floor(t)}function h(t){return 2*Math.abs(f(t)-.5)-1}function g(t,e,r,n,o=1){for(console.assert(!isNaN(o)&&!isNaN(n));;){if(e-t<=o)return[t,e];const s=(e+t)/2;r(s)<n?t=s:e=s}}function p(t,e){if(0===t.length)return-1;let r=0,n=t.length-1;for(;n!==r;){const o=Math.floor((r+n)/2);e(t[o])?n=o:r=o+1}return e(t[n])?n:-1}function x(...t){}function d(t,e){for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(t[r]!==e[r])return!1;return!0}function y(t){let e=null;return r=>{let n;return null==e?(n=t(r),e={args:r,result:n},n):d(e.args,r)?e.result:(e.args=r,e.result=t(r),e.result)}}function w(t){let e=null;return r=>{let n;return null==e?(n=t(r),e={args:r,result:n},n):e.args===r?e.result:(e.args=r,e.result=t(r),e.result)}}function E(t){let e=null;return()=>(null==e&&(e={result:t()}),e.result)}exports.KeyedSet=s;const m=E(()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Map;for(let r=0;r<t.length;r++)e.set(t.charAt(r),r);return e.set("=",-1),e});function A(t){const e=m();if(t.length%4!=0)throw new Error(`Invalid length for base64 encoded string. Expected length % 4 = 0, got length = ${t.length}`);const r=t.length/4;let n;n=t.length>=4&&"="===t.charAt(t.length-1)?"="===t.charAt(t.length-2)?3*r-2:3*r-1:3*r;const o=new Uint8Array(n);let s=0;for(let l=0;l<r;l++){const r=t.charAt(4*l+0),n=t.charAt(4*l+1),u=t.charAt(4*l+2),i=t.charAt(4*l+3),c=e.get(r),a=e.get(n),f=e.get(u),h=e.get(i);if(null==c||null==a||null==f||null==h)throw new Error(`Invalid quartet at indices ${4*l} .. ${4*l+3}: ${t.substring(4*l,4*l+3)}`);o[s++]=c<<2|a>>4,"="!==u&&(o[s++]=(15&a)<<4|f>>2),"="!==i&&(o[s++]=(7&f)<<6|h)}if(s!==n)throw new Error(`Expected to decode ${n} bytes, but only decoded ${s})`);return o}
13
+ },{}],"HCyk":[function(require,module,exports) {
14
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.actionCreatorWithIndex=n,exports.profileGroup=void 0;var e=require("./flamechart-view-state"),t=require("./sandwich-view-state"),i=require("../lib/typed-redux"),r=require("./actions"),a=require("../lib/math"),o=require("../lib/utils");function n(e){return(0,i.actionCreator)(e)}function c(i,r){const a=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.CHRONO,r),n=(0,e.createFlamechartViewStateReducer)(e.FlamechartID.LEFT_HEAVY,r),c=(0,t.createSandwichView)(r);return(e,t)=>{if(void 0===e)return{profile:i,chronoViewState:a(void 0,t),leftHeavyViewState:n(void 0,t),sandwichViewState:c(void 0,t)};const r={profile:i,chronoViewState:a(e.chronoViewState,t),leftHeavyViewState:n(e.leftHeavyViewState,t),sandwichViewState:c(e.sandwichViewState,t)};return(0,o.objectsHaveShallowEquality)(e,r)?e:r}}const l=(e=null,t)=>{if(r.actions.setProfileGroup.matches(t)){const{indexToView:e,profiles:i,name:r}=t.payload;return{indexToView:e,name:r,profiles:i.map((e,i)=>c(e,i)(void 0,t))}}if(null!=e){const{indexToView:n,profiles:l}=e,s=(0,a.clamp)((0,i.setter)(r.actions.setProfileIndexToView,0)(n,t),0,l.length-1),u=l.map((e,i)=>c(e.profile,i)(e,t));return n===s&&(0,o.objectsHaveShallowEquality)(l,u)?e:Object.assign(Object.assign({},e),{indexToView:s,profiles:u})}return e};exports.profileGroup=l;
15
+ },{"./flamechart-view-state":"n9w8","./sandwich-view-state":"kAzy","../lib/typed-redux":"UDzr","./actions":"M9Ab","../lib/math":"tDuZ","../lib/utils":"ucYa"}],"M9Ab":[function(require,module,exports) {
16
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.actions=void 0;var e,t=require("../lib/typed-redux"),r=require("./profiles-state");exports.actions=e,function(e){let a,o;e.setProfileGroup=(0,t.actionCreator)("setProfileGroup"),e.setProfileIndexToView=(0,t.actionCreator)("setProfileIndexToView"),e.setGLCanvas=(0,t.actionCreator)("setGLCanvas"),e.setViewMode=(0,t.actionCreator)("setViewMode"),e.setFlattenRecursion=(0,t.actionCreator)("setFlattenRecursion"),e.setSearchQuery=(0,t.actionCreator)("setSearchQuery"),e.setSearchIsActive=(0,t.actionCreator)("setSearchIsActive"),e.setDragActive=(0,t.actionCreator)("setDragActive"),e.setLoading=(0,t.actionCreator)("setLoading"),e.setError=(0,t.actionCreator)("setError"),e.setHashParams=(0,t.actionCreator)("setHashParams"),e.setColorScheme=(0,t.actionCreator)("setColorScheme"),function(e){e.setTableSortMethod=(0,t.actionCreator)("sandwichView.setTableSortMethod"),e.setSelectedFrame=(0,r.actionCreatorWithIndex)("sandwichView.setSelectedFrame")}(a=e.sandwichView||(e.sandwichView={})),function(e){e.setHoveredNode=(0,r.actionCreatorWithIndex)("flamechart.setHoveredNode"),e.setSelectedNode=(0,r.actionCreatorWithIndex)("flamechart.setSelectedNode"),e.setConfigSpaceViewportRect=(0,r.actionCreatorWithIndex)("flamechart.setConfigSpaceViewportRect"),e.setLogicalSpaceViewportSize=(0,r.actionCreatorWithIndex)("flamechart.setLogicalSpaceViewportSpace")}(o=e.flamechart||(e.flamechart={}))}(e||(exports.actions=e={}));
17
+ },{"../lib/typed-redux":"UDzr","./profiles-state":"HCyk"}],"JZ8d":[function(require,module,exports) {
18
+ "use strict";function e(e){var o,r=e.Symbol;return"function"==typeof r?r.observable?o=r.observable:(o=r("observable"),r.observable=o):o="@@observable",o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
19
+ },{}],"LkZ7":[function(require,module,exports) {
20
+ var global = arguments[3];
21
+ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var d,o=t(require("./ponyfill.js"));function t(e){return e&&e.__esModule?e:{default:e}}d="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof module?module:Function("return this")();var u=(0,o.default)(d),n=u;exports.default=n;
22
+ },{"./ponyfill.js":"JZ8d"}],"aVFJ":[function(require,module,exports) {
23
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.applyMiddleware=w,exports.bindActionCreators=p,exports.combineReducers=f,exports.compose=b,exports.createStore=i,exports.__DO_NOT_USE__ActionTypes=void 0;var e=t(require("symbol-observable"));function t(e){return e&&e.__esModule?e:{default:e}}var r=function(){return Math.random().toString(36).substring(7).split("").join(".")},n={INIT:"@@redux/INIT"+r(),REPLACE:"@@redux/REPLACE"+r(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+r()}};function o(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function i(t,r,u){var c;if("function"==typeof r&&"function"==typeof u||"function"==typeof u&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof r&&void 0===u&&(u=r,r=void 0),void 0!==u){if("function"!=typeof u)throw new Error("Expected the enhancer to be a function.");return u(i)(t,r)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var a=t,s=r,f=[],d=f,p=!1;function l(){d===f&&(d=f.slice())}function h(){if(p)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function y(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(p)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return l(),d.push(e),function(){if(t){if(p)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,l();var r=d.indexOf(e);d.splice(r,1),f=null}}}function b(e){if(!o(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,s=a(s,e)}finally{p=!1}for(var t=f=d,r=0;r<t.length;r++){(0,t[r])()}return e}return b({type:n.INIT}),(c={dispatch:b,subscribe:y,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");a=e,b({type:n.REPLACE})}})[e.default]=function(){var t,r=y;return(t={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(h())}return t(),{unsubscribe:r(t)}}})[e.default]=function(){return this},t},c}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}function c(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function a(e,t,r,i){var u=Object.keys(t),c=r&&r.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===u.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!o(e))return"The "+c+' has unexpected type of "'+{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1]+'". Expected argument to be an object with the following keys: "'+u.join('", "')+'"';var a=Object.keys(e).filter(function(e){return!t.hasOwnProperty(e)&&!i[e]});return a.forEach(function(e){i[e]=!0}),r&&r.type===n.REPLACE?void 0:a.length>0?"Unexpected "+(a.length>1?"keys":"key")+' "'+a.join('", "')+'" found in '+c+'. Expected to find one of the known reducer keys instead: "'+u.join('", "')+'". Unexpected keys will be ignored.':void 0}function s(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:n.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+n.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function f(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];0,"function"==typeof e[o]&&(r[o]=e[o])}var i,u=Object.keys(r);try{s(r)}catch(a){i=a}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},a=0;a<u.length;a++){var s=u[a],f=r[s],d=e[s],p=f(d,t);if(void 0===p){var l=c(s,t);throw new Error(l)}o[s]=p,n=n||p!==d}return(n=n||u.length!==Object.keys(e).length)?o:e}}function d(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t){if("function"==typeof e)return d(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var n in e){var o=e[n];"function"==typeof o&&(r[n]=d(o,t))}return r}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(r,!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function w(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map(function(e){return e(o)});return y({},r,{dispatch:n=b.apply(void 0,i)(r.dispatch)})}}}function v(){}exports.__DO_NOT_USE__ActionTypes=n;
24
+ },{"symbol-observable":"LkZ7"}],"O1pB":[function(require,module,exports) {
25
+ "use strict";function t(t=window.location.hash){try{if(!t.startsWith("#"))return{};const r=t.substr(1).split("&"),o={};for(const t of r){let[e,r]=t.split("=");r=decodeURIComponent(r),"profileURL"===e?o.profileURL=r:"title"===e?o.title=r:"localProfilePath"===e&&(o.localProfilePath=r)}return o}catch(e){return console.error("Error when loading hash fragment."),console.error(e),{}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getHashParams=t;
26
+ },{}],"QXNG":[function(require,module,exports) {
27
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=/-webkit-|-moz-|-ms-/;function t(t){return"string"==typeof t&&e.test(t)}module.exports=exports.default;
28
+ },{}],"tSfb":[function(require,module,exports) {
29
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var u=["-webkit-","-moz-",""];function i(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("calc(")>-1)return u.map(function(e){return r.replace(/calc\(/g,e+"calc(")})}module.exports=exports.default;
30
+ },{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"ie1g":[function(require,module,exports) {
31
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),r=t(e);function t(e){return e&&e.__esModule?e:{default:e}}var s=["-webkit-",""];function u(e,t){if("string"==typeof t&&!(0,r.default)(t)&&t.indexOf("cross-fade(")>-1)return s.map(function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")})}module.exports=exports.default;
32
+ },{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"CYBj":[function(require,module,exports) {
33
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var e=["-webkit-","-moz-",""],r={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function o(o,t){if("cursor"===o&&r.hasOwnProperty(t))return e.map(function(e){return e+t})}module.exports=exports.default;
34
+ },{}],"MH9I":[function(require,module,exports) {
35
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-",""];function u(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("filter(")>-1)return i.map(function(e){return r.replace(/filter\(/g,e+"filter(")})}module.exports=exports.default;
36
+ },{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"jmPR":[function(require,module,exports) {
37
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function i(i,l){if("display"===i&&e.hasOwnProperty(l))return e[l]}module.exports=exports.default;
38
+ },{}],"FRuF":[function(require,module,exports) {
39
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var e={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},t={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function s(s,l,r){t.hasOwnProperty(s)&&(r[t[s]]=e[l]||l)}module.exports=exports.default;
40
+ },{}],"bHSr":[function(require,module,exports) {
41
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},t={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function i(i,r,o){"flexDirection"===i&&"string"==typeof r&&(r.indexOf("column")>-1?o.WebkitBoxOrient="vertical":o.WebkitBoxOrient="horizontal",r.indexOf("reverse")>-1?o.WebkitBoxDirection="reverse":o.WebkitBoxDirection="normal"),t.hasOwnProperty(i)&&(o[t[i]]=e[r]||r)}module.exports=exports.default;
42
+ },{}],"QxYG":[function(require,module,exports) {
43
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-","-moz-",""],a=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function n(e,r){if("string"==typeof r&&!(0,t.default)(r)&&a.test(r))return i.map(function(e){return e+r})}module.exports=exports.default;
44
+ },{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"qrrU":[function(require,module,exports) {
45
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("css-in-js-utils/lib/isPrefixedValue"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}var i=["-webkit-",""];function u(e,r){if("string"==typeof r&&!(0,t.default)(r)&&r.indexOf("image-set(")>-1)return i.map(function(e){return r.replace(/image-set\(/g,e+"image-set(")})}module.exports=exports.default;
46
+ },{"css-in-js-utils/lib/isPrefixedValue":"QXNG"}],"pEQ2":[function(require,module,exports) {
47
+ "use strict";function e(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default;
48
+ },{}],"M0DH":[function(require,module,exports) {
49
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var t=["-webkit-","-moz-",""],e={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},n={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function i(i,o){if(e.hasOwnProperty(i)&&n.hasOwnProperty(o))return t.map(function(t){return t+o})}module.exports=exports.default;
50
+ },{}],"jNGL":[function(require,module,exports) {
51
+ "use strict";var e=/[A-Z]/g,r=/^ms-/,s={};function t(t){return t in s?s[t]:s[t]=t.replace(e,"-$&").toLowerCase().replace(r,"-ms-")}module.exports=t;
52
+ },{}],"S6J3":[function(require,module,exports) {
53
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("hyphenate-style-name"),t=r(e);function r(e){return e&&e.__esModule?e:{default:e}}function u(e){return(0,t.default)(e)}module.exports=exports.default;
54
+ },{"hyphenate-style-name":"jNGL"}],"XxlV":[function(require,module,exports) {
55
+ "use strict";function e(e){return e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default;
56
+ },{}],"cnM4":[function(require,module,exports) {
57
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var t=require("css-in-js-utils/lib/hyphenateProperty"),e=s(t),r=require("css-in-js-utils/lib/isPrefixedValue"),i=s(r),n=require("../../utils/capitalizeString"),o=s(n);function s(t){return t&&t.__esModule?t:{default:t}}var u={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},a={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function f(t,r){if((0,i.default)(t))return t;for(var n=t.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,s=n.length;o<s;++o){var u=n[o],f=[u];for(var l in r){var p=(0,e.default)(l);if(u.indexOf(p)>-1&&"order"!==p)for(var d=r[l],c=0,b=d.length;c<b;++c)f.unshift(u.replace(p,a[d[c]]+p))}n[o]=f.join(",")}return n.join(",")}function l(t,e,r,i){if("string"==typeof e&&u.hasOwnProperty(t)){var n=f(e,i),s=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(t){return!/-moz-|-ms-/.test(t)}).join(",");if(t.indexOf("Webkit")>-1)return s;var a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(t){return!/-webkit-|-ms-/.test(t)}).join(",");return t.indexOf("Moz")>-1?a:(r["Webkit"+(0,o.default)(t)]=s,r["Moz"+(0,o.default)(t)]=a,n)}}module.exports=exports.default;
58
+ },{"css-in-js-utils/lib/hyphenateProperty":"S6J3","css-in-js-utils/lib/isPrefixedValue":"QXNG","../../utils/capitalizeString":"XxlV"}],"ZBgn":[function(require,module,exports) {
59
+ "use strict";function r(r){for(var t=5381,e=r.length;e;)t=33*t^r.charCodeAt(--e);return t>>>0}module.exports=r;
60
+ },{}],"D2Wi":[function(require,module,exports) {
61
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=require("./capitalizeString"),r=t(e);function t(e){return e&&e.__esModule?e:{default:e}}function u(e,t,u){if(e.hasOwnProperty(t)){for(var o={},a=e[t],n=(0,r.default)(t),f=Object.keys(u),l=0;l<f.length;l++){var i=f[l];if(i===t)for(var s=0;s<a.length;s++)o[a[s]+n]=u[t];o[i]=u[i]}return o}return u}module.exports=exports.default;
62
+ },{"./capitalizeString":"XxlV"}],"qgi9":[function(require,module,exports) {
63
+ "use strict";function e(e,t,r,o,u){for(var s=0,f=e.length;s<f;++s){var l=e[s](t,r,o,u);if(l)return l}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default;
64
+ },{}],"a80f":[function(require,module,exports) {
65
+ "use strict";function e(e,r){-1===e.indexOf(r)&&e.push(r)}function r(r,t){if(Array.isArray(t))for(var o=0,s=t.length;o<s;++o)e(r,t[o]);else e(r,t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r,module.exports=exports.default;
66
+ },{}],"ek9P":[function(require,module,exports) {
67
+ "use strict";function e(e){return e instanceof Object&&!Array.isArray(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e,module.exports=exports.default;
68
+ },{}],"rHEJ":[function(require,module,exports) {
69
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=require("../utils/prefixProperty"),r=s(e),t=require("../utils/prefixValue"),u=s(t),l=require("../utils/addNewValuesOnly"),a=s(l),i=require("../utils/isObject"),f=s(i);function s(e){return e&&e.__esModule?e:{default:e}}function n(e){var t=e.prefixMap,l=e.plugins;return function e(i){for(var s in i){var n=i[s];if((0,f.default)(n))i[s]=e(n);else if(Array.isArray(n)){for(var d=[],o=0,p=n.length;o<p;++o){var v=(0,u.default)(l,s,n[o],i,t);(0,a.default)(d,v||n[o])}d.length>0&&(i[s]=d)}else{var x=(0,u.default)(l,s,n,i,t);x&&(i[s]=x),i=(0,r.default)(t,s,i)}}return i}}module.exports=exports.default;
70
+ },{"../utils/prefixProperty":"D2Wi","../utils/prefixValue":"qgi9","../utils/addNewValuesOnly":"a80f","../utils/isObject":"ek9P"}],"AARE":[function(require,module,exports) {
71
+ var global = arguments[3];
72
+ var e=arguments[3];function t(e){r.length||(n(),a=!0),r[r.length]=e}module.exports=t;var n,r=[],a=!1,o=0,u=1024;function l(){for(;o<r.length;){var e=o;if(o+=1,r[e].call(),o>u){for(var t=0,n=r.length-o;t<n;t++)r[t]=r[t+o];r.length-=o,o=0}}r.length=0,o=0,a=!1}var i=void 0!==e?e:self,c=i.MutationObserver||i.WebKitMutationObserver;function f(e){var t=1,n=new c(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function v(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}n="function"==typeof c?f(l):v(l),t.requestFlush=n,t.makeRequestCallFromTimer=v;
73
+ },{}],"Ezpt":[function(require,module,exports) {
74
+ "use strict";var t=require("./raw"),r=[],n=[],e=t.makeRequestCallFromTimer(l);function l(){if(n.length)throw n.shift()}function o(n){var e;(e=r.length?r.pop():new i).task=n,t(e)}function i(){this.task=null}module.exports=o,i.prototype.call=function(){try{this.task.call()}catch(t){o.onerror?o.onerror(t):(n.push(t),e())}finally{this.task=null,r[r.length]=this}};
75
+ },{"./raw":"AARE"}],"CxN7":[function(require,module,exports) {
76
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.flushToStyleTag=exports.minify=exports.css=exports.StyleSheetTestUtils=exports.StyleSheetServer=exports.StyleSheet=void 0;var e=m(require("inline-style-prefixer/static/plugins/calc")),t=m(require("inline-style-prefixer/static/plugins/crossFade")),r=m(require("inline-style-prefixer/static/plugins/cursor")),n=m(require("inline-style-prefixer/static/plugins/filter")),i=m(require("inline-style-prefixer/static/plugins/flex")),o=m(require("inline-style-prefixer/static/plugins/flexboxIE")),a=m(require("inline-style-prefixer/static/plugins/flexboxOld")),s=m(require("inline-style-prefixer/static/plugins/gradient")),u=m(require("inline-style-prefixer/static/plugins/imageSet")),l=m(require("inline-style-prefixer/static/plugins/position")),f=m(require("inline-style-prefixer/static/plugins/sizing")),c=m(require("inline-style-prefixer/static/plugins/transition")),y=m(require("string-hash")),p=m(require("inline-style-prefixer/static/createPrefixer")),d=m(require("asap"));function m(e){return e&&e.__esModule?e:{default:e}}var h=["Webkit"],g=["Moz"],S=["ms"],v=["Webkit","Moz"],x=["Webkit","ms"],b=["Webkit","Moz","ms"],k={plugins:[e.default,t.default,r.default,n.default,i.default,o.default,a.default,s.default,u.default,l.default,f.default,c.default],prefixMap:{transform:x,transformOrigin:x,transformOriginX:x,transformOriginY:x,backfaceVisibility:h,perspective:h,perspectiveOrigin:h,transformStyle:h,transformOriginZ:h,animation:h,animationDelay:h,animationDirection:h,animationFillMode:h,animationDuration:h,animationIterationCount:h,animationName:h,animationPlayState:h,animationTimingFunction:h,appearance:v,userSelect:b,fontKerning:h,textEmphasisPosition:h,textEmphasis:h,textEmphasisStyle:h,textEmphasisColor:h,boxDecorationBreak:h,clipPath:h,maskImage:h,maskMode:h,maskRepeat:h,maskPosition:h,maskClip:h,maskOrigin:h,maskSize:h,maskComposite:h,mask:h,maskBorderSource:h,maskBorderMode:h,maskBorderSlice:h,maskBorderWidth:h,maskBorderOutset:h,maskBorderRepeat:h,maskBorder:h,maskType:h,textDecorationStyle:v,textDecorationSkip:v,textDecorationLine:v,textDecorationColor:v,filter:h,fontFeatureSettings:v,breakAfter:b,breakBefore:b,breakInside:b,columnCount:v,columnFill:v,columnGap:v,columnRule:v,columnRuleColor:v,columnRuleStyle:v,columnRuleWidth:v,columns:v,columnSpan:v,columnWidth:v,writingMode:x,flex:x,flexBasis:h,flexDirection:x,flexGrow:h,flexFlow:x,flexShrink:h,flexWrap:x,alignContent:h,alignItems:h,alignSelf:h,justifyContent:h,order:h,transitionDelay:h,transitionDuration:h,transitionProperty:h,transitionTimingFunction:h,backdropFilter:h,scrollSnapType:x,scrollSnapPointsX:x,scrollSnapPointsY:x,scrollSnapDestination:x,scrollSnapCoordinate:x,shapeImageThreshold:h,shapeImageMargin:h,shapeImageOutside:h,hyphens:b,flowInto:x,flowFrom:x,regionFragment:x,boxSizing:g,textAlignLast:g,tabSize:g,wrapFlow:S,wrapThrough:S,wrapMargin:S,touchAction:S,gridTemplateColumns:S,gridTemplateRows:S,gridTemplateAreas:S,gridTemplate:S,gridAutoColumns:S,gridAutoRows:S,gridAutoFlow:S,grid:S,gridRowStart:S,gridColumnStart:S,gridRowEnd:S,gridRow:S,gridColumn:S,gridColumnEnd:S,gridColumnGap:S,gridRowGap:S,gridArea:S,gridGap:S,textSizeAdjust:x,borderImage:h,borderImageOutset:h,borderImageRepeat:h,borderImageSlice:h,borderImageSource:h,borderImageWidth:h}},O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var C="undefined"!=typeof Map,j=function(){function e(){A(this,e),this.elements={},this.keyOrder=[]}return w(e,[{key:"forEach",value:function(){return function(e){for(var t=0;t<this.keyOrder.length;t++)e(this.elements[this.keyOrder[t]],this.keyOrder[t])}}()},{key:"set",value:function(){return function(t,r,n){if(this.elements.hasOwnProperty(t)){if(n){var i=this.keyOrder.indexOf(t);this.keyOrder.splice(i,1),this.keyOrder.push(t)}}else this.keyOrder.push(t);if(null!=r){if(C&&r instanceof Map||r instanceof e){var o=this.elements.hasOwnProperty(t)?this.elements[t]:new e;return r.forEach(function(e,t){o.set(t,e,n)}),void(this.elements[t]=o)}if(Array.isArray(r)||"object"!==(void 0===r?"undefined":O(r)))this.elements[t]=r;else{for(var a=this.elements.hasOwnProperty(t)?this.elements[t]:new e,s=Object.keys(r),u=0;u<s.length;u+=1)a.set(s[u],r[s[u]],n);this.elements[t]=a}}else this.elements[t]=r}}()},{key:"get",value:function(){return function(e){return this.elements[e]}}()},{key:"has",value:function(){return function(e){return this.elements.hasOwnProperty(e)}}()},{key:"addStyleType",value:function(){return function(t){var r=this;if(C&&t instanceof Map||t instanceof e)t.forEach(function(e,t){r.set(t,e,!0)});else for(var n=Object.keys(t),i=0;i<n.length;i++)this.set(n[i],t[n[i]],!0)}}()}]),e}(),T=/([A-Z])/g,E=function(e){return"-"+String(e.toLowerCase())},I=function(e){var t=e.replace(T,E);return"m"===t[0]&&"s"===t[1]&&"-"===t[2]?"-"+String(t):t},R={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function M(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var q=["Webkit","ms","Moz","O"];Object.keys(R).forEach(function(e){q.forEach(function(t){R[M(t,e)]=R[e]})});var F=function(e,t){return"number"==typeof t?R[e]?""+t:t+"px":""+t},P=function(e,t){return _(F(e,t))},W=function(e,t){return(0,y.default)(e).toString(36)},D=function(e){return W(JSON.stringify(e))},_=function(e){return"!"===e[e.length-10]&&" !important"===e.slice(-11)?e:String(e)+" !important"};function z(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var B=(0,p.default)(k),G=[function(){return function(e,t,r){return":"!==e[0]?null:r(t+e)}}(),function(){return function(e,t,r){if("@"!==e[0])return null;var n=r(t);return[String(e)+"{"+String(n.join(""))+"}"]}}()],N=function e(t,r,n,i,o){for(var a=new j,s=0;s<r.length;s++)a.addStyleType(r[s]);var u=new j,l=[];a.forEach(function(r,a){n.some(function(s){var u=s(a,t,function(t){return e(t,[r],n,i,o)});if(null!=u)return Array.isArray(u)?l.push.apply(l,z(u)):(console.warn("WARNING: Selector handlers should return an array of rules.Returning a string containing multiple rules is deprecated.",s),l.push("@media all {"+String(u)+"}")),!0})||u.set(a,r,!0)});var f=J(t,u,i,o,n);return f&&l.unshift(f),l},L=function(e,t,r){if(t)for(var n=Object.keys(t),i=0;i<n.length;i++){var o=n[i];e.has(o)&&e.set(o,t[o](e.get(o),r),!1)}},U=function(e,t,r){return String(I(e))+":"+String(r(e,t))+";"},H=function(e,t){return e[t]=!0,e},J=function(e,t,r,n,i){L(t,r,i);var o=Object.keys(t.elements).reduce(H,Object.create(null)),a=B(t.elements),s=Object.keys(a);if(s.length!==t.keyOrder.length)for(var u=0;u<s.length;u++)if(!o[s[u]]){var l=void 0;if((l="W"===s[u][0]?s[u][6].toLowerCase()+s[u].slice(7):"o"===s[u][1]?s[u][3].toLowerCase()+s[u].slice(4):s[u][2].toLowerCase()+s[u].slice(3))&&o[l]){var f=t.keyOrder.indexOf(l);t.keyOrder.splice(f,0,s[u])}else t.keyOrder.unshift(s[u])}for(var c=!1===n?F:P,y=[],p=0;p<t.keyOrder.length;p++){var d=t.keyOrder[p],m=a[d];if(Array.isArray(m))for(var h=0;h<m.length;h++)y.push(U(d,m[h],c));else y.push(U(d,m,c))}return y.length?String(e)+"{"+String(y.join(""))+"}":""},X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Y(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var Z=null,K=function(e){if(null==Z&&null==(Z=document.querySelector("style[data-aphrodite]"))){var t=document.head||document.getElementsByTagName("head")[0];(Z=document.createElement("style")).type="text/css",Z.setAttribute("data-aphrodite",""),t.appendChild(Z)}var r=Z.styleSheet||Z.sheet;if(r.insertRule){var n=r.cssRules.length;e.forEach(function(e){try{r.insertRule(e,n),n+=1}catch(t){}})}else Z.innerText=(Z.innerText||"")+e.join("")},V={fontFamily:function(){return function e(t){return Array.isArray(t)?t.map(e).join(","):"object"===(void 0===t?"undefined":X(t))?(re(t.src,"@font-face",[t],!1),'"'+String(t.fontFamily)+'"'):t}}(),animationName:function(){return function e(t,r){if(Array.isArray(t))return t.map(function(t){return e(t,r)}).join(",");if("object"===(void 0===t?"undefined":X(t))){var n="keyframe_"+String(D(t)),i="@keyframes "+n+"{";return t instanceof j?t.forEach(function(e,t){i+=N(t,[e],r,V,!1).join("")}):Object.keys(t).forEach(function(e){i+=N(e,[t[e]],r,V,!1).join("")}),te(n,[i+="}"]),n}return t}}()},Q={},$=[],ee=!1,te=function(e,t){var r;if(!Q[e]){if(!ee){if("undefined"==typeof document)throw new Error("Cannot automatically buffer without a document");ee=!0,(0,d.default)(ue)}(r=$).push.apply(r,Y(t)),Q[e]=!0}},re=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!Q[e]){var o=N(t,r,i,V,n);te(e,o)}},ne=function(){$=[],Q={},ee=!1,Z=null},ie=function(){return $},oe=function(){if(ee)throw new Error("Cannot buffer while already buffering");ee=!0},ae=function(){ee=!1;var e=$;return $=[],e},se=function(){return ae().join("")},ue=function(){var e=ae();e.length>0&&K(e)};exports.flushToStyleTag=ue;var le=function(){return Object.keys(Q)},fe=function(e){e.forEach(function(e){Q[e]=!0})},ce=function e(t,r,n,i){for(var o=0;o<t.length;o+=1)t[o]&&(Array.isArray(t[o])?i+=e(t[o],r,n,i):(r.push(t[o]._name),n.push(t[o]._definition),i+=t[o]._len));return i},ye=function(e,t,r){var n=[],i=[],o=ce(t,n,i,0);if(0===n.length)return"";var a=void 0;return a=1===n.length?"_"+String(n[0]):"_"+String(W(n.join()))+String((o%36).toString(36)),re(a,"."+String(a),i,e,r),a},pe=function(e,t){return String(t)+"_"+String(W(e))},de=function(){return W},me=de(),he={create:function(){return function(e){for(var t={},r=Object.keys(e),n=0;n<r.length;n+=1){var i=r[n],o=e[i],a=JSON.stringify(o);t[i]={_len:a.length,_name:me(a,i),_definition:o}}return t}}(),rehydrate:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];fe(e)}}()},ge="undefined"!=typeof window?null:{renderStatic:function(){return function(e){return ne(),oe(),{html:e(),css:{content:se(),renderedClassNames:le()}}}}()},Se=null;function ve(e,t){return{StyleSheet:Object.assign({},he,{extend:function(){return function(r){var n=r.map(function(e){return e.selectorHandler}).filter(function(e){return e});return ve(e,t.concat(n))}}()}),StyleSheetServer:ge,StyleSheetTestUtils:Se,minify:function(){return function(e){me=e?W:pe}}(),css:function(){return function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return ye(e,n,t)}}()}}var xe=!0,be=ve(xe,G),ke=be.StyleSheet,Oe=be.StyleSheetServer,we=be.StyleSheetTestUtils,Ae=be.css,Ce=be.minify;exports.minify=Ce,exports.css=Ae,exports.StyleSheetTestUtils=we,exports.StyleSheetServer=Oe,exports.StyleSheet=ke;
77
+ },{"inline-style-prefixer/static/plugins/calc":"tSfb","inline-style-prefixer/static/plugins/crossFade":"ie1g","inline-style-prefixer/static/plugins/cursor":"CYBj","inline-style-prefixer/static/plugins/filter":"MH9I","inline-style-prefixer/static/plugins/flex":"jmPR","inline-style-prefixer/static/plugins/flexboxIE":"FRuF","inline-style-prefixer/static/plugins/flexboxOld":"bHSr","inline-style-prefixer/static/plugins/gradient":"QxYG","inline-style-prefixer/static/plugins/imageSet":"qrrU","inline-style-prefixer/static/plugins/position":"pEQ2","inline-style-prefixer/static/plugins/sizing":"M0DH","inline-style-prefixer/static/plugins/transition":"cnM4","string-hash":"ZBgn","inline-style-prefixer/static/createPrefixer":"rHEJ","asap":"Ezpt"}],"hvr4":[function(require,module,exports) {
78
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.commonStyle=exports.ZIndex=exports.Duration=exports.Sizes=exports.FontSize=exports.FontFamily=void 0;var e,o,t,T,i,r=require("aphrodite");exports.FontFamily=e,function(e){e.MONOSPACE='"Source Code Pro", Courier, monospace'}(e||(exports.FontFamily=e={})),exports.FontSize=o,function(e){e[e.LABEL=10]="LABEL",e[e.TITLE=12]="TITLE",e[e.BIG_BUTTON=36]="BIG_BUTTON"}(o||(exports.FontSize=o={})),exports.Sizes=t,function(e){e[e.MINIMAP_HEIGHT=100]="MINIMAP_HEIGHT",e[e.DETAIL_VIEW_HEIGHT=150]="DETAIL_VIEW_HEIGHT",e[e.TOOLTIP_WIDTH_MAX=900]="TOOLTIP_WIDTH_MAX",e[e.TOOLTIP_HEIGHT_MAX=80]="TOOLTIP_HEIGHT_MAX",e[e.SEPARATOR_HEIGHT=2]="SEPARATOR_HEIGHT",e[e.FRAME_HEIGHT=20]="FRAME_HEIGHT",e[e.TOOLBAR_HEIGHT=20]="TOOLBAR_HEIGHT",e[e.TOOLBAR_TAB_HEIGHT=18]="TOOLBAR_TAB_HEIGHT"}(t||(exports.Sizes=t={})),exports.Duration=T,function(e){e.HOVER_CHANGE="0.07s"}(T||(exports.Duration=T={})),exports.ZIndex=i,function(e){e[e.PROFILE_SELECT=1]="PROFILE_SELECT",e[e.HOVERTIP=2]="HOVERTIP"}(i||(exports.ZIndex=i={}));const I=r.StyleSheet.create({fillY:{height:"100%"},fillX:{width:"100%"},hbox:{display:"flex",flexDirection:"row",position:"relative",overflow:"hidden"},vbox:{display:"flex",flexDirection:"column",position:"relative",overflow:"hidden"}});exports.commonStyle=I;
79
+ },{"aphrodite":"CxN7"}],"MwGB":[function(require,module,exports) {
80
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useState=a,exports.useReducer=p,exports.useEffect=h,exports.useLayoutEffect=v,exports.useRef=m,exports.useImperativeHandle=H,exports.useMemo=l,exports.useCallback=d,exports.useContext=x,exports.useDebugValue=y,exports.useErrorBoundary=E;var _,n,t,o=require("preact"),e=0,u=[],r=o.options.__r,i=o.options.diffed,c=o.options.__c,s=o.options.unmount;function f(_,t){o.options.__h&&o.options.__h(n,_,e||t),e=0;var u=n.__H||(n.__H={__:[],__h:[]});return _>=u.__.length&&u.__.push({}),u.__[_]}function a(_){return e=1,p(A,_)}function p(t,o,e){var u=f(_++,2);return u.__c||(u.__c=n,u.__=[e?e(o):A(void 0,o),function(_){var n=t(u.__[0],_);u.__[0]!==n&&(u.__[0]=n,u.__c.setState({}))}]),u.__}function h(t,e){var u=f(_++,3);!o.options.__s&&q(u.__H,e)&&(u.__=t,u.__H=e,n.__H.__h.push(u))}function v(t,e){var u=f(_++,4);!o.options.__s&&q(u.__H,e)&&(u.__=t,u.__H=e,n.__h.push(u))}function m(_){return e=5,l(function(){return{current:_}},[])}function H(_,n,t){e=6,v(function(){"function"==typeof _?_(n()):_&&(_.current=n())},null==t?t:t.concat(_))}function l(n,t){var o=f(_++,7);return q(o.__H,t)?(o.__H=t,o.__h=n,o.__=n()):o.__}function d(_,n){return e=8,l(function(){return _},n)}function x(t){var o=n.context[t.__c],e=f(_++,9);return e.__c=t,o?(null==e.__&&(e.__=!0,o.sub(n)),o.props.value):t.__}function y(_,n){o.options.useDebugValue&&o.options.useDebugValue(n?n(_):_)}function E(t){var o=f(_++,10),e=a();return o.__=t,n.componentDidCatch||(n.componentDidCatch=function(_){o.__&&o.__(_),e[1](_)}),[e[0],function(){e[1](void 0)}]}function b(){u.some(function(_){if(_.__P)try{_.__H.__h.forEach(g),_.__H.__h.forEach(D),_.__H.__h=[]}catch(n){return _.__H.__h=[],o.options.__e(n,_.__v),!0}}),u=[]}function g(_){_.t&&_.t()}function D(_){var n=_.__();"function"==typeof n&&(_.t=n)}function q(_,n){return!_||n.some(function(n,t){return n!==_[t]})}function A(_,n){return"function"==typeof n?n(_):n}o.options.__r=function(t){r&&r(t),_=0,(n=t.__c).__H&&(n.__H.__h.forEach(g),n.__H.__h.forEach(D),n.__H.__h=[])},o.options.diffed=function(_){i&&i(_);var n=_.__c;if(n){var e=n.__H;e&&e.__h.length&&(1!==u.push(n)&&t===o.options.requestAnimationFrame||((t=o.options.requestAnimationFrame)||function(_){var n,t=function(){clearTimeout(o),cancelAnimationFrame(n),setTimeout(_)},o=setTimeout(t,100);"undefined"!=typeof window&&(n=requestAnimationFrame(t))})(b))}},o.options.__c=function(_,n){n.some(function(_){try{_.__h.forEach(g),_.__h=_.__h.filter(function(_){return!_.__||D(_)})}catch(t){n.some(function(_){_.__h&&(_.__h=[])}),n=[],o.options.__e(t,_.__v)}}),c&&c(_,n)},o.options.unmount=function(_){s&&s(_);var n=_.__c;if(n){var t=n.__H;if(t)try{t.__.forEach(function(_){return _.t&&_.t()})}catch(_){o.options.__e(_,n.__v)}}};
81
+ },{"preact":"aSor"}],"x77Y":[function(require,module,exports) {
82
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Color=void 0;var t=require("./math");class r{constructor(t=0,r=0,s=0,e=1){this.r=t,this.g=r,this.b=s,this.a=e}static fromLumaChromaHue(s,e,o){const i=o/60,a=e*(1-Math.abs(i%2-1)),[n,h,u]=i<1?[e,a,0]:i<2?[a,e,0]:i<3?[0,e,a]:i<4?[0,a,e]:i<5?[a,0,e]:[e,0,a],c=s-(.3*n+.59*h+.11*u);return new r((0,t.clamp)(n+c,0,1),(0,t.clamp)(h+c,0,1),(0,t.clamp)(u+c,0,1),1)}static fromCSSHex(t){if(7!==t.length||"#"!==t[0])throw new Error(`Invalid color input ${t}`);const s=parseInt(t.substr(1,2),16)/255,e=parseInt(t.substr(3,2),16)/255,o=parseInt(t.substr(5,2),16)/255;if(s<0||s>1||e<0||e>1||o<0||o>1)throw new Error(`Invalid color input ${t}`);return new r(s,e,o)}withAlpha(t){return new r(this.r,this.g,this.b,t)}toCSS(){return`rgba(${(255*this.r).toFixed()}, ${(255*this.g).toFixed()}, ${(255*this.b).toFixed()}, ${this.a.toFixed(2)})`}}exports.Color=r;
83
+ },{"./math":"tDuZ"}],"osod":[function(require,module,exports) {
84
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.darkTheme=void 0;var o,r=require("../../lib/color"),e=require("../../lib/utils");!function(o){o.LIGHTER_GRAY="#D0D0D0",o.LIGHT_GRAY="#BDBDBD",o.GRAY="#666666",o.DARK_GRAY="#222222",o.DARKER_GRAY="#0C0C0C",o.OFF_BLACK="#060606",o.BLACK="#000000",o.BLUE="#00769B",o.PALE_BLUE="#004E75",o.GREEN="#0F8A42",o.LIGHT_BROWN="#D6AE24",o.BROWN="#A66F1C"}(o||(o={}));const t=.2,l=.1,a=.2,R=.1,c=o=>{const t=(0,e.triangle)(30*o),l=.9*o*360,a=.2+.1*t,R=.2-.1*t;return r.Color.fromLumaChromaHue(R,a,l)},A=`\n vec3 colorForBucket(float t) {\n float x = triangle(30.0 * t);\n float H = 360.0 * (0.9 * t);\n float C = ${.2.toFixed(1)} + ${.1.toFixed(1)} * x;\n float L = ${.2.toFixed(1)} - ${.1.toFixed(1)} * x;\n return hcl2rgb(H, C, L);\n }\n`,C={fgPrimaryColor:o.LIGHTER_GRAY,fgSecondaryColor:o.GRAY,bgPrimaryColor:o.OFF_BLACK,bgSecondaryColor:o.DARKER_GRAY,altFgPrimaryColor:o.LIGHTER_GRAY,altFgSecondaryColor:o.GRAY,altBgPrimaryColor:o.BLACK,altBgSecondaryColor:o.DARKER_GRAY,selectionPrimaryColor:o.BLUE,selectionSecondaryColor:o.PALE_BLUE,weightColor:o.GREEN,searchMatchTextColor:o.DARKER_GRAY,searchMatchPrimaryColor:o.BROWN,searchMatchSecondaryColor:o.LIGHT_BROWN,colorForBucket:c,colorForBucketGLSL:A};exports.darkTheme=C;
85
+ },{"../../lib/color":"x77Y","../../lib/utils":"ucYa"}],"CjU5":[function(require,module,exports) {
86
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lightTheme=void 0;var o,r=require("../../lib/color"),e=require("../../lib/utils");!function(o){o.WHITE="#FFFFFF",o.OFF_WHITE="#F6F6F6",o.LIGHT_GRAY="#BDBDBD",o.GRAY="#666666",o.DARK_GRAY="#222222",o.OFF_BLACK="#111111",o.BLACK="#000000",o.DARK_BLUE="#2F80ED",o.PALE_DARK_BLUE="#8EB7ED",o.GREEN="#6FCF97",o.YELLOW="#FEDC62",o.ORANGE="#FFAC02"}(o||(o={}));const t=.25,l=.2,a=.8,F=.15,c=o=>{const t=(0,e.triangle)(30*o),l=.9*o*360,a=.25+.2*t,F=.8-.15*t;return r.Color.fromLumaChromaHue(F,a,l)},i=`\n vec3 colorForBucket(float t) {\n float x = triangle(30.0 * t);\n float H = 360.0 * (0.9 * t);\n float C = ${.25.toFixed(1)} + ${.2.toFixed(1)} * x;\n float L = ${.8.toFixed(1)} - ${.15.toFixed(1)} * x;\n return hcl2rgb(H, C, L);\n }\n`,C={fgPrimaryColor:o.BLACK,fgSecondaryColor:o.LIGHT_GRAY,bgPrimaryColor:o.WHITE,bgSecondaryColor:o.OFF_WHITE,altFgPrimaryColor:o.WHITE,altFgSecondaryColor:o.LIGHT_GRAY,altBgPrimaryColor:o.BLACK,altBgSecondaryColor:o.DARK_GRAY,selectionPrimaryColor:o.DARK_BLUE,selectionSecondaryColor:o.PALE_DARK_BLUE,weightColor:o.GREEN,searchMatchTextColor:o.BLACK,searchMatchPrimaryColor:o.ORANGE,searchMatchSecondaryColor:o.YELLOW,colorForBucket:c,colorForBucketGLSL:i};exports.lightTheme=C;
87
+ },{"../../lib/color":"x77Y","../../lib/utils":"ucYa"}],"gzKG":[function(require,module,exports) {
88
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useTheme=s,exports.withTheme=m,exports.colorSchemeToString=i,exports.nextColorScheme=l,exports.ThemeProvider=a,exports.ThemeContext=void 0;var e=require("preact"),r=require("preact/hooks"),t=require("../../lib/utils"),o=require("../../store"),c=require("./dark-theme"),h=require("./light-theme");const n=(0,e.createContext)(h.lightTheme);function s(){return(0,r.useContext)(n)}function m(e){return(0,t.memoizeByReference)(e)}function u(){return matchMedia("(prefers-color-scheme: dark)")}function i(e){switch(e){case o.ColorScheme.SYSTEM:return"System";case o.ColorScheme.DARK:return"Dark";case o.ColorScheme.LIGHT:return"Light"}}function l(e){if(u().matches)switch(e){case o.ColorScheme.SYSTEM:return o.ColorScheme.LIGHT;case o.ColorScheme.LIGHT:return o.ColorScheme.DARK;case o.ColorScheme.DARK:return o.ColorScheme.SYSTEM}else switch(e){case o.ColorScheme.SYSTEM:return o.ColorScheme.DARK;case o.ColorScheme.DARK:return o.ColorScheme.LIGHT;case o.ColorScheme.LIGHT:return o.ColorScheme.SYSTEM}}function S(e,r){switch(e){case o.ColorScheme.SYSTEM:return r?c.darkTheme:h.lightTheme;case o.ColorScheme.DARK:return c.darkTheme;case o.ColorScheme.LIGHT:return h.lightTheme}}function a(t){const[c,h]=(0,r.useState)(()=>u().matches),s=(0,r.useCallback)(e=>{h(e.matches)},[h]);(0,r.useEffect)(()=>{const e=u();return e.addEventListener("change",s),()=>{e.removeEventListener("change",s)}},[s]);const m=S((0,o.useAppSelector)(e=>e.colorScheme,[]),c);return(0,e.h)(n.Provider,{value:m,children:t.children})}exports.ThemeContext=n;
89
+ },{"preact":"aSor","preact/hooks":"MwGB","../../lib/utils":"ucYa","../../store":"LSXo","./dark-theme":"osod","./light-theme":"CjU5"}],"Pua8":[function(require,module,exports) {
90
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ColorChit=o;var e=require("preact"),t=require("aphrodite"),r=require("./style"),i=require("./themes/theme");function o(r){const o=s((0,i.useTheme)());return(0,e.h)("span",{className:(0,t.css)(o.stackChit),style:{backgroundColor:r.color}})}const s=(0,i.withTheme)(e=>t.StyleSheet.create({stackChit:{position:"relative",top:-1,display:"inline-block",verticalAlign:"middle",marginRight:"0.5em",border:`1px solid ${e.fgSecondaryColor}`,width:r.FontSize.LABEL-2,height:r.FontSize.LABEL-2}}));
91
+ },{"preact":"aSor","aphrodite":"CxN7","./style":"hvr4","./themes/theme":"gzKG"}],"SGwe":[function(require,module,exports) {
92
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScrollableListView=void 0;var e=require("preact"),l=require("preact/hooks");const t=({items:t,axis:r,renderItems:i,className:n,initialIndexInView:s})=>{const[u,o]=(0,l.useState)(null),[c,a]=(0,l.useState)(0),d=(0,l.useRef)(null),f="x"===r?"width":"height",x="x"===r?"left":"top",b="x"===r?"scrollLeft":"scrollTop",v=s?t.reduce((e,l,t)=>t<s?e+l.size:e,0):0,h=(0,l.useRef)(v),m=(0,l.useCallback)(e=>{e?requestAnimationFrame(()=>{o(e.getBoundingClientRect()[f]),null!=h.current&&(e.scrollTo({[x]:h.current}),h.current=null)}):o(null),d.current=e},[o,f,x]),g=(0,l.useMemo)(()=>{if(null==d.current||null==u||null==c)return null;const e=c-u/4,l=c+u+u/4;let r=0,i=0,n=0;for(;n<t.length;n++){if(i=r,(r+=t[n].size)>=e)break}const s=n;for(;n<t.length;n++){if((r+=t[n].size)>=l)break}return{firstVisibleIndex:s,lastVisibleIndex:Math.min(n,t.length-1),invisiblePrefixSize:i}},[u,c,t]),p=(0,l.useMemo)(()=>t.reduce((e,l)=>e+l.size,0),[t]),z=(0,l.useCallback)(()=>{null!=d.current&&a(d.current[b])},[b]);(0,l.useEffect)(()=>{const e=()=>{null!=d.current&&o(d.current.getBoundingClientRect()[f])};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[f]);const w=(0,l.useMemo)(()=>g?i(g.firstVisibleIndex,g.lastVisibleIndex):null,[i,g]),S=(0,l.useMemo)(()=>(0,e.h)("div",{style:{height:p}},(0,e.h)("div",{style:{transform:`translateY(${(null==g?void 0:g.invisiblePrefixSize)||0}px)`}},w)),[null==g?void 0:g.invisiblePrefixSize,w,p]);return(0,e.h)("div",{className:n,ref:m,onScroll:z},S)};exports.ScrollableListView=t;
93
+ },{"preact":"aSor","preact/hooks":"MwGB"}],"EhY8":[function(require,module,exports) {
94
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LRUCache=exports.List=void 0;class t{constructor(t){this.data=t,this.prev=null,this.next=null}}class e{constructor(){this.head=null,this.tail=null,this.size=0}getHead(){return this.head}getTail(){return this.tail}getSize(){return this.size}append(t){this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this.size++}prepend(t){return this.head?(this.head.prev=t,t.next=this.head,this.head=t):this.head=this.tail=t,this.size++,t}pop(){if(this.tail){const t=this.tail;return t.prev?(this.tail=t.prev,this.tail.next=null):this.head=this.tail=null,this.size--,t.prev=null,t}return null}dequeue(){if(this.head){const t=this.head;return t.next?(this.head=t.next,this.head.prev=null):this.head=this.tail=null,this.size--,t.next=null,t}return null}remove(t){null==t.prev?this.dequeue():null==t.next?this.pop():(t.next.prev=t.prev,t.prev.next=t.next,t.next=null,t.prev=null,this.size--)}}exports.List=e;class i{constructor(t){this.capacity=t,this.list=new e,this.map=new Map}has(t){return this.map.has(t)}get(t){const e=this.map.get(t);return e?(this.list.remove(e.listNode),this.list.prepend(e.listNode),e?e.value:null):null}getSize(){return this.list.getSize()}getCapacity(){return this.capacity}insert(e,i){const s=this.map.get(e);for(s&&this.list.remove(s.listNode);this.list.getSize()>=this.capacity;)this.map.delete(this.list.pop().data);const h=this.list.prepend(new t(e));this.map.set(e,{value:i,listNode:h})}getOrInsert(t,e){let i=this.get(t);return null==i&&(i=e(t),this.insert(t,i)),i}removeLRU(){const t=this.list.pop();if(!t)return null;const e=t.data,i=this.map.get(e).value;return this.map.delete(e),[e,i]}clear(){this.list=new e,this.map=new Map}}exports.LRUCache=i;
95
+ },{}],"pBGv":[function(require,module,exports) {
96
+
97
+ var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
98
+ },{}],"XGYN":[function(require,module,exports) {
99
+ var process = require("process");
100
+ var t=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebGL=exports.Graphics=void 0;const e=void 0!==t&&t.env&&!0;function i(t){if(!e&&!t)throw new Error("Assertion failed.")}function r(t,e){-1===t.indexOf(e)&&t.push(e)}function s(t,e){const i=t.indexOf(e);-1!==i&&t.splice(i,1)}function n(t,e){return i(e>=0&&e<=31),t.TEXTURE0+e}var h,a;exports.Graphics=h,function(t){t.Rect=class{constructor(t=0,e=0,i=0,r=0){this.x=t,this.y=e,this.width=i,this.height=r}set(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}equals(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}};let e,i,r,s,n,h=(()=>{class t{constructor(t,e,i,r){this.redF=t,this.greenF=e,this.blueF=i,this.alphaF=r}equals(t){return this.redF===t.redF&&this.greenF===t.greenF&&this.blueF===t.blueF&&this.alphaF===t.alphaF}}return t.TRANSPARENT=new t(0,0,0,0),t})();t.Color=h,function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SOURCE_COLOR=2]="SOURCE_COLOR",t[t.TARGET_COLOR=3]="TARGET_COLOR",t[t.INVERSE_SOURCE_COLOR=4]="INVERSE_SOURCE_COLOR",t[t.INVERSE_TARGET_COLOR=5]="INVERSE_TARGET_COLOR",t[t.SOURCE_ALPHA=6]="SOURCE_ALPHA",t[t.TARGET_ALPHA=7]="TARGET_ALPHA",t[t.INVERSE_SOURCE_ALPHA=8]="INVERSE_SOURCE_ALPHA",t[t.INVERSE_TARGET_ALPHA=9]="INVERSE_TARGET_ALPHA",t[t.CONSTANT=10]="CONSTANT",t[t.INVERSE_CONSTANT=11]="INVERSE_CONSTANT"}(e=t.BlendOperation||(t.BlendOperation={})),function(t){t[t.TRIANGLES=0]="TRIANGLES",t[t.TRIANGLE_STRIP=1]="TRIANGLE_STRIP"}(i=t.Primitive||(t.Primitive={}));function a(t){return t==r.FLOAT?4:1}t.Context=class{constructor(){this.resizeEventHandlers=new Set}setCopyBlendState(){this.setBlendState(e.ONE,e.ZERO)}setAddBlendState(){this.setBlendState(e.ONE,e.ONE)}setPremultipliedBlendState(){this.setBlendState(e.ONE,e.INVERSE_SOURCE_ALPHA)}setUnpremultipliedBlendState(){this.setBlendState(e.SOURCE_ALPHA,e.INVERSE_SOURCE_ALPHA)}addAfterResizeEventHandler(t){this.resizeEventHandlers.add(t)}removeAfterResizeEventHandler(t){this.resizeEventHandlers.delete(t)}},function(t){t[t.FLOAT=0]="FLOAT",t[t.BYTE=1]="BYTE"}(r=t.AttributeType||(t.AttributeType={})),t.attributeByteLength=a;class _{constructor(t,e,i,r){this.name=t,this.type=e,this.count=i,this.byteOffset=r}}t.Attribute=_;t.VertexFormat=class{constructor(){this._attributes=[],this._stride=0}get attributes(){return this._attributes}get stride(){return this._stride}add(t,e,i){return this.attributes.push(new _(t,e,i,this.stride)),this._stride+=i*a(e),this}};t.VertexBuffer=class{uploadFloat32Array(t){this.upload(new Uint8Array(t.buffer),0)}uploadFloats(t){this.uploadFloat32Array(new Float32Array(t))}},function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(s=t.PixelFilter||(t.PixelFilter={})),function(t){t[t.REPEAT=0]="REPEAT",t[t.CLAMP=1]="CLAMP"}(n=t.PixelWrap||(t.PixelWrap={}));let o=(()=>{class t{constructor(t,e,i){this.minFilter=t,this.magFilter=e,this.wrap=i}}return t.LINEAR_CLAMP=new t(s.LINEAR,s.LINEAR,n.CLAMP),t.LINEAR_MIN_NEAREST_MAG_CLAMP=new t(s.LINEAR,s.NEAREST,n.CLAMP),t.NEAREST_CLAMP=new t(s.NEAREST,s.NEAREST,n.CLAMP),t})();t.TextureFormat=o}(h||(exports.Graphics=h={})),exports.WebGL=a,function(t){let a=(()=>{class t extends h.Context{constructor(t=document.createElement("canvas")){super(),this._attributeCount=0,this._blendOperations=0,this._contextResetHandlers=[],this._currentClearColor=h.Color.TRANSPARENT,this._currentRenderTarget=null,this._defaultViewport=new h.Rect,this._forceStateUpdate=!0,this._generation=1,this._height=0,this._oldBlendOperations=0,this._oldRenderTarget=null,this._oldViewport=new h.Rect,this._width=0,this.handleWebglContextRestored=(()=>{this._attributeCount=0,this._currentClearColor=h.Color.TRANSPARENT,this._forceStateUpdate=!0,this._generation++;for(let t of this._contextResetHandlers)t()}),this.ANGLE_instanced_arrays=null,this.ANGLE_instanced_arrays_generation=-1;let e=t.getContext("webgl",{alpha:!1,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1});if(null==e)throw new Error("Setup failure");this._gl=e;let i=t.style;t.width=0,t.height=0,i.width=i.height="0",t.addEventListener("webglcontextlost",t=>{t.preventDefault()}),t.addEventListener("webglcontextrestored",this.handleWebglContextRestored),this._blendOperationMap={[h.BlendOperation.ZERO]:this._gl.ZERO,[h.BlendOperation.ONE]:this._gl.ONE,[h.BlendOperation.SOURCE_COLOR]:this._gl.SRC_COLOR,[h.BlendOperation.TARGET_COLOR]:this._gl.DST_COLOR,[h.BlendOperation.INVERSE_SOURCE_COLOR]:this._gl.ONE_MINUS_SRC_COLOR,[h.BlendOperation.INVERSE_TARGET_COLOR]:this._gl.ONE_MINUS_DST_COLOR,[h.BlendOperation.SOURCE_ALPHA]:this._gl.SRC_ALPHA,[h.BlendOperation.TARGET_ALPHA]:this._gl.DST_ALPHA,[h.BlendOperation.INVERSE_SOURCE_ALPHA]:this._gl.ONE_MINUS_SRC_ALPHA,[h.BlendOperation.INVERSE_TARGET_ALPHA]:this._gl.ONE_MINUS_DST_ALPHA,[h.BlendOperation.CONSTANT]:this._gl.CONSTANT_COLOR,[h.BlendOperation.INVERSE_CONSTANT]:this._gl.ONE_MINUS_CONSTANT_COLOR}}get widthInPixels(){return this._width}get heightInPixels(){return this._height}testContextLoss(){this.handleWebglContextRestored()}get gl(){return this._gl}get generation(){return this._generation}addContextResetHandler(t){r(this._contextResetHandlers,t)}removeContextResetHandler(t){s(this._contextResetHandlers,t)}get currentRenderTarget(){return this._currentRenderTarget}beginFrame(){this.setRenderTarget(null)}endFrame(){}setBlendState(e,i){this._blendOperations=t._packBlendModes(e,i)}setViewport(t,e,i,r){(null!=this._currentRenderTarget?this._currentRenderTarget.viewport:this._defaultViewport).set(t,e,i,r)}get viewport(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport:this._defaultViewport}get renderTargetWidthInPixels(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport.width:this._width}get renderTargetHeightInPixels(){return null!=this._currentRenderTarget?this._currentRenderTarget.viewport.height:this._height}draw(t,e,i){this._updateRenderTargetAndViewport(),f.from(e).prepare(),R.from(i).prepare(),this._updateFormat(e.format),this._updateBlendState(),this._gl.drawArrays(t==h.Primitive.TRIANGLES?this._gl.TRIANGLES:this._gl.TRIANGLE_STRIP,0,Math.floor(i.byteCount/e.format.stride)),this._forceStateUpdate=!1}resize(t,e,i,r){let s=this._gl.canvas;const n=s.getBoundingClientRect();if(this._width===t&&this._height===e&&n.width===i&&n.height===r)return;let h=s.style;s.width=t,s.height=e,h.width=`${i}px`,h.height=`${r}px`,this.setViewport(0,0,t,e),this._width=t,this._height=e,this.resizeEventHandlers.forEach(t=>t())}clear(t){this._updateRenderTargetAndViewport(),this._updateBlendState(),t.equals(this._currentClearColor)||(this._gl.clearColor(t.redF,t.greenF,t.blueF,t.alphaF),this._currentClearColor=t),this._gl.clear(this._gl.COLOR_BUFFER_BIT)}setRenderTarget(t){this._currentRenderTarget=A.from(t)}createMaterial(t,e,i){let r=new f(this,t,e,i);return r.program,r}createVertexBuffer(t){return i(t>0&&t%4==0),new R(this,t)}createTexture(t,e,i,r){return new p(this,t,e,i,r)}createRenderTarget(t){return new A(this,p.from(t))}getANGLE_instanced_arrays(){if(this.ANGLE_instanced_arrays_generation!==this._generation&&(this.ANGLE_instanced_arrays=null),!this.ANGLE_instanced_arrays&&(this.ANGLE_instanced_arrays=this.gl.getExtension("ANGLE_instanced_arrays"),!this.ANGLE_instanced_arrays))throw new Error("Failed to get extension ANGLE_instanced_arrays");return this.ANGLE_instanced_arrays}_updateRenderTargetAndViewport(){let t=this._currentRenderTarget,e=null!=t?t.viewport:this._defaultViewport,i=this._gl;(this._forceStateUpdate||this._oldRenderTarget!=t)&&(i.bindFramebuffer(i.FRAMEBUFFER,t?t.framebuffer:null),this._oldRenderTarget=t),!this._forceStateUpdate&&this._oldViewport.equals(e)||(i.viewport(e.x,this.renderTargetHeightInPixels-e.y-e.height,e.width,e.height),this._oldViewport.set(e.x,e.y,e.width,e.height))}_updateBlendState(){if(this._forceStateUpdate||this._oldBlendOperations!=this._blendOperations){let e=this._gl,r=this._blendOperations,s=this._oldBlendOperations,n=15&r,h=r>>4;i(n in this._blendOperationMap),i(h in this._blendOperationMap),r==t.COPY_BLEND_OPERATIONS?e.disable(e.BLEND):((this._forceStateUpdate||s==t.COPY_BLEND_OPERATIONS)&&e.enable(e.BLEND),e.blendFunc(this._blendOperationMap[n],this._blendOperationMap[h])),this._oldBlendOperations=r}}_updateFormat(t){let e=this._gl,i=t.attributes,r=i.length;for(let s=0;s<r;s++){let r=i[s],n=r.type==h.AttributeType.BYTE;e.vertexAttribPointer(s,r.count,n?e.UNSIGNED_BYTE:e.FLOAT,n,t.stride,r.byteOffset)}for(;this._attributeCount<r;)e.enableVertexAttribArray(this._attributeCount),this._attributeCount++;for(;this._attributeCount>r;)this._attributeCount--,e.disableVertexAttribArray(this._attributeCount);this._attributeCount=r}getWebGLInfo(){const t=this.gl.getExtension("WEBGL_debug_renderer_info");return{renderer:t?this.gl.getParameter(t.UNMASKED_RENDERER_WEBGL):null,vendor:t?this.gl.getParameter(t.UNMASKED_VENDOR_WEBGL):null,version:this.gl.getParameter(this.gl.VERSION)}}static from(e){return i(null==e||e instanceof t),e}static _packBlendModes(t,e){return t|e<<4}}return t.COPY_BLEND_OPERATIONS=t._packBlendModes(h.BlendOperation.ONE,h.BlendOperation.ZERO),t})();t.Context=a;class _{constructor(t,e,i=0,r=null,s=!0){this._material=t,this._name=e,this._generation=i,this._location=r,this._isDirty=s}get location(){let t=a.from(this._material.context);if(this._generation!=t.generation&&(this._location=t.gl.getUniformLocation(this._material.program,this._name),this._generation=t.generation,!e)){let e=this._material.program,r=t.gl;for(let t=0,s=r.getProgramParameter(e,r.ACTIVE_UNIFORMS);t<s;t++){let s=r.getActiveUniform(e,t);if(s&&s.name==this._name)switch(i(1==s.size),s.type){case r.FLOAT:i(this instanceof o);break;case r.FLOAT_MAT3:i(this instanceof E);break;case r.FLOAT_VEC2:i(this instanceof u);break;case r.FLOAT_VEC3:i(this instanceof c);break;case r.FLOAT_VEC4:i(this instanceof d);break;case r.INT:i(this instanceof l);break;case r.SAMPLER_2D:i(this instanceof g);break;default:i(!1)}}}if(!this._location)throw new Error("Failed to get uniform location");return this._location}}class o extends _{constructor(){super(...arguments),this._x=0}set(t){t!=this._x&&(this._x=t,this._isDirty=!0)}prepare(){let t=a.from(this._material.context);(this._generation!=t.generation||this._isDirty)&&(t.gl.uniform1f(this.location,this._x),this._isDirty=!1)}}class l extends _{constructor(){super(...arguments),this._x=0}set(t){t!=this._x&&(this._x=t,this._isDirty=!0)}prepare(){let t=a.from(this._material.context);(this._generation!=t.generation||this._isDirty)&&(t.gl.uniform1i(this.location,this._x),this._isDirty=!1)}}class u extends _{constructor(){super(...arguments),this._x=0,this._y=0}set(t,e){t==this._x&&e==this._y||(this._x=t,this._y=e,this._isDirty=!0)}prepare(){let t=a.from(this._material.context);(this._generation!=t.generation||this._isDirty)&&(t.gl.uniform2f(this.location,this._x,this._y),this._isDirty=!1)}}class c extends _{constructor(){super(...arguments),this._x=0,this._y=0,this._z=0}set(t,e,i){t==this._x&&e==this._y&&i==this._z||(this._x=t,this._y=e,this._z=i,this._isDirty=!0)}prepare(){let t=a.from(this._material.context);(this._generation!=t.generation||this._isDirty)&&(t.gl.uniform3f(this.location,this._x,this._y,this._z),this._isDirty=!1)}}class d extends _{constructor(){super(...arguments),this._x=0,this._y=0,this._z=0,this._w=0}set(t,e,i,r){t==this._x&&e==this._y&&i==this._z&&r==this._w||(this._x=t,this._y=e,this._z=i,this._w=r,this._isDirty=!0)}prepare(){let t=a.from(this._material.context);(this._generation!=t.generation||this._isDirty)&&(t.gl.uniform4f(this.location,this._x,this._y,this._z,this._w),this._isDirty=!1)}}let E=(()=>{class t extends _{constructor(){super(...arguments),this._values=[1,0,0,0,1,0,0,0,1]}set(e,i,r,s,n,h,a,_,o){t._cachedValues[0]=e,t._cachedValues[1]=s,t._cachedValues[2]=a,t._cachedValues[3]=i,t._cachedValues[4]=n,t._cachedValues[5]=_,t._cachedValues[6]=r,t._cachedValues[7]=h,t._cachedValues[8]=o;for(let l=0;l<9;l++)if(t._cachedValues[l]!=this._values[l]){let e=this._values;this._values=t._cachedValues,t._cachedValues=e,this._isDirty=!0;break}}prepare(){let t=a.from(this._material.context);(this._generation!=t.generation||this._isDirty)&&(t.gl.uniformMatrix3fv(this.location,!1,this._values),this._isDirty=!1)}}return t._cachedValues=[1,0,0,0,1,0,0,0,1],t})();class g extends _{constructor(){super(...arguments),this._texture=null,this._index=-1}set(t,e){this._texture==t&&this._index==e||(this._texture=p.from(t),this._index=e,this._isDirty=!0)}prepare(){let t=a.from(this._material.context),e=t.gl;i(null==this._texture||null==t.currentRenderTarget||this._texture!=t.currentRenderTarget.texture),(this._generation!=t.generation||this._isDirty)&&(e.uniform1i(this.location,this._index),this._isDirty=!1),e.activeTexture(n(e,this._index)),e.bindTexture(e.TEXTURE_2D,null!=this._texture&&this._texture.width>0&&this._texture.height>0?this._texture.texture:null)}}class f{constructor(t,e,i,r,s={},n=[],h=0,a=null){this._context=t,this._format=e,this._vertexSource=i,this._fragmentSource=r,this._uniformsMap=s,this._uniformsList=n,this._generation=h,this._program=a}get context(){return this._context}get format(){return this._format}get vertexSource(){return this._vertexSource}get fragmentSource(){return this._fragmentSource}setUniformFloat(t,e){let r=this._uniformsMap[t]||null;null==r&&(r=new o(this,t),this._uniformsMap[t]=r,this._uniformsList.push(r)),i(r instanceof o),r.set(e)}setUniformInt(t,e){let r=this._uniformsMap[t]||null;null==r&&(r=new l(this,t),this._uniformsMap[t]=r,this._uniformsList.push(r)),i(r instanceof l),r.set(e)}setUniformVec2(t,e,r){let s=this._uniformsMap[t]||null;null==s&&(s=new u(this,t),this._uniformsMap[t]=s,this._uniformsList.push(s)),i(s instanceof u),s.set(e,r)}setUniformVec3(t,e,r,s){let n=this._uniformsMap[t]||null;null==n&&(n=new c(this,t),this._uniformsMap[t]=n,this._uniformsList.push(n)),i(n instanceof c),n.set(e,r,s)}setUniformVec4(t,e,r,s,n){let h=this._uniformsMap[t]||null;null==h&&(h=new d(this,t),this._uniformsMap[t]=h,this._uniformsList.push(h)),i(h instanceof d),h.set(e,r,s,n)}setUniformMat3(t,e,r,s,n,h,a,_,o,l){let u=this._uniformsMap[t]||null;null==u&&(u=new E(this,t),this._uniformsMap[t]=u,this._uniformsList.push(u)),i(u instanceof E),u.set(e,r,s,n,h,a,_,o,l)}setUniformSampler(t,e,r){let s=this._uniformsMap[t]||null;null==s&&(s=new g(this,t),this._uniformsMap[t]=s,this._uniformsList.push(s)),i(s instanceof g),s.set(e,r)}get program(){let t=this._context.gl;if(this._generation!=this._context.generation){this._program=t.createProgram(),this._compileShader(t,t.VERTEX_SHADER,this.vertexSource),this._compileShader(t,t.FRAGMENT_SHADER,this.fragmentSource);let r=this.format.attributes;for(let e=0;e<r.length;e++)t.bindAttribLocation(this._program,e,r[e].name);if(t.linkProgram(this._program),!t.getProgramParameter(this._program,t.LINK_STATUS))throw new Error(`${t.getProgramInfoLog(this._program)}`);if(this._generation=this._context.generation,!e)for(let e of r)for(let r=0,s=t.getProgramParameter(this.program,t.ACTIVE_ATTRIBUTES);r<s;r++){let s=t.getActiveAttrib(this.program,r);if(s&&s.name==e.name)switch(i(1==s.size),e.count){case 1:i(s.type==t.FLOAT);break;case 2:i(s.type==t.FLOAT_VEC2);break;case 3:i(s.type==t.FLOAT_VEC3);break;case 4:i(s.type==t.FLOAT_VEC4);break;default:i(!1)}}}return this._program}prepare(){this._context.gl.useProgram(this.program);for(let t of this._uniformsList)t.prepare()}_compileShader(t,e,i){let r=t.createShader(e);if(!r)throw new Error("Failed to create shader");if(t.shaderSource(r,i),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error(`${t.getShaderInfoLog(r)}`);if(!this._program)throw new Error("Tried to attach shader before program was created");t.attachShader(this._program,r)}static from(t){return i(null==t||t instanceof f),t}}let R=(()=>{class t extends h.VertexBuffer{constructor(e,i){super(),this._generation=0,this._buffer=null,this._bytes=null,this._isDirty=!0,this._dirtyMin=t.INT_MAX,this._dirtyMax=0,this._totalMin=t.INT_MAX,this._totalMax=0,this._byteCount=0,this._context=e,this._byteCount=i,this._bytes=new Uint8Array(i)}get context(){return this._context}get byteCount(){return this._byteCount}move(t,e,r){i(r>=0),i(0<=t&&t+r<=this._byteCount),i(0<=e&&e+r<=this._byteCount),this._bytes&&t!=e&&0!=r&&(this._bytes.set(this._bytes.subarray(t,this._byteCount),e),this._growDirtyRegion(Math.min(t,e),Math.max(t,e)+r))}upload(t,e=0){i(0<=e&&e+t.length<=this._byteCount),i(null!=this._bytes),this._bytes.set(t,e),this._growDirtyRegion(e,e+t.length)}free(){this._buffer&&this._context.gl.deleteBuffer(this._buffer),this._generation=0}prepare(){let e=this._context.gl;this._generation!==this._context.generation&&(this._buffer=e.createBuffer(),this._generation=this._context.generation,this._isDirty=!0),e.bindBuffer(e.ARRAY_BUFFER,this._buffer),this._isDirty&&(e.bufferData(e.ARRAY_BUFFER,this._byteCount,e.DYNAMIC_DRAW),this._dirtyMin=this._totalMin,this._dirtyMax=this._totalMax,this._isDirty=!1),this._dirtyMin<this._dirtyMax&&(e.bufferSubData(e.ARRAY_BUFFER,this._dirtyMin,this._bytes.subarray(this._dirtyMin,this._dirtyMax)),this._dirtyMin=t.INT_MAX,this._dirtyMax=0)}_growDirtyRegion(t,e){this._dirtyMin=Math.min(this._dirtyMin,t),this._dirtyMax=Math.max(this._dirtyMax,e),this._totalMin=Math.min(this._totalMin,t),this._totalMax=Math.max(this._totalMax,e)}static from(e){return i(null==e||e instanceof t),e}}return t.INT_MAX=2147483647,t})();class p{constructor(t,e,i,r,s=null,n=null,h=0,a=!0,_=!0){this._context=t,this._format=e,this._width=i,this._height=r,this._pixels=s,this._texture=n,this._generation=h,this._isFormatDirty=a,this._isContentDirty=_}get context(){return this._context}get format(){return this._format}get width(){return this._width}get height(){return this._height}resize(t,e,i=null){this._width=t,this._height=e,this._pixels=i,this._isContentDirty=!0}setFormat(t){this._format!=t&&(this._format=t,this._isFormatDirty=!0)}get texture(){let t=this._context.gl;return this._generation!=this._context.generation&&(this._texture=t.createTexture(),this._generation=this._context.generation,this._isFormatDirty=!0,this._isContentDirty=!0),this._isFormatDirty&&(t.bindTexture(t.TEXTURE_2D,this._texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.format.magFilter==h.PixelFilter.NEAREST?t.NEAREST:t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.format.minFilter==h.PixelFilter.NEAREST?t.NEAREST:t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.format.wrap==h.PixelWrap.REPEAT?t.REPEAT:t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.format.wrap==h.PixelWrap.REPEAT?t.REPEAT:t.CLAMP_TO_EDGE),this._isFormatDirty=!1),this._isContentDirty&&(t.bindTexture(t.TEXTURE_2D,this._texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this._width,this._height,0,t.RGBA,t.UNSIGNED_BYTE,this._pixels),this._isContentDirty=!1),this._texture}free(){this.texture&&(this._context.gl.deleteTexture(this.texture),this._generation=0)}static from(t){return i(null==t||t instanceof p),t}}class A{constructor(t,e,i=null,r=0,s=!0,n=new h.Rect){this._context=t,this._texture=e,this._framebuffer=i,this._generation=r,this._isDirty=s,this._viewport=n}get context(){return this._context}get texture(){return this._texture}get viewport(){return this._viewport}setColor(t){this._texture!=t&&(this._texture=p.from(t),this._isDirty=!0)}get framebuffer(){let t=this._context.gl,e=this._texture.texture;return this._generation!=this._context.generation&&(this._framebuffer=t.createFramebuffer(),this._generation=this._context.generation,this._isDirty=!0),this._isDirty&&(t.bindFramebuffer(t.FRAMEBUFFER,this._framebuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),i(t.checkFramebufferStatus(t.FRAMEBUFFER)==t.FRAMEBUFFER_COMPLETE),this._isDirty=!1),this._framebuffer}free(){this._framebuffer&&(this._context.gl.deleteFramebuffer(this._framebuffer),this._generation=0)}static from(t){return i(null==t||t instanceof A),t}}}(a||(exports.WebGL=a={}));
101
+ },{"process":"pBGv"}],"MMP6":[function(require,module,exports) {
102
+ "use strict";function e(e,t,r){let{m00:n,m01:o,m02:s,m10:i,m11:f,m12:m}=r;e.setUniformMat3(t,n,o,s,i,f,m,0,0,1)}function t(e,t,r){e.setUniformVec2(t,r.x,r.y)}function r(e,t,r){e.setRenderTarget(t),e.setViewport(0,0,t.texture.width,t.texture.height),r(),e.setRenderTarget(null)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.setUniformAffineTransform=e,exports.setUniformVec2=t,exports.renderInto=r;
103
+ },{}],"UGJH":[function(require,module,exports) {
104
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RectangleBatchRenderer=exports.RectangleBatch=void 0;var e=require("../lib/math"),t=require("./graphics"),r=require("./utils");const i=new t.Graphics.VertexFormat;i.add("configSpacePos",t.Graphics.AttributeType.FLOAT,2),i.add("color",t.Graphics.AttributeType.FLOAT,3);const s="\n uniform mat3 configSpaceToNDC;\n\n attribute vec2 configSpacePos;\n attribute vec3 color;\n varying vec3 vColor;\n\n void main() {\n vColor = color;\n vec2 position = (configSpaceToNDC * vec3(configSpacePos, 1)).xy;\n gl_Position = vec4(position, 1, 1);\n }\n",n="\n precision mediump float;\n varying vec3 vColor;\n\n void main() {\n gl_FragColor = vec4(vColor.rgb, 1);\n }\n";class o{constructor(e){this.gl=e,this.rects=[],this.colors=[],this.buffer=null}getRectCount(){return this.rects.length}getBuffer(){if(this.buffer)return this.buffer;const e=[[0,0],[1,0],[0,1],[1,0],[0,1],[1,1]],t=new Uint8Array(i.stride*e.length*this.rects.length),r=new Float32Array(t.buffer);let s=0;for(let i=0;i<this.rects.length;i++){const t=this.rects[i],n=this.colors[i];for(let i of e)r[s++]=t.origin.x+i[0]*t.size.x,r[s++]=t.origin.y+i[1]*t.size.y,r[s++]=n.r,r[s++]=n.g,r[s++]=n.b}if(s!==r.length)throw new Error("Buffer expected to be full but wasn't");return this.buffer=this.gl.createVertexBuffer(t.length),this.buffer.upload(t),this.buffer}addRect(e,t){this.rects.push(e),this.colors.push(t),this.buffer&&(this.buffer.free(),this.buffer=null)}free(){this.buffer&&(this.buffer.free(),this.buffer=null)}}exports.RectangleBatch=o;class c{constructor(e){this.gl=e,this.material=e.createMaterial(i,s,n)}render(i){(0,r.setUniformAffineTransform)(this.material,"configSpaceToNDC",(()=>{const t=e.AffineTransform.betweenRects(i.configSpaceSrcRect,i.physicalSpaceDstRect),r=new e.Vec2(this.gl.viewport.width,this.gl.viewport.height);return e.AffineTransform.withTranslation(new e.Vec2(-1,1)).times(e.AffineTransform.withScale(new e.Vec2(2,-2).dividedByPointwise(r))).times(t)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLES,this.material,i.batch.getBuffer())}}exports.RectangleBatchRenderer=c;
105
+ },{"../lib/math":"tDuZ","./graphics":"XGYN","./utils":"MMP6"}],"cFC1":[function(require,module,exports) {
106
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RowAtlas=void 0;var e=require("../lib/lru-cache"),t=require("./rectangle-batch-renderer"),r=require("../lib/math"),i=require("../lib/color"),c=require("./graphics"),h=require("./utils");class a{constructor(h,a,s){this.gl=h,this.rectangleBatchRenderer=a,this.textureRenderer=s,this.texture=h.createTexture(c.Graphics.TextureFormat.NEAREST_CLAMP,4096,4096),this.renderTarget=h.createRenderTarget(this.texture),this.rowCache=new e.LRUCache(this.texture.height),this.clearLineBatch=new t.RectangleBatch(h),this.clearLineBatch.addRect(r.Rect.unit,new i.Color(0,0,0,0)),h.addContextResetHandler(()=>{this.rowCache.clear()})}has(e){return this.rowCache.has(e)}getResolution(){return this.texture.width}getCapacity(){return this.texture.height}allocateLine(e){if(this.rowCache.getSize()<this.rowCache.getCapacity()){const t=this.rowCache.getSize();return this.rowCache.insert(e,t),t}{const[,t]=this.rowCache.removeLRU();return this.rowCache.insert(e,t),t}}writeToAtlasIfNeeded(e,t){(0,h.renderInto)(this.gl,this.renderTarget,()=>{for(let i of e){let e=this.rowCache.get(i);if(null!=e)continue;e=this.allocateLine(i);const c=new r.Rect(new r.Vec2(0,e),new r.Vec2(this.texture.width,1));this.rectangleBatchRenderer.render({batch:this.clearLineBatch,configSpaceSrcRect:r.Rect.unit,physicalSpaceDstRect:c}),t(c,i)}})}renderViaAtlas(e,t){let i=this.rowCache.get(e);if(null==i)return!1;const c=new r.Rect(new r.Vec2(0,i),new r.Vec2(this.texture.width,1));return this.textureRenderer.render({texture:this.texture,srcRect:c,dstRect:t}),!0}}exports.RowAtlas=a;
107
+ },{"../lib/lru-cache":"EhY8","./rectangle-batch-renderer":"UGJH","../lib/math":"tDuZ","../lib/color":"x77Y","./graphics":"XGYN","./utils":"MMP6"}],"p3j0":[function(require,module,exports) {
108
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextureRenderer=void 0;var e=require("../lib/math"),t=require("./graphics"),r=require("./utils");const n="\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n",i="\n precision mediump float;\n\n varying vec2 vUv;\n uniform sampler2D texture;\n\n void main() {\n gl_FragColor = texture2D(texture, vUv);\n }\n";class s{constructor(e){this.gl=e;const r=new t.Graphics.VertexFormat;r.add("position",t.Graphics.AttributeType.FLOAT,2),r.add("uv",t.Graphics.AttributeType.FLOAT,2);const s=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],o=[];for(let t of s)o.push(t.pos[0]),o.push(t.pos[1]),o.push(t.uv[0]),o.push(t.uv[1]);this.buffer=e.createVertexBuffer(r.stride*s.length),this.buffer.upload(new Uint8Array(new Float32Array(o).buffer)),this.material=e.createMaterial(r,n,i)}render(n){this.material.setUniformSampler("texture",n.texture,0),(0,r.setUniformAffineTransform)(this.material,"uvTransform",(()=>{const{srcRect:t,texture:r}=n,i=e.AffineTransform.withTranslation(new e.Vec2(0,1)).times(e.AffineTransform.withScale(new e.Vec2(1,-1))).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,new e.Vec2(r.width,r.height)),e.Rect.unit)).transformRect(t);return e.AffineTransform.betweenRects(e.Rect.unit,i)})()),(0,r.setUniformAffineTransform)(this.material,"positionTransform",(()=>{const{dstRect:t}=n,{viewport:r}=this.gl,i=new e.Vec2(r.width,r.height),s=e.AffineTransform.withScale(new e.Vec2(1,-1)).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,i),e.Rect.NDC)).transformRect(t);return e.AffineTransform.betweenRects(e.Rect.NDC,s)})()),this.gl.setUnpremultipliedBlendState(),this.gl.draw(t.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.TextureRenderer=s;
109
+ },{"../lib/math":"tDuZ","./graphics":"XGYN","./utils":"MMP6"}],"tdKg":[function(require,module,exports) {
110
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ViewportRectangleRenderer=void 0;var e=require("../lib/color"),i=require("./graphics"),r=require("./utils");const o=new i.Graphics.VertexFormat;o.add("position",i.Graphics.AttributeType.FLOAT,2);const n="\n attribute vec2 position;\n\n void main() {\n gl_Position = vec4(position, 0, 1);\n }\n",t=i=>{const{r:r,g:o,b:n}=e.Color.fromCSSHex(i.fgSecondaryColor),t=`${r.toFixed(1)}, ${o.toFixed(1)}, ${n.toFixed(1)}`;return`\n precision mediump float;\n\n uniform mat3 configSpaceToPhysicalViewSpace;\n uniform vec2 physicalSize;\n uniform vec2 physicalOrigin;\n uniform vec2 configSpaceViewportOrigin;\n uniform vec2 configSpaceViewportSize;\n uniform float framebufferHeight;\n\n void main() {\n vec2 origin = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportOrigin, 1.0)).xy;\n vec2 size = (configSpaceToPhysicalViewSpace * vec3(configSpaceViewportSize, 0.0)).xy;\n\n vec2 halfSize = physicalSize / 2.0;\n\n float borderWidth = 2.0;\n\n origin = floor(origin * halfSize) / halfSize + borderWidth * vec2(1.0, 1.0);\n size = floor(size * halfSize) / halfSize - 2.0 * borderWidth * vec2(1.0, 1.0);\n\n vec2 coord = gl_FragCoord.xy;\n coord.x = coord.x - physicalOrigin.x;\n coord.y = framebufferHeight - coord.y - physicalOrigin.y;\n vec2 clamped = clamp(coord, origin, origin + size);\n vec2 gap = clamped - coord;\n float maxdist = max(abs(gap.x), abs(gap.y));\n\n // TOOD(jlfwong): Could probably optimize this to use mix somehow.\n if (maxdist == 0.0) {\n // Inside viewport rectangle\n gl_FragColor = vec4(0, 0, 0, 0);\n } else if (maxdist < borderWidth) {\n // Inside viewport rectangle at border\n gl_FragColor = vec4(${t}, 0.8);\n } else {\n // Outside viewport rectangle\n gl_FragColor = vec4(${t}, 0.5);\n }\n }\n `};class a{constructor(e,i){this.gl=e;const r=[[-1,1],[1,1],[-1,-1],[1,-1]],a=[];for(let o of r)a.push(o[0]),a.push(o[1]);this.buffer=e.createVertexBuffer(o.stride*r.length),this.buffer.upload(new Uint8Array(new Float32Array(a).buffer)),this.material=e.createMaterial(o,n,t(i))}render(e){(0,r.setUniformAffineTransform)(this.material,"configSpaceToPhysicalViewSpace",e.configSpaceToPhysicalViewSpace),(0,r.setUniformVec2)(this.material,"configSpaceViewportOrigin",e.configSpaceViewportRect.origin),(0,r.setUniformVec2)(this.material,"configSpaceViewportSize",e.configSpaceViewportRect.size);const o=this.gl.viewport;this.material.setUniformVec2("physicalOrigin",o.x,o.y),this.material.setUniformVec2("physicalSize",o.width,o.height),this.material.setUniformFloat("framebufferHeight",this.gl.renderTargetHeightInPixels),this.gl.setBlendState(i.Graphics.BlendOperation.SOURCE_ALPHA,i.Graphics.BlendOperation.INVERSE_SOURCE_ALPHA),this.gl.draw(i.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.ViewportRectangleRenderer=a;
111
+ },{"../lib/color":"x77Y","./graphics":"XGYN","./utils":"MMP6"}],"Q0ad":[function(require,module,exports) {
112
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartColorPassRenderer=void 0;var e=require("../lib/math"),r=require("./graphics"),n=require("./utils");const t=new r.Graphics.VertexFormat;t.add("position",r.Graphics.AttributeType.FLOAT,2),t.add("uv",r.Graphics.AttributeType.FLOAT,2);const i="\n uniform mat3 uvTransform;\n uniform mat3 positionTransform;\n\n attribute vec2 position;\n attribute vec2 uv;\n varying vec2 vUv;\n\n void main() {\n vUv = (uvTransform * vec3(uv, 1)).xy;\n gl_Position = vec4((positionTransform * vec3(position, 1)).xy, 0, 1);\n }\n",o=e=>`\n precision mediump float;\n\n uniform vec2 uvSpacePixelSize;\n uniform float renderOutlines;\n\n varying vec2 vUv;\n uniform sampler2D colorTexture;\n\n // https://en.wikipedia.org/wiki/HSL_and_HSV#From_luma/chroma/hue\n vec3 hcl2rgb(float H, float C, float L) {\n float hPrime = H / 60.0;\n float X = C * (1.0 - abs(mod(hPrime, 2.0) - 1.0));\n vec3 RGB =\n hPrime < 1.0 ? vec3(C, X, 0) :\n hPrime < 2.0 ? vec3(X, C, 0) :\n hPrime < 3.0 ? vec3(0, C, X) :\n hPrime < 4.0 ? vec3(0, X, C) :\n hPrime < 5.0 ? vec3(X, 0, C) :\n vec3(C, 0, X);\n\n float m = L - dot(RGB, vec3(0.30, 0.59, 0.11));\n return RGB + vec3(m, m, m);\n }\n\n float triangle(float x) {\n return 2.0 * abs(fract(x) - 0.5) - 1.0;\n }\n\n ${e}\n\n void main() {\n vec4 here = texture2D(colorTexture, vUv);\n\n if (here.z == 0.0) {\n // Background color\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n\n // Sample the 4 surrounding pixels in the depth texture to determine\n // if we should draw a boundary here or not.\n vec4 N = texture2D(colorTexture, vUv + vec2(0, uvSpacePixelSize.y));\n vec4 E = texture2D(colorTexture, vUv + vec2(uvSpacePixelSize.x, 0));\n vec4 S = texture2D(colorTexture, vUv + vec2(0, -uvSpacePixelSize.y));\n vec4 W = texture2D(colorTexture, vUv + vec2(-uvSpacePixelSize.x, 0));\n\n // NOTE: For outline checks, we intentionally check both the right\n // and the left to determine if we're an edge. If a rectangle is a single\n // pixel wide, we don't want to render it as an outline, so this method\n // of checking ensures that we don't outline single physical-space\n // pixel width rectangles.\n if (\n renderOutlines > 0.0 &&\n (\n here.y == N.y && here.y != S.y || // Top edge\n here.y == S.y && here.y != N.y || // Bottom edge\n here.x == E.x && here.x != W.x || // Left edge\n here.x == W.x && here.x != E.x\n )\n ) {\n // We're on an edge! Draw transparent.\n gl_FragColor = vec4(0, 0, 0, 0);\n } else {\n // Not on an edge. Draw the appropriate color.\n gl_FragColor = vec4(colorForBucket(here.z), here.a);\n }\n }\n`;class a{constructor(e,r){this.gl=e;const n=[{pos:[-1,1],uv:[0,1]},{pos:[1,1],uv:[1,1]},{pos:[-1,-1],uv:[0,0]},{pos:[1,-1],uv:[1,0]}],a=[];for(let t of n)a.push(t.pos[0]),a.push(t.pos[1]),a.push(t.uv[0]),a.push(t.uv[1]);this.buffer=e.createVertexBuffer(t.stride*n.length),this.buffer.uploadFloats(a),this.material=e.createMaterial(t,i,o(r.colorForBucketGLSL))}render(t){const{srcRect:i,rectInfoTexture:o}=t,a=e.AffineTransform.withTranslation(new e.Vec2(0,1)).times(e.AffineTransform.withScale(new e.Vec2(1,-1))).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,new e.Vec2(o.width,o.height)),e.Rect.unit)).transformRect(i),s=e.AffineTransform.betweenRects(e.Rect.unit,a),{dstRect:c}=t,l=new e.Vec2(this.gl.viewport.width,this.gl.viewport.height),u=e.AffineTransform.withScale(new e.Vec2(1,-1)).times(e.AffineTransform.betweenRects(new e.Rect(e.Vec2.zero,l),e.Rect.NDC)).transformRect(c),h=e.AffineTransform.betweenRects(e.Rect.NDC,u),f=e.Vec2.unit.dividedByPointwise(new e.Vec2(t.rectInfoTexture.width,t.rectInfoTexture.height));this.material.setUniformSampler("colorTexture",t.rectInfoTexture,0),(0,n.setUniformAffineTransform)(this.material,"uvTransform",s),this.material.setUniformFloat("renderOutlines",t.renderOutlines?1:0),this.material.setUniformVec2("uvSpacePixelSize",f.x,f.y),(0,n.setUniformAffineTransform)(this.material,"positionTransform",h),this.gl.setUnpremultipliedBlendState(),this.gl.draw(r.Graphics.Primitive.TRIANGLE_STRIP,this.material,this.buffer)}}exports.FlamechartColorPassRenderer=a;
113
+ },{"../lib/math":"tDuZ","./graphics":"XGYN","./utils":"MMP6"}],"KwET":[function(require,module,exports) {
114
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CanvasContext=void 0;var e=require("./graphics"),r=require("./rectangle-batch-renderer"),t=require("./texture-renderer"),i=require("../lib/math"),n=require("./overlay-rectangle-renderer"),s=require("./flamechart-color-pass-renderer"),o=require("../lib/color");class a{constructor(i,a){this.animationFrameRequest=null,this.beforeFrameHandlers=new Set,this.onBeforeFrame=(()=>{this.animationFrameRequest=null,this.gl.setViewport(0,0,this.gl.renderTargetWidthInPixels,this.gl.renderTargetHeightInPixels);const r=o.Color.fromCSSHex(this.theme.bgPrimaryColor);this.gl.clear(new e.Graphics.Color(r.r,r.g,r.b,r.a));for(const e of this.beforeFrameHandlers)e()}),this.gl=new e.WebGL.Context(i),this.rectangleBatchRenderer=new r.RectangleBatchRenderer(this.gl),this.textureRenderer=new t.TextureRenderer(this.gl),this.viewportRectangleRenderer=new n.ViewportRectangleRenderer(this.gl,a),this.flamechartColorPassRenderer=new s.FlamechartColorPassRenderer(this.gl,a),this.theme=a,this.gl.addAfterResizeEventHandler(this.onBeforeFrame);const l=this.gl.getWebGLInfo();l&&console.log(`WebGL initialized. renderer: ${l.renderer}, vendor: ${l.vendor}, version: ${l.version}`),window.testContextLoss=(()=>{this.gl.testContextLoss()})}addBeforeFrameHandler(e){this.beforeFrameHandlers.add(e)}removeBeforeFrameHandler(e){this.beforeFrameHandlers.delete(e)}requestFrame(){this.animationFrameRequest||(this.animationFrameRequest=requestAnimationFrame(this.onBeforeFrame))}setViewport(e,r){const{origin:t,size:i}=e;let n=this.gl.viewport;this.gl.setViewport(t.x,t.y,i.x,i.y),r();let{x:s,y:o,width:a,height:l}=n;this.gl.setViewport(s,o,a,l)}renderBehind(e,r){const t=e.getBoundingClientRect(),n=new i.Rect(new i.Vec2(t.left*window.devicePixelRatio,t.top*window.devicePixelRatio),new i.Vec2(t.width*window.devicePixelRatio,t.height*window.devicePixelRatio));this.setViewport(n,r)}}exports.CanvasContext=a;
115
+ },{"./graphics":"XGYN","./rectangle-batch-renderer":"UGJH","./texture-renderer":"p3j0","../lib/math":"tDuZ","./overlay-rectangle-renderer":"tdKg","./flamechart-color-pass-renderer":"Q0ad","../lib/color":"x77Y"}],"hEOZ":[function(require,module,exports) {
116
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFrameToColorBucket=exports.getProfileToView=exports.getRowAtlas=exports.getCanvasContext=exports.createGetCSSColorForFrame=exports.createGetColorBucketForFrame=void 0;var e=require("../lib/utils"),t=require("../gl/row-atlas"),o=require("../gl/canvas-context");const r=(0,e.memoizeByReference)(e=>t=>e.get(t.key)||0);exports.createGetColorBucketForFrame=r;const n=(0,e.memoizeByShallowEquality)(({theme:e,frameToColorBucket:t})=>{const o=r(t);return t=>{const r=o(t)/255;return e.colorForBucket(r).toCSS()}});exports.createGetCSSColorForFrame=n;const a=(0,e.memoizeByShallowEquality)(({theme:e,canvas:t})=>new o.CanvasContext(t,e));exports.getCanvasContext=a;const s=(0,e.memoizeByReference)(e=>new t.RowAtlas(e.gl,e.rectangleBatchRenderer,e.textureRenderer));exports.getRowAtlas=s;const l=(0,e.memoizeByShallowEquality)(({profile:e,flattenRecursion:t})=>t?e.getProfileWithRecursionFlattened():e);exports.getProfileToView=l;const c=(0,e.memoizeByReference)(e=>{const t=[];function o(e){return(e.file||"")+e.name}e.forEachFrame(e=>t.push(e)),t.sort(function(e,t){return o(e)>o(t)?1:-1});const r=new Map;for(let n=0;n<t.length;n++)r.set(t[n].key,Math.floor(255*n/t.length));return r});exports.getFrameToColorBucket=c;
117
+ },{"../lib/utils":"ucYa","../gl/row-atlas":"cFC1","../gl/canvas-context":"KwET"}],"Erwv":[function(require,module,exports) {
118
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Provider=o,exports.useDispatch=s,exports.useActionCreator=u,exports.useSelector=c;var e=require("preact"),t=require("preact/hooks");const r=(0,e.createContext)(null);function o(t){return(0,e.h)(r.Provider,{value:t.store,children:t.children})}function n(){const e=(0,t.useContext)(r);if(null==e)throw new Error("Called useStore when no store exists in context");return e}function s(){return n().dispatch}function u(e,r){const o=s(),n=(0,t.useCallback)(e,r);return(0,t.useCallback)(e=>o(n(e)),[o,n])}function c(e,r){const o=n(),s=(0,t.useCallback)(e,r),u=(0,t.useCallback)(()=>s(o.getState()),[o,s]),[c,a]=(0,t.useState)(u);return(0,t.useLayoutEffect)(()=>(a(u()),o.subscribe(()=>{a(u())})),[o,u]),c}
119
+ },{"preact":"aSor","preact/hooks":"MwGB"}],"AQ6k":[function(require,module,exports) {
120
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={version:!0,Children:!0,render:!0,hydrate:!0,unmountComponentAtNode:!0,createPortal:!0,createFactory:!0,cloneElement:!0,isValidElement:!0,findDOMNode:!0,PureComponent:!0,memo:!0,forwardRef:!0,unstable_batchedUpdates:!0,Suspense:!0,SuspenseList:!0,lazy:!0,createElement:!0,createContext:!0,createRef:!0,Fragment:!0,Component:!0};exports.render=E,exports.hydrate=k,exports.unmountComponentAtNode=j,exports.createPortal=C,exports.createFactory=A,exports.cloneElement=U,exports.isValidElement=S,exports.findDOMNode=F,exports.memo=i,exports.forwardRef=l,exports.Suspense=d,exports.SuspenseList=v,exports.lazy=m,Object.defineProperty(exports,"createElement",{enumerable:!0,get:function(){return n.createElement}}),Object.defineProperty(exports,"createContext",{enumerable:!0,get:function(){return n.createContext}}),Object.defineProperty(exports,"createRef",{enumerable:!0,get:function(){return n.createRef}}),Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return n.Component}}),exports.unstable_batchedUpdates=exports.PureComponent=exports.Children=exports.version=exports.default=void 0;var t=require("preact/hooks");Object.keys(t).forEach(function(n){"default"!==n&&"__esModule"!==n&&(Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(exports,n,{enumerable:!0,get:function(){return t[n]}}))});var n=require("preact");function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}var u=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return o(this.props,e)||o(this.state,t)},r}(n.Component);function i(e,t){function u(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:o(this.props,e)}function i(t){return this.shouldComponentUpdate=u,(0,n.createElement)(e,r({},t))}return i.prototype.isReactComponent=!0,i.displayName="Memo("+(e.displayName||e.name)+")",i.t=!0,i}exports.PureComponent=u;var a=n.options.__b;function l(e){function t(t){var n=r({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}n.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),a&&a(e)};var c=function(e,t){return e?(0,n.toChildArray)(e).reduce(function(e,n,r){return e.concat(t(n,r))},[]):null},p={map:c,forEach:c,count:function(e){return e?(0,n.toChildArray)(e).length:0},only:function(e){if(1!==(e=(0,n.toChildArray)(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:n.toChildArray},s=n.options.__e;function f(e){return e&&((e=r({},e)).__c=null,e.__k=e.__k&&e.__k.map(f)),e}function d(){this.__u=0,this.o=null,this.__b=null}function _(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function m(e){var t,r,o;function u(u){if(t||(t=e()).then(function(e){r=e.default||e},function(e){o=e}),o)throw o;if(!r)throw t;return(0,n.createElement)(r,u)}return u.displayName="Lazy",u.t=!0,u}function v(){this.i=null,this.l=null}exports.Children=p,n.options.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(e,t.__c);s(e,t,n)},(d.prototype=new n.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=_(n.__v),o=!1,u=function(){o||(o=!0,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){u(),t.__c&&t.__c()};var i=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(u,u)},d.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=f(this.__b),this.__b=null),[(0,n.createElement)(n.Component,null,t.u?null:e.children),t.u&&e.fallback]};var h=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(v.prototype=new n.Component).u=function(e){var t=this,n=_(t.__v),r=t.l.get(e);return r[0]++,function(o){var u=function(){t.props.revealOrder?(r.push(o),h(t,e,r)):o()};n?n(u):u()}},v.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,n.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},v.prototype.componentDidUpdate=v.prototype.componentDidMount=function(){var e=this;e.l.forEach(function(t,n){h(e,n,t)})};var y=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function b(e){var t=this,r=e.container,o=(0,n.createElement)(y,{context:t.context},e.vnode);return t.s&&t.s!==r&&(t.v.parentNode&&t.s.removeChild(t.v),(0,n._unmount)(t.h),t.p=!1),e.vnode?t.p?(r.__k=t.__k,(0,n.render)(o,r),t.__k=r.__k):(t.v=document.createTextNode(""),(0,n.hydrate)("",r),r.appendChild(t.v),t.p=!0,t.s=r,(0,n.render)(o,r,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),(0,n._unmount)(t.h)),t.h=o,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),(0,n._unmount)(t.h)},null}function C(e,t){return(0,n.createElement)(b,{vnode:e,container:t})}var x=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;n.Component.prototype.isReactComponent={};var g="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function E(e,t,r){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return(0,n.render)(e,t),"function"==typeof r&&r(),e?e.__c:null}function k(e,t,r){return(0,n.hydrate)(e,t),"function"==typeof r&&r(),e?e.__c:null}var P=n.options.event;function N(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}n.options.event=function(e){P&&(e=P(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var o=e.preventDefault;return e.preventDefault=function(){o.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var O={configurable:!0,get:function(){return this.class}},R=n.options.vnode;n.options.vnode=function(e){e.$$typeof=g;var t=e.type,r=e.props;if(t){if(r.class!=r.className&&(O.enumerable="className"in r,null!=r.className&&(r.class=r.className),Object.defineProperty(r,"className",O)),"function"!=typeof t){var o,u,i;for(i in r.defaultValue&&void 0!==r.value&&(r.value||0===r.value||(r.value=r.defaultValue),delete r.defaultValue),Array.isArray(r.value)&&r.multiple&&"select"===t&&((0,n.toChildArray)(r.children).forEach(function(e){-1!=r.value.indexOf(e.props.value)&&(e.props.selected=!0)}),delete r.value),r)if(o=x.test(i))break;if(o)for(i in u=e.props={},r)u[x.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=r[i]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var o={};for(var u in r)/^on(Ani|Tra|Tou)/.test(u)&&(r[u.toLowerCase()]=r[u],delete r[u]),o[u.toLowerCase()]=u;if(o.ondoubleclick&&(r.ondblclick=r[o.ondoubleclick],delete r[o.ondoubleclick]),o.onbeforeinput&&(r.onbeforeinput=r[o.onbeforeinput],delete r[o.onbeforeinput]),o.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var i=o.oninput||"oninput";r[i]||(r[i]=r[o.onchange],delete r[o.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(N(t.prototype,"componentWillMount"),N(t.prototype,"componentWillReceiveProps"),N(t.prototype,"componentWillUpdate"),t.m=!0)}R&&R(e)};var w="16.8.0";function A(e){return n.createElement.bind(null,e)}function S(e){return!!e&&e.$$typeof===g}function U(e){return S(e)?n.cloneElement.apply(null,arguments):e}function j(e){return!!e.__k&&((0,n.render)(null,e),!0)}function F(e){return e&&(e.base||1===e.nodeType&&e)||null}exports.version=w;var L=function(e,t){return e(t)};exports.unstable_batchedUpdates=L;var M={useState:t.useState,useReducer:t.useReducer,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:"16.8.0",Children:p,render:E,hydrate:E,unmountComponentAtNode:j,createPortal:C,createElement:n.createElement,createContext:n.createContext,createFactory:A,cloneElement:U,createRef:n.createRef,Fragment:n.Fragment,isValidElement:S,findDOMNode:F,Component:n.Component,PureComponent:u,memo:i,forwardRef:l,unstable_batchedUpdates:L,Suspense:d,SuspenseList:v,lazy:m};exports.default=M;
121
+ },{"preact/hooks":"MwGB","preact":"aSor"}],"gFMr":[function(require,module,exports) {
122
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Flamechart=void 0;var t=require("./utils"),e=require("./math");class i{constructor(e){this.source=e,this.layers=[],this.totalWeight=0,this.minFrameWidth=1;const i=[];this.minFrameWidth=1/0;this.totalWeight=e.getTotalWeight(),e.forEachCall((e,r)=>{const s=(0,t.lastOf)(i),h={node:e,parent:s,children:[],start:r,end:r};s&&s.children.push(h),i.push(h)},(t,e)=>{console.assert(i.length>0);const r=i.pop();if(r.end=e,r.end-r.start==0)return;const s=i.length;for(;this.layers.length<=s;)this.layers.push([]);this.layers[s].push(r),this.minFrameWidth=Math.min(this.minFrameWidth,r.end-r.start)}),isFinite(this.minFrameWidth)||(this.minFrameWidth=1)}getTotalWeight(){return this.totalWeight}getLayers(){return this.layers}getColorBucketForFrame(t){return this.source.getColorBucketForFrame(t)}getMinFrameWidth(){return this.minFrameWidth}formatValue(t){return this.source.formatValue(t)}getClampedViewportWidth(t){const i=this.getTotalWeight(),r=Math.pow(2,40),s=(0,e.clamp)(3*this.getMinFrameWidth(),i/r,i);return(0,e.clamp)(t,s,i)}getClampedConfigSpaceViewportRect({configSpaceViewportRect:t,renderInverted:i}){const r=new e.Vec2(this.getTotalWeight(),this.getLayers().length),s=this.getClampedViewportWidth(t.size.x),h=t.size.withX(s),a=e.Vec2.clamp(t.origin,new e.Vec2(0,i?0:-1),e.Vec2.max(e.Vec2.zero,r.minus(h).plus(new e.Vec2(0,1))));return new e.Rect(a,t.size.withX(s))}}exports.Flamechart=i;
123
+ },{"./utils":"ucYa","./math":"tDuZ"}],"P80v":[function(require,module,exports) {
124
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartRenderer=exports.FlamechartRowAtlasKey=void 0;var e=require("./rectangle-batch-renderer"),t=require("../lib/math"),r=require("../lib/color"),n=require("../lib/utils"),s=require("./graphics"),o=require("./utils");const c=1e4;class i{constructor(e,t,r){this.batch=e,this.bounds=t,this.numPrecedingRectanglesInRow=r,this.children=[]}getBatch(){return this.batch}getBounds(){return this.bounds}getRectCount(){return this.batch.getRectCount()}getChildren(){return this.children}getParity(){return this.numPrecedingRectanglesInRow%2}forEachLeafNodeWithinBounds(e,t){this.bounds.hasIntersectionWith(e)&&t(this)}}class h{constructor(e){if(this.children=e,this.rectCount=0,0===e.length)throw new Error("Empty interior node");let r=1/0,n=-1/0,s=1/0,o=-1/0;for(let t of e){this.rectCount+=t.getRectCount();const e=t.getBounds();r=Math.min(r,e.left()),n=Math.max(n,e.right()),s=Math.min(s,e.top()),o=Math.max(o,e.bottom())}this.bounds=new t.Rect(new t.Vec2(r,s),new t.Vec2(n-r,o-s))}getBounds(){return this.bounds}getRectCount(){return this.rectCount}getChildren(){return this.children}forEachLeafNodeWithinBounds(e,t){if(this.bounds.hasIntersectionWith(e))for(let r of this.children)r.forEachLeafNodeWithinBounds(e,t)}}class a{constructor(e){this.stackDepth=e.stackDepth,this.zoomLevel=e.zoomLevel,this.index=e.index}get key(){return`${this.stackDepth}_${this.index}_${this.zoomLevel}`}static getOrInsert(e,t){return e.getOrInsert(new a(t))}}exports.FlamechartRowAtlasKey=a;class l{constructor(s,o,a,l,g,d={inverted:!1}){this.gl=s,this.rowAtlas=o,this.flamechart=a,this.rectangleBatchRenderer=l,this.colorPassRenderer=g,this.options=d,this.layers=[],this.rectInfoTexture=null,this.rectInfoRenderTarget=null,this.atlasKeys=new n.KeyedSet;const f=a.getLayers().length;for(let n=0;n<f;n++){const s=[],o=d.inverted?f-1-n:n;let l=1/0,g=-1/0,u=new e.RectangleBatch(this.gl),R=0;const w=a.getLayers()[n];for(let h=0;h<w.length;h++){const a=w[h];u.getRectCount()>=c&&(s.push(new i(u,new t.Rect(new t.Vec2(l,o),new t.Vec2(g-l,1)),R)),l=1/0,g=-1/0,u=new e.RectangleBatch(this.gl));const d=new t.Rect(new t.Vec2(a.start,o),new t.Vec2(a.end-a.start,1));l=Math.min(l,d.left()),g=Math.max(g,d.right());const f=new r.Color((1+h%255)/256,(1+n%255)/256,(1+this.flamechart.getColorBucketForFrame(a.node.frame))/256);u.addRect(d,f),R++}u.getRectCount()>0&&s.push(new i(u,new t.Rect(new t.Vec2(l,o),new t.Vec2(g-l,1)),R)),this.layers.push(new h(s))}}getRectInfoTexture(e,t){if(this.rectInfoTexture){const r=this.rectInfoTexture;r.width==e&&r.height==t||r.resize(e,t)}else this.rectInfoTexture=this.gl.createTexture(s.Graphics.TextureFormat.NEAREST_CLAMP,e,t);return this.rectInfoTexture}getRectInfoRenderTarget(e,t){const r=this.getRectInfoTexture(e,t);return this.rectInfoRenderTarget&&this.rectInfoRenderTarget.texture!=r&&(this.rectInfoRenderTarget.texture.free(),this.rectInfoRenderTarget.setColor(r)),this.rectInfoRenderTarget||(this.rectInfoRenderTarget=this.gl.createRenderTarget(r)),this.rectInfoRenderTarget}free(){this.rectInfoRenderTarget&&this.rectInfoRenderTarget.free(),this.rectInfoTexture&&this.rectInfoTexture.free()}configSpaceBoundsForKey(e){const{stackDepth:r,zoomLevel:n,index:s}=e,o=this.flamechart.getTotalWeight()/Math.pow(2,n),c=this.flamechart.getLayers().length,i=this.options.inverted?c-1-r:r;return new t.Rect(new t.Vec2(o*s,i),new t.Vec2(o,1))}render(e){const{configSpaceSrcRect:r,physicalSpaceDstRect:n}=e,c=[],i=t.AffineTransform.betweenRects(r,n);if(r.isEmpty())return;let h=0;for(;;){const e=a.getOrInsert(this.atlasKeys,{stackDepth:0,zoomLevel:h,index:0}),t=this.configSpaceBoundsForKey(e);if(i.transformRect(t).width()<this.rowAtlas.getResolution())break;h++}const l=Math.max(0,Math.floor(r.top())),g=Math.min(this.layers.length,Math.ceil(r.bottom())),d=this.flamechart.getTotalWeight(),f=Math.pow(2,h),u=Math.floor(f*r.left()/d),R=Math.ceil(f*r.right()/d),w=this.flamechart.getLayers().length;for(let t=l;t<g;t++)for(let e=u;e<=R;e++){const n=this.options.inverted?w-1-t:t,s=a.getOrInsert(this.atlasKeys,{stackDepth:n,zoomLevel:h,index:e});this.configSpaceBoundsForKey(s).hasIntersectionWith(r)&&c.push(s)}const p=this.rowAtlas.getCapacity(),m=c.slice(0,p),I=c.slice(p);this.rowAtlas.writeToAtlasIfNeeded(m,(e,t)=>{const r=this.configSpaceBoundsForKey(t);this.layers[t.stackDepth].forEachLeafNodeWithinBounds(r,t=>{this.rectangleBatchRenderer.render({batch:t.getBatch(),configSpaceSrcRect:r,physicalSpaceDstRect:e})})});const T=this.getRectInfoRenderTarget(n.width(),n.height());(0,o.renderInto)(this.gl,T,()=>{this.gl.clear(new s.Graphics.Color(0,0,0,0));const e=new t.Rect(t.Vec2.zero,new t.Vec2(this.gl.viewport.width,this.gl.viewport.height)),n=t.AffineTransform.betweenRects(r,e);for(let t of m){const e=this.configSpaceBoundsForKey(t);this.rowAtlas.renderViaAtlas(t,n.transformRect(e))}for(let t of I){const e=this.configSpaceBoundsForKey(t),r=n.transformRect(e);this.layers[t.stackDepth].forEachLeafNodeWithinBounds(e,t=>{this.rectangleBatchRenderer.render({batch:t.getBatch(),configSpaceSrcRect:e,physicalSpaceDstRect:r})})}});const x=this.getRectInfoTexture(n.width(),n.height());this.colorPassRenderer.render({rectInfoTexture:x,srcRect:new t.Rect(t.Vec2.zero,new t.Vec2(x.width,x.height)),dstRect:n,renderOutlines:e.renderOutlines})}}exports.FlamechartRenderer=l;
125
+ },{"./rectangle-batch-renderer":"UGJH","../lib/math":"tDuZ","../lib/color":"x77Y","../lib/utils":"ucYa","./graphics":"XGYN","./utils":"MMP6"}],"jZ6t":[function(require,module,exports) {
126
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFlamechartStyle=void 0;var e=require("aphrodite"),o=require("./style"),r=require("./themes/theme");const t=(0,r.withTheme)(r=>e.StyleSheet.create({hoverCount:{color:r.weightColor},fill:{width:"100%",height:"100%",position:"absolute",left:0,top:0},minimap:{height:o.Sizes.MINIMAP_HEIGHT,borderBottom:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${r.fgSecondaryColor}`},panZoomView:{flex:1},detailView:{display:"grid",height:o.Sizes.DETAIL_VIEW_HEIGHT,overflow:"hidden",gridTemplateColumns:"120px 120px 1fr",gridTemplateRows:"repeat(4, 1fr)",borderTop:`${o.Sizes.SEPARATOR_HEIGHT}px solid ${r.fgSecondaryColor}`,fontSize:o.FontSize.LABEL,position:"absolute",background:r.bgPrimaryColor,width:"100vw",bottom:0},stackTraceViewPadding:{padding:5},stackTraceView:{height:o.Sizes.DETAIL_VIEW_HEIGHT,lineHeight:`${o.FontSize.LABEL+2}px`,overflow:"auto","::-webkit-scrollbar":{background:r.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:r.fgSecondaryColor,borderRadius:20,border:`3px solid ${r.bgPrimaryColor}`,":hover":{background:r.fgPrimaryColor}}},stackLine:{whiteSpace:"nowrap"},stackFileLine:{color:r.fgSecondaryColor},statsTable:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:`repeat(3, ${o.FontSize.LABEL+10}px)`,gridGap:"1px 1px",textAlign:"center",paddingRight:1},statsTableHeader:{gridColumn:"1 / 3"},statsTableCell:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},thisInstanceCell:{background:r.selectionPrimaryColor,color:r.altFgPrimaryColor},allInstancesCell:{background:r.selectionSecondaryColor,color:r.altFgPrimaryColor},barDisplay:{position:"absolute",top:0,left:0,background:"rgba(0, 0, 0, 0.2)",width:"100%"}}));exports.getFlamechartStyle=t;
127
+ },{"aphrodite":"CxN7","./style":"hvr4","./themes/theme":"gzKG"}],"eeWS":[function(require,module,exports) {
128
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cachedMeasureTextWidth=i,exports.buildTrimmedText=s,exports.trimTextMid=h,exports.remapRangesToTrimmedText=o,exports.ELLIPSIS=void 0;var e=require("./utils");const t="…";exports.ELLIPSIS=t;const n=new Map;let r=-1;function i(e,t){return window.devicePixelRatio!==r&&(n.clear(),r=window.devicePixelRatio),n.has(t)||n.set(t,e.measureText(t).width),n.get(t)}function s(e,n){if(e.length<=n)return{trimmedString:e,trimmedLength:e.length,prefixLength:e.length,suffixLength:0,originalString:e,originalLength:e.length};let r=Math.floor(n/2);const i=n-r-1,s=e.substr(0,r),h=e.substr(e.length-i,i),g=s+t+h;return{trimmedString:g,trimmedLength:g.length,prefixLength:s.length,suffixLength:h.length,originalString:e,originalLength:e.length}}function h(t,n,r){if(i(t,n)<=r)return s(n,n.length);const[h]=(0,e.findValueBisect)(0,n.length,e=>i(t,s(n,e).trimmedString),r);return s(n,h)}var g;function a(e,t){return t<e.prefixLength?g.IN_PREFIX:t<e.originalLength-e.suffixLength?g.ELIDED:g.IN_SUFFIX}function o(e,t){const n=[],r=e.originalLength-e.trimmedLength;let i=!1;for(let[s,h]of t){let t=a(e,s),o=a(e,h-1);switch(t){case g.IN_PREFIX:switch(o){case g.IN_PREFIX:n.push([s,h]);break;case g.ELIDED:n.push([s,e.prefixLength+1]),i=!0;break;case g.IN_SUFFIX:n.push([s,h-r])}break;case g.ELIDED:switch(o){case g.IN_PREFIX:throw new Error("Unexpected highlight range starts in elided and ends in prefix");case g.ELIDED:i||(n.push([e.prefixLength,e.prefixLength+1]),i=!0);break;case g.IN_SUFFIX:i?n.push([e.trimmedLength-e.suffixLength,h-r]):(n.push([e.prefixLength,h-r]),i=!0)}break;case g.IN_SUFFIX:switch(o){case g.IN_PREFIX:throw new Error("Unexpected highlight range starts in suffix and ends in prefix");case g.ELIDED:throw new Error("Unexpected highlight range starts in suffix and ends in elided");case g.IN_SUFFIX:n.push([s-r,h-r])}}}return n}!function(e){e[e.IN_PREFIX=0]="IN_PREFIX",e[e.IN_SUFFIX=1]="IN_SUFFIX",e[e.ELIDED=2]="ELIDED"}(g||(g={}));
129
+ },{"./utils":"ucYa"}],"S7z0":[function(require,module,exports) {
130
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartMinimapView=void 0;var e,t=require("preact"),i=require("aphrodite"),o=require("../lib/math"),s=require("./flamechart-style"),n=require("./style"),r=require("../lib/text-utils"),a=require("../lib/color");!function(e){e[e.DRAW_NEW_VIEWPORT=0]="DRAW_NEW_VIEWPORT",e[e.TRANSLATE_VIEWPORT=1]="TRANSLATE_VIEWPORT"}(e||(e={}));class c extends t.Component{constructor(){super(...arguments),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.overlayCanvas=null,this.overlayCtx=null,this.onWindowResize=(()=>{this.onBeforeFrame()}),this.onBeforeFrame=(()=>{this.maybeClearInteractionLock(),this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays()}),this.renderCanvas=(()=>{this.props.canvasContext.requestFrame()}),this.frameHadWheelEvent=!1,this.framesWithoutWheelEvents=0,this.interactionLock=null,this.maybeClearInteractionLock=(()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1}),this.onWheel=(e=>{if(e.preventDefault(),this.frameHadWheelEvent=!0,(e.metaKey||e.ctrlKey)&&"pan"!==this.interactionLock){let t=1+e.deltaY/100;e.ctrlKey&&(t=1+e.deltaY/40),t=(0,o.clamp)(t,.1,10),this.zoom(t)}else"zoom"!==this.interactionLock&&this.pan(new o.Vec2(e.deltaX,e.deltaY));this.renderCanvas()}),this.dragStartConfigSpaceMouse=null,this.dragConfigSpaceViewportOffset=null,this.draggingMode=null,this.onMouseDown=(t=>{const i=this.configSpaceMouse(t);i&&(this.props.configSpaceViewportRect.contains(i)?(this.draggingMode=e.TRANSLATE_VIEWPORT,this.dragConfigSpaceViewportOffset=i.minus(this.props.configSpaceViewportRect.origin)):this.draggingMode=e.DRAW_NEW_VIEWPORT,this.dragStartConfigSpaceMouse=i,window.addEventListener("mousemove",this.onWindowMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.updateCursor(i))}),this.onWindowMouseMove=(t=>{if(!this.dragStartConfigSpaceMouse)return;let i=this.configSpaceMouse(t);if(i)if(this.updateCursor(i),i=new o.Rect(new o.Vec2(0,0),this.configSpaceSize()).closestPointTo(i),this.draggingMode===e.DRAW_NEW_VIEWPORT){const e=this.dragStartConfigSpaceMouse;let t=i;if(!e||!t)return;const s=Math.min(e.x,t.x),n=Math.max(e.x,t.x)-s,r=this.props.configSpaceViewportRect.height();this.props.setConfigSpaceViewportRect(new o.Rect(new o.Vec2(s,t.y-r/2),new o.Vec2(n,r)))}else if(this.draggingMode===e.TRANSLATE_VIEWPORT){if(!this.dragConfigSpaceViewportOffset)return;const e=i.minus(this.dragConfigSpaceViewportOffset);this.props.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withOrigin(e))}}),this.updateCursor=(t=>{this.draggingMode===e.TRANSLATE_VIEWPORT?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):this.draggingMode===e.DRAW_NEW_VIEWPORT?document.body.style.cursor="col-resize":this.props.configSpaceViewportRect.contains(t)?(document.body.style.cursor="grab",document.body.style.cursor="-webkit-grab"):document.body.style.cursor="col-resize"}),this.onMouseLeave=(()=>{null==this.draggingMode&&(document.body.style.cursor="default")}),this.onMouseMove=(e=>{const t=this.configSpaceMouse(e);t&&this.updateCursor(t)}),this.onWindowMouseUp=(e=>{this.draggingMode=null,window.removeEventListener("mousemove",this.onWindowMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp);const t=this.configSpaceMouse(e);t&&this.updateCursor(t)}),this.overlayCanvasRef=(e=>{e?(this.overlayCanvas=e,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)})}physicalViewSize(){return new o.Vec2(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}getStyle(){return(0,s.getFlamechartStyle)(this.props.theme)}minimapOrigin(){return new o.Vec2(0,n.Sizes.FRAME_HEIGHT*window.devicePixelRatio)}configSpaceSize(){return new o.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}configSpaceToPhysicalViewSpace(){const e=this.minimapOrigin();return o.AffineTransform.betweenRects(new o.Rect(new o.Vec2(0,0),this.configSpaceSize()),new o.Rect(e,this.physicalViewSize().minus(e)))}logicalToPhysicalViewSpace(){return o.AffineTransform.withScale(new o.Vec2(window.devicePixelRatio,window.devicePixelRatio))}windowToLogicalViewSpace(){if(!this.container)return new o.AffineTransform;const e=this.container.getBoundingClientRect();return o.AffineTransform.withTranslation(new o.Vec2(-e.left,-e.top))}renderRects(){this.container&&(this.physicalViewSize().x<2||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({configSpaceSrcRect:new o.Rect(new o.Vec2(0,0),this.configSpaceSize()),physicalSpaceDstRect:new o.Rect(this.minimapOrigin(),this.physicalViewSize().minus(this.minimapOrigin())),renderOutlines:!1}),this.props.canvasContext.viewportRectangleRenderer.render({configSpaceViewportRect:this.props.configSpaceViewportRect,configSpaceToPhysicalViewSpace:this.configSpaceToPhysicalViewSpace()})}))}renderOverlays(){const e=this.overlayCtx;if(!e)return;const t=this.physicalViewSize();e.clearRect(0,0,t.x,t.y);const i=this.configSpaceToPhysicalViewSpace(),s=this.configSpaceSize().x,c=(this.configSpaceToPhysicalViewSpace().inverted()||new o.AffineTransform).times(this.logicalToPhysicalViewSpace()).transformVector(new o.Vec2(200,1)).x,h=n.Sizes.FRAME_HEIGHT*window.devicePixelRatio,l=n.FontSize.LABEL*window.devicePixelRatio,p=(h-l)/2;e.font=`${l}px/${h}px ${n.FontFamily.MONOSPACE}`,e.textBaseline="top";let d=Math.pow(10,Math.floor(Math.log10(c)));c/d>5?d*=5:c/d>2&&(d*=2);const f=this.props.theme;e.fillStyle=a.Color.fromCSSHex(f.bgPrimaryColor).withAlpha(.8).toCSS(),e.fillRect(0,0,t.x,h),e.textBaseline="top";for(let n=Math.ceil(0/d)*d;n<s;n+=d){const s=Math.round(i.transformPosition(new o.Vec2(n,0)).x),a=this.props.flamechart.formatValue(n),c=Math.ceil((0,r.cachedMeasureTextWidth)(e,a));e.fillStyle=f.fgPrimaryColor,e.fillText(a,s-c-p,p),e.fillStyle=f.fgSecondaryColor,e.fillRect(s,0,1,t.y)}}componentWillReceiveProps(e){this.props.flamechart!==e.flamechart?this.renderCanvas():this.props.configSpaceViewportRect!=e.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==e.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),e.canvasContext&&(e.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),e.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize),this.props.canvasContext.addBeforeFrameHandler(this.onBeforeFrame)}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize),this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame)}resizeOverlayCanvasIfNeeded(){if(!this.overlayCanvas)return;let{width:e,height:t}=this.overlayCanvas.getBoundingClientRect();if(e=Math.floor(e),t=Math.floor(t),0===e||0===t)return;const i=e*window.devicePixelRatio,o=t*window.devicePixelRatio;i===this.overlayCanvas.width&&o===this.overlayCanvas.height||(this.overlayCanvas.width=i,this.overlayCanvas.height=o)}pan(e){this.interactionLock="pan";const t=this.logicalToPhysicalViewSpace().transformVector(e),i=this.configSpaceToPhysicalViewSpace().inverseTransformVector(t);i&&this.props.transformViewport(o.AffineTransform.withTranslation(i))}zoom(e){this.interactionLock="zoom";const t=this.props.configSpaceViewportRect,i=t.origin.plus(t.size.times(.5));if(!i)return;const s=o.AffineTransform.withTranslation(i.times(-1)).scaledBy(new o.Vec2(e,1)).translatedBy(i);this.props.transformViewport(s)}configSpaceMouse(e){const t=this.windowToLogicalViewSpace().transformPosition(new o.Vec2(e.clientX,e.clientY)),i=this.logicalToPhysicalViewSpace().transformPosition(t);return this.configSpaceToPhysicalViewSpace().inverseTransformPosition(i)}render(){const e=this.getStyle();return(0,t.h)("div",{ref:this.containerRef,onWheel:this.onWheel,onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,className:(0,i.css)(e.minimap,n.commonStyle.vbox)},(0,t.h)("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:(0,i.css)(e.fill)}))}}exports.FlamechartMinimapView=c;
131
+ },{"preact":"aSor","aphrodite":"CxN7","../lib/math":"tDuZ","./flamechart-style":"jZ6t","./style":"hvr4","../lib/text-utils":"eeWS","../lib/color":"x77Y"}],"uohB":[function(require,module,exports) {
132
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartDetailView=o;var e=require("aphrodite"),l=require("preact"),t=require("./flamechart-style"),s=require("../lib/utils"),a=require("./color-chit"),c=require("./themes/theme");function r(a){const r=(0,t.getFlamechartStyle)((0,c.useTheme)()),i=a.formatter(a.selectedTotal),o=a.formatter(a.selectedSelf),h=100*a.selectedTotal/a.grandTotal,n=100*a.selectedSelf/a.grandTotal;return(0,l.h)("div",{className:(0,e.css)(r.statsTable)},(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell,r.statsTableHeader)},a.title),(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell)},"Total"),(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell)},"Self"),(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell)},i),(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell)},o),(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell)},(0,s.formatPercent)(h),(0,l.h)("div",{className:(0,e.css)(r.barDisplay),style:{height:`${h}%`}})),(0,l.h)("div",{className:(0,e.css)(a.cellStyle,r.statsTableCell)},(0,s.formatPercent)(n),(0,l.h)("div",{className:(0,e.css)(r.barDisplay),style:{height:`${n}%`}})))}function i(s){const r=(0,t.getFlamechartStyle)((0,c.useTheme)()),i=[];let o=s.node;for(;o&&!o.isRoot();o=o.parent){const t=[],{frame:c}=o;if(t.push((0,l.h)(a.ColorChit,{color:s.getFrameColor(c)})),i.length&&t.push((0,l.h)("span",{className:(0,e.css)(r.stackFileLine)},"> ")),t.push(c.name),c.file){let s=c.file;null!=c.line&&(s+=`:${c.line}`,null!=c.col&&(s+=`:${c.col}`)),t.push((0,l.h)("span",{className:(0,e.css)(r.stackFileLine)}," (",s,")"))}i.push((0,l.h)("div",{className:(0,e.css)(r.stackLine)},t))}return(0,l.h)("div",{className:(0,e.css)(r.stackTraceView)},(0,l.h)("div",{className:(0,e.css)(r.stackTraceViewPadding)},i))}function o(s){const a=(0,t.getFlamechartStyle)((0,c.useTheme)()),{flamechart:o,selectedNode:h}=s,{frame:n}=h;return(0,l.h)("div",{className:(0,e.css)(a.detailView)},(0,l.h)(r,{title:"This Instance",cellStyle:a.thisInstanceCell,grandTotal:o.getTotalWeight(),selectedTotal:h.getTotalWeight(),selectedSelf:h.getSelfWeight(),formatter:o.formatValue.bind(o)}),(0,l.h)(r,{title:"All Instances",cellStyle:a.allInstancesCell,grandTotal:o.getTotalWeight(),selectedTotal:n.getTotalWeight(),selectedSelf:n.getSelfWeight(),formatter:o.formatValue.bind(o)}),(0,l.h)(i,{node:h,getFrameColor:s.getCSSColorForFrame}))}
133
+ },{"aphrodite":"CxN7","preact":"aSor","./flamechart-style":"jZ6t","../lib/utils":"ucYa","./color-chit":"Pua8","./themes/theme":"gzKG"}],"e6nh":[function(require,module,exports) {
134
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BatchCanvasRectRenderer=exports.BatchCanvasTextRenderer=void 0;class t{constructor(){this.argsBatch=[]}text(t){this.argsBatch.push(t)}fill(t,e){if(0!==this.argsBatch.length){t.fillStyle=e;for(let e of this.argsBatch)t.fillText(e.text,e.x,e.y);this.argsBatch=[]}}}exports.BatchCanvasTextRenderer=t;class e{constructor(){this.argsBatch=[]}rect(t){this.argsBatch.push(t)}drawPath(t){t.beginPath();for(let e of this.argsBatch)t.rect(e.x,e.y,e.w,e.h);t.closePath(),this.argsBatch=[]}fill(t,e){0!==this.argsBatch.length&&(t.fillStyle=e,this.drawPath(t),t.fill())}stroke(t,e,s){0!==this.argsBatch.length&&(t.strokeStyle=e,t.lineWidth=s,this.drawPath(t),t.stroke())}}exports.BatchCanvasRectRenderer=e;
135
+ },{}],"e7Fh":[function(require,module,exports) {
136
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartPanZoomView=void 0;var e=require("../lib/math"),t=require("./style"),i=require("../lib/text-utils"),o=require("./flamechart-style"),s=require("preact"),r=require("aphrodite"),n=require("../lib/canvas-2d-batch-renderers"),a=require("../lib/color");class h extends s.Component{constructor(){super(...arguments),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.overlayCanvas=null,this.overlayCtx=null,this.hoveredLabel=null,this.overlayCanvasRef=(e=>{e?(this.overlayCanvas=e,this.overlayCtx=this.overlayCanvas.getContext("2d"),this.renderCanvas()):(this.overlayCanvas=null,this.overlayCtx=null)}),this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT=t.Sizes.FRAME_HEIGHT,this.onWindowResize=(()=>{this.updateConfigSpaceViewport(),this.onBeforeFrame()}),this.frameHadWheelEvent=!1,this.framesWithoutWheelEvents=0,this.interactionLock=null,this.maybeClearInteractionLock=(()=>{this.interactionLock&&(this.frameHadWheelEvent||(this.framesWithoutWheelEvents++,this.framesWithoutWheelEvents>=2&&(this.interactionLock=null,this.framesWithoutWheelEvents=0)),this.props.canvasContext.requestFrame()),this.frameHadWheelEvent=!1}),this.onBeforeFrame=(()=>{this.resizeOverlayCanvasIfNeeded(),this.renderRects(),this.renderOverlays(),this.maybeClearInteractionLock()}),this.renderCanvas=(()=>{this.props.canvasContext.requestFrame()}),this.lastDragPos=null,this.mouseDownPos=null,this.onMouseDown=(t=>{this.mouseDownPos=this.lastDragPos=new e.Vec2(t.offsetX,t.offsetY),this.updateCursor(),window.addEventListener("mouseup",this.onWindowMouseUp)}),this.onMouseDrag=(t=>{if(!this.lastDragPos)return;const i=new e.Vec2(t.offsetX,t.offsetY);this.pan(this.lastDragPos.minus(i)),this.lastDragPos=i,this.hoveredLabel&&this.props.onNodeHover(null)}),this.onDblClick=(t=>{if(this.hoveredLabel){const t=this.hoveredLabel.configSpaceBounds,i=new e.Rect(t.origin.minus(new e.Vec2(0,1)),t.size.withY(this.props.configSpaceViewportRect.height()));this.props.setConfigSpaceViewportRect(i)}}),this.onClick=(t=>{const i=new e.Vec2(t.offsetX,t.offsetY),o=this.mouseDownPos;this.mouseDownPos=null,o&&i.minus(o).length()>5||(this.hoveredLabel?(this.props.onNodeSelect(this.hoveredLabel.node),this.renderCanvas()):this.props.onNodeSelect(null))}),this.onWindowMouseUp=(e=>{this.lastDragPos=null,this.updateCursor(),window.removeEventListener("mouseup",this.onWindowMouseUp)}),this.onMouseMove=(t=>{if(this.updateCursor(),this.lastDragPos)return t.preventDefault(),void this.onMouseDrag(t);this.hoveredLabel=null;const i=new e.Vec2(t.offsetX,t.offsetY),o=this.logicalToPhysicalViewSpace().transformPosition(i),s=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(o);if(!s)return;const r=(t,i=0)=>{const o=t.end-t.start,n=this.props.renderInverted?this.configSpaceSize().y-1-i:i,a=new e.Rect(new e.Vec2(t.start,n),new e.Vec2(o,1));if(s.x<a.left())return null;if(s.x>a.right())return null;a.contains(s)&&(this.hoveredLabel={configSpaceBounds:a,node:t.node});for(let e of t.children)r(e,i+1)};for(let e of this.props.flamechart.getLayers()[0]||[])r(e);this.hoveredLabel?this.props.onNodeHover({node:this.hoveredLabel.node,event:t}):this.props.onNodeHover(null),this.renderCanvas()}),this.onMouseLeave=(e=>{this.hoveredLabel=null,this.props.onNodeHover(null),this.renderCanvas()}),this.onWheel=(t=>{t.preventDefault(),this.frameHadWheelEvent=!0;const i=t.metaKey||t.ctrlKey;let o=t.deltaY,s=t.deltaX;if(t.deltaMode===t.DOM_DELTA_LINE&&(o*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT,s*=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT),i&&"pan"!==this.interactionLock){let i=1+o/100;t.ctrlKey&&(i=1+o/40),i=(0,e.clamp)(i,.1,10),this.zoom(new e.Vec2(t.offsetX,t.offsetY),i)}else"zoom"!==this.interactionLock&&this.pan(new e.Vec2(s,o));this.renderCanvas()}),this.onWindowKeyPress=(t=>{if(!this.container)return;const{width:i,height:o}=this.container.getBoundingClientRect();"="===t.key||"+"===t.key?(this.zoom(new e.Vec2(i/2,o/2),.5),t.preventDefault()):"-"!==t.key&&"_"!==t.key||(this.zoom(new e.Vec2(i/2,o/2),2),t.preventDefault()),t.ctrlKey||t.shiftKey||t.metaKey||("0"===t.key?this.zoom(new e.Vec2(i/2,o/2),1e9):"ArrowRight"===t.key||"KeyD"===t.code?this.pan(new e.Vec2(100,0)):"ArrowLeft"===t.key||"KeyA"===t.code?this.pan(new e.Vec2(-100,0)):"ArrowUp"===t.key||"KeyW"===t.code?this.pan(new e.Vec2(0,-100)):"ArrowDown"===t.key||"KeyS"===t.code?this.pan(new e.Vec2(0,100)):"Escape"===t.key&&(this.props.onNodeSelect(null),this.renderCanvas()))})}getStyle(){return(0,o.getFlamechartStyle)(this.props.theme)}setConfigSpaceViewportRect(e){this.props.setConfigSpaceViewportRect(e)}configSpaceSize(){return new e.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}physicalViewSize(){return new e.Vec2(this.overlayCanvas?this.overlayCanvas.width:0,this.overlayCanvas?this.overlayCanvas.height:0)}physicalBounds(){if(this.props.renderInverted){const t=this.physicalViewSize().y,i=(this.configSpaceSize().y+1)*this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio;if(i<t)return new e.Rect(new e.Vec2(0,t-i),this.physicalViewSize())}return new e.Rect(new e.Vec2(0,0),this.physicalViewSize())}configSpaceToPhysicalViewSpace(){return e.AffineTransform.betweenRects(this.props.configSpaceViewportRect,this.physicalBounds())}logicalToPhysicalViewSpace(){return e.AffineTransform.withScale(new e.Vec2(window.devicePixelRatio,window.devicePixelRatio))}resizeOverlayCanvasIfNeeded(){if(!this.overlayCanvas)return;let{width:e,height:t}=this.overlayCanvas.getBoundingClientRect();if(e=Math.floor(e),t=Math.floor(t),0===e||0===t)return;const i=e*window.devicePixelRatio,o=t*window.devicePixelRatio;i===this.overlayCanvas.width&&o===this.overlayCanvas.height||(this.overlayCanvas.width=i,this.overlayCanvas.height=o)}renderOverlays(){const o=this.overlayCtx;if(!o)return;if(this.props.configSpaceViewportRect.isEmpty())return;const s=this.configSpaceToPhysicalViewSpace(),r=t.FontSize.LABEL*window.devicePixelRatio,a=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,h=this.physicalViewSize();o.clearRect(0,0,h.x,h.y),o.font=`${r}px/${a}px ${t.FontFamily.MONOSPACE}`,o.textBaseline="alphabetic";const c=(0,i.cachedMeasureTextWidth)(o,"M"+i.ELLIPSIS+"M"),l=(s.inverseTransformVector(new e.Vec2(c,0))||new e.Vec2(0,0)).x,p=5*window.devicePixelRatio,d=new n.BatchCanvasTextRenderer,f=new n.BatchCanvasTextRenderer,w=new n.BatchCanvasRectRenderer,u=new n.BatchCanvasRectRenderer,v=new n.BatchCanvasRectRenderer,m=new n.BatchCanvasRectRenderer,y=(t,n=0)=>{var u;const v=t.end-t.start,m=this.props.renderInverted?this.configSpaceSize().y-1-n:n,g=new e.Rect(new e.Vec2(t.start,m),new e.Vec2(v,1));if(!(v<l||g.left()>this.props.configSpaceViewportRect.right()||g.right()<this.props.configSpaceViewportRect.left())){if(this.props.renderInverted){if(g.bottom()<this.props.configSpaceViewportRect.top())return}else if(g.top()>this.props.configSpaceViewportRect.bottom())return;if(g.hasIntersectionWith(this.props.configSpaceViewportRect)){let e=s.transformRect(g);if(e.left()<0&&(e=e.withOrigin(e.origin.withX(0)).withSize(e.size.withX(e.size.x+e.left()))),e.right()>h.x&&(e=e.withSize(e.size.withX(h.x-e.left()))),e.width()>c){const s=null===(u=this.props.searchResults)||void 0===u?void 0:u.getMatchForFrame(t.node.frame),n=(0,i.trimTextMid)(o,t.node.frame.name,e.width()-2*p);if(s){const t=(0,i.remapRangesToTrimmedText)(n,s.matchedRanges);let h=0,c=e.left()+p;const l=(a-r)/2-2;for(let[s,r]of t){c+=(0,i.cachedMeasureTextWidth)(o,n.trimmedString.substring(h,s));const t=(0,i.cachedMeasureTextWidth)(o,n.trimmedString.substring(s,r));w.rect({x:c,y:e.top()+l,w:t,h:a-2*l}),c+=t,h=r}}(null==this.props.searchResults||s?d:f).text({text:n.trimmedString,x:e.left()+p,y:Math.round(e.bottom()-(a-r)/2)})}}for(let e of t.children)y(e,n+1)}},g=2*window.devicePixelRatio;o.strokeStyle=this.props.theme.selectionSecondaryColor;const S=(s.inverseTransformVector(new e.Vec2(1,0))||new e.Vec2(0,0)).x,C=(t,i=0)=>{var o;if(!this.props.selectedNode&&null==this.props.searchResults)return;const r=t.end-t.start,n=this.props.renderInverted?this.configSpaceSize().y-1-i:i,a=new e.Rect(new e.Vec2(t.start,n),new e.Vec2(r,1));if(!(r<S||a.left()>this.props.configSpaceViewportRect.right()||a.right()<this.props.configSpaceViewportRect.left()||a.top()>this.props.configSpaceViewportRect.bottom())){if(a.hasIntersectionWith(this.props.configSpaceViewportRect)){if(null===(o=this.props.searchResults)||void 0===o?void 0:o.getMatchForFrame(t.node.frame)){const e=s.transformRect(a);m.rect({x:Math.round(e.left()+g/2),y:Math.round(e.top()+g/2),w:Math.round(Math.max(0,e.width()-g)),h:Math.round(Math.max(0,e.height()-g))})}if(null!=this.props.selectedNode&&t.node.frame===this.props.selectedNode.frame){let e=t.node===this.props.selectedNode?u:v;const i=s.transformRect(a);e.rect({x:Math.round(i.left()+1+g/2),y:Math.round(i.top()+1+g/2),w:Math.round(Math.max(0,i.width()-2-g)),h:Math.round(Math.max(0,i.height()-2-g))})}}for(let e of t.children)C(e,i+1)}};for(let e of this.props.flamechart.getLayers()[0]||[])C(e);for(let e of this.props.flamechart.getLayers()[0]||[])y(e);const V=this.props.theme;if(m.fill(o,V.searchMatchPrimaryColor),w.fill(o,V.searchMatchSecondaryColor),f.fill(o,V.fgSecondaryColor),d.fill(o,null!=this.props.searchResults?V.searchMatchTextColor:V.fgPrimaryColor),v.stroke(o,V.selectionSecondaryColor,g),u.stroke(o,V.selectionPrimaryColor,g),this.hoveredLabel){let e=V.fgPrimaryColor;this.props.selectedNode===this.hoveredLabel.node&&(e=V.selectionPrimaryColor),o.lineWidth=2*devicePixelRatio,o.strokeStyle=e;const t=s.transformRect(this.hoveredLabel.configSpaceBounds);o.strokeRect(Math.round(t.left()),Math.round(t.top()),Math.round(Math.max(0,t.width())),Math.round(Math.max(0,t.height())))}this.renderTimeIndicators()}renderTimeIndicators(){const o=this.overlayCtx;if(!o)return;const s=this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT*window.devicePixelRatio,r=this.physicalViewSize(),n=this.configSpaceToPhysicalViewSpace(),h=(s-t.FontSize.LABEL*window.devicePixelRatio)/2,c=this.props.configSpaceViewportRect.left(),l=this.props.configSpaceViewportRect.right(),p=(this.configSpaceToPhysicalViewSpace().inverted()||new e.AffineTransform).times(this.logicalToPhysicalViewSpace()).transformVector(new e.Vec2(200,1)).x;let d=Math.pow(10,Math.floor(Math.log10(p)));p/d>5?d*=5:p/d>2&&(d*=2);const f=this.props.theme;{const t=this.props.renderInverted?r.y-s:0;o.fillStyle=a.Color.fromCSSHex(f.bgPrimaryColor).withAlpha(.8).toCSS(),o.fillRect(0,t,r.x,s),o.textBaseline="top";for(let s=Math.ceil(c/d)*d;s<l;s+=d){const a=Math.round(n.transformPosition(new e.Vec2(s,0)).x),c=this.props.flamechart.formatValue(s),l=(0,i.cachedMeasureTextWidth)(o,c);o.fillStyle=f.fgPrimaryColor,o.fillText(c,a-l-h,t+h),o.fillStyle=f.fgSecondaryColor,o.fillRect(a,0,1,r.y)}}}updateConfigSpaceViewport(){if(!this.container)return;const{logicalSpaceViewportSize:t}=this.props,i=this.container.getBoundingClientRect(),{width:o,height:s}=i;if(o<2||s<2)return;if(this.props.configSpaceViewportRect.isEmpty()){const t=s/this.LOGICAL_VIEW_SPACE_FRAME_HEIGHT;this.props.renderInverted?this.setConfigSpaceViewportRect(new e.Rect(new e.Vec2(0,this.configSpaceSize().y-t+1),new e.Vec2(this.configSpaceSize().x,t))):this.setConfigSpaceViewportRect(new e.Rect(new e.Vec2(0,-1),new e.Vec2(this.configSpaceSize().x,t)))}else t.equals(e.Vec2.zero)||t.x===o&&t.y===s||this.setConfigSpaceViewportRect(this.props.configSpaceViewportRect.withSize(this.props.configSpaceViewportRect.size.timesPointwise(new e.Vec2(o/t.x,s/t.y))));const r=new e.Vec2(o,s);r.equals(t)||this.props.setLogicalSpaceViewportSize(r)}renderRects(){this.container&&(this.updateConfigSpaceViewport(),this.props.configSpaceViewportRect.isEmpty()||this.props.canvasContext.renderBehind(this.container,()=>{this.props.flamechartRenderer.render({physicalSpaceDstRect:this.physicalBounds(),configSpaceSrcRect:this.props.configSpaceViewportRect,renderOutlines:!0})}))}pan(t){this.interactionLock="pan";const i=this.logicalToPhysicalViewSpace().transformVector(t),o=this.configSpaceToPhysicalViewSpace().inverseTransformVector(i);this.hoveredLabel&&this.props.onNodeHover(null),o&&this.props.transformViewport(e.AffineTransform.withTranslation(o))}zoom(t,i){this.interactionLock="zoom";const o=this.logicalToPhysicalViewSpace().transformPosition(t),s=this.configSpaceToPhysicalViewSpace().inverseTransformPosition(o);if(!s)return;const r=e.AffineTransform.withTranslation(s.times(-1)).scaledBy(new e.Vec2(i,1)).translatedBy(s);this.props.transformViewport(r)}updateCursor(){this.lastDragPos?(document.body.style.cursor="grabbing",document.body.style.cursor="-webkit-grabbing"):document.body.style.cursor="default"}shouldComponentUpdate(){return!1}componentWillReceiveProps(e){this.props.flamechart!==e.flamechart?(this.hoveredLabel=null,this.renderCanvas()):this.props.searchResults!==e.searchResults?this.renderCanvas():this.props.selectedNode!==e.selectedNode?this.renderCanvas():this.props.configSpaceViewportRect!==e.configSpaceViewportRect?this.renderCanvas():this.props.canvasContext!==e.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),e.canvasContext&&(e.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),e.canvasContext.requestFrame()))}componentDidMount(){this.props.canvasContext.addBeforeFrameHandler(this.onBeforeFrame),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){this.props.canvasContext.removeBeforeFrameHandler(this.onBeforeFrame),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keydown",this.onWindowKeyPress)}render(){const e=this.getStyle();return(0,s.h)("div",{className:(0,r.css)(e.panZoomView,t.commonStyle.vbox),onMouseDown:this.onMouseDown,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onDblClick:this.onDblClick,onWheel:this.onWheel,ref:this.containerRef},(0,s.h)("canvas",{width:1,height:1,ref:this.overlayCanvasRef,className:(0,r.css)(e.fill)}))}}exports.FlamechartPanZoomView=h;
137
+ },{"../lib/math":"tDuZ","./style":"hvr4","../lib/text-utils":"eeWS","./flamechart-style":"jZ6t","preact":"aSor","aphrodite":"CxN7","../lib/canvas-2d-batch-renderers":"e6nh","../lib/color":"x77Y"}],"PGRN":[function(require,module,exports) {
138
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Hovertip=r;var e=require("./style"),t=require("aphrodite"),i=require("preact"),o=require("./themes/theme");function r(r){const s=n((0,o.useTheme)()),{containerSize:a,offset:d}=r,p=a.x,h=a.y,l={};return d.x+7+e.Sizes.TOOLTIP_WIDTH_MAX<p?l.left=d.x+7:l.right=p-d.x+1,d.y+7+e.Sizes.TOOLTIP_HEIGHT_MAX<h?l.top=d.y+7:l.bottom=h-d.y+1,(0,i.h)("div",{className:(0,t.css)(s.hoverTip),style:l},(0,i.h)("div",{className:(0,t.css)(s.hoverTipRow)},r.children))}const s=2,n=(0,o.withTheme)(i=>t.StyleSheet.create({hoverTip:{position:"absolute",background:i.bgPrimaryColor,border:"1px solid black",maxWidth:e.Sizes.TOOLTIP_WIDTH_MAX,paddingTop:2,paddingBottom:2,pointerEvents:"none",userSelect:"none",fontSize:e.FontSize.LABEL,fontFamily:e.FontFamily.MONOSPACE,zIndex:e.ZIndex.HOVERTIP},hoverTipRow:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflowX:"hidden",paddingLeft:2,paddingRight:2,maxWidth:e.Sizes.TOOLTIP_WIDTH_MAX}}));
139
+ },{"./style":"hvr4","aphrodite":"CxN7","preact":"aSor","./themes/theme":"gzKG"}],"C6HJ":[function(require,module,exports) {
140
+ "use strict";function r(r,e){return d(r,e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.fuzzyMatchStrings=r;const e="a".charCodeAt(0),t="z".charCodeAt(0),n="A".charCodeAt(0),o="Z".charCodeAt(0),c="0".charCodeAt(0),a="9".charCodeAt(0);var h;function u(r){const u=r.charCodeAt(0);return e<=u&&u<=t?h.charLower:n<=u&&u<=o?h.charUpper:c<=u&&u<=a?h.charNumber:h.charNonWord}function l(r,o){if(r===o)return!0;const c=o.charCodeAt(0);return e<=c&&c<=t&&r.charCodeAt(0)===c-e+n}function d(r,e){if(0==e.length)return{matchedRanges:[],score:0};let t=0,n=-1,o=-1,c=r.length,a=e.length;for(let h=0;h<c;h++){if(l(r[h],e[t])&&(n<0&&(n=h),++t==a)){o=h+1;break}}if(-1==o)return null;t--;for(let h=o-1;h>=n;h--){if(l(r[h],e[t])&&--t<0)return A(r,e,n=h,o)}throw new Error("Implementation error. This must be a bug in fzfFuzzyMatchV1")}!function(r){r[r.charNonWord=0]="charNonWord",r[r.charLower=1]="charLower",r[r.charUpper=2]="charUpper",r[r.charNumber=3]="charNumber"}(h||(h={}));const f=16,i=-3,s=-1,p=f/2,N=f/2,b=p+s,g=-(i+s),m=2;function w(r,e){return r===h.charNonWord&&e!==h.charNonWord?p:r===h.charLower&&e==h.charUpper||r!==h.charNumber&&e==h.charNumber?b:e===h.charNonWord?N:0}function A(r,e,t,n){let o=0,c=0,a=!1,d=0,N=0,b=new Array(e.length),A=h.charNonWord;t>0&&(A=u(r[t-1]));for(let h=t;h<n;h++){let t=r[h],n=u(t);if(l(t,e[o])){b[o]=h,c+=f;let r=w(A,n);0==d?N=r:(r===p&&(N=r),r=Math.max(r,N,g)),c+=0===o?r*m:r,a=!1,d++,o++}else c+=a?s:i,a=!0,d=0,N=0;A=n}if(o!==e.length)throw new Error("fzfCalculateScore should only be called when pattern is found between sidx and eidx");let C=[[b[0],b[0]+1]];for(let h=1;h<b.length;h++){const r=b[h],e=C[C.length-1];e[1]===r?e[1]=r+1:C.push([r,r+1])}return{score:c,matchedRanges:C}}
141
+ },{}],"DHvC":[function(require,module,exports) {
142
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartSearchResults=exports.ProfileSearchResults=exports.FlamechartType=void 0;var e,t=require("./fuzzy-find"),s=require("./math");exports.FlamechartType=e,function(e){e[e.CHRONO_FLAME_CHART=0]="CHRONO_FLAME_CHART",e[e.LEFT_HEAVY_FLAME_GRAPH=1]="LEFT_HEAVY_FLAME_GRAPH"}(e||(exports.FlamechartType=e={}));class r{constructor(e,t){this.profile=e,this.searchQuery=t,this.matches=null}getMatchForFrame(e){return this.matches||(this.matches=new Map,this.profile.forEachFrame(e=>{const s=(0,t.fuzzyMatchStrings)(e.name,this.searchQuery);null!=s&&this.matches.set(e,s)})),this.matches.get(e)||null}}exports.ProfileSearchResults=r;class h{constructor(e,t){this.flamechart=e,this.profileResults=t,this.matches=null}getResults(){if(null==this.matches){const e=[],t=new Map,r=(h,a)=>{const{node:c}=h;if(this.profileResults.getMatchForFrame(c.frame)){const r=new s.Rect(new s.Vec2(h.start,a),new s.Vec2(h.end-h.start,1));t.set(c,e.length),e.push({configSpaceBounds:r,node:c})}h.children.forEach(e=>{r(e,a+1)})},h=this.flamechart.getLayers();h.length>0&&h[0].forEach(e=>r(e,0)),this.matches={matches:e,indexForNode:t}}return this.matches}count(){return this.getResults().matches.length}indexOf(e){const t=this.getResults().indexForNode.get(e);return void 0===t?null:t}at(e){const t=this.getResults().matches;if(e<0||e>=t.length)throw new Error(`Index ${e} out of bounds in list of ${t.length} matches.`);return t[e]}}exports.FlamechartSearchResults=h;
143
+ },{"./fuzzy-find":"C6HJ","./math":"tDuZ"}],"t9CM":[function(require,module,exports) {
144
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchView=exports.ProfileSearchContextProvider=exports.ProfileSearchContext=void 0;var e=require("aphrodite"),r=require("preact"),t=require("preact/hooks"),o=require("preact/compat"),n=require("./style"),s=require("../lib/profile-search"),i=require("../store"),l=require("../lib/preact-redux"),c=require("../store/actions"),a=require("./themes/theme");function u(e){e.stopPropagation()}const h=(0,r.createContext)(null);exports.ProfileSearchContext=h;const p=({children:e})=>{const o=(0,i.useActiveProfileState)(),n=o?o.profile:null,l=(0,i.useAppSelector)(e=>e.searchIsActive,[]),c=(0,i.useAppSelector)(e=>e.searchQuery,[]),a=(0,t.useMemo)(()=>n&&l&&0!==c.length?new s.ProfileSearchResults(n,c):null,[l,c,n]);return(0,r.h)(h.Provider,{value:a},e)};exports.ProfileSearchContextProvider=p;const{setSearchQuery:d,setSearchIsActive:m}=c.actions,y=(0,o.memo)(({numResults:o,resultIndex:n,selectNext:s,selectPrev:c})=>{const h=(0,a.useTheme)(),p=f(h),y=(0,i.useAppSelector)(e=>e.searchQuery,[]),S=(0,i.useAppSelector)(e=>e.searchIsActive,[]),g=(0,l.useActionCreator)(d,[]),x=(0,l.useActionCreator)(m,[]),b=(0,t.useCallback)(e=>{const r=e.target.value;g(r)},[g]),C=(0,t.useRef)(null),v=(0,t.useCallback)(()=>x(!1),[x]),w=(0,t.useCallback)(e=>{e.shiftKey?c():s()},[c,s]),k=(0,t.useCallback)(e=>{e.stopPropagation(),"Escape"===e.key&&x(!1),"Enter"===e.key&&w(e),"f"==e.key&&(e.metaKey||e.ctrlKey)&&(C.current&&C.current.select(),e.preventDefault())},[x,w]);return(0,t.useEffect)(()=>{const e=e=>{"f"==e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),C.current?C.current.select():(x(!0),requestAnimationFrame(()=>{C.current&&C.current.select()})))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[x]),S?(0,r.h)("div",{className:(0,e.css)(p.searchView)},(0,r.h)("span",{className:(0,e.css)(p.icon)},"🔍"),(0,r.h)("span",{className:(0,e.css)(p.inputContainer)},(0,r.h)("input",{className:(0,e.css)(p.input),value:y,onInput:b,onKeyDown:k,onKeyUp:u,onKeyPress:u,ref:C})),null!=o&&(0,r.h)(r.Fragment,null,(0,r.h)("span",{className:(0,e.css)(p.resultCount)},null==n?"?":n+1,"/",o),(0,r.h)("button",{className:(0,e.css)(p.icon,p.button),onClick:c},"⬅️"),(0,r.h)("button",{className:(0,e.css)(p.icon,p.button),onClick:s},"➡️")),(0,r.h)("svg",{className:(0,e.css)(p.icon),onClick:v,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{d:"M4.99999 4.16217L11.6427 10.8048M11.6427 4.16217L4.99999 10.8048",stroke:h.altFgSecondaryColor}))):null});exports.SearchView=y;const f=(0,a.withTheme)(r=>e.StyleSheet.create({searchView:{position:"absolute",top:0,right:10,height:n.Sizes.TOOLBAR_HEIGHT,width:208,borderWidth:2,borderColor:r.altFgPrimaryColor,borderStyle:"solid",fontSize:n.FontSize.LABEL,boxSizing:"border-box",background:r.altBgSecondaryColor,color:r.altFgPrimaryColor,display:"flex",alignItems:"center"},inputContainer:{flexShrink:1,flexGrow:1,display:"flex"},input:{width:"100%",border:"none",background:"none",fontSize:n.FontSize.LABEL,lineHeight:`${n.Sizes.TOOLBAR_HEIGHT}px`,color:r.altFgPrimaryColor,":focus":{border:"none",outline:"none"},"::selection":{color:r.altFgPrimaryColor,background:r.selectionPrimaryColor}},resultCount:{verticalAlign:"middle"},icon:{flexShrink:0,verticalAlign:"middle",height:"100%",margin:"0px 2px 0px 2px",fontSize:n.FontSize.LABEL},button:{display:"inline",background:"none",border:"none",padding:0,":focus":{outline:"none"}}}));
145
+ },{"aphrodite":"CxN7","preact":"aSor","preact/hooks":"MwGB","preact/compat":"AQ6k","./style":"hvr4","../lib/profile-search":"DHvC","../store":"LSXo","../lib/preact-redux":"Erwv","../store/actions":"M9Ab","./themes/theme":"gzKG"}],"zsRf":[function(require,module,exports) {
146
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartSearchView=exports.FlamechartSearchContextProvider=exports.FlamechartSearchContext=void 0;var e=require("preact/compat"),t=require("preact/hooks"),l=require("./search-view"),r=require("../lib/profile-search"),n=require("../lib/math"),c=require("preact");const o=(0,c.createContext)(null);exports.FlamechartSearchContext=o;const u=({flamechart:e,selectedNode:n,setSelectedNode:u,configSpaceViewportRect:a,setConfigSpaceViewportRect:i,children:s})=>{const p=(0,t.useContext)(l.ProfileSearchContext),h=(0,t.useMemo)(()=>null==p?null:new r.FlamechartSearchResults(e,p),[e,p]);return(0,c.h)(o.Provider,{value:{results:h,flamechart:e,selectedNode:n,setSelectedNode:u,configSpaceViewportRect:a,setConfigSpaceViewportRect:i}},s)};exports.FlamechartSearchContextProvider=u;const a=(0,e.memo)(()=>{const e=(0,t.useContext)(o),r=null==e?null:e.results,u=null==e?null:e.selectedNode,a=null==e?null:e.setSelectedNode,i=null==e?null:e.configSpaceViewportRect,s=null==e?null:e.setConfigSpaceViewportRect,p=null==e?null:e.flamechart,h=null==r?null:r.count(),d=(0,t.useMemo)(()=>null==r?null:null==u?null:r.indexOf(u),[r,u]),f=(0,t.useCallback)(e=>{if(!a)return;if(!p)return;if(!i)return;if(!s)return;const t=e.configSpaceBounds,l=new n.Rect(t.origin.minus(new n.Vec2(0,1)),t.size.withY(i.height()));a(e.node),s(p.getClampedConfigSpaceViewportRect({configSpaceViewportRect:l}))},[i,s,a,p]),{selectPrev:x,selectNext:S}=(0,t.useMemo)(()=>null==h||0===h||null==r?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{if(!(null==r?void 0:r.at))return;if(null==h||0===h)return;let e=null==d?h-1:d-1;e<0&&(e=h-1);const t=r.at(e);f(t)},selectNext:()=>{if(!(null==r?void 0:r.at))return;if(null==h||0===h)return;let e=null==d?0:d+1;e>=h&&(e=0);const t=r.at(e);f(t)}},[h,d,r,null==r?void 0:r.at,f]);return(0,c.h)(l.SearchView,{resultIndex:d,numResults:h,selectPrev:x,selectNext:S})});exports.FlamechartSearchView=a;
147
+ },{"preact/compat":"AQ6k","preact/hooks":"MwGB","./search-view":"t9CM","../lib/profile-search":"DHvC","../lib/math":"tDuZ","preact":"aSor"}],"Z2mP":[function(require,module,exports) {
148
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlamechartView=void 0;var e=require("preact"),t=require("aphrodite"),r=require("../lib/math"),i=require("../lib/utils"),o=require("./flamechart-minimap-view"),s=require("./style"),a=require("./flamechart-detail-view"),c=require("./flamechart-pan-zoom-view"),p=require("./hovertip"),h=require("../lib/typed-redux"),n=require("./search-view"),l=require("./flamechart-search-view"),m=require("./flamechart-style");class f extends h.StatelessComponent{constructor(){super(...arguments),this.setConfigSpaceViewportRect=(e=>{const t=s.Sizes.DETAIL_VIEW_HEIGHT/s.Sizes.FRAME_HEIGHT,i=this.configSpaceSize(),o=this.props.flamechart.getClampedViewportWidth(e.size.x),a=e.size.withX(o),c=r.Vec2.clamp(e.origin,new r.Vec2(0,-1),r.Vec2.max(r.Vec2.zero,i.minus(a).plus(new r.Vec2(0,t+1))));this.props.setConfigSpaceViewportRect(new r.Rect(c,e.size.withX(o)))}),this.setLogicalSpaceViewportSize=(e=>{this.props.setLogicalSpaceViewportSize(e)}),this.transformViewport=(e=>{const t=e.transformRect(this.props.configSpaceViewportRect);this.setConfigSpaceViewportRect(t)}),this.onNodeHover=(e=>{this.props.setNodeHover(e)}),this.onNodeClick=(e=>{this.props.setSelectedNode(e)}),this.container=null,this.containerRef=(e=>{this.container=e||null})}getStyle(){return(0,m.getFlamechartStyle)(this.props.theme)}configSpaceSize(){return new r.Vec2(this.props.flamechart.getTotalWeight(),this.props.flamechart.getLayers().length)}formatValue(e){const t=100*e/this.props.flamechart.getTotalWeight(),r=(0,i.formatPercent)(t);return`${this.props.flamechart.formatValue(e)} (${r})`}renderTooltip(){if(!this.container)return null;const{hover:i}=this.props;if(!i)return null;const{width:o,height:s,left:a,top:c}=this.container.getBoundingClientRect(),h=new r.Vec2(i.event.clientX-a,i.event.clientY-c),n=this.getStyle();return(0,e.h)(p.Hovertip,{containerSize:new r.Vec2(o,s),offset:h},(0,e.h)("span",{className:(0,t.css)(n.hoverCount)},this.formatValue(i.node.getTotalWeight()))," ",i.node.frame.name)}render(){const r=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(r.fill,s.commonStyle.vbox),ref:this.containerRef},(0,e.h)(o.FlamechartMinimapView,{theme:this.props.theme,configSpaceViewportRect:this.props.configSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect}),(0,e.h)(n.ProfileSearchContext.Consumer,null,t=>(0,e.h)(e.Fragment,null,(0,e.h)(c.FlamechartPanZoomView,{theme:this.props.theme,canvasContext:this.props.canvasContext,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,renderInverted:!1,onNodeHover:this.onNodeHover,onNodeSelect:this.onNodeClick,selectedNode:this.props.selectedNode,transformViewport:this.transformViewport,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:t}),(0,e.h)(l.FlamechartSearchView,null))),this.renderTooltip(),this.props.selectedNode&&(0,e.h)(a.FlamechartDetailView,{flamechart:this.props.flamechart,getCSSColorForFrame:this.props.getCSSColorForFrame,selectedNode:this.props.selectedNode}))}}exports.FlamechartView=f;
149
+ },{"preact":"aSor","aphrodite":"CxN7","../lib/math":"tDuZ","../lib/utils":"ucYa","./flamechart-minimap-view":"S7z0","./style":"hvr4","./flamechart-detail-view":"uohB","./flamechart-pan-zoom-view":"e7Fh","./hovertip":"PGRN","../lib/typed-redux":"UDzr","./search-view":"t9CM","./flamechart-search-view":"zsRf","./flamechart-style":"jZ6t"}],"PJJu":[function(require,module,exports) {
150
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFlamechartSetters=g,exports.LeftHeavyFlamechartView=exports.getLeftHeavyFlamechart=exports.ChronoFlamechartView=exports.createMemoizedFlamechartRenderer=exports.getChronoViewFlamechart=void 0;var e=require("preact"),t=require("../store/flamechart-view-state"),r=require("../lib/flamechart"),a=require("../gl/flamechart-renderer"),o=require("../lib/preact-redux"),c=require("../lib/utils"),l=require("./flamechart-view"),i=require("../store/getters"),n=require("../store/actions"),s=require("preact/compat"),m=require("./flamechart-search-view"),h=require("./themes/theme");const{setHoveredNode:d,setLogicalSpaceViewportSize:f,setConfigSpaceViewportRect:p,setSelectedNode:C}=n.actions.flamechart;function g(e,t){return{setNodeHover:(0,o.useActionCreator)(r=>d({profileIndex:t,args:{id:e,hover:r}}),[t,e]),setLogicalSpaceViewportSize:(0,o.useActionCreator)(r=>f({profileIndex:t,args:{id:e,logicalSpaceViewportSize:r}}),[t,e]),setConfigSpaceViewportRect:(0,o.useActionCreator)(r=>p({profileIndex:t,args:{id:e,configSpaceViewportRect:r}}),[t,e]),setSelectedNode:(0,o.useActionCreator)(r=>C({profileIndex:t,args:{id:e,selectedNode:r}}),[t,e])}}const u=(0,c.memoizeByShallowEquality)(({profile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalWeight.bind(e),forEachCall:e.forEachCall.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t}));exports.getChronoViewFlamechart=u;const F=e=>(0,c.memoizeByShallowEquality)(({canvasContext:t,flamechart:r})=>new a.FlamechartRenderer(t.gl,(0,i.getRowAtlas)(t),r,t.rectangleBatchRenderer,t.flamechartColorPassRenderer,e));exports.createMemoizedFlamechartRenderer=F;const S=F(),w=(0,s.memo)(r=>{const{activeProfileState:a,glCanvas:o}=r,{index:c,profile:n,chronoViewState:s}=a,d=(0,h.useTheme)(),f=(0,i.getCanvasContext)({theme:d,canvas:o}),p=(0,i.getFrameToColorBucket)(n),C=(0,i.createGetColorBucketForFrame)(p),F=(0,i.createGetCSSColorForFrame)({theme:d,frameToColorBucket:p}),w=u({profile:n,getColorBucketForFrame:C}),v=S({canvasContext:f,flamechart:w}),V=g(t.FlamechartID.CHRONO,c);return(0,e.h)(m.FlamechartSearchContextProvider,{flamechart:w,selectedNode:s.selectedNode,setSelectedNode:V.setSelectedNode,configSpaceViewportRect:s.configSpaceViewportRect,setConfigSpaceViewportRect:V.setConfigSpaceViewportRect},(0,e.h)(l.FlamechartView,Object.assign({theme:d,renderInverted:!1,flamechart:w,flamechartRenderer:v,canvasContext:f,getCSSColorForFrame:F},s,V)))});exports.ChronoFlamechartView=w;const v=(0,c.memoizeByShallowEquality)(({profile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t}));exports.getLeftHeavyFlamechart=v;const V=F(),x=(0,s.memo)(r=>{const{activeProfileState:a,glCanvas:o}=r,{index:c,profile:n,leftHeavyViewState:s}=a,d=(0,h.useTheme)(),f=(0,i.getCanvasContext)({theme:d,canvas:o}),p=(0,i.getFrameToColorBucket)(n),C=(0,i.createGetColorBucketForFrame)(p),u=(0,i.createGetCSSColorForFrame)({theme:d,frameToColorBucket:p}),F=v({profile:n,getColorBucketForFrame:C}),S=V({canvasContext:f,flamechart:F}),w=g(t.FlamechartID.LEFT_HEAVY,c);return(0,e.h)(m.FlamechartSearchContextProvider,{flamechart:F,selectedNode:s.selectedNode,setSelectedNode:w.setSelectedNode,configSpaceViewportRect:s.configSpaceViewportRect,setConfigSpaceViewportRect:w.setConfigSpaceViewportRect},(0,e.h)(l.FlamechartView,Object.assign({theme:d,renderInverted:!1,flamechart:F,flamechartRenderer:S,canvasContext:f,getCSSColorForFrame:u},s,w)))});exports.LeftHeavyFlamechartView=x;
151
+ },{"preact":"aSor","../store/flamechart-view-state":"n9w8","../lib/flamechart":"gFMr","../gl/flamechart-renderer":"P80v","../lib/preact-redux":"Erwv","../lib/utils":"ucYa","./flamechart-view":"Z2mP","../store/getters":"hEOZ","../store/actions":"M9Ab","preact/compat":"AQ6k","./flamechart-search-view":"zsRf","./themes/theme":"gzKG"}],"MXNL":[function(require,module,exports) {
152
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStyle=exports.FlamechartWrapper=void 0;var e=require("aphrodite"),t=require("preact"),r=require("./style"),o=require("../lib/math"),i=require("./flamechart-pan-zoom-view"),s=require("../lib/utils"),p=require("./hovertip"),a=require("../lib/typed-redux"),n=require("./themes/theme");class c extends a.StatelessComponent{constructor(){super(...arguments),this.setConfigSpaceViewportRect=(e=>{this.props.setConfigSpaceViewportRect(this.clampViewportToFlamegraph(e))}),this.setLogicalSpaceViewportSize=(e=>{this.props.setLogicalSpaceViewportSize(e)}),this.transformViewport=(e=>{this.setConfigSpaceViewportRect(e.transformRect(this.props.configSpaceViewportRect))}),this.container=null,this.containerRef=(e=>{this.container=e||null}),this.setNodeHover=(e=>{this.props.setNodeHover(e)})}clampViewportToFlamegraph(e){const{flamechart:t,renderInverted:r}=this.props;return t.getClampedConfigSpaceViewportRect({configSpaceViewportRect:e,renderInverted:r})}formatValue(e){const t=100*e/this.props.flamechart.getTotalWeight(),r=(0,s.formatPercent)(t);return`${this.props.flamechart.formatValue(e)} (${r})`}renderTooltip(){if(!this.container)return null;const{hover:r}=this.props;if(!r)return null;const{width:i,height:s,left:a,top:n}=this.container.getBoundingClientRect(),c=new o.Vec2(r.event.clientX-a,r.event.clientY-n),h=l(this.props.theme);return(0,t.h)(p.Hovertip,{containerSize:new o.Vec2(i,s),offset:c},(0,t.h)("span",{className:(0,e.css)(h.hoverCount)},this.formatValue(r.node.getTotalWeight()))," ",r.node.frame.name)}render(){return(0,t.h)("div",{className:(0,e.css)(r.commonStyle.fillY,r.commonStyle.fillX,r.commonStyle.vbox),ref:this.containerRef},(0,t.h)(i.FlamechartPanZoomView,{theme:this.props.theme,selectedNode:null,onNodeHover:this.setNodeHover,onNodeSelect:s.noop,configSpaceViewportRect:this.props.configSpaceViewportRect,setConfigSpaceViewportRect:this.setConfigSpaceViewportRect,transformViewport:this.transformViewport,flamechart:this.props.flamechart,flamechartRenderer:this.props.flamechartRenderer,canvasContext:this.props.canvasContext,renderInverted:this.props.renderInverted,logicalSpaceViewportSize:this.props.logicalSpaceViewportSize,setLogicalSpaceViewportSize:this.setLogicalSpaceViewportSize,searchResults:null}),this.renderTooltip())}}exports.FlamechartWrapper=c;const l=(0,n.withTheme)(t=>e.StyleSheet.create({hoverCount:{color:t.weightColor}}));exports.getStyle=l;
153
+ },{"aphrodite":"CxN7","preact":"aSor","./style":"hvr4","../lib/math":"tDuZ","./flamechart-pan-zoom-view":"e7Fh","../lib/utils":"ucYa","./hovertip":"PGRN","../lib/typed-redux":"UDzr","./themes/theme":"gzKG"}],"Cw7z":[function(require,module,exports) {
154
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InvertedCallerFlamegraphView=void 0;var e=require("../lib/utils"),r=require("../lib/flamechart"),t=require("./flamechart-view-container"),a=require("../store/getters"),l=require("../store/flamechart-view-state"),o=require("../store"),i=require("./flamechart-wrapper"),n=require("preact"),c=require("preact/compat"),m=require("./themes/theme");const s=(0,e.memoizeByShallowEquality)(({profile:e,frame:r,flattenRecursion:t})=>{let a=e.getInvertedProfileForCallersOf(r);return t?a.getProfileWithRecursionFlattened():a}),u=(0,e.memoizeByShallowEquality)(({invertedCallerProfile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t})),h=(0,t.createMemoizedFlamechartRenderer)({inverted:!0}),f=(0,c.memo)(r=>{const{activeProfileState:c}=r;let{profile:f,sandwichViewState:C,index:d}=c;const p=(0,o.useAppSelector)(e=>e.flattenRecursion,[]),F=(0,o.useAppSelector)(e=>e.glCanvas,[]),g=(0,m.useTheme)();if(!f)throw new Error("profile missing");if(!F)throw new Error("glCanvas missing");const{callerCallee:v}=C;if(!v)throw new Error("callerCallee missing");const{selectedFrame:w}=v,S=(0,a.getFrameToColorBucket)(f),q=(0,a.createGetColorBucketForFrame)(S),E=(0,a.createGetCSSColorForFrame)({theme:g,frameToColorBucket:S}),B=(0,a.getCanvasContext)({theme:g,canvas:F}),I=u({invertedCallerProfile:s({profile:f,frame:w,flattenRecursion:p}),getColorBucketForFrame:q}),R=h({canvasContext:B,flamechart:I});return(0,n.h)(i.FlamechartWrapper,Object.assign({theme:g,renderInverted:!0,flamechart:I,flamechartRenderer:R,canvasContext:B,getCSSColorForFrame:E},(0,t.useFlamechartSetters)(l.FlamechartID.SANDWICH_INVERTED_CALLERS,d),v.invertedCallerFlamegraph,{setSelectedNode:e.noop}))});exports.InvertedCallerFlamegraphView=f;
155
+ },{"../lib/utils":"ucYa","../lib/flamechart":"gFMr","./flamechart-view-container":"PJJu","../store/getters":"hEOZ","../store/flamechart-view-state":"n9w8","../store":"LSXo","./flamechart-wrapper":"MXNL","preact":"aSor","preact/compat":"AQ6k","./themes/theme":"gzKG"}],"KT37":[function(require,module,exports) {
156
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CalleeFlamegraphView=void 0;var e=require("../lib/utils"),r=require("../lib/flamechart"),t=require("./flamechart-view-container"),a=require("../store/getters"),l=require("../store/flamechart-view-state"),o=require("./flamechart-wrapper"),i=require("../store"),c=require("preact"),m=require("preact/compat"),n=require("./themes/theme");const s=(0,e.memoizeByShallowEquality)(({profile:e,frame:r,flattenRecursion:t})=>{let a=e.getProfileForCalleesOf(r);return t?a.getProfileWithRecursionFlattened():a}),u=(0,e.memoizeByShallowEquality)(({calleeProfile:e,getColorBucketForFrame:t})=>new r.Flamechart({getTotalWeight:e.getTotalNonIdleWeight.bind(e),forEachCall:e.forEachCallGrouped.bind(e),formatValue:e.formatValue.bind(e),getColorBucketForFrame:t})),h=(0,t.createMemoizedFlamechartRenderer)(),f=(0,m.memo)(r=>{const{activeProfileState:m}=r,{index:f,profile:C,sandwichViewState:p}=m,F=(0,i.useAppSelector)(e=>e.flattenRecursion,[]),g=(0,i.useAppSelector)(e=>e.glCanvas,[]),d=(0,n.useTheme)();if(!C)throw new Error("profile missing");if(!g)throw new Error("glCanvas missing");const{callerCallee:w}=p;if(!w)throw new Error("callerCallee missing");const{selectedFrame:S}=w,v=(0,a.getFrameToColorBucket)(C),q=(0,a.createGetColorBucketForFrame)(v),E=(0,a.createGetCSSColorForFrame)({theme:d,frameToColorBucket:v}),B=(0,a.getCanvasContext)({theme:d,canvas:g}),b=u({calleeProfile:s({profile:C,frame:S,flattenRecursion:F}),getColorBucketForFrame:q}),x=h({canvasContext:B,flamechart:b});return(0,c.h)(o.FlamechartWrapper,Object.assign({theme:d,renderInverted:!1,flamechart:b,flamechartRenderer:x,canvasContext:B,getCSSColorForFrame:E},(0,t.useFlamechartSetters)(l.FlamechartID.SANDWICH_CALLEES,f),w.calleeFlamegraph,{setSelectedNode:e.noop}))});exports.CalleeFlamegraphView=f;
157
+ },{"../lib/utils":"ucYa","../lib/flamechart":"gFMr","./flamechart-view-container":"PJJu","../store/getters":"hEOZ","../store/flamechart-view-state":"n9w8","./flamechart-wrapper":"MXNL","../store":"LSXo","preact":"aSor","preact/compat":"AQ6k","./themes/theme":"gzKG"}],"cWm7":[function(require,module,exports) {
158
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SandwichSearchView=void 0;var e=require("preact/compat"),l=require("preact/hooks"),t=require("./search-view"),r=require("preact"),s=require("./sandwich-view");const c=(0,e.memo)(()=>{const e=(0,l.useContext)(s.SandwichViewContext),c=null!=e?e.rowList:null,n=null!=(null==e?void 0:e.selectedFrame)?e.getIndexForFrame(e.selectedFrame):null,u=null!=c?c.length:null,{selectPrev:i,selectNext:a}=(0,l.useMemo)(()=>null==c||null==u||0===u||null==e?{selectPrev:()=>{},selectNext:()=>{}}:{selectPrev:()=>{let l=null==n?u-1:n-1;l<0&&(l=u-1),e.setSelectedFrame(c[l])},selectNext:()=>{let l=null==n?0:n+1;l>=u&&(l=0),e.setSelectedFrame(c[l])}},[n,c,u,e]);return(0,r.h)(t.SearchView,{resultIndex:n,numResults:u,selectPrev:i,selectNext:a})});exports.SandwichSearchView=c;
159
+ },{"preact/compat":"AQ6k","preact/hooks":"MwGB","./search-view":"t9CM","preact":"aSor","./sandwich-view":"L8J2"}],"L8J2":[function(require,module,exports) {
160
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SandwichViewContainer=exports.SandwichViewContext=void 0;var e=require("aphrodite"),t=require("./profile-table-view"),r=require("preact"),a=require("preact/compat"),l=require("preact/hooks"),s=require("./style"),o=require("../store/actions"),i=require("../lib/typed-redux"),n=require("./inverted-caller-flamegraph-view"),c=require("./callee-flamegraph-view"),h=require("../lib/preact-redux"),d=require("./sandwich-search-view"),m=require("../store"),p=require("../lib/utils"),f=require("./search-view"),u=require("./themes/theme");class S extends i.StatelessComponent{constructor(){super(...arguments),this.setSelectedFrame=(e=>{this.props.setSelectedFrame(e)}),this.onWindowKeyPress=(e=>{"Escape"===e.key&&this.setSelectedFrame(null)})}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyPress)}render(){const a=v(this.props.theme),{selectedFrame:l}=this.props;let o=null;return l&&(o=(0,r.h)("div",{className:(0,e.css)(s.commonStyle.fillY,a.callersAndCallees,s.commonStyle.vbox)},(0,r.h)("div",{className:(0,e.css)(s.commonStyle.hbox,a.panZoomViewWraper)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabelParent)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabel)},"Callers")),(0,r.h)(n.InvertedCallerFlamegraphView,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})),(0,r.h)("div",{className:(0,e.css)(a.divider)}),(0,r.h)("div",{className:(0,e.css)(s.commonStyle.hbox,a.panZoomViewWraper)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabelParent,a.flamechartLabelParentBottom)},(0,r.h)("div",{className:(0,e.css)(a.flamechartLabel,a.flamechartLabelBottom)},"Callees")),(0,r.h)(c.CalleeFlamegraphView,{glCanvas:this.props.glCanvas,activeProfileState:this.props.activeProfileState})))),(0,r.h)("div",{className:(0,e.css)(s.commonStyle.hbox,s.commonStyle.fillY)},(0,r.h)("div",{className:(0,e.css)(a.tableView)},(0,r.h)(t.ProfileTableViewContainer,{activeProfileState:this.props.activeProfileState}),(0,r.h)(d.SandwichSearchView,null)),o)}}const v=(0,u.withTheme)(t=>e.StyleSheet.create({tableView:{position:"relative",flex:1},panZoomViewWraper:{flex:1},flamechartLabelParent:{display:"flex",flexDirection:"column",justifyContent:"flex-end",alignItems:"flex-start",fontSize:s.FontSize.TITLE,width:1.2*s.FontSize.TITLE,borderRight:`1px solid ${t.fgSecondaryColor}`},flamechartLabelParentBottom:{justifyContent:"flex-start"},flamechartLabel:{transform:"rotate(-90deg)",transformOrigin:"50% 50% 0",width:1.2*s.FontSize.TITLE,flexShrink:1},flamechartLabelBottom:{transform:"rotate(-90deg)",display:"flex",justifyContent:"flex-end"},callersAndCallees:{flex:1,borderLeft:`${s.Sizes.SEPARATOR_HEIGHT}px solid ${t.fgSecondaryColor}`},divider:{height:2,background:t.fgSecondaryColor}})),w=(0,r.createContext)(null);exports.SandwichViewContext=w;const x=(0,a.memo)(e=>{const{activeProfileState:a,glCanvas:s}=e,{sandwichViewState:i,index:n}=a,{callerCallee:c}=i,d=(0,u.useTheme)(),v=(0,h.useDispatch)(),x=(0,l.useCallback)(e=>{v(o.actions.sandwichView.setSelectedFrame({profileIndex:n,args:e}))},[v,n]),g=a.profile,C=(0,m.useAppSelector)(e=>e.tableSortMethod,[]),b=(0,l.useContext)(f.ProfileSearchContext),F=c?c.selectedFrame:null,y=(0,l.useMemo)(()=>{const e=[];switch(g.forEachFrame(t=>{b&&!b.getMatchForFrame(t)||e.push(t)}),C.field){case t.SortField.SYMBOL_NAME:(0,p.sortBy)(e,e=>e.name.toLowerCase());break;case t.SortField.SELF:(0,p.sortBy)(e,e=>e.getSelfWeight());break;case t.SortField.TOTAL:(0,p.sortBy)(e,e=>e.getTotalWeight())}return C.direction===t.SortDirection.DESCENDING&&e.reverse(),e},[g,b,C]),L=(0,l.useMemo)(()=>{const e=new Map;for(let t=0;t<y.length;t++)e.set(y[t],t);return t=>{const r=e.get(t);return null==r?null:r}},[y]),P=(0,l.useMemo)(()=>e=>null==b?null:b.getMatchForFrame(e),[b]),q={rowList:y,selectedFrame:F,setSelectedFrame:x,getIndexForFrame:L,getSearchMatchForFrame:P};return(0,r.h)(w.Provider,{value:q},(0,r.h)(S,{theme:d,activeProfileState:a,glCanvas:s,setSelectedFrame:x,selectedFrame:F,profileIndex:n}))});exports.SandwichViewContainer=x;
161
+ },{"aphrodite":"CxN7","./profile-table-view":"Ivh5","preact":"aSor","preact/compat":"AQ6k","preact/hooks":"MwGB","./style":"hvr4","../store/actions":"M9Ab","../lib/typed-redux":"UDzr","./inverted-caller-flamegraph-view":"Cw7z","./callee-flamegraph-view":"KT37","../lib/preact-redux":"Erwv","./sandwich-search-view":"cWm7","../store":"LSXo","../lib/utils":"ucYa","./search-view":"t9CM","./themes/theme":"gzKG"}],"Ivh5":[function(require,module,exports) {
162
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProfileTableViewContainer=exports.ProfileTableView=exports.SortDirection=exports.SortField=void 0;var e,r,t=require("preact"),o=require("aphrodite"),l=require("../lib/utils"),i=require("./style"),a=require("./color-chit"),s=require("./scrollable-list-view"),c=require("../store/actions"),n=require("../store/getters"),h=require("../lib/preact-redux"),d=require("../store"),m=require("preact/compat"),u=require("preact/hooks"),S=require("./sandwich-view"),p=require("../lib/color"),C=require("./themes/theme");function b(e){const r=E((0,C.useTheme)());return(0,t.h)("div",{className:(0,o.css)(r.hBarDisplay)},(0,t.h)("div",{className:(0,o.css)(r.hBarDisplayFilled),style:{width:`${e.perc}%`}}))}function g(e){const l=(0,C.useTheme)(),i=E(l),{activeDirection:a}=e,s=a===r.ASCENDING?l.fgPrimaryColor:l.fgSecondaryColor,c=a===r.DESCENDING?l.fgPrimaryColor:l.fgSecondaryColor;return(0,t.h)("svg",{width:"8",height:"10",viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,o.css)(i.sortIcon)},(0,t.h)("path",{d:"M0 4L4 0L8 4H0Z",fill:s}),(0,t.h)("path",{d:"M0 4L4 0L8 4H0Z",transform:"translate(0 10) scale(1 -1)",fill:c}))}function f(e,r,o){const l=[];let i=0;for(let a of r)l.push(e.slice(i,a[0])),l.push((0,t.h)("span",{className:o},e.slice(a[0],a[1]))),i=a[1];return l.push(e.slice(i)),(0,t.h)("span",null,l)}exports.SortField=e,function(e){e[e.SYMBOL_NAME=0]="SYMBOL_NAME",e[e.SELF=1]="SELF",e[e.TOTAL=2]="TOTAL"}(e||(exports.SortField=e={})),exports.SortDirection=r,function(e){e[e.ASCENDING=0]="ASCENDING",e[e.DESCENDING=1]="DESCENDING"}(r||(exports.SortDirection=r={}));const w=({frame:e,matchedRanges:r,profile:i,index:s,selectedFrame:c,setSelectedFrame:n,getCSSColorForFrame:h})=>{const d=E((0,C.useTheme)()),m=e.getTotalWeight(),u=e.getSelfWeight(),S=100*m/i.getTotalNonIdleWeight(),p=100*u/i.getTotalNonIdleWeight(),g=e===c;return(0,t.h)("tr",{key:`${s}`,onClick:n.bind(null,e),className:(0,o.css)(d.tableRow,s%2==0&&d.tableRowEven,g&&d.tableRowSelected)},(0,t.h)("td",{className:(0,o.css)(d.numericCell)},i.formatValue(m)," (",(0,l.formatPercent)(S),")",(0,t.h)(b,{perc:S})),(0,t.h)("td",{className:(0,o.css)(d.numericCell)},i.formatValue(u)," (",(0,l.formatPercent)(p),")",(0,t.h)(b,{perc:p})),(0,t.h)("td",{title:e.file,className:(0,o.css)(d.textCell)},(0,t.h)(a.ColorChit,{color:h(e)}),r?f(e.name,r,(0,o.css)(d.matched,g&&d.matchedSelected)):e.name))},N=(0,m.memo)(({profile:l,sortMethod:a,setSortMethod:c,selectedFrame:n,setSelectedFrame:h,getCSSColorForFrame:d,searchQuery:m,searchIsActive:p})=>{const b=E((0,C.useTheme)()),f=(0,u.useCallback)((t,o)=>{if(o.preventDefault(),a.field==t)c({field:t,direction:a.direction===r.ASCENDING?r.DESCENDING:r.ASCENDING});else switch(t){case e.SYMBOL_NAME:c({field:t,direction:r.ASCENDING});break;case e.SELF:case e.TOTAL:c({field:t,direction:r.DESCENDING})}},[a,c]),N=(0,u.useContext)(S.SandwichViewContext),F=(0,u.useCallback)((e,r)=>{if(!N)return null;const i=[];for(let t=e;t<=r;t++){const e=N.rowList[t],r=N.getSearchMatchForFrame(e);i.push(w({frame:e,matchedRanges:null==r?null:r.matchedRanges,index:t,profile:l,selectedFrame:n,setSelectedFrame:h,getCSSColorForFrame:d}))}return 0===i.length&&(p?i.push((0,t.h)("tr",null,(0,t.h)("td",{className:(0,o.css)(b.emptyState)},'No symbol names match query "',m,'".'))):i.push((0,t.h)("tr",null,(0,t.h)("td",{className:(0,o.css)(b.emptyState)},"No symbols found.")))),(0,t.h)("table",{className:(0,o.css)(b.tableView)},i)},[N,l,n,h,d,p,m,b.emptyState,b.tableView]),y=(0,u.useMemo)(()=>null==N?[]:N.rowList.map(e=>({size:i.Sizes.FRAME_HEIGHT})),[N]),x=(0,u.useCallback)(r=>f(e.TOTAL,r),[f]),A=(0,u.useCallback)(r=>f(e.SELF,r),[f]),T=(0,u.useCallback)(r=>f(e.SYMBOL_NAME,r),[f]);return(0,t.h)("div",{className:(0,o.css)(i.commonStyle.vbox,b.profileTableView)},(0,t.h)("table",{className:(0,o.css)(b.tableView)},(0,t.h)("thead",{className:(0,o.css)(b.tableHeader)},(0,t.h)("tr",null,(0,t.h)("th",{className:(0,o.css)(b.numericCell),onClick:x},(0,t.h)(g,{activeDirection:a.field===e.TOTAL?a.direction:null}),"Total"),(0,t.h)("th",{className:(0,o.css)(b.numericCell),onClick:A},(0,t.h)(g,{activeDirection:a.field===e.SELF?a.direction:null}),"Self"),(0,t.h)("th",{className:(0,o.css)(b.textCell),onClick:T},(0,t.h)(g,{activeDirection:a.field===e.SYMBOL_NAME?a.direction:null}),"Symbol Name")))),(0,t.h)(s.ScrollableListView,{axis:"y",items:y,className:(0,o.css)(b.scrollView),renderItems:F,initialIndexInView:null==n?null:null==N?void 0:N.getIndexForFrame(n)}))});exports.ProfileTableView=N;const E=(0,C.withTheme)(e=>o.StyleSheet.create({profileTableView:{background:e.bgPrimaryColor,height:"100%"},scrollView:{overflowY:"auto",overflowX:"hidden",flexGrow:1,"::-webkit-scrollbar":{background:e.bgPrimaryColor},"::-webkit-scrollbar-thumb":{background:e.fgSecondaryColor,borderRadius:20,border:`3px solid ${e.bgPrimaryColor}`,":hover":{background:e.fgPrimaryColor}}},tableView:{width:"100%",fontSize:i.FontSize.LABEL,background:e.bgPrimaryColor},tableHeader:{borderBottom:`2px solid ${e.bgSecondaryColor}`,textAlign:"left",color:e.fgPrimaryColor,userSelect:"none"},sortIcon:{position:"relative",top:1,marginRight:i.Sizes.FRAME_HEIGHT/4},tableRow:{background:e.bgPrimaryColor,height:i.Sizes.FRAME_HEIGHT},tableRowEven:{background:e.bgSecondaryColor},tableRowSelected:{background:e.selectionPrimaryColor,color:e.altFgPrimaryColor},numericCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",position:"relative",textAlign:"right",paddingRight:i.Sizes.FRAME_HEIGHT,width:6*i.Sizes.FRAME_HEIGHT,minWidth:6*i.Sizes.FRAME_HEIGHT},textCell:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:"100%",maxWidth:0},hBarDisplay:{position:"absolute",background:p.Color.fromCSSHex(e.weightColor).withAlpha(.2).toCSS(),bottom:2,height:2,width:`calc(100% - ${2*i.Sizes.FRAME_HEIGHT}px)`,right:i.Sizes.FRAME_HEIGHT},hBarDisplayFilled:{height:"100%",position:"absolute",background:e.weightColor,right:0},matched:{borderBottom:`2px solid ${e.fgPrimaryColor}`},matchedSelected:{borderColor:e.altFgPrimaryColor},emptyState:{textAlign:"center",fontWeight:"bold"}})),{setTableSortMethod:F}=c.actions.sandwichView,y=(0,m.memo)(e=>{const{activeProfileState:r}=e,{profile:o,sandwichViewState:l,index:i}=r;if(!o)throw new Error("profile missing");const a=(0,d.useAppSelector)(e=>e.tableSortMethod,[]),s=(0,C.useTheme)(),{callerCallee:m}=l,u=m?m.selectedFrame:null,S=(0,n.getFrameToColorBucket)(o),p=(0,n.createGetCSSColorForFrame)({theme:s,frameToColorBucket:S}),b=(0,h.useActionCreator)(e=>c.actions.sandwichView.setSelectedFrame({profileIndex:i,args:e}),[i]),g=(0,h.useActionCreator)(F,[]),f=(0,d.useAppSelector)(e=>e.searchIsActive,[]),w=(0,d.useAppSelector)(e=>e.searchQuery,[]);return(0,t.h)(N,{profile:o,selectedFrame:u,getCSSColorForFrame:p,sortMethod:a,setSelectedFrame:b,setSortMethod:g,searchIsActive:f,searchQuery:w})});exports.ProfileTableViewContainer=y;
163
+ },{"preact":"aSor","aphrodite":"CxN7","../lib/utils":"ucYa","./style":"hvr4","./color-chit":"Pua8","./scrollable-list-view":"SGwe","../store/actions":"M9Ab","../store/getters":"hEOZ","../lib/preact-redux":"Erwv","../store":"LSXo","preact/compat":"AQ6k","preact/hooks":"MwGB","./sandwich-view":"L8J2","../lib/color":"x77Y","./themes/theme":"gzKG"}],"LSXo":[function(require,module,exports) {
164
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createAppStore=w,exports.useAppSelector=h,exports.useActiveProfileState=A,exports.canUseXHR=exports.ColorScheme=exports.ViewMode=void 0;var e,t,r=require("./actions"),o=p(require("redux")),s=require("../lib/typed-redux"),i=require("../lib/hash-params"),n=require("./profiles-state"),c=require("../views/profile-table-view"),a=require("../lib/preact-redux"),l=require("./getters");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function p(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}exports.ViewMode=e,function(e){e[e.CHRONO_FLAME_CHART=0]="CHRONO_FLAME_CHART",e[e.LEFT_HEAVY_FLAME_GRAPH=1]="LEFT_HEAVY_FLAME_GRAPH",e[e.SANDWICH_VIEW=2]="SANDWICH_VIEW"}(e||(exports.ViewMode=e={})),exports.ColorScheme=t,function(e){e[e.SYSTEM=0]="SYSTEM",e[e.DARK=1]="DARK",e[e.LIGHT=2]="LIGHT"}(t||(exports.ColorScheme=t={}));const f=window.location.protocol,d="http:"===f||"https:"===f;function S(e,o){if(void 0===e){const e=window.localStorage&&window.localStorage["speedscope-color-scheme"];return"DARK"===e?t.DARK:"LIGHT"===e?t.LIGHT:t.SYSTEM}if(r.actions.setColorScheme.matches(o)){const e=o.payload;switch(e){case t.DARK:window.localStorage["speedscope-color-scheme"]="DARK";break;case t.LIGHT:window.localStorage["speedscope-color-scheme"]="LIGHT";break;case t.SYSTEM:delete window.localStorage["speedscope-color-scheme"];break;default:return e}return e}return e}function w(t){const a=(0,i.getHashParams)(),l=d&&null!=a.profileURL,u=o.combineReducers({profileGroup:n.profileGroup,hashParams:(0,s.setter)(r.actions.setHashParams,a),flattenRecursion:(0,s.setter)(r.actions.setFlattenRecursion,!1),viewMode:(0,s.setter)(r.actions.setViewMode,e.CHRONO_FLAME_CHART),searchQuery:(0,s.setter)(r.actions.setSearchQuery,""),searchIsActive:(0,s.setter)(r.actions.setSearchIsActive,!1),glCanvas:(0,s.setter)(r.actions.setGLCanvas,null),dragActive:(0,s.setter)(r.actions.setDragActive,!1),loading:(0,s.setter)(r.actions.setLoading,l),error:(0,s.setter)(r.actions.setError,!1),tableSortMethod:(0,s.setter)(r.actions.sandwichView.setTableSortMethod,{field:c.SortField.SELF,direction:c.SortDirection.DESCENDING}),colorScheme:S});return o.createStore(u,t)}function h(e,t){return(0,a.useSelector)(e,t)}function A(){return h(e=>{const{profileGroup:t}=e;if(!t)return null;if(t.indexToView>=t.profiles.length)return null;const r=t.indexToView,o=t.profiles[r];return Object.assign(Object.assign({},t.profiles[t.indexToView]),{profile:(0,l.getProfileToView)({profile:o.profile,flattenRecursion:e.flattenRecursion}),index:t.indexToView})},[])}exports.canUseXHR=d;
165
+ },{"./actions":"M9Ab","redux":"aVFJ","../lib/typed-redux":"UDzr","../lib/hash-params":"O1pB","./profiles-state":"HCyk","../views/profile-table-view":"Ivh5","../lib/preact-redux":"Erwv","./getters":"hEOZ"}],"FbpF":[function(require,module,exports) {
166
+ "use strict";function e(e){return e.replace(/\\([a-fA-F0-9]{2})/g,(e,n)=>{const t=parseInt(n,16);return String.fromCharCode(t)})}function n(n){const t=n.split("\n");if(!t.length)return null;if(""===t[t.length-1]&&t.pop(),!t.length)return null;const r=new Map,o=/^(\d+):(.+)$/,s=/^([\$\w]+):([\$\w-]+)$/;for(const u of t){const n=o.exec(u);if(n){r.set(`wasm-function[${n[1]}]`,e(n[2]));continue}const t=s.exec(u);if(!t)return null;r.set(t[1],e(t[2]))}return e=>r.has(e.name)?{name:r.get(e.name)}:null}Object.defineProperty(exports,"__esModule",{value:!0}),exports.importEmscriptenSymbolMap=n;
167
+ },{}],"LsM4":[function(require,module,exports) {
168
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ByteFormatter=exports.TimeFormatter=exports.RawValueFormatter=void 0;var t=require("./utils");class e{constructor(){this.unit="none"}format(t){return t.toLocaleString()}}exports.RawValueFormatter=e;class r{constructor(t){this.unit=t,this.multiplier="nanoseconds"===t?1e-9:"microseconds"===t?1e-6:"milliseconds"===t?.001:1}formatUnsigned(e){const r=e*this.multiplier;if(r/60>=1){const e=Math.floor(r/60),o=Math.floor(r-60*e).toString();return`${e}:${(0,t.zeroPad)(o,2)}`}return r/1>=1?`${r.toFixed(2)}s`:r/.001>=1?`${(r/.001).toFixed(2)}ms`:r/1e-6>=1?`${(r/1e-6).toFixed(2)}µs`:`${(r/1e-9).toFixed(2)}ns`}format(t){return`${t<0?"-":""}${this.formatUnsigned(Math.abs(t))}`}}exports.TimeFormatter=r;class o{constructor(){this.unit="bytes"}format(t){return t<1024?`${t.toFixed(0)} B`:(t/=1024)<1024?`${t.toFixed(2)} KB`:(t/=1024)<1024?`${t.toFixed(2)} MB`:`${(t/=1024).toFixed(2)} GB`}}exports.ByteFormatter=o;
169
+ },{"./utils":"ucYa"}],"FheM":[function(require,module,exports) {
170
+ var t=null;function e(){return t||(t=n()),t}function n(){try{throw new Error}catch(e){var t=(""+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return r(t[0])}return"/"}function r(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}exports.getBundleURL=e,exports.getBaseURL=r;
171
+ },{}],"TUK3":[function(require,module,exports) {
172
+ var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new s(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(u))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function u(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),u=n[i];return u?o[e]=u(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}).catch(function(r){throw delete o[e],r}):void 0}function s(r){this.executor=r,this.promise=null}s.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},s.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)};
173
+ },{"./bundle-url":"FheM"}],"YG8z":[function(require,module,exports) {
174
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallTreeProfileBuilder=exports.StackListProfileBuilder=exports.Profile=exports.CallTreeNode=exports.Frame=exports.HasWeights=void 0;var e=require("./utils"),t=require("./value-formatters"),r=function(e,t,r,s){return new(r||(r=Promise))(function(a,i){function l(e){try{n(s.next(e))}catch(t){i(t)}}function o(e){try{n(s.throw(e))}catch(t){i(t)}}function n(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(l,o)}n((s=s.apply(e,t||[])).next())})};const s=require("_bundle_loader")(require.resolve("./demangle-cpp"));class a{constructor(){this.selfWeight=0,this.totalWeight=0}getSelfWeight(){return this.selfWeight}getTotalWeight(){return this.totalWeight}addToTotalWeight(e){this.totalWeight+=e}addToSelfWeight(e){this.selfWeight+=e}overwriteWeightWith(e){this.selfWeight=e.selfWeight,this.totalWeight=e.totalWeight}}exports.HasWeights=a;let i=(()=>{class e extends a{constructor(e){super(),this.key=e.key,this.name=e.name,this.file=e.file,this.line=e.line,this.col=e.col}static getOrInsert(t,r){return t.getOrInsert(new e(r))}}return e.root=new e({key:"(speedscope root)",name:"(speedscope root)"}),e})();exports.Frame=i;class l extends a{constructor(e,t){super(),this.frame=e,this.parent=t,this.children=[],this.frozen=!1}isRoot(){return this.frame===i.root}isFrozen(){return this.frozen}freeze(){this.frozen=!0}}exports.CallTreeNode=l;class o{constructor(r=0){this.name="",this.frames=new e.KeyedSet,this.appendOrderCalltreeRoot=new l(i.root,null),this.groupedCalltreeRoot=new l(i.root,null),this.samples=[],this.weights=[],this.valueFormatter=new t.RawValueFormatter,this.totalNonIdleWeight=null,this.totalWeight=r}getAppendOrderCalltreeRoot(){return this.appendOrderCalltreeRoot}getGroupedCalltreeRoot(){return this.groupedCalltreeRoot}shallowClone(){const e=new o(this.totalWeight);return Object.assign(e,this),e}formatValue(e){return this.valueFormatter.format(e)}setValueFormatter(e){this.valueFormatter=e}getWeightUnit(){return this.valueFormatter.unit}getName(){return this.name}setName(e){this.name=e}getTotalWeight(){return this.totalWeight}getTotalNonIdleWeight(){return null===this.totalNonIdleWeight&&(this.totalNonIdleWeight=this.groupedCalltreeRoot.children.reduce((e,t)=>e+t.getTotalWeight(),0)),this.totalNonIdleWeight}sortGroupedCallTree(){!function e(t){t.children.sort((e,t)=>-(e.getTotalWeight()-t.getTotalWeight())),t.children.forEach(e)}(this.groupedCalltreeRoot)}forEachCallGrouped(e,t){!function r(s,a){s.frame!==i.root&&e(s,a);let l=0;s.children.forEach(function(e){r(e,a+l),l+=e.getTotalWeight()}),s.frame!==i.root&&t(s,a+s.getTotalWeight())}(this.groupedCalltreeRoot,0)}forEachCall(t,r){let s=[],a=0,l=0;for(let o of this.samples){let n=null;for(n=o;n&&n.frame!=i.root&&-1===s.indexOf(n);n=n.parent);for(;s.length>0&&(0,e.lastOf)(s)!=n;){r(s.pop(),a)}const h=[];for(let e=o;e&&e.frame!=i.root&&e!=n;e=e.parent)h.push(e);h.reverse();for(let e of h)t(e,a);s=s.concat(h),a+=this.weights[l++]}for(let e=s.length-1;e>=0;e--)r(s[e],a)}forEachFrame(e){this.frames.forEach(e)}getProfileWithRecursionFlattened(){const e=new h,t=[],r=new Set;this.forEachCall(function(s,a){r.has(s.frame)?t.push(null):(r.add(s.frame),t.push(s),e.enterFrame(s.frame,a))},function(s,a){const i=t.pop();i&&(r.delete(i.frame),e.leaveFrame(i.frame,a))});const s=e.build();return s.name=this.name,s.valueFormatter=this.valueFormatter,this.forEachFrame(e=>{s.frames.getOrInsert(e).overwriteWeightWith(e)}),s}getInvertedProfileForCallersOf(e){const t=i.getOrInsert(this.frames,e),r=new n,s=[];!function e(r){if(r.frame===t)s.push(r);else for(let t of r.children)e(t)}(this.appendOrderCalltreeRoot);for(let l of s){const e=[];for(let t=l;null!=t&&t.frame!==i.root;t=t.parent)e.push(t.frame);r.appendSampleWithWeight(e,l.getTotalWeight())}const a=r.build();return a.name=this.name,a.valueFormatter=this.valueFormatter,a}getProfileForCalleesOf(e){const t=i.getOrInsert(this.frames,e),r=new n;!function e(s){if(s.frame===t)!function(e){const t=[];!function e(s){t.push(s.frame),r.appendSampleWithWeight(t,s.getSelfWeight());for(let t of s.children)e(t);t.pop()}(e)}(s);else for(let t of s.children)e(t)}(this.appendOrderCalltreeRoot);const s=r.build();return s.name=this.name,s.valueFormatter=this.valueFormatter,s}demangle(){return r(this,void 0,void 0,function*(){let e=null;for(let t of this.frames)t.name.startsWith("__Z")&&(e||(e=(yield s).demangleCpp),t.name=e(t.name))})}remapSymbols(e){for(let t of this.frames){const r=e(t);if(null==r)continue;const{name:s,file:a,line:i,col:l}=r;null!=s&&(t.name=s),null!=a&&(t.file=a),null!=i&&(t.line=i),null!=l&&(t.col=l)}}}exports.Profile=o;class n extends o{constructor(){super(...arguments),this.pendingSample=null}_appendSample(t,r,s){if(isNaN(r))throw new Error("invalid weight");let a=s?this.appendOrderCalltreeRoot:this.groupedCalltreeRoot,o=new Set;for(let n of t){const t=i.getOrInsert(this.frames,n),h=s?(0,e.lastOf)(a.children):a.children.find(e=>e.frame===t);if(h&&!h.isFrozen()&&h.frame==t)a=h;else{const e=a;a=new l(t,a),e.children.push(a)}a.addToTotalWeight(r),o.add(a.frame)}if(a.addToSelfWeight(r),s)for(let e of a.children)e.freeze();if(s){a.frame.addToSelfWeight(r);for(let e of o)e.addToTotalWeight(r);a===(0,e.lastOf)(this.samples)?this.weights[this.weights.length-1]+=r:(this.samples.push(a),this.weights.push(r))}}appendSampleWithWeight(e,t){if(0!==t){if(t<0)throw new Error("Samples must have positive weights");this._appendSample(e,t,!0),this._appendSample(e,t,!1)}}appendSampleWithTimestamp(e,t){if(this.pendingSample){if(t<this.pendingSample.centralTimestamp)throw new Error("Timestamps received out of order");const r=(t+this.pendingSample.centralTimestamp)/2;this.appendSampleWithWeight(this.pendingSample.stack,r-this.pendingSample.startTimestamp),this.pendingSample={stack:e,startTimestamp:r,centralTimestamp:t}}else this.pendingSample={stack:e,startTimestamp:t,centralTimestamp:t}}build(){return this.pendingSample&&(this.samples.length>0?this.appendSampleWithWeight(this.pendingSample.stack,this.pendingSample.centralTimestamp-this.pendingSample.startTimestamp):(this.appendSampleWithWeight(this.pendingSample.stack,1),this.setValueFormatter(new t.RawValueFormatter))),this.totalWeight=Math.max(this.totalWeight,this.weights.reduce((e,t)=>e+t,0)),this.sortGroupedCallTree(),this}}exports.StackListProfileBuilder=n;class h extends o{constructor(){super(...arguments),this.appendOrderStack=[this.appendOrderCalltreeRoot],this.groupedOrderStack=[this.groupedCalltreeRoot],this.framesInStack=new Map,this.stack=[],this.lastValue=0}addWeightsToFrames(t){const r=t-this.lastValue;for(let e of this.framesInStack.keys())e.addToTotalWeight(r);const s=(0,e.lastOf)(this.stack);s&&s.addToSelfWeight(r)}addWeightsToNodes(t,r){const s=t-this.lastValue;for(let e of r)e.addToTotalWeight(s);const a=(0,e.lastOf)(r);a&&a.addToSelfWeight(s)}_enterFrame(t,r,s){let a=s?this.appendOrderStack:this.groupedOrderStack;this.addWeightsToNodes(r,a);let i=(0,e.lastOf)(a);if(i){if(s){const e=r-this.lastValue;if(e>0)this.samples.push(i),this.weights.push(r-this.lastValue);else if(e<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${r}`)}const o=s?(0,e.lastOf)(i.children):i.children.find(e=>e.frame===t);let n;o&&!o.isFrozen()&&o.frame==t?n=o:(n=new l(t,i),i.children.push(n)),a.push(n)}}enterFrame(e,t){const r=i.getOrInsert(this.frames,e);this.addWeightsToFrames(t),this._enterFrame(r,t,!0),this._enterFrame(r,t,!1),this.stack.push(r);const s=this.framesInStack.get(r)||0;this.framesInStack.set(r,s+1),this.lastValue=t,this.totalWeight=Math.max(this.totalWeight,this.lastValue)}_leaveFrame(e,t,r){let s=r?this.appendOrderStack:this.groupedOrderStack;if(this.addWeightsToNodes(t,s),r){const r=this.appendOrderStack.pop();if(null==r)throw new Error(`Trying to leave ${e.key} when stack is empty`);if(null==this.lastValue)throw new Error(`Trying to leave a ${e.key} before any have been entered`);if(r.freeze(),r.frame.key!==e.key)throw new Error(`Tried to leave frame "${e.name}" while frame "${r.frame.name}" was at the top at ${t}`);const s=t-this.lastValue;if(s>0)this.samples.push(r),this.weights.push(t-this.lastValue);else if(s<0)throw new Error(`Samples must be provided in increasing order of cumulative value. Last sample was ${this.lastValue}, this sample was ${t}`)}else this.groupedOrderStack.pop()}leaveFrame(e,t){const r=i.getOrInsert(this.frames,e);this.addWeightsToFrames(t),this._leaveFrame(r,t,!0),this._leaveFrame(r,t,!1),this.stack.pop();const s=this.framesInStack.get(r);null!=s&&(1===s?this.framesInStack.delete(r):this.framesInStack.set(r,s-1),this.lastValue=t,this.totalWeight=Math.max(this.totalWeight,this.lastValue))}build(){if(this.appendOrderStack.length>1||this.groupedOrderStack.length>1)throw new Error("Tried to complete profile construction with a non-empty stack");return this.sortGroupedCallTree(),this}}exports.CallTreeProfileBuilder=h;
175
+ },{"./utils":"ucYa","./value-formatters":"LsM4","_bundle_loader":"TUK3","./demangle-cpp":[["demangle-cpp.1768f4cc.js","bS28"],"demangle-cpp.1768f4cc.js.map","bS28"]}],"x8nU":[function(require,module,exports) {
176
+ "use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileFormat=void 0,exports.FileFormat=e,function(e){let t,o;!function(e){e.EVENTED="evented",e.SAMPLED="sampled"}(t=e.ProfileType||(e.ProfileType={})),function(e){e.OPEN_FRAME="O",e.CLOSE_FRAME="C"}(o=e.EventType||(e.EventType={}))}(e||(exports.FileFormat=e={}));
177
+ },{}],"EHrm":[function(require,module,exports) {
178
+ module.exports={name:"speedscope",version:"1.12.1",description:"",repository:"jlfwong/speedscope",main:"index.js",bin:{speedscope:"./bin/cli.js"},scripts:{deploy:"./scripts/deploy.sh",prepack:"./scripts/build-release.sh",prettier:"prettier --write 'src/**/*.ts' 'src/**/*.tsx'",lint:"eslint 'src/**/*.ts' 'src/**/*.tsx'",jest:"./scripts/test-setup.sh && jest --runInBand",coverage:"npm run jest -- --coverage",typecheck:"tsc --noEmit",test:"./scripts/ci.sh",serve:"parcel assets/index.html --open --no-autoinstall"},files:["bin/cli.js","dist/release/**","!*.map"],browserslist:["last 2 Chrome versions","last 2 Firefox versions"],author:"",license:"MIT",devDependencies:{"@types/jest":"22.2.3","@types/jszip":"3.1.4","@types/node":"14.0.1","@types/pako":"1.0.0","@typescript-eslint/eslint-plugin":"2.33.0","@typescript-eslint/parser":"2.33.0",acorn:"7.2.0",aphrodite:"2.1.0",eslint:"6.0.0","eslint-plugin-prettier":"2.6.0","eslint-plugin-react-hooks":"4.0.2",jest:"24.3.0",jsverify:"0.8.3",jszip:"3.1.5",pako:"1.0.6","parcel-bundler":"1.12.4",preact:"10.4.1",prettier:"2.0.4",protobufjs:"6.8.8",redux:"^4.0.5","source-map":"0.6.1","ts-jest":"24.3.0",typescript:"3.9.2","typescript-eslint-parser":"17.0.1","typescript-json-schema":"0.42.0","uglify-es":"3.2.2"},jest:{transform:{"^.+\\.tsx?$":"ts-jest"},setupFilesAfterEnv:["./src/jest-setup.js"],testRegex:"\\.test\\.tsx?$",collectCoverageFrom:["**/*.{ts,tsx}","!**/*.d.{ts,tsx}"],moduleFileExtensions:["ts","tsx","js","jsx","json"]},dependencies:{open:"7.2.0"}};
179
+ },{}],"Xzb6":[function(require,module,exports) {
180
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.exportProfileGroup=r,exports.importSpeedscopeProfiles=s,exports.saveToFile=l;var e=require("./profile"),t=require("./value-formatters"),n=require("./file-format-spec");function r(e){const t=[],n=new Map;function r(e){let r=n.get(e);if(null==r){const o={name:e.name};null!=e.file&&(o.file=e.file),null!=e.line&&(o.line=e.line),null!=e.col&&(o.col=e.col),r=t.length,n.set(e,r),t.push(o)}return r}const a={exporter:`speedscope@${require("../../package.json").version}`,name:e.name,activeProfileIndex:e.indexToView,$schema:"https://www.speedscope.app/file-format-schema.json",shared:{frames:t},profiles:[]};for(let s of e.profiles)a.profiles.push(o(s,r));return a}function o(e,t){const r={type:n.FileFormat.ProfileType.EVENTED,name:e.getName(),unit:e.getWeightUnit(),startValue:0,endValue:e.getTotalWeight(),events:[]};return e.forEachCall((e,o)=>{r.events.push({type:n.FileFormat.EventType.OPEN_FRAME,frame:t(e.frame),at:o})},(e,o)=>{r.events.push({type:n.FileFormat.EventType.CLOSE_FRAME,frame:t(e.frame),at:o})}),r}function a(r,o){function a(e){const{name:n,unit:o}=r;switch(o){case"nanoseconds":case"microseconds":case"milliseconds":case"seconds":e.setValueFormatter(new t.TimeFormatter(o));break;case"bytes":e.setValueFormatter(new t.ByteFormatter);break;case"none":e.setValueFormatter(new t.RawValueFormatter)}e.setName(n)}switch(r.type){case n.FileFormat.ProfileType.EVENTED:return function(t){const{startValue:r,endValue:s,events:l}=t,i=new e.CallTreeProfileBuilder(s-r);a(i);const c=o.map((e,t)=>Object.assign({key:t},e));for(let e of l)switch(e.type){case n.FileFormat.EventType.OPEN_FRAME:i.enterFrame(c[e.frame],e.at-r);break;case n.FileFormat.EventType.CLOSE_FRAME:i.leaveFrame(c[e.frame],e.at-r)}return i.build()}(r);case n.FileFormat.ProfileType.SAMPLED:return function(t){const{startValue:n,endValue:r,samples:s,weights:l}=t,i=new e.StackListProfileBuilder(r-n);a(i);const c=o.map((e,t)=>Object.assign({key:t},e));if(s.length!==l.length)throw new Error(`Expected samples.length (${s.length}) to equal weights.length (${l.length})`);for(let e=0;e<s.length;e++){const t=s[e],n=l[e];i.appendSampleWithWeight(t.map(e=>c[e]),n)}return i.build()}(r)}}function s(e){return{name:e.name||e.profiles[0].name||"profile",indexToView:e.activeProfileIndex||0,profiles:e.profiles.map(t=>a(t,e.shared.frames))}}function l(e){const t=r(e),n=new Blob([JSON.stringify(t)],{type:"text/json"}),o=`${(t.name?t.name.split(".")[0]:"profile").replace(/\W+/g,"_")}.speedscope.json`;console.log("Saving",o);const a=document.createElement("a");a.download=o,a.href=window.URL.createObjectURL(n),a.dataset.downloadurl=["text/json",a.download,a.href].join(":"),document.body.appendChild(a),a.click(),document.body.removeChild(a)}
181
+ },{"./profile":"YG8z","./value-formatters":"LsM4","./file-format-spec":"x8nU","../../package.json":"EHrm"}],"tOar":[function(require,module,exports) {
182
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProfileSelectRow=a,exports.ProfileSelect=u;var e=require("preact"),o=require("preact/hooks"),r=require("aphrodite"),l=require("./style"),t=require("../lib/fuzzy-find"),i=require("../lib/utils"),n=require("./themes/theme");function s(o,r,l){const t=[];let i=0;for(let n of r)t.push(o.slice(i,n[0])),t.push((0,e.h)("span",{className:l},o.slice(n[0],n[1]))),i=n[1];return t.push(o.slice(i)),(0,e.h)("span",null,t)}function a({setProfileIndexToView:l,setHoveredProfileIndex:t,profile:i,selected:a,hovered:c,profileCount:d,nodeRef:u,closeProfileSelect:p,indexInProfileGroup:h,matchedRanges:g,indexInFilteredListView:m}){const b=f((0,n.useTheme)()),x=(0,o.useCallback)(()=>{p(),l(h)},[p,l,h]),I=(0,o.useCallback)(e=>{t(h)},[t,h]),P=i.getName(),w=1+Math.floor(Math.log10(d)),y=(0,r.css)(b.highlighted),S=(0,o.useMemo)(()=>{return s(P,g,y)},[P,g,y]);return(0,e.h)("div",{ref:u,onMouseUp:x,onMouseEnter:I,title:P,className:(0,r.css)(b.profileRow,m%2==0&&b.profileRowEven,a&&b.profileRowSelected,c&&b.profileRowHovered)},(0,e.h)("span",{className:(0,r.css)(b.profileIndex,a&&b.profileIndexSelected),style:{width:w+"em"}},h+1,":")," ",S)}function c(e){e.stopPropagation()}function d(e,o){const r=[];for(let l=0;l<e.length;l++){const i=e[l],n=(0,t.fuzzyMatchStrings)(i.getName(),o);n&&r.push(Object.assign({indexInProfileGroup:l,profile:i},n))}return(0,i.sortBy)(r,e=>-e.score),r}function u({profiles:l,closeProfileSelect:t,indexToView:i,visible:s,setProfileIndexToView:u}){const p=f((0,n.useTheme)()),[h,g]=(0,o.useState)(""),m=(0,o.useCallback)(e=>{const o=e.target.value;g(o)},[g]),b=(0,o.useCallback)(e=>{e&&(s?e.select():e.blur())},[s]),x=(0,o.useMemo)(()=>d(l,h),[l,h]),[I,P]=(0,o.useState)(0),w=(0,o.useRef)(null);(0,o.useEffect)(()=>{s&&(P(null),null!==w.current&&w.current.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}))},[s]);const y=(0,o.useCallback)(e=>{e.stopPropagation();let o=null;switch(e.key){case"Enter":null!=I&&(t(),u(I));break;case"Escape":t();break;case"ArrowDown":if(e.preventDefault(),o=0,null!=I){const e=x.findIndex(e=>e.indexInProfileGroup===I);-1!==e&&(o=e+1)}break;case"ArrowUp":if(e.preventDefault(),o=x.length-1,null!=I){const e=x.findIndex(e=>e.indexInProfileGroup===I);-1!==e&&(o=e-1)}}if(null!=o&&o>=0&&o<x.length){const e=x[o].indexInProfileGroup;P(e),v(!0)}},[t,u,I,x]),[S,v]=(0,o.useState)(!1);(0,o.useEffect)(()=>{x.length>0&&(P(x[0].indexInProfileGroup),v(!0))},[P,x]);const C=(0,o.useCallback)(e=>{S&&e&&(e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),v(!1))},[S,v]),k=(0,o.useCallback)(e=>{w.current=e,C(e)},[w,C]);return(0,e.h)("div",{className:(0,r.css)(p.profileSelectOuter)},(0,e.h)("div",{className:(0,r.css)(p.caret)}),(0,e.h)("div",{className:(0,r.css)(p.profileSelectBox)},(0,e.h)("div",{className:(0,r.css)(p.filterInputContainer)},(0,e.h)("input",{type:"text",className:(0,r.css)(p.filterInput),ref:b,placeholder:"Filter...",value:h,onInput:m,onKeyDown:y,onKeyUp:c,onKeyPress:c})),(0,e.h)("div",{className:(0,r.css)(p.profileSelectScrolling)},x.map(({profile:o,matchedRanges:r,indexInProfileGroup:n},s)=>{let c=void 0;const d=n===i,p=n===I;return d&&p?c=k:d?c=w:p&&(c=C),(0,e.h)(a,{setHoveredProfileIndex:P,indexInProfileGroup:n,indexInFilteredListView:s,hovered:n==I,selected:n===i,profile:o,profileCount:l.length,nodeRef:c,matchedRanges:r,setProfileIndexToView:u,closeProfileSelect:t})}),0===x.length?(0,e.h)("div",{className:(0,r.css)(p.profileRow)},'No results match filter "',h,'"'):null)))}const p=10,f=(0,n.withTheme)(e=>r.StyleSheet.create({filterInputContainer:{display:"flex",flexDirection:"column",padding:5,alignItems:"stretch"},filterInput:{color:e.altFgPrimaryColor,background:e.altBgSecondaryColor,borderRadius:5,padding:5,":focus":{border:"none",outline:"none"},"::selection":{color:e.altFgPrimaryColor,background:e.selectionPrimaryColor}},caret:{width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:"5px solid black"},highlighted:{background:e.selectionSecondaryColor},padding:{height:10,background:e.altBgPrimaryColor},profileRow:{height:l.Sizes.FRAME_HEIGHT-2,border:"1px solid transparent",textAlign:"left",paddingLeft:10,paddingRight:10,background:e.altBgPrimaryColor,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer"},profileRowHovered:{border:`1px solid ${e.selectionPrimaryColor}`},profileRowSelected:{background:e.selectionPrimaryColor},profileRowEven:{background:e.altBgSecondaryColor},profileSelectScrolling:{maxHeight:`min(calc(100vh - ${l.Sizes.TOOLBAR_HEIGHT-20}px), ${20*l.Sizes.FRAME_HEIGHT}px)`,overflow:"auto","::-webkit-scrollbar":{background:e.altBgPrimaryColor},"::-webkit-scrollbar-thumb":{background:e.altFgSecondaryColor,borderRadius:20,border:`3px solid ${e.altBgPrimaryColor}`,":hover":{background:e.altBgPrimaryColor}}},profileSelectBox:{width:"100%",paddingBottom:10,background:e.altBgPrimaryColor,color:e.altFgPrimaryColor},profileSelectOuter:{width:"100%",maxWidth:480,margin:"0 auto",position:"relative",zIndex:l.ZIndex.PROFILE_SELECT,alignItems:"center",display:"flex",flexDirection:"column"},profileIndex:{textAlign:"right",display:"inline-block",color:e.altFgSecondaryColor},profileIndexSelected:{color:e.altFgPrimaryColor}}));
183
+ },{"preact":"aSor","preact/hooks":"MwGB","aphrodite":"CxN7","./style":"hvr4","../lib/fuzzy-find":"C6HJ","../lib/utils":"ucYa","./themes/theme":"gzKG"}],"BPHY":[function(require,module,exports) {
184
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Toolbar=p;var e=require("../store"),o=require("preact"),t=require("preact/hooks"),i=require("aphrodite"),s=require("./style"),l=require("./profile-select"),r=require("../lib/utils"),a=require("./themes/theme"),n=require("../lib/preact-redux"),c=require("../store/actions");function h(e,o){return(0,t.useCallback)(()=>e(o),[e,o])}function d(t){const s=g((0,a.useTheme)()),l=h(t.setViewMode,e.ViewMode.CHRONO_FLAME_CHART),r=h(t.setViewMode,e.ViewMode.LEFT_HEAVY_FLAME_GRAPH),n=h(t.setViewMode,e.ViewMode.SANDWICH_VIEW);return t.activeProfileState?(0,o.h)("div",{className:(0,i.css)(s.toolbarLeft)},(0,o.h)("div",{className:(0,i.css)(s.toolbarTab,t.viewMode===e.ViewMode.CHRONO_FLAME_CHART&&s.toolbarTabActive),onClick:l},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"🕰"),"Time Order"),(0,o.h)("div",{className:(0,i.css)(s.toolbarTab,t.viewMode===e.ViewMode.LEFT_HEAVY_FLAME_GRAPH&&s.toolbarTabActive),onClick:r},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"⬅️"),"Left Heavy"),(0,o.h)("div",{className:(0,i.css)(s.toolbarTab,t.viewMode===e.ViewMode.SANDWICH_VIEW&&s.toolbarTabActive),onClick:n},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"🥪"),"Sandwich")):null}const m=(()=>{let e=null;return o=>{let t=(null==o?void 0:o.profiles.map(e=>e.profile))||null;return(null===e||null!=t&&!(0,r.objectsHaveShallowEquality)(e,t))&&(e=t),e}})();function u(e){const s=g((0,a.useTheme)()),{activeProfileState:r,profileGroup:n}=e,c=m(n),[h,d]=(0,t.useState)(!1),u=(0,t.useCallback)(()=>{d(!0)},[d]),b=(0,t.useCallback)(()=>{d(!1)},[d]);return(0,t.useEffect)(()=>{const e=e=>{"t"===e.key&&(e.preventDefault(),d(!0))};return window.addEventListener("keypress",e),()=>{window.removeEventListener("keypress",e)}},[d]),(0,t.useEffect)(()=>{const e=e=>{"t"===e.key&&(e.preventDefault(),d(!0))};return window.addEventListener("keypress",e),()=>{window.removeEventListener("keypress",e)}},[d]),r&&n&&c?1===n.profiles.length?(0,o.h)(o.Fragment,null,r.profile.getName()):(0,o.h)("div",{className:(0,i.css)(s.toolbarCenter),onMouseLeave:b},(0,o.h)("span",{onMouseOver:u},r.profile.getName()," ",(0,o.h)("span",{className:(0,i.css)(s.toolbarProfileIndex)},"(",r.index+1,"/",n.profiles.length,")")),(0,o.h)("div",{style:{display:h?"block":"none"}},(0,o.h)(l.ProfileSelect,{setProfileIndexToView:e.setProfileIndexToView,indexToView:n.indexToView,profiles:c,closeProfileSelect:b,visible:h}))):(0,o.h)(o.Fragment,null,"🔬speedscope")}function b(t){const s=g((0,a.useTheme)()),l=(0,e.useAppSelector)(e=>e.colorScheme,[]),r=(0,o.h)("div",{className:(0,i.css)(s.toolbarTab),onClick:t.saveFile},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"⤴️"),"Export"),h=(0,o.h)("div",{className:(0,i.css)(s.toolbarTab),onClick:t.browseForFile},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"⤵️"),"Import"),d=(0,n.useActionCreator)(()=>c.actions.setColorScheme((0,a.nextColorScheme)(l)),[l]),m=(0,o.h)("div",{className:(0,i.css)(s.toolbarTab),onClick:d},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"🎨"),(0,o.h)("span",{className:(0,i.css)(s.toolbarTabColorSchemeToggle)},(0,a.colorSchemeToString)(l))),u=(0,o.h)("div",{className:(0,i.css)(s.toolbarTab)},(0,o.h)("a",{href:"https://github.com/jlfwong/speedscope#usage",className:(0,i.css)(s.noLinkStyle),target:"_blank"},(0,o.h)("span",{className:(0,i.css)(s.emoji)},"❓"),"Help"));return(0,o.h)("div",{className:(0,i.css)(s.toolbarRight)},t.activeProfileState&&r,h,m,u)}function p(e){const t=g((0,a.useTheme)());return(0,o.h)("div",{className:(0,i.css)(t.toolbar)},(0,o.h)(d,Object.assign({},e)),(0,o.h)(u,Object.assign({},e)),(0,o.h)(b,Object.assign({},e)))}const g=(0,a.withTheme)(e=>i.StyleSheet.create({toolbar:{height:s.Sizes.TOOLBAR_HEIGHT,flexShrink:0,background:e.altBgPrimaryColor,color:e.altFgPrimaryColor,textAlign:"center",fontFamily:s.FontFamily.MONOSPACE,fontSize:s.FontSize.TITLE,lineHeight:`${s.Sizes.TOOLBAR_TAB_HEIGHT}px`,userSelect:"none"},toolbarLeft:{position:"absolute",height:s.Sizes.TOOLBAR_HEIGHT,overflow:"hidden",top:0,left:0,marginRight:2,textAlign:"left"},toolbarCenter:{paddingTop:1,height:s.Sizes.TOOLBAR_HEIGHT},toolbarRight:{height:s.Sizes.TOOLBAR_HEIGHT,overflow:"hidden",position:"absolute",top:0,right:0,marginRight:2,textAlign:"right"},toolbarProfileIndex:{color:e.altFgSecondaryColor},toolbarTab:{background:e.altBgSecondaryColor,marginTop:s.Sizes.SEPARATOR_HEIGHT,height:s.Sizes.TOOLBAR_TAB_HEIGHT,lineHeight:`${s.Sizes.TOOLBAR_TAB_HEIGHT}px`,paddingLeft:2,paddingRight:8,display:"inline-block",marginLeft:2,transition:`all ${s.Duration.HOVER_CHANGE} ease-in`,":hover":{background:e.selectionSecondaryColor}},toolbarTabActive:{background:e.selectionPrimaryColor,":hover":{background:e.selectionPrimaryColor}},toolbarTabColorSchemeToggle:{display:"inline-block",textAlign:"center",minWidth:"50px"},emoji:{display:"inline-block",verticalAlign:"middle",paddingTop:"0px",marginRight:"0.3em"},noLinkStyle:{textDecoration:"none",color:"inherit"}}));
185
+ },{"../store":"LSXo","preact":"aSor","preact/hooks":"MwGB","aphrodite":"CxN7","./style":"hvr4","./profile-select":"tOar","../lib/utils":"ucYa","./themes/theme":"gzKG","../lib/preact-redux":"Erwv","../store/actions":"M9Ab"}],"bv0g":[function(require,module,exports) {
186
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importJavaScriptSourceMapSymbolRemapper=r;var e=require("./utils"),n=function(e,n,o,l){return new(o||(o=Promise))(function(r,i){function t(e){try{a(l.next(e))}catch(n){i(n)}}function u(e){try{a(l.throw(e))}catch(n){i(n)}}function a(e){var n;e.done?r(e.value):(n=e.value,n instanceof o?n:new o(function(e){e(n)})).then(t,u)}a((l=l.apply(e,n||[])).next())})};const o=require("_bundle_loader")(require.resolve("source-map")),l=!1;function r(r,i){return n(this,void 0,void 0,function*(){const n=yield o;let t=null,u=null;try{u=JSON.parse(r),t=new n.SourceMapConsumer(u)}catch(s){return null}const a=[];t.eachMapping(function(e){a.push(Object.assign(Object.assign({},e),{generatedColumn:e.generatedColumn+1,originalColumn:e.originalColumn+1}))},{},n.SourceMapConsumer.GENERATED_ORDER);const c=i.replace(/\.[^/]*$/,"");return n=>{var o;let r=!1;if((null==u?void 0:u.file)&&(null==u?void 0:u.file)===n.file?r=!0:("/"+(null===(o=n.file)||void 0===o?void 0:o.replace(/\.[^/]*$/,""))).endsWith("/"+c)&&(r=!0),!r)return null;if(null==n.line||null==n.col)return null;let i=(0,e.findIndexBisect)(a,e=>e.generatedLine>n.line||!(e.generatedLine<n.line)&&e.generatedColumn>=n.col);if(-1===i)i=a.length-1;else{if(0===i)return null;i--}const s=a[i],m={};if(null!=s.name)m.name=s.name;else if(null!=s.source){const e=null==t?void 0:t.sourceContentFor(s.source,!0);if(e){const n=e.split("\n")[s.originalLine-1];if(n){const e=/\w+/.exec(n.substr(s.originalColumn-1));e&&(m.name=e[0])}}}switch(m.name){case"constructor":m.name=n.name+" constructor";break;case"function":m.name=n.name;break;case"const":case"export":m.name=n.name}return m.name&&n.name.includes(m.name)&&(m.name=n.name),null!=s.source&&(m.file=s.source,m.line=s.originalLine,m.col=s.originalColumn),l&&(console.groupCollapsed(`Remapping "${n.name}" -> "${m.name}"`),console.log("before",Object.assign({},n)),console.log("item @ index",s),console.log("item @ index + 1",a[i+1]),console.log("after",m),console.groupEnd()),m}})}
187
+ },{"_bundle_loader":"TUK3","source-map":[["source-map.438fa06b.js","aRf0"],"source-map.438fa06b.js.map","aRf0"],"./utils":"ucYa"}],"ThNa":[function(require,module,exports) {
188
+ module.exports="perf-vertx-stacks-01-collapsed-all.2681da68.txt";
189
+ },{}],"wCGh":[function(require,module,exports) {
190
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Application=exports.GLCanvas=void 0;var e=require("preact"),t=require("aphrodite"),o=require("./style"),i=require("../lib/emscripten"),r=require("./sandwich-view"),s=require("../lib/file-format"),n=require("../store"),a=require("../lib/typed-redux"),l=require("./flamechart-view-container"),c=require("./toolbar"),p=require("../lib/js-source-map"),d=require("./themes/theme"),h=function(e,t,o,i){return new(o||(o=Promise))(function(r,s){function n(e){try{l(i.next(e))}catch(t){s(t)}}function a(e){try{l(i.throw(e))}catch(t){s(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(n,a)}l((i=i.apply(e,t||[])).next())})};const u=require("_bundle_loader")(require.resolve("../import"));function f(e,t){return h(this,void 0,void 0,function*(){return(yield u).importProfileGroupFromText(e,t)})}function m(e,t){return h(this,void 0,void 0,function*(){return(yield u).importProfileGroupFromBase64(e,t)})}function v(e,t){return h(this,void 0,void 0,function*(){return(yield u).importProfilesFromArrayBuffer(e,t)})}function g(e){return h(this,void 0,void 0,function*(){return(yield u).importProfilesFromFile(e)})}function w(e){return h(this,void 0,void 0,function*(){return(yield u).importFromFileSystemDirectoryEntry(e)})}u.then(()=>{}),require("_bundle_loader")(require.resolve("../lib/demangle-cpp")).then(()=>{}),require("_bundle_loader")(require.resolve("source-map")).then(()=>{});const y=require("../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt");class x extends a.StatelessComponent{constructor(){super(...arguments),this.canvas=null,this.ref=(e=>{e instanceof HTMLCanvasElement?this.canvas=e:this.canvas=null,this.props.setGLCanvas(this.canvas)}),this.container=null,this.containerRef=(e=>{e instanceof HTMLElement?this.container=e:this.container=null}),this.maybeResize=(()=>{if(!this.container)return;if(!this.props.canvasContext)return;let{width:e,height:t}=this.container.getBoundingClientRect();const o=e,i=t,r=e*window.devicePixelRatio,s=t*window.devicePixelRatio;this.props.canvasContext.gl.resize(r,s,o,i)}),this.onWindowResize=(()=>{this.props.canvasContext&&this.props.canvasContext.requestFrame()})}componentWillReceiveProps(e){this.props.canvasContext!==e.canvasContext&&(this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),e.canvasContext&&(e.canvasContext.addBeforeFrameHandler(this.maybeResize),e.canvasContext.requestFrame()))}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){this.props.canvasContext&&this.props.canvasContext.removeBeforeFrameHandler(this.maybeResize),window.removeEventListener("resize",this.onWindowResize)}render(){const o=C(this.props.theme);return(0,e.h)("div",{ref:this.containerRef,className:(0,t.css)(o.glCanvasView)},(0,e.h)("canvas",{ref:this.ref,width:1,height:1}))}}exports.GLCanvas=x;class b extends a.StatelessComponent{constructor(){super(...arguments),this.loadExample=(()=>{this.loadProfile(()=>h(this,void 0,void 0,function*(){const e=yield fetch(y).then(e=>e.text());return yield f("perf-vertx-stacks-01-collapsed-all.txt",e)}))}),this.onDrop=(e=>{if(this.props.setDragActive(!1),e.preventDefault(),!e.dataTransfer)return;const t=e.dataTransfer.items[0];if("webkitGetAsEntry"in t){const e=t.webkitGetAsEntry();if(e.isDirectory&&e.name.endsWith(".trace"))return console.log("Importing as Instruments.app .trace file"),void this.loadProfile(()=>h(this,void 0,void 0,function*(){return yield w(e)}))}let o=e.dataTransfer.files.item(0);o&&this.loadFromFile(o)}),this.onDragOver=(e=>{this.props.setDragActive(!0),e.preventDefault()}),this.onDragLeave=(e=>{this.props.setDragActive(!1),e.preventDefault()}),this.onWindowKeyPress=(e=>h(this,void 0,void 0,function*(){if("1"===e.key)this.props.setViewMode(n.ViewMode.CHRONO_FLAME_CHART);else if("2"===e.key)this.props.setViewMode(n.ViewMode.LEFT_HEAVY_FLAME_GRAPH);else if("3"===e.key)this.props.setViewMode(n.ViewMode.SANDWICH_VIEW);else if("r"===e.key){const{flattenRecursion:e}=this.props;this.props.setFlattenRecursion(!e)}else if("n"===e.key){const{activeProfileState:e}=this.props;e&&this.props.setProfileIndexToView(e.index+1)}else if("p"===e.key){const{activeProfileState:e}=this.props;e&&this.props.setProfileIndexToView(e.index-1)}})),this.saveFile=(()=>{if(this.props.profileGroup){const{name:e,indexToView:t,profiles:o}=this.props.profileGroup,i={name:e,indexToView:t,profiles:o.map(e=>e.profile)};(0,s.saveToFile)(i)}}),this.browseForFile=(()=>{const e=document.createElement("input");e.type="file",e.addEventListener("change",this.onFileSelect),e.click()}),this.onWindowKeyDown=(e=>h(this,void 0,void 0,function*(){"s"===e.key&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),this.saveFile()):"o"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.browseForFile())})),this.onDocumentPaste=(e=>{e.preventDefault(),e.stopPropagation();const t=e.clipboardData;if(!t)return;const o=t.getData("text");this.loadProfile(()=>h(this,void 0,void 0,function*(){return yield f("From Clipboard",o)}))}),this.onFileSelect=(e=>{const t=e.target.files.item(0);t&&this.loadFromFile(t)})}loadProfile(e){return h(this,void 0,void 0,function*(){if(this.props.setLoading(!0),yield new Promise(e=>setTimeout(e,0)),!this.props.glCanvas)return;console.time("import");let t=null;try{t=yield e()}catch(o){return console.log("Failed to load format",o),void this.props.setError(!0)}if(null==t)return alert("Unrecognized format! See documentation about supported formats."),void this.props.setLoading(!1);if(0===t.profiles.length)return alert("Successfully imported profile, but it's empty!"),void this.props.setLoading(!1);this.props.hashParams.title&&(t=Object.assign(Object.assign({},t),{name:this.props.hashParams.title})),document.title=`${t.name} - speedscope`;for(let e of t.profiles)yield e.demangle();for(let e of t.profiles){const t=this.props.hashParams.title||e.getName();e.setName(t)}console.timeEnd("import"),this.props.setProfileGroup(t),this.props.setLoading(!1)})}getStyle(){return C(this.props.theme)}loadFromFile(e){this.loadProfile(()=>h(this,void 0,void 0,function*(){const t=yield g(e);if(t){for(let o of t.profiles)o.getName()||o.setName(e.name);return t}if(this.props.profileGroup&&this.props.activeProfileState){const t=new FileReader,o=new Promise(e=>{t.addEventListener("loadend",()=>{if("string"!=typeof t.result)throw new Error("Expected reader.result to be a string");e(t.result)})});t.readAsText(e);const r=yield o;let s=null;const n=(0,i.importEmscriptenSymbolMap)(r);n&&(console.log("Importing as emscripten symbol map"),s=n);const a=yield(0,p.importJavaScriptSourceMapSymbolRemapper)(r,e.name);if(!s&&a&&(console.log("Importing as JavaScript source map"),s=a),null!=s)return{name:this.props.profileGroup.name||"profile",indexToView:this.props.profileGroup.indexToView,profiles:this.props.profileGroup.profiles.map(e=>{const t=e.profile.shallowClone();return t.remapSymbols(s),t})}}return null}))}componentDidMount(){window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keypress",this.onWindowKeyPress),document.addEventListener("paste",this.onDocumentPaste),this.maybeLoadHashParamProfile()}componentWillUnmount(){window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keypress",this.onWindowKeyPress),document.removeEventListener("paste",this.onDocumentPaste)}maybeLoadHashParamProfile(){return h(this,void 0,void 0,function*(){if(this.props.hashParams.profileURL){if(!n.canUseXHR)return void alert(`Cannot load a profile URL when loading from "${window.location.protocol}" URL protocol`);this.loadProfile(()=>h(this,void 0,void 0,function*(){const e=yield fetch(this.props.hashParams.profileURL);let t=new URL(this.props.hashParams.profileURL).pathname;return t.includes("/")&&(t=t.slice(t.lastIndexOf("/")+1)),yield v(t,yield e.arrayBuffer())}))}else if(this.props.hashParams.localProfilePath){window.speedscope={loadFileFromBase64:(e,t)=>{this.loadProfile(()=>m(e,t))}};const e=document.createElement("script");e.src=`file:///${this.props.hashParams.localProfilePath}`,document.head.appendChild(e)}})}renderLanding(){const o=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(o.landingContainer)},(0,e.h)("div",{className:(0,t.css)(o.landingMessage)},(0,e.h)("p",{className:(0,t.css)(o.landingP)},"👋 Hi there! Welcome to 🔬speedscope, an interactive"," ",(0,e.h)("a",{className:(0,t.css)(o.link),href:"http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html"},"flamegraph")," ","visualizer. Use it to help you make your software faster."),n.canUseXHR?(0,e.h)("p",{className:(0,t.css)(o.landingP)},"Drag and drop a profile file onto this window to get started, click the big blue button below to browse for a profile to explore, or"," ",(0,e.h)("a",{tabIndex:0,className:(0,t.css)(o.link),onClick:this.loadExample},"click here")," ","to load an example profile."):(0,e.h)("p",{className:(0,t.css)(o.landingP)},"Drag and drop a profile file onto this window to get started, or click the big blue button below to browse for a profile to explore."),(0,e.h)("div",{className:(0,t.css)(o.browseButtonContainer)},(0,e.h)("input",{type:"file",name:"file",id:"file",onChange:this.onFileSelect,className:(0,t.css)(o.hide)}),(0,e.h)("label",{for:"file",className:(0,t.css)(o.browseButton),tabIndex:0},"Browse")),(0,e.h)("p",{className:(0,t.css)(o.landingP)},"See the"," ",(0,e.h)("a",{className:(0,t.css)(o.link),href:"https://github.com/jlfwong/speedscope#usage",target:"_blank"},"documentation")," ","for information about supported file formats, keyboard shortcuts, and how to navigate around the profile."),(0,e.h)("p",{className:(0,t.css)(o.landingP)},"speedscope is open source. Please"," ",(0,e.h)("a",{className:(0,t.css)(o.link),target:"_blank",href:"https://github.com/jlfwong/speedscope/issues"},"report any issues on GitHub"),".")))}renderError(){const o=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(o.error)},(0,e.h)("div",null,"😿 Something went wrong."),(0,e.h)("div",null,"Check the JS console for more details."))}renderLoadingBar(){const o=this.getStyle();return(0,e.h)("div",{className:(0,t.css)(o.loading)})}renderContent(){const{viewMode:t,activeProfileState:o,error:i,loading:s,glCanvas:a}=this.props;if(i)return this.renderError();if(s)return this.renderLoadingBar();if(!o||!a)return this.renderLanding();switch(t){case n.ViewMode.CHRONO_FLAME_CHART:return(0,e.h)(l.ChronoFlamechartView,{activeProfileState:o,glCanvas:a});case n.ViewMode.LEFT_HEAVY_FLAME_GRAPH:return(0,e.h)(l.LeftHeavyFlamechartView,{activeProfileState:o,glCanvas:a});case n.ViewMode.SANDWICH_VIEW:return(0,e.h)(r.SandwichViewContainer,{activeProfileState:o,glCanvas:a})}}render(){const o=this.getStyle();return(0,e.h)("div",{onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,className:(0,t.css)(o.root,this.props.dragActive&&o.dragTargetRoot)},(0,e.h)(x,{setGLCanvas:this.props.setGLCanvas,canvasContext:this.props.canvasContext,theme:this.props.theme}),(0,e.h)(c.Toolbar,Object.assign({saveFile:this.saveFile,browseForFile:this.browseForFile},this.props)),(0,e.h)("div",{className:(0,t.css)(o.contentContainer)},this.renderContent()),this.props.dragActive&&(0,e.h)("div",{className:(0,t.css)(o.dragTarget)}))}}exports.Application=b;const C=(0,d.withTheme)(e=>t.StyleSheet.create({glCanvasView:{position:"absolute",width:"100vw",height:"100vh",zIndex:-1,pointerEvents:"none"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},loading:{height:3,marginBottom:-3,background:e.selectionPrimaryColor,transformOrigin:"0% 50%",animationName:[{from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}}],animationTimingFunction:"cubic-bezier(0, 1, 0, 1)",animationDuration:"30s"},root:{width:"100vw",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",position:"relative",fontFamily:o.FontFamily.MONOSPACE,lineHeight:"20px",color:e.fgPrimaryColor},dragTargetRoot:{cursor:"copy"},dragTarget:{boxSizing:"border-box",position:"absolute",top:0,left:0,width:"100%",height:"100%",border:`5px dashed ${e.selectionPrimaryColor}`,pointerEvents:"none"},contentContainer:{position:"relative",display:"flex",overflow:"hidden",flexDirection:"column",flex:1},landingContainer:{display:"flex",alignItems:"center",justifyContent:"center",flex:1},landingMessage:{maxWidth:600},landingP:{marginBottom:16},hide:{display:"none"},browseButtonContainer:{display:"flex",alignItems:"center",justifyContent:"center"},browseButton:{marginBottom:16,height:72,flex:1,maxWidth:256,textAlign:"center",fontSize:o.FontSize.BIG_BUTTON,lineHeight:"72px",background:e.selectionPrimaryColor,color:e.altFgPrimaryColor,transition:`all ${o.Duration.HOVER_CHANGE} ease-in`,":hover":{background:e.selectionSecondaryColor}},link:{color:e.selectionPrimaryColor,cursor:"pointer",textDecoration:"none",transition:`all ${o.Duration.HOVER_CHANGE} ease-in`,":hover":{color:e.selectionSecondaryColor}}}));
191
+ },{"preact":"aSor","aphrodite":"CxN7","./style":"hvr4","../lib/emscripten":"FbpF","./sandwich-view":"L8J2","../lib/file-format":"Xzb6","../store":"LSXo","../lib/typed-redux":"UDzr","./flamechart-view-container":"PJJu","./toolbar":"BPHY","../lib/js-source-map":"bv0g","./themes/theme":"gzKG","_bundle_loader":"TUK3","../import":[["import.cf0fa83f.js","uRa7"],"import.cf0fa83f.js.map","uRa7"],"../lib/demangle-cpp":[["demangle-cpp.1768f4cc.js","bS28"],"demangle-cpp.1768f4cc.js.map","bS28"],"source-map":[["source-map.438fa06b.js","aRf0"],"source-map.438fa06b.js.map","aRf0"],"../../sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt":"ThNa"}],"A6uO":[function(require,module,exports) {
192
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApplicationContainer=void 0;var e=require("preact"),t=require("./application"),r=require("../store/getters"),o=require("../store/actions"),i=require("../lib/preact-redux"),s=require("preact/compat"),a=require("../store"),n=require("./search-view"),c=require("./themes/theme");const{setLoading:u,setError:l,setProfileGroup:p,setDragActive:C,setViewMode:v,setGLCanvas:A,setFlattenRecursion:d,setProfileIndexToView:g}=o.actions,h=(0,s.memo)(()=>{const o=(0,a.useAppSelector)(e=>e,[]),s=(0,c.useTheme)(),h=(0,a.useAppSelector)(e=>e.glCanvas?(0,r.getCanvasContext)({theme:s,canvas:e.glCanvas}):null,[s]);return(0,e.h)(n.ProfileSearchContextProvider,null,(0,e.h)(t.Application,Object.assign({activeProfileState:(0,a.useActiveProfileState)(),canvasContext:h,setGLCanvas:(0,i.useActionCreator)(A,[]),setLoading:(0,i.useActionCreator)(u,[]),setError:(0,i.useActionCreator)(l,[]),setProfileGroup:(0,i.useActionCreator)(p,[]),setDragActive:(0,i.useActionCreator)(C,[]),setViewMode:(0,i.useActionCreator)(v,[]),setFlattenRecursion:(0,i.useActionCreator)(d,[]),setProfileIndexToView:(0,i.useActionCreator)(g,[]),theme:s},o)))});exports.ApplicationContainer=h;
193
+ },{"preact":"aSor","./application":"wCGh","../store/getters":"hEOZ","../store/actions":"M9Ab","../lib/preact-redux":"Erwv","preact/compat":"AQ6k","../store":"LSXo","./search-view":"t9CM","./themes/theme":"gzKG"}],"K5F6":[function(require,module,exports) {
194
+ "use strict";var e=require("preact"),o=require("./store"),r=require("./views/application-container"),t=require("./lib/preact-redux"),i=require("./views/themes/theme");console.log(`speedscope v${require("../package.json").version}`),module.hot&&(module.hot.dispose(()=>{(0,e.render)((0,e.h)("div",null),document.body,document.body.lastElementChild||void 0)}),module.hot.accept());const d=window.store,n=d?(0,o.createAppStore)(d.getState()):(0,o.createAppStore)();window.store=n,(0,e.render)((0,e.h)(t.Provider,{store:n},(0,e.h)(i.ThemeProvider,null,(0,e.h)(r.ApplicationContainer,null))),document.body,document.body.lastElementChild||void 0);
195
+ },{"preact":"aSor","./store":"LSXo","./views/application-container":"A6uO","./lib/preact-redux":"Erwv","./views/themes/theme":"gzKG","../package.json":"EHrm"}],"Yi9z":[function(require,module,exports) {
196
+ module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})};
197
+ },{}],0:[function(require,module,exports) {
198
+ var b=require("TUK3");b.register("js",require("Yi9z"));
199
+ },{}]},{},[0,"K5F6"], null)
200
+ //# sourceMappingURL=speedscope.44364064.js.map
data/lib/html/vendor.js CHANGED
@@ -7,11 +7,11 @@
7
7
  MiniProfiler.templates = {};
8
8
  MiniProfiler.templates["profilerTemplate"] = function anonymous(it
9
9
  ) {
10
- var out=' <div class="profiler-result"> <div class="profiler-button ';if(it.has_duplicate_sql_timings){out+='profiler-warning';}out+='"> ';if(it.has_duplicate_sql_timings){out+='<span class="profiler-nuclear">!</span>';}out+=' <span class="profiler-number"> '+( MiniProfiler.formatDuration(it.duration_milliseconds))+' <span class="profiler-unit">ms</span> </span> ';if(MiniProfiler.showTotalSqlCount()){out+=' <span class="profiler-number"> '+( it.sql_count)+' <span class="profiler-unit">sql</span> </span> ';}out+=' </div> <div class="profiler-popup"> <div class="profiler-info"> <span class="profiler-name"> '+( it.name)+' <span class="profiler-overall-duration">('+( MiniProfiler.formatDuration(it.duration_milliseconds))+' ms)</span> </span> <span class="profiler-server-time">'+( it.machine_name)+' on '+( MiniProfiler.renderDate(it.started_formatted))+'</span> </div> <div class="profiler-output"> <table class="profiler-timings"> <thead> <tr> <th></th> <th>duration (ms)</th> <th class="profiler-duration-with-children">with children (ms)</th> <th class="time-from-start">from start (ms)</th> ';if(it.has_sql_timings){out+=' <th colspan="2">query time (ms)</th> ';}out+=' ';var arr1=it.custom_timing_names;if(arr1){var value,i1=-1,l1=arr1.length-1;while(i1<l1){value=arr1[i1+=1];out+=' <th colspan="2">'+( value.toLowerCase() )+' (ms)</th> ';} } out+=' </tr> </thead> <tbody> '+( MiniProfiler.templates.timingTemplate({timing: it.root, page: it}) )+' </tbody> <tfoot> <tr> <td colspan="3"> ';if(!it.client_timings){out+=' '+( MiniProfiler.templates.linksTemplate({timing: it.root, page: it}) )+' ';}out+=' <a class="profiler-toggle-duration-with-children" title="toggles column with aggregate child durations">show time with children</a> <a class="profiler-snapshots-page-link" title="Go to snapshots page" href="'+( MiniProfiler.options.path )+'snapshots">snapshots</a> </td> ';if(it.has_sql_timings){out+=' <td colspan="2" class="profiler-number profiler-percent-in-sql" title="'+( MiniProfiler.getSqlTimingsCount(it.root) )+' queries spent '+( MiniProfiler.formatDuration(it.duration_milliseconds_in_sql) )+' ms of total request time"> '+( MiniProfiler.formatDuration(it.duration_milliseconds_in_sql / it.duration_milliseconds * 100) )+' <span class="profiler-unit">% in sql</span> </td> ';}out+=' ';var arr2=it.custom_timing_names;if(arr2){var value,i2=-1,l2=arr2.length-1;while(i2<l2){value=arr2[i2+=1];out+=' <td colspan="2" class="profiler-number profiler-percentage-in-sql" title="'+( it.custom_timing_stats[value].count )+' '+( value.toLowerCase() )+' invocations spent '+( MiniProfiler.formatDuration(it.custom_timing_stats[value].duration) )+' ms of total request time"> '+( MiniProfiler.formatDuration(it.custom_timing_stats[value].duration / it.duration_milliseconds * 100) )+' <span class="profiler-unit">% in '+( value.toLowerCase() )+'</span> </td> ';} } out+=' </tr> </tfoot> </table> ';if(it.client_timings){out+=' <table class="profiler-timings profiler-client-timings"> <thead> <tr> <th>client event</th> <th>duration (ms)</th> <th>from start (ms)</th> </tr> </thead> <tbody> ';var arr3=MiniProfiler.getClientTimings(it.client_timings);if(arr3){var value,i3=-1,l3=arr3.length-1;while(i3<l3){value=arr3[i3+=1];out+=' <tr class="';if(value.isTrivial){out+='profiler-trivial';}out+='"> <td class="profiler-label">'+( value.name )+'</td> <td class="profiler-duration"> ';if(value.duration >= 0){out+=' <span class="profiler-unit"></span>'+( MiniProfiler.formatDuration(value.duration) )+' ';}out+=' </td> <td class="profiler-duration time-from-start"> <span class="profiler-unit">+</span>'+( MiniProfiler.formatDuration(value.start) )+' </td> </tr> ';} } out+=' </tbody> <tfoot> <td colspan="3"> '+( MiniProfiler.templates.linksTemplate({timing: it.root, page: it}) )+' </td> </tfoot> </table> ';}out+=' ';if(it.custom_fields && Object.keys(it.custom_fields).length > 0){out+=' <p class="custom-fields-title">Snapshot custom fields</p> <table class="profiler-timings"> <tbody> ';var arr4=Object.keys(it.custom_fields);if(arr4){var key,i4=-1,l4=arr4.length-1;while(i4<l4){key=arr4[i4+=1];out+=' <tr> <td class="profiler-label">'+( key )+'</td> <td class="profiler-label">'+( it.custom_fields[key] )+'</td> </tr> ';} } out+=' </tbody> </table> ';}out+=' </div> </div> ';if(it.has_sql_timings){out+=' <div class="profiler-queries"> <table> <thead> <tr> <th style="text-align:right">step<br />time from start<br />query type<br />duration</th> <th style="text-align:left">call stack<br />query</th> </tr> </thead> <tbody> ';var arr5=MiniProfiler.getSqlTimings(it.root);if(arr5){var value,index=-1,l5=arr5.length-1;while(index<l5){value=arr5[index+=1];out+=' '+( MiniProfiler.templates.sqlGapTemplate({g: value.prevGap}) )+' '+( MiniProfiler.templates.sqlTimingTemplate({i: index, s: value}) )+' ';if(value.nextGap){out+=' '+( MiniProfiler.templates.sqlGapTemplate({g: value.nextGap}) )+' ';}out+=' ';} } out+=' </tbody> </table> <p class="profiler-trivial-gap-container"> <a class="profiler-toggle-trivial-gaps">show trivial gaps</a> </p> </div> ';}out+=' </div>';return out;
10
+ var out=' <div class="profiler-result"> <div class="profiler-button ';if(it.has_duplicate_sql_timings){out+='profiler-warning';}out+='"> ';if(it.has_duplicate_sql_timings){out+='<span class="profiler-nuclear">!</span>';}out+=' <span class="profiler-number"> '+( MiniProfiler.formatDuration(it.duration_milliseconds))+' <span class="profiler-unit">ms</span> </span> ';if(MiniProfiler.showTotalSqlCount()){out+=' <span class="profiler-number"> '+( it.sql_count)+' <span class="profiler-unit">sql</span> </span> ';}out+=' </div> <div class="profiler-popup"> <div class="profiler-info"> <span class="profiler-name"> '+( it.name)+' <span class="profiler-overall-duration">('+( MiniProfiler.formatDuration(it.duration_milliseconds))+' ms)</span> </span> <span class="profiler-server-time">'+( it.machine_name)+' on '+( MiniProfiler.renderDate(it.started_formatted))+'</span> </div> <div class="profiler-output"> <table class="profiler-timings"> <thead> <tr> <th>event</th> <th>duration (ms)</th> <th class="profiler-duration-with-children">with children (ms)</th> <th class="time-from-start">from start (ms)</th> ';if(it.has_sql_timings){out+=' <th colspan="2">query time (ms)</th> ';}out+=' ';var arr1=it.custom_timing_names;if(arr1){var value,i1=-1,l1=arr1.length-1;while(i1<l1){value=arr1[i1+=1];out+=' <th colspan="2">'+( value.toLowerCase() )+' (ms)</th> ';} } out+=' </tr> </thead> <tbody> '+( MiniProfiler.templates.timingTemplate({timing: it.root, page: it}) )+' </tbody> <tfoot> <tr> <td colspan="3"> ';if(!it.client_timings){out+=' '+( MiniProfiler.templates.linksTemplate({timing: it.root, page: it}) )+' ';}out+=' <a class="profiler-toggle-duration-with-children" title="toggles column with aggregate child durations">show time with children</a> <a class="profiler-snapshots-page-link" title="Go to snapshots page" href="'+( MiniProfiler.options.path )+'snapshots">snapshots</a> </td> ';if(it.has_sql_timings){out+=' <td colspan="2" class="profiler-number profiler-percent-in-sql" title="'+( MiniProfiler.getSqlTimingsCount(it.root) )+' queries spent '+( MiniProfiler.formatDuration(it.duration_milliseconds_in_sql) )+' ms of total request time"> '+( MiniProfiler.formatDuration(it.duration_milliseconds_in_sql / it.duration_milliseconds * 100) )+' <span class="profiler-unit">% in sql</span> </td> ';}out+=' ';var arr2=it.custom_timing_names;if(arr2){var value,i2=-1,l2=arr2.length-1;while(i2<l2){value=arr2[i2+=1];out+=' <td colspan="2" class="profiler-number profiler-percentage-in-sql" title="'+( it.custom_timing_stats[value].count )+' '+( value.toLowerCase() )+' invocations spent '+( MiniProfiler.formatDuration(it.custom_timing_stats[value].duration) )+' ms of total request time"> '+( MiniProfiler.formatDuration(it.custom_timing_stats[value].duration / it.duration_milliseconds * 100) )+' <span class="profiler-unit">% in '+( value.toLowerCase() )+'</span> </td> ';} } out+=' </tr> </tfoot> </table> ';if(it.client_timings){out+=' <table class="profiler-timings profiler-client-timings"> <thead> <tr> <th>client event</th> <th>duration (ms)</th> <th>from start (ms)</th> </tr> </thead> <tbody> ';var arr3=MiniProfiler.getClientTimings(it.client_timings);if(arr3){var value,i3=-1,l3=arr3.length-1;while(i3<l3){value=arr3[i3+=1];out+=' <tr class="';if(value.isTrivial){out+='profiler-trivial';}out+='"> <td class="profiler-label">'+( value.name )+'</td> <td class="profiler-duration"> ';if(value.duration >= 0){out+=' <span class="profiler-unit"></span>'+( MiniProfiler.formatDuration(value.duration) )+' ';}out+=' </td> <td class="profiler-duration time-from-start"> <span class="profiler-unit">+</span>'+( MiniProfiler.formatDuration(value.start) )+' </td> </tr> ';} } out+=' </tbody> <tfoot> <td colspan="3"> '+( MiniProfiler.templates.linksTemplate({timing: it.root, page: it}) )+' </td> </tfoot> </table> ';}out+=' ';if(it.custom_fields && Object.keys(it.custom_fields).length > 0){out+=' <p class="custom-fields-title">Snapshot custom fields</p> <table class="profiler-timings"> <tbody> ';var arr4=Object.keys(it.custom_fields);if(arr4){var key,i4=-1,l4=arr4.length-1;while(i4<l4){key=arr4[i4+=1];out+=' <tr> <td class="profiler-label">'+( key )+'</td> <td class="profiler-label">'+( it.custom_fields[key] )+'</td> </tr> ';} } out+=' </tbody> </table> ';}out+=' </div> </div> ';if(it.has_sql_timings){out+=' <div class="profiler-queries"> <table> <thead> <tr> <th class="ta-right">step<br />time from start<br />query type<br />duration</th> <th class="ta-left">call stack<br />query</th> </tr> </thead> <tbody> ';var arr5=MiniProfiler.getSqlTimings(it.root);if(arr5){var value,index=-1,l5=arr5.length-1;while(index<l5){value=arr5[index+=1];out+=' '+( MiniProfiler.templates.sqlGapTemplate({g: value.prevGap}) )+' '+( MiniProfiler.templates.sqlTimingTemplate({i: index, s: value}) )+' ';if(value.nextGap){out+=' '+( MiniProfiler.templates.sqlGapTemplate({g: value.nextGap}) )+' ';}out+=' ';} } out+=' </tbody> </table> <p class="profiler-trivial-gap-container"> <a class="profiler-toggle-trivial-gaps">show trivial gaps</a> </p> </div> ';}out+=' </div>';return out;
11
11
  }
12
12
  MiniProfiler.templates["linksTemplate"] = function anonymous(it
13
13
  ) {
14
- var out=' <a href="'+( MiniProfiler.shareUrl(it.page.id) )+'" class="profiler-share-profiler-results" target="_blank">share</a> <a href="'+( MiniProfiler.moreUrl(it.timing.name) )+'" class="profiler-more-actions">more</a> ';if(it.custom_link){out+=' <a href="'+( it.custom_link )+'" class="profiler-custom-link" target="_blank">'+( it.custom_link_name )+'</a> ';}out+=' ';if(it.page.has_trivial_timings){out+=' <a class="profiler-toggle-trivial" data-show-on-load="'+( it.page.has_all_trivial_timings )+'" title="toggles any rows with &lt; '+( it.page.trivial_duration_threshold_milliseconds )+' ms"> show trivial </a> ';}return out;
14
+ var out=' <a href="'+( MiniProfiler.shareUrl(it.page.id) )+'" class="profiler-share-profiler-results" target="_blank">share</a> <a href="'+( MiniProfiler.moreUrl(it.timing.name) )+'" class="profiler-more-actions">more</a> ';if(it.page.has_flamegraph){out+=' <a href="'+( MiniProfiler.flamegraphUrl(it.page.id) )+'" class="profiler-show-flamegraph" target="_blank">flamegraph</a> ';}out+=' ';if(it.custom_link){out+=' <a href="'+( it.custom_link )+'" class="profiler-custom-link" target="_blank">'+( it.custom_link_name )+'</a> ';}out+=' ';if(it.page.has_trivial_timings){out+=' <a class="profiler-toggle-trivial" data-show-on-load="'+( it.page.has_all_trivial_timings )+'" title="toggles any rows with &lt; '+( it.page.trivial_duration_threshold_milliseconds )+' ms"> show trivial </a> ';}return out;
15
15
  }
16
16
  MiniProfiler.templates["timingTemplate"] = function anonymous(it
17
17
  ) {
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rack
3
3
  class MiniProfiler
4
- ASSET_VERSION = '10da952c710f6abd9f1bd50fe50ed714'
4
+ ASSET_VERSION = '35a79b300ab5afa978cb59af0b05e059'
5
5
  end
6
6
  end
@@ -42,7 +42,7 @@ module Rack
42
42
  def handle_cookie(result)
43
43
  status, headers, _body = result
44
44
 
45
- if (MiniProfiler.config.authorization_mode == :whitelist && !MiniProfiler.request_authorized?)
45
+ if (MiniProfiler.config.authorization_mode == :allow_authorized && !MiniProfiler.request_authorized?)
46
46
  # this is non-obvious, don't kill the profiling cookie on errors or short requests
47
47
  # this ensures that stuff that never reaches the rails stack does not kill profiling
48
48
  if status.to_i >= 200 && status.to_i < 300 && ((Process.clock_gettime(Process::CLOCK_MONOTONIC) - @start) > 0.1)
@@ -59,7 +59,7 @@ module Rack
59
59
 
60
60
  tokens_changed = false
61
61
 
62
- if MiniProfiler.request_authorized? && MiniProfiler.config.authorization_mode == :whitelist
62
+ if MiniProfiler.request_authorized? && MiniProfiler.config.authorization_mode == :allow_authorized
63
63
  @allowed_tokens ||= @store.allowed_tokens
64
64
  tokens_changed = !@orig_auth_tokens || ((@allowed_tokens - @orig_auth_tokens).length > 0)
65
65
  end
@@ -90,12 +90,12 @@ module Rack
90
90
  def has_valid_cookie?
91
91
  valid_cookie = !@cookie.nil?
92
92
 
93
- if (MiniProfiler.config.authorization_mode == :whitelist) && valid_cookie
93
+ if (MiniProfiler.config.authorization_mode == :allow_authorized) && valid_cookie
94
94
  begin
95
95
  @allowed_tokens ||= @store.allowed_tokens
96
96
  rescue => e
97
- if @config.storage_failure != nil
98
- @config.storage_failure.call(e)
97
+ if MiniProfiler.config.storage_failure != nil
98
+ MiniProfiler.config.storage_failure.call(e)
99
99
  end
100
100
  end
101
101
 
@@ -28,6 +28,7 @@ module Rack
28
28
  @authorization_mode = :allow_all
29
29
  @backtrace_threshold_ms = 0
30
30
  @flamegraph_sample_rate = 0.5
31
+ @flamegraph_mode = :wall
31
32
  @storage_failure = Proc.new do |exception|
32
33
  if @logger
33
34
  @logger.warn("MiniProfiler storage failure: #{exception.message}")
@@ -57,6 +58,7 @@ module Rack
57
58
  @snapshots_transport_auth_key = nil
58
59
  @snapshots_redact_sql_queries = true
59
60
  @snapshots_transport_gzip_requests = false
61
+ @enable_hotwire_turbo_drive_support = false
60
62
 
61
63
  self
62
64
  }
@@ -68,7 +70,9 @@ module Rack
68
70
  :flamegraph_sample_rate, :logger, :pre_authorize_cb, :skip_paths,
69
71
  :skip_schema_queries, :storage, :storage_failure, :storage_instance,
70
72
  :storage_options, :user_provider, :enable_advanced_debugging_tools,
71
- :skip_sql_param_names, :suppress_encoding, :max_sql_param_length
73
+ :skip_sql_param_names, :suppress_encoding, :max_sql_param_length,
74
+ :content_security_policy_nonce, :enable_hotwire_turbo_drive_support,
75
+ :flamegraph_mode
72
76
 
73
77
  # ui accessors
74
78
  attr_accessor :collapse_results, :max_traces_to_show, :position,
@@ -86,6 +90,22 @@ module Rack
86
90
 
87
91
  attr_reader :assets_url
88
92
 
93
+ # redefined - since the accessor defines it first
94
+ undef :authorization_mode=
95
+ def authorization_mode=(mode)
96
+ if mode == :whitelist
97
+ warn "[DEPRECATION] `:whitelist` authorization mode is deprecated. Please use `:allow_authorized` instead."
98
+
99
+ mode = :allow_authorized
100
+ end
101
+
102
+ warn <<~DEP unless mode == :allow_authorized || mode == :allow_all
103
+ [DEPRECATION] unknown authorization mode #{mode}. Expected `:allow_all` or `:allow_authorized`.
104
+ DEP
105
+
106
+ @authorization_mode = mode
107
+ end
108
+
89
109
  def assets_url=(lmbda)
90
110
  if defined?(Rack::MiniProfilerRails)
91
111
  Rack::MiniProfilerRails.create_engine