railwatch 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +6 -2
  3. data/CHANGELOG.md +133 -0
  4. data/README.md +21 -13
  5. data/app/controllers/railwatch/dashboard_controller.rb +1 -0
  6. data/app/controllers/railwatch/requests_controller.rb +1 -19
  7. data/app/models/railwatch/application_record.rb +2 -2
  8. data/app/models/railwatch/execution_presenter.rb +1 -1
  9. data/app/models/railwatch/filter_query.rb +20 -0
  10. data/app/models/railwatch/saved_view.rb +1 -1
  11. data/app/models/railwatch/telemetry_record.rb +2 -2
  12. data/docs/configuration.md +29 -13
  13. data/docs/embedded.md +32 -12
  14. data/docs/faq.md +6 -5
  15. data/docs/getting-started.md +9 -5
  16. data/docs/troubleshooting.md +10 -6
  17. data/lib/generators/railwatch/install/install_generator.rb +31 -16
  18. data/lib/generators/railwatch/install/templates/initializer.rb.tt +4 -4
  19. data/lib/puma/plugin/railwatch.rb +48 -3
  20. data/lib/railwatch/configuration.rb +16 -1
  21. data/lib/railwatch/engine.rb +14 -3
  22. data/lib/railwatch/reporter.rb +52 -16
  23. data/lib/railwatch/transport/http.rb +4 -9
  24. data/lib/railwatch/version.rb +1 -1
  25. data/lib/railwatch.rb +35 -1
  26. data/lib/tasks/railwatch_tasks.rake +11 -4
  27. data/llms.txt +8 -4
  28. data/public/railwatch/assets/{app-layout-DDyQa72H.js → app-layout-2xAKndVD.js} +1 -1
  29. data/public/railwatch/assets/{app-wordmark-o9CODKP0.js → app-wordmark-Bt6XqURo.js} +1 -1
  30. data/public/railwatch/assets/{appearance-BwuCXabr.js → appearance-DyCfeh9o.js} +1 -1
  31. data/public/railwatch/assets/{arrow-up-C6PxDiY3.js → arrow-up-EmePsTKP.js} +1 -1
  32. data/public/railwatch/assets/{auth-layout-BRt8MGFD.js → auth-layout-BuwogWMZ.js} +1 -1
  33. data/public/railwatch/assets/{badge-CAxXV8za.js → badge-Dv7I-ebP.js} +1 -1
  34. data/public/railwatch/assets/{braces-DgomTCNf.js → braces-iZ7MEfYP.js} +1 -1
  35. data/public/railwatch/assets/{card-cAtqCxWl.js → card-DqdEEKcJ.js} +1 -1
  36. data/public/railwatch/assets/{chart-BBeBkkNa.js → chart-C4k7Ub9W.js} +1 -1
  37. data/public/railwatch/assets/{chart-hover-B1M9jc0y.js → chart-hover-2yZG3w2u.js} +1 -1
  38. data/public/railwatch/assets/{chart-panel-DUQTz_C8.js → chart-panel-CONkZcn9.js} +1 -1
  39. data/public/railwatch/assets/{checkbox-CmhMHWZO.js → checkbox-DKbThbxr.js} +1 -1
  40. data/public/railwatch/assets/{code-DESvxyTj.js → code-CYahYQHZ.js} +1 -1
  41. data/public/railwatch/assets/{copy-block-BkSU5832.js → copy-block-CbJum9s8.js} +1 -1
  42. data/public/railwatch/assets/{copy-id-D03GhN9F.js → copy-id-JmvLfkmx.js} +1 -1
  43. data/public/railwatch/assets/{cursor-load-more-CRyuMeQb.js → cursor-load-more-C1ylbqqL.js} +1 -1
  44. data/public/railwatch/assets/{data-table-BIlt7Rtm.js → data-table-CVKR2wkq.js} +1 -1
  45. data/public/railwatch/assets/{edit-DJ0D0wHN.js → edit-BXF5oNYA.js} +1 -1
  46. data/public/railwatch/assets/{edit-O0NSBWxo.js → edit-BwSEVrTG.js} +1 -1
  47. data/public/railwatch/assets/{edit-Bb6MKoe4.js → edit-D5BRDwLT.js} +1 -1
  48. data/public/railwatch/assets/{empty-state-C38il627.js → empty-state-Bn48Gplm.js} +1 -1
  49. data/public/railwatch/assets/{env-layout-REF7OM4q.js → env-layout-CKLL8Ds7.js} +1 -1
  50. data/public/railwatch/assets/{execution-path-FYLq1TwC.js → execution-path-DWovhgLi.js} +1 -1
  51. data/public/railwatch/assets/{filter-bar-CYog9Alp.js → filter-bar-xcbJC93z.js} +1 -1
  52. data/public/railwatch/assets/{flamegraph-DSs69foN.js → flamegraph-BNbNIuKT.js} +1 -1
  53. data/public/railwatch/assets/{frames-BUi2J5Mk.js → frames-Bk39xfJG.js} +1 -1
  54. data/public/railwatch/assets/{google-sign-in-button-BQiIKFdd.js → google-sign-in-button-B5as2ps1.js} +1 -1
  55. data/public/railwatch/assets/{index-QpTtwFwu.js → index-Atp1FTgX.js} +1 -1
  56. data/public/railwatch/assets/{index-C-PmdhXA.js → index-B-FXAo1w.js} +1 -1
  57. data/public/railwatch/assets/{index-DqTFTP8p.js → index-B0xgzHuN.js} +1 -1
  58. data/public/railwatch/assets/{index-so4lRrRq.js → index-BDVShWMs.js} +1 -1
  59. data/public/railwatch/assets/{index-C_upSl_k.js → index-BRvRkfob.js} +1 -1
  60. data/public/railwatch/assets/{index-CsoN51vW.js → index-BVWapDeB.js} +1 -1
  61. data/public/railwatch/assets/{index-CrZ3vHDL.js → index-Bd4YpOIO.js} +1 -1
  62. data/public/railwatch/assets/{index-BaR1U9An.js → index-BeQw69GM.js} +1 -1
  63. data/public/railwatch/assets/{index-Dh4IRLFI.js → index-BfitxVBv.js} +1 -1
  64. data/public/railwatch/assets/{index-umIAl-pL.js → index-C-EwH4lO.js} +1 -1
  65. data/public/railwatch/assets/{index-CICUIFHL.js → index-C8JIdb3_.js} +1 -1
  66. data/public/railwatch/assets/{index-CFFpnzIS.js → index-CBFCtJAR.js} +1 -1
  67. data/public/railwatch/assets/{index-tpz-OGUP.js → index-CDXlITyG.js} +1 -1
  68. data/public/railwatch/assets/{index-DW2CBbxU.js → index-COd9lT84.js} +1 -1
  69. data/public/railwatch/assets/{index-FhUaPPab.js → index-C_hQmVTP.js} +1 -1
  70. data/public/railwatch/assets/{index-JdCVBrw8.js → index-CcennT28.js} +1 -1
  71. data/public/railwatch/assets/{index-DrcKVG2f.js → index-CiaeS-n7.js} +1 -1
  72. data/public/railwatch/assets/{index-BoUBioBP.js → index-CrA7jBTK.js} +1 -1
  73. data/public/railwatch/assets/{index-C3A_9imx.js → index-D0mKj3Hg.js} +1 -1
  74. data/public/railwatch/assets/{index-BiiyMcA0.js → index-DV5MdmpY.js} +1 -1
  75. data/public/railwatch/assets/{index-CiPo4Gob.js → index-DaE-1xhx.js} +1 -1
  76. data/public/railwatch/assets/{index-CpkI015n.js → index-DdVg9LKX.js} +1 -1
  77. data/public/railwatch/assets/{index-DvjY3dPD.js → index-DeLtMWou.js} +1 -1
  78. data/public/railwatch/assets/{index-CFRLPs4J.js → index-DiQ4mqT_.js} +1 -1
  79. data/public/railwatch/assets/{index-DtHmuB9Q.js → index-LKgpCzoR.js} +1 -1
  80. data/public/railwatch/assets/{index-BeOh2t_S.js → index-S0NVaLj9.js} +1 -1
  81. data/public/railwatch/assets/{index-C7OtLq_3.js → index-Vj93BTR5.js} +1 -1
  82. data/public/railwatch/assets/{index-ZOGOB8SA.js → index-XjXcV-EO.js} +1 -1
  83. data/public/railwatch/assets/{index-ZSZg9rtq.js → index-Zkt4W_CM.js} +1 -1
  84. data/public/railwatch/assets/{index-8-hnAhOD.js → index-aPCZX-pW.js} +1 -1
  85. data/public/railwatch/assets/{index-DDI_Zx5V.js → index-cTzBycCg.js} +1 -1
  86. data/public/railwatch/assets/{index-sTYvcbkh.js → index-dpG-19ZN.js} +1 -1
  87. data/public/railwatch/assets/{index-r0tSIplE.js → index-gCvuyG1l.js} +1 -1
  88. data/public/railwatch/assets/{index-DSvlZVWG.js → index-o1xqGvLo.js} +1 -1
  89. data/public/railwatch/assets/{index-CGs4m_fa.js → index-w_skgMmK.js} +1 -1
  90. data/public/railwatch/assets/{inertia-DLew8ZNx.js → inertia-CqnzqPVD.js} +2 -2
  91. data/public/railwatch/assets/{input-error-cvM6_Jht.js → input-error-ByT28UdP.js} +1 -1
  92. data/public/railwatch/assets/{json-viewer-D922McGi.js → json-viewer-Bnu9RsJL.js} +1 -1
  93. data/public/railwatch/assets/{klass-CrwICqN8.js → klass-nLiBV-Az.js} +1 -1
  94. data/public/railwatch/assets/{label-GWl7I6sf.js → label-1nSzpSB6.js} +1 -1
  95. data/public/railwatch/assets/{layout-0ZAnD3zl.js → layout-D7lE1Doo.js} +1 -1
  96. data/public/railwatch/assets/{live-dot-D1n_BreY.js → live-dot-UdzOfzJb.js} +1 -1
  97. data/public/railwatch/assets/{nav-DPxr1NNC.js → nav-BRCgp2w3.js} +1 -1
  98. data/public/railwatch/assets/{new-DHAHDrN7.js → new-C60G72DR.js} +1 -1
  99. data/public/railwatch/assets/{new-D-ZzUK9a.js → new-COyDKOOb.js} +1 -1
  100. data/public/railwatch/assets/{new-DEVkYv-z.js → new-Cd9zPNJ8.js} +1 -1
  101. data/public/railwatch/assets/{new-Dz4lZf1L.js → new-DMJGKjmH.js} +1 -1
  102. data/public/railwatch/assets/{new-GMrRFurX.js → new-Omvf-c9s.js} +1 -1
  103. data/public/railwatch/assets/{new-Cdl6pqST.js → new-vjRzERL3.js} +1 -1
  104. data/public/railwatch/assets/onboarding-gUjJQc-6.js +1 -0
  105. data/public/railwatch/assets/{origin-identity-Bk9yHWZ1.js → origin-identity-M1YUPYS0.js} +1 -1
  106. data/public/railwatch/assets/{percentile-picker-DfSx9yJO.js → percentile-picker-BxIVblBw.js} +1 -1
  107. data/public/railwatch/assets/{relative-time-CjIjb8Lg.js → relative-time-DQ4kjowZ.js} +1 -1
  108. data/public/railwatch/assets/{release-health-4b3tivEf.js → release-health-Cb1tMOOO.js} +1 -1
  109. data/public/railwatch/assets/{route-C_5BUtHK.js → route-BJkoEm7r.js} +1 -1
  110. data/public/railwatch/assets/{segmented-BgbT3wZa.js → segmented-C4oWE73o.js} +1 -1
  111. data/public/railwatch/assets/{select-DmunxCKE.js → select-ocdQJdQo.js} +1 -1
  112. data/public/railwatch/assets/{separator-BXzEdZ_8.js → separator-Ct2UcZ2x.js} +1 -1
  113. data/public/railwatch/assets/{series-chart-Xf49v9cv.js → series-chart-D6upsrSn.js} +1 -1
  114. data/public/railwatch/assets/{show-DlRVS18-.js → show-B4bwI9x2.js} +1 -1
  115. data/public/railwatch/assets/{show-DnR1Dnjd.js → show-BAjfddEn.js} +1 -1
  116. data/public/railwatch/assets/{show-mU38uGTg.js → show-BLJOyLb_.js} +1 -1
  117. data/public/railwatch/assets/{show-DYskfl3-.js → show-BoVyMQS6.js} +1 -1
  118. data/public/railwatch/assets/{show-DXs4deaC.js → show-Bsu1rvnK.js} +1 -1
  119. data/public/railwatch/assets/{show-Dn-GwFZL.js → show-C6OiJ6Hr.js} +1 -1
  120. data/public/railwatch/assets/{show-CAl7xcex.js → show-C8TkpEgm.js} +1 -1
  121. data/public/railwatch/assets/{show-BLpWUHWD.js → show-CBFBiBY2.js} +1 -1
  122. data/public/railwatch/assets/{show-Y74rM0VT.js → show-CEhPVMMT.js} +1 -1
  123. data/public/railwatch/assets/{show-SHwZjXb7.js → show-CV-lG2b6.js} +1 -1
  124. data/public/railwatch/assets/{show-Dily73Xk.js → show-CX_pab9S.js} +1 -1
  125. data/public/railwatch/assets/{show-DcpTFiLi.js → show-D6lgzL6n.js} +1 -1
  126. data/public/railwatch/assets/{show-vQ4bndYD.js → show-DDVsv-uS.js} +1 -1
  127. data/public/railwatch/assets/{show-SvLOcPrx.js → show-Dwiq-8hA.js} +1 -1
  128. data/public/railwatch/assets/{show-B2zLAW83.js → show-eKazflRI.js} +1 -1
  129. data/public/railwatch/assets/{show-DSP9Cq_C.js → show-gtwKsTsl.js} +1 -1
  130. data/public/railwatch/assets/{show-DI8IhNUH.js → show-yEOrk6Pt.js} +1 -1
  131. data/public/railwatch/assets/{sort-header-Dcq9bzmo.js → sort-header-CPM6fhXv.js} +1 -1
  132. data/public/railwatch/assets/{sparkline-cell-BON3qQUB.js → sparkline-cell-CXCxXPWt.js} +1 -1
  133. data/public/railwatch/assets/{stat-DFEyFxkO.js → stat-BNEfE8X1.js} +1 -1
  134. data/public/railwatch/assets/{status-badge-BaUKP7Yo.js → status-badge-D0aylrM5.js} +1 -1
  135. data/public/railwatch/assets/{tenant-path-DPZPc985.js → tenant-path-C4aM_cO0.js} +1 -1
  136. data/public/railwatch/assets/{text-link-BO77t9Xk.js → text-link-CP4lqUi6.js} +1 -1
  137. data/public/railwatch/assets/{textarea-DTqrCiV0.js → textarea-DzJo2ds4.js} +1 -1
  138. data/public/railwatch/assets/{timeline-D5rJ0es2.js → timeline-BNcJ9PMc.js} +1 -1
  139. data/public/railwatch/assets/{transition-DMIrZVth.js → transition-BX2M1iaq.js} +1 -1
  140. data/public/railwatch/assets/{use-clipboard-ByoUGQqA.js → use-clipboard-C1ApSwzA.js} +1 -1
  141. data/public/railwatch/assets/{use-live-D7xKz2ma.js → use-live-DWwLg1Nj.js} +1 -1
  142. data/public/railwatch/manifest.json +1283 -1283
  143. metadata +116 -116
  144. data/public/railwatch/assets/onboarding-D1vwaHYT.js +0 -1
  145. /data/db/railwatch_telemetry_migrate/{20260919000000_create_export_queue.rb → 20260919000100_create_export_queue.rb} +0 -0
@@ -1 +1 @@
1
- import{a4 as re,r as c,c as $,j as A}from"./inertia-DLew8ZNx.js";import{u as Ye}from"./chart-hover-B1M9jc0y.js";import{i as K,e as He,s as ne,D as ie,f as ge,g as Ct,Z as oe,L as R,u as be,h as Mt,j as Tt,k as U,l as Ue,m as F,n as H,o as Kt,p as le,q as se,r as qe,t as Pe,v as q,w as Ze,x as Ae,y as ce,z as Je,S as Qe,A as et,E as ue,F as tt,G as at,H as rt,I as nt,J as it,K as ot,M as Wt,N as Z,O as J,P as lt,Q as st,T as M,U as ct,V as ut,W as dt,_ as Rt,$ as $t,a0 as Ft,a1 as Ie,a2 as Ee,a3 as zt,a4 as Bt,a5 as Vt,a6 as Gt,a7 as Xt,a8 as Yt,a9 as pe,aa as Q,ab as pt,ac as vt,R as Ht,C as ke,X as je,Y as Oe,a as Se,b as we,c as de,B as ve,d as Ut}from"./chart-BBeBkkNa.js";import{m as ft}from"./format-B9SDkrWj.js";function he(){return he=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},he.apply(null,arguments)}var mt=t=>{var{cx:e,cy:a,r,className:n}=t,i=re("recharts-dot",n);return K(e)&&K(a)&&K(r)?c.createElement("circle",he({},ne(t),He(t),{className:i,cx:e,cy:a,r})):null},qt=["points"];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 fe(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){Zt(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 Zt(t,e,a){return(e=Jt(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Jt(t){var e=Qt(t,"string");return typeof e=="symbol"?e:e+""}function Qt(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 ee(){return ee=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},ee.apply(null,arguments)}function ea(t,e){if(t==null)return{};var a,r,n=ta(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ta(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 aa(t){var{option:e,dotProps:a,className:r}=t;if(c.isValidElement(e))return c.cloneElement(e,a);if(typeof e=="function")return e(a);var n=re(r,typeof e!="boolean"?e.className:""),i=a??{},{points:l}=i,o=ea(i,qt);return c.createElement(mt,ee({},o,{className:n}))}function ra(t,e){return t==null?!1:e?!0:t.length===1}function ht(t){var{points:e,dot:a,className:r,dotClassName:n,dataKey:i,baseProps:l,needClip:o,clipPathId:s,zIndex:d=ie.scatter}=t;if(!ra(e,a))return null;var u=ge(a),p=Ct(a),v=e.map((m,y)=>{var x,h,g=fe(fe(fe({r:3},l),p),{},{index:y,cx:(x=m.x)!==null&&x!==void 0?x:void 0,cy:(h=m.y)!==null&&h!==void 0?h:void 0,dataKey:i,value:m.value,payload:m.payload,points:e});return c.createElement(aa,{key:"dot-".concat(y),option:a,dotProps:g,className:n})}),f={};return o&&s!=null&&(f.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(s,")")),c.createElement(oe,{zIndex:d},c.createElement(R,ee({className:r},f),v))}function $e(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 me(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(a),!0).forEach(function(r){na(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):$e(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function na(t,e,a){return(e=ia(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ia(t){var e=oa(t,"string");return typeof e=="symbol"?e:e+""}function oa(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 la=t=>{var{point:e,childIndex:a,mainColor:r,activeDot:n,dataKey:i,clipPath:l}=t;if(n===!1||e.x==null||e.y==null)return null;var o={index:a,dataKey:i,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},s=me(me(me({},o),Ue(n)),He(n)),d;return c.isValidElement(n)?d=c.cloneElement(n,s):typeof n=="function"?d=n(s):d=c.createElement(mt,s),c.createElement(R,{className:"recharts-active-dot",clipPath:l},d)};function ye(t){var{points:e,mainColor:a,activeDot:r,itemDataKey:n,clipPath:i,zIndex:l=ie.activeDot}=t,o=be(Mt),s=Tt();if(e==null||s==null)return null;var d=e.find(u=>s.includes(u.payload));return U(d)?null:c.createElement(oe,{zIndex:l},c.createElement(la,{point:d,childIndex:Number(o),mainColor:a,dataKey:n,activeDot:r,clipPath:i}))}var yt=(t,e,a,r)=>le(t,"xAxis",e,r),xt=(t,e,a,r)=>se(t,"xAxis",e,r),gt=(t,e,a,r)=>le(t,"yAxis",a,r),bt=(t,e,a,r)=>se(t,"yAxis",a,r),sa=F([H,yt,gt,xt,bt],(t,e,a,r,n)=>Pe(t,"xAxis")?q(e,r,!1):q(a,n,!1)),ca=(t,e,a,r,n)=>n;function ua(t){return t.type==="line"}var da=F([qe,ca],(t,e)=>t.filter(ua).find(a=>a.id===e)),pa=F([H,yt,gt,xt,bt,da,sa,Kt],(t,e,a,r,n,i,l,o)=>{var{chartData:s,dataStartIndex:d,dataEndIndex:u}=o;if(!(i==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:v}=i,f;if(v!=null&&v.length>0?f=v:f=s?.slice(d,u+1),f!=null)return Na({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:p,bandSize:l,displayedData:f})}});function Pt(t){var e=Ue(t),a=3,r=2;if(e!=null){var{r:n,strokeWidth:i}=e,l=Number(n),o=Number(i);return(Number.isNaN(l)||l<0)&&(l=a),(Number.isNaN(o)||o<0)&&(o=r),{r:l,strokeWidth:o}}return{r:a,strokeWidth:r}}var va=["id"],fa=["type","layout","connectNulls","needClip","shape"],ma=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function X(){return X=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},X.apply(null,arguments)}function Fe(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 T(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Fe(Object(a),!0).forEach(function(r){ha(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Fe(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function ha(t,e,a){return(e=ya(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ya(t){var e=xa(t,"string");return typeof e=="symbol"?e:e+""}function xa(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 De(t,e){if(t==null)return{};var a,r,n=ga(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ga(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 ba=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:i}=t;return[{inactive:i,dataKey:e,type:n,color:r,value:ue(a,e),payload:t}]},Pa=c.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:i,name:l,hide:o,unit:s,tooltipType:d,id:u}=t,p={dataDefinedOnItem:a,getPosition:at,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:e,nameKey:void 0,name:ue(l,e),hide:o,type:d,color:r,unit:s,graphicalItemId:u}};return c.createElement(tt,{tooltipEntrySettings:p})}),At=(t,e)=>"".concat(e,"px ").concat(t,"px");function Aa(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var Ia=(t,e,a)=>{var r=a.reduce((v,f)=>v+f,0);if(!r)return At(e,t);for(var n=Math.floor(t/r),i=t%r,l=[],o=0,s=0;o<a.length;s+=(d=a[o])!==null&&d!==void 0?d:0,++o){var d,u=a[o];if(u!=null&&s+u>i){l=[...a.slice(0,o),i-s];break}}var p=l.length%2===0?[0,e]:[e];return[...Aa(a,n),...l,...p].map(v=>"".concat(v,"px")).join(", ")};function Ea(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:i,needClip:l}=r,{id:o}=r,s=De(r,va),d=ne(s);return c.createElement(ht,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:d,needClip:l,clipPathId:e})}function ka(t){var{showLabels:e,children:a,points:r}=t,n=c.useMemo(()=>r?.map(i=>{var l,o,s={x:(l=i.x)!==null&&l!==void 0?l:0,y:(o=i.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return T(T({},s),{},{value:i.value,payload:i.payload,viewBox:s,parentViewBox:void 0,fill:void 0})}),[r]);return c.createElement(ut,{value:e?n:void 0},a)}function ze(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:i}=t,{type:l,layout:o,connectNulls:s,needClip:d,shape:u}=i,p=De(i,fa),v=T(T({},dt(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(e,")"):void 0,points:r,type:l,layout:o,connectNulls:s,strokeDasharray:n??i.strokeDasharray});return c.createElement(c.Fragment,null,r?.length>1&&c.createElement(Rt,X({shapeType:"curve",option:u},v,{pathRef:a})),c.createElement(Ea,{points:r,clipPathId:e,props:i}))}function ja(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Oa(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:i}=t,{points:l,strokeDasharray:o,isAnimationActive:s,animationBegin:d,animationDuration:u,animationEasing:p,animateNewValues:v,width:f,height:m,onAnimationEnd:y,onAnimationStart:x}=a,h=n.current,g=lt(l,"recharts-line-"),P=c.useRef(g),[b,I]=c.useState(!1),E=!b,k=c.useCallback(()=>{typeof y=="function"&&y(),I(!1)},[y]),j=c.useCallback(()=>{typeof x=="function"&&x(),I(!0)},[x]),S=ja(r.current),D=c.useRef(0);P.current!==g&&(D.current=i.current,P.current=g);var w=D.current;return c.createElement(ka,{points:l,showLabels:E},a.children,c.createElement(st,{animationId:g,begin:d,duration:u,isActive:s,easing:p,onAnimationEnd:k,onAnimationStart:j,key:g},O=>{var L=M(w,S+w,O),_=Math.min(L,S),N;if(s)if(o){var z="".concat(o).split(/[,\s]+/gim).map(C=>parseFloat(C));N=Ia(_,S,z)}else N=At(S,_);else N=o==null?void 0:String(o);if(O>0&&S>0&&(n.current=l,i.current=Math.max(i.current,_)),h){var G=h.length/l.length,Te=O===1?l:l.map((C,_t)=>{var Ke=Math.floor(_t*G);if(h[Ke]){var We=h[Ke];return T(T({},C),{},{x:M(We.x,C.x,O),y:M(We.y,C.y,O)})}return v?T(T({},C),{},{x:M(f*2,C.x,O),y:M(m/2,C.y,O)}):T(T({},C),{},{x:C.x,y:C.y})});return n.current=Te,c.createElement(ze,{props:a,points:Te,clipPathId:e,pathRef:r,strokeDasharray:N})}return c.createElement(ze,{props:a,points:l,clipPathId:e,pathRef:r,strokeDasharray:N})}),c.createElement(ct,{label:a.label}))}function Sa(t){var{clipPathId:e,props:a}=t,r=c.useRef(null),n=c.useRef(0),i=c.useRef(null);return c.createElement(Oa,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:i})}var wa=(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:Z(t.payload,e)}};class Da extends c.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:i,yAxisId:l,top:o,left:s,width:d,height:u,id:p,needClip:v,zIndex:f}=this.props;if(e)return null;var m=re("recharts-line",n),y=p,{r:x,strokeWidth:h}=Pt(a),g=ge(a),P=x*2+h,b=v?"url(#clipPath-".concat(g?"":"dots-").concat(y,")"):void 0;return c.createElement(oe,{zIndex:f},c.createElement(R,{className:m},v&&c.createElement("defs",null,c.createElement(ot,{clipPathId:y,xAxisId:i,yAxisId:l}),!g&&c.createElement("clipPath",{id:"clipPath-dots-".concat(y)},c.createElement("rect",{x:s-P/2,y:o-P/2,width:d+P,height:u+P}))),c.createElement(Wt,{xAxisId:i,yAxisId:l,data:r,dataPointFormatter:wa,errorBarOffset:0},c.createElement(Sa,{props:this.props,clipPathId:y}))),c.createElement(ye,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:b}))}}var It={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:ie.line,type:"linear"};function La(t){var e=Ae(t,It),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:i,animationEasing:l,connectNulls:o,dot:s,hide:d,isAnimationActive:u,label:p,legendType:v,xAxisId:f,yAxisId:m,id:y}=e,x=De(e,ma),{needClip:h}=rt(f,m),g=nt(),P=it(),b=ce(),I=be(D=>pa(D,f,m,b,y));if(P!=="horizontal"&&P!=="vertical"||I==null||g==null)return null;var{height:E,width:k,x:j,y:S}=g;return c.createElement(Da,X({},x,{id:y,connectNulls:o,dot:s,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:i,animationEasing:l,isAnimationActive:u,hide:d,label:p,legendType:v,xAxisId:f,yAxisId:m,points:I,layout:P,height:E,width:k,left:j,top:S,needClip:h}))}function Na(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:l,bandSize:o,displayedData:s}=t;return s.map((d,u)=>{var p=Z(d,l);if(e==="horizontal"){var v=J({axis:a,ticks:n,bandSize:o,entry:d,index:u}),f=U(p)?null:r.scale.map(p);return{x:v,y:f??null,value:p,payload:d}}var m=U(p)?null:a.scale.map(p),y=J({axis:r,ticks:i,bandSize:o,entry:d,index:u});return m==null||y==null?null:{x:m,y,value:p,payload:d}}).filter(Boolean)}function _a(t){var e=Ae(t,It),a=ce();return c.createElement(Je,{id:e.id,type:"line"},r=>c.createElement(c.Fragment,null,c.createElement(Qe,{legendPayload:ba(e)}),c.createElement(Pa,{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}),c.createElement(et,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),c.createElement(La,X({},e,{id:r}))))}var xe=c.memo(_a,Ze);xe.displayName="Line";var Et=(t,e,a)=>le(t,"xAxis",Ie(t,e),a),kt=(t,e,a)=>se(t,"xAxis",Ie(t,e),a),jt=(t,e,a)=>le(t,"yAxis",Ee(t,e),a),Ot=(t,e,a)=>se(t,"yAxis",Ee(t,e),a),Ca=F([H,Et,jt,kt,Ot],(t,e,a,r,n)=>Pe(t,"xAxis")?q(e,r,!1):q(a,n,!1)),Ma=(t,e)=>e,St=F([qe,Ma],(t,e)=>t.filter(a=>a.type==="area").find(a=>a.id===e)),wt=t=>{var e=H(t),a=Pe(e,"xAxis");return a?"yAxis":"xAxis"},Ta=(t,e)=>{var a=wt(t);return a==="yAxis"?Ee(t,e):Ie(t,e)},Ka=(t,e,a)=>Bt(t,wt(t),Ta(t,e),a),Wa=F([St,Ka],(t,e)=>{var a;if(!(t==null||e==null)){var{stackId:r}=t,n=zt(t);if(!(r==null||n==null)){var i=(a=e[r])===null||a===void 0?void 0:a.stackedData,l=i?.find(o=>o.key===n);if(l!=null)return l.map(o=>[o[0],o[1]])}}}),Ra=F([H,Et,jt,kt,Ot,Wa,$t,Ca,St,Ft],(t,e,a,r,n,i,l,o,s,d)=>{var{chartData:u,dataStartIndex:p,dataEndIndex:v}=l;if(!(s==null||t!=="horizontal"&&t!=="vertical"||e==null||a==null||r==null||n==null||r.length===0||n.length===0||o==null)){var{data:f}=s,m;if(f&&f.length>0?m=f:m=u?.slice(p,v+1),m!=null)return ir({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataStartIndex:p,areaSettings:s,stackedData:i,displayedData:m,chartBaseValue:d,bandSize:o})}}),$a=["id"],Fa=["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 Dt(t,e){if(t==null)return{};var a,r,n=za(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function za(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 Be(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 B(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Be(Object(a),!0).forEach(function(r){Ba(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Be(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Ba(t,e,a){return(e=Va(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Va(t){var e=Ga(t,"string");return typeof e=="symbol"?e:e+""}function Ga(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 te(t,e){return t&&t!=="none"?t:e}var Xa=t=>{var{dataKey:e,name:a,stroke:r,fill:n,legendType:i,hide:l}=t;return[{inactive:l,dataKey:e,type:i,color:te(r,n),value:ue(a,e),payload:t}]},Ya=c.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:i,name:l,hide:o,unit:s,tooltipType:d,id:u}=t,p={dataDefinedOnItem:a,getPosition:at,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:e,nameKey:void 0,name:ue(l,e),hide:o,type:d,color:te(r,i),unit:s,graphicalItemId:u}};return c.createElement(tt,{tooltipEntrySettings:p})});function Ha(t){var{clipPathId:e,points:a,props:r}=t,{needClip:n,dot:i,dataKey:l}=r,o=ne(r);return c.createElement(ht,{points:a,dot:i,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:o,needClip:n,clipPathId:e})}function Ua(t){var{showLabels:e,children:a,points:r}=t,n=r.map(i=>{var l,o,s={x:(l=i.x)!==null&&l!==void 0?l:0,y:(o=i.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return B(B({},s),{},{value:i.value,payload:i.payload,parentViewBox:void 0,viewBox:s,fill:void 0})});return c.createElement(ut,{value:e?n:void 0},a)}function Ve(t){var{points:e,baseLine:a,needClip:r,clipPathId:n,props:i}=t,{layout:l,type:o,stroke:s,connectNulls:d,isRange:u}=i,{id:p}=i,v=Dt(i,$a),f=ne(v),m=dt(v);return c.createElement(c.Fragment,null,e?.length>1&&c.createElement(R,{clipPath:r?"url(#clipPath-".concat(n,")"):void 0},c.createElement(pe,W({},m,{id:p,points:e,connectNulls:d,type:o,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),s!=="none"&&c.createElement(pe,W({},f,{className:"recharts-area-curve",layout:l,type:o,connectNulls:d,fill:"none",points:e})),s!=="none"&&u&&Array.isArray(a)&&c.createElement(pe,W({},f,{className:"recharts-area-curve",layout:l,type:o,connectNulls:d,fill:"none",points:a}))),c.createElement(Ha,{points:e,props:v,clipPathId:n}))}function qa(t){var e,a,{alpha:r,baseLine:n,points:i,strokeWidth:l}=t,o=(e=i[0])===null||e===void 0?void 0:e.y,s=(a=i[i.length-1])===null||a===void 0?void 0:a.y;if(!Q(o)||!Q(s))return null;var d=r*Math.abs(o-s),u=Math.max(...i.map(p=>p.x||0));return K(n)?u=Math.max(n,u):n&&Array.isArray(n)&&n.length&&(u=Math.max(...n.map(p=>p.x||0),u)),K(u)?c.createElement("rect",{x:0,y:o<s?o:o-d,width:u+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}function Za(t){var e,a,{alpha:r,baseLine:n,points:i,strokeWidth:l}=t,o=(e=i[0])===null||e===void 0?void 0:e.x,s=(a=i[i.length-1])===null||a===void 0?void 0:a.x;if(!Q(o)||!Q(s))return null;var d=r*Math.abs(o-s),u=Math.max(...i.map(p=>p.y||0));return K(n)?u=Math.max(n,u):n&&Array.isArray(n)&&n.length&&(u=Math.max(...n.map(p=>p.y||0),u)),K(u)?c.createElement("rect",{x:o<s?o:o-d,y:0,width:d,height:Math.floor(u+(l?parseInt("".concat(l),10):1))}):null}function Ja(t){var{alpha:e,layout:a,points:r,baseLine:n,strokeWidth:i}=t;return a==="vertical"?c.createElement(qa,{alpha:e,points:r,baseLine:n,strokeWidth:i}):c.createElement(Za,{alpha:e,points:r,baseLine:n,strokeWidth:i})}function Qa(t){var{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:i}=t,{points:l,baseLine:o,isAnimationActive:s,animationBegin:d,animationDuration:u,animationEasing:p,onAnimationStart:v,onAnimationEnd:f}=r,m=c.useMemo(()=>({points:l,baseLine:o}),[l,o]),y=lt(m,"recharts-area-"),x=Xt(),[h,g]=c.useState(!1),P=!h,b=c.useCallback(()=>{typeof f=="function"&&f(),g(!1)},[f]),I=c.useCallback(()=>{typeof v=="function"&&v(),g(!0)},[v]);if(x==null)return null;var E=n.current,k=i.current;return c.createElement(Ua,{showLabels:P,points:l},r.children,c.createElement(st,{animationId:y,begin:d,duration:u,isActive:s,easing:p,onAnimationEnd:b,onAnimationStart:I,key:y},j=>{if(E){var S=E.length/l.length,D=j===1?l:l.map((O,L)=>{var _=Math.floor(L*S);if(E[_]){var N=E[_];return B(B({},O),{},{x:M(N.x,O.x,j),y:M(N.y,O.y,j)})}return O}),w;return K(o)?w=M(k,o,j):U(o)||Yt(o)?w=M(k,0,j):w=o.map((O,L)=>{var _=Math.floor(L*S);if(Array.isArray(k)&&k[_]){var N=k[_];return B(B({},O),{},{x:M(N.x,O.x,j),y:M(N.y,O.y,j)})}return O}),j>0&&(n.current=D,i.current=w),c.createElement(Ve,{points:D,baseLine:w,needClip:e,clipPathId:a,props:r})}return j>0&&(n.current=l,i.current=o),c.createElement(R,null,s&&c.createElement("defs",null,c.createElement("clipPath",{id:"animationClipPath-".concat(a)},c.createElement(Ja,{alpha:j,points:l,baseLine:o,layout:x,strokeWidth:r.strokeWidth}))),c.createElement(R,{clipPath:"url(#animationClipPath-".concat(a,")")},c.createElement(Ve,{points:l,baseLine:o,needClip:e,clipPathId:a,props:r})))}),c.createElement(ct,{label:r.label}))}function er(t){var{needClip:e,clipPathId:a,props:r}=t,n=c.useRef(null),i=c.useRef();return c.createElement(Qa,{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:i})}class tr extends c.PureComponent{render(){var{hide:e,dot:a,points:r,className:n,top:i,left:l,needClip:o,xAxisId:s,yAxisId:d,width:u,height:p,id:v,baseLine:f,zIndex:m}=this.props;if(e)return null;var y=re("recharts-area",n),x=v,{r:h,strokeWidth:g}=Pt(a),P=ge(a),b=h*2+g,I=o?"url(#clipPath-".concat(P?"":"dots-").concat(x,")"):void 0;return c.createElement(oe,{zIndex:m},c.createElement(R,{className:y},o&&c.createElement("defs",null,c.createElement(ot,{clipPathId:x,xAxisId:s,yAxisId:d}),!P&&c.createElement("clipPath",{id:"clipPath-dots-".concat(x)},c.createElement("rect",{x:l-b/2,y:i-b/2,width:u+b,height:p+b}))),c.createElement(er,{needClip:o,clipPathId:x,props:this.props})),c.createElement(ye,{points:r,mainColor:te(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(f)&&c.createElement(ye,{points:f,mainColor:te(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}var ar={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:ie.area};function rr(t){var e,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:i,connectNulls:l,dot:o,fill:s,fillOpacity:d,hide:u,isAnimationActive:p,legendType:v,stroke:f,xAxisId:m,yAxisId:y}=t,x=Dt(t,Fa),h=it(),g=Gt(),{needClip:P}=rt(m,y),b=ce(),{points:I,isRange:E,baseLine:k}=(e=be(L=>Ra(L,t.id,b)))!==null&&e!==void 0?e:{},j=nt();if(h!=="horizontal"&&h!=="vertical"||j==null||g!=="AreaChart"&&g!=="ComposedChart")return null;var{height:S,width:D,x:w,y:O}=j;return!I||!I.length?null:c.createElement(tr,W({},x,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:i,baseLine:k,connectNulls:l,dot:o,fill:s,fillOpacity:d,height:S,hide:u,layout:h,isAnimationActive:p,isRange:E,legendType:v,needClip:P,points:I,stroke:f,width:D,left:w,top:O,xAxisId:m,yAxisId:y}))}var nr=(t,e,a,r,n)=>{var i=a??e;if(K(i))return i;var l=t==="horizontal"?n:r,o=l.scale.domain();if(l.type==="number"){var s=Math.max(o[0],o[1]),d=Math.min(o[0],o[1]);return i==="dataMin"?d:i==="dataMax"||s<0?s:Math.max(Math.min(o[0],o[1]),0)}return i==="dataMin"?o[0]:i==="dataMax"?o[1]:o[0]};function ir(t){var{areaSettings:{connectNulls:e,baseValue:a,dataKey:r},stackedData:n,layout:i,chartBaseValue:l,xAxis:o,yAxis:s,displayedData:d,dataStartIndex:u,xAxisTicks:p,yAxisTicks:v,bandSize:f}=t,m=n&&n.length,y=nr(i,l,a,o,s),x=i==="horizontal",h=!1,g=d.map((b,I)=>{var E,k,j,S;if(m)S=n[u+I];else{var D=Z(b,r);Array.isArray(D)?(S=D,h=!0):S=[y,D]}var w=(E=(k=S)===null||k===void 0?void 0:k[1])!==null&&E!==void 0?E:null,O=w==null||m&&!e&&Z(b,r)==null;if(x){var L;return{x:J({axis:o,ticks:p,bandSize:f,entry:b,index:I}),y:O?null:(L=s.scale.map(w))!==null&&L!==void 0?L:null,value:S,payload:b}}return{x:O?null:(j=o.scale.map(w))!==null&&j!==void 0?j:null,y:J({axis:s,ticks:v,bandSize:f,entry:b,index:I}),value:S,payload:b}}),P;return m||h?P=g.map(b=>{var I,E=Array.isArray(b.value)?b.value[0]:null;if(x){var k;return{x:b.x,y:E!=null&&b.y!=null&&(k=s.scale.map(E))!==null&&k!==void 0?k:null,payload:b.payload}}return{x:E!=null&&(I=o.scale.map(E))!==null&&I!==void 0?I:null,y:b.y,payload:b.payload}}):P=x?s.scale.map(y):o.scale.map(y),{points:g,baseLine:P??0,isRange:h}}function or(t){var e=Ae(t,ar),a=ce();return c.createElement(Je,{id:e.id,type:"area"},r=>c.createElement(c.Fragment,null,c.createElement(Qe,{legendPayload:Xa(e)}),c.createElement(Ya,{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}),c.createElement(et,{type:"area",id:r,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Vt(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:a,connectNulls:e.connectNulls}),c.createElement(rr,W({},e,{id:r}))))}var Le=c.memo(or,Ze);Le.displayName="Area";var lr=["axis"],sr=c.forwardRef((t,e)=>c.createElement(pt,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lr,tooltipPayloadSearcher:vt,categoricalChartProps:t,ref:e})),cr=["axis"],Lt=c.forwardRef((t,e)=>c.createElement(pt,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:cr,tooltipPayloadSearcher:vt,categoricalChartProps:t,ref:e}));const ae={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 ur(t){return t.length<2?0:new Date(t[1].t).getTime()-new Date(t[0].t).getTime()}const Ge=1440*60*1e3;function Ne(t){const e=ur(t),a=t.length>1?new Date(t[t.length-1].t).getTime()-new Date(t[0].t).getTime():0;return e>=Ge||a>2*Ge?r=>new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"}):r=>new Date(r).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Y(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}const V={fontSize:10,fontFamily:"var(--font-mono)"};function Xe(t,e,a){return n=>{const i=$.c(8),{cx:l,cy:o,index:s}=n;if(l==null||o==null||s==null){let v;return i[0]!==s?(v=A.jsx("g",{},s),i[0]=s,i[1]=v):v=i[1],v}const d=t[s-1]?.[e]??null,u=t[s+1]?.[e]??null;if(d!=null||u!=null){let v;return i[2]!==s?(v=A.jsx("g",{},s),i[2]=s,i[3]=v):v=i[3],v}let p;return i[4]!==l||i[5]!==o||i[6]!==s?(p=A.jsx("circle",{cx:l,cy:o,r:2,fill:a},s),i[4]=l,i[5]=o,i[6]=s,i[7]=p):p=i[7],p}}function _e(t=[]){return t.map(e=>A.jsx(Ht,{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 Ce(){const t=$.c(2),{setHoveredKey:e}=Ye();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 Me(t){const e=$.c(11),{data:a}=t;if(a.length===0)return null;let r;e[0]!==a[0].t?(r=Y(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 i=a[a.length-1];let l;e[4]!==i.t?(l=Y(i.t),e[4]=i.t,e[5]=l):l=e[5];let o;e[6]!==l?(o=A.jsx("span",{children:l}),e[6]=l,e[7]=o):o=e[7];let s;return e[8]!==n||e[9]!==o?(s=A.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[n,o]}),e[8]=n,e[9]=o,e[10]=s):s=e[10],s}function Sr(t){const e=$.c(31),{data:a,deploys:r,label:n,className:i}=t,l=n===void 0?"Requests":n,o=i===void 0?"h-40":i;let s;e[0]!==l?(s={...ae,count:{...ae.count,label:l}},e[0]=l,e[1]=s):s=e[1];const d=s,u=Ce();let p;e[2]!==a?(p=Ne(a),e[2]=a,e[3]=p):p=e[3];const v=p,f=`${o} w-full`;let m;e[4]!==a?(m=a.map(vr),e[4]=a,e[5]=m):m=e[5];const y=u.onMouseMove,x=u.onMouseLeave;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(ke,{vertical:!1,strokeDasharray:"2 4"}),e[6]=h):h=e[6];let g;e[7]!==v?(g=A.jsx(je,{dataKey:"t",tickFormatter:v,tickLine:!1,axisLine:!1,minTickGap:40,tick:V}),e[7]=v,e[8]=g):g=e[8];let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=A.jsx(Oe,{width:36,tickLine:!1,axisLine:!1,tick:V,tickFormatter:pr}),e[9]=P):P=e[9];let b,I,E;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=A.jsx(Se,{content:A.jsx(we,{labelFormatter:dr})}),I=A.jsx(ve,{dataKey:"ok",name:"count",fill:"var(--color-count)",stackId:"a"}),E=A.jsx(ve,{dataKey:"client_errors",fill:"var(--color-client_errors)",stackId:"a"}),e[10]=b,e[11]=I,e[12]=E):(b=e[10],I=e[11],E=e[12]);let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=A.jsx(ve,{dataKey:"errors",fill:"var(--color-errors)",stackId:"a",radius:[2,2,0,0]}),e[13]=k):k=e[13];let j;e[14]!==r?(j=_e(r),e[14]=r,e[15]=j):j=e[15];let S;e[16]!==u.onMouseLeave||e[17]!==u.onMouseMove||e[18]!==g||e[19]!==j||e[20]!==m?(S=A.jsxs(Ut,{data:m,barCategoryGap:2,onMouseMove:y,onMouseLeave:x,children:[h,g,P,b,I,E,k,j]}),e[16]=u.onMouseLeave,e[17]=u.onMouseMove,e[18]=g,e[19]=j,e[20]=m,e[21]=S):S=e[21];let D;e[22]!==d||e[23]!==S||e[24]!==f?(D=A.jsx(de,{config:d,className:f,children:S}),e[22]=d,e[23]=S,e[24]=f,e[25]=D):D=e[25];let w;e[26]!==a?(w=A.jsx(Me,{data:a}),e[26]=a,e[27]=w):w=e[27];let O;return e[28]!==D||e[29]!==w?(O=A.jsxs("div",{children:[D,w]}),e[28]=D,e[29]=w,e[30]=O):O=e[30],O}function dr(t){return Y(String(t))}function pr(t){return Nt(Number(t))}function vr(t){return{...t,t:new Date(t.t).toISOString(),ok:Math.max(0,t.count-t.errors-t.client_errors)}}const fr={ok:{label:"ok",color:"var(--ok)"},errored:{label:"errored",color:"var(--warning)"},crashed:{label:"crashed",color:"var(--danger)"}};function wr(t){const e=$.c(27),{data:a,deploys:r,className:n}=t,i=n===void 0?"h-40":n,l=Ce();let o;e[0]!==a?(o=Ne(a),e[0]=a,e[1]=o):o=e[1];const s=o,d=`${i} w-full`;let u;e[2]!==a?(u=a.map(xr),e[2]=a,e[3]=u):u=e[3];const p=l.onMouseMove,v=l.onMouseLeave;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=A.jsx(ke,{vertical:!1,strokeDasharray:"2 4"}),e[4]=f):f=e[4];let m;e[5]!==s?(m=A.jsx(je,{dataKey:"t",tickFormatter:s,tickLine:!1,axisLine:!1,minTickGap:40,tick:V}),e[5]=s,e[6]=m):m=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=A.jsx(Oe,{width:36,tickLine:!1,axisLine:!1,tick:V,tickFormatter:yr}),e[7]=y):y=e[7];let x,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=A.jsx(Se,{content:A.jsx(we,{labelFormatter:hr})}),h=["ok","errored","crashed"],e[8]=x,e[9]=h):(x=e[8],h=e[9]);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=h.map(mr),e[10]=g):g=e[10];let P;e[11]!==r?(P=_e(r),e[11]=r,e[12]=P):P=e[12];let b;e[13]!==l.onMouseLeave||e[14]!==l.onMouseMove||e[15]!==P||e[16]!==u||e[17]!==m?(b=A.jsxs(Lt,{data:u,onMouseMove:p,onMouseLeave:v,children:[f,m,y,x,g,P]}),e[13]=l.onMouseLeave,e[14]=l.onMouseMove,e[15]=P,e[16]=u,e[17]=m,e[18]=b):b=e[18];let I;e[19]!==b||e[20]!==d?(I=A.jsx(de,{config:fr,className:d,children:b}),e[19]=b,e[20]=d,e[21]=I):I=e[21];let E;e[22]!==a?(E=A.jsx(Me,{data:a}),e[22]=a,e[23]=E):E=e[23];let k;return e[24]!==I||e[25]!==E?(k=A.jsxs("div",{children:[I,E]}),e[24]=I,e[25]=E,e[26]=k):k=e[26],k}function mr(t){return A.jsx(Le,{dataKey:t,stackId:"sessions",stroke:`var(--color-${t})`,fill:`var(--color-${t})`,fillOpacity:.3,strokeWidth:1.25,isAnimationActive:!1},t)}function hr(t){return Y(String(t))}function yr(t){return Nt(Number(t))}function xr(t){return{...t,t:new Date(t.t).toISOString()}}function Dr(t){const e=$.c(58),{data:a,deploys:r,percentile:n,className:i}=t,l=n===void 0?"p95":n,o=i===void 0?"h-40":i,s=Ce();let d;e[0]!==a?(d=Ne(a),e[0]=a,e[1]=d):d=e[1];const u=d;let p,v,f,m,y,x,h,g,P,b,I,E,k,j,S,D;if(e[2]!==o||e[3]!==a||e[4]!==s.onMouseLeave||e[5]!==s.onMouseMove||e[6]!==l||e[7]!==u){const G=a.map(Ar);f=de,P=ae,b=`${o} w-full`,v=sr,j=G,S=s.onMouseMove,D=s.onMouseLeave,e[24]===Symbol.for("react.memo_cache_sentinel")?(m=A.jsx(ke,{vertical:!1,strokeDasharray:"2 4"}),e[24]=m):m=e[24],e[25]!==u?(y=A.jsx(je,{dataKey:"t",tickFormatter:u,tickLine:!1,axisLine:!1,minTickGap:40,tick:V}),e[25]=u,e[26]=y):y=e[26],e[27]===Symbol.for("react.memo_cache_sentinel")?(x=A.jsx(Oe,{width:44,tickLine:!1,axisLine:!1,tick:V,tickFormatter:Pr}),e[27]=x):x=e[27],e[28]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(Se,{content:A.jsx(we,{labelFormatter:br,formatter:gr})}),e[28]=h):h=e[28],g=A.jsx(xe,{dataKey:l,stroke:`var(--color-${l})`,dot:Xe(G,l,`var(--color-${l})`),strokeWidth:1.75,isAnimationActive:!1}),p=xe,I="avg",E="var(--color-avg)",k=Xe(G,"avg","var(--color-avg)"),e[2]=o,e[3]=a,e[4]=s.onMouseLeave,e[5]=s.onMouseMove,e[6]=l,e[7]=u,e[8]=p,e[9]=v,e[10]=f,e[11]=m,e[12]=y,e[13]=x,e[14]=h,e[15]=g,e[16]=P,e[17]=b,e[18]=I,e[19]=E,e[20]=k,e[21]=j,e[22]=S,e[23]=D}else p=e[8],v=e[9],f=e[10],m=e[11],y=e[12],x=e[13],h=e[14],g=e[15],P=e[16],b=e[17],I=e[18],E=e[19],k=e[20],j=e[21],S=e[22],D=e[23];let w;e[29]!==p||e[30]!==I||e[31]!==E||e[32]!==k?(w=A.jsx(p,{dataKey:I,stroke:E,dot:k,strokeWidth:1.25,strokeOpacity:.8,isAnimationActive:!1}),e[29]=p,e[30]=I,e[31]=E,e[32]=k,e[33]=w):w=e[33];let O;e[34]!==r?(O=_e(r),e[34]=r,e[35]=O):O=e[35];let L;e[36]!==v||e[37]!==m||e[38]!==y||e[39]!==x||e[40]!==h||e[41]!==g||e[42]!==w||e[43]!==O||e[44]!==j||e[45]!==S||e[46]!==D?(L=A.jsxs(v,{data:j,onMouseMove:S,onMouseLeave:D,children:[m,y,x,h,g,w,O]}),e[36]=v,e[37]=m,e[38]=y,e[39]=x,e[40]=h,e[41]=g,e[42]=w,e[43]=O,e[44]=j,e[45]=S,e[46]=D,e[47]=L):L=e[47];let _;e[48]!==f||e[49]!==P||e[50]!==b||e[51]!==L?(_=A.jsx(f,{config:P,className:b,children:L}),e[48]=f,e[49]=P,e[50]=b,e[51]=L,e[52]=_):_=e[52];let N;e[53]!==a?(N=A.jsx(Me,{data:a}),e[53]=a,e[54]=N):N=e[54];let z;return e[55]!==_||e[56]!==N?(z=A.jsxs("div",{children:[_,N]}),e[55]=_,e[56]=N,e[57]=z):z=e[57],z}function gr(t,e){return[t==null?"—":ft(Number(t)),String(e)]}function br(t){return Y(String(t))}function Pr(t){return ft(Number(t),0)}function Ar(t){return{...t,t:new Date(t.t).toISOString()}}function Lr(t){const e=$.c(21),{data:a,className:r,hoverKey:n}=t,i=r===void 0?"h-10 w-32":r,{hoveredKey:l,setHoveredKey:o}=Ye(),s=n!=null&&l===n;let d;e[0]!==a?(d=a.map(Ir),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==n||e[3]!==o?(u=n?()=>o(n):void 0,e[2]=n,e[3]=o,e[4]=u):u=e[4];let p;e[5]!==n||e[6]!==o?(p=n?()=>o(null):void 0,e[5]=n,e[6]=o,e[7]=p):p=e[7];const v=s?"var(--primary)":"var(--muted-foreground)",f=s?"var(--primary)":"var(--muted-foreground)",m=s?.35:.15,y=s?2:1.25;let x;e[8]!==v||e[9]!==f||e[10]!==m||e[11]!==y?(x=A.jsx(Le,{dataKey:"v",stroke:v,fill:f,fillOpacity:m,strokeWidth:y,isAnimationActive:!1}),e[8]=v,e[9]=f,e[10]=m,e[11]=y,e[12]=x):x=e[12];let h;e[13]!==d||e[14]!==u||e[15]!==p||e[16]!==x?(h=A.jsx(Lt,{data:d,onMouseEnter:u,onMouseLeave:p,children:x}),e[13]=d,e[14]=u,e[15]=p,e[16]=x,e[17]=h):h=e[17];let g;return e[18]!==i||e[19]!==h?(g=A.jsx(de,{config:ae,className:i,children:h}),e[18]=i,e[19]=h,e[20]=g):g=e[20],g}function Ir(t){return{v:t}}function Nt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}export{Le as A,Dr as L,Lr as S,Sr as T,Lt as a,wr as b};
1
+ import{a4 as re,r as c,c as $,j as A}from"./inertia-CqnzqPVD.js";import{u as Ye}from"./chart-hover-2yZG3w2u.js";import{i as K,e as He,s as ne,D as ie,f as ge,g as Ct,Z as oe,L as R,u as be,h as Mt,j as Tt,k as U,l as Ue,m as F,n as H,o as Kt,p as le,q as se,r as qe,t as Pe,v as q,w as Ze,x as Ae,y as ce,z as Je,S as Qe,A as et,E as ue,F as tt,G as at,H as rt,I as nt,J as it,K as ot,M as Wt,N as Z,O as J,P as lt,Q as st,T as M,U as ct,V as ut,W as dt,_ as Rt,$ as $t,a0 as Ft,a1 as Ie,a2 as Ee,a3 as zt,a4 as Bt,a5 as Vt,a6 as Gt,a7 as Xt,a8 as Yt,a9 as pe,aa as Q,ab as pt,ac as vt,R as Ht,C as ke,X as je,Y as Oe,a as Se,b as we,c as de,B as ve,d as Ut}from"./chart-C4k7Ub9W.js";import{m as ft}from"./format-B9SDkrWj.js";function he(){return he=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},he.apply(null,arguments)}var mt=t=>{var{cx:e,cy:a,r,className:n}=t,i=re("recharts-dot",n);return K(e)&&K(a)&&K(r)?c.createElement("circle",he({},ne(t),He(t),{className:i,cx:e,cy:a,r})):null},qt=["points"];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 fe(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){Zt(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 Zt(t,e,a){return(e=Jt(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Jt(t){var e=Qt(t,"string");return typeof e=="symbol"?e:e+""}function Qt(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 ee(){return ee=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},ee.apply(null,arguments)}function ea(t,e){if(t==null)return{};var a,r,n=ta(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ta(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 aa(t){var{option:e,dotProps:a,className:r}=t;if(c.isValidElement(e))return c.cloneElement(e,a);if(typeof e=="function")return e(a);var n=re(r,typeof e!="boolean"?e.className:""),i=a??{},{points:l}=i,o=ea(i,qt);return c.createElement(mt,ee({},o,{className:n}))}function ra(t,e){return t==null?!1:e?!0:t.length===1}function ht(t){var{points:e,dot:a,className:r,dotClassName:n,dataKey:i,baseProps:l,needClip:o,clipPathId:s,zIndex:d=ie.scatter}=t;if(!ra(e,a))return null;var u=ge(a),p=Ct(a),v=e.map((m,y)=>{var x,h,g=fe(fe(fe({r:3},l),p),{},{index:y,cx:(x=m.x)!==null&&x!==void 0?x:void 0,cy:(h=m.y)!==null&&h!==void 0?h:void 0,dataKey:i,value:m.value,payload:m.payload,points:e});return c.createElement(aa,{key:"dot-".concat(y),option:a,dotProps:g,className:n})}),f={};return o&&s!=null&&(f.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(s,")")),c.createElement(oe,{zIndex:d},c.createElement(R,ee({className:r},f),v))}function $e(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 me(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(a),!0).forEach(function(r){na(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):$e(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function na(t,e,a){return(e=ia(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ia(t){var e=oa(t,"string");return typeof e=="symbol"?e:e+""}function oa(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 la=t=>{var{point:e,childIndex:a,mainColor:r,activeDot:n,dataKey:i,clipPath:l}=t;if(n===!1||e.x==null||e.y==null)return null;var o={index:a,dataKey:i,cx:e.x,cy:e.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:e.payload,value:e.value},s=me(me(me({},o),Ue(n)),He(n)),d;return c.isValidElement(n)?d=c.cloneElement(n,s):typeof n=="function"?d=n(s):d=c.createElement(mt,s),c.createElement(R,{className:"recharts-active-dot",clipPath:l},d)};function ye(t){var{points:e,mainColor:a,activeDot:r,itemDataKey:n,clipPath:i,zIndex:l=ie.activeDot}=t,o=be(Mt),s=Tt();if(e==null||s==null)return null;var d=e.find(u=>s.includes(u.payload));return U(d)?null:c.createElement(oe,{zIndex:l},c.createElement(la,{point:d,childIndex:Number(o),mainColor:a,dataKey:n,activeDot:r,clipPath:i}))}var yt=(t,e,a,r)=>le(t,"xAxis",e,r),xt=(t,e,a,r)=>se(t,"xAxis",e,r),gt=(t,e,a,r)=>le(t,"yAxis",a,r),bt=(t,e,a,r)=>se(t,"yAxis",a,r),sa=F([H,yt,gt,xt,bt],(t,e,a,r,n)=>Pe(t,"xAxis")?q(e,r,!1):q(a,n,!1)),ca=(t,e,a,r,n)=>n;function ua(t){return t.type==="line"}var da=F([qe,ca],(t,e)=>t.filter(ua).find(a=>a.id===e)),pa=F([H,yt,gt,xt,bt,da,sa,Kt],(t,e,a,r,n,i,l,o)=>{var{chartData:s,dataStartIndex:d,dataEndIndex:u}=o;if(!(i==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:v}=i,f;if(v!=null&&v.length>0?f=v:f=s?.slice(d,u+1),f!=null)return Na({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:p,bandSize:l,displayedData:f})}});function Pt(t){var e=Ue(t),a=3,r=2;if(e!=null){var{r:n,strokeWidth:i}=e,l=Number(n),o=Number(i);return(Number.isNaN(l)||l<0)&&(l=a),(Number.isNaN(o)||o<0)&&(o=r),{r:l,strokeWidth:o}}return{r:a,strokeWidth:r}}var va=["id"],fa=["type","layout","connectNulls","needClip","shape"],ma=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function X(){return X=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},X.apply(null,arguments)}function Fe(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 T(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Fe(Object(a),!0).forEach(function(r){ha(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Fe(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function ha(t,e,a){return(e=ya(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function ya(t){var e=xa(t,"string");return typeof e=="symbol"?e:e+""}function xa(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 De(t,e){if(t==null)return{};var a,r,n=ga(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ga(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 ba=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:i}=t;return[{inactive:i,dataKey:e,type:n,color:r,value:ue(a,e),payload:t}]},Pa=c.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:i,name:l,hide:o,unit:s,tooltipType:d,id:u}=t,p={dataDefinedOnItem:a,getPosition:at,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:e,nameKey:void 0,name:ue(l,e),hide:o,type:d,color:r,unit:s,graphicalItemId:u}};return c.createElement(tt,{tooltipEntrySettings:p})}),At=(t,e)=>"".concat(e,"px ").concat(t,"px");function Aa(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var Ia=(t,e,a)=>{var r=a.reduce((v,f)=>v+f,0);if(!r)return At(e,t);for(var n=Math.floor(t/r),i=t%r,l=[],o=0,s=0;o<a.length;s+=(d=a[o])!==null&&d!==void 0?d:0,++o){var d,u=a[o];if(u!=null&&s+u>i){l=[...a.slice(0,o),i-s];break}}var p=l.length%2===0?[0,e]:[e];return[...Aa(a,n),...l,...p].map(v=>"".concat(v,"px")).join(", ")};function Ea(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:i,needClip:l}=r,{id:o}=r,s=De(r,va),d=ne(s);return c.createElement(ht,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:d,needClip:l,clipPathId:e})}function ka(t){var{showLabels:e,children:a,points:r}=t,n=c.useMemo(()=>r?.map(i=>{var l,o,s={x:(l=i.x)!==null&&l!==void 0?l:0,y:(o=i.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return T(T({},s),{},{value:i.value,payload:i.payload,viewBox:s,parentViewBox:void 0,fill:void 0})}),[r]);return c.createElement(ut,{value:e?n:void 0},a)}function ze(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:i}=t,{type:l,layout:o,connectNulls:s,needClip:d,shape:u}=i,p=De(i,fa),v=T(T({},dt(p)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(e,")"):void 0,points:r,type:l,layout:o,connectNulls:s,strokeDasharray:n??i.strokeDasharray});return c.createElement(c.Fragment,null,r?.length>1&&c.createElement(Rt,X({shapeType:"curve",option:u},v,{pathRef:a})),c.createElement(Ea,{points:r,clipPathId:e,props:i}))}function ja(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Oa(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:i}=t,{points:l,strokeDasharray:o,isAnimationActive:s,animationBegin:d,animationDuration:u,animationEasing:p,animateNewValues:v,width:f,height:m,onAnimationEnd:y,onAnimationStart:x}=a,h=n.current,g=lt(l,"recharts-line-"),P=c.useRef(g),[b,I]=c.useState(!1),E=!b,k=c.useCallback(()=>{typeof y=="function"&&y(),I(!1)},[y]),j=c.useCallback(()=>{typeof x=="function"&&x(),I(!0)},[x]),S=ja(r.current),D=c.useRef(0);P.current!==g&&(D.current=i.current,P.current=g);var w=D.current;return c.createElement(ka,{points:l,showLabels:E},a.children,c.createElement(st,{animationId:g,begin:d,duration:u,isActive:s,easing:p,onAnimationEnd:k,onAnimationStart:j,key:g},O=>{var L=M(w,S+w,O),_=Math.min(L,S),N;if(s)if(o){var z="".concat(o).split(/[,\s]+/gim).map(C=>parseFloat(C));N=Ia(_,S,z)}else N=At(S,_);else N=o==null?void 0:String(o);if(O>0&&S>0&&(n.current=l,i.current=Math.max(i.current,_)),h){var G=h.length/l.length,Te=O===1?l:l.map((C,_t)=>{var Ke=Math.floor(_t*G);if(h[Ke]){var We=h[Ke];return T(T({},C),{},{x:M(We.x,C.x,O),y:M(We.y,C.y,O)})}return v?T(T({},C),{},{x:M(f*2,C.x,O),y:M(m/2,C.y,O)}):T(T({},C),{},{x:C.x,y:C.y})});return n.current=Te,c.createElement(ze,{props:a,points:Te,clipPathId:e,pathRef:r,strokeDasharray:N})}return c.createElement(ze,{props:a,points:l,clipPathId:e,pathRef:r,strokeDasharray:N})}),c.createElement(ct,{label:a.label}))}function Sa(t){var{clipPathId:e,props:a}=t,r=c.useRef(null),n=c.useRef(0),i=c.useRef(null);return c.createElement(Oa,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:i})}var wa=(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:Z(t.payload,e)}};class Da extends c.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:i,yAxisId:l,top:o,left:s,width:d,height:u,id:p,needClip:v,zIndex:f}=this.props;if(e)return null;var m=re("recharts-line",n),y=p,{r:x,strokeWidth:h}=Pt(a),g=ge(a),P=x*2+h,b=v?"url(#clipPath-".concat(g?"":"dots-").concat(y,")"):void 0;return c.createElement(oe,{zIndex:f},c.createElement(R,{className:m},v&&c.createElement("defs",null,c.createElement(ot,{clipPathId:y,xAxisId:i,yAxisId:l}),!g&&c.createElement("clipPath",{id:"clipPath-dots-".concat(y)},c.createElement("rect",{x:s-P/2,y:o-P/2,width:d+P,height:u+P}))),c.createElement(Wt,{xAxisId:i,yAxisId:l,data:r,dataPointFormatter:wa,errorBarOffset:0},c.createElement(Sa,{props:this.props,clipPathId:y}))),c.createElement(ye,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:b}))}}var It={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:ie.line,type:"linear"};function La(t){var e=Ae(t,It),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:i,animationEasing:l,connectNulls:o,dot:s,hide:d,isAnimationActive:u,label:p,legendType:v,xAxisId:f,yAxisId:m,id:y}=e,x=De(e,ma),{needClip:h}=rt(f,m),g=nt(),P=it(),b=ce(),I=be(D=>pa(D,f,m,b,y));if(P!=="horizontal"&&P!=="vertical"||I==null||g==null)return null;var{height:E,width:k,x:j,y:S}=g;return c.createElement(Da,X({},x,{id:y,connectNulls:o,dot:s,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:i,animationEasing:l,isAnimationActive:u,hide:d,label:p,legendType:v,xAxisId:f,yAxisId:m,points:I,layout:P,height:E,width:k,left:j,top:S,needClip:h}))}function Na(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:l,bandSize:o,displayedData:s}=t;return s.map((d,u)=>{var p=Z(d,l);if(e==="horizontal"){var v=J({axis:a,ticks:n,bandSize:o,entry:d,index:u}),f=U(p)?null:r.scale.map(p);return{x:v,y:f??null,value:p,payload:d}}var m=U(p)?null:a.scale.map(p),y=J({axis:r,ticks:i,bandSize:o,entry:d,index:u});return m==null||y==null?null:{x:m,y,value:p,payload:d}}).filter(Boolean)}function _a(t){var e=Ae(t,It),a=ce();return c.createElement(Je,{id:e.id,type:"line"},r=>c.createElement(c.Fragment,null,c.createElement(Qe,{legendPayload:ba(e)}),c.createElement(Pa,{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}),c.createElement(et,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),c.createElement(La,X({},e,{id:r}))))}var xe=c.memo(_a,Ze);xe.displayName="Line";var Et=(t,e,a)=>le(t,"xAxis",Ie(t,e),a),kt=(t,e,a)=>se(t,"xAxis",Ie(t,e),a),jt=(t,e,a)=>le(t,"yAxis",Ee(t,e),a),Ot=(t,e,a)=>se(t,"yAxis",Ee(t,e),a),Ca=F([H,Et,jt,kt,Ot],(t,e,a,r,n)=>Pe(t,"xAxis")?q(e,r,!1):q(a,n,!1)),Ma=(t,e)=>e,St=F([qe,Ma],(t,e)=>t.filter(a=>a.type==="area").find(a=>a.id===e)),wt=t=>{var e=H(t),a=Pe(e,"xAxis");return a?"yAxis":"xAxis"},Ta=(t,e)=>{var a=wt(t);return a==="yAxis"?Ee(t,e):Ie(t,e)},Ka=(t,e,a)=>Bt(t,wt(t),Ta(t,e),a),Wa=F([St,Ka],(t,e)=>{var a;if(!(t==null||e==null)){var{stackId:r}=t,n=zt(t);if(!(r==null||n==null)){var i=(a=e[r])===null||a===void 0?void 0:a.stackedData,l=i?.find(o=>o.key===n);if(l!=null)return l.map(o=>[o[0],o[1]])}}}),Ra=F([H,Et,jt,kt,Ot,Wa,$t,Ca,St,Ft],(t,e,a,r,n,i,l,o,s,d)=>{var{chartData:u,dataStartIndex:p,dataEndIndex:v}=l;if(!(s==null||t!=="horizontal"&&t!=="vertical"||e==null||a==null||r==null||n==null||r.length===0||n.length===0||o==null)){var{data:f}=s,m;if(f&&f.length>0?m=f:m=u?.slice(p,v+1),m!=null)return ir({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataStartIndex:p,areaSettings:s,stackedData:i,displayedData:m,chartBaseValue:d,bandSize:o})}}),$a=["id"],Fa=["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 Dt(t,e){if(t==null)return{};var a,r,n=za(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function za(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 Be(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 B(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Be(Object(a),!0).forEach(function(r){Ba(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Be(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Ba(t,e,a){return(e=Va(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Va(t){var e=Ga(t,"string");return typeof e=="symbol"?e:e+""}function Ga(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 te(t,e){return t&&t!=="none"?t:e}var Xa=t=>{var{dataKey:e,name:a,stroke:r,fill:n,legendType:i,hide:l}=t;return[{inactive:l,dataKey:e,type:i,color:te(r,n),value:ue(a,e),payload:t}]},Ya=c.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:i,name:l,hide:o,unit:s,tooltipType:d,id:u}=t,p={dataDefinedOnItem:a,getPosition:at,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:e,nameKey:void 0,name:ue(l,e),hide:o,type:d,color:te(r,i),unit:s,graphicalItemId:u}};return c.createElement(tt,{tooltipEntrySettings:p})});function Ha(t){var{clipPathId:e,points:a,props:r}=t,{needClip:n,dot:i,dataKey:l}=r,o=ne(r);return c.createElement(ht,{points:a,dot:i,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:o,needClip:n,clipPathId:e})}function Ua(t){var{showLabels:e,children:a,points:r}=t,n=r.map(i=>{var l,o,s={x:(l=i.x)!==null&&l!==void 0?l:0,y:(o=i.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return B(B({},s),{},{value:i.value,payload:i.payload,parentViewBox:void 0,viewBox:s,fill:void 0})});return c.createElement(ut,{value:e?n:void 0},a)}function Ve(t){var{points:e,baseLine:a,needClip:r,clipPathId:n,props:i}=t,{layout:l,type:o,stroke:s,connectNulls:d,isRange:u}=i,{id:p}=i,v=Dt(i,$a),f=ne(v),m=dt(v);return c.createElement(c.Fragment,null,e?.length>1&&c.createElement(R,{clipPath:r?"url(#clipPath-".concat(n,")"):void 0},c.createElement(pe,W({},m,{id:p,points:e,connectNulls:d,type:o,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),s!=="none"&&c.createElement(pe,W({},f,{className:"recharts-area-curve",layout:l,type:o,connectNulls:d,fill:"none",points:e})),s!=="none"&&u&&Array.isArray(a)&&c.createElement(pe,W({},f,{className:"recharts-area-curve",layout:l,type:o,connectNulls:d,fill:"none",points:a}))),c.createElement(Ha,{points:e,props:v,clipPathId:n}))}function qa(t){var e,a,{alpha:r,baseLine:n,points:i,strokeWidth:l}=t,o=(e=i[0])===null||e===void 0?void 0:e.y,s=(a=i[i.length-1])===null||a===void 0?void 0:a.y;if(!Q(o)||!Q(s))return null;var d=r*Math.abs(o-s),u=Math.max(...i.map(p=>p.x||0));return K(n)?u=Math.max(n,u):n&&Array.isArray(n)&&n.length&&(u=Math.max(...n.map(p=>p.x||0),u)),K(u)?c.createElement("rect",{x:0,y:o<s?o:o-d,width:u+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}function Za(t){var e,a,{alpha:r,baseLine:n,points:i,strokeWidth:l}=t,o=(e=i[0])===null||e===void 0?void 0:e.x,s=(a=i[i.length-1])===null||a===void 0?void 0:a.x;if(!Q(o)||!Q(s))return null;var d=r*Math.abs(o-s),u=Math.max(...i.map(p=>p.y||0));return K(n)?u=Math.max(n,u):n&&Array.isArray(n)&&n.length&&(u=Math.max(...n.map(p=>p.y||0),u)),K(u)?c.createElement("rect",{x:o<s?o:o-d,y:0,width:d,height:Math.floor(u+(l?parseInt("".concat(l),10):1))}):null}function Ja(t){var{alpha:e,layout:a,points:r,baseLine:n,strokeWidth:i}=t;return a==="vertical"?c.createElement(qa,{alpha:e,points:r,baseLine:n,strokeWidth:i}):c.createElement(Za,{alpha:e,points:r,baseLine:n,strokeWidth:i})}function Qa(t){var{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:i}=t,{points:l,baseLine:o,isAnimationActive:s,animationBegin:d,animationDuration:u,animationEasing:p,onAnimationStart:v,onAnimationEnd:f}=r,m=c.useMemo(()=>({points:l,baseLine:o}),[l,o]),y=lt(m,"recharts-area-"),x=Xt(),[h,g]=c.useState(!1),P=!h,b=c.useCallback(()=>{typeof f=="function"&&f(),g(!1)},[f]),I=c.useCallback(()=>{typeof v=="function"&&v(),g(!0)},[v]);if(x==null)return null;var E=n.current,k=i.current;return c.createElement(Ua,{showLabels:P,points:l},r.children,c.createElement(st,{animationId:y,begin:d,duration:u,isActive:s,easing:p,onAnimationEnd:b,onAnimationStart:I,key:y},j=>{if(E){var S=E.length/l.length,D=j===1?l:l.map((O,L)=>{var _=Math.floor(L*S);if(E[_]){var N=E[_];return B(B({},O),{},{x:M(N.x,O.x,j),y:M(N.y,O.y,j)})}return O}),w;return K(o)?w=M(k,o,j):U(o)||Yt(o)?w=M(k,0,j):w=o.map((O,L)=>{var _=Math.floor(L*S);if(Array.isArray(k)&&k[_]){var N=k[_];return B(B({},O),{},{x:M(N.x,O.x,j),y:M(N.y,O.y,j)})}return O}),j>0&&(n.current=D,i.current=w),c.createElement(Ve,{points:D,baseLine:w,needClip:e,clipPathId:a,props:r})}return j>0&&(n.current=l,i.current=o),c.createElement(R,null,s&&c.createElement("defs",null,c.createElement("clipPath",{id:"animationClipPath-".concat(a)},c.createElement(Ja,{alpha:j,points:l,baseLine:o,layout:x,strokeWidth:r.strokeWidth}))),c.createElement(R,{clipPath:"url(#animationClipPath-".concat(a,")")},c.createElement(Ve,{points:l,baseLine:o,needClip:e,clipPathId:a,props:r})))}),c.createElement(ct,{label:r.label}))}function er(t){var{needClip:e,clipPathId:a,props:r}=t,n=c.useRef(null),i=c.useRef();return c.createElement(Qa,{needClip:e,clipPathId:a,props:r,previousPointsRef:n,previousBaselineRef:i})}class tr extends c.PureComponent{render(){var{hide:e,dot:a,points:r,className:n,top:i,left:l,needClip:o,xAxisId:s,yAxisId:d,width:u,height:p,id:v,baseLine:f,zIndex:m}=this.props;if(e)return null;var y=re("recharts-area",n),x=v,{r:h,strokeWidth:g}=Pt(a),P=ge(a),b=h*2+g,I=o?"url(#clipPath-".concat(P?"":"dots-").concat(x,")"):void 0;return c.createElement(oe,{zIndex:m},c.createElement(R,{className:y},o&&c.createElement("defs",null,c.createElement(ot,{clipPathId:x,xAxisId:s,yAxisId:d}),!P&&c.createElement("clipPath",{id:"clipPath-dots-".concat(x)},c.createElement("rect",{x:l-b/2,y:i-b/2,width:u+b,height:p+b}))),c.createElement(er,{needClip:o,clipPathId:x,props:this.props})),c.createElement(ye,{points:r,mainColor:te(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(f)&&c.createElement(ye,{points:f,mainColor:te(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}var ar={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:ie.area};function rr(t){var e,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:i,connectNulls:l,dot:o,fill:s,fillOpacity:d,hide:u,isAnimationActive:p,legendType:v,stroke:f,xAxisId:m,yAxisId:y}=t,x=Dt(t,Fa),h=it(),g=Gt(),{needClip:P}=rt(m,y),b=ce(),{points:I,isRange:E,baseLine:k}=(e=be(L=>Ra(L,t.id,b)))!==null&&e!==void 0?e:{},j=nt();if(h!=="horizontal"&&h!=="vertical"||j==null||g!=="AreaChart"&&g!=="ComposedChart")return null;var{height:S,width:D,x:w,y:O}=j;return!I||!I.length?null:c.createElement(tr,W({},x,{activeDot:a,animationBegin:r,animationDuration:n,animationEasing:i,baseLine:k,connectNulls:l,dot:o,fill:s,fillOpacity:d,height:S,hide:u,layout:h,isAnimationActive:p,isRange:E,legendType:v,needClip:P,points:I,stroke:f,width:D,left:w,top:O,xAxisId:m,yAxisId:y}))}var nr=(t,e,a,r,n)=>{var i=a??e;if(K(i))return i;var l=t==="horizontal"?n:r,o=l.scale.domain();if(l.type==="number"){var s=Math.max(o[0],o[1]),d=Math.min(o[0],o[1]);return i==="dataMin"?d:i==="dataMax"||s<0?s:Math.max(Math.min(o[0],o[1]),0)}return i==="dataMin"?o[0]:i==="dataMax"?o[1]:o[0]};function ir(t){var{areaSettings:{connectNulls:e,baseValue:a,dataKey:r},stackedData:n,layout:i,chartBaseValue:l,xAxis:o,yAxis:s,displayedData:d,dataStartIndex:u,xAxisTicks:p,yAxisTicks:v,bandSize:f}=t,m=n&&n.length,y=nr(i,l,a,o,s),x=i==="horizontal",h=!1,g=d.map((b,I)=>{var E,k,j,S;if(m)S=n[u+I];else{var D=Z(b,r);Array.isArray(D)?(S=D,h=!0):S=[y,D]}var w=(E=(k=S)===null||k===void 0?void 0:k[1])!==null&&E!==void 0?E:null,O=w==null||m&&!e&&Z(b,r)==null;if(x){var L;return{x:J({axis:o,ticks:p,bandSize:f,entry:b,index:I}),y:O?null:(L=s.scale.map(w))!==null&&L!==void 0?L:null,value:S,payload:b}}return{x:O?null:(j=o.scale.map(w))!==null&&j!==void 0?j:null,y:J({axis:s,ticks:v,bandSize:f,entry:b,index:I}),value:S,payload:b}}),P;return m||h?P=g.map(b=>{var I,E=Array.isArray(b.value)?b.value[0]:null;if(x){var k;return{x:b.x,y:E!=null&&b.y!=null&&(k=s.scale.map(E))!==null&&k!==void 0?k:null,payload:b.payload}}return{x:E!=null&&(I=o.scale.map(E))!==null&&I!==void 0?I:null,y:b.y,payload:b.payload}}):P=x?s.scale.map(y):o.scale.map(y),{points:g,baseLine:P??0,isRange:h}}function or(t){var e=Ae(t,ar),a=ce();return c.createElement(Je,{id:e.id,type:"area"},r=>c.createElement(c.Fragment,null,c.createElement(Qe,{legendPayload:Xa(e)}),c.createElement(Ya,{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}),c.createElement(et,{type:"area",id:r,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Vt(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:a,connectNulls:e.connectNulls}),c.createElement(rr,W({},e,{id:r}))))}var Le=c.memo(or,Ze);Le.displayName="Area";var lr=["axis"],sr=c.forwardRef((t,e)=>c.createElement(pt,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lr,tooltipPayloadSearcher:vt,categoricalChartProps:t,ref:e})),cr=["axis"],Lt=c.forwardRef((t,e)=>c.createElement(pt,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:cr,tooltipPayloadSearcher:vt,categoricalChartProps:t,ref:e}));const ae={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 ur(t){return t.length<2?0:new Date(t[1].t).getTime()-new Date(t[0].t).getTime()}const Ge=1440*60*1e3;function Ne(t){const e=ur(t),a=t.length>1?new Date(t[t.length-1].t).getTime()-new Date(t[0].t).getTime():0;return e>=Ge||a>2*Ge?r=>new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"}):r=>new Date(r).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Y(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}const V={fontSize:10,fontFamily:"var(--font-mono)"};function Xe(t,e,a){return n=>{const i=$.c(8),{cx:l,cy:o,index:s}=n;if(l==null||o==null||s==null){let v;return i[0]!==s?(v=A.jsx("g",{},s),i[0]=s,i[1]=v):v=i[1],v}const d=t[s-1]?.[e]??null,u=t[s+1]?.[e]??null;if(d!=null||u!=null){let v;return i[2]!==s?(v=A.jsx("g",{},s),i[2]=s,i[3]=v):v=i[3],v}let p;return i[4]!==l||i[5]!==o||i[6]!==s?(p=A.jsx("circle",{cx:l,cy:o,r:2,fill:a},s),i[4]=l,i[5]=o,i[6]=s,i[7]=p):p=i[7],p}}function _e(t=[]){return t.map(e=>A.jsx(Ht,{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 Ce(){const t=$.c(2),{setHoveredKey:e}=Ye();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 Me(t){const e=$.c(11),{data:a}=t;if(a.length===0)return null;let r;e[0]!==a[0].t?(r=Y(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 i=a[a.length-1];let l;e[4]!==i.t?(l=Y(i.t),e[4]=i.t,e[5]=l):l=e[5];let o;e[6]!==l?(o=A.jsx("span",{children:l}),e[6]=l,e[7]=o):o=e[7];let s;return e[8]!==n||e[9]!==o?(s=A.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[n,o]}),e[8]=n,e[9]=o,e[10]=s):s=e[10],s}function Sr(t){const e=$.c(31),{data:a,deploys:r,label:n,className:i}=t,l=n===void 0?"Requests":n,o=i===void 0?"h-40":i;let s;e[0]!==l?(s={...ae,count:{...ae.count,label:l}},e[0]=l,e[1]=s):s=e[1];const d=s,u=Ce();let p;e[2]!==a?(p=Ne(a),e[2]=a,e[3]=p):p=e[3];const v=p,f=`${o} w-full`;let m;e[4]!==a?(m=a.map(vr),e[4]=a,e[5]=m):m=e[5];const y=u.onMouseMove,x=u.onMouseLeave;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(ke,{vertical:!1,strokeDasharray:"2 4"}),e[6]=h):h=e[6];let g;e[7]!==v?(g=A.jsx(je,{dataKey:"t",tickFormatter:v,tickLine:!1,axisLine:!1,minTickGap:40,tick:V}),e[7]=v,e[8]=g):g=e[8];let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=A.jsx(Oe,{width:36,tickLine:!1,axisLine:!1,tick:V,tickFormatter:pr}),e[9]=P):P=e[9];let b,I,E;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=A.jsx(Se,{content:A.jsx(we,{labelFormatter:dr})}),I=A.jsx(ve,{dataKey:"ok",name:"count",fill:"var(--color-count)",stackId:"a"}),E=A.jsx(ve,{dataKey:"client_errors",fill:"var(--color-client_errors)",stackId:"a"}),e[10]=b,e[11]=I,e[12]=E):(b=e[10],I=e[11],E=e[12]);let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=A.jsx(ve,{dataKey:"errors",fill:"var(--color-errors)",stackId:"a",radius:[2,2,0,0]}),e[13]=k):k=e[13];let j;e[14]!==r?(j=_e(r),e[14]=r,e[15]=j):j=e[15];let S;e[16]!==u.onMouseLeave||e[17]!==u.onMouseMove||e[18]!==g||e[19]!==j||e[20]!==m?(S=A.jsxs(Ut,{data:m,barCategoryGap:2,onMouseMove:y,onMouseLeave:x,children:[h,g,P,b,I,E,k,j]}),e[16]=u.onMouseLeave,e[17]=u.onMouseMove,e[18]=g,e[19]=j,e[20]=m,e[21]=S):S=e[21];let D;e[22]!==d||e[23]!==S||e[24]!==f?(D=A.jsx(de,{config:d,className:f,children:S}),e[22]=d,e[23]=S,e[24]=f,e[25]=D):D=e[25];let w;e[26]!==a?(w=A.jsx(Me,{data:a}),e[26]=a,e[27]=w):w=e[27];let O;return e[28]!==D||e[29]!==w?(O=A.jsxs("div",{children:[D,w]}),e[28]=D,e[29]=w,e[30]=O):O=e[30],O}function dr(t){return Y(String(t))}function pr(t){return Nt(Number(t))}function vr(t){return{...t,t:new Date(t.t).toISOString(),ok:Math.max(0,t.count-t.errors-t.client_errors)}}const fr={ok:{label:"ok",color:"var(--ok)"},errored:{label:"errored",color:"var(--warning)"},crashed:{label:"crashed",color:"var(--danger)"}};function wr(t){const e=$.c(27),{data:a,deploys:r,className:n}=t,i=n===void 0?"h-40":n,l=Ce();let o;e[0]!==a?(o=Ne(a),e[0]=a,e[1]=o):o=e[1];const s=o,d=`${i} w-full`;let u;e[2]!==a?(u=a.map(xr),e[2]=a,e[3]=u):u=e[3];const p=l.onMouseMove,v=l.onMouseLeave;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=A.jsx(ke,{vertical:!1,strokeDasharray:"2 4"}),e[4]=f):f=e[4];let m;e[5]!==s?(m=A.jsx(je,{dataKey:"t",tickFormatter:s,tickLine:!1,axisLine:!1,minTickGap:40,tick:V}),e[5]=s,e[6]=m):m=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=A.jsx(Oe,{width:36,tickLine:!1,axisLine:!1,tick:V,tickFormatter:yr}),e[7]=y):y=e[7];let x,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=A.jsx(Se,{content:A.jsx(we,{labelFormatter:hr})}),h=["ok","errored","crashed"],e[8]=x,e[9]=h):(x=e[8],h=e[9]);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=h.map(mr),e[10]=g):g=e[10];let P;e[11]!==r?(P=_e(r),e[11]=r,e[12]=P):P=e[12];let b;e[13]!==l.onMouseLeave||e[14]!==l.onMouseMove||e[15]!==P||e[16]!==u||e[17]!==m?(b=A.jsxs(Lt,{data:u,onMouseMove:p,onMouseLeave:v,children:[f,m,y,x,g,P]}),e[13]=l.onMouseLeave,e[14]=l.onMouseMove,e[15]=P,e[16]=u,e[17]=m,e[18]=b):b=e[18];let I;e[19]!==b||e[20]!==d?(I=A.jsx(de,{config:fr,className:d,children:b}),e[19]=b,e[20]=d,e[21]=I):I=e[21];let E;e[22]!==a?(E=A.jsx(Me,{data:a}),e[22]=a,e[23]=E):E=e[23];let k;return e[24]!==I||e[25]!==E?(k=A.jsxs("div",{children:[I,E]}),e[24]=I,e[25]=E,e[26]=k):k=e[26],k}function mr(t){return A.jsx(Le,{dataKey:t,stackId:"sessions",stroke:`var(--color-${t})`,fill:`var(--color-${t})`,fillOpacity:.3,strokeWidth:1.25,isAnimationActive:!1},t)}function hr(t){return Y(String(t))}function yr(t){return Nt(Number(t))}function xr(t){return{...t,t:new Date(t.t).toISOString()}}function Dr(t){const e=$.c(58),{data:a,deploys:r,percentile:n,className:i}=t,l=n===void 0?"p95":n,o=i===void 0?"h-40":i,s=Ce();let d;e[0]!==a?(d=Ne(a),e[0]=a,e[1]=d):d=e[1];const u=d;let p,v,f,m,y,x,h,g,P,b,I,E,k,j,S,D;if(e[2]!==o||e[3]!==a||e[4]!==s.onMouseLeave||e[5]!==s.onMouseMove||e[6]!==l||e[7]!==u){const G=a.map(Ar);f=de,P=ae,b=`${o} w-full`,v=sr,j=G,S=s.onMouseMove,D=s.onMouseLeave,e[24]===Symbol.for("react.memo_cache_sentinel")?(m=A.jsx(ke,{vertical:!1,strokeDasharray:"2 4"}),e[24]=m):m=e[24],e[25]!==u?(y=A.jsx(je,{dataKey:"t",tickFormatter:u,tickLine:!1,axisLine:!1,minTickGap:40,tick:V}),e[25]=u,e[26]=y):y=e[26],e[27]===Symbol.for("react.memo_cache_sentinel")?(x=A.jsx(Oe,{width:44,tickLine:!1,axisLine:!1,tick:V,tickFormatter:Pr}),e[27]=x):x=e[27],e[28]===Symbol.for("react.memo_cache_sentinel")?(h=A.jsx(Se,{content:A.jsx(we,{labelFormatter:br,formatter:gr})}),e[28]=h):h=e[28],g=A.jsx(xe,{dataKey:l,stroke:`var(--color-${l})`,dot:Xe(G,l,`var(--color-${l})`),strokeWidth:1.75,isAnimationActive:!1}),p=xe,I="avg",E="var(--color-avg)",k=Xe(G,"avg","var(--color-avg)"),e[2]=o,e[3]=a,e[4]=s.onMouseLeave,e[5]=s.onMouseMove,e[6]=l,e[7]=u,e[8]=p,e[9]=v,e[10]=f,e[11]=m,e[12]=y,e[13]=x,e[14]=h,e[15]=g,e[16]=P,e[17]=b,e[18]=I,e[19]=E,e[20]=k,e[21]=j,e[22]=S,e[23]=D}else p=e[8],v=e[9],f=e[10],m=e[11],y=e[12],x=e[13],h=e[14],g=e[15],P=e[16],b=e[17],I=e[18],E=e[19],k=e[20],j=e[21],S=e[22],D=e[23];let w;e[29]!==p||e[30]!==I||e[31]!==E||e[32]!==k?(w=A.jsx(p,{dataKey:I,stroke:E,dot:k,strokeWidth:1.25,strokeOpacity:.8,isAnimationActive:!1}),e[29]=p,e[30]=I,e[31]=E,e[32]=k,e[33]=w):w=e[33];let O;e[34]!==r?(O=_e(r),e[34]=r,e[35]=O):O=e[35];let L;e[36]!==v||e[37]!==m||e[38]!==y||e[39]!==x||e[40]!==h||e[41]!==g||e[42]!==w||e[43]!==O||e[44]!==j||e[45]!==S||e[46]!==D?(L=A.jsxs(v,{data:j,onMouseMove:S,onMouseLeave:D,children:[m,y,x,h,g,w,O]}),e[36]=v,e[37]=m,e[38]=y,e[39]=x,e[40]=h,e[41]=g,e[42]=w,e[43]=O,e[44]=j,e[45]=S,e[46]=D,e[47]=L):L=e[47];let _;e[48]!==f||e[49]!==P||e[50]!==b||e[51]!==L?(_=A.jsx(f,{config:P,className:b,children:L}),e[48]=f,e[49]=P,e[50]=b,e[51]=L,e[52]=_):_=e[52];let N;e[53]!==a?(N=A.jsx(Me,{data:a}),e[53]=a,e[54]=N):N=e[54];let z;return e[55]!==_||e[56]!==N?(z=A.jsxs("div",{children:[_,N]}),e[55]=_,e[56]=N,e[57]=z):z=e[57],z}function gr(t,e){return[t==null?"—":ft(Number(t)),String(e)]}function br(t){return Y(String(t))}function Pr(t){return ft(Number(t),0)}function Ar(t){return{...t,t:new Date(t.t).toISOString()}}function Lr(t){const e=$.c(21),{data:a,className:r,hoverKey:n}=t,i=r===void 0?"h-10 w-32":r,{hoveredKey:l,setHoveredKey:o}=Ye(),s=n!=null&&l===n;let d;e[0]!==a?(d=a.map(Ir),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==n||e[3]!==o?(u=n?()=>o(n):void 0,e[2]=n,e[3]=o,e[4]=u):u=e[4];let p;e[5]!==n||e[6]!==o?(p=n?()=>o(null):void 0,e[5]=n,e[6]=o,e[7]=p):p=e[7];const v=s?"var(--primary)":"var(--muted-foreground)",f=s?"var(--primary)":"var(--muted-foreground)",m=s?.35:.15,y=s?2:1.25;let x;e[8]!==v||e[9]!==f||e[10]!==m||e[11]!==y?(x=A.jsx(Le,{dataKey:"v",stroke:v,fill:f,fillOpacity:m,strokeWidth:y,isAnimationActive:!1}),e[8]=v,e[9]=f,e[10]=m,e[11]=y,e[12]=x):x=e[12];let h;e[13]!==d||e[14]!==u||e[15]!==p||e[16]!==x?(h=A.jsx(Lt,{data:d,onMouseEnter:u,onMouseLeave:p,children:x}),e[13]=d,e[14]=u,e[15]=p,e[16]=x,e[17]=h):h=e[17];let g;return e[18]!==i||e[19]!==h?(g=A.jsx(de,{config:ae,className:i,children:h}),e[18]=i,e[19]=h,e[20]=g):g=e[20],g}function Ir(t){return{v:t}}function Nt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}export{Le as A,Dr as L,Lr as S,Sr as T,Lt as a,wr as b};
@@ -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-DLew8ZNx.js";import{G as q}from"./google-sign-in-button-BQiIKFdd.js";import{H as E,S as U}from"./layout-0ZAnD3zl.js";import{I as g}from"./input-error-cvM6_Jht.js";import{B as S}from"./app-wordmark-o9CODKP0.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-D1n_BreY.js";import{L as N,I as D}from"./label-GWl7I6sf.js";import{C as R}from"./copy-block-BkSU5832.js";import{A as te}from"./app-layout-DDyQa72H.js";import{K as re}from"./transition-DMIrZVth.js";import"./separator-BXzEdZ_8.js";import"./index-so4lRrRq.js";import"./index-umIAl-pL.js";import"./use-clipboard-ByoUGQqA.js";import"./checkbox-CmhMHWZO.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-CqnzqPVD.js";import{G as q}from"./google-sign-in-button-B5as2ps1.js";import{H as E,S as U}from"./layout-D7lE1Doo.js";import{I as g}from"./input-error-ByT28UdP.js";import{B as S}from"./app-wordmark-Bt6XqURo.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-UdzOfzJb.js";import{L as N,I as D}from"./label-1nSzpSB6.js";import{C as R}from"./copy-block-CbJum9s8.js";import{A as te}from"./app-layout-2xAKndVD.js";import{K as re}from"./transition-BX2M1iaq.js";import"./separator-Ct2UcZ2x.js";import"./index-BDVShWMs.js";import"./index-C-EwH4lO.js";import"./use-clipboard-C1ApSwzA.js";import"./checkbox-DKbThbxr.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,4 +1,4 @@
1
- import{r as ae,j as r,c as oe,C as fe}from"./inertia-DLew8ZNx.js";import{D as G}from"./data-table-BIlt7Rtm.js";import{P as he,E as _e}from"./env-layout-REF7OM4q.js";import{S as L,a as pe}from"./stat-DFEyFxkO.js";import{C as M,a as V,b as z,c as Q}from"./card-cAtqCxWl.js";import{c as xe}from"./index-umIAl-pL.js";import{P as le}from"./index-so4lRrRq.js";import{c as d,b as ie}from"./format-B9SDkrWj.js";import"./chart-hover-B1M9jc0y.js";import"./empty-state-C38il627.js";import"./badge-CAxXV8za.js";import"./app-wordmark-o9CODKP0.js";import"./app-layout-DDyQa72H.js";import"./live-dot-D1n_BreY.js";import"./checkbox-CmhMHWZO.js";import"./label-GWl7I6sf.js";import"./use-live-D7xKz2ma.js";import"./segmented-BgbT3wZa.js";import"./arrow-up-C6PxDiY3.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-CqnzqPVD.js";import{D as G}from"./data-table-CVKR2wkq.js";import{P as he,E as _e}from"./env-layout-CKLL8Ds7.js";import{S as L,a as pe}from"./stat-BNEfE8X1.js";import{C as M,a as V,b as z,c as Q}from"./card-DqdEEKcJ.js";import{c as xe}from"./index-C-EwH4lO.js";import{P as le}from"./index-BDVShWMs.js";import{c as d,b as ie}from"./format-B9SDkrWj.js";import"./chart-hover-2yZG3w2u.js";import"./empty-state-Bn48Gplm.js";import"./badge-Dv7I-ebP.js";import"./app-wordmark-Bt6XqURo.js";import"./app-layout-2xAKndVD.js";import"./live-dot-UdzOfzJb.js";import"./checkbox-DKbThbxr.js";import"./label-1nSzpSB6.js";import"./use-live-DWwLg1Nj.js";import"./segmented-C4oWE73o.js";import"./arrow-up-EmePsTKP.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 be,u as ke,r as ye,ao as _e,j as n,L as Z,a1 as ve,Y as we,t as he,e as xe,az as qe,i as Ne}from"./inertia-DLew8ZNx.js";import{V as Ee,D as Re}from"./chart-panel-DUQTz_C8.js";import{D as se}from"./data-table-BIlt7Rtm.js";import{u as Pe,E as Se,P as Me}from"./env-layout-REF7OM4q.js";import{a as De,S as Oe}from"./segmented-BgbT3wZa.js";import{S as X,a as Le}from"./stat-DFEyFxkO.js";import{S as Te}from"./status-badge-BaUKP7Yo.js";import{c as m,p as $e,m as ee,w as pe,a as Ae}from"./format-B9SDkrWj.js";import"./series-chart-Xf49v9cv.js";import"./chart-hover-B1M9jc0y.js";import"./chart-BBeBkkNa.js";import"./empty-state-C38il627.js";import"./badge-CAxXV8za.js";import"./app-wordmark-o9CODKP0.js";import"./app-layout-DDyQa72H.js";import"./live-dot-D1n_BreY.js";import"./index-so4lRrRq.js";import"./index-umIAl-pL.js";import"./checkbox-CmhMHWZO.js";import"./label-GWl7I6sf.js";import"./use-live-D7xKz2ma.js";import"./arrow-up-C6PxDiY3.js";function Dt(t){const e=be.c(167),{environment:de,window:u}=ke().props,{window:fe,label:ge}=Pe(),[i,je]=ye.useState("routes"),r=de.application_id,l=de.id,s=t.summary.current,o=t.summary.previous,c=fe==="custom"?"vs previous period":`vs previous ${ge}`;let f,g,j,b,k,y,d,h,x,p;if(e[0]!==r||e[1]!==c||e[2]!==l||e[3]!==t.exceptions.length||e[4]!==t.jobs.length||e[5]!==t.links.logs||e[6]!==t.links.people||e[7]!==t.people.length||e[8]!==t.recent_requests.length||e[9]!==t.routes.length||e[10]!==t.series||e[11]!==t.tenant||e[12]!==o.errors||e[13]!==o.exceptions||e[14]!==o.p95||e[15]!==o.requests||e[16]!==s.errors||e[17]!==s.exceptions||e[18]!==s.failed_jobs||e[19]!==s.jobs||e[20]!==s.logs||e[21]!==s.p95||e[22]!==s.requests||e[23]!==s.users||e[24]!==i||e[25]!==u){const a=[{key:"routes",label:"Routes",badge:t.routes.length},{key:"jobs",label:"Jobs",badge:t.jobs.length},{key:"exceptions",label:"Exceptions",badge:t.exceptions.length},{key:"people",label:"Users",badge:t.people.length},{key:"requests",label:"Recent requests",badge:t.recent_requests.length}];g=Se,y=t.tenant;let P;e[36]!==r||e[37]!==l||e[38]!==u?(P=_e(r,l,{window:u}),e[36]=r,e[37]=l,e[38]=u,e[39]=P):P=e[39];let S;e[40]!==P?(S={title:"Tenants",href:P},e[40]=P,e[41]=S):S=e[41];let M;e[42]!==t.tenant?(M={title:t.tenant,href:"#"},e[42]=t.tenant,e[43]=M):M=e[43],e[44]!==M||e[45]!==S?(d=[S,M],e[44]=M,e[45]=S,e[46]=d):d=e[46];let D;e[47]!==t.tenant?(D=n.jsx("span",{className:"font-mono",children:t.tenant}),e[47]=t.tenant,e[48]=D):D=e[48];let O;e[49]!==t.links.logs?(O=n.jsx(Z,{className:"text-xs underline",href:t.links.logs,children:"Logs"}),e[49]=t.links.logs,e[50]=O):O=e[50];let L;e[51]!==t.links.people?(L=n.jsx(Z,{className:"text-xs underline",href:t.links.people,children:"Users"}),e[51]=t.links.people,e[52]=L):L=e[52];let T;e[53]!==O||e[54]!==L?(T=n.jsxs(n.Fragment,{children:[O,L]}),e[53]=O,e[54]=L,e[55]=T):T=e[55],e[56]!==D||e[57]!==T?(h=n.jsx(Me,{title:D,actions:T}),e[56]=D,e[57]=T,e[58]=h):h=e[58];let $;e[59]!==s.requests?($=m(s.requests),e[59]=s.requests,e[60]=$):$=e[60];let A;e[61]!==o.requests||e[62]!==s.requests?(A={current:s.requests,previous:o.requests,goodDirection:"up"},e[61]=o.requests,e[62]=s.requests,e[63]=A):A=e[63];let C;e[64]!==c||e[65]!==$||e[66]!==A?(C=n.jsx(X,{label:"Requests",value:$,delta:A,deltaCaption:c}),e[64]=c,e[65]=$,e[66]=A,e[67]=C):C=e[67];let K;e[68]!==s.errors||e[69]!==s.requests?(K=$e(s.errors,s.requests),e[68]=s.errors,e[69]=s.requests,e[70]=K):K=e[70];const le=s.errors?"destructive":"success",oe=`${s.errors} of ${s.requests}`,ie=s.requests?s.errors/s.requests*100:0,ae=o.requests?o.errors/o.requests*100:0;let U;e[71]!==ie||e[72]!==ae?(U={current:ie,previous:ae,goodDirection:"down"},e[71]=ie,e[72]=ae,e[73]=U):U=e[73];let J;e[74]!==c||e[75]!==K||e[76]!==le||e[77]!==oe||e[78]!==U?(J=n.jsx(X,{label:"5xx",value:K,tone:le,hint:oe,delta:U,deltaCaption:c}),e[74]=c,e[75]=K,e[76]=le,e[77]=oe,e[78]=U,e[79]=J):J=e[79];let W;e[80]!==s.p95?(W=ee(s.p95),e[80]=s.p95,e[81]=W):W=e[81];let F;e[82]!==o.p95||e[83]!==s.p95?(F={current:s.p95,previous:o.p95,goodDirection:"down"},e[82]=o.p95,e[83]=s.p95,e[84]=F):F=e[84];let I;e[85]!==c||e[86]!==W||e[87]!==F?(I=n.jsx(X,{label:"p95",value:W,delta:F,deltaCaption:c}),e[85]=c,e[86]=W,e[87]=F,e[88]=I):I=e[88];let V;e[89]!==s.jobs?(V=m(s.jobs),e[89]=s.jobs,e[90]=V):V=e[90];const ce=`${s.failed_jobs} failed`,ue=s.failed_jobs?"destructive":"default";let z;e[91]!==V||e[92]!==ce||e[93]!==ue?(z=n.jsx(X,{label:"Jobs",value:V,hint:ce,tone:ue}),e[91]=V,e[92]=ce,e[93]=ue,e[94]=z):z=e[94];let B;e[95]!==s.exceptions?(B=m(s.exceptions),e[95]=s.exceptions,e[96]=B):B=e[96];let H;e[97]!==o.exceptions||e[98]!==s.exceptions?(H={current:s.exceptions,previous:o.exceptions,goodDirection:"down"},e[97]=o.exceptions,e[98]=s.exceptions,e[99]=H):H=e[99];let Y;e[100]!==c||e[101]!==B||e[102]!==H?(Y=n.jsx(X,{label:"Exceptions",value:B,delta:H,deltaCaption:c}),e[100]=c,e[101]=B,e[102]=H,e[103]=Y):Y=e[103];let G;e[104]!==s.users?(G=m(s.users),e[104]=s.users,e[105]=G):G=e[105];let re;e[106]!==s.logs?(re=m(s.logs),e[106]=s.logs,e[107]=re):re=e[107];const me=`${re} log lines`;let Q;e[108]!==G||e[109]!==me?(Q=n.jsx(X,{label:"Users",value:G,hint:me}),e[108]=G,e[109]=me,e[110]=Q):Q=e[110],e[111]!==C||e[112]!==J||e[113]!==I||e[114]!==z||e[115]!==Y||e[116]!==Q?(x=n.jsxs(Le,{children:[C,J,I,z,Y,Q]}),e[111]=C,e[112]=J,e[113]=I,e[114]=z,e[115]=Y,e[116]=Q,e[117]=x):x=e[117],e[118]!==t.series?(p=n.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[n.jsx(Ee,{label:"Requests",data:t.series}),n.jsx(Re,{label:"Latency",data:t.series})]}),e[118]=t.series,e[119]=p):p=e[119],k="-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden",f=Oe,j="w-max",b=a.map(te=>n.jsxs(De,{mono:!1,active:i===te.key,onClick:()=>je(te.key),className:"gap-1.5 px-3",children:[te.label,n.jsx("span",{className:"opacity-60",children:m(te.badge)})]},te.key)),e[0]=r,e[1]=c,e[2]=l,e[3]=t.exceptions.length,e[4]=t.jobs.length,e[5]=t.links.logs,e[6]=t.links.people,e[7]=t.people.length,e[8]=t.recent_requests.length,e[9]=t.routes.length,e[10]=t.series,e[11]=t.tenant,e[12]=o.errors,e[13]=o.exceptions,e[14]=o.p95,e[15]=o.requests,e[16]=s.errors,e[17]=s.exceptions,e[18]=s.failed_jobs,e[19]=s.jobs,e[20]=s.logs,e[21]=s.p95,e[22]=s.requests,e[23]=s.users,e[24]=i,e[25]=u,e[26]=f,e[27]=g,e[28]=j,e[29]=b,e[30]=k,e[31]=y,e[32]=d,e[33]=h,e[34]=x,e[35]=p}else f=e[26],g=e[27],j=e[28],b=e[29],k=e[30],y=e[31],d=e[32],h=e[33],x=e[34],p=e[35];let _;e[120]!==f||e[121]!==j||e[122]!==b?(_=n.jsx(f,{className:j,children:b}),e[120]=f,e[121]=j,e[122]=b,e[123]=_):_=e[123];let v;e[124]!==k||e[125]!==_?(v=n.jsx("div",{className:k,children:_}),e[124]=k,e[125]=_,e[126]=v):v=e[126];let w;e[127]!==r||e[128]!==l||e[129]!==t.routes||e[130]!==i||e[131]!==u?(w=i==="routes"&&n.jsx(se,{rows:t.routes,rowKey:ct,empty:"No requests from this tenant in this window.",columns:[{key:"name",header:"Route",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:ve(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Requests",align:"right",cell:at},{key:"errors",header:"5xx",align:"right",cell:it},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:ot},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:lt}]}),e[127]=r,e[128]=l,e[129]=t.routes,e[130]=i,e[131]=u,e[132]=w):w=e[132];let q;e[133]!==r||e[134]!==l||e[135]!==t.jobs||e[136]!==i||e[137]!==u?(q=i==="jobs"&&n.jsx(se,{rows:t.jobs,rowKey:rt,empty:"No job attempts from this tenant in this window.",columns:[{key:"name",header:"Job",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:we(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Attempts",align:"right",cell:nt},{key:"failed",header:"Failed",align:"right",cell:st},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:tt},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:et}]}),e[133]=r,e[134]=l,e[135]=t.jobs,e[136]=i,e[137]=u,e[138]=q):q=e[138];let N;e[139]!==r||e[140]!==l||e[141]!==t.exceptions||e[142]!==i?(N=i==="exceptions"&&n.jsx(se,{rows:t.exceptions,rowKey:Ze,empty:"No exceptions from this tenant in this window.",columns:[{key:"when",header:"When",cell:Xe},{key:"class",header:"Class",cell:Qe},{key:"message",header:"Message",cell:Ge},{key:"issue",header:"Issue",cell:Ye},{key:"exe",hideOnMobile:!0,header:"Execution",cell:a=>a.execution_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:he(r,l,a.execution_id),children:a.execution_id.slice(0,8)}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}]}),e[139]=r,e[140]=l,e[141]=t.exceptions,e[142]=i,e[143]=N):N=e[143];let E;e[144]!==r||e[145]!==l||e[146]!==t.people||e[147]!==i?(E=i==="people"&&n.jsx(se,{rows:t.people,rowKey:He,empty:"No users tagged with this tenant.",onRowClick:a=>xe.visit(qe(r,l,a.ref)),columns:[{key:"name",header:"User",cell:Be},{key:"ref",hideOnMobile:!0,header:"Ref",cell:ze},{key:"seen",header:"Last seen",align:"right",cell:Ve}]}),e[144]=r,e[145]=l,e[146]=t.people,e[147]=i,e[148]=E):E=e[148];let R;e[149]!==r||e[150]!==l||e[151]!==t.recent_requests||e[152]!==i?(R=i==="requests"&&n.jsx(se,{rows:t.recent_requests,rowKey:Ie,empty:"No requests from this tenant in this window.",onRowClick:a=>xe.visit(he(r,l,a.execution_id)),columns:[{key:"when",header:"When",cell:Fe},{key:"name",header:"Route",cell:We},{key:"status",header:"Status",cell:Je},{key:"dur",header:"Duration",align:"right",cell:Ue},{key:"user",hideOnMobile:!0,header:"User",cell:Ke},{key:"ex",hideOnMobile:!0,header:"Exception",cell:Ce}]}),e[149]=r,e[150]=l,e[151]=t.recent_requests,e[152]=i,e[153]=R):R=e[153];let ne;return e[154]!==g||e[155]!==w||e[156]!==q||e[157]!==N||e[158]!==E||e[159]!==R||e[160]!==y||e[161]!==d||e[162]!==h||e[163]!==x||e[164]!==p||e[165]!==v?(ne=n.jsxs(g,{title:y,crumbs:d,children:[h,x,p,v,w,q,N,E,R]}),e[154]=g,e[155]=w,e[156]=q,e[157]=N,e[158]=E,e[159]=R,e[160]=y,e[161]=d,e[162]=h,e[163]=x,e[164]=p,e[165]=v,e[166]=ne):ne=e[166],ne}function Ce(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function Ke(t){return n.jsx("span",{className:"font-mono text-xs",children:t.user_ref??"–"})}function Ue(t){return ee(t.duration)}function Je(t){return n.jsx(Te,{status:t.status})}function We(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Fe(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ie(t){return t.execution_id}function Ve(t){return Ae(t.last_seen_at)}function ze(t){return n.jsx("span",{className:"font-mono text-xs",children:t.ref})}function Be(t){return n.jsxs("span",{className:"text-xs",children:[n.jsx("span",{className:"font-medium",children:t.name}),t.email&&n.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.email]})]})}function He(t){return t.ref}function Ye(t){return t.issue_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:Ne(t.issue_id),children:t.issue_key}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}function Ge(t){return n.jsx("span",{className:"line-clamp-1 text-xs",children:t.message})}function Qe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.class_name})}function Xe(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ze(t){return t.id}function et(t){return ee(t.max)}function tt(t){return ee(t.avg)}function st(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:m(t.failed)})}function nt(t){return m(t.count)}function rt(t){return t.group_hash}function lt(t){return ee(t.max)}function ot(t){return ee(t.avg)}function it(t){return n.jsx("span",{className:t.errors?"text-destructive":"",children:m(t.errors)})}function at(t){return m(t.count)}function ct(t){return t.group_hash}export{Dt as default};
1
+ import{c as be,u as ke,r as ye,ao as _e,j as n,L as Z,a1 as ve,Y as we,t as he,e as xe,az as qe,i as Ne}from"./inertia-CqnzqPVD.js";import{V as Ee,D as Re}from"./chart-panel-CONkZcn9.js";import{D as se}from"./data-table-CVKR2wkq.js";import{u as Pe,E as Se,P as Me}from"./env-layout-CKLL8Ds7.js";import{a as De,S as Oe}from"./segmented-C4oWE73o.js";import{S as X,a as Le}from"./stat-BNEfE8X1.js";import{S as Te}from"./status-badge-D0aylrM5.js";import{c as m,p as $e,m as ee,w as pe,a as Ae}from"./format-B9SDkrWj.js";import"./series-chart-D6upsrSn.js";import"./chart-hover-2yZG3w2u.js";import"./chart-C4k7Ub9W.js";import"./empty-state-Bn48Gplm.js";import"./badge-Dv7I-ebP.js";import"./app-wordmark-Bt6XqURo.js";import"./app-layout-2xAKndVD.js";import"./live-dot-UdzOfzJb.js";import"./index-BDVShWMs.js";import"./index-C-EwH4lO.js";import"./checkbox-DKbThbxr.js";import"./label-1nSzpSB6.js";import"./use-live-DWwLg1Nj.js";import"./arrow-up-EmePsTKP.js";function Dt(t){const e=be.c(167),{environment:de,window:u}=ke().props,{window:fe,label:ge}=Pe(),[i,je]=ye.useState("routes"),r=de.application_id,l=de.id,s=t.summary.current,o=t.summary.previous,c=fe==="custom"?"vs previous period":`vs previous ${ge}`;let f,g,j,b,k,y,d,h,x,p;if(e[0]!==r||e[1]!==c||e[2]!==l||e[3]!==t.exceptions.length||e[4]!==t.jobs.length||e[5]!==t.links.logs||e[6]!==t.links.people||e[7]!==t.people.length||e[8]!==t.recent_requests.length||e[9]!==t.routes.length||e[10]!==t.series||e[11]!==t.tenant||e[12]!==o.errors||e[13]!==o.exceptions||e[14]!==o.p95||e[15]!==o.requests||e[16]!==s.errors||e[17]!==s.exceptions||e[18]!==s.failed_jobs||e[19]!==s.jobs||e[20]!==s.logs||e[21]!==s.p95||e[22]!==s.requests||e[23]!==s.users||e[24]!==i||e[25]!==u){const a=[{key:"routes",label:"Routes",badge:t.routes.length},{key:"jobs",label:"Jobs",badge:t.jobs.length},{key:"exceptions",label:"Exceptions",badge:t.exceptions.length},{key:"people",label:"Users",badge:t.people.length},{key:"requests",label:"Recent requests",badge:t.recent_requests.length}];g=Se,y=t.tenant;let P;e[36]!==r||e[37]!==l||e[38]!==u?(P=_e(r,l,{window:u}),e[36]=r,e[37]=l,e[38]=u,e[39]=P):P=e[39];let S;e[40]!==P?(S={title:"Tenants",href:P},e[40]=P,e[41]=S):S=e[41];let M;e[42]!==t.tenant?(M={title:t.tenant,href:"#"},e[42]=t.tenant,e[43]=M):M=e[43],e[44]!==M||e[45]!==S?(d=[S,M],e[44]=M,e[45]=S,e[46]=d):d=e[46];let D;e[47]!==t.tenant?(D=n.jsx("span",{className:"font-mono",children:t.tenant}),e[47]=t.tenant,e[48]=D):D=e[48];let O;e[49]!==t.links.logs?(O=n.jsx(Z,{className:"text-xs underline",href:t.links.logs,children:"Logs"}),e[49]=t.links.logs,e[50]=O):O=e[50];let L;e[51]!==t.links.people?(L=n.jsx(Z,{className:"text-xs underline",href:t.links.people,children:"Users"}),e[51]=t.links.people,e[52]=L):L=e[52];let T;e[53]!==O||e[54]!==L?(T=n.jsxs(n.Fragment,{children:[O,L]}),e[53]=O,e[54]=L,e[55]=T):T=e[55],e[56]!==D||e[57]!==T?(h=n.jsx(Me,{title:D,actions:T}),e[56]=D,e[57]=T,e[58]=h):h=e[58];let $;e[59]!==s.requests?($=m(s.requests),e[59]=s.requests,e[60]=$):$=e[60];let A;e[61]!==o.requests||e[62]!==s.requests?(A={current:s.requests,previous:o.requests,goodDirection:"up"},e[61]=o.requests,e[62]=s.requests,e[63]=A):A=e[63];let C;e[64]!==c||e[65]!==$||e[66]!==A?(C=n.jsx(X,{label:"Requests",value:$,delta:A,deltaCaption:c}),e[64]=c,e[65]=$,e[66]=A,e[67]=C):C=e[67];let K;e[68]!==s.errors||e[69]!==s.requests?(K=$e(s.errors,s.requests),e[68]=s.errors,e[69]=s.requests,e[70]=K):K=e[70];const le=s.errors?"destructive":"success",oe=`${s.errors} of ${s.requests}`,ie=s.requests?s.errors/s.requests*100:0,ae=o.requests?o.errors/o.requests*100:0;let U;e[71]!==ie||e[72]!==ae?(U={current:ie,previous:ae,goodDirection:"down"},e[71]=ie,e[72]=ae,e[73]=U):U=e[73];let J;e[74]!==c||e[75]!==K||e[76]!==le||e[77]!==oe||e[78]!==U?(J=n.jsx(X,{label:"5xx",value:K,tone:le,hint:oe,delta:U,deltaCaption:c}),e[74]=c,e[75]=K,e[76]=le,e[77]=oe,e[78]=U,e[79]=J):J=e[79];let W;e[80]!==s.p95?(W=ee(s.p95),e[80]=s.p95,e[81]=W):W=e[81];let F;e[82]!==o.p95||e[83]!==s.p95?(F={current:s.p95,previous:o.p95,goodDirection:"down"},e[82]=o.p95,e[83]=s.p95,e[84]=F):F=e[84];let I;e[85]!==c||e[86]!==W||e[87]!==F?(I=n.jsx(X,{label:"p95",value:W,delta:F,deltaCaption:c}),e[85]=c,e[86]=W,e[87]=F,e[88]=I):I=e[88];let V;e[89]!==s.jobs?(V=m(s.jobs),e[89]=s.jobs,e[90]=V):V=e[90];const ce=`${s.failed_jobs} failed`,ue=s.failed_jobs?"destructive":"default";let z;e[91]!==V||e[92]!==ce||e[93]!==ue?(z=n.jsx(X,{label:"Jobs",value:V,hint:ce,tone:ue}),e[91]=V,e[92]=ce,e[93]=ue,e[94]=z):z=e[94];let B;e[95]!==s.exceptions?(B=m(s.exceptions),e[95]=s.exceptions,e[96]=B):B=e[96];let H;e[97]!==o.exceptions||e[98]!==s.exceptions?(H={current:s.exceptions,previous:o.exceptions,goodDirection:"down"},e[97]=o.exceptions,e[98]=s.exceptions,e[99]=H):H=e[99];let Y;e[100]!==c||e[101]!==B||e[102]!==H?(Y=n.jsx(X,{label:"Exceptions",value:B,delta:H,deltaCaption:c}),e[100]=c,e[101]=B,e[102]=H,e[103]=Y):Y=e[103];let G;e[104]!==s.users?(G=m(s.users),e[104]=s.users,e[105]=G):G=e[105];let re;e[106]!==s.logs?(re=m(s.logs),e[106]=s.logs,e[107]=re):re=e[107];const me=`${re} log lines`;let Q;e[108]!==G||e[109]!==me?(Q=n.jsx(X,{label:"Users",value:G,hint:me}),e[108]=G,e[109]=me,e[110]=Q):Q=e[110],e[111]!==C||e[112]!==J||e[113]!==I||e[114]!==z||e[115]!==Y||e[116]!==Q?(x=n.jsxs(Le,{children:[C,J,I,z,Y,Q]}),e[111]=C,e[112]=J,e[113]=I,e[114]=z,e[115]=Y,e[116]=Q,e[117]=x):x=e[117],e[118]!==t.series?(p=n.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[n.jsx(Ee,{label:"Requests",data:t.series}),n.jsx(Re,{label:"Latency",data:t.series})]}),e[118]=t.series,e[119]=p):p=e[119],k="-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden",f=Oe,j="w-max",b=a.map(te=>n.jsxs(De,{mono:!1,active:i===te.key,onClick:()=>je(te.key),className:"gap-1.5 px-3",children:[te.label,n.jsx("span",{className:"opacity-60",children:m(te.badge)})]},te.key)),e[0]=r,e[1]=c,e[2]=l,e[3]=t.exceptions.length,e[4]=t.jobs.length,e[5]=t.links.logs,e[6]=t.links.people,e[7]=t.people.length,e[8]=t.recent_requests.length,e[9]=t.routes.length,e[10]=t.series,e[11]=t.tenant,e[12]=o.errors,e[13]=o.exceptions,e[14]=o.p95,e[15]=o.requests,e[16]=s.errors,e[17]=s.exceptions,e[18]=s.failed_jobs,e[19]=s.jobs,e[20]=s.logs,e[21]=s.p95,e[22]=s.requests,e[23]=s.users,e[24]=i,e[25]=u,e[26]=f,e[27]=g,e[28]=j,e[29]=b,e[30]=k,e[31]=y,e[32]=d,e[33]=h,e[34]=x,e[35]=p}else f=e[26],g=e[27],j=e[28],b=e[29],k=e[30],y=e[31],d=e[32],h=e[33],x=e[34],p=e[35];let _;e[120]!==f||e[121]!==j||e[122]!==b?(_=n.jsx(f,{className:j,children:b}),e[120]=f,e[121]=j,e[122]=b,e[123]=_):_=e[123];let v;e[124]!==k||e[125]!==_?(v=n.jsx("div",{className:k,children:_}),e[124]=k,e[125]=_,e[126]=v):v=e[126];let w;e[127]!==r||e[128]!==l||e[129]!==t.routes||e[130]!==i||e[131]!==u?(w=i==="routes"&&n.jsx(se,{rows:t.routes,rowKey:ct,empty:"No requests from this tenant in this window.",columns:[{key:"name",header:"Route",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:ve(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Requests",align:"right",cell:at},{key:"errors",header:"5xx",align:"right",cell:it},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:ot},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:lt}]}),e[127]=r,e[128]=l,e[129]=t.routes,e[130]=i,e[131]=u,e[132]=w):w=e[132];let q;e[133]!==r||e[134]!==l||e[135]!==t.jobs||e[136]!==i||e[137]!==u?(q=i==="jobs"&&n.jsx(se,{rows:t.jobs,rowKey:rt,empty:"No job attempts from this tenant in this window.",columns:[{key:"name",header:"Job",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:we(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Attempts",align:"right",cell:nt},{key:"failed",header:"Failed",align:"right",cell:st},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:tt},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:et}]}),e[133]=r,e[134]=l,e[135]=t.jobs,e[136]=i,e[137]=u,e[138]=q):q=e[138];let N;e[139]!==r||e[140]!==l||e[141]!==t.exceptions||e[142]!==i?(N=i==="exceptions"&&n.jsx(se,{rows:t.exceptions,rowKey:Ze,empty:"No exceptions from this tenant in this window.",columns:[{key:"when",header:"When",cell:Xe},{key:"class",header:"Class",cell:Qe},{key:"message",header:"Message",cell:Ge},{key:"issue",header:"Issue",cell:Ye},{key:"exe",hideOnMobile:!0,header:"Execution",cell:a=>a.execution_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:he(r,l,a.execution_id),children:a.execution_id.slice(0,8)}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}]}),e[139]=r,e[140]=l,e[141]=t.exceptions,e[142]=i,e[143]=N):N=e[143];let E;e[144]!==r||e[145]!==l||e[146]!==t.people||e[147]!==i?(E=i==="people"&&n.jsx(se,{rows:t.people,rowKey:He,empty:"No users tagged with this tenant.",onRowClick:a=>xe.visit(qe(r,l,a.ref)),columns:[{key:"name",header:"User",cell:Be},{key:"ref",hideOnMobile:!0,header:"Ref",cell:ze},{key:"seen",header:"Last seen",align:"right",cell:Ve}]}),e[144]=r,e[145]=l,e[146]=t.people,e[147]=i,e[148]=E):E=e[148];let R;e[149]!==r||e[150]!==l||e[151]!==t.recent_requests||e[152]!==i?(R=i==="requests"&&n.jsx(se,{rows:t.recent_requests,rowKey:Ie,empty:"No requests from this tenant in this window.",onRowClick:a=>xe.visit(he(r,l,a.execution_id)),columns:[{key:"when",header:"When",cell:Fe},{key:"name",header:"Route",cell:We},{key:"status",header:"Status",cell:Je},{key:"dur",header:"Duration",align:"right",cell:Ue},{key:"user",hideOnMobile:!0,header:"User",cell:Ke},{key:"ex",hideOnMobile:!0,header:"Exception",cell:Ce}]}),e[149]=r,e[150]=l,e[151]=t.recent_requests,e[152]=i,e[153]=R):R=e[153];let ne;return e[154]!==g||e[155]!==w||e[156]!==q||e[157]!==N||e[158]!==E||e[159]!==R||e[160]!==y||e[161]!==d||e[162]!==h||e[163]!==x||e[164]!==p||e[165]!==v?(ne=n.jsxs(g,{title:y,crumbs:d,children:[h,x,p,v,w,q,N,E,R]}),e[154]=g,e[155]=w,e[156]=q,e[157]=N,e[158]=E,e[159]=R,e[160]=y,e[161]=d,e[162]=h,e[163]=x,e[164]=p,e[165]=v,e[166]=ne):ne=e[166],ne}function Ce(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function Ke(t){return n.jsx("span",{className:"font-mono text-xs",children:t.user_ref??"–"})}function Ue(t){return ee(t.duration)}function Je(t){return n.jsx(Te,{status:t.status})}function We(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Fe(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ie(t){return t.execution_id}function Ve(t){return Ae(t.last_seen_at)}function ze(t){return n.jsx("span",{className:"font-mono text-xs",children:t.ref})}function Be(t){return n.jsxs("span",{className:"text-xs",children:[n.jsx("span",{className:"font-medium",children:t.name}),t.email&&n.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.email]})]})}function He(t){return t.ref}function Ye(t){return t.issue_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:Ne(t.issue_id),children:t.issue_key}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}function Ge(t){return n.jsx("span",{className:"line-clamp-1 text-xs",children:t.message})}function Qe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.class_name})}function Xe(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ze(t){return t.id}function et(t){return ee(t.max)}function tt(t){return ee(t.avg)}function st(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:m(t.failed)})}function nt(t){return m(t.count)}function rt(t){return t.group_hash}function lt(t){return ee(t.max)}function ot(t){return ee(t.avg)}function it(t){return n.jsx("span",{className:t.errors?"text-destructive":"",children:m(t.errors)})}function at(t){return m(t.count)}function ct(t){return t.group_hash}export{Dt 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-DLew8ZNx.js";import{D as ke}from"./data-table-BIlt7Rtm.js";import{E as Se}from"./empty-state-C38il627.js";import{P as Be,E as Ke}from"./env-layout-REF7OM4q.js";import{R as Ue}from"./relative-time-CjIjb8Lg.js";import{S as ae,a as Ae}from"./stat-DFEyFxkO.js";import{I as We}from"./status-badge-BaUKP7Yo.js";import{B as Je}from"./app-wordmark-o9CODKP0.js";import{C as Ee,a as He,b as Me,c as Ie}from"./card-cAtqCxWl.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-4b3tivEf.js";import{G as Ze,O as Fe}from"./app-layout-DDyQa72H.js";import"./chart-hover-B1M9jc0y.js";import"./badge-CAxXV8za.js";import"./use-live-D7xKz2ma.js";import"./live-dot-D1n_BreY.js";import"./index-so4lRrRq.js";import"./index-umIAl-pL.js";import"./segmented-BgbT3wZa.js";import"./label-GWl7I6sf.js";import"./arrow-up-C6PxDiY3.js";import"./checkbox-CmhMHWZO.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-CqnzqPVD.js";import{D as ke}from"./data-table-CVKR2wkq.js";import{E as Se}from"./empty-state-Bn48Gplm.js";import{P as Be,E as Ke}from"./env-layout-CKLL8Ds7.js";import{R as Ue}from"./relative-time-DQ4kjowZ.js";import{S as ae,a as Ae}from"./stat-BNEfE8X1.js";import{I as We}from"./status-badge-D0aylrM5.js";import{B as Je}from"./app-wordmark-Bt6XqURo.js";import{C as Ee,a as He,b as Me,c as Ie}from"./card-DqdEEKcJ.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-Cb1tMOOO.js";import{G as Ze,O as Fe}from"./app-layout-2xAKndVD.js";import"./chart-hover-2yZG3w2u.js";import"./badge-Dv7I-ebP.js";import"./use-live-DWwLg1Nj.js";import"./live-dot-UdzOfzJb.js";import"./index-BDVShWMs.js";import"./index-C-EwH4lO.js";import"./segmented-C4oWE73o.js";import"./label-1nSzpSB6.js";import"./arrow-up-EmePsTKP.js";import"./checkbox-DKbThbxr.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 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-DLew8ZNx.js";import{D as J}from"./data-table-BIlt7Rtm.js";import{O as M}from"./onboarding-D1vwaHYT.js";import{B as D}from"./badge-CAxXV8za.js";import{B as w}from"./app-wordmark-o9CODKP0.js";import{A as Q}from"./app-layout-DDyQa72H.js";import{a as U,c as V}from"./format-B9SDkrWj.js";import"./chart-hover-B1M9jc0y.js";import"./empty-state-C38il627.js";import"./copy-block-BkSU5832.js";import"./use-clipboard-ByoUGQqA.js";import"./index-umIAl-pL.js";import"./live-dot-D1n_BreY.js";import"./index-so4lRrRq.js";import"./card-cAtqCxWl.js";import"./checkbox-CmhMHWZO.js";import"./label-GWl7I6sf.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-CqnzqPVD.js";import{D as J}from"./data-table-CVKR2wkq.js";import{O as M}from"./onboarding-gUjJQc-6.js";import{B as D}from"./badge-Dv7I-ebP.js";import{B as w}from"./app-wordmark-Bt6XqURo.js";import{A as Q}from"./app-layout-2xAKndVD.js";import{a as U,c as V}from"./format-B9SDkrWj.js";import"./chart-hover-2yZG3w2u.js";import"./empty-state-Bn48Gplm.js";import"./copy-block-CbJum9s8.js";import"./use-clipboard-C1ApSwzA.js";import"./index-C-EwH4lO.js";import"./live-dot-UdzOfzJb.js";import"./index-BDVShWMs.js";import"./card-DqdEEKcJ.js";import"./checkbox-DKbThbxr.js";import"./label-1nSzpSB6.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 +1 @@
1
- import{c as d,j as s,H as m,F as p,aH as c}from"./inertia-DLew8ZNx.js";import{S as u,H as w}from"./layout-0ZAnD3zl.js";import{I as t}from"./input-error-cvM6_Jht.js";import{B as h}from"./app-wordmark-o9CODKP0.js";import{L as l,I as n}from"./label-GWl7I6sf.js";import{A as f}from"./app-layout-DDyQa72H.js";import{K as x}from"./transition-DMIrZVth.js";import"./separator-BXzEdZ_8.js";import"./index-so4lRrRq.js";import"./live-dot-D1n_BreY.js";import"./index-umIAl-pL.js";import"./checkbox-CmhMHWZO.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-CqnzqPVD.js";import{S as u,H as w}from"./layout-D7lE1Doo.js";import{I as t}from"./input-error-ByT28UdP.js";import{B as h}from"./app-wordmark-Bt6XqURo.js";import{L as l,I as n}from"./label-1nSzpSB6.js";import{A as f}from"./app-layout-2xAKndVD.js";import{K as x}from"./transition-BX2M1iaq.js";import"./separator-Ct2UcZ2x.js";import"./index-BDVShWMs.js";import"./live-dot-UdzOfzJb.js";import"./index-C-EwH4lO.js";import"./checkbox-DKbThbxr.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{B,c as C,u as H,r as L,j as s,L as E,C as I,H as z}from"./inertia-DLew8ZNx.js";import{M as D,a as F}from"./nav-DPxr1NNC.js";import{B as R}from"./app-wordmark-o9CODKP0.js";const $=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O=B("menu",$);function G(t){const e=C.c(36),{auth:S}=H().props,[f,w]=L.useState(!1);let o;if(e[0]!==t.doc.id||e[1]!==t.nav){let v;e[3]!==t.doc.id?(v=M=>s.jsxs("div",{children:[s.jsx("div",{className:"label-caps mb-2",children:M.title}),s.jsx("ul",{className:"space-y-0.5",children:M.docs.map(k=>s.jsx("li",{children:s.jsx(E,{href:k.href,onClick:()=>w(!1),className:I("hover:bg-accent block rounded-md px-2 py-1",k.id===t.doc.id?"bg-accent font-medium":"text-muted-foreground"),children:k.title})},k.id))})]},M.section),e[3]=t.doc.id,e[4]=v):v=e[4],o=t.nav.map(v),e[0]=t.doc.id,e[1]=t.nav,e[2]=o}else o=e[2];let h;e[5]!==o?(h=s.jsx("nav",{className:"space-y-6 text-sm",children:o}),e[5]=o,e[6]=h):h=e[6];const l=h,N=`${t.doc.title} · Docs`;let n;e[7]!==N?(n=s.jsx(z,{title:N}),e[7]=N,e[8]=n):n=e[8];const y=!!S?.user;let a;e[9]!==y?(a=s.jsx(D,{signedIn:y}),e[9]=y,e[10]=a):a=e[10];let r;e[11]!==l?(r=s.jsx("aside",{className:"hidden w-56 shrink-0 md:block",children:s.jsx("div",{className:"sticky top-6",children:l})}),e[11]=l,e[12]=r):r=e[12];let u,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=()=>w(P),j=s.jsx(O,{className:"size-4"}),e[13]=u,e[14]=j):(u=e[13],j=e[14]);const _=f?"Hide contents":"Contents";let c;e[15]!==_?(c=s.jsxs(R,{variant:"outline",size:"sm",onClick:u,children:[j,_]}),e[15]=_,e[16]=c):c=e[16];let i;e[17]!==f||e[18]!==l?(i=f&&s.jsx("div",{className:"bg-card mt-3 rounded-lg border p-4",children:l}),e[17]=f,e[18]=l,e[19]=i):i=e[19];let d;e[20]!==c||e[21]!==i?(d=s.jsxs("div",{className:"mb-4 md:hidden",children:[c,i]}),e[20]=c,e[21]=i,e[22]=d):d=e[22];let m;e[23]!==t.doc.html?(m=s.jsx("article",{className:"prose prose-neutral dark:prose-invert prose-headings:scroll-mt-6 prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-3xl prose-a:text-primary prose-code:rounded prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:font-mono prose-code:text-[0.85em] prose-code:font-normal prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-table:text-sm prose-th:label-caps max-w-none",dangerouslySetInnerHTML:{__html:t.doc.html}}),e[23]=t.doc.html,e[24]=m):m=e[24];let p;e[25]!==d||e[26]!==m?(p=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,m]}),e[25]=d,e[26]=m,e[27]=p):p=e[27];let x;e[28]!==p||e[29]!==r?(x=s.jsxs("div",{className:"mx-auto flex w-full max-w-6xl gap-10 px-6 pb-16",children:[r,p]}),e[28]=p,e[29]=r,e[30]=x):x=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(F,{}),e[31]=b):b=e[31];let g;return e[32]!==x||e[33]!==n||e[34]!==a?(g=s.jsxs(s.Fragment,{children:[n,a,x,b]}),e[32]=x,e[33]=n,e[34]=a,e[35]=g):g=e[35],g}function P(t){return!t}export{G as default};
1
+ import{B,c as C,u as H,r as L,j as s,L as E,C as I,H as z}from"./inertia-CqnzqPVD.js";import{M as D,a as F}from"./nav-BRCgp2w3.js";import{B as R}from"./app-wordmark-Bt6XqURo.js";const $=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O=B("menu",$);function G(t){const e=C.c(36),{auth:S}=H().props,[f,w]=L.useState(!1);let o;if(e[0]!==t.doc.id||e[1]!==t.nav){let v;e[3]!==t.doc.id?(v=M=>s.jsxs("div",{children:[s.jsx("div",{className:"label-caps mb-2",children:M.title}),s.jsx("ul",{className:"space-y-0.5",children:M.docs.map(k=>s.jsx("li",{children:s.jsx(E,{href:k.href,onClick:()=>w(!1),className:I("hover:bg-accent block rounded-md px-2 py-1",k.id===t.doc.id?"bg-accent font-medium":"text-muted-foreground"),children:k.title})},k.id))})]},M.section),e[3]=t.doc.id,e[4]=v):v=e[4],o=t.nav.map(v),e[0]=t.doc.id,e[1]=t.nav,e[2]=o}else o=e[2];let h;e[5]!==o?(h=s.jsx("nav",{className:"space-y-6 text-sm",children:o}),e[5]=o,e[6]=h):h=e[6];const l=h,N=`${t.doc.title} · Docs`;let n;e[7]!==N?(n=s.jsx(z,{title:N}),e[7]=N,e[8]=n):n=e[8];const y=!!S?.user;let a;e[9]!==y?(a=s.jsx(D,{signedIn:y}),e[9]=y,e[10]=a):a=e[10];let r;e[11]!==l?(r=s.jsx("aside",{className:"hidden w-56 shrink-0 md:block",children:s.jsx("div",{className:"sticky top-6",children:l})}),e[11]=l,e[12]=r):r=e[12];let u,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=()=>w(P),j=s.jsx(O,{className:"size-4"}),e[13]=u,e[14]=j):(u=e[13],j=e[14]);const _=f?"Hide contents":"Contents";let c;e[15]!==_?(c=s.jsxs(R,{variant:"outline",size:"sm",onClick:u,children:[j,_]}),e[15]=_,e[16]=c):c=e[16];let i;e[17]!==f||e[18]!==l?(i=f&&s.jsx("div",{className:"bg-card mt-3 rounded-lg border p-4",children:l}),e[17]=f,e[18]=l,e[19]=i):i=e[19];let d;e[20]!==c||e[21]!==i?(d=s.jsxs("div",{className:"mb-4 md:hidden",children:[c,i]}),e[20]=c,e[21]=i,e[22]=d):d=e[22];let m;e[23]!==t.doc.html?(m=s.jsx("article",{className:"prose prose-neutral dark:prose-invert prose-headings:scroll-mt-6 prose-headings:font-semibold prose-headings:tracking-tight prose-h1:text-3xl prose-a:text-primary prose-code:rounded prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:font-mono prose-code:text-[0.85em] prose-code:font-normal prose-code:before:content-none prose-code:after:content-none prose-pre:bg-muted prose-pre:text-foreground prose-pre:border prose-table:text-sm prose-th:label-caps max-w-none",dangerouslySetInnerHTML:{__html:t.doc.html}}),e[23]=t.doc.html,e[24]=m):m=e[24];let p;e[25]!==d||e[26]!==m?(p=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,m]}),e[25]=d,e[26]=m,e[27]=p):p=e[27];let x;e[28]!==p||e[29]!==r?(x=s.jsxs("div",{className:"mx-auto flex w-full max-w-6xl gap-10 px-6 pb-16",children:[r,p]}),e[28]=p,e[29]=r,e[30]=x):x=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(F,{}),e[31]=b):b=e[31];let g;return e[32]!==x||e[33]!==n||e[34]!==a?(g=s.jsxs(s.Fragment,{children:[n,a,x,b]}),e[32]=x,e[33]=n,e[34]=a,e[35]=g):g=e[35],g}function P(t){return!t}export{G as default};
@@ -1 +1 @@
1
- import{c as $,u as P,j as i,C as N,L as C}from"./inertia-DLew8ZNx.js";import{C as I}from"./copy-id-D03GhN9F.js";import{E as R}from"./empty-state-C38il627.js";import{P as q,E as K}from"./env-layout-REF7OM4q.js";import{a as B,S as w}from"./stat-DFEyFxkO.js";import{K as H}from"./status-badge-BaUKP7Yo.js";import{e as W}from"./execution-path-FYLq1TwC.js";import{c as E,m as L,s as T}from"./format-B9SDkrWj.js";import"./app-wordmark-o9CODKP0.js";import"./use-clipboard-ByoUGQqA.js";import"./index-umIAl-pL.js";import"./badge-CAxXV8za.js";import"./app-layout-DDyQa72H.js";import"./live-dot-D1n_BreY.js";import"./index-so4lRrRq.js";import"./checkbox-CmhMHWZO.js";import"./label-GWl7I6sf.js";import"./use-live-D7xKz2ma.js";import"./segmented-BgbT3wZa.js";import"./arrow-up-C6PxDiY3.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-CqnzqPVD.js";import{C as I}from"./copy-id-JmvLfkmx.js";import{E as R}from"./empty-state-Bn48Gplm.js";import{P as q,E as K}from"./env-layout-CKLL8Ds7.js";import{a as B,S as w}from"./stat-BNEfE8X1.js";import{K as H}from"./status-badge-D0aylrM5.js";import{e as W}from"./execution-path-DWovhgLi.js";import{c as E,m as L,s as T}from"./format-B9SDkrWj.js";import"./app-wordmark-Bt6XqURo.js";import"./use-clipboard-C1ApSwzA.js";import"./index-C-EwH4lO.js";import"./badge-Dv7I-ebP.js";import"./app-layout-2xAKndVD.js";import"./live-dot-UdzOfzJb.js";import"./index-BDVShWMs.js";import"./checkbox-DKbThbxr.js";import"./label-1nSzpSB6.js";import"./use-live-DWwLg1Nj.js";import"./segmented-C4oWE73o.js";import"./arrow-up-EmePsTKP.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 +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-DLew8ZNx.js";import{H as b,S as E}from"./layout-0ZAnD3zl.js";import{I as u}from"./input-error-cvM6_Jht.js";import{B as F}from"./app-wordmark-o9CODKP0.js";import{L as p,I as h}from"./label-GWl7I6sf.js";import{A as L}from"./app-layout-DDyQa72H.js";import{K as k}from"./transition-DMIrZVth.js";import"./separator-BXzEdZ_8.js";import"./index-so4lRrRq.js";import"./live-dot-D1n_BreY.js";import"./index-umIAl-pL.js";import"./checkbox-CmhMHWZO.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-CqnzqPVD.js";import{H as b,S as E}from"./layout-D7lE1Doo.js";import{I as u}from"./input-error-ByT28UdP.js";import{B as F}from"./app-wordmark-Bt6XqURo.js";import{L as p,I as h}from"./label-1nSzpSB6.js";import{A as L}from"./app-layout-2xAKndVD.js";import{K as k}from"./transition-BX2M1iaq.js";import"./separator-Ct2UcZ2x.js";import"./index-BDVShWMs.js";import"./live-dot-UdzOfzJb.js";import"./index-C-EwH4lO.js";import"./checkbox-DKbThbxr.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};