@hot-updater/console 1.0.0-rc.16 → 1.0.0-rc.19
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.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/ConsoleFeatureUnavailable-COwCsO6b.js +1 -0
- package/.output/public/assets/{HashValueDisplay-CH2G89YI.js → HashValueDisplay-tC-gB9gs.js} +1 -1
- package/.output/public/assets/InsightsPageHeader-CFFFfH5u.js +1 -0
- package/.output/public/assets/NotFoundPage-CLQMLJAe.js +1 -0
- package/.output/public/assets/api-CWdd2NNx.js +1 -0
- package/.output/public/assets/api-keys-D8ugB5Bl.js +1 -0
- package/.output/public/assets/api-keys-Drq3ZNLu.js +1 -0
- package/.output/public/assets/arrow-left-Do_pWBSh.js +1 -0
- package/.output/public/assets/arrow-up-right-1voohANF.js +1 -0
- package/.output/public/assets/{chart-no-axes-combined-DWVqQVWt.js → chart-no-axes-combined-CHFqH3w-.js} +1 -1
- package/.output/public/assets/console-access-BRoYTsv4.js +3 -0
- package/.output/public/assets/console-features-api-BcteKQR6.js +1 -0
- package/.output/public/assets/dialog-DgWInCfu.js +1 -0
- package/.output/public/assets/{dist-NOswudZW.js → dist-EnZLkeQg.js} +1 -1
- package/.output/public/assets/empty-C7Pvnb69.js +1 -0
- package/.output/public/assets/{field-Dtaq2bUo.js → field-DTAyQ9b0.js} +1 -1
- package/.output/public/assets/index-D3bwXTc8.js +10 -0
- package/.output/public/assets/{input-group-DGtnvqoW.js → input-group-Cj71LLhe.js} +1 -1
- package/.output/public/assets/insights-Bqaavhgj.js +42 -0
- package/.output/public/assets/insights-DqOHNZzi.js +2 -0
- package/.output/public/assets/insights-oIV_po76.js +1 -0
- package/.output/public/assets/insights-search-my0WE8F9.js +1 -0
- package/.output/public/assets/insights-usage-rpc-CZJDka0Y.js +1 -0
- package/.output/public/assets/insights_.distribution-CXmjiv41.js +2 -0
- package/.output/public/assets/insights_.distribution-CzoWrKK0.js +1 -0
- package/.output/public/assets/insights_.distribution-DuIk4kqj.js +1 -0
- package/.output/public/assets/installations-Bw70Zl6y.js +2 -0
- package/.output/public/assets/installations-Ld6efn-U.js +1 -0
- package/.output/public/assets/installations-w5Pnko4Y.js +1 -0
- package/.output/public/assets/key-round-li3lTpUG.js +1 -0
- package/.output/public/assets/loader-circle-6NZVj4qg.js +1 -0
- package/.output/public/assets/mutation-BNMHiXyc.js +1 -0
- package/.output/public/assets/preload-helper-BfSCTKnO.js +1 -0
- package/.output/public/assets/{refresh-cw-DcqrNjan.js → refresh-cw-C_pGO5jk.js} +1 -1
- package/.output/public/assets/routes-0G_b_8y4.js +1 -0
- package/.output/public/assets/routes-MR6DYpF7.js +2 -0
- package/.output/public/assets/styles-C0-geeb7.css +2 -0
- package/.output/public/assets/{table-Ci1MSFB7.js → table-BiILxY3b.js} +1 -1
- package/.output/public/assets/triangle-alert-Bj8kYc2B.js +1 -0
- package/.output/public/assets/useCompositeListItem-C8ldesrc.js +1 -0
- package/.output/public/assets/useMutation-2lkQkZUn.js +1 -0
- package/.output/public/assets/useOpenInteractionType-DR506JA1.js +1 -0
- package/.output/public/assets/valueToPercent-qlTBQ0fg.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-Cp7RggxU.mjs → __23tanstack-start-server-fn-resolver-BFLMpXmr.mjs} +36 -40
- package/.output/server/_libs/@base-ui/react+[...].mjs +13 -118
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +18 -2
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +3 -3
- package/.output/server/_libs/lucide-react.mjs +1 -1
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +708 -1412
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +7 -2
- package/.output/server/_libs/verkit.mjs +99 -1
- package/.output/server/_ssr/ConsoleFeatureUnavailable-0HE9YxLq.mjs +63 -0
- package/.output/server/_ssr/{HashValueDisplay-DSSZMyu1.mjs → HashValueDisplay-B8V0xCBQ.mjs} +3 -3
- package/.output/server/_ssr/InsightsPageHeader-DnhOh9P0.mjs +141 -0
- package/.output/server/_ssr/NotFoundPage-CMOb9bkI.mjs +37 -0
- package/.output/server/_ssr/api-BrcoJQti.mjs +3512 -0
- package/.output/server/_ssr/api-CAm-OZMX.mjs +216 -0
- package/.output/server/_ssr/{api-keys-CBGcvQzH.mjs → api-keys-BkoPrhtO.mjs} +46 -7
- package/.output/server/_ssr/api-keys-Dge9EIO6.mjs +5 -0
- package/.output/server/_ssr/api-keys-rpc-BXwSJxE2.mjs +52 -0
- package/.output/server/_ssr/api-rpc-CC6Jyldi.mjs +338 -0
- package/.output/server/_ssr/{auth-rpc-BrFBtmXT.mjs → auth-rpc-D7RF5WQa.mjs} +6 -6
- package/.output/server/_ssr/{auth.server-_3CYN_8T.mjs → auth.server-BVeYJB4f.mjs} +12 -5
- package/.output/server/_ssr/bundleActivity-BOT1trKm.mjs +19 -0
- package/.output/server/_ssr/config-DMEJdhoW.mjs +13 -0
- package/.output/server/_ssr/config.server-C5ZMmOg6.mjs +60 -0
- package/.output/server/_ssr/console-access-C4jVYylO.mjs +17 -0
- package/.output/server/_ssr/console-features-Dj0nDVog.mjs +49 -0
- package/.output/server/_ssr/console-features-api-CRy6TqD1.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-DDuPdL2o.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-B_I3Ll4M.mjs} +28 -2
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-DuNm5mmo.mjs} +2 -2
- package/.output/server/_ssr/{createSsrRpc-DRSJc8Rm.mjs → createSsrRpc-DoYFaKW3.mjs} +4 -4
- package/.output/server/_ssr/{databaseRows-5bCRTxm-.mjs → databaseRows-B6JgWJYv.mjs} +21 -57
- package/.output/server/_ssr/{deleteBundle-BAq3JuGr.mjs → deleteBundle-VL3lzFiI.mjs} +9 -19
- package/.output/server/_ssr/{dialog-hSn_G3Um.mjs → dialog-DWoT7rYM.mjs} +2 -2
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-B-r4u3Lg.mjs} +28 -5
- package/.output/server/_ssr/{downloadBundle-B3ert-pY.mjs → downloadBundle-wFMxsvdI.mjs} +6 -7
- package/.output/server/_ssr/empty-BRYS01zJ.mjs +49 -0
- package/.output/server/_ssr/{field-Cl4K3jVm.mjs → field-B_lxaEab.mjs} +3 -3
- package/.output/server/_ssr/getBundleChildren-BUQZ3YYQ.mjs +22 -0
- package/.output/server/_ssr/{input-group-C_Lq-6Gv.mjs → input-group-DrzUpv4t.mjs} +2 -2
- package/.output/server/_ssr/insights-BMqeKm5i.mjs +14 -0
- package/.output/server/_ssr/insights-CJ99v6tA.mjs +5 -0
- package/.output/server/_ssr/insights-D7gI4SOz.mjs +987 -0
- package/.output/server/_ssr/insights-recovery-DkL6bxMW.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-DyyigVuF.mjs +46 -0
- package/.output/server/_ssr/{insights-rpc-N5L0JCjz.mjs → insights-rpc-BNe1bSWf.mjs} +15 -13
- package/.output/server/_ssr/{insights-search-CBnLuVnV.mjs → insights-search-Bewv0VR_.mjs} +5 -2
- package/.output/server/_ssr/insights-usage-DKCPZbcO.mjs +24 -0
- package/.output/server/_ssr/insights-usage-rpc-BJQ7Pw1e.mjs +41 -0
- package/.output/server/_ssr/insights-usage-rpc-DYh2z8RO.mjs +29 -0
- package/.output/server/_ssr/insightsRecovery-DCpG_XWG.mjs +41 -0
- package/.output/server/_ssr/insightsUsage-D5hURAUG.mjs +33 -0
- package/.output/server/_ssr/{insights_.distribution-BW2AKLUM.mjs → insights_.distribution-B0ybTIAy.mjs} +7 -3
- package/.output/server/_ssr/insights_.distribution-nrhRAbOJ.mjs +5 -0
- package/.output/server/_ssr/{insights_.distribution-yaRkawpf.mjs → insights_.distribution-oDN8vqwC.mjs} +11 -10
- package/.output/server/_ssr/installations-BvpZ1dRP.mjs +5 -0
- package/.output/server/_ssr/{installations-CDzVewpI.mjs → installations-CBkZu-Z8.mjs} +159 -114
- package/.output/server/_ssr/installations-naKg-VVM.mjs +66 -0
- package/.output/server/_ssr/listReleases-DqU9t1l3.mjs +79 -0
- package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
- package/.output/server/_ssr/{router-ijOntrzi.mjs → router-sBOdGxm2.mjs} +75 -95
- package/.output/server/_ssr/{routes-CVE-aXtp.mjs → routes-CMxCpcmg.mjs} +214 -307
- package/.output/server/_ssr/routes-KBhPa66y.mjs +83 -0
- package/.output/server/_ssr/runtime.server-BnQosZ8l.mjs +2654 -0
- package/.output/server/_ssr/{select-CicI_Rre.mjs → select-BAIGNvUs.mjs} +35 -6
- package/.output/server/_ssr/{server-CYv_OGsO.mjs → server-C0_QgG97.mjs} +5 -31
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{table-BOh6F-8K.mjs → table-CPzUMShr.mjs} +2 -2
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-BzSO-fr-.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-Z2kQ_BK_.mjs +123 -0
- package/.output/server/index.mjs +245 -168
- package/lib/index.d.mts +11 -2
- package/lib/vite-internal.mjs +6 -2
- package/package.json +6 -6
- package/src/components/AppSidebar.tsx +76 -61
- package/src/components/ConsoleFeatureUnavailable.tsx +92 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/bundles/BundleInsightsSummary.tsx +66 -109
- package/src/components/features/bundles/BundleMetadata.tsx +7 -4
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +20 -2
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventHistoryCard.tsx +74 -17
- package/src/components/features/insights/InsightsControls.tsx +240 -142
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsOverview.tsx +140 -403
- package/src/components/features/insights/InsightsPageHeader.tsx +19 -14
- package/src/components/features/insights/InsightsPeriodSelector.tsx +41 -11
- package/src/components/features/insights/InstallationHistoryCard.tsx +2 -2
- package/src/components/features/insights/ReportingDevicesSummary.tsx +10 -4
- package/src/components/features/releases/ReleaseEditorSheet.tsx +14 -1
- package/src/index.ts +11 -2
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +26 -37
- package/src/lib/api-rpc.ts +187 -211
- package/src/lib/api.ts +11 -13
- package/src/lib/bundle-activity.ts +14 -2
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +83 -0
- package/src/lib/insights-recovery-rpc.ts +25 -12
- package/src/lib/insights-recovery.ts +26 -39
- package/src/lib/insights-rpc.ts +23 -10
- package/src/lib/insights-search.ts +11 -2
- package/src/lib/insights-usage-rpc.ts +15 -9
- package/src/lib/insights-usage.ts +27 -2
- package/src/lib/insights-view.ts +32 -0
- package/src/lib/server/adminInsights.ts +104 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +25 -28
- package/src/lib/server/config.server.ts +13 -29
- package/src/lib/server/console-runtime.server.ts +1 -0
- package/src/lib/server/deleteBundle.ts +16 -25
- package/src/lib/server/downloadBundle.ts +7 -10
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsRecovery.ts +31 -225
- package/src/lib/server/insightsUsage.ts +29 -117
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseReachability.ts +4 -3
- package/src/lib/server/runtime.server.ts +131 -28
- package/src/routes/-installations-search.ts +11 -1
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +7 -1
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +171 -131
- package/src/routes/insights.tsx +36 -12
- package/src/routes/insights_.distribution.tsx +5 -0
- package/src/routes/installations.tsx +21 -1
- package/src/vite-internal.ts +6 -2
- package/.output/public/assets/InsightsPageHeader-B9BZss8F.js +0 -1
- package/.output/public/assets/api-D4_Oc3vJ.js +0 -42
- package/.output/public/assets/api-keys-Bn9JCdsh.js +0 -1
- package/.output/public/assets/api-keys-api-70Cr1Dg1.js +0 -1
- package/.output/public/assets/arrow-left-DjiCzL2s.js +0 -1
- package/.output/public/assets/createServerFn-3eh2iYmC.js +0 -3
- package/.output/public/assets/dialog-C0og4SZ3.js +0 -1
- package/.output/public/assets/index-CP_Kr3h-.js +0 -10
- package/.output/public/assets/insights-Cssv2g47.js +0 -2
- package/.output/public/assets/insights-FcZhKwEn.js +0 -1
- package/.output/public/assets/insights-search-bQlsME6S.js +0 -1
- package/.output/public/assets/insights-usage-rpc-eDRR-mlO.js +0 -1
- package/.output/public/assets/insights_.distribution-B8zHNpSW.js +0 -1
- package/.output/public/assets/insights_.distribution-CTj3zHDc.js +0 -2
- package/.output/public/assets/installations-B0fHLKr7.js +0 -1
- package/.output/public/assets/installations-B5Q46Gjy.js +0 -2
- package/.output/public/assets/list-CZDFgINX.js +0 -1
- package/.output/public/assets/loader-circle-v05mmo6I.js +0 -1
- package/.output/public/assets/preload-helper-Cifs6dpf.js +0 -1
- package/.output/public/assets/routes-Btaz1n8H.js +0 -1
- package/.output/public/assets/routes-DjssVZAX.js +0 -2
- package/.output/public/assets/styles-B-0tYZ3P.css +0 -2
- package/.output/public/assets/useMutation-Cc4x2klV.js +0 -1
- package/.output/public/assets/useOpenInteractionType-BIJ6gnHH.js +0 -1
- package/.output/public/assets/valueToPercent-DmwxjBJW.js +0 -1
- package/.output/server/_ssr/InsightsPageHeader-DxWH6-gj.mjs +0 -64
- package/.output/server/_ssr/api-CvaM3t0_.mjs +0 -332
- package/.output/server/_ssr/api-keys-api-Bt9OYbiC.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-CXrN-F8M.mjs +0 -136
- package/.output/server/_ssr/api-rpc-CiP1mql4.mjs +0 -1398
- package/.output/server/_ssr/bundleActivity-DGH2TZxk.mjs +0 -28
- package/.output/server/_ssr/config-Df5sWqgU.mjs +0 -12
- package/.output/server/_ssr/config.server-BlCKyz7x.mjs +0 -367
- package/.output/server/_ssr/getBundleChildren-COMt16m_.mjs +0 -50
- package/.output/server/_ssr/insights-BEO9BtsG.mjs +0 -10
- package/.output/server/_ssr/insights-BtcnF8MP.mjs +0 -965
- package/.output/server/_ssr/insights-recovery-BwNqED4A.mjs +0 -21
- package/.output/server/_ssr/insights-recovery-rpc-9zHe7obf.mjs +0 -37
- package/.output/server/_ssr/insights-usage-rpc-C0KuJSbG.mjs +0 -184
- package/.output/server/_ssr/insights-usage-rpc-DdTT0TPV.mjs +0 -24
- package/.output/server/_ssr/insightsContract-c0M9QrJv.mjs +0 -14
- package/.output/server/_ssr/insightsHistory-SAhf6NDb.mjs +0 -41
- package/.output/server/_ssr/insightsRecovery-B4_Jmc84.mjs +0 -138
- package/.output/server/_ssr/insightsUsage-7x-gwXkg.mjs +0 -74
- package/.output/server/_ssr/installations-CuaAWZc3.mjs +0 -29
- package/.output/server/_ssr/routes-BqqTJ5IY.mjs +0 -37
- package/.output/server/_ssr/runtime.server-BlT6cAdz.mjs +0 -457
- package/.output/server/_tanstack-start-manifest_v-CWAzWOtf.mjs +0 -107
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -107
- package/src/lib/server/insightsHistory.ts +0 -52
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$n as e,$t as t,An as n,At as r,C as i,F as a,Ft as o,Gr as s,Hn as c,Hr as l,Ht as u,In as d,Jn as f,L as p,Ln as m,Mn as h,Mt as g,On as _,Pn as v,Pt as y,Qn as b,Qt as x,R as S,Rn as C,S as w,Sn as T,T as E,Un as D,Ur as O,Vr as k,Vt as A,Xn as j,Xt as M,Zn as N,Zt as P,_n as F,_t as I,an as L,ar as R,at as z,bn as ee,cn as B,ct as V,dt as te,en as H,er as ne,fn as U,fr as re,ft as W,gn as ie,hn as ae,ht as oe,ir as G,jt as se,kn as ce,ln as le,lr as ue,lt as K,nr as de,nt as fe,on as pe,ot as me,rn as he,rr as ge,rt as _e,st as ve,tn as ye,tr as be,vn as xe,w as Se,x as Ce,zn as we}from"./createServerFn-3eh2iYmC.js";import{a as Te}from"./preload-helper-Cifs6dpf.js";import{$ as Ee,A as De,B as Oe,C as ke,Ct as Ae,D as je,Dt as Me,E as Ne,F as Pe,G as Fe,H as Ie,I as Le,J as Re,L as ze,M as Be,N as Ve,O as He,Ot as Ue,P as We,Q as Ge,R as Ke,S as qe,St as Je,T as Ye,Tt as Xe,U as Ze,X as Qe,Y as $e,Z as et,_t as q,at as tt,b as nt,dt as rt,et as it,gt as at,h as ot,ht as J,i as st,it as ct,j as lt,k as ut,kt as dt,lt as Y,mt as ft,nt as pt,ot as mt,pt as ht,st as gt,tt as _t,ut as vt,v as yt,w as bt,wt as xt,x as X,xt as St,y as Ct,yt as wt}from"./api-D4_Oc3vJ.js";import{n as Tt,r as Et,t as Dt}from"./InsightsPageHeader-B9BZss8F.js";import{_ as Ot,a as kt,c as At,d as jt,f as Mt,g as Nt,i as Pt,m as Ft,p as It,s as Lt,t as Rt,u as zt,v as Bt}from"./field-Dtaq2bUo.js";import{n as Vt,t as Ht}from"./list-CZDFgINX.js";import{A as Ut,B as Wt,C as Gt,D as Kt,E as qt,F as Jt,H as Yt,I as Xt,L as Zt,M as Qt,N as $t,O as en,P as tn,R as nn,S as rn,T as an,V as on,a as sn,b as cn,c as ln,d as un,f as dn,g as fn,h as pn,i as mn,j as hn,k as gn,l as _n,m as vn,o as yn,p as bn,s as xn,u as Sn,v as Cn,w as wn,x as Tn,y as En,z as Dn}from"./valueToPercent-DmwxjBJW.js";import{a as On,c as kn,d as An,f as jn,i as Mn,l as Nn,m as Pn,n as Fn,o as In,p as Ln,r as Rn,s as zn,t as Bn,u as Vn}from"./insights-usage-rpc-eDRR-mlO.js";import{i as Hn,r as Un,t as Wn}from"./useOpenInteractionType-BIJ6gnHH.js";import{t as Gn}from"./insights-Cssv2g47.js";import{a as Kn,i as qn,n as Jn,o as Yn,r as Xn,t as Zn}from"./table-Ci1MSFB7.js";import{i as Qn,n as $n,r as er,t as tr}from"./input-group-DGtnvqoW.js";var nr=O((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}e.isPlainObject=t})),rr=O(((e,t)=>{t.exports=nr().isPlainObject})),Z=s(l()),ir,ar,or,sr,cr;function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lr(Object(n),!0).forEach(function(t){dr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dr(e,t,n){return(t=fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e){var t=pr(e,`string`);return typeof t==`symbol`?t:t+``}function pr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mr(){return mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mr.apply(null,arguments)}function hr(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gr=(e,t,n,r,i)=>{var a=n-r,o=Je(ir||=hr([`M `,`,`,``]),e,t);return o+=Je(ar||=hr([`L `,`,`,``]),e+n,t),o+=Je(or||=hr([`L `,`,`,``]),e+n-a/2,t+i),o+=Je(sr||=hr([`L `,`,`,``]),e+n-a/2-r,t+i),o+=Je(cr||=hr([`L `,`,`,` Z`]),e,t),o},_r={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},vr=e=>{var t=J(e,_r),{x:n,y:r,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:c,animationDuration:l,animationBegin:u,isUpdateAnimationActive:d}=t,p=(0,Z.useRef)(null),[m,h]=(0,Z.useState)(-1),g=(0,Z.useRef)(i),_=(0,Z.useRef)(a),v=(0,Z.useRef)(o),y=(0,Z.useRef)(n),b=(0,Z.useRef)(r),x=et(e,`trapezoid-`);if((0,Z.useEffect)(()=>{if(p.current&&p.current.getTotalLength)try{var e=p.current.getTotalLength();e&&h(e)}catch{}},[]),n!==+n||r!==+r||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var S=f(`recharts-trapezoid`,s);if(!d)return Z.createElement(`g`,null,Z.createElement(`path`,mr({},xt(t),{className:S,d:gr(n,r,i,a,o)})));var C=g.current,w=_.current,T=v.current,E=y.current,D=b.current,O=`0px ${m===-1?1:m}px`,k=`${m}px ${m}px`,A=Ee([`strokeDasharray`],l,c);return Z.createElement(Ge,{animationId:x,key:x,canBegin:m>0,duration:l,easing:c,isActive:d,begin:u},e=>{var s=q(C,i,e),c=q(w,a,e),l=q(T,o,e),u=q(E,n,e),d=q(D,r,e);p.current&&(g.current=s,_.current=c,v.current=l,y.current=u,b.current=d);var f=e>0?{transition:A,strokeDasharray:k}:{strokeDasharray:O};return Z.createElement(`path`,mr({},xt(t),{className:S,d:gr(u,d,s,c,l),ref:p,style:ur(ur({},f),t.style)}))})},yr=s(rr()),br=[`option`,`shapeType`,`activeClassName`,`inActiveClassName`];function xr(e,t){if(e==null)return{};var n,r,i=Sr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Cr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cr(Object(n),!0).forEach(function(t){Tr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tr(e,t,n){return(t=Er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Er(e){var t=Dr(e,`string`);return typeof t==`symbol`?t:t+``}function Dr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Or(e,t){return wr(wr({},t),e)}function kr(e,t){return e===`symbols`}function Ar(e){var{shapeType:t,elementProps:n}=e;switch(t){case`rectangle`:return Z.createElement(Qe,n);case`trapezoid`:return Z.createElement(vr,n);case`sector`:return Z.createElement($e,n);case`symbols`:if(kr(t,n))return Z.createElement(at,n);break;case`curve`:return Z.createElement(it,n);default:return null}}function jr(e){return(0,Z.isValidElement)(e)?e.props:e}function Mr(e){var{option:t,shapeType:n,activeClassName:r=`recharts-active-shape`,inActiveClassName:i=`recharts-shape`}=e,a=xr(e,br),o;if((0,Z.isValidElement)(t))o=(0,Z.cloneElement)(t,wr(wr({},a),jr(t)));else if(typeof t==`function`)o=t(a,a.index);else if((0,yr.default)(t)&&typeof t!=`boolean`){var s=Or(t,a);o=Z.createElement(Ar,{shapeType:n,elementProps:s})}else{var c=a;o=Z.createElement(Ar,{shapeType:n,elementProps:c})}return a.isActive?Z.createElement(Ae,{className:r},o):Z.createElement(Ae,{className:i},o)}var Nr=[`children`];function Pr(e,t){if(e==null)return{};var n,r,i=Fr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ir=(0,Z.createContext)({data:[],xAxisId:`xAxis-0`,yAxisId:`yAxis-0`,dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function Lr(e){var{children:t}=e,n=Pr(e,Nr);return Z.createElement(Ir.Provider,{value:n},t)}var Rr=(e,t,n,r)=>Oe(e,`xAxis`,t,r),zr=(e,t,n,r)=>Ie(e,`xAxis`,t,r),Br=(e,t,n,r)=>Oe(e,`yAxis`,n,r),Vr=(e,t,n,r)=>Ie(e,`yAxis`,n,r),Hr=ht([pt,Rr,Br,zr,Vr],(e,t,n,r,i)=>rt(e,`xAxis`)?mt(t,r,!1):mt(n,i,!1)),Ur=(e,t,n,r,i)=>i;function Wr(e){return e.type===`line`}var Gr=ht([pt,Rr,Br,zr,Vr,ht([Ze,Ur],(e,t)=>e.filter(Wr).find(e=>e.id===t)),Hr,Re],(e,t,n,r,i,a,o,s)=>{var{chartData:c,dataStartIndex:l,dataEndIndex:u}=s;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var{dataKey:d,data:f}=a,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return vi({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),Kr=[`id`],qr=[`type`,`layout`,`connectNulls`,`needClip`,`shape`],Jr=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yr.apply(null,arguments)}function Xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xr(Object(n),!0).forEach(function(t){Qr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qr(e,t,n){return(t=$r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $r(e){var t=ei(e,`string`);return typeof t==`symbol`?t:t+``}function ei(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ti(e,t){if(e==null)return{};var n,r,i=ni(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ni(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ri=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Y(n,t),payload:e}]},ii=Z.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:s,unit:c,tooltipType:l,id:u}=e,d={dataDefinedOnItem:n,getPosition:St,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Y(o,t),hide:s,type:l,color:r,unit:c,graphicalItemId:u}};return Z.createElement(Ve,{tooltipEntrySettings:d})}),ai=(e,t)=>`${t}px ${e}px`;function oi(e,t){for(var n=e.length%2==0?e:[...e,0],r=[],i=0;i<t;++i)r.push(...n);return r}var si=(e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return ai(t,e);for(var i=Math.floor(e/r),a=e%r,o=[],s=0,c=0;s<n.length;c+=(l=n[s])??0,++s){var l,u=n[s];if(u!=null&&c+u>a){o=[...n.slice(0,s),a-c];break}}var d=o.length%2==0?[0,t]:[t];return[...oi(n,i),...o,...d].map(e=>`${e}px`).join(`, `)};function ci(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:a,needClip:o}=r,{id:s}=r,c=Xe(ti(r,Kr));return Z.createElement(ut,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function li(e){var{showLabels:t,children:n,points:r}=e,i=(0,Z.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Zr(Zr({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return Z.createElement(Pe,{value:t?i:void 0},n)}function ui(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:c,needClip:l,shape:u}=a,d=Zr(Zr({},xt(ti(a,qr))),{},{fill:`none`,className:`recharts-line-curve`,clipPath:l?`url(#clipPath-${t})`:void 0,points:r,type:o,layout:s,connectNulls:c,strokeDasharray:i??a.strokeDasharray});return Z.createElement(Z.Fragment,null,r?.length>1&&Z.createElement(Mr,Yr({shapeType:`curve`,option:u},d,{pathRef:n})),Z.createElement(ci,{points:r,clipPathId:t,props:a}))}function di(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function fi(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:g}=n,_=i.current,v=et(o,`recharts-line-`),y=(0,Z.useRef)(v),[b,x]=(0,Z.useState)(!1),S=!b,C=(0,Z.useCallback)(()=>{typeof h==`function`&&h(),x(!1)},[h]),w=(0,Z.useCallback)(()=>{typeof g==`function`&&g(),x(!0)},[g]),T=di(r.current),E=(0,Z.useRef)(0);y.current!==v&&(E.current=a.current,y.current=v);var D=E.current;return Z.createElement(li,{points:o,showLabels:S},n.children,Z.createElement(Ge,{animationId:v,begin:l,duration:u,isActive:c,easing:d,onAnimationEnd:C,onAnimationStart:w,key:v},e=>{var l=q(D,T+D,e),u=Math.min(l,T),d=c?s?si(u,T,`${s}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):ai(T,u):s==null?void 0:String(s);if(e>0&&T>0&&(i.current=o,a.current=Math.max(a.current,u)),_){var h=_.length/o.length,g=e===1?o:o.map((t,n)=>{var r=Math.floor(n*h);if(_[r]){var i=_[r];return Zr(Zr({},t),{},{x:q(i.x,t.x,e),y:q(i.y,t.y,e)})}return f?Zr(Zr({},t),{},{x:q(p*2,t.x,e),y:q(m/2,t.y,e)}):Zr(Zr({},t),{},{x:t.x,y:t.y})});return i.current=g,Z.createElement(ui,{props:n,points:g,clipPathId:t,pathRef:r,strokeDasharray:d})}return Z.createElement(ui,{props:n,points:o,clipPathId:t,pathRef:r,strokeDasharray:d})}),Z.createElement(Le,{label:n.label}))}function pi(e){var{clipPathId:t,props:n}=e,r=(0,Z.useRef)(null),i=(0,Z.useRef)(0),a=(0,Z.useRef)(null);return Z.createElement(fi,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:a})}var mi=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:vt(e.payload,t)}),hi=class extends Z.Component{render(){var{hide:e,dot:t,points:n,className:r,xAxisId:i,yAxisId:a,top:o,left:s,width:c,height:l,id:u,needClip:d,zIndex:p}=this.props;if(e)return null;var m=f(`recharts-line`,r),h=u,{r:g,strokeWidth:_}=ke(t),v=We(t),y=g*2+_,b=d?`url(#clipPath-${v?``:`dots-`}${h})`:void 0;return Z.createElement(Ke,{zIndex:p},Z.createElement(Ae,{className:m},d&&Z.createElement(`defs`,null,Z.createElement(bt,{clipPathId:h,xAxisId:i,yAxisId:a}),!v&&Z.createElement(`clipPath`,{id:`clipPath-dots-${h}`},Z.createElement(`rect`,{x:s-y/2,y:o-y/2,width:c+y,height:l+y}))),Z.createElement(Lr,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:mi,errorBarOffset:0},Z.createElement(pi,{props:this.props,clipPathId:h}))),Z.createElement(je,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:b}))}},gi={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Fe.line,type:`linear`};function _i(e){var t=J(e,gi),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:c,hide:l,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,g=ti(t,Jr),{needClip:_}=Ye(p,m),v=He(),y=ct(),b=tt(),x=ft(e=>Gr(e,p,m,b,h));if(y!==`horizontal`&&y!==`vertical`||x==null||v==null)return null;var{height:S,width:C,x:w,y:T}=v;return Z.createElement(hi,Yr({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:x,layout:y,height:S,width:C,left:w,top:T,needClip:_}))}function vi(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:c}=e;return c.map((e,c)=>{var l=vt(e,o);if(t===`horizontal`)return{x:gt({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(wt(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=wt(l)?null:n.scale.map(l),d=gt({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function yi(e){var t=J(e,gi),n=tt();return Z.createElement(lt,{id:t.id,type:`line`},e=>Z.createElement(Z.Fragment,null,Z.createElement(Be,{legendPayload:ri(t)}),Z.createElement(ii,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),Z.createElement(De,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),Z.createElement(_i,Yr({},t,{id:e}))))}var bi=Z.memo(yi,_t);bi.displayName=`Line`;var xi=[`axis`],Si=(0,Z.forwardRef)((e,t)=>Z.createElement(nt,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:xi,tooltipPayloadSearcher:ze,categoricalChartProps:e,ref:t})),Ci=Z.createContext(void 0);function wi(){let e=Z.useContext(Ci);if(e===void 0)throw Error(de(53));return e}var Ti=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({});function Ei(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var Di=function(e){return e.orientation=`data-orientation`,e.hovering=`data-hovering`,e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),Oi=function(e){return e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),ki={hasOverflowX:e=>e?{[Oi.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[Oi.hasOverflowY]:``}:null,overflowXStart:e=>e?{[Oi.overflowXStart]:``}:null,overflowXEnd:e=>e?{[Oi.overflowXEnd]:``}:null,overflowYStart:e=>e?{[Oi.overflowYStart]:``}:null,overflowYEnd:e=>e?{[Oi.overflowYEnd]:``}:null,cornerHidden:()=>null},Q=re(),Ai={x:0,y:0},ji={width:0,height:0},Mi={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Ni={x:!0,y:!0,corner:!0},Pi=Z.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,s=Fi(i),c=he(),l=ye(),u=ye(),{nonce:d,disableStyleElements:f}=dn(),[p,m]=Z.useState(!1),[h,g]=Z.useState(!1),[_,v]=Z.useState(!1),[y,b]=Z.useState(!1),[x,S]=Z.useState(!1),[C,w]=Z.useState(ji),[T,E]=Z.useState(ji),[O,k]=Z.useState(Mi),[M,N]=Z.useState(Ni),P=Z.useRef(null),F=Z.useRef(null),I=Z.useRef(null),L=Z.useRef(null),R=Z.useRef(null),z=Z.useRef(null),ee=Z.useRef(null),B=Z.useRef(!1),V=Z.useRef(0),te=Z.useRef(0),H=Z.useRef(0),ne=Z.useRef(0),U=Z.useRef(`vertical`),re=Z.useRef(Ai),W=D(e=>{let t=e.x-re.current.x,n=e.y-re.current.y;re.current=e,n!==0&&(v(!0),l.start(500,()=>{v(!1)})),t!==0&&(g(!0),u.start(500,()=>{g(!1)}))}),ie=D(e=>{e.button===0&&(B.current=!0,V.current=e.clientY,te.current=e.clientX,U.current=e.currentTarget.getAttribute(Di.orientation),F.current&&(H.current=F.current.scrollTop,ne.current=F.current.scrollLeft),R.current&&U.current===`vertical`&&R.current.setPointerCapture(e.pointerId),z.current&&U.current===`horizontal`&&z.current.setPointerCapture(e.pointerId))}),ae=D(e=>{if(!B.current)return;let t=e.clientY-V.current,n=e.clientX-te.current;if(F.current){let r=F.current.scrollHeight,i=F.current.clientHeight,a=F.current.scrollWidth,o=F.current.clientWidth;if(R.current&&I.current&&U.current===`vertical`){let n=Ei(I.current,`padding`,`y`),a=Ei(R.current,`margin`,`y`),o=R.current.offsetHeight,s=t/(I.current.offsetHeight-o-n-a);F.current.scrollTop=H.current+s*(r-i),e.preventDefault(),v(!0),l.start(500,()=>{v(!1)})}if(z.current&&L.current&&U.current===`horizontal`){let t=Ei(L.current,`padding`,`x`),r=Ei(z.current,`margin`,`x`),i=z.current.offsetWidth,s=n/(L.current.offsetWidth-i-t-r);F.current.scrollLeft=ne.current+s*(a-o),e.preventDefault(),g(!0),u.start(500,()=>{g(!1)})}}}),oe=D(e=>{B.current=!1,R.current&&U.current===`vertical`&&R.current.releasePointerCapture(e.pointerId),z.current&&U.current===`horizontal`&&z.current.releasePointerCapture(e.pointerId)});function G(e){b(e.pointerType===`touch`)}function se(e){G(e),e.pointerType!==`touch`&&m(A(P.current,e.target))}let ce=Z.useMemo(()=>({scrolling:h||_,hasOverflowX:!M.x,hasOverflowY:!M.y,overflowXStart:O.xStart,overflowXEnd:O.xEnd,overflowYStart:O.yStart,overflowYEnd:O.yEnd,cornerHidden:M.corner}),[h,_,M.x,M.y,M.corner,O]),le={role:`presentation`,onPointerEnter:se,onPointerMove:se,onPointerDown:G,onPointerLeave(){m(!1)},style:{position:`relative`,[Ti.scrollAreaCornerHeight]:`${C.height}px`,[Ti.scrollAreaCornerWidth]:`${C.width}px`}},ue=j(`div`,e,{state:ce,ref:[t,P],props:[le,o],stateAttributesMapping:ki}),K=Z.useMemo(()=>({handlePointerDown:ie,handlePointerMove:ae,handlePointerUp:oe,handleScroll:W,cornerSize:C,setCornerSize:w,thumbSize:T,setThumbSize:E,hasMeasuredScrollbar:x,setHasMeasuredScrollbar:S,touchModality:y,cornerRef:ee,scrollingX:h,setScrollingX:g,scrollingY:_,setScrollingY:v,hovering:p,setHovering:m,viewportRef:F,rootRef:P,scrollbarYRef:I,scrollbarXRef:L,thumbYRef:R,thumbXRef:z,rootId:c,hiddenState:M,setHiddenState:N,overflowEdges:O,setOverflowEdges:k,viewportState:ce,overflowEdgeThreshold:s}),[ie,ae,oe,W,C,T,x,y,h,g,_,v,p,m,c,M,O,ce,s]);return(0,Q.jsxs)(Ci.Provider,{value:K,children:[!f&&bn.getElement(d),ue]})});function Fi(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var Ii=Z.createContext(void 0),Li=function(e){return e.scrollAreaOverflowXStart=`--scroll-area-overflow-x-start`,e.scrollAreaOverflowXEnd=`--scroll-area-overflow-x-end`,e.scrollAreaOverflowYStart=`--scroll-area-overflow-y-start`,e.scrollAreaOverflowYEnd=`--scroll-area-overflow-y-end`,e}({}),Ri=!1;function zi(){Ri||H||(typeof CSS<`u`&&`registerProperty`in CSS&&[Li.scrollAreaOverflowXStart,Li.scrollAreaOverflowXEnd,Li.scrollAreaOverflowYStart,Li.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),Ri=!0)}var Bi=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:l,thumbYRef:u,thumbXRef:d,cornerRef:f,cornerSize:p,setCornerSize:m,setThumbSize:h,rootId:g,setHiddenState:_,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,setHovering:x,setOverflowEdges:S,overflowEdges:C,overflowEdgeThreshold:w,scrollingX:T,scrollingY:E}=wi(),O=Se(),k=Z.useRef(!0),A=Z.useRef([NaN,NaN,NaN,NaN]),M=ye(),N=ye(),P=D(()=>{let e=o.current,t=s.current,n=l.current,r=u.current,i=d.current,a=f.current;if(!e)return;let c=e.scrollHeight,g=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,C=e.scrollLeft,T=A.current,E=Number.isNaN(T[0]);if(T[0]=v,T[1]=c,T[2]=b,T[3]=g,E&&y(!0),c===0||g===0)return;let D=Vi(e),k=D.y,j=D.x,M=b/g,N=v/c,P=Math.max(0,g-b),F=Math.max(0,c-v),I=0,L=0;if(!j){let e=0;e=cn(O===`rtl`?-C:C,0,P),I=En(e,P),L=P-I}let R=k?0:cn(x,0,F),z=k?0:En(R,F),ee=k?0:F-z,B=j?0:b,V=k?0:v,te=0,H=0;!j&&!k&&(te=t?.offsetWidth||0,H=n?.offsetHeight||0);let ne=p.width===0&&p.height===0,U=ne?te:0,re=ne?H:0,W=Ei(n,`padding`,`x`),ie=Ei(t,`padding`,`y`),ae=Ei(i,`margin`,`x`),oe=Ei(r,`margin`,`y`),G=B-W-ae,se=V-ie-oe,ce=n?Math.min(n.offsetWidth-U,G):G,le=t?Math.min(t.offsetHeight-re,se):se,ue=Math.max(16,ce*M),K=Math.max(16,le*N);if(h(e=>e.height===K&&e.width===ue?e:{width:ue,height:K}),t&&r){let e=t.offsetHeight-K-ie-oe,n=c-v,i=n===0?0:x/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-ue-W-ae,t=g-b,r=t===0?0:C/t,a=O===`rtl`?cn(r*e,-e,0):cn(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let de=[[Li.scrollAreaOverflowXStart,I],[Li.scrollAreaOverflowXEnd,L],[Li.scrollAreaOverflowYStart,z],[Li.scrollAreaOverflowYEnd,ee]];for(let[t,n]of de)e.style.setProperty(t,`${n}px`);a&&(j||k?m({width:0,height:0}):!j&&!k&&m({width:te,height:H})),_(e=>Hi(e,D));let fe={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!k&&z>w.yStart,yEnd:!k&&ee>w.yEnd};S(e=>e.xStart===fe.xStart&&e.xEnd===fe.xEnd&&e.yStart===fe.yStart&&e.yEnd===fe.yEnd?e:fe)});c(()=>{o.current&&zi()},[o]),c(()=>{queueMicrotask(P)},[P,v,O]),c(()=>{o.current?.matches(`:hover`)&&x(!0)},[o,x]),Z.useEffect(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=A.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}P()});return n.observe(e),N.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(P).catch(()=>{})}),()=>{n.disconnect(),N.clear()}},[P,o,N]);function F(){k.current=!1}let I={role:`presentation`,...g&&{"data-id":`${g}-viewport`},tabIndex:v.x&&v.y?-1:0,className:bn.className,style:{overflow:`scroll`},onScroll(){o.current&&(P(),k.current||b({x:o.current.scrollLeft,y:o.current.scrollTop}),M.start(100,()=>{k.current=!0}))},onWheel:F,onTouchMove:F,onPointerMove:F,onPointerEnter:F,onKeyDown:F},L=Z.useMemo(()=>({scrolling:T||E,hasOverflowX:!v.x,hasOverflowY:!v.y,overflowXStart:C.xStart,overflowXEnd:C.xEnd,overflowYStart:C.yStart,overflowYEnd:C.yEnd,cornerHidden:v.corner}),[T,E,v.x,v.y,v.corner,C]),R=j(`div`,e,{ref:[t,o],state:L,props:[I,a],stateAttributesMapping:ki}),z=Z.useMemo(()=>({computeThumbPosition:P}),[P]);return(0,Q.jsx)(Ii.Provider,{value:z,children:R})});function Vi(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Hi(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var Ui=Z.createContext(void 0);function Wi(){let e=Z.useContext(Ui);if(e===void 0)throw Error(de(54));return e}var Gi=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({}),Ki=Z.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:s,...c}=e,{hovering:l,scrollingX:d,scrollingY:f,hiddenState:p,overflowEdges:m,scrollbarYRef:h,scrollbarXRef:g,viewportRef:_,thumbYRef:v,thumbXRef:y,handlePointerDown:b,handlePointerUp:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w}=wi(),T={hovering:l,scrolling:{horizontal:d,vertical:f}[i],orientation:i,hasOverflowX:!p.x,hasOverflowY:!p.y,overflowXStart:m.xStart,overflowXEnd:m.xEnd,overflowYStart:m.yStart,overflowYEnd:m.yEnd,cornerHidden:p.corner},E=Se(),D=!w&&!a,O=i===`vertical`?p.y:p.x,k=a||!O;Z.useEffect(()=>{if(!k)return;let e=_.current,t=i===`vertical`?h.current:g.current;if(!t)return;function n(n){if(!e||!t||n.ctrlKey)return;n.preventDefault();let r=i===`horizontal`,a=r?`scrollLeft`:`scrollTop`,o=r?n.deltaX:n.deltaY,s=r?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,c=r&&E===`rtl`?-s:0,l=r&&E===`rtl`?0:s,u=e[a];u<=c&&o<0||u>=l&&o>0||(e[a]=Math.min(l,Math.max(c,u+o)))}return o(t,`wheel`,n,{passive:!1})},[E,i,g,h,k,_]);let M={...S&&{"data-id":`${S}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=u(e.nativeEvent),n=i===`vertical`?v.current:y.current;if(!(n&&A(n,t))&&_.current){if(v.current&&h.current&&i===`vertical`){let t=Ei(v.current,`margin`,`y`),n=Ei(h.current,`padding`,`y`),r=v.current.offsetHeight,i=h.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=_.current.scrollHeight,s=_.current.clientHeight,c=a/(h.current.offsetHeight-r-n-t)*(o-s);_.current.scrollTop=c}if(y.current&&g.current&&i===`horizontal`){let t=Ei(y.current,`margin`,`x`),n=Ei(g.current,`padding`,`x`),r=y.current.offsetWidth,i=g.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=_.current.scrollWidth,s=_.current.clientWidth,c=a/(g.current.offsetWidth-r-n-t),l;E===`rtl`?(l=(1-c)*(o-s),_.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),_.current.scrollLeft=l}b(e)}},onPointerUp:x,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:D?`hidden`:void 0,...i===`vertical`&&{top:0,bottom:`var(${Ti.scrollAreaCornerHeight})`,insetInlineEnd:0,[Gi.scrollAreaThumbHeight]:`${C.height}px`},...i===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${Ti.scrollAreaCornerWidth})`,bottom:0,[Gi.scrollAreaThumbWidth]:`${C.width}px`}}},N=j(`div`,e,{ref:[t,i===`vertical`?h:g],state:T,props:[M,c],stateAttributesMapping:ki}),P=Z.useMemo(()=>({orientation:i}),[i]);return k?(0,Q.jsx)(Ui.Provider,{value:P,children:N}):null}),qi=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,setScrollingX:d,setScrollingY:f,hasMeasuredScrollbar:p}=wi(),{orientation:m}=Wi();return j(`div`,e,{ref:[t,m===`vertical`?o:s],state:{orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp(e){m===`vertical`&&f(!1),m===`horizontal`&&d(!1),u(e)},style:{visibility:p?void 0:`hidden`,...m===`vertical`&&{height:`var(${Gi.scrollAreaThumbHeight})`},...m===`horizontal`&&{width:`var(${Gi.scrollAreaThumbWidth})`}}},a]})}),Ji=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=wi(),l=j(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l});function Yi({className:e,children:t,...n}){return(0,Q.jsxs)(Pi,{"data-slot":`scroll-area`,className:C(`relative`,e),...n,children:[(0,Q.jsx)(Bi,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,Q.jsx)(Xi,{}),(0,Q.jsx)(Ji,{})]})}function Xi({className:e,orientation:t=`vertical`,...n}){return(0,Q.jsx)(Ki,{"data-slot":`scroll-area-scrollbar`,"data-orientation":t,orientation:t,className:C(`flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,e),...n,children:(0,Q.jsx)(qi,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}function Zi({window:e,count:t,isPending:n,partial:r}){let i=Rn[e];return(0,Q.jsxs)(`div`,{"aria-label":`${i.label} over ${i.period}`,role:`region`,className:`flex items-center gap-3`,children:[n?(0,Q.jsx)(E,{"aria-label":`Loading active users`,className:`h-9 w-12`}):(0,Q.jsx)(`p`,{className:`text-4xl font-semibold tracking-tight tabular-nums`,children:t===void 0?`—`:`${r?`≥`:``}${t.toLocaleString()}`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 text-sm text-muted-foreground`,children:[(0,Q.jsx)(`span`,{children:i.label}),(0,Q.jsxs)(kn,{label:`How ${i.label} is counted`,children:[`Unique app installations that reported activity in the last`,` `,i.period,`, including no-change reports. Filtered by platform, channel, and app version. The chart counts unique reporting installations per `,i.interval,`.`,r?` Only part of the history is available; the total is a lower bound.`:``]})]})]})}var Qi=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`}),$i=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,hour:`numeric`,timeZone:`UTC`});function ea({query:e,search:t,window:n,onWindowChange:r}){let i=e.error?void 0:e.data;return(0,Q.jsxs)(`div`,{className:`grid min-w-0 gap-6 xl:grid-cols-[minmax(0,2fr)_minmax(16rem,1fr)]`,children:[(0,Q.jsxs)(Lt,{"aria-label":`App usage`,role:`region`,className:`min-w-0 shadow-sm`,children:[(0,Q.jsxs)(jt,{className:`flex-row flex-wrap items-center justify-between gap-4`,children:[(0,Q.jsx)(Mt,{children:`App usage`}),(0,Q.jsx)(Fn,{window:n,onWindowChange:r})]}),(0,Q.jsxs)(At,{className:`flex flex-col gap-4`,children:[(0,Q.jsx)(Zi,{window:n,count:i?.activeInstallations,isPending:e.isPending,partial:i?.truncated??!1}),e.isPending?(0,Q.jsx)(E,{"aria-label":`Loading app usage`,className:`h-48`}):e.error?(0,Q.jsxs)(`div`,{className:`flex flex-col items-start gap-4`,children:[(0,Q.jsx)(Tt,{error:e.error,fallbackTitle:`App usage unavailable`}),(0,Q.jsx)(d,{variant:`outline`,onClick:()=>void e.refetch(),children:`Retry app usage`})]}):i?.activeInstallations===0?(0,Q.jsx)(Vn,{className:`h-48`,children:(0,Q.jsxs)(jn,{children:[(0,Q.jsx)(Ln,{children:`No activity reported`}),(0,Q.jsx)(An,{children:`Try another period, platform, channel, or app version.`})]})}):i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`mb-2 text-right text-xs text-muted-foreground`,children:`Reporting installations · UTC`}),(0,Q.jsx)(ot,{"aria-label":`Active users per interval`,className:`h-48 w-full aspect-auto`,config:{installations:{label:`Active users`,color:`var(--chart-2)`}},children:(0,Q.jsxs)(Si,{accessibilityLayer:!0,data:i.points,margin:{right:8,top:8},children:[(0,Q.jsx)(Ne,{vertical:!1}),(0,Q.jsx)(qe,{dataKey:`startMs`,tick:{fill:`var(--muted-foreground)`},tickFormatter:e=>(n===`30d`?Qi:$i).format(e),axisLine:!1,tickLine:!1,minTickGap:45}),(0,Q.jsx)(X,{tick:{fill:`var(--muted-foreground)`},allowDecimals:!1,axisLine:!1,tickLine:!1,width:`auto`}),(0,Q.jsx)(yt,{content:(0,Q.jsx)(Ct,{labelFormatter:(e,t)=>`${$i.format(t[0]?.payload.startMs)} · UTC`})}),(0,Q.jsx)(bi,{dataKey:`installations`,type:`linear`,stroke:`var(--color-installations)`,strokeWidth:2,dot:{r:2},activeDot:{r:4},isAnimationActive:!1})]})})]}),(0,Q.jsxs)(`details`,{className:`text-xs text-muted-foreground`,children:[(0,Q.jsx)(`summary`,{className:`cursor-pointer py-2`,children:`View usage data`}),(0,Q.jsxs)(Zn,{"aria-label":`App usage by interval`,children:[(0,Q.jsx)(Kn,{children:(0,Q.jsxs)(Yn,{children:[(0,Q.jsx)(qn,{children:`Interval · UTC`}),(0,Q.jsx)(qn,{className:`text-right`,children:`Active users`})]})}),(0,Q.jsx)(Jn,{children:i.points.map(e=>(0,Q.jsxs)(Yn,{children:[(0,Q.jsx)(Xn,{children:$i.format(e.startMs)}),(0,Q.jsx)(Xn,{className:`text-right tabular-nums`,children:e.installations?.toLocaleString()??`Unknown`})]},e.startMs))})]})]})]}):null]})]}),(0,Q.jsxs)(Lt,{"aria-label":`Usage distribution`,role:`region`,className:`flex min-w-0 flex-col shadow-sm`,children:[(0,Q.jsxs)(jt,{className:`flex-row items-center justify-between gap-3`,children:[(0,Q.jsx)(Mt,{className:`flex min-h-9 items-center`,children:`Distribution`}),(0,Q.jsxs)(kn,{label:`How distribution is counted`,children:[`Each reporting installation is counted once, using the app version and platform of its latest matching report in the selected period.`,i?.truncated?` Shares reflect only the available history.`:``]})]}),(0,Q.jsx)(At,{className:`flex-1`,children:e.isPending?(0,Q.jsx)(E,{"aria-label":`Loading distribution`,className:`h-48`}):e.error?(0,Q.jsx)(Tt,{error:e.error,fallbackTitle:`Distribution unavailable`}):i?.activeInstallations?(0,Q.jsx)(`div`,{className:`flex flex-col gap-6`,children:[`versions`,`platforms`].map(e=>(0,Q.jsxs)(`section`,{"aria-label":e===`versions`?`App version distribution`:`Platform distribution`,className:`flex flex-col gap-4`,children:[e===`platforms`?(0,Q.jsx)(v,{}):null,(0,Q.jsxs)(`h3`,{className:`flex items-center gap-2 text-sm font-medium text-muted-foreground`,children:[e===`versions`?`App versions`:`Platforms`,e===`versions`?(0,Q.jsx)(It,{variant:`secondary`,children:i.versions.length}):null]}),(0,Q.jsx)(Yi,{className:`min-w-0 [&_[data-slot=scroll-area-viewport]]:max-h-40`,children:(0,Q.jsx)(`dl`,{className:`flex flex-col gap-4 pr-4`,children:i[e].map(n=>{let r=e===`platforms`?n.name===`ios`?`iOS`:`Android`:n.name,a=n.installations/i.activeInstallations*100;return(0,Q.jsxs)(`div`,{className:`group relative flex min-h-11 flex-col gap-2 rounded-sm focus-within:ring-2 focus-within:ring-ring sm:min-h-0`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-baseline justify-between gap-3`,children:[(0,Q.jsxs)(`dt`,{className:`flex min-w-0 items-center gap-2 text-sm`,title:r,children:[e===`platforms`&&(n.name===`ios`||n.name===`android`)?(0,Q.jsx)(Wt,{platform:n.name,className:`size-4 shrink-0`}):null,e===`versions`?(0,Q.jsxs)(Te,{to:`/insights/distribution`,search:{...t,version:n.name},"aria-label":`View bundles for app version ${n.name}`,className:`flex min-w-0 items-center gap-1 after:absolute after:inset-0 group-hover:underline`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:r}),(0,Q.jsx)(Ue,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`})]}):(0,Q.jsx)(`span`,{className:`truncate`,children:r})]}),(0,Q.jsxs)(`dd`,{className:`flex shrink-0 gap-3 text-sm tabular-nums`,children:[(0,Q.jsx)(`span`,{children:n.installations.toLocaleString()}),(0,Q.jsxs)(`span`,{className:`min-w-10 text-right text-muted-foreground`,children:[a.toFixed(1),`%`]})]})]}),(0,Q.jsx)(Nn,{"aria-label":`${r} share`,"aria-valuetext":`${n.installations} installations, ${a.toFixed(1)}%`,value:a})]},n.name)})})})]},e))}):(0,Q.jsx)(Vn,{className:`h-40`,children:(0,Q.jsxs)(jn,{children:[(0,Q.jsx)(Ln,{children:`No reporting installations`}),(0,Q.jsx)(An,{children:`Try a different filter or period.`})]})})}),(0,Q.jsx)(zt,{className:`border-t pt-4`,children:(0,Q.jsxs)(Te,{to:`/insights/distribution`,search:t,className:m({variant:`outline`,className:`h-11 w-full sm:h-9`}),children:[`View distribution`,(0,Q.jsx)(dt,{"aria-hidden":`true`,"data-icon":`inline-end`})]})})]})]})}var ta=Z.createContext(void 0),na=Z.createContext(void 0),ra=Z.createContext(void 0),ia=Z.createContext(``);function aa(){let e=Z.useContext(ta);if(!e)throw Error(de(22));return e}function oa(){let e=Z.useContext(na);if(!e)throw Error(de(23));return e}function sa(){let e=Z.useContext(ra);if(!e)throw Error(de(24));return e}function ca(){return Z.useContext(ia)}var $={id:K(e=>e.id),labelId:K(e=>e.labelId),items:K(e=>e.items),selectedValue:K(e=>e.selectedValue),hasSelectionChips:K(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:K(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:K((e,t)=>t?rn(e.items):!1),open:K(e=>e.open),mounted:K(e=>e.mounted),forceMounted:K(e=>e.forceMounted),inline:K(e=>e.inline),activeIndex:K(e=>e.activeIndex),selectedIndex:K(e=>e.selectedIndex),isActive:K((e,t)=>e.activeIndex===t),isSelected:K((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>qt(t,e,n)):qt(t,r,n)}),transitionStatus:K(e=>e.transitionStatus),popupProps:K(e=>e.popupProps),inputProps:K(e=>e.inputProps),triggerProps:K(e=>e.triggerProps),itemProps:K(e=>e.itemProps),positionerElement:K(e=>e.positionerElement),listElement:K(e=>e.listElement),triggerElement:K(e=>e.triggerElement),inputElement:K(e=>e.inputElement),inputGroupElement:K(e=>e.inputGroupElement),popupSide:K(e=>e.popupSide),openMethod:K(e=>e.openMethod),inputInsidePopup:K(e=>e.inputInsidePopup),inputOwnsFormValue:K(e=>e.inputOwnsFormValue),selectionMode:K(e=>e.selectionMode),name:K(e=>e.name),form:K(e=>e.form),disabled:K(e=>e.disabled),readOnly:K(e=>e.readOnly),required:K(e=>e.required),grid:K(e=>e.grid),virtualized:K(e=>e.virtualized),itemToStringLabel:K(e=>e.itemToStringLabel),isItemEqualToValue:K(e=>e.isItemEqualToValue),modal:K(e=>e.modal),autoHighlight:K(e=>e.autoHighlight),submitOnItemClick:K(e=>e.submitOnItemClick)};function la(e,t){return(n,r)=>{if(n==null)return!1;let i=wn(n,t);return e.contains(i,r)}}function ua(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=wn(r,t),o=n==null?``:wn(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var da=new Map;function fa(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${pa(e.locale)}|${JSON.stringify(t)}`,r=da.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=wn(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=wn(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=wn(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return da.set(n,a),a}function pa(e){return Array.isArray(e)?e.map(e=>pa(e)).join(`,`):e==null?``:String(e)}var ma=fa,ha=Symbol(`none`),ga={value:ha,index:-1};function _a(t){let{id:n,onOpenChangeComplete:i,defaultSelectedValue:o=null,selectedValue:s,onSelectedValueChange:l,defaultInputValue:d,inputValue:f,open:p,defaultOpen:m=!1,selectionMode:h=`none`,onItemHighlighted:g,name:_,form:v,disabled:x=!1,readOnly:S=!1,required:C=!1,inputRef:w,grid:E=!1,items:O,filteredItems:k,filter:j,openOnInputClick:M=!0,autoHighlight:P=!1,keepHighlight:I=!1,highlightItemOnHover:R=!0,loopFocus:ee=!0,itemToStringLabel:B,itemToStringValue:H,isItemEqualToValue:U=Kt,virtualized:re=!1,inline:W=!1,fillInputOnItemPress:ae=!0,modal:oe=!1,limit:G=-1,autoComplete:ce=`list`,formAutoComplete:le,locale:ue,submitOnItemClick:K=!1}=t,{clearErrors:de}=Tn(),{setDirty:he,validityData:ye,shouldValidateOnChange:Ce,setFilled:we,name:Te,disabled:Ee,setTouched:De,setFocused:Oe,validationMode:ke,validation:Ae}=Xt(),je=Se(),Me=hn({id:n}),Ne=ma({locale:ue}),[Pe,Fe]=Z.useState(!1),[Ie,Le]=Z.useState(null),Re=Z.useRef([]),ze=Z.useRef([]),Be=Z.useRef(null),Ve=Z.useRef(null),He=Z.useRef(null),Ue=Z.useRef(null),We=Z.useRef(null),Ge=Z.useRef(!0),Ke=Z.useRef(!1),qe=Z.useRef(null),Je=Z.useRef(null),Ye=Z.useRef(null),Xe=Z.useRef(ga),Ze=Z.useRef(null),Qe=Z.useRef([]),$e=Z.useRef([]),et=Ee||x,q=Te??_,tt=h===`multiple`,nt=h===`single`,rt=f!==void 0||d!==void 0,it=O!==void 0,at=k!==void 0,ot;ot=P===`always`?`always`:P?`input-change`:!1;let[J,st]=Dn({controlled:s,default:tt?o??N:o,name:`Combobox`,state:`selectedValue`}),ct=Z.useMemo(()=>j===null?()=>!0:j===void 0?nt&&!Pe?ua(Ne,B,J):la(Ne,B):j,[j,nt,J,Pe,Ne,B]),lt=be(()=>rt?d??``:nt?wn(J,B):``).current,[ut,dt]=Dn({controlled:f,default:lt,name:`Combobox`,state:`inputValue`}),[Y,ft]=Dn({controlled:p,default:m,name:`Combobox`,state:`open`}),pt=Gt(O),mt=Ie??(ut===``?``:String(ut).trim()),ht=nt?wn(J,B):``,gt=nt&&!Pe&&mt!==``&&ht!==``&&ht.length===mt.length&&Ne.contains(ht,mt),_t=gt?``:mt,vt=it&&at&>,yt=Z.useMemo(()=>O?pt?O.flatMap(e=>e.items):O:N,[O,pt]),bt=Z.useMemo(()=>{if(k&&!vt)return k;if(!O)return N;if(pt){let e=O,t=[],n=0;for(let r of e){if(G>-1&&n>=G)break;let e=_t===``?r.items:r.items.filter(e=>ct(e,_t,B));if(e.length===0)continue;let i=G>-1?G-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(_t===``)return G>-1?yt.slice(0,G):yt;let e=[];for(let t of yt){if(G>-1&&e.length>=G)break;ct(t,_t,B)&&e.push(t)}return e},[k,vt,O,pt,_t,G,ct,B,yt]),xt=Z.useMemo(()=>pt?bt.flatMap(e=>e.items):bt,[bt,pt]),X=be(()=>new ve({id:Me,labelId:void 0,selectedValue:J,open:Y,filter:ct,query:mt,items:O,selectionMode:h,listRef:Re,labelsRef:ze,popupRef:Be,emptyRef:We,inputRef:Ve,startDismissRef:He,endDismissRef:Ue,keyboardActiveRef:Ge,chipsContainerRef:qe,clearRef:Je,valuesRef:Qe,allValuesRef:$e,selectionEventRef:Ye,name:q,form:v,disabled:et,readOnly:S,required:C,grid:E,isGrouped:pt,virtualized:re,openOnInputClick:M,itemToStringLabel:B,isItemEqualToValue:U,modal:oe,autoHighlight:ot,submitOnItemClick:K,hasInputValue:rt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:W,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:b,positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:h===`none`,onOpenChangeComplete:i||e,setOpen:e,setInputValue:e,setSelectedValue:e,setIndices:e,onItemHighlighted:e,handleSelection:e,forceMount:e,requestSubmit:e})).current,St=h===`none`?ut:J,Ct=Z.useMemo(()=>h===`none`?St:Array.isArray(J)?J.map(e=>an(e,H)):an(J,H),[St,H,h,J]),wt=D(g),Tt=D(i),Et=V(X,$.activeIndex),Dt=V(X,$.selectedIndex),Ot=V(X,$.positionerElement),kt=V(X,$.listElement),At=V(X,$.triggerElement),jt=V(X,$.inputElement),Mt=V(X,$.inputGroupElement),Nt=V(X,$.inline),Pt=V(X,$.inputInsidePopup),Ft=V(X,$.inputOwnsFormValue),It=y(At),{mounted:Lt,setMounted:Rt,transitionStatus:zt}=me(Y),{openMethod:Bt,triggerProps:Vt}=Wn(Y),Ht=D(()=>Ct);$t(Pt?It:Ve,Me,St,Ht);let Wt=D(()=>{O?ze.current=xt.map(e=>wn(e,B)):X.set(`forceMounted`,!0)}),Jt=Z.useRef(J);c(()=>{J!==Jt.current&&Wt()},[Wt,J]);let Zt=D(e=>{X.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)Xe.current!==ga&&(Xe.current=ga,wt(void 0,pe(t,void 0,{index:-1})));else{let n=Qe.current[e.activeIndex];Xe.current={value:n,index:e.activeIndex},wt(n,pe(t,void 0,{index:e.activeIndex}))}}),Qt=D((e,n)=>{if(Ke.current=n.reason===ie,t.onInputValueChange?.(e,n),!n.isCanceled){if(n.reason===`input-change`){let t=n.event,r=t.inputType;if(t.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let t=e.trim()!==``;t&&Fe(!0),Ze.current={hasQuery:t},t&&ot&&X.state.activeIndex==null&&X.set(`activeIndex`,0)}}dt(e)}}),tn=D((e,n)=>{if(Y!==e&&(n.reason===`escape-key`&&it&&xt.length===0&&!X.state.emptyRef.current&&n.allowPropagation(),t.onOpenChange?.(e,n),!n.isCanceled&&(e&&tt&&Pt&&!Nt&&Ie!==null&&(Fe(!1),Le(null),ut!==``&&Qt(``,L(ie,n.event))),!e&&Pe&&(nt?(Nt||Le(mt),mt===``&&Fe(!1)):tt&&(Nt||Le(mt),Pt&&Zt({activeIndex:null}),(!Pt||Nt)&&Qt(``,L(ie,n.event)))),ft(e),!e&&Pt&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(De(!0),Oe(!1),ke===`onBlur`)))){let e=h===`none`?ut:J;Ae.commit(e)}}),nn=D((e,t)=>{l?.(e,t),!t.isCanceled&&(st(e),(h===`none`&&Be.current&&ae||nt&&!X.state.inputInsidePopup)&&Qt(wn(e,B),L(t.reason,t.event)),nt&&e!=null&&t.reason!==`input-change`&&Pe&&!Nt&&Le(mt))}),rn=D((e,t)=>{let n=t;if(n===void 0){if(Et===null)return;n=Qe.current[Et]}let r=u(e),i=Ye.current??e;Ye.current=null;let a=L(xe,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&tn(!1,a);return}if(tt){let e=Array.isArray(J)?J:[];if(nn(Ut(e,n,X.state.isItemEqualToValue)?gn(e,n,X.state.isItemEqualToValue):[...e,n],a),!(Ve.current&&Ve.current.value.trim()!==``))return;X.state.inputInsidePopup?Qt(``,L(ie,a.event)):tn(!1,a)}else nn(n,a),tn(!1,a)}),on=D(()=>{if(!X.state.submitOnItemClick)return;let e=Ae.inputRef.current?.form??X.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),sn=D(()=>{if(Rt(!1),Tt?.(!1),Fe(!1),Le(null),Zt(h===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),tt&&Ve.current&&Ve.current.value!==``&&!Ke.current&&Qt(``,L(ie)),nt)if(X.state.inputInsidePopup)Ve.current&&Ve.current.value!==``&&Qt(``,L(ie));else{let e=wn(J,B);Ve.current&&Ve.current.value!==e&&Qt(e,L(e===``?ie:T))}}),cn=Z.useMemo(()=>Nt&&Ot?{current:Ot.closest(`[role="dialog"]`)}:Be,[Nt,Ot]);z({enabled:!t.actionsRef,open:Y,ref:cn,onComplete(){Y||sn()}}),Z.useImperativeHandle(t.actionsRef,()=>({unmount:sn}),[sn]),c(function(){if(Y||h===`none`)return;let e=O?yt:$e.current;if(tt){let t=Array.isArray(J)?J:[],n=t[t.length-1],r=en(e,n,U);Zt({selectedIndex:r===-1?null:r})}else{let t=en(e,J,U);Zt({selectedIndex:t===-1?null:t})}},[Y,J,O,h,yt,tt,U,Zt]),c(()=>{O&&(Qe.current=xt,Re.current.length=xt.length)},[O,xt]),c(()=>{let e=Ze.current;if(e&&(e.hasQuery?ot&&X.set(`activeIndex`,0):ot===`always`&&X.set(`activeIndex`,0),Ze.current=null),!Y&&!Nt)return;let t=it||at?xt:Qe.current,n=X.state.activeIndex;if(n==null){if(ot===`always`&&t.length>0){X.set(`activeIndex`,0);return}Xe.current!==ga&&(Xe.current=ga,X.state.onItemHighlighted(void 0,pe(T,void 0,{index:-1})));return}if(n>=t.length){Xe.current!==ga&&(Xe.current=ga,X.state.onItemHighlighted(void 0,pe(T,void 0,{index:-1}))),X.set(`activeIndex`,null);return}let r=t[n],i=Xe.current.value,a=i!==ha&&qt(r,i,X.state.isItemEqualToValue);(Xe.current.index!==n||!a)&&(Xe.current={value:r,index:n},X.state.onItemHighlighted(r,pe(T,void 0,{index:n})))},[Et,ot,at,it,xt,Nt,Y,X]),c(()=>{if(h===`none`){we(String(ut)!==``);return}we(tt?Array.isArray(J)&&J.length>0:J!=null)},[we,h,ut,J,tt]),Z.useEffect(()=>{it&&ot&&xt.length===0&&Zt({activeIndex:null})},[it,ot,xt.length,Zt]),Un(mt,()=>{!Y||mt===``||mt===String(lt)||Fe(!0)}),Un(J,()=>{if(h!==`none`&&(de(q),he(J!==ye.initialValue),Ce()?Ae.commit(J):Ae.commit(J,!0),nt&&!rt&&!Pt)){let e=wn(J,B);ut!==e&&Qt(e,L(T))}}),Un(ut,()=>{h===`none`&&(de(q),he(ut!==ye.initialValue),Ce()?Ae.commit(ut):Ae.commit(ut,!0))}),Un(O,()=>{if(!nt||rt||Pt||Pe)return;let e=wn(J,B);ut!==e&&Qt(e,L(T))});let ln=fe({open:Nt?!0:Y,onOpenChange:tn,elements:{reference:Pt?At:jt,floating:Ot}}),un,dn;Nt||(un=E?`grid`:`listbox`,dn=Y?`true`:`false`);let fn=Z.useMemo(()=>{let e=jt?.tagName===`INPUT`,t=jt==null||e,n=t||Y,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=dn,r[`aria-haspopup`]=un,r[`aria-controls`]=Y?kt?.id:void 0,r[`aria-autocomplete`]=ce),{reference:r,floating:{role:`presentation`}}},[jt,Y,dn,un,kt?.id,ce]),pn=Hn(ln,{enabled:!S&&!et&&M,event:`mousedown-only`,toggle:!1,touchOpenDelay:Pt?0:100,reason:F}),mn=te(ln,{enabled:!S&&!et&&!Nt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Nt?!0:void 0,outsidePress(e){let t=u(e);return!A(At,t)&&!A(Je.current,t)&&!A(qe.current,t)&&!A(Mt,t)}}),_n=Yt(ln,{enabled:!S&&!et,id:Me,listRef:Re,activeIndex:Et,selectedIndex:Dt,virtual:!0,loopFocus:ee,allowEscape:ee&&!ot,focusItemOnOpen:Pe||h===`none`&&!ot?!1:`auto`,focusItemOnHover:R,resetOnPointerLeave:!I,cols:E?2:1,orientation:E?`horizontal`:void 0,rtl:je===`rtl`,disabledIndices:N,onNavigate(e,t){!t&&!Y||zt===`ending`||Zt(t?{activeIndex:e,type:Ge.current?`keyboard`:`pointer`}:{activeIndex:e})}}),vn=Z.useMemo(()=>ge(_n.reference,mn.reference,pn.reference,fn.reference),[_n.reference,mn.reference,pn.reference,fn.reference]),yn=Z.useMemo(()=>ge(_e,_n.floating,mn.floating,fn.floating),[_n.floating,mn.floating,fn.floating]),bn=Z.useMemo(()=>{let e=_n.item;return e?{...e,onFocus:void 0}:b},[_n.item]);a(()=>{X.update({inline:W,popupProps:yn,inputProps:vn,triggerProps:Vt,itemProps:bn,setOpen:tn,setInputValue:Qt,setSelectedValue:nn,setIndices:Zt,onItemHighlighted:wt,handleSelection:rn,forceMount:Wt,requestSubmit:on})}),c(()=>{X.update({id:Me,selectedValue:J,open:Y,mounted:Lt,transitionStatus:zt,items:O,inline:W,popupProps:yn,inputProps:vn,triggerProps:Vt,openMethod:Bt,itemProps:bn,selectionMode:h,name:q,form:v,disabled:et,readOnly:S,required:C,grid:E,isGrouped:pt,virtualized:re,onOpenChangeComplete:Tt,openOnInputClick:M,itemToStringLabel:B,modal:oe,autoHighlight:ot,isItemEqualToValue:U,submitOnItemClick:K,hasInputValue:rt,requestSubmit:on,inputOwnsFormValue:h===`none`&&(W||!X.state.inputInsidePopup)})},[X,Me,J,Y,Lt,zt,O,yn,vn,bn,Bt,Vt,h,q,et,S,C,Ae,E,pt,re,Tt,M,B,oe,U,K,rt,W,on,ot,v]);let xn=ne(w,Ae.inputRef),Sn=Z.useMemo(()=>({query:mt,hasItems:it,filteredItems:bt,flatFilteredItems:xt}),[mt,it,bt,xt]),Cn=Z.useMemo(()=>Array.isArray(St)?``:an(St,H),[St,H]),En=tt&&Array.isArray(J)&&J.length>0,On=tt||h===`none`&&Ft?void 0:q,kn=Z.useMemo(()=>!tt||!Array.isArray(J)||!q?null:J.map(e=>{let t=an(e,H);return(0,Q.jsx)(`input`,{type:`hidden`,form:v,name:q,value:t},t)}),[tt,J,v,q,H]),An=(0,Q.jsxs)(Z.Fragment,{children:[t.children,(0,Q.jsx)(`input`,{...Ae.getInputValidationProps({onFocus(){if(Pt){At?.focus();return}(Ve.current||At)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||et||S){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=L(T,e.nativeEvent);function r(){if(tt)return;if(h===`none`){he(t!==ye.initialValue),Qt(t,n),Ce()&&Ae.commit(t);return}let e=Qe.current.find(e=>an(e,H).toLowerCase()===t.toLowerCase()||wn(e,B).toLowerCase()===t.toLowerCase());e!=null&&(he(e!==ye.initialValue),nn?.(e,n),Ce()&&Ae.commit(e))}O?r():(Wt(),queueMicrotask(r))}}),id:Me&&On==null?`${Me}-hidden-input`:void 0,form:v,name:On,autoComplete:le,disabled:et,required:C&&!En,readOnly:S,value:Cn,ref:xn,style:On?se:r,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),kn]});return(0,Q.jsx)(ta.Provider,{value:X,children:(0,Q.jsx)(na.Provider,{value:ln,children:(0,Q.jsx)(ra.Provider,{value:Sn,children:(0,Q.jsx)(ia.Provider,{value:ut,children:An})})})})}var va={...ce,...nn,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null},ya=2,ba=Z.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:d,setTouched:f,setFocused:p,validationMode:m,validation:h}=Xt(),{labelId:_}=Qt(),v=aa(),{filteredItems:y}=sa(),b=V(v,$.selectionMode),x=V(v,$.disabled),S=V(v,$.readOnly),C=V(v,$.required),w=V(v,$.mounted),T=V(v,$.popupSide),E=V(v,$.positionerElement),O=V(v,$.listElement),k=V(v,$.triggerProps),N=V(v,$.triggerElement),P=V(v,$.inputInsidePopup),F=V(v,$.id),I=V(v,$.labelId),R=V(v,$.open),z=V(v,$.selectedValue),B=V(v,$.activeIndex),te=V(v,$.selectedIndex),H=V(v,$.hasSelectedValue),ne=oa(),U=ca(),re=ye(),W=d||x||a,ie=y.length===0,ae=w&&E?T:null;hn({id:P?o:void 0});let oe=P?o??F:o,G=Cn(_,I),se=Z.useRef(``);function ce(e){se.current=e.pointerType}let le=ne.useState(`domReferenceElement`);Z.useEffect(()=>{P&&N&&N!==le&&ne.set(`domReferenceElement`,N)},[N,le,ne,P]);let{reference:ue}=on(ne,{enabled:!R&&!S&&!x&&b===`single`,listRef:v.state.labelsRef,activeIndex:B,selectedIndex:te,onMatch(e){let t=v.state.valuesRef.current[e];t!==void 0&&v.state.setSelectedValue(t,L(`none`))}}),{reference:K}=Hn(ne,{enabled:!S&&!x,event:`mousedown`}),{buttonRef:de,getButtonProps:fe}=we({native:i,disabled:W}),pe={...l,open:R,disabled:W,popupSide:ae,listEmpty:ie,placeholder:b===`none`?!1:!H};return j(`button`,e,{ref:[t,de,D(e=>{v.set(`triggerElement`,e)})],state:pe,props:[k,K,ue,{id:oe,tabIndex:P?0:-1,role:P?`combobox`:void 0,"aria-expanded":R?`true`:`false`,"aria-haspopup":P?`dialog`:`listbox`,"aria-controls":R?O?.id:void 0,"aria-required":P&&C||void 0,"aria-labelledby":G,onPointerDown:ce,onPointerEnter:ce,onFocus(){p(!0),!(W||S)&&re.start(0,v.state.forceMount)},onBlur(e){if(!A(E,e.relatedTarget)&&(f(!0),p(!1),m===`onBlur`)){let e=b===`none`?U:z;h.commit(e)}},onMouseDown(e){if(W||S||(P||ne.set(`domReferenceElement`,e.currentTarget),v.state.forceMount(),se.current!==`touch`&&(v.state.inputRef.current?.focus(),P||e.preventDefault()),R))return;let t=g(e.currentTarget);function n(e){if(!N)return;let t=u(e),n=v.state.positionerElement,r=v.state.listElement;if(A(N,t)||A(n,t)||A(r,t)||t===N)return;let i=fn(N),a=e.clientX>=i.left-ya&&e.clientX<=i.right+ya,o=e.clientY>=i.top-ya&&e.clientY<=i.bottom+ya;a&&o||v.state.setOpen(!1,L(`cancel-open`,e))}P&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){W||S||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(M(e),v.state.setOpen(!0,L(ee,e.nativeEvent)),v.state.inputRef.current?.focus())}},h?h.getValidationProps(c):c,fe],stateAttributesMapping:va})}),xa=Z.createContext(void 0);function Sa(){return Z.useContext(xa)}var Ca=Z.createContext(void 0);function wa(e){let t=Z.useContext(Ca);if(t===void 0&&!e)throw Error(de(21));return t}var Ta=Z.forwardRef(function(e,t){let n=aa(),{buttonRef:r,getButtonProps:i}=we({native:!1}),a=ne(t,r);function o(e){n.state.setOpen(!1,L(le,e.nativeEvent,e.currentTarget))}return(0,Q.jsx)(`span`,{ref:a,...i({onClick:o}),"aria-label":`Dismiss`,tabIndex:void 0,style:se})}),Ea=Z.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:p}=Xt(),{labelId:m}=Qt(),h=Sa(),g=!!wa(!0),_=aa(),{filteredItems:v}=sa(),y=ca(),b=Se(),S=V(_,$.required),C=V(_,$.disabled),w=V(_,$.readOnly),E=V(_,$.name),O=V(_,$.form),k=V(_,$.selectionMode),A=V(_,$.autoHighlight),N=V(_,$.inputProps),F=V(_,$.triggerProps),I=V(_,$.open),R=V(_,$.mounted),z=V(_,$.selectedValue),ee=V(_,$.popupSide),B=V(_,$.positionerElement),te=V(_,$.id),H=V(_,$.inline),ne=V(_,$.modal),re=!!A,W=R&&B?ee:null,oe=l||C||i,G=v.length===0,se=g||H,ce=!se||ne,le=he(a??(se?void 0:te)),ue=Cn(m,void 0),K=g?Zt:c,[de,fe]=Z.useState(null),pe=Z.useRef(!1),me=Z.useRef(null),ge=Z.useRef(!1),_e=k===`none`&&!g,ve=D(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.state.setInputValue(``,L(T)),_.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:_e})}),ye=g||!p?s:p.getValidationProps(s),be={...K,open:I,disabled:oe,readOnly:w,popupSide:W,listEmpty:G};function xe(e){if(!h)return;let t,{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,i=b===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(n!==void 0){if(e.key===a)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===o)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=z.length-1?z.length-2:n;t=r>=0?r:void 0,_.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===a&&(e.currentTarget.selectionStart??0)===0&&z.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&z.length>0&&(_.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let Ce=j(`input`,e,{state:be,ref:[t,_.state.inputRef,ve],props:[N,F,{type:`text`,value:e.value??de??y,"aria-readonly":w||void 0,"aria-required":S||void 0,"aria-labelledby":ue,disabled:oe,readOnly:w,required:k===`none`?S:void 0,form:O,..._e&&E&&{name:E},id:le,onFocus(){if(d(!0),!H||!ge.current)return;ge.current=!1;let e=me.current;e==null||!Object.hasOwn(_.state.valuesRef.current,e)||_.state.setIndices({activeIndex:e})},onBlur(){u(!0),d(!1);let e=_.state.activeIndex;if(H&&e!==null&&A!==`always`&&(me.current=e,ge.current=!0,_.state.setIndices({activeIndex:null})),f===`onBlur`){let e=k===`none`?y:z;p.commit(e)}},onCompositionStart(e){P||(pe.current=!0,fe(e.currentTarget.value))},onCompositionEnd(e){pe.current=!1;let t=e.currentTarget.value;fe(null),_.state.setInputValue(t,L(ae,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=pe.current||!n;if(pe.current){let t=e.currentTarget.value;fe(t),t===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.state.setOpen(!1,L(ie,e.nativeEvent));let n=t.trim(),i=re&&n!==``;!w&&!oe&&n&&r&&(_.state.setOpen(!0,L(ae,e.nativeEvent)),re||_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})),I&&_.state.activeIndex!==null&&!i&&_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}_.state.setInputValue(e.currentTarget.value,L(ae,e.nativeEvent));let i=e.currentTarget.value===``,a=L(ie,e.nativeEvent);i&&!_.state.inputInsidePopup&&(k===`single`&&_.state.setSelectedValue(null,a),_.state.openOnInputClick||_.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!w&&!oe&&o&&r&&(_.state.setOpen(!0,L(ae,e.nativeEvent)),re||_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})),I&&_.state.activeIndex!==null&&!re&&_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(oe||w||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;_.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=b===`rtl`;if(e.key===`Home`){M(e);let n=x&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){M(e);let i=x&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!R&&e.key===`Escape`){let t=k===`multiple`&&Array.isArray(z)?z.length===0:z===null,n=L(U,e.nativeEvent),r=k===`multiple`?[]:null;_.state.setInputValue(``,n),_.state.setSelectedValue(r,n),!t&&!_.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&h.highlightedChipIndex===void 0&&Array.isArray(z)&&z.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:z.length-1,r=z.filter((e,t)=>t!==n);_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`}),_.state.setSelectedValue(r,L(T,e.nativeEvent));return}let i=h?.highlightedChipIndex!==void 0,a=xe(e);if(h?.setHighlightedChipIndex(a),a===void 0?i&&_.state.inputRef.current?.focus():h?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&I){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(H)return;_.state.setOpen(!1,L(T,n));return}M(e);let r=_.state.listRef.current[t];r&&(_.state.selectionEventRef.current=n,r.click(),_.state.selectionEventRef.current=null)}},onPointerMove(){_.state.keyboardActiveRef.current=!1},onPointerDown(){_.state.keyboardActiveRef.current=!1}},ye],stateAttributesMapping:va}),we=g?(0,Q.jsx)(Jt.Provider,{value:tn,children:Ce}):Ce;return(0,Q.jsxs)(Z.Fragment,{children:[I&&ce&&(0,Q.jsx)(Ta,{ref:_.state.startDismissRef}),we]})}),Da={...h,...n},Oa=Z.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=Xt(),u=aa(),d=V(u,$.selectionMode),f=V(u,$.disabled),p=V(u,$.readOnly),m=V(u,$.open),h=V(u,$.selectedValue),g=V(u,$.hasSelectionChips),_=ca(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=we({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=me(v),T={disabled:y,visible:v,open:m,transitionStatus:C};z({open:v,ref:u.state.clearRef,onComplete(){v||w(!1)}});let E=j(`button`,e,{state:T,ref:[t,b,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,L(B,e.nativeEvent)),d===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(h)?[]:null,L(B,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,x],stateAttributesMapping:Da});return o||S?E:null}),ka=Z.createContext(null);function Aa(){return Z.useContext(ka)}function ja(e){let{children:t}=e,{filteredItems:n}=sa(),r=Aa(),i=r?r.items:n;return i?(0,Q.jsx)(Z.Fragment,{children:i.map(t)}):null}var Ma=Z.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=aa(),l=oa(),u=!!wa(!0),{filteredItems:d,hasItems:f}=sa(),p=V(c,$.selectionMode),m=V(c,$.grid),h=V(c,$.popupProps),g=V(c,$.virtualized),_=p===`multiple`,v=d.length===0,y=D(e=>{c.set(`positionerElement`,e)}),b=D(e=>{c.set(`listElement`,e)}),x=Z.useMemo(()=>typeof o==`function`?n||=(0,Q.jsx)(ja,{children:o}):o,[o]),S={empty:v},C=l.useState(`floatingId`),w=j(`div`,e,{state:S,ref:[t,b,u?null:y],props:[h,{children:x,tabIndex:-1,id:C,role:m?`grid`:`listbox`,"aria-multiselectable":_?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;M(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});return g?w:(0,Q.jsx)(pn,{elementsRef:c.state.listRef,labelsRef:f?void 0:c.state.labelsRef,children:w})}),Na=``;function Pa(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function Fa(){let e=ye(),n=Z.useRef(null);return Z.useEffect(()=>{if(t)return;let r=n.current;if(r==null)return;let i=Pa(r);if(i==null)return;let a=i.nodeValue??``,o=`${a}${Na}`;return i.nodeValue=o,e.start(200,()=>{i.nodeValue===o&&(i.nodeValue=a)}),()=>{e.clear(),i.nodeValue===o&&(i.nodeValue=a)}},[n,e]),n}var Ia=Z.createContext(void 0);function La(){let e=Z.useContext(Ia);if(e===void 0)throw Error(de(20));return e}var Ra=Z.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=aa(),a=V(i,$.mounted),o=V(i,$.forceMounted);return a||n||o?(0,Q.jsx)(Ia.Provider,{value:n,children:(0,Q.jsx)(oe,{ref:t,...r})}):null}),za=Z.forwardRef(function(e,t){let{render:n,className:r,anchor:a,positionMethod:o=`absolute`,side:s=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:m=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:_=!1,collisionAvoidance:v=I,style:y,...b}=e,x=aa(),{filteredItems:C}=sa(),w=oa(),T=La(),E=V(x,$.modal),O=V(x,$.open),k=V(x,$.mounted),A=V(x,$.openMethod),j=V(x,$.positionerElement),M=V(x,$.triggerElement),N=V(x,$.inputElement),P=V(x,$.inputGroupElement),F=V(x,$.inputInsidePopup),L=V(x,$.transitionStatus),R=C.length===0,z=i({anchor:a??(F?M:P??N),floatingRootContext:w,positionMethod:o,mounted:k,side:s,sideOffset:u,align:l,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:g,disableAnchorTracking:_,keepMounted:T,collisionAvoidance:v,lazyFlip:!0});vn(O&&E,A===`touch`,j,M);let ee={open:O,side:z.side,align:z.align,anchorHidden:z.anchorHidden,empty:R};c(()=>{x.set(`popupSide`,z.side)},[x,z.side]);let B=D(e=>{x.set(`positionerElement`,e)}),te=Ce(e,ee,{styles:z.positionerStyles,transitionStatus:L,props:b,refs:[t,B],hidden:!k,inert:!O});return(0,Q.jsxs)(Ca.Provider,{value:z,children:[k&&E&&(0,Q.jsx)(p,{inert:S(!O),cutout:P??N??M}),te]})}),Ba={..._,...h},Va=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=aa(),l=wa(),d=oa(),{filteredItems:f}=sa(),p=V(c,$.mounted),m=V(c,$.open),h=V(c,$.openMethod),g=V(c,$.transitionStatus),_=V(c,$.inputInsidePopup),v=V(c,$.inputElement),y=V(c,$.modal),b=f.length===0;z({open:m,ref:c.state.popupRef,onComplete(){m&&c.state.onOpenChangeComplete(!0)}});let x=j(`div`,e,{state:{open:m,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:g,empty:b},ref:[t,c.state.popupRef],props:[{role:_?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=u(e.nativeEvent);h!==`touch`&&(A(c.state.listElement,t)||t===e.currentTarget)&&c.state.inputRef.current?.focus()}},w(g),s],stateAttributesMapping:Ba}),S=a===void 0?_?e=>e===`touch`?c.state.popupRef.current:v:!1:a,C;C=o??(_?void 0:!1);let T=!_||y;return(0,Q.jsx)(W,{context:d,disabled:!p,modal:T,openInteractionType:h,initialFocus:S,returnFocus:C,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:(0,Q.jsxs)(Z.Fragment,{children:[x,T&&(0,Q.jsx)(Ta,{ref:c.state.endDismissRef})]})})}),Ha=Z.createContext(void 0);function Ua(){let e=Z.useContext(Ha);if(!e)throw Error(de(19));return e}var Wa=Z.createContext(!1);function Ga(){return Z.useContext(Wa)}var Ka=s(k()),qa=Z.memo(Z.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,index:o,disabled:s=!1,nativeButton:l=!1,...u}=e,d=Z.useRef(!1),f=Z.useRef(null),p=un({index:o,textRef:f,indexGuessBehavior:Sn.GuessFromOrder}),m=aa(),h=Ga(),{flatFilteredItems:g,hasItems:_}=sa(),v=V(m,$.open),y=V(m,$.selectionMode),b=V(m,$.readOnly),x=V(m,$.virtualized),S=V(m,$.isItemEqualToValue),C=y!==`none`,w=o??(x?en(g,a,S):p.index),T=p.index!==-1,E=V(m,$.id),D=V(m,$.isActive,w),O=V(m,$.isSelected,a),k=V(m,$.itemProps),A=Z.useRef(null),M=E!=null&&T?`${E}-${w}`:void 0,N=O&&C;c(()=>{if(!(T&&(x||o!=null)))return;let e=m.state.listRef.current;return e[w]=A.current,()=>{delete e[w]}},[T,x,w,o,m]),c(()=>{if(!T||_)return;let e=m.state.valuesRef.current;return e[w]=a,y!==`none`&&m.state.allValuesRef.current.push(a),()=>{delete e[w]}},[T,_,w,a,m,y]),c(()=>{if(!v){d.current=!1;return}if(!T||_)return;let e=m.state.selectedValue;qt(a,Array.isArray(e)?e[e.length-1]:e,S)&&m.set(`selectedIndex`,w)},[T,_,v,m,w,a,S]);let{getButtonProps:P,buttonRef:F}=we({disabled:s,focusableWhenDisabled:!0,native:l,composite:!0}),I={disabled:s,selected:N,highlighted:D};function L(e){function t(){m.state.handleSelection(e,a)}m.state.submitOnItemClick?(Ka.flushSync(t),m.state.requestSubmit()):t()}let R={id:M,role:h?`gridcell`:`option`,"aria-selected":C?N:void 0,tabIndex:void 0,onPointerDownCapture(e){d.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){s||b||L(e.nativeEvent)},onMouseUp(e){let t=d.current;d.current=!1,!(s||b||e.button!==0||t||!D)&&L(e.nativeEvent)}},z=j(`div`,e,{ref:[F,t,p.ref,A],state:I,props:[k,R,u,P]}),ee=Z.useMemo(()=>({selected:N,textRef:f}),[N,f]);return(0,Q.jsx)(Ha.Provider,{value:ee,children:z})})),Ja=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=sa(),c=aa(),l=Fa(),u=s.length===0?a:null;return j(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});function Ya(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Q.jsx)(_a,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Xa=Z.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=Ua();return n||r?(0,Q.jsx)(Za,{...e,ref:t}):null}),Za=Z.memo(Z.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=Ua(),c=Z.useRef(null),{transitionStatus:l,setMounted:u}=me(s),d=j(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:h});return z({open:s,ref:c,onComplete(){s||u(!1)}}),d})),Qa=Ya;function $a({className:e,children:t,...n}){return(0,Q.jsxs)(ba,{"data-slot":`combobox-trigger`,className:C(`[&_svg:not([class*='size-'])]:size-3.5`,e),...n,children:[t,(0,Q.jsx)(Vt,{className:`text-muted-foreground size-3.5 pointer-events-none`})]})}function eo({className:e,...t}){return(0,Q.jsx)(Oa,{"aria-label":`Clear selection`,"data-slot":`combobox-clear`,render:(0,Q.jsx)(er,{variant:`ghost`,size:`icon-xs`}),className:C(e),...t,children:(0,Q.jsx)(G,{className:`pointer-events-none`})})}function to({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:i=!1,...a}){return(0,Q.jsxs)(tr,{className:C(`w-auto`,e),children:[(0,Q.jsx)(Ea,{render:(0,Q.jsx)(Qn,{disabled:n}),...a}),(0,Q.jsxs)($n,{align:`inline-end`,children:[r&&(0,Q.jsx)($a,{render:(0,Q.jsx)(er,{size:`icon-xs`,variant:`ghost`,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:n})}),i&&(0,Q.jsx)(eo,{disabled:n})]}),t]})}function no({className:e,side:t=`bottom`,sideOffset:n=6,align:r=`start`,alignOffset:i=0,anchor:a,...o}){return(0,Q.jsx)(Ra,{children:(0,Q.jsx)(za,{side:t,sideOffset:n,align:r,alignOffset:i,anchor:a,className:`isolate z-50`,children:(0,Q.jsx)(Va,{"data-slot":`combobox-content`,"data-chips":!!a,className:C(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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 ring-foreground/10 *:data-[slot=input-group]:bg-input/20 dark:bg-popover max-h-72 min-w-32 overflow-hidden rounded-lg shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-7 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:shadow-none dark group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)`,e),...o})})})}function ro({className:e,...t}){return(0,Q.jsx)(Ma,{"data-slot":`combobox-list`,className:C(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overflow-y-auto overscroll-contain`,e),...t})}function io({className:e,children:t,...n}){return(0,Q.jsxs)(qa,{"data-slot":`combobox-item`,className:C(`data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[t,(0,Q.jsx)(Xa,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`}),children:(0,Q.jsx)(Bt,{className:`pointer-events-none`})})]})}function ao({className:e,...t}){return(0,Q.jsx)(Ja,{"data-slot":`combobox-empty`,className:C(`text-muted-foreground hidden w-full justify-center py-2 text-center text-xs/relaxed group-data-empty/combobox-content:flex`,e),...t})}function oo({onScopeChange:e,scope:t,appVersions:n}){let[r,i]=(0,Z.useState)(t.platform),[a,o]=(0,Z.useState)(t.channel),[s,c]=(0,Z.useState)(t.appVersion??``),l=[...new Set([...n,...s?[s]:[]])],u=st(),f=u.data?.map(e=>e.name)??[];return(0,Q.jsx)(`form`,{"aria-label":`Insights controls`,onSubmit:t=>{t.preventDefault(),e({platform:r,channel:a,...s?{appVersion:s}:{}})},children:(0,Q.jsxs)(Pt,{className:`grid grid-cols-2 items-end gap-4 lg:grid-cols-[9rem_minmax(0,1fr)_minmax(0,1fr)_auto]`,children:[(0,Q.jsxs)(Rt,{children:[(0,Q.jsx)(kt,{htmlFor:`insights-platform`,children:`Platform`}),(0,Q.jsxs)(mn,{items:{all:`All platforms`,ios:`iOS`,android:`Android`},value:r,onValueChange:e=>{(e===`all`||e===`ios`||e===`android`)&&i(e)},children:[(0,Q.jsx)(ln,{id:`insights-platform`,className:`min-h-11 w-full sm:min-h-9`,children:(0,Q.jsxs)(_n,{children:[r===`all`?null:(0,Q.jsx)(Wt,{platform:r,className:`size-3.5`}),r===`all`?`All platforms`:r===`ios`?`iOS`:`Android`]})}),(0,Q.jsx)(sn,{children:(0,Q.jsxs)(yn,{children:[(0,Q.jsx)(xn,{value:`all`,children:`All platforms`}),(0,Q.jsxs)(xn,{value:`ios`,children:[(0,Q.jsx)(Wt,{platform:`ios`,className:`size-3.5`}),`iOS`]}),(0,Q.jsxs)(xn,{value:`android`,children:[(0,Q.jsx)(Wt,{platform:`android`,className:`size-3.5`}),`Android`]})]})})]})]}),(0,Q.jsxs)(Rt,{className:`min-w-0`,children:[(0,Q.jsx)(kt,{htmlFor:`insights-channel`,children:`Channel`}),(0,Q.jsxs)(Qa,{items:f,value:a,onValueChange:e=>{e!==null&&o(e)},children:[(0,Q.jsx)(to,{className:`h-11 w-full sm:h-9 [&_input]:h-full`,id:`insights-channel`,placeholder:`Search channels`,maxLength:1024}),(0,Q.jsxs)(no,{children:[(0,Q.jsx)(ao,{children:u.isPending?`Loading channels…`:u.isError?(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-2 p-2`,children:[`Couldn't load channels.`,(0,Q.jsx)(d,{onClick:()=>void u.refetch(),size:`sm`,variant:`outline`,children:`Retry channels`})]}):`No channels found.`}),(0,Q.jsx)(ro,{children:e=>(0,Q.jsx)(io,{className:`min-h-11 pr-8 sm:min-h-8`,value:e,children:(0,Q.jsx)(`span`,{className:`truncate`,children:e})},e)})]})]})]}),(0,Q.jsxs)(Rt,{className:`min-w-0`,children:[(0,Q.jsx)(kt,{htmlFor:`insights-app-version`,children:`App version`}),(0,Q.jsxs)(mn,{items:Object.fromEntries([[`all`,`All versions`],...l.map(e=>[`version:${e}`,e])]),value:s?`version:${s}`:`all`,onValueChange:e=>{e!==null&&c(e===`all`?``:e.slice(8))},children:[(0,Q.jsx)(ln,{id:`insights-app-version`,className:`min-h-11 w-full sm:min-h-9`,children:(0,Q.jsx)(_n,{})}),(0,Q.jsx)(sn,{children:(0,Q.jsxs)(yn,{children:[(0,Q.jsx)(xn,{value:`all`,children:`All versions`}),l.map(e=>(0,Q.jsx)(xn,{value:`version:${e}`,children:e},e))]})})]})]}),(0,Q.jsx)(d,{className:`h-11 sm:h-9`,size:`lg`,type:`submit`,variant:`outline`,children:`Apply filters`})]})})}var so=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`}),co=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,hour:`numeric`,timeZone:`UTC`}),lo=[`var(--chart-2)`,`var(--foreground)`,`var(--chart-1)`,`var(--muted-foreground)`,`var(--chart-4)`],uo=[void 0,`6 3`,`2 3`],fo={active:{label:`Active`,summary:`Active installations`,point:`active`,total:`activeInstallations`,color:`text-success/85`},downloaded:{label:`Downloaded`,summary:`Installations waiting to apply`,point:`pendingInstallations`,total:`pendingInstallations`,color:`text-primary/85`},recovered:{label:`Recovered`,summary:`Crashed bundle recovery`,point:`recoveredInstallations`,total:`recoveredInstallations`,color:`text-warning/85`}};function po({report:e}){let[t,n]=(0,Z.useState)(`active`),[r,i]=(0,Z.useState)(null),a=fo[t],o=e.series.find(e=>e.releaseId===r),s=Object.fromEntries(e.series.map((e,t)=>[`bundle${t}`,{label:e.releaseId,color:lo[t%lo.length]}])),c=(e.series[0]?.points??[]).map((t,n)=>({startMs:t.startMs,...Object.fromEntries(e.series.map((e,t)=>[`bundle${t}`,e.points[n][a.point]]))})),l=t=>(e.intervalMs<864e5?co:so).format(t),u=o?[...o.points].reverse().find(e=>e.spike):void 0,d={active:e.series.reduce((e,t)=>e+t.activeInstallations,0),downloaded:e.pendingInstallations,recovered:e.series.filter(e=>e.recoveredInstallations>0).length};return(0,Q.jsxs)(Mn,{value:t,onValueChange:e=>{Object.hasOwn(fo,e)&&n(e)},className:`gap-6`,children:[(0,Q.jsx)(`dl`,{"aria-label":`Bundle activity overview`,className:`grid grid-cols-1 gap-5 sm:grid-cols-3 sm:gap-6`,children:Object.entries(fo).map(([e,{label:t,summary:n,color:r}])=>(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(`dt`,{className:`text-sm font-medium`,children:t}),(0,Q.jsxs)(`dd`,{className:`flex flex-col gap-1`,children:[(0,Q.jsx)(`span`,{className:C(`text-4xl font-semibold tracking-tight tabular-nums`,d[e]>0?r:`text-muted-foreground`),children:d[e].toLocaleString()}),(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n})]})]},e))}),(0,Q.jsx)(In,{"aria-label":`Activity metric`,variant:`line`,className:`min-h-11 sm:min-h-9`,children:Object.entries(fo).map(([e,{label:t}])=>(0,Q.jsx)(zn,{className:`px-3`,value:e,children:t},e))}),(0,Q.jsx)(On,{value:t,className:`flex flex-col gap-4`,children:e.series.length===0?(0,Q.jsx)(`div`,{className:`flex h-48 items-center justify-center text-center text-sm text-muted-foreground`,children:`No bundle reports in this period. Try another channel or check again after the app reports activity.`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`p`,{className:`mb-2 text-right text-xs text-muted-foreground`,children:[t===`recovered`?`${a.label} installations per interval`:`Installations`,` `,`· UTC`]}),(0,Q.jsx)(ot,{"aria-label":`${a.label} trend for all reported bundle IDs`,className:`h-56 w-full aspect-auto sm:h-64`,config:s,children:(0,Q.jsxs)(Si,{accessibilityLayer:!0,data:c,margin:{left:-12,right:12,top:8},children:[(0,Q.jsx)(Ne,{vertical:!1}),(0,Q.jsx)(qe,{tick:{fill:`var(--muted-foreground)`},axisLine:!1,dataKey:`startMs`,minTickGap:40,tickFormatter:l,tickLine:!1}),(0,Q.jsx)(X,{tick:{fill:`var(--muted-foreground)`},allowDecimals:!1,axisLine:!1,tickLine:!1,width:48}),(0,Q.jsx)(yt,{content:(0,Q.jsx)(Ct,{className:`max-h-64 max-w-[calc(100vw-3rem)] overflow-auto`,labelFormatter:(e,t)=>`${co.format(t[0]?.payload.startMs)} · UTC`})}),e.series.map((e,t)=>(0,Q.jsx)(bi,{dataKey:`bundle${t}`,type:`linear`,stroke:`var(--color-bundle${t})`,strokeWidth:r===e.releaseId?3:2,strokeOpacity:!o||o===e?1:.4,strokeDasharray:uo[Math.floor(t/lo.length)%uo.length],dot:{r:2},activeDot:{r:4},isAnimationActive:!1},e.releaseId))]})})]}),(0,Q.jsx)(Yi,{"aria-label":`Reported bundles`,className:`min-w-0 [&_[data-slot=scroll-area-viewport]]:max-h-48`,children:(0,Q.jsx)(`div`,{className:C(`grid grid-cols-1 gap-1 pr-3`,e.series.length>1&&`xl:grid-cols-2`),children:e.series.map((e,t)=>(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Highlight bundle ${e.releaseId}`,"aria-pressed":r===e.releaseId,title:e.releaseId,onClick:()=>i(r===e.releaseId?null:e.releaseId),className:`flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-left text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-pressed:bg-muted`,children:[(0,Q.jsx)(`svg`,{"aria-hidden":`true`,width:`20`,height:`8`,className:`shrink-0`,children:(0,Q.jsx)(`line`,{x1:`0`,x2:`20`,y1:`4`,y2:`4`,stroke:lo[t%lo.length],strokeWidth:`2`,strokeDasharray:uo[Math.floor(t/lo.length)%uo.length]})}),(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e.releaseId}),e.points.some(e=>e.spike)?(0,Q.jsx)(R,{"aria-label":`Recovery spike`,className:`size-3 shrink-0`}):null,(0,Q.jsx)(`span`,{className:`ml-auto tabular-nums`,children:e[a.total].toLocaleString()})]},e.releaseId))})}),o?(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t pt-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`break-all font-mono text-xs`,children:o.releaseId}),(0,Q.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Active `,o.activeInstallations.toLocaleString(),` · Downloaded `,o.pendingInstallations.toLocaleString(),` `,`waiting to apply · Recovered`,` `,o.recoveredInstallations.toLocaleString(),` in this period`]}),t===`recovered`&&u?(0,Q.jsxs)(`p`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,Q.jsx)(R,{className:`size-3 shrink-0`,"aria-hidden":`true`}),`Recovery spike on `,so.format(u.startMs),`. Review this bundle’s delivery settings.`]}):null]}),(0,Q.jsxs)(Te,{className:m({variant:`outline`,size:`sm`}),to:`/`,search:{releaseId:o.releaseId},children:[`Review bundle`,(0,Q.jsx)(Et,{"aria-hidden":`true`})]})]}):null,(0,Q.jsxs)(`details`,{className:`text-xs text-muted-foreground`,children:[(0,Q.jsx)(`summary`,{className:`cursor-pointer`,children:`View chart data`}),(0,Q.jsx)(`div`,{className:`mt-2 max-h-64 overflow-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full text-left`,children:[(0,Q.jsxs)(`caption`,{className:`sr-only`,children:[t===`recovered`?`Recovered installations`:a.summary,` `,`by bundle ID, UTC`]}),(0,Q.jsx)(`thead`,{children:(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`th`,{scope:`col`,className:`pr-4`,children:`Date (UTC)`}),e.series.map(e=>(0,Q.jsx)(`th`,{scope:`col`,className:`px-2 font-mono`,children:e.releaseId},e.releaseId))]})}),(0,Q.jsx)(`tbody`,{children:c.map((t,n)=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`th`,{scope:`row`,className:`whitespace-nowrap pr-4 font-normal`,children:co.format(t.startMs)}),e.series.map(e=>(0,Q.jsx)(`td`,{className:`px-2 tabular-nums`,children:e.points[n][a.point]??`—`},e.releaseId))]},t.startMs))})]})})]})]})})]})}function mo({input:e,onWindowChange:t,query:n,onRefresh:r}){return(0,Q.jsxs)(Lt,{"aria-label":`Bundle activity`,className:`min-w-0 overflow-hidden shadow-sm`,role:`region`,children:[(0,Q.jsxs)(jt,{className:`flex-row flex-wrap items-center justify-between gap-4 p-6`,children:[(0,Q.jsx)(Mt,{children:`Bundle activity`}),(0,Q.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-4 sm:w-auto`,children:[(0,Q.jsx)(Fn,{window:e.window,onWindowChange:t}),(0,Q.jsx)(d,{"aria-label":`Refresh bundle activity`,className:`size-11 sm:size-9`,variant:`ghost`,size:`icon-lg`,disabled:n.isFetching,onClick:r,children:(0,Q.jsx)(Pn,{"aria-hidden":`true`})})]})]}),(0,Q.jsx)(At,{className:`px-6 pb-6`,children:n.isPending?(0,Q.jsx)(E,{"aria-label":`Loading bundle activity`,className:`h-80 w-full`}):n.error?(0,Q.jsx)(Tt,{error:n.error,fallbackTitle:`Bundle activity unavailable`}):n.data?(0,Q.jsx)(po,{report:n.data},JSON.stringify(e)):null}),(0,Q.jsxs)(zt,{className:`flex-wrap items-center justify-between gap-4 border-t px-6 py-5`,children:[n.data?.truncated&&!n.error?(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Partial history`}):null,(0,Q.jsxs)(Te,{className:C(m({className:`ml-auto h-11 px-4 sm:h-9`,size:`lg`,variant:`outline`})),to:`/installations`,children:[(0,Q.jsx)(Ht,{"aria-hidden":`true`,"data-icon":`inline-start`}),`All events`]})]})]})}function ho(){let e=Gn.useSearch(),t=Gn.useNavigate(),n=e.window??`24h`,r=e.bundleWindow??`24h`,i={platform:e.platform??`all`,channel:e.channel??`production`,appVersion:e.appVersion},a=n=>void t({search:{...e,window:n}}),o=n=>void t({search:{...e,bundleWindow:n}}),s=n=>void t({search:{...e,...n,appVersion:n.appVersion}}),c={...i,window:n},l={...i,window:r},u=ue({queryKey:[`insights`,`app-usage`,c],queryFn:()=>Bn({data:c}),staleTime:3e4}),d=ue({queryKey:[`insights`,`recovery`,l],queryFn:()=>Me({data:l}),staleTime:3e4});return(0,Q.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Q.jsx)(Dt,{view:`overview`,overviewSearch:e}),(0,Q.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 px-4 py-6 sm:p-8`,children:(0,Q.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,Q.jsx)(oo,{scope:i,appVersions:u.data?.appVersions??[],onScopeChange:s},JSON.stringify(i)),u.data?.truncated&&!u.error?(0,Q.jsxs)(Ft,{children:[(0,Q.jsx)(Ot,{children:`Partial history`}),(0,Q.jsxs)(Nt,{children:[`Only reports since`,` `,new Date(u.data.sinceMs).toLocaleString(`en`,{timeZone:`UTC`}),` `,`UTC are available. The active-user count is a lower bound. Choose a shorter period for a more complete view.`]})]}):null,(0,Q.jsx)(ea,{query:u,search:{...i,window:n,bundleWindow:r},window:n,onWindowChange:a}),(0,Q.jsx)(mo,{input:l,query:d,onWindowChange:o,onRefresh:()=>void d.refetch()})]})})]})}export{ho as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{or as e}from"./createServerFn-3eh2iYmC.js";var t=e(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),n=e=>typeof e==`string`&&e.trim().length>0&&e.length<=1024?e:void 0,r=e=>e===`24h`||e===`7d`||e===`30d`?e:void 0;function i(e){return{platform:e.platform===`all`||e.platform===`ios`||e.platform===`android`?e.platform:void 0,channel:n(e.channel),appVersion:n(e.appVersion),window:r(e.window),bundleWindow:r(e.bundleWindow)}}function a(e){return{...i(e),version:n(e.version),page:typeof e.page==`number`&&Number.isSafeInteger(e.page)&&e.page>0?e.page:void 0}}export{i as n,t as r,a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,At as t,B as n,Bn as r,Bt as i,Ct as a,Dt as o,G as s,Gr as c,H as l,Hn as u,Hr as d,Ht as f,In as p,J as m,Mn as h,Mr as g,Mt as _,Ot as v,Pt as y,Q as b,Qn as x,R as S,Rn as C,Sn as w,St as T,Tt as E,U as D,Un as O,V as k,Vn as A,Vt as j,W as M,Xn as N,Y as P,Zn as F,_ as I,an as L,at as R,b as z,bt as B,er as V,et as H,fr as U,jn as W,mn as G,nr as K,or as ee,ot as te,q as ne,qn as re,rn as ie,t as ae,tt as oe,un as se,v as ce,w as le,wt as ue,xn as q,xt as de,yt as fe,zn as pe}from"./createServerFn-3eh2iYmC.js";import{d as me,h as he,r as ge,t as _e,z as ve}from"./valueToPercent-DmwxjBJW.js";import{r as ye}from"./insights-search-bQlsME6S.js";var be=ee(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),J=U();function xe({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`empty`,className:C(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function Se({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`empty-header`,className:C(`flex max-w-sm flex-col items-center gap-1`,e),...t})}re(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function Ce({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`empty-title`,className:C(`text-sm font-medium tracking-tight`,e),...t})}function we({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`empty-description`,className:C(`text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}var Y=c(d()),Te=Y.createContext(void 0);function Ee(){let e=Y.useContext(Te);if(e===void 0)throw Error(K(51));return e}var X=function(e){return e.complete=`data-complete`,e.indeterminate=`data-indeterminate`,e.progressing=`data-progressing`,e}({}),Z={status(e){return e===`progressing`?{[X.progressing]:``}:e===`complete`?{[X.complete]:``}:e===`indeterminate`?{[X.indeterminate]:``}:null}};function De(e,t){return t==null?`indeterminate progress`:e||`${t}%`}var Oe=Y.forwardRef(function(e,n){let{format:r,getAriaValueText:i=De,locale:a,max:o=100,min:s=0,value:c,render:l,className:u,children:d,style:f,...p}=e,[m,h]=Y.useState(),g=y(r),_=`indeterminate`;Number.isFinite(c)&&(_=c===o?`complete`:`progressing`);let v=ge(c,a,g.current),b=Y.useMemo(()=>({status:_}),[_]),x={"aria-labelledby":m,"aria-valuemax":o,"aria-valuemin":s,"aria-valuenow":c??void 0,"aria-valuetext":i(v,c),role:`progressbar`,children:(0,J.jsxs)(Y.Fragment,{children:[d,(0,J.jsx)(`span`,{role:`presentation`,style:t,children:`x`})]})},S=Y.useMemo(()=>({formattedValue:v,max:o,min:s,setLabelId:h,state:b,status:_,value:c}),[v,o,s,h,b,_,c]),C=N(`div`,e,{state:b,ref:n,props:[x,p],stateAttributesMapping:Z});return(0,J.jsx)(Te.Provider,{value:S,children:C})}),ke=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Ee();return N(`div`,e,{state:o,ref:t,props:a,stateAttributesMapping:Z})}),Ae=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{max:o,min:s,value:c,state:l}=Ee(),u=Number.isFinite(c)&&c!==null?_e(c,s,o):null;return N(`div`,e,{state:l,ref:t,props:[{style:u==null?{}:{insetInlineStart:0,height:`inherit`,width:`${u}%`}},a],stateAttributesMapping:Z})});function je({className:e,children:t,value:n,...r}){return(0,J.jsxs)(Oe,{value:n,"data-slot":`progress`,className:C(`w-full`,e),...r,children:[t,(0,J.jsx)(Me,{children:(0,J.jsx)(Ne,{})})]})}function Me({className:e,...t}){return(0,J.jsx)(ke,{className:C(`relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted`,e),"data-slot":`progress-track`,...t})}function Ne({className:e,...t}){return(0,J.jsx)(Ae,{"data-slot":`progress-indicator`,className:C(`h-full bg-primary transition-transform motion-reduce:transition-none`,e),...t})}function Pe({label:e,children:t}){let n=(0,Y.useId)(),[r,i]=(0,Y.useState)(!1);return(0,J.jsxs)(I,{open:r,onOpenChange:i,triggerId:n,children:[(0,J.jsx)(z,{id:n,"aria-describedby":r?`${n}-description`:void 0,closeOnClick:!1,onClick:()=>i(e=>!e),render:(0,J.jsx)(p,{"aria-label":e,className:`size-11 sm:size-7`,size:`icon`,variant:`ghost`}),children:(0,J.jsx)(ye,{})}),(0,J.jsx)(ce,{id:`${n}-description`,role:`tooltip`,className:`max-w-64`,side:`bottom`,children:t})]})}var Fe=Y.createContext(void 0);function Q(){let e=Y.useContext(Fe);if(e===void 0)throw Error(K(64));return e}var Ie=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),$={tabActivationDirection:e=>({[Ie.activationDirection]:e})},Le=Y.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,d=e.defaultValue!==void 0,f=Y.useRef([]),[p,m]=Y.useState(()=>new Map),[h,g]=ve({controlled:s,default:r,name:`Tabs`,state:`value`}),_=s!==void 0,[v,y]=Y.useState(()=>new Map),b=Y.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of v.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[v]),[x,S]=Y.useState(()=>({previousValue:h,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==h&&(T=Re(C,h,a,v),E=C!=null&&h!=null&&b(h)==null);let D=E?C:h,k=C!==D||w!==T;u(()=>{k&&S({previousValue:D,tabActivationDirection:T})},[D,k,T]);let A=O((e,t)=>{t.activationDirection=Re(h,e,a,v),i?.(e,t),!t.isCanceled&&g(e)}),j=O((e,t)=>{i?.(e,L(t,void 0,void 0,{activationDirection:`none`}))}),M=O((e,t)=>{m(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),P=O((e,t)=>{m(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),F=Y.useCallback(e=>p.get(e),[p]),I=Y.useCallback(e=>{for(let t of v.values())if(e===t?.value)return t?.id},[v]),R=Y.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:I,getTabPanelIdByValue:F,onValueChange:A,orientation:a,registerMountedTabPanel:M,setTabMap:y,unregisterMountedTabPanel:P,tabActivationDirection:T,value:h}),[b,I,F,A,a,M,y,P,T,h]),z=Y.useMemo(()=>{for(let e of v.values())if(e!=null&&e.value===h)return e},[v,h]),B=Y.useMemo(()=>{for(let e of v.values())if(e!=null&&!e.disabled)return e.value},[v]),V=Y.useRef(!d),H=Y.useRef(d),U=Y.useRef(!1);u(()=>{if(_)return;function e(e,t){g(e),S(t=>t.previousValue===e&&t.tabActivationDirection===`none`?t:{previousValue:e,tabActivationDirection:`none`}),j(e,t),V.current=!1}if(v.size===0){if(!U.current||h===null)return;e(null,q);return}U.current=!0;let t=z?.disabled,n=z==null&&h!==null;if(!t&&h===r&&(H.current=!1),H.current&&t&&h===r)return;let i=V.current;if(t||n){let n=B??null;if(h===n){V.current=!1;return}let r=q;i?r=G:t&&(r=se),e(n,r);return}i&&z!=null&&(j(h,G),V.current=!1)},[r,B,_,j,z,g,v,h]);let W=N(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:$});return(0,J.jsx)(Fe.Provider,{value:R,children:(0,J.jsx)(he,{elementsRef:f,children:W})})});function Re(e,t,n,r){if(e==null||t==null)return`none`;let i=null,a=null;for(let[n,o]of r.entries()){if(o==null)continue;let r=o.value??o.index;if(e===r&&(i=n),t===r&&(a=n),i!=null&&a!=null)break}if(i==null||a==null)return i!==a&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?n===`horizontal`?t>e?`right`:`left`:t>e?`down`:`up`:`none`;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect();if(n===`horizontal`){if(s.left<o.left)return`left`;if(s.left>o.left)return`right`}else{if(s.top<o.top)return`up`;if(s.top>o.top)return`down`}return`none`}var ze=`data-composite-item-active`;function Be(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=A(),{ref:i,index:a}=me(e),o=n===a,s=Y.useRef(null),c=V(i,s);return{compositeProps:Y.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var Ve=Y.createContext(void 0);function He(){let e=Y.useContext(Ve);if(e===void 0)throw Error(K(65));return e}var Ue=Y.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:a,value:o,id:s,nativeButton:c=!0,style:l,...d}=e,{value:f,getTabPanelIdByValue:p,orientation:m}=Q(),{activateOnFocus:h,highlightedTabIndex:g,onTabActivation:v,registerTabResizeObserverElement:y,setHighlightedTabIndex:b,tabsListElement:x}=He(),S=ie(s),{compositeProps:C,compositeRef:T,index:E}=Be({metadata:Y.useMemo(()=>({disabled:r,id:S,value:o}),[r,S,o])}),D=o===f,O=Y.useRef(!1),k=Y.useRef(null);Y.useEffect(()=>{let e=k.current;if(e)return y(e)},[y]),u(()=>{if(O.current){O.current=!1;return}if(!(D&&E>-1&&g!==E))return;let e=x;if(e!=null){let t=i(_(e));if(t&&j(e,t))return}r||b(E)},[D,E,g,b,r,x]);let{getButtonProps:A,buttonRef:M}=pe({disabled:r,native:c,focusableWhenDisabled:!0}),P=p(o),F=Y.useRef(!1),I=Y.useRef(!1);function R(e){D||r||v(o,L(w,e.nativeEvent,void 0,{activationDirection:`none`}))}function z(e){D||(E>-1&&!r&&b(E),!r&&h&&(!F.current||F.current&&I.current)&&v(o,L(w,e.nativeEvent,void 0,{activationDirection:`none`})))}function B(e){if(D||r)return;F.current=!0;function t(){F.current=!1,I.current=!1}(!e.button||e.button===0)&&(I.current=!0,_(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return N(`button`,e,{state:{disabled:r,active:D,orientation:m},ref:[t,M,T,k],props:[C,{role:`tab`,"aria-controls":P,"aria-selected":D,id:S,onClick:R,onFocus:z,onPointerDown:B,[ze]:D?``:void 0,onKeyDownCapture(){O.current=!0}},d,A]})}),We=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=W.startingStyle]=`startingStyle`,e[e.endingStyle=W.endingStyle]=`endingStyle`,e}({}),Ge={...$,...h},Ke=Y.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:d,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=Q(),h=ie(),{ref:g,index:_}=me({metadata:Y.useMemo(()=>({id:h,value:r}),[h,r])}),v=r===c,{mounted:y,transitionStatus:b,setMounted:x}=te(v),C=!y,w=l(r),T={hidden:C,orientation:d,tabActivationDirection:f,transitionStatus:b},E=Y.useRef(null),D=N(`div`,e,{state:T,ref:[t,g,E],props:[{"aria-labelledby":w,hidden:C,id:h,role:`tabpanel`,tabIndex:v?0:-1,inert:S(!v),[We.index]:_},s],stateAttributesMapping:Ge});return R({open:v,ref:E,onComplete(){v||x(!1)}}),u(()=>{if(!(C&&!a)&&h!=null)return p(r,h),()=>{m(r,h)}},[C,a,r,h,p,m]),a||y?D:null});function qe(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Je=[];function Ye(t){let{itemSizes:r,cols:i=1,loopFocus:c=!0,onLoop:u,dense:d=!1,orientation:p=`both`,direction:h,highlightedIndex:g,onHighlightedIndexChange:_,rootRef:y,enableHomeAndEndKeys:x=!1,stopEventPropagation:S=!1,disabledIndices:C,modifierKeys:w=Je}=t,[A,j]=Y.useState(0),N=i>1,P=Y.useRef(null),F=V(P,y),I=Y.useRef([]),L=Y.useRef(!1),R=g??A,z=O((e,t=!1)=>{if((_??j)(e),t){let t=I.current[e];oe(P.current,t,h,p)}}),U=O(e=>{if(e.size===0||L.current)return;L.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&z(r),oe(P.current,n,h,p)}),W=O((e,t,n)=>u?u?.(e,t,n,I):n),G=Y.useMemo(()=>({"aria-orientation":p===`both`?void 0:p,ref:F,onFocus(e){let t=P.current,n=f(e.nativeEvent);!t||n==null||!H(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(t){let g=x?s:k;if(!g.has(t.key)||Xe(t,w)||!P.current)return;let _=h===`rtl`,y=_?l:D,O={horizontal:y,vertical:n,both:y}[p],A=_?D:l,j={horizontal:A,vertical:M,both:A}[p],F=f(t.nativeEvent);if(F!=null&&H(F)&&!qe(F)){let e=F.selectionStart,n=F.selectionEnd,r=F.value??``;if(e==null||t.shiftKey||e!==n||t.key!==j&&e<r.length||t.key!==O&&e>0)return}let L=R,V=E(I,C),U=ue(I,C);if(N){let e=r||Array.from({length:I.current.length},()=>({width:1,height:1})),n=fe(e,i,d),o=n.findIndex(e=>e!=null&&!v(I.current,e,C)),s=n.reduce((e,t,n)=>t!=null&&!v(I.current,t,C)?n:e,-1);L=n[a(n.map(e=>e==null?null:I.current[e]),{event:t,orientation:p,loopFocus:c,onLoop:W,cols:i,disabledIndices:T([...C||I.current.map((e,t)=>v(I.current,t)?t:void 0),void 0],n),minIndex:o,maxIndex:s,prevIndex:de(R>U?V:R,e,n,i,t.key===`ArrowDown`?`bl`:t.key===`ArrowRight`?`tr`:`tl`),rtl:_})]}let G={horizontal:[y],vertical:[n],both:[y,n]}[p],K={horizontal:[A],vertical:[M],both:[A,M]}[p],ee=N?g:{horizontal:x?m:ne,vertical:x?e:b,both:g}[p];x&&(t.key===`Home`?L=V:t.key===`End`&&(L=U)),L===R&&(G.includes(t.key)||K.includes(t.key))&&(c&&L===U&&G.includes(t.key)?(L=V,u&&(L=u(t,R,L,I))):c&&L===V&&K.includes(t.key)?(L=U,u&&(L=u(t,R,L,I))):L=B(I.current,{startingIndex:L,decrement:K.includes(t.key),disabledIndices:C})),L!==R&&!o(I.current,L)&&(S&&t.stopPropagation(),ee.has(t.key)&&t.preventDefault(),z(L,!0),queueMicrotask(()=>{I.current[L]?.focus()}))}}),[i,d,h,C,I,x,R,N,r,c,u,W,F,w,z,p,S]);return Y.useMemo(()=>({props:G,highlightedIndex:R,onHighlightedIndexChange:z,elementsRef:I,disabledIndices:C,onMapChange:U,relayKeyboardEvent:G.onKeyDown}),[G,R,z,I,C,U])}function Xe(e,t){for(let n of P.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Ze(e){let{render:t,className:n,style:i,refs:a=F,props:o=F,state:s=x,stateAttributesMapping:c,highlightedIndex:l,onHighlightedIndexChange:u,orientation:d,dense:f,itemSizes:p,loopFocus:m,onLoop:h,cols:g,enableHomeAndEndKeys:_,onMapChange:v,stopEventPropagation:y=!0,rootRef:b,disabledIndices:S,modifierKeys:C,highlightItemOnHover:w=!1,tag:T=`div`,...E}=e,{props:D,highlightedIndex:O,onHighlightedIndexChange:k,elementsRef:A,onMapChange:j,relayKeyboardEvent:M}=Ye({itemSizes:p,cols:g,loopFocus:m,onLoop:h,dense:f,orientation:d,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:b,stopEventPropagation:y,enableHomeAndEndKeys:_,direction:le(),disabledIndices:S,modifierKeys:C}),P=N(T,e,{state:s,ref:a,props:[D,...o,E],stateAttributesMapping:c}),I=Y.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:k,highlightItemOnHover:w,relayKeyboardEvent:M}),[O,k,w,M]);return(0,J.jsx)(r.Provider,{value:I,children:(0,J.jsx)(he,{elementsRef:A,onMapChange:e=>{v?.(e),j(e)},children:P})})}var Qe=Y.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=Q(),[p,m]=Y.useState(0),[h,g]=Y.useState(null),_=Y.useRef(new Set),v=Y.useRef(new Set),y=Y.useRef(null);Y.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.forEach(e=>{e()})});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h]);let b=O(e=>(_.current.add(e),()=>{_.current.delete(e)})),x=O(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),S=O((e,t)=>{e!==u&&c(e,t)}),C={orientation:l,tabActivationDirection:f},w={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},T=Y.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:b,registerTabResizeObserverElement:x,onTabActivation:S,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,b,x,S,m,h]);return(0,J.jsx)(Ve.Provider,{value:T,children:(0,J.jsx)(Ze,{render:a,className:r,style:o,state:C,refs:[t,g],props:[w,s],stateAttributesMapping:$,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:F})})});function $e({className:e,orientation:t=`horizontal`,...n}){return(0,J.jsx)(Le,{orientation:t,"data-slot":`tabs`,"data-orientation":t,className:C(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var et=re(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function tt({className:e,variant:t=`default`,...n}){return(0,J.jsx)(Qe,{"data-slot":`tabs-list`,"data-variant":t,className:C(et({variant:t}),e),...n})}function nt({className:e,...t}){return(0,J.jsx)(Ue,{"data-slot":`tabs-trigger`,className:C(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function rt({className:e,...t}){return(0,J.jsx)(Ke,{"data-slot":`tabs-content`,className:C(`flex-1 text-xs/relaxed outline-none`,e),...t})}var it={"24h":{label:`DAU`,period:`24 hours`,interval:`hour`},"7d":{label:`WAU`,period:`7 days`,interval:`6 hours`},"30d":{label:`MAU`,period:`30 days`,interval:`day`}};function at({window:e,onWindowChange:t}){return(0,J.jsx)($e,{value:e,onValueChange:e=>{(e===`24h`||e===`7d`||e===`30d`)&&t(e)},children:(0,J.jsx)(tt,{"aria-label":`Reporting period`,className:`min-h-11 sm:min-h-9`,children:[`24h`,`7d`,`30d`].map(e=>(0,J.jsx)(nt,{value:e,"aria-label":it[e].period,className:`min-w-12 px-3`,children:e},e))})})}var ot=ae({method:`GET`}).handler(g(`8a98cd9c178e4a54185d62c25a95f09d3d59850c43d3f5baa1563e1614ad942e`));export{rt as a,Pe as c,we as d,Se as f,$e as i,je as l,be as m,at as n,tt as o,Ce as p,it as r,nt as s,ot as t,xe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{In as e,Ln as t,T as n,fr as r,lr as i}from"./createServerFn-3eh2iYmC.js";import{a}from"./preload-helper-Cifs6dpf.js";import{t as o}from"./arrow-left-DjiCzL2s.js";import{n as s,r as c,t as l}from"./InsightsPageHeader-B9BZss8F.js";import{_ as u,a as d,c as f,d as p,f as m,g as h,m as g,p as _,s as v,t as y,u as b}from"./field-Dtaq2bUo.js";import{B as x,a as S,c as C,i as w,l as T,o as E,s as D}from"./valueToPercent-DmwxjBJW.js";import{n as O}from"./insights-search-bQlsME6S.js";import{c as k,d as A,f as j,l as M,m as N,n as P,p as F,t as I,u as L}from"./insights-usage-rpc-eDRR-mlO.js";import{t as R}from"./insights_.distribution-CTj3zHDc.js";var z=r(),B=20;function V(){let r=R.useSearch(),V=R.useNavigate(),H={platform:r.platform??`all`,channel:r.channel??`production`,appVersion:r.appVersion,window:r.window??`24h`},U=i({queryKey:[`insights`,`app-usage`,H],queryFn:()=>I({data:H}),staleTime:3e4}),W=U.error?void 0:U.data,G=(W?.bundleDistribution??[]).filter(e=>!r.version||e.appVersion===r.version),K=G.reduce((e,t)=>e+t.installations,0),q=Math.max(1,Math.ceil(G.length/B)),J=Math.min(r.page??1,q),Y=[...new Set([...W?.versions.map(e=>e.name)??[],...r.version?[r.version]:[]])],X=O(r),Z=e=>void V({search:{...r,page:void 0,...e}});return(0,z.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,z.jsx)(l,{view:`distribution`,overviewSearch:X}),(0,z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 px-4 py-6 sm:p-8`,children:(0,z.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,z.jsxs)(a,{to:`/insights`,search:X,className:t({variant:`ghost`,className:`h-11 w-fit sm:h-9`}),children:[(0,z.jsx)(o,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to overview`]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,z.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Distribution`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(P,{window:H.window,onWindowChange:e=>Z({window:e})}),(0,z.jsx)(e,{"aria-label":`Refresh distribution`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,disabled:U.isFetching,onClick:()=>void U.refetch(),children:(0,z.jsx)(N,{"aria-hidden":`true`})})]})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4`,children:[(0,z.jsxs)(y,{className:`w-full sm:w-64`,children:[(0,z.jsx)(d,{htmlFor:`distribution-version`,children:`App version`}),(0,z.jsxs)(w,{items:Object.fromEntries([[`all`,`All versions`],...Y.map(e=>[`version:${e}`,e])]),value:r.version?`version:${r.version}`:`all`,onValueChange:e=>{e!==null&&Z({version:e===`all`?void 0:e.slice(8)})},children:[(0,z.jsx)(C,{id:`distribution-version`,className:`min-h-11 w-full sm:min-h-9`,children:(0,z.jsx)(T,{})}),(0,z.jsx)(S,{children:(0,z.jsxs)(E,{children:[(0,z.jsx)(D,{value:`all`,children:`All versions`}),Y.map(e=>(0,z.jsx)(D,{value:`version:${e}`,children:e},e))]})})]})]}),(0,z.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center gap-2`,"aria-label":`Distribution scope`,children:[(0,z.jsxs)(_,{variant:`outline`,className:`gap-1.5`,children:[H.platform===`all`?null:(0,z.jsx)(x,{platform:H.platform,className:`size-3.5`}),H.platform===`all`?`All platforms`:H.platform===`ios`?`iOS`:`Android`]}),(0,z.jsx)(_,{variant:`outline`,children:H.channel}),H.appVersion?(0,z.jsxs)(_,{variant:`outline`,children:[`Reports from `,H.appVersion]}):null]})]}),(0,z.jsxs)(v,{"aria-label":`Bundles by app version`,role:`region`,className:`min-w-0`,children:[(0,z.jsxs)(p,{className:`flex flex-col gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,z.jsx)(m,{children:`Bundles by app version`}),(0,z.jsx)(k,{label:`How bundle distribution is counted`,children:`Each installation contributes its latest matching report in this period. Share is within its app version. Unknown bundle means no deployment ID was observed for the reported file. These counts describe reporting installations, not all installed devices.`})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[U.isPending?(0,z.jsx)(n,{className:`h-9 w-16`}):(0,z.jsx)(`p`,{className:`text-3xl font-semibold tabular-nums`,children:W?`${W.truncated?`≥`:``}${K.toLocaleString()}`:`—`}),(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Reporting installations`})]})]}),(0,z.jsxs)(f,{className:`flex min-w-0 flex-col gap-4`,children:[W?.truncated?(0,z.jsxs)(g,{children:[(0,z.jsx)(u,{children:`Partial history`}),(0,z.jsxs)(h,{children:[`Counts and shares reflect reports since`,` `,new Date(W.sinceMs).toLocaleString(`en`,{timeZone:`UTC`}),` `,`UTC. Choose a shorter period for a more complete view.`]})]}):null,U.isPending?(0,z.jsx)(n,{"aria-label":`Loading bundle distribution`,className:`h-64`}):U.error?(0,z.jsxs)(`div`,{className:`flex flex-col items-start gap-4`,children:[(0,z.jsx)(s,{error:U.error,fallbackTitle:`Distribution unavailable`}),(0,z.jsx)(e,{variant:`outline`,onClick:()=>void U.refetch(),children:`Retry distribution`})]}):G.length===0?(0,z.jsxs)(L,{children:[(0,z.jsxs)(j,{children:[(0,z.jsx)(F,{children:`No bundles reported`}),(0,z.jsx)(A,{children:`Choose another version or period, or change the filters in the overview.`})]}),(0,z.jsx)(e,{variant:`outline`,onClick:()=>Z({version:void 0}),children:`Show all versions`})]}):(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] gap-4 border-b px-3 pb-3 text-xs text-muted-foreground md:grid`,children:[(0,z.jsx)(`span`,{children:`App version`}),(0,z.jsx)(`span`,{children:`Bundle ID`}),(0,z.jsx)(`span`,{className:`text-right`,children:`Active installations`}),(0,z.jsx)(`span`,{className:`text-right`,children:`Version share`})]}),(0,z.jsx)(`ul`,{"aria-label":`Bundle distribution`,className:`divide-y`,children:G.slice((J-1)*B,J*B).map(e=>{let t=W?.versions.find(t=>t.name===e.appVersion)?.installations??0,n=t>0?e.installations/t*100:0;return(0,z.jsxs)(`li`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-3 px-1 py-4 md:grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] md:px-3`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,z.jsx)(`span`,{className:`truncate text-sm font-medium`,title:e.appVersion,children:e.appVersion}),(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,z.jsx)(x,{platform:e.platform,className:`size-3.5`}),e.platform===`ios`?`iOS`:`Android`]})]}),(0,z.jsx)(`div`,{className:`col-span-2 row-start-2 min-w-0 md:col-span-1 md:row-auto`,children:e.releaseId?(0,z.jsxs)(a,{to:`/`,search:{releaseId:e.releaseId},"aria-label":`Review bundle ${e.releaseId} for app version ${e.appVersion}`,className:`flex min-h-11 min-w-0 items-center gap-2 text-xs underline-offset-4 hover:underline md:min-h-9`,children:[(0,z.jsx)(`span`,{className:`break-all font-mono`,children:e.releaseId}),(0,z.jsx)(c,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})]}):(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Unknown bundle`})}),(0,z.jsxs)(`div`,{className:`col-start-2 row-start-1 text-right md:col-auto md:row-auto`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:e.installations.toLocaleString()}),(0,z.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground md:sr-only`,children:`active`}),(0,z.jsxs)(`p`,{className:`mt-1 text-xs tabular-nums text-muted-foreground md:hidden`,children:[n.toFixed(1),`% of version`]})]}),(0,z.jsxs)(`div`,{className:`hidden flex-col gap-2 md:flex`,children:[(0,z.jsxs)(`span`,{className:`text-right text-sm tabular-nums`,children:[n.toFixed(1),`%`]}),(0,z.jsx)(M,{"aria-label":`${e.releaseId??`Unknown bundle`} share in ${e.appVersion} on ${e.platform}`,value:n})]})]},JSON.stringify([e.appVersion,e.platform,e.releaseId]))})})]})]}),W&&G.length>0?(0,z.jsxs)(b,{className:`flex flex-wrap items-center justify-between gap-3 border-t pt-4`,children:[(0,z.jsxs)(`p`,{className:`text-xs tabular-nums text-muted-foreground`,children:[(J-1)*B+1,`–`,Math.min(J*B,G.length),` of `,G.length]}),(0,z.jsxs)(`nav`,{"aria-label":`Distribution pages`,className:`flex gap-2`,children:[(0,z.jsx)(e,{variant:`outline`,className:`h-11 sm:h-9`,disabled:J<=1,onClick:()=>Z({page:J-1}),children:`Previous`}),(0,z.jsx)(e,{variant:`outline`,className:`h-11 sm:h-9`,disabled:J>=q,onClick:()=>Z({page:J+1}),children:`Next`})]})]}):null]})]})})]})}export{V as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/insights_.distribution-B8zHNpSW.js","assets/createServerFn-3eh2iYmC.js","assets/preload-helper-Cifs6dpf.js","assets/valueToPercent-DmwxjBJW.js","assets/useOpenInteractionType-BIJ6gnHH.js","assets/field-Dtaq2bUo.js","assets/list-CZDFgINX.js","assets/insights-usage-rpc-eDRR-mlO.js","assets/insights-search-bQlsME6S.js","assets/arrow-left-DjiCzL2s.js","assets/InsightsPageHeader-B9BZss8F.js","assets/chart-no-axes-combined-DWVqQVWt.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./preload-helper-Cifs6dpf.js";import{t as r}from"./insights-search-bQlsME6S.js";var i=t(`/insights_/distribution`)({component:e(()=>n(()=>import(`./insights_.distribution-B8zHNpSW.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),`component`),validateSearch:r});export{i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gr as e,Hr as t,In as n,Ln as r,Mr as i,Pn as a,Rn as o,T as s,fr as c,ir as l,lr as u,or as d,t as f}from"./createServerFn-3eh2iYmC.js";import{U as p,a as m,c as h,o as g}from"./preload-helper-Cifs6dpf.js";import{i as _,n as ee,r as v,t as y}from"./installations-B5Q46Gjy.js";import{t as te}from"./arrow-left-DjiCzL2s.js";import{n as b,r as x,t as ne}from"./InsightsPageHeader-B9BZss8F.js";import{a as S,c as C,d as w,f as T,p as E,s as D,t as O,v as k}from"./field-Dtaq2bUo.js";import{n as A}from"./list-CZDFgINX.js";import{i as re,n as j,r as ie,t as M}from"./HashValueDisplay-CH2G89YI.js";import{t as N}from"./refresh-cw-DcqrNjan.js";import{a as P,i as F,n as ae,o as I,r as L,t as R}from"./table-Ci1MSFB7.js";import{i as oe,n as z,r as se,t as ce}from"./input-group-DGtnvqoW.js";function le(){_(h(),!0)}function ue(e){return le(),v(h(),e)}var B=e(t(),1);function de(e){let t=h(),n=(0,B.useRef)(void 0);return g(t.stores.location,r=>{let i=e?.select?e.select(r):r;if(e?.structuralSharing??t.options.defaultStructuralSharing){let e=p(n.current,i);return n.current=e,e}return i})}var fe=d(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),pe=d(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),V=c(),me={UPDATE_DOWNLOADED:{label:`Downloaded`,description:`Download complete. Waiting for the app to restart and apply it.`,variant:`default`,icon:re},UPDATE_APPLIED:{label:`Update applied`,description:`The app started using the downloaded update.`,variant:`success`,icon:k},RECOVERED:{label:`Recovered`,description:`Recovered from a crashed bundle.`,variant:`warning`,icon:ie},UNCHANGED:{label:`No change`,description:`No download or apply was reported at this point.`,variant:`secondary`,icon:fe}};function H(){let[e,t]=(0,B.useState)(`UTC`);return(0,B.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:`shortOffset`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}function he(e,t){let n=Object.fromEntries(t.formatToParts(new Date(e)).map(({type:e,value:t})=>[e,t])),r=n.timeZoneName===`GMT`?`GMT+0`:n.timeZoneName;return`${n.year}/${n.month}/${n.day} ${n.hour}:${n.minute}:${n.second} ${r}`}function U({value:e,formatter:t,touch:n=!1}){let r=new Date(e),i=he(e,t);return(0,V.jsxs)(`details`,{className:`group/time`,children:[(0,V.jsx)(`summary`,{className:`cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${n?`flex min-h-11 items-center`:``}`,children:(0,V.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,V.jsx)(`time`,{dateTime:r.toISOString(),className:`whitespace-nowrap`,children:i}),(0,V.jsx)(A,{"aria-hidden":`true`,className:`size-3 text-muted-foreground group-open/time:rotate-180`})]})}),(0,V.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r.toISOString().replace(`T`,` `).replace(`Z`,` UTC`)})]})}function W({type:e}){let t=me[e],n=t.icon;return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start gap-2`,children:[(0,V.jsxs)(E,{variant:t.variant,className:`gap-1 whitespace-nowrap [&_svg]:size-3`,children:[(0,V.jsx)(n,{"aria-hidden":`true`}),t.label]}),(0,V.jsx)(`p`,{className:`max-w-56 whitespace-normal text-xs text-muted-foreground`,children:t.description})]})}function G({event:e,touch:t=!1}){let n=e.type===`UPDATE_DOWNLOADED`,r=n||e.type===`UPDATE_APPLIED`||e.type===`RECOVERED`;return(0,V.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2`,children:[e.fromBundleId&&r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{className:`text-muted-foreground`,children:n?`Running`:`From`}),(0,V.jsx)(`dd`,{children:(0,V.jsx)(M,{value:e.fromBundleId,buttonClassName:t?`min-h-11 px-3`:void 0})})]}):null,(0,V.jsx)(`dt`,{className:`text-muted-foreground`,children:n?`Pending`:r?`To`:`Current`}),(0,V.jsx)(`dd`,{children:(0,V.jsx)(M,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0})})]})}function K({events:e,formatter:t,renderIdentity:n}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,V.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,V.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,V.jsx)(W,{type:e.type}),(0,V.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,V.jsx)(U,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,V.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,V.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,V.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,V.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,V.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,V.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,V.jsx)(G,{event:e,touch:!0})})]},e.id))})]})}function q({hasPrevious:e,label:t,nextCursor:r,onNext:i,onPrevious:a,pageLength:o,pageNumber:s}){return(0,V.jsxs)(`nav`,{"aria-label":`${t} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,V.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,s,` · `,o.toLocaleString(),` rows`]}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(n,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:a,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,V.jsx)(n,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:r===null,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}function J({event:e,eventsLocation:t,touch:n=!1}){return(0,V.jsxs)(`div`,{className:n?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,V.jsxs)(m,{className:r({className:n?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},state:e=>({insightsPagination:{eventsBack:e.insightsPagination?.eventsBack}}),"aria-label":`View history for ${e.userId??e.username??`anonymous installation`} (${e.installId})`,children:[(0,V.jsx)(`span`,{className:n?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??e.username??`Anonymous installation`}),(0,V.jsx)(x,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,V.jsx)(M,{value:e.installId,maxLength:13,buttonClassName:n?`min-h-11 px-3`:void 0})]})}function ge({children:e,error:t,eventsLocation:r,history:i,isFetching:a,isLoading:o,onNext:c,onPrevious:l,onRefresh:u,pageNumber:d,title:f=`All events`}){let p=H(),m=d>1;return(0,V.jsxs)(D,{className:`@container min-w-0 shadow-sm`,"aria-busy":a,children:[(0,V.jsxs)(w,{className:`gap-4 p-4 sm:p-6`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,V.jsx)(T,{children:(0,V.jsx)(`h2`,{children:f})}),(0,V.jsxs)(n,{className:`h-11 lg:h-8`,disabled:a,onClick:u,size:`lg`,variant:`outline`,children:[(0,V.jsx)(N,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]}),e]}),(0,V.jsx)(C,{className:`min-w-0 p-0`,children:o?(0,V.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,V.jsx)(s,{className:`h-12 w-full`}),(0,V.jsx)(s,{className:`h-12 w-full`}),(0,V.jsx)(s,{className:`h-12 w-full`})]}):t?(0,V.jsx)(`div`,{className:`px-6 pb-6`,children:(0,V.jsx)(b,{error:t,fallbackTitle:`Event history unavailable`})}):i?(0,V.jsxs)(V.Fragment,{children:[i.data.length>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,V.jsx)(K,{events:i.data,formatter:p,renderIdentity:e=>(0,V.jsx)(J,{event:e,eventsLocation:r,touch:!0})})}),(0,V.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,V.jsxs)(R,{className:`min-w-4xl table-fixed`,children:[(0,V.jsx)(P,{children:(0,V.jsxs)(I,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,V.jsx)(F,{className:`w-64`,children:`Time`}),(0,V.jsx)(F,{className:`w-48`,children:`Event`}),(0,V.jsx)(F,{className:`w-48`,children:`User / installation`}),(0,V.jsx)(F,{className:`w-32`,children:`App`}),(0,V.jsx)(F,{className:`w-52`,children:`Bundle`})]})}),(0,V.jsx)(ae,{children:i.data.map(e=>(0,V.jsxs)(I,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,V.jsx)(L,{className:`whitespace-normal text-xs tabular-nums`,children:(0,V.jsx)(U,{value:e.receivedAtMs,formatter:p})}),(0,V.jsx)(L,{children:(0,V.jsx)(W,{type:e.type})}),(0,V.jsx)(L,{children:(0,V.jsx)(J,{event:e,eventsLocation:r})}),(0,V.jsx)(L,{className:`whitespace-normal text-xs`,children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,V.jsx)(L,{className:`whitespace-normal text-xs`,children:(0,V.jsx)(G,{event:e})})]},e.id))})]})})]}):(0,V.jsx)(`div`,{className:`px-6 pb-6 text-sm text-muted-foreground`,children:m||i.nextCursor?`No events on this page`:f===`All events`?`No events recorded yet`:`No matching reports in this period`}),i.data.length>0||m||i.nextCursor?(0,V.jsx)(q,{hasPrevious:m,label:f,nextCursor:i.nextCursor,onNext:c,onPrevious:l,pageLength:i.data.length,pageNumber:d}):null]}):null})]})}var _e=e=>e.userId??e.username??`—`,ve=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.type===`UPDATE_DOWNLOADED`?e.fromBundleId:e.toBundleId;function ye({error:e,history:t,isLoading:r,onNext:i,onPrevious:o,onRefresh:c,pageNumber:l,selectedEvent:u,selectedInstallId:d}){let f=H(),p=u?ve(u):void 0,m=u&&`pendingBundleId`in u?u.pendingBundleId:u&&`type`in u&&u.type===`UPDATE_DOWNLOADED`?u.toBundleId:null;return(0,V.jsxs)(D,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,V.jsx)(w,{className:`p-4 sm:p-6`,children:(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,V.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,V.jsx)(T,{className:`text-sm font-medium`,children:(0,V.jsx)(`h2`,{children:d===void 0?`Select an installation`:`Installation history`})})}),c&&d!==void 0?(0,V.jsxs)(n,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:c,disabled:r,children:[(0,V.jsx)(N,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,V.jsxs)(C,{className:`min-h-0 p-0`,children:[d!==void 0&&u?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,V.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,V.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,V.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,V.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,V.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:_e(u)})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,V.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,V.jsx)(M,{value:d,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,V.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:p?(0,V.jsx)(M,{value:p,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`})]}),m?(0,V.jsxs)(`div`,{className:`col-span-2 min-w-0`,children:[(0,V.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Downloaded · Pending apply`}),(0,V.jsx)(`dd`,{className:`mt-1 text-xs`,children:(0,V.jsx)(M,{value:m})})]}):null]})]}),(0,V.jsx)(a,{})]}):null,d===void 0?null:r?(0,V.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,V.jsx)(s,{className:`h-10 w-full`}),(0,V.jsx)(s,{className:`h-10 w-full`}),(0,V.jsx)(s,{className:`h-10 w-full`})]}):e?(0,V.jsx)(`div`,{className:`p-6`,children:(0,V.jsx)(b,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation history unavailable`})}):t&&t.data.length>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,V.jsx)(K,{events:t.data,formatter:f})}),(0,V.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,V.jsxs)(R,{className:`min-w-3xl table-fixed`,children:[(0,V.jsx)(P,{children:(0,V.jsxs)(I,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,V.jsx)(F,{className:`w-64`,children:`Time`}),(0,V.jsx)(F,{className:`w-48`,children:`Event`}),(0,V.jsx)(F,{className:`w-32`,children:`App`}),(0,V.jsx)(F,{className:`w-52`,children:`Bundle`})]})}),(0,V.jsx)(ae,{children:t.data.map(e=>(0,V.jsxs)(I,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,V.jsx)(L,{className:`whitespace-normal text-xs tabular-nums`,children:(0,V.jsx)(U,{value:e.receivedAtMs,formatter:f})}),(0,V.jsx)(L,{children:(0,V.jsx)(W,{type:e.type})}),(0,V.jsx)(L,{className:`whitespace-normal text-xs`,children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,V.jsx)(L,{className:`whitespace-normal text-xs`,children:(0,V.jsx)(G,{event:e})})]},e.id))})]})}),(0,V.jsx)(q,{hasPrevious:l>1,label:`Installation history`,nextCursor:t.nextCursor,onNext:i,onPrevious:o,pageLength:t.data.length,pageNumber:l})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1||t?.nextCursor?`No bundle changes on this page.`:`No bundle changes recorded yet.`}),t&&(l>1||t.nextCursor)?(0,V.jsx)(q,{hasPrevious:l>1,label:`Installation history`,nextCursor:t.nextCursor,onNext:i,onPrevious:o,pageLength:0,pageNumber:l}):null]})]})]})}var be=e=>e.lastKnownBundleId,xe=e=>e.userId??e.username??`—`;function Se({error:e,onNext:t,onPrevious:i,onSelect:a,pageNumber:s,results:c,selectedInstallId:l}){let[u,d]=(0,B.useState)(!1),f=(0,B.useId)(),p=(0,B.useRef)(null),m=!e&&c&&c.data.length>0;return(0,V.jsxs)(D,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,V.jsx)(w,{className:`p-4 sm:px-6`,children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,V.jsx)(T,{className:`text-sm font-medium`,children:(0,V.jsx)(`h2`,{children:`Matching installations`})})}),(0,V.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,V.jsx)(n,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,V.jsx)(A,{"aria-hidden":`true`,className:o(u&&`rotate-180`)})}):null})]})}),(0,V.jsxs)(C,{className:o(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,V.jsx)(`div`,{className:`p-6`,children:(0,V.jsx)(b,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):c&&c.data.length>0?(0,V.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:c.data.map(e=>{let t=be(e),n=e.installId===l;return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{"aria-label":`${xe(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{a(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,V.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:xe(e)}),n?(0,V.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,V.jsx)(k,{"aria-hidden":`true`,className:`size-3.5`}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,V.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,V.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:j(e.installId)})}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,V.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:j(t)}):(0,V.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,V.jsx)(`a`,{className:r({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),c&&(c.data.length>0||s>1||c.nextCursor)?(0,V.jsx)(q,{hasPrevious:s>1,label:`Installation results`,nextCursor:c.nextCursor,onNext:t,onPrevious:i,pageLength:c.data.length,pageNumber:s}):null]})]})}function Ce({draftQuery:e,onDraftQueryChange:t,onSubmit:r,onClear:i}){return(0,V.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&r()},role:`search`,children:(0,V.jsxs)(O,{className:`gap-2`,children:[(0,V.jsx)(S,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsxs)(ce,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,V.jsx)(z,{children:(0,V.jsx)(pe,{"aria-hidden":`true`})}),(0,V.jsx)(oe,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>t(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,V.jsx)(z,{align:`inline-end`,children:(0,V.jsx)(se,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:i,size:`icon-xs`,children:(0,V.jsx)(l,{"aria-hidden":`true`})})}):null]}),(0,V.jsx)(n,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function we(){return(0,V.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,V.jsx)(s,{className:`h-64 w-full lg:h-full`}),(0,V.jsx)(s,{className:`h-64 w-full lg:h-full`})]})}f({method:`GET`}).handler(i(`ff00311d412c8cdfa8ad5b0ba1eb6aa7471d0cc12170e6cc645deb91603d42dd`));var Te=f({method:`GET`}).handler(i(`d4c50f40701055145f24873dc90f3c55a5494457a6a03a743339b2ac4545eb19`)),Ee=f({method:`GET`}).handler(i(`3c04bc6624be6dfdd80cf96819f9c6d0455e59a7bb4c0374b6afb0162ffd15b0`)),De=f({method:`GET`}).handler(i(`6726f1ed9eda1f0cb4c1f1ad1023faee435ddcfd0b7c55ef08ca7f2f7f577370`)),Oe=f({method:`GET`}).handler(i(`735c501f6d5ea81a445ff2b6b2ea6a1b589e3c6f63a465a881822c80ae71e7d1`)),Y=3e4,X={reportingInstallations:e=>[`insights`,`reporting-installations`,e],events:e=>[`insights`,`events`,e],installations:e=>[`insights`,`installations`,e],installation:e=>[`insights`,`installation`,e],installationEvents:e=>[`insights`,`installation-events`,e]},ke=(e,t)=>u({queryKey:X.events(e),queryFn:()=>Te({data:e}),enabled:t,refetchOnWindowFocus:!0,staleTime:Y}),Ae=(e,t)=>u({queryKey:X.installations(e),queryFn:()=>Oe({data:e}),enabled:t&&e.identity.length>0,staleTime:Y}),je=(e,t)=>u({queryKey:X.installation(e),queryFn:()=>De({data:{installId:e}}),enabled:t&&e.length>0,staleTime:Y}),Me=(e,t)=>u({queryKey:X.installationEvents(e),queryFn:()=>Ee({data:e}),enabled:t&&e.installId.length>0,refetchOnWindowFocus:!0,staleTime:Y}),Ne=20,Pe=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Fe(){let e=y.useSearch(),t=y.useNavigate(),[r,i]=(0,B.useState)(e.query??``),[a]=(0,B.useState)(Z),[o]=(0,B.useState)(Z),s=de({select:e=>e.state.insightsPagination}),c=s?.eventsBack??[],l=s?.searchBack??[],u=s?.historyBack??[],d=e.query?.trim()??``,f=d.length>0,p=e.installId!==void 0,m=f||p,h=e.eventsBefore??a,g=e.historyBefore??o,_=(n,r=!1,i={})=>{t({to:`/installations`,search:{...e,...n},state:e=>({...e,insightsPagination:{...e.insightsPagination,...i}}),replace:r})};(0,B.useEffect)(()=>{i(e.query??``)},[e.query]),(0,B.useEffect)(()=>{e.eventsBefore===void 0&&_({eventsBefore:h},!0)},[h,e.eventsBefore]),(0,B.useEffect)(()=>{p&&e.historyBefore===void 0&&_({historyBefore:g},!0)},[p,g,e.historyBefore]);let v=ke({beforeReceivedAtMs:h,cursor:e.eventsCursor,limit:20},!m),b=Ae({cursor:e.searchCursor,identity:d,limit:Ne},f);(0,B.useEffect)(()=>{let e=b.data?.data[0]?.installId;!f||p||e===void 0||_({historyBefore:Z(),historyCursor:void 0,installId:e},!0,{historyBack:[]})},[f,p,b.data?.data]);let x=je(e.installId??``,p),S=Me({beforeReceivedAtMs:g,cursor:e.historyCursor,installId:e.installId??``,limit:Pe},p),w=x.data??b.data?.data.find(({installId:t})=>t===e.installId)??S.data?.data[0],T=m?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,E=(0,B.useRef)(null),O=ue({id:T,getKey:ee});(0,B.useLayoutEffect)(()=>{!m&&!v.isLoading&&E.current&&(E.current.scrollTop=O?.scrollY??0)},[v.isLoading,m,O?.scrollY,T]);let k=()=>{i(``),_({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})},A=(0,V.jsx)(Ce,{draftQuery:r,onClear:k,onDraftQueryChange:i,onSubmit:()=>{let e=r.trim();if(!e){k();return}_({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})}});return(0,V.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,V.jsx)(ne,{view:`events`}),(0,V.jsx)(`div`,{ref:E,"data-scroll-restoration-id":T,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[m?(0,V.jsx)(D,{className:`shadow-sm`,children:(0,V.jsxs)(C,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,V.jsxs)(n,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:k,variant:`ghost`,children:[(0,V.jsx)(te,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),A]})}):null,m?b.isLoading&&f?(0,V.jsx)(we,{}):(0,V.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${f?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[f?(0,V.jsx)(Se,{error:b.error,onNext:()=>{b.data?.nextCursor&&_({installId:void 0,searchCursor:b.data.nextCursor},!0,{searchBack:Q(l,e.searchCursor)})},onPrevious:()=>{let e=$(l);_({installId:void 0,searchCursor:e.cursor},!0,{searchBack:e.stack})},onSelect:e=>{_({historyBefore:Z(),historyCursor:void 0,installId:e},!1,{historyBack:[]})},pageNumber:l.length+1,results:b.data,selectedInstallId:e.installId}):null,(0,V.jsx)(ye,{error:S.error??x.error,history:S.data,isLoading:S.isLoading||x.isLoading,onNext:()=>{S.data?.nextCursor&&_({historyCursor:S.data.nextCursor},!0,{historyBack:Q(u,e.historyCursor)})},onPrevious:()=>{let e=$(u);_({historyCursor:e.cursor},!0,{historyBack:e.stack})},onRefresh:()=>{_({historyBefore:Z(),historyCursor:void 0},!0,{historyBack:[]})},pageNumber:u.length+1,selectedEvent:w,selectedInstallId:e.installId})]}):(0,V.jsx)(ge,{error:v.error,eventsLocation:{eventsBefore:h,eventsCursor:e.eventsCursor},history:v.data,isFetching:v.isFetching,isLoading:v.isLoading,onNext:()=>{v.data?.nextCursor&&_({eventsCursor:v.data.nextCursor},!0,{eventsBack:Q(c,e.eventsCursor)})},onPrevious:()=>{let e=$(c);_({eventsCursor:e.cursor},!0,{eventsBack:e.stack})},onRefresh:()=>{_({eventsBefore:Z(),eventsCursor:void 0},!0,{eventsBack:[]})},pageNumber:c.length+1,children:A})]})},T)]})}export{Fe as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/installations-B0fHLKr7.js","assets/createServerFn-3eh2iYmC.js","assets/preload-helper-Cifs6dpf.js","assets/arrow-left-DjiCzL2s.js","assets/InsightsPageHeader-B9BZss8F.js","assets/chart-no-axes-combined-DWVqQVWt.js","assets/field-Dtaq2bUo.js","assets/list-CZDFgINX.js","assets/HashValueDisplay-CH2G89YI.js","assets/dist-NOswudZW.js","assets/refresh-cw-DcqrNjan.js","assets/input-group-DGtnvqoW.js","assets/table-Ci1MSFB7.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{Ir as e,Lr as t,Pr as n,Rr as r,zr as i}from"./createServerFn-3eh2iYmC.js";import{A as a,B as o,C as s,D as c,E as l,F as u,H as d,L as f,M as p,N as m,O as h,P as g,R as _,S as v,T as y,U as b,V as x,_ as S,b as C,g as w,h as T,j as E,k as D,n as O,r as k,t as ee,v as A,w as te,x as j,y as ne,z as re}from"./preload-helper-Cifs6dpf.js";var ie=oe(JSON.parse),ae=se(JSON.stringify,JSON.parse);function oe(t){return n=>{n[0]===`?`&&(n=n.substring(1));let r=e(n);for(let e in r){let n=r[e];if(typeof n==`string`)try{r[e]=t(n)}catch{}}return r}}function se(e,n){let r=typeof n==`function`;function i(t){if(typeof t==`object`&&t)try{return e(t)}catch{}else if(r&&typeof t==`string`)try{return n(t),e(t)}catch{}return t}return e=>{let n=t(e,i);return n?`?${n}`:``}}var M=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},ce=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),N=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),P=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},le=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},F=(e,t,i)=>{if(!(!n(i)&&!r(i)))throw n(i)&&i.redirectHandled&&!i.options.reloadDocument?i:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=i,e.updateMatch(t.id,a=>({...a,status:n(i)?`redirected`:r(i)?`notFound`:a.status===`pending`?`success`:a.status,context:P(e,t.index),isFetching:!1,error:i})),r(i)&&!i.routeId&&(i.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),n(i)&&(e.rendered=!0,i.options._fromLocation=e.location,i.redirectHandled=!0,i=e.router.resolveRedirect(i)),i)},ue=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},de=(e,t,n)=>{let r=P(e,n);e.updateMatch(t,e=>({...e,context:r}))},I=(e,t,i)=>{let{id:a,routeId:o}=e.matches[t],s=e.router.looseRoutesById[o];if(i instanceof Promise)throw i;e.firstBadMatchIndex??=t,F(e,e.router.getMatch(a),i);try{s.options.onError?.(i)}catch(t){i=t,F(e,e.router.getMatch(a),i)}e.updateMatch(a,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:i,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!n(i)&&!r(i)&&(e.serialError??=i)},fe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!N(e,t)&&(n.options.loader||n.options.beforeLoad||Se(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{M(e)},i);r._nonReactive.pendingTimeout=t}},pe=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;fe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&F(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},me=(e,t,i,a)=>{let s=e.router.getMatch(t),c=s._nonReactive.loadPromise;s._nonReactive.loadPromise=p(()=>{c?.resolve(),c=void 0});let{paramsError:l,searchError:u}=s;l&&I(e,i,l),u&&I(e,i,u),fe(e,t,a,s);let d=new AbortController,f=!1,m=()=>{f||(f=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:d})))},h=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{m(),h()});return}s._nonReactive.beforeLoadPromise=p();let g={...P(e,i,!1),...s.__routeContext},{search:_,params:v,cause:y}=s,b=N(e,t),x={search:_,abortController:d,params:v,preload:b,context:g,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:b?`preload`:y,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},S=a=>{if(a===void 0){e.router.batch(()=>{m(),h()});return}(n(a)||r(a))&&(m(),I(e,i,a)),e.router.batch(()=>{m(),e.updateMatch(t,e=>({...e,__beforeLoadContext:a})),h()})},C;try{if(C=a.options.beforeLoad(x),o(C))return m(),C.catch(t=>{I(e,i,t)}).then(S)}catch(t){m(),I(e,i,t)}S(C)},he=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>c(),s=()=>me(e,n,t,i),c=()=>{if(ue(e,n))return;let t=pe(e,n,i);return o(t)?t.then(s):s()};return a()},ge=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},_e=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=P(e,r),d=N(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},ve=async(e,t,i,a,s)=>{try{let c=e.router.getMatch(i);try{L(s);let n=s.options.loader,r=typeof n==`function`?n:n?.handler,l=r?.(_e(e,t,i,a,s)),u=!!r&&o(l);if((u||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||c._nonReactive.minPendingPromise)&&e.updateMatch(i,e=>({...e,isFetching:`loader`})),r){let t=u?await l:l;F(e,e.router.getMatch(i),t),t!==void 0&&e.updateMatch(i,e=>({...e,loaderData:t}))}s._lazyPromise&&await s._lazyPromise;let d=c._nonReactive.minPendingPromise;d&&await d,s._componentsPromise&&await s._componentsPromise,e.updateMatch(i,t=>({...t,error:void 0,context:P(e,a),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(c.abortController.signal.aborted){c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loaderPromise=void 0;return}e.updateMatch(i,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:P(e,a)}));return}let l=c._nonReactive.minPendingPromise;l&&await l,r(t)&&await s.options.notFoundComponent?.preload?.(),F(e,e.router.getMatch(i),t);try{s.options.onError?.(t)}catch(t){o=t,F(e,e.router.getMatch(i),t)}!n(o)&&!r(o)&&await L(s,[`errorComponent`]),e.updateMatch(i,t=>({...t,error:o,context:P(e,a),status:`error`,isFetching:!1}))}}catch(t){let n=e.router.getMatch(i);n&&(n._nonReactive.loaderPromise=void 0),F(e,n,t)}},ye=async(e,t,r)=>{async function i(i,o,l,u,f){let p=Date.now()-o.updatedAt,m=i?f.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:f.options.staleTime??e.router.options.defaultStaleTime??0,h=f.options.shouldReload,g=typeof h==`function`?h(_e(e,t,a,r,f)):h,{status:_,invalid:v}=u,y=p>=m&&(!!e.forceStaleReload||u.cause===`enter`||l!==void 0&&l!==u.id);s=_===`success`&&(v||(g??y)),i&&f.options.preload===!1||(s&&!e.sync&&d?(c=!0,(async()=>{try{await ve(e,t,a,r,f);let n=e.router.getMatch(a);n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loadPromise?.resolve(),n._nonReactive.loaderPromise=void 0,n._nonReactive.loadPromise=void 0}catch(t){n(t)&&await e.router.navigate(t.options)}})()):_!==`success`||s?await ve(e,t,a,r,f):de(e,a,r))}let{id:a,routeId:o}=e.matches[r],s=!1,c=!1,l=e.router.looseRoutesById[o],u=l.options.loader,d=((typeof u==`function`?void 0:u?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(ue(e,a)){if(!e.router.getMatch(a))return e.matches[r];de(e,a,r)}else{let t=e.router.getMatch(a),n=e.router.stores.matchesId.get()[r],s=(n&&e.router.stores.matchStores.get(n)||null)?.routeId===o?n:e.router.stores.matches.get().find(e=>e.routeId===o)?.id,c=N(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&d)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),r=n._nonReactive.error||n.error;r&&F(e,n,r),n.status===`pending`&&await i(c,t,s,n,l)}else{let n=c&&!e.router.stores.matchStores.has(a),r=e.router.getMatch(a);r._nonReactive.loaderPromise=p(),n!==r.preload&&e.updateMatch(a,e=>({...e,preload:n})),await i(c,t,s,r,l)}}let f=e.router.getMatch(a);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve(),f._nonReactive.loadPromise=void 0),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;let m=c?f.isFetching:!1;return m!==f.isFetching||f.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:m,invalid:!1})),e.router.getMatch(a)):f};async function be(e){let t=e,a=[];ce(t.router)&&M(t);let s;for(let e=0;e<t.matches.length;e++){try{let n=he(t,e);o(n)&&await n}catch(e){if(n(e))throw e;if(r(e))s=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let c=t.firstBadMatchIndex??t.matches.length,l=s&&!t.preload?le(t,s):void 0,u=s&&t.preload?0:l===void 0?c:Math.min(l+1,c),d,f;for(let e=0;e<u;e++)a.push(ye(t,a,e));try{await Promise.all(a)}catch{let e=await Promise.allSettled(a);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(n(e))throw e;r(e)?d??=e:f??=e}if(f!==void 0)throw f}let p=d??(s&&!t.preload?s:void 0),m=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!p&&s&&t.preload)return t.matches;if(p){let e=le(t,p);e===void 0&&i();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],a=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&a&&(r.options.notFoundComponent=a),p.routeId=n.routeId;let o=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...o?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:p},isFetching:!1})),m=e,await L(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await L(e,[`errorComponent`])}for(let e=0;e<=m;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=ge(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let h=M(t);if(o(h)&&await h,p)throw p;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function xe(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function L(e,t=R){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===R?(()=>{if(e._componentsPromise===void 0){let t=xe(e,R);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():xe(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Se(e){for(let t of R)if(e.options[t]?.preload)return!0;return!1}var R=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Ce(e){return{input:({url:t})=>{for(let n of e)t=z(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Te(e[n],t);return t}}}function we(e){let t=j(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=ne([`/`,t,e.pathname]),e)}}function z(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Te(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ee(e){let t=e;return{get(){return t},set(e){t=f(e,t)}}}function De(e){return{get(){return e()}}}function Oe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>B(o,_.get())),x=r(()=>B(s,v.get())),S=r(()=>B(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),O=D(64);function k(e){let t=O.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),O.set(e,t)),t}let ee={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:k,setMatches:A,setPending:te,setCached:j};A(e.matches),a?.(ee);function A(e){V(e,o,_,n,i)}function te(e){V(e,s,v,n,i)}function j(e){V(e,c,y,n,i)}return ee}function B(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function V(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}E(n.get(),a)||n.set(a)})}var H=`__TSR_index`,ke=`popstate`,Ae=`beforeunload`;function je(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=U(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[H];i=Me(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[H];i=Me(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[H]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Me(e,t){t||={};let n=W();return{...t,key:n,__TSR_key:n,[H]:e}}function Ne(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>U(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=W();t.history.replaceState({[H]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=U(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[H]-l.state[H],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=je({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ae,S,{capture:!0}),t.removeEventListener(ke,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ae,S,{capture:!0}),t.addEventListener(ke,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Pe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function U(e,t){let n=Pe(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=W();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[H]:0,key:a,__TSR_key:a}}}function W(){return(Math.random()+1).toString(36).substring(7)}function Fe(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function G(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var K=new WeakMap,Ie=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=S(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ne()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=D(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Oe(Re(this.latestLocation),e),et(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=j(o);t&&t!==`/`&&e.push(we({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Ce(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=h(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&c(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:m(e).path,external:!1,searchStr:o,search:d(t?.search,i),hash:m(r.slice(1)).path,state:b(t?.state,a)}}let o=new URL(i,this.origin),s=z(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:m(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:d(t?.search,c),hash:m(s.hash.slice(1)).path,state:b(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>C({base:e,to:t.includes(`//`)?w(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>ze({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,p=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,f(t.params,s)),h=this.routesByPath[v(l)],g;if(h)g=this.getRouteBranch(h);else if(l.includes(`$`))g=[];else{let e=this.getMatchedRoutes(l);g=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&_(p))for(let e of g){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(p,t(p))}catch{}}let y=e.leaveParams?l:m(A({path:l,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,x=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};g.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,J(t.options.validateSearch,{...e,...x}))}catch{}}),x=e}x=Be({search:x,dest:t,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),x=d(o,x);let S=this.options.stringifySearch(x),C=t.hash===!0?n.hash:t.hash?f(t.hash,n.hash):void 0,w=C?`#${C}`:``,T=t.state===!0?n.state:t.state?f(t.state,n.state):{};T=b(n.state,T);let E=`${y}${S}${w}`,D,O,k=!1;if(this.rewrite){let e=new URL(E,this.origin),t=Te(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?O=t.pathname+t.search+t.hash:(O=t.href,k=!0)}else D=u(E),O=D;return{publicHref:O,href:D,pathname:y,search:x,searchStr:S,state:T,hash:C??``,external:k,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=te(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,f(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=g(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=v(this.latestLocation.href)===v(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=p(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=U(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=z(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(re(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,i,a,o,s=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad(),t?K.set(this.latestLocation,t):K.delete(this.latestLocation);let n=this.latestLocation,r=G(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await be({router:this,sync:e?.sync,forceStaleReload:s.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){n(e)?(i=e,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):r(e)&&(a=e);let t=i?i.status:a?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(i)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(e=>e.status===`error`)&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(G(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&re(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=L,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),i=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),s=i.filter(e=>!o.has(e.id));if(s.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...s])}try{return i=await be({router:this,matches:i,location:t,preload:!0,updateMatch:(e,t)=>{a.has(e)?i=i.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),i}catch(e){if(n(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});r(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=l(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!g(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?g(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ae,parseSearch:e.parseSearch??ie,protocolAllowlist:e.protocolAllowlist??a}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=s(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let i=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:o}=i,{matchedRoutes:s}=i,c=!1;(a?a.path!==`/`&&o[`**`]:v(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:c=!0);let l=c?He(this.options.notFoundMode,s):void 0,u=Array(s.length),f=new Map;for(let e of this.stores.matchStores.values())e.routeId&&f.set(e.routeId,e.get());for(let i=0;i<s.length;i++){let a=s[i],c=u[i-1],m,h,g;{let n=c?.search??e.search,r=c?._strictSearch??void 0;try{let e=J(a.options.validateSearch,{...n})??void 0;m={...n,...e},h={...r,...e},g=void 0}catch(e){let r=e;if(e instanceof q||(r=new q(e.message,{cause:e})),t?.throwOnError)throw r;m=n,h={},g=r}}let _=a.options.loaderDeps?.({search:m})??``,v=_?JSON.stringify(_):``,{interpolatedPath:y,usedParams:x}=A({path:a.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),S=a.id+y+v,C=this.getMatch(S),w=f.get(a.id),T=C?._strictParams??x,E;if(!C)try{Ue(a,T)}catch(e){if(E=r(e)||n(e)?e:new Le(e.message,{cause:e}),t?.throwOnError)throw E}Object.assign(o,T);let D=w?`stay`:`enter`,O;if(C)O={...C,cause:D,params:w?.params??o,_strictParams:T,search:d(w?w.search:C.search,m),_strictSearch:h};else{let e=a.options.loader||a.options.beforeLoad||a.lazyFn||Se(a)?`pending`:`success`;O={id:S,ssr:a.options.ssr,index:i,routeId:a.id,params:w?.params??o,_strictParams:T,pathname:y,updatedAt:Date.now(),search:w?d(w.search,m):m,_strictSearch:h,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:E,__routeContext:void 0,_nonReactive:{loadPromise:p()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:D,loaderDeps:w?b(w.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:a.options.staticData||{},fullPath:a.fullPath}}t?.preload||(O.globalNotFound=l===a.id),O.searchError=g;let k=this.getParentContext(c);O.context={...k,...O.__routeContext,...O.__beforeLoadContext},u[i]=O}for(let t=0;t<u.length;t++){let n=u[t],r=this.looseRoutesById[n.routeId],i=this.getMatch(n.id),a=f.get(n.routeId);if(n.params=a?d(a.params,o):o,!i){let i=u[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:u,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return u}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=x(t),i={...e.search};for(let e of t)try{Object.assign(i,J(e.options.validateSearch,i))}catch{}let a=x(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{Ue(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},q=class extends Error{},Le=class extends Error{};function Re(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function J(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new q(`Async validation not supported`);if(n.issues)throw new q(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function ze({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=v(e),a,o=y(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Be({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Ve(n)(e,t,r??!1)}function Ve(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=J(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=f(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function He(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return T}function Ue(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function We(){try{return sessionStorage}catch{return}}var Ge=`tsr-scroll-restoration-v1_3`,Ke=We();function qe(){try{return JSON.parse(Ke?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Je(){try{Ke?.setItem(Ge,JSON.stringify(Y))}catch{}}var Y=qe(),Ye=`data-scroll-restoration-id`,Xe=e=>e.state.__TSR_key||e.href;function Ze(e){let t=e.getAttribute(Ye);if(t)return`[${Ye}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}function Qe(e,t){let n=Y[(t.getKey||Xe)(e.latestLocation)];if(!n)return;if(t.id)return n[`[${Ye}="${t.id}"]`];let r=t.getElement?.();if(r)return n[r===window?Z:Ze(r)]}var X=!1,Z=`window`;function Q(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $e(e){let t=[];for(let n of e){if(n===Z)continue;let e=Q(n);e&&t.push(e)}return t}function et(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Xe,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(X||!r.restoring))if(e.target===document)o(Z,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=Y[e]||={};for(let[e,n]of a)e===Z?t[Z]=n:e.isConnected&&(t[Ze(e)]=n)};n&&!r.restoration&&(r.restoration=!0,X=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Je()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=Y[u];if(e){let t=Y[l];for(let n in e){if(n===Z){if(s)continue}else{let e=Q(n);if(!e||s&&o&&(c??=$e(o),c.includes(e)))continue}t||=Y[l]={},t[n]??=e[n]}}}X=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=K.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?Y[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===Z){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=Q(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=$e(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{X=!1}}))}var $=e=>typeof e==`string`&&e.length>0?e:void 0,tt=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:void 0;function nt(e){if(e.pathname===`/installations`){let t=rt(e.search);if(t.query===void 0&&t.installId===void 0)return`/installations?eventsBefore=${t.eventsBefore??`new`}&eventsCursor=${t.eventsCursor??`first`}`}return e.state.__TSR_key}function rt(e){return{query:typeof e.query==`string`?e.query:void 0,installId:typeof e.installId==`string`?e.installId:void 0,eventsCursor:$(e.eventsCursor),eventsBefore:tt(e.eventsBefore),searchCursor:$(e.searchCursor),historyCursor:$(e.historyCursor),historyBefore:tt(e.historyBefore)}}var it=k(`/installations`)({component:O(()=>ee(()=>import(`./installations-B0fHLKr7.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),`component`),validateSearch:rt});export{Ie as a,Ee as c,et as i,De as l,nt as n,Fe as o,Qe as r,G as s,it as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{or as e}from"./createServerFn-3eh2iYmC.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),n=e(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]);export{t as n,n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{or as e}from"./createServerFn-3eh2iYmC.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Fr as e,Gr as t,Hr as n,Vr as r,fr as i,sr as a,zr as o}from"./createServerFn-3eh2iYmC.js";function s(e){return e[e.length-1]}function c(e){return typeof e==`function`}function l(e,t){return c(e)?e(t):e}var u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;function f(e){for(let t in e)if(u.call(e,t))return!0;return!1}var p=()=>Object.create(null),m=(e,t)=>h(e,t,p);function h(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=y(e)&&y(i);if(!a&&!(_(e)&&_(i)))return i;let o=a?e:g(e);if(!o)return i;let s=a?i:g(i);if(!s)return i;let c=o.length,l=s.length,d=a?Array(l):n(),f=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],p=i[o];if(l===p){d[o]=l,(a?t<c:u.call(e,o))&&f++;continue}if(l===null||p===null||typeof l!=`object`||typeof p!=`object`){d[o]=p;continue}let m=h(l,p,n,r+1);d[o]=m,m===l&&f++}return c===l&&f===c?e:d}function g(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!d.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!d.call(e,t))return!1;r.push(t)}return r}function _(e){if(!v(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!v(n)||!n.hasOwnProperty(`isPrototypeOf`))}function v(e){return Object.prototype.toString.call(e)===`[object Object]`}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!b(e[r],t[r],n))return!1;return!0}if(_(e)&&_(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!b(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!b(e[o],t[o],n)))return!1;return i===a}return!1}function x(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function ee(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function S(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function te(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function C(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return te(t)}var ne=[`http:`,`https:`,`mailto:`,`tel:`];function re(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var w={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},T=/[&><\u2028\u2029]/g;function ie(e){return e.replace(T,e=>w[e])}function ae(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=C(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=C(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function oe(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function se(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function E(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var D=4,ce=5;function le(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function ue(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=le(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function de(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=ue(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=A(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=A(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=j(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=j(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=j(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=A(n.fullPath??n.from);e.kind=ce,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=A(n.fullPath??n.from);e.kind=D,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)de(e,t,r,s,i,a,o)}function O(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function k(e){if(e.pathless)for(let t of e.pathless)k(t);if(e.static)for(let t of e.static.values())k(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())k(t);if(e.dynamic?.length){e.dynamic.sort(O);for(let t of e.dynamic)k(t)}if(e.optional?.length){e.optional.sort(O);for(let t of e.optional)k(t)}if(e.wildcard?.length){e.wildcard.sort(O);for(let t of e.wildcard)k(t)}}function A(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function j(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function M(e,t){let n=A(`/`),r=new Uint16Array(6);for(let t of e)de(!1,r,t,1,n,0);k(n),t.masksTree=n,t.flatCache=E(1e3)}function fe(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=I(e,t.masksTree);return t.flatCache.set(e,r),r}function pe(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=A(`/`),de(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),I(r,o,n)}function N(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=I(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=R(a.route)),t.matchCache.set(r,a),a}function P(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function F(e,t=!1,n){let r=A(e.fullPath),i=new Uint16Array(6),a={},s={},c=0;return de(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in a&&o(),a[e.id]=e,c!==0&&e.path){let t=P(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++}),k(r),{processedTree:{segmentTree:r,singleCache:E(1e3),matchCache:E(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:s}}function I(e,t,n=!1){let r=e.split(`/`),i=he(e,r,t,n);if(!i)return null;let[a]=L(e,r,i);return{route:i.node.route,rawParams:a}}function L(e,t,n){let r=me(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===D)break;if(u.kind===ce){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function R(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function me(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function he(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!s(t),a=i&&e!==`/`,o=t.length-+!!i,c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let n=c.pop(),{node:i,index:s,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!V(u,n))continue;if(i.parse){if(!B(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==D&&V(l,n)&&(l=n);let v=s===o;if(v&&(i.route&&(!a||i.kind===D||i.kind===2)&&V(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[s],b;if(v&&i.index){let n={node:i.index,index:s,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(B(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&ge(p,o))return n;V(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(s).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}c.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];c.push({node:r,index:s,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}c.push({node:n,index:s+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+z(o,s),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}c.push({node:t,index:s+1,skipped:d,depth:f+1,statics:p,dynamics:m+z(o,s),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&c.push({node:e,index:s+1,skipped:d,depth:f+1,statics:p+z(o,s),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&c.push({node:e,index:s+1,skipped:d,depth:f+1,statics:p+z(o,s),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];c.push({node:n,index:s,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function z(e,t){return 2**(e-t-1)}function ge(e,t){return e===2**(t-1)-1}function B(e,t,n){let r,i;try{[r,i]=L(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function V(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===D)>(e.node.kind===D)||t.node.kind===D==(e.node.kind===D)&&t.depth>e.depth))):!0}function H(e){return U(e.filter(e=>e!==void 0).join(`/`))}function U(e){return e.replace(/\/{2,}/g,`/`)}function W(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function G(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function _e(e){return G(W(e))}function K(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function ve(e,t,n){return K(e,n)===K(t,n)}function ye({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let c;if(a)c=e.split(`/`);else if(i)c=t.split(`/`);else{for(c=e.split(`/`);c.length>1&&s(c)===``;)c.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&c.push(r):c=[r]:r===`..`?c.pop():r===`.`||c.push(r)}}c.length>1&&(s(c)===``?n===`never`&&c.pop():n===`always`&&c.push(``));let l=U(c.join(`/`))||`/`;return o&&r&&r.set(o,l),l}function be(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function xe(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ce(e,n)).join(`/`):Ce(r,n):r}function Se({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=ue(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=xe(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=xe(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=xe(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ce(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var q=`__root__`,we=`Error preloading route! ☝️`,Te=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=q:this.parentRoute||o();let r=n?q:t?.path;r&&r!==`/`&&(r=W(r));let i=t?.id||r,a=n?q:H([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=H([`/`,a]));let s=a===`__root__`?`/`:H([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=s,this._to=G(s)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=t=>e({from:this.fullPath,...t}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Ee=class extends Te{constructor(e){super(e)}},J=t(n(),1),De=J.use,Oe=typeof window<`u`?J.useLayoutEffect:J.useEffect;function ke(e){let t=J.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Ae(e,t,n={},r={}){J.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function je(e){let t=J.useRef(null);return J.useImperativeHandle(e,()=>t.current,[]),t}var Y=i();function Me({children:e,fallback:t=null}){return Ne()?(0,Y.jsx)(J.Fragment,{children:e}):(0,Y.jsx)(J.Fragment,{children:t})}function Ne(){return J.useSyncExternalStore(Pe,()=>!0,()=>!1)}function Pe(){return()=>{}}var Fe=J.createContext(null);function X(e){return J.useContext(Fe)}var Ie=J.createContext(void 0),Le=J.createContext(void 0),Re=a();function ze(e,t){return e===t}function Be(e,t,n=ze){let r=(0,J.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,J.useCallback)(()=>e?.get(),[e]);return(0,Re.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Ve={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function Z(e){let t=X(),n=J.useContext(e.from?Le:Ie),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=J.useRef(void 0);return Be(i??Ve,n=>{if((e.shouldThrow??!0)&&!n&&o(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=h(a.current,r);return a.current=e,e}return r})}function He(e){return Z({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ue(e){let{select:t,...n}=e;return Z({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function We(e){return Z({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Ge(e){return Z({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ke(e){let t=X();return J.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function qe(e){return Z({...e,select:t=>e.select?e.select(t.context):t.context})}var Je=t(r(),1);function Ye(e,t){let n=X(),r=je(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:h,viewTransition:g,children:_,target:v,disabled:y,style:x,className:ee,onClick:S,onBlur:te,onFocus:C,onMouseEnter:ne,onMouseLeave:w,onTouchStart:T,ignoreBlocker:ie,params:ae,search:oe,hash:se,state:E,mask:D,reloadDocument:ce,unsafeRelative:le,from:ue,_fromLocation:de,...O}=e,k=Ne(),A=J.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),j=Be(n.stores.location,e=>e,(e,t)=>e.href===t.href),M=J.useMemo(()=>{let e={_fromLocation:j,...A};return n.buildLocation(e)},[n,j,A]),fe=M.maskedLocation?M.maskedLocation.publicHref:M.publicHref,pe=M.maskedLocation?M.maskedLocation.external:M.external,N=J.useMemo(()=>nt(fe,pe,n.history,y),[y,pe,fe,n.history]),P=J.useMemo(()=>{if(N?.external)return re(N.href,n.protocolAllowlist)?void 0:N.href;if(!rt(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),re(s,n.protocolAllowlist)?void 0:s}catch{}},[s,N,n.protocolAllowlist]),F=J.useMemo(()=>{if(P)return!1;if(o?.exact){if(!ve(j.pathname,M.pathname,n.basepath))return!1}else{let e=K(j.pathname,n.basepath),t=K(M.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!b(j.search,M.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?k&&j.hash===M.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,j,P,k,M.hash,M.pathname,M.search,n.basepath]),I=F?l(i,{})??Ze:Xe,L=F?Xe:l(a,{})??Xe,R=[ee,I.className,L.className].filter(Boolean).join(` `),me=(x||I.style||L.style)&&{...x,...I.style,...L.style},[he,z]=J.useState(!1),ge=J.useRef(!1),B=e.reloadDocument||P?!1:c??n.options.defaultPreload,V=u??n.options.defaultPreloadDelay??0,H=J.useCallback(()=>{n.preloadRoute({...A,_builtLocation:M}).catch(e=>{console.warn(e),console.warn(we)})},[n,A,M]);Ae(r,J.useCallback(e=>{e?.isIntersecting&&H()},[H]),tt,{disabled:!!y||B!==`viewport`}),J.useEffect(()=>{ge.current||!y&&B===`render`&&(H(),ge.current=!0)},[y,H,B]);let U=e=>{let t=e.currentTarget.getAttribute(`target`),r=v===void 0?t:v;if(!y&&!at(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Je.flushSync)(()=>{z(!0)});let t=n.subscribe(`onResolved`,()=>{t(),z(!1)});n.navigate({...A,replace:p,resetScroll:h,hashScrollIntoView:f,startTransition:m,viewTransition:g,ignoreBlocker:ie})}};if(P)return{...O,ref:r,href:P,..._&&{children:_},...v&&{target:v},...y&&{disabled:y},...x&&{style:x},...ee&&{className:ee},...S&&{onClick:S},...te&&{onBlur:te},...C&&{onFocus:C},...ne&&{onMouseEnter:ne},...w&&{onMouseLeave:w},...T&&{onTouchStart:T}};let W=e=>{if(y||B!==`intent`)return;if(!V){H();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),H()},V);Q.set(t,n)},G=e=>{y||B!==`intent`||H()},_e=e=>{if(y||!B||!V)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...O,...I,...L,href:N?.href,ref:r,onClick:$([S,U]),onBlur:$([te,_e]),onFocus:$([C,W]),onMouseEnter:$([ne,W]),onMouseLeave:$([w,_e]),onTouchStart:$([T,G]),disabled:!!y,target:v,...me&&{style:me},...R&&{className:R},...y&&Qe,...F&&$e,...k&&he&&et}}var Xe={},Ze={className:`active`},Qe={role:`link`,"aria-disabled":!0},$e={"data-status":`active`,"aria-current":`page`},et={"data-transitioning":`transitioning`},Q=new WeakMap,tt={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function nt(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function rt(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var it=J.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Ye(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return J.createElement(`a`,t,o)}return J.createElement(n,a,o)});function at(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var ot=class extends Te{constructor(e){super(e),this.useMatch=e=>Z({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>qe({...e,from:this.id}),this.useSearch=e=>Ge({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>We({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ue({...e,from:this.id}),this.useLoaderData=e=>He({...e,from:this.id}),this.useNavigate=()=>Ke({from:this.fullPath}),this.Link=J.forwardRef((e,t)=>(0,Y.jsx)(it,{ref:t,from:this.fullPath,...e}))}};function st(e){return new ot(e)}function ct(){return e=>ut(e)}var lt=class extends Ee{constructor(e){super(e),this.useMatch=e=>Z({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>qe({...e,from:this.id}),this.useSearch=e=>Ge({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>We({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ue({...e,from:this.id}),this.useLoaderData=e=>He({...e,from:this.id}),this.useNavigate=()=>Ke({from:this.fullPath}),this.Link=J.forwardRef((e,t)=>(0,Y.jsx)(it,{ref:t,from:this.fullPath,...e}))}};function ut(e){return new lt(e)}function dt(e){return new ft(e,{silent:!0}).createRoute}var ft=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=st(e);return t.isRoot=!1,t},this.silent=t?.silent}};function pt(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,ee(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(De)De(o());else throw o();return J.createElement(r,e)};return s.preload=o,s}var mt=`modulepreload`,ht=function(e){return`/`+e},gt={},_t=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ht(t,n),t in gt)return;gt[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:mt,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{ne as A,S as B,R as C,M as D,pe as E,oe as F,m as H,ie as I,l as L,x as M,ae as N,F as O,b as P,f as R,G as S,N as T,h as U,s as V,be as _,it as a,ye as b,X as c,Ne as d,De as f,U as g,q as h,ct as i,se as j,E as k,Fe as l,ke as m,pt as n,Be as o,Oe as p,dt as r,Ie as s,_t as t,Me as u,Se as v,fe as w,_e as x,H as y,re as z};
|