railwatch 0.4.0 → 0.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/app/controllers/railwatch/commands_controller.rb +1 -1
- data/app/controllers/railwatch/environment_scoped.rb +18 -36
- data/app/controllers/railwatch/exceptions_controller.rb +8 -9
- data/app/controllers/railwatch/processes_controller.rb +1 -1
- data/app/controllers/railwatch/releases_controller.rb +2 -2
- data/app/controllers/railwatch/tenants_controller.rb +2 -2
- data/app/controllers/railwatch/thresholds_controller.rb +8 -1
- data/app/jobs/railwatch/detect_performance_issues_job.rb +12 -2
- data/app/models/railwatch/anomaly_rule.rb +20 -2
- data/app/models/railwatch/telemetry/aggregations.rb +154 -19
- data/app/models/railwatch/telemetry/exception.rb +7 -0
- data/app/models/railwatch/telemetry/execution.rb +18 -0
- data/app/models/railwatch/telemetry/log.rb +6 -0
- data/app/models/railwatch/telemetry/query.rb +7 -0
- data/app/models/railwatch/telemetry/release_health.rb +12 -6
- data/app/models/railwatch/telemetry/rollup.rb +17 -2
- data/app/models/railwatch/telemetry/tenant.rb +8 -23
- data/app/models/railwatch/telemetry_record.rb +8 -6
- data/app/models/railwatch/threshold.rb +41 -4
- data/app/models/railwatch/window.rb +66 -0
- data/docs/embedded.md +11 -0
- data/lib/railwatch/version.rb +1 -1
- data/public/railwatch/assets/app-layout-DDyQa72H.js +1 -0
- data/public/railwatch/assets/{app-wordmark-DDNuuq5_.js → app-wordmark-o9CODKP0.js} +1 -1
- data/public/railwatch/assets/{appearance-C3LMdsDy.js → appearance-BwuCXabr.js} +1 -1
- data/public/railwatch/assets/application-B7h1MIhi.css +1 -0
- data/public/railwatch/assets/{arrow-up-DYTCBENO.js → arrow-up-C6PxDiY3.js} +1 -1
- data/public/railwatch/assets/{auth-layout-CzPRawuI.js → auth-layout-BRt8MGFD.js} +1 -1
- data/public/railwatch/assets/{badge-s7YDycYg.js → badge-CAxXV8za.js} +1 -1
- data/public/railwatch/assets/{braces-BFrg-bvp.js → braces-DgomTCNf.js} +1 -1
- data/public/railwatch/assets/{card-DiW-JhK3.js → card-cAtqCxWl.js} +1 -1
- data/public/railwatch/assets/{chart-nsdZV0Dv.js → chart-BBeBkkNa.js} +1 -1
- data/public/railwatch/assets/{chart-hover-DMWx5-Rs.js → chart-hover-B1M9jc0y.js} +1 -1
- data/public/railwatch/assets/chart-panel-DUQTz_C8.js +1 -0
- data/public/railwatch/assets/{checkbox-C2AqEZXX.js → checkbox-CmhMHWZO.js} +1 -1
- data/public/railwatch/assets/{code-DVJtYP7h.js → code-DESvxyTj.js} +1 -1
- data/public/railwatch/assets/{copy-block-D1myf7is.js → copy-block-BkSU5832.js} +1 -1
- data/public/railwatch/assets/{copy-id-CyRCMfdH.js → copy-id-D03GhN9F.js} +1 -1
- data/public/railwatch/assets/{cursor-load-more-JfSVBn9C.js → cursor-load-more-CRyuMeQb.js} +1 -1
- data/public/railwatch/assets/{data-table-CwtPkw_i.js → data-table-BIlt7Rtm.js} +1 -1
- data/public/railwatch/assets/{edit-fB83T9Yh.js → edit-Bb6MKoe4.js} +1 -1
- data/public/railwatch/assets/{edit-BvTugIpj.js → edit-DJ0D0wHN.js} +1 -1
- data/public/railwatch/assets/{edit-DvpDUM-t.js → edit-O0NSBWxo.js} +1 -1
- data/public/railwatch/assets/{empty-state-CshhuRUU.js → empty-state-C38il627.js} +1 -1
- data/public/railwatch/assets/env-layout-REF7OM4q.js +1 -0
- data/public/railwatch/assets/{execution-path-CdEerUGH.js → execution-path-FYLq1TwC.js} +1 -1
- data/public/railwatch/assets/{filter-bar-BMHf8xBb.js → filter-bar-CYog9Alp.js} +1 -1
- data/public/railwatch/assets/{flamegraph-uYWk1Yov.js → flamegraph-DSs69foN.js} +1 -1
- data/public/railwatch/assets/{frames-B5ZECkvt.js → frames-BUi2J5Mk.js} +1 -1
- data/public/railwatch/assets/{google-sign-in-button-CAvsXYb4.js → google-sign-in-button-BQiIKFdd.js} +1 -1
- data/public/railwatch/assets/{index-X13K9BbO.js → index-8-hnAhOD.js} +1 -1
- data/public/railwatch/assets/{index-Czq2bi1U.js → index-BaR1U9An.js} +1 -1
- data/public/railwatch/assets/{index-iVNm3uzI.js → index-BeOh2t_S.js} +1 -1
- data/public/railwatch/assets/{index-vC9KU2bt.js → index-BiiyMcA0.js} +1 -1
- data/public/railwatch/assets/{index-B-qRsj0W.js → index-BoUBioBP.js} +1 -1
- data/public/railwatch/assets/{index-B4IRsZXK.js → index-C-PmdhXA.js} +1 -1
- data/public/railwatch/assets/{index-fA7h22qS.js → index-C3A_9imx.js} +1 -1
- data/public/railwatch/assets/{index-DcuyMiuG.js → index-C7OtLq_3.js} +1 -1
- data/public/railwatch/assets/{index-BMgA9NNc.js → index-CFFpnzIS.js} +1 -1
- data/public/railwatch/assets/{index-CAkCcAty.js → index-CFRLPs4J.js} +1 -1
- data/public/railwatch/assets/{index-DMcsT2ES.js → index-CGs4m_fa.js} +1 -1
- data/public/railwatch/assets/{index-DuGGTdIJ.js → index-CICUIFHL.js} +1 -1
- data/public/railwatch/assets/{index-DVUwgfqP.js → index-C_upSl_k.js} +1 -1
- data/public/railwatch/assets/{index-CaJvo0Oc.js → index-CiPo4Gob.js} +1 -1
- data/public/railwatch/assets/{index-BIom4V2g.js → index-CpkI015n.js} +1 -1
- data/public/railwatch/assets/{index-Zf9xXwq7.js → index-CrZ3vHDL.js} +1 -1
- data/public/railwatch/assets/{index-ClJtZh5Q.js → index-CsoN51vW.js} +1 -1
- data/public/railwatch/assets/{index-1-78ZewP.js → index-DDI_Zx5V.js} +1 -1
- data/public/railwatch/assets/index-DSvlZVWG.js +1 -0
- data/public/railwatch/assets/{index-C7bU7oUF.js → index-DW2CBbxU.js} +1 -1
- data/public/railwatch/assets/{index-DzoUj38Q.js → index-Dh4IRLFI.js} +1 -1
- data/public/railwatch/assets/{index-CdM3F3jz.js → index-DqTFTP8p.js} +1 -1
- data/public/railwatch/assets/index-DrcKVG2f.js +1 -0
- data/public/railwatch/assets/{index-BIZsdfdM.js → index-DtHmuB9Q.js} +1 -1
- data/public/railwatch/assets/{index-QxAKxnHK.js → index-DvjY3dPD.js} +1 -1
- data/public/railwatch/assets/{index-dKn1tKSX.js → index-FhUaPPab.js} +1 -1
- data/public/railwatch/assets/{index-DYrF-A96.js → index-JdCVBrw8.js} +1 -1
- data/public/railwatch/assets/{index-DWMKU6mG.js → index-QpTtwFwu.js} +1 -1
- data/public/railwatch/assets/{index-Bw_ByIps.js → index-ZOGOB8SA.js} +1 -1
- data/public/railwatch/assets/{index-D-O1LUPq.js → index-ZSZg9rtq.js} +1 -1
- data/public/railwatch/assets/{index-ClG89uia.js → index-r0tSIplE.js} +1 -1
- data/public/railwatch/assets/{index-DJIXGkfB.js → index-sTYvcbkh.js} +1 -1
- data/public/railwatch/assets/{index-n16aviHx.js → index-so4lRrRq.js} +1 -1
- data/public/railwatch/assets/{index-CRShH-fR.js → index-tpz-OGUP.js} +1 -1
- data/public/railwatch/assets/{index-BpnfuXi-.js → index-umIAl-pL.js} +1 -1
- data/public/railwatch/assets/{inertia-CUTKXjxg.js → inertia-DLew8ZNx.js} +2 -2
- data/public/railwatch/assets/{input-error-C8ycyeD0.js → input-error-cvM6_Jht.js} +1 -1
- data/public/railwatch/assets/{json-viewer-CJECqZ0l.js → json-viewer-D922McGi.js} +1 -1
- data/public/railwatch/assets/{klass-Br9dng39.js → klass-CrwICqN8.js} +1 -1
- data/public/railwatch/assets/{label-B32Ks8n7.js → label-GWl7I6sf.js} +1 -1
- data/public/railwatch/assets/{layout-5ZhRtywp.js → layout-0ZAnD3zl.js} +1 -1
- data/public/railwatch/assets/{live-dot-Bb1UYT9F.js → live-dot-D1n_BreY.js} +1 -1
- data/public/railwatch/assets/{nav-XUcwnBso.js → nav-DPxr1NNC.js} +1 -1
- data/public/railwatch/assets/{new-0xyEF6NL.js → new-Cdl6pqST.js} +1 -1
- data/public/railwatch/assets/{new-GIkDYLt8.js → new-D-ZzUK9a.js} +1 -1
- data/public/railwatch/assets/{new-CdvlEBjJ.js → new-DEVkYv-z.js} +1 -1
- data/public/railwatch/assets/{new-YBWOo9_V.js → new-DHAHDrN7.js} +1 -1
- data/public/railwatch/assets/{new-CV011uLi.js → new-Dz4lZf1L.js} +1 -1
- data/public/railwatch/assets/{new-D9-ORiNW.js → new-GMrRFurX.js} +1 -1
- data/public/railwatch/assets/{onboarding-BqEuP-Ml.js → onboarding-D1vwaHYT.js} +1 -1
- data/public/railwatch/assets/{origin-identity-DrJ4D2TX.js → origin-identity-Bk9yHWZ1.js} +1 -1
- data/public/railwatch/assets/{percentile-picker-_wllqYoJ.js → percentile-picker-DfSx9yJO.js} +1 -1
- data/public/railwatch/assets/{relative-time-CV7V8aSP.js → relative-time-CjIjb8Lg.js} +1 -1
- data/public/railwatch/assets/{release-health-DRNLZtT7.js → release-health-4b3tivEf.js} +1 -1
- data/public/railwatch/assets/{route-D9slUz_a.js → route-C_5BUtHK.js} +1 -1
- data/public/railwatch/assets/{segmented-Bj70Htrs.js → segmented-BgbT3wZa.js} +1 -1
- data/public/railwatch/assets/{select-DJBZX2ky.js → select-DmunxCKE.js} +1 -1
- data/public/railwatch/assets/{separator-UUo0bkyc.js → separator-BXzEdZ_8.js} +1 -1
- data/public/railwatch/assets/series-chart-Xf49v9cv.js +1 -0
- data/public/railwatch/assets/{show-BQtEcTeD.js → show-B2zLAW83.js} +1 -1
- data/public/railwatch/assets/{show-DR6u4CR7.js → show-BLpWUHWD.js} +1 -1
- data/public/railwatch/assets/{show-Pu3Iehw5.js → show-CAl7xcex.js} +1 -1
- data/public/railwatch/assets/{show-DoCg0ifP.js → show-DI8IhNUH.js} +1 -1
- data/public/railwatch/assets/{show-BT3tKCgP.js → show-DSP9Cq_C.js} +2 -2
- data/public/railwatch/assets/{show-C0uC3gnA.js → show-DXs4deaC.js} +1 -1
- data/public/railwatch/assets/{show-D7tP881O.js → show-DYskfl3-.js} +1 -1
- data/public/railwatch/assets/{show-BpyCRL-I.js → show-DcpTFiLi.js} +1 -1
- data/public/railwatch/assets/{show-yQipmite.js → show-Dily73Xk.js} +1 -1
- data/public/railwatch/assets/{show-COfP8yWt.js → show-DlRVS18-.js} +1 -1
- data/public/railwatch/assets/{show-ChDJZjoj.js → show-Dn-GwFZL.js} +1 -1
- data/public/railwatch/assets/{show-BoG7jcwk.js → show-DnR1Dnjd.js} +1 -1
- data/public/railwatch/assets/{show-DnBCvlnd.js → show-SHwZjXb7.js} +1 -1
- data/public/railwatch/assets/{show-CefJwag7.js → show-SvLOcPrx.js} +1 -1
- data/public/railwatch/assets/{show-D7IL22Hy.js → show-Y74rM0VT.js} +1 -1
- data/public/railwatch/assets/{show-TTCk2Met.js → show-mU38uGTg.js} +1 -1
- data/public/railwatch/assets/{show-GruxlCov.js → show-vQ4bndYD.js} +1 -1
- data/public/railwatch/assets/{sort-header-CqQQhaxg.js → sort-header-Dcq9bzmo.js} +1 -1
- data/public/railwatch/assets/{sparkline-cell-BwdBz0yv.js → sparkline-cell-BON3qQUB.js} +1 -1
- data/public/railwatch/assets/{stat-IghK3WjD.js → stat-DFEyFxkO.js} +1 -1
- data/public/railwatch/assets/{status-badge-XYUN9gUA.js → status-badge-BaUKP7Yo.js} +1 -1
- data/public/railwatch/assets/{tenant-path-SxnZbfU1.js → tenant-path-DPZPc985.js} +1 -1
- data/public/railwatch/assets/{text-link-NCL9N5D5.js → text-link-BO77t9Xk.js} +1 -1
- data/public/railwatch/assets/{textarea-DhI1dmQa.js → textarea-DTqrCiV0.js} +1 -1
- data/public/railwatch/assets/{timeline-CLAwsAlo.js → timeline-D5rJ0es2.js} +1 -1
- data/public/railwatch/assets/{transition-DpTb9Yiv.js → transition-DMIrZVth.js} +1 -1
- data/public/railwatch/assets/{use-clipboard-D5i6e5kf.js → use-clipboard-ByoUGQqA.js} +1 -1
- data/public/railwatch/assets/{use-live-V-slSdFJ.js → use-live-D7xKz2ma.js} +1 -1
- data/public/railwatch/manifest.json +1288 -1288
- metadata +117 -116
- data/public/railwatch/assets/app-layout-DUk54qUM.js +0 -1
- data/public/railwatch/assets/application-CwshqwM6.css +0 -1
- data/public/railwatch/assets/chart-panel-BlirnMrQ.js +0 -1
- data/public/railwatch/assets/env-layout-Dkp_4NvM.js +0 -1
- data/public/railwatch/assets/index-CZWzIE8F.js +0 -1
- data/public/railwatch/assets/index-DpWQMikK.js +0 -1
- data/public/railwatch/assets/series-chart-C1YrNlID.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as Xt,c as is,r as Q,S as ys,i as mt,j as s,L as Mt,I as Zt,U as vs,e as Qt,V as bs,H as Ns,F as ks,J as ws}from"./inertia-
|
|
1
|
+
import{B as Xt,c as is,r as Q,S as ys,i as mt,j as s,L as Mt,I as Zt,U as vs,e as Qt,V as bs,H as Ns,F as ks,J as ws}from"./inertia-DLew8ZNx.js";import{D as nt}from"./data-table-BIlt7Rtm.js";import{S as Ss,E as Cs,B as $s,a as Ls,C as Is}from"./frames-BUi2J5Mk.js";import{J as rs}from"./json-viewer-D922McGi.js";import{R as ls}from"./relative-time-CjIjb8Lg.js";import{S as dt,a as Ts}from"./stat-DFEyFxkO.js";import{I as as}from"./status-badge-BaUKP7Yo.js";import{f as As,g as Ms,h as Rs,i as zs,A as Ds,j as Fs,k as Bs,l as Es,m as Ps,n as Os}from"./app-layout-DDyQa72H.js";import{B as ut}from"./badge-CAxXV8za.js";import{B as O}from"./app-wordmark-o9CODKP0.js";import{C as c,b as d,c as m,a as o}from"./card-cAtqCxWl.js";import{C as cs,X as os,Y as ds,a as ms,b as us,B as fs,c as hs,d as xs,R as Ks}from"./chart-BBeBkkNa.js";import{S as es,a as ts,b as ss,c as ns,d as Yt}from"./select-DmunxCKE.js";import{T as Vs}from"./textarea-DTqrCiV0.js";import{u as Gs}from"./use-clipboard-ByoUGQqA.js";import{e as Wt}from"./execution-path-FYLq1TwC.js";import{c as Rt,a as At,w as rt,b as Us}from"./format-B9SDkrWj.js";import{C as Hs}from"./index-umIAl-pL.js";import"./chart-hover-B1M9jc0y.js";import"./empty-state-C38il627.js";import"./source-link-B2183i2-.js";import"./live-dot-D1n_BreY.js";import"./index-so4lRrRq.js";import"./use-live-D7xKz2ma.js";import"./arrow-up-C6PxDiY3.js";import"./checkbox-CmhMHWZO.js";import"./label-GWl7I6sf.js";const qs=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Js=Xt("git-merge",qs);const Qs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ws=Xt("globe",Qs);const Xs=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Ys=Xt("split",Xs),Zs={count:{label:"Occurrences",color:"var(--chart-5)"}},en={value:{label:"Measured value",color:"var(--chart-2)"}},tn={report:"Fingerprint passed to Railwatch.report.",error:"Fingerprint from the error's own #railwatch_fingerprint.",resolver:"Fingerprint from the app's Railwatch.fingerprint block.",default:"Railwatch's default: exception class, top in-app frame, and the message with its variable data removed."};function sn(t,e){return e?e.kind==="query"?e.group_hash?ws(t.application.id,t.environment.id,e.group_hash):null:Wt({applicationId:t.application.id,environmentId:t.environment.id,source:e.kind,executionId:e.execution_id}):null}function nn(t,e){const n=t.data;switch(t.kind){case"created":return"opened this issue";case"status":return`changed status ${n.from} → ${n.to}`;case"priority":return`changed priority ${n.from} → ${n.to}`;case"assignee":{const i=n.from_id?e.get(Number(n.from_id))??"someone":"unassigned",l=n.to_id?e.get(Number(n.to_id))??"someone":"unassigned";return`reassigned ${i} → ${l}`}case"merge":return`merged this issue into ${n.target_key}`;case"absorbed":return`merged ${n.source_key} into this issue (${n.occurrences} events)`;case"unmerge":return"unmerged this issue";case"split":{const i=Array.isArray(t.data.into)?t.data.into:[];return n.from_key?`split ${n.occurrences} events out of ${n.from_key}`:`split ${n.occurrences} events by message into ${i.join(", ")}`}case"regressed":return"regressed — a new occurrence reopened this issue";case"alert":return`sent a "${n.event}" alert via ${n.integration}`;case"agent":return`acted via ${String(n.agent??"an AI agent")} (MCP)`;case"comment":return"commented";default:return String(t.kind)}}function rn(t){const e=t.issue,n=[];if(n.push(`# ${e.key}: ${e.title}`),e.culprit&&n.push(`Culprit: ${e.culprit}`),n.push(`Environment: ${e.application.name} / ${e.environment.name}`),t.detection?.available&&(n.push(""),n.push("## Detector measurement"),n.push(`${t.detection.metric} for ${t.detection.target}: ${it(t.detection.measurement?.value,t.detection.unit)}`),t.detection.measurement?.limit!=null&&n.push(`Limit: ${it(t.detection.measurement.limit,t.detection.unit)}`),t.detection.baseline?.mean!=null&&n.push(`Baseline: ${it(t.detection.baseline.mean,t.detection.unit)} (${t.detection.baseline.sigmas}σ)`),n.push(`Underlying telemetry: ${t.detection.telemetry_type} ${t.detection.telemetry_group_hash}`)),t.latest){n.push(""),n.push(`## ${t.latest.class_name}`),n.push(t.latest.message);const i=t.latest.frames.filter(l=>l.in_app);if(i.length>0){n.push(""),n.push("### Frames");for(const l of i)if(n.push(`${l.file}:${l.line} in \`${l.function}\``),l.code)for(const[B,T]of Object.entries(l.code))n.push(`${B}: ${T}`)}t.latest.context&&(n.push(""),n.push("### Context"),n.push(String(t.latest.context)))}return n.join(`
|
|
2
2
|
`)}function it(t,e){return t==null?"–":e==="milliseconds"?`${t.toLocaleString()} ms`:e==="percent"?`${t.toLocaleString()}%`:e==="events_per_minute"?`${t.toLocaleString()} / min`:t.toLocaleString()}function ln(t){const e=is.c(80),{issue:n,detail:i}=t;if(!i.available){let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(d,{children:s.jsx(m,{children:"Detector sample"})}),e[0]=y):y=e[0];let u;return e[1]!==n.sample?(u=s.jsxs(c,{children:[y,s.jsx(o,{children:s.jsx(rs,{data:n.sample})})]}),e[1]=n.sample,e[2]=u):u=e[2],u}let l;e[3]!==i.representative_records?(l=i.representative_records??[],e[3]=i.representative_records,e[4]=l):l=e[4];const B=l;let T;e[5]!==i.deploy_comparison?(T=i.deploy_comparison??[],e[5]=i.deploy_comparison,e[6]=T):T=e[6];const q=T;let v;e[7]!==i.trend?(v=i.trend??[],e[7]=i.trend,e[8]=v):v=e[8];const K=v,a=i.metric==="missed",W=a?"Missed scheduled task":i.kind==="anomaly"?"Anomaly measurement":"Threshold breach";let b;e[9]!==W?(b=s.jsx(d,{children:s.jsx(m,{children:W})}),e[9]=W,e[10]=b):b=e[10];let E;e[11]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("p",{className:"text-muted-foreground text-xs",children:"Target"}),e[11]=E):E=e[11];let A;e[12]!==i.target?(A=s.jsxs("div",{children:[E,s.jsx("p",{className:"font-mono text-sm",children:i.target})]}),e[12]=i.target,e[13]=A):A=e[13];const lt=a?"Schedule":"Metric";let P;e[14]!==lt?(P=s.jsx("p",{className:"text-muted-foreground text-xs",children:lt}),e[14]=lt,e[15]=P):P=e[15];const at=a?i.rule?.schedule:i.metric;let M;e[16]!==at?(M=s.jsx("p",{className:"text-sm",children:at}),e[16]=at,e[17]=M):M=e[17];let V;e[18]!==M||e[19]!==P?(V=s.jsxs("div",{children:[P,M]}),e[18]=M,e[19]=P,e[20]=V):V=e[20];const ct=a?"Expected":"Measured";let N;e[21]!==ct?(N=s.jsx("p",{className:"text-muted-foreground text-xs",children:ct}),e[21]=ct,e[22]=N):N=e[22];let R;e[23]!==i.measurement?.value||e[24]!==i.rule||e[25]!==i.unit||e[26]!==a?(R=a&&i.rule?.expected?rt(i.rule.expected):it(i.measurement?.value,i.unit),e[23]=i.measurement?.value,e[24]=i.rule,e[25]=i.unit,e[26]=a,e[27]=R):R=e[27];let k;e[28]!==R?(k=s.jsx("p",{className:"text-sm font-semibold",children:R}),e[28]=R,e[29]=k):k=e[29];let w;e[30]!==N||e[31]!==k?(w=s.jsxs("div",{children:[N,k]}),e[30]=N,e[31]=k,e[32]=w):w=e[32];const G=a?"Last run":i.kind==="anomaly"?"Baseline":"Limit";let S;e[33]!==G?(S=s.jsx("p",{className:"text-muted-foreground text-xs",children:G}),e[33]=G,e[34]=S):S=e[34];let z;e[35]!==i.baseline?.mean||e[36]!==i.kind||e[37]!==i.measurement?.limit||e[38]!==i.rule||e[39]!==i.unit||e[40]!==a?(z=a&&i.rule?.last_run?rt(i.rule.last_run):i.kind==="anomaly"?it(i.baseline?.mean,i.unit):it(i.measurement?.limit,i.unit),e[35]=i.baseline?.mean,e[36]=i.kind,e[37]=i.measurement?.limit,e[38]=i.rule,e[39]=i.unit,e[40]=a,e[41]=z):z=e[41];let C;e[42]!==z?(C=s.jsx("p",{className:"text-sm",children:z}),e[42]=z,e[43]=C):C=e[43];let U;e[44]!==S||e[45]!==C?(U=s.jsxs("div",{children:[S,C]}),e[44]=S,e[45]=C,e[46]=U):U=e[46];let f;e[47]!==V||e[48]!==w||e[49]!==U||e[50]!==A?(f=s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[A,V,w,U]}),e[47]=V,e[48]=w,e[49]=U,e[50]=A,e[51]=f):f=e[51];const D=i.window?.minutes,J=i.baseline?.sigmas!=null&&` · ${i.baseline.sigmas}σ above a ${i.baseline.days}-day baseline`;let h;e[52]!==i.telemetry_group_hash||e[53]!==i.telemetry_type||e[54]!==D||e[55]!==J?(h=s.jsxs("p",{className:"text-muted-foreground text-xs",children:[i.telemetry_type," group ",i.telemetry_group_hash," ·"," ",D," minute window",J]}),e[52]=i.telemetry_group_hash,e[53]=i.telemetry_type,e[54]=D,e[55]=J,e[56]=h):h=e[56];let H;e[57]!==f||e[58]!==h?(H=s.jsxs(o,{className:"space-y-4",children:[f,h]}),e[57]=f,e[58]=h,e[59]=H):H=e[59];let x;e[60]!==H||e[61]!==b?(x=s.jsxs(c,{children:[b,H]}),e[60]=H,e[61]=b,e[62]=x):x=e[62];let p;e[63]!==i.metric||e[64]!==K?(p=K.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsxs(m,{children:[i.metric," trend (30d)"]})}),s.jsx(o,{children:s.jsx(hs,{config:en,className:"h-48 w-full",children:s.jsxs(xs,{data:K,children:[s.jsx(cs,{vertical:!1}),s.jsx(os,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:gn}),s.jsx(ds,{width:45,tickLine:!1,axisLine:!1}),s.jsx(ms,{content:s.jsx(us,{})}),s.jsx(fs,{dataKey:"value",fill:"var(--color-value)",radius:2})]})})})]}),e[63]=i.metric,e[64]=K,e[65]=p):p=e[65];let $;e[66]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(d,{children:s.jsx(m,{children:"Representative telemetry"})}),e[66]=$):$=e[66];let g;e[67]!==n?(g=y=>{const u=sn(n,y.drilldown);u&&Qt.visit(u)},e[67]=n,e[68]=g):g=e[68];let L;e[69]===Symbol.for("react.memo_cache_sentinel")?(L=[{key:"when",header:"When",cell:xn},{key:"record",header:"Record",className:"max-w-0",cell:hn},{key:"duration",header:"Duration",align:"right",cell:fn},{key:"deploy",header:"Deploy",cell:un}],e[69]=L):L=e[69];let j;e[70]!==B||e[71]!==g?(j=s.jsxs(c,{children:[$,s.jsx(o,{children:s.jsx(nt,{rows:B,rowKey:pn,empty:"Representative raw telemetry has been pruned.",onRowClick:g,columns:L})})]}),e[70]=B,e[71]=g,e[72]=j):j=e[72];let _;e[73]!==q?(_=q.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Deploy comparison (30d)"})}),s.jsx(o,{children:s.jsx(nt,{rows:q,rowKey:mn,columns:[{key:"deploy",header:"Deploy",cell:dn},{key:"events",header:"Events",align:"right",cell:on},{key:"avg",header:"Avg",align:"right",cell:cn},{key:"max",header:"Max",align:"right",cell:an}]})})]}),e[73]=q,e[74]=_):_=e[74];let I;return e[75]!==x||e[76]!==p||e[77]!==j||e[78]!==_?(I=s.jsxs(s.Fragment,{children:[x,p,j,_]}),e[75]=x,e[76]=p,e[77]=j,e[78]=_,e[79]=I):I=e[79],I}function an(t){return`${t.max_ms} ms`}function cn(t){return`${t.avg_ms} ms`}function on(t){return Rt(t.events)}function dn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy.slice(0,12)})}function mn(t){return t.deploy}function un(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function fn(t){return`${t.duration_ms.toLocaleString()} ms`}function hn(t){return s.jsx("span",{className:"block truncate font-mono text-xs",children:t.name})}function xn(t){return s.jsx("span",{className:"text-xs",children:rt(t.occurred_at)})}function pn(t){return`${t.record_type}-${t.record_id}`}function gn(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function vi(t){const e=is.c(255),n=t.issue;let i;e[0]!==n.id?(i=(r,F)=>{const ot=F===void 0?{}:F;return Qt.patch(mt(n.id),{action_name:r,...ot},{preserveScroll:!0})},e[0]=n.id,e[1]=i):i=e[1];const l=i,[,B]=Gs(),[T,q]=Q.useState(!1),[v,K]=Q.useState(!1),[a,W]=Q.useState("");let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[2]=b):b=e[2];const[E,A]=Q.useState(b),[lt,P]=Q.useState(!1),[at,M]=Q.useState(!1),V=new Map(t.members.map(qn)),ct=Fs();let N;e[3]!==n.application.id||e[4]!==n.environment.id?(N=r=>Wt({applicationId:n.application.id,environmentId:n.environment.id,source:r.execution_source,executionId:r.execution_id}),e[3]=n.application.id,e[4]=n.environment.id,e[5]=N):N=e[5];const R=N;let k;e[6]!==n.application.id||e[7]!==n.environment.id||e[8]!==t.latest?(k=t.latest?Wt({applicationId:n.application.id,environmentId:n.environment.id,source:t.latest.execution_source,executionId:t.latest.execution_id}):null,e[6]=n.application.id,e[7]=n.environment.id,e[8]=t.latest,e[9]=k):k=e[9];const w=k;let G,S;e[10]!==n.id||e[11]!==v||e[12]!==a?(G=()=>{if(!v)return;const r=new AbortController,F=window.setTimeout(()=>{P(!0),M(!1),fetch(bs(n.id,{q:a}),{headers:{Accept:"application/json"},credentials:"same-origin",signal:r.signal}).then(Hn).then(ot=>{const{issues:Tt}=ot;return A(Tt)}).catch(()=>{r.signal.aborted||(A([]),M(!0))}).finally(()=>{r.signal.aborted||P(!1)})},150);return()=>{window.clearTimeout(F),r.abort()}},S=[n.id,v,a],e[10]=n.id,e[11]=v,e[12]=a,e[13]=G,e[14]=S):(G=e[13],S=e[14]),Q.useEffect(G,S);const z=Ds;let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C={title:"Issues",href:ys()},e[15]=C):C=e[15];const U=n.key;let f;e[16]!==n.id?(f=mt(n.id),e[16]=n.id,e[17]=f):f=e[17];let D;e[18]!==n.key||e[19]!==f?(D=[C,{title:U,href:f}],e[18]=n.key,e[19]=f,e[20]=D):D=e[20];const J=`${n.key} ${n.title}`;let h;e[21]!==J?(h=s.jsx(Ns,{title:J}),e[21]=J,e[22]=h):h=e[22];const H="flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6";let x;e[23]!==n.key?(x=s.jsx("span",{className:"font-mono text-sm font-semibold",children:n.key}),e[23]=n.key,e[24]=x):x=e[24];let p;e[25]!==n.status?(p=s.jsx(as,{status:n.status}),e[25]=n.status,e[26]=p):p=e[26];let $;e[27]!==n.kind?($=s.jsx(ut,{variant:"outline",children:n.kind}),e[27]=n.kind,e[28]=$):$=e[28];let g;e[29]!==n.source?(g=n.source==="browser"&&s.jsxs(ut,{variant:"outline",className:"gap-1",children:[s.jsx(Ws,{className:"size-3"}),"browser"]}),e[29]=n.source,e[30]=g):g=e[30];let L;e[31]!==n.application.name||e[32]!==n.environment.name?(L=s.jsxs("span",{className:"text-muted-foreground text-xs",children:[n.application.name," · ",n.environment.name]}),e[31]=n.application.name,e[32]=n.environment.name,e[33]=L):L=e[33];let j;e[34]!==x||e[35]!==p||e[36]!==$||e[37]!==g||e[38]!==L?(j=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x,p,$,g,L]}),e[34]=x,e[35]=p,e[36]=$,e[37]=g,e[38]=L,e[39]=j):j=e[39];let _;e[40]!==n.title?(_=s.jsx("h1",{className:"mt-1 text-lg font-semibold break-words",children:n.title}),e[40]=n.title,e[41]=_):_=e[41];let I;e[42]!==n.culprit||e[43]!==n.sample?(I=n.culprit&&s.jsx("div",{className:"text-muted-foreground",children:s.jsx(Ss,{location:n.culprit,deploy:n.sample.deploy})}),e[42]=n.culprit,e[43]=n.sample,e[44]=I):I=e[44];let y;e[45]!==j||e[46]!==_||e[47]!==I?(y=s.jsxs("div",{className:"min-w-0",children:[j,_,I]}),e[45]=j,e[46]=_,e[47]=I,e[48]=y):y=e[48];let u;e[49]!==l?(u=r=>l("priority",{priority:r}),e[49]=l,e[50]=u):u=e[50];let ft;e[51]===Symbol.for("react.memo_cache_sentinel")?(ft=s.jsx(ts,{className:"w-28",children:s.jsx(ss,{})}),e[51]=ft):ft=e[51];let ht;e[52]===Symbol.for("react.memo_cache_sentinel")?(ht=s.jsx(ns,{children:["low","normal","high","urgent"].map(Un)}),e[52]=ht):ht=e[52];let X;e[53]!==n.priority||e[54]!==u?(X=s.jsxs(es,{value:n.priority,onValueChange:u,children:[ft,ht]}),e[53]=n.priority,e[54]=u,e[55]=X):X=e[55];const zt=n.assignee?String(n.assignee.id):"none";let Y;e[56]!==l?(Y=r=>l("assign",{assignee_id:r==="none"?null:r}),e[56]=l,e[57]=Y):Y=e[57];let xt;e[58]===Symbol.for("react.memo_cache_sentinel")?(xt=s.jsx(ts,{className:"w-40",children:s.jsx(ss,{placeholder:"Assign"})}),e[58]=xt):xt=e[58];let pt;e[59]===Symbol.for("react.memo_cache_sentinel")?(pt=s.jsx(Yt,{value:"none",children:"Unassigned"}),e[59]=pt):pt=e[59];let Z;e[60]!==t.members?(Z=t.members.map(Gn),e[60]=t.members,e[61]=Z):Z=e[61];let ee;e[62]!==Z?(ee=s.jsxs(ns,{children:[pt,Z]}),e[62]=Z,e[63]=ee):ee=e[63];let te;e[64]!==zt||e[65]!==Y||e[66]!==ee?(te=s.jsxs(es,{value:zt,onValueChange:Y,children:[xt,ee]}),e[64]=zt,e[65]=Y,e[66]=ee,e[67]=te):te=e[67];let se;e[68]!==l||e[69]!==n.status?(se=n.status==="merged"?s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"}):n.status==="open"?s.jsxs(s.Fragment,{children:[s.jsx(O,{size:"sm",onClick:()=>l("resolve"),children:"Resolve"}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("ignore"),children:"Ignore"})]}):s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("reopen"),children:"Reopen"}),e[68]=l,e[69]=n.status,e[70]=se):se=e[70];let ne;e[71]!==n.status?(ne=n.status!=="merged"&&s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>K(!0),children:[s.jsx(Js,{"data-icon":"inline-start"}),"Merge into…"]}),e[71]=n.status,e[72]=ne):ne=e[72];let ie;e[73]!==B||e[74]!==t?(ie=()=>{(async()=>await B(rn(t))&&(q(!0),setTimeout(()=>q(!1),1200)))()},e[73]=B,e[74]=t,e[75]=ie):ie=e[75];let re;e[76]!==T?(re=T?s.jsx(Hs,{className:"size-3.5"}):s.jsx(Is,{className:"size-3.5"}),e[76]=T,e[77]=re):re=e[77];let le;e[78]!==ie||e[79]!==re?(le=s.jsxs(O,{size:"sm",variant:"outline",onClick:ie,children:[re,"Copy for AI"]}),e[78]=ie,e[79]=re,e[80]=le):le=e[80];let ae;e[81]!==X||e[82]!==te||e[83]!==se||e[84]!==ne||e[85]!==le?(ae=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[X,te,se,ne,le]}),e[81]=X,e[82]=te,e[83]=se,e[84]=ne,e[85]=le,e[86]=ae):ae=e[86];let ce;e[87]!==y||e[88]!==ae?(ce=s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[y,ae]}),e[87]=y,e[88]=ae,e[89]=ce):ce=e[89];let oe;e[90]!==l||e[91]!==t.merged_into?(oe=t.merged_into&&s.jsxs("div",{className:"bg-muted flex flex-wrap items-center justify-between gap-2 rounded-md border px-4 py-3 text-sm",children:[s.jsxs("span",{children:["Merged into"," ",s.jsx(Mt,{href:mt(t.merged_into.id),className:"font-mono font-semibold underline",children:t.merged_into.key})," ",s.jsx("span",{className:"text-muted-foreground",children:t.merged_into.title})]}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"})]}),e[90]=l,e[91]=t.merged_into,e[92]=oe):oe=e[92];let gt;e[93]===Symbol.for("react.memo_cache_sentinel")?(gt=r=>{K(r),r||(W(""),A([]),M(!1))},e[93]=gt):gt=e[93];let de;e[94]!==a?(de=s.jsx(Bs,{placeholder:"Search issues by key or title…",value:a,onValueChange:W}),e[94]=a,e[95]=de):de=e[95];const Dt=lt?"Searching…":at?"Search failed. Try again.":"No open issues found.";let me;e[96]!==Dt?(me=s.jsx(Es,{children:Dt}),e[96]=Dt,e[97]=me):me=e[97];let ue;e[98]!==l||e[99]!==E?(ue=E.length>0&&s.jsx(As,{children:E.map(r=>s.jsxs(Ms,{value:`${r.key} ${r.title}`,onSelect:()=>{l("merge",{target_id:r.id}),K(!1)},children:[s.jsx("span",{className:"font-mono font-semibold",children:r.key}),s.jsx("span",{className:"text-muted-foreground truncate",children:r.title})]},r.id))}),e[98]=l,e[99]=E,e[100]=ue):ue=e[100];let fe;e[101]!==me||e[102]!==ue?(fe=s.jsxs(Ps,{children:[me,ue]}),e[101]=me,e[102]=ue,e[103]=fe):fe=e[103];let he;e[104]!==v||e[105]!==de||e[106]!==fe?(he=s.jsxs(Os,{open:v,onOpenChange:gt,title:"Merge into…",description:"Search issues to merge this one into",children:[de,fe]}),e[104]=v,e[105]=de,e[106]=fe,e[107]=he):he=e[107];const Ft=t.detection?.count_label??"Events",Bt=t.detection?.breached_windows??n.occurrences;let xe;e[108]!==Bt?(xe=Rt(Bt),e[108]=Bt,e[109]=xe):xe=e[109];let pe;e[110]!==Ft||e[111]!==xe?(pe=s.jsx(dt,{label:Ft,value:xe}),e[110]=Ft,e[111]=xe,e[112]=pe):pe=e[112];const Et=t.detection?"Events in measured window":"Users affected";let ge;e[113]!==n.affected_users||e[114]!==t.detection?(ge=t.detection?t.detection.event_count==null?"–":Rt(t.detection.event_count):n.affected_users,e[113]=n.affected_users,e[114]=t.detection,e[115]=ge):ge=e[115];let je;e[116]!==Et||e[117]!==ge?(je=s.jsx(dt,{label:Et,value:ge}),e[116]=Et,e[117]=ge,e[118]=je):je=e[118];let _e;e[119]!==n.first_seen_at?(_e=At(n.first_seen_at),e[119]=n.first_seen_at,e[120]=_e):_e=e[120];let ye;e[121]!==n.first_seen_at?(ye=rt(n.first_seen_at),e[121]=n.first_seen_at,e[122]=ye):ye=e[122];let ve;e[123]!==_e||e[124]!==ye?(ve=s.jsx(dt,{label:"First seen",value:_e,hint:ye}),e[123]=_e,e[124]=ye,e[125]=ve):ve=e[125];let be;e[126]!==n.last_seen_at?(be=At(n.last_seen_at),e[126]=n.last_seen_at,e[127]=be):be=e[127];let Ne;e[128]!==n.last_seen_at?(Ne=rt(n.last_seen_at),e[128]=n.last_seen_at,e[129]=Ne):Ne=e[129];let ke;e[130]!==be||e[131]!==Ne?(ke=s.jsx(dt,{label:"Last seen",value:be,hint:Ne}),e[130]=be,e[131]=Ne,e[132]=ke):ke=e[132];const Pt=n.regressed_at?"Regressed":"Resolved";let we;e[133]!==n.regressed_at||e[134]!==n.resolved_at?(we=n.regressed_at?At(n.regressed_at):n.resolved_at?At(n.resolved_at):"–",e[133]=n.regressed_at,e[134]=n.resolved_at,e[135]=we):we=e[135];let Se;e[136]!==n.resolved_in_deploy?(Se=n.resolved_in_deploy?`in ${n.resolved_in_deploy.slice(0,12)}`:void 0,e[136]=n.resolved_in_deploy,e[137]=Se):Se=e[137];const Ot=n.regressed_at?"destructive":void 0;let Ce;e[138]!==Pt||e[139]!==we||e[140]!==Se||e[141]!==Ot?(Ce=s.jsx(dt,{label:Pt,value:we,hint:Se,tone:Ot}),e[138]=Pt,e[139]=we,e[140]=Se,e[141]=Ot,e[142]=Ce):Ce=e[142];let $e;e[143]!==pe||e[144]!==je||e[145]!==ve||e[146]!==ke||e[147]!==Ce?($e=s.jsxs(Ts,{children:[pe,je,ve,ke,Ce]}),e[143]=pe,e[144]=je,e[145]=ve,e[146]=ke,e[147]=Ce,e[148]=$e):$e=e[148];const ps="grid gap-6 lg:grid-cols-3";let Le;e[149]!==n||e[150]!==w||e[151]!==t.breadcrumbs||e[152]!==t.browser_breadcrumbs||e[153]!==t.detection||e[154]!==t.latest?(Le=t.detection?s.jsx(ln,{issue:n,detail:t.detection}):t.latest?s.jsxs(c,{children:[s.jsxs(d,{className:"flex-row items-center justify-between",children:[s.jsx(m,{children:"Latest occurrence"}),w&&s.jsxs(Mt,{className:"text-xs underline",href:w,children:["Open ",t.latest.execution_preview]})]}),s.jsxs(o,{children:[s.jsx(Cs,{exception:t.latest,deploy:t.latest.deploy}),s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsx($s,{entries:t.breadcrumbs}),s.jsx(Ls,{crumbs:t.browser_breadcrumbs})]}),(t.latest.ruby_version??t.latest.rails_version)&&s.jsxs("p",{className:"text-muted-foreground mt-3 text-xs",children:["Ruby ",t.latest.ruby_version," · Rails"," ",t.latest.rails_version]})]})]}):s.jsx(c,{children:s.jsx(o,{children:s.jsx(rs,{data:n.sample})})}),e[149]=n,e[150]=w,e[151]=t.breadcrumbs,e[152]=t.browser_breadcrumbs,e[153]=t.detection,e[154]=t.latest,e[155]=Le):Le=e[155];const Kt=t.detection?"hidden":void 0;let jt;e[156]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(d,{children:s.jsx(m,{children:"Occurrences (30d)"})}),e[156]=jt):jt=e[156];let Ie;e[157]!==R?(Ie=r=>{const F=R(r);F&&Qt.visit(F)},e[157]=R,e[158]=Ie):Ie=e[158];let _t;e[159]===Symbol.for("react.memo_cache_sentinel")?(_t=[{key:"when",header:"When",cell:Kn},{key:"in",header:"In",cell:On},{key:"u",header:"User",cell:Pn},{key:"t",header:"Tenant",cell:En},{key:"d",header:"Deploy",cell:Bn},{key:"h",header:"",cell:Fn}],e[159]=_t):_t=e[159];let Te;e[160]!==t.occurrences||e[161]!==Ie?(Te=s.jsx(o,{children:s.jsx(nt,{rows:t.occurrences,rowKey:Vn,empty:"Raw occurrences have been pruned.",onRowClick:Ie,columns:_t})}),e[160]=t.occurrences,e[161]=Ie,e[162]=Te):Te=e[162];let Ae;e[163]!==Kt||e[164]!==Te?(Ae=s.jsxs(c,{className:Kt,children:[jt,Te]}),e[163]=Kt,e[164]=Te,e[165]=Ae):Ae=e[165];let Me;e[166]!==n.application.id||e[167]!==n.environment.id||e[168]!==t.attachments?(Me=t.attachments.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Attachments"})}),s.jsx(o,{children:s.jsx(nt,{rows:t.attachments,rowKey:Dn,columns:[{key:"name",header:"Name",className:"max-w-0",cell:zn},{key:"in",header:"In",cell:Rn},{key:"size",header:"Size",align:"right",cell:Mn},{key:"links",header:"",align:"right",cell:r=>s.jsxs("span",{className:"flex justify-end gap-3",children:[r.viewable&&s.jsx("a",{className:"text-primary hover:underline",href:Zt(n.application.id,n.environment.id,r.id,{view:1}),children:"View"}),s.jsx("a",{className:"text-primary hover:underline",href:Zt(n.application.id,n.environment.id,r.id),children:"Download"})]})}]})})]}),e[166]=n.application.id,e[167]=n.environment.id,e[168]=t.attachments,e[169]=Me):Me=e[169];let Re;e[170]!==Le||e[171]!==Ae||e[172]!==Me?(Re=s.jsxs("div",{className:"space-y-6 lg:col-span-2",children:[Le,Ae,Me]}),e[170]=Le,e[171]=Ae,e[172]=Me,e[173]=Re):Re=e[173];const gs="space-y-6",Vt=t.detection?"hidden":void 0;let yt;e[174]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(d,{children:s.jsx(m,{children:"Daily (30d)"})}),e[174]=yt):yt=e[174];const js=t.daily;let vt,bt,Nt;e[175]===Symbol.for("react.memo_cache_sentinel")?(vt=s.jsx(cs,{vertical:!1}),bt=s.jsx(os,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:An}),Nt=s.jsx(ds,{width:28,tickLine:!1,axisLine:!1,allowDecimals:!1}),e[175]=vt,e[176]=bt,e[177]=Nt):(vt=e[175],bt=e[176],Nt=e[177]);let kt,wt;e[178]===Symbol.for("react.memo_cache_sentinel")?(kt=s.jsx(ms,{content:s.jsx(us,{labelFormatter:Tn})}),wt=s.jsx(fs,{dataKey:"count",fill:"var(--color-count)",radius:2}),e[178]=kt,e[179]=wt):(kt=e[178],wt=e[179]);let ze;e[180]!==t.deploys?(ze=t.deploys.map(In),e[180]=t.deploys,e[181]=ze):ze=e[181];let De;e[182]!==t.daily||e[183]!==ze?(De=s.jsx(o,{children:s.jsx(hs,{config:Zs,className:"h-40 w-full",children:s.jsxs(xs,{data:js,children:[vt,bt,Nt,kt,wt,ze]})})}),e[182]=t.daily,e[183]=ze,e[184]=De):De=e[184];let Fe;e[185]!==Vt||e[186]!==De?(Fe=s.jsxs(c,{className:Vt,children:[yt,De]}),e[185]=Vt,e[186]=De,e[187]=Fe):Fe=e[187];const Gt=t.detection?"hidden":void 0;let St;e[188]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(d,{children:s.jsx(m,{children:"Grouping"})}),e[188]=St):St=e[188];let Be;e[189]!==t.fingerprint?(Be=t.fingerprint.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:t.fingerprint.map(Ln)}),e[189]=t.fingerprint,e[190]=Be):Be=e[190];const Ut=tn[t.fingerprint_source??"default"]??`Fingerprint from ${t.fingerprint_source}.`;let Ee;e[191]!==Ut?(Ee=s.jsx("p",{className:"text-muted-foreground text-xs",children:Ut}),e[191]=Ut,e[192]=Ee):Ee=e[192];let Pe;e[193]!==l||e[194]!==t.distinct_messages||e[195]!==t.top_messages?(Pe=t.distinct_messages>1&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-1",children:t.top_messages.map($n)}),s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>l("split",{by:"message"}),children:[s.jsx(Ys,{className:"size-3.5"}),"Split into ",t.distinct_messages," issues"]})]}),e[193]=l,e[194]=t.distinct_messages,e[195]=t.top_messages,e[196]=Pe):Pe=e[196];let Oe;e[197]!==Be||e[198]!==Ee||e[199]!==Pe?(Oe=s.jsxs(o,{className:"space-y-3",children:[Be,Ee,Pe]}),e[197]=Be,e[198]=Ee,e[199]=Pe,e[200]=Oe):Oe=e[200];let Ke;e[201]!==Gt||e[202]!==Oe?(Ke=s.jsxs(c,{className:Gt,children:[St,Oe]}),e[201]=Gt,e[202]=Oe,e[203]=Ke):Ke=e[203];let Ve;e[204]!==t.related_issues?(Ve=t.related_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Related issues"})}),s.jsx(o,{className:"space-y-2",children:t.related_issues.map(Cn)})]}),e[204]=t.related_issues,e[205]=Ve):Ve=e[205];let Ge;e[206]!==t.merged_issues?(Ge=t.merged_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Merged issues"})}),s.jsx(o,{className:"space-y-2",children:t.merged_issues.map(Sn)})]}),e[206]=t.merged_issues,e[207]=Ge):Ge=e[207];let Ue;e[208]!==t.alerts?(Ue=t.alerts.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Alerts"})}),s.jsx(o,{className:"space-y-2",children:t.alerts.map(wn)})]}),e[208]=t.alerts,e[209]=Ue):Ue=e[209];let Ct;e[210]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(d,{children:s.jsx(m,{children:"By deploy"})}),e[210]=Ct):Ct=e[210];let He;e[211]!==t.by_deploy?(He=Object.entries(t.by_deploy),e[211]=t.by_deploy,e[212]=He):He=e[212];let $t;e[213]===Symbol.for("react.memo_cache_sentinel")?($t=[{key:"d",header:"Deploy",cell:Nn},{key:"n",header:"Count",align:"right",cell:bn}],e[213]=$t):$t=e[213];let qe;e[214]!==He?(qe=s.jsxs(c,{children:[Ct,s.jsx(o,{children:s.jsx(nt,{rows:He,rowKey:kn,columns:$t})})]}),e[214]=He,e[215]=qe):qe=e[215];let Je;e[216]!==t.by_tenant?(Je=Object.keys(t.by_tenant).length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"By tenant"})}),s.jsx(o,{children:s.jsx(nt,{rows:Object.entries(t.by_tenant),rowKey:vn,columns:[{key:"t",header:"Tenant",cell:yn},{key:"n",header:"Count",align:"right",cell:_n}]})})]}),e[216]=t.by_tenant,e[217]=Je):Je=e[217];const Ht=c;let Qe;e[218]===Symbol.for("react.memo_cache_sentinel")?(Qe=s.jsx(d,{children:s.jsx(m,{children:"Activity"})}),e[218]=Qe):Qe=e[218];const qt=o,_s="space-y-3",Jt=t.activities.map(r=>{const F=r.data.source==="linear",ot=typeof r.data.author_name=="string"?r.data.author_name:"Linear",Tt=r.user?.name??(F?ot:"System");return s.jsxs("div",{className:"flex gap-2 text-sm",children:[s.jsx(Rs,{className:"size-6",children:s.jsx(zs,{className:"text-[10px]",children:r.user||F?ct(Tt):"sys"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"text-xs",children:[s.jsx("span",{className:"font-medium",children:Tt})," ",s.jsx("span",{className:"text-muted-foreground",children:nn(r,V)})," ",s.jsx(ls,{iso:r.created_at,className:"text-muted-foreground"})]}),r.kind==="comment"&&s.jsx("div",{className:"mt-0.5 whitespace-pre-wrap",children:String(r.data.body)})]})]},r.id)});let We;e[219]!==n.id?(We=vs(n.id),e[219]=n.id,e[220]=We):We=e[220];let Lt;e[221]===Symbol.for("react.memo_cache_sentinel")?(Lt={preserveScroll:!0},e[221]=Lt):Lt=e[221];let Xe;e[222]!==We?(Xe=s.jsx(ks,{method:"post",action:We,options:Lt,resetOnSuccess:!0,className:"space-y-2",children:jn}),e[222]=We,e[223]=Xe):Xe=e[223];let Ye;e[224]!==qt||e[225]!==Jt||e[226]!==Xe?(Ye=s.jsxs(qt,{className:_s,children:[Jt,Xe]}),e[224]=qt,e[225]=Jt,e[226]=Xe,e[227]=Ye):Ye=e[227];let Ze;e[228]!==Ht||e[229]!==Qe||e[230]!==Ye?(Ze=s.jsxs(Ht,{children:[Qe,Ye]}),e[228]=Ht,e[229]=Qe,e[230]=Ye,e[231]=Ze):Ze=e[231];let et;e[232]!==qe||e[233]!==Je||e[234]!==Ze||e[235]!==Fe||e[236]!==Ke||e[237]!==Ve||e[238]!==Ge||e[239]!==Ue?(et=s.jsxs("div",{className:gs,children:[Fe,Ke,Ve,Ge,Ue,qe,Je,Ze]}),e[232]=qe,e[233]=Je,e[234]=Ze,e[235]=Fe,e[236]=Ke,e[237]=Ve,e[238]=Ge,e[239]=Ue,e[240]=et):et=e[240];let tt;e[241]!==et||e[242]!==Re?(tt=s.jsxs("div",{className:ps,children:[Re,et]}),e[241]=et,e[242]=Re,e[243]=tt):tt=e[243];let st;e[244]!==tt||e[245]!==ce||e[246]!==oe||e[247]!==he||e[248]!==$e?(st=s.jsxs("div",{className:H,children:[ce,oe,he,$e,tt]}),e[244]=tt,e[245]=ce,e[246]=oe,e[247]=he,e[248]=$e,e[249]=st):st=e[249];let It;return e[250]!==z||e[251]!==h||e[252]!==st||e[253]!==D?(It=s.jsxs(z,{breadcrumbs:D,children:[h,st]}),e[250]=z,e[251]=h,e[252]=st,e[253]=D,e[254]=It):It=e[254],It}function jn(t){const{processing:e}=t;return s.jsxs(s.Fragment,{children:[s.jsx(Vs,{name:"body",placeholder:"Add a comment…",required:!0,rows:3}),s.jsx(O,{size:"sm",disabled:e,children:"Comment"})]})}function _n(t){const[,e]=t;return e}function yn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function vn(t){const[e]=t;return e}function bn(t){const[,e]=t;return e}function Nn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e??"unknown"})}function kn(t){const[e]=t;return e??"none"}function wn(t){return s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",title:t.error??void 0,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",children:t.status}),s.jsxs("span",{children:[t.event," via ",t.integration.name]}),s.jsx(ls,{iso:t.sent_at,className:"text-muted-foreground"})]}),t.error&&s.jsx("span",{className:"text-destructive",children:t.error})]},t.id)}function Sn(t){return s.jsxs(Mt,{href:mt(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title})]},t.id)}function Cn(t){return s.jsxs(Mt,{href:mt(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx(as,{status:t.status})]}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title}),s.jsx("span",{className:"text-muted-foreground",children:t.environment.name})]},t.id)}function $n(t){return s.jsxs("div",{className:"flex items-start justify-between gap-2 text-xs",children:[s.jsx("span",{className:"line-clamp-1 font-mono",children:t.message}),s.jsx("span",{className:"text-muted-foreground",children:Rt(t.count)})]},t.message)}function Ln(t,e){return s.jsx("span",{className:"bg-muted rounded px-1.5 py-0.5 font-mono text-[11px] break-all",children:t},`${e}-${t}`)}function In(t){return s.jsx(Ks,{x:t.at.slice(0,10),stroke:"var(--muted-foreground)",strokeDasharray:"3 3",label:{value:t.ref,position:"insideTopRight",fontSize:10}},t.deploy)}function Tn(t){return String(t)}function An(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Mn(t){return Us(t.bytes)}function Rn(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.execution_preview??"–"})}function zn(t){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"truncate font-mono text-xs",children:t.name}),t.truncated&&s.jsx(ut,{variant:"secondary",children:"truncated"})]})}function Dn(t){return t.id}function Fn(t){return t.handled?s.jsx(ut,{variant:"secondary",children:"handled"}):null}function Bn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function En(t){return s.jsx("span",{className:"font-mono text-xs",children:t.tenant??""})}function Pn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.user_ref??""})}function On(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.execution_source," ",t.execution_preview]})}function Kn(t){return s.jsx("span",{className:"text-xs",children:rt(t.occurred_at)})}function Vn(t){return t.id}function Gn(t){return s.jsx(Yt,{value:String(t.id),children:t.name},t.id)}function Un(t){return s.jsx(Yt,{value:t,children:t},t)}function Hn(t){if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}function qn(t){return[t.id,t.name]}export{vi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as se,u as ne,af as re,j as s,L as oe,t as ie}from"./inertia-
|
|
1
|
+
import{c as se,u as ne,af as re,j as s,L as oe,t as ie}from"./inertia-DLew8ZNx.js";import{V as ae,D as le}from"./chart-panel-DUQTz_C8.js";import{D as Z}from"./data-table-BIlt7Rtm.js";import{E as ee}from"./empty-state-C38il627.js";import{P as ce,E as me}from"./env-layout-REF7OM4q.js";import{S as T,a as ue}from"./stat-DFEyFxkO.js";import{S as de}from"./status-badge-BaUKP7Yo.js";import{C as pe,a as fe,b as xe,c as he}from"./card-cAtqCxWl.js";import{c as Y,m as P,w as je}from"./format-B9SDkrWj.js";import{B as te}from"./braces-DgomTCNf.js";import"./series-chart-Xf49v9cv.js";import"./chart-hover-B1M9jc0y.js";import"./chart-BBeBkkNa.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"./segmented-BgbT3wZa.js";import"./arrow-up-C6PxDiY3.js";function ge(t){const e=se.c(5),{attributes:i}=t;let a;e[0]!==i?(a=Object.entries(i),e[0]=i,e[1]=a):a=e[1];const r=a;if(r.length===0){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"}),e[2]=n):n=e[2],n}let o;return e[3]!==r?(o=s.jsx("span",{className:"flex flex-wrap gap-1",children:r.map(ye)}),e[3]=r,e[4]=o):o=e[4],o}function ye(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,"=",String(i)]},e)}function et(t){const e=se.c(73),{environment:i,window:a}=ne().props,r=i.application_id,o=i.id,n=t.summary.current,V=t.name??"Span";let l;e[0]!==r||e[1]!==o||e[2]!==a?(l=re(r,o,{window:a}),e[0]=r,e[1]=o,e[2]=a,e[3]=l):l=e[3];let c;e[4]!==l?(c={title:"Spans",href:l},e[4]=l,e[5]=c):c=e[5];const W=t.name??"Span";let m;e[6]!==W?(m={title:W,href:"#"},e[6]=W,e[7]=m):m=e[7];let u;e[8]!==c||e[9]!==m?(u=[c,m],e[8]=c,e[9]=m,e[10]=u):u=e[10];const q=t.name??"Span";let d;e[11]!==q?(d=s.jsx(ce,{title:s.jsx("span",{className:"font-mono",children:q}),description:"Every recording of this span in the window."}),e[11]=q,e[12]=d):d=e[12];let p;e[13]!==n.count?(p=Y(n.count),e[13]=n.count,e[14]=p):p=e[14];let f;e[15]!==n.count||e[16]!==t.summary.previous.count?(f={current:n.count,previous:t.summary.previous.count,goodDirection:"up"},e[15]=n.count,e[16]=t.summary.previous.count,e[17]=f):f=e[17];let x;e[18]!==p||e[19]!==f?(x=s.jsx(T,{label:"Recorded",value:p,delta:f,deltaCaption:"vs previous period"}),e[18]=p,e[19]=f,e[20]=x):x=e[20];let h;e[21]!==n.errors?(h=Y(n.errors),e[21]=n.errors,e[22]=h):h=e[22];const F=n.errors?"destructive":void 0;let j;e[23]!==h||e[24]!==F?(j=s.jsx(T,{label:"Failed",value:h,tone:F}),e[23]=h,e[24]=F,e[25]=j):j=e[25];const I=n.p95/1e3;let g;e[26]!==I?(g=P(I,2),e[26]=I,e[27]=g):g=e[27];const z=n.p99/1e3;let C;e[28]!==z?(C=P(z,2),e[28]=z,e[29]=C):C=e[29];const G=`p99 ${C}`;let y;e[30]!==g||e[31]!==G?(y=s.jsx(T,{label:"p95",value:g,hint:G}),e[30]=g,e[31]=G,e[32]=y):y=e[32];const J=n.max/1e3;let b;e[33]!==J?(b=P(J,2),e[33]=J,e[34]=b):b=e[34];const Q=n.avg/1e3;let D;e[35]!==Q?(D=P(Q,2),e[35]=Q,e[36]=D):D=e[36];const U=`avg ${D}`;let v;e[37]!==b||e[38]!==U?(v=s.jsx(T,{label:"Max",value:b,hint:U}),e[37]=b,e[38]=U,e[39]=v):v=e[39];let _;e[40]!==x||e[41]!==j||e[42]!==y||e[43]!==v?(_=s.jsxs(ue,{children:[x,j,y,v]}),e[40]=x,e[41]=j,e[42]=y,e[43]=v,e[44]=_):_=e[44];let S;e[45]!==t.series?(S=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(ae,{legend:"outcome",label:"Recordings",seriesLabel:"Spans",data:t.series}),s.jsx(le,{label:"Duration",data:t.series})]}),e[45]=t.series,e[46]=S):S=e[46];let R;e[47]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{children:s.jsx(he,{children:"Attributes"})}),e[47]=R):R=e[47];let L,M;e[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ee,{icon:te,title:"No attributes recorded",description:"Pass a hash to Railwatch.span to tag each recording."}),M=[{key:"k",header:"Key",cell:Pe},{key:"v",header:"Most common values",cell:ke},{key:"n",header:"Spans",align:"right",cell:Ne}],e[48]=L,e[49]=M):(L=e[48],M=e[49]);let w;e[50]!==t.facets?(w=s.jsxs(pe,{children:[R,s.jsx(fe,{children:s.jsx(Z,{rows:t.facets,rowKey:Ce,empty:L,columns:M})})]}),e[50]=t.facets,e[51]=w):w=e[51];let $,A,B;e[52]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ee,{icon:te,title:"No recordings in this window",description:"Widen the time window to see older recordings of this span."}),A={key:"when",header:"When",cell:Se},B={key:"status",header:"Status",cell:_e},e[52]=$,e[53]=A,e[54]=B):($=e[52],A=e[53],B=e[54]);let N;e[55]!==r||e[56]!==o?(N={key:"in",hideOnMobile:!0,header:"In",cell:X=>X.execution_id?s.jsx(oe,{className:"font-mono text-xs hover:underline",href:ie(r,o,X.execution_id),children:X.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[55]=r,e[56]=o,e[57]=N):N=e[57];let K,O;e[58]===Symbol.for("react.memo_cache_sentinel")?(K={key:"attrs",hideOnMobile:!0,header:"Attributes",cell:ve},O={key:"d",header:"Duration",align:"right",cell:be},e[58]=K,e[59]=O):(K=e[58],O=e[59]);let k;e[60]!==N?(k=[A,B,N,K,O],e[60]=N,e[61]=k):k=e[61];let E;e[62]!==t.samples||e[63]!==k?(E=s.jsx(Z,{rows:t.samples,rowKey:we,empty:$,columns:k}),e[62]=t.samples,e[63]=k,e[64]=E):E=e[64];let H;return e[65]!==V||e[66]!==_||e[67]!==S||e[68]!==w||e[69]!==E||e[70]!==u||e[71]!==d?(H=s.jsxs(me,{title:V,crumbs:u,children:[d,_,S,w,E]}),e[65]=V,e[66]=_,e[67]=S,e[68]=w,e[69]=E,e[70]=u,e[71]=d,e[72]=H):H=e[72],H}function be(t){return P(t.duration,2)}function ve(t){return s.jsx(ge,{attributes:t.attributes})}function _e(t){return s.jsx(de,{outcome:t.status})}function Se(t){return s.jsx("span",{className:"text-xs",children:je(t.occurred_at)})}function we(t){return t.id}function Ne(t){return Y(t.count)}function ke(t){return s.jsx("span",{className:"flex flex-wrap gap-1",children:t.values.map(Ee)})}function Ee(t){const[e,i]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,s.jsxs("span",{className:"text-muted-foreground",children:[" ×",i]})]},e)}function Pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.key})}function Ce(t){return t.key}export{et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,u as y,j as e,H as _,aG as f,F as w,L as N,aJ as S}from"./inertia-
|
|
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 +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-CUTKXjxg.js";import{V as Ee,D as Re}from"./chart-panel-BlirnMrQ.js";import{D as se}from"./data-table-CwtPkw_i.js";import{u as Pe,E as Se,P as Me}from"./env-layout-Dkp_4NvM.js";import{a as De,S as Oe}from"./segmented-Bj70Htrs.js";import{S as X,a as Le}from"./stat-IghK3WjD.js";import{S as Te}from"./status-badge-XYUN9gUA.js";import{c as m,p as $e,m as ee,w as pe,a as Ae}from"./format-B9SDkrWj.js";import"./series-chart-C1YrNlID.js";import"./chart-hover-DMWx5-Rs.js";import"./chart-nsdZV0Dv.js";import"./empty-state-CshhuRUU.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./app-layout-DUk54qUM.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./checkbox-C2AqEZXX.js";import"./label-B32Ks8n7.js";import"./use-live-V-slSdFJ.js";import"./arrow-up-DYTCBENO.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-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 +1 @@
|
|
|
1
|
-
import{c as Oe,u as Ce,j as s,L as be,a1 as Re,i as $e}from"./inertia-
|
|
1
|
+
import{c as Oe,u as Ce,j as s,L as be,a1 as Re,i as $e}from"./inertia-DLew8ZNx.js";import{C as qe}from"./chart-hover-B1M9jc0y.js";import{V as ye,D as Ne}from"./chart-panel-DUQTz_C8.js";import{D as he}from"./data-table-BIlt7Rtm.js";import{E as ge}from"./empty-state-C38il627.js";import{O as Pe}from"./onboarding-D1vwaHYT.js";import{u as De,P as Ee,E as Le}from"./env-layout-REF7OM4q.js";import{R as Me}from"./relative-time-CjIjb8Lg.js";import{S as Te}from"./sparkline-cell-BON3qQUB.js";import{S as D,a as Ke}from"./stat-DFEyFxkO.js";import{I as Ie}from"./status-badge-BaUKP7Yo.js";import{C as fe,a as pe,b as _e,c as xe}from"./card-cAtqCxWl.js";import{c as E,p as ve,m as Z,a as ke}from"./format-B9SDkrWj.js";import{crashFreeTone as Ae,rate as He}from"./release-health-4b3tivEf.js";import{O as Be,r as Fe}from"./app-layout-DDyQa72H.js";import"./series-chart-Xf49v9cv.js";import"./chart-BBeBkkNa.js";import"./copy-block-BkSU5832.js";import"./app-wordmark-o9CODKP0.js";import"./use-clipboard-ByoUGQqA.js";import"./index-umIAl-pL.js";import"./live-dot-D1n_BreY.js";import"./index-so4lRrRq.js";import"./badge-CAxXV8za.js";import"./use-live-D7xKz2ma.js";import"./segmented-BgbT3wZa.js";import"./label-GWl7I6sf.js";import"./arrow-up-C6PxDiY3.js";import"./checkbox-CmhMHWZO.js";function Tt(t){const e=Oe.c(109),{environment:o}=Ce().props,{window:we,label:Se}=De(),ee=o.application_id,te=o.id,r=t.totals.requests.current,i=t.totals.requests.previous,l=t.totals.jobs.current,se=t.totals.jobs.previous,n=we==="custom"?"vs previous period":`vs previous ${Se}`;let L;e[0]===Symbol.for("react.memo_cache_sentinel")?(L=[{title:"Overview",href:"#"}],e[0]=L):L=e[0];const re=`${o.application_name} · ${o.name}`;let a;e[1]!==o.last_seen_at?(a=o.last_seen_at?s.jsxs(s.Fragment,{children:["Last event ",s.jsx(Me,{iso:o.last_seen_at})]}):"No events received yet.",e[1]=o.last_seen_at,e[2]=a):a=e[2];let c;e[3]!==re||e[4]!==a?(c=s.jsx(Ee,{title:re,description:a}),e[3]=re,e[4]=a,e[5]=c):c=e[5];let u;e[6]!==o.last_seen_at||e[7]!==o.token_prefix?(u=!o.last_seen_at&&s.jsx(Pe,{tokenPrefix:o.token_prefix}),e[6]=o.last_seen_at,e[7]=o.token_prefix,e[8]=u):u=e[8];let m;e[9]!==r.count?(m={value:r.count,format:E},e[9]=r.count,e[10]=m):m=e[10];let M;e[11]!==r.count||e[12]!==r.errors?(M=ve(r.errors,r.count),e[11]=r.count,e[12]=r.errors,e[13]=M):M=e[13];let T;e[14]!==r.client_errors||e[15]!==r.count?(T=ve(r.client_errors,r.count),e[14]=r.client_errors,e[15]=r.count,e[16]=T):T=e[16];const oe=`${M} 5xx · ${T} 4xx`,le=r.errors>0?"warning":void 0;let d;e[17]!==r.count||e[18]!==i.count?(d={current:r.count,previous:i.count,goodDirection:"up"},e[17]=r.count,e[18]=i.count,e[19]=d):d=e[19];let h;e[20]!==n||e[21]!==d||e[22]!==m||e[23]!==oe||e[24]!==le?(h=s.jsx(D,{label:"Requests",roll:m,hint:oe,tone:le,delta:d,deltaCaption:n}),e[20]=n,e[21]=d,e[22]=m,e[23]=oe,e[24]=le,e[25]=h):h=e[25];const ne=r.p95/1e3;let f;e[26]!==ne?(f=Z(ne),e[26]=ne,e[27]=f):f=e[27];const ie=r.avg/1e3;let K;e[28]!==ie?(K=Z(ie),e[28]=ie,e[29]=K):K=e[29];const ae=r.max/1e3;let I;e[30]!==ae?(I=Z(ae),e[30]=ae,e[31]=I):I=e[31];const ce=`avg ${K} · max ${I}`;let p;e[32]!==r.p95||e[33]!==i.p95?(p={current:r.p95,previous:i.p95,goodDirection:"down"},e[32]=r.p95,e[33]=i.p95,e[34]=p):p=e[34];let _;e[35]!==n||e[36]!==f||e[37]!==ce||e[38]!==p?(_=s.jsx(D,{label:"Request p95",value:f,hint:ce,delta:p,deltaCaption:n}),e[35]=n,e[36]=f,e[37]=ce,e[38]=p,e[39]=_):_=e[39];let x;e[40]!==l.count?(x={value:l.count,format:E},e[40]=l.count,e[41]=x):x=e[41];let A;e[42]!==l.count||e[43]!==l.errors?(A=ve(l.errors,l.count),e[42]=l.count,e[43]=l.errors,e[44]=A):A=e[44];const ue=`${A} failed`,me=l.errors>0?"warning":void 0;let v;e[45]!==l.count||e[46]!==se.count?(v={current:l.count,previous:se.count,goodDirection:"up"},e[45]=l.count,e[46]=se.count,e[47]=v):v=e[47];let j;e[48]!==n||e[49]!==x||e[50]!==ue||e[51]!==me||e[52]!==v?(j=s.jsx(D,{label:"Job attempts",roll:x,hint:ue,tone:me,delta:v,deltaCaption:n}),e[48]=n,e[49]=x,e[50]=ue,e[51]=me,e[52]=v,e[53]=j):j=e[53];const de=t.issues.length?"destructive":"success";let y;e[54]!==t.issues.length||e[55]!==de?(y=s.jsx(D,{label:"Open issues",value:t.issues.length,tone:de}),e[54]=t.issues.length,e[55]=de,e[56]=y):y=e[56];let g;e[57]!==t.release_health?(g=t.release_health&&s.jsx(D,{label:"Crash-free sessions",value:He(t.release_health.crash_free_sessions),tone:Ae(t.release_health.crash_free_sessions),hint:`${t.release_health.ref} · ${E(t.release_health.sessions)} sessions`}),e[57]=t.release_health,e[58]=g):g=e[58];let b;e[59]!==h||e[60]!==_||e[61]!==j||e[62]!==y||e[63]!==g?(b=s.jsxs(Ke,{children:[h,_,j,y,g]}),e[59]=h,e[60]=_,e[61]=j,e[62]=y,e[63]=g,e[64]=b):b=e[64];let k;e[65]!==t.deploys||e[66]!==t.request_series?(k=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(ye,{label:"Requests",data:t.request_series,deploys:t.deploys}),s.jsx(Ne,{label:"Request latency",data:t.request_series,deploys:t.deploys})]}),e[65]=t.deploys,e[66]=t.request_series,e[67]=k):k=e[67];let H;e[68]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(_e,{children:s.jsx(xe,{children:"Slowest routes (p95)"})}),e[68]=H):H=e[68];let w;e[69]!==ee||e[70]!==te?(w={key:"name",header:"Route",grow:!0,cell:je=>s.jsx(be,{className:"font-mono text-xs hover:underline",href:Re(ee,te,je.group_hash),children:je.name})},e[69]=ee,e[70]=te,e[71]=w):w=e[71];let B,F,J,V;e[72]===Symbol.for("react.memo_cache_sentinel")?(B={key:"trend",hideOnMobile:!0,header:"Trend",cell:lt},F={key:"count",header:"Count",align:"right",cell:ot},J={key:"p95",header:"p95",align:"right",cell:rt},V={key:"errors",hideOnMobile:!0,header:"5xx",align:"right",cell:st},e[72]=B,e[73]=F,e[74]=J,e[75]=V):(B=e[72],F=e[73],J=e[74],V=e[75]);let S;e[76]!==w?(S=[w,B,F,J,V],e[76]=w,e[77]=S):S=e[77];let O;e[78]!==t.slow_routes||e[79]!==S?(O=s.jsxs(fe,{children:[H,s.jsx(pe,{children:s.jsx(he,{rows:t.slow_routes,rowKey:it,hoverKey:nt,columns:S})})]}),e[78]=t.slow_routes,e[79]=S,e[80]=O):O=e[80];let W;e[81]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(_e,{children:s.jsx(xe,{children:"Open issues"})}),e[81]=W):W=e[81];let z,G;e[82]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ge,{icon:Be,title:"No open issues",description:"Issues are grouped from repeated request, job, and exception errors."}),G=[{key:"key",header:"Issue",cell:et},{key:"title",header:"Title",cell:Ze},{key:"status",hideOnMobile:!0,header:"",cell:Ye},{key:"n",hideOnMobile:!0,header:"Count",align:"right",cell:Xe},{key:"last",header:"Last",align:"right",cell:Ue}],e[82]=z,e[83]=G):(z=e[82],G=e[83]);let C;e[84]!==t.issues?(C=s.jsxs(fe,{children:[W,s.jsx(pe,{children:s.jsx(he,{rows:t.issues,rowKey:tt,empty:z,columns:G})})]}),e[84]=t.issues,e[85]=C):C=e[85];let R;e[86]!==O||e[87]!==C?(R=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[O,C]}),e[86]=O,e[87]=C,e[88]=R):R=e[88];let $;e[89]!==t.deploys||e[90]!==t.job_series?($=s.jsx(ye,{label:"Jobs",legend:"job",seriesLabel:"Attempts",data:t.job_series,deploys:t.deploys}),e[89]=t.deploys,e[90]=t.job_series,e[91]=$):$=e[91];let Q;e[92]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(_e,{children:s.jsx(xe,{children:"Servers"})}),e[92]=Q):Q=e[92];let q;e[93]!==t.processes?(q=Object.entries(t.processes),e[93]=t.processes,e[94]=q):q=e[94];let U,X;e[95]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ge,{icon:Fe,title:"No process has reported yet",description:"Server processes report here once they boot with the gem installed."}),X=[{key:"server",header:"Server",cell:Ge},{key:"role",header:"Role",cell:ze},{key:"deploy",header:"Deploy",cell:We},{key:"ver",hideOnMobile:!0,header:"Ruby / Rails",cell:Ve},{key:"boot",hideOnMobile:!0,header:"Booted",align:"right",cell:Je}],e[95]=U,e[96]=X):(U=e[95],X=e[96]);let N;e[97]!==q?(N=s.jsxs(fe,{children:[Q,s.jsx(pe,{children:s.jsx(he,{rows:q,rowKey:Qe,empty:U,columns:X})})]}),e[97]=q,e[98]=N):N=e[98];let P;e[99]!==$||e[100]!==N?(P=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[$,N]}),e[99]=$,e[100]=N,e[101]=P):P=e[101];let Y;return e[102]!==c||e[103]!==b||e[104]!==k||e[105]!==u||e[106]!==R||e[107]!==P?(Y=s.jsx(Le,{title:"Overview",crumbs:L,children:s.jsxs(qe,{children:[c,u,b,k,R,P]})}),e[102]=c,e[103]=b,e[104]=k,e[105]=u,e[106]=R,e[107]=P,e[108]=Y):Y=e[108],Y}function Je(t){const[,e]=t;return ke(e.booted_at)}function Ve(t){const[,e]=t;return`${e.ruby_version} / ${e.rails_version}`}function We(t){const[,e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e.deploy?.slice(0,10)})}function ze(t){const[,e]=t;return e.role}function Ge(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function Qe(t){const[e]=t;return e}function Ue(t){return ke(t.last_seen_at)}function Xe(t){return E(t.occurrences)}function Ye(t){return s.jsx(Ie,{status:t.status})}function Ze(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function et(t){return s.jsx(be,{className:"font-mono text-xs hover:underline",href:$e(t.id),children:t.key})}function tt(t){return t.id}function st(t){return t.errors}function rt(t){return Z(t.p95)}function ot(t){return E(t.count)}function lt(t){return s.jsx(Te,{data:t.sparkline,hoverKey:t.group_hash})}function nt(t){return t.group_hash}function it(t){return t.group_hash}export{Tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,C as x,j as c}from"./inertia-
|
|
1
|
+
import{c as f,C as x,j as c}from"./inertia-DLew8ZNx.js";import{A as p,a as u}from"./arrow-up-C6PxDiY3.js";function b(m){const e=f.c(10),{label:n,active:o,dir:i,onClick:a}=m,l=o&&"text-foreground font-semibold";let t;e[0]!==l?(t=x("hover:text-foreground inline-flex items-center gap-1",l),e[0]=l,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=o&&(i==="asc"?c.jsx(p,{className:"size-3"}):c.jsx(u,{className:"size-3"})),e[2]=o,e[3]=i,e[4]=s):s=e[4];let r;return e[5]!==n||e[6]!==a||e[7]!==t||e[8]!==s?(r=c.jsxs("button",{type:"button",onClick:a,className:t,children:[n,s]}),e[5]=n,e[6]=a,e[7]=t,e[8]=s,e[9]=r):r=e[9],r}export{b as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,j as i}from"./inertia-
|
|
1
|
+
import{c as a,j as i}from"./inertia-DLew8ZNx.js";import{S as n}from"./series-chart-Xf49v9cv.js";function m(o){const e=a.c(3),{data:r,hoverKey:s}=o;let t;return e[0]!==r||e[1]!==s?(t=i.jsx(n,{data:r,className:"h-[10px] w-8",hoverKey:s}),e[0]=r,e[1]=s,e[2]=t):t=e[2],t}export{m as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as w,j as R,C,c as k}from"./inertia-
|
|
1
|
+
import{r as w,j as R,C,c as k}from"./inertia-DLew8ZNx.js";import{a as M}from"./use-live-D7xKz2ma.js";import{A as D,a as I}from"./arrow-up-C6PxDiY3.js";const O=300,T="cubic-bezier(.22, 1, .36, 1)",F=2e3,Y="inline-block h-[1.15em] overflow-hidden leading-[1.15em] align-top",$="inline-block h-[1.15em] overflow-visible leading-[1.15em] align-top text-center",U="block will-change-transform",E="block h-[1.15em] leading-[1.15em]",z="inline-block h-[1.15em] leading-[1.15em]";function N(o){const t=document.createElement("span");return t.className=o,t}function P(o){let t=o.length;for(;t>0&&!/[0-9]/.test(o[t-1]);)t--;return{digits:o.slice(0,t),suffix:o.slice(t)}}function V(o){const t=N(o?$:Y);if(o)return{separator:!0,el:t,char:null};const a=N(U),s=N(E),l=N(E);return a.append(s,l),t.append(a),{separator:!1,el:t,strip:a,top:s,bottom:l,animation:null,char:null}}function q(o,{durationMs:t,easing:a}){const s=new Map;let l="";function d(e,n){e.animation?.cancel(),e.animation=null,e.top.textContent=n,e.bottom.textContent="",e.char=n}function g(e,n,m){if(typeof e.strip.animate!="function"){d(e,n);return}e.animation?.cancel();const i=e.char??n;m>0?(e.top.textContent=i,e.bottom.textContent=n):(e.top.textContent=n,e.bottom.textContent=i);const u=m>0?[{transform:"translateY(0)"},{transform:"translateY(-50%)"}]:[{transform:"translateY(-50%)"},{transform:"translateY(0)"}],r=e.strip.animate(u,{duration:t,easing:a,fill:"forwards"});e.animation=r,e.char=n,r.onfinish=()=>{e.animation===r&&d(e,n)}}function h(e){typeof e.el.animate=="function"&&e.el.animate([{opacity:0,transform:"translateY(0.35em)"},{opacity:1,transform:"none"}],{duration:t,easing:a})}return{paint(e,n){const{digits:m,suffix:i}=P(e),u=m.split(""),r=u.map((p,c)=>({key:u.length-1-c,char:p})),x=`${r.map(p=>p.key).join(",")}|${i}`,b=l==="";if(x!==l){const p=document.createDocumentFragment(),c=new Set;for(const{key:f,char:y}of r){c.add(f);const S=!/[0-9]/.test(y);let v=s.get(f);v?.separator!==S&&(v=V(S),s.set(f,v),!b&&n!==0&&h(v)),p.append(v.el)}for(const f of[...s.keys()])c.has(f)||s.delete(f);if(o.replaceChildren(p),i){const f=N(z);f.textContent=i,o.append(f)}l=x}for(const{key:p,char:c}of r){const f=s.get(p);!f||f.char===c||(f.separator?(f.el.textContent=c,f.char=c):f.char===null||n===0?d(f,c):g(f,c,n))}},destroy(){for(const e of s.values())e.separator||e.animation?.cancel()}}}function G({value:o,format:t,className:a,durationMs:s=O,easing:l=T,minIntervalMs:d=F}){const g=w.useRef(null),h=w.useRef(null),e=w.useRef(o),n=w.useRef(null),m=w.useRef(0),i=w.useRef(void 0),u=w.useRef({format:t,durationMs:s,easing:l,minIntervalMs:d});return w.useEffect(()=>{u.current={format:t,durationMs:s,easing:l,minIntervalMs:d}}),w.useEffect(()=>{const r=g.current;if(!r)return;const{format:x,durationMs:b,easing:p}=u.current,c=q(r,{durationMs:b,easing:p});return h.current=c,c.paint(x(e.current),0),()=>{clearTimeout(i.current),i.current=void 0,n.current=null,h.current=null,c.destroy()}},[]),w.useEffect(()=>{const r=h.current;if(!r||o===e.current)return;const x=c=>{m.current=Date.now(),r.paint(u.current.format(c),c>=e.current?1:-1),e.current=c},b=Date.now()-m.current,p=u.current.minIntervalMs-b;if(p<=0){x(o);return}n.current=o,i.current??=window.setTimeout(()=>{i.current=void 0;const c=n.current;n.current=null,c!==null&&c!==e.current&&x(c)},p)},[o]),R.jsx("span",{ref:g,className:C(a)})}const A="(prefers-reduced-motion: reduce)";function Q(o){const t=window.matchMedia(A);return t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}}function X(){return window.matchMedia(A).matches}function B(){return w.useSyncExternalStore(Q,X,H)}function H(){return!0}function J(o){const t=k.c(15),{current:a,previous:s,goodDirection:l,caption:d}=o;if(!s)return null;const g=(a-s)/s*100;if(g===0)return null;const h=g>0?"up":"down",e=h===l,n=h==="up"?D:I,m=e?"text-live":"text-destructive";let i;t[0]!==m?(i=C("inline-flex items-center gap-0.5 font-mono text-xs tabular-nums",m),t[0]=m,t[1]=i):i=t[1];let u;t[2]!==n?(u=R.jsx(n,{className:"size-3"}),t[2]=n,t[3]=u):u=t[3];let r;t[4]!==g?(r=Math.abs(g).toFixed(1),t[4]=g,t[5]=r):r=t[5];let x;t[6]!==i||t[7]!==u||t[8]!==r?(x=R.jsxs("span",{className:i,children:[u,r,"%"]}),t[6]=i,t[7]=u,t[8]=r,t[9]=x):x=t[9];let b;t[10]!==d?(b=d&&R.jsx("span",{className:"text-muted-foreground text-[11px]",children:d}),t[10]=d,t[11]=b):b=t[11];let p;return t[12]!==x||t[13]!==b?(p=R.jsxs(R.Fragment,{children:[x,b]}),t[12]=x,t[13]=b,t[14]=p):p=t[14],p}function K(o){const t=k.c(15),{value:a,format:s}=o,l=M(),d=B();let g;t[0]!==s||t[1]!==a?(g=s(a),t[0]=s,t[1]=a,t[2]=g):g=t[2];const h=g,e=l&&!d;let n;t[3]!==e||t[4]!==s||t[5]!==h||t[6]!==a?(n=e?R.jsx(G,{value:a,format:s}):h,t[3]=e,t[4]=s,t[5]=h,t[6]=a,t[7]=n):n=t[7];let m;t[8]!==n?(m=R.jsx("span",{"aria-hidden":"true",children:n}),t[8]=n,t[9]=m):m=t[9];let i;t[10]!==h?(i=R.jsx("span",{className:"sr-only",children:h}),t[10]=h,t[11]=i):i=t[11];let u;return t[12]!==m||t[13]!==i?(u=R.jsxs(R.Fragment,{children:[m,i]}),t[12]=m,t[13]=i,t[14]=u):u=t[14],u}function et(o){const t=k.c(28),{label:a,value:s,roll:l,hint:d,tone:g,delta:h,deltaCaption:e,card:n,className:m}=o,u=(n===void 0?!1:n)&&"bg-card rounded-lg border";let r;t[0]!==m||t[1]!==u?(r=C("flex min-w-0 flex-col gap-1 px-4 py-3",u,m),t[0]=m,t[1]=u,t[2]=r):r=t[2];let x;t[3]!==a?(x=R.jsx("div",{className:"label-caps truncate",children:a}),t[3]=a,t[4]=x):x=t[4];const b=g==="destructive"&&"text-destructive",p=g==="warning"&&"text-warning",c=g==="success"&&"text-live";let f;t[5]!==b||t[6]!==p||t[7]!==c?(f=C("text-xl font-semibold tracking-tight tabular-nums sm:text-2xl",b,p,c),t[5]=b,t[6]=p,t[7]=c,t[8]=f):f=t[8];let y;t[9]!==l||t[10]!==s?(y=l?R.jsx(K,{...l}):s,t[9]=l,t[10]=s,t[11]=y):y=t[11];let S;t[12]!==f||t[13]!==y?(S=R.jsx("div",{className:f,children:y}),t[12]=f,t[13]=y,t[14]=S):S=t[14];let v;t[15]!==h||t[16]!==e?(v=h&&R.jsx(J,{...h,caption:e}),t[15]=h,t[16]=e,t[17]=v):v=t[17];let j;t[18]!==S||t[19]!==v?(j=R.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[S,v]}),t[18]=S,t[19]=v,t[20]=j):j=t[20];let L;t[21]!==d?(L=d&&R.jsx("div",{className:"text-muted-foreground truncate font-mono text-[11px]",children:d}),t[21]=d,t[22]=L):L=t[22];let _;return t[23]!==j||t[24]!==L||t[25]!==r||t[26]!==x?(_=R.jsxs("div",{className:r,children:[x,j,L]}),t[23]=j,t[24]=L,t[25]=r,t[26]=x,t[27]=_):_=t[27],_}function nt(o){const t=k.c(5),{children:a,className:s}=o;let l;t[0]!==s?(l=C("bg-card divide-border grid grid-cols-2 divide-y overflow-hidden rounded-lg border sm:divide-x sm:divide-y-0","[&>*:nth-child(odd)]:border-r sm:[&>*:nth-child(odd)]:border-r-0","[&>*:nth-child(odd):last-child]:col-span-2 [&>*:nth-child(odd):last-child]:border-r-0 sm:[&>*:nth-child(odd):last-child]:col-span-1","sm:auto-cols-fr sm:grid-flow-col",s),t[0]=s,t[1]=l):l=t[1];let d;return t[2]!==a||t[3]!==l?(d=R.jsx("div",{className:l,children:a}),t[2]=a,t[3]=l,t[4]=d):d=t[4],d}export{et as S,nt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,C as d,j as m}from"./inertia-
|
|
1
|
+
import{c as u,C as d,j as m}from"./inertia-DLew8ZNx.js";import{B as g}from"./badge-CAxXV8za.js";import{s as x}from"./format-B9SDkrWj.js";const f={success:"border-live/30 bg-live/10 text-live",warning:"border-warning/40 bg-warning/10 text-warning",destructive:"border-danger/40 bg-danger/10 text-danger",muted:"border-border bg-muted text-muted-foreground"},v="rounded-sm px-1.5 font-mono text-[10px] tracking-wider uppercase";function j(c){const t=u.c(5),{status:e,outcome:i,label:o}=c,n=x(e,i),s=f[n];let r;t[0]!==s?(r=d(v,"tabular-nums",s),t[0]=s,t[1]=r):r=t[1];const a=o??i??e??"–";let l;return t[2]!==r||t[3]!==a?(l=m.jsx(g,{variant:"outline",className:r,children:a}),t[2]=r,t[3]=a,t[4]=l):l=t[4],l}function B(c){const t=u.c(5),{level:e}=c,o=f[e==="error"||e==="fatal"?"destructive":e==="warn"?"warning":e==="event"?"success":"muted"];let n;t[0]!==o?(n=d(v,o),t[0]=o,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s=m.jsx(g,{variant:"outline",className:n,children:e}),t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function N(c){const t=u.c(5),{status:e}=c,o=f[e==="open"?"destructive":e==="resolved"?"success":"muted"];let n;t[0]!==o?(n=d(v,o),t[0]=o,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s=m.jsx(g,{variant:"outline",className:n,children:e}),t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function h(c){const t=u.c(6),{children:e,tone:i,className:o}=c,s=f[i===void 0?"muted":i];let r;t[0]!==o||t[1]!==s?(r=d(v,s,o),t[0]=o,t[1]=s,t[2]=r):r=t[2];let a;return t[3]!==e||t[4]!==r?(a=m.jsx(g,{variant:"outline",className:r,children:e}),t[3]=e,t[4]=r,t[5]=a):a=t[5],a}export{N as I,h as K,B as L,j as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as p}from"./inertia-
|
|
1
|
+
import{aA as p}from"./inertia-DLew8ZNx.js";function s(n,a,r,e){const o=String(p(n,a,r,e)),[i,t]=o.split("?");return`${i.replace(/\./g,"%2E")}${t?`?${t}`:""}`}export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,C as c,j as u,L as d}from"./inertia-
|
|
1
|
+
import{c as l,C as c,j as u,L as d}from"./inertia-DLew8ZNx.js";function m(a){const e=l.c(10);let t,o,n;e[0]!==a?({className:n,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=o,e[3]=n):(t=e[1],o=e[2],n=e[3]);const i=n===void 0?"":n;let r;e[4]!==i?(r=c("text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",i),e[4]=i,e[5]=r):r=e[5];let s;return e[6]!==t||e[7]!==o||e[8]!==r?(s=u.jsx(d,{className:r,...o,children:t}),e[6]=t,e[7]=o,e[8]=r,e[9]=s):s=e[9],s}export{m as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,C as n,j as l}from"./inertia-
|
|
1
|
+
import{c as o,C as n,j as l}from"./inertia-DLew8ZNx.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=n("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=l.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,j as n,c as P,C as N}from"./inertia-CUTKXjxg.js";import{c as Te,u as ke,a as j,P as ve}from"./index-BpnfuXi-.js";import{u as Pe}from"./app-wordmark-DDNuuq5_.js";import{d as be,R as Re,A as _e,P as Oe,e as He,C as De}from"./live-dot-Bb1UYT9F.js";import{P as Ie}from"./index-n16aviHx.js";import{m as L,u as Le}from"./format-B9SDkrWj.js";var $e=Object.defineProperty,C=(a,e)=>$e(a,"name",{value:e,configurable:!0}),oe,fe="HoverCard",[ye,mt]=Te(fe,[be]),pe=be(),[Ae,te]=ye(fe),Me=C(a=>{const{__scopeHoverCard:e,children:t,open:o,defaultOpen:l,onOpenChange:r,openDelay:c=700,closeDelay:p=300}=a,u=pe(e),d=b.useRef(0),h=b.useRef(0),i=b.useRef(!1),x=b.useRef(!1),[g,m]=ke({prop:o,defaultProp:l??!1,onChange:r,caller:fe}),f=b.useCallback(()=>{clearTimeout(h.current),d.current=window.setTimeout(()=>m(!0),c)},[c,m]),y=b.useCallback(()=>{clearTimeout(d.current),!i.current&&!x.current&&(h.current=window.setTimeout(()=>m(!1),p))},[p,m]),w=b.useCallback(()=>m(!1),[m]);return b.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(h.current)},[]),n.jsx(Ae,{scope:e,open:g,onOpenChange:m,onOpen:f,onClose:y,onDismiss:w,hasSelectionRef:i,isPointerDownOnContentRef:x,children:n.jsx(Re,{...u,children:t})})},"HoverCard"),qe="HoverCardTrigger",Ue=b.forwardRef(C(function(e,t){const{__scopeHoverCard:o,...l}=e,r=te(qe,o),c=pe(o);return n.jsx(_e,{asChild:!0,...c,children:n.jsx(Ie.a,{"data-state":r.open?"open":"closed",...l,ref:t,onPointerEnter:j(e.onPointerEnter,$(r.onOpen)),onPointerLeave:j(e.onPointerLeave,$(r.onClose)),onFocus:j(e.onFocus,r.onOpen),onBlur:j(e.onBlur,r.onClose),onTouchStart:j(e.onTouchStart,p=>p.preventDefault())})})},"HoverCardTrigger")),Ne="HoverCardPortal",[Fe,ze]=ye(Ne,{forceMount:void 0}),Be=C(a=>{const{__scopeHoverCard:e,forceMount:t,children:o,container:l}=a,r=te(Ne,e);return n.jsx(Fe,{scope:e,forceMount:t,children:n.jsx(ve,{present:t||r.open,children:n.jsx(Oe,{asChild:!0,container:l,children:o})})})},"HoverCardPortal"),ce="HoverCardContent",Ge=b.forwardRef(C(function(e,t){const o=ze(ce,e.__scopeHoverCard),{forceMount:l=o.forceMount,...r}=e,c=te(ce,e.__scopeHoverCard);return n.jsx(ve,{present:l||c.open,children:n.jsx(Ve,{"data-state":c.open?"open":"closed",...r,onPointerEnter:j(e.onPointerEnter,$(c.onOpen)),onPointerLeave:j(e.onPointerLeave,$(c.onClose)),ref:t})})},"HoverCardContent")),Ve=b.forwardRef(C(function(e,t){const{__scopeHoverCard:o,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:c,onInteractOutside:p,...u}=e,d=te(ce,o),h=pe(o),i=b.useRef(null),x=Pe(t,i),[g,m]=b.useState(!1);return b.useEffect(()=>{if(g){const f=document.body;return oe=f.style.userSelect||f.style.webkitUserSelect,f.style.userSelect="none",f.style.webkitUserSelect="none",()=>{f.style.userSelect=oe,f.style.webkitUserSelect=oe}}},[g]),b.useEffect(()=>{if(i.current){const f=C(()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(d.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",f),()=>{document.removeEventListener("pointerup",f),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),b.useEffect(()=>{i.current&&je(i.current).forEach(y=>y.setAttribute("tabindex","-1"))}),n.jsx(He,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:j(c,f=>{f.preventDefault()}),onDismiss:d.onDismiss,children:n.jsx(De,{...h,...u,onPointerDown:j(u.onPointerDown,f=>{f.currentTarget.contains(f.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:x,style:{...u.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function $(a){return e=>e.pointerType==="touch"?void 0:a()}C($,"excludeTouch");function je(a){const e=[],t=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:C(o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;t.nextNode();)e.push(t.currentNode);return e}C(je,"getTabbableNodes");var We=Me,Ke=Ue,Ye=Be,Je=Ge;const Ze=new Set(["SELECT","FROM","WHERE","JOIN","LEFT","INNER","ON","AND","OR","ORDER","BY","GROUP","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","RETURNING","AS","IN","IS","NULL","NOT","DISTINCT","COUNT","SUM","AVG","MAX","MIN","CASE","WHEN","THEN","ELSE","END"]),se=/("(?:[^"]|"")*"|`(?:[^`]|``)*`)|('(?:[^']|'')*')|(\?)|(\b\d+(?:\.\d+)?\b)|(\b[A-Za-z_][A-Za-z_0-9]*\b)/g;function Qe(a){const e=[];let t=0;se.lastIndex=0;let o;for(;o=se.exec(a);){o.index>t&&e.push({text:a.slice(t,o.index),kind:"text"});const[l,r,c,p,u]=o;r?e.push({text:l,kind:"identifier"}):c?e.push({text:l,kind:"string"}):p?e.push({text:l,kind:"placeholder"}):u?e.push({text:l,kind:"number"}):Ze.has(l.toUpperCase())?e.push({text:l,kind:"keyword"}):e.push({text:l,kind:"text"}),t=se.lastIndex}return t<a.length&&e.push({text:a.slice(t),kind:"text"}),e}const Xe={keyword:"text-primary font-semibold",string:"text-emerald-600 dark:text-emerald-400",number:"text-amber-600 dark:text-amber-400",placeholder:"text-primary font-semibold",identifier:"text-muted-foreground",text:""};function Ce(a){const e=P.c(16),{sql:t,wrap:o,inline:l,className:r}=a,c=o===void 0?!1:o,p=l===void 0?!1:l;let u,d,h,i;if(e[0]!==r||e[1]!==p||e[2]!==t||e[3]!==c){const g=Qe(t);u=p?"span":"code";const f=c?"break-words whitespace-pre-wrap":"block max-w-full truncate";e[8]!==r||e[9]!==f?(d=N("font-mono text-xs",f,r),e[8]=r,e[9]=f,e[10]=d):d=e[10],h=c?void 0:t,i=g.map(et),e[0]=r,e[1]=p,e[2]=t,e[3]=c,e[4]=u,e[5]=d,e[6]=h,e[7]=i}else u=e[4],d=e[5],h=e[6],i=e[7];let x;return e[11]!==u||e[12]!==d||e[13]!==h||e[14]!==i?(x=n.jsx(u,{className:d,title:h,children:i}),e[11]=u,e[12]=d,e[13]=h,e[14]=i,e[15]=x):x=e[15],x}function et(a,e){return n.jsx("span",{className:Xe[a.kind]||void 0,children:a.text},e)}function tt(a){const e=P.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let o;return e[2]!==t?(o=n.jsx(We,{"data-slot":"hover-card",...t}),e[2]=t,e[3]=o):o=e[3],o}function nt(a){const e=P.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let o;return e[2]!==t?(o=n.jsx(Ke,{"data-slot":"hover-card-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function rt(a){const e=P.c(12);let t,o,l,r;e[0]!==a?({className:t,align:l,sideOffset:r,...o}=a,e[0]=a,e[1]=t,e[2]=o,e[3]=l,e[4]=r):(t=e[1],o=e[2],l=e[3],r=e[4]);const c=l===void 0?"center":l,p=r===void 0?4:r;let u;e[5]!==t?(u=N("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),e[5]=t,e[6]=u):u=e[6];let d;return e[7]!==c||e[8]!==o||e[9]!==p||e[10]!==u?(d=n.jsx(Ye,{"data-slot":"hover-card-portal",children:n.jsx(Je,{"data-slot":"hover-card-content",align:c,sideOffset:p,className:u,...o})}),e[7]=c,e[8]=o,e[9]=p,e[10]=u,e[11]=d):d=e[11],d}const xe={query:"bg-sky-500",transaction:"bg-sky-300",cache_event:"bg-violet-500",outgoing_request:"bg-orange-500",mail:"bg-pink-500",broadcast:"bg-teal-500",enqueued_job:"bg-amber-500",view_render:"bg-emerald-500",storage_op:"bg-indigo-500",exception:"bg-red-500",log:"bg-neutral-400",span:"bg-fuchsia-500",attachment:"bg-lime-500",llm_call:"bg-cyan-400"},de={query:"Query",cache_event:"Cache",outgoing_request:"Outgoing",mail:"Mail",broadcast:"Broadcast",log:"Log",exception:"Exception",view_render:"View",storage_op:"Storage",enqueued_job:"Job",transaction:"Transaction",span:"Span",attachment:"Attachment",llm_call:"LLM"},ot=["middleware_before","action","render","middleware_after","body"],ue={middleware_before:"before middleware",action:"action",render:"render",middleware_after:"after middleware",body:"body"},ae=[10,25,50,100,250,500,1e3,2500,5e3,1e4,3e4,6e4];function st(a){const e=a/8;return ae.find(t=>t>=e)??ae[ae.length-1]}function at(a,e){const t=[];for(let o=0;o<=a;o+=e)t.push(o);return t}const le="grid grid-cols-[6rem_1fr_3.5rem] items-center gap-2 md:grid-cols-[5rem_13rem_1fr_4rem]",ie="hidden md:block";function he(a){const e=P.c(32),{entry:t,showSource:o}=a;let l;e[0]!==t.detail?(l=t.detail??{},e[0]=t.detail,e[1]=l):l=e[1];const r=l,c=de[t.type]??t.type;let p;e[2]!==c?(p=n.jsx("span",{children:c}),e[2]=c,e[3]=p):p=e[3];let u;e[4]!==t.stage?(u=t.stage&&n.jsxs("span",{children:["· ",ue[t.stage]??t.stage]}),e[4]=t.stage,e[5]=u):u=e[5];let d;e[6]!==p||e[7]!==u?(d=n.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-[10px] tracking-wide uppercase",children:[p,u]}),e[6]=p,e[7]=u,e[8]=d):d=e[8];let h;e[9]!==r||e[10]!==t.label||e[11]!==t.sql||e[12]!==t.type||e[13]!==o?(h=t.type==="query"&&t.sql?n.jsx(Ce,{sql:t.sql,wrap:!0,className:"text-[11px]"}):t.type==="cache_event"?n.jsxs("div",{className:"font-mono text-xs break-all",children:[String(r.op??"")," ",n.jsx("span",{className:"font-semibold",children:String(r.key??"")})]}):t.type==="outgoing_request"?n.jsxs("div",{className:"font-mono text-xs break-all",children:[String(r.method??"")," ",String(r.url??t.label),r.status!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" → ",String(r.status)]}),o&&typeof r.body=="string"&&r.body!==""&&n.jsx("pre",{className:"bg-muted mt-1.5 max-h-48 overflow-auto rounded p-2 text-[10px] break-all whitespace-pre-wrap",children:r.body})]}):t.type==="llm_call"?n.jsxs("div",{className:"font-mono text-xs break-all",children:[String(r.tool??t.label),r.input_tokens!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(r.input_tokens)," in / ",String(r.output_tokens??0)," out"]}),r.cost!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",Le(Number(r.cost))]}),r.step!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(r.workflow??"")," / ",String(r.step)]}),r.error!=null&&n.jsx("div",{className:"text-destructive mt-1",children:String(r.error)})]}):t.type==="mail"?n.jsx("div",{className:"font-mono text-xs break-all",children:String(r.subject??t.label)}):t.type==="log"?n.jsxs("div",{className:"font-mono text-xs break-words",children:[n.jsx("span",{className:"text-muted-foreground uppercase",children:String(r.level??"")})," ",String(r.message??t.label)]}):t.type==="exception"?n.jsx("div",{className:"text-destructive font-mono text-xs break-words",children:t.label}):n.jsx("div",{className:"font-mono text-xs break-words",children:t.label}),e[9]=r,e[10]=t.label,e[11]=t.sql,e[12]=t.type,e[13]=o,e[14]=h):h=e[14];let i;e[15]!==t.offset?(i=L(t.offset),e[15]=t.offset,e[16]=i):i=e[16];let x;e[17]!==i?(x=n.jsxs("span",{children:["+",i]}),e[17]=i,e[18]=x):x=e[18];let g;e[19]!==t.duration?(g=t.duration!=null&&n.jsx("span",{children:L(t.duration)}),e[19]=t.duration,e[20]=g):g=e[20];let m;e[21]!==x||e[22]!==g?(m=n.jsxs("div",{className:"text-muted-foreground flex flex-wrap gap-x-3 text-[11px] tabular-nums",children:[x,g]}),e[21]=x,e[22]=g,e[23]=m):m=e[23];let f;e[24]!==t.source||e[25]!==o?(f=o&&t.source&&n.jsx("div",{className:"text-muted-foreground border-t pt-1 font-mono text-[11px] break-all",children:t.source}),e[24]=t.source,e[25]=o,e[26]=f):f=e[26];let y;return e[27]!==m||e[28]!==f||e[29]!==d||e[30]!==h?(y=n.jsxs("div",{className:"space-y-1.5",children:[d,h,m,f]}),e[27]=m,e[28]=f,e[29]=d,e[30]=h,e[31]=y):y=e[31],y}function ge(a){const e=P.c(7),{ticks:t,span:o}=a;let l;if(e[0]!==o||e[1]!==t){let c;e[3]!==o?(c=p=>n.jsx("div",{className:"bg-border/60 pointer-events-none absolute top-0 h-full w-px",style:{left:`${p/o*100}%`}},p),e[3]=o,e[4]=c):c=e[4],l=t.map(c),e[0]=o,e[1]=t,e[2]=l}else l=e[2];let r;return e[5]!==l?(r=n.jsx(n.Fragment,{children:l}),e[5]=l,e[6]=r):r=e[6],r}function xt(a){const e=P.c(70),{entries:t,total:o,stages:l}=a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=new Set,e[0]=r):r=e[0];const[c,p]=b.useState(r),[u,d]=b.useState(null);let h;e[1]!==t||e[2]!==o?(h=Math.max(o,...t.map(lt),1),e[1]=t,e[2]=o,e[3]=h):h=e[3];const i=h;let x,g,m,f,y,w,S,E;if(e[4]!==t||e[5]!==u||e[6]!==c||e[7]!==i||e[8]!==l){const we=st(i),k=at(i,we);let _;if(e[17]!==t){_=new Map;for(const s of t)_.set(s.type,(_.get(s.type)??0)+1);e[17]=t,e[18]=_}else _=e[18];const M=_;let q;e[19]!==c?(q=s=>!c.has(s.type),e[19]=c,e[20]=q):q=e[20];const me=t.filter(q);let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=function(v){p(T=>{const I=new Set(T);return I.has(v)?I.delete(v):I.add(v),I})},e[21]=U):U=e[21];const Se=U;let F;e[22]!==l?(F=s=>l[s]!==void 0,e[22]=l,e[23]=F):F=e[23];let z;e[24]!==l?(z=(s,v)=>{const T=s.length>0?s[s.length-1].start+s[s.length-1].width:0;return s.push({name:v,start:T,width:l[v]}),s},e[24]=l,e[25]=z):z=e[25];const Ee=ot.filter(F).reduce(z,[]);w="space-y-2",e[26]!==M||e[27]!==c?(S=M.size>0&&n.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:[...M.entries()].map(s=>{const[v,T]=s;return n.jsxs("button",{type:"button",onClick:()=>Se(v),className:N("flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] font-medium transition-colors",c.has(v)?"text-muted-foreground opacity-50":"hover:bg-muted/60"),children:[n.jsx("span",{className:N("size-1.5 rounded-full",xe[v]??"bg-neutral-500")}),de[v]??v,n.jsx("span",{className:"text-muted-foreground tabular-nums",children:T})]},v)})}),e[26]=M,e[27]=c,e[28]=S):S=e[28];let B,G,V;e[29]===Symbol.for("react.memo_cache_sentinel")?(B=N(le,"px-2 text-[10px]"),G=n.jsx("div",{className:ie}),V=n.jsx("div",{}),e[29]=B,e[30]=G,e[31]=V):(B=e[29],G=e[30],V=e[31]);let W;e[32]!==i?(W=s=>n.jsx("span",{className:"text-muted-foreground absolute -translate-x-1/2 tabular-nums",style:{left:`${s/i*100}%`},children:L(s,0)},s),e[32]=i,e[33]=W):W=e[33];const ne=k.map(W);let O;e[34]!==ne?(O=n.jsx("div",{className:"relative h-4 select-none",children:ne}),e[34]=ne,e[35]=O):O=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("div",{}),e[36]=K):K=e[36],e[37]!==O?(E=n.jsxs("div",{className:B,children:[G,V,O,K]}),e[37]=O,e[38]=E):E=e[38];let Y,J,Z;e[39]===Symbol.for("react.memo_cache_sentinel")?(Y=N(le,"px-2"),J=n.jsx("div",{className:ie}),Z=n.jsx("div",{}),e[39]=Y,e[40]=J,e[41]=Z):(Y=e[39],J=e[40],Z=e[41]);let H;e[42]!==i||e[43]!==k?(H=n.jsx(ge,{ticks:k,span:i}),e[42]=i,e[43]=k,e[44]=H):H=e[44];let Q;e[45]!==i?(Q=s=>n.jsxs("div",{className:"border-background bg-primary/20 absolute top-0 flex h-full items-center overflow-hidden border-r px-1 whitespace-nowrap",style:{left:`${s.start/i*100}%`,width:`${s.width/i*100}%`},title:`${ue[s.name]??s.name} ${L(s.width)}`,children:[ue[s.name]??s.name," ",L(s.width,0)]},s.name),e[45]=i,e[46]=Q):Q=e[46];const re=Ee.map(Q);let D;e[47]!==H||e[48]!==re?(D=n.jsxs("div",{className:"bg-muted/40 relative h-5 overflow-hidden rounded text-[10px]",children:[H,re]}),e[47]=H,e[48]=re,e[49]=D):D=e[49];let X;e[50]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx("div",{}),e[50]=X):X=e[50],e[51]!==D?(x=n.jsxs("div",{className:Y,children:[J,Z,D,X]}),e[51]=D,e[52]=x):x=e[52],g="max-h-[32rem] overflow-y-auto rounded-lg border",e[53]!==t.length?(m=t.length===0&&n.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No child events recorded."}),e[53]=t.length,e[54]=m):m=e[54],f=t.length>0&&me.length===0&&n.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No events match the active filters."});let ee;e[55]!==u||e[56]!==i||e[57]!==k?(ee=s=>{const v=`${s.type}-${s.id}`,T=i>0&&(s.duration??0)/i>.1,I=s.type==="exception";return n.jsxs("div",{className:"border-b last:border-b-0",style:{contentVisibility:"auto",containIntrinsicSize:"0 28px"},children:[n.jsxs(tt,{openDelay:150,children:[n.jsx(nt,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:()=>d(u===v?null:v),className:N(le,"hover:bg-muted/40 w-full px-2 py-1 text-left text-xs"),children:[n.jsx("span",{className:N("text-muted-foreground truncate font-mono",ie),children:de[s.type]??s.type}),s.type==="query"&&s.sql?n.jsx(Ce,{sql:s.sql}):n.jsx("span",{className:"truncate font-mono",children:s.label}),n.jsxs("div",{className:"bg-muted/30 relative h-3 rounded",children:[n.jsx(ge,{ticks:k,span:i}),I?n.jsx("div",{className:"absolute top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rotate-45 bg-red-500",style:{left:`${Math.min(100,s.offset/i*100)}%`}}):n.jsx("div",{className:N("absolute top-0 h-full rounded",xe[s.type]??"bg-neutral-500",T?"ring-foreground/30 opacity-100 ring-1 ring-inset":"opacity-70"),style:{left:`${Math.min(100,s.offset/i*100)}%`,width:`${Math.max(.3,(s.duration??0)/i*100)}%`}})]}),n.jsx("span",{className:N("text-muted-foreground text-right tabular-nums",T&&"text-foreground font-semibold"),children:s.duration!=null?L(s.duration):"–"})]})}),n.jsx(rt,{className:"w-80",align:"start",children:n.jsx(he,{entry:s})})]}),u===v&&n.jsx("div",{className:"bg-muted/20 border-t px-4 py-2",children:n.jsx(he,{entry:s,showSource:!0})})]},v)},e[55]=u,e[56]=i,e[57]=k,e[58]=ee):ee=e[58],y=me.map(ee),e[4]=t,e[5]=u,e[6]=c,e[7]=i,e[8]=l,e[9]=x,e[10]=g,e[11]=m,e[12]=f,e[13]=y,e[14]=w,e[15]=S,e[16]=E}else x=e[9],g=e[10],m=e[11],f=e[12],y=e[13],w=e[14],S=e[15],E=e[16];let R;e[59]!==g||e[60]!==m||e[61]!==f||e[62]!==y?(R=n.jsxs("div",{className:g,children:[m,f,y]}),e[59]=g,e[60]=m,e[61]=f,e[62]=y,e[63]=R):R=e[63];let A;return e[64]!==x||e[65]!==R||e[66]!==w||e[67]!==S||e[68]!==E?(A=n.jsxs("div",{className:w,children:[S,E,x,R]}),e[64]=x,e[65]=R,e[66]=w,e[67]=S,e[68]=E,e[69]=A):A=e[69],A}function lt(a){return a.offset+(a.duration??0)}export{Ce as S,xt as T};
|
|
1
|
+
import{r as b,j as n,c as P,C as N}from"./inertia-DLew8ZNx.js";import{c as Te,u as ke,a as j,P as ve}from"./index-umIAl-pL.js";import{u as Pe}from"./app-wordmark-o9CODKP0.js";import{d as be,R as Re,A as _e,P as Oe,e as He,C as De}from"./live-dot-D1n_BreY.js";import{P as Ie}from"./index-so4lRrRq.js";import{m as L,u as Le}from"./format-B9SDkrWj.js";var $e=Object.defineProperty,C=(a,e)=>$e(a,"name",{value:e,configurable:!0}),oe,fe="HoverCard",[ye,mt]=Te(fe,[be]),pe=be(),[Ae,te]=ye(fe),Me=C(a=>{const{__scopeHoverCard:e,children:t,open:o,defaultOpen:l,onOpenChange:r,openDelay:c=700,closeDelay:p=300}=a,u=pe(e),d=b.useRef(0),h=b.useRef(0),i=b.useRef(!1),x=b.useRef(!1),[g,m]=ke({prop:o,defaultProp:l??!1,onChange:r,caller:fe}),f=b.useCallback(()=>{clearTimeout(h.current),d.current=window.setTimeout(()=>m(!0),c)},[c,m]),y=b.useCallback(()=>{clearTimeout(d.current),!i.current&&!x.current&&(h.current=window.setTimeout(()=>m(!1),p))},[p,m]),w=b.useCallback(()=>m(!1),[m]);return b.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(h.current)},[]),n.jsx(Ae,{scope:e,open:g,onOpenChange:m,onOpen:f,onClose:y,onDismiss:w,hasSelectionRef:i,isPointerDownOnContentRef:x,children:n.jsx(Re,{...u,children:t})})},"HoverCard"),qe="HoverCardTrigger",Ue=b.forwardRef(C(function(e,t){const{__scopeHoverCard:o,...l}=e,r=te(qe,o),c=pe(o);return n.jsx(_e,{asChild:!0,...c,children:n.jsx(Ie.a,{"data-state":r.open?"open":"closed",...l,ref:t,onPointerEnter:j(e.onPointerEnter,$(r.onOpen)),onPointerLeave:j(e.onPointerLeave,$(r.onClose)),onFocus:j(e.onFocus,r.onOpen),onBlur:j(e.onBlur,r.onClose),onTouchStart:j(e.onTouchStart,p=>p.preventDefault())})})},"HoverCardTrigger")),Ne="HoverCardPortal",[Fe,ze]=ye(Ne,{forceMount:void 0}),Be=C(a=>{const{__scopeHoverCard:e,forceMount:t,children:o,container:l}=a,r=te(Ne,e);return n.jsx(Fe,{scope:e,forceMount:t,children:n.jsx(ve,{present:t||r.open,children:n.jsx(Oe,{asChild:!0,container:l,children:o})})})},"HoverCardPortal"),ce="HoverCardContent",Ge=b.forwardRef(C(function(e,t){const o=ze(ce,e.__scopeHoverCard),{forceMount:l=o.forceMount,...r}=e,c=te(ce,e.__scopeHoverCard);return n.jsx(ve,{present:l||c.open,children:n.jsx(Ve,{"data-state":c.open?"open":"closed",...r,onPointerEnter:j(e.onPointerEnter,$(c.onOpen)),onPointerLeave:j(e.onPointerLeave,$(c.onClose)),ref:t})})},"HoverCardContent")),Ve=b.forwardRef(C(function(e,t){const{__scopeHoverCard:o,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:c,onInteractOutside:p,...u}=e,d=te(ce,o),h=pe(o),i=b.useRef(null),x=Pe(t,i),[g,m]=b.useState(!1);return b.useEffect(()=>{if(g){const f=document.body;return oe=f.style.userSelect||f.style.webkitUserSelect,f.style.userSelect="none",f.style.webkitUserSelect="none",()=>{f.style.userSelect=oe,f.style.webkitUserSelect=oe}}},[g]),b.useEffect(()=>{if(i.current){const f=C(()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(d.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",f),()=>{document.removeEventListener("pointerup",f),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),b.useEffect(()=>{i.current&&je(i.current).forEach(y=>y.setAttribute("tabindex","-1"))}),n.jsx(He,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:r,onFocusOutside:j(c,f=>{f.preventDefault()}),onDismiss:d.onDismiss,children:n.jsx(De,{...h,...u,onPointerDown:j(u.onPointerDown,f=>{f.currentTarget.contains(f.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:x,style:{...u.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function $(a){return e=>e.pointerType==="touch"?void 0:a()}C($,"excludeTouch");function je(a){const e=[],t=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:C(o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;t.nextNode();)e.push(t.currentNode);return e}C(je,"getTabbableNodes");var We=Me,Ke=Ue,Ye=Be,Je=Ge;const Ze=new Set(["SELECT","FROM","WHERE","JOIN","LEFT","INNER","ON","AND","OR","ORDER","BY","GROUP","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","RETURNING","AS","IN","IS","NULL","NOT","DISTINCT","COUNT","SUM","AVG","MAX","MIN","CASE","WHEN","THEN","ELSE","END"]),se=/("(?:[^"]|"")*"|`(?:[^`]|``)*`)|('(?:[^']|'')*')|(\?)|(\b\d+(?:\.\d+)?\b)|(\b[A-Za-z_][A-Za-z_0-9]*\b)/g;function Qe(a){const e=[];let t=0;se.lastIndex=0;let o;for(;o=se.exec(a);){o.index>t&&e.push({text:a.slice(t,o.index),kind:"text"});const[l,r,c,p,u]=o;r?e.push({text:l,kind:"identifier"}):c?e.push({text:l,kind:"string"}):p?e.push({text:l,kind:"placeholder"}):u?e.push({text:l,kind:"number"}):Ze.has(l.toUpperCase())?e.push({text:l,kind:"keyword"}):e.push({text:l,kind:"text"}),t=se.lastIndex}return t<a.length&&e.push({text:a.slice(t),kind:"text"}),e}const Xe={keyword:"text-primary font-semibold",string:"text-emerald-600 dark:text-emerald-400",number:"text-amber-600 dark:text-amber-400",placeholder:"text-primary font-semibold",identifier:"text-muted-foreground",text:""};function Ce(a){const e=P.c(16),{sql:t,wrap:o,inline:l,className:r}=a,c=o===void 0?!1:o,p=l===void 0?!1:l;let u,d,h,i;if(e[0]!==r||e[1]!==p||e[2]!==t||e[3]!==c){const g=Qe(t);u=p?"span":"code";const f=c?"break-words whitespace-pre-wrap":"block max-w-full truncate";e[8]!==r||e[9]!==f?(d=N("font-mono text-xs",f,r),e[8]=r,e[9]=f,e[10]=d):d=e[10],h=c?void 0:t,i=g.map(et),e[0]=r,e[1]=p,e[2]=t,e[3]=c,e[4]=u,e[5]=d,e[6]=h,e[7]=i}else u=e[4],d=e[5],h=e[6],i=e[7];let x;return e[11]!==u||e[12]!==d||e[13]!==h||e[14]!==i?(x=n.jsx(u,{className:d,title:h,children:i}),e[11]=u,e[12]=d,e[13]=h,e[14]=i,e[15]=x):x=e[15],x}function et(a,e){return n.jsx("span",{className:Xe[a.kind]||void 0,children:a.text},e)}function tt(a){const e=P.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let o;return e[2]!==t?(o=n.jsx(We,{"data-slot":"hover-card",...t}),e[2]=t,e[3]=o):o=e[3],o}function nt(a){const e=P.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let o;return e[2]!==t?(o=n.jsx(Ke,{"data-slot":"hover-card-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function rt(a){const e=P.c(12);let t,o,l,r;e[0]!==a?({className:t,align:l,sideOffset:r,...o}=a,e[0]=a,e[1]=t,e[2]=o,e[3]=l,e[4]=r):(t=e[1],o=e[2],l=e[3],r=e[4]);const c=l===void 0?"center":l,p=r===void 0?4:r;let u;e[5]!==t?(u=N("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),e[5]=t,e[6]=u):u=e[6];let d;return e[7]!==c||e[8]!==o||e[9]!==p||e[10]!==u?(d=n.jsx(Ye,{"data-slot":"hover-card-portal",children:n.jsx(Je,{"data-slot":"hover-card-content",align:c,sideOffset:p,className:u,...o})}),e[7]=c,e[8]=o,e[9]=p,e[10]=u,e[11]=d):d=e[11],d}const xe={query:"bg-sky-500",transaction:"bg-sky-300",cache_event:"bg-violet-500",outgoing_request:"bg-orange-500",mail:"bg-pink-500",broadcast:"bg-teal-500",enqueued_job:"bg-amber-500",view_render:"bg-emerald-500",storage_op:"bg-indigo-500",exception:"bg-red-500",log:"bg-neutral-400",span:"bg-fuchsia-500",attachment:"bg-lime-500",llm_call:"bg-cyan-400"},de={query:"Query",cache_event:"Cache",outgoing_request:"Outgoing",mail:"Mail",broadcast:"Broadcast",log:"Log",exception:"Exception",view_render:"View",storage_op:"Storage",enqueued_job:"Job",transaction:"Transaction",span:"Span",attachment:"Attachment",llm_call:"LLM"},ot=["middleware_before","action","render","middleware_after","body"],ue={middleware_before:"before middleware",action:"action",render:"render",middleware_after:"after middleware",body:"body"},ae=[10,25,50,100,250,500,1e3,2500,5e3,1e4,3e4,6e4];function st(a){const e=a/8;return ae.find(t=>t>=e)??ae[ae.length-1]}function at(a,e){const t=[];for(let o=0;o<=a;o+=e)t.push(o);return t}const le="grid grid-cols-[6rem_1fr_3.5rem] items-center gap-2 md:grid-cols-[5rem_13rem_1fr_4rem]",ie="hidden md:block";function he(a){const e=P.c(32),{entry:t,showSource:o}=a;let l;e[0]!==t.detail?(l=t.detail??{},e[0]=t.detail,e[1]=l):l=e[1];const r=l,c=de[t.type]??t.type;let p;e[2]!==c?(p=n.jsx("span",{children:c}),e[2]=c,e[3]=p):p=e[3];let u;e[4]!==t.stage?(u=t.stage&&n.jsxs("span",{children:["· ",ue[t.stage]??t.stage]}),e[4]=t.stage,e[5]=u):u=e[5];let d;e[6]!==p||e[7]!==u?(d=n.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-[10px] tracking-wide uppercase",children:[p,u]}),e[6]=p,e[7]=u,e[8]=d):d=e[8];let h;e[9]!==r||e[10]!==t.label||e[11]!==t.sql||e[12]!==t.type||e[13]!==o?(h=t.type==="query"&&t.sql?n.jsx(Ce,{sql:t.sql,wrap:!0,className:"text-[11px]"}):t.type==="cache_event"?n.jsxs("div",{className:"font-mono text-xs break-all",children:[String(r.op??"")," ",n.jsx("span",{className:"font-semibold",children:String(r.key??"")})]}):t.type==="outgoing_request"?n.jsxs("div",{className:"font-mono text-xs break-all",children:[String(r.method??"")," ",String(r.url??t.label),r.status!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" → ",String(r.status)]}),o&&typeof r.body=="string"&&r.body!==""&&n.jsx("pre",{className:"bg-muted mt-1.5 max-h-48 overflow-auto rounded p-2 text-[10px] break-all whitespace-pre-wrap",children:r.body})]}):t.type==="llm_call"?n.jsxs("div",{className:"font-mono text-xs break-all",children:[String(r.tool??t.label),r.input_tokens!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(r.input_tokens)," in / ",String(r.output_tokens??0)," out"]}),r.cost!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",Le(Number(r.cost))]}),r.step!=null&&n.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(r.workflow??"")," / ",String(r.step)]}),r.error!=null&&n.jsx("div",{className:"text-destructive mt-1",children:String(r.error)})]}):t.type==="mail"?n.jsx("div",{className:"font-mono text-xs break-all",children:String(r.subject??t.label)}):t.type==="log"?n.jsxs("div",{className:"font-mono text-xs break-words",children:[n.jsx("span",{className:"text-muted-foreground uppercase",children:String(r.level??"")})," ",String(r.message??t.label)]}):t.type==="exception"?n.jsx("div",{className:"text-destructive font-mono text-xs break-words",children:t.label}):n.jsx("div",{className:"font-mono text-xs break-words",children:t.label}),e[9]=r,e[10]=t.label,e[11]=t.sql,e[12]=t.type,e[13]=o,e[14]=h):h=e[14];let i;e[15]!==t.offset?(i=L(t.offset),e[15]=t.offset,e[16]=i):i=e[16];let x;e[17]!==i?(x=n.jsxs("span",{children:["+",i]}),e[17]=i,e[18]=x):x=e[18];let g;e[19]!==t.duration?(g=t.duration!=null&&n.jsx("span",{children:L(t.duration)}),e[19]=t.duration,e[20]=g):g=e[20];let m;e[21]!==x||e[22]!==g?(m=n.jsxs("div",{className:"text-muted-foreground flex flex-wrap gap-x-3 text-[11px] tabular-nums",children:[x,g]}),e[21]=x,e[22]=g,e[23]=m):m=e[23];let f;e[24]!==t.source||e[25]!==o?(f=o&&t.source&&n.jsx("div",{className:"text-muted-foreground border-t pt-1 font-mono text-[11px] break-all",children:t.source}),e[24]=t.source,e[25]=o,e[26]=f):f=e[26];let y;return e[27]!==m||e[28]!==f||e[29]!==d||e[30]!==h?(y=n.jsxs("div",{className:"space-y-1.5",children:[d,h,m,f]}),e[27]=m,e[28]=f,e[29]=d,e[30]=h,e[31]=y):y=e[31],y}function ge(a){const e=P.c(7),{ticks:t,span:o}=a;let l;if(e[0]!==o||e[1]!==t){let c;e[3]!==o?(c=p=>n.jsx("div",{className:"bg-border/60 pointer-events-none absolute top-0 h-full w-px",style:{left:`${p/o*100}%`}},p),e[3]=o,e[4]=c):c=e[4],l=t.map(c),e[0]=o,e[1]=t,e[2]=l}else l=e[2];let r;return e[5]!==l?(r=n.jsx(n.Fragment,{children:l}),e[5]=l,e[6]=r):r=e[6],r}function xt(a){const e=P.c(70),{entries:t,total:o,stages:l}=a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=new Set,e[0]=r):r=e[0];const[c,p]=b.useState(r),[u,d]=b.useState(null);let h;e[1]!==t||e[2]!==o?(h=Math.max(o,...t.map(lt),1),e[1]=t,e[2]=o,e[3]=h):h=e[3];const i=h;let x,g,m,f,y,w,S,E;if(e[4]!==t||e[5]!==u||e[6]!==c||e[7]!==i||e[8]!==l){const we=st(i),k=at(i,we);let _;if(e[17]!==t){_=new Map;for(const s of t)_.set(s.type,(_.get(s.type)??0)+1);e[17]=t,e[18]=_}else _=e[18];const M=_;let q;e[19]!==c?(q=s=>!c.has(s.type),e[19]=c,e[20]=q):q=e[20];const me=t.filter(q);let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=function(v){p(T=>{const I=new Set(T);return I.has(v)?I.delete(v):I.add(v),I})},e[21]=U):U=e[21];const Se=U;let F;e[22]!==l?(F=s=>l[s]!==void 0,e[22]=l,e[23]=F):F=e[23];let z;e[24]!==l?(z=(s,v)=>{const T=s.length>0?s[s.length-1].start+s[s.length-1].width:0;return s.push({name:v,start:T,width:l[v]}),s},e[24]=l,e[25]=z):z=e[25];const Ee=ot.filter(F).reduce(z,[]);w="space-y-2",e[26]!==M||e[27]!==c?(S=M.size>0&&n.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:[...M.entries()].map(s=>{const[v,T]=s;return n.jsxs("button",{type:"button",onClick:()=>Se(v),className:N("flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] font-medium transition-colors",c.has(v)?"text-muted-foreground opacity-50":"hover:bg-muted/60"),children:[n.jsx("span",{className:N("size-1.5 rounded-full",xe[v]??"bg-neutral-500")}),de[v]??v,n.jsx("span",{className:"text-muted-foreground tabular-nums",children:T})]},v)})}),e[26]=M,e[27]=c,e[28]=S):S=e[28];let B,G,V;e[29]===Symbol.for("react.memo_cache_sentinel")?(B=N(le,"px-2 text-[10px]"),G=n.jsx("div",{className:ie}),V=n.jsx("div",{}),e[29]=B,e[30]=G,e[31]=V):(B=e[29],G=e[30],V=e[31]);let W;e[32]!==i?(W=s=>n.jsx("span",{className:"text-muted-foreground absolute -translate-x-1/2 tabular-nums",style:{left:`${s/i*100}%`},children:L(s,0)},s),e[32]=i,e[33]=W):W=e[33];const ne=k.map(W);let O;e[34]!==ne?(O=n.jsx("div",{className:"relative h-4 select-none",children:ne}),e[34]=ne,e[35]=O):O=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("div",{}),e[36]=K):K=e[36],e[37]!==O?(E=n.jsxs("div",{className:B,children:[G,V,O,K]}),e[37]=O,e[38]=E):E=e[38];let Y,J,Z;e[39]===Symbol.for("react.memo_cache_sentinel")?(Y=N(le,"px-2"),J=n.jsx("div",{className:ie}),Z=n.jsx("div",{}),e[39]=Y,e[40]=J,e[41]=Z):(Y=e[39],J=e[40],Z=e[41]);let H;e[42]!==i||e[43]!==k?(H=n.jsx(ge,{ticks:k,span:i}),e[42]=i,e[43]=k,e[44]=H):H=e[44];let Q;e[45]!==i?(Q=s=>n.jsxs("div",{className:"border-background bg-primary/20 absolute top-0 flex h-full items-center overflow-hidden border-r px-1 whitespace-nowrap",style:{left:`${s.start/i*100}%`,width:`${s.width/i*100}%`},title:`${ue[s.name]??s.name} ${L(s.width)}`,children:[ue[s.name]??s.name," ",L(s.width,0)]},s.name),e[45]=i,e[46]=Q):Q=e[46];const re=Ee.map(Q);let D;e[47]!==H||e[48]!==re?(D=n.jsxs("div",{className:"bg-muted/40 relative h-5 overflow-hidden rounded text-[10px]",children:[H,re]}),e[47]=H,e[48]=re,e[49]=D):D=e[49];let X;e[50]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx("div",{}),e[50]=X):X=e[50],e[51]!==D?(x=n.jsxs("div",{className:Y,children:[J,Z,D,X]}),e[51]=D,e[52]=x):x=e[52],g="max-h-[32rem] overflow-y-auto rounded-lg border",e[53]!==t.length?(m=t.length===0&&n.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No child events recorded."}),e[53]=t.length,e[54]=m):m=e[54],f=t.length>0&&me.length===0&&n.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No events match the active filters."});let ee;e[55]!==u||e[56]!==i||e[57]!==k?(ee=s=>{const v=`${s.type}-${s.id}`,T=i>0&&(s.duration??0)/i>.1,I=s.type==="exception";return n.jsxs("div",{className:"border-b last:border-b-0",style:{contentVisibility:"auto",containIntrinsicSize:"0 28px"},children:[n.jsxs(tt,{openDelay:150,children:[n.jsx(nt,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:()=>d(u===v?null:v),className:N(le,"hover:bg-muted/40 w-full px-2 py-1 text-left text-xs"),children:[n.jsx("span",{className:N("text-muted-foreground truncate font-mono",ie),children:de[s.type]??s.type}),s.type==="query"&&s.sql?n.jsx(Ce,{sql:s.sql}):n.jsx("span",{className:"truncate font-mono",children:s.label}),n.jsxs("div",{className:"bg-muted/30 relative h-3 rounded",children:[n.jsx(ge,{ticks:k,span:i}),I?n.jsx("div",{className:"absolute top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rotate-45 bg-red-500",style:{left:`${Math.min(100,s.offset/i*100)}%`}}):n.jsx("div",{className:N("absolute top-0 h-full rounded",xe[s.type]??"bg-neutral-500",T?"ring-foreground/30 opacity-100 ring-1 ring-inset":"opacity-70"),style:{left:`${Math.min(100,s.offset/i*100)}%`,width:`${Math.max(.3,(s.duration??0)/i*100)}%`}})]}),n.jsx("span",{className:N("text-muted-foreground text-right tabular-nums",T&&"text-foreground font-semibold"),children:s.duration!=null?L(s.duration):"–"})]})}),n.jsx(rt,{className:"w-80",align:"start",children:n.jsx(he,{entry:s})})]}),u===v&&n.jsx("div",{className:"bg-muted/20 border-t px-4 py-2",children:n.jsx(he,{entry:s,showSource:!0})})]},v)},e[55]=u,e[56]=i,e[57]=k,e[58]=ee):ee=e[58],y=me.map(ee),e[4]=t,e[5]=u,e[6]=c,e[7]=i,e[8]=l,e[9]=x,e[10]=g,e[11]=m,e[12]=f,e[13]=y,e[14]=w,e[15]=S,e[16]=E}else x=e[9],g=e[10],m=e[11],f=e[12],y=e[13],w=e[14],S=e[15],E=e[16];let R;e[59]!==g||e[60]!==m||e[61]!==f||e[62]!==y?(R=n.jsxs("div",{className:g,children:[m,f,y]}),e[59]=g,e[60]=m,e[61]=f,e[62]=y,e[63]=R):R=e[63];let A;return e[64]!==x||e[65]!==R||e[66]!==w||e[67]!==S||e[68]!==E?(A=n.jsxs("div",{className:w,children:[S,E,x,R]}),e[64]=x,e[65]=R,e[66]=w,e[67]=S,e[68]=E,e[69]=A):A=e[69],A}function lt(a){return a.offset+(a.duration??0)}export{Ce as S,xt as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,aK as b,a3 as oe}from"./inertia-
|
|
1
|
+
import{r as i,aK as b,a3 as oe}from"./inertia-DLew8ZNx.js";var Ae=Object.defineProperty,Ne=(e,t,n)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(Ne(e,typeof t!="symbol"?t+"":t,n),n);let ke=class{constructor(){Q(this,"current",this.detect()),Q(this,"handoffState","pending"),Q(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},D=new ke;function Pe(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function q(){let e=[],t={addEventListener(n,r,l,s){return n.addEventListener(r,l,s),t.add(()=>n.removeEventListener(r,l,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Pe(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,l){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:l}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=q();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let l of e.splice(r,1))l()}},dispose(){for(let n of e.splice(0))n()}};return t}function de(){let[e]=i.useState(q);return i.useEffect(()=>()=>e.dispose(),[e]),e}let O=(e,t)=>{D.isServer?i.useEffect(e,t):i.useLayoutEffect(e,t)};function pe(e){let t=i.useRef(e);return O(()=>{t.current=e},[e]),t}let $=function(e){let t=pe(e);return b.useCallback((...n)=>t.current(...n),[t])};function X(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function K(e,t,...n){if(e in t){let l=t[e];return typeof l=="function"?l(...n):l}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(l=>`"${l}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,K),r}var me=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(me||{}),T=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(T||{});function he(){let e=He();return i.useCallback(t=>xe({mergeRefs:e,...t}),[e])}function xe({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:l,visible:s=!0,name:f,mergeRefs:u}){u=u??Le;let a=ve(t,e);if(s)return M(a,n,r,f,u);let p=l??0;if(p&2){let{static:o=!1,...h}=a;if(o)return M(h,n,r,f,u)}if(p&1){let{unmount:o=!0,...h}=a;return K(o?0:1,{0(){return null},1(){return M({...h,hidden:!0,style:{display:"none"}},n,r,f,u)}})}return M(a,n,r,f,u)}function M(e,t={},n,r,l){let{as:s=n,children:f,refName:u="ref",...a}=W(e,["unmount","static"]),p=e.ref!==void 0?{[u]:e.ref}:{},o=typeof f=="function"?f(t):f;o=ge(o),"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let h={};if(t){let g=!1,d=[];for(let[c,v]of Object.entries(t))typeof v=="boolean"&&(g=!0),v===!0&&d.push(c.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(g){h["data-headlessui-state"]=d.join(" ");for(let c of d)h[`data-${c}`]=""}}if(x(s)&&(Object.keys(R(a)).length>0||Object.keys(R(h)).length>0))if(!i.isValidElement(o)||Array.isArray(o)&&o.length>1||Ie(o)){if(Object.keys(R(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(R(a)).concat(Object.keys(R(h))).map(g=>` - ${g}`).join(`
|
|
2
2
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
|
|
3
3
|
`)].join(`
|
|
4
4
|
`))}else{let g=o.props,d=g?.className,c=typeof d=="function"?(...E)=>X(d(...E),a.className):X(d,a.className),v=c?{className:c}:{},m=ve(o.props,R(W(a,["ref"])));for(let E in h)E in m&&delete h[E];return i.cloneElement(o,Object.assign({},m,h,p,{ref:l(Ue(o),p.ref)},v))}return i.createElement(s,Object.assign({},W(a,["ref"]),!x(s)&&p,!x(s)&&h),o)}function He(){let e=i.useRef([]),t=i.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Le(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ve(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):t[l]=r[l];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[l=>{var s;return(s=l?.preventDefault)==null?void 0:s.call(l)}]);for(let r in n)Object.assign(t,{[r](l,...s){let f=n[r];for(let u of f){if((l instanceof Event||l?.nativeEvent instanceof Event)&&l.defaultPrevented)return;u(l,...s)}}});return t}function ee(e){var t;return Object.assign(i.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function R(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function W(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Ue(e){return b.version.split(".")[0]>="19"?e.props.ref:e.ref}function ge(e){if(e!=null&&e.$$typeof===Symbol.for("react.lazy")){let t=e._payload;if(t!=null&&t.status==="fulfilled")return ge(t.value)}return e}function x(e){return e===i.Fragment||e===Symbol.for("react.fragment")}function Ie(e){return x(e.type)}let Me=Symbol();function ye(...e){let t=i.useRef(e);i.useEffect(()=>{t.current=e},[e]);let n=$(r=>{for(let l of t.current)l!=null&&(typeof l=="function"?l(r):l.current=r)});return e.every(r=>r==null||r?.[Me])?void 0:n}function De(e=0){let[t,n]=i.useState(e),r=i.useCallback(a=>n(a),[]),l=i.useCallback(a=>n(p=>p|a),[]),s=i.useCallback(a=>(t&a)===a,[t]),f=i.useCallback(a=>n(p=>p&~a),[]),u=i.useCallback(a=>n(p=>p^a),[]);return{flags:t,setFlag:r,addFlag:l,hasFlag:s,removeFlag:f,toggleFlag:u}}var qe={},fe,ce;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((fe=process==null?void 0:qe)==null?void 0:fe.NODE_ENV)==="test"&&typeof((ce=Element?.prototype)==null?void 0:ce.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as i,c as l,r as p}from"./inertia-
|
|
1
|
+
import{B as i,c as l,r as p}from"./inertia-DLew8ZNx.js";const u=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],f=i("copy",u);function x(){const e=l.c(3),[o,c]=p.useState(null);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async a=>{if(!navigator?.clipboard)return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(a),c(a),!0}catch(s){return console.warn("Copy failed",s),c(null),!1}},e[0]=t):t=e[0];const n=t;let r;return e[1]!==o?(r=[o,n],e[1]=o,e[2]=r):r=e[2],r}export{f as C,x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,c as nt,e as it}from"./inertia-CUTKXjxg.js";var C={logger:typeof console<"u"?console:void 0,WebSocket:typeof WebSocket<"u"?WebSocket:void 0},i={log(...n){this.enabled&&(n.push(Date.now()),C.logger.log("[ActionCable]",...n))}};const g=()=>new Date().getTime(),k=n=>(g()-n)/1e3;class x{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=g(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),i.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=g(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),i.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordMessage(){this.pingedAt=g()}recordConnect(){this.reconnectAttempts=0,delete this.disconnectedAt,i.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=g(),i.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:e}=this.constructor,s=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),r=(this.reconnectAttempts===0?1:e)*Math.random();return t*1e3*s*(1+r)}reconnectIfStale(){this.connectionIsStale()&&(i.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${k(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?i.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${k(this.disconnectedAt)} s`):(i.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return k(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&k(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout((()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(i.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}x.staleThreshold=6;x.reconnectionBackoffRate=.15;var V={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:p,protocols:W}=V,st=W.slice(0,W.length-1),F=[].indexOf;class j{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new x(this),this.disconnected=!0}send(t){return this.isOpen()?(this.webSocket.send(JSON.stringify(t)),!0):!1}open(){if(this.isActive())return i.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const t=[...W,...this.consumer.subprotocols||[]];return i.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${t}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new C.WebSocket(this.consumer.url,t),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(i.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(t){i.log("Failed to reopen WebSocket",t)}finally{i.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return F.call(st,this.getProtocol())>=0}isState(...t){return F.call(t,this.getState())>=0}getState(){if(this.webSocket){for(let t in C.WebSocket)if(C.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase()}return null}installEventHandlers(){for(let t in this.events){const e=this.events[t].bind(this);this.webSocket[`on${t}`]=e}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}j.reopenDelay=500;j.prototype.events={message(n){if(!this.isProtocolSupported())return;const{identifier:t,message:e,reason:s,reconnect:o,type:r}=JSON.parse(n.data);switch(this.monitor.recordMessage(),r){case p.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case p.disconnect:return i.log(`Disconnecting. Reason: ${s}`),this.close({allowReconnect:o});case p.ping:return null;case p.confirmation:return this.subscriptions.confirmSubscription(t),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(t,"connected",{reconnected:!0})):this.subscriptions.notify(t,"connected",{reconnected:!1});case p.rejection:return this.subscriptions.reject(t);default:return this.subscriptions.notify(t,"received",e)}},open(){if(i.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return i.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(n){if(i.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){i.log("WebSocket onerror event")}};const ot=function(n,t){if(t!=null)for(let e in t){const s=t[e];n[e]=s}return n};class rt{constructor(t,e={},s){this.consumer=t,this.identifier=JSON.stringify(e),ot(this,s)}perform(t,e={}){return e.action=t,this.send(e)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class ct{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){this.pendingSubscriptions.indexOf(t)==-1?(i.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):i.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){i.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==t))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map((t=>{i.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)}))}),500)}}class lt{constructor(t){this.consumer=t,this.guarantor=new ct(this),this.subscriptions=[]}create(t,e){const s=t,o=typeof s=="object"?s:{channel:s},r=new rt(this.consumer,o,e);return this.add(r)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map((e=>(this.forget(e),this.notify(e,"rejected"),e)))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((e=>e!==t)),t}findAll(t){return this.subscriptions.filter((e=>e.identifier===t))}reload(){return this.subscriptions.map((t=>this.subscribe(t)))}notifyAll(t,...e){return this.subscriptions.map((s=>this.notify(s,t,...e)))}notify(t,e,...s){let o;return typeof t=="string"?o=this.findAll(t):o=[t],o.map((r=>typeof r[e]=="function"?r[e](...s):void 0))}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){i.log(`Subscription confirmed ${t}`),this.findAll(t).map((e=>this.guarantor.forget(e)))}sendCommand(t,e){const{identifier:s}=t;return this.consumer.send({command:e,identifier:s})}}class ut{constructor(t){this._url=t,this.subscriptions=new lt(this),this.connection=new j(this),this.subprotocols=[]}get url(){return at(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(t){this.subprotocols=[...this.subprotocols,t]}}function at(n){if(typeof n=="function"&&(n=n()),n&&!/^wss?:/i.test(n)){const t=document.createElement("a");return t.href=n,t.href=t.href,t.protocol=t.protocol.replace("http","ws"),t.href}else return n}function ht(n=dt("url")||V.default_mount_path){return new ut(n)}function dt(n){const t=document.head.querySelector(`meta[name='action-cable-${n}']`);if(t)return t.getAttribute("content")}let U;function ft(){return U??=ht(),U}const pt=5e3,q="railwatch:live-paused";let L=!1;const O=new Set;function z(n){if(L!==n){L=n;for(const t of O)t()}}function gt(n){return O.add(n),()=>{O.delete(n)}}function Rt(){return c.useSyncExternalStore(gt,bt,mt)}function mt(){return!1}function bt(){return L}function kt(n,t){const e=nt.c(19);let s;e[0]!==t?(s={},e[0]=t,e[1]=s):s=e[1];const{only:o,onEvent:r}=s,[u,T]=c.useState(!1),[E,G]=c.useState(null),[_,N]=c.useState(null),[K,Y]=c.useState(n);K!==n&&(Y(n),T(!1),G(null),N(null));const[l,Q]=c.useState(At),I=c.useRef(o),H=c.useRef(r),$=c.useRef(l);let m;e[2]!==r||e[3]!==o||e[4]!==l?(m=()=>{I.current=o,H.current=r,$.current=l},e[2]=r,e[3]=o,e[4]=l,e[5]=m):m=e[5],c.useEffect(m);const P=c.useRef(vt);let b,S;e[6]!==u||e[7]!==l?(b=()=>(z(u&&!l),yt),S=[u,l],e[6]=u,e[7]=l,e[8]=b,e[9]=S):(b=e[8],S=e[9]),c.useEffect(b,S);let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=function(h){$.current=h,localStorage.setItem(q,h?"1":"0"),Q(h),P.current()},e[10]=y):y=e[10];const X=y;let v,A;e[11]!==n?(v=()=>{let a=!1,h=!1,D=!1,J=-1/0,R,M;const Z=function(){h=!1,D=!0,J=Date.now(),it.reload({only:I.current,onCancelToken:et=>{M=()=>et.cancel()},onSuccess:()=>{a||N(Date.now())},onFinish:()=>{M=void 0,D=!1,f()}})};function f(){if(clearTimeout(R),R=void 0,a||!h||D||$.current||document.visibilityState!=="visible")return;const d=pt-(Date.now()-J);d>0?R=setTimeout(f,d):Z()}const B=function(){f()};document.addEventListener("visibilitychange",B),P.current=f;const tt=ft().subscriptions.create({channel:"EnvironmentChannel",id:n},{connected:()=>{a||T(!0)},disconnected:()=>{a||T(!1)},received:d=>{a||(G(Date.now()),H.current?.(d),h=!0,f())}});return()=>{a=!0,M?.(),clearTimeout(R),P.current=St,document.removeEventListener("visibilitychange",B),tt.unsubscribe()}},A=[n],e[11]=n,e[12]=v,e[13]=A):(v=e[12],A=e[13]),c.useEffect(v,A);let w;return e[14]!==u||e[15]!==E||e[16]!==_||e[17]!==l?(w={connected:u,lastEventAt:E,lastRefreshedAt:_,paused:l,setPaused:X},e[14]=u,e[15]=E,e[16]=_,e[17]=l,e[18]=w):w=e[18],w}function St(){}function yt(){return z(!1)}function vt(){}function At(){return typeof window>"u"?!1:localStorage.getItem(q)==="1"}export{Rt as a,kt as u};
|
|
1
|
+
import{r as c,c as nt,e as it}from"./inertia-DLew8ZNx.js";var C={logger:typeof console<"u"?console:void 0,WebSocket:typeof WebSocket<"u"?WebSocket:void 0},i={log(...n){this.enabled&&(n.push(Date.now()),C.logger.log("[ActionCable]",...n))}};const g=()=>new Date().getTime(),k=n=>(g()-n)/1e3;class x{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=g(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),i.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=g(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),i.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordMessage(){this.pingedAt=g()}recordConnect(){this.reconnectAttempts=0,delete this.disconnectedAt,i.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=g(),i.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:e}=this.constructor,s=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),r=(this.reconnectAttempts===0?1:e)*Math.random();return t*1e3*s*(1+r)}reconnectIfStale(){this.connectionIsStale()&&(i.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${k(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?i.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${k(this.disconnectedAt)} s`):(i.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return k(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&k(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout((()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(i.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}x.staleThreshold=6;x.reconnectionBackoffRate=.15;var V={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:p,protocols:W}=V,st=W.slice(0,W.length-1),F=[].indexOf;class j{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new x(this),this.disconnected=!0}send(t){return this.isOpen()?(this.webSocket.send(JSON.stringify(t)),!0):!1}open(){if(this.isActive())return i.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const t=[...W,...this.consumer.subprotocols||[]];return i.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${t}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new C.WebSocket(this.consumer.url,t),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(i.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(t){i.log("Failed to reopen WebSocket",t)}finally{i.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return F.call(st,this.getProtocol())>=0}isState(...t){return F.call(t,this.getState())>=0}getState(){if(this.webSocket){for(let t in C.WebSocket)if(C.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase()}return null}installEventHandlers(){for(let t in this.events){const e=this.events[t].bind(this);this.webSocket[`on${t}`]=e}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}j.reopenDelay=500;j.prototype.events={message(n){if(!this.isProtocolSupported())return;const{identifier:t,message:e,reason:s,reconnect:o,type:r}=JSON.parse(n.data);switch(this.monitor.recordMessage(),r){case p.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case p.disconnect:return i.log(`Disconnecting. Reason: ${s}`),this.close({allowReconnect:o});case p.ping:return null;case p.confirmation:return this.subscriptions.confirmSubscription(t),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(t,"connected",{reconnected:!0})):this.subscriptions.notify(t,"connected",{reconnected:!1});case p.rejection:return this.subscriptions.reject(t);default:return this.subscriptions.notify(t,"received",e)}},open(){if(i.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return i.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(n){if(i.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){i.log("WebSocket onerror event")}};const ot=function(n,t){if(t!=null)for(let e in t){const s=t[e];n[e]=s}return n};class rt{constructor(t,e={},s){this.consumer=t,this.identifier=JSON.stringify(e),ot(this,s)}perform(t,e={}){return e.action=t,this.send(e)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class ct{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){this.pendingSubscriptions.indexOf(t)==-1?(i.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):i.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){i.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==t))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map((t=>{i.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)}))}),500)}}class lt{constructor(t){this.consumer=t,this.guarantor=new ct(this),this.subscriptions=[]}create(t,e){const s=t,o=typeof s=="object"?s:{channel:s},r=new rt(this.consumer,o,e);return this.add(r)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map((e=>(this.forget(e),this.notify(e,"rejected"),e)))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((e=>e!==t)),t}findAll(t){return this.subscriptions.filter((e=>e.identifier===t))}reload(){return this.subscriptions.map((t=>this.subscribe(t)))}notifyAll(t,...e){return this.subscriptions.map((s=>this.notify(s,t,...e)))}notify(t,e,...s){let o;return typeof t=="string"?o=this.findAll(t):o=[t],o.map((r=>typeof r[e]=="function"?r[e](...s):void 0))}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){i.log(`Subscription confirmed ${t}`),this.findAll(t).map((e=>this.guarantor.forget(e)))}sendCommand(t,e){const{identifier:s}=t;return this.consumer.send({command:e,identifier:s})}}class ut{constructor(t){this._url=t,this.subscriptions=new lt(this),this.connection=new j(this),this.subprotocols=[]}get url(){return at(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(t){this.subprotocols=[...this.subprotocols,t]}}function at(n){if(typeof n=="function"&&(n=n()),n&&!/^wss?:/i.test(n)){const t=document.createElement("a");return t.href=n,t.href=t.href,t.protocol=t.protocol.replace("http","ws"),t.href}else return n}function ht(n=dt("url")||V.default_mount_path){return new ut(n)}function dt(n){const t=document.head.querySelector(`meta[name='action-cable-${n}']`);if(t)return t.getAttribute("content")}let U;function ft(){return U??=ht(),U}const pt=5e3,q="railwatch:live-paused";let L=!1;const O=new Set;function z(n){if(L!==n){L=n;for(const t of O)t()}}function gt(n){return O.add(n),()=>{O.delete(n)}}function Rt(){return c.useSyncExternalStore(gt,bt,mt)}function mt(){return!1}function bt(){return L}function kt(n,t){const e=nt.c(19);let s;e[0]!==t?(s={},e[0]=t,e[1]=s):s=e[1];const{only:o,onEvent:r}=s,[u,T]=c.useState(!1),[E,G]=c.useState(null),[_,N]=c.useState(null),[K,Y]=c.useState(n);K!==n&&(Y(n),T(!1),G(null),N(null));const[l,Q]=c.useState(At),I=c.useRef(o),H=c.useRef(r),$=c.useRef(l);let m;e[2]!==r||e[3]!==o||e[4]!==l?(m=()=>{I.current=o,H.current=r,$.current=l},e[2]=r,e[3]=o,e[4]=l,e[5]=m):m=e[5],c.useEffect(m);const P=c.useRef(vt);let b,S;e[6]!==u||e[7]!==l?(b=()=>(z(u&&!l),yt),S=[u,l],e[6]=u,e[7]=l,e[8]=b,e[9]=S):(b=e[8],S=e[9]),c.useEffect(b,S);let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=function(h){$.current=h,localStorage.setItem(q,h?"1":"0"),Q(h),P.current()},e[10]=y):y=e[10];const X=y;let v,A;e[11]!==n?(v=()=>{let a=!1,h=!1,D=!1,J=-1/0,R,M;const Z=function(){h=!1,D=!0,J=Date.now(),it.reload({only:I.current,onCancelToken:et=>{M=()=>et.cancel()},onSuccess:()=>{a||N(Date.now())},onFinish:()=>{M=void 0,D=!1,f()}})};function f(){if(clearTimeout(R),R=void 0,a||!h||D||$.current||document.visibilityState!=="visible")return;const d=pt-(Date.now()-J);d>0?R=setTimeout(f,d):Z()}const B=function(){f()};document.addEventListener("visibilitychange",B),P.current=f;const tt=ft().subscriptions.create({channel:"EnvironmentChannel",id:n},{connected:()=>{a||T(!0)},disconnected:()=>{a||T(!1)},received:d=>{a||(G(Date.now()),H.current?.(d),h=!0,f())}});return()=>{a=!0,M?.(),clearTimeout(R),P.current=St,document.removeEventListener("visibilitychange",B),tt.unsubscribe()}},A=[n],e[11]=n,e[12]=v,e[13]=A):(v=e[12],A=e[13]),c.useEffect(v,A);let w;return e[14]!==u||e[15]!==E||e[16]!==_||e[17]!==l?(w={connected:u,lastEventAt:E,lastRefreshedAt:_,paused:l,setPaused:X},e[14]=u,e[15]=E,e[16]=_,e[17]=l,e[18]=w):w=e[18],w}function St(){}function yt(){return z(!1)}function vt(){}function At(){return typeof window>"u"?!1:localStorage.getItem(q)==="1"}export{Rt as a,kt as u};
|