railwatch 0.3.4 → 0.3.6
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 +41 -2
- data/app/channels/railwatch/environment_channel.rb +17 -4
- data/app/jobs/railwatch/prune_telemetry_job.rb +20 -1
- data/app/models/railwatch/ingest/batch.rb +1 -1
- data/app/models/railwatch/ingest/mapper.rb +1 -3
- data/app/models/railwatch/telemetry_record.rb +48 -0
- data/db/railwatch_telemetry_migrate/20260903000000_enable_incremental_vacuum.rb +62 -0
- data/docs/embedded.md +64 -7
- data/docs/getting-started.md +0 -2
- data/docs/source-maps.md +1 -3
- data/lib/generators/railwatch/install/install_generator.rb +0 -8
- data/lib/railwatch/backtrace.rb +12 -2
- data/lib/railwatch/configuration.rb +6 -5
- data/lib/railwatch/engine.rb +2 -2
- data/lib/railwatch/export/client.rb +10 -3
- data/lib/railwatch/reporter.rb +2 -12
- data/lib/railwatch/source_maps.rb +13 -1
- data/lib/railwatch/spec_helper.rb +1 -1
- data/lib/railwatch/transport/http.rb +14 -5
- data/lib/railwatch/version.rb +1 -1
- data/lib/tasks/railwatch_tasks.rake +161 -0
- data/public/railwatch/assets/{app-layout-yh-sPWgK.js → app-layout-B5Fcdwfz.js} +1 -1
- data/public/railwatch/assets/{app-wordmark-nbjkzxwQ.js → app-wordmark-1SRllgHv.js} +1 -1
- data/public/railwatch/assets/{appearance-CDuRvQTB.js → appearance-DbwahDrc.js} +1 -1
- data/public/railwatch/assets/application-CwshqwM6.css +1 -0
- data/public/railwatch/assets/{arrow-up-DVtOGdVA.js → arrow-up-DwKQcab4.js} +1 -1
- data/public/railwatch/assets/{auth-layout-TCwPpS1K.js → auth-layout-DXfxXAN_.js} +1 -1
- data/public/railwatch/assets/{badge-Daw4Hvr8.js → badge-CApjyWcg.js} +1 -1
- data/public/railwatch/assets/{braces-DhFbHPsz.js → braces-kGSgxWnS.js} +1 -1
- data/public/railwatch/assets/{card-BX_3HXcJ.js → card-BaJ8kNkp.js} +1 -1
- data/public/railwatch/assets/{chart-B14-N9g7.js → chart-Xnrz1Nqw.js} +1 -1
- data/public/railwatch/assets/{chart-hover-Vy52H4uD.js → chart-hover-XYPNE2CX.js} +1 -1
- data/public/railwatch/assets/{chart-panel-Cb4S_ej_.js → chart-panel-BYk68mJJ.js} +1 -1
- data/public/railwatch/assets/{checkbox-D3aRSsBj.js → checkbox-Bf41R8W6.js} +1 -1
- data/public/railwatch/assets/{code-KvW8k7Jr.js → code-a-9sh36A.js} +1 -1
- data/public/railwatch/assets/{copy-block-BKFGd11J.js → copy-block-zykZWQym.js} +1 -1
- data/public/railwatch/assets/{copy-id-Djks1fXB.js → copy-id-b6CW5ESL.js} +1 -1
- data/public/railwatch/assets/{cursor-load-more-BXV0f1D_.js → cursor-load-more-0cHzbTPT.js} +1 -1
- data/public/railwatch/assets/{data-table-iv1bdF6u.js → data-table-IvA7xvrK.js} +1 -1
- data/public/railwatch/assets/{edit-BZc_Iawe.js → edit-7lmf3k80.js} +1 -1
- data/public/railwatch/assets/{edit-__9yJlO3.js → edit-DTtRV1fO.js} +1 -1
- data/public/railwatch/assets/{edit-DMKUF8Zi.js → edit-ZKE15r-F.js} +1 -1
- data/public/railwatch/assets/{empty-state-6j_0AaQQ.js → empty-state-BFTnQ2oT.js} +1 -1
- data/public/railwatch/assets/env-layout-erSDpIXg.js +1 -0
- data/public/railwatch/assets/{execution-path-CzgBUi5e.js → execution-path-Di5uUHi-.js} +1 -1
- data/public/railwatch/assets/{filter-bar-9SU5NrzX.js → filter-bar-Btm__gQi.js} +1 -1
- data/public/railwatch/assets/{flamegraph-qcekju8V.js → flamegraph-C-mZdqa7.js} +1 -1
- data/public/railwatch/assets/{frames-Cyu7KMxZ.js → frames-KZBsjg6-.js} +1 -1
- data/public/railwatch/assets/{google-sign-in-button-DsTSfmzY.js → google-sign-in-button-DJRoD72g.js} +1 -1
- data/public/railwatch/assets/index-9LL_C3eG.js +1 -0
- data/public/railwatch/assets/index-B-bSm1jB.js +1 -0
- data/public/railwatch/assets/{index-OqI59zPb.js → index-B0VXzXYG.js} +1 -1
- data/public/railwatch/assets/index-BAkZNNEh.js +1 -0
- data/public/railwatch/assets/{index-Cmlwy1-V.js → index-BWSyQRZI.js} +1 -1
- data/public/railwatch/assets/index-Bjw4sTXU.js +1 -0
- data/public/railwatch/assets/index-Bo8hrjbs.js +1 -0
- data/public/railwatch/assets/index-BoTOVM0v.js +1 -0
- data/public/railwatch/assets/index-Bot7kHMA.js +1 -0
- data/public/railwatch/assets/index-BsrCnQqg.js +1 -0
- data/public/railwatch/assets/index-BtSlLmkg.js +1 -0
- data/public/railwatch/assets/{index-BRiq3SNR.js → index-CAzQkw-h.js} +1 -1
- data/public/railwatch/assets/index-CBJZQgHA.js +1 -0
- data/public/railwatch/assets/index-CIUl9POV.js +1 -0
- data/public/railwatch/assets/{index-DlumCsWY.js → index-CP6jrrPT.js} +2 -2
- data/public/railwatch/assets/index-CU6yhEyt.js +1 -0
- data/public/railwatch/assets/{index-1ol1-QWI.js → index-CX8Br7m9.js} +1 -1
- data/public/railwatch/assets/index-CYYmZpZu.js +1 -0
- data/public/railwatch/assets/{index-DU9F5b5d.js → index-CeqMDByC.js} +1 -1
- data/public/railwatch/assets/index-Cj3_jD1E.js +1 -0
- data/public/railwatch/assets/index-D4968-TC.js +1 -0
- data/public/railwatch/assets/index-DAEzO_vq.js +1 -0
- data/public/railwatch/assets/index-DBTxQw77.js +1 -0
- data/public/railwatch/assets/index-DCAho97K.js +1 -0
- data/public/railwatch/assets/index-DEfu_YvU.js +1 -0
- data/public/railwatch/assets/{index-CeYKnapu.js → index-DXUwhSCQ.js} +1 -1
- data/public/railwatch/assets/index-DcItJxa5.js +1 -0
- data/public/railwatch/assets/index-EGU__DOB.js +1 -0
- data/public/railwatch/assets/index-HCJmFcZu.js +1 -0
- data/public/railwatch/assets/index-P_e_cI0O.js +1 -0
- data/public/railwatch/assets/index-QyHE9WsU.js +1 -0
- data/public/railwatch/assets/index-Z1c4nFL0.js +1 -0
- data/public/railwatch/assets/index-kNhZPLVj.js +1 -0
- data/public/railwatch/assets/index-uHBVO8Lh.js +1 -0
- data/public/railwatch/assets/index-wOj5j0KC.js +1 -0
- data/public/railwatch/assets/{inertia-TViv6kNv.js → inertia-Degv_G9N.js} +2 -2
- data/public/railwatch/assets/{input-error-LxImUkxv.js → input-error-C6SqO_iU.js} +1 -1
- data/public/railwatch/assets/{json-viewer-Ar4cjPDW.js → json-viewer-DcQIxT86.js} +1 -1
- data/public/railwatch/assets/klass-WgQEfWpo.js +1 -0
- data/public/railwatch/assets/{label-COUKWqE_.js → label-B_vK19tR.js} +1 -1
- data/public/railwatch/assets/{layout-DNSLAkw_.js → layout-C8q7GUlZ.js} +1 -1
- data/public/railwatch/assets/{live-dot-ChfUtY3p.js → live-dot-DaXEbkXo.js} +1 -1
- data/public/railwatch/assets/{nav-CNnDqPlm.js → nav-BnD5XArZ.js} +1 -1
- data/public/railwatch/assets/{new-Be55nmt9.js → new-BL9OqXHe.js} +1 -1
- data/public/railwatch/assets/{new-D05SajFR.js → new-BhRnQn4w.js} +1 -1
- data/public/railwatch/assets/{new-Bi_xQiIb.js → new-BqP0NhOF.js} +1 -1
- data/public/railwatch/assets/{new-BvCT8TMg.js → new-CWP3wtwt.js} +1 -1
- data/public/railwatch/assets/{new-D4uewYC8.js → new-DIjwu2jF.js} +1 -1
- data/public/railwatch/assets/{new-84S8ZJq9.js → new-uxMnBtoY.js} +1 -1
- data/public/railwatch/assets/{onboarding-CYZi5Cqc.js → onboarding-C_Y3xTsH.js} +1 -1
- data/public/railwatch/assets/{origin-identity-6q1-CBts.js → origin-identity-CNhOnfBa.js} +1 -1
- data/public/railwatch/assets/{percentile-picker-gFZCXtdb.js → percentile-picker-BujVEhP6.js} +1 -1
- data/public/railwatch/assets/{relative-time-IOOgl5n2.js → relative-time-6CoKr1lN.js} +1 -1
- data/public/railwatch/assets/release-health-1Qzc_XhT.js +1 -0
- data/public/railwatch/assets/route-xqgYjOwJ.js +1 -0
- data/public/railwatch/assets/{segmented-h1VdDTqE.js → segmented-CVKq2Xpa.js} +1 -1
- data/public/railwatch/assets/{select-_AJsUa7X.js → select-CsmSXsJ4.js} +1 -1
- data/public/railwatch/assets/{separator-BwwTYtCF.js → separator-CrM10Oot.js} +1 -1
- data/public/railwatch/assets/{series-chart-DaFPefku.js → series-chart-D33UhdG2.js} +1 -1
- data/public/railwatch/assets/{show-C8sHalnw.js → show-8H9WAGav.js} +1 -1
- data/public/railwatch/assets/show-9jDeBNpc.js +1 -0
- data/public/railwatch/assets/{show-DACku6AD.js → show-B0nHy31L.js} +3 -3
- data/public/railwatch/assets/{show-C4Ltf5i9.js → show-B3izvRdU.js} +1 -1
- data/public/railwatch/assets/show-B7NhcWgp.js +1 -0
- data/public/railwatch/assets/show-BM-E2iYc.js +1 -0
- data/public/railwatch/assets/show-BlNR3ZOZ.js +1 -0
- data/public/railwatch/assets/{show-DgSIoRvA.js → show-CJMeX75E.js} +1 -1
- data/public/railwatch/assets/{show-CeTL4B37.js → show-CMisHNAI.js} +2 -2
- data/public/railwatch/assets/{show-JxFtB4eK.js → show-CQ4Ze-Un.js} +2 -2
- data/public/railwatch/assets/{show-BM6X2Mpo.js → show-CvNV23gH.js} +1 -1
- data/public/railwatch/assets/show-DMZlwzL_.js +1 -0
- data/public/railwatch/assets/show-DUwQlohF.js +1 -0
- data/public/railwatch/assets/{show-DIOSGcXV.js → show-DZwcZZrz.js} +2 -2
- data/public/railwatch/assets/show-ixK2r2f1.js +1 -0
- data/public/railwatch/assets/{show-DYteoYWW.js → show-rysBbvt-.js} +1 -1
- data/public/railwatch/assets/show-zxVxhUel.js +1 -0
- data/public/railwatch/assets/{sort-header-DpFzXblu.js → sort-header-CKj_7G3U.js} +1 -1
- data/public/railwatch/assets/{sparkline-cell-C3-5vFkP.js → sparkline-cell-Ckg29yVq.js} +1 -1
- data/public/railwatch/assets/stat-TxvoBiC8.js +1 -0
- data/public/railwatch/assets/{status-badge-8jVV-LA4.js → status-badge-5NCVJHjo.js} +1 -1
- data/public/railwatch/assets/{tenant-path-G-6u9A-o.js → tenant-path-B5ZRK4x3.js} +1 -1
- data/public/railwatch/assets/{text-link-DfsiaCcP.js → text-link-BPllRj0F.js} +1 -1
- data/public/railwatch/assets/{textarea-Dye72uP7.js → textarea-DtD5yZp_.js} +1 -1
- data/public/railwatch/assets/{timeline-CD7WHnbo.js → timeline-DZz5ZnHN.js} +1 -1
- data/public/railwatch/assets/{transition-B_AW8rMK.js → transition-Ds6Cakuc.js} +1 -1
- data/public/railwatch/assets/{use-clipboard-ColgLyQ2.js → use-clipboard-BLjjYH8V.js} +1 -1
- data/public/railwatch/assets/use-live-GKze1mNC.js +1 -0
- data/public/railwatch/manifest.json +1291 -1238
- metadata +117 -115
- data/public/railwatch/assets/application-DD4nJA5I.css +0 -1
- data/public/railwatch/assets/env-layout-DrT8rO6P.js +0 -1
- data/public/railwatch/assets/index-5jI4aFzC.js +0 -1
- data/public/railwatch/assets/index-9KTrVnrc.js +0 -1
- data/public/railwatch/assets/index-B0-8lcTp.js +0 -1
- data/public/railwatch/assets/index-B7jjfNfO.js +0 -1
- data/public/railwatch/assets/index-BBchRy0M.js +0 -1
- data/public/railwatch/assets/index-BgKj9xhr.js +0 -1
- data/public/railwatch/assets/index-BkTZqqOu.js +0 -1
- data/public/railwatch/assets/index-BprKx8QO.js +0 -1
- data/public/railwatch/assets/index-C3jzvPs3.js +0 -1
- data/public/railwatch/assets/index-Cbs6gGyQ.js +0 -1
- data/public/railwatch/assets/index-CdRZ6AWF.js +0 -1
- data/public/railwatch/assets/index-Cwx6058d.js +0 -1
- data/public/railwatch/assets/index-D4CSdbHv.js +0 -1
- data/public/railwatch/assets/index-DEFMSkdG.js +0 -1
- data/public/railwatch/assets/index-DFiHEBSh.js +0 -1
- data/public/railwatch/assets/index-DL4vWdWJ.js +0 -1
- data/public/railwatch/assets/index-DaXgPcGL.js +0 -1
- data/public/railwatch/assets/index-DbtaU-EE.js +0 -1
- data/public/railwatch/assets/index-DeOe83F4.js +0 -1
- data/public/railwatch/assets/index-DiucHN4B.js +0 -1
- data/public/railwatch/assets/index-DlnR_l9o.js +0 -1
- data/public/railwatch/assets/index-DmRd7aIG.js +0 -1
- data/public/railwatch/assets/index-DxSh2UpM.js +0 -1
- data/public/railwatch/assets/index-MIMGuFNt.js +0 -1
- data/public/railwatch/assets/index-P4rC7IlX.js +0 -1
- data/public/railwatch/assets/index-gpPOcFWq.js +0 -1
- data/public/railwatch/assets/index-oVkururr.js +0 -1
- data/public/railwatch/assets/index-p9puqVge.js +0 -1
- data/public/railwatch/assets/klass-CJ-J4INB.js +0 -1
- data/public/railwatch/assets/release-health-DC8oc7uw.js +0 -1
- data/public/railwatch/assets/route-Dv6LAWvT.js +0 -1
- data/public/railwatch/assets/show-B7NCgkEo.js +0 -1
- data/public/railwatch/assets/show-BKqyKjBK.js +0 -1
- data/public/railwatch/assets/show-BNw4tN5q.js +0 -1
- data/public/railwatch/assets/show-BO3bnG5h.js +0 -1
- data/public/railwatch/assets/show-BhrAVAEA.js +0 -1
- data/public/railwatch/assets/show-CpfgV1jP.js +0 -1
- data/public/railwatch/assets/show-DQp_1n-B.js +0 -1
- data/public/railwatch/assets/show-DVNz46RI.js +0 -1
- data/public/railwatch/assets/stat-s4RpOS9w.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as p}from"./inertia-
|
|
1
|
+
import{aA as p}from"./inertia-Degv_G9N.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-Degv_G9N.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-Degv_G9N.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-TViv6kNv.js";import{c as Te,u as ke,a as j,P as ve}from"./index-1ol1-QWI.js";import{u as Pe}from"./app-wordmark-nbjkzxwQ.js";import{d as be,R as Re,A as _e,P as Oe,e as He,C as De}from"./live-dot-ChfUtY3p.js";import{P as Ie}from"./index-OqI59zPb.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-Degv_G9N.js";import{c as Te,u as ke,a as j,P as ve}from"./index-CX8Br7m9.js";import{u as Pe}from"./app-wordmark-1SRllgHv.js";import{d as be,R as Re,A as _e,P as Oe,e as He,C as De}from"./live-dot-DaXEbkXo.js";import{P as Ie}from"./index-B0VXzXYG.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-Degv_G9N.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-Degv_G9N.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,c as nt,e as it}from"./inertia-Degv_G9N.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};
|