@vanelsas/baredom 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/custom-elements.json +60 -1
  3. package/dist/all.d.ts +4 -0
  4. package/dist/all.js +222 -0
  5. package/dist/baredom.d.ts +1 -0
  6. package/dist/baremirror-alpha.js +27 -28
  7. package/dist/base.js +691 -673
  8. package/dist/integrity.json +113 -112
  9. package/dist/x-alert.js +17 -17
  10. package/dist/x-avatar-group.js +10 -10
  11. package/dist/x-avatar.js +14 -14
  12. package/dist/x-badge.js +9 -9
  13. package/dist/x-bento-grid.js +6 -6
  14. package/dist/x-bento-item.js +4 -4
  15. package/dist/x-breadcrumbs.js +18 -16
  16. package/dist/x-button.js +1 -1
  17. package/dist/x-calendar.js +41 -41
  18. package/dist/x-cancel-dialogue.js +16 -16
  19. package/dist/x-card.js +7 -7
  20. package/dist/x-carousel.js +37 -35
  21. package/dist/x-chart.js +48 -48
  22. package/dist/x-checkbox.js +1 -1
  23. package/dist/x-chip.js +1 -1
  24. package/dist/x-code.js +31 -31
  25. package/dist/x-collapse.js +11 -11
  26. package/dist/x-color-picker.js +47 -47
  27. package/dist/x-combobox.js +35 -35
  28. package/dist/x-command-palette.js +31 -31
  29. package/dist/x-confetti.js +24 -24
  30. package/dist/x-container.js +6 -6
  31. package/dist/x-context-menu.js +19 -19
  32. package/dist/x-copy.js +1 -1
  33. package/dist/x-currency-field.js +25 -25
  34. package/dist/x-date-picker.js +45 -45
  35. package/dist/x-divider.js +8 -8
  36. package/dist/x-drag-panel.js +33 -33
  37. package/dist/x-drawer.js +12 -12
  38. package/dist/x-drop-zone.js +11 -11
  39. package/dist/x-dropdown.js +12 -12
  40. package/dist/x-fieldset.js +6 -6
  41. package/dist/x-file-download.js +15 -15
  42. package/dist/x-file-upload.js +26 -26
  43. package/dist/x-floating-panel.js +23 -23
  44. package/dist/x-form-field.js +18 -18
  45. package/dist/x-form.js +10 -10
  46. package/dist/x-gaussian-blur.js +13 -13
  47. package/dist/x-grid.js +8 -8
  48. package/dist/x-i18n-provider.js +7 -7
  49. package/dist/x-i18n.js +4 -4
  50. package/dist/x-icon.js +7 -7
  51. package/dist/x-image.js +19 -19
  52. package/dist/x-kbd.js +16 -16
  53. package/dist/x-kinetic-canvas.js +25 -25
  54. package/dist/x-kinetic-font.js +26 -26
  55. package/dist/x-kinetic-typography.js +34 -34
  56. package/dist/x-liquid-dock.js +31 -31
  57. package/dist/x-liquid-fill.js +39 -39
  58. package/dist/x-liquid-glass.js +32 -32
  59. package/dist/x-menu-item.js +9 -9
  60. package/dist/x-menu.js +10 -10
  61. package/dist/x-metaball-cursor.js +26 -26
  62. package/dist/x-modal.js +13 -13
  63. package/dist/x-morph-stack.js +38 -38
  64. package/dist/x-multi-combobox.js +41 -41
  65. package/dist/x-navbar.js +15 -15
  66. package/dist/x-neural-glow.js +29 -29
  67. package/dist/x-notification-center.js +9 -9
  68. package/dist/x-organic-divider.js +18 -18
  69. package/dist/x-organic-progress.js +35 -35
  70. package/dist/x-organic-shape.js +12 -12
  71. package/dist/x-otp-input.js +22 -22
  72. package/dist/x-pagination.js +18 -16
  73. package/dist/x-particle-button.js +55 -54
  74. package/dist/x-popover.js +28 -28
  75. package/dist/x-progress-circle.js +8 -8
  76. package/dist/x-progress.js +8 -8
  77. package/dist/x-proximity-list.js +20 -20
  78. package/dist/x-radio.js +14 -13
  79. package/dist/x-range-slider.js +30 -30
  80. package/dist/x-rating.js +23 -23
  81. package/dist/x-ripple-effect.js +10 -10
  82. package/dist/x-scroll-parallax.js +17 -17
  83. package/dist/x-scroll-stack.js +17 -17
  84. package/dist/x-scroll-story.js +34 -32
  85. package/dist/x-scroll-timeline.js +50 -46
  86. package/dist/x-scroll.js +38 -38
  87. package/dist/x-search-field.js +1 -1
  88. package/dist/x-select.js +1 -1
  89. package/dist/x-sidebar.js +17 -17
  90. package/dist/x-skeleton-group.js +14 -13
  91. package/dist/x-skeleton.js +1 -1
  92. package/dist/x-slider.js +17 -17
  93. package/dist/x-soft-body.js +18 -18
  94. package/dist/x-spacer.js +4 -4
  95. package/dist/x-spinner.js +4 -4
  96. package/dist/x-splash.js +13 -13
  97. package/dist/x-split-pane.js +15 -15
  98. package/dist/x-spotlight-card.js +12 -12
  99. package/dist/x-stat.js +10 -10
  100. package/dist/x-stepper.js +15 -15
  101. package/dist/x-switch.js +12 -12
  102. package/dist/x-tab.js +7 -9
  103. package/dist/x-table-cell.js +20 -20
  104. package/dist/x-table-row.js +9 -9
  105. package/dist/x-table.js +14 -14
  106. package/dist/x-tabs.js +11 -11
  107. package/dist/x-text-area.js +20 -20
  108. package/dist/x-theme.js +26 -26
  109. package/dist/x-timeline-item.js +21 -21
  110. package/dist/x-timeline.js +9 -8
  111. package/dist/x-toast.js +22 -22
  112. package/dist/x-toaster.js +6 -6
  113. package/dist/x-tooltip.js +14 -13
  114. package/dist/x-trace-history.d.ts +5 -0
  115. package/dist/x-trace-history.js +116 -116
  116. package/dist/x-typography.js +6 -6
  117. package/dist/x-welcome-tour.js +64 -62
  118. package/package.json +7 -2
@@ -1,120 +1,120 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var bL=function(a,b){const c=a.length-b.length;return c>=0&&a.indexOf(b,c)==c},Tla=function(a){return a-1},Ula=function(a,b){return $APP.od(function(c,d){c=a.i?a.i(c):a.call(null,c);d=a.i?a.i(d):a.call(null,d);var e=$APP.md($APP.kd);return e.j?e.j(c,d):e.call(null,c,d)},b)},cL=function(a,b){return Ula(a,b)},dL=function(a){if(a instanceof RegExp)return a;var b=$APP.vh(/^\(\?([idmsux]*)\)/,a),c=$APP.B(b,0,null);b=$APP.B(b,1,null);return new RegExp(a.substring(c==null?0:c.length),$APP.m(b)?b:"")},Vla=
3
- function(a){return $APP.Xd($APP.Aa(function(b,c){return $APP.Zd(b,c,$APP.Oc(b,c,0)+1)},$APP.zb($APP.ne),a))},Wla=function(a){return new $APP.H(null,2,5,$APP.J,[$APP.Le(200,a),$APP.Me(200,a)],null)},eL=function(){var a=window;var b=a.location.search;b=b==null?null:$APP.vh(Xla,b);return $APP.D(b)||$APP.l(a,"BAREDOM_TRACE_HISTORY")===!0||$APP.z.j("raw",$APP.l(a,"BAREDOM_TRACE_HISTORY"))},Yla=function(a){a=a==null?null:a.tagName;a=a==null?null:a.toLowerCase();return $APP.m(a)?a:"document"},fL=function(a){try{return a==
4
- null?null:$APP.Jm(a)}catch(b){try{return""+$APP.N.i(a)}catch(c){return"(unprintable)"}}},Zla=function(a,b,c){a=$APP.G(a);var d=$APP.C(a,$APP.P),e=$APP.C(a,$APP.it),f=$APP.C(a,gL),h=$APP.C(a,hL);var k=$APP.Md(d);k=$APP.m(k)?""+$APP.N.i(k)+"/"+$APP.N.i($APP.gh(d)):$APP.gh(d);b={schemaVersion:1,id:b,t:c,type:k,tag:e,componentId:f,causeId:h};switch(d instanceof $APP.F?d.da:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return c=$APP.Ii.i(a),b.eventName=c,c=
5
- fL($APP.Pi.i(a)),b.detail=c,c=$APP.D($APP.Qi.i(a)),b.cancelable=c,a=$APP.D($APP.Ri.i(a)),b.defaultPrevented=a,b;case "state/instance-field-set":return c=$APP.wi.i(a),b.field=c,a=fL($APP.Q.i(a)),b.value=a,b;case "dom/attribute-set":return c=$APP.Ai.i(a),b.attribute=c,a=$APP.Q.i(a),b.value=a,b;case "dom/attribute-removed":return a=$APP.Ai.i(a),b.attribute=a,b;case "lifecycle/attribute-changed":return c=$APP.Ai.i(a),b.attribute=c,c=$APP.kj.i(a),b.oldValue=c,a=$APP.lj.i(a),b.newValue=a,b;case "lifecycle/connected":case "lifecycle/disconnected":return b;
6
- default:return b}},iL=function(a){a=""+$APP.N.i(a);return a.length<2?"0"+$APP.N.i(a):a},$la=function(a,b){return $APP.Wf.l($APP.ne,$APP.Se(function(c){var d=$APP.B(c,0,null);$APP.B(c,1,null);return $APP.jd(b,d)}),a)},rL=function(a,b,c,d){var e=$APP.G(d);d=$APP.C(e,jL);var f=$APP.C(e,$APP.ir),h=$APP.C(e,kL);e=$APP.C(e,lL);a:{var k=a.length;for(var n=0,r=$APP.zb($APP.Zg);;){if(n>=k){k=$APP.Bb(r);break a}var v=a[n].componentId;n+=1;r=v!=null?$APP.Ab(r,v):r}k=void 0}k=$la(b,k);b=$APP.D(e);e={};k=$APP.q(k);
7
- n=null;for(v=r=0;;)if(v<r){var w=n.C(null,v),y=$APP.B(w,0,null),A=$APP.B(w,1,null);w=e;y=""+$APP.N.i(y);A={tag:$APP.it.i(A),firstSeen:mL.i(A)};w[y]=A;v+=1}else if(k=$APP.q(k))$APP.ed(k)?(r=$APP.Hb(k),k=$APP.Ib(k),n=r,r=$APP.x(r)):(n=$APP.t(k),r=$APP.B(n,0,null),v=$APP.B(n,1,null),n=e,r=""+$APP.N.i(r),v={tag:$APP.it.i(v),firstSeen:mL.i(v)},n[r]=v,k=$APP.u(k),n=null,r=0),v=0;else break;k=[];c=$APP.q(c);n=null;for(v=r=0;;)if(v<r){w=n.C(null,v);var E=$APP.G(w);w=$APP.C(E,$APP.er);y=$APP.C(E,$APP.Z);A=
8
- $APP.C(E,nL);var I=$APP.C(E,oL),O=$APP.C(E,pL);E=$APP.C(E,qL);k.push({id:w,label:y,startT:A,endT:I,startId:O,endId:E});v+=1}else if(c=$APP.q(c))$APP.ed(c)?(r=$APP.Hb(c),c=$APP.Ib(c),n=r,r=$APP.x(r)):(n=$APP.t(c),A=$APP.G(n),n=$APP.C(A,$APP.er),r=$APP.C(A,$APP.Z),v=$APP.C(A,nL),w=$APP.C(A,oL),y=$APP.C(A,pL),A=$APP.C(A,qL),k.push({id:n,label:r,startT:v,endT:w,startId:y,endId:A}),c=$APP.u(c),n=null,r=0),v=0;else break;return{schemaVersion:1,exportedAt:d,origin:f,userAgent:h,forensic:b,components:e,sessions:k,
9
- records:a}},sL=function(a){if($APP.sa(a)){if(typeof a.schemaVersion!=="number")return new $APP.K(null,1,[$APP.xj,"Envelope is missing schemaVersion."],null);if($APP.M.j(1,a.schemaVersion))return new $APP.K(null,1,[$APP.xj,"Schema version mismatch: expected "+$APP.N.i(1)+", got "+$APP.N.i(a.schemaVersion)+"."],null);if($APP.p($APP.ra(a.records)))return new $APP.K(null,1,[$APP.xj,"Envelope.records is not an array."],null);var b=a.records,c=b.length;a:{for(var d=0;;){if(d>=c){b=null;break a}var e=b[d];
10
- if($APP.sa(e)&&typeof e.id==="number"&&typeof e.t==="number"&&typeof e.type==="string")d+=1;else{b=d;break a}}b=void 0}return b==null?new $APP.K(null,1,[$APP.Pq,a],null):new $APP.K(null,1,[$APP.xj,"Record at index "+$APP.N.i(b)+" is missing required fields (id, t, type)."],null)}return new $APP.K(null,1,[$APP.xj,"Envelope is not a JSON object."],null)},ama=function(a,b,c){return $APP.x(a)>=c?$APP.Gd.j($APP.Xc(a),b):$APP.Gd.j(a,b)},bma=function(){var a=lL.i($APP.fb(tL));return $APP.m(a)?$APP.ch(uL):
11
- $APP.Do.j($APP.ch(uL),$APP.qr)},wL=function(a){var b=$APP.se(function(c){var d=$APP.B(c,0,null);c=$APP.B(c,1,null);return $APP.jd(c,a)?d:null},cma);return $APP.m(b)?b:vL},xL=function(a){try{var b=JSON.stringify(a)}catch(c){b=""}return $APP.m(b)?b.toLowerCase():""},BL=function(a,b){var c=$APP.G(b),d=$APP.C(c,$APP.it),e=$APP.C(c,yL);b=$APP.C(c,zL);c=$APP.Oc(c,AL,xL);if(d=d==null||$APP.z.j("",d)||$APP.z.j("all",d)||$APP.z.j(d,a.tag)){if(e=e==null||$APP.jd(e,wL(a.type)))e=b==null||$APP.z.j("",b)||!((c.i?
12
- c.i(a):c.call(null,a)).indexOf(b)<0);d=e}return d},CL=function(a,b){return $APP.qf(cL(function(c){return c.t},$APP.Te(function(c){return BL(c,b)},$APP.Hc(a))))},DL=function(a,b){return typeof b==="number"?a.find(function(c){return $APP.z.j(b,c.id)}):null},EL=function(a){if(a!=null)try{var b=JSON.stringify(a),c=""+$APP.N.i(b);return c.length<=60?c:""+$APP.N.i($APP.Cd(c,60))+"…"}catch(d){return"(unstringifiable)"}else return null},FL=function(a){switch(a.type){case "event/dispatch":return""+$APP.N.i(a.eventName)+
13
- $APP.N.i(function(){var b=EL(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "event/dispatch-cancelable":return""+$APP.N.i(a.eventName)+$APP.N.i($APP.m(a.defaultPrevented)?" (prevented)":null)+$APP.N.i(function(){var b=EL(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "event/dispatch-document":return""+$APP.N.i(a.eventName)+$APP.N.i(function(){var b=EL(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "state/instance-field-set":return""+$APP.N.i(a.field)+" \x3d "+$APP.N.i(function(){var b=
14
- EL(a.value);return $APP.m(b)?b:"null"}());case "dom/attribute-set":return""+$APP.N.i(a.attribute)+"\x3d"+$APP.N.i($APP.Mh($APP.Hc([a.value])));case "dom/attribute-removed":return""+$APP.N.i(a.attribute)+" removed";case "lifecycle/connected":return"connected";case "lifecycle/disconnected":return"disconnected";case "lifecycle/attribute-changed":return""+$APP.N.i(a.attribute)+": "+$APP.N.i($APP.Mh($APP.Hc([a.oldValue])))+" → "+$APP.N.i($APP.Mh($APP.Hc([a.newValue])));default:return"("+$APP.N.i(a.type)+
15
- ")"}},GL=function(a){if(typeof a!=="number")return"";if(a<1E3)return""+$APP.N.i(a.toFixed(0))+"ms";if(a<6E4)return""+$APP.N.i((a/1E3).toFixed(3))+"s";var b=$APP.zd(a,6E4)/1E3;return""+$APP.N.i(Math.floor(a/6E4))+"m"+$APP.N.i(b.toFixed(1))+"s"},IL=function(a){a=wL(a.type);return $APP.C(HL,$APP.m(a)?a:vL)},KL=function(a){a=a.componentId;return $APP.m(a)?a:JL},dma=function(a){return $APP.qf(cL(LL,$APP.Ne.j(function(b){var c=$APP.B(b,0,null);b=$APP.B(b,1,null);var d=$APP.t(b);return new $APP.K(null,3,
16
- [ML,c,$APP.it,d.tag,LL,$APP.fe($APP.Rj,$APP.Ne.j(function(e){return e.t},b))],null)},$APP.Zh(KL,a))))},PL=function(a){if($APP.q(a)){var b=$APP.Ne.j(function(c){return c.t},a);a=$APP.fe($APP.Rj,b);b=$APP.fe($APP.Sj,b);return new $APP.K(null,3,[NL,a,ema,b,OL,$APP.Sj.j(1,b-a)],null)}return null},fma=function(a,b){return $APP.q(a)?$APP.ge(QL,function(c){return Math.abs(c.t-b)},a):null},gma=function(a){if($APP.q(a)){var b=Vla($APP.Ne.j(function(d){return wL(d.type)},a)),c=$APP.fe($APP.Sj,$APP.Qg(b));a=
17
- $APP.se(function(d){return $APP.z.j(c,$APP.C(b,d))?d:null},uL);return $APP.m(a)?a:vL}return null},kma=function(a,b){a=$APP.Zh(function(c){c=b.i?b.i(c):b.call(null,c);return Math.floor(c/4)},a);return $APP.qf(cL(RL,$APP.Ne.j(function(c){var d=$APP.B(c,0,null),e=$APP.B(c,1,null);c=$APP.Ne.j(function(f){return f.t},e);e=$APP.qf(cL(function(f){return f.id},e));return new $APP.K(null,7,[RL,d,SL,e,TL,gma(e),UL,d*4,hma,(d+1)*4,ima,$APP.fe($APP.Rj,c),jma,$APP.fe($APP.Sj,c)],null)},a)))},lma=function(a){return $APP.se(function(b){return $APP.x(SL.i(b))>
18
- 3},a)},mma=function(a){return $APP.q(a)?$APP.fe($APP.Sj,$APP.Ne.j(function(b){return $APP.x(SL.i(b))},a)):0},nma=function(a,b){var c=b.id;a=cL(function(d){return d.t},$APP.Te(function(d){return $APP.z.j(c,d.causeId)},$APP.Hc(a)));return new $APP.K(null,2,[$APP.mv,$APP.x(a),SL,$APP.qf($APP.Le(50,a))],null)},oma=function(a,b){return $APP.qf(cL(function(c){return c.id},$APP.Te(function(c){return $APP.z.j(b,c.causeId)},$APP.Hc(a))))},pma=function(a,b){var c=Wla(VL(a,b));a=$APP.B(c,0,null);c=$APP.B(c,
19
- 1,null);var d=$APP.Zh(function(e){return e.causeId},a);return $APP.Vg.l(function h(f){var k=$APP.pi.j;var n=f.id;n=d.i?d.i(n):d.call(null,n);return new $APP.K(null,2,[WL,f,$APP.Pt,k.call($APP.pi,h,n)],null)}(b),XL,$APP.D($APP.q(c)))},qma=function(a,b){return typeof b==="number"?$APP.se(function(c){return $APP.z.j(b,$APP.er.i(c))?c:null},$APP.ak.i(a)):null},rma=function(a,b,c,d){b===0?c="No records yet — interact with components to start tracing.":a===0?c=""+$APP.N.i(b)+" "+$APP.N.i($APP.z.j(1,b)?
20
- "record":"records")+" · all hidden by filter":(a=""+$APP.N.i(a)+$APP.N.i($APP.M.j(a,b)?" of "+$APP.N.i(b):null)+" "+$APP.N.i($APP.z.j(1,a)?"record":"records")+" · "+$APP.N.i(d)+" "+$APP.N.i($APP.z.j(1,d)?"lane":"lanes"),b=$APP.N,d=b.i,c=OL.i(c),c=$APP.m(c)?" · spanning "+$APP.N.i(GL(c)):null,c=a+d.call(b,c));return c},ZL=function(a){return $APP.dd(a)&&$APP.z.j(YL,$APP.t(a))},aM=function(a){return $APP.dd(a)&&$APP.z.j($L,$APP.t(a))},bM=function(a){return $APP.dd(a)&&($APP.z.j(YL,$APP.t(a))||$APP.z.j($L,
21
- $APP.t(a)))?$APP.Kc(a):null},cM=function(a,b){a=$APP.l(a,"__xTraceHistoryUiState");return $APP.m(a)?(b=$APP.l(a,$APP.gh(b)),void 0===b?null:b):null},dM=function(a,b,c){var d=$APP.l(a,"__xTraceHistoryUiState");d=$APP.m(d)?d:{};b=$APP.gh(b);d[b]=c;a.__xTraceHistoryUiState=d},fM=function(){var a=SL.i($APP.fb(tL)),b=$APP.fb(eM),c=b[1];if(b[0]===a)return c;b=$APP.Jm($APP.qf(a));$APP.Je(eM,[a,b]);return b},sma=function(){var a=$APP.Eo.K(gM,$APP.Vg,$APP.Kl,!1);a=$APP.G(a);a=$APP.C(a,hM);a=$APP.q(a);for(var b=
22
- null,c=0,d=0;;)if(d<c){var e=b.C(null,d);$APP.B(e,0,null);e=$APP.B(e,1,null);try{e.G?e.G():e.call(null)}catch(f){}d+=1}else if(a=$APP.q(a)){if($APP.ed(a))c=$APP.Hb(a),a=$APP.Ib(a),b=c,c=$APP.x(c);else{b=$APP.t(a);$APP.B(b,0,null);e=$APP.B(b,1,null);try{e.G?e.G():e.call(null)}catch(f){}a=$APP.u(a);b=null;c=0}d=0}else return null},iM=function(){if(gM instanceof $APP.Ge){var a=gM.state;a=$APP.Vg.l?$APP.Vg.l(a,$APP.Kl,!0):$APP.Vg.call(null,a,$APP.Kl,!0);if(gM instanceof $APP.Ge){var b=gM.rc;if(b!=null&&
23
- !$APP.m(b.i?b.i(a):b.call(null,a)))throw Error("Validator rejected reference state");b=gM.state;gM.state=a;gM.dc!=null&&$APP.He(gM,b,a);a=new $APP.H(null,2,5,$APP.J,[b,a],null)}else a=new $APP.H(null,2,5,$APP.J,[$APP.fb(gM),$APP.Jb(gM,a)],null)}else a=new $APP.H(null,2,5,$APP.J,[$APP.fb(gM),$APP.zo(gM,$APP.Vg,$APP.Kl,!0)],null);b=$APP.B(a,0,null);$APP.B(a,1,null);return $APP.m($APP.Kl.i(b))?null:requestAnimationFrame(sma)},tma=function(a,b){var c=jM.i(a)+1;return $APP.Fo($APP.Vg.l(a,jM,c),new $APP.H(null,
24
- 2,5,$APP.J,[hM,c],null),b)},uma=function(a,b,c){if($APP.z.j("document",b))return new $APP.K(null,2,[$APP.er,null,kM,!1],null);b=$APP.l(a,"__xTraceHistoryId");if(b!=null)return new $APP.K(null,2,[$APP.er,b,kM,!1],null);a.__xTraceHistoryId=c;return new $APP.K(null,2,[$APP.er,c,kM,!0],null)},mM=function(){var a=$APP.Eo.K(tL,$APP.oi,lM,$APP.qc);return lM.i(a)-1},vma=function(a){$APP.Eo.j(nM,$APP.qc);try{a.G?a.G():a.call(null)}finally{$APP.Eo.j(nM,Tla)}},oM=function(a){var b=a.getRootNode();return b instanceof
25
- ShadowRoot?b.host:a.parentNode},pM=function(a){for(;;)if(a!=null&&a instanceof Element){var b=a.localName;var c=b!=null;b=c?b.includes("-"):c;if($APP.m(b))return a;a=oM(a)}else return null},qM=function(a){if(a instanceof Node)for(a=oM(a);;){if(a==null||a===document)return!1;if($APP.m($APP.l(a,"__xTraceHistoryInternal")))return!0;a=oM(a)}else return!1},rM=function(a){var b=document.body;if($APP.m($APP.m(b)?a!=null:b)){b=[b];for(var c=0;;){if(b.length===0||c>=1E6)return null;var d=b.pop();if(d instanceof
26
- Element){if(!$APP.m($APP.l(d,"__xTraceHistoryInternal"))){if($APP.z.j(a,$APP.l(d,"__xTraceHistoryId")))return d;for(var e=d.children,f=e.length,h=0;;)if(h<f)b.push(e[h]),h+=1;else break;d=d.shadowRoot;if($APP.m(d))for(d=d.children,e=d.length,f=0;;)if(f<e)b.push(d[f]),f+=1;else break}c+=1}}}else return null},sM=function(a){var b=$APP.vi.i(a);return $APP.jd(wma,$APP.P.i(a))?b instanceof Node?(a=$APP.l(b,"__xTraceHistoryInternal"),$APP.m(a)?a:qM(b)):!1:qM(b)},wM=function(a,b,c,d){var e=$APP.fb(tL),f=
27
- $APP.vi.i(a);if(!$APP.m(function(){var v=(v=$APP.p(d))?$APP.kp.i(e):v;return $APP.m(v)?v:sM(a)}())){var h=function(){var v=pM(f);return $APP.m(v)?v:f}(),k=Yla(h);h=uma(h,k,tM.i(e));var n=$APP.G(h);h=$APP.C(n,$APP.er);n=$APP.C(n,kM);var r=$APP.Wc($APP.fb(uM));r=$APP.Vg.o(a,$APP.it,k,$APP.Hc([gL,h,hL,r]));b=Zla(r,b,c);b=ama(SL.i(e),b,$APP.Jl.i(e));c=$APP.m(n)?$APP.Vg.l(vM.i(e),h,new $APP.K(null,2,[$APP.it,k,mL,c],null)):vM.i(e);k=$APP.m(n)?h+1:tM.i(e);$APP.Eo.o(tL,$APP.Vg,SL,b,$APP.Hc([tM,k,vM,c]));
28
- iM()}},xM=function(a,b){var c=pM(b);b=$APP.l($APP.m(c)?c:b,"__xTraceHistoryId");if($APP.m(b))switch(c=$APP.P.i(a),c instanceof $APP.F?c.da:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return""+$APP.N.i(b)+":evt:"+$APP.N.i($APP.Ii.i(a));case "state/instance-field-set":return""+$APP.N.i(b)+":fld:"+$APP.N.i($APP.wi.i(a));case "dom/attribute-set":case "dom/attribute-removed":return""+$APP.N.i(b)+":attr:"+$APP.N.i($APP.Ai.i(a));default:return null}else return null},
29
- zM=function(a,b,c,d){var e=$APP.p(lL.i(a));return e?(b=xM(b,c),$APP.m(b)?(a=$APP.C(yM.i(a),b),$APP.m(a)?d-a<16:null):null):e},AM=function(a,b,c){if($APP.m(lL.i($APP.fb(tL))))return null;a=xM(a,b);return $APP.m(a)?$APP.Eo.K(tL,$APP.Fo,new $APP.H(null,2,5,$APP.J,[yM,a],null),c):null},CM=function(a){var b=$APP.P.i(a),c=$APP.vi.i(a),d=performance.now();if($APP.m(function(){var f=$APP.fb(nM)>0;if(f)return f;f=$APP.fb(BM);f=$APP.m(f)?$APP.jd(xma,b):f;if($APP.m(f))return f;f=sM(a);return $APP.m(f)?f:zM($APP.fb(tL),
30
- a,c,d)}()))return null;var e=mM();wM(a,e,d,!1);return AM(a,c,d)},yma=function(){var a=EventTarget.prototype,b=a.dispatchEvent;$APP.m($APP.l(b,"__xTraceHistoryWrapped"))||($APP.Je(DM,b),b=function(c){var d=$APP.fb(DM);var e=$APP.p($APP.fb(BM));e||(e=$APP.kp.i($APP.fb(tL)),e=$APP.m(e)?e:$APP.fb(nM)>0||qM(this));if($APP.m(e))c=d.call(this,c);else{e=c instanceof CustomEvent;var f=performance.now(),h=e?new $APP.K(null,2,[$APP.P,this===document?$APP.Vi:$APP.m(c.cancelable)?$APP.Ti:$APP.Hi,$APP.Ii,c.type],
31
- null):null;if($APP.m(e?zM($APP.fb(tL),h,this,f):e))c=d.call(this,c);else{var k=mM();$APP.Eo.l(uM,$APP.Gd,k);try{var n=d.call(this,c)}finally{$APP.Eo.j(uM,$APP.Xc)}if(e)try{wM(new $APP.K(null,6,[$APP.P,this===document?$APP.Vi:$APP.m(c.cancelable)?$APP.Ti:$APP.Hi,$APP.vi,this,$APP.Ii,c.type,$APP.Pi,c.detail,$APP.Qi,c.cancelable,$APP.Ri,c.defaultPrevented],null),k,f,!0),AM(h,this,f)}catch(r){}c=n}}return c},b.__xTraceHistoryWrapped=!0,a.dispatchEvent=b)},zma=function(){return fM()},Ama=function(){var a=
32
- vM.i($APP.fb(tL)),b={};a=$APP.q(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.C(null,e),h=$APP.B(f,0,null),k=$APP.B(f,1,null);f=b;h=""+$APP.N.i(h);k={tag:$APP.it.i(k),firstSeen:mL.i(k)};f[h]=k;e+=1}else if(a=$APP.q(a))$APP.ed(a)?(d=$APP.Hb(a),a=$APP.Ib(a),c=d,d=$APP.x(d)):(c=$APP.t(a),d=$APP.B(c,0,null),e=$APP.B(c,1,null),c=b,d=""+$APP.N.i(d),e={tag:$APP.it.i(e),firstSeen:mL.i(e)},c[d]=e,a=$APP.u(a),c=null,d=0),e=0;else break;return b},Bma=function(a){var b=a.components;return b==null?$APP.We:$APP.Ne.j(function(c){return $APP.l(b,
33
- c).tag},Object.keys(b))},Cma=function(){var a=$APP.fb(tL),b=$APP.Ne.j($APP.it,$APP.Qg(vM.i(a)));a=$APP.Re(function(c){c=$APP.G(c);c=$APP.C(c,EM);return Bma(c)},$APP.Hc([FM.i(a)]));return $APP.qf($APP.Wf.j($APP.eh(),$APP.Qe.j(b,a)))},GM=function(){$APP.Eo.K(tL,$APP.Vg,$APP.kp,!0);return iM()},HM=function(){$APP.Eo.K(tL,$APP.Vg,$APP.kp,!1);return iM()},MM=function(){$APP.Eo.o(tL,$APP.Vg,SL,IM,$APP.Hc([lM,0,JM,$APP.We,KM,0,LM,null,yM,$APP.ne]));return iM()},NM=function(){return LM.i($APP.fb(tL))},Dma=
34
- function(a,b,c,d){return b==null?a:$APP.pi.j(function(e){e=$APP.G(e);var f=$APP.C(e,$APP.er);return $APP.z.j(f,b)?$APP.Vg.o(e,oL,c,$APP.Hc([qL,d])):e},a)},OM=function(){var a=performance.now();$APP.Eo.j(tL,function(b){return $APP.Vg.l($APP.oi.ta(b,JM,Dma,LM.i(b),a,lM.i(b)),LM,null)});return iM()},PM=function(){NM()!=null&&(console.warn("[x-trace-history] start-session! called while a session was already active — stopping the previous one"),OM());var a=performance.now();$APP.Eo.j(tL,function(b){var c=
35
- KM.i(b),d=lM.i(b);return $APP.Vg.o($APP.oi.K(b,JM,$APP.Gd,new $APP.K(null,6,[$APP.er,c,$APP.Z,"Session "+$APP.N.i(c),nL,a,oL,null,pL,d,qL,null],null)),LM,c,$APP.Hc([KM,c+1]))});iM();return LM.i($APP.fb(tL))},QM=function(a,b){var c=$APP.G(b);b=$APP.C(c,pL);c=$APP.C(c,qL);a=a.id;return a>=b&&(c==null||a<c)},RM=function(){var a=$APP.fb(tL),b=fM(),c=$APP.Hc(b);return $APP.Jm($APP.pi.j(function(d){var e=$APP.G(d);d=$APP.C(e,$APP.er);var f=$APP.C(e,$APP.Z),h=$APP.C(e,nL),k=$APP.C(e,oL),n=$APP.x($APP.Te(function(r){return QM(r,
36
- e)},c));return{id:d,label:f,startT:h,endT:$APP.m(k)?k:null,recordCount:n}},JM.i(a)))},SM=function(a){var b=$APP.fb(tL),c=$APP.t($APP.Te(function(d){return $APP.z.j($APP.er.i(d),a)},JM.i(b)));return $APP.m(c)?$APP.Jm(cL(function(d){return d.t},$APP.Te(function(d){return QM(d,c)},$APP.Ic(fM())))):[]},Ema=function(a){if(typeof a==="string"){try{var b=JSON.parse(a)}catch(c){b=TM}a=$APP.z.j(b,TM)?new $APP.K(null,1,[$APP.xj,"File is not valid JSON."],null):sL(b)}else a=$APP.sa(a)?sL(a):new $APP.K(null,
37
- 1,[$APP.xj,"Import expects a JSON string or a parsed envelope object."],null);return a},UM=function(a){$APP.Eo.K(tL,$APP.oi,FM,function(b){return $APP.qf($APP.Ve(function(c){c=$APP.G(c);c=$APP.C(c,$APP.er);return $APP.z.j(c,a)},b))});return iM()},WM=function(){return $APP.Jm($APP.pi.j(function(a){var b=$APP.G(a);a=$APP.C(b,$APP.er);var c=$APP.C(b,$APP.Z),d=$APP.C(b,VM);b=$APP.C(b,EM);return{id:a,label:c,importedAt:d,recordCount:b.records.length}},FM.i($APP.fb(tL))))},XM=function(a){var b=$APP.t($APP.Te(function(c){return $APP.z.j($APP.er.i(c),
38
- a)},FM.i($APP.fb(tL))));return $APP.m(b)?EM.i(b).records:[]},YM=function(a,b){return new $APP.K(null,4,[jL,a.getTime(),$APP.ir,function(){var c=window;c=c==null?null:c.location;c=c==null?null:c.href;return $APP.m(c)?c:""}(),kL,function(){var c=navigator;c=c==null?null:c.userAgent;return $APP.m(c)?c:""}(),lL,b],null)},Fma=function(){var a=$APP.fb(tL),b=fM(),c=YM(new Date,lL.i(a));return rL(b,vM.i(a),JM.i(a),c)},ZM=function(){var a=new Date,b=$APP.fb(tL),c=fM(),d=YM(a,lL.i(b));b=rL(c,vM.i(b),JM.i(b),
39
- d);b=JSON.stringify(b,null,2);a=""+$APP.N.i("baredom-trace-")+$APP.N.i(a.getFullYear())+$APP.N.i(iL(a.getMonth()+1))+$APP.N.i(iL(a.getDate()))+"-"+$APP.N.i(iL(a.getHours()))+$APP.N.i(iL(a.getMinutes()))+$APP.N.i(iL(a.getSeconds()))+$APP.N.i(".trace.json");b=URL.createObjectURL(new Blob([b],{type:"application/json"}));c=document.createElement("a");c.href=b;c.download=a;c.style.display="none";document.body.appendChild(c);try{var e=c.click()}finally{document.body.removeChild(c),URL.revokeObjectURL(b)}return e},
40
- $M=function(a,b){b=b.getBoundingClientRect();a.style.top=""+$APP.N.i(b.top)+"px";a.style.left=""+$APP.N.i(b.left)+"px";a.style.width=""+$APP.N.i(b.width)+"px";a.style.height=""+$APP.N.i(b.height)+"px"},aN=function(a){a=$APP.l(a,"__xTraceHistoryHighlightBox");$APP.m(a)&&(a.style.display="none")},bN=function(a){var b=$APP.l(a,"__xTraceHistoryHighlightCid");if($APP.m(b)){b=rM(b);if($APP.m(b))return a=$APP.l(a,"__xTraceHistoryHighlightBox"),$APP.m(a)?($M(a,b),a.style.display="block"):null;aN(a);return $APP.Di(a,
41
- "__xTraceHistoryHighlightCid",null)}return null},cN=function(a){return(""+$APP.N.i(a)).replace(Gma,"\x26amp;").replace(Hma,"\x26lt;").replace(Ima,"\x26gt;").replace(Jma,"\x26quot;").replace(Kma,"\x26#39;")},Lma=function(a){return"\x3coption value\x3d'"+$APP.N.i(cN(a))+"'\x3e"+$APP.N.i(cN(a))+"\x3c/option\x3e"},dN=function(a,b){return"\x3clabel class\x3d'cat'\x3e\x3cx-checkbox data-x-th-cat\x3d'"+$APP.N.i(a)+"' "+$APP.N.i($APP.m(b)?"checked ":null)+"aria-label\x3d'"+$APP.N.i(a)+"'\x3e\x3c/x-checkbox\x3e"+
42
- $APP.N.i(a)+"\x3c/label\x3e"},Mma=function(a,b){return $APP.fe($APP.N,$APP.Ne.j(function(c){var d=$APP.G(c);c=$APP.C(d,ML);var e=$APP.C(d,$APP.it),f=$APP.G(d);d=$APP.C(f,ML);f=$APP.C(f,$APP.it);d=$APP.z.j(JL,d)?"document":""+$APP.N.i(f)+" #"+$APP.N.i(d);f=$APP.z.j(JL,c)?"document":e;var h=$APP.z.j(b,f);return"\x3cdiv class\x3d'lane-label"+$APP.N.i(h?" active":null)+"' data-x-th-lane-tag\x3d'"+$APP.N.i(cN(f))+"' title\x3d'"+$APP.N.i(cN(d))+"'\x3e"+$APP.N.i(cN($APP.z.j(JL,c)?"document":e))+$APP.N.i($APP.M.j(JL,
43
- c)?" \x3cspan class\x3d'cid'\x3e#"+$APP.N.i(c)+"\x3c/span\x3e":null)+"\x3c/div\x3e"},a))},Nma=function(a,b,c){return $APP.m(a)?"\x3cline class\x3d'scrubber' x1\x3d'"+$APP.N.i(b)+"' y1\x3d'0' x2\x3d'"+$APP.N.i(b)+"' y2\x3d'"+$APP.N.i(c)+"' /\x3e":""},eN=function(a,b,c,d){a=cL(function(e){return $APP.z.j(e.id,d)?1:0},a);return $APP.fe($APP.N,$APP.Ne.j(function(e){var f=c.i?c.i(e):c.call(null,e),h=b+10,k=$APP.z.j(e.id,d),n=k?6.5:4.5;return"\x3ccircle class\x3d'dot"+$APP.N.i(k?" selected":null)+"' data-x-th-id\x3d'"+
44
- $APP.N.i(e.id)+"' cx\x3d'"+$APP.N.i(f)+"' cy\x3d'"+$APP.N.i(h)+"' r\x3d'"+$APP.N.i(n)+"' fill\x3d'"+$APP.N.i(IL(e))+"' /\x3e"},a))},Oma=function(a,b,c,d){if(c==null)return"";a=$APP.se(function(e){e=$APP.G(e);e=$APP.C(e,SL);return $APP.se(function(f){return $APP.z.j(f.id,c)?f:null},e)},a);return $APP.m(a)?(d=d.i?d.i(a):d.call(null,a),"\x3cline class\x3d'density-selected' x1\x3d'"+$APP.N.i(d)+"' y1\x3d'"+$APP.N.i(b)+"' x2\x3d'"+$APP.N.i(d)+"' y2\x3d'"+$APP.N.i(b+20)+"' /\x3e"):""},Pma=function(a,b,
45
- c,d){var e=mma(a);return""+$APP.N.i($APP.fe($APP.N,$APP.Ne.j(function(f){var h=$APP.G(f),k=$APP.C(h,SL);f=$APP.C(h,TL);h=$APP.C(h,UL);var n=$APP.t(k),r=$APP.C(HL,$APP.m(f)?f:vL);var v=$APP.x(k);v=v==null||v===0||e==null||e===0?0:v>=e?1:.4+.6*((v-1)/$APP.Sj.j(1,e-1));var w=cN($APP.gh($APP.m(f)?f:vL));k=$APP.x(k);f=""+$APP.N.i(k)+" "+$APP.N.i($APP.z.j(1,k)?"record":"records")+" · "+$APP.N.i($APP.gh($APP.m(f)?f:vL));return"\x3crect class\x3d'density-bin' role\x3d'button' aria-label\x3d'"+$APP.N.i(cN(f))+
46
- "' data-x-th-bin-record-id\x3d'"+$APP.N.i(n.id)+"' data-x-th-bin-count\x3d'"+$APP.N.i(k)+"' data-x-th-bin-cat\x3d'"+$APP.N.i(w)+"' x\x3d'"+$APP.N.i(h)+"' y\x3d'"+$APP.N.i(b)+"' width\x3d'"+$APP.N.i(4)+"' height\x3d'"+$APP.N.i(20)+"' fill\x3d'"+$APP.N.i(r)+"' fill-opacity\x3d'"+$APP.N.i(v)+"' /\x3e"},a)))+$APP.N.i(Oma(a,b,c,d))},Qma=function(a,b,c,d,e,f){function h(A){a:{var E=$APP.C(w,A.id);var I=a instanceof $APP.F?a.da:null;switch(I){case "order":A=$APP.Sj.j(0,e-16);E=v===0||v<0?8:$APP.z.j(1,v)?
47
- 8+A/2:8+$APP.Rj.j($APP.Sj.j(E/(v-1),0),1)*A;break a;case "time":E=A.t;I=$APP.G(d);A=$APP.C(I,NL);I=$APP.C(I,OL);var O=$APP.Sj.j(0,e-16);E=A==null||I==null?8:8+$APP.Rj.j($APP.Sj.j((E-A)/I,0),1)*O;break a;default:throw Error("No matching clause: "+$APP.N.i(I));}}return E}var k=$APP.m(f)?f.id:null,n=$APP.Wf.j($APP.ne,$APP.De(function(A,E){E=$APP.G(E);E=$APP.C(E,ML);return new $APP.H(null,2,5,$APP.J,[E,A*20],null)},c)),r=$APP.Sj.j(20,20*$APP.x(c)),v=$APP.x(b),w=$APP.Wf.j($APP.ne,$APP.De(function(A,E){return new $APP.H(null,
48
- 2,5,$APP.J,[E.id,A],null)},b)),y=$APP.Zh(KL,b);return"\x3csvg class\x3d'timeline-svg' width\x3d'"+$APP.N.i(e)+"' height\x3d'"+$APP.N.i(r)+"' viewBox\x3d'0 0 "+$APP.N.i(e)+" "+$APP.N.i(r)+"'\x3e"+$APP.N.i($APP.fe($APP.N,$APP.Ne.j(function(A){A=$APP.G(A);var E=$APP.C(A,ML);A=$APP.Oc(y,E,$APP.We);E=$APP.C(n,E);if($APP.z.j(fN,a)){var I=kma(A,h);A=$APP.m(lma(I))?Pma(I,E,k,h):eN(A,E,h,k)}else A=eN(A,E,h,k);return A},c)))+$APP.N.i(Nma(f,$APP.m(f)?h(f):null,r))+"\x3c/svg\x3e"},Rma=function(a,b,c,d,e,f,h,
49
- k){if($APP.x(d)===0)a.innerHTML="",b.innerHTML="\x3cdiv class\x3d'timeline-empty'\x3eNo records match the current filter.\x3c/div\x3e";else{var n=$APP.Sj.j(200,b.clientWidth);a.innerHTML=Mma(e,k);b.innerHTML=Qma(c,d,e,f,n,h)}},gN=function(a){return""+$APP.N.i(a.tag)+" · "+$APP.N.i(a.type)},Sma=function(a){var b=$APP.G(a);a=$APP.C(b,hN);var c=$APP.C(b,iN),d=$APP.C(b,jN);b=$APP.C(b,kN);c+=14;b-=14;return"\x3cline class\x3d'edge' x1\x3d'"+$APP.N.i(a)+"' y1\x3d'"+$APP.N.i(c)+"' x2\x3d'"+$APP.N.i(d)+"' y2\x3d'"+
50
- $APP.N.i(b)+"' /\x3e"},Tma=function(a,b){var c=$APP.G(a);a=$APP.C(c,$APP.ak);var d=$APP.C(c,lN),e=$APP.C(c,$APP.Mn);c=$APP.C(c,$APP.Nn);return"\x3csvg class\x3d'causality-svg' width\x3d'"+$APP.N.i(e)+"' height\x3d'"+$APP.N.i(c)+"' viewBox\x3d'0 0 "+$APP.N.i(e)+" "+$APP.N.i(c)+"'\x3e"+$APP.N.i($APP.fe($APP.N,$APP.Ne.j(Sma,d)))+$APP.N.i($APP.fe($APP.N,$APP.Ne.j(function(f){var h=$APP.G(f),k=$APP.C(h,$APP.er);f=$APP.C(h,WL);var n=$APP.C(h,mN);h=$APP.C(h,nN);n-=70;var r=h-14,v=$APP.z.j(k,b),w=n+12,y=
51
- n+22,A=n+22,E=r+18,I=r+11,O=cN("#"+$APP.N.i(k)+" "+$APP.N.i(gN(f))+" · "+$APP.N.i(FL(f)));k="\x3cg data-x-th-link-id\x3d'"+$APP.N.i(k)+"' role\x3d'button' aria-label\x3d'"+$APP.N.i(O)+"'\x3e\x3ctitle\x3e"+$APP.N.i(O)+"\x3c/title\x3e\x3crect class\x3d'node-rect"+$APP.N.i(v?" selected":null)+"' x\x3d'"+$APP.N.i(n)+"' y\x3d'"+$APP.N.i(r)+"' width\x3d'"+$APP.N.i(140)+"' height\x3d'"+$APP.N.i(28)+"' /\x3e\x3ccircle class\x3d'node-dot' cx\x3d'"+$APP.N.i(w)+"' cy\x3d'"+$APP.N.i(h)+"' r\x3d'"+$APP.N.i(4)+
52
- "' fill\x3d'"+$APP.N.i(IL(f))+"' /\x3e\x3ctext class\x3d'node-text id' x\x3d'"+$APP.N.i(y)+"' y\x3d'"+$APP.N.i(I)+"'\x3e#"+$APP.N.i(k)+"\x3c/text\x3e\x3ctext class\x3d'node-text' x\x3d'"+$APP.N.i(A)+"' y\x3d'"+$APP.N.i(E)+"'\x3e";h=$APP.N;n=h.i;f=gN(f);f=""+$APP.N.i(f);f=f.length<=22?f:""+$APP.N.i(f.substring(0,21))+"…";return k+n.call(h,cN(f))+"\x3c/text\x3e\x3c/g\x3e"},a)))+"\x3c/svg\x3e"},Vma=function(a,b,c,d){if(d==null)dM(a,oN,null),b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+$APP.N.i(cN("Select a record from the timeline to see its causality tree."))+
53
- "\x3c/div\x3e";else{a:{var e=d;for(var f=0;;){var h=e.causeId;if(typeof h!=="number"||f>=5E3)break a;h=DL(c,h);if($APP.m(h))f+=1,e=h;else break a}e=void 0}e=pma(c,e);c=new $APP.K(null,2,[pN,qN(e),Uma,rN(e)],null);if($APP.m(XL.i(e)))dM(a,oN,null),a=$APP.N,d=a.i,c=$APP.G(c),c=$APP.C(c,pN),c="Causality tree exceeds the "+$APP.N.i(200)+"-node cap (≥ "+$APP.N.i(c)+" nodes). Pick a smaller leaf record to view its subtree.",b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+d.call(a,cN(c))+"\x3c/div\x3e";
54
- else{e=sN(e,0,16);f=$APP.B(e,0,null);$APP.B(e,1,null);e=tN(f);f=uN(f);h=$APP.Aa($APP.Sj,0,$APP.Ne.j(mN,e));var k=$APP.Aa($APP.Sj,0,$APP.Ne.j(nN,e));e=new $APP.K(null,4,[$APP.ak,e,lN,f,$APP.Mn,h+70+16,$APP.Nn,k+14+16],null);c=$APP.z.j(1,pN.i(c));dM(a,oN,e);b.innerHTML=""+$APP.N.i(c?"\x3cdiv class\x3d'causality-leaf-hint'\x3e"+$APP.N.i(cN("This record has no cause and no effects in the current buffer. Pick an event/dispatch* record (or one with a 'Caused by' link in the detail pane) to see a chain."))+
55
- "\x3c/div\x3e":null)+$APP.N.i(Tma(e,d.id))}}},Wma=function(a){if($APP.m(cM(a,vN))){var b=$APP.l(a,"__xTraceHistoryCausalityEl"),c=cM(a,oN),d=wN.i?wN.i(a):wN.call(null,a),e=$APP.m(c)?qma(c,d):null,f=b==null?null:b.clientWidth;d=b==null?null:b.clientHeight;if($APP.m($APP.m(b)?$APP.m(c)?$APP.m(e)?typeof f==="number"&&typeof d==="number"&&f>0&&d>0:e:c:b)){var h=$APP.G(c);c=$APP.C(h,$APP.Mn);h=$APP.C(h,$APP.Nn);var k=mN.i(e),n=nN.i(e);e=k-f/2;k=n-d/2;f=$APP.Sj.j(0,c-f);d=$APP.Sj.j(0,h-d);d=new $APP.K(null,
56
- 2,[xN,$APP.Sj.j(0,$APP.Rj.j(f,e)),yN,$APP.Sj.j(0,$APP.Rj.j(d,k))],null);f=$APP.G(d);d=$APP.C(f,xN);f=$APP.C(f,yN);b.scrollLeft=d;b.scrollTop=f;dM(a,vN,!1)}}},Xma=function(a){var b=Cma();a:{var c=a.querySelectorAll("option");for(var d=c.length,e=0,f=$APP.zb($APP.Zg);;){if(e>=d){c=$APP.Bb(f);break a}var h=c[e].value;e+=1;f=$APP.z.j(h,"all")?f:$APP.Ab(f,h)}c=void 0}b=$APP.Ve(c,b);$APP.q(b)&&(b=$APP.fe($APP.N,$APP.Ne.j(Lma,b)),a.insertAdjacentHTML("beforeend",b))},Yma=function(a){var b=$APP.kp.i($APP.fb(tL));
57
- a.textContent=$APP.m(b)?"Resume":"Pause";a.pressed=b},Zma=function(a){var b=NM()!=null;a.textContent=b?"Stop":"Record";a.pressed=b},$ma=function(a){var b=$APP.G(a);a=$APP.C(b,zN);var c=$APP.C(b,$APP.cn),d=$APP.C(b,AN),e=$APP.C(b,BN),f=$APP.C(b,$APP.Z);b=$APP.C(b,CN);return"\x3cbutton class\x3d'session-chip"+$APP.N.i($APP.m(c)?" active":null)+$APP.N.i($APP.m(e)?" import":null)+"' type\x3d'button' data-x-th-session\x3d'"+$APP.N.i(cN(a))+"'\x3e"+$APP.N.i($APP.m(d)?"\x3cspan class\x3d'live-dot' aria-hidden\x3d'true'\x3e\x3c/span\x3e":
58
- null)+$APP.N.i(cN(f))+$APP.N.i($APP.m(e)?"\x3cspan class\x3d'chip-close' role\x3d'button' aria-label\x3d'Remove import' data-x-th-import-close\x3d'"+$APP.N.i(b)+"'\x3e×\x3c/span\x3e":null)+"\x3c/button\x3e"},ana=function(a,b,c,d){var e=new $APP.K(null,5,[zN,"live",$APP.cn,$APP.z.j(c,$APP.Ns),AN,!1,BN,!1,$APP.Z,"Live"],null),f=ZL(c)?bM(c):null,h=aM(c)?bM(c):null;a=$APP.pi.j(function(k){var n=k.id;return new $APP.K(null,5,[zN,""+$APP.N.i(n),$APP.cn,$APP.z.j(n,f),AN,$APP.z.j(n,d),BN,!1,$APP.Z,""+$APP.N.i(k.label)+
59
- " · "+$APP.N.i(k.recordCount)],null)},$APP.Hc(a));b=$APP.pi.j(function(k){var n=k.id;return new $APP.K(null,6,[zN,"import:"+$APP.N.i(n),$APP.cn,$APP.z.j(n,h),AN,!1,BN,!0,CN,n,$APP.Z,""+$APP.N.i(k.label)+" · "+$APP.N.i(k.recordCount)],null)},$APP.Hc(b));return $APP.fe($APP.N,$APP.Ne.j($ma,$APP.Qe.o(new $APP.H(null,1,5,$APP.J,[e],null),a,$APP.Hc([b]))))},bna=function(a,b,c,d,e){a.innerHTML=ana(b,c,d,e);b.length===0&&c.length===0?a.setAttribute("hidden",""):a.removeAttribute("hidden")},DN=function(a){var b=
60
- FL(a);b="#"+$APP.N.i(a.id)+" "+$APP.N.i(a.tag)+" · "+$APP.N.i(a.type)+$APP.N.i($APP.m($APP.m(b)?!$APP.ii(b):b)?" · "+$APP.N.i(b):null);return"\x3cx-button class\x3d'detail-link' size\x3d'sm' variant\x3d'ghost' data-x-th-link-id\x3d'"+$APP.N.i(a.id)+"' title\x3d'"+$APP.N.i(cN(b))+"'\x3e"+$APP.N.i(cN(b))+"\x3c/x-button\x3e"},cna=function(a,b,c,d){if($APP.m(d)){var e=JSON.stringify(d,null,2);var f=d.causeId;var h=typeof f==="number"?DL(c,f):null;f=nma(c,d);e="\x3cpre class\x3d'detail-json'\x3e"+$APP.N.i(cN(e))+
61
- "\x3c/pre\x3e"+$APP.N.i($APP.m(h)?"\x3cdiv class\x3d'detail-section' data-x-th-detail-cause\x3e\x3cdiv class\x3d'detail-label'\x3eCaused by\x3c/div\x3e"+$APP.N.i(DN(h))+"\x3c/div\x3e":null);c=$APP.N;d=c.i;h=$APP.G(f);f=$APP.C(h,$APP.mv);h=$APP.C(h,SL);if(f>0){var k=$APP.x(h);f=$APP.z.j(k,f)?"Effects ("+$APP.N.i(f)+")":"Effects ("+$APP.N.i(k)+" of "+$APP.N.i(f)+")";f="\x3cdiv class\x3d'detail-section' data-x-th-detail-effects\x3e\x3cdiv class\x3d'detail-label'\x3e"+$APP.N.i(f)+"\x3c/div\x3e"+$APP.N.i($APP.fe($APP.N,
62
- $APP.Ne.j(DN,h)))+"\x3c/div\x3e"}else f=null;e+=d.call(c,f);a.innerHTML=e;a.removeAttribute("hidden");b.removeAttribute("hidden")}else a.setAttribute("hidden",""),b.setAttribute("hidden","")},FN=function(a){var b=EN.get(a);if($APP.m(b))return b;b=xL(a);EN.set(a,b);return b},GN=function(a){return $APP.z.j(a,$APP.Ns)?"live":ZL(a)?"session:"+$APP.N.i(bM(a)):aM(a)?"import:"+$APP.N.i(bM(a)):"live"},wN=function(a){var b=$APP.l(a,"__xTraceHistoryView");a=$APP.l(a,"__xTraceHistoryViewSelected");return $APP.m(a)?
63
- $APP.l(a,GN(b)):null},IN=function(a,b){var c=$APP.l(a,"__xTraceHistoryViewSelected");c=$APP.m(c)?c:{};var d=GN($APP.l(a,"__xTraceHistoryView"));b==null?d in c&&delete c[d]:c[d]=b;$APP.T(a,"__xTraceHistoryViewSelected",c);b!=null&&$APP.z.j(HN,$APP.l(a,"__xTraceHistoryDockMode"))&&dM(a,vN,!0)},dna=function(a,b,c){var d=wN(a);b=DL(b,d);if(b==null)return null;if(BL(b,$APP.Vg.l(c,AL,FN)))return b;IN(a,null);return null},JN=function(a){return $APP.z.j(a,$APP.Ns)?fM():ZL(a)?(a=SM(bM(a)),a.length===0?fM():
64
- a):aM(a)?(a=XM(bM(a)),a.length===0?fM():a):fM()},ena=function(a,b,c,d){switch(d instanceof $APP.F?d.da:null){case "causality":b.setAttribute("hidden","");c.removeAttribute("hidden");a.classList.add("causality-mode");break;default:b.removeAttribute("hidden"),c.setAttribute("hidden",""),a.classList.remove("causality-mode")}},KN=function(a){aN(a);return $APP.Di(a,"__xTraceHistoryHighlightCid",null)},fna=function(a,b){if(b!=null&&b.componentId!=null&&$APP.M.j("document",b.tag))if($APP.z.j(b.componentId,
65
- $APP.l(a,"__xTraceHistoryHighlightCid")))b=bN(a);else{var c=b.componentId;b=rM(c);if($APP.m(b)){$APP.Di(a,"__xTraceHistoryHighlightCid",c);c=$APP.l(a,"__xTraceHistoryHighlightBox");if($APP.m(c))a=c;else{c=$APP.Rk(a,":host { all: initial; }\n.outline {\n position: absolute;\n pointer-events: none;\n box-sizing: border-box;\n border: 3px solid #ff2d8a;\n border-radius: 3px;\n background: rgba(255, 45, 138, 0.12);\n box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55);\n display: none;\n}\n@media (prefers-reduced-motion: no-preference) {\n .outline {\n transition: top .08s linear, left .08s linear,\n width .08s linear, height .08s linear;\n animation: x-th-highlight-pulse .55s ease-out 1 both;\n }\n @keyframes x-th-highlight-pulse {\n 0% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 0 12px rgba(255, 45, 138, 0.55); }\n 100% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55); }\n }\n}\n",
66
- 9998);var d=c.shadowRoot,e=document.createElement("div");e.className="outline";d.appendChild(e);$APP.Di(a,"__xTraceHistoryHighlightLayer",c);$APP.Di(a,"__xTraceHistoryHighlightBox",e);a=e}c=b.getBoundingClientRect();d=window.innerWidth;e=window.innerHeight;c.top>=0&&c.left>=0&&c.bottom<=e&&c.right<=d||b.scrollIntoView({block:"nearest",inline:"nearest",behavior:$APP.D($APP.m(LN)?LN.matches:null)?"auto":"smooth"});$M(a,b);a.style.display="block";b=a;b.style.animation="none";b=b.style.animation=""}else b=
67
- KN(a)}else b=KN(a);return b},NN=function(a){var b=$APP.l(a,"__xTraceHistoryTimelineEl"),c=$APP.l(a,"__xTraceHistoryCausalityEl"),d=$APP.l(a,"__xTraceHistoryLanesEl"),e=$APP.l(a,"__xTraceHistorySvgPaneEl"),f=$APP.l(a,"__xTraceHistoryCountEl"),h=$APP.l(a,"__xTraceHistoryDetailEl"),k=$APP.l(a,"__xTraceHistorySplitterEl"),n=$APP.l(a,"__xTraceHistoryHintEl"),r=$APP.l(a,"__xTraceHistoryPauseBtn"),v=$APP.l(a,"__xTraceHistoryRecordBtn"),w=$APP.l(a,"__xTraceHistorySessionsEl"),y=$APP.l(a,"__xTraceHistoryTagSelectEl"),
68
- A=$APP.l(a,"__xTraceHistoryFilter"),E=$APP.l(a,"__xTraceHistoryView"),I=JN(E),O=CL(I,$APP.Vg.l(A,AL,FN)),S=$APP.x(O),R=I.length,ca=PL(O),na=dma(O),ka=dna(a,I,A),oa=RM(),Ra=WM(),Sa=NM(),ob=function(){var $b=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.m($b)?$b:$APP.dq}(),Cb=function(){var $b=$APP.l(a,"__xTraceHistoryDockMode");return $APP.m($b)?$b:MN}();Xma(y);ena(a,b,c,Cb);switch(Cb instanceof $APP.F?Cb.da:null){case "causality":Vma(a,c,I,ka);break;default:Rma(d,e,ob,O,na,ca,ka,$APP.it.i(A))}f.textContent=
69
- ""+$APP.N.i(S);n.textContent=rma(S,R,ca,$APP.x(na));cna(h,k,I,ka);Yma(r);Zma(v);bna(w,oa,Ra,E,Sa);Wma(a);return fna(a,ka)},ON=function(a){return $APP.m(a)?$APP.z.j("circle",a.tagName.toLowerCase()):a},PN=function(a){return $APP.m(a)?$APP.z.j("rect",a.tagName.toLowerCase())&&a.getAttribute("data-x-th-bin-record-id")!=null:a},QN=function(a){a=a.getAttribute("data-x-th-id");return $APP.m(a)?parseInt(a,10):null},RN=function(a,b){$APP.m(b)?a.classList.add("collapsed"):a.classList.remove("collapsed");a=
70
- $APP.l(a,"__xTraceHistoryCollapseBtn");return $APP.m(a)?(a.textContent=$APP.m(b)?"»":"«",a.setAttribute("aria-expanded",$APP.m(b)?"false":"true")):null},SN=function(a){var b=!$APP.D($APP.l(a,"__xTraceHistoryCollapsed"));$APP.T(a,"__xTraceHistoryCollapsed",b);return RN(a,b)},gna=function(a,b){$APP.T(a,"__xTraceHistoryAxisMode",function(){switch(b){case "order":return $APP.dq;case "time":return fN;default:return $APP.dq}}());return NN(a)},hna=function(a,b){var c=function(){switch(b){case "timeline":return MN;
71
- case "causality":return HN;default:return MN}}();$APP.T(a,"__xTraceHistoryDockMode",c);$APP.z.j(HN,c)?dM(a,vN,!0):dM(a,vN,!1);return NN(a)},TN=function(a,b,c,d){a.textContent=d;a.removeAttribute("hidden");var e=b.getBoundingClientRect();d=c.clientX-e.left;c=c.clientY-e.top;e=b.scrollTop;var f=b.scrollLeft;b=$APP.Sj.j(0,d+12+280>b.clientWidth?d-12-280:d+12);a.style.left=""+$APP.N.i(b+f)+"px";return a.style.top=""+$APP.N.i(c+e+12)+"px"},ina=function(a,b){var c=b.target,d=$APP.l(a,"__xTraceHistoryTooltipEl"),
72
- e=$APP.l(a,"__xTraceHistoryTimelineEl");a=JN($APP.l(a,"__xTraceHistoryView"));if($APP.m(ON(c))){c=QN(c);a=DL(a,c);if($APP.m(a)){c=""+$APP.N.i(a.tag);var f=$APP.N,h=f.i;var k=a.componentId;k=$APP.m(k)?" #"+$APP.N.i(k):null;a=c+h.call(f,k)+"\n"+$APP.N.i(a.type)+"\n"+$APP.N.i(FL(a))+"\n@ "+$APP.N.i(GL(a.t));b=TN(d,e,b,a)}else b=null;return b}if($APP.m(PN(c))){f=c.getAttribute("data-x-th-bin-record-id");h=c.getAttribute("data-x-th-bin-count");c=c.getAttribute("data-x-th-bin-cat");c=$APP.m($APP.m(f)?$APP.m(h)?
73
- c:h:f)?new $APP.K(null,3,[UN,parseInt(f,10),VN,parseInt(h,10),TL,$APP.Gh.i(c)],null):null;if($APP.m(c)){f=$APP.G(c);h=$APP.C(f,UN);c=$APP.C(f,VN);f=$APP.C(f,TL);a=DL(a,h);if($APP.m(a)){h=""+$APP.N.i(a.tag);k=$APP.N;var n=k.i;var r=a.componentId;r=$APP.m(r)?" #"+$APP.N.i(r):null;a=h+n.call(k,r)+"\n"+$APP.N.i(c)+" "+$APP.N.i($APP.z.j(1,c)?"record":"records")+" · "+$APP.N.i($APP.gh($APP.m(f)?f:vL))+"\n@ "+$APP.N.i(GL(a.t));b=TN(d,e,b,a)}else b=null;return b}return null}return d.setAttribute("hidden",
74
- "")},WN=function(a,b,c,d,e,f){a:switch(b=b instanceof $APP.F?b.da:null,b){case "order":d=$APP.x(c);e=$APP.Sj.j(0,e-16);d===0||d<0?f=null:$APP.z.j(1,d)||e===0?f=0:(f=$APP.Rj.j($APP.Sj.j((f-8)/e,0),1),f=Math.round(f*(d-1)));c=$APP.m(f)?$APP.B(c,f,null):null;break a;case "time":var h=$APP.G(d);d=$APP.C(h,NL);b=$APP.C(h,OL);var k=$APP.Sj.j(0,e-16);h==null||d==null||b==null?f=0:e===0||e<0||k===0?f=d:(f=$APP.Rj.j($APP.Sj.j((f-8)/k,0),1),f=d+f*b);c=fma(c,f);break a;default:throw Error("No matching clause: "+
75
- $APP.N.i(b));}return $APP.m(c)?(IN(a,c.id),NN(a)):null},jna=function(a,b,c){function d(w){return WN(a,k,r,v,f,w.clientX-e.left)}c.preventDefault();b.setPointerCapture(c.pointerId);var e=b.getBoundingClientRect(),f=$APP.Sj.j(200,b.clientWidth),h=$APP.l(a,"__xTraceHistoryFilter"),k=function(){var w=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.m(w)?w:$APP.dq}(),n=JN($APP.l(a,"__xTraceHistoryView")),r=CL(n,$APP.Vg.l(h,AL,FN)),v=PL(r);WN(a,k,r,v,f,c.clientX-e.left);c=function y(){b.removeEventListener("pointermove",
76
- d);b.removeEventListener("pointerup",y);return b.removeEventListener("pointercancel",y)};b.addEventListener("pointermove",d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},XN=function(a,b){var c=$APP.l(a,"__xTraceHistoryFilter"),d=JN($APP.l(a,"__xTraceHistoryView"));c=CL(d,$APP.Vg.l(c,AL,FN));d=wN(a);a:if($APP.q(c)){if(d!=null)b:if(typeof d==="number"){for(var e=$APP.x(c),f=0;;){if(f>=e){d=null;break b}if($APP.z.j(d,$APP.Cc(c,f).id)){d=f;break b}f+=1}d=void 0}else d=
77
- null;else d=null;if(d==null)switch(b=b instanceof $APP.F?b.da:null,b){case "next":b=$APP.t(c);break a;case "prev":b=$APP.Wc(c);break a;default:throw Error("No matching clause: "+$APP.N.i(b));}else b=$APP.z.j(b,$APP.Yp)?$APP.C(c,d+1):$APP.C(c,d-1)}else b=null;return $APP.m(b)?(IN(a,b.id),NN(a)):null},YN=function(a){var b=$APP.D(a==null?null:a.isContentEditable);b?a=b:(a=a==null?null:a.tagName,a=$APP.jd(kna,a==null?null:a.toLowerCase()));return a},lna=function(a,b){if(YN(b.target))return null;switch(b.key){case "ArrowRight":return b.preventDefault(),
78
- XN(a,$APP.Yp);case "ArrowLeft":return b.preventDefault(),XN(a,$APP.nt);default:return null}},mna=function(a,b,c){function d(h){h=$APP.Sj.j(60,f+(e-h.clientY));return a.style.height=""+$APP.N.i(h)+"px"}c.preventDefault();b.setPointerCapture(c.pointerId);b.classList.add("dragging");var e=c.clientY,f=a.offsetHeight;c=function k(){b.removeEventListener("pointermove",d);b.removeEventListener("pointerup",k);b.removeEventListener("pointercancel",k);return b.classList.remove("dragging")};b.addEventListener("pointermove",
79
- d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},nna=function(a){return a==null||$APP.z.j("",a)?null:bL(a,".trace.json")?$APP.Cd(a,$APP.x(a)-11):bL(a,".json")?$APP.Cd(a,$APP.x(a)-5):a},$N=function(a,b){var c=$APP.l(a,"__xTraceHistoryHintEl"),d=cM(a,ZN);typeof d==="number"&&clearTimeout(d);c.textContent=b;c.classList.add("error");b=setTimeout(function(){c.classList.remove("error");dM(a,ZN,null);return NN(a)},4E3);return dM(a,ZN,b)},bO=function(a,b){var c=new FileReader,
80
- d=nna(b.name);c.onload=function(){var e=aO.j(c.result,d);e!=null?($APP.l(a,"__xTraceHistoryHintEl").classList.remove("error"),$APP.T(a,"__xTraceHistoryView",new $APP.H(null,2,5,$APP.J,[$L,e],null)),e=NN(a)):e=$N(a,"Import failed — see console for details.");return e};c.onerror=function(){return $N(a,"Could not read file.")};return c.readAsText(b)},cO=function(a){a=a.dataTransfer;return $APP.m(a)?a.types.includes("Files"):null},ona=function(a,b){var c=a.shadowRoot;a=$APP.m(c)?c:a.attachShadow({mode:"open"});
2
+ var GL=function(a,b){const c=a.length-b.length;return c>=0&&a.indexOf(b,c)==c},Vma=function(a){return a-1},HL=function(a){if(a instanceof RegExp)return a;var b=$APP.hh(/^\(\?([idmsux]*)\)/,a),c=$APP.B(b,0,null);b=$APP.B(b,1,null);return new RegExp(a.substring(c==null?0:c.length),$APP.m(b)?b:"")},Wma=function(a){return $APP.Od($APP.xa(function(b,c){return $APP.Qd(b,c,$APP.Gc(b,c,0)+1)},$APP.tb($APP.fe),a))},Xma=function(a){return new $APP.H(null,2,5,$APP.I,[$APP.Be(200,a),$APP.Ce(200,a)],null)},IL=
3
+ function(){var a=window;var b=a.location.search;b=b==null?null:$APP.hh(Yma,b);return $APP.D(b)||$APP.l(a,"BAREDOM_TRACE_HISTORY")===!0||$APP.z.j("raw",$APP.l(a,"BAREDOM_TRACE_HISTORY"))},Zma=function(a){a=a==null?null:a.tagName;a=a==null?null:a.toLowerCase();return $APP.m(a)?a:"document"},JL=function(a){try{return a==null?null:$APP.Jm(a)}catch(b){try{return""+$APP.N.i(a)}catch(c){return"(unprintable)"}}},$ma=function(a,b,c){a=$APP.G(a);var d=$APP.C(a,$APP.P),e=$APP.C(a,$APP.wt),f=$APP.C(a,KL),g=$APP.C(a,
4
+ LL);var k=$APP.Dd(d);k=$APP.m(k)?""+$APP.N.i(k)+"/"+$APP.N.i($APP.Rg(d)):$APP.Rg(d);b={schemaVersion:1,id:b,t:c,type:k,tag:e,componentId:f,causeId:g};switch(d instanceof $APP.F?d.ba:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return c=$APP.ti.i(a),b.eventName=c,c=JL($APP.ui.i(a)),b.detail=c,c=$APP.D($APP.vi.i(a)),b.cancelable=c,a=$APP.D($APP.wi.i(a)),b.defaultPrevented=a,b;case "state/instance-field-set":return c=$APP.Zh.i(a),b.field=c,a=JL($APP.Q.i(a)),
5
+ b.value=a,b;case "dom/attribute-set":return c=$APP.ji.i(a),b.attribute=c,a=$APP.Q.i(a),b.value=a,b;case "dom/attribute-removed":return a=$APP.ji.i(a),b.attribute=a,b;case "lifecycle/attribute-changed":return c=$APP.ji.i(a),b.attribute=c,c=$APP.Qi.i(a),b.oldValue=c,a=$APP.Ri.i(a),b.newValue=a,b;case "lifecycle/connected":case "lifecycle/disconnected":case "lifecycle/moved":return b;default:return b}},ML=function(a){a=""+$APP.N.i(a);return a.length<2?"0"+$APP.N.i(a):a},ana=function(a,b){return $APP.Hf.l($APP.fe,
6
+ $APP.Ie(function(c){var d=$APP.B(c,0,null);$APP.B(c,1,null);return $APP.bd(b,d)}),a)},VL=function(a,b,c,d){var e=$APP.G(d);d=$APP.C(e,NL);var f=$APP.C(e,$APP.nr),g=$APP.C(e,OL);e=$APP.C(e,PL);a:{var k=a.length;for(var n=0,r=$APP.tb($APP.Kg);;){if(n>=k){k=$APP.vb(r);break a}var v=a[n].componentId;n+=1;r=v!=null?$APP.ub(r,v):r}k=void 0}k=ana(b,k);b=$APP.D(e);e={};k=$APP.q(k);n=null;for(v=r=0;;)if(v<r){var w=n.C(null,v),y=$APP.B(w,0,null),A=$APP.B(w,1,null);w=e;y=""+$APP.N.i(y);A={tag:$APP.wt.i(A),firstSeen:QL.i(A)};
7
+ w[y]=A;v+=1}else if(k=$APP.q(k))$APP.Xc(k)?(r=$APP.Ab(k),k=$APP.Bb(k),n=r,r=$APP.x(r)):(n=$APP.t(k),r=$APP.B(n,0,null),v=$APP.B(n,1,null),n=e,r=""+$APP.N.i(r),v={tag:$APP.wt.i(v),firstSeen:QL.i(v)},n[r]=v,k=$APP.u(k),n=null,r=0),v=0;else break;k=[];c=$APP.q(c);n=null;for(v=r=0;;)if(v<r){w=n.C(null,v);var E=$APP.G(w);w=$APP.C(E,$APP.jr);y=$APP.C(E,$APP.Z);A=$APP.C(E,RL);var J=$APP.C(E,SL),O=$APP.C(E,TL);E=$APP.C(E,UL);k.push({id:w,label:y,startT:A,endT:J,startId:O,endId:E});v+=1}else if(c=$APP.q(c))$APP.Xc(c)?
8
+ (r=$APP.Ab(c),c=$APP.Bb(c),n=r,r=$APP.x(r)):(n=$APP.t(c),A=$APP.G(n),n=$APP.C(A,$APP.jr),r=$APP.C(A,$APP.Z),v=$APP.C(A,RL),w=$APP.C(A,SL),y=$APP.C(A,TL),A=$APP.C(A,UL),k.push({id:n,label:r,startT:v,endT:w,startId:y,endId:A}),c=$APP.u(c),n=null,r=0),v=0;else break;return{schemaVersion:1,exportedAt:d,origin:f,userAgent:g,forensic:b,components:e,sessions:k,records:a}},WL=function(a){if($APP.pa(a)){if(typeof a.schemaVersion!=="number")return new $APP.K(null,1,[$APP.mj,"Envelope is missing schemaVersion."],
9
+ null);if($APP.M.j(1,a.schemaVersion))return new $APP.K(null,1,[$APP.mj,"Schema version mismatch: expected "+$APP.N.i(1)+", got "+$APP.N.i(a.schemaVersion)+"."],null);if($APP.p($APP.ma(a.records)))return new $APP.K(null,1,[$APP.mj,"Envelope.records is not an array."],null);var b=a.records,c=b.length;a:{for(var d=0;;){if(d>=c){b=null;break a}var e=b[d];if($APP.pa(e)&&typeof e.id==="number"&&typeof e.t==="number"&&typeof e.type==="string")d+=1;else{b=d;break a}}b=void 0}return b==null?new $APP.K(null,
10
+ 1,[$APP.Tq,a],null):new $APP.K(null,1,[$APP.mj,"Record at index "+$APP.N.i(b)+" is missing required fields (id, t, type)."],null)}return new $APP.K(null,1,[$APP.mj,"Envelope is not a JSON object."],null)},bna=function(a,b,c){return $APP.x(a)>=c?$APP.zd.j($APP.Oc(a),b):$APP.zd.j(a,b)},cna=function(){var a=PL.i($APP.ab(XL));return $APP.m(a)?$APP.Og(YL):$APP.no.j($APP.Og(YL),$APP.vr)},$L=function(a){var b=$APP.ke(function(c){var d=$APP.B(c,0,null);c=$APP.B(c,1,null);return $APP.bd(c,a)?d:null},dna);
11
+ return $APP.m(b)?b:ZL},aM=function(a){try{var b=JSON.stringify(a)}catch(c){b=""}return $APP.m(b)?b.toLowerCase():""},eM=function(a,b){var c=$APP.G(b),d=$APP.C(c,$APP.wt),e=$APP.C(c,bM);b=$APP.C(c,cM);c=$APP.Gc(c,dM,aM);if(d=d==null||$APP.z.j("",d)||$APP.z.j("all",d)||$APP.z.j(d,a.tag)){if(e=e==null||$APP.bd(e,$L(a.type)))e=b==null||$APP.z.j("",b)||!((c.i?c.i(a):c.call(null,a)).indexOf(b)<0);d=e}return d},fM=function(a,b){return $APP.ff($APP.hd(function(c){return c.t},$APP.Je(function(c){return eM(c,
12
+ b)},$APP.Ac(a))))},gM=function(a,b){return typeof b==="number"?a.find(function(c){return $APP.z.j(b,c.id)}):null},hM=function(a){if(a!=null)try{var b=JSON.stringify(a),c=""+$APP.N.i(b);return c.length<=60?c:""+$APP.N.i($APP.vd(c,60))+"…"}catch(d){return"(unstringifiable)"}else return null},iM=function(a){switch(a.type){case "event/dispatch":return""+$APP.N.i(a.eventName)+$APP.N.i(function(){var b=hM(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "event/dispatch-cancelable":return""+$APP.N.i(a.eventName)+
13
+ $APP.N.i($APP.m(a.defaultPrevented)?" (prevented)":null)+$APP.N.i(function(){var b=hM(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "event/dispatch-document":return""+$APP.N.i(a.eventName)+$APP.N.i(function(){var b=hM(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "state/instance-field-set":return""+$APP.N.i(a.field)+" \x3d "+$APP.N.i(function(){var b=hM(a.value);return $APP.m(b)?b:"null"}());case "dom/attribute-set":return""+$APP.N.i(a.attribute)+"\x3d"+$APP.N.i($APP.rh($APP.Ac([a.value])));
14
+ case "dom/attribute-removed":return""+$APP.N.i(a.attribute)+" removed";case "lifecycle/connected":return"connected";case "lifecycle/disconnected":return"disconnected";case "lifecycle/moved":return"moved";case "lifecycle/attribute-changed":return""+$APP.N.i(a.attribute)+": "+$APP.N.i($APP.rh($APP.Ac([a.oldValue])))+" → "+$APP.N.i($APP.rh($APP.Ac([a.newValue])));default:return"("+$APP.N.i(a.type)+")"}},jM=function(a){if(typeof a!=="number")return"";if(a<1E3)return""+$APP.N.i(a.toFixed(0))+"ms";if(a<
15
+ 6E4)return""+$APP.N.i((a/1E3).toFixed(3))+"s";var b=$APP.sd(a,6E4)/1E3;return""+$APP.N.i(Math.floor(a/6E4))+"m"+$APP.N.i(b.toFixed(1))+"s"},lM=function(a){a=$L(a.type);return $APP.C(kM,$APP.m(a)?a:ZL)},nM=function(a){a=a.componentId;return $APP.m(a)?a:mM},ena=function(a){return $APP.ff($APP.hd(oM,$APP.De.j(function(b){var c=$APP.B(b,0,null);b=$APP.B(b,1,null);var d=$APP.t(b);return new $APP.K(null,3,[pM,c,$APP.wt,d.tag,oM,$APP.Yd($APP.Gj,$APP.De.j(function(e){return e.t},b))],null)},$APP.Ah(nM,a))))},
16
+ sM=function(a){if($APP.q(a)){var b=$APP.De.j(function(c){return c.t},a);a=$APP.Yd($APP.Gj,b);b=$APP.Yd($APP.Hj,b);return new $APP.K(null,3,[qM,a,fna,b,rM,$APP.Hj.j(1,b-a)],null)}return null},gna=function(a,b){return $APP.q(a)?$APP.Zd(tM,function(c){return Math.abs(c.t-b)},a):null},hna=function(a){if($APP.q(a)){var b=Wma($APP.De.j(function(d){return $L(d.type)},a)),c=$APP.Yd($APP.Hj,$APP.Bg(b));a=$APP.ke(function(d){return $APP.z.j(c,$APP.C(b,d))?d:null},YL);return $APP.m(a)?a:ZL}return null},lna=
17
+ function(a,b){a=$APP.Ah(function(c){c=b.i?b.i(c):b.call(null,c);return Math.floor(c/4)},a);return $APP.ff($APP.hd(uM,$APP.De.j(function(c){var d=$APP.B(c,0,null),e=$APP.B(c,1,null);c=$APP.De.j(function(f){return f.t},e);e=$APP.ff($APP.hd(function(f){return f.id},e));return new $APP.K(null,7,[uM,d,vM,e,wM,hna(e),xM,d*4,ina,(d+1)*4,jna,$APP.Yd($APP.Gj,c),kna,$APP.Yd($APP.Hj,c)],null)},a)))},mna=function(a){return $APP.ke(function(b){return $APP.x(vM.i(b))>3},a)},nna=function(a){return $APP.q(a)?$APP.Yd($APP.Hj,
18
+ $APP.De.j(function(b){return $APP.x(vM.i(b))},a)):0},ona=function(a,b){var c=b.id;a=$APP.hd(function(d){return d.t},$APP.Je(function(d){return $APP.z.j(c,d.causeId)},$APP.Ac(a)));return new $APP.K(null,2,[$APP.Bv,$APP.x(a),vM,$APP.ff($APP.Be(50,a))],null)},pna=function(a,b){return $APP.ff($APP.hd(function(c){return c.id},$APP.Je(function(c){return $APP.z.j(b,c.causeId)},$APP.Ac(a))))},qna=function(a,b){var c=Xma(yM(a,b));a=$APP.B(c,0,null);c=$APP.B(c,1,null);var d=$APP.Ah(function(e){return e.causeId},
19
+ a);return $APP.Eg.l(function g(f){var k=$APP.Sh.j;var n=f.id;n=d.i?d.i(n):d.call(null,n);return new $APP.K(null,2,[zM,f,$APP.cu,k.call($APP.Sh,g,n)],null)}(b),AM,$APP.D($APP.q(c)))},rna=function(a,b){return typeof b==="number"?$APP.ke(function(c){return $APP.z.j(b,$APP.jr.i(c))?c:null},$APP.Zj.i(a)):null},sna=function(a,b,c,d){b===0?c="No records yet — interact with components to start tracing.":a===0?c=""+$APP.N.i(b)+" "+$APP.N.i($APP.z.j(1,b)?"record":"records")+" · all hidden by filter":(a=""+
20
+ $APP.N.i(a)+$APP.N.i($APP.M.j(a,b)?" of "+$APP.N.i(b):null)+" "+$APP.N.i($APP.z.j(1,a)?"record":"records")+" · "+$APP.N.i(d)+" "+$APP.N.i($APP.z.j(1,d)?"lane":"lanes"),b=$APP.N,d=b.i,c=rM.i(c),c=$APP.m(c)?" · spanning "+$APP.N.i(jM(c)):null,c=a+d.call(b,c));return c},CM=function(a){return $APP.Wc(a)&&$APP.z.j(BM,$APP.t(a))},EM=function(a){return $APP.Wc(a)&&$APP.z.j(DM,$APP.t(a))},FM=function(a){return $APP.Wc(a)&&($APP.z.j(BM,$APP.t(a))||$APP.z.j(DM,$APP.t(a)))?$APP.Dc(a):null},GM=function(a,b){a=
21
+ $APP.l(a,"__xTraceHistoryUiState");return $APP.m(a)?(b=$APP.l(a,$APP.Rg(b)),void 0===b?null:b):null},HM=function(a,b,c){var d=$APP.l(a,"__xTraceHistoryUiState");d=$APP.m(d)?d:{};b=$APP.Rg(b);d[b]=c;a.__xTraceHistoryUiState=d},JM=function(){var a=vM.i($APP.ab(XL)),b=$APP.ab(IM),c=b[1];if(b[0]===a)return c;b=$APP.Jm($APP.ff(a));$APP.ze(IM,[a,b]);return b},tna=function(){var a=$APP.oo.J(KM,$APP.Eg,$APP.Bl,!1);a=$APP.G(a);a=$APP.C(a,LM);a=$APP.q(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.C(null,d);$APP.B(e,
22
+ 0,null);e=$APP.B(e,1,null);try{e.G?e.G():e.call(null)}catch(f){}d+=1}else if(a=$APP.q(a)){if($APP.Xc(a))c=$APP.Ab(a),a=$APP.Bb(a),b=c,c=$APP.x(c);else{b=$APP.t(a);$APP.B(b,0,null);e=$APP.B(b,1,null);try{e.G?e.G():e.call(null)}catch(f){}a=$APP.u(a);b=null;c=0}d=0}else return null},MM=function(){if(KM instanceof $APP.we){var a=KM.state;a=$APP.Eg.l?$APP.Eg.l(a,$APP.Bl,!0):$APP.Eg.call(null,a,$APP.Bl,!0);if(KM instanceof $APP.we){var b=KM.rc;if(b!=null&&!$APP.m(b.i?b.i(a):b.call(null,a)))throw Error("Validator rejected reference state");
23
+ b=KM.state;KM.state=a;KM.dc!=null&&$APP.xe(KM,b,a);a=new $APP.H(null,2,5,$APP.I,[b,a],null)}else a=new $APP.H(null,2,5,$APP.I,[$APP.ab(KM),$APP.Cb(KM,a)],null)}else a=new $APP.H(null,2,5,$APP.I,[$APP.ab(KM),$APP.jo(KM,$APP.Eg,$APP.Bl,!0)],null);b=$APP.B(a,0,null);$APP.B(a,1,null);return $APP.m($APP.Bl.i(b))?null:requestAnimationFrame(tna)},una=function(a,b){var c=NM.i(a)+1;return $APP.po($APP.Eg.l(a,NM,c),new $APP.H(null,2,5,$APP.I,[LM,c],null),b)},vna=function(a,b,c){if($APP.z.j("document",b))return new $APP.K(null,
24
+ 2,[$APP.jr,null,OM,!1],null);b=$APP.l(a,"__xTraceHistoryId");if(b!=null)return new $APP.K(null,2,[$APP.jr,b,OM,!1],null);a.__xTraceHistoryId=c;return new $APP.K(null,2,[$APP.jr,c,OM,!0],null)},QM=function(){var a=$APP.oo.J(XL,$APP.Rh,PM,$APP.ic);return PM.i(a)-1},wna=function(a){$APP.oo.j(RM,$APP.ic);try{a.G?a.G():a.call(null)}finally{$APP.oo.j(RM,Vma)}},SM=function(a){var b=a.getRootNode();return b instanceof ShadowRoot?b.host:a.parentNode},TM=function(a){for(;;)if(a!=null&&a instanceof Element){var b=
25
+ a.localName;var c=b!=null;b=c?b.includes("-"):c;if($APP.m(b))return a;a=SM(a)}else return null},UM=function(a){if(a instanceof Node)for(a=SM(a);;){if(a==null||a===document)return!1;if($APP.m($APP.l(a,"__xTraceHistoryInternal")))return!0;a=SM(a)}else return!1},VM=function(a){var b=document.body;if($APP.m($APP.m(b)?a!=null:b)){b=[b];for(var c=0;;){if(b.length===0||c>=1E6)return null;var d=b.pop();if(d instanceof Element){if(!$APP.m($APP.l(d,"__xTraceHistoryInternal"))){if($APP.z.j(a,$APP.l(d,"__xTraceHistoryId")))return d;
26
+ for(var e=d.children,f=e.length,g=0;;)if(g<f)b.push(e[g]),g+=1;else break;d=d.shadowRoot;if($APP.m(d))for(d=d.children,e=d.length,f=0;;)if(f<e)b.push(d[f]),f+=1;else break}c+=1}}}else return null},WM=function(a){var b=$APP.Yh.i(a);return $APP.bd(xna,$APP.P.i(a))?b instanceof Node?(a=$APP.l(b,"__xTraceHistoryInternal"),$APP.m(a)?a:UM(b)):!1:UM(b)},$M=function(a,b,c,d){var e=$APP.ab(XL),f=$APP.Yh.i(a);if(!$APP.m(function(){var v=(v=$APP.p(d))?$APP.lp.i(e):v;return $APP.m(v)?v:WM(a)}())){var g=function(){var v=
27
+ TM(f);return $APP.m(v)?v:f}(),k=Zma(g);g=vna(g,k,XM.i(e));var n=$APP.G(g);g=$APP.C(n,$APP.jr);n=$APP.C(n,OM);var r=$APP.Nc($APP.ab(YM));r=$APP.Eg.o(a,$APP.wt,k,$APP.Ac([KL,g,LL,r]));b=$ma(r,b,c);b=bna(vM.i(e),b,$APP.Al.i(e));c=$APP.m(n)?$APP.Eg.l(ZM.i(e),g,new $APP.K(null,2,[$APP.wt,k,QL,c],null)):ZM.i(e);k=$APP.m(n)?g+1:XM.i(e);$APP.oo.o(XL,$APP.Eg,vM,b,$APP.Ac([XM,k,ZM,c]));MM()}},aN=function(a,b){var c=TM(b);b=$APP.l($APP.m(c)?c:b,"__xTraceHistoryId");if($APP.m(b))switch(c=$APP.P.i(a),c instanceof
28
+ $APP.F?c.ba:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return""+$APP.N.i(b)+":evt:"+$APP.N.i($APP.ti.i(a));case "state/instance-field-set":return""+$APP.N.i(b)+":fld:"+$APP.N.i($APP.Zh.i(a));case "dom/attribute-set":case "dom/attribute-removed":return""+$APP.N.i(b)+":attr:"+$APP.N.i($APP.ji.i(a));default:return null}else return null},cN=function(a,b,c,d){var e=$APP.p(PL.i(a));return e?(b=aN(b,c),$APP.m(b)?(a=$APP.C(bN.i(a),b),$APP.m(a)?d-a<16:null):
29
+ null):e},dN=function(a,b,c){if($APP.m(PL.i($APP.ab(XL))))return null;a=aN(a,b);return $APP.m(a)?$APP.oo.J(XL,$APP.po,new $APP.H(null,2,5,$APP.I,[bN,a],null),c):null},fN=function(a){var b=$APP.P.i(a),c=$APP.Yh.i(a),d=performance.now();if($APP.m(function(){var f=$APP.ab(RM)>0;if(f)return f;f=$APP.ab(eN);f=$APP.m(f)?$APP.bd(yna,b):f;if($APP.m(f))return f;f=WM(a);return $APP.m(f)?f:cN($APP.ab(XL),a,c,d)}()))return null;var e=QM();$M(a,e,d,!1);return dN(a,c,d)},zna=function(){var a=EventTarget.prototype,
30
+ b=a.dispatchEvent;$APP.m($APP.l(b,"__xTraceHistoryWrapped"))||($APP.ze(gN,b),b=function(c){var d=$APP.ab(gN);var e=$APP.p($APP.ab(eN));e||(e=$APP.lp.i($APP.ab(XL)),e=$APP.m(e)?e:$APP.ab(RM)>0||UM(this));if($APP.m(e))c=d.call(this,c);else{e=c instanceof CustomEvent;var f=performance.now(),g=e?new $APP.K(null,2,[$APP.P,this===document?$APP.Ai:$APP.m(c.cancelable)?$APP.yi:$APP.si,$APP.ti,c.type],null):null;if($APP.m(e?cN($APP.ab(XL),g,this,f):e))c=d.call(this,c);else{var k=QM();$APP.oo.l(YM,$APP.zd,
31
+ k);try{var n=d.call(this,c)}finally{$APP.oo.j(YM,$APP.Oc)}if(e)try{$M(new $APP.K(null,6,[$APP.P,this===document?$APP.Ai:$APP.m(c.cancelable)?$APP.yi:$APP.si,$APP.Yh,this,$APP.ti,c.type,$APP.ui,c.detail,$APP.vi,c.cancelable,$APP.wi,c.defaultPrevented],null),k,f,!0),dN(g,this,f)}catch(r){}c=n}}return c},b.__xTraceHistoryWrapped=!0,a.dispatchEvent=b)},Ana=function(){return JM()},Bna=function(){var a=ZM.i($APP.ab(XL)),b={};a=$APP.q(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.C(null,e),g=$APP.B(f,0,null),
32
+ k=$APP.B(f,1,null);f=b;g=""+$APP.N.i(g);k={tag:$APP.wt.i(k),firstSeen:QL.i(k)};f[g]=k;e+=1}else if(a=$APP.q(a))$APP.Xc(a)?(d=$APP.Ab(a),a=$APP.Bb(a),c=d,d=$APP.x(d)):(c=$APP.t(a),d=$APP.B(c,0,null),e=$APP.B(c,1,null),c=b,d=""+$APP.N.i(d),e={tag:$APP.wt.i(e),firstSeen:QL.i(e)},c[d]=e,a=$APP.u(a),c=null,d=0),e=0;else break;return b},Cna=function(a){var b=a.components;return b==null?$APP.Me:$APP.De.j(function(c){return $APP.l(b,c).tag},Object.keys(b))},Dna=function(){var a=$APP.ab(XL),b=$APP.De.j($APP.wt,
33
+ $APP.Bg(ZM.i(a)));a=$APP.He(function(c){c=$APP.G(c);c=$APP.C(c,hN);return Cna(c)},$APP.Ac([iN.i(a)]));return $APP.ff($APP.Hf.j($APP.Pg(),$APP.Fe.j(b,a)))},jN=function(){$APP.oo.J(XL,$APP.Eg,$APP.lp,!0);return MM()},kN=function(){$APP.oo.J(XL,$APP.Eg,$APP.lp,!1);return MM()},pN=function(){$APP.oo.o(XL,$APP.Eg,vM,lN,$APP.Ac([PM,0,mN,$APP.Me,nN,0,oN,null,bN,$APP.fe]));return MM()},qN=function(){return oN.i($APP.ab(XL))},Ena=function(a,b,c,d){return b==null?a:$APP.Sh.j(function(e){e=$APP.G(e);var f=$APP.C(e,
34
+ $APP.jr);return $APP.z.j(f,b)?$APP.Eg.o(e,SL,c,$APP.Ac([UL,d])):e},a)},rN=function(){var a=performance.now();$APP.oo.j(XL,function(b){return $APP.Eg.l($APP.Rh.ta(b,mN,Ena,oN.i(b),a,PM.i(b)),oN,null)});return MM()},sN=function(){qN()!=null&&(console.warn("[x-trace-history] start-session! called while a session was already active — stopping the previous one"),rN());var a=performance.now();$APP.oo.j(XL,function(b){var c=nN.i(b),d=PM.i(b);return $APP.Eg.o($APP.Rh.J(b,mN,$APP.zd,new $APP.K(null,6,[$APP.jr,
35
+ c,$APP.Z,"Session "+$APP.N.i(c),RL,a,SL,null,TL,d,UL,null],null)),oN,c,$APP.Ac([nN,c+1]))});MM();return oN.i($APP.ab(XL))},tN=function(a,b){var c=$APP.G(b);b=$APP.C(c,TL);c=$APP.C(c,UL);a=a.id;return a>=b&&(c==null||a<c)},uN=function(){var a=$APP.ab(XL),b=JM(),c=$APP.Ac(b);return $APP.Jm($APP.Sh.j(function(d){var e=$APP.G(d);d=$APP.C(e,$APP.jr);var f=$APP.C(e,$APP.Z),g=$APP.C(e,RL),k=$APP.C(e,SL),n=$APP.x($APP.Je(function(r){return tN(r,e)},c));return{id:d,label:f,startT:g,endT:$APP.m(k)?k:null,recordCount:n}},
36
+ mN.i(a)))},vN=function(a){var b=$APP.ab(XL),c=$APP.t($APP.Je(function(d){return $APP.z.j($APP.jr.i(d),a)},mN.i(b)));return $APP.m(c)?$APP.Jm($APP.hd(function(d){return d.t},$APP.Je(function(d){return tN(d,c)},$APP.Bc(JM())))):[]},Fna=function(a){if(typeof a==="string"){try{var b=JSON.parse(a)}catch(c){b=wN}a=$APP.z.j(b,wN)?new $APP.K(null,1,[$APP.mj,"File is not valid JSON."],null):WL(b)}else a=$APP.pa(a)?WL(a):new $APP.K(null,1,[$APP.mj,"Import expects a JSON string or a parsed envelope object."],
37
+ null);return a},xN=function(a){$APP.oo.J(XL,$APP.Rh,iN,function(b){return $APP.ff($APP.Le(function(c){c=$APP.G(c);c=$APP.C(c,$APP.jr);return $APP.z.j(c,a)},b))});return MM()},zN=function(){return $APP.Jm($APP.Sh.j(function(a){var b=$APP.G(a);a=$APP.C(b,$APP.jr);var c=$APP.C(b,$APP.Z),d=$APP.C(b,yN);b=$APP.C(b,hN);return{id:a,label:c,importedAt:d,recordCount:b.records.length}},iN.i($APP.ab(XL))))},AN=function(a){var b=$APP.t($APP.Je(function(c){return $APP.z.j($APP.jr.i(c),a)},iN.i($APP.ab(XL))));
38
+ return $APP.m(b)?hN.i(b).records:[]},BN=function(a,b){return new $APP.K(null,4,[NL,a.getTime(),$APP.nr,function(){var c=window;c=c==null?null:c.location;c=c==null?null:c.href;return $APP.m(c)?c:""}(),OL,function(){var c=navigator;c=c==null?null:c.userAgent;return $APP.m(c)?c:""}(),PL,b],null)},Gna=function(){var a=$APP.ab(XL),b=JM(),c=BN(new Date,PL.i(a));return VL(b,ZM.i(a),mN.i(a),c)},CN=function(){var a=new Date,b=$APP.ab(XL),c=JM(),d=BN(a,PL.i(b));b=VL(c,ZM.i(b),mN.i(b),d);b=JSON.stringify(b,
39
+ null,2);a=""+$APP.N.i("baredom-trace-")+$APP.N.i(a.getFullYear())+$APP.N.i(ML(a.getMonth()+1))+$APP.N.i(ML(a.getDate()))+"-"+$APP.N.i(ML(a.getHours()))+$APP.N.i(ML(a.getMinutes()))+$APP.N.i(ML(a.getSeconds()))+$APP.N.i(".trace.json");b=URL.createObjectURL(new Blob([b],{type:"application/json"}));c=document.createElement("a");c.href=b;c.download=a;c.style.display="none";document.body.appendChild(c);try{var e=c.click()}finally{document.body.removeChild(c),URL.revokeObjectURL(b)}return e},DN=function(a,
40
+ b){b=b.getBoundingClientRect();a.style.top=""+$APP.N.i(b.top)+"px";a.style.left=""+$APP.N.i(b.left)+"px";a.style.width=""+$APP.N.i(b.width)+"px";a.style.height=""+$APP.N.i(b.height)+"px"},EN=function(a){a=$APP.l(a,"__xTraceHistoryHighlightBox");$APP.m(a)&&(a.style.display="none")},FN=function(a){var b=$APP.l(a,"__xTraceHistoryHighlightCid");if($APP.m(b)){b=VM(b);if($APP.m(b))return a=$APP.l(a,"__xTraceHistoryHighlightBox"),$APP.m(a)?(DN(a,b),a.style.display="block"):null;EN(a);return $APP.mi(a,"__xTraceHistoryHighlightCid",
41
+ null)}return null},GN=function(a){return(""+$APP.N.i(a)).replace(Hna,"\x26amp;").replace(Ina,"\x26lt;").replace(Jna,"\x26gt;").replace(Kna,"\x26quot;").replace(Lna,"\x26#39;")},Mna=function(a){return"\x3coption value\x3d'"+$APP.N.i(GN(a))+"'\x3e"+$APP.N.i(GN(a))+"\x3c/option\x3e"},HN=function(a,b){return"\x3clabel class\x3d'cat'\x3e\x3cx-checkbox data-x-th-cat\x3d'"+$APP.N.i(a)+"' "+$APP.N.i($APP.m(b)?"checked ":null)+"aria-label\x3d'"+$APP.N.i(a)+"'\x3e\x3c/x-checkbox\x3e"+$APP.N.i(a)+"\x3c/label\x3e"},
42
+ Nna=function(a,b){return $APP.Yd($APP.N,$APP.De.j(function(c){var d=$APP.G(c);c=$APP.C(d,pM);var e=$APP.C(d,$APP.wt),f=$APP.G(d);d=$APP.C(f,pM);f=$APP.C(f,$APP.wt);d=$APP.z.j(mM,d)?"document":""+$APP.N.i(f)+" #"+$APP.N.i(d);f=$APP.z.j(mM,c)?"document":e;var g=$APP.z.j(b,f);return"\x3cdiv class\x3d'lane-label"+$APP.N.i(g?" active":null)+"' data-x-th-lane-tag\x3d'"+$APP.N.i(GN(f))+"' title\x3d'"+$APP.N.i(GN(d))+"'\x3e"+$APP.N.i(GN($APP.z.j(mM,c)?"document":e))+$APP.N.i($APP.M.j(mM,c)?" \x3cspan class\x3d'cid'\x3e#"+
43
+ $APP.N.i(c)+"\x3c/span\x3e":null)+"\x3c/div\x3e"},a))},Ona=function(a,b,c){return $APP.m(a)?"\x3cline class\x3d'scrubber' x1\x3d'"+$APP.N.i(b)+"' y1\x3d'0' x2\x3d'"+$APP.N.i(b)+"' y2\x3d'"+$APP.N.i(c)+"' /\x3e":""},IN=function(a,b,c,d){a=$APP.hd(function(e){return $APP.z.j(e.id,d)?1:0},a);return $APP.Yd($APP.N,$APP.De.j(function(e){var f=c.i?c.i(e):c.call(null,e),g=b+10,k=$APP.z.j(e.id,d),n=k?6.5:4.5;return"\x3ccircle class\x3d'dot"+$APP.N.i(k?" selected":null)+"' data-x-th-id\x3d'"+$APP.N.i(e.id)+
44
+ "' cx\x3d'"+$APP.N.i(f)+"' cy\x3d'"+$APP.N.i(g)+"' r\x3d'"+$APP.N.i(n)+"' fill\x3d'"+$APP.N.i(lM(e))+"' /\x3e"},a))},Pna=function(a,b,c,d){if(c==null)return"";a=$APP.ke(function(e){e=$APP.G(e);e=$APP.C(e,vM);return $APP.ke(function(f){return $APP.z.j(f.id,c)?f:null},e)},a);return $APP.m(a)?(d=d.i?d.i(a):d.call(null,a),"\x3cline class\x3d'density-selected' x1\x3d'"+$APP.N.i(d)+"' y1\x3d'"+$APP.N.i(b)+"' x2\x3d'"+$APP.N.i(d)+"' y2\x3d'"+$APP.N.i(b+20)+"' /\x3e"):""},Qna=function(a,b,c,d){var e=nna(a);
45
+ return""+$APP.N.i($APP.Yd($APP.N,$APP.De.j(function(f){var g=$APP.G(f),k=$APP.C(g,vM);f=$APP.C(g,wM);g=$APP.C(g,xM);var n=$APP.t(k),r=$APP.C(kM,$APP.m(f)?f:ZL);var v=$APP.x(k);v=v==null||v===0||e==null||e===0?0:v>=e?1:.4+.6*((v-1)/$APP.Hj.j(1,e-1));var w=GN($APP.Rg($APP.m(f)?f:ZL));k=$APP.x(k);f=""+$APP.N.i(k)+" "+$APP.N.i($APP.z.j(1,k)?"record":"records")+" · "+$APP.N.i($APP.Rg($APP.m(f)?f:ZL));return"\x3crect class\x3d'density-bin' role\x3d'button' aria-label\x3d'"+$APP.N.i(GN(f))+"' data-x-th-bin-record-id\x3d'"+
46
+ $APP.N.i(n.id)+"' data-x-th-bin-count\x3d'"+$APP.N.i(k)+"' data-x-th-bin-cat\x3d'"+$APP.N.i(w)+"' x\x3d'"+$APP.N.i(g)+"' y\x3d'"+$APP.N.i(b)+"' width\x3d'"+$APP.N.i(4)+"' height\x3d'"+$APP.N.i(20)+"' fill\x3d'"+$APP.N.i(r)+"' fill-opacity\x3d'"+$APP.N.i(v)+"' /\x3e"},a)))+$APP.N.i(Pna(a,b,c,d))},Rna=function(a,b,c,d,e,f){function g(A){a:{var E=$APP.C(w,A.id);var J=a instanceof $APP.F?a.ba:null;switch(J){case "order":A=$APP.Hj.j(0,e-16);E=v===0||v<0?8:$APP.z.j(1,v)?8+A/2:8+$APP.Gj.j($APP.Hj.j(E/(v-
47
+ 1),0),1)*A;break a;case "time":E=A.t;J=$APP.G(d);A=$APP.C(J,qM);J=$APP.C(J,rM);var O=$APP.Hj.j(0,e-16);E=A==null||J==null?8:8+$APP.Gj.j($APP.Hj.j((E-A)/J,0),1)*O;break a;default:throw Error("No matching clause: "+$APP.N.i(J));}}return E}var k=$APP.m(f)?f.id:null,n=$APP.Hf.j($APP.fe,$APP.te(function(A,E){E=$APP.G(E);E=$APP.C(E,pM);return new $APP.H(null,2,5,$APP.I,[E,A*20],null)},c)),r=$APP.Hj.j(20,20*$APP.x(c)),v=$APP.x(b),w=$APP.Hf.j($APP.fe,$APP.te(function(A,E){return new $APP.H(null,2,5,$APP.I,
48
+ [E.id,A],null)},b)),y=$APP.Ah(nM,b);return"\x3csvg class\x3d'timeline-svg' width\x3d'"+$APP.N.i(e)+"' height\x3d'"+$APP.N.i(r)+"' viewBox\x3d'0 0 "+$APP.N.i(e)+" "+$APP.N.i(r)+"'\x3e"+$APP.N.i($APP.Yd($APP.N,$APP.De.j(function(A){A=$APP.G(A);var E=$APP.C(A,pM);A=$APP.Gc(y,E,$APP.Me);E=$APP.C(n,E);if($APP.z.j(JN,a)){var J=lna(A,g);A=$APP.m(mna(J))?Qna(J,E,k,g):IN(A,E,g,k)}else A=IN(A,E,g,k);return A},c)))+$APP.N.i(Ona(f,$APP.m(f)?g(f):null,r))+"\x3c/svg\x3e"},Sna=function(a,b,c,d,e,f,g,k){if($APP.x(d)===
49
+ 0)a.innerHTML="",b.innerHTML="\x3cdiv class\x3d'timeline-empty'\x3eNo records match the current filter.\x3c/div\x3e";else{var n=$APP.Hj.j(200,b.clientWidth);a.innerHTML=Nna(e,k);b.innerHTML=Rna(c,d,e,f,n,g)}},KN=function(a){return""+$APP.N.i(a.tag)+" · "+$APP.N.i(a.type)},Tna=function(a){var b=$APP.G(a);a=$APP.C(b,LN);var c=$APP.C(b,MN),d=$APP.C(b,NN);b=$APP.C(b,ON);c+=14;b-=14;return"\x3cline class\x3d'edge' x1\x3d'"+$APP.N.i(a)+"' y1\x3d'"+$APP.N.i(c)+"' x2\x3d'"+$APP.N.i(d)+"' y2\x3d'"+$APP.N.i(b)+
50
+ "' /\x3e"},Una=function(a,b){var c=$APP.G(a);a=$APP.C(c,$APP.Zj);var d=$APP.C(c,PN),e=$APP.C(c,$APP.Pn);c=$APP.C(c,$APP.Qn);return"\x3csvg class\x3d'causality-svg' width\x3d'"+$APP.N.i(e)+"' height\x3d'"+$APP.N.i(c)+"' viewBox\x3d'0 0 "+$APP.N.i(e)+" "+$APP.N.i(c)+"'\x3e"+$APP.N.i($APP.Yd($APP.N,$APP.De.j(Tna,d)))+$APP.N.i($APP.Yd($APP.N,$APP.De.j(function(f){var g=$APP.G(f),k=$APP.C(g,$APP.jr);f=$APP.C(g,zM);var n=$APP.C(g,QN);g=$APP.C(g,RN);n-=70;var r=g-14,v=$APP.z.j(k,b),w=n+12,y=n+22,A=n+22,
51
+ E=r+18,J=r+11,O=GN("#"+$APP.N.i(k)+" "+$APP.N.i(KN(f))+" · "+$APP.N.i(iM(f)));k="\x3cg data-x-th-link-id\x3d'"+$APP.N.i(k)+"' role\x3d'button' aria-label\x3d'"+$APP.N.i(O)+"'\x3e\x3ctitle\x3e"+$APP.N.i(O)+"\x3c/title\x3e\x3crect class\x3d'node-rect"+$APP.N.i(v?" selected":null)+"' x\x3d'"+$APP.N.i(n)+"' y\x3d'"+$APP.N.i(r)+"' width\x3d'"+$APP.N.i(140)+"' height\x3d'"+$APP.N.i(28)+"' /\x3e\x3ccircle class\x3d'node-dot' cx\x3d'"+$APP.N.i(w)+"' cy\x3d'"+$APP.N.i(g)+"' r\x3d'"+$APP.N.i(4)+"' fill\x3d'"+
52
+ $APP.N.i(lM(f))+"' /\x3e\x3ctext class\x3d'node-text id' x\x3d'"+$APP.N.i(y)+"' y\x3d'"+$APP.N.i(J)+"'\x3e#"+$APP.N.i(k)+"\x3c/text\x3e\x3ctext class\x3d'node-text' x\x3d'"+$APP.N.i(A)+"' y\x3d'"+$APP.N.i(E)+"'\x3e";g=$APP.N;n=g.i;f=KN(f);f=""+$APP.N.i(f);f=f.length<=22?f:""+$APP.N.i(f.substring(0,21))+"…";return k+n.call(g,GN(f))+"\x3c/text\x3e\x3c/g\x3e"},a)))+"\x3c/svg\x3e"},Wna=function(a,b,c,d){if(d==null)HM(a,SN,null),b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+$APP.N.i(GN("Select a record from the timeline to see its causality tree."))+
53
+ "\x3c/div\x3e";else{a:{var e=d;for(var f=0;;){var g=e.causeId;if(typeof g!=="number"||f>=5E3)break a;g=gM(c,g);if($APP.m(g))f+=1,e=g;else break a}e=void 0}e=qna(c,e);c=new $APP.K(null,2,[TN,UN(e),Vna,VN(e)],null);if($APP.m(AM.i(e)))HM(a,SN,null),a=$APP.N,d=a.i,c=$APP.G(c),c=$APP.C(c,TN),c="Causality tree exceeds the "+$APP.N.i(200)+"-node cap (≥ "+$APP.N.i(c)+" nodes). Pick a smaller leaf record to view its subtree.",b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+d.call(a,GN(c))+"\x3c/div\x3e";
54
+ else{e=WN(e,0,16);f=$APP.B(e,0,null);$APP.B(e,1,null);e=XN(f);f=YN(f);g=$APP.xa($APP.Hj,0,$APP.De.j(QN,e));var k=$APP.xa($APP.Hj,0,$APP.De.j(RN,e));e=new $APP.K(null,4,[$APP.Zj,e,PN,f,$APP.Pn,g+70+16,$APP.Qn,k+14+16],null);c=$APP.z.j(1,TN.i(c));HM(a,SN,e);b.innerHTML=""+$APP.N.i(c?"\x3cdiv class\x3d'causality-leaf-hint'\x3e"+$APP.N.i(GN("This record has no cause and no effects in the current buffer. Pick an event/dispatch* record (or one with a 'Caused by' link in the detail pane) to see a chain."))+
55
+ "\x3c/div\x3e":null)+$APP.N.i(Una(e,d.id))}}},Xna=function(a){if($APP.m(GM(a,ZN))){var b=$APP.l(a,"__xTraceHistoryCausalityEl"),c=GM(a,SN),d=$N.i?$N.i(a):$N.call(null,a),e=$APP.m(c)?rna(c,d):null,f=b==null?null:b.clientWidth;d=b==null?null:b.clientHeight;if($APP.m($APP.m(b)?$APP.m(c)?$APP.m(e)?typeof f==="number"&&typeof d==="number"&&f>0&&d>0:e:c:b)){var g=$APP.G(c);c=$APP.C(g,$APP.Pn);g=$APP.C(g,$APP.Qn);var k=QN.i(e),n=RN.i(e);e=k-f/2;k=n-d/2;f=$APP.Hj.j(0,c-f);d=$APP.Hj.j(0,g-d);d=new $APP.K(null,
56
+ 2,[aO,$APP.Hj.j(0,$APP.Gj.j(f,e)),bO,$APP.Hj.j(0,$APP.Gj.j(d,k))],null);f=$APP.G(d);d=$APP.C(f,aO);f=$APP.C(f,bO);b.scrollLeft=d;b.scrollTop=f;HM(a,ZN,!1)}}},Yna=function(a){var b=Dna();a:{var c=a.querySelectorAll("option");for(var d=c.length,e=0,f=$APP.tb($APP.Kg);;){if(e>=d){c=$APP.vb(f);break a}var g=c[e].value;e+=1;f=$APP.z.j(g,"all")?f:$APP.ub(f,g)}c=void 0}b=$APP.Le(c,b);$APP.q(b)&&(b=$APP.Yd($APP.N,$APP.De.j(Mna,b)),a.insertAdjacentHTML("beforeend",b))},Zna=function(a){var b=$APP.lp.i($APP.ab(XL));
57
+ a.textContent=$APP.m(b)?"Resume":"Pause";a.pressed=b},$na=function(a){var b=qN()!=null;a.textContent=b?"Stop":"Record";a.pressed=b},aoa=function(a){var b=$APP.G(a);a=$APP.C(b,cO);var c=$APP.C(b,$APP.cn),d=$APP.C(b,dO),e=$APP.C(b,eO),f=$APP.C(b,$APP.Z);b=$APP.C(b,fO);return"\x3cbutton class\x3d'session-chip"+$APP.N.i($APP.m(c)?" active":null)+$APP.N.i($APP.m(e)?" import":null)+"' type\x3d'button' data-x-th-session\x3d'"+$APP.N.i(GN(a))+"'\x3e"+$APP.N.i($APP.m(d)?"\x3cspan class\x3d'live-dot' aria-hidden\x3d'true'\x3e\x3c/span\x3e":
58
+ null)+$APP.N.i(GN(f))+$APP.N.i($APP.m(e)?"\x3cspan class\x3d'chip-close' role\x3d'button' aria-label\x3d'Remove import' data-x-th-import-close\x3d'"+$APP.N.i(b)+"'\x3e×\x3c/span\x3e":null)+"\x3c/button\x3e"},boa=function(a,b,c,d){var e=new $APP.K(null,5,[cO,"live",$APP.cn,$APP.z.j(c,$APP.at),dO,!1,eO,!1,$APP.Z,"Live"],null),f=CM(c)?FM(c):null,g=EM(c)?FM(c):null;a=$APP.Sh.j(function(k){var n=k.id;return new $APP.K(null,5,[cO,""+$APP.N.i(n),$APP.cn,$APP.z.j(n,f),dO,$APP.z.j(n,d),eO,!1,$APP.Z,""+$APP.N.i(k.label)+
59
+ " · "+$APP.N.i(k.recordCount)],null)},$APP.Ac(a));b=$APP.Sh.j(function(k){var n=k.id;return new $APP.K(null,6,[cO,"import:"+$APP.N.i(n),$APP.cn,$APP.z.j(n,g),dO,!1,eO,!0,fO,n,$APP.Z,""+$APP.N.i(k.label)+" · "+$APP.N.i(k.recordCount)],null)},$APP.Ac(b));return $APP.Yd($APP.N,$APP.De.j(aoa,$APP.Fe.o(new $APP.H(null,1,5,$APP.I,[e],null),a,$APP.Ac([b]))))},coa=function(a,b,c,d,e){a.innerHTML=boa(b,c,d,e);b.length===0&&c.length===0?a.setAttribute("hidden",""):a.removeAttribute("hidden")},gO=function(a){var b=
60
+ iM(a);b="#"+$APP.N.i(a.id)+" "+$APP.N.i(a.tag)+" · "+$APP.N.i(a.type)+$APP.N.i($APP.m($APP.m(b)?!$APP.Lh(b):b)?" · "+$APP.N.i(b):null);return"\x3cx-button class\x3d'detail-link' size\x3d'sm' variant\x3d'ghost' data-x-th-link-id\x3d'"+$APP.N.i(a.id)+"' title\x3d'"+$APP.N.i(GN(b))+"'\x3e"+$APP.N.i(GN(b))+"\x3c/x-button\x3e"},doa=function(a,b,c,d){if($APP.m(d)){var e=JSON.stringify(d,null,2);var f=d.causeId;var g=typeof f==="number"?gM(c,f):null;f=ona(c,d);e="\x3cpre class\x3d'detail-json'\x3e"+$APP.N.i(GN(e))+
61
+ "\x3c/pre\x3e"+$APP.N.i($APP.m(g)?"\x3cdiv class\x3d'detail-section' data-x-th-detail-cause\x3e\x3cdiv class\x3d'detail-label'\x3eCaused by\x3c/div\x3e"+$APP.N.i(gO(g))+"\x3c/div\x3e":null);c=$APP.N;d=c.i;g=$APP.G(f);f=$APP.C(g,$APP.Bv);g=$APP.C(g,vM);if(f>0){var k=$APP.x(g);f=$APP.z.j(k,f)?"Effects ("+$APP.N.i(f)+")":"Effects ("+$APP.N.i(k)+" of "+$APP.N.i(f)+")";f="\x3cdiv class\x3d'detail-section' data-x-th-detail-effects\x3e\x3cdiv class\x3d'detail-label'\x3e"+$APP.N.i(f)+"\x3c/div\x3e"+$APP.N.i($APP.Yd($APP.N,
62
+ $APP.De.j(gO,g)))+"\x3c/div\x3e"}else f=null;e+=d.call(c,f);a.innerHTML=e;a.removeAttribute("hidden");b.removeAttribute("hidden")}else a.setAttribute("hidden",""),b.setAttribute("hidden","")},iO=function(a){var b=hO.get(a);if($APP.m(b))return b;b=aM(a);hO.set(a,b);return b},jO=function(a){return $APP.z.j(a,$APP.at)?"live":CM(a)?"session:"+$APP.N.i(FM(a)):EM(a)?"import:"+$APP.N.i(FM(a)):"live"},$N=function(a){var b=$APP.l(a,"__xTraceHistoryView");a=$APP.l(a,"__xTraceHistoryViewSelected");return $APP.m(a)?
63
+ $APP.l(a,jO(b)):null},lO=function(a,b){var c=$APP.l(a,"__xTraceHistoryViewSelected");c=$APP.m(c)?c:{};var d=jO($APP.l(a,"__xTraceHistoryView"));b==null?d in c&&delete c[d]:c[d]=b;$APP.T(a,"__xTraceHistoryViewSelected",c);b!=null&&$APP.z.j(kO,$APP.l(a,"__xTraceHistoryDockMode"))&&HM(a,ZN,!0)},eoa=function(a,b,c){var d=$N(a);b=gM(b,d);if(b==null)return null;if(eM(b,$APP.Eg.l(c,dM,iO)))return b;lO(a,null);return null},mO=function(a){return $APP.z.j(a,$APP.at)?JM():CM(a)?(a=vN(FM(a)),a.length===0?JM():
64
+ a):EM(a)?(a=AN(FM(a)),a.length===0?JM():a):JM()},foa=function(a,b,c,d){switch(d instanceof $APP.F?d.ba:null){case "causality":b.setAttribute("hidden","");c.removeAttribute("hidden");a.classList.add("causality-mode");break;default:b.removeAttribute("hidden"),c.setAttribute("hidden",""),a.classList.remove("causality-mode")}},nO=function(a){EN(a);return $APP.mi(a,"__xTraceHistoryHighlightCid",null)},goa=function(a,b){if(b!=null&&b.componentId!=null&&$APP.M.j("document",b.tag))if($APP.z.j(b.componentId,
65
+ $APP.l(a,"__xTraceHistoryHighlightCid")))b=FN(a);else{var c=b.componentId;b=VM(c);if($APP.m(b)){$APP.mi(a,"__xTraceHistoryHighlightCid",c);c=$APP.l(a,"__xTraceHistoryHighlightBox");if($APP.m(c))a=c;else{c=$APP.Sk(a,":host { all: initial; }\n.outline {\n position: absolute;\n pointer-events: none;\n box-sizing: border-box;\n border: 3px solid #ff2d8a;\n border-radius: 3px;\n background: rgba(255, 45, 138, 0.12);\n box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55);\n display: none;\n}\n@media (prefers-reduced-motion: no-preference) {\n .outline {\n transition: top .08s linear, left .08s linear,\n width .08s linear, height .08s linear;\n animation: x-th-highlight-pulse .55s ease-out 1 both;\n }\n @keyframes x-th-highlight-pulse {\n 0% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 0 12px rgba(255, 45, 138, 0.55); }\n 100% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55); }\n }\n}\n",
66
+ 9998);var d=c.shadowRoot,e=document.createElement("div");e.className="outline";d.appendChild(e);$APP.mi(a,"__xTraceHistoryHighlightLayer",c);$APP.mi(a,"__xTraceHistoryHighlightBox",e);a=e}c=b.getBoundingClientRect();d=window.innerWidth;e=window.innerHeight;c.top>=0&&c.left>=0&&c.bottom<=e&&c.right<=d||b.scrollIntoView({block:"nearest",inline:"nearest",behavior:$APP.D($APP.m(oO)?oO.matches:null)?"auto":"smooth"});DN(a,b);a.style.display="block";b=a;b.style.animation="none";b=b.style.animation=""}else b=
67
+ nO(a)}else b=nO(a);return b},qO=function(a){var b=$APP.l(a,"__xTraceHistoryTimelineEl"),c=$APP.l(a,"__xTraceHistoryCausalityEl"),d=$APP.l(a,"__xTraceHistoryLanesEl"),e=$APP.l(a,"__xTraceHistorySvgPaneEl"),f=$APP.l(a,"__xTraceHistoryCountEl"),g=$APP.l(a,"__xTraceHistoryDetailEl"),k=$APP.l(a,"__xTraceHistorySplitterEl"),n=$APP.l(a,"__xTraceHistoryHintEl"),r=$APP.l(a,"__xTraceHistoryPauseBtn"),v=$APP.l(a,"__xTraceHistoryRecordBtn"),w=$APP.l(a,"__xTraceHistorySessionsEl"),y=$APP.l(a,"__xTraceHistoryTagSelectEl"),
68
+ A=$APP.l(a,"__xTraceHistoryFilter"),E=$APP.l(a,"__xTraceHistoryView"),J=mO(E),O=fM(J,$APP.Eg.l(A,dM,iO)),S=$APP.x(O),R=J.length,ca=sM(O),na=ena(O),ka=eoa(a,J,A),oa=uN(),Ua=zN(),Va=qN(),rb=function(){var bc=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.m(bc)?bc:$APP.gq}(),Db=function(){var bc=$APP.l(a,"__xTraceHistoryDockMode");return $APP.m(bc)?bc:pO}();Yna(y);foa(a,b,c,Db);switch(Db instanceof $APP.F?Db.ba:null){case "causality":Wna(a,c,J,ka);break;default:Sna(d,e,rb,O,na,ca,ka,$APP.wt.i(A))}f.textContent=
69
+ ""+$APP.N.i(S);n.textContent=sna(S,R,ca,$APP.x(na));doa(g,k,J,ka);Zna(r);$na(v);coa(w,oa,Ua,E,Va);Xna(a);return goa(a,ka)},rO=function(a){return $APP.m(a)?$APP.z.j("circle",a.tagName.toLowerCase()):a},sO=function(a){return $APP.m(a)?$APP.z.j("rect",a.tagName.toLowerCase())&&a.getAttribute("data-x-th-bin-record-id")!=null:a},tO=function(a){a=a.getAttribute("data-x-th-id");return $APP.m(a)?parseInt(a,10):null},uO=function(a,b){$APP.m(b)?a.classList.add("collapsed"):a.classList.remove("collapsed");a=
70
+ $APP.l(a,"__xTraceHistoryCollapseBtn");return $APP.m(a)?(a.textContent=$APP.m(b)?"»":"«",a.setAttribute("aria-expanded",$APP.m(b)?"false":"true")):null},vO=function(a){var b=!$APP.D($APP.l(a,"__xTraceHistoryCollapsed"));$APP.T(a,"__xTraceHistoryCollapsed",b);return uO(a,b)},hoa=function(a,b){$APP.T(a,"__xTraceHistoryAxisMode",function(){switch(b){case "order":return $APP.gq;case "time":return JN;default:return $APP.gq}}());return qO(a)},ioa=function(a,b){var c=function(){switch(b){case "timeline":return pO;
71
+ case "causality":return kO;default:return pO}}();$APP.T(a,"__xTraceHistoryDockMode",c);$APP.z.j(kO,c)?HM(a,ZN,!0):HM(a,ZN,!1);return qO(a)},wO=function(a,b,c,d){a.textContent=d;a.removeAttribute("hidden");var e=b.getBoundingClientRect();d=c.clientX-e.left;c=c.clientY-e.top;e=b.scrollTop;var f=b.scrollLeft;b=$APP.Hj.j(0,d+12+280>b.clientWidth?d-12-280:d+12);a.style.left=""+$APP.N.i(b+f)+"px";return a.style.top=""+$APP.N.i(c+e+12)+"px"},joa=function(a,b){var c=b.target,d=$APP.l(a,"__xTraceHistoryTooltipEl"),
72
+ e=$APP.l(a,"__xTraceHistoryTimelineEl");a=mO($APP.l(a,"__xTraceHistoryView"));if($APP.m(rO(c))){c=tO(c);a=gM(a,c);if($APP.m(a)){c=""+$APP.N.i(a.tag);var f=$APP.N,g=f.i;var k=a.componentId;k=$APP.m(k)?" #"+$APP.N.i(k):null;a=c+g.call(f,k)+"\n"+$APP.N.i(a.type)+"\n"+$APP.N.i(iM(a))+"\n@ "+$APP.N.i(jM(a.t));b=wO(d,e,b,a)}else b=null;return b}if($APP.m(sO(c))){f=c.getAttribute("data-x-th-bin-record-id");g=c.getAttribute("data-x-th-bin-count");c=c.getAttribute("data-x-th-bin-cat");c=$APP.m($APP.m(f)?$APP.m(g)?
73
+ c:g:f)?new $APP.K(null,3,[xO,parseInt(f,10),yO,parseInt(g,10),wM,$APP.oh.i(c)],null):null;if($APP.m(c)){f=$APP.G(c);g=$APP.C(f,xO);c=$APP.C(f,yO);f=$APP.C(f,wM);a=gM(a,g);if($APP.m(a)){g=""+$APP.N.i(a.tag);k=$APP.N;var n=k.i;var r=a.componentId;r=$APP.m(r)?" #"+$APP.N.i(r):null;a=g+n.call(k,r)+"\n"+$APP.N.i(c)+" "+$APP.N.i($APP.z.j(1,c)?"record":"records")+" · "+$APP.N.i($APP.Rg($APP.m(f)?f:ZL))+"\n@ "+$APP.N.i(jM(a.t));b=wO(d,e,b,a)}else b=null;return b}return null}return d.setAttribute("hidden",
74
+ "")},zO=function(a,b,c,d,e,f){a:switch(b=b instanceof $APP.F?b.ba:null,b){case "order":d=$APP.x(c);e=$APP.Hj.j(0,e-16);d===0||d<0?f=null:$APP.z.j(1,d)||e===0?f=0:(f=$APP.Gj.j($APP.Hj.j((f-8)/e,0),1),f=Math.round(f*(d-1)));c=$APP.m(f)?$APP.B(c,f,null):null;break a;case "time":var g=$APP.G(d);d=$APP.C(g,qM);b=$APP.C(g,rM);var k=$APP.Hj.j(0,e-16);g==null||d==null||b==null?f=0:e===0||e<0||k===0?f=d:(f=$APP.Gj.j($APP.Hj.j((f-8)/k,0),1),f=d+f*b);c=gna(c,f);break a;default:throw Error("No matching clause: "+
75
+ $APP.N.i(b));}return $APP.m(c)?(lO(a,c.id),qO(a)):null},koa=function(a,b,c){function d(w){return zO(a,k,r,v,f,w.clientX-e.left)}c.preventDefault();b.setPointerCapture(c.pointerId);var e=b.getBoundingClientRect(),f=$APP.Hj.j(200,b.clientWidth),g=$APP.l(a,"__xTraceHistoryFilter"),k=function(){var w=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.m(w)?w:$APP.gq}(),n=mO($APP.l(a,"__xTraceHistoryView")),r=fM(n,$APP.Eg.l(g,dM,iO)),v=sM(r);zO(a,k,r,v,f,c.clientX-e.left);c=function y(){b.removeEventListener("pointermove",
76
+ d);b.removeEventListener("pointerup",y);return b.removeEventListener("pointercancel",y)};b.addEventListener("pointermove",d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},AO=function(a,b){var c=$APP.l(a,"__xTraceHistoryFilter"),d=mO($APP.l(a,"__xTraceHistoryView"));c=fM(d,$APP.Eg.l(c,dM,iO));d=$N(a);a:if($APP.q(c)){if(d!=null)b:if(typeof d==="number"){for(var e=$APP.x(c),f=0;;){if(f>=e){d=null;break b}if($APP.z.j(d,$APP.vc(c,f).id)){d=f;break b}f+=1}d=void 0}else d=
77
+ null;else d=null;if(d==null)switch(b=b instanceof $APP.F?b.ba:null,b){case "next":b=$APP.t(c);break a;case "prev":b=$APP.Nc(c);break a;default:throw Error("No matching clause: "+$APP.N.i(b));}else b=$APP.z.j(b,$APP.aq)?$APP.C(c,d+1):$APP.C(c,d-1)}else b=null;return $APP.m(b)?(lO(a,b.id),qO(a)):null},BO=function(a){var b=$APP.D(a==null?null:a.isContentEditable);b?a=b:(a=a==null?null:a.tagName,a=$APP.bd(loa,a==null?null:a.toLowerCase()));return a},moa=function(a,b){if(BO(b.target))return null;switch(b.key){case "ArrowRight":return b.preventDefault(),
78
+ AO(a,$APP.aq);case "ArrowLeft":return b.preventDefault(),AO(a,$APP.Bt);default:return null}},noa=function(a,b,c){function d(g){g=$APP.Hj.j(60,f+(e-g.clientY));return a.style.height=""+$APP.N.i(g)+"px"}c.preventDefault();b.setPointerCapture(c.pointerId);b.classList.add("dragging");var e=c.clientY,f=a.offsetHeight;c=function k(){b.removeEventListener("pointermove",d);b.removeEventListener("pointerup",k);b.removeEventListener("pointercancel",k);return b.classList.remove("dragging")};b.addEventListener("pointermove",
79
+ d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},ooa=function(a){return a==null||$APP.z.j("",a)?null:GL(a,".trace.json")?$APP.vd(a,$APP.x(a)-11):GL(a,".json")?$APP.vd(a,$APP.x(a)-5):a},DO=function(a,b){var c=$APP.l(a,"__xTraceHistoryHintEl"),d=GM(a,CO);typeof d==="number"&&clearTimeout(d);c.textContent=b;c.classList.add("error");b=setTimeout(function(){c.classList.remove("error");HM(a,CO,null);return qO(a)},4E3);return HM(a,CO,b)},FO=function(a,b){var c=new FileReader,
80
+ d=ooa(b.name);c.onload=function(){var e=EO.j(c.result,d);e!=null?($APP.l(a,"__xTraceHistoryHintEl").classList.remove("error"),$APP.T(a,"__xTraceHistoryView",new $APP.H(null,2,5,$APP.I,[DM,e],null)),e=qO(a)):e=DO(a,"Import failed — see console for details.");return e};c.onerror=function(){return DO(a,"Could not read file.")};return c.readAsText(b)},GO=function(a){a=a.dataTransfer;return $APP.m(a)?a.types.includes("Files"):null},poa=function(a,b){var c=a.shadowRoot;a=$APP.m(c)?c:a.attachShadow({mode:"open"});
81
81
  if(c==null){c="\x3cstyle\x3e"+$APP.N.i(":host {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: min(420px, calc(100vw - 1rem));\n z-index: 1999999;\n font: 11px/1.4 ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;\n color: #cdd6f4;\n pointer-events: auto;\n /* The width transition makes the collapse / expand toggle feel\n responsive without being slow. The dock is otherwise position:\n fixed so transitioning width doesn't reflow the host page. */\n transition: width 160ms ease;\n}\n/* Collapsed mode: shrink the host to a thin vertical strip so the\n user can reach components the full dock would otherwise cover.\n The only interactive element left is the collapse-toggle button,\n which expands the dock back to full width when clicked. */\n:host(.collapsed) {\n width: 32px;\n}\n:host(.collapsed) .dock \x3e *:not(.header) { display: none; }\n:host(.collapsed) .header {\n flex-direction: column;\n align-items: center;\n padding: 8px 0;\n gap: 4px;\n}\n:host(.collapsed) .header \x3e *:not([data-x-th-action\x3d'collapse']) {\n display: none;\n}\n/* Causality mode: hide the axis-mode select (Order / Time only\n affects the timeline pane, so it's noise in causality view). */\n:host(.causality-mode) [data-x-th-axis] {\n display: none;\n}\n@media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n}\n.dock {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: #11111b;\n border-left: 1px solid rgba(59,130,246,0.6);\n box-shadow: -4px 0 20px rgba(0,0,0,0.4);\n /* Anchor for the absolutely-positioned drop-overlay added in PR 11\n so its `inset: 0` reaches the dock edges. */\n position: relative;\n}\n.header {\n display: flex;\n /* Wrap so the count + action buttons survive narrow viewports\n (`min(420px, calc(100vw - 1rem))` reaches 304px at 320px screens,\n which is too tight for four action buttons + title + count on\n one row). */\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n background: rgba(59,130,246,0.15);\n border-bottom: 1px solid rgba(59,130,246,0.3);\n flex: 0 0 auto;\n}\n.title { font-weight: 700; color: #89b4fa; font-size: 12px; }\n.count { color: #6c7086; margin-left: auto; }\n.filters {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 12px;\n padding: 6px 10px;\n border-bottom: 1px solid rgba(255,255,255,0.06);\n flex: 0 0 auto;\n}\n/* The tag dropdown is an \x3cx-select\x3e; its own shadow brings styling.\n We just constrain its width and font so it matches the dock's\n ui-monospace 11px tone. */\n.filters x-select {\n font-size: 11px;\n max-width: 140px;\n}\n/* x-checkbox has no slot for its label, so the visible text sits\n next to the checkbox inside a \x3clabel\x3e wrapper. The label uses\n inline-flex to keep the checkbox + text on one row, with a small\n gap. Cursor: pointer mirrors native checkbox-label affordance. */\n.filters label.cat {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: #a6adc8;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n}\n/* PR 16 — search input. x-search-field brings its own theming via its\n shadow DOM; the dock just constrains the host width so it shares\n the filter row's monospace tone with the tag dropdown. */\n.filters x-search-field {\n font-size: 11px;\n flex: 1 1 140px;\n min-width: 100px;\n max-width: 240px;\n}\n/* Session strip: thin row above the filter row listing the live view\n plus any captured session as a clickable chip. Hidden when the only\n chip is Live (no sessions yet) so the dock stays compact. Scrolls\n horizontally if the chip count overflows the dock width. */\n.sessions {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n background: rgba(0,0,0,0.15);\n border-bottom: 1px solid rgba(255,255,255,0.04);\n flex: 0 0 auto;\n overflow-x: auto;\n white-space: nowrap;\n}\n.sessions[hidden] { display: none; }\n.session-chip {\n flex: 0 0 auto;\n background: rgba(255,255,255,0.04);\n color: #a6adc8;\n border: 1px solid rgba(255,255,255,0.08);\n border-radius: 3px;\n padding: 1px 6px;\n font: inherit;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n}\n.session-chip:hover { background: rgba(59,130,246,0.12); color: #cdd6f4; }\n.session-chip.active {\n background: rgba(59,130,246,0.22);\n border-color: rgba(59,130,246,0.6);\n color: #89b4fa;\n font-weight: 600;\n}\n/* Imported traces are visually distinct from locally-captured\n sessions: amber border instead of blue, plus a small close button\n inside the chip so the user can drop the import without clearing\n live state. */\n.session-chip.import {\n border-color: rgba(249,226,175,0.45);\n color: #f9e2af;\n}\n.session-chip.import.active {\n background: rgba(249,226,175,0.18);\n border-color: rgba(249,226,175,0.7);\n color: #f9e2af;\n}\n.session-chip.import .chip-close {\n background: transparent;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n line-height: 1;\n padding: 0 0 0 6px;\n margin: 0;\n opacity: 0.6;\n}\n.session-chip.import .chip-close:hover { opacity: 1; }\n.session-chip .live-dot {\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f38ba8;\n margin-right: 4px;\n vertical-align: middle;\n animation: x-th-pulse 1s ease-in-out infinite;\n}\n@keyframes x-th-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.35; }\n}\n@media (prefers-reduced-motion: reduce) {\n .session-chip .live-dot { animation: none; }\n}\n.timeline {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n position: relative;\n /* Transparent border reserves 2px so the focus indicator below doesn't\n overlap the leftmost pixels of lane labels or shift content layout. */\n border: 2px solid transparent;\n box-sizing: border-box;\n}\n.timeline-body {\n display: flex;\n align-items: stretch;\n min-height: 100%;\n}\n.lanes {\n flex: 0 0 110px;\n display: flex;\n flex-direction: column;\n border-right: 1px solid rgba(255,255,255,0.06);\n background: #11111b;\n position: sticky;\n left: 0;\n z-index: 1;\n}\n.lane-label {\n height: 20px;\n padding: 0 8px;\n display: flex;\n align-items: center;\n font-size: 11px;\n color: #a6adc8;\n border-bottom: 1px solid rgba(255,255,255,0.04);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n user-select: none;\n}\n.lane-label:hover { background: rgba(59,130,246,0.08); color: #cdd6f4; }\n.lane-label.active {\n background: rgba(59,130,246,0.18);\n color: #89b4fa;\n font-weight: 600;\n}\n.lane-label .cid { color: #6c7086; margin-left: 4px; }\n.svg-pane {\n flex: 1 1 auto;\n min-width: 0;\n display: block;\n}\nsvg.timeline-svg {\n display: block;\n background:\n repeating-linear-gradient(\n to bottom,\n transparent 0,\n transparent 19px,\n rgba(255,255,255,0.03) 19px,\n rgba(255,255,255,0.03) 20px);\n}\n.dot { cursor: pointer; transition: r 80ms ease; }\n.dot:hover { stroke: #fff; stroke-width: 1; }\n.dot.selected { stroke: #fff; stroke-width: 1.5; }\n/* Heatmap bins (PR 18). Each lane that exceeds the density threshold\n renders as a row of these rects rather than individual dots; the\n per-bin fill-opacity is set inline by the renderer (scales with\n the bin's record count relative to the lane's max). */\n.density-bin {\n cursor: pointer;\n transition: stroke 80ms ease, fill-opacity 80ms ease;\n}\n.density-bin:hover {\n stroke: #fff;\n stroke-width: 0.5;\n}\n/* Thin pink bar drawn at the selected record's exact x inside its\n bin — keeps the scrubber-style highlight in dense lanes without\n obscuring the bin's category colour. */\nline.density-selected {\n stroke: #f5c2e7;\n stroke-width: 2;\n pointer-events: none;\n}\nline.scrubber {\n stroke: #f5c2e7;\n stroke-width: 1.5;\n stroke-dasharray: 4 2;\n pointer-events: none;\n}\n.svg-pane { cursor: crosshair; }\n.timeline:focus {\n outline: none;\n border-color: #89b4fa;\n}\n.tooltip {\n position: absolute;\n background: #1e1e2e;\n border: 1px solid rgba(59,130,246,0.6);\n border-radius: 4px;\n padding: 4px 8px;\n font-size: 10px;\n white-space: pre-wrap;\n pointer-events: none;\n max-width: 280px;\n color: #cdd6f4;\n z-index: 10;\n box-shadow: 0 4px 12px rgba(0,0,0,0.5);\n}\n.timeline-empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n width: 100%;\n}\n/* Causality DAG pane (PR 17). Shares the flexible vertical slot with\n .timeline — render! toggles which one is hidden by dock-mode. The\n scrollable container holds an inner \x3csvg\x3e sized to the tree's\n bounding box so the scrollbars correctly reflect off-screen depth\n and breadth. */\n.causality {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n position: relative;\n background: #11111b;\n border: 2px solid transparent;\n box-sizing: border-box;\n}\n.causality:focus { outline: none; border-color: #89b4fa; }\n.causality[hidden] { display: none; }\n.timeline[hidden] { display: none; }\n.causality-empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n width: 100%;\n}\n/* Leaf-hint banner rendered ABOVE the SVG when the tree has only\n one node. Pinned via sticky positioning so it stays visible even\n when the user scrolls the pane (the lone node sits at the\n padded origin and could be obscured by the banner otherwise). */\n.causality-leaf-hint {\n position: sticky;\n top: 0;\n left: 0;\n z-index: 1;\n background: rgba(249,226,175,0.10);\n border-bottom: 1px solid rgba(249,226,175,0.35);\n color: #f9e2af;\n font-size: 10px;\n padding: 6px 10px;\n line-height: 1.4;\n}\nsvg.causality-svg { display: block; }\nsvg.causality-svg .edge {\n stroke: rgba(255,255,255,0.18);\n stroke-width: 1;\n fill: none;\n}\nsvg.causality-svg .node-rect {\n fill: rgba(255,255,255,0.04);\n stroke: rgba(255,255,255,0.12);\n stroke-width: 1;\n cursor: pointer;\n rx: 4;\n ry: 4;\n transition: fill 80ms ease, stroke 80ms ease;\n}\nsvg.causality-svg .node-rect:hover {\n fill: rgba(59,130,246,0.16);\n stroke: rgba(59,130,246,0.6);\n}\nsvg.causality-svg .node-rect.selected {\n fill: rgba(245,194,231,0.18);\n stroke: #f5c2e7;\n stroke-width: 1.5;\n}\nsvg.causality-svg .node-dot {\n pointer-events: none;\n}\nsvg.causality-svg .node-text {\n fill: #cdd6f4;\n font: 10px ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;\n pointer-events: none;\n dominant-baseline: middle;\n}\nsvg.causality-svg .node-text.id {\n fill: #a6adc8;\n font-size: 9px;\n}\n.splitter {\n flex: 0 0 auto;\n height: 4px;\n background: rgba(255,255,255,0.04);\n cursor: ns-resize;\n touch-action: none;\n transition: background 120ms ease;\n}\n.splitter:hover, .splitter.dragging { background: rgba(59,130,246,0.6); }\n.detail {\n background: #181825;\n border-top: 1px solid rgba(59,130,246,0.2);\n padding: 8px 10px;\n font-size: 10px;\n color: #cdd6f4;\n flex: 0 0 auto;\n height: 35vh;\n min-height: 60px;\n max-height: 80%;\n overflow-y: auto;\n}\n.detail-json {\n margin: 0 0 8px 0;\n font: inherit;\n white-space: pre-wrap;\n word-break: break-all;\n color: #a6e3a1;\n}\n.detail-section { margin-top: 6px; }\n.detail-label {\n color: #89b4fa;\n font-weight: 600;\n margin-bottom: 2px;\n font-size: 10px;\n letter-spacing: 0.02em;\n}\n/* The host is an \x3cx-button\x3e; its own shadow brings background, hover,\n border-radius, etc. We keep block-layout + width on the host so each\n link fills its row, and reach into the button's `label` part to add\n ellipsis truncation (the summary string can exceed the dock width). */\n.detail-link {\n display: block;\n width: 100%;\n margin: 2px 0;\n}\n.detail-link::part(label) {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.detail-link::part(button) {\n width: 100%;\n justify-content: flex-start;\n}\n.detail-empty { color: #6c7086; font-style: italic; font-size: 10px; }\n.empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n}\n.hint { color: #6c7086; font-size: 10px; padding: 4px 10px; flex: 0 0 auto; }\n.hint.error { color: #f38ba8; }\n/* Drop overlay — covers the whole dock while a file is being hovered.\n pointer-events:none keeps drag events flowing through to the dock root\n so the dragleave/drop bookkeeping doesn't fight the overlay layer. */\n.drop-overlay {\n position: absolute;\n inset: 0;\n background: rgba(249,226,175,0.10);\n border: 2px dashed rgba(249,226,175,0.6);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #f9e2af;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.02em;\n z-index: 100;\n pointer-events: none;\n}\n.drop-overlay[hidden] { display: none; }\n/* The hidden file input is kept off-screen — clicked programmatically\n by the Import button — but we mark it `display:none` to keep it out\n of layout entirely. */\n.import-input { display: none; }")+
82
82
  "\x3c/style\x3e";var d=$APP.N,e=d.i;b="\x3cdiv class\x3d'dock'\x3e\x3cdiv class\x3d'header'\x3e\x3cx-button data-x-th-action\x3d'collapse' size\x3d'sm' variant\x3d'ghost' aria-label\x3d'Collapse panel' title\x3d'Collapse / expand panel (Ctrl/Cmd + \\\\)'\x3e«\x3c/x-button\x3e\x3cspan class\x3d'title'\x3ex-trace-history\x3c/span\x3e\x3cx-button data-x-th-action\x3d'pause' size\x3d'sm' variant\x3d'ghost'\x3ePause\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'record' size\x3d'sm' variant\x3d'ghost'\x3eRecord\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'clear' size\x3d'sm' variant\x3d'ghost'\x3eClear\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'export' size\x3d'sm' variant\x3d'ghost' title\x3d'Download trace as .trace.json'\x3eExport\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'import' size\x3d'sm' variant\x3d'ghost' title\x3d'Load a .trace.json file (or drag-drop one onto the dock)'\x3eImport\x3c/x-button\x3e\x3cspan class\x3d'count' data-x-th-count\x3e0\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d'sessions' data-x-th-sessions hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'filters'\x3e\x3cx-select data-x-th-tag size\x3d'sm'\x3e\x3coption value\x3d'all' selected\x3eAll tags\x3c/option\x3e\x3c/x-select\x3e\x3cx-search-field data-x-th-search name\x3d'search' placeholder\x3d'Search records…' autocomplete\x3d'off'\x3e\x3c/x-search-field\x3e"+
83
- $APP.N.i(dN("events",$APP.jd(b,$APP.Rr)))+$APP.N.i(dN("state",$APP.jd(b,$APP.qr)))+$APP.N.i(dN("dom",$APP.jd(b,dO)))+$APP.N.i(dN("lifecycle",$APP.jd(b,eO)))+"\x3cx-select data-x-th-mode size\x3d'sm'\x3e\x3coption value\x3d'timeline' selected\x3eTimeline\x3c/option\x3e\x3coption value\x3d'causality'\x3eCausality\x3c/option\x3e\x3c/x-select\x3e\x3cx-select data-x-th-axis size\x3d'sm'\x3e\x3coption value\x3d'order' selected\x3eOrder\x3c/option\x3e\x3coption value\x3d'time'\x3eTime\x3c/option\x3e\x3c/x-select\x3e\x3c/div\x3e\x3cdiv class\x3d'timeline' data-x-th-timeline tabindex\x3d'0'\x3e\x3cdiv class\x3d'lanes' data-x-th-lanes\x3e\x3c/div\x3e\x3cdiv class\x3d'svg-pane' data-x-th-svg-pane\x3e\x3c/div\x3e\x3cdiv class\x3d'tooltip' data-x-th-tooltip hidden\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'causality' data-x-th-causality tabindex\x3d'0' hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'splitter' data-x-th-splitter hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'detail' data-x-th-detail hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'hint' data-x-th-hint\x3e\x3c/div\x3e\x3cdiv class\x3d'drop-overlay' data-x-th-drop-overlay hidden\x3eDrop .trace.json to import\x3c/div\x3e\x3cinput class\x3d'import-input' data-x-th-import-input type\x3d'file' accept\x3d'.json,.trace.json,application/json' /\x3e\x3c/div\x3e";
84
- a.innerHTML=c+e.call(d,b)}return a},pna=function(a,b){$APP.T(a,"__xTraceHistoryShadow",b);$APP.T(a,"__xTraceHistoryTimelineEl",b.querySelector("[data-x-th-timeline]"));$APP.T(a,"__xTraceHistoryLanesEl",b.querySelector("[data-x-th-lanes]"));$APP.T(a,"__xTraceHistorySvgPaneEl",b.querySelector("[data-x-th-svg-pane]"));$APP.T(a,"__xTraceHistoryTooltipEl",b.querySelector("[data-x-th-tooltip]"));$APP.T(a,"__xTraceHistoryCountEl",b.querySelector("[data-x-th-count]"));$APP.T(a,"__xTraceHistoryDetailEl",b.querySelector("[data-x-th-detail]"));
83
+ $APP.N.i(HN("events",$APP.bd(b,$APP.Hr)))+$APP.N.i(HN("state",$APP.bd(b,$APP.vr)))+$APP.N.i(HN("dom",$APP.bd(b,HO)))+$APP.N.i(HN("lifecycle",$APP.bd(b,IO)))+"\x3cx-select data-x-th-mode size\x3d'sm'\x3e\x3coption value\x3d'timeline' selected\x3eTimeline\x3c/option\x3e\x3coption value\x3d'causality'\x3eCausality\x3c/option\x3e\x3c/x-select\x3e\x3cx-select data-x-th-axis size\x3d'sm'\x3e\x3coption value\x3d'order' selected\x3eOrder\x3c/option\x3e\x3coption value\x3d'time'\x3eTime\x3c/option\x3e\x3c/x-select\x3e\x3c/div\x3e\x3cdiv class\x3d'timeline' data-x-th-timeline tabindex\x3d'0'\x3e\x3cdiv class\x3d'lanes' data-x-th-lanes\x3e\x3c/div\x3e\x3cdiv class\x3d'svg-pane' data-x-th-svg-pane\x3e\x3c/div\x3e\x3cdiv class\x3d'tooltip' data-x-th-tooltip hidden\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'causality' data-x-th-causality tabindex\x3d'0' hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'splitter' data-x-th-splitter hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'detail' data-x-th-detail hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'hint' data-x-th-hint\x3e\x3c/div\x3e\x3cdiv class\x3d'drop-overlay' data-x-th-drop-overlay hidden\x3eDrop .trace.json to import\x3c/div\x3e\x3cinput class\x3d'import-input' data-x-th-import-input type\x3d'file' accept\x3d'.json,.trace.json,application/json' /\x3e\x3c/div\x3e";
84
+ a.innerHTML=c+e.call(d,b)}return a},qoa=function(a,b){$APP.T(a,"__xTraceHistoryShadow",b);$APP.T(a,"__xTraceHistoryTimelineEl",b.querySelector("[data-x-th-timeline]"));$APP.T(a,"__xTraceHistoryLanesEl",b.querySelector("[data-x-th-lanes]"));$APP.T(a,"__xTraceHistorySvgPaneEl",b.querySelector("[data-x-th-svg-pane]"));$APP.T(a,"__xTraceHistoryTooltipEl",b.querySelector("[data-x-th-tooltip]"));$APP.T(a,"__xTraceHistoryCountEl",b.querySelector("[data-x-th-count]"));$APP.T(a,"__xTraceHistoryDetailEl",b.querySelector("[data-x-th-detail]"));
85
85
  $APP.T(a,"__xTraceHistorySplitterEl",b.querySelector("[data-x-th-splitter]"));$APP.T(a,"__xTraceHistoryHintEl",b.querySelector("[data-x-th-hint]"));$APP.T(a,"__xTraceHistoryTagSelectEl",b.querySelector("[data-x-th-tag]"));$APP.T(a,"__xTraceHistoryCausalityEl",b.querySelector("[data-x-th-causality]"));$APP.T(a,"__xTraceHistoryPauseBtn",b.querySelector("[data-x-th-action\x3d'pause']"));$APP.T(a,"__xTraceHistoryRecordBtn",b.querySelector("[data-x-th-action\x3d'record']"));$APP.T(a,"__xTraceHistorySessionsEl",
86
- b.querySelector("[data-x-th-sessions]"));$APP.T(a,"__xTraceHistoryImportInput",b.querySelector("[data-x-th-import-input]"));$APP.T(a,"__xTraceHistoryDropOverlay",b.querySelector("[data-x-th-drop-overlay]"));$APP.T(a,"__xTraceHistoryCollapseBtn",b.querySelector("[data-x-th-action\x3d'collapse']"))},qna=function(a,b,c,d,e,f,h,k){return[[b,"click",function(n){n=n.target;var r=n.closest("[data-x-th-action]");if($APP.m(r))switch(r.getAttribute("data-x-th-action")){case "pause":$APP.m($APP.kp.i($APP.fb(tL)))?
87
- HM():GM();break;case "record":NM()!=null?OM():PM();break;case "clear":$APP.T(a,"__xTraceHistoryViewSelected",{});$APP.T(a,"__xTraceHistoryView",$APP.Ns);MM();break;case "export":ZM();break;case "import":r=$APP.l(a,"__xTraceHistoryImportInput");$APP.m(r)&&(r.value="",r.click());break;case "collapse":SN(a)}r=n.closest("[data-x-th-import-close]");if($APP.m(r)){r=parseInt(r.getAttribute("data-x-th-import-close"),10);var v=$APP.l(a,"__xTraceHistoryView");aM(v)&&$APP.z.j(r,bM(v))&&$APP.T(a,"__xTraceHistoryView",
88
- $APP.Ns);UM(r)}$APP.m(n.closest("[data-x-th-import-close]"))||(r=n.closest("[data-x-th-session]"),$APP.m(r)&&(r=r.getAttribute("data-x-th-session"),r=$APP.z.j(r,"live")?$APP.Ns:r.lastIndexOf("import:",0)==0?new $APP.H(null,2,5,$APP.J,[$L,parseInt(r.substring(7),10)],null):new $APP.H(null,2,5,$APP.J,[YL,parseInt(r,10)],null),$APP.T(a,"__xTraceHistoryView",r),NN(a)));r=n.closest("[data-x-th-lane-tag]");if($APP.m(r)){v=r.getAttribute("data-x-th-lane-tag");r=$APP.l(a,"__xTraceHistoryFilter");var w=$APP.it.i(r);
89
- v=$APP.z.j(v,w)?null:v;r=$APP.Vg.l(r,$APP.it,v);$APP.T(a,"__xTraceHistoryFilter",r);r=$APP.l(a,"__xTraceHistoryTagSelectEl");$APP.m(r)&&(r.value=$APP.m(v)?v:"all");NN(a)}r=n.closest("[data-x-th-link-id]");$APP.m(r)&&(r=r.getAttribute("data-x-th-link-id"),$APP.m(r)&&(r=parseInt(r,10),$APP.m(isNaN(r))||(IN(a,r),NN(a))));r=ON(n);r=$APP.m(r)?r:PN(n);$APP.m(r)?($APP.m(ON(n))?n=QN(n):$APP.m(PN(n))?(n=n.getAttribute("data-x-th-bin-record-id"),n=$APP.m(n)?parseInt(n,10):null):n=null,r=wN(a),n=$APP.z.j(n,
90
- r)?null:n,IN(a,n),n=NN(a)):n=null;return n}],[b,"select-change",function(n){var r=n.target;n=n.detail.value;r.getAttribute("data-x-th-tag")!=null?(r=$APP.Vg.l($APP.l(a,"__xTraceHistoryFilter"),$APP.it,$APP.z.j(n,"all")?null:n),$APP.T(a,"__xTraceHistoryFilter",r),r=NN(a)):r=r.getAttribute("data-x-th-mode")!=null?hna(a,n):r.getAttribute("data-x-th-axis")!=null?gna(a,n):null;return r}],[b,"x-checkbox-change",function(n){var r=n.target.getAttribute("data-x-th-cat");if(r!=null){var v=n.detail.checked;
91
- n=$APP.l(a,"__xTraceHistoryFilter");var w=yL.i(n);w=$APP.m(w)?w:$APP.ch(uL);r=$APP.Gh.i(r);r=$APP.m(v)?$APP.Gd.j(w,r):$APP.Do.j(w,r);n=$APP.Vg.l(n,yL,r);$APP.T(a,"__xTraceHistoryFilter",n);n=NN(a)}else n=null;return n}],[b,"x-search-field-input",function(n){var r=n.target;$APP.m($APP.m(r)?r.hasAttribute("data-x-th-search"):r)?(n=n.detail.value,n=($APP.m(n)?n:"").toLowerCase(),n=$APP.Vg.l($APP.l(a,"__xTraceHistoryFilter"),zL,$APP.z.j("",n)?null:n),$APP.T(a,"__xTraceHistoryFilter",n),n=NN(a)):n=null;
92
- return n}],[c,"pointermove",function(n){return ina(a,n)}],[c,"pointerleave",function(){return $APP.l(a,"__xTraceHistoryTooltipEl").setAttribute("hidden","")}],[c,"pointerdown",function(){return c.focus()}],[k,"pointerdown",function(){return k.focus()}],[b,"keydown",function(n){return lna(a,n)}],[d,"pointerdown",function(n){return jna(a,$APP.l(a,"__xTraceHistorySvgPaneEl"),n)}],[e,"pointerdown",function(n){return mna(f,e,n)}],[h,"change",function(n){n=n.target.files;return n.length>0?bO(a,n[0]):null}],
93
- [b,"dragenter",function(n){if($APP.m(cO(n))){n.preventDefault();n=$APP.l(a,"__xTraceHistoryDropOverlay");var r=cM(a,fO);dM(a,fO,($APP.m(r)?r:0)+1);n=n.removeAttribute("hidden")}else n=null;return n}],[b,"dragover",function(n){$APP.m(cO(n))?(n.preventDefault(),n=n.dataTransfer,n=$APP.m(n)?n.dropEffect="copy":null):n=null;return n}],[b,"dragleave",function(n){if($APP.m(cO(n))){n=$APP.l(a,"__xTraceHistoryDropOverlay");var r=$APP.Sj.j,v=cM(a,fO);r=r.call($APP.Sj,0,($APP.m(v)?v:0)-1);dM(a,fO,r);n=r===
94
- 0?n.setAttribute("hidden",""):null}else n=null;return n}],[b,"drop",function(n){$APP.m(cO(n))?(n.preventDefault(),dM(a,fO,0),$APP.l(a,"__xTraceHistoryDropOverlay").setAttribute("hidden",""),n=n.dataTransfer,n=$APP.m(n)?n.files:null,n=$APP.m($APP.m(n)?n.length>0:n)?bO(a,n[0]):null):n=null;return n}],[document,"keydown",function(n){var r;if(r=$APP.z.j("\\",n.key))r=n.metaKey,r=$APP.m(r)?r:n.ctrlKey,r=$APP.m(r)?$APP.p(n.altKey)&&$APP.p(n.shiftKey)&&!YN(n.target):r;$APP.m(r)?(n.preventDefault(),n=SN(a)):
95
- n=null;return n}]]},rna=function(a,b){b=qna(a,b,$APP.l(a,"__xTraceHistoryTimelineEl"),$APP.l(a,"__xTraceHistorySvgPaneEl"),$APP.l(a,"__xTraceHistorySplitterEl"),$APP.l(a,"__xTraceHistoryDetailEl"),$APP.l(a,"__xTraceHistoryImportInput"),$APP.l(a,"__xTraceHistoryCausalityEl"));$APP.T(a,"__xTraceHistoryListeners",b);a:{a=b.length;for(var c=0;;)if(c<a){var d=b[c];d[0].addEventListener(d[1],d[2]);c+=1}else break a}},sna=function(a){if($APP.m($APP.l(a,"__xTraceHistoryHighlightRaf")))return null;var b=requestAnimationFrame(function(){$APP.Di(a,
96
- "__xTraceHistoryHighlightRaf",null);return bN(a)});return $APP.Di(a,"__xTraceHistoryHighlightRaf",b)},tna=function(a){function b(){return sna(a)}var c=[[window,"scroll",b,{capture:!0,passive:!0}],[window,"resize",b,{capture:!1,passive:!0}]];$APP.Di(a,"__xTraceHistoryHighlightListeners",c);for(var d=c.length,e=0;;)if(e<d){var f=c[e];f[0].addEventListener(f[1],f[2],f[3]);e+=1}else break},una=function(a,b){$APP.m($APP.l(a,"__xTraceHistoryFilter"))||$APP.T(a,"__xTraceHistoryFilter",new $APP.K(null,3,
97
- [$APP.it,null,yL,b,zL,null],null));$APP.m($APP.l(a,"__xTraceHistoryView"))||$APP.T(a,"__xTraceHistoryView",$APP.Ns);$APP.m($APP.l(a,"__xTraceHistoryViewSelected"))||$APP.T(a,"__xTraceHistoryViewSelected",{});$APP.m($APP.l(a,"__xTraceHistoryAxisMode"))||$APP.T(a,"__xTraceHistoryAxisMode",$APP.dq);$APP.m($APP.l(a,"__xTraceHistoryDockMode"))||$APP.T(a,"__xTraceHistoryDockMode",MN);$APP.l(a,"__xTraceHistoryCollapsed")==null&&$APP.T(a,"__xTraceHistoryCollapsed",!1);RN(a,$APP.D($APP.l(a,"__xTraceHistoryCollapsed")))},
98
- vna=function(a){if($APP.m($APP.l(a,"__xTraceHistoryMounted")))return null;a.__xTraceHistoryInternal=!0;var b=fM().length;vma(function(){var c=bma(),d=ona(a,c);pna(a,d);una(a,c);rna(a,d);tna(a);c=jM.i($APP.Eo.l(gM,tma,function(){var e=$APP.l(a,"__xTraceHistoryView"),f=WM(),h=f.length;var k=cM(a,gO);k=$APP.m(k)?k:0;h>k?(dM(a,gO,h),$APP.z.j(e,$APP.Ns)&&fM().length===0&&$APP.T(a,"__xTraceHistoryView",new $APP.H(null,2,5,$APP.J,[$L,f[h-1].id],null))):h<k&&dM(a,gO,h);return NN(a)}));$APP.T(a,"__xTraceHistorySubToken",
99
- c);NN(a);return $APP.T(a,"__xTraceHistoryMounted",!0)});return $APP.M.j(b,fM().length)?console.warn("[x-trace-history] dock mount produced records — internal-host suppression is leaking. ","Wrap dynamic child-component constructors in recorder/with-suppressed-recording!."):null},hO=function(){return $APP.m(document.querySelector("x-trace-history"))?null:document.body.appendChild(document.createElement("x-trace-history"))},iO=function(){if(eL()){var a=$APP.Eo.o;var b=$APP.l(window,"BAREDOM_TRACE_HISTORY_CAPACITY");
100
- b=typeof b==="number"&&b>0?b:5E3;var c=window,d;(d=$APP.z.j("raw",$APP.l(c,"BAREDOM_TRACE_HISTORY")))||(c=c.location.search,c=c==null?null:$APP.vh(wna,c),d=$APP.D(c));a.call($APP.Eo,tL,$APP.Vg,$APP.Jl,b,$APP.Hc([lL,d]));$APP.Je($APP.ti,CM);$APP.Je($APP.jj,CM);$APP.Je(nM,0);$APP.Je(uM,$APP.We);yma();$APP.Je(BM,!0);a=$APP.l(window,"BareDOM");a=$APP.m(a)?a:{};a.traceHistory={records:zma,sessions:RM,"export":Fma,download:ZM,stopSession:OM,"import":aO,pause:GM,importRecords:XM,sessionRecords:SM,startSession:PM,
101
- components:Ama,clear:MM,imports:WM,removeImport:UM,resume:HM};window.BareDOM=a;console.log("%c[BareDOM Trace History]%c Active — see window.BareDOM.traceHistory for the API","color:#3b82f6;font-weight:bold","color:inherit")}$APP.wn();$APP.lm();$APP.Qk();$APP.Gn();$APP.vj("x-trace-history",xna);return eL()?$APP.m(document.body)?hO():document.addEventListener("DOMContentLoaded",hO,{once:!0}):null},jO=function(){return iO()},QL=function QL(a){switch(arguments.length){case 2:return QL.j(arguments[0],
102
- arguments[1]);case 3:return QL.l(arguments[0],arguments[1],arguments[2]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return QL.o(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.fc(c.slice(3),0,null):null)}};QL.j=function(a,b){return b};QL.l=function(a,b,c){return(a.i?a.i(b):a.call(null,b))<(a.i?a.i(c):a.call(null,c))?b:c};QL.o=function(a,b,c,d){return $APP.Aa(function(e,f){return QL.l(a,e,f)},QL.l(a,b,c),d)};
103
- QL.I=function(a){var b=$APP.t(a),c=$APP.u(a);a=$APP.t(c);var d=$APP.u(c);c=$APP.t(d);d=$APP.u(d);return this.o(b,a,c,d)};QL.M=3;
104
- var nL=new $APP.F(null,"start-t","start-t",1829305353),pN=new $APP.F(null,"node-count","node-count",383091297),pL=new $APP.F(null,"start-id","start-id",-456790067),qL=new $APP.F(null,"end-id","end-id",2084513705),MN=new $APP.F(null,"timeline","timeline",192903161),zN=new $APP.F(null,"chip-key","chip-key",644014552),tM=new $APP.F(null,"next-component-id","next-component-id",1588977206),lN=new $APP.F(null,"edges","edges",-694791395),jM=new $APP.F(null,"next-token","next-token",1432414974),kL=new $APP.F(null,
105
- "user-agent","user-agent",1220426212),HN=new $APP.F(null,"causality","causality",-712927373),lL=new $APP.F(null,"forensic?","forensic?",188264321),zL=new $APP.F(null,"search","search",1564939822),YL=new $APP.F(null,"session","session",1008279103),oN=new $APP.F(null,"causality-layout","causality-layout",-1264013405),AN=new $APP.F(null,"recording?","recording?",-1477514924),SL=new $APP.F(null,"records","records",1326822832),kM=new $APP.F(null,"new?","new?",777958557),Uma=new $APP.F(null,"max-depth",
106
- "max-depth",127060793),XL=new $APP.F(null,"capped?","capped?",-65680820),nN=new $APP.F(null,"cy","cy",755331060),mN=new $APP.F(null,"cx","cx",1272694324),UL=new $APP.F(null,"x-start","x-start",1183238797),xN=new $APP.F(null,"scroll-left","scroll-left",-211761103),ML=new $APP.F(null,"lane-id","lane-id",2005926623),AL=new $APP.F(null,"haystack-fn","haystack-fn",1813797862),JM=new $APP.F(null,"sessions","sessions",-699316392),oL=new $APP.F(null,"end-t","end-t",-218701242),hM=new $APP.F(null,"by-token",
107
- "by-token",-1485378511),kO=new $APP.F(null,"next-import-id","next-import-id",287496955),WL=new $APP.F(null,"record","record",-779106859),vM=new $APP.F(null,"components","components",-1073188942),EM=new $APP.F(null,"envelope","envelope",-236796318),hL=new $APP.F(null,"cause-id","cause-id",-1282947263),hma=new $APP.F(null,"x-end","x-end",-1725631203),ema=new $APP.F(null,"tmax","tmax",2006118392),VN=new $APP.F(null,"bin-count","bin-count",1792167977),gO=new $APP.F(null,"auto-switch-import","auto-switch-import",
108
- -809333661),vN=new $APP.F(null,"causality-needs-fit","causality-needs-fit",1728707358),kN=new $APP.F(null,"to-cy","to-cy",1542880464),jN=new $APP.F(null,"to-cx","to-cx",698995232),yN=new $APP.F(null,"scroll-top","scroll-top",-46723100),yM=new $APP.F(null,"rate-limit","rate-limit",1748082022),NL=new $APP.F(null,"tmin","tmin",-39508962),yna=new $APP.F(null,"to-id","to-id",1021626465),ima=new $APP.F(null,"t-min","t-min",-488887638),lM=new $APP.F(null,"next-id","next-id",-224240762),yL=new $APP.F(null,
109
- "categories","categories",178386610),jma=new $APP.F(null,"t-max","t-max",-949530573),fN=new $APP.F(null,"time","time",1385887882),TL=new $APP.F(null,"dominant-cat","dominant-cat",-914257775),eO=new $APP.F(null,"lifecycle","lifecycle",341496205),vL=new $APP.F(null,"other","other",995793544),TM=new $APP.F("baredom.dev.x-trace-history.model","parse-error","baredom.dev.x-trace-history.model/parse-error",840657481),LL=new $APP.F(null,"min-t","min-t",-1349871659),FM=new $APP.F(null,"imports","imports",
110
- -1249933394),RL=new $APP.F(null,"bin-i","bin-i",791326307),mL=new $APP.F(null,"first-seen","first-seen",390191468),BN=new $APP.F(null,"import?","import?",-40157302),dO=new $APP.F(null,"dom","dom",-1236537922),KM=new $APP.F(null,"next-session-id","next-session-id",1944278844),VM=new $APP.F(null,"imported-at","imported-at",-1157103926),lO=new $APP.F(null,"depth","depth",1768663640),UN=new $APP.F(null,"record-id","record-id",-1468971877),LM=new $APP.F(null,"active-session-id","active-session-id",943086451),
111
- hN=new $APP.F(null,"from-cx","from-cx",-293616201),iN=new $APP.F(null,"from-cy","from-cy",1126835724),jL=new $APP.F(null,"exported-at","exported-at",1661975683),gL=new $APP.F(null,"component-id","component-id",1551113783),ZN=new $APP.F(null,"import-error","import-error",1672727808),fO=new $APP.F(null,"drag-depth","drag-depth",-226189617),zna=new $APP.F(null,"from-id","from-id",-106962526),CN=new $APP.F(null,"import-id","import-id",940580069),OL=new $APP.F(null,"span","span",1394872991),JL=new $APP.F("baredom.dev.x-trace-history.model",
112
- "document","baredom.dev.x-trace-history.model/document",-1776453896),$L=new $APP.F(null,"import","import",-1399500709);var IM=$APP.Wf.j($APP.Lo,$APP.We),Xla=dL("(?:^\\?|\x26)"+$APP.N.i("baredom-trace-history")+"(?:\x3d|\x26|$)"),wna=dL("(?:^\\?|\x26)"+$APP.N.i("baredom-trace-history")+"\x3d"+$APP.N.i("raw")+"(?:\x26|$)"),cma=new $APP.K(null,4,[$APP.Rr,new $APP.Yg(null,new $APP.K(null,3,["event/dispatch",null,"event/dispatch-document",null,"event/dispatch-cancelable",null],null),null),$APP.qr,new $APP.Yg(null,new $APP.K(null,1,["state/instance-field-set",null],null),null),dO,new $APP.Yg(null,new $APP.K(null,2,["dom/attribute-removed",
113
- null,"dom/attribute-set",null],null),null),eO,new $APP.Yg(null,new $APP.K(null,3,["lifecycle/attribute-changed",null,"lifecycle/connected",null,"lifecycle/disconnected",null],null),null)],null),uL=new $APP.H(null,4,5,$APP.J,[$APP.Rr,$APP.qr,dO,eO],null),HL=new $APP.K(null,5,[$APP.Rr,"#94e2d5",$APP.qr,"#f9e2af",dO,"#fab387",eO,"#cba6f7",vL,"#6c7086"],null),VL=function VL(a,b){return $APP.Kd(b,new $APP.Nd(null,function(){return $APP.Re(function(d){return VL.j?VL.j(a,d):VL.call(null,a,d)},$APP.Hc([oma(a,
114
- b.id)]))},null))},qN=function qN(a){return $APP.Aa($APP.Mj,0,$APP.Ne.j(qN,$APP.Pt.i(a)))+1},rN=function rN(a){return $APP.Yc($APP.Pt.i(a))?0:$APP.fe($APP.Sj,$APP.Ne.j(rN,$APP.Pt.i(a)))+1},sN=function sN(a,b,c){var e=WL.i(a),f=$APP.Pt.i(a);a=30+b*56;if($APP.Yc(f))return new $APP.H(null,2,5,$APP.J,[new $APP.K(null,6,[$APP.er,e.id,WL,e,mN,c+70,nN,a,lO,b,$APP.Pt,$APP.We],null),c+158],null);f=$APP.Aa(function(n,r){var v=$APP.B(n,0,null);n=$APP.B(n,1,null);var w=b+1;n=sN.l?sN.l(r,w,n):sN.call(null,r,w,
115
- n);r=$APP.B(n,0,null);n=$APP.B(n,1,null);return new $APP.H(null,2,5,$APP.J,[$APP.Gd.j(v,r),n],null)},new $APP.H(null,2,5,$APP.J,[$APP.We,c],null),f);c=$APP.B(f,0,null);f=$APP.B(f,1,null);var h=mN.i($APP.t(c)),k=mN.i($APP.Lc(c));return new $APP.H(null,2,5,$APP.J,[new $APP.K(null,6,[$APP.er,e.id,WL,e,mN,(h+k)/2,nN,a,lO,b,$APP.Pt,c],null),f],null)},tN=function tN(a){return $APP.Wf.j(new $APP.H(null,1,5,$APP.J,[$APP.ck.j(a,$APP.Pt)],null),$APP.Re(tN,$APP.Hc([$APP.Pt.i(a)])))},uN=function uN(a){var c=
116
- $APP.er.i(a),d=mN.i(a),e=nN.i(a);return $APP.qf($APP.Re(function(f){return $APP.Kd(new $APP.K(null,6,[zna,c,hN,d,iN,e,yna,$APP.er.i(f),jN,mN.i(f),kN,nN.i(f)],null),uN.i?uN.i(f):uN.call(null,f))},$APP.Hc([$APP.Pt.i(a)])))};var tL=$APP.Ie($APP.zg([lL,$APP.Jl,yM,lM,$APP.kp,FM,SL,vM,LM,tM,JM,kO,KM],[!1,5E3,$APP.ne,0,!1,$APP.We,IM,$APP.ne,null,0,$APP.We,0,0])),gM=$APP.Ie(new $APP.K(null,3,[jM,0,$APP.Kl,!1,hM,$APP.ne],null)),uM=$APP.Ie($APP.We),DM=$APP.Ie(null),BM=$APP.Ie(!1),nM=$APP.Ie(0),eM=$APP.Ie([null,null]),wma=new $APP.Yg(null,new $APP.K(null,3,[$APP.Bi,null,$APP.ui,null,$APP.zi,null],null),null),xma=new $APP.Yg(null,new $APP.K(null,3,[$APP.Ti,null,$APP.Vi,null,$APP.Hi,null],null),null),aO=function aO(a){switch(arguments.length){case 1:return aO.i(arguments[0]);
117
- case 2:return aO.j(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",arguments.length].join(""));}};aO.i=function(a){return aO.j(a,null)};
118
- aO.j=function(a,b){a=Ema(a);var c=$APP.G(a);a=$APP.C(c,$APP.Pq);c=$APP.C(c,$APP.xj);if($APP.m(c))return console.warn("[x-trace-history] import rejected:",c),null;c=performance.now();var d=kO.i($APP.fb(tL));b=b==null||$APP.z.j("",b)?"Import "+$APP.N.i(d):b;var e=new $APP.K(null,4,[$APP.er,d,$APP.Z,b,VM,c,EM,a],null);$APP.Eo.j(tL,function(f){return $APP.oi.l($APP.oi.K(f,FM,$APP.Gd,e),kO,$APP.qc)});iM();return d};aO.M=2;var LN,mO=window.matchMedia;LN=$APP.m(mO)?mO.call(window,"(prefers-reduced-motion: reduce)"):null;var Gma=RegExp("\x26","g"),Hma=RegExp("\x3c","g"),Ima=RegExp("\x3e","g"),Jma=RegExp('"',"g"),Kma=RegExp("'","g"),EN=new WeakMap,kna=new $APP.Yg(null,new $APP.K(null,5,["x-select",null,"select",null,"input",null,"textarea",null,"x-checkbox",null],null),null),xna=new $APP.K(null,5,[$APP.uj,!0,$APP.nj,[],$APP.oj,function(a){return vna(a)},$APP.pj,function(a){var b=$APP.l(a,"__xTraceHistorySubToken");$APP.m(b)&&$APP.Eo.o(gM,$APP.oi,hM,$APP.ck,$APP.Hc([b]));b=cM(a,ZN);$APP.m(b)&&typeof b==="number"&&clearTimeout(b);
119
- b=$APP.l(a,"__xTraceHistoryListeners");if($APP.m(b)){for(var c=b.length,d=0;;)if(d<c){var e=b[d];e[0].removeEventListener(e[1],e[2]);d+=1}else break;$APP.T(a,"__xTraceHistoryListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightListeners");if($APP.m(b)){c=b.length;for(d=0;;)if(d<c)e=b[d],e[0].removeEventListener(e[1],e[2],e[3]),d+=1;else break;$APP.Di(a,"__xTraceHistoryHighlightListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightRaf");$APP.m(b)&&(cancelAnimationFrame(b),$APP.Di(a,"__xTraceHistoryHighlightRaf",
120
- null));b=$APP.l(a,"__xTraceHistoryHighlightLayer");$APP.m(b)&&$APP.Tk(b);$APP.Di(a,"__xTraceHistoryHighlightLayer",null);$APP.Di(a,"__xTraceHistoryHighlightBox",null);$APP.Di(a,"__xTraceHistoryHighlightCid",null);$APP.T(a,"__xTraceHistorySubToken",null);dM(a,ZN,null);return $APP.T(a,"__xTraceHistoryMounted",null)},$APP.qj,function(){return null}],null);$APP.ha("baredom.exports.x_trace_history.init",jO);iO();export const init=jO;
86
+ b.querySelector("[data-x-th-sessions]"));$APP.T(a,"__xTraceHistoryImportInput",b.querySelector("[data-x-th-import-input]"));$APP.T(a,"__xTraceHistoryDropOverlay",b.querySelector("[data-x-th-drop-overlay]"));$APP.T(a,"__xTraceHistoryCollapseBtn",b.querySelector("[data-x-th-action\x3d'collapse']"))},roa=function(a,b,c,d,e,f,g,k){return[[b,"click",function(n){n=n.target;var r=n.closest("[data-x-th-action]");if($APP.m(r))switch(r.getAttribute("data-x-th-action")){case "pause":$APP.m($APP.lp.i($APP.ab(XL)))?
87
+ kN():jN();break;case "record":qN()!=null?rN():sN();break;case "clear":$APP.T(a,"__xTraceHistoryViewSelected",{});$APP.T(a,"__xTraceHistoryView",$APP.at);pN();break;case "export":CN();break;case "import":r=$APP.l(a,"__xTraceHistoryImportInput");$APP.m(r)&&(r.value="",r.click());break;case "collapse":vO(a)}r=n.closest("[data-x-th-import-close]");if($APP.m(r)){r=parseInt(r.getAttribute("data-x-th-import-close"),10);var v=$APP.l(a,"__xTraceHistoryView");EM(v)&&$APP.z.j(r,FM(v))&&$APP.T(a,"__xTraceHistoryView",
88
+ $APP.at);xN(r)}$APP.m(n.closest("[data-x-th-import-close]"))||(r=n.closest("[data-x-th-session]"),$APP.m(r)&&(r=r.getAttribute("data-x-th-session"),r=$APP.z.j(r,"live")?$APP.at:r.lastIndexOf("import:",0)==0?new $APP.H(null,2,5,$APP.I,[DM,parseInt(r.substring(7),10)],null):new $APP.H(null,2,5,$APP.I,[BM,parseInt(r,10)],null),$APP.T(a,"__xTraceHistoryView",r),qO(a)));r=n.closest("[data-x-th-lane-tag]");if($APP.m(r)){v=r.getAttribute("data-x-th-lane-tag");r=$APP.l(a,"__xTraceHistoryFilter");var w=$APP.wt.i(r);
89
+ v=$APP.z.j(v,w)?null:v;r=$APP.Eg.l(r,$APP.wt,v);$APP.T(a,"__xTraceHistoryFilter",r);r=$APP.l(a,"__xTraceHistoryTagSelectEl");$APP.m(r)&&(r.value=$APP.m(v)?v:"all");qO(a)}r=n.closest("[data-x-th-link-id]");$APP.m(r)&&(r=r.getAttribute("data-x-th-link-id"),$APP.m(r)&&(r=parseInt(r,10),$APP.m(isNaN(r))||(lO(a,r),qO(a))));r=rO(n);r=$APP.m(r)?r:sO(n);$APP.m(r)?($APP.m(rO(n))?n=tO(n):$APP.m(sO(n))?(n=n.getAttribute("data-x-th-bin-record-id"),n=$APP.m(n)?parseInt(n,10):null):n=null,r=$N(a),n=$APP.z.j(n,
90
+ r)?null:n,lO(a,n),n=qO(a)):n=null;return n}],[b,"select-change",function(n){var r=n.target;n=n.detail.value;r.getAttribute("data-x-th-tag")!=null?(r=$APP.Eg.l($APP.l(a,"__xTraceHistoryFilter"),$APP.wt,$APP.z.j(n,"all")?null:n),$APP.T(a,"__xTraceHistoryFilter",r),r=qO(a)):r=r.getAttribute("data-x-th-mode")!=null?ioa(a,n):r.getAttribute("data-x-th-axis")!=null?hoa(a,n):null;return r}],[b,"x-checkbox-change",function(n){var r=n.target.getAttribute("data-x-th-cat");if(r!=null){var v=n.detail.checked;
91
+ n=$APP.l(a,"__xTraceHistoryFilter");var w=bM.i(n);w=$APP.m(w)?w:$APP.Og(YL);r=$APP.oh.i(r);r=$APP.m(v)?$APP.zd.j(w,r):$APP.no.j(w,r);n=$APP.Eg.l(n,bM,r);$APP.T(a,"__xTraceHistoryFilter",n);n=qO(a)}else n=null;return n}],[b,"x-search-field-input",function(n){var r=n.target;$APP.m($APP.m(r)?r.hasAttribute("data-x-th-search"):r)?(n=n.detail.value,n=($APP.m(n)?n:"").toLowerCase(),n=$APP.Eg.l($APP.l(a,"__xTraceHistoryFilter"),cM,$APP.z.j("",n)?null:n),$APP.T(a,"__xTraceHistoryFilter",n),n=qO(a)):n=null;
92
+ return n}],[c,"pointermove",function(n){return joa(a,n)}],[c,"pointerleave",function(){return $APP.l(a,"__xTraceHistoryTooltipEl").setAttribute("hidden","")}],[c,"pointerdown",function(){return c.focus()}],[k,"pointerdown",function(){return k.focus()}],[b,"keydown",function(n){return moa(a,n)}],[d,"pointerdown",function(n){return koa(a,$APP.l(a,"__xTraceHistorySvgPaneEl"),n)}],[e,"pointerdown",function(n){return noa(f,e,n)}],[g,"change",function(n){n=n.target.files;return n.length>0?FO(a,n[0]):null}],
93
+ [b,"dragenter",function(n){if($APP.m(GO(n))){n.preventDefault();n=$APP.l(a,"__xTraceHistoryDropOverlay");var r=GM(a,JO);HM(a,JO,($APP.m(r)?r:0)+1);n=n.removeAttribute("hidden")}else n=null;return n}],[b,"dragover",function(n){$APP.m(GO(n))?(n.preventDefault(),n=n.dataTransfer,n=$APP.m(n)?n.dropEffect="copy":null):n=null;return n}],[b,"dragleave",function(n){if($APP.m(GO(n))){n=$APP.l(a,"__xTraceHistoryDropOverlay");var r=$APP.Hj.j,v=GM(a,JO);r=r.call($APP.Hj,0,($APP.m(v)?v:0)-1);HM(a,JO,r);n=r===
94
+ 0?n.setAttribute("hidden",""):null}else n=null;return n}],[b,"drop",function(n){$APP.m(GO(n))?(n.preventDefault(),HM(a,JO,0),$APP.l(a,"__xTraceHistoryDropOverlay").setAttribute("hidden",""),n=n.dataTransfer,n=$APP.m(n)?n.files:null,n=$APP.m($APP.m(n)?n.length>0:n)?FO(a,n[0]):null):n=null;return n}],[document,"keydown",function(n){var r;if(r=$APP.z.j("\\",n.key))r=n.metaKey,r=$APP.m(r)?r:n.ctrlKey,r=$APP.m(r)?$APP.p(n.altKey)&&$APP.p(n.shiftKey)&&!BO(n.target):r;$APP.m(r)?(n.preventDefault(),n=vO(a)):
95
+ n=null;return n}]]},soa=function(a,b){b=roa(a,b,$APP.l(a,"__xTraceHistoryTimelineEl"),$APP.l(a,"__xTraceHistorySvgPaneEl"),$APP.l(a,"__xTraceHistorySplitterEl"),$APP.l(a,"__xTraceHistoryDetailEl"),$APP.l(a,"__xTraceHistoryImportInput"),$APP.l(a,"__xTraceHistoryCausalityEl"));$APP.T(a,"__xTraceHistoryListeners",b);a:{a=b.length;for(var c=0;;)if(c<a){var d=b[c];d[0].addEventListener(d[1],d[2]);c+=1}else break a}},toa=function(a){if($APP.m($APP.l(a,"__xTraceHistoryHighlightRaf")))return null;var b=requestAnimationFrame(function(){$APP.mi(a,
96
+ "__xTraceHistoryHighlightRaf",null);return FN(a)});return $APP.mi(a,"__xTraceHistoryHighlightRaf",b)},uoa=function(a){function b(){return toa(a)}var c=[[window,"scroll",b,{capture:!0,passive:!0}],[window,"resize",b,{capture:!1,passive:!0}]];$APP.mi(a,"__xTraceHistoryHighlightListeners",c);for(var d=c.length,e=0;;)if(e<d){var f=c[e];f[0].addEventListener(f[1],f[2],f[3]);e+=1}else break},voa=function(a,b){$APP.m($APP.l(a,"__xTraceHistoryFilter"))||$APP.T(a,"__xTraceHistoryFilter",new $APP.K(null,3,
97
+ [$APP.wt,null,bM,b,cM,null],null));$APP.m($APP.l(a,"__xTraceHistoryView"))||$APP.T(a,"__xTraceHistoryView",$APP.at);$APP.m($APP.l(a,"__xTraceHistoryViewSelected"))||$APP.T(a,"__xTraceHistoryViewSelected",{});$APP.m($APP.l(a,"__xTraceHistoryAxisMode"))||$APP.T(a,"__xTraceHistoryAxisMode",$APP.gq);$APP.m($APP.l(a,"__xTraceHistoryDockMode"))||$APP.T(a,"__xTraceHistoryDockMode",pO);$APP.l(a,"__xTraceHistoryCollapsed")==null&&$APP.T(a,"__xTraceHistoryCollapsed",!1);uO(a,$APP.D($APP.l(a,"__xTraceHistoryCollapsed")))},
98
+ woa=function(a){if($APP.m($APP.l(a,"__xTraceHistoryMounted")))return null;a.__xTraceHistoryInternal=!0;var b=JM().length;wna(function(){var c=cna(),d=poa(a,c);qoa(a,d);voa(a,c);soa(a,d);uoa(a);c=NM.i($APP.oo.l(KM,una,function(){var e=$APP.l(a,"__xTraceHistoryView"),f=zN(),g=f.length;var k=GM(a,KO);k=$APP.m(k)?k:0;g>k?(HM(a,KO,g),$APP.z.j(e,$APP.at)&&JM().length===0&&$APP.T(a,"__xTraceHistoryView",new $APP.H(null,2,5,$APP.I,[DM,f[g-1].id],null))):g<k&&HM(a,KO,g);return qO(a)}));$APP.T(a,"__xTraceHistorySubToken",
99
+ c);qO(a);return $APP.T(a,"__xTraceHistoryMounted",!0)});return $APP.M.j(b,JM().length)?console.warn("[x-trace-history] dock mount produced records — internal-host suppression is leaking. ","Wrap dynamic child-component constructors in recorder/with-suppressed-recording!."):null},LO=function(){return $APP.m(document.querySelector("x-trace-history"))?null:document.body.appendChild(document.createElement("x-trace-history"))},MO=function(){if(IL()){var a=$APP.oo.o;var b=$APP.l(window,"BAREDOM_TRACE_HISTORY_CAPACITY");
100
+ b=typeof b==="number"&&b>0?b:5E3;var c=window,d;(d=$APP.z.j("raw",$APP.l(c,"BAREDOM_TRACE_HISTORY")))||(c=c.location.search,c=c==null?null:$APP.hh(xoa,c),d=$APP.D(c));a.call($APP.oo,XL,$APP.Eg,$APP.Al,b,$APP.Ac([PL,d]));$APP.ze($APP.Wh,fN);$APP.ze($APP.Pi,fN);$APP.ze(RM,0);$APP.ze(YM,$APP.Me);zna();$APP.ze(eN,!0);a=$APP.l(window,"BareDOM");a=$APP.m(a)?a:{};a.traceHistory={records:Ana,sessions:uN,"export":Gna,download:CN,stopSession:rN,"import":EO,pause:jN,importRecords:AN,sessionRecords:vN,startSession:sN,
101
+ components:Bna,clear:pN,imports:zN,removeImport:xN,resume:kN};window.BareDOM=a;console.log("%c[BareDOM Trace History]%c Active — see window.BareDOM.traceHistory for the API","color:#3b82f6;font-weight:bold","color:inherit")}$APP.wn();$APP.lm();$APP.Rk();$APP.Jn();$APP.kj("x-trace-history",yoa);return IL()?$APP.m(document.body)?LO():document.addEventListener("DOMContentLoaded",LO,{once:!0}):null},NO=function(){return MO()},tM=function tM(a){switch(arguments.length){case 2:return tM.j(arguments[0],
102
+ arguments[1]);case 3:return tM.l(arguments[0],arguments[1],arguments[2]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return tM.o(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.Xb(c.slice(3),0,null):null)}};tM.j=function(a,b){return b};tM.l=function(a,b,c){return(a.i?a.i(b):a.call(null,b))<(a.i?a.i(c):a.call(null,c))?b:c};tM.o=function(a,b,c,d){return $APP.xa(function(e,f){return tM.l(a,e,f)},tM.l(a,b,c),d)};
103
+ tM.I=function(a){var b=$APP.t(a),c=$APP.u(a);a=$APP.t(c);var d=$APP.u(c);c=$APP.t(d);d=$APP.u(d);return this.o(b,a,c,d)};tM.M=3;
104
+ var RL=new $APP.F(null,"start-t","start-t",1829305353),TN=new $APP.F(null,"node-count","node-count",383091297),TL=new $APP.F(null,"start-id","start-id",-456790067),UL=new $APP.F(null,"end-id","end-id",2084513705),pO=new $APP.F(null,"timeline","timeline",192903161),cO=new $APP.F(null,"chip-key","chip-key",644014552),XM=new $APP.F(null,"next-component-id","next-component-id",1588977206),PN=new $APP.F(null,"edges","edges",-694791395),NM=new $APP.F(null,"next-token","next-token",1432414974),OL=new $APP.F(null,
105
+ "user-agent","user-agent",1220426212),kO=new $APP.F(null,"causality","causality",-712927373),PL=new $APP.F(null,"forensic?","forensic?",188264321),cM=new $APP.F(null,"search","search",1564939822),BM=new $APP.F(null,"session","session",1008279103),SN=new $APP.F(null,"causality-layout","causality-layout",-1264013405),dO=new $APP.F(null,"recording?","recording?",-1477514924),vM=new $APP.F(null,"records","records",1326822832),OM=new $APP.F(null,"new?","new?",777958557),Vna=new $APP.F(null,"max-depth",
106
+ "max-depth",127060793),AM=new $APP.F(null,"capped?","capped?",-65680820),RN=new $APP.F(null,"cy","cy",755331060),QN=new $APP.F(null,"cx","cx",1272694324),xM=new $APP.F(null,"x-start","x-start",1183238797),aO=new $APP.F(null,"scroll-left","scroll-left",-211761103),pM=new $APP.F(null,"lane-id","lane-id",2005926623),dM=new $APP.F(null,"haystack-fn","haystack-fn",1813797862),mN=new $APP.F(null,"sessions","sessions",-699316392),SL=new $APP.F(null,"end-t","end-t",-218701242),LM=new $APP.F(null,"by-token",
107
+ "by-token",-1485378511),OO=new $APP.F(null,"next-import-id","next-import-id",287496955),zM=new $APP.F(null,"record","record",-779106859),ZM=new $APP.F(null,"components","components",-1073188942),hN=new $APP.F(null,"envelope","envelope",-236796318),LL=new $APP.F(null,"cause-id","cause-id",-1282947263),ina=new $APP.F(null,"x-end","x-end",-1725631203),fna=new $APP.F(null,"tmax","tmax",2006118392),yO=new $APP.F(null,"bin-count","bin-count",1792167977),KO=new $APP.F(null,"auto-switch-import","auto-switch-import",
108
+ -809333661),ZN=new $APP.F(null,"causality-needs-fit","causality-needs-fit",1728707358),ON=new $APP.F(null,"to-cy","to-cy",1542880464),NN=new $APP.F(null,"to-cx","to-cx",698995232),bO=new $APP.F(null,"scroll-top","scroll-top",-46723100),bN=new $APP.F(null,"rate-limit","rate-limit",1748082022),qM=new $APP.F(null,"tmin","tmin",-39508962),zoa=new $APP.F(null,"to-id","to-id",1021626465),jna=new $APP.F(null,"t-min","t-min",-488887638),PM=new $APP.F(null,"next-id","next-id",-224240762),bM=new $APP.F(null,
109
+ "categories","categories",178386610),kna=new $APP.F(null,"t-max","t-max",-949530573),JN=new $APP.F(null,"time","time",1385887882),wM=new $APP.F(null,"dominant-cat","dominant-cat",-914257775),IO=new $APP.F(null,"lifecycle","lifecycle",341496205),ZL=new $APP.F(null,"other","other",995793544),wN=new $APP.F("baredom.dev.x-trace-history.model","parse-error","baredom.dev.x-trace-history.model/parse-error",840657481),oM=new $APP.F(null,"min-t","min-t",-1349871659),iN=new $APP.F(null,"imports","imports",
110
+ -1249933394),uM=new $APP.F(null,"bin-i","bin-i",791326307),QL=new $APP.F(null,"first-seen","first-seen",390191468),eO=new $APP.F(null,"import?","import?",-40157302),HO=new $APP.F(null,"dom","dom",-1236537922),nN=new $APP.F(null,"next-session-id","next-session-id",1944278844),yN=new $APP.F(null,"imported-at","imported-at",-1157103926),xO=new $APP.F(null,"record-id","record-id",-1468971877),oN=new $APP.F(null,"active-session-id","active-session-id",943086451),LN=new $APP.F(null,"from-cx","from-cx",
111
+ -293616201),MN=new $APP.F(null,"from-cy","from-cy",1126835724),NL=new $APP.F(null,"exported-at","exported-at",1661975683),KL=new $APP.F(null,"component-id","component-id",1551113783),CO=new $APP.F(null,"import-error","import-error",1672727808),JO=new $APP.F(null,"drag-depth","drag-depth",-226189617),Aoa=new $APP.F(null,"from-id","from-id",-106962526),fO=new $APP.F(null,"import-id","import-id",940580069),rM=new $APP.F(null,"span","span",1394872991),mM=new $APP.F("baredom.dev.x-trace-history.model",
112
+ "document","baredom.dev.x-trace-history.model/document",-1776453896),DM=new $APP.F(null,"import","import",-1399500709);var lN=$APP.Hf.j($APP.Mo,$APP.Me),Yma=HL("(?:^\\?|\x26)"+$APP.N.i("baredom-trace-history")+"(?:\x3d|\x26|$)"),xoa=HL("(?:^\\?|\x26)"+$APP.N.i("baredom-trace-history")+"\x3d"+$APP.N.i("raw")+"(?:\x26|$)"),dna=new $APP.K(null,4,[$APP.Hr,new $APP.Jg(null,new $APP.K(null,3,["event/dispatch",null,"event/dispatch-document",null,"event/dispatch-cancelable",null],null),null),$APP.vr,new $APP.Jg(null,new $APP.K(null,1,["state/instance-field-set",null],null),null),HO,new $APP.Jg(null,new $APP.K(null,2,["dom/attribute-removed",
113
+ null,"dom/attribute-set",null],null),null),IO,new $APP.Jg(null,new $APP.K(null,4,["lifecycle/attribute-changed",null,"lifecycle/connected",null,"lifecycle/moved",null,"lifecycle/disconnected",null],null),null)],null),YL=new $APP.H(null,4,5,$APP.I,[$APP.Hr,$APP.vr,HO,IO],null),kM=new $APP.K(null,5,[$APP.Hr,"#94e2d5",$APP.vr,"#f9e2af",HO,"#fab387",IO,"#cba6f7",ZL,"#6c7086"],null),yM=function yM(a,b){return $APP.Cd(b,new $APP.Ed(null,function(){return $APP.He(function(d){return yM.j?yM.j(a,d):yM.call(null,
114
+ a,d)},$APP.Ac([pna(a,b.id)]))},null))},UN=function UN(a){return $APP.xa($APP.Bj,0,$APP.De.j(UN,$APP.cu.i(a)))+1},VN=function VN(a){return $APP.Pc($APP.cu.i(a))?0:$APP.Yd($APP.Hj,$APP.De.j(VN,$APP.cu.i(a)))+1},WN=function WN(a,b,c){var e=zM.i(a),f=$APP.cu.i(a);a=30+b*56;if($APP.Pc(f))return new $APP.H(null,2,5,$APP.I,[new $APP.K(null,6,[$APP.jr,e.id,zM,e,QN,c+70,RN,a,$APP.gi,b,$APP.cu,$APP.Me],null),c+158],null);f=$APP.xa(function(n,r){var v=$APP.B(n,0,null);n=$APP.B(n,1,null);var w=b+1;n=WN.l?WN.l(r,
115
+ w,n):WN.call(null,r,w,n);r=$APP.B(n,0,null);n=$APP.B(n,1,null);return new $APP.H(null,2,5,$APP.I,[$APP.zd.j(v,r),n],null)},new $APP.H(null,2,5,$APP.I,[$APP.Me,c],null),f);c=$APP.B(f,0,null);f=$APP.B(f,1,null);var g=QN.i($APP.t(c)),k=QN.i($APP.Ec(c));return new $APP.H(null,2,5,$APP.I,[new $APP.K(null,6,[$APP.jr,e.id,zM,e,QN,(g+k)/2,RN,a,$APP.gi,b,$APP.cu,c],null),f],null)},XN=function XN(a){return $APP.Hf.j(new $APP.H(null,1,5,$APP.I,[$APP.bk.j(a,$APP.cu)],null),$APP.He(XN,$APP.Ac([$APP.cu.i(a)])))},
116
+ YN=function YN(a){var c=$APP.jr.i(a),d=QN.i(a),e=RN.i(a);return $APP.ff($APP.He(function(f){return $APP.Cd(new $APP.K(null,6,[Aoa,c,LN,d,MN,e,zoa,$APP.jr.i(f),NN,QN.i(f),ON,RN.i(f)],null),YN.i?YN.i(f):YN.call(null,f))},$APP.Ac([$APP.cu.i(a)])))};var XL=$APP.ye($APP.lg([PL,$APP.Al,bN,PM,$APP.lp,iN,vM,ZM,oN,XM,mN,OO,nN],[!1,5E3,$APP.fe,0,!1,$APP.Me,lN,$APP.fe,null,0,$APP.Me,0,0])),KM=$APP.ye(new $APP.K(null,3,[NM,0,$APP.Bl,!1,LM,$APP.fe],null)),YM=$APP.ye($APP.Me),gN=$APP.ye(null),eN=$APP.ye(!1),RM=$APP.ye(0),IM=$APP.ye([null,null]),xna=new $APP.Jg(null,new $APP.K(null,3,[$APP.ki,null,$APP.Xh,null,$APP.ii,null],null),null),yna=new $APP.Jg(null,new $APP.K(null,3,[$APP.yi,null,$APP.Ai,null,$APP.si,null],null),null),EO=function EO(a){switch(arguments.length){case 1:return EO.i(arguments[0]);
117
+ case 2:return EO.j(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",arguments.length].join(""));}};EO.i=function(a){return EO.j(a,null)};
118
+ EO.j=function(a,b){a=Fna(a);var c=$APP.G(a);a=$APP.C(c,$APP.Tq);c=$APP.C(c,$APP.mj);if($APP.m(c))return console.warn("[x-trace-history] import rejected:",c),null;c=performance.now();var d=OO.i($APP.ab(XL));b=b==null||$APP.z.j("",b)?"Import "+$APP.N.i(d):b;var e=new $APP.K(null,4,[$APP.jr,d,$APP.Z,b,yN,c,hN,a],null);$APP.oo.j(XL,function(f){return $APP.Rh.l($APP.Rh.J(f,iN,$APP.zd,e),OO,$APP.ic)});MM();return d};EO.M=2;var oO,PO=window.matchMedia;oO=$APP.m(PO)?PO.call(window,"(prefers-reduced-motion: reduce)"):null;var Hna=RegExp("\x26","g"),Ina=RegExp("\x3c","g"),Jna=RegExp("\x3e","g"),Kna=RegExp('"',"g"),Lna=RegExp("'","g"),hO=new WeakMap,loa=new $APP.Jg(null,new $APP.K(null,5,["x-select",null,"select",null,"input",null,"textarea",null,"x-checkbox",null],null),null),yoa=new $APP.K(null,5,[$APP.gj,!0,$APP.jj,[],$APP.hj,function(a){return woa(a)},$APP.ej,function(a){var b=$APP.l(a,"__xTraceHistorySubToken");$APP.m(b)&&$APP.oo.o(KM,$APP.Rh,LM,$APP.bk,$APP.Ac([b]));b=GM(a,CO);$APP.m(b)&&typeof b==="number"&&clearTimeout(b);
119
+ b=$APP.l(a,"__xTraceHistoryListeners");if($APP.m(b)){for(var c=b.length,d=0;;)if(d<c){var e=b[d];e[0].removeEventListener(e[1],e[2]);d+=1}else break;$APP.T(a,"__xTraceHistoryListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightListeners");if($APP.m(b)){c=b.length;for(d=0;;)if(d<c)e=b[d],e[0].removeEventListener(e[1],e[2],e[3]),d+=1;else break;$APP.mi(a,"__xTraceHistoryHighlightListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightRaf");$APP.m(b)&&(cancelAnimationFrame(b),$APP.mi(a,"__xTraceHistoryHighlightRaf",
120
+ null));b=$APP.l(a,"__xTraceHistoryHighlightLayer");$APP.m(b)&&$APP.Uk(b);$APP.mi(a,"__xTraceHistoryHighlightLayer",null);$APP.mi(a,"__xTraceHistoryHighlightBox",null);$APP.mi(a,"__xTraceHistoryHighlightCid",null);$APP.T(a,"__xTraceHistorySubToken",null);HM(a,CO,null);return $APP.T(a,"__xTraceHistoryMounted",null)},$APP.dj,function(){return null}],null);$APP.ea("baredom.exports.x_trace_history.init",NO);MO();export const init=NO;