railwatch 0.3.7 → 0.4.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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/{lib/generators/railwatch/install/templates → app/frontend/lib}/railwatch.ts +162 -42
  4. data/app/models/railwatch/ingest/batch.rb +1 -0
  5. data/app/models/railwatch/ingest/mapper.rb +12 -0
  6. data/lib/generators/railwatch/install/install_generator.rb +5 -1
  7. data/lib/railwatch/transport/http.rb +15 -5
  8. data/lib/railwatch/version.rb +1 -1
  9. data/lib/railwatch/wire_fixtures.json +856 -0
  10. data/lib/railwatch.rb +22 -0
  11. data/lib/tasks/railwatch_tasks.rake +7 -0
  12. data/public/railwatch/assets/{app-layout-B5Fcdwfz.js → app-layout-DUk54qUM.js} +1 -1
  13. data/public/railwatch/assets/{app-wordmark-1SRllgHv.js → app-wordmark-DDNuuq5_.js} +1 -1
  14. data/public/railwatch/assets/{appearance-DbwahDrc.js → appearance-C3LMdsDy.js} +1 -1
  15. data/public/railwatch/assets/{arrow-up-DwKQcab4.js → arrow-up-DYTCBENO.js} +1 -1
  16. data/public/railwatch/assets/{auth-layout-DXfxXAN_.js → auth-layout-CzPRawuI.js} +1 -1
  17. data/public/railwatch/assets/{badge-CApjyWcg.js → badge-s7YDycYg.js} +1 -1
  18. data/public/railwatch/assets/{braces-kGSgxWnS.js → braces-BFrg-bvp.js} +1 -1
  19. data/public/railwatch/assets/{card-BaJ8kNkp.js → card-DiW-JhK3.js} +1 -1
  20. data/public/railwatch/assets/{chart-hover-XYPNE2CX.js → chart-hover-DMWx5-Rs.js} +1 -1
  21. data/public/railwatch/assets/{chart-Xnrz1Nqw.js → chart-nsdZV0Dv.js} +1 -1
  22. data/public/railwatch/assets/{chart-panel-BYk68mJJ.js → chart-panel-BlirnMrQ.js} +1 -1
  23. data/public/railwatch/assets/{checkbox-Bf41R8W6.js → checkbox-C2AqEZXX.js} +1 -1
  24. data/public/railwatch/assets/{code-a-9sh36A.js → code-DVJtYP7h.js} +1 -1
  25. data/public/railwatch/assets/{copy-block-zykZWQym.js → copy-block-D1myf7is.js} +1 -1
  26. data/public/railwatch/assets/{copy-id-b6CW5ESL.js → copy-id-CyRCMfdH.js} +1 -1
  27. data/public/railwatch/assets/{cursor-load-more-0cHzbTPT.js → cursor-load-more-JfSVBn9C.js} +1 -1
  28. data/public/railwatch/assets/{data-table-IvA7xvrK.js → data-table-CwtPkw_i.js} +1 -1
  29. data/public/railwatch/assets/{edit-7lmf3k80.js → edit-BvTugIpj.js} +1 -1
  30. data/public/railwatch/assets/{edit-ZKE15r-F.js → edit-DvpDUM-t.js} +1 -1
  31. data/public/railwatch/assets/{edit-DTtRV1fO.js → edit-fB83T9Yh.js} +1 -1
  32. data/public/railwatch/assets/{empty-state-BFTnQ2oT.js → empty-state-CshhuRUU.js} +1 -1
  33. data/public/railwatch/assets/{env-layout-erSDpIXg.js → env-layout-Dkp_4NvM.js} +1 -1
  34. data/public/railwatch/assets/{execution-path-Di5uUHi-.js → execution-path-CdEerUGH.js} +1 -1
  35. data/public/railwatch/assets/{filter-bar-Btm__gQi.js → filter-bar-BMHf8xBb.js} +1 -1
  36. data/public/railwatch/assets/{flamegraph-C-mZdqa7.js → flamegraph-uYWk1Yov.js} +1 -1
  37. data/public/railwatch/assets/{frames-KZBsjg6-.js → frames-B5ZECkvt.js} +1 -1
  38. data/public/railwatch/assets/{google-sign-in-button-DJRoD72g.js → google-sign-in-button-CAvsXYb4.js} +1 -1
  39. data/public/railwatch/assets/{index-CeqMDByC.js → index-1-78ZewP.js} +1 -1
  40. data/public/railwatch/assets/{index-P_e_cI0O.js → index-B-qRsj0W.js} +1 -1
  41. data/public/railwatch/assets/{index-kNhZPLVj.js → index-B4IRsZXK.js} +1 -1
  42. data/public/railwatch/assets/{index-QyHE9WsU.js → index-BIZsdfdM.js} +1 -1
  43. data/public/railwatch/assets/{index-EGU__DOB.js → index-BIom4V2g.js} +1 -1
  44. data/public/railwatch/assets/{index-Bot7kHMA.js → index-BMgA9NNc.js} +1 -1
  45. data/public/railwatch/assets/{index-CX8Br7m9.js → index-BpnfuXi-.js} +1 -1
  46. data/public/railwatch/assets/{index-D4968-TC.js → index-Bw_ByIps.js} +1 -1
  47. data/public/railwatch/assets/{index-CU6yhEyt.js → index-C7bU7oUF.js} +1 -1
  48. data/public/railwatch/assets/{index-Z1c4nFL0.js → index-CAkCcAty.js} +1 -1
  49. data/public/railwatch/assets/{index-B-bSm1jB.js → index-CRShH-fR.js} +1 -1
  50. data/public/railwatch/assets/{index-DBTxQw77.js → index-CZWzIE8F.js} +1 -1
  51. data/public/railwatch/assets/{index-Cj3_jD1E.js → index-CaJvo0Oc.js} +1 -1
  52. data/public/railwatch/assets/{index-HCJmFcZu.js → index-CdM3F3jz.js} +1 -1
  53. data/public/railwatch/assets/{index-DcItJxa5.js → index-ClG89uia.js} +1 -1
  54. data/public/railwatch/assets/{index-CAzQkw-h.js → index-ClJtZh5Q.js} +1 -1
  55. data/public/railwatch/assets/{index-Bjw4sTXU.js → index-Czq2bi1U.js} +1 -1
  56. data/public/railwatch/assets/{index-CP6jrrPT.js → index-D-O1LUPq.js} +1 -1
  57. data/public/railwatch/assets/{index-CYYmZpZu.js → index-DJIXGkfB.js} +1 -1
  58. data/public/railwatch/assets/{index-BAkZNNEh.js → index-DMcsT2ES.js} +1 -1
  59. data/public/railwatch/assets/{index-wOj5j0KC.js → index-DVUwgfqP.js} +1 -1
  60. data/public/railwatch/assets/{index-DAEzO_vq.js → index-DWMKU6mG.js} +1 -1
  61. data/public/railwatch/assets/{index-BWSyQRZI.js → index-DYrF-A96.js} +1 -1
  62. data/public/railwatch/assets/{index-BsrCnQqg.js → index-DcuyMiuG.js} +1 -1
  63. data/public/railwatch/assets/{index-BoTOVM0v.js → index-DpWQMikK.js} +1 -1
  64. data/public/railwatch/assets/{index-CIUl9POV.js → index-DuGGTdIJ.js} +1 -1
  65. data/public/railwatch/assets/{index-uHBVO8Lh.js → index-DzoUj38Q.js} +1 -1
  66. data/public/railwatch/assets/{index-CBJZQgHA.js → index-QxAKxnHK.js} +1 -1
  67. data/public/railwatch/assets/{index-9LL_C3eG.js → index-X13K9BbO.js} +1 -1
  68. data/public/railwatch/assets/{index-DEfu_YvU.js → index-Zf9xXwq7.js} +1 -1
  69. data/public/railwatch/assets/{index-Bo8hrjbs.js → index-dKn1tKSX.js} +1 -1
  70. data/public/railwatch/assets/{index-DCAho97K.js → index-fA7h22qS.js} +1 -1
  71. data/public/railwatch/assets/{index-BtSlLmkg.js → index-iVNm3uzI.js} +1 -1
  72. data/public/railwatch/assets/{index-B0VXzXYG.js → index-n16aviHx.js} +1 -1
  73. data/public/railwatch/assets/{index-DXUwhSCQ.js → index-vC9KU2bt.js} +1 -1
  74. data/public/railwatch/assets/{inertia-Degv_G9N.js → inertia-CUTKXjxg.js} +3 -3
  75. data/public/railwatch/assets/{input-error-C6SqO_iU.js → input-error-C8ycyeD0.js} +1 -1
  76. data/public/railwatch/assets/{json-viewer-DcQIxT86.js → json-viewer-CJECqZ0l.js} +1 -1
  77. data/public/railwatch/assets/{klass-WgQEfWpo.js → klass-Br9dng39.js} +1 -1
  78. data/public/railwatch/assets/{label-B_vK19tR.js → label-B32Ks8n7.js} +1 -1
  79. data/public/railwatch/assets/{layout-C8q7GUlZ.js → layout-5ZhRtywp.js} +1 -1
  80. data/public/railwatch/assets/{live-dot-DaXEbkXo.js → live-dot-Bb1UYT9F.js} +1 -1
  81. data/public/railwatch/assets/{nav-BnD5XArZ.js → nav-XUcwnBso.js} +1 -1
  82. data/public/railwatch/assets/{new-BL9OqXHe.js → new-0xyEF6NL.js} +1 -1
  83. data/public/railwatch/assets/{new-DIjwu2jF.js → new-CV011uLi.js} +1 -1
  84. data/public/railwatch/assets/{new-BqP0NhOF.js → new-CdvlEBjJ.js} +1 -1
  85. data/public/railwatch/assets/{new-BhRnQn4w.js → new-D9-ORiNW.js} +1 -1
  86. data/public/railwatch/assets/{new-uxMnBtoY.js → new-GIkDYLt8.js} +1 -1
  87. data/public/railwatch/assets/{new-CWP3wtwt.js → new-YBWOo9_V.js} +1 -1
  88. data/public/railwatch/assets/{onboarding-C_Y3xTsH.js → onboarding-BqEuP-Ml.js} +1 -1
  89. data/public/railwatch/assets/{origin-identity-CNhOnfBa.js → origin-identity-DrJ4D2TX.js} +1 -1
  90. data/public/railwatch/assets/{percentile-picker-BujVEhP6.js → percentile-picker-_wllqYoJ.js} +1 -1
  91. data/public/railwatch/assets/{relative-time-6CoKr1lN.js → relative-time-CV7V8aSP.js} +1 -1
  92. data/public/railwatch/assets/{release-health-1Qzc_XhT.js → release-health-DRNLZtT7.js} +1 -1
  93. data/public/railwatch/assets/{route-xqgYjOwJ.js → route-D9slUz_a.js} +1 -1
  94. data/public/railwatch/assets/{segmented-CVKq2Xpa.js → segmented-Bj70Htrs.js} +1 -1
  95. data/public/railwatch/assets/{select-CsmSXsJ4.js → select-DJBZX2ky.js} +1 -1
  96. data/public/railwatch/assets/{separator-CrM10Oot.js → separator-UUo0bkyc.js} +1 -1
  97. data/public/railwatch/assets/{series-chart-D33UhdG2.js → series-chart-C1YrNlID.js} +1 -1
  98. data/public/railwatch/assets/{show-zxVxhUel.js → show-BQtEcTeD.js} +1 -1
  99. data/public/railwatch/assets/{show-B0nHy31L.js → show-BT3tKCgP.js} +1 -1
  100. data/public/railwatch/assets/{show-DZwcZZrz.js → show-BoG7jcwk.js} +1 -1
  101. data/public/railwatch/assets/{show-ixK2r2f1.js → show-BpyCRL-I.js} +1 -1
  102. data/public/railwatch/assets/{show-rysBbvt-.js → show-C0uC3gnA.js} +1 -1
  103. data/public/railwatch/assets/{show-B3izvRdU.js → show-COfP8yWt.js} +1 -1
  104. data/public/railwatch/assets/{show-B7NhcWgp.js → show-CefJwag7.js} +1 -1
  105. data/public/railwatch/assets/{show-8H9WAGav.js → show-ChDJZjoj.js} +1 -1
  106. data/public/railwatch/assets/{show-CJMeX75E.js → show-D7IL22Hy.js} +1 -1
  107. data/public/railwatch/assets/{show-DUwQlohF.js → show-D7tP881O.js} +1 -1
  108. data/public/railwatch/assets/{show-BM-E2iYc.js → show-DR6u4CR7.js} +1 -1
  109. data/public/railwatch/assets/{show-CMisHNAI.js → show-DnBCvlnd.js} +1 -1
  110. data/public/railwatch/assets/{show-BlNR3ZOZ.js → show-DoCg0ifP.js} +1 -1
  111. data/public/railwatch/assets/{show-9jDeBNpc.js → show-GruxlCov.js} +1 -1
  112. data/public/railwatch/assets/{show-CvNV23gH.js → show-Pu3Iehw5.js} +1 -1
  113. data/public/railwatch/assets/{show-DMZlwzL_.js → show-TTCk2Met.js} +1 -1
  114. data/public/railwatch/assets/{show-CQ4Ze-Un.js → show-yQipmite.js} +1 -1
  115. data/public/railwatch/assets/{sort-header-CKj_7G3U.js → sort-header-CqQQhaxg.js} +1 -1
  116. data/public/railwatch/assets/{sparkline-cell-Ckg29yVq.js → sparkline-cell-BwdBz0yv.js} +1 -1
  117. data/public/railwatch/assets/{stat-TxvoBiC8.js → stat-IghK3WjD.js} +1 -1
  118. data/public/railwatch/assets/{status-badge-5NCVJHjo.js → status-badge-XYUN9gUA.js} +1 -1
  119. data/public/railwatch/assets/{tenant-path-B5ZRK4x3.js → tenant-path-SxnZbfU1.js} +1 -1
  120. data/public/railwatch/assets/{text-link-BPllRj0F.js → text-link-NCL9N5D5.js} +1 -1
  121. data/public/railwatch/assets/{textarea-DtD5yZp_.js → textarea-DhI1dmQa.js} +1 -1
  122. data/public/railwatch/assets/{timeline-DZz5ZnHN.js → timeline-CLAwsAlo.js} +1 -1
  123. data/public/railwatch/assets/{transition-Ds6Cakuc.js → transition-DpTb9Yiv.js} +1 -1
  124. data/public/railwatch/assets/{use-clipboard-BLjjYH8V.js → use-clipboard-D5i6e5kf.js} +1 -1
  125. data/public/railwatch/assets/{use-live-GKze1mNC.js → use-live-V-slSdFJ.js} +1 -1
  126. data/public/railwatch/manifest.json +1287 -1287
  127. metadata +117 -116
@@ -1 +1 @@
1
- import{a4 as te,r as s,c as B,j as A}from"./inertia-Degv_G9N.js";import{u as Be}from"./chart-hover-XYPNE2CX.js";import{i as K,e as Ve,s as ae,D as re,f as ye,g as Nt,Z as ne,L as R,u as xe,h as Ct,j as _t,k as Y,l as Ge,m as $,n as X,o as Mt,p as ie,q as oe,r as Xe,t as ge,v as H,w as Ye,x as be,y as le,z as He,S as Ue,A as qe,E as se,F as Ze,G as Je,H as Qe,I as et,J as tt,K as at,M as Tt,N as U,O as q,P as rt,Q as nt,T as _,U as it,V as ot,W as lt,_ as Kt,$ as Wt,a0 as Rt,a1 as Pe,a2 as Ae,a3 as $t,a4 as zt,a5 as Ft,a6 as Bt,a7 as Vt,a8 as Gt,a9 as ue,aa as Z,ab as st,ac as ct,R as Xt,C as Ie,X as Ee,Y as ke,a as je,b as Oe,c as ce,B as de,d as Yt}from"./chart-Xnrz1Nqw.js";import{m as ut}from"./format-B9SDkrWj.js";function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},fe.apply(null,arguments)}var dt=t=>{var{cx:e,cy:a,r,className:n}=t,o=te("recharts-dot",n);return K(e)&&K(a)&&K(r)?s.createElement("circle",fe({},ae(t),Ve(t),{className:o,cx:e,cy:a,r})):null},Ht=["points"];function Ke(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function pe(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(a),!0).forEach(function(r){Ut(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ke(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Ut(t,e,a){return(e=qt(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function qt(t){var e=Zt(t,"string");return typeof e=="symbol"?e:e+""}function Zt(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},J.apply(null,arguments)}function Jt(t,e){if(t==null)return{};var a,r,n=Qt(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Qt(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ea(t){var{option:e,dotProps:a,className:r}=t;if(s.isValidElement(e))return s.cloneElement(e,a);if(typeof e=="function")return e(a);var n=te(r,typeof e!="boolean"?e.className:""),o=a??{},{points:l}=o,i=Jt(o,Ht);return s.createElement(dt,J({},i,{className:n}))}function ta(t,e){return t==null?!1:e?!0:t.length===1}function pt(t){var{points:e,dot:a,className:r,dotClassName:n,dataKey:o,baseProps:l,needClip:i,clipPathId:c,zIndex:u=re.scatter}=t;if(!ta(e,a))return null;var d=ye(a),p=Nt(a),f=e.map((m,h)=>{var g,b,y=pe(pe(pe({r:3},l),p),{},{index:h,cx:(g=m.x)!==null&&g!==void 0?g:void 0,cy:(b=m.y)!==null&&b!==void 0?b:void 0,dataKey:o,value:m.value,payload:m.payload,points:e});return s.createElement(ea,{key:"dot-".concat(h),option:a,dotProps:y,className:n})}),v={};return i&&c!=null&&(v.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),s.createElement(ne,{zIndex:u},s.createElement(R,J({className:r},v),f))}function We(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function ve(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?We(Object(a),!0).forEach(function(r){aa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function aa(t,e,a){return(e=ra(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ra(t){var e=na(t,"string");return typeof e=="symbol"?e:e+""}function na(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ia=t=>{var{point:e,childIndex:a,mainColor:r,activeDot:n,dataKey:o,clipPath:l}=t;if(n===!1||e.x==null||e.y==null)return null;var i={index:a,dataKey:o,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},c=ve(ve(ve({},i),Ge(n)),Ve(n)),u;return s.isValidElement(n)?u=s.cloneElement(n,c):typeof n=="function"?u=n(c):u=s.createElement(dt,c),s.createElement(R,{className:"recharts-active-dot",clipPath:l},u)};function me(t){var{points:e,mainColor:a,activeDot:r,itemDataKey:n,clipPath:o,zIndex:l=re.activeDot}=t,i=xe(Ct),c=_t();if(e==null||c==null)return null;var u=e.find(d=>c.includes(d.payload));return Y(u)?null:s.createElement(ne,{zIndex:l},s.createElement(ia,{point:u,childIndex:Number(i),mainColor:a,dataKey:n,activeDot:r,clipPath:o}))}var vt=(t,e,a,r)=>ie(t,"xAxis",e,r),ft=(t,e,a,r)=>oe(t,"xAxis",e,r),mt=(t,e,a,r)=>ie(t,"yAxis",a,r),ht=(t,e,a,r)=>oe(t,"yAxis",a,r),oa=$([X,vt,mt,ft,ht],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),la=(t,e,a,r,n)=>n;function sa(t){return t.type==="line"}var ca=$([Xe,la],(t,e)=>t.filter(sa).find(a=>a.id===e)),ua=$([X,vt,mt,ft,ht,ca,oa,Mt],(t,e,a,r,n,o,l,i)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=i;if(!(o==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||l==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:p,data:f}=o,v;if(f!=null&&f.length>0?v=f:v=c?.slice(u,d+1),v!=null)return La({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:p,bandSize:l,displayedData:v})}});function yt(t){var e=Ge(t),a=3,r=2;if(e!=null){var{r:n,strokeWidth:o}=e,l=Number(n),i=Number(o);return(Number.isNaN(l)||l<0)&&(l=a),(Number.isNaN(i)||i<0)&&(i=r),{r:l,strokeWidth:i}}return{r:a,strokeWidth:r}}var da=["id"],pa=["type","layout","connectNulls","needClip","shape"],va=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},V.apply(null,arguments)}function Re(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function M(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(a),!0).forEach(function(r){fa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Re(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function fa(t,e,a){return(e=ma(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ma(t){var e=ha(t,"string");return typeof e=="symbol"?e:e+""}function ha(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Se(t,e){if(t==null)return{};var a,r,n=ya(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ya(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var xa=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:o}=t;return[{inactive:o,dataKey:e,type:n,color:r,value:se(a,e),payload:t}]},ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:r,unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})}),xt=(t,e)=>"".concat(e,"px ").concat(t,"px");function ba(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var Pa=(t,e,a)=>{var r=a.reduce((f,v)=>f+v,0);if(!r)return xt(e,t);for(var n=Math.floor(t/r),o=t%r,l=[],i=0,c=0;i<a.length;c+=(u=a[i])!==null&&u!==void 0?u:0,++i){var u,d=a[i];if(d!=null&&c+d>o){l=[...a.slice(0,i),o-c];break}}var p=l.length%2===0?[0,e]:[e];return[...ba(a,n),...l,...p].map(f=>"".concat(f,"px")).join(", ")};function Aa(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:o,needClip:l}=r,{id:i}=r,c=Se(r,da),u=ae(c);return s.createElement(pt,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:u,needClip:l,clipPathId:e})}function Ia(t){var{showLabels:e,children:a,points:r}=t,n=s.useMemo(()=>r?.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return M(M({},c),{},{value:o.value,payload:o.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return s.createElement(ot,{value:e?n:void 0},a)}function $e(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:o}=t,{type:l,layout:i,connectNulls:c,needClip:u,shape:d}=o,p=Se(o,pa),f=M(M({},lt(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):void 0,points:r,type:l,layout:i,connectNulls:c,strokeDasharray:n??o.strokeDasharray});return s.createElement(s.Fragment,null,r?.length>1&&s.createElement(Kt,V({shapeType:"curve",option:d},f,{pathRef:a})),s.createElement(Aa,{points:r,clipPathId:e,props:o}))}function Ea(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function ka(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:o}=t,{points:l,strokeDasharray:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,animateNewValues:f,width:v,height:m,onAnimationEnd:h,onAnimationStart:g}=a,b=n.current,y=rt(l,"recharts-line-"),P=s.useRef(y),[x,I]=s.useState(!1),E=!x,k=s.useCallback(()=>{typeof h=="function"&&h(),I(!1)},[h]),j=s.useCallback(()=>{typeof g=="function"&&g(),I(!0)},[g]),O=Ea(r.current),w=s.useRef(0);P.current!==y&&(w.current=o.current,P.current=y);var L=w.current;return s.createElement(Ia,{points:l,showLabels:E},a.children,s.createElement(nt,{animationId:y,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:k,onAnimationStart:j,key:y},S=>{var D=_(L,O+L,S),T=Math.min(D,O),N;if(c)if(i){var wt="".concat(i).split(/[,\s]+/gim).map(C=>parseFloat(C));N=Pa(T,O,wt)}else N=xt(O,T);else N=i==null?void 0:String(i);if(S>0&&O>0&&(n.current=l,o.current=Math.max(o.current,T)),b){var Lt=b.length/l.length,_e=S===1?l:l.map((C,Dt)=>{var Me=Math.floor(Dt*Lt);if(b[Me]){var Te=b[Me];return M(M({},C),{},{x:_(Te.x,C.x,S),y:_(Te.y,C.y,S)})}return f?M(M({},C),{},{x:_(v*2,C.x,S),y:_(m/2,C.y,S)}):M(M({},C),{},{x:C.x,y:C.y})});return n.current=_e,s.createElement($e,{props:a,points:_e,clipPathId:e,pathRef:r,strokeDasharray:N})}return s.createElement($e,{props:a,points:l,clipPathId:e,pathRef:r,strokeDasharray:N})}),s.createElement(it,{label:a.label}))}function ja(t){var{clipPathId:e,props:a}=t,r=s.useRef(null),n=s.useRef(0),o=s.useRef(null);return s.createElement(ka,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:o})}var Oa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:U(t.payload,e)}};class Sa extends s.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:o,yAxisId:l,top:i,left:c,width:u,height:d,id:p,needClip:f,zIndex:v}=this.props;if(e)return null;var m=te("recharts-line",n),h=p,{r:g,strokeWidth:b}=yt(a),y=ye(a),P=g*2+b,x=f?"url(#clipPath-".concat(y?"":"dots-").concat(h,")"):void 0;return s.createElement(ne,{zIndex:v},s.createElement(R,{className:m},f&&s.createElement("defs",null,s.createElement(at,{clipPathId:h,xAxisId:o,yAxisId:l}),!y&&s.createElement("clipPath",{id:"clipPath-dots-".concat(h)},s.createElement("rect",{x:c-P/2,y:i-P/2,width:u+P,height:d+P}))),s.createElement(Tt,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:Oa,errorBarOffset:0},s.createElement(ja,{props:this.props,clipPathId:h}))),s.createElement(me,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:re.line,type:"linear"};function wa(t){var e=be(t,gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,connectNulls:i,dot:c,hide:u,isAnimationActive:d,label:p,legendType:f,xAxisId:v,yAxisId:m,id:h}=e,g=Se(e,va),{needClip:b}=Qe(v,m),y=et(),P=tt(),x=le(),I=xe(w=>ua(w,v,m,x,h));if(P!=="horizontal"&&P!=="vertical"||I==null||y==null)return null;var{height:E,width:k,x:j,y:O}=y;return s.createElement(Sa,V({},g,{id:h,connectNulls:i,dot:c,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,isAnimationActive:d,hide:u,label:p,legendType:f,xAxisId:v,yAxisId:m,points:I,layout:P,height:E,width:k,left:j,top:O,needClip:b}))}function La(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:l,bandSize:i,displayedData:c}=t;return c.map((u,d)=>{var p=U(u,l);if(e==="horizontal"){var f=q({axis:a,ticks:n,bandSize:i,entry:u,index:d}),v=Y(p)?null:r.scale.map(p);return{x:f,y:v??null,value:p,payload:u}}var m=Y(p)?null:a.scale.map(p),h=q({axis:r,ticks:o,bandSize:i,entry:u,index:d});return m==null||h==null?null:{x:m,y:h,value:p,payload:u}}).filter(Boolean)}function Da(t){var e=be(t,gt),a=le();return s.createElement(He,{id:e.id,type:"line"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:xa(e)}),s.createElement(ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),s.createElement(wa,V({},e,{id:r}))))}var he=s.memo(Da,Ye);he.displayName="Line";var bt=(t,e,a)=>ie(t,"xAxis",Pe(t,e),a),Pt=(t,e,a)=>oe(t,"xAxis",Pe(t,e),a),At=(t,e,a)=>ie(t,"yAxis",Ae(t,e),a),It=(t,e,a)=>oe(t,"yAxis",Ae(t,e),a),Na=$([X,bt,At,Pt,It],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),Ca=(t,e)=>e,Et=$([Xe,Ca],(t,e)=>t.filter(a=>a.type==="area").find(a=>a.id===e)),kt=t=>{var e=X(t),a=ge(e,"xAxis");return a?"yAxis":"xAxis"},_a=(t,e)=>{var a=kt(t);return a==="yAxis"?Ae(t,e):Pe(t,e)},Ma=(t,e,a)=>zt(t,kt(t),_a(t,e),a),Ta=$([Et,Ma],(t,e)=>{var a;if(!(t==null||e==null)){var{stackId:r}=t,n=$t(t);if(!(r==null||n==null)){var o=(a=e[r])===null||a===void 0?void 0:a.stackedData,l=o?.find(i=>i.key===n);if(l!=null)return l.map(i=>[i[0],i[1]])}}}),Ka=$([X,bt,At,Pt,It,Ta,Wt,Na,Et,Rt],(t,e,a,r,n,o,l,i,c,u)=>{var{chartData:d,dataStartIndex:p,dataEndIndex:f}=l;if(!(c==null||t!=="horizontal"&&t!=="vertical"||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null)){var{data:v}=c,m;if(v&&v.length>0?m=v:m=d?.slice(p,f+1),m!=null)return rr({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataStartIndex:p,areaSettings:c,stackedData:o,displayedData:m,chartBaseValue:u,bandSize:i})}}),Wa=["id"],Ra=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function W(){return W=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},W.apply(null,arguments)}function jt(t,e){if(t==null)return{};var a,r,n=$a(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function $a(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ze(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function z(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(a),!0).forEach(function(r){za(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ze(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function za(t,e,a){return(e=Fa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Fa(t){var e=Ba(t,"string");return typeof e=="symbol"?e:e+""}function Ba(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Q(t,e){return t&&t!=="none"?t:e}var Va=t=>{var{dataKey:e,name:a,stroke:r,fill:n,legendType:o,hide:l}=t;return[{inactive:l,dataKey:e,type:o,color:Q(r,n),value:se(a,e),payload:t}]},Ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:Q(r,o),unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})});function Xa(t){var{clipPathId:e,points:a,props:r}=t,{needClip:n,dot:o,dataKey:l}=r,i=ae(r);return s.createElement(pt,{points:a,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:i,needClip:n,clipPathId:e})}function Ya(t){var{showLabels:e,children:a,points:r}=t,n=r.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return z(z({},c),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return s.createElement(ot,{value:e?n:void 0},a)}function Fe(t){var{points:e,baseLine:a,needClip:r,clipPathId:n,props:o}=t,{layout:l,type:i,stroke:c,connectNulls:u,isRange:d}=o,{id:p}=o,f=jt(o,Wa),v=ae(f),m=lt(f);return s.createElement(s.Fragment,null,e?.length>1&&s.createElement(R,{clipPath:r?"url(#clipPath-".concat(n,")"):void 0},s.createElement(ue,W({},m,{id:p,points:e,connectNulls:u,type:i,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:e})),c!=="none"&&d&&Array.isArray(a)&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:a}))),s.createElement(Xa,{points:e,props:f,clipPathId:n}))}function Ha(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.y,c=(a=o[o.length-1])===null||a===void 0?void 0:a.y;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.x||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.x||0),d)),K(d)?s.createElement("rect",{x:0,y:i<c?i:i-u,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(u)}):null}function Ua(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.x,c=(a=o[o.length-1])===null||a===void 0?void 0:a.x;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.y||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.y||0),d)),K(d)?s.createElement("rect",{x:i<c?i:i-u,y:0,width:u,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}function qa(t){var{alpha:e,layout:a,points:r,baseLine:n,strokeWidth:o}=t;return a==="vertical"?s.createElement(Ha,{alpha:e,points:r,baseLine:n,strokeWidth:o}):s.createElement(Ua,{alpha:e,points:r,baseLine:n,strokeWidth:o})}function Za(t){var{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o}=t,{points:l,baseLine:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,onAnimationStart:f,onAnimationEnd:v}=r,m=s.useMemo(()=>({points:l,baseLine:i}),[l,i]),h=rt(m,"recharts-area-"),g=Vt(),[b,y]=s.useState(!1),P=!b,x=s.useCallback(()=>{typeof v=="function"&&v(),y(!1)},[v]),I=s.useCallback(()=>{typeof f=="function"&&f(),y(!0)},[f]);if(g==null)return null;var E=n.current,k=o.current;return s.createElement(Ya,{showLabels:P,points:l},r.children,s.createElement(nt,{animationId:h,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:x,onAnimationStart:I,key:h},j=>{if(E){var O=E.length/l.length,w=j===1?l:l.map((S,D)=>{var T=Math.floor(D*O);if(E[T]){var N=E[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),L;return K(i)?L=_(k,i,j):Y(i)||Gt(i)?L=_(k,0,j):L=i.map((S,D)=>{var T=Math.floor(D*O);if(Array.isArray(k)&&k[T]){var N=k[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),j>0&&(n.current=w,o.current=L),s.createElement(Fe,{points:w,baseLine:L,needClip:e,clipPathId:a,props:r})}return j>0&&(n.current=l,o.current=i),s.createElement(R,null,c&&s.createElement("defs",null,s.createElement("clipPath",{id:"animationClipPath-".concat(a)},s.createElement(qa,{alpha:j,points:l,baseLine:i,layout:g,strokeWidth:r.strokeWidth}))),s.createElement(R,{clipPath:"url(#animationClipPath-".concat(a,")")},s.createElement(Fe,{points:l,baseLine:i,needClip:e,clipPathId:a,props:r})))}),s.createElement(it,{label:r.label}))}function Ja(t){var{needClip:e,clipPathId:a,props:r}=t,n=s.useRef(null),o=s.useRef();return s.createElement(Za,{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o})}class Qa extends s.PureComponent{render(){var{hide:e,dot:a,points:r,className:n,top:o,left:l,needClip:i,xAxisId:c,yAxisId:u,width:d,height:p,id:f,baseLine:v,zIndex:m}=this.props;if(e)return null;var h=te("recharts-area",n),g=f,{r:b,strokeWidth:y}=yt(a),P=ye(a),x=b*2+y,I=i?"url(#clipPath-".concat(P?"":"dots-").concat(g,")"):void 0;return s.createElement(ne,{zIndex:m},s.createElement(R,{className:h},i&&s.createElement("defs",null,s.createElement(at,{clipPathId:g,xAxisId:c,yAxisId:u}),!P&&s.createElement("clipPath",{id:"clipPath-dots-".concat(g)},s.createElement("rect",{x:l-x/2,y:o-x/2,width:d+x,height:p+x}))),s.createElement(Ja,{needClip:i,clipPathId:g,props:this.props})),s.createElement(me,{points:r,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(v)&&s.createElement(me,{points:v,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}var er={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:re.area};function tr(t){var e,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,connectNulls:l,dot:i,fill:c,fillOpacity:u,hide:d,isAnimationActive:p,legendType:f,stroke:v,xAxisId:m,yAxisId:h}=t,g=jt(t,Ra),b=tt(),y=Bt(),{needClip:P}=Qe(m,h),x=le(),{points:I,isRange:E,baseLine:k}=(e=xe(D=>Ka(D,t.id,x)))!==null&&e!==void 0?e:{},j=et();if(b!=="horizontal"&&b!=="vertical"||j==null||y!=="AreaChart"&&y!=="ComposedChart")return null;var{height:O,width:w,x:L,y:S}=j;return!I||!I.length?null:s.createElement(Qa,W({},g,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,baseLine:k,connectNulls:l,dot:i,fill:c,fillOpacity:u,height:O,hide:d,layout:b,isAnimationActive:p,isRange:E,legendType:f,needClip:P,points:I,stroke:v,width:w,left:L,top:S,xAxisId:m,yAxisId:h}))}var ar=(t,e,a,r,n)=>{var o=a??e;if(K(o))return o;var l=t==="horizontal"?n:r,i=l.scale.domain();if(l.type==="number"){var c=Math.max(i[0],i[1]),u=Math.min(i[0],i[1]);return o==="dataMin"?u:o==="dataMax"||c<0?c:Math.max(Math.min(i[0],i[1]),0)}return o==="dataMin"?i[0]:o==="dataMax"?i[1]:i[0]};function rr(t){var{areaSettings:{connectNulls:e,baseValue:a,dataKey:r},stackedData:n,layout:o,chartBaseValue:l,xAxis:i,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:p,yAxisTicks:f,bandSize:v}=t,m=n&&n.length,h=ar(o,l,a,i,c),g=o==="horizontal",b=!1,y=u.map((x,I)=>{var E,k,j,O;if(m)O=n[d+I];else{var w=U(x,r);Array.isArray(w)?(O=w,b=!0):O=[h,w]}var L=(E=(k=O)===null||k===void 0?void 0:k[1])!==null&&E!==void 0?E:null,S=L==null||m&&!e&&U(x,r)==null;if(g){var D;return{x:q({axis:i,ticks:p,bandSize:v,entry:x,index:I}),y:S?null:(D=c.scale.map(L))!==null&&D!==void 0?D:null,value:O,payload:x}}return{x:S?null:(j=i.scale.map(L))!==null&&j!==void 0?j:null,y:q({axis:c,ticks:f,bandSize:v,entry:x,index:I}),value:O,payload:x}}),P;return m||b?P=y.map(x=>{var I,E=Array.isArray(x.value)?x.value[0]:null;if(g){var k;return{x:x.x,y:E!=null&&x.y!=null&&(k=c.scale.map(E))!==null&&k!==void 0?k:null,payload:x.payload}}return{x:E!=null&&(I=i.scale.map(E))!==null&&I!==void 0?I:null,y:x.y,payload:x.payload}}):P=g?c.scale.map(h):i.scale.map(h),{points:y,baseLine:P??0,isRange:b}}function nr(t){var e=be(t,er),a=le();return s.createElement(He,{id:e.id,type:"area"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:Va(e)}),s.createElement(Ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"area",id:r,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Ft(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:a,connectNulls:e.connectNulls}),s.createElement(tr,W({},e,{id:r}))))}var we=s.memo(nr,Ye);we.displayName="Area";var ir=["axis"],or=s.forwardRef((t,e)=>s.createElement(st,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ir,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e})),lr=["axis"],Ot=s.forwardRef((t,e)=>s.createElement(st,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lr,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e}));const ee={count:{label:"OK",color:"var(--ok)"},errors:{label:"5xx",color:"var(--danger)"},client_errors:{label:"4xx",color:"var(--warning)"},p50:{label:"p50",color:"var(--primary)"},p95:{label:"p95",color:"var(--primary)"},p99:{label:"p99",color:"var(--primary)"},avg:{label:"avg",color:"var(--warning)"}};function Le(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function G(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}const F={fontSize:10,fontFamily:"var(--font-mono)"};function De(t=[]){return t.map(e=>A.jsx(Xt,{x:new Date(e.at).toISOString(),stroke:"var(--primary)",strokeDasharray:"3 3",label:{value:e.ref,position:"insideTopRight",fontSize:9,fill:"var(--primary)",fontFamily:"var(--font-mono)"}},e.deploy))}function Ne(){const t=B.c(2),{setHoveredKey:e}=Be();let a;return t[0]!==e?(a={onMouseMove:r=>{typeof r?.activeLabel=="string"&&e(r.activeLabel)},onMouseLeave:()=>e(null)},t[0]=e,t[1]=a):a=t[1],a}function Ce(t){const e=B.c(11),{data:a}=t;if(a.length===0)return null;let r;e[0]!==a[0].t?(r=G(a[0].t),e[0]=a[0].t,e[1]=r):r=e[1];let n;e[2]!==r?(n=A.jsx("span",{children:r}),e[2]=r,e[3]=n):n=e[3];const o=a[a.length-1];let l;e[4]!==o.t?(l=G(o.t),e[4]=o.t,e[5]=l):l=e[5];let i;e[6]!==l?(i=A.jsx("span",{children:l}),e[6]=l,e[7]=i):i=e[7];let c;return e[8]!==n||e[9]!==i?(c=A.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[n,i]}),e[8]=n,e[9]=i,e[10]=c):c=e[10],c}function kr(t){const e=B.c(27),{data:a,deploys:r,label:n,className:o}=t,l=n===void 0?"Requests":n,i=o===void 0?"h-40":o;let c;e[0]!==l?(c={...ee,count:{...ee.count,label:l}},e[0]=l,e[1]=c):c=e[1];const u=c,d=Ne(),p=`${i} w-full`;let f;e[2]!==a?(f=a.map(ur),e[2]=a,e[3]=f):f=e[3];const v=d.onMouseMove,m=d.onMouseLeave;let h,g,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),b=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:cr}),e[4]=h,e[5]=g,e[6]=b):(h=e[4],g=e[5],b=e[6]);let y,P,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:sr})}),P=A.jsx(de,{dataKey:"ok",name:"count",fill:"var(--color-count)",stackId:"a"}),x=A.jsx(de,{dataKey:"client_errors",fill:"var(--color-client_errors)",stackId:"a"}),e[7]=y,e[8]=P,e[9]=x):(y=e[7],P=e[8],x=e[9]);let I;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=A.jsx(de,{dataKey:"errors",fill:"var(--color-errors)",stackId:"a",radius:[2,2,0,0]}),e[10]=I):I=e[10];let E;e[11]!==r?(E=De(r),e[11]=r,e[12]=E):E=e[12];let k;e[13]!==d.onMouseLeave||e[14]!==d.onMouseMove||e[15]!==E||e[16]!==f?(k=A.jsxs(Yt,{data:f,barCategoryGap:2,onMouseMove:v,onMouseLeave:m,children:[g,b,h,y,P,x,I,E]}),e[13]=d.onMouseLeave,e[14]=d.onMouseMove,e[15]=E,e[16]=f,e[17]=k):k=e[17];let j;e[18]!==u||e[19]!==k||e[20]!==p?(j=A.jsx(ce,{config:u,className:p,children:k}),e[18]=u,e[19]=k,e[20]=p,e[21]=j):j=e[21];let O;e[22]!==a?(O=A.jsx(Ce,{data:a}),e[22]=a,e[23]=O):O=e[23];let w;return e[24]!==j||e[25]!==O?(w=A.jsxs("div",{children:[j,O]}),e[24]=j,e[25]=O,e[26]=w):w=e[26],w}function sr(t){return G(String(t))}function cr(t){return St(Number(t))}function ur(t){return{...t,t:new Date(t.t).toISOString(),ok:Math.max(0,t.count-t.errors-t.client_errors)}}const dr={ok:{label:"ok",color:"var(--ok)"},errored:{label:"errored",color:"var(--warning)"},crashed:{label:"crashed",color:"var(--danger)"}};function jr(t){const e=B.c(23),{data:a,deploys:r,className:n}=t,o=n===void 0?"h-40":n,l=Ne(),i=`${o} w-full`;let c;e[0]!==a?(c=a.map(mr),e[0]=a,e[1]=c):c=e[1];const u=l.onMouseMove,d=l.onMouseLeave;let p,f,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),f=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),v=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:fr}),e[2]=p,e[3]=f,e[4]=v):(p=e[2],f=e[3],v=e[4]);let m,h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:vr})}),m=["ok","errored","crashed"],e[5]=m,e[6]=h):(m=e[5],h=e[6]);let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=m.map(pr),e[7]=g):g=e[7];let b;e[8]!==r?(b=De(r),e[8]=r,e[9]=b):b=e[9];let y;e[10]!==l.onMouseLeave||e[11]!==l.onMouseMove||e[12]!==b||e[13]!==c?(y=A.jsxs(Ot,{data:c,onMouseMove:u,onMouseLeave:d,children:[p,f,v,h,g,b]}),e[10]=l.onMouseLeave,e[11]=l.onMouseMove,e[12]=b,e[13]=c,e[14]=y):y=e[14];let P;e[15]!==y||e[16]!==i?(P=A.jsx(ce,{config:dr,className:i,children:y}),e[15]=y,e[16]=i,e[17]=P):P=e[17];let x;e[18]!==a?(x=A.jsx(Ce,{data:a}),e[18]=a,e[19]=x):x=e[19];let I;return e[20]!==P||e[21]!==x?(I=A.jsxs("div",{children:[P,x]}),e[20]=P,e[21]=x,e[22]=I):I=e[22],I}function pr(t){return A.jsx(we,{dataKey:t,stackId:"sessions",stroke:`var(--color-${t})`,fill:`var(--color-${t})`,fillOpacity:.3,strokeWidth:1.25,isAnimationActive:!1},t)}function vr(t){return G(String(t))}function fr(t){return St(Number(t))}function mr(t){return{...t,t:new Date(t.t).toISOString()}}function Or(t){const e=B.c(26),{data:a,deploys:r,percentile:n,className:o}=t,l=n===void 0?"p95":n,i=o===void 0?"h-40":o,c=Ne(),u=`${i} w-full`;let d;e[0]!==a?(d=a.map(gr),e[0]=a,e[1]=d):d=e[1];const p=c.onMouseMove,f=c.onMouseLeave;let v,m,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),m=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:44,tickLine:!1,axisLine:!1,tick:F,tickFormatter:xr}),e[2]=v,e[3]=m,e[4]=h):(v=e[2],m=e[3],h=e[4]);let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:yr,formatter:hr})}),e[5]=g):g=e[5];const b=`var(--color-${l})`;let y;e[6]!==l||e[7]!==b?(y=A.jsx(he,{dataKey:l,stroke:b,dot:!1,strokeWidth:1.75,isAnimationActive:!1}),e[6]=l,e[7]=b,e[8]=y):y=e[8];let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=A.jsx(he,{dataKey:"avg",stroke:"var(--color-avg)",dot:!1,strokeWidth:1.25,strokeOpacity:.8,isAnimationActive:!1}),e[9]=P):P=e[9];let x;e[10]!==r?(x=De(r),e[10]=r,e[11]=x):x=e[11];let I;e[12]!==c.onMouseLeave||e[13]!==c.onMouseMove||e[14]!==y||e[15]!==x||e[16]!==d?(I=A.jsxs(or,{data:d,onMouseMove:p,onMouseLeave:f,children:[v,m,h,g,y,P,x]}),e[12]=c.onMouseLeave,e[13]=c.onMouseMove,e[14]=y,e[15]=x,e[16]=d,e[17]=I):I=e[17];let E;e[18]!==I||e[19]!==u?(E=A.jsx(ce,{config:ee,className:u,children:I}),e[18]=I,e[19]=u,e[20]=E):E=e[20];let k;e[21]!==a?(k=A.jsx(Ce,{data:a}),e[21]=a,e[22]=k):k=e[22];let j;return e[23]!==E||e[24]!==k?(j=A.jsxs("div",{children:[E,k]}),e[23]=E,e[24]=k,e[25]=j):j=e[25],j}function hr(t,e){return[ut(Number(t)),String(e)]}function yr(t){return G(String(t))}function xr(t){return ut(Number(t),0)}function gr(t){return{...t,t:new Date(t.t).toISOString()}}function Sr(t){const e=B.c(21),{data:a,className:r,hoverKey:n}=t,o=r===void 0?"h-10 w-32":r,{hoveredKey:l,setHoveredKey:i}=Be(),c=n!=null&&l===n;let u;e[0]!==a?(u=a.map(br),e[0]=a,e[1]=u):u=e[1];let d;e[2]!==n||e[3]!==i?(d=n?()=>i(n):void 0,e[2]=n,e[3]=i,e[4]=d):d=e[4];let p;e[5]!==n||e[6]!==i?(p=n?()=>i(null):void 0,e[5]=n,e[6]=i,e[7]=p):p=e[7];const f=c?"var(--primary)":"var(--muted-foreground)",v=c?"var(--primary)":"var(--muted-foreground)",m=c?.35:.15,h=c?2:1.25;let g;e[8]!==f||e[9]!==v||e[10]!==m||e[11]!==h?(g=A.jsx(we,{dataKey:"v",stroke:f,fill:v,fillOpacity:m,strokeWidth:h,isAnimationActive:!1}),e[8]=f,e[9]=v,e[10]=m,e[11]=h,e[12]=g):g=e[12];let b;e[13]!==u||e[14]!==d||e[15]!==p||e[16]!==g?(b=A.jsx(Ot,{data:u,onMouseEnter:d,onMouseLeave:p,children:g}),e[13]=u,e[14]=d,e[15]=p,e[16]=g,e[17]=b):b=e[17];let y;return e[18]!==o||e[19]!==b?(y=A.jsx(ce,{config:ee,className:o,children:b}),e[18]=o,e[19]=b,e[20]=y):y=e[20],y}function br(t){return{v:t}}function St(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}export{we as A,Or as L,Sr as S,kr as T,Ot as a,jr as b};
1
+ import{a4 as te,r as s,c as B,j as A}from"./inertia-CUTKXjxg.js";import{u as Be}from"./chart-hover-DMWx5-Rs.js";import{i as K,e as Ve,s as ae,D as re,f as ye,g as Nt,Z as ne,L as R,u as xe,h as Ct,j as _t,k as Y,l as Ge,m as $,n as X,o as Mt,p as ie,q as oe,r as Xe,t as ge,v as H,w as Ye,x as be,y as le,z as He,S as Ue,A as qe,E as se,F as Ze,G as Je,H as Qe,I as et,J as tt,K as at,M as Tt,N as U,O as q,P as rt,Q as nt,T as _,U as it,V as ot,W as lt,_ as Kt,$ as Wt,a0 as Rt,a1 as Pe,a2 as Ae,a3 as $t,a4 as zt,a5 as Ft,a6 as Bt,a7 as Vt,a8 as Gt,a9 as ue,aa as Z,ab as st,ac as ct,R as Xt,C as Ie,X as Ee,Y as ke,a as je,b as Oe,c as ce,B as de,d as Yt}from"./chart-nsdZV0Dv.js";import{m as ut}from"./format-B9SDkrWj.js";function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},fe.apply(null,arguments)}var dt=t=>{var{cx:e,cy:a,r,className:n}=t,o=te("recharts-dot",n);return K(e)&&K(a)&&K(r)?s.createElement("circle",fe({},ae(t),Ve(t),{className:o,cx:e,cy:a,r})):null},Ht=["points"];function Ke(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function pe(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(a),!0).forEach(function(r){Ut(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ke(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Ut(t,e,a){return(e=qt(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function qt(t){var e=Zt(t,"string");return typeof e=="symbol"?e:e+""}function Zt(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},J.apply(null,arguments)}function Jt(t,e){if(t==null)return{};var a,r,n=Qt(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Qt(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ea(t){var{option:e,dotProps:a,className:r}=t;if(s.isValidElement(e))return s.cloneElement(e,a);if(typeof e=="function")return e(a);var n=te(r,typeof e!="boolean"?e.className:""),o=a??{},{points:l}=o,i=Jt(o,Ht);return s.createElement(dt,J({},i,{className:n}))}function ta(t,e){return t==null?!1:e?!0:t.length===1}function pt(t){var{points:e,dot:a,className:r,dotClassName:n,dataKey:o,baseProps:l,needClip:i,clipPathId:c,zIndex:u=re.scatter}=t;if(!ta(e,a))return null;var d=ye(a),p=Nt(a),f=e.map((m,h)=>{var g,b,y=pe(pe(pe({r:3},l),p),{},{index:h,cx:(g=m.x)!==null&&g!==void 0?g:void 0,cy:(b=m.y)!==null&&b!==void 0?b:void 0,dataKey:o,value:m.value,payload:m.payload,points:e});return s.createElement(ea,{key:"dot-".concat(h),option:a,dotProps:y,className:n})}),v={};return i&&c!=null&&(v.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),s.createElement(ne,{zIndex:u},s.createElement(R,J({className:r},v),f))}function We(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function ve(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?We(Object(a),!0).forEach(function(r){aa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function aa(t,e,a){return(e=ra(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ra(t){var e=na(t,"string");return typeof e=="symbol"?e:e+""}function na(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ia=t=>{var{point:e,childIndex:a,mainColor:r,activeDot:n,dataKey:o,clipPath:l}=t;if(n===!1||e.x==null||e.y==null)return null;var i={index:a,dataKey:o,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},c=ve(ve(ve({},i),Ge(n)),Ve(n)),u;return s.isValidElement(n)?u=s.cloneElement(n,c):typeof n=="function"?u=n(c):u=s.createElement(dt,c),s.createElement(R,{className:"recharts-active-dot",clipPath:l},u)};function me(t){var{points:e,mainColor:a,activeDot:r,itemDataKey:n,clipPath:o,zIndex:l=re.activeDot}=t,i=xe(Ct),c=_t();if(e==null||c==null)return null;var u=e.find(d=>c.includes(d.payload));return Y(u)?null:s.createElement(ne,{zIndex:l},s.createElement(ia,{point:u,childIndex:Number(i),mainColor:a,dataKey:n,activeDot:r,clipPath:o}))}var vt=(t,e,a,r)=>ie(t,"xAxis",e,r),ft=(t,e,a,r)=>oe(t,"xAxis",e,r),mt=(t,e,a,r)=>ie(t,"yAxis",a,r),ht=(t,e,a,r)=>oe(t,"yAxis",a,r),oa=$([X,vt,mt,ft,ht],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),la=(t,e,a,r,n)=>n;function sa(t){return t.type==="line"}var ca=$([Xe,la],(t,e)=>t.filter(sa).find(a=>a.id===e)),ua=$([X,vt,mt,ft,ht,ca,oa,Mt],(t,e,a,r,n,o,l,i)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=i;if(!(o==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||l==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:p,data:f}=o,v;if(f!=null&&f.length>0?v=f:v=c?.slice(u,d+1),v!=null)return La({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:p,bandSize:l,displayedData:v})}});function yt(t){var e=Ge(t),a=3,r=2;if(e!=null){var{r:n,strokeWidth:o}=e,l=Number(n),i=Number(o);return(Number.isNaN(l)||l<0)&&(l=a),(Number.isNaN(i)||i<0)&&(i=r),{r:l,strokeWidth:i}}return{r:a,strokeWidth:r}}var da=["id"],pa=["type","layout","connectNulls","needClip","shape"],va=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},V.apply(null,arguments)}function Re(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function M(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(a),!0).forEach(function(r){fa(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Re(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function fa(t,e,a){return(e=ma(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ma(t){var e=ha(t,"string");return typeof e=="symbol"?e:e+""}function ha(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Se(t,e){if(t==null)return{};var a,r,n=ya(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ya(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var xa=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:o}=t;return[{inactive:o,dataKey:e,type:n,color:r,value:se(a,e),payload:t}]},ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:r,unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})}),xt=(t,e)=>"".concat(e,"px ").concat(t,"px");function ba(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var Pa=(t,e,a)=>{var r=a.reduce((f,v)=>f+v,0);if(!r)return xt(e,t);for(var n=Math.floor(t/r),o=t%r,l=[],i=0,c=0;i<a.length;c+=(u=a[i])!==null&&u!==void 0?u:0,++i){var u,d=a[i];if(d!=null&&c+d>o){l=[...a.slice(0,i),o-c];break}}var p=l.length%2===0?[0,e]:[e];return[...ba(a,n),...l,...p].map(f=>"".concat(f,"px")).join(", ")};function Aa(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:o,needClip:l}=r,{id:i}=r,c=Se(r,da),u=ae(c);return s.createElement(pt,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:u,needClip:l,clipPathId:e})}function Ia(t){var{showLabels:e,children:a,points:r}=t,n=s.useMemo(()=>r?.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return M(M({},c),{},{value:o.value,payload:o.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return s.createElement(ot,{value:e?n:void 0},a)}function $e(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:o}=t,{type:l,layout:i,connectNulls:c,needClip:u,shape:d}=o,p=Se(o,pa),f=M(M({},lt(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(e,")"):void 0,points:r,type:l,layout:i,connectNulls:c,strokeDasharray:n??o.strokeDasharray});return s.createElement(s.Fragment,null,r?.length>1&&s.createElement(Kt,V({shapeType:"curve",option:d},f,{pathRef:a})),s.createElement(Aa,{points:r,clipPathId:e,props:o}))}function Ea(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function ka(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:o}=t,{points:l,strokeDasharray:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,animateNewValues:f,width:v,height:m,onAnimationEnd:h,onAnimationStart:g}=a,b=n.current,y=rt(l,"recharts-line-"),P=s.useRef(y),[x,I]=s.useState(!1),E=!x,k=s.useCallback(()=>{typeof h=="function"&&h(),I(!1)},[h]),j=s.useCallback(()=>{typeof g=="function"&&g(),I(!0)},[g]),O=Ea(r.current),w=s.useRef(0);P.current!==y&&(w.current=o.current,P.current=y);var L=w.current;return s.createElement(Ia,{points:l,showLabels:E},a.children,s.createElement(nt,{animationId:y,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:k,onAnimationStart:j,key:y},S=>{var D=_(L,O+L,S),T=Math.min(D,O),N;if(c)if(i){var wt="".concat(i).split(/[,\s]+/gim).map(C=>parseFloat(C));N=Pa(T,O,wt)}else N=xt(O,T);else N=i==null?void 0:String(i);if(S>0&&O>0&&(n.current=l,o.current=Math.max(o.current,T)),b){var Lt=b.length/l.length,_e=S===1?l:l.map((C,Dt)=>{var Me=Math.floor(Dt*Lt);if(b[Me]){var Te=b[Me];return M(M({},C),{},{x:_(Te.x,C.x,S),y:_(Te.y,C.y,S)})}return f?M(M({},C),{},{x:_(v*2,C.x,S),y:_(m/2,C.y,S)}):M(M({},C),{},{x:C.x,y:C.y})});return n.current=_e,s.createElement($e,{props:a,points:_e,clipPathId:e,pathRef:r,strokeDasharray:N})}return s.createElement($e,{props:a,points:l,clipPathId:e,pathRef:r,strokeDasharray:N})}),s.createElement(it,{label:a.label}))}function ja(t){var{clipPathId:e,props:a}=t,r=s.useRef(null),n=s.useRef(0),o=s.useRef(null);return s.createElement(ka,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:o})}var Oa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:U(t.payload,e)}};class Sa extends s.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:o,yAxisId:l,top:i,left:c,width:u,height:d,id:p,needClip:f,zIndex:v}=this.props;if(e)return null;var m=te("recharts-line",n),h=p,{r:g,strokeWidth:b}=yt(a),y=ye(a),P=g*2+b,x=f?"url(#clipPath-".concat(y?"":"dots-").concat(h,")"):void 0;return s.createElement(ne,{zIndex:v},s.createElement(R,{className:m},f&&s.createElement("defs",null,s.createElement(at,{clipPathId:h,xAxisId:o,yAxisId:l}),!y&&s.createElement("clipPath",{id:"clipPath-dots-".concat(h)},s.createElement("rect",{x:c-P/2,y:i-P/2,width:u+P,height:d+P}))),s.createElement(Tt,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:Oa,errorBarOffset:0},s.createElement(ja,{props:this.props,clipPathId:h}))),s.createElement(me,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:re.line,type:"linear"};function wa(t){var e=be(t,gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,connectNulls:i,dot:c,hide:u,isAnimationActive:d,label:p,legendType:f,xAxisId:v,yAxisId:m,id:h}=e,g=Se(e,va),{needClip:b}=Qe(v,m),y=et(),P=tt(),x=le(),I=xe(w=>ua(w,v,m,x,h));if(P!=="horizontal"&&P!=="vertical"||I==null||y==null)return null;var{height:E,width:k,x:j,y:O}=y;return s.createElement(Sa,V({},g,{id:h,connectNulls:i,dot:c,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:o,animationEasing:l,isAnimationActive:d,hide:u,label:p,legendType:f,xAxisId:v,yAxisId:m,points:I,layout:P,height:E,width:k,left:j,top:O,needClip:b}))}function La(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:o,dataKey:l,bandSize:i,displayedData:c}=t;return c.map((u,d)=>{var p=U(u,l);if(e==="horizontal"){var f=q({axis:a,ticks:n,bandSize:i,entry:u,index:d}),v=Y(p)?null:r.scale.map(p);return{x:f,y:v??null,value:p,payload:u}}var m=Y(p)?null:a.scale.map(p),h=q({axis:r,ticks:o,bandSize:i,entry:u,index:d});return m==null||h==null?null:{x:m,y:h,value:p,payload:u}}).filter(Boolean)}function Da(t){var e=be(t,gt),a=le();return s.createElement(He,{id:e.id,type:"line"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:xa(e)}),s.createElement(ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),s.createElement(wa,V({},e,{id:r}))))}var he=s.memo(Da,Ye);he.displayName="Line";var bt=(t,e,a)=>ie(t,"xAxis",Pe(t,e),a),Pt=(t,e,a)=>oe(t,"xAxis",Pe(t,e),a),At=(t,e,a)=>ie(t,"yAxis",Ae(t,e),a),It=(t,e,a)=>oe(t,"yAxis",Ae(t,e),a),Na=$([X,bt,At,Pt,It],(t,e,a,r,n)=>ge(t,"xAxis")?H(e,r,!1):H(a,n,!1)),Ca=(t,e)=>e,Et=$([Xe,Ca],(t,e)=>t.filter(a=>a.type==="area").find(a=>a.id===e)),kt=t=>{var e=X(t),a=ge(e,"xAxis");return a?"yAxis":"xAxis"},_a=(t,e)=>{var a=kt(t);return a==="yAxis"?Ae(t,e):Pe(t,e)},Ma=(t,e,a)=>zt(t,kt(t),_a(t,e),a),Ta=$([Et,Ma],(t,e)=>{var a;if(!(t==null||e==null)){var{stackId:r}=t,n=$t(t);if(!(r==null||n==null)){var o=(a=e[r])===null||a===void 0?void 0:a.stackedData,l=o?.find(i=>i.key===n);if(l!=null)return l.map(i=>[i[0],i[1]])}}}),Ka=$([X,bt,At,Pt,It,Ta,Wt,Na,Et,Rt],(t,e,a,r,n,o,l,i,c,u)=>{var{chartData:d,dataStartIndex:p,dataEndIndex:f}=l;if(!(c==null||t!=="horizontal"&&t!=="vertical"||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null)){var{data:v}=c,m;if(v&&v.length>0?m=v:m=d?.slice(p,f+1),m!=null)return rr({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataStartIndex:p,areaSettings:c,stackedData:o,displayedData:m,chartBaseValue:u,bandSize:i})}}),Wa=["id"],Ra=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function W(){return W=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},W.apply(null,arguments)}function jt(t,e){if(t==null)return{};var a,r,n=$a(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function $a(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}function ze(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function z(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(a),!0).forEach(function(r){za(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ze(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function za(t,e,a){return(e=Fa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Fa(t){var e=Ba(t,"string");return typeof e=="symbol"?e:e+""}function Ba(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Q(t,e){return t&&t!=="none"?t:e}var Va=t=>{var{dataKey:e,name:a,stroke:r,fill:n,legendType:o,hide:l}=t;return[{inactive:l,dataKey:e,type:o,color:Q(r,n),value:se(a,e),payload:t}]},Ga=s.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:o,name:l,hide:i,unit:c,tooltipType:u,id:d}=t,p={dataDefinedOnItem:a,getPosition:Je,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:e,nameKey:void 0,name:se(l,e),hide:i,type:u,color:Q(r,o),unit:c,graphicalItemId:d}};return s.createElement(Ze,{tooltipEntrySettings:p})});function Xa(t){var{clipPathId:e,points:a,props:r}=t,{needClip:n,dot:o,dataKey:l}=r,i=ae(r);return s.createElement(pt,{points:a,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:i,needClip:n,clipPathId:e})}function Ya(t){var{showLabels:e,children:a,points:r}=t,n=r.map(o=>{var l,i,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(i=o.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return z(z({},c),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return s.createElement(ot,{value:e?n:void 0},a)}function Fe(t){var{points:e,baseLine:a,needClip:r,clipPathId:n,props:o}=t,{layout:l,type:i,stroke:c,connectNulls:u,isRange:d}=o,{id:p}=o,f=jt(o,Wa),v=ae(f),m=lt(f);return s.createElement(s.Fragment,null,e?.length>1&&s.createElement(R,{clipPath:r?"url(#clipPath-".concat(n,")"):void 0},s.createElement(ue,W({},m,{id:p,points:e,connectNulls:u,type:i,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:e})),c!=="none"&&d&&Array.isArray(a)&&s.createElement(ue,W({},v,{className:"recharts-area-curve",layout:l,type:i,connectNulls:u,fill:"none",points:a}))),s.createElement(Xa,{points:e,props:f,clipPathId:n}))}function Ha(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.y,c=(a=o[o.length-1])===null||a===void 0?void 0:a.y;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.x||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.x||0),d)),K(d)?s.createElement("rect",{x:0,y:i<c?i:i-u,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(u)}):null}function Ua(t){var e,a,{alpha:r,baseLine:n,points:o,strokeWidth:l}=t,i=(e=o[0])===null||e===void 0?void 0:e.x,c=(a=o[o.length-1])===null||a===void 0?void 0:a.x;if(!Z(i)||!Z(c))return null;var u=r*Math.abs(i-c),d=Math.max(...o.map(p=>p.y||0));return K(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(p=>p.y||0),d)),K(d)?s.createElement("rect",{x:i<c?i:i-u,y:0,width:u,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}function qa(t){var{alpha:e,layout:a,points:r,baseLine:n,strokeWidth:o}=t;return a==="vertical"?s.createElement(Ha,{alpha:e,points:r,baseLine:n,strokeWidth:o}):s.createElement(Ua,{alpha:e,points:r,baseLine:n,strokeWidth:o})}function Za(t){var{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o}=t,{points:l,baseLine:i,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:p,onAnimationStart:f,onAnimationEnd:v}=r,m=s.useMemo(()=>({points:l,baseLine:i}),[l,i]),h=rt(m,"recharts-area-"),g=Vt(),[b,y]=s.useState(!1),P=!b,x=s.useCallback(()=>{typeof v=="function"&&v(),y(!1)},[v]),I=s.useCallback(()=>{typeof f=="function"&&f(),y(!0)},[f]);if(g==null)return null;var E=n.current,k=o.current;return s.createElement(Ya,{showLabels:P,points:l},r.children,s.createElement(nt,{animationId:h,begin:u,duration:d,isActive:c,easing:p,onAnimationEnd:x,onAnimationStart:I,key:h},j=>{if(E){var O=E.length/l.length,w=j===1?l:l.map((S,D)=>{var T=Math.floor(D*O);if(E[T]){var N=E[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),L;return K(i)?L=_(k,i,j):Y(i)||Gt(i)?L=_(k,0,j):L=i.map((S,D)=>{var T=Math.floor(D*O);if(Array.isArray(k)&&k[T]){var N=k[T];return z(z({},S),{},{x:_(N.x,S.x,j),y:_(N.y,S.y,j)})}return S}),j>0&&(n.current=w,o.current=L),s.createElement(Fe,{points:w,baseLine:L,needClip:e,clipPathId:a,props:r})}return j>0&&(n.current=l,o.current=i),s.createElement(R,null,c&&s.createElement("defs",null,s.createElement("clipPath",{id:"animationClipPath-".concat(a)},s.createElement(qa,{alpha:j,points:l,baseLine:i,layout:g,strokeWidth:r.strokeWidth}))),s.createElement(R,{clipPath:"url(#animationClipPath-".concat(a,")")},s.createElement(Fe,{points:l,baseLine:i,needClip:e,clipPathId:a,props:r})))}),s.createElement(it,{label:r.label}))}function Ja(t){var{needClip:e,clipPathId:a,props:r}=t,n=s.useRef(null),o=s.useRef();return s.createElement(Za,{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:o})}class Qa extends s.PureComponent{render(){var{hide:e,dot:a,points:r,className:n,top:o,left:l,needClip:i,xAxisId:c,yAxisId:u,width:d,height:p,id:f,baseLine:v,zIndex:m}=this.props;if(e)return null;var h=te("recharts-area",n),g=f,{r:b,strokeWidth:y}=yt(a),P=ye(a),x=b*2+y,I=i?"url(#clipPath-".concat(P?"":"dots-").concat(g,")"):void 0;return s.createElement(ne,{zIndex:m},s.createElement(R,{className:h},i&&s.createElement("defs",null,s.createElement(at,{clipPathId:g,xAxisId:c,yAxisId:u}),!P&&s.createElement("clipPath",{id:"clipPath-dots-".concat(g)},s.createElement("rect",{x:l-x/2,y:o-x/2,width:d+x,height:p+x}))),s.createElement(Ja,{needClip:i,clipPathId:g,props:this.props})),s.createElement(me,{points:r,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(v)&&s.createElement(me,{points:v,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}var er={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:re.area};function tr(t){var e,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,connectNulls:l,dot:i,fill:c,fillOpacity:u,hide:d,isAnimationActive:p,legendType:f,stroke:v,xAxisId:m,yAxisId:h}=t,g=jt(t,Ra),b=tt(),y=Bt(),{needClip:P}=Qe(m,h),x=le(),{points:I,isRange:E,baseLine:k}=(e=xe(D=>Ka(D,t.id,x)))!==null&&e!==void 0?e:{},j=et();if(b!=="horizontal"&&b!=="vertical"||j==null||y!=="AreaChart"&&y!=="ComposedChart")return null;var{height:O,width:w,x:L,y:S}=j;return!I||!I.length?null:s.createElement(Qa,W({},g,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:o,baseLine:k,connectNulls:l,dot:i,fill:c,fillOpacity:u,height:O,hide:d,layout:b,isAnimationActive:p,isRange:E,legendType:f,needClip:P,points:I,stroke:v,width:w,left:L,top:S,xAxisId:m,yAxisId:h}))}var ar=(t,e,a,r,n)=>{var o=a??e;if(K(o))return o;var l=t==="horizontal"?n:r,i=l.scale.domain();if(l.type==="number"){var c=Math.max(i[0],i[1]),u=Math.min(i[0],i[1]);return o==="dataMin"?u:o==="dataMax"||c<0?c:Math.max(Math.min(i[0],i[1]),0)}return o==="dataMin"?i[0]:o==="dataMax"?i[1]:i[0]};function rr(t){var{areaSettings:{connectNulls:e,baseValue:a,dataKey:r},stackedData:n,layout:o,chartBaseValue:l,xAxis:i,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:p,yAxisTicks:f,bandSize:v}=t,m=n&&n.length,h=ar(o,l,a,i,c),g=o==="horizontal",b=!1,y=u.map((x,I)=>{var E,k,j,O;if(m)O=n[d+I];else{var w=U(x,r);Array.isArray(w)?(O=w,b=!0):O=[h,w]}var L=(E=(k=O)===null||k===void 0?void 0:k[1])!==null&&E!==void 0?E:null,S=L==null||m&&!e&&U(x,r)==null;if(g){var D;return{x:q({axis:i,ticks:p,bandSize:v,entry:x,index:I}),y:S?null:(D=c.scale.map(L))!==null&&D!==void 0?D:null,value:O,payload:x}}return{x:S?null:(j=i.scale.map(L))!==null&&j!==void 0?j:null,y:q({axis:c,ticks:f,bandSize:v,entry:x,index:I}),value:O,payload:x}}),P;return m||b?P=y.map(x=>{var I,E=Array.isArray(x.value)?x.value[0]:null;if(g){var k;return{x:x.x,y:E!=null&&x.y!=null&&(k=c.scale.map(E))!==null&&k!==void 0?k:null,payload:x.payload}}return{x:E!=null&&(I=i.scale.map(E))!==null&&I!==void 0?I:null,y:x.y,payload:x.payload}}):P=g?c.scale.map(h):i.scale.map(h),{points:y,baseLine:P??0,isRange:b}}function nr(t){var e=be(t,er),a=le();return s.createElement(He,{id:e.id,type:"area"},r=>s.createElement(s.Fragment,null,s.createElement(Ue,{legendPayload:Va(e)}),s.createElement(Ga,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),s.createElement(qe,{type:"area",id:r,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Ft(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:a,connectNulls:e.connectNulls}),s.createElement(tr,W({},e,{id:r}))))}var we=s.memo(nr,Ye);we.displayName="Area";var ir=["axis"],or=s.forwardRef((t,e)=>s.createElement(st,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ir,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e})),lr=["axis"],Ot=s.forwardRef((t,e)=>s.createElement(st,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lr,tooltipPayloadSearcher:ct,categoricalChartProps:t,ref:e}));const ee={count:{label:"OK",color:"var(--ok)"},errors:{label:"5xx",color:"var(--danger)"},client_errors:{label:"4xx",color:"var(--warning)"},p50:{label:"p50",color:"var(--primary)"},p95:{label:"p95",color:"var(--primary)"},p99:{label:"p99",color:"var(--primary)"},avg:{label:"avg",color:"var(--warning)"}};function Le(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function G(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}const F={fontSize:10,fontFamily:"var(--font-mono)"};function De(t=[]){return t.map(e=>A.jsx(Xt,{x:new Date(e.at).toISOString(),stroke:"var(--primary)",strokeDasharray:"3 3",label:{value:e.ref,position:"insideTopRight",fontSize:9,fill:"var(--primary)",fontFamily:"var(--font-mono)"}},e.deploy))}function Ne(){const t=B.c(2),{setHoveredKey:e}=Be();let a;return t[0]!==e?(a={onMouseMove:r=>{typeof r?.activeLabel=="string"&&e(r.activeLabel)},onMouseLeave:()=>e(null)},t[0]=e,t[1]=a):a=t[1],a}function Ce(t){const e=B.c(11),{data:a}=t;if(a.length===0)return null;let r;e[0]!==a[0].t?(r=G(a[0].t),e[0]=a[0].t,e[1]=r):r=e[1];let n;e[2]!==r?(n=A.jsx("span",{children:r}),e[2]=r,e[3]=n):n=e[3];const o=a[a.length-1];let l;e[4]!==o.t?(l=G(o.t),e[4]=o.t,e[5]=l):l=e[5];let i;e[6]!==l?(i=A.jsx("span",{children:l}),e[6]=l,e[7]=i):i=e[7];let c;return e[8]!==n||e[9]!==i?(c=A.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[n,i]}),e[8]=n,e[9]=i,e[10]=c):c=e[10],c}function kr(t){const e=B.c(27),{data:a,deploys:r,label:n,className:o}=t,l=n===void 0?"Requests":n,i=o===void 0?"h-40":o;let c;e[0]!==l?(c={...ee,count:{...ee.count,label:l}},e[0]=l,e[1]=c):c=e[1];const u=c,d=Ne(),p=`${i} w-full`;let f;e[2]!==a?(f=a.map(ur),e[2]=a,e[3]=f):f=e[3];const v=d.onMouseMove,m=d.onMouseLeave;let h,g,b;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),b=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:cr}),e[4]=h,e[5]=g,e[6]=b):(h=e[4],g=e[5],b=e[6]);let y,P,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:sr})}),P=A.jsx(de,{dataKey:"ok",name:"count",fill:"var(--color-count)",stackId:"a"}),x=A.jsx(de,{dataKey:"client_errors",fill:"var(--color-client_errors)",stackId:"a"}),e[7]=y,e[8]=P,e[9]=x):(y=e[7],P=e[8],x=e[9]);let I;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=A.jsx(de,{dataKey:"errors",fill:"var(--color-errors)",stackId:"a",radius:[2,2,0,0]}),e[10]=I):I=e[10];let E;e[11]!==r?(E=De(r),e[11]=r,e[12]=E):E=e[12];let k;e[13]!==d.onMouseLeave||e[14]!==d.onMouseMove||e[15]!==E||e[16]!==f?(k=A.jsxs(Yt,{data:f,barCategoryGap:2,onMouseMove:v,onMouseLeave:m,children:[g,b,h,y,P,x,I,E]}),e[13]=d.onMouseLeave,e[14]=d.onMouseMove,e[15]=E,e[16]=f,e[17]=k):k=e[17];let j;e[18]!==u||e[19]!==k||e[20]!==p?(j=A.jsx(ce,{config:u,className:p,children:k}),e[18]=u,e[19]=k,e[20]=p,e[21]=j):j=e[21];let O;e[22]!==a?(O=A.jsx(Ce,{data:a}),e[22]=a,e[23]=O):O=e[23];let w;return e[24]!==j||e[25]!==O?(w=A.jsxs("div",{children:[j,O]}),e[24]=j,e[25]=O,e[26]=w):w=e[26],w}function sr(t){return G(String(t))}function cr(t){return St(Number(t))}function ur(t){return{...t,t:new Date(t.t).toISOString(),ok:Math.max(0,t.count-t.errors-t.client_errors)}}const dr={ok:{label:"ok",color:"var(--ok)"},errored:{label:"errored",color:"var(--warning)"},crashed:{label:"crashed",color:"var(--danger)"}};function jr(t){const e=B.c(23),{data:a,deploys:r,className:n}=t,o=n===void 0?"h-40":n,l=Ne(),i=`${o} w-full`;let c;e[0]!==a?(c=a.map(mr),e[0]=a,e[1]=c):c=e[1];const u=l.onMouseMove,d=l.onMouseLeave;let p,f,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),f=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),v=A.jsx(ke,{width:36,tickLine:!1,axisLine:!1,tick:F,tickFormatter:fr}),e[2]=p,e[3]=f,e[4]=v):(p=e[2],f=e[3],v=e[4]);let m,h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:vr})}),m=["ok","errored","crashed"],e[5]=m,e[6]=h):(m=e[5],h=e[6]);let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=m.map(pr),e[7]=g):g=e[7];let b;e[8]!==r?(b=De(r),e[8]=r,e[9]=b):b=e[9];let y;e[10]!==l.onMouseLeave||e[11]!==l.onMouseMove||e[12]!==b||e[13]!==c?(y=A.jsxs(Ot,{data:c,onMouseMove:u,onMouseLeave:d,children:[p,f,v,h,g,b]}),e[10]=l.onMouseLeave,e[11]=l.onMouseMove,e[12]=b,e[13]=c,e[14]=y):y=e[14];let P;e[15]!==y||e[16]!==i?(P=A.jsx(ce,{config:dr,className:i,children:y}),e[15]=y,e[16]=i,e[17]=P):P=e[17];let x;e[18]!==a?(x=A.jsx(Ce,{data:a}),e[18]=a,e[19]=x):x=e[19];let I;return e[20]!==P||e[21]!==x?(I=A.jsxs("div",{children:[P,x]}),e[20]=P,e[21]=x,e[22]=I):I=e[22],I}function pr(t){return A.jsx(we,{dataKey:t,stackId:"sessions",stroke:`var(--color-${t})`,fill:`var(--color-${t})`,fillOpacity:.3,strokeWidth:1.25,isAnimationActive:!1},t)}function vr(t){return G(String(t))}function fr(t){return St(Number(t))}function mr(t){return{...t,t:new Date(t.t).toISOString()}}function Or(t){const e=B.c(26),{data:a,deploys:r,percentile:n,className:o}=t,l=n===void 0?"p95":n,i=o===void 0?"h-40":o,c=Ne(),u=`${i} w-full`;let d;e[0]!==a?(d=a.map(gr),e[0]=a,e[1]=d):d=e[1];const p=c.onMouseMove,f=c.onMouseLeave;let v,m,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=A.jsx(Ie,{vertical:!1,strokeDasharray:"2 4"}),m=A.jsx(Ee,{dataKey:"t",tickFormatter:Le,tickLine:!1,axisLine:!1,minTickGap:40,tick:F}),h=A.jsx(ke,{width:44,tickLine:!1,axisLine:!1,tick:F,tickFormatter:xr}),e[2]=v,e[3]=m,e[4]=h):(v=e[2],m=e[3],h=e[4]);let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=A.jsx(je,{content:A.jsx(Oe,{labelFormatter:yr,formatter:hr})}),e[5]=g):g=e[5];const b=`var(--color-${l})`;let y;e[6]!==l||e[7]!==b?(y=A.jsx(he,{dataKey:l,stroke:b,dot:!1,strokeWidth:1.75,isAnimationActive:!1}),e[6]=l,e[7]=b,e[8]=y):y=e[8];let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=A.jsx(he,{dataKey:"avg",stroke:"var(--color-avg)",dot:!1,strokeWidth:1.25,strokeOpacity:.8,isAnimationActive:!1}),e[9]=P):P=e[9];let x;e[10]!==r?(x=De(r),e[10]=r,e[11]=x):x=e[11];let I;e[12]!==c.onMouseLeave||e[13]!==c.onMouseMove||e[14]!==y||e[15]!==x||e[16]!==d?(I=A.jsxs(or,{data:d,onMouseMove:p,onMouseLeave:f,children:[v,m,h,g,y,P,x]}),e[12]=c.onMouseLeave,e[13]=c.onMouseMove,e[14]=y,e[15]=x,e[16]=d,e[17]=I):I=e[17];let E;e[18]!==I||e[19]!==u?(E=A.jsx(ce,{config:ee,className:u,children:I}),e[18]=I,e[19]=u,e[20]=E):E=e[20];let k;e[21]!==a?(k=A.jsx(Ce,{data:a}),e[21]=a,e[22]=k):k=e[22];let j;return e[23]!==E||e[24]!==k?(j=A.jsxs("div",{children:[E,k]}),e[23]=E,e[24]=k,e[25]=j):j=e[25],j}function hr(t,e){return[ut(Number(t)),String(e)]}function yr(t){return G(String(t))}function xr(t){return ut(Number(t),0)}function gr(t){return{...t,t:new Date(t.t).toISOString()}}function Sr(t){const e=B.c(21),{data:a,className:r,hoverKey:n}=t,o=r===void 0?"h-10 w-32":r,{hoveredKey:l,setHoveredKey:i}=Be(),c=n!=null&&l===n;let u;e[0]!==a?(u=a.map(br),e[0]=a,e[1]=u):u=e[1];let d;e[2]!==n||e[3]!==i?(d=n?()=>i(n):void 0,e[2]=n,e[3]=i,e[4]=d):d=e[4];let p;e[5]!==n||e[6]!==i?(p=n?()=>i(null):void 0,e[5]=n,e[6]=i,e[7]=p):p=e[7];const f=c?"var(--primary)":"var(--muted-foreground)",v=c?"var(--primary)":"var(--muted-foreground)",m=c?.35:.15,h=c?2:1.25;let g;e[8]!==f||e[9]!==v||e[10]!==m||e[11]!==h?(g=A.jsx(we,{dataKey:"v",stroke:f,fill:v,fillOpacity:m,strokeWidth:h,isAnimationActive:!1}),e[8]=f,e[9]=v,e[10]=m,e[11]=h,e[12]=g):g=e[12];let b;e[13]!==u||e[14]!==d||e[15]!==p||e[16]!==g?(b=A.jsx(Ot,{data:u,onMouseEnter:d,onMouseLeave:p,children:g}),e[13]=u,e[14]=d,e[15]=p,e[16]=g,e[17]=b):b=e[17];let y;return e[18]!==o||e[19]!==b?(y=A.jsx(ce,{config:ee,className:o,children:b}),e[18]=o,e[19]=b,e[20]=y):y=e[20],y}function br(t){return{v:t}}function St(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}export{we as A,Or as L,Sr as S,kr as T,Ot as a,jr as b};
@@ -1 +1 @@
1
- import{c as g,u as v,an as P,j as s,e as C,t as E,L as N,i as S}from"./inertia-Degv_G9N.js";import{D as y}from"./data-table-IvA7xvrK.js";import{P as $,E as b}from"./env-layout-erSDpIXg.js";import{I,S as R}from"./status-badge-5NCVJHjo.js";import{C as D,b as H,c as K,a as L}from"./card-BaJ8kNkp.js";import{a as w,w as T,m as B}from"./format-B9SDkrWj.js";import"./chart-hover-XYPNE2CX.js";import"./empty-state-BFTnQ2oT.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./app-layout-B5Fcdwfz.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./checkbox-Bf41R8W6.js";import"./label-B_vK19tR.js";import"./use-live-GKze1mNC.js";import"./segmented-CVKq2Xpa.js";function xe(t){const e=g.c(31),{environment:j,window:_}=v().props,r=j.application_id,i=j.id,n=t.person?.name??t.person_ref;let o;e[0]!==r||e[1]!==i||e[2]!==_?(o=P(r,i,{window:_}),e[0]=r,e[1]=i,e[2]=_,e[3]=o):o=e[3];let a;e[4]!==o?(a={title:"Users",href:o},e[4]=o,e[5]=a):a=e[5];let l;e[6]!==n?(l={title:n,href:"#"},e[6]=n,e[7]=l):l=e[7];let c;e[8]!==a||e[9]!==l?(c=[a,l],e[8]=a,e[9]=l,e[10]=c):c=e[10];let u;e[11]!==t.person?(u=t.person?`${t.person.email??""} ${t.person.tenant?`· tenant ${t.person.tenant}`:""} · first seen ${w(t.person.first_seen_at)} · last seen ${w(t.person.last_seen_at)}`:"Not yet identified.",e[11]=t.person,e[12]=u):u=e[12];let m;e[13]!==n||e[14]!==u?(m=s.jsx($,{title:n,description:u}),e[13]=n,e[14]=u,e[15]=m):m=e[15];let d;e[16]!==t.issues?(d=t.issues.length>0&&s.jsxs(D,{children:[s.jsx(H,{children:s.jsx(K,{children:"Issues affecting this user"})}),s.jsx(L,{children:s.jsx(y,{rows:t.issues,rowKey:V,columns:[{key:"k",header:"Issue",cell:Q},{key:"t",header:"Title",cell:O},{key:"s",header:"",cell:M},{key:"n",header:"Hits",align:"right",cell:J}]})})]}),e[16]=t.issues,e[17]=d):d=e[17];let p;e[18]!==r||e[19]!==i?(p=k=>k.execution_id&&C.visit(E(r,i,k.execution_id)),e[18]=r,e[19]=i,e[20]=p):p=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=[{key:"when",header:"When",cell:F},{key:"k",header:"Kind",cell:A},{key:"n",header:"Name",cell:z},{key:"st",header:"Status",cell:W},{key:"d",header:"Duration",align:"right",cell:U},{key:"ex",header:"Exception",cell:q}],e[21]=x):x=e[21];let f;e[22]!==t.executions||e[23]!==p?(f=s.jsx(y,{rows:t.executions,rowKey:G,onRowClick:p,columns:x}),e[22]=t.executions,e[23]=p,e[24]=f):f=e[24];let h;return e[25]!==n||e[26]!==c||e[27]!==m||e[28]!==d||e[29]!==f?(h=s.jsxs(b,{title:n,crumbs:c,children:[m,d,f]}),e[25]=n,e[26]=c,e[27]=m,e[28]=d,e[29]=f,e[30]=h):h=e[30],h}function q(t){return s.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function U(t){return B(t.duration)}function W(t){return s.jsx(R,{status:t.status,outcome:t.outcome})}function z(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function A(t){return t.kind}function F(t){return s.jsx("span",{className:"text-xs",children:T(t.occurred_at)})}function G(t){return t.execution_id}function J(t){return t.count}function M(t){return s.jsx(I,{status:t.status})}function O(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function Q(t){return s.jsx(N,{className:"font-mono text-xs hover:underline",href:S(t.id),children:t.key})}function V(t){return t.id}export{xe as default};
1
+ import{c as g,u as v,an as P,j as s,e as C,t as E,L as N,i as S}from"./inertia-CUTKXjxg.js";import{D as y}from"./data-table-CwtPkw_i.js";import{P as $,E as b}from"./env-layout-Dkp_4NvM.js";import{I,S as R}from"./status-badge-XYUN9gUA.js";import{C as D,b as H,c as K,a as L}from"./card-DiW-JhK3.js";import{a as w,w as T,m as B}from"./format-B9SDkrWj.js";import"./chart-hover-DMWx5-Rs.js";import"./empty-state-CshhuRUU.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./app-layout-DUk54qUM.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./checkbox-C2AqEZXX.js";import"./label-B32Ks8n7.js";import"./use-live-V-slSdFJ.js";import"./segmented-Bj70Htrs.js";function xe(t){const e=g.c(31),{environment:j,window:_}=v().props,r=j.application_id,i=j.id,n=t.person?.name??t.person_ref;let o;e[0]!==r||e[1]!==i||e[2]!==_?(o=P(r,i,{window:_}),e[0]=r,e[1]=i,e[2]=_,e[3]=o):o=e[3];let a;e[4]!==o?(a={title:"Users",href:o},e[4]=o,e[5]=a):a=e[5];let l;e[6]!==n?(l={title:n,href:"#"},e[6]=n,e[7]=l):l=e[7];let c;e[8]!==a||e[9]!==l?(c=[a,l],e[8]=a,e[9]=l,e[10]=c):c=e[10];let u;e[11]!==t.person?(u=t.person?`${t.person.email??""} ${t.person.tenant?`· tenant ${t.person.tenant}`:""} · first seen ${w(t.person.first_seen_at)} · last seen ${w(t.person.last_seen_at)}`:"Not yet identified.",e[11]=t.person,e[12]=u):u=e[12];let m;e[13]!==n||e[14]!==u?(m=s.jsx($,{title:n,description:u}),e[13]=n,e[14]=u,e[15]=m):m=e[15];let d;e[16]!==t.issues?(d=t.issues.length>0&&s.jsxs(D,{children:[s.jsx(H,{children:s.jsx(K,{children:"Issues affecting this user"})}),s.jsx(L,{children:s.jsx(y,{rows:t.issues,rowKey:V,columns:[{key:"k",header:"Issue",cell:Q},{key:"t",header:"Title",cell:O},{key:"s",header:"",cell:M},{key:"n",header:"Hits",align:"right",cell:J}]})})]}),e[16]=t.issues,e[17]=d):d=e[17];let p;e[18]!==r||e[19]!==i?(p=k=>k.execution_id&&C.visit(E(r,i,k.execution_id)),e[18]=r,e[19]=i,e[20]=p):p=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=[{key:"when",header:"When",cell:F},{key:"k",header:"Kind",cell:A},{key:"n",header:"Name",cell:z},{key:"st",header:"Status",cell:W},{key:"d",header:"Duration",align:"right",cell:U},{key:"ex",header:"Exception",cell:q}],e[21]=x):x=e[21];let f;e[22]!==t.executions||e[23]!==p?(f=s.jsx(y,{rows:t.executions,rowKey:G,onRowClick:p,columns:x}),e[22]=t.executions,e[23]=p,e[24]=f):f=e[24];let h;return e[25]!==n||e[26]!==c||e[27]!==m||e[28]!==d||e[29]!==f?(h=s.jsxs(b,{title:n,crumbs:c,children:[m,d,f]}),e[25]=n,e[26]=c,e[27]=m,e[28]=d,e[29]=f,e[30]=h):h=e[30],h}function q(t){return s.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function U(t){return B(t.duration)}function W(t){return s.jsx(R,{status:t.status,outcome:t.outcome})}function z(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function A(t){return t.kind}function F(t){return s.jsx("span",{className:"text-xs",children:T(t.occurred_at)})}function G(t){return t.execution_id}function J(t){return t.count}function M(t){return s.jsx(I,{status:t.status})}function O(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function Q(t){return s.jsx(N,{className:"font-mono text-xs hover:underline",href:S(t.id),children:t.key})}function V(t){return t.id}export{xe as default};
@@ -1,3 +1,3 @@
1
- import{c as ge,u as je,ae as _e,j as s,L as me,t as de,C as ue}from"./inertia-Degv_G9N.js";import{V as be,D as ye}from"./chart-panel-BYk68mJJ.js";import{M as xe}from"./code-a-9sh36A.js";import{C as we}from"./copy-id-b6CW5ESL.js";import{D as ne}from"./data-table-IvA7xvrK.js";import{E as ve}from"./empty-state-BFTnQ2oT.js";import{P as Ee,E as Se}from"./env-layout-erSDpIXg.js";import{S as X,a as Ne}from"./stat-TxvoBiC8.js";import{C as ie,a as re,b as oe,c as ae}from"./card-BaJ8kNkp.js";import{c as fe,m as P,w as he}from"./format-B9SDkrWj.js";import{D as Ce}from"./app-layout-B5Fcdwfz.js";import"./series-chart-D33UhdG2.js";import"./chart-hover-XYPNE2CX.js";import"./chart-Xnrz1Nqw.js";import"./app-wordmark-1SRllgHv.js";import"./use-clipboard-BLjjYH8V.js";import"./index-CX8Br7m9.js";import"./badge-CApjyWcg.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./arrow-up-DwKQcab4.js";import"./checkbox-Bf41R8W6.js";const Le=[{test:/\bSCAN\b/i,skip:/\bUSING\s+(?:COVERING\s+)?INDEX\b/i,message:"Reads every row of the table — no index covers this filter."},{test:/\bSeq Scan\b/i,message:"Sequential scan — Postgres reads the whole table; an index on the filtered column avoids it."},{test:/\bUSING TEMP B-TREE\b/i,message:"Builds a temporary B-tree to sort — an index matching the ORDER BY removes it."},{test:/filesort/i,message:"Filesort — MySQL sorts the rows itself; an index matching the ORDER BY removes it."},{test:/\btype:\s*ALL\b/i,message:"Join type ALL — MySQL has no usable index and scans the whole table."}];function Re(t){return t.split(`
1
+ import{c as ge,u as je,ae as _e,j as s,L as me,t as de,C as ue}from"./inertia-CUTKXjxg.js";import{V as be,D as ye}from"./chart-panel-BlirnMrQ.js";import{M as xe}from"./code-DVJtYP7h.js";import{C as we}from"./copy-id-CyRCMfdH.js";import{D as ne}from"./data-table-CwtPkw_i.js";import{E as ve}from"./empty-state-CshhuRUU.js";import{P as Ee,E as Se}from"./env-layout-Dkp_4NvM.js";import{S as X,a as Ne}from"./stat-IghK3WjD.js";import{C as ie,a as re,b as oe,c as ae}from"./card-DiW-JhK3.js";import{c as fe,m as P,w as he}from"./format-B9SDkrWj.js";import{D as Ce}from"./app-layout-DUk54qUM.js";import"./series-chart-C1YrNlID.js";import"./chart-hover-DMWx5-Rs.js";import"./chart-nsdZV0Dv.js";import"./app-wordmark-DDNuuq5_.js";import"./use-clipboard-D5i6e5kf.js";import"./index-BpnfuXi-.js";import"./badge-s7YDycYg.js";import"./use-live-V-slSdFJ.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./segmented-Bj70Htrs.js";import"./label-B32Ks8n7.js";import"./arrow-up-DYTCBENO.js";import"./checkbox-C2AqEZXX.js";const Le=[{test:/\bSCAN\b/i,skip:/\bUSING\s+(?:COVERING\s+)?INDEX\b/i,message:"Reads every row of the table — no index covers this filter."},{test:/\bSeq Scan\b/i,message:"Sequential scan — Postgres reads the whole table; an index on the filtered column avoids it."},{test:/\bUSING TEMP B-TREE\b/i,message:"Builds a temporary B-tree to sort — an index matching the ORDER BY removes it."},{test:/filesort/i,message:"Filesort — MySQL sorts the rows itself; an index matching the ORDER BY removes it."},{test:/\btype:\s*ALL\b/i,message:"Join type ALL — MySQL has no usable index and scans the whole table."}];function Re(t){return t.split(`
2
2
  `).flatMap((e,o)=>Le.filter(i=>i.test.test(e)&&!i.skip?.test(e)).map(i=>({line:o+1,message:i.message})))}function ft(t){const e=ge.c(86),{environment:o,window:i}=je().props,l=o.application_id,n=o.id,r=t.summary,a=t.explain?.plan??"";let q;e[0]!==a?(q=Re(a),e[0]=a,e[1]=q):q=e[1];const Y=q;let c;e[2]!==l||e[3]!==n||e[4]!==i?(c=_e(l,n,{window:i}),e[2]=l,e[3]=n,e[4]=i,e[5]=c):c=e[5];let m;e[6]!==c?(m={title:"Queries",href:c},e[6]=c,e[7]=m):m=e[7];let I;e[8]===Symbol.for("react.memo_cache_sentinel")?(I={title:"Query",href:"#"},e[8]=I):I=e[8];let d;e[9]!==m?(d=[m,I],e[9]=m,e[10]=d):d=e[10];let u;e[11]!==t.sql?(u=t.sql?s.jsx(we,{value:t.sql,label:"Copy SQL"}):void 0,e[11]=t.sql,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx(Ee,{title:"Query",actions:u}),e[13]=u,e[14]=x):x=e[14];const J=t.sql??"No samples in this window.";let f;e[15]!==J?(f=s.jsx("pre",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:J}),e[15]=J,e[16]=f):f=e[16];let h;e[17]!==t.roles?(h=t.roles.length>0&&s.jsx("div",{className:"text-muted-foreground font-mono text-[11px]",children:t.roles.map(Ue).join(" · ")}),e[17]=t.roles,e[18]=h):h=e[18];let p;e[19]!==r.count?(p=fe(r.count),e[19]=r.count,e[20]=p):p=e[20];let g;e[21]!==p?(g=s.jsx(X,{label:"Executions",value:p}),e[21]=p,e[22]=g):g=e[22];const z=r.avg/1e3;let j;e[23]!==z?(j=P(z,2),e[23]=z,e[24]=j):j=e[24];let _;e[25]!==j?(_=s.jsx(X,{label:"Avg",value:j}),e[25]=j,e[26]=_):_=e[26];const Z=r.p95/1e3;let b;e[27]!==Z?(b=P(Z,2),e[27]=Z,e[28]=b):b=e[28];const ee=r.p99/1e3;let M;e[29]!==ee?(M=P(ee,2),e[29]=ee,e[30]=M):M=e[30];const te=`p99 ${M}`;let y;e[31]!==b||e[32]!==te?(y=s.jsx(X,{label:"p95",value:b,hint:te}),e[31]=b,e[32]=te,e[33]=y):y=e[33];const se=r.max/1e3;let w;e[34]!==se?(w=P(se,2),e[34]=se,e[35]=w):w=e[35];let v;e[36]!==w?(v=s.jsx(X,{label:"Max",value:w}),e[36]=w,e[37]=v):v=e[37];let E;e[38]!==g||e[39]!==_||e[40]!==y||e[41]!==v?(E=s.jsxs(Ne,{children:[g,_,y,v]}),e[38]=g,e[39]=_,e[40]=y,e[41]=v,e[42]=E):E=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(oe,{children:s.jsx(ae,{children:"Query plan"})}),e[43]=T):T=e[43];let S;e[44]!==l||e[45]!==n||e[46]!==t.explain||e[47]!==a||e[48]!==Y?(S=s.jsxs(ie,{children:[T,s.jsx(re,{children:t.explain?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground mb-2 font-mono text-[11px]",children:[he(t.explain.occurred_at)," · ",P(t.explain.duration,2),t.explain.execution_id&&s.jsxs(s.Fragment,{children:[" · ",s.jsx(me,{className:"hover:underline",href:de(l,n,t.explain.execution_id),children:t.explain.execution_id})]})]}),s.jsx("div",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs",children:a.split(`
3
3
  `).map((Q,ce)=>{const le=Y.filter(pe=>pe.line===ce+1);return s.jsxs("div",{className:ue("py-0.5",le.length>0&&"border-warning border-l-2 pl-2"),children:[s.jsx("div",{className:ue("whitespace-pre",le.length>0&&"text-warning"),children:Q}),le.map(Oe)]},ce)})})]}):s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Enable plans for slow queries with"," ",s.jsx(xe,{children:"RAILWATCH_CAPTURE_QUERY_EXPLAIN=true"})," (threshold"," ",s.jsx(xe,{children:"RAILWATCH_EXPLAIN_THRESHOLD_MS"}),", default 100ms)"]})})]}),e[44]=l,e[45]=n,e[46]=t.explain,e[47]=a,e[48]=Y,e[49]=S):S=e[49];let N;e[50]!==t.series?(N=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(be,{legend:"outcome",label:"Executions",seriesLabel:"Executions",data:t.series}),s.jsx(ye,{label:"Duration",data:t.series})]}),e[50]=t.series,e[51]=N):N=e[51];let B;e[52]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(oe,{children:s.jsx(ae,{children:"Called from"})}),e[52]=B):B=e[52];let H,O;e[53]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ve,{icon:Ce,title:"No source captured",description:"A backtrace location wasn't available for this query."}),O=[{key:"s",header:"Source",cell:Be},{key:"n",header:"Count",align:"right",cell:Te}],e[53]=H,e[54]=O):(H=e[53],O=e[54]);let C;e[55]!==t.sources?(C=s.jsxs(ie,{children:[B,s.jsx(re,{children:s.jsx(ne,{rows:t.sources,rowKey:He,empty:H,columns:O})})]}),e[55]=t.sources,e[56]=C):C=e[56];let U;e[57]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(oe,{children:s.jsx(ae,{children:"Executions"})}),e[57]=U):U=e[57];let W;e[58]===Symbol.for("react.memo_cache_sentinel")?(W=[{key:"c",header:"Execution",cell:Ie},{key:"n",header:"Count",align:"right",cell:qe}],e[58]=W):W=e[58];let L;e[59]!==t.callers?(L=s.jsxs(ie,{children:[U,s.jsx(re,{children:s.jsx(ne,{rows:t.callers,rowKey:Me,columns:W})})]}),e[59]=t.callers,e[60]=L):L=e[60];let R;e[61]!==C||e[62]!==L?(R=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[C,L]}),e[61]=C,e[62]=L,e[63]=R):R=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($={key:"when",header:"When",cell:Pe},e[64]=$):$=e[64];let k;e[65]!==l||e[66]!==n?(k={key:"in",header:"In",cell:Q=>Q.execution_id?s.jsx(me,{className:"font-mono text-xs hover:underline",href:de(l,n,Q.execution_id),children:Q.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[65]=l,e[66]=n,e[67]=k):k=e[67];let F,G,K;e[68]===Symbol.for("react.memo_cache_sentinel")?(F={key:"rows",hideOnMobile:!0,header:"Rows",align:"right",cell:Ae},G={key:"conn",hideOnMobile:!0,header:"DB",cell:De},K={key:"d",header:"Duration",align:"right",cell:ke},e[68]=F,e[69]=G,e[70]=K):(F=e[68],G=e[69],K=e[70]);let D;e[71]!==k?(D=[$,k,F,G,K],e[71]=k,e[72]=D):D=e[72];let A;e[73]!==t.samples||e[74]!==D?(A=s.jsx(ne,{rows:t.samples,rowKey:Qe,columns:D}),e[73]=t.samples,e[74]=D,e[75]=A):A=e[75];let V;return e[76]!==E||e[77]!==S||e[78]!==N||e[79]!==R||e[80]!==d||e[81]!==A||e[82]!==x||e[83]!==f||e[84]!==h?(V=s.jsxs(Se,{title:"Query",crumbs:d,children:[x,f,h,E,S,N,R,A]}),e[76]=E,e[77]=S,e[78]=N,e[79]=R,e[80]=d,e[81]=A,e[82]=x,e[83]=f,e[84]=h,e[85]=V):V=e[85],V}function ke(t){return P(t.duration,2)}function De(t){return t.connection}function Ae(t){return t.row_count??"–"}function Pe(t){return s.jsx("span",{className:"text-xs",children:he(t.occurred_at)})}function Qe(t){return t.id}function qe(t){const[,e]=t;return e}function Ie(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function Me(t){const[e]=t;return e}function Te(t){const[,e]=t;return e}function Be(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function He(t){const[e]=t;return e}function Oe(t){return s.jsx("div",{className:"text-warning/80 mt-0.5 text-[11px] whitespace-normal",children:t.message},t.message)}function Ue(t){const[e,o]=t;return`${e} ${fe(o)}`}export{ft as default};
@@ -1,4 +1,4 @@
1
- import{r as ae,j as r,c as oe,C as fe}from"./inertia-Degv_G9N.js";import{D as G}from"./data-table-IvA7xvrK.js";import{P as he,E as _e}from"./env-layout-erSDpIXg.js";import{S as L,a as pe}from"./stat-TxvoBiC8.js";import{C as M,a as V,b as z,c as Q}from"./card-BaJ8kNkp.js";import{c as xe}from"./index-CX8Br7m9.js";import{P as le}from"./index-B0VXzXYG.js";import{c as d,b as ie}from"./format-B9SDkrWj.js";import"./chart-hover-XYPNE2CX.js";import"./empty-state-BFTnQ2oT.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./app-layout-B5Fcdwfz.js";import"./live-dot-DaXEbkXo.js";import"./checkbox-Bf41R8W6.js";import"./label-B_vK19tR.js";import"./use-live-GKze1mNC.js";import"./segmented-CVKq2Xpa.js";import"./arrow-up-DwKQcab4.js";var ye=Object.defineProperty,m=(t,e)=>ye(t,"name",{value:e,configurable:!0}),ce="Progress",se=100,[ve,ot]=xe(ce),[be,ge]=ve(ce),je=ae.forwardRef(m(function(e,a){const{__scopeProgress:o,value:i=null,max:s,getValueLabel:u=de,...l}=e;(s||s===0)&&!te(s)&&console.error(ue(`${s}`,"Progress"));const n=te(s)?s:se;i!==null&&!re(i,n)&&console.error(me(`${i}`,"Progress"));const c=re(i,n)?i:null,f=D(c)?u(c,n):void 0;return r.jsx(be,{scope:o,value:c,max:n,children:r.jsx(le.div,{"aria-valuemax":n,"aria-valuemin":0,"aria-valuenow":D(c)?c:void 0,"aria-valuetext":f,role:"progressbar","data-state":ne(c,n),"data-value":c??void 0,"data-max":n,...l,ref:a})})},"Progress")),Pe="ProgressIndicator",we=ae.forwardRef(m(function(e,a){const{__scopeProgress:o,...i}=e,s=ge(Pe,o);return r.jsx(le.div,{"data-state":ne(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...i,ref:a})},"ProgressIndicator"));function de(t,e){return`${Math.round(t/e*100)}%`}m(de,"defaultGetValueLabel");function ne(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}m(ne,"getProgressState");function D(t){return typeof t=="number"}m(D,"isNumber");function te(t){return D(t)&&!isNaN(t)&&t>0}m(te,"isValidMaxNumber");function re(t,e){return D(t)&&!isNaN(t)&&t<=e&&t>=0}m(re,"isValidValueNumber");function ue(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${se}\`.`}m(ue,"getInvalidMaxError");function me(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
1
+ import{r as ae,j as r,c as oe,C as fe}from"./inertia-CUTKXjxg.js";import{D as G}from"./data-table-CwtPkw_i.js";import{P as he,E as _e}from"./env-layout-Dkp_4NvM.js";import{S as L,a as pe}from"./stat-IghK3WjD.js";import{C as M,a as V,b as z,c as Q}from"./card-DiW-JhK3.js";import{c as xe}from"./index-BpnfuXi-.js";import{P as le}from"./index-n16aviHx.js";import{c as d,b as ie}from"./format-B9SDkrWj.js";import"./chart-hover-DMWx5-Rs.js";import"./empty-state-CshhuRUU.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./app-layout-DUk54qUM.js";import"./live-dot-Bb1UYT9F.js";import"./checkbox-C2AqEZXX.js";import"./label-B32Ks8n7.js";import"./use-live-V-slSdFJ.js";import"./segmented-Bj70Htrs.js";import"./arrow-up-DYTCBENO.js";var ye=Object.defineProperty,m=(t,e)=>ye(t,"name",{value:e,configurable:!0}),ce="Progress",se=100,[ve,ot]=xe(ce),[be,ge]=ve(ce),je=ae.forwardRef(m(function(e,a){const{__scopeProgress:o,value:i=null,max:s,getValueLabel:u=de,...l}=e;(s||s===0)&&!te(s)&&console.error(ue(`${s}`,"Progress"));const n=te(s)?s:se;i!==null&&!re(i,n)&&console.error(me(`${i}`,"Progress"));const c=re(i,n)?i:null,f=D(c)?u(c,n):void 0;return r.jsx(be,{scope:o,value:c,max:n,children:r.jsx(le.div,{"aria-valuemax":n,"aria-valuemin":0,"aria-valuenow":D(c)?c:void 0,"aria-valuetext":f,role:"progressbar","data-state":ne(c,n),"data-value":c??void 0,"data-max":n,...l,ref:a})})},"Progress")),Pe="ProgressIndicator",we=ae.forwardRef(m(function(e,a){const{__scopeProgress:o,...i}=e,s=ge(Pe,o);return r.jsx(le.div,{"data-state":ne(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...i,ref:a})},"ProgressIndicator"));function de(t,e){return`${Math.round(t/e*100)}%`}m(de,"defaultGetValueLabel");function ne(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}m(ne,"getProgressState");function D(t){return typeof t=="number"}m(D,"isNumber");function te(t){return D(t)&&!isNaN(t)&&t>0}m(te,"isValidMaxNumber");function re(t,e){return D(t)&&!isNaN(t)&&t<=e&&t>=0}m(re,"isValidValueNumber");function ue(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${se}\`.`}m(ue,"getInvalidMaxError");function me(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
2
2
  - a positive number
3
3
  - less than the value passed to \`max\` (or ${se} if no \`max\` prop is set)
4
4
  - \`null\` or \`undefined\` if the progress is indeterminate.
@@ -1 +1 @@
1
- import{c as L,u as U,ap as W,j as t,L as K,y as F,i as G}from"./inertia-Degv_G9N.js";import{C as J}from"./chart-panel-BYk68mJJ.js";import{D as z}from"./data-table-IvA7xvrK.js";import{E as A}from"./empty-state-BFTnQ2oT.js";import{P as Q,E as V}from"./env-layout-erSDpIXg.js";import{b as X}from"./series-chart-D33UhdG2.js";import{I as Y}from"./status-badge-5NCVJHjo.js";import{B as Z}from"./app-wordmark-1SRllgHv.js";import{C as M,a as T,b as q,c as B}from"./card-BaJ8kNkp.js";import{w as ee,c as R,m as se,a as te}from"./format-B9SDkrWj.js";import{ReleaseHealthStrip as re}from"./release-health-1Qzc_XhT.js";import{E as ie,O as le}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./chart-Xnrz1Nqw.js";import"./stat-TxvoBiC8.js";import"./arrow-up-DwKQcab4.js";import"./checkbox-Bf41R8W6.js";function H(s){const e=L.c(6),{rows:o,empty:l}=s;let r;e[0]!==l?(r=t.jsx(A,{icon:le,...l}),e[0]=l,e[1]=r):r=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[{key:"k",header:"Issue",cell:ne},{key:"t",header:"Title",cell:ae},{key:"s",header:"",cell:oe}],e[2]=i):i=e[2];let a;return e[3]!==o||e[4]!==r?(a=t.jsx(z,{rows:o,rowKey:me,empty:r,columns:i}),e[3]=o,e[4]=r,e[5]=a):a=e[5],a}function oe(s){return t.jsx(Y,{status:s.status})}function ae(s){return t.jsx("span",{className:"line-clamp-1 text-xs",children:s.title})}function ne(s){return t.jsx(K,{className:"font-mono text-xs hover:underline",href:G(s.id),children:s.key})}function me(s){return s.id}function Ue(s){const e=L.c(58),{environment:o,window:l}=U().props,r=o.application_id,i=o.id,a=s.release.ref;let n;e[0]!==r||e[1]!==i||e[2]!==l?(n=W(r,i,{window:l}),e[0]=r,e[1]=i,e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m={title:"Releases",href:n},e[4]=n,e[5]=m):m=e[5];let c;e[6]!==s.release.ref?(c={title:s.release.ref,href:"#"},e[6]=s.release.ref,e[7]=c):c=e[7];let d;e[8]!==m||e[9]!==c?(d=[m,c],e[8]=m,e[9]=c,e[10]=d):d=e[10];let u;e[11]!==s.release.deploy?(u=t.jsx("span",{className:"font-mono",children:s.release.deploy}),e[11]=s.release.deploy,e[12]=u):u=e[12];let g;e[13]!==s.release.deployed_at?(g=s.release.deployed_at?ee(s.release.deployed_at):"never deployed",e[13]=s.release.deployed_at,e[14]=g):g=e[14];const O=`${g}${s.release.name?` · ${s.release.name}`:""}${s.release.previous_ref?` · after ${s.release.previous_ref}`:""}`;let f;e[15]!==r||e[16]!==i||e[17]!==s.release.deploy_id?(f=s.release.deploy_id&&t.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:t.jsx(K,{href:F(r,i,s.release.deploy_id),children:"Deploy"})}),e[15]=r,e[16]=i,e[17]=s.release.deploy_id,e[18]=f):f=e[18];let h;e[19]!==u||e[20]!==O||e[21]!==f?(h=t.jsx(Q,{withWindow:!1,title:u,description:O,actions:f}),e[19]=u,e[20]=O,e[21]=f,e[22]=h):h=e[22];const D=s.release.previous_ref?`vs ${s.release.previous_ref}`:void 0;let y;e[23]!==s.previous_summary||e[24]!==s.summary||e[25]!==D?(y=t.jsx(re,{health:s.summary,previous:s.previous_summary,deltaCaption:D}),e[23]=s.previous_summary,e[24]=s.summary,e[25]=D,e[26]=y):y=e[26];let p;e[27]!==s.summary.sessions?(p=R(s.summary.sessions),e[27]=s.summary.sessions,e[28]=p):p=e[28];let x;e[29]!==s.series?(x=t.jsx(X,{data:s.series}),e[29]=s.series,e[30]=x):x=e[30];let _;e[31]!==p||e[32]!==x?(_=t.jsx(J,{label:"Sessions by status",value:p,children:x}),e[31]=p,e[32]=x,e[33]=_):_=e[33];let S;e[34]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(q,{children:t.jsx(B,{children:"Issues first seen in this release"})}),e[34]=S):S=e[34];let k;e[35]===Symbol.for("react.memo_cache_sentinel")?(k={title:"No new issues in this release",description:"Issues first seen while this release was live would show here."},e[35]=k):k=e[35];let j;e[36]!==s.new_issues?(j=t.jsxs(M,{children:[S,t.jsx(T,{children:t.jsx(H,{rows:s.new_issues,empty:k})})]}),e[36]=s.new_issues,e[37]=j):j=e[37];let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(q,{children:t.jsx(B,{children:"Issues resolved in this release"})}),e[38]=N):N=e[38];let C;e[39]===Symbol.for("react.memo_cache_sentinel")?(C={title:"No issues marked resolved in this release",description:"Issues resolved and tagged with this deploy would show here."},e[39]=C):C=e[39];let v;e[40]!==s.resolved_issues?(v=t.jsxs(M,{children:[N,t.jsx(T,{children:t.jsx(H,{rows:s.resolved_issues,empty:C})})]}),e[40]=s.resolved_issues,e[41]=v):v=e[41];let w;e[42]!==j||e[43]!==v?(w=t.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[j,v]}),e[42]=j,e[43]=v,e[44]=w):w=e[44];let E;e[45]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("h2",{className:"text-sm font-semibold",children:"Sessions"}),e[45]=E):E=e[45];let $,I;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(A,{icon:ie,title:"No sessions reported for this release",description:"Sessions come from the browser client and the gem's request middleware; config.track_sessions turns both off."}),I=[{key:"id",header:"Session",cell:xe},{key:"source",hideOnMobile:!0,header:"Source",cell:pe},{key:"status",header:"Status",cell:ye},{key:"user",hideOnMobile:!0,header:"User",cell:he},{key:"duration",header:"Duration",align:"right",cell:fe},{key:"activity",hideOnMobile:!0,header:"Requests / visits",align:"right",cell:ue},{key:"errors",hideOnMobile:!0,header:"Errors",align:"right",cell:de},{key:"started",header:"Started",align:"right",cell:ce}],e[46]=$,e[47]=I):($=e[46],I=e[47]);let b;e[48]!==s.sessions?(b=t.jsx(z,{rows:s.sessions,rowKey:je,rowClassName:_e,empty:$,columns:I}),e[48]=s.sessions,e[49]=b):b=e[49];let P;return e[50]!==s.release.ref||e[51]!==y||e[52]!==_||e[53]!==w||e[54]!==b||e[55]!==d||e[56]!==h?(P=t.jsxs(V,{title:a,crumbs:d,children:[h,y,_,w,E,b]}),e[50]=s.release.ref,e[51]=y,e[52]=_,e[53]=w,e[54]=b,e[55]=d,e[56]=h,e[57]=P):P=e[57],P}function ce(s){return te(s.started_at)}function de(s){return t.jsx("span",{className:s.errors?"text-destructive":"",children:R(s.errors)})}function ue(s){return`${R(s.requests)} / ${R(s.visits)}`}function fe(s){return se(s.duration)}function he(s){return t.jsx("span",{className:"font-mono text-xs",children:s.user_ref})}function ye(s){return t.jsx("span",{className:s.status==="crashed"?"text-destructive text-xs font-semibold":"text-xs",children:s.status})}function pe(s){return t.jsx("span",{className:"text-xs",children:s.source})}function xe(s){return t.jsx("span",{className:"font-mono text-xs",children:s.session_id})}function _e(s){return s.status==="crashed"?"bg-destructive/5":void 0}function je(s){return s.id}export{Ue as default};
1
+ import{c as L,u as U,ap as W,j as t,L as K,y as F,i as G}from"./inertia-CUTKXjxg.js";import{C as J}from"./chart-panel-BlirnMrQ.js";import{D as z}from"./data-table-CwtPkw_i.js";import{E as A}from"./empty-state-CshhuRUU.js";import{P as Q,E as V}from"./env-layout-Dkp_4NvM.js";import{b as X}from"./series-chart-C1YrNlID.js";import{I as Y}from"./status-badge-XYUN9gUA.js";import{B as Z}from"./app-wordmark-DDNuuq5_.js";import{C as M,a as T,b as q,c as B}from"./card-DiW-JhK3.js";import{w as ee,c as R,m as se,a as te}from"./format-B9SDkrWj.js";import{ReleaseHealthStrip as re}from"./release-health-DRNLZtT7.js";import{E as ie,O as le}from"./app-layout-DUk54qUM.js";import"./chart-hover-DMWx5-Rs.js";import"./badge-s7YDycYg.js";import"./use-live-V-slSdFJ.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./segmented-Bj70Htrs.js";import"./label-B32Ks8n7.js";import"./chart-nsdZV0Dv.js";import"./stat-IghK3WjD.js";import"./arrow-up-DYTCBENO.js";import"./checkbox-C2AqEZXX.js";function H(s){const e=L.c(6),{rows:o,empty:l}=s;let r;e[0]!==l?(r=t.jsx(A,{icon:le,...l}),e[0]=l,e[1]=r):r=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[{key:"k",header:"Issue",cell:ne},{key:"t",header:"Title",cell:ae},{key:"s",header:"",cell:oe}],e[2]=i):i=e[2];let a;return e[3]!==o||e[4]!==r?(a=t.jsx(z,{rows:o,rowKey:me,empty:r,columns:i}),e[3]=o,e[4]=r,e[5]=a):a=e[5],a}function oe(s){return t.jsx(Y,{status:s.status})}function ae(s){return t.jsx("span",{className:"line-clamp-1 text-xs",children:s.title})}function ne(s){return t.jsx(K,{className:"font-mono text-xs hover:underline",href:G(s.id),children:s.key})}function me(s){return s.id}function Ue(s){const e=L.c(58),{environment:o,window:l}=U().props,r=o.application_id,i=o.id,a=s.release.ref;let n;e[0]!==r||e[1]!==i||e[2]!==l?(n=W(r,i,{window:l}),e[0]=r,e[1]=i,e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m={title:"Releases",href:n},e[4]=n,e[5]=m):m=e[5];let c;e[6]!==s.release.ref?(c={title:s.release.ref,href:"#"},e[6]=s.release.ref,e[7]=c):c=e[7];let d;e[8]!==m||e[9]!==c?(d=[m,c],e[8]=m,e[9]=c,e[10]=d):d=e[10];let u;e[11]!==s.release.deploy?(u=t.jsx("span",{className:"font-mono",children:s.release.deploy}),e[11]=s.release.deploy,e[12]=u):u=e[12];let g;e[13]!==s.release.deployed_at?(g=s.release.deployed_at?ee(s.release.deployed_at):"never deployed",e[13]=s.release.deployed_at,e[14]=g):g=e[14];const O=`${g}${s.release.name?` · ${s.release.name}`:""}${s.release.previous_ref?` · after ${s.release.previous_ref}`:""}`;let f;e[15]!==r||e[16]!==i||e[17]!==s.release.deploy_id?(f=s.release.deploy_id&&t.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:t.jsx(K,{href:F(r,i,s.release.deploy_id),children:"Deploy"})}),e[15]=r,e[16]=i,e[17]=s.release.deploy_id,e[18]=f):f=e[18];let h;e[19]!==u||e[20]!==O||e[21]!==f?(h=t.jsx(Q,{withWindow:!1,title:u,description:O,actions:f}),e[19]=u,e[20]=O,e[21]=f,e[22]=h):h=e[22];const D=s.release.previous_ref?`vs ${s.release.previous_ref}`:void 0;let y;e[23]!==s.previous_summary||e[24]!==s.summary||e[25]!==D?(y=t.jsx(re,{health:s.summary,previous:s.previous_summary,deltaCaption:D}),e[23]=s.previous_summary,e[24]=s.summary,e[25]=D,e[26]=y):y=e[26];let p;e[27]!==s.summary.sessions?(p=R(s.summary.sessions),e[27]=s.summary.sessions,e[28]=p):p=e[28];let x;e[29]!==s.series?(x=t.jsx(X,{data:s.series}),e[29]=s.series,e[30]=x):x=e[30];let _;e[31]!==p||e[32]!==x?(_=t.jsx(J,{label:"Sessions by status",value:p,children:x}),e[31]=p,e[32]=x,e[33]=_):_=e[33];let S;e[34]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(q,{children:t.jsx(B,{children:"Issues first seen in this release"})}),e[34]=S):S=e[34];let k;e[35]===Symbol.for("react.memo_cache_sentinel")?(k={title:"No new issues in this release",description:"Issues first seen while this release was live would show here."},e[35]=k):k=e[35];let j;e[36]!==s.new_issues?(j=t.jsxs(M,{children:[S,t.jsx(T,{children:t.jsx(H,{rows:s.new_issues,empty:k})})]}),e[36]=s.new_issues,e[37]=j):j=e[37];let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(q,{children:t.jsx(B,{children:"Issues resolved in this release"})}),e[38]=N):N=e[38];let C;e[39]===Symbol.for("react.memo_cache_sentinel")?(C={title:"No issues marked resolved in this release",description:"Issues resolved and tagged with this deploy would show here."},e[39]=C):C=e[39];let v;e[40]!==s.resolved_issues?(v=t.jsxs(M,{children:[N,t.jsx(T,{children:t.jsx(H,{rows:s.resolved_issues,empty:C})})]}),e[40]=s.resolved_issues,e[41]=v):v=e[41];let w;e[42]!==j||e[43]!==v?(w=t.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[j,v]}),e[42]=j,e[43]=v,e[44]=w):w=e[44];let E;e[45]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("h2",{className:"text-sm font-semibold",children:"Sessions"}),e[45]=E):E=e[45];let $,I;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(A,{icon:ie,title:"No sessions reported for this release",description:"Sessions come from the browser client and the gem's request middleware; config.track_sessions turns both off."}),I=[{key:"id",header:"Session",cell:xe},{key:"source",hideOnMobile:!0,header:"Source",cell:pe},{key:"status",header:"Status",cell:ye},{key:"user",hideOnMobile:!0,header:"User",cell:he},{key:"duration",header:"Duration",align:"right",cell:fe},{key:"activity",hideOnMobile:!0,header:"Requests / visits",align:"right",cell:ue},{key:"errors",hideOnMobile:!0,header:"Errors",align:"right",cell:de},{key:"started",header:"Started",align:"right",cell:ce}],e[46]=$,e[47]=I):($=e[46],I=e[47]);let b;e[48]!==s.sessions?(b=t.jsx(z,{rows:s.sessions,rowKey:je,rowClassName:_e,empty:$,columns:I}),e[48]=s.sessions,e[49]=b):b=e[49];let P;return e[50]!==s.release.ref||e[51]!==y||e[52]!==_||e[53]!==w||e[54]!==b||e[55]!==d||e[56]!==h?(P=t.jsxs(V,{title:a,crumbs:d,children:[h,y,_,w,E,b]}),e[50]=s.release.ref,e[51]=y,e[52]=_,e[53]=w,e[54]=b,e[55]=d,e[56]=h,e[57]=P):P=e[57],P}function ce(s){return te(s.started_at)}function de(s){return t.jsx("span",{className:s.errors?"text-destructive":"",children:R(s.errors)})}function ue(s){return`${R(s.requests)} / ${R(s.visits)}`}function fe(s){return se(s.duration)}function he(s){return t.jsx("span",{className:"font-mono text-xs",children:s.user_ref})}function ye(s){return t.jsx("span",{className:s.status==="crashed"?"text-destructive text-xs font-semibold":"text-xs",children:s.status})}function pe(s){return t.jsx("span",{className:"text-xs",children:s.source})}function xe(s){return t.jsx("span",{className:"font-mono text-xs",children:s.session_id})}function _e(s){return s.status==="crashed"?"bg-destructive/5":void 0}function je(s){return s.id}export{Ue as default};
@@ -1 +1 @@
1
- import{c as R,g as T,j as n,H,e as y,l as S,m as $,L as q,o as I,p as K,q as F,s as G}from"./inertia-Degv_G9N.js";import{D as J}from"./data-table-IvA7xvrK.js";import{O as M}from"./onboarding-C_Y3xTsH.js";import{B as D}from"./badge-CApjyWcg.js";import{B as w}from"./app-wordmark-1SRllgHv.js";import{A as Q}from"./app-layout-B5Fcdwfz.js";import{a as U,c as V}from"./format-B9SDkrWj.js";import"./chart-hover-XYPNE2CX.js";import"./empty-state-BFTnQ2oT.js";import"./copy-block-zykZWQym.js";import"./use-clipboard-BLjjYH8V.js";import"./index-CX8Br7m9.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./card-BaJ8kNkp.js";import"./checkbox-Bf41R8W6.js";import"./label-B_vK19tR.js";function _e(t){const e=R.c(54),i=t.application,B=i.name;let l;e[0]!==i.id?(l=T(i.id),e[0]=i.id,e[1]=l):l=e[1];let a;e[2]!==i.name||e[3]!==l?(a=[{title:B,href:l}],e[2]=i.name,e[3]=l,e[4]=a):a=e[4];let o;e[5]!==i.name?(o=n.jsx(H,{title:i.name}),e[5]=i.name,e[6]=o):o=e[6];let r;e[7]!==i.name?(r=n.jsx("h1",{className:"text-xl font-semibold",children:i.name}),e[7]=i.name,e[8]=r):r=e[8];let m;e[9]!==i.issue_prefix?(m=n.jsx("span",{className:"font-mono",children:i.issue_prefix}),e[9]=i.issue_prefix,e[10]=m):m=e[10];let d;e[11]!==t.issues_open||e[12]!==m?(d=n.jsxs("p",{className:"text-muted-foreground text-sm",children:["Issue prefix ",m," ","· ",t.issues_open," open issues"]}),e[11]=t.issues_open,e[12]=m,e[13]=d):d=e[13];let c;e[14]!==r||e[15]!==d?(c=n.jsxs("div",{children:[r,d]}),e[14]=r,e[15]=d,e[16]=c):c=e[16];let p;e[17]!==i.id?(p=n.jsx(w,{variant:"outline",size:"sm",onClick:()=>y.visit(S(i.id)),children:"Edit"}),e[17]=i.id,e[18]=p):p=e[18];let f;e[19]!==i.id?(f=n.jsx(w,{size:"sm",onClick:()=>y.visit($(i.id)),children:"Add environment"}),e[19]=i.id,e[20]=f):f=e[20];let u;e[21]!==p||e[22]!==f?(u=n.jsxs("div",{className:"flex gap-2",children:[p,f]}),e[21]=p,e[22]=f,e[23]=u):u=e[23];let x;e[24]!==u||e[25]!==c?(x=n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[c,u]}),e[24]=u,e[25]=c,e[26]=x):x=e[26];let h;e[27]!==t.environments||e[28]!==t.new_token?(h=t.new_token&&(()=>{const s=t.new_token,L=t.environments.find(O=>O.token_prefix===s.slice(0,12));return n.jsx(M,{tokenPrefix:L?.token_prefix??s.slice(0,12),newToken:s})})(),e[27]=t.environments,e[28]=t.new_token,e[29]=h):h=e[29];let v;e[30]!==i.id?(v={key:"n",header:"Environment",cell:s=>n.jsx(q,{className:"font-medium hover:underline",href:I(i.id,s.id),children:s.name})},e[30]=i.id,e[31]=v):v=e[31];let N,E,P,b,A,z;e[32]===Symbol.for("react.memo_cache_sentinel")?(N={key:"tok",header:"Token",cell:te},E={key:"seen",header:"Last event",cell:ee},P={key:"ev",header:"Events (month)",align:"right",cell:Z},b={key:"d",header:"Deploys",align:"right",cell:Y},A={key:"i",header:"Open issues",align:"right",cell:X},z={key:"st",header:"",cell:W},e[32]=N,e[33]=E,e[34]=P,e[35]=b,e[36]=A,e[37]=z):(N=e[32],E=e[33],P=e[34],b=e[35],A=e[36],z=e[37]);let k;e[38]!==i.id?(k={key:"x",header:"",align:"right",cell:s=>n.jsxs("span",{className:"flex justify-end gap-1",children:[n.jsx(w,{size:"sm",variant:"ghost",onClick:()=>y.post(K(i.id,s.id)),children:"Rotate token"}),n.jsx(w,{size:"sm",variant:"ghost",onClick:()=>y.post(F(i.id,s.id)),children:s.paused?"Resume":"Pause"}),n.jsx(w,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>confirm(`Delete ${s.name} and all its telemetry?`)&&y.delete(G(i.id,s.id)),children:"Delete"})]})},e[38]=i.id,e[39]=k):k=e[39];let j;e[40]!==v||e[41]!==k?(j=[v,N,E,P,b,A,z,k],e[40]=v,e[41]=k,e[42]=j):j=e[42];let _;e[43]!==t.environments||e[44]!==j?(_=n.jsx(J,{rows:t.environments,rowKey:ie,columns:j}),e[43]=t.environments,e[44]=j,e[45]=_):_=e[45];let g;e[46]!==x||e[47]!==h||e[48]!==_?(g=n.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6",children:[x,h,_]}),e[46]=x,e[47]=h,e[48]=_,e[49]=g):g=e[49];let C;return e[50]!==a||e[51]!==g||e[52]!==o?(C=n.jsxs(Q,{breadcrumbs:a,children:[o,g]}),e[50]=a,e[51]=g,e[52]=o,e[53]=C):C=e[53],C}function W(t){return t.paused?n.jsx(D,{variant:"secondary",children:"paused"}):null}function X(t){return t.open_issues?n.jsx(D,{variant:"destructive",children:t.open_issues}):0}function Y(t){return t.deploys_count}function Z(t){return V(t.events_this_month)}function ee(t){return t.last_seen_at?U(t.last_seen_at):n.jsx("span",{className:"text-muted-foreground",children:"never"})}function te(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.token_prefix,"…"]})}function ie(t){return t.id}export{_e as default};
1
+ import{c as R,g as T,j as n,H,e as y,l as S,m as $,L as q,o as I,p as K,q as F,s as G}from"./inertia-CUTKXjxg.js";import{D as J}from"./data-table-CwtPkw_i.js";import{O as M}from"./onboarding-BqEuP-Ml.js";import{B as D}from"./badge-s7YDycYg.js";import{B as w}from"./app-wordmark-DDNuuq5_.js";import{A as Q}from"./app-layout-DUk54qUM.js";import{a as U,c as V}from"./format-B9SDkrWj.js";import"./chart-hover-DMWx5-Rs.js";import"./empty-state-CshhuRUU.js";import"./copy-block-D1myf7is.js";import"./use-clipboard-D5i6e5kf.js";import"./index-BpnfuXi-.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./card-DiW-JhK3.js";import"./checkbox-C2AqEZXX.js";import"./label-B32Ks8n7.js";function _e(t){const e=R.c(54),i=t.application,B=i.name;let l;e[0]!==i.id?(l=T(i.id),e[0]=i.id,e[1]=l):l=e[1];let a;e[2]!==i.name||e[3]!==l?(a=[{title:B,href:l}],e[2]=i.name,e[3]=l,e[4]=a):a=e[4];let o;e[5]!==i.name?(o=n.jsx(H,{title:i.name}),e[5]=i.name,e[6]=o):o=e[6];let r;e[7]!==i.name?(r=n.jsx("h1",{className:"text-xl font-semibold",children:i.name}),e[7]=i.name,e[8]=r):r=e[8];let m;e[9]!==i.issue_prefix?(m=n.jsx("span",{className:"font-mono",children:i.issue_prefix}),e[9]=i.issue_prefix,e[10]=m):m=e[10];let d;e[11]!==t.issues_open||e[12]!==m?(d=n.jsxs("p",{className:"text-muted-foreground text-sm",children:["Issue prefix ",m," ","· ",t.issues_open," open issues"]}),e[11]=t.issues_open,e[12]=m,e[13]=d):d=e[13];let c;e[14]!==r||e[15]!==d?(c=n.jsxs("div",{children:[r,d]}),e[14]=r,e[15]=d,e[16]=c):c=e[16];let p;e[17]!==i.id?(p=n.jsx(w,{variant:"outline",size:"sm",onClick:()=>y.visit(S(i.id)),children:"Edit"}),e[17]=i.id,e[18]=p):p=e[18];let f;e[19]!==i.id?(f=n.jsx(w,{size:"sm",onClick:()=>y.visit($(i.id)),children:"Add environment"}),e[19]=i.id,e[20]=f):f=e[20];let u;e[21]!==p||e[22]!==f?(u=n.jsxs("div",{className:"flex gap-2",children:[p,f]}),e[21]=p,e[22]=f,e[23]=u):u=e[23];let x;e[24]!==u||e[25]!==c?(x=n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[c,u]}),e[24]=u,e[25]=c,e[26]=x):x=e[26];let h;e[27]!==t.environments||e[28]!==t.new_token?(h=t.new_token&&(()=>{const s=t.new_token,L=t.environments.find(O=>O.token_prefix===s.slice(0,12));return n.jsx(M,{tokenPrefix:L?.token_prefix??s.slice(0,12),newToken:s})})(),e[27]=t.environments,e[28]=t.new_token,e[29]=h):h=e[29];let v;e[30]!==i.id?(v={key:"n",header:"Environment",cell:s=>n.jsx(q,{className:"font-medium hover:underline",href:I(i.id,s.id),children:s.name})},e[30]=i.id,e[31]=v):v=e[31];let N,E,P,b,A,z;e[32]===Symbol.for("react.memo_cache_sentinel")?(N={key:"tok",header:"Token",cell:te},E={key:"seen",header:"Last event",cell:ee},P={key:"ev",header:"Events (month)",align:"right",cell:Z},b={key:"d",header:"Deploys",align:"right",cell:Y},A={key:"i",header:"Open issues",align:"right",cell:X},z={key:"st",header:"",cell:W},e[32]=N,e[33]=E,e[34]=P,e[35]=b,e[36]=A,e[37]=z):(N=e[32],E=e[33],P=e[34],b=e[35],A=e[36],z=e[37]);let k;e[38]!==i.id?(k={key:"x",header:"",align:"right",cell:s=>n.jsxs("span",{className:"flex justify-end gap-1",children:[n.jsx(w,{size:"sm",variant:"ghost",onClick:()=>y.post(K(i.id,s.id)),children:"Rotate token"}),n.jsx(w,{size:"sm",variant:"ghost",onClick:()=>y.post(F(i.id,s.id)),children:s.paused?"Resume":"Pause"}),n.jsx(w,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>confirm(`Delete ${s.name} and all its telemetry?`)&&y.delete(G(i.id,s.id)),children:"Delete"})]})},e[38]=i.id,e[39]=k):k=e[39];let j;e[40]!==v||e[41]!==k?(j=[v,N,E,P,b,A,z,k],e[40]=v,e[41]=k,e[42]=j):j=e[42];let _;e[43]!==t.environments||e[44]!==j?(_=n.jsx(J,{rows:t.environments,rowKey:ie,columns:j}),e[43]=t.environments,e[44]=j,e[45]=_):_=e[45];let g;e[46]!==x||e[47]!==h||e[48]!==_?(g=n.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6",children:[x,h,_]}),e[46]=x,e[47]=h,e[48]=_,e[49]=g):g=e[49];let C;return e[50]!==a||e[51]!==g||e[52]!==o?(C=n.jsxs(Q,{breadcrumbs:a,children:[o,g]}),e[50]=a,e[51]=g,e[52]=o,e[53]=C):C=e[53],C}function W(t){return t.paused?n.jsx(D,{variant:"secondary",children:"paused"}):null}function X(t){return t.open_issues?n.jsx(D,{variant:"destructive",children:t.open_issues}):0}function Y(t){return t.deploys_count}function Z(t){return V(t.events_this_month)}function ee(t){return t.last_seen_at?U(t.last_seen_at):n.jsx("span",{className:"text-muted-foreground",children:"never"})}function te(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.token_prefix,"…"]})}function ie(t){return t.id}export{_e as default};
@@ -1,2 +1,2 @@
1
- import{c as L,r as z,j as s,aW as B,F as $,u as V,H as J,a2 as H,aX as M,e as I,aY as W}from"./inertia-Degv_G9N.js";import{G as q}from"./google-sign-in-button-DJRoD72g.js";import{H as E,S as U}from"./layout-C8q7GUlZ.js";import{I as g}from"./input-error-C6SqO_iU.js";import{B as S}from"./app-wordmark-1SRllgHv.js";import{v as K,D as Y,a as Z,s as X,w as Q,c as ee,b as se}from"./live-dot-DaXEbkXo.js";import{L as N,I as D}from"./label-B_vK19tR.js";import{C as R}from"./copy-block-zykZWQym.js";import{A as te}from"./app-layout-B5Fcdwfz.js";import{K as re}from"./transition-Ds6Cakuc.js";import"./separator-CrM10Oot.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./use-clipboard-BLjjYH8V.js";import"./checkbox-Bf41R8W6.js";function ae(t){const e=L.c(22),{blockingAccounts:r,provider:a,recentlyAuthenticated:o,email:n}=t,w=z.useRef(null);let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(E,{title:"Delete user",description:"Delete your login and personal settings. Shared account data stays with its remaining owners."}),e[0]=j):j=e[0];let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[s.jsx("p",{className:"font-medium",children:"Warning"}),s.jsx("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),e[1]=f):f=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{asChild:!0,children:s.jsx(S,{variant:"destructive",children:"Delete user"})}),e[2]=l):l=e[2];let y,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Y,{children:"Are you sure you want to delete your user?"}),c=s.jsx(Z,{children:"This deletes your login, sessions, and personal settings. It does not delete shared accounts or their telemetry. Transfer or delete every account you solely own first."}),e[3]=y,e[4]=c):(y=e[3],c=e[4]);let d;e[5]!==r?(d=r.length>0&&s.jsxs("div",{className:"border-destructive/30 bg-destructive/5 rounded-md border p-3 text-sm",children:["Transfer or delete these accounts first:"," ",r.map(oe).join(", "),"."]}),e[5]=r,e[6]=d):d=e[6];let i;e[7]!==a||e[8]!==o?(i=a&&!o&&s.jsx(q,{label:"Confirm with Google",reauthenticateFor:"user",separated:!1}),e[7]=a,e[8]=o,e[9]=i):i=e[9];let m,u,_;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=B(),_={preserveScroll:!0},m=()=>w.current?.focus(),e[10]=m,e[11]=u,e[12]=_):(m=e[10],u=e[11],_=e[12]);let p;e[13]!==r.length||e[14]!==n||e[15]!==a||e[16]!==o?(p=s.jsx($,{method:"delete",action:u,options:_,onError:m,resetOnSuccess:!0,className:"space-y-6",children:v=>{const{resetAndClearErrors:b,processing:k,errors:x}=v;return s.jsxs(s.Fragment,{children:[a?s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"user-deletion-confirmation",children:"Enter your email to confirm"}),s.jsx(D,{id:"user-deletion-confirmation",name:"confirmation",placeholder:n,autoComplete:"off"}),s.jsx(g,{messages:x.password_challenge})]}):s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"password_challenge",className:"sr-only",children:"Password"}),s.jsx(D,{id:"password_challenge",type:"password",name:"password_challenge",ref:w,placeholder:"Password",autoComplete:"current-password"}),s.jsx(g,{messages:x.password_challenge})]}),s.jsx(g,{messages:x.account_ownership}),s.jsxs(X,{children:[s.jsx(Q,{asChild:!0,children:s.jsx(S,{variant:"secondary",onClick:()=>b(),children:"Cancel"})}),s.jsx(S,{variant:"destructive",disabled:k||r.length>0||!!a&&!o,asChild:!0,children:s.jsx("button",{type:"submit",children:"Delete user"})})]})]})}}),e[13]=r.length,e[14]=n,e[15]=a,e[16]=o,e[17]=p):p=e[17];let h;return e[18]!==p||e[19]!==d||e[20]!==i?(h=s.jsxs("div",{className:"space-y-6",children:[j,s.jsxs("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[f,s.jsxs(ee,{children:[l,s.jsxs(se,{children:[y,c,d,i,p]})]})]})]}),e[18]=p,e[19]=d,e[20]=i,e[21]=h):h=e[21],h}function oe(t){return t.name}const ne="rwp_your_token_here";function ie(t,e){const r=`Bearer ${e??ne}`;return[{id:"claude-code",label:"Claude Code",hint:"Run this in the project you want the assistant to work in.",code:`claude mcp add railwatch --transport http ${t} --header "Authorization: ${r}"`},{id:"claude-desktop",label:"Claude Desktop",hint:"claude_desktop_config.json — Claude Desktop speaks stdio, so mcp-remote bridges it to HTTP.",code:JSON.stringify({mcpServers:{railwatch:{command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"cursor",label:"Cursor",hint:".cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project.",code:JSON.stringify({mcpServers:{railwatch:{url:t,headers:{Authorization:r}}}},null,2)},{id:"vscode",label:"VS Code",hint:".vscode/mcp.json in the workspace.",code:JSON.stringify({servers:{railwatch:{type:"http",url:t,headers:{Authorization:r}}}},null,2)},{id:"zed",label:"Zed",hint:"settings.json — also via the mcp-remote bridge.",code:JSON.stringify({context_servers:{railwatch:{source:"custom",command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"curl",label:"Test it with curl",hint:"Lists every tool the server exposes. If this returns JSON, the token works.",code:[`curl -sS ${t} \\`,` -H "Authorization: ${r}" \\`,' -H "Content-Type: application/json" \\',` -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'`].join(`
1
+ import{c as L,r as z,j as s,aW as B,F as $,u as V,H as J,a2 as H,aX as M,e as I,aY as W}from"./inertia-CUTKXjxg.js";import{G as q}from"./google-sign-in-button-CAvsXYb4.js";import{H as E,S as U}from"./layout-5ZhRtywp.js";import{I as g}from"./input-error-C8ycyeD0.js";import{B as S}from"./app-wordmark-DDNuuq5_.js";import{v as K,D as Y,a as Z,s as X,w as Q,c as ee,b as se}from"./live-dot-Bb1UYT9F.js";import{L as N,I as D}from"./label-B32Ks8n7.js";import{C as R}from"./copy-block-D1myf7is.js";import{A as te}from"./app-layout-DUk54qUM.js";import{K as re}from"./transition-DpTb9Yiv.js";import"./separator-UUo0bkyc.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./use-clipboard-D5i6e5kf.js";import"./checkbox-C2AqEZXX.js";function ae(t){const e=L.c(22),{blockingAccounts:r,provider:a,recentlyAuthenticated:o,email:n}=t,w=z.useRef(null);let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(E,{title:"Delete user",description:"Delete your login and personal settings. Shared account data stays with its remaining owners."}),e[0]=j):j=e[0];let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[s.jsx("p",{className:"font-medium",children:"Warning"}),s.jsx("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),e[1]=f):f=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{asChild:!0,children:s.jsx(S,{variant:"destructive",children:"Delete user"})}),e[2]=l):l=e[2];let y,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Y,{children:"Are you sure you want to delete your user?"}),c=s.jsx(Z,{children:"This deletes your login, sessions, and personal settings. It does not delete shared accounts or their telemetry. Transfer or delete every account you solely own first."}),e[3]=y,e[4]=c):(y=e[3],c=e[4]);let d;e[5]!==r?(d=r.length>0&&s.jsxs("div",{className:"border-destructive/30 bg-destructive/5 rounded-md border p-3 text-sm",children:["Transfer or delete these accounts first:"," ",r.map(oe).join(", "),"."]}),e[5]=r,e[6]=d):d=e[6];let i;e[7]!==a||e[8]!==o?(i=a&&!o&&s.jsx(q,{label:"Confirm with Google",reauthenticateFor:"user",separated:!1}),e[7]=a,e[8]=o,e[9]=i):i=e[9];let m,u,_;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=B(),_={preserveScroll:!0},m=()=>w.current?.focus(),e[10]=m,e[11]=u,e[12]=_):(m=e[10],u=e[11],_=e[12]);let p;e[13]!==r.length||e[14]!==n||e[15]!==a||e[16]!==o?(p=s.jsx($,{method:"delete",action:u,options:_,onError:m,resetOnSuccess:!0,className:"space-y-6",children:v=>{const{resetAndClearErrors:b,processing:k,errors:x}=v;return s.jsxs(s.Fragment,{children:[a?s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"user-deletion-confirmation",children:"Enter your email to confirm"}),s.jsx(D,{id:"user-deletion-confirmation",name:"confirmation",placeholder:n,autoComplete:"off"}),s.jsx(g,{messages:x.password_challenge})]}):s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"password_challenge",className:"sr-only",children:"Password"}),s.jsx(D,{id:"password_challenge",type:"password",name:"password_challenge",ref:w,placeholder:"Password",autoComplete:"current-password"}),s.jsx(g,{messages:x.password_challenge})]}),s.jsx(g,{messages:x.account_ownership}),s.jsxs(X,{children:[s.jsx(Q,{asChild:!0,children:s.jsx(S,{variant:"secondary",onClick:()=>b(),children:"Cancel"})}),s.jsx(S,{variant:"destructive",disabled:k||r.length>0||!!a&&!o,asChild:!0,children:s.jsx("button",{type:"submit",children:"Delete user"})})]})]})}}),e[13]=r.length,e[14]=n,e[15]=a,e[16]=o,e[17]=p):p=e[17];let h;return e[18]!==p||e[19]!==d||e[20]!==i?(h=s.jsxs("div",{className:"space-y-6",children:[j,s.jsxs("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[f,s.jsxs(ee,{children:[l,s.jsxs(se,{children:[y,c,d,i,p]})]})]})]}),e[18]=p,e[19]=d,e[20]=i,e[21]=h):h=e[21],h}function oe(t){return t.name}const ne="rwp_your_token_here";function ie(t,e){const r=`Bearer ${e??ne}`;return[{id:"claude-code",label:"Claude Code",hint:"Run this in the project you want the assistant to work in.",code:`claude mcp add railwatch --transport http ${t} --header "Authorization: ${r}"`},{id:"claude-desktop",label:"Claude Desktop",hint:"claude_desktop_config.json — Claude Desktop speaks stdio, so mcp-remote bridges it to HTTP.",code:JSON.stringify({mcpServers:{railwatch:{command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"cursor",label:"Cursor",hint:".cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project.",code:JSON.stringify({mcpServers:{railwatch:{url:t,headers:{Authorization:r}}}},null,2)},{id:"vscode",label:"VS Code",hint:".vscode/mcp.json in the workspace.",code:JSON.stringify({servers:{railwatch:{type:"http",url:t,headers:{Authorization:r}}}},null,2)},{id:"zed",label:"Zed",hint:"settings.json — also via the mcp-remote bridge.",code:JSON.stringify({context_servers:{railwatch:{source:"custom",command:"npx",args:["-y","mcp-remote",t,"--header",`Authorization: ${r}`]}}},null,2)},{id:"curl",label:"Test it with curl",hint:"Lists every tool the server exposes. If this returns JSON, the token works.",code:[`curl -sS ${t} \\`,` -H "Authorization: ${r}" \\`,' -H "Content-Type: application/json" \\',` -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'`].join(`
2
2
  `)}]}function le(t){const e=L.c(5),{url:r,token:a}=t;let o;e[0]!==a||e[1]!==r?(o=ie(r,a).map(ce),e[0]=a,e[1]=r,e[2]=o):o=e[2];let n;return e[3]!==o?(n=s.jsx("div",{className:"space-y-4",children:o}),e[3]=o,e[4]=n):n=e[4],n}function ce(t){return s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-sm font-medium",children:t.label}),s.jsx("p",{className:"text-muted-foreground text-xs",children:t.hint}),s.jsx(R,{code:t.code,className:"mt-1.5"})]},t.id)}const T=[{title:"Profile settings",href:H()}],de=[{value:"github",label:"GitHub"},{value:"gitlab",label:"GitLab"},{value:"vscode",label:"VS Code"},{value:"cursor",label:"Cursor"},{value:"zed",label:"Zed"},{value:"rubymine",label:"RubyMine"},{value:"textmate",label:"TextMate"}],me=["vscode","cursor","zed","rubymine","textmate"];function Fe(t){const e=L.c(43),{auth:r}=V().props,[a,o]=z.useState(r.user.editor);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(J,{title:T[T.length-1].title}),e[0]=n):n=e[0];let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(E,{title:"Profile information",description:"Update your name and where source links open"}),e[1]=w):w=e[1];let j,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=H(),f={preserveScroll:!0},e[2]=j,e[3]=f):(j=e[2],f=e[3]);let l;e[4]!==r.user.editor_root||e[5]!==r.user.name||e[6]!==a||e[7]!==t.weekly_digest?(l=s.jsxs("div",{className:"space-y-6",children:[w,s.jsx($,{method:"patch",action:j,options:f,className:"space-y-6",children:F=>{const{errors:P,processing:C,recentlySuccessful:G}=F;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"name",children:"Name"}),s.jsx(D,{id:"name",name:"name",className:"mt-1 block w-full",defaultValue:r.user.name,required:!0,autoComplete:"name",placeholder:"Full name"}),s.jsx(g,{className:"mt-2",messages:P.name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"editor",children:"Editor"}),s.jsx("select",{id:"editor",name:"editor",value:a,onChange:O=>o(O.target.value),className:"border-input bg-background h-9 rounded-md border px-3 text-sm",children:de.map(xe)}),s.jsx(g,{className:"mt-2",messages:P.editor}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"Where a file:line in a stack trace opens — the application's repository, or this machine's editor."})]}),me.includes(a)&&s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"editor_root",children:"Local checkout path"}),s.jsx(D,{id:"editor_root",name:"editor_root",className:"mt-1 block w-full",defaultValue:r.user.editor_root??"",placeholder:"/Users/you/code/widgets"}),s.jsx(g,{className:"mt-2",messages:P.editor_root})]}),s.jsxs("label",{className:"flex items-start gap-3 text-sm",children:[s.jsx("input",{type:"hidden",name:"weekly_digest",value:"0"}),s.jsx("input",{type:"checkbox",name:"weekly_digest",value:"1",defaultChecked:t.weekly_digest,className:"mt-0.5"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-medium",children:"Weekly digest"}),s.jsx("span",{className:"text-muted-foreground block text-xs",children:"A Monday email with requests, p95, failures, new and resolved issues, and deploys for each account you belong to."})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(S,{disabled:C,children:"Save"}),s.jsx(re,{show:G,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:s.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}})]}),e[4]=r.user.editor_root,e[5]=r.user.name,e[6]=a,e[7]=t.weekly_digest,e[8]=l):l=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(E,{title:"API & MCP tokens",description:"Create independently revocable tokens with only the surfaces, actions, and applications each client needs."}),e[9]=y):y=e[9];let c;e[10]!==t.mcp_token?(c=t.mcp_token&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-sm",children:"Your new API & MCP token (shown once, copy it now):"}),s.jsx(R,{code:t.mcp_token})]}),e[10]=t.mcp_token,e[11]=c):c=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=M(),e[12]=d):d=e[12];let i;e[13]!==t.token_scopes||e[14]!==t.token_targets?(i=s.jsx($,{method:"post",action:d,className:"grid gap-4 rounded-md border p-4",children:F=>{const{processing:P,errors:C}=F;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"token-name",children:"Token name"}),s.jsx(D,{id:"token-name",name:"name",defaultValue:"API & MCP token",maxLength:100,required:!0}),s.jsx(g,{messages:C.name})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"token-restriction",children:"Data access"}),s.jsx("select",{id:"token-restriction",name:"restriction",className:"border-input bg-background h-9 rounded-md border px-3 text-sm",children:t.token_targets.map(pe)}),s.jsx(g,{messages:C.restriction})]}),s.jsxs("fieldset",{className:"grid gap-2",children:[s.jsx("legend",{className:"text-sm font-medium",children:"Scopes"}),s.jsx("input",{type:"hidden",name:"scopes_present",value:"1"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:t.token_scopes.map(he)}),s.jsx(g,{messages:C.scopes})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(N,{htmlFor:"token-expiry",children:"Expiry"}),s.jsxs("select",{id:"token-expiry",name:"expires_in_days",className:"border-input bg-background h-9 rounded-md border px-3 text-sm",defaultValue:"0",children:[s.jsx("option",{value:"0",children:"Never"}),s.jsx("option",{value:"7",children:"7 days"}),s.jsx("option",{value:"30",children:"30 days"}),s.jsx("option",{value:"90",children:"90 days"}),s.jsx("option",{value:"365",children:"1 year"})]}),s.jsx(g,{messages:C.expires_in_days})]}),s.jsx(S,{className:"w-fit",disabled:P,children:"Generate token"})]})}}),e[13]=t.token_scopes,e[14]=t.token_targets,e[15]=i):i=e[15];let m;e[16]!==t.api_tokens?(m=t.api_tokens.length===0?s.jsx("p",{className:"text-muted-foreground text-sm",children:"No API tokens yet."}):t.api_tokens.map(ue),e[16]=t.api_tokens,e[17]=m):m=e[17];let u;e[18]!==m?(u=s.jsx("div",{className:"space-y-3",children:m}),e[18]=m,e[19]=u):u=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm font-medium",children:"Connect an assistant"}),e[20]=_):_=e[20];const p=t.mcp_token?"These blocks already contain the token above. Paste one into your client and restart it.":"Generate a token to get these blocks filled in — until then they carry a placeholder. The same output comes from bin/rails railwatch:mcp in your app.";let h;e[21]!==p?(h=s.jsxs("div",{children:[_,s.jsx("p",{className:"text-muted-foreground text-xs",children:p})]}),e[21]=p,e[22]=h):h=e[22];let v;e[23]!==t.mcp_token||e[24]!==t.mcp_url?(v=s.jsx(le,{url:t.mcp_url,token:t.mcp_token}),e[23]=t.mcp_token,e[24]=t.mcp_url,e[25]=v):v=e[25];let b;e[26]!==h||e[27]!==v?(b=s.jsxs("div",{className:"space-y-3 border-t pt-6",children:[h,v]}),e[26]=h,e[27]=v,e[28]=b):b=e[28];let k;e[29]!==u||e[30]!==b||e[31]!==c||e[32]!==i?(k=s.jsxs("div",{className:"space-y-6",children:[y,c,i,u,b]}),e[29]=u,e[30]=b,e[31]=c,e[32]=i,e[33]=k):k=e[33];let x;e[34]!==r.session.recently_authenticated||e[35]!==r.user.email||e[36]!==r.user.provider||e[37]!==t.deletion.blocking_accounts?(x=s.jsx(ae,{blockingAccounts:t.deletion.blocking_accounts,provider:r.user.provider,recentlyAuthenticated:r.session.recently_authenticated,email:r.user.email}),e[34]=r.session.recently_authenticated,e[35]=r.user.email,e[36]=r.user.provider,e[37]=t.deletion.blocking_accounts,e[38]=x):x=e[38];let A;return e[39]!==k||e[40]!==x||e[41]!==l?(A=s.jsxs(te,{breadcrumbs:T,children:[n,s.jsxs(U,{children:[l,k,x]})]}),e[39]=k,e[40]=x,e[41]=l,e[42]=A):A=e[42],A}function ue(t){return s.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-md border p-3",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"font-medium",children:t.name}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.scopes.join(", ")," · ",t.restriction]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.revoked_at?`Revoked ${new Date(t.revoked_at).toLocaleString()}`:t.expires_at?`Expires ${new Date(t.expires_at).toLocaleString()}`:"Never expires",t.last_used_at?` · Last used ${new Date(t.last_used_at).toLocaleString()}`:" · Never used"]})]}),!t.revoked_at&&s.jsxs("div",{className:"flex shrink-0 gap-2",children:[s.jsx(S,{type:"button",variant:"outline",size:"sm",onClick:()=>I.post(M(),{name:t.name,scopes_present:"1",scopes:t.scopes,replace_token_id:t.id}),children:"Regenerate"}),s.jsx(S,{type:"button",variant:"outline",size:"sm",onClick:()=>I.delete(W(),{data:{token_id:t.id}}),children:"Revoke"})]})]},t.id)}function he(t){return s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",name:"scopes[]",value:t,defaultChecked:!0}),t]},t)}function pe(t){return s.jsx("option",{value:t.value,children:t.label},t.value)}function xe(t){return s.jsx("option",{value:t.value,children:t.label},t.value)}export{Fe as default};
@@ -1 +1 @@
1
- import{c as se,u as ne,af as re,j as s,L as oe,t as ie}from"./inertia-Degv_G9N.js";import{V as ae,D as le}from"./chart-panel-BYk68mJJ.js";import{D as Z}from"./data-table-IvA7xvrK.js";import{E as ee}from"./empty-state-BFTnQ2oT.js";import{P as ce,E as me}from"./env-layout-erSDpIXg.js";import{S as T,a as ue}from"./stat-TxvoBiC8.js";import{S as de}from"./status-badge-5NCVJHjo.js";import{C as pe,a as fe,b as xe,c as he}from"./card-BaJ8kNkp.js";import{c as Y,m as P,w as je}from"./format-B9SDkrWj.js";import{B as te}from"./braces-kGSgxWnS.js";import"./series-chart-D33UhdG2.js";import"./chart-hover-XYPNE2CX.js";import"./chart-Xnrz1Nqw.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./app-layout-B5Fcdwfz.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./checkbox-Bf41R8W6.js";import"./label-B_vK19tR.js";import"./use-live-GKze1mNC.js";import"./segmented-CVKq2Xpa.js";import"./arrow-up-DwKQcab4.js";function ge(t){const e=se.c(5),{attributes:i}=t;let a;e[0]!==i?(a=Object.entries(i),e[0]=i,e[1]=a):a=e[1];const r=a;if(r.length===0){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"}),e[2]=n):n=e[2],n}let o;return e[3]!==r?(o=s.jsx("span",{className:"flex flex-wrap gap-1",children:r.map(ye)}),e[3]=r,e[4]=o):o=e[4],o}function ye(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,"=",String(i)]},e)}function et(t){const e=se.c(73),{environment:i,window:a}=ne().props,r=i.application_id,o=i.id,n=t.summary.current,V=t.name??"Span";let l;e[0]!==r||e[1]!==o||e[2]!==a?(l=re(r,o,{window:a}),e[0]=r,e[1]=o,e[2]=a,e[3]=l):l=e[3];let c;e[4]!==l?(c={title:"Spans",href:l},e[4]=l,e[5]=c):c=e[5];const W=t.name??"Span";let m;e[6]!==W?(m={title:W,href:"#"},e[6]=W,e[7]=m):m=e[7];let u;e[8]!==c||e[9]!==m?(u=[c,m],e[8]=c,e[9]=m,e[10]=u):u=e[10];const q=t.name??"Span";let d;e[11]!==q?(d=s.jsx(ce,{title:s.jsx("span",{className:"font-mono",children:q}),description:"Every recording of this span in the window."}),e[11]=q,e[12]=d):d=e[12];let p;e[13]!==n.count?(p=Y(n.count),e[13]=n.count,e[14]=p):p=e[14];let f;e[15]!==n.count||e[16]!==t.summary.previous.count?(f={current:n.count,previous:t.summary.previous.count,goodDirection:"up"},e[15]=n.count,e[16]=t.summary.previous.count,e[17]=f):f=e[17];let x;e[18]!==p||e[19]!==f?(x=s.jsx(T,{label:"Recorded",value:p,delta:f,deltaCaption:"vs previous period"}),e[18]=p,e[19]=f,e[20]=x):x=e[20];let h;e[21]!==n.errors?(h=Y(n.errors),e[21]=n.errors,e[22]=h):h=e[22];const F=n.errors?"destructive":void 0;let j;e[23]!==h||e[24]!==F?(j=s.jsx(T,{label:"Failed",value:h,tone:F}),e[23]=h,e[24]=F,e[25]=j):j=e[25];const I=n.p95/1e3;let g;e[26]!==I?(g=P(I,2),e[26]=I,e[27]=g):g=e[27];const z=n.p99/1e3;let C;e[28]!==z?(C=P(z,2),e[28]=z,e[29]=C):C=e[29];const G=`p99 ${C}`;let y;e[30]!==g||e[31]!==G?(y=s.jsx(T,{label:"p95",value:g,hint:G}),e[30]=g,e[31]=G,e[32]=y):y=e[32];const J=n.max/1e3;let b;e[33]!==J?(b=P(J,2),e[33]=J,e[34]=b):b=e[34];const Q=n.avg/1e3;let D;e[35]!==Q?(D=P(Q,2),e[35]=Q,e[36]=D):D=e[36];const U=`avg ${D}`;let v;e[37]!==b||e[38]!==U?(v=s.jsx(T,{label:"Max",value:b,hint:U}),e[37]=b,e[38]=U,e[39]=v):v=e[39];let _;e[40]!==x||e[41]!==j||e[42]!==y||e[43]!==v?(_=s.jsxs(ue,{children:[x,j,y,v]}),e[40]=x,e[41]=j,e[42]=y,e[43]=v,e[44]=_):_=e[44];let S;e[45]!==t.series?(S=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(ae,{legend:"outcome",label:"Recordings",seriesLabel:"Spans",data:t.series}),s.jsx(le,{label:"Duration",data:t.series})]}),e[45]=t.series,e[46]=S):S=e[46];let R;e[47]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{children:s.jsx(he,{children:"Attributes"})}),e[47]=R):R=e[47];let L,M;e[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ee,{icon:te,title:"No attributes recorded",description:"Pass a hash to Railwatch.span to tag each recording."}),M=[{key:"k",header:"Key",cell:Pe},{key:"v",header:"Most common values",cell:ke},{key:"n",header:"Spans",align:"right",cell:Ne}],e[48]=L,e[49]=M):(L=e[48],M=e[49]);let w;e[50]!==t.facets?(w=s.jsxs(pe,{children:[R,s.jsx(fe,{children:s.jsx(Z,{rows:t.facets,rowKey:Ce,empty:L,columns:M})})]}),e[50]=t.facets,e[51]=w):w=e[51];let $,A,B;e[52]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ee,{icon:te,title:"No recordings in this window",description:"Widen the time window to see older recordings of this span."}),A={key:"when",header:"When",cell:Se},B={key:"status",header:"Status",cell:_e},e[52]=$,e[53]=A,e[54]=B):($=e[52],A=e[53],B=e[54]);let N;e[55]!==r||e[56]!==o?(N={key:"in",hideOnMobile:!0,header:"In",cell:X=>X.execution_id?s.jsx(oe,{className:"font-mono text-xs hover:underline",href:ie(r,o,X.execution_id),children:X.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[55]=r,e[56]=o,e[57]=N):N=e[57];let K,O;e[58]===Symbol.for("react.memo_cache_sentinel")?(K={key:"attrs",hideOnMobile:!0,header:"Attributes",cell:ve},O={key:"d",header:"Duration",align:"right",cell:be},e[58]=K,e[59]=O):(K=e[58],O=e[59]);let k;e[60]!==N?(k=[A,B,N,K,O],e[60]=N,e[61]=k):k=e[61];let E;e[62]!==t.samples||e[63]!==k?(E=s.jsx(Z,{rows:t.samples,rowKey:we,empty:$,columns:k}),e[62]=t.samples,e[63]=k,e[64]=E):E=e[64];let H;return e[65]!==V||e[66]!==_||e[67]!==S||e[68]!==w||e[69]!==E||e[70]!==u||e[71]!==d?(H=s.jsxs(me,{title:V,crumbs:u,children:[d,_,S,w,E]}),e[65]=V,e[66]=_,e[67]=S,e[68]=w,e[69]=E,e[70]=u,e[71]=d,e[72]=H):H=e[72],H}function be(t){return P(t.duration,2)}function ve(t){return s.jsx(ge,{attributes:t.attributes})}function _e(t){return s.jsx(de,{outcome:t.status})}function Se(t){return s.jsx("span",{className:"text-xs",children:je(t.occurred_at)})}function we(t){return t.id}function Ne(t){return Y(t.count)}function ke(t){return s.jsx("span",{className:"flex flex-wrap gap-1",children:t.values.map(Ee)})}function Ee(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,s.jsxs("span",{className:"text-muted-foreground",children:[" ×",i]})]},e)}function Pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.key})}function Ce(t){return t.key}export{et as default};
1
+ import{c as se,u as ne,af as re,j as s,L as oe,t as ie}from"./inertia-CUTKXjxg.js";import{V as ae,D as le}from"./chart-panel-BlirnMrQ.js";import{D as Z}from"./data-table-CwtPkw_i.js";import{E as ee}from"./empty-state-CshhuRUU.js";import{P as ce,E as me}from"./env-layout-Dkp_4NvM.js";import{S as T,a as ue}from"./stat-IghK3WjD.js";import{S as de}from"./status-badge-XYUN9gUA.js";import{C as pe,a as fe,b as xe,c as he}from"./card-DiW-JhK3.js";import{c as Y,m as P,w as je}from"./format-B9SDkrWj.js";import{B as te}from"./braces-BFrg-bvp.js";import"./series-chart-C1YrNlID.js";import"./chart-hover-DMWx5-Rs.js";import"./chart-nsdZV0Dv.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./app-layout-DUk54qUM.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./checkbox-C2AqEZXX.js";import"./label-B32Ks8n7.js";import"./use-live-V-slSdFJ.js";import"./segmented-Bj70Htrs.js";import"./arrow-up-DYTCBENO.js";function ge(t){const e=se.c(5),{attributes:i}=t;let a;e[0]!==i?(a=Object.entries(i),e[0]=i,e[1]=a):a=e[1];const r=a;if(r.length===0){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"}),e[2]=n):n=e[2],n}let o;return e[3]!==r?(o=s.jsx("span",{className:"flex flex-wrap gap-1",children:r.map(ye)}),e[3]=r,e[4]=o):o=e[4],o}function ye(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,"=",String(i)]},e)}function et(t){const e=se.c(73),{environment:i,window:a}=ne().props,r=i.application_id,o=i.id,n=t.summary.current,V=t.name??"Span";let l;e[0]!==r||e[1]!==o||e[2]!==a?(l=re(r,o,{window:a}),e[0]=r,e[1]=o,e[2]=a,e[3]=l):l=e[3];let c;e[4]!==l?(c={title:"Spans",href:l},e[4]=l,e[5]=c):c=e[5];const W=t.name??"Span";let m;e[6]!==W?(m={title:W,href:"#"},e[6]=W,e[7]=m):m=e[7];let u;e[8]!==c||e[9]!==m?(u=[c,m],e[8]=c,e[9]=m,e[10]=u):u=e[10];const q=t.name??"Span";let d;e[11]!==q?(d=s.jsx(ce,{title:s.jsx("span",{className:"font-mono",children:q}),description:"Every recording of this span in the window."}),e[11]=q,e[12]=d):d=e[12];let p;e[13]!==n.count?(p=Y(n.count),e[13]=n.count,e[14]=p):p=e[14];let f;e[15]!==n.count||e[16]!==t.summary.previous.count?(f={current:n.count,previous:t.summary.previous.count,goodDirection:"up"},e[15]=n.count,e[16]=t.summary.previous.count,e[17]=f):f=e[17];let x;e[18]!==p||e[19]!==f?(x=s.jsx(T,{label:"Recorded",value:p,delta:f,deltaCaption:"vs previous period"}),e[18]=p,e[19]=f,e[20]=x):x=e[20];let h;e[21]!==n.errors?(h=Y(n.errors),e[21]=n.errors,e[22]=h):h=e[22];const F=n.errors?"destructive":void 0;let j;e[23]!==h||e[24]!==F?(j=s.jsx(T,{label:"Failed",value:h,tone:F}),e[23]=h,e[24]=F,e[25]=j):j=e[25];const I=n.p95/1e3;let g;e[26]!==I?(g=P(I,2),e[26]=I,e[27]=g):g=e[27];const z=n.p99/1e3;let C;e[28]!==z?(C=P(z,2),e[28]=z,e[29]=C):C=e[29];const G=`p99 ${C}`;let y;e[30]!==g||e[31]!==G?(y=s.jsx(T,{label:"p95",value:g,hint:G}),e[30]=g,e[31]=G,e[32]=y):y=e[32];const J=n.max/1e3;let b;e[33]!==J?(b=P(J,2),e[33]=J,e[34]=b):b=e[34];const Q=n.avg/1e3;let D;e[35]!==Q?(D=P(Q,2),e[35]=Q,e[36]=D):D=e[36];const U=`avg ${D}`;let v;e[37]!==b||e[38]!==U?(v=s.jsx(T,{label:"Max",value:b,hint:U}),e[37]=b,e[38]=U,e[39]=v):v=e[39];let _;e[40]!==x||e[41]!==j||e[42]!==y||e[43]!==v?(_=s.jsxs(ue,{children:[x,j,y,v]}),e[40]=x,e[41]=j,e[42]=y,e[43]=v,e[44]=_):_=e[44];let S;e[45]!==t.series?(S=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(ae,{legend:"outcome",label:"Recordings",seriesLabel:"Spans",data:t.series}),s.jsx(le,{label:"Duration",data:t.series})]}),e[45]=t.series,e[46]=S):S=e[46];let R;e[47]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{children:s.jsx(he,{children:"Attributes"})}),e[47]=R):R=e[47];let L,M;e[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ee,{icon:te,title:"No attributes recorded",description:"Pass a hash to Railwatch.span to tag each recording."}),M=[{key:"k",header:"Key",cell:Pe},{key:"v",header:"Most common values",cell:ke},{key:"n",header:"Spans",align:"right",cell:Ne}],e[48]=L,e[49]=M):(L=e[48],M=e[49]);let w;e[50]!==t.facets?(w=s.jsxs(pe,{children:[R,s.jsx(fe,{children:s.jsx(Z,{rows:t.facets,rowKey:Ce,empty:L,columns:M})})]}),e[50]=t.facets,e[51]=w):w=e[51];let $,A,B;e[52]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ee,{icon:te,title:"No recordings in this window",description:"Widen the time window to see older recordings of this span."}),A={key:"when",header:"When",cell:Se},B={key:"status",header:"Status",cell:_e},e[52]=$,e[53]=A,e[54]=B):($=e[52],A=e[53],B=e[54]);let N;e[55]!==r||e[56]!==o?(N={key:"in",hideOnMobile:!0,header:"In",cell:X=>X.execution_id?s.jsx(oe,{className:"font-mono text-xs hover:underline",href:ie(r,o,X.execution_id),children:X.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[55]=r,e[56]=o,e[57]=N):N=e[57];let K,O;e[58]===Symbol.for("react.memo_cache_sentinel")?(K={key:"attrs",hideOnMobile:!0,header:"Attributes",cell:ve},O={key:"d",header:"Duration",align:"right",cell:be},e[58]=K,e[59]=O):(K=e[58],O=e[59]);let k;e[60]!==N?(k=[A,B,N,K,O],e[60]=N,e[61]=k):k=e[61];let E;e[62]!==t.samples||e[63]!==k?(E=s.jsx(Z,{rows:t.samples,rowKey:we,empty:$,columns:k}),e[62]=t.samples,e[63]=k,e[64]=E):E=e[64];let H;return e[65]!==V||e[66]!==_||e[67]!==S||e[68]!==w||e[69]!==E||e[70]!==u||e[71]!==d?(H=s.jsxs(me,{title:V,crumbs:u,children:[d,_,S,w,E]}),e[65]=V,e[66]=_,e[67]=S,e[68]=w,e[69]=E,e[70]=u,e[71]=d,e[72]=H):H=e[72],H}function be(t){return P(t.duration,2)}function ve(t){return s.jsx(ge,{attributes:t.attributes})}function _e(t){return s.jsx(de,{outcome:t.status})}function Se(t){return s.jsx("span",{className:"text-xs",children:je(t.occurred_at)})}function we(t){return t.id}function Ne(t){return Y(t.count)}function ke(t){return s.jsx("span",{className:"flex flex-wrap gap-1",children:t.values.map(Ee)})}function Ee(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,s.jsxs("span",{className:"text-muted-foreground",children:[" ×",i]})]},e)}function Pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.key})}function Ce(t){return t.key}export{et as default};
@@ -1 +1 @@
1
- import{c as d,j as s,H as m,F as p,aH as c}from"./inertia-Degv_G9N.js";import{S as u,H as w}from"./layout-C8q7GUlZ.js";import{I as t}from"./input-error-C6SqO_iU.js";import{B as h}from"./app-wordmark-1SRllgHv.js";import{L as l,I as n}from"./label-B_vK19tR.js";import{A as f}from"./app-layout-B5Fcdwfz.js";import{K as x}from"./transition-Ds6Cakuc.js";import"./separator-CrM10Oot.js";import"./index-B0VXzXYG.js";import"./live-dot-DaXEbkXo.js";import"./index-CX8Br7m9.js";import"./checkbox-Bf41R8W6.js";const i=[{title:"Password settings",href:c()}];function L(){const e=d.c(3);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(m,{title:i[i.length-1].title}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(w,{title:"Update password",description:"Ensure your account is using a long, random password to stay secure"}),e[1]=a):a=e[1];let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(f,{breadcrumbs:i,children:[r,s.jsx(u,{children:s.jsxs("div",{className:"space-y-6",children:[a,s.jsx(p,{method:"put",action:c(),options:{preserveScroll:!0},resetOnError:!0,resetOnSuccess:!0,className:"space-y-6",children:j})]})})]}),e[2]=o):o=e[2],o}function j(e){const{errors:r,processing:a,recentlySuccessful:o}=e;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(l,{htmlFor:"password_challenge",children:"Current password"}),s.jsx(n,{id:"password_challenge",name:"password_challenge",type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),s.jsx(t,{messages:r.password_challenge})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(l,{htmlFor:"password",children:"New password"}),s.jsx(n,{id:"password",name:"password",type:"password",className:"mt-1 block w-full",autoComplete:"new-password",placeholder:"New password"}),s.jsx(t,{messages:r.password})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(l,{htmlFor:"password_confirmation",children:"Confirm password"}),s.jsx(n,{id:"password_confirmation",name:"password_confirmation",type:"password",className:"mt-1 block w-full",autoComplete:"new-password",placeholder:"Confirm password"}),s.jsx(t,{messages:r.password_confirmation})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(h,{disabled:a,children:"Save password"}),s.jsx(x,{show:o,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:s.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}export{L as default};
1
+ import{c as d,j as s,H as m,F as p,aH as c}from"./inertia-CUTKXjxg.js";import{S as u,H as w}from"./layout-5ZhRtywp.js";import{I as t}from"./input-error-C8ycyeD0.js";import{B as h}from"./app-wordmark-DDNuuq5_.js";import{L as l,I as n}from"./label-B32Ks8n7.js";import{A as f}from"./app-layout-DUk54qUM.js";import{K as x}from"./transition-DpTb9Yiv.js";import"./separator-UUo0bkyc.js";import"./index-n16aviHx.js";import"./live-dot-Bb1UYT9F.js";import"./index-BpnfuXi-.js";import"./checkbox-C2AqEZXX.js";const i=[{title:"Password settings",href:c()}];function L(){const e=d.c(3);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(m,{title:i[i.length-1].title}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(w,{title:"Update password",description:"Ensure your account is using a long, random password to stay secure"}),e[1]=a):a=e[1];let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(f,{breadcrumbs:i,children:[r,s.jsx(u,{children:s.jsxs("div",{className:"space-y-6",children:[a,s.jsx(p,{method:"put",action:c(),options:{preserveScroll:!0},resetOnError:!0,resetOnSuccess:!0,className:"space-y-6",children:j})]})})]}),e[2]=o):o=e[2],o}function j(e){const{errors:r,processing:a,recentlySuccessful:o}=e;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(l,{htmlFor:"password_challenge",children:"Current password"}),s.jsx(n,{id:"password_challenge",name:"password_challenge",type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),s.jsx(t,{messages:r.password_challenge})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(l,{htmlFor:"password",children:"New password"}),s.jsx(n,{id:"password",name:"password",type:"password",className:"mt-1 block w-full",autoComplete:"new-password",placeholder:"New password"}),s.jsx(t,{messages:r.password})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(l,{htmlFor:"password_confirmation",children:"Confirm password"}),s.jsx(n,{id:"password_confirmation",name:"password_confirmation",type:"password",className:"mt-1 block w-full",autoComplete:"new-password",placeholder:"Confirm password"}),s.jsx(t,{messages:r.password_confirmation})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(h,{disabled:a,children:"Save password"}),s.jsx(x,{show:o,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:s.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}export{L as default};
@@ -1 +1 @@
1
- import{c as v,u as y,j as e,H as _,aG as f,F as w,L as N,aJ as S}from"./inertia-Degv_G9N.js";import{H as b,S as E}from"./layout-C8q7GUlZ.js";import{I as u}from"./input-error-C6SqO_iU.js";import{B as F}from"./app-wordmark-1SRllgHv.js";import{L as p,I as h}from"./label-B_vK19tR.js";import{A as L}from"./app-layout-B5Fcdwfz.js";import{K as k}from"./transition-Ds6Cakuc.js";import"./separator-CrM10Oot.js";import"./index-B0VXzXYG.js";import"./live-dot-DaXEbkXo.js";import"./index-CX8Br7m9.js";import"./checkbox-Bf41R8W6.js";const c=[{title:"Email settings",href:f()}];function G(){const s=v.c(9),{auth:t}=y().props;let a;s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(_,{title:c[c.length-1].title}),s[0]=a):a=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(b,{title:"Update email",description:"Update your email address and verify it"}),s[1]=r):r=s[1];let i,l,o,n;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=f(),l={preserveScroll:!0},o=["password_challenge"],n=["password_challenge"],s[2]=i,s[3]=l,s[4]=o,s[5]=n):(i=s[2],l=s[3],o=s[4],n=s[5]);let m;return s[6]!==t.user.email||s[7]!==t.user.verified?(m=e.jsxs(L,{breadcrumbs:c,children:[a,e.jsx(E,{children:e.jsxs("div",{className:"space-y-6",children:[r,e.jsx(w,{method:"patch",action:i,options:l,resetOnError:o,resetOnSuccess:n,className:"space-y-6",children:x=>{const{errors:d,processing:j,recentlySuccessful:g}=x;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"email",children:"Email address"}),e.jsx(h,{id:"email",type:"email",name:"email",className:"mt-1 block w-full",defaultValue:t.user.email,required:!0,autoComplete:"username",placeholder:"Email address"}),e.jsx(u,{className:"mt-2",messages:d.email})]}),!t.user.verified&&e.jsx("div",{children:e.jsxs("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",e.jsx(N,{href:S(),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]})}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"password_challenge",children:"Current password"}),e.jsx(h,{id:"password_challenge",name:"password_challenge",type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),e.jsx(u,{messages:d.password_challenge})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(F,{disabled:j,children:"Save"}),e.jsx(k,{show:g,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}})]})})]}),s[6]=t.user.email,s[7]=t.user.verified,s[8]=m):m=s[8],m}export{G as default};
1
+ import{c as v,u as y,j as e,H as _,aG as f,F as w,L as N,aJ as S}from"./inertia-CUTKXjxg.js";import{H as b,S as E}from"./layout-5ZhRtywp.js";import{I as u}from"./input-error-C8ycyeD0.js";import{B as F}from"./app-wordmark-DDNuuq5_.js";import{L as p,I as h}from"./label-B32Ks8n7.js";import{A as L}from"./app-layout-DUk54qUM.js";import{K as k}from"./transition-DpTb9Yiv.js";import"./separator-UUo0bkyc.js";import"./index-n16aviHx.js";import"./live-dot-Bb1UYT9F.js";import"./index-BpnfuXi-.js";import"./checkbox-C2AqEZXX.js";const c=[{title:"Email settings",href:f()}];function G(){const s=v.c(9),{auth:t}=y().props;let a;s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(_,{title:c[c.length-1].title}),s[0]=a):a=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(b,{title:"Update email",description:"Update your email address and verify it"}),s[1]=r):r=s[1];let i,l,o,n;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=f(),l={preserveScroll:!0},o=["password_challenge"],n=["password_challenge"],s[2]=i,s[3]=l,s[4]=o,s[5]=n):(i=s[2],l=s[3],o=s[4],n=s[5]);let m;return s[6]!==t.user.email||s[7]!==t.user.verified?(m=e.jsxs(L,{breadcrumbs:c,children:[a,e.jsx(E,{children:e.jsxs("div",{className:"space-y-6",children:[r,e.jsx(w,{method:"patch",action:i,options:l,resetOnError:o,resetOnSuccess:n,className:"space-y-6",children:x=>{const{errors:d,processing:j,recentlySuccessful:g}=x;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"email",children:"Email address"}),e.jsx(h,{id:"email",type:"email",name:"email",className:"mt-1 block w-full",defaultValue:t.user.email,required:!0,autoComplete:"username",placeholder:"Email address"}),e.jsx(u,{className:"mt-2",messages:d.email})]}),!t.user.verified&&e.jsx("div",{children:e.jsxs("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",e.jsx(N,{href:S(),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]})}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(p,{htmlFor:"password_challenge",children:"Current password"}),e.jsx(h,{id:"password_challenge",name:"password_challenge",type:"password",className:"mt-1 block w-full",autoComplete:"current-password",placeholder:"Current password"}),e.jsx(u,{messages:d.password_challenge})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(F,{disabled:j,children:"Save"}),e.jsx(k,{show:g,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-neutral-600",children:"Saved"})})]})]})}})]})})]}),s[6]=t.user.email,s[7]=t.user.verified,s[8]=m):m=s[8],m}export{G as default};
@@ -1 +1 @@
1
- import{c as Ge,u as Le,z as ze,j as s,L as Oe,i as Pe}from"./inertia-Degv_G9N.js";import{D as ke}from"./data-table-IvA7xvrK.js";import{E as Se}from"./empty-state-BFTnQ2oT.js";import{P as Be,E as Ke}from"./env-layout-erSDpIXg.js";import{R as Ue}from"./relative-time-6CoKr1lN.js";import{S as ae,a as Ae}from"./stat-TxvoBiC8.js";import{I as We}from"./status-badge-5NCVJHjo.js";import{B as Je}from"./app-wordmark-1SRllgHv.js";import{C as Ee,a as He,b as Me,c as Ie}from"./card-BaJ8kNkp.js";import{w as Qe,m as Te,p as ce,c as De}from"./format-B9SDkrWj.js";import{c as Ve,a as Xe}from"./source-link-B2183i2-.js";import{ReleaseHealthStrip as Ye}from"./release-health-1Qzc_XhT.js";import{G as Ze,O as Fe}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./arrow-up-DwKQcab4.js";import"./checkbox-Bf41R8W6.js";function fe(t,e){if(!t)return null;const l=(e-t)/t*100;return s.jsxs("span",{className:l>10?"text-destructive":l<-10?"text-emerald-600":"text-muted-foreground",children:[l>0?"+":"",l.toFixed(0),"%"]})}function Tt(t){const e=Ge.c(132),{environment:l}=Le().props,me=l.application_id,de=l.id,r=t.compare.request,o=t.compare.job_attempt,i=l.repository_url;let z;e[0]!==t.deploy.previous_ref||e[1]!==t.deploy.repository_ref||e[2]!==i?(z=Ve(i,t.deploy.previous_ref,t.deploy.repository_ref),e[0]=t.deploy.previous_ref,e[1]=t.deploy.repository_ref,e[2]=i,e[3]=z):z=e[3];const B=z,ue=i?.includes("gitlab")?"GitLab":"GitHub",qe=t.deploy.ref;let n;e[4]!==me||e[5]!==de?(n=ze(me,de),e[4]=me,e[5]=de,e[6]=n):n=e[6];let a;e[7]!==n?(a={title:"Deploys",href:n},e[7]=n,e[8]=a):a=e[8];let c;e[9]!==t.deploy.ref?(c={title:t.deploy.ref,href:"#"},e[9]=t.deploy.ref,e[10]=c):c=e[10];let f;e[11]!==a||e[12]!==c?(f=[a,c],e[11]=a,e[12]=c,e[13]=f):f=e[13];let m;e[14]!==t.deploy.deploy?(m=s.jsx("span",{className:"font-mono",children:t.deploy.deploy}),e[14]=t.deploy.deploy,e[15]=m):m=e[15];let K;e[16]!==t.deploy.deployed_at?(K=Qe(t.deploy.deployed_at),e[16]=t.deploy.deployed_at,e[17]=K):K=e[17];const he=`${K}${t.deploy.name?` · ${t.deploy.name}`:""}${t.deploy.url?" · ":""}`;let d;e[18]!==t.deploy.url?(d=t.deploy.url&&s.jsx("a",{className:"text-sm underline",href:t.deploy.url,target:"_blank",rel:"noreferrer",children:"Open"}),e[18]=t.deploy.url,e[19]=d):d=e[19];let u;e[20]!==m||e[21]!==he||e[22]!==d?(u=s.jsx(Be,{withWindow:!1,title:m,description:he,actions:d}),e[20]=m,e[21]=he,e[22]=d,e[23]=u):u=e[23];let h;e[24]!==t.deploy.previous_ref?(h=t.deploy.previous_ref&&s.jsxs("span",{className:"text-muted-foreground ml-2 font-mono text-xs font-normal",children:["since ",t.deploy.previous_ref.slice(0,7)]}),e[24]=t.deploy.previous_ref,e[25]=h):h=e[25];let p;e[26]!==h?(p=s.jsxs("h2",{className:"text-sm font-semibold",children:["Changes",h]}),e[26]=h,e[27]=p):p=e[27];let x;e[28]!==ue||e[29]!==B?(x=B&&s.jsx(Je,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:B,target:"_blank",rel:"noreferrer",children:["Compare on ",ue]})}),e[28]=ue,e[29]=B,e[30]=x):x=e[30];let y;e[31]!==p||e[32]!==x?(y=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[p,x]}),e[31]=p,e[32]=x,e[33]=y):y=e[33];let U;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Se,{icon:Ze,title:"No commits recorded",description:"The post-deploy hook sends the commits in each deploy. Reinstall it with bin/rails generate railwatch:install."}),e[34]=U):U=e[34];let b;e[35]!==i?(b={key:"sha",header:"Commit",cell:Ce=>{const Re=Xe(i,Ce.sha),$e=Ce.sha.slice(0,7);return Re?s.jsx("a",{className:"font-mono text-xs hover:underline",href:Re,target:"_blank",rel:"noreferrer",children:$e}):s.jsx("span",{className:"font-mono text-xs",children:$e})}},e[35]=i,e[36]=b):b=e[36];let A,W,J;e[37]===Symbol.for("react.memo_cache_sentinel")?(A={key:"m",header:"Message",cell:ct},W={key:"a",hideOnMobile:!0,header:"Author",cell:at},J={key:"at",hideOnMobile:!0,header:"When",align:"right",cell:nt},e[37]=A,e[38]=W,e[39]=J):(A=e[37],W=e[38],J=e[39]);let j;e[40]!==b?(j=[b,A,W,J],e[40]=b,e[41]=j):j=e[41];let _;e[42]!==t.deploy.commits||e[43]!==j?(_=s.jsx(ke,{rows:t.deploy.commits,rowKey:ft,empty:U,columns:j}),e[42]=t.deploy.commits,e[43]=j,e[44]=_):_=e[44];let Q;e[45]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("h2",{className:"text-sm font-semibold",children:"Release health"}),e[45]=Q):Q=e[45];let v;e[46]!==t.health?(v=s.jsx(Ye,{health:t.health}),e[46]=t.health,e[47]=v):v=e[47];let V;e[48]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx("h2",{className:"text-sm font-semibold",children:"Hour before vs hour after"}),e[48]=V):V=e[48];const pe=r.after.p95/1e3;let w;e[49]!==pe?(w=Te(pe),e[49]=pe,e[50]=w):w=e[50];let g;e[51]!==r.after.p95||e[52]!==r.before.p95?(g=fe(r.before.p95,r.after.p95),e[51]=r.after.p95,e[52]=r.before.p95,e[53]=g):g=e[53];let N;e[54]!==w||e[55]!==g?(N=s.jsxs(s.Fragment,{children:[w," ",g]}),e[54]=w,e[55]=g,e[56]=N):N=e[56];const xe=r.before.p95/1e3;let X;e[57]!==xe?(X=Te(xe),e[57]=xe,e[58]=X):X=e[58];const ye=`was ${X}`;let k;e[59]!==N||e[60]!==ye?(k=s.jsx(ae,{label:"Request p95",value:N,hint:ye}),e[59]=N,e[60]=ye,e[61]=k):k=e[61];let S;e[62]!==r.after.count||e[63]!==r.after.errors?(S=ce(r.after.errors,r.after.count),e[62]=r.after.count,e[63]=r.after.errors,e[64]=S):S=e[64];const be=r.before.errors/Math.max(1,r.before.count),je=r.after.errors/Math.max(1,r.after.count);let C;e[65]!==be||e[66]!==je?(C=fe(be,je),e[65]=be,e[66]=je,e[67]=C):C=e[67];let R;e[68]!==S||e[69]!==C?(R=s.jsxs(s.Fragment,{children:[S," ",C]}),e[68]=S,e[69]=C,e[70]=R):R=e[70];let Y;e[71]!==r.before.count||e[72]!==r.before.errors?(Y=ce(r.before.errors,r.before.count),e[71]=r.before.count,e[72]=r.before.errors,e[73]=Y):Y=e[73];const _e=`was ${Y}`;let $;e[74]!==R||e[75]!==_e?($=s.jsx(ae,{label:"Request error rate",value:R,hint:_e}),e[74]=R,e[75]=_e,e[76]=$):$=e[76];let E;e[77]!==r.after.count?(E=De(r.after.count),e[77]=r.after.count,e[78]=E):E=e[78];let H;e[79]!==r.after.count||e[80]!==r.before.count?(H=fe(r.before.count,r.after.count),e[79]=r.after.count,e[80]=r.before.count,e[81]=H):H=e[81];let M;e[82]!==E||e[83]!==H?(M=s.jsxs(s.Fragment,{children:[E," ",H]}),e[82]=E,e[83]=H,e[84]=M):M=e[84];let Z;e[85]!==r.before.count?(Z=De(r.before.count),e[85]=r.before.count,e[86]=Z):Z=e[86];const ve=`was ${Z}`;let I;e[87]!==M||e[88]!==ve?(I=s.jsx(ae,{label:"Requests",value:M,hint:ve}),e[87]=M,e[88]=ve,e[89]=I):I=e[89];let T;e[90]!==o.after.count||e[91]!==o.after.errors?(T=ce(o.after.errors,o.after.count),e[90]=o.after.count,e[91]=o.after.errors,e[92]=T):T=e[92];const we=o.before.errors/Math.max(1,o.before.count),ge=o.after.errors/Math.max(1,o.after.count);let D;e[93]!==we||e[94]!==ge?(D=fe(we,ge),e[93]=we,e[94]=ge,e[95]=D):D=e[95];let F;e[96]!==T||e[97]!==D?(F=s.jsxs(s.Fragment,{children:[T," ",D]}),e[96]=T,e[97]=D,e[98]=F):F=e[98];let ee;e[99]!==o.before.count||e[100]!==o.before.errors?(ee=ce(o.before.errors,o.before.count),e[99]=o.before.count,e[100]=o.before.errors,e[101]=ee):ee=e[101];const Ne=`was ${ee}`;let O;e[102]!==F||e[103]!==Ne?(O=s.jsx(ae,{label:"Job failures",value:F,hint:Ne}),e[102]=F,e[103]=Ne,e[104]=O):O=e[104];let P;e[105]!==k||e[106]!==$||e[107]!==I||e[108]!==O?(P=s.jsxs(Ae,{children:[k,$,I,O]}),e[105]=k,e[106]=$,e[107]=I,e[108]=O,e[109]=P):P=e[109];let te;e[110]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Me,{children:s.jsx(Ie,{children:"New issues after this deploy"})}),e[110]=te):te=e[110];let se,re;e[111]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Se,{icon:Fe,title:"No new issues in the 24 hours after",description:"Issues first seen after this deploy would show here."}),re=[{key:"k",header:"Issue",cell:lt},{key:"t",header:"Title",cell:ot},{key:"s",header:"",cell:rt}],e[111]=se,e[112]=re):(se=e[111],re=e[112]);let q;e[113]!==t.new_issues?(q=s.jsxs(Ee,{children:[te,s.jsx(He,{children:s.jsx(ke,{rows:t.new_issues,rowKey:it,empty:se,columns:re})})]}),e[113]=t.new_issues,e[114]=q):q=e[114];let oe;e[115]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(Me,{children:s.jsx(Ie,{children:"Resolved in this deploy"})}),e[115]=oe):oe=e[115];let le,ie;e[116]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(Se,{icon:Fe,title:"No issues marked resolved in this deploy",description:"Issues resolved and tagged with this deploy's ref would show here."}),ie=[{key:"k",header:"Issue",cell:tt},{key:"t",header:"Title",cell:et}],e[116]=le,e[117]=ie):(le=e[116],ie=e[117]);let G;e[118]!==t.resolved_issues?(G=s.jsxs(Ee,{children:[oe,s.jsx(He,{children:s.jsx(ke,{rows:t.resolved_issues,rowKey:st,empty:le,columns:ie})})]}),e[118]=t.resolved_issues,e[119]=G):G=e[119];let L;e[120]!==q||e[121]!==G?(L=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[q,G]}),e[120]=q,e[121]=G,e[122]=L):L=e[122];let ne;return e[123]!==t.deploy.ref||e[124]!==u||e[125]!==y||e[126]!==_||e[127]!==v||e[128]!==f||e[129]!==P||e[130]!==L?(ne=s.jsxs(Ke,{title:qe,crumbs:f,children:[u,y,_,Q,v,V,P,L]}),e[123]=t.deploy.ref,e[124]=u,e[125]=y,e[126]=_,e[127]=v,e[128]=f,e[129]=P,e[130]=L,e[131]=ne):ne=e[131],ne}function et(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function tt(t){return s.jsx(Oe,{className:"font-mono text-xs hover:underline",href:Pe(t.id),children:t.key})}function st(t){return t.id}function rt(t){return s.jsx(We,{status:t.status})}function ot(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function lt(t){return s.jsx(Oe,{className:"font-mono text-xs hover:underline",href:Pe(t.id),children:t.key})}function it(t){return t.id}function nt(t){return s.jsx(Ue,{className:"text-xs",iso:t.at})}function at(t){return s.jsx("span",{className:"text-xs",children:t.author})}function ct(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.message})}function ft(t){return t.sha}export{Tt as default};
1
+ import{c as Ge,u as Le,z as ze,j as s,L as Oe,i as Pe}from"./inertia-CUTKXjxg.js";import{D as ke}from"./data-table-CwtPkw_i.js";import{E as Se}from"./empty-state-CshhuRUU.js";import{P as Be,E as Ke}from"./env-layout-Dkp_4NvM.js";import{R as Ue}from"./relative-time-CV7V8aSP.js";import{S as ae,a as Ae}from"./stat-IghK3WjD.js";import{I as We}from"./status-badge-XYUN9gUA.js";import{B as Je}from"./app-wordmark-DDNuuq5_.js";import{C as Ee,a as He,b as Me,c as Ie}from"./card-DiW-JhK3.js";import{w as Qe,m as Te,p as ce,c as De}from"./format-B9SDkrWj.js";import{c as Ve,a as Xe}from"./source-link-B2183i2-.js";import{ReleaseHealthStrip as Ye}from"./release-health-DRNLZtT7.js";import{G as Ze,O as Fe}from"./app-layout-DUk54qUM.js";import"./chart-hover-DMWx5-Rs.js";import"./badge-s7YDycYg.js";import"./use-live-V-slSdFJ.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./segmented-Bj70Htrs.js";import"./label-B32Ks8n7.js";import"./arrow-up-DYTCBENO.js";import"./checkbox-C2AqEZXX.js";function fe(t,e){if(!t)return null;const l=(e-t)/t*100;return s.jsxs("span",{className:l>10?"text-destructive":l<-10?"text-emerald-600":"text-muted-foreground",children:[l>0?"+":"",l.toFixed(0),"%"]})}function Tt(t){const e=Ge.c(132),{environment:l}=Le().props,me=l.application_id,de=l.id,r=t.compare.request,o=t.compare.job_attempt,i=l.repository_url;let z;e[0]!==t.deploy.previous_ref||e[1]!==t.deploy.repository_ref||e[2]!==i?(z=Ve(i,t.deploy.previous_ref,t.deploy.repository_ref),e[0]=t.deploy.previous_ref,e[1]=t.deploy.repository_ref,e[2]=i,e[3]=z):z=e[3];const B=z,ue=i?.includes("gitlab")?"GitLab":"GitHub",qe=t.deploy.ref;let n;e[4]!==me||e[5]!==de?(n=ze(me,de),e[4]=me,e[5]=de,e[6]=n):n=e[6];let a;e[7]!==n?(a={title:"Deploys",href:n},e[7]=n,e[8]=a):a=e[8];let c;e[9]!==t.deploy.ref?(c={title:t.deploy.ref,href:"#"},e[9]=t.deploy.ref,e[10]=c):c=e[10];let f;e[11]!==a||e[12]!==c?(f=[a,c],e[11]=a,e[12]=c,e[13]=f):f=e[13];let m;e[14]!==t.deploy.deploy?(m=s.jsx("span",{className:"font-mono",children:t.deploy.deploy}),e[14]=t.deploy.deploy,e[15]=m):m=e[15];let K;e[16]!==t.deploy.deployed_at?(K=Qe(t.deploy.deployed_at),e[16]=t.deploy.deployed_at,e[17]=K):K=e[17];const he=`${K}${t.deploy.name?` · ${t.deploy.name}`:""}${t.deploy.url?" · ":""}`;let d;e[18]!==t.deploy.url?(d=t.deploy.url&&s.jsx("a",{className:"text-sm underline",href:t.deploy.url,target:"_blank",rel:"noreferrer",children:"Open"}),e[18]=t.deploy.url,e[19]=d):d=e[19];let u;e[20]!==m||e[21]!==he||e[22]!==d?(u=s.jsx(Be,{withWindow:!1,title:m,description:he,actions:d}),e[20]=m,e[21]=he,e[22]=d,e[23]=u):u=e[23];let h;e[24]!==t.deploy.previous_ref?(h=t.deploy.previous_ref&&s.jsxs("span",{className:"text-muted-foreground ml-2 font-mono text-xs font-normal",children:["since ",t.deploy.previous_ref.slice(0,7)]}),e[24]=t.deploy.previous_ref,e[25]=h):h=e[25];let p;e[26]!==h?(p=s.jsxs("h2",{className:"text-sm font-semibold",children:["Changes",h]}),e[26]=h,e[27]=p):p=e[27];let x;e[28]!==ue||e[29]!==B?(x=B&&s.jsx(Je,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs("a",{href:B,target:"_blank",rel:"noreferrer",children:["Compare on ",ue]})}),e[28]=ue,e[29]=B,e[30]=x):x=e[30];let y;e[31]!==p||e[32]!==x?(y=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[p,x]}),e[31]=p,e[32]=x,e[33]=y):y=e[33];let U;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Se,{icon:Ze,title:"No commits recorded",description:"The post-deploy hook sends the commits in each deploy. Reinstall it with bin/rails generate railwatch:install."}),e[34]=U):U=e[34];let b;e[35]!==i?(b={key:"sha",header:"Commit",cell:Ce=>{const Re=Xe(i,Ce.sha),$e=Ce.sha.slice(0,7);return Re?s.jsx("a",{className:"font-mono text-xs hover:underline",href:Re,target:"_blank",rel:"noreferrer",children:$e}):s.jsx("span",{className:"font-mono text-xs",children:$e})}},e[35]=i,e[36]=b):b=e[36];let A,W,J;e[37]===Symbol.for("react.memo_cache_sentinel")?(A={key:"m",header:"Message",cell:ct},W={key:"a",hideOnMobile:!0,header:"Author",cell:at},J={key:"at",hideOnMobile:!0,header:"When",align:"right",cell:nt},e[37]=A,e[38]=W,e[39]=J):(A=e[37],W=e[38],J=e[39]);let j;e[40]!==b?(j=[b,A,W,J],e[40]=b,e[41]=j):j=e[41];let _;e[42]!==t.deploy.commits||e[43]!==j?(_=s.jsx(ke,{rows:t.deploy.commits,rowKey:ft,empty:U,columns:j}),e[42]=t.deploy.commits,e[43]=j,e[44]=_):_=e[44];let Q;e[45]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("h2",{className:"text-sm font-semibold",children:"Release health"}),e[45]=Q):Q=e[45];let v;e[46]!==t.health?(v=s.jsx(Ye,{health:t.health}),e[46]=t.health,e[47]=v):v=e[47];let V;e[48]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx("h2",{className:"text-sm font-semibold",children:"Hour before vs hour after"}),e[48]=V):V=e[48];const pe=r.after.p95/1e3;let w;e[49]!==pe?(w=Te(pe),e[49]=pe,e[50]=w):w=e[50];let g;e[51]!==r.after.p95||e[52]!==r.before.p95?(g=fe(r.before.p95,r.after.p95),e[51]=r.after.p95,e[52]=r.before.p95,e[53]=g):g=e[53];let N;e[54]!==w||e[55]!==g?(N=s.jsxs(s.Fragment,{children:[w," ",g]}),e[54]=w,e[55]=g,e[56]=N):N=e[56];const xe=r.before.p95/1e3;let X;e[57]!==xe?(X=Te(xe),e[57]=xe,e[58]=X):X=e[58];const ye=`was ${X}`;let k;e[59]!==N||e[60]!==ye?(k=s.jsx(ae,{label:"Request p95",value:N,hint:ye}),e[59]=N,e[60]=ye,e[61]=k):k=e[61];let S;e[62]!==r.after.count||e[63]!==r.after.errors?(S=ce(r.after.errors,r.after.count),e[62]=r.after.count,e[63]=r.after.errors,e[64]=S):S=e[64];const be=r.before.errors/Math.max(1,r.before.count),je=r.after.errors/Math.max(1,r.after.count);let C;e[65]!==be||e[66]!==je?(C=fe(be,je),e[65]=be,e[66]=je,e[67]=C):C=e[67];let R;e[68]!==S||e[69]!==C?(R=s.jsxs(s.Fragment,{children:[S," ",C]}),e[68]=S,e[69]=C,e[70]=R):R=e[70];let Y;e[71]!==r.before.count||e[72]!==r.before.errors?(Y=ce(r.before.errors,r.before.count),e[71]=r.before.count,e[72]=r.before.errors,e[73]=Y):Y=e[73];const _e=`was ${Y}`;let $;e[74]!==R||e[75]!==_e?($=s.jsx(ae,{label:"Request error rate",value:R,hint:_e}),e[74]=R,e[75]=_e,e[76]=$):$=e[76];let E;e[77]!==r.after.count?(E=De(r.after.count),e[77]=r.after.count,e[78]=E):E=e[78];let H;e[79]!==r.after.count||e[80]!==r.before.count?(H=fe(r.before.count,r.after.count),e[79]=r.after.count,e[80]=r.before.count,e[81]=H):H=e[81];let M;e[82]!==E||e[83]!==H?(M=s.jsxs(s.Fragment,{children:[E," ",H]}),e[82]=E,e[83]=H,e[84]=M):M=e[84];let Z;e[85]!==r.before.count?(Z=De(r.before.count),e[85]=r.before.count,e[86]=Z):Z=e[86];const ve=`was ${Z}`;let I;e[87]!==M||e[88]!==ve?(I=s.jsx(ae,{label:"Requests",value:M,hint:ve}),e[87]=M,e[88]=ve,e[89]=I):I=e[89];let T;e[90]!==o.after.count||e[91]!==o.after.errors?(T=ce(o.after.errors,o.after.count),e[90]=o.after.count,e[91]=o.after.errors,e[92]=T):T=e[92];const we=o.before.errors/Math.max(1,o.before.count),ge=o.after.errors/Math.max(1,o.after.count);let D;e[93]!==we||e[94]!==ge?(D=fe(we,ge),e[93]=we,e[94]=ge,e[95]=D):D=e[95];let F;e[96]!==T||e[97]!==D?(F=s.jsxs(s.Fragment,{children:[T," ",D]}),e[96]=T,e[97]=D,e[98]=F):F=e[98];let ee;e[99]!==o.before.count||e[100]!==o.before.errors?(ee=ce(o.before.errors,o.before.count),e[99]=o.before.count,e[100]=o.before.errors,e[101]=ee):ee=e[101];const Ne=`was ${ee}`;let O;e[102]!==F||e[103]!==Ne?(O=s.jsx(ae,{label:"Job failures",value:F,hint:Ne}),e[102]=F,e[103]=Ne,e[104]=O):O=e[104];let P;e[105]!==k||e[106]!==$||e[107]!==I||e[108]!==O?(P=s.jsxs(Ae,{children:[k,$,I,O]}),e[105]=k,e[106]=$,e[107]=I,e[108]=O,e[109]=P):P=e[109];let te;e[110]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Me,{children:s.jsx(Ie,{children:"New issues after this deploy"})}),e[110]=te):te=e[110];let se,re;e[111]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Se,{icon:Fe,title:"No new issues in the 24 hours after",description:"Issues first seen after this deploy would show here."}),re=[{key:"k",header:"Issue",cell:lt},{key:"t",header:"Title",cell:ot},{key:"s",header:"",cell:rt}],e[111]=se,e[112]=re):(se=e[111],re=e[112]);let q;e[113]!==t.new_issues?(q=s.jsxs(Ee,{children:[te,s.jsx(He,{children:s.jsx(ke,{rows:t.new_issues,rowKey:it,empty:se,columns:re})})]}),e[113]=t.new_issues,e[114]=q):q=e[114];let oe;e[115]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(Me,{children:s.jsx(Ie,{children:"Resolved in this deploy"})}),e[115]=oe):oe=e[115];let le,ie;e[116]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(Se,{icon:Fe,title:"No issues marked resolved in this deploy",description:"Issues resolved and tagged with this deploy's ref would show here."}),ie=[{key:"k",header:"Issue",cell:tt},{key:"t",header:"Title",cell:et}],e[116]=le,e[117]=ie):(le=e[116],ie=e[117]);let G;e[118]!==t.resolved_issues?(G=s.jsxs(Ee,{children:[oe,s.jsx(He,{children:s.jsx(ke,{rows:t.resolved_issues,rowKey:st,empty:le,columns:ie})})]}),e[118]=t.resolved_issues,e[119]=G):G=e[119];let L;e[120]!==q||e[121]!==G?(L=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[q,G]}),e[120]=q,e[121]=G,e[122]=L):L=e[122];let ne;return e[123]!==t.deploy.ref||e[124]!==u||e[125]!==y||e[126]!==_||e[127]!==v||e[128]!==f||e[129]!==P||e[130]!==L?(ne=s.jsxs(Ke,{title:qe,crumbs:f,children:[u,y,_,Q,v,V,P,L]}),e[123]=t.deploy.ref,e[124]=u,e[125]=y,e[126]=_,e[127]=v,e[128]=f,e[129]=P,e[130]=L,e[131]=ne):ne=e[131],ne}function et(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function tt(t){return s.jsx(Oe,{className:"font-mono text-xs hover:underline",href:Pe(t.id),children:t.key})}function st(t){return t.id}function rt(t){return s.jsx(We,{status:t.status})}function ot(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function lt(t){return s.jsx(Oe,{className:"font-mono text-xs hover:underline",href:Pe(t.id),children:t.key})}function it(t){return t.id}function nt(t){return s.jsx(Ue,{className:"text-xs",iso:t.at})}function at(t){return s.jsx("span",{className:"text-xs",children:t.author})}function ct(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.message})}function ft(t){return t.sha}export{Tt as default};
@@ -1 +1 @@
1
- import{c as $,u as P,j as i,C as N,L as C}from"./inertia-Degv_G9N.js";import{C as I}from"./copy-id-b6CW5ESL.js";import{E as R}from"./empty-state-BFTnQ2oT.js";import{P as q,E as K}from"./env-layout-erSDpIXg.js";import{a as B,S as w}from"./stat-TxvoBiC8.js";import{K as H}from"./status-badge-5NCVJHjo.js";import{e as W}from"./execution-path-Di5uUHi-.js";import{c as E,m as L,s as T}from"./format-B9SDkrWj.js";import"./app-wordmark-1SRllgHv.js";import"./use-clipboard-BLjjYH8V.js";import"./index-CX8Br7m9.js";import"./badge-CApjyWcg.js";import"./app-layout-B5Fcdwfz.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./checkbox-Bf41R8W6.js";import"./label-B_vK19tR.js";import"./use-live-GKze1mNC.js";import"./segmented-CVKq2Xpa.js";import"./arrow-up-DwKQcab4.js";const A={request:"REQ",job_attempt:"JOB",scheduled_task:"TASK",command:"CMD",outgoing_request:"HTTP"};function M(t,e,s,h=0){return t.flatMap(p=>{const r=p.execution;return[{key:r.execution_id,depth:h,kind:r.kind,label:r.name,server:r.server,offset:r.offset,duration:r.duration,href:W({applicationId:e,environmentId:s,source:r.kind,executionId:r.execution_id}),failed:T(r.status,r.outcome)==="destructive"},...r.outgoing.map(a=>({key:`o-${a.id}`,depth:h+1,kind:"outgoing_request",label:`${a.method??""} ${a.url}`.trim(),server:null,offset:a.offset,duration:a.duration??0,href:null,failed:T(a.status_code)==="destructive"})),...M(p.children,e,s,h+1)]})}function D(t){const e=$.c(33),{row:s,scale:h}=t,p=`${s.depth*.75}rem`;let r;e[0]!==p?(r={paddingLeft:p},e[0]=p,e[1]=r):r=e[1];const a=s.failed?"destructive":"muted",g=A[s.kind]??s.kind;let l;e[2]!==a||e[3]!==g?(l=i.jsx(H,{tone:a,children:g}),e[2]=a,e[3]=g,e[4]=l):l=e[4];let o;e[5]!==s.label?(o=i.jsx("span",{className:"truncate font-mono",children:s.label}),e[5]=s.label,e[6]=o):o=e[6];let n;e[7]!==s.server?(n=s.server&&i.jsx("span",{className:"text-muted-foreground hidden shrink-0 font-mono text-[10px] sm:inline",children:s.server}),e[7]=s.server,e[8]=n):n=e[8];let c;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==n?(c=i.jsxs("span",{className:"col-start-1 row-start-1 flex min-w-0 items-center gap-1.5",style:r,children:[l,o,n]}),e[9]=r,e[10]=l,e[11]=o,e[12]=n,e[13]=c):c=e[13];let d;e[14]!==s.duration?(d=L(s.duration),e[14]=s.duration,e[15]=d):d=e[15];let f;e[16]!==d?(f=i.jsx("span",{className:"col-start-2 row-start-1 text-right font-mono tabular-nums md:col-start-3",children:d}),e[16]=d,e[17]=f):f=e[17];const j=s.failed?"bg-danger":s.href?"bg-primary":"bg-ok";let b;e[18]!==j?(b=N("block h-full rounded",j),e[18]=j,e[19]=b):b=e[19];const y=`${Math.min(99,s.offset/h*100)}%`,k=`${Math.max(.5,s.duration/h*100)}%`;let m;e[20]!==y||e[21]!==k?(m={marginLeft:y,width:k},e[20]=y,e[21]=k,e[22]=m):m=e[22];let u;e[23]!==b||e[24]!==m?(u=i.jsx("span",{className:"bg-muted/30 col-span-2 col-start-1 row-start-2 h-2 rounded md:col-span-1 md:col-start-2 md:row-start-1 md:h-3",children:i.jsx("span",{className:b,style:m})}),e[23]=b,e[24]=m,e[25]=u):u=e[25];let v;e[26]!==f||e[27]!==u||e[28]!==c?(v=i.jsxs(i.Fragment,{children:[c,f,u]}),e[26]=f,e[27]=u,e[28]=c,e[29]=v):v=e[29];const x=v;let _;return e[30]!==x||e[31]!==s.href?(_=s.href?i.jsx(C,{href:s.href,className:N("grid grid-cols-[1fr_4rem] items-center gap-x-2 gap-y-1 border-b px-2 py-1.5 text-xs last:border-b-0 md:grid-cols-[minmax(0,18rem)_1fr_4rem]","hover:bg-muted/40"),children:x}):i.jsx("div",{className:N("grid grid-cols-[1fr_4rem] items-center gap-x-2 gap-y-1 border-b px-2 py-1.5 text-xs last:border-b-0 md:grid-cols-[minmax(0,18rem)_1fr_4rem]","text-muted-foreground"),children:x}),e[30]=x,e[31]=s.href,e[32]=_):_=e[32],_}function me(t){const e=$.c(38),{environment:s}=P().props,h=s.application_id,p=s.id;let r,a,g,l,o,n,c;if(e[0]!==h||e[1]!==p||e[2]!==t.duration||e[3]!==t.roots||e[4]!==t.services||e[5]!==t.span_count||e[6]!==t.trace_id){const j=M(t.roots,h,p),b=j.filter(J),y=b.filter(F).length,k=Math.max(t.duration,1);r=K,l="Trace",e[14]===Symbol.for("react.memo_cache_sentinel")?(o=[{title:"Trace",href:"#"}],e[14]=o):o=e[14],e[15]!==t.trace_id?(n=i.jsx(q,{withWindow:!1,title:i.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[i.jsx("span",{className:"truncate font-mono text-base md:text-xl",children:t.trace_id}),i.jsx(I,{value:t.trace_id,label:""})]}),description:"Every execution that shares this trace id, nested by the call that started it."}),e[15]=t.trace_id,e[16]=n):n=e[16];let m;e[17]!==t.services.length?(m=E(t.services.length),e[17]=t.services.length,e[18]=m):m=e[18];let u;e[19]!==t.services?(u=t.services.join(" · "),e[19]=t.services,e[20]=u):u=e[20];let v;e[21]!==m||e[22]!==u?(v=i.jsx(w,{label:"Services",value:m,hint:u}),e[21]=m,e[22]=u,e[23]=v):v=e[23];let x;e[24]!==t.duration?(x=L(t.duration),e[24]=t.duration,e[25]=x):x=e[25];let _;e[26]!==x?(_=i.jsx(w,{label:"Total duration",value:x}),e[26]=x,e[27]=_):_=e[27],c=i.jsxs(B,{children:[i.jsx(w,{label:"Executions",value:E(b.length),hint:`${t.span_count} spans`}),v,_,i.jsx(w,{label:"Errors",value:E(y),tone:y?"destructive":void 0})]}),a="bg-card -mx-3 overflow-hidden border-y md:mx-0 md:rounded-lg md:border",g=j.length===0?i.jsx(R,{title:"Nothing in this trace",description:"No execution reported this trace id."}):j.map(S=>i.jsx(D,{row:S,scale:k},S.key)),e[0]=h,e[1]=p,e[2]=t.duration,e[3]=t.roots,e[4]=t.services,e[5]=t.span_count,e[6]=t.trace_id,e[7]=r,e[8]=a,e[9]=g,e[10]=l,e[11]=o,e[12]=n,e[13]=c}else r=e[7],a=e[8],g=e[9],l=e[10],o=e[11],n=e[12],c=e[13];let d;e[28]!==a||e[29]!==g?(d=i.jsx("div",{className:a,children:g}),e[28]=a,e[29]=g,e[30]=d):d=e[30];let f;return e[31]!==r||e[32]!==l||e[33]!==o||e[34]!==n||e[35]!==c||e[36]!==d?(f=i.jsxs(r,{title:l,crumbs:o,children:[n,c,d]}),e[31]=r,e[32]=l,e[33]=o,e[34]=n,e[35]=c,e[36]=d,e[37]=f):f=e[37],f}function F(t){return t.failed}function J(t){return t.href!==null}export{me as default};
1
+ import{c as $,u as P,j as i,C as N,L as C}from"./inertia-CUTKXjxg.js";import{C as I}from"./copy-id-CyRCMfdH.js";import{E as R}from"./empty-state-CshhuRUU.js";import{P as q,E as K}from"./env-layout-Dkp_4NvM.js";import{a as B,S as w}from"./stat-IghK3WjD.js";import{K as H}from"./status-badge-XYUN9gUA.js";import{e as W}from"./execution-path-CdEerUGH.js";import{c as E,m as L,s as T}from"./format-B9SDkrWj.js";import"./app-wordmark-DDNuuq5_.js";import"./use-clipboard-D5i6e5kf.js";import"./index-BpnfuXi-.js";import"./badge-s7YDycYg.js";import"./app-layout-DUk54qUM.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./checkbox-C2AqEZXX.js";import"./label-B32Ks8n7.js";import"./use-live-V-slSdFJ.js";import"./segmented-Bj70Htrs.js";import"./arrow-up-DYTCBENO.js";const A={request:"REQ",job_attempt:"JOB",scheduled_task:"TASK",command:"CMD",outgoing_request:"HTTP"};function M(t,e,s,h=0){return t.flatMap(p=>{const r=p.execution;return[{key:r.execution_id,depth:h,kind:r.kind,label:r.name,server:r.server,offset:r.offset,duration:r.duration,href:W({applicationId:e,environmentId:s,source:r.kind,executionId:r.execution_id}),failed:T(r.status,r.outcome)==="destructive"},...r.outgoing.map(a=>({key:`o-${a.id}`,depth:h+1,kind:"outgoing_request",label:`${a.method??""} ${a.url}`.trim(),server:null,offset:a.offset,duration:a.duration??0,href:null,failed:T(a.status_code)==="destructive"})),...M(p.children,e,s,h+1)]})}function D(t){const e=$.c(33),{row:s,scale:h}=t,p=`${s.depth*.75}rem`;let r;e[0]!==p?(r={paddingLeft:p},e[0]=p,e[1]=r):r=e[1];const a=s.failed?"destructive":"muted",g=A[s.kind]??s.kind;let l;e[2]!==a||e[3]!==g?(l=i.jsx(H,{tone:a,children:g}),e[2]=a,e[3]=g,e[4]=l):l=e[4];let o;e[5]!==s.label?(o=i.jsx("span",{className:"truncate font-mono",children:s.label}),e[5]=s.label,e[6]=o):o=e[6];let n;e[7]!==s.server?(n=s.server&&i.jsx("span",{className:"text-muted-foreground hidden shrink-0 font-mono text-[10px] sm:inline",children:s.server}),e[7]=s.server,e[8]=n):n=e[8];let c;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==n?(c=i.jsxs("span",{className:"col-start-1 row-start-1 flex min-w-0 items-center gap-1.5",style:r,children:[l,o,n]}),e[9]=r,e[10]=l,e[11]=o,e[12]=n,e[13]=c):c=e[13];let d;e[14]!==s.duration?(d=L(s.duration),e[14]=s.duration,e[15]=d):d=e[15];let f;e[16]!==d?(f=i.jsx("span",{className:"col-start-2 row-start-1 text-right font-mono tabular-nums md:col-start-3",children:d}),e[16]=d,e[17]=f):f=e[17];const j=s.failed?"bg-danger":s.href?"bg-primary":"bg-ok";let b;e[18]!==j?(b=N("block h-full rounded",j),e[18]=j,e[19]=b):b=e[19];const y=`${Math.min(99,s.offset/h*100)}%`,k=`${Math.max(.5,s.duration/h*100)}%`;let m;e[20]!==y||e[21]!==k?(m={marginLeft:y,width:k},e[20]=y,e[21]=k,e[22]=m):m=e[22];let u;e[23]!==b||e[24]!==m?(u=i.jsx("span",{className:"bg-muted/30 col-span-2 col-start-1 row-start-2 h-2 rounded md:col-span-1 md:col-start-2 md:row-start-1 md:h-3",children:i.jsx("span",{className:b,style:m})}),e[23]=b,e[24]=m,e[25]=u):u=e[25];let v;e[26]!==f||e[27]!==u||e[28]!==c?(v=i.jsxs(i.Fragment,{children:[c,f,u]}),e[26]=f,e[27]=u,e[28]=c,e[29]=v):v=e[29];const x=v;let _;return e[30]!==x||e[31]!==s.href?(_=s.href?i.jsx(C,{href:s.href,className:N("grid grid-cols-[1fr_4rem] items-center gap-x-2 gap-y-1 border-b px-2 py-1.5 text-xs last:border-b-0 md:grid-cols-[minmax(0,18rem)_1fr_4rem]","hover:bg-muted/40"),children:x}):i.jsx("div",{className:N("grid grid-cols-[1fr_4rem] items-center gap-x-2 gap-y-1 border-b px-2 py-1.5 text-xs last:border-b-0 md:grid-cols-[minmax(0,18rem)_1fr_4rem]","text-muted-foreground"),children:x}),e[30]=x,e[31]=s.href,e[32]=_):_=e[32],_}function me(t){const e=$.c(38),{environment:s}=P().props,h=s.application_id,p=s.id;let r,a,g,l,o,n,c;if(e[0]!==h||e[1]!==p||e[2]!==t.duration||e[3]!==t.roots||e[4]!==t.services||e[5]!==t.span_count||e[6]!==t.trace_id){const j=M(t.roots,h,p),b=j.filter(J),y=b.filter(F).length,k=Math.max(t.duration,1);r=K,l="Trace",e[14]===Symbol.for("react.memo_cache_sentinel")?(o=[{title:"Trace",href:"#"}],e[14]=o):o=e[14],e[15]!==t.trace_id?(n=i.jsx(q,{withWindow:!1,title:i.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[i.jsx("span",{className:"truncate font-mono text-base md:text-xl",children:t.trace_id}),i.jsx(I,{value:t.trace_id,label:""})]}),description:"Every execution that shares this trace id, nested by the call that started it."}),e[15]=t.trace_id,e[16]=n):n=e[16];let m;e[17]!==t.services.length?(m=E(t.services.length),e[17]=t.services.length,e[18]=m):m=e[18];let u;e[19]!==t.services?(u=t.services.join(" · "),e[19]=t.services,e[20]=u):u=e[20];let v;e[21]!==m||e[22]!==u?(v=i.jsx(w,{label:"Services",value:m,hint:u}),e[21]=m,e[22]=u,e[23]=v):v=e[23];let x;e[24]!==t.duration?(x=L(t.duration),e[24]=t.duration,e[25]=x):x=e[25];let _;e[26]!==x?(_=i.jsx(w,{label:"Total duration",value:x}),e[26]=x,e[27]=_):_=e[27],c=i.jsxs(B,{children:[i.jsx(w,{label:"Executions",value:E(b.length),hint:`${t.span_count} spans`}),v,_,i.jsx(w,{label:"Errors",value:E(y),tone:y?"destructive":void 0})]}),a="bg-card -mx-3 overflow-hidden border-y md:mx-0 md:rounded-lg md:border",g=j.length===0?i.jsx(R,{title:"Nothing in this trace",description:"No execution reported this trace id."}):j.map(S=>i.jsx(D,{row:S,scale:k},S.key)),e[0]=h,e[1]=p,e[2]=t.duration,e[3]=t.roots,e[4]=t.services,e[5]=t.span_count,e[6]=t.trace_id,e[7]=r,e[8]=a,e[9]=g,e[10]=l,e[11]=o,e[12]=n,e[13]=c}else r=e[7],a=e[8],g=e[9],l=e[10],o=e[11],n=e[12],c=e[13];let d;e[28]!==a||e[29]!==g?(d=i.jsx("div",{className:a,children:g}),e[28]=a,e[29]=g,e[30]=d):d=e[30];let f;return e[31]!==r||e[32]!==l||e[33]!==o||e[34]!==n||e[35]!==c||e[36]!==d?(f=i.jsxs(r,{title:l,crumbs:o,children:[n,c,d]}),e[31]=r,e[32]=l,e[33]=o,e[34]=n,e[35]=c,e[36]=d,e[37]=f):f=e[37],f}function F(t){return t.failed}function J(t){return t.href!==null}export{me as default};