@hot-updater/console 1.2.0-rc.4 → 1.2.0-rc.41
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/-native-builds-search-BFcW2mlI.js +1 -0
- package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +1 -0
- package/.output/public/assets/ChannelBadge-BgVCJfJs.js +1 -0
- package/.output/public/assets/ChannelPicker-BQKoyxnf.js +1 -0
- package/.output/public/assets/CompositeItem-B7uxFM46.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-B3VCINom.js} +1 -1
- package/.output/public/assets/EventDetails-CWiI1CXb.js +1 -0
- package/.output/public/assets/HashValueDisplay-DvwvQchI.js +1 -0
- package/.output/public/assets/InsightsPageHeader-BjUAikRe.js +1 -0
- package/.output/public/assets/IosInstall-B5IdjCP2.js +1 -0
- package/.output/public/assets/NativeBuildsNav-BKdnlKMN.js +1 -0
- package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-BEpesHEm.js} +1 -1
- package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-D4KPXCHL.js} +1 -1
- package/.output/public/assets/QrCode-BFSCkbPj.js +1 -0
- package/.output/public/assets/RelativeTime-5ZP9WlQ6.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-DCtG7c1o.js +1 -0
- package/.output/public/assets/RowReason-CXMCJ-Jc.js +1 -0
- package/.output/public/assets/SandboxBadge-PM92jCk6.js +1 -0
- package/.output/public/assets/TargetDisplay-DG_I3qln.js +1 -0
- package/.output/public/assets/alert-dialog-DGPqJBCk.js +1 -0
- package/.output/public/assets/api-eO-sq3Jd.js +1 -0
- package/.output/public/assets/api-keys-CAVLgicI.js +1 -0
- package/.output/public/assets/api-keys-ztwXoKcj.js +1 -0
- package/.output/public/assets/arrow-left-68S4uy4I.js +1 -0
- package/.output/public/assets/arrow-right-DjRwIoF1.js +1 -0
- package/.output/public/assets/arrow-up-right-C_1ALUCD.js +1 -0
- package/.output/public/assets/badge-zMibJGR5.js +1 -0
- package/.output/public/assets/card-BAs80yql.js +1 -0
- package/.output/public/assets/check-C3VCvMOV.js +1 -0
- package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
- package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-DvYMC5yF.js} +1 -1
- package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-D0JWZ1KF.js} +1 -1
- package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-CtbGqKyr.js} +1 -1
- package/.output/public/assets/{uuidv7-zXMtwR9Q.js → constants-C5gi7fdZ.js} +1 -1
- package/.output/public/assets/{copy-DsuLj3oj.js → copy-BjVLMKbo.js} +1 -1
- package/.output/public/assets/dialog-BvZDZzdQ.js +1 -0
- package/.output/public/assets/dist-BEmib-ZM.js +1 -0
- package/.output/public/assets/{download-Cf24LBde.js → download-CgpaZb23.js} +1 -1
- package/.output/public/assets/empty-C5GqArX9.js +1 -0
- package/.output/public/assets/field-DInLQ5oV.js +1 -0
- package/.output/public/assets/git-branch-BGatQV8Q.js +1 -0
- package/.output/public/assets/history-Ci4dhphE.js +1 -0
- package/.output/public/assets/index-Ck4fZq4M.js +10 -0
- package/.output/public/assets/input-group-CIjTdxCW.js +1 -0
- package/.output/public/assets/insights-V3D8tYPQ.js +1 -0
- package/.output/public/assets/insights-api-D4-FZeEI.js +1 -0
- package/.output/public/assets/insights-fSY6n4k3.js +42 -0
- package/.output/public/assets/insights-osTmFzzR.js +2 -0
- package/.output/public/assets/insights-search-CZtvD-Vf.js +1 -0
- package/.output/public/assets/insights-usage-rpc-Dw5_pmRH.js +1 -0
- package/.output/public/assets/insights_.distribution-Cws8lYLC.js +1 -0
- package/.output/public/assets/insights_.distribution-DpppHhaU.js +2 -0
- package/.output/public/assets/insights_.distribution-oIFSv2TC.js +1 -0
- package/.output/public/assets/installations-Byojb0Rv.js +2 -0
- package/.output/public/assets/installations-CFGDrY-W.js +1 -0
- package/.output/public/assets/installations-CcPrSZwW.js +1 -0
- package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-BkeLvA1m.js} +1 -1
- package/.output/public/assets/{link-DTEyW70e.js → link-CRMwpc7-.js} +2 -2
- package/.output/public/assets/{list--NIee1FZ.js → list-DQ9YBIDW.js} +1 -1
- package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
- package/.output/public/assets/native-builds-C4u6JvxV.js +2 -0
- package/.output/public/assets/native-builds-D9hoJd6W.js +1 -0
- package/.output/public/assets/native-builds-zwqucwx2.js +1 -0
- package/.output/public/assets/native-builds_._buildId-CXx2xjoI.js +1 -0
- package/.output/public/assets/native-builds_._buildId-DymsEZlO.js +2 -0
- package/.output/public/assets/native-builds_.devices-DF3g--dt.js +1 -0
- package/.output/public/assets/native-builds_.devices-QToUV8FB.js +2 -0
- package/.output/public/assets/plus-DztQIXYL.js +1 -0
- package/.output/public/assets/preload-helper-CE9OukVC.js +1 -0
- package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-RUNbaMyO.js} +1 -1
- package/.output/public/assets/remote-config-BIIj0Faf.js +1 -0
- package/.output/public/assets/remote-config-BJJAxy_g.js +6 -0
- package/.output/public/assets/remote-config-Dm1MCHDN.js +1 -0
- package/.output/public/assets/rotate-ccw-tITIe0Bd.js +1 -0
- package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-BFQcpUTO.js} +1 -1
- package/.output/public/assets/routes-9gxYg__u.js +1 -0
- package/.output/public/assets/routes-CUsayL0T.js +2 -0
- package/.output/public/assets/search-BfEqtE64.js +1 -0
- package/.output/public/assets/select-Bk52fOVX.js +1 -0
- package/.output/public/assets/sidebar-BmzmPGuv.js +3 -0
- package/.output/public/assets/smartphone-Dy13ukaU.js +1 -0
- package/.output/public/assets/styles-C1iqL6CR.css +2 -0
- package/.output/public/assets/switch-CI393qIT.js +1 -0
- package/.output/public/assets/table-DbZPkzdz.js +1 -0
- package/.output/public/assets/tabs-BnpNC0zf.js +1 -0
- package/.output/public/assets/trash-2-DI0biNI-.js +1 -0
- package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CxhBbgJw.js} +1 -1
- package/.output/public/assets/useAnchoredPopupScrollLock-Cvx6CdPD.js +1 -0
- package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-Cbk_weKW.js} +1 -1
- package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-D7IuoOLE.js} +1 -1
- package/.output/public/assets/valueToPercent-Db73Kirz.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-X9YQcrQI.mjs → __23tanstack-start-server-fn-resolver-76SKGuoc.mjs} +94 -46
- package/.output/server/_chunks/ssr-renderer.mjs +2 -2
- package/.output/server/_libs/@base-ui/react+[...].mjs +4436 -3131
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
- package/.output/server/_libs/_.mjs +2 -0
- package/.output/server/_libs/lucide-react.mjs +34 -28
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +1 -1
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +1 -1
- package/.output/server/_ssr/-native-builds-search-Bwt8tQzp.mjs +55 -0
- package/.output/server/_ssr/{BundleIdDisplay-BVrZXzTm.mjs → BundleIdDisplay-By3CbbRM.mjs} +3 -3
- package/.output/server/_ssr/ChannelBadge-CDup7l56.mjs +23 -0
- package/.output/server/_ssr/ChannelPicker-Du2TmP3P.mjs +251 -0
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-CULyV3nR.mjs → ConsoleFeatureUnavailable-C6aGoKDE.mjs} +8 -8
- package/.output/server/_ssr/{EventDetails-DeI1rOQc.mjs → EventDetails-VbcnMnSs.mjs} +9 -9
- package/.output/server/_ssr/{HashValueDisplay-DpnPD3U2.mjs → HashValueDisplay-CnC2fHER.mjs} +7 -7
- package/.output/server/_ssr/{InsightsPageHeader-Dwmdtelg.mjs → InsightsPageHeader-BuOanVZL.mjs} +13 -13
- package/.output/server/_ssr/IosInstall-BAFhW7Q9.mjs +751 -0
- package/.output/server/_ssr/NativeBuildsNav-BoTu4aLF.mjs +38 -0
- package/.output/server/_ssr/{NotFoundPage-Dddp1HSc.mjs → NotFoundPage-Bz05xF5Q.mjs} +3 -3
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-C22qEcwo.mjs} +13 -3
- package/.output/server/_ssr/QrCode-DWshAW81.mjs +50 -0
- package/.output/server/_ssr/RelativeTime-D5kDQVn1.mjs +242 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-Dwx7dEeQ.mjs} +20 -4
- package/.output/server/_ssr/RowReason-pVOWQ7t5.mjs +186 -0
- package/.output/server/_ssr/SandboxBadge-DFbUYwhO.mjs +85 -0
- package/.output/server/_ssr/TargetDisplay-BtE5vntq.mjs +105 -0
- package/.output/server/_ssr/{alert-dialog-ei2c1b6A.mjs → alert-dialog-tcfkkNUX.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-CVi7E0qS.mjs → api-keys-12_U0SQM.mjs} +14 -11
- package/.output/server/_ssr/{api-keys-BLHCygD_.mjs → api-keys-Bm8uDp2u.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-CLZsTwih.mjs → api-keys-rpc-BxkfToWI.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-p-7EhGIG.mjs → api-rpc-TSnLWB7e.mjs} +83 -35
- package/.output/server/_ssr/{api-CvwqILEx.mjs → api-xOHZxbzu.mjs} +174 -37
- package/.output/server/_ssr/{auth-rpc-B1W4-hxa.mjs → auth-rpc-D3w54vsW.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-CVKs7SWJ.mjs → auth.server-a2eP6q5P.mjs} +952 -186
- package/.output/server/_ssr/{badge-nS9EbEA0.mjs → badge-DrfbN1n0.mjs} +4 -45
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
- package/.output/server/_ssr/card-DEItjgKG.mjs +49 -0
- package/.output/server/_ssr/{config.server-BAdvotbH.mjs → config.server-K8dd4dRv.mjs} +4 -4
- package/.output/server/_ssr/{console-access-BiuC2QFp.mjs → console-access-D-DHU4YH.mjs} +2 -2
- package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-DTYyXrWO.mjs} +1 -1
- package/.output/server/_ssr/{console-features-api-FvbqhbTg.mjs → console-features-api-Chy2PrzZ.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-Cl3J66aP.mjs → console-features-rpc-_31L0k1i.mjs} +4 -4
- package/.output/server/_ssr/constants-BjsJZqaU.mjs +10 -0
- package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
- package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-B56IJxlu.mjs} +1 -1
- package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
- package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BZMFl5QV.mjs} +3 -3
- package/.output/server/_ssr/deviceProfileToken-xzDLfE0T.mjs +98 -0
- package/.output/server/_ssr/{dialog-GmTPeUS4.mjs → dialog-SAl1vP74.mjs} +5 -5
- package/.output/server/_ssr/dist-CiOq3ygH.mjs +148 -0
- package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-C1KOnpiF.mjs} +1 -1
- package/.output/server/_ssr/{empty-CXWKv24M.mjs → empty-opJc9Fjw.mjs} +3 -3
- package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
- package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BVufgM3l.mjs} +3 -3
- package/.output/server/_ssr/{field-lwIHAwLc.mjs → field-D6Y7zDZd.mjs} +3 -3
- package/.output/server/_ssr/foldedPage-CUjJqtlF.mjs +176 -0
- package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CnOf4Frp.mjs} +2 -2
- package/.output/server/_ssr/{input-group-Dgr4DNbE.mjs → input-group-D2PvPRdm.mjs} +3 -3
- package/.output/server/_ssr/{insights-BxtyBLt0.mjs → insights-Cro4cYp7.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-PN_9ilr8.mjs → insights-api-BPyvQert.mjs} +5 -5
- package/.output/server/_ssr/{insights-DSnQTQw1.mjs → insights-dWeLneo1.mjs} +45 -191
- package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-Cxu3UtyB.mjs → insights-failures-rpc-D7M8-Et9.mjs} +11 -11
- package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc--c6kBp3k.mjs → insights-recovery-rpc-BUMK4m4H.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-oTMaAqc1.mjs → insights-rpc-BZZ4U2Ll.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-r-Z50f0Y.mjs → insights-search-Czi553oN.mjs} +6 -8
- package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-DoElOI5b.mjs → insights-usage-rpc-BXvUr-z6.mjs} +7 -7
- package/.output/server/_ssr/{insights-usage-rpc-B00vjt0a.mjs → insights-usage-rpc-HOr6mniz.mjs} +5 -5
- package/.output/server/_ssr/{insights-B9NvjAWc.mjs → insights-vmCmvfXx.mjs} +5 -5
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-CnYddZ2Y.mjs → insights_.distribution-B2dxcCd_.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-mpZ0wS_R.mjs → insights_.distribution-B5V_NbK4.mjs} +17 -16
- package/.output/server/_ssr/{insights_.distribution-B8AMBp-Q.mjs → insights_.distribution-DongF2jp.mjs} +5 -5
- package/.output/server/_ssr/{installations-BfhcY_XQ.mjs → installations-B7w4LGJp.mjs} +4 -4
- package/.output/server/_ssr/{installations-CWTRzcR7.mjs → installations-B84kSetd.mjs} +2 -2
- package/.output/server/_ssr/{installations-O6Jzc5PO.mjs → installations-bieZA3xt.mjs} +13 -13
- package/.output/server/_ssr/ios-devices-rpc-DOQg4dpb.mjs +137 -0
- package/.output/server/_ssr/iosDeviceCookie-DhWNFpC6.mjs +155 -0
- package/.output/server/_ssr/iosDeviceProfile-jC8w4zEF.mjs +176 -0
- package/.output/server/_ssr/iosDevices-B4kQLURA.mjs +113 -0
- package/.output/server/_ssr/listReleases-QF91GLE7.mjs +94 -0
- package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
- package/.output/server/_ssr/native-artifact-D4ZISXRZ.mjs +1517 -0
- package/.output/server/_ssr/native-builds-BU9Njiwm.mjs +696 -0
- package/.output/server/_ssr/native-builds-lEyKQemV.mjs +262 -0
- package/.output/server/_ssr/{native-builds-UIgRLMb8.mjs → native-builds-zpCsEYyA.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-DjUqI5sa.mjs → native-builds_._buildId-BJ4R32fq.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-RHUotAYb.mjs +1148 -0
- package/.output/server/_ssr/native-builds_.devices-C0IlQkLv.mjs +10 -0
- package/.output/server/_ssr/native-builds_.devices-D1Ke-Fc-.mjs +820 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-MCd5xUqP.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-DcsqDS-O.mjs +253 -0
- package/.output/server/_ssr/nativeBuilds-CRa36wNn.mjs +287 -0
- package/.output/server/_ssr/plistText-DkzlCfPI.mjs +15 -0
- package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-D9CCkDjn.mjs} +7 -6
- package/.output/server/_ssr/publicConsoleBase-wTKw3_iB.mjs +15 -0
- package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-gfhE5tz5.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-PLyiDnas.mjs → release-adoption-rpc-C4G_d8qK.mjs} +9 -9
- package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-DfEYq7I4.mjs} +4 -4
- package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-CJ2Shida.mjs} +4 -3
- package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-CqIc-SDE.mjs} +1 -1
- package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-Ch1JpJkY.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-C5j4CfGa.mjs → remote-config-1QZ0HgEu.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-eNxv5Kzc.mjs → remote-config-CsbpqWAR.mjs} +24 -23
- package/.output/server/_ssr/{remote-config-tOdzsFMi.mjs → remote-config-DkgBxBka.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-Cy4VwdMt.mjs → remote-config-rpc-KjJA9DC-.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-DaQ6OkIp.mjs → router-Dy3fmb8q.mjs} +137 -64
- package/.output/server/_ssr/{routes-Drni4c1E.mjs → routes-68rZQGee.mjs} +470 -474
- package/.output/server/_ssr/{routes-BYmUIYfN.mjs → routes-Ug9uqzob.mjs} +50 -18
- package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BUbb281Z.mjs} +4 -4
- package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-CaIuQCXb.mjs} +1 -1
- package/.output/server/_ssr/{schema-migration-rpc-mZ_19Wt_.mjs → schema-migration-rpc-kntY9oPm.mjs} +4 -4
- package/.output/server/_ssr/{select-Cjrp1Sl9.mjs → select-BOKFFr_G.mjs} +12 -10
- package/.output/server/_ssr/{server-y3KoaSil.mjs → server-DetMvRBJ.mjs} +7 -7
- package/.output/server/_ssr/{sidebar-tRHVNWpo.mjs → sidebar-B46houn0.mjs} +17 -10
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BvDsQehg.mjs → start-BSkL2B6C.mjs} +2 -2
- package/.output/server/_ssr/{switch-YrqCYfP-.mjs → switch-BMYzd71j.mjs} +4 -4
- package/.output/server/_ssr/{table-NHakBPSp.mjs → table-DWrYwJ_a.mjs} +2 -2
- package/.output/server/_ssr/tabs-DusHAcYy.mjs +45 -0
- package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-BwDwIoNu.mjs} +3 -3
- package/.output/server/_ssr/{dist-TEpM_UAD.mjs → uuid-kZvLA0Ly-DNL0qBSj.mjs} +2 -147
- package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-C0jNe2Om.mjs} +2 -2
- package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-zW2fpHOZ.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-CD1q5k0m.mjs +228 -0
- package/.output/server/index.mjs +503 -391
- package/lib/index.d.mts +9 -0
- package/package.json +7 -30
- package/src/components/AppSidebar.tsx +11 -2
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/ChannelPicker.tsx +227 -0
- package/src/components/DataTable.tsx +363 -0
- package/src/components/FoldedRows.tsx +219 -0
- package/src/components/HashValueDisplay.tsx +6 -3
- package/src/components/PlatformIcon.tsx +10 -0
- package/src/components/RelativeTime.tsx +31 -0
- package/src/components/RowReason.tsx +56 -0
- package/src/components/TargetDisplay.tsx +95 -0
- package/src/components/ThemeProvider.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +5 -3
- package/src/components/features/bundles/BundleMetadata.tsx +1 -1
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +10 -11
- package/src/components/features/insights/AppUsage.tsx +3 -5
- package/src/components/features/insights/FailureReports.tsx +3 -2
- package/src/components/features/insights/InsightsControls.tsx +10 -69
- package/src/components/features/insights/InsightsOverview.tsx +7 -1
- package/src/components/features/insights/InsightsPageHeader.tsx +10 -15
- package/src/components/features/insights/ReleaseActivity.tsx +6 -2
- package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
- package/src/components/features/insights/UpdateFailures.tsx +1 -0
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +122 -61
- package/src/components/features/native-builds/CommitLink.tsx +3 -2
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/InstallCard.tsx +316 -91
- package/src/components/features/native-builds/IosDevicesPage.tsx +1100 -0
- package/src/components/features/native-builds/IosInstall.tsx +732 -0
- package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +30 -6
- package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +94 -108
- package/src/components/features/native-builds/NativeBuildsTable.tsx +649 -323
- package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
- package/src/components/features/native-builds/PatchesCard.tsx +28 -19
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +5 -5
- package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
- package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
- package/src/components/features/native-builds/ShortHash.tsx +6 -3
- package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
- package/src/components/features/native-builds/playTracks.ts +7 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +8 -6
- package/src/components/features/remote-config/PublishDialog.tsx +4 -1
- package/src/components/features/remote-config/VersionsCard.tsx +5 -2
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/button.tsx +11 -2
- package/src/components/ui/combobox.tsx +2 -2
- package/src/components/ui/dialog.tsx +3 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/select.tsx +15 -7
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/sidebar.tsx +2 -2
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/sonner.tsx +3 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/index.ts +9 -0
- package/src/lib/api-rpc.ts +125 -35
- package/src/lib/api.ts +160 -16
- package/src/lib/constants.ts +15 -0
- package/src/lib/insights-search.ts +0 -3
- package/src/lib/ios-devices-api.ts +290 -0
- package/src/lib/ios-devices-rpc.ts +188 -0
- package/src/lib/native-builds.ts +261 -20
- package/src/lib/server/console-runtime.server.ts +9 -2
- package/src/lib/server/deviceProfileToken.ts +221 -0
- package/src/lib/server/foldedPage.ts +360 -0
- package/src/lib/server/iosDeviceCookie.ts +239 -0
- package/src/lib/server/iosDeviceProfile.ts +232 -0
- package/src/lib/server/iosDevices.ts +193 -0
- package/src/lib/server/listReleases.ts +101 -62
- package/src/lib/server/local-console.ts +1 -1
- package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
- package/src/lib/server/nativeBuildInstall.ts +502 -0
- package/src/lib/server/nativeBuilds.ts +314 -58
- package/src/lib/server/plistText.ts +17 -0
- package/src/lib/server/publicConsoleBase.ts +17 -0
- package/src/routeTree.gen.ts +129 -18
- package/src/routes/-native-builds-search.ts +52 -4
- package/src/routes/-releases-search.ts +63 -2
- package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
- package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
- package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
- package/src/routes/[_]hot-updater/devices/request.ts +28 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
- package/src/routes/api/native-builds/$buildId/download.ts +22 -1
- package/src/routes/index.tsx +657 -577
- package/src/routes/insights.tsx +3 -5
- package/src/routes/insights_.distribution.tsx +2 -2
- package/src/routes/native-builds_.devices.tsx +21 -0
- package/src/styles.css +24 -0
- package/.output/public/assets/-native-builds-search-C-TGpFAm.js +0 -1
- package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
- package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
- package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
- package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
- package/.output/public/assets/alert-dialog-BqYScr9y.js +0 -1
- package/.output/public/assets/api-P2g8dCNg.js +0 -1
- package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
- package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
- package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
- package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
- package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
- package/.output/public/assets/badge-DWFcDWho.js +0 -1
- package/.output/public/assets/check-CXVR3s3X.js +0 -1
- package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
- package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
- package/.output/public/assets/dist-CPlO6ko9.js +0 -1
- package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
- package/.output/public/assets/field-D-2-mnNh.js +0 -1
- package/.output/public/assets/history-DqHlgSuV.js +0 -1
- package/.output/public/assets/index-CqP5HPV6.js +0 -10
- package/.output/public/assets/input-group-D3OUBk4n.js +0 -1
- package/.output/public/assets/insights-B-0odqpt.js +0 -42
- package/.output/public/assets/insights-BSVGfxSL.js +0 -1
- package/.output/public/assets/insights-NK5B6ReS.js +0 -2
- package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
- package/.output/public/assets/insights-search-DghCbEnk.js +0 -1
- package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
- package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
- package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
- package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
- package/.output/public/assets/installations-B674P5Z5.js +0 -2
- package/.output/public/assets/installations-BWxczZ2t.js +0 -1
- package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
- package/.output/public/assets/native-builds-BOC71grI.js +0 -1
- package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
- package/.output/public/assets/native-builds-DAy2678K.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
- package/.output/public/assets/plus-BReVKct-.js +0 -1
- package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
- package/.output/public/assets/refresh-cw-B9HHjLej.js +0 -1
- package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
- package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
- package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
- package/.output/public/assets/routes-BDdBIxYS.js +0 -1
- package/.output/public/assets/routes-CCD33Azv.js +0 -2
- package/.output/public/assets/search-BCel4Oy6.js +0 -1
- package/.output/public/assets/select-CBIU0_M1.js +0 -1
- package/.output/public/assets/sidebar-Di9SN47G.js +0 -3
- package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/switch-BpdiHL_t.js +0 -1
- package/.output/public/assets/table-Bpy3SvSo.js +0 -1
- package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
- package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
- package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
- package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +0 -37
- package/.output/server/_ssr/RolloutPercentageBadge-CoBhJtv9.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-CPg_Rn5E.mjs +0 -139
- package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
- package/.output/server/_ssr/native-builds-BDcOlKnd.mjs +0 -510
- package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
- package/.output/server/_ssr/native-builds_._buildId-BjsdQO93.mjs +0 -813
- package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
- package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
- package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
- package/.output/server/_ssr/tabs-BgTTFotk.mjs +0 -45
- package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
- package/src/lib/server/nativeBuildQr.ts +0 -73
- package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,$n as t,Bn as n,F as r,Fn as i,Gt as a,H as o,I as s,In as c,Jn as l,Jt as u,Kt as d,L as f,Ln as p,M as m,P as h,R as g,U as _,Un as v,Ur as y,Ut as b,Wn as x,Wr as S,Xn as C,Xt as w,Yn as T,Yt as ee,Z as te,Zn as E,_ as ne,an as re,b as ie,bn as ae,er as oe,et as se,g as ce,h as D,ii as le,ir as O,ln as k,lt as ue,mn as de,p as fe,qt as pe,rr as me,ti as A,tn as he,ut as j,v as ge,vn as _e,w as M,xn as N,y as P,yn as ve}from"./sidebar-Di9SN47G.js";import{t as F}from"./link-DTEyW70e.js";import{t as I}from"./arrow-right-CNII8TYn.js";import{t as ye}from"./arrow-up-right-DK8Zdg40.js";import{a as be,c as xe,i as Se,n as L,r as Ce,s as we,t as R}from"./routes-CCD33Azv.js";import{t as z}from"./check-CXVR3s3X.js";import{a as B,i as Te,n as Ee,r as De}from"./useCompositeListItem-JmyDfo3-.js";import{c as V,d as Oe,f as ke,l as Ae,p as je,r as Me}from"./native-builds-BOC71grI.js";import{t as Ne}from"./chevron-right-BoUXo82O.js";import{A as Pe,D as Fe,E as Ie,M as Le,N as Re,T as ze,a as Be,d as Ve,f as He,h as Ue,i as H,m as U,n as W,o as G,r as We,t as Ge}from"./select-CBIU0_M1.js";import{t as Ke}from"./circle-off-C7Muo0ss.js";import{t as qe}from"./download-Cf24LBde.js";import{t as Je}from"./list--NIee1FZ.js";import{n as Ye,t as Xe}from"./plus-BReVKct-.js";import{a as Ze,i as Qe,n as $e,o as et,s as tt,t as nt}from"./input-group-D3OUBk4n.js";import{i as rt,n as it,t as at}from"./switch-BpdiHL_t.js";import{a as ot,c as st,d as ct,f as lt,i as ut,n as dt,o as ft,s as pt,t as K,u as mt}from"./badge-DWFcDWho.js";import{n as q}from"./dist-CPlO6ko9.js";import{o as ht}from"./insights-search-DghCbEnk.js";import{a as gt,c as _t,i as vt,l as yt,n as bt,o as xt,r as St,s as Ct,u as wt}from"./uuidv7-zXMtwR9Q.js";import{a as Tt,i as Et,l as Dt,n as Ot,o as kt,r as At,s as jt,t as Mt}from"./alert-dialog-BqYScr9y.js";import{t as Nt}from"./PlatformIcon-BBWQlWm9.js";import{a as Pt,i as Ft,n as It,o as Lt,r as Rt,s as zt,t as Bt}from"./dialog-CNUPxNxH.js";import{a as Vt,c as Ht,i as Ut,n as Wt,r as Gt,t as Kt}from"./field-D-2-mnNh.js";import{_ as qt,a as Jt,c as Yt,g as Xt,h as Zt,i as Qt,m as $t,n as en,o as tn,p as nn,r as rn,s as an,t as on,v as sn,y as cn}from"./api-P2g8dCNg.js";import{a as ln,i as J,n as un,o as dn,r as Y,t as fn}from"./table-Bpy3SvSo.js";import{i as pn,n as mn,t as hn}from"./valueToPercent-BLwGy_xK.js";import{t as gn}from"./HashValueDisplay-6lNRxDJX.js";import{t as _n}from"./RolloutPercentageBadge-Cxogpi8F.js";var vn=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),yn=O(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),bn=O(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),xn=O(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Sn=O(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Cn=O(`tags`,[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]),wn=y();function Tn(){return v}function En(){return!1}function Dn(){return!0}function On(){return(0,wn.useSyncExternalStore)(Tn,En,Dn)}var X=le(A(),1),Z=S(),kn={production:`bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20`,dev:`bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20`,staging:`bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20`};function An({channel:e,className:t}){return(0,Z.jsx)(K,{variant:`outline`,className:p(kn[e.toLowerCase()]||`bg-gray-500/10 text-gray-700 dark:text-gray-400 border-gray-500/20`,t),children:e})}function jn({enabled:e,className:t,falseIcon:n=`x`,colorMode:r=`semantic`}){let i=r===`inherit`?`text-current`:void 0;return e?(0,Z.jsx)(z,{className:p(`h-4 w-4`,i??`text-green-600 dark:text-green-400`,t)}):n===`minus`?(0,Z.jsx)(xn,{className:p(`h-4 w-4`,i??`text-muted-foreground`,t)}):(0,Z.jsx)(me,{className:p(`h-4 w-4`,i??`text-red-600 dark:text-red-400`,t)})}function Mn({panelId:t,bundle:n,bundles:r,loading:a,onDetailClick:o}){let s=D();return(0,Z.jsx)(`div`,{"aria-live":`polite`,className:`border-t bg-muted/10 p-3 sm:p-4`,id:t,children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,children:`Advanced artifact diagnostics`}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 text-sm sm:items-center`,children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`Base artifact ID`}),(0,Z.jsx)(pn,{bundleId:n.id,fullOnMobile:!0,maxLength:18})]}),(0,Z.jsxs)(K,{variant:`outline`,children:[r.length,` `,r.length===1?`patch`:`patches`]})]}),a?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(e,{className:`h-10 w-full`}),(0,Z.jsx)(e,{className:`h-10 w-full`})]}):r.length>0?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`text-xs font-semibold uppercase text-muted-foreground/70`,children:`Patch artifacts from this base`}),s?(0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,children:r.map(e=>(0,Z.jsx)(`div`,{className:`rounded-md border bg-background p-3`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Target artifact ID`}),(0,Z.jsx)(pn,{bundleId:e.id,fullOnMobile:!0,maxLength:18})]}),(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Relation`}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-1 text-sm`,children:[(0,Z.jsx)(pn,{bundleId:n.id,fullOnMobile:!0,maxLength:12}),(0,Z.jsx)(I,{className:`size-4 rotate-90 text-muted-foreground`}),(0,Z.jsx)(pn,{bundleId:e.id,fullOnMobile:!0,maxLength:12})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`space-y-1`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Artifact`}),(0,Z.jsx)(K,{variant:`secondary`,children:`bsdiff`})]}),(0,Z.jsxs)(`div`,{className:`space-y-1 text-right`,children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-medium uppercase text-muted-foreground/70`,children:`Created`}),(0,Z.jsx)(`div`,{className:`text-xs tabular-nums text-foreground`,children:(0,Z.jsx)(ke,{uuid:e.id})})]})]}),(0,Z.jsx)(i,{className:`w-full`,onClick:()=>o(e),size:`sm`,type:`button`,variant:`outline`,children:`Detail`})]})},e.id))}):(0,Z.jsx)(`div`,{className:`overflow-x-auto rounded-md border bg-background`,children:(0,Z.jsxs)(fn,{className:`min-w-max`,children:[(0,Z.jsx)(ln,{children:(0,Z.jsxs)(dn,{className:`hover:bg-transparent`,children:[(0,Z.jsx)(J,{children:`Target artifact ID`}),(0,Z.jsx)(J,{children:`Relation`}),(0,Z.jsx)(J,{children:`Artifact`}),(0,Z.jsx)(J,{children:`Created`}),(0,Z.jsx)(J,{className:`w-24 text-right`,children:`Detail`})]})}),(0,Z.jsx)(un,{children:r.map(e=>(0,Z.jsxs)(dn,{children:[(0,Z.jsx)(Y,{children:(0,Z.jsx)(pn,{bundleId:e.id,fullOnMobile:!0,maxLength:18})}),(0,Z.jsx)(Y,{children:(0,Z.jsxs)(`div`,{className:`flex min-w-[280px] flex-col items-start gap-1 sm:flex-row sm:items-center sm:gap-2`,children:[(0,Z.jsx)(pn,{bundleId:n.id,fullOnMobile:!0,maxLength:12}),(0,Z.jsx)(I,{className:`size-4 shrink-0 rotate-90 text-muted-foreground sm:rotate-0`}),(0,Z.jsx)(pn,{bundleId:e.id,fullOnMobile:!0,maxLength:12})]})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(K,{variant:`secondary`,children:`bsdiff`})}),(0,Z.jsx)(Y,{className:`tabular-nums`,children:(0,Z.jsx)(ke,{uuid:e.id})}),(0,Z.jsx)(Y,{className:`text-right`,children:(0,Z.jsx)(i,{onClick:()=>o(e),size:`sm`,type:`button`,variant:`outline`,children:`Detail`})})]},e.id))})]})})]}):(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`text-xs font-semibold uppercase text-muted-foreground/70`,children:`Patch artifacts from this base`}),(0,Z.jsx)(`div`,{className:`rounded-md border bg-background p-3 text-sm text-muted-foreground`,children:`No direct patch artifacts.`})]})]})})}function Nn({open:e,onOpenChange:t}){let[n,r]=(0,X.useState)(``),[a,o]=(0,X.useState)(null),s=it(a),{data:c=[],isPending:l}=Qt(),u=tn(),d=an(),f=n.trim(),p=async e=>{if(e.preventDefault(),!(!f||u.isPending))try{let e=await u.mutateAsync({name:f});r(``),e.inserted?q.success(`Channel ${e.row.name} created`):q.info(`Channel ${e.row.name} already exists`)}catch(e){q.error(`Failed to create channel`),console.error(e)}},m=async()=>{if(!(!a||d.isPending))try{let e=await d.mutateAsync({id:a.id});e.deleted?q.success(`Channel ${a.name} deleted`):e.reason===`not_empty`?q.error(`Channel ${a.name} is still in use and cannot be deleted`):q.error(`Channel ${a.name} no longer exists`),o(null)}catch(e){q.error(`Failed to delete channel`),console.error(e)}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Bt,{open:e,onOpenChange:t,children:(0,Z.jsxs)(It,{className:`sm:max-w-lg`,children:[(0,Z.jsxs)(Pt,{children:[(0,Z.jsxs)(Lt,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Sn,{className:`size-4 text-muted-foreground`}),`Channels`]}),(0,Z.jsx)(Rt,{children:`Create deployment channels and remove them when no bundle uses them. Empty channels remain available until you delete them.`})]}),(0,Z.jsx)(`form`,{onSubmit:p,children:(0,Z.jsx)(Ut,{className:`gap-2`,children:(0,Z.jsxs)(Kt,{orientation:`horizontal`,children:[(0,Z.jsx)(Vt,{htmlFor:`channel-name`,className:`sr-only`,children:`Channel name`}),(0,Z.jsx)(te,{id:`channel-name`,value:n,onChange:e=>r(e.target.value),placeholder:`Channel name`,autoComplete:`off`,disabled:u.isPending}),(0,Z.jsxs)(i,{type:`submit`,disabled:!f||u.isPending,children:[u.isPending?(0,Z.jsx)(Ye,{"data-icon":`inline-start`,className:`animate-spin`}):(0,Z.jsx)(Xe,{"data-icon":`inline-start`}),`Create`]})]})})}),(0,Z.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-lg border`,children:l?(0,Z.jsxs)(`div`,{className:`flex h-20 items-center justify-center text-muted-foreground`,children:[(0,Z.jsx)(Ye,{className:`mr-2 size-3.5 animate-spin`}),`Loading channels`]}):c.length===0?(0,Z.jsx)(`div`,{className:`flex h-20 items-center justify-center text-muted-foreground`,children:`No channels yet`}):(0,Z.jsx)(`ul`,{className:`divide-y`,children:c.map(e=>(0,Z.jsxs)(`li`,{className:`flex min-h-12 items-center gap-3 px-3 py-2`,children:[(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`p`,{className:`truncate text-xs font-medium`,children:e.name}),(0,Z.jsx)(`p`,{className:`truncate font-mono text-[10px] text-muted-foreground`,children:e.id})]}),(0,Z.jsx)(i,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Delete ${e.name}`,title:`Delete ${e.name}`,disabled:d.isPending,onClick:()=>o(e),className:`text-muted-foreground hover:text-destructive`,children:(0,Z.jsx)(rt,{"data-icon":`inline-start`})})]},e.id))})})]})}),(0,Z.jsx)(Mt,{open:a!==null,onOpenChange:e=>{!e&&!d.isPending&&o(null)},children:(0,Z.jsxs)(Et,{children:[(0,Z.jsxs)(jt,{children:[(0,Z.jsxs)(Dt,{children:[`Delete `,s?.name,`?`]}),(0,Z.jsx)(Tt,{children:`Only empty channels can be removed. The server checks this when you delete it, and the channel can be created again later with a new ID.`})]}),(0,Z.jsxs)(kt,{children:[(0,Z.jsx)(At,{disabled:d.isPending,children:`Cancel`}),(0,Z.jsx)(Ot,{variant:`destructive`,disabled:d.isPending,onClick:e=>{e.preventDefault(),m()},children:d.isPending?`Deleting...`:`Delete channel`})]})]})})]})}var Pn=`[a-zA-Z0-9-]`,Fn=String.raw`0|[1-9]\d*`,In=String.raw`\d+`,Ln=String.raw`\d*[a-zA-Z-]${Pn}*`,Rn=String.raw`(${Fn})\.(${Fn})\.(${Fn})`,zn=String.raw`(${In})\.(${In})\.(${In})`,Bn=`(?:${Ln}|${Fn})`,Vn=`(?:${Ln}|${In})`,Hn=String.raw`(?:-(${Bn}(?:\.${Bn})*))`,Un=String.raw`(?:-?(${Vn}(?:\.${Vn})*))`,Wn=`${Pn}+`,Gn=String.raw`(?:\+(${Wn}(?:\.${Wn})*))`,Kn=`v?${Rn}${Hn}?${Gn}?`,qn=String.raw`[v=\s]*${zn}${Un}?${Gn}?`,Jn=`((?:<|>)?=?)`,Yn=String.raw`${Fn}|x|X|\*`,Xn=String.raw`${In}|x|X|\*`,Zn=String.raw`[v=\s]*(${Yn})(?:\.(${Yn})(?:\.(${Yn})(?:${Hn})?${Gn}?)?)?`,Qn=String.raw`[v=\s]*(${Xn})(?:\.(${Xn})(?:\.(${Xn})(?:${Un})?${Gn}?)?)?`,$n=`(?:~>?)`,er=String.raw`(?:\^)`,tr=String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;String.raw`${tr}(?:$|[^\d])`,String.raw`${tr}(?:${Hn})?(?:${Gn})?(?:$|[^\d])`;function nr(e){let t=[[String.raw`\s`,1],[String.raw`\d`,256],[Pn,250]];for(let[n,r]of t)e=e.split(`${n}*`).join(`${n}{0,${r}}`).split(`${n}+`).join(`${n}{1,${r}}`);return e}function Q(e,t){return new RegExp(nr(e),t)}var rr=Q(`^${Kn}$`),ir=Q(`^${qn}$`),ar=/^\d+$/;function or(e){let t=`${e.major}.${e.minor}.${e.patch}`;return e.prerelease?.length?`${t}-${e.prerelease.join(`.`)}`:t}function sr(e,t={}){if(typeof e!=`string`)return e;if(e.length>256)throw TypeError(`Version exceeds the maximum length of 256 characters`);let n=e.trim().match(t.loose?ir:rr);if(!n)throw TypeError(`Invalid version syntax: ${e}`);let r=Number(n[1]),i=Number(n[2]),a=Number(n[3]);if(r>2**53-1||r<0)throw TypeError(`Invalid major version: ${n[1]}`);if(i>2**53-1||i<0)throw TypeError(`Invalid minor version: ${n[2]}`);if(a>2**53-1||a<0)throw TypeError(`Invalid patch version: ${n[3]}`);let o=n[4]?n[4].split(`.`).map(e=>{if(ar.test(e)){let t=Number(e);if(t>=0&&t<2**53-1)return t}return e}):void 0;return{build:n[5]?.split(`.`),major:r,minor:i,patch:a,prerelease:o}}var cr=Q(String.raw`^${Jn}\s*(${Kn})$|^$`),lr=Q(String.raw`^${Jn}\s*(${qn})$|^$`);function ur(e){return e.version?`${e.operator}${or(e.version)}`:``}function dr(e,t={}){if(typeof e!=`string`)return e;let n=e.trim().replaceAll(/\s+/g,` `),r=n.match(t.loose?lr:cr);if(!r)throw TypeError(`Invalid comparator: ${n}`);let i=r[1]===`=`?``:r[1]||``,a=r[2]?sr(r[2],t):null;return{operator:i,options:t,value:a?`${i}${or(a)}`:``,version:a}}function fr(e){return e.sets.map(e=>e.map(ur).join(` `)).join(`||`)}var pr=new RegExp(Gn,`g`),mr=Q(Gn),hr=Q(String.raw`^\s*(${Zn})\s+-\s+(${Zn})\s*$`),gr=Q(String.raw`^\s*(${Qn})\s+-\s+(${Qn})\s*$`),_r=Q(String.raw`(\s*)${Jn}\s*(${qn}|${Zn})`,`g`),vr=Q(String.raw`(\s*)${$n}\s+`,`g`),yr=Q(String.raw`(\s*)${er}\s+`,`g`),br=Q(`^${$n}${Zn}$`),xr=Q(`^${$n}${Qn}$`),Sr=Q(`^${er}${Zn}$`),Cr=Q(`^${er}${Qn}$`),wr=Q(String.raw`^${Jn}\s*${Zn}$`),Tr=Q(String.raw`^${Jn}\s*${Qn}$`),Er=Q(String.raw`(<|>)?=?\s*\*`),Dr=/^\s*>=\s*0\.0\.0\s*$/,Or=/^\s*>=\s*0\.0\.0-0\s*$/,kr=Q(String.raw`^${Jn}\s*(${qn})$|^$`);function $(e){return!e||String(e).toLowerCase()===`x`||String(e)===`*`}function Ar(e,t,n){return $(e)&&!$(t)||$(t)&&!!n&&!$(n)}function jr(e,t){let n=t.loose?xr:br,r=t.includePrerelease?`-0`:``;return e.replace(n,(e,t,n,i,a)=>$(t)?``:$(n)?`>=${t}.0.0${r} <${Number(t)+1}.0.0-0`:$(i)?`>=${t}.${n}.0${r} <${t}.${Number(n)+1}.0-0`:a?`>=${t}.${n}.${i}-${a} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${i} <${t}.${Number(n)+1}.0-0`)}function Mr(e,t){return e.trim().split(/\s+/).map(e=>jr(e,t)).join(` `)}function Nr(e,t){let n=t.loose?Cr:Sr,r=t.includePrerelease?`-0`:``;return e.replace(n,(e,t,n,i,a)=>$(t)?``:$(n)?`>=${t}.0.0${r} <${Number(t)+1}.0.0-0`:$(i)?t===`0`?`>=${t}.${n}.0${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0${r} <${Number(t)+1}.0.0-0`:a?t===`0`?n===`0`?`>=${t}.${n}.${i}-${a} <${t}.${n}.${Number(i)+1}-0`:`>=${t}.${n}.${i}-${a} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${i}-${a} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${i} <${t}.${n}.${Number(i)+1}-0`:`>=${t}.${n}.${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${i} <${Number(t)+1}.0.0-0`)}function Pr(e,t){return e.trim().split(/\s+/).map(e=>Nr(e,t)).join(` `)}function Fr(e,t){let n=t.loose?Tr:wr;return e.trim().replace(n,(n,r,i,a,o)=>{let s=r,c=i,l=a,u=o;if(Ar(String(c),l===void 0?void 0:String(l),u===void 0?void 0:String(u)))return e;let d=$(c),f=d||$(l),p=f||$(u);if(s===`=`&&p&&(s=``),d)return s===`>`||s===`<`?`<0.0.0-0`:`*`;let m=t.includePrerelease?`-0`:``;return s&&p?(f&&(l=0),u=0,s===`>`?(s=`>=`,f?(c=Number(c)+1,l=0):l=Number(l)+1):s===`<=`&&(s=`<`,f?c=Number(c)+1:l=Number(l)+1),s===`<`&&(m=`-0`),`${s}${c}.${l}.${u}${m}`):f?`>=${c}.0.0${m} <${Number(c)+1}.0.0-0`:p?`>=${c}.${l}.0${m} <${c}.${Number(l)+1}.0-0`:n})}function Ir(e,t){return e.split(/\s+/).map(e=>Fr(e,t)).join(` `)}function Lr(e,t){let n=t.loose?gr:hr;return e.replace(n,(e,n,r,i,a,o,s,c,l,u,d,f)=>{let p=n,m=c;return p=$(r)?``:$(i)?`>=${r}.0.0${t.includePrerelease?`-0`:``}`:$(a)?`>=${r}.${i}.0${t.includePrerelease?`-0`:``}`:o?`>=${p}`:`>=${p}${t.includePrerelease?`-0`:``}`,m=$(l)?``:$(u)?`<${Number(l)+1}.0.0-0`:$(d)?`<${l}.${Number(u)+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:t.includePrerelease?`<${l}.${u}.${Number(d)+1}-0`:`<=${m}`,`${p} ${m}`.trim()})}function Rr(e,t){return Ir(Mr(Pr(e.replace(mr,``),t),t),t).trim().replace(Er,``)}function zr(e,t){let n=Lr(e.replace(pr,``),t).replace(_r,`$1$2$3`).replace(vr,`$1~`).replace(yr,`$1^`).split(` `).map(e=>Rr(e,t)).join(` `).split(/\s+/).map(e=>e.trim().replace(t.includePrerelease?Or:Dr,``));t.loose&&(n=n.filter(e=>kr.test(e)));let r=new Map;for(let e of n.map(e=>dr(e,t))){if(e.value===`<0.0.0-0`)return[e];r.set(e.value,e)}return r.size>1&&r.delete(``),[...r.values()]}function Br(e,t={}){if(typeof e!=`string`)return e;let n={...t},r=e.trim().replaceAll(/\s+/g,` `),i=r.split(`||`).map(e=>zr(e.trim(),n)).filter(e=>e.length);if(!i.length)throw TypeError(`Range contains no valid comparator sets: ${r}`);if(i.length>1){let e=i[0];if(i=i.filter(e=>e[0]?.value!==`<0.0.0-0`),!i.length)i=[e];else if(i.length>1){let e=i.find(e=>e.length===1&&e[0]?.value===``);e&&(i=[e])}}return{options:n,sets:i}}function Vr(e,t={}){try{return Br(e,t)}catch{return null}}function Hr(e,t={}){let n=Vr(e,t);return n?fr(n)||`*`:null}function Ur({label:e,value:t}){return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 sm:flex-row sm:items-start sm:justify-between sm:gap-4`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,Z.jsx)(`dd`,{className:`min-w-0 text-left text-sm sm:text-right`,children:t})]})}function Wr({bundle:e,release:t}){let{data:n,isFetched:r}=Jt(),i=e?Ct(e):null,a=e?xt(e):null,o=e?.gitCommitHash&&r?Oe(n?.console.gitUrl,e.gitCommitHash):null,s=t.strategy===`APP_VERSION`?t.target_app_version:t.fingerprint_hash;return s||e?.gitCommitHash||e?.manifestFileHash||a||i?(0,Z.jsxs)(ft,{children:[(0,Z.jsx)(mt,{className:`p-4 pb-3`,children:(0,Z.jsx)(ct,{className:`text-sm font-medium`,children:`Metadata`})}),(0,Z.jsx)(pt,{className:`px-4 pb-4`,children:(0,Z.jsxs)(`dl`,{className:`flex flex-col gap-3 text-sm`,children:[(0,Z.jsx)(Ur,{label:t.strategy===`APP_VERSION`?`Target app version`:`Fingerprint target`,value:(0,Z.jsx)(`span`,{className:`break-all font-mono text-xs`,translate:`no`,children:s??`—`})}),e?.gitCommitHash?(0,Z.jsx)(Ur,{label:`Git commit`,value:(0,Z.jsxs)(`div`,{className:`flex items-center justify-start gap-1 sm:justify-end`,children:[(0,Z.jsx)(gn,{className:o?`text-primary`:void 0,maxLength:12,value:e.gitCommitHash}),o?(0,Z.jsx)(`a`,{"aria-label":`Open git commit`,className:`shrink-0 text-primary hover:underline`,href:o,rel:`noopener noreferrer`,target:`_blank`,children:(0,Z.jsx)(vn,{"aria-hidden":`true`})}):null]})}):null,e?.manifestFileHash?(0,Z.jsx)(Ur,{label:`Manifest hash`,value:(0,Z.jsx)(gn,{maxLength:16,value:e.manifestFileHash})}):null,a?(0,Z.jsx)(Ur,{label:`Base hash`,value:(0,Z.jsx)(gn,{maxLength:16,value:a})}):null,i?(0,Z.jsx)(Ur,{label:`Patch hash`,value:(0,Z.jsx)(gn,{maxLength:16,value:i})}):null]})})]}):null}var Gr=Array.from({length:St},(e,t)=>t+1);function Kr({releaseId:e,rolloutCohortCount:t,targetCohorts:n}){let r=wt(t),a=n??[],o=a.length>0,s=r>0&&r<1e3,c=r===St,l=D(),u=c?Gr:s?Gr.filter(t=>vt(e,t)<r):[],d=(r/10).toFixed(1),f=c?St:u.length,p=St-f,m=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,Z.jsx)(ft,{children:(0,Z.jsxs)(mt,{className:`p-4`,children:[(0,Z.jsx)(st,{children:`Selected cohorts`}),(0,Z.jsx)(ct,{className:`font-mono text-2xl tabular-nums`,children:f})]})}),(0,Z.jsx)(ft,{children:(0,Z.jsxs)(mt,{className:`p-4`,children:[(0,Z.jsx)(st,{children:`Excluded cohorts`}),(0,Z.jsx)(ct,{className:`font-mono text-2xl tabular-nums`,children:p})]})})]}),o?(0,Z.jsxs)(ft,{children:[(0,Z.jsxs)(mt,{className:`p-4 pb-3`,children:[(0,Z.jsx)(ct,{className:`text-sm`,children:`Additional cohorts`}),(0,Z.jsx)(st,{children:`Always included in addition to the percentage rollout.`})]}),(0,Z.jsx)(pt,{className:`p-4 pt-0`,children:(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2 rounded-lg border bg-muted/20 p-3`,children:a.map(e=>(0,Z.jsx)(K,{className:`max-w-full font-mono`,variant:`secondary`,children:(0,Z.jsx)(`span`,{className:`truncate`,children:e})},e))})})]}):null,(0,Z.jsxs)(ft,{children:[(0,Z.jsx)(mt,{className:`p-4 pb-3`,children:(0,Z.jsx)(ct,{className:`text-sm`,children:`Numeric cohorts`})}),(0,Z.jsx)(pt,{className:`p-4 pt-0`,children:(0,Z.jsx)(`div`,{className:`max-h-[50vh] overflow-y-auto overscroll-contain rounded-lg border bg-muted/20 p-3 sm:max-h-[45vh]`,children:u.length>0?(0,Z.jsx)(`div`,{"aria-label":`Included numeric cohorts`,className:`grid grid-cols-3 gap-2 sm:grid-cols-6 lg:grid-cols-8`,role:`list`,children:u.map(e=>(0,Z.jsx)(K,{className:`justify-center font-mono tabular-nums`,role:`listitem`,variant:`outline`,children:e},e))}):(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No numeric cohorts are included.`})})})]})]});return(0,Z.jsxs)(Bt,{children:[(0,Z.jsxs)(zt,{render:(0,Z.jsx)(i,{size:`sm`,type:`button`,variant:`outline`}),children:[(0,Z.jsx)(Je,{"data-icon":`inline-start`}),`Preview cohorts`]}),(0,Z.jsx)(It,{className:l?`top-0 left-0 h-dvh max-w-none translate-x-0 translate-y-0 rounded-none border-0 p-0`:`sm:max-w-3xl`,children:l?(0,Z.jsxs)(`div`,{className:`flex h-full flex-col overflow-hidden`,children:[(0,Z.jsxs)(Pt,{className:`shrink-0 border-b border-border/70 px-4 py-4`,children:[(0,Z.jsx)(Lt,{children:`Rolled out cohorts`}),(0,Z.jsxs)(Rt,{children:[d,`% includes `,f,` of`,` `,St,` numeric cohorts.`,o?` Additional cohorts are always included.`:``]})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto overscroll-contain px-4 py-4`,children:m}),(0,Z.jsx)(Ft,{className:`shrink-0 border-t border-border/70 px-4 py-3`,showCloseButton:!0})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Pt,{children:[(0,Z.jsx)(Lt,{children:`Rolled out cohorts`}),(0,Z.jsxs)(Rt,{children:[d,`% includes `,f,` of`,` `,St,` numeric cohorts.`,o?` Additional cohorts are always included.`:``]})]}),m,(0,Z.jsx)(Ft,{showCloseButton:!0})]})})]})}function qr({release:t,channel:n,bundle:r}){let i=t.bundle_id===null?null:{platform:t.platform,channel:n,fingerprintHash:t.fingerprint_hash,targetAppVersion:t.target_app_version},a=i!==null&&Ae(i)!==null,o=Xt(a?i:null);if(!a)return null;let s=o.data;return(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Native build`}),o.isPending?(0,Z.jsx)(e,{className:`h-4 w-40`}):s?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(F,{className:`inline-flex flex-wrap items-center gap-x-1 gap-y-0.5 text-xs text-foreground underline-offset-4 hover:underline`,params:{buildId:s.id},to:`/native-builds/$buildId`,children:[V(s.platform),` `,Me[s.artifact_kind].label,` ·`,` `,(0,Z.jsx)(`span`,{className:`font-mono`,translate:`no`,children:s.min_bundle_id}),(0,Z.jsx)(ye,{"aria-hidden":`true`,className:`size-3`})]}),r?(0,Z.jsx)(K,{variant:`secondary`,children:(r.patches??[]).some(({baseBundleId:e})=>e===s.min_bundle_id)?`Patches from it`:`No patch from it`}):null]}):o.isError?(0,Z.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`Couldn't load the scope's native build.`,` `,(0,Z.jsx)(`button`,{className:`underline underline-offset-4`,onClick:()=>void o.refetch(),type:`button`,children:`Retry`})]}):(0,Z.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`None tracked for this scope ·`,` `,(0,Z.jsx)(F,{className:`underline-offset-4 hover:text-foreground hover:underline`,search:{channel:n},to:`/native-builds`,children:`This channel's builds`})]})]})}function Jr(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Yr(e,t){return e-t}function Xr(e,t,n){let r=e.slice();return r[t]=n,r.sort(Yr)}function Zr(e,t,n,r,i,a){let o=e;return o=U(o,n,r),i&&(o=Xr(a,t,U(o,a[t-1]||-1/0,a[t+1]||1/0))),o}function Qr(e,t,n){if(!Array.isArray(e))return!0;let r=e.reduce((e,t,n,r)=>(n===r.length-1||e.push(Math.abs(t-r[n+1])),e),[]);return Math.min(...r)>=t*n}var $r={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...Le},ei=X.createContext(void 0);function ti(){let e=X.useContext(ei);if(e===void 0)throw Error(l(62));return e}function ni(e){return`key`in e?k:re}function ri(e,t){return typeof e==`number`&&typeof t==`number`?e===t:Array.isArray(e)&&Array.isArray(t)?Jr(e,t):!1}var ii=X.forwardRef(function(e,t){let{"aria-labelledby":r,className:i,defaultValue:o,disabled:s=!1,id:c,format:l,largeStep:u=10,locale:d,render:f,max:p=100,min:m=0,minStepsBetweenValues:h=0,form:g,name:_,onValueChange:v,onValueCommitted:y,orientation:b=`horizontal`,step:x=1,thumbCollisionBehavior:S=`push`,thumbAlignment:T=`center`,value:te,style:ne,...re}=e,ie=j(c),oe=Ve(ie),se=E(v),ce=E(y),{clearErrors:D}=Ue(),{state:le,disabled:O,name:k,setTouched:ue,setDirty:de,validityData:fe,shouldValidateOnChange:me,validation:A}=Pe(),{labelId:he}=Ie(),[ge,_e]=X.useState(),N=r??He(he,ge),P=O||s,F=k??_,[I,ye]=Te({controlled:te,default:o??m,name:`Slider`}),be=X.useRef(null),xe=X.useRef(null),Se=X.useRef([]),L=X.useRef(null),Ce=X.useRef(null),we=X.useRef(-1),R=X.useRef(null),z=X.useRef(null),B=X.useRef(`none`),Ee=pe(l),[V,Oe]=X.useState(-1),[ke,Ae]=X.useState(-1),[je,Me]=X.useState(!1),[Ne,Le]=X.useState(()=>new Map),[Re,ze]=X.useState([void 0,void 0]),Be=E(e=>{Oe(e),e!==-1&&Ae(e)});Fe(xe,ie,I),M(I,()=>{D(F),me()?A.commit(I):A.commit(I,!0);let e=fe.initialValue,t;t=Array.isArray(I)&&Array.isArray(e)?!Jr(I,e):I!==e,de(t)});let H=E(e=>{e&&(xe.current=e)}),W=Array.isArray(I),G=X.useMemo(()=>W?I.slice().sort(Yr):[U(I,m,p)],[p,m,W,I]),We=E((e,t)=>{if(Number.isNaN(e)||ri(e,I))return;let n=t??ee(`none`,void 0,void 0,{activeThumbIndex:-1});B.current=n.reason;let r=n.event,i=new(r.constructor??Event)(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:e,name:F}}),n.event=i,z.current=e,se(e,n),!n.isCanceled&&ye(e)}),Ge=E((e,t,n)=>{let r=Zr(e,t,m,p,W,G);if(Qr(r,x,h)){let e=ni(n);We(r,ee(e,n.nativeEvent,void 0,{activeThumbIndex:t})),ue(!0),ce(z.current??r,w(e,n.nativeEvent))}});C(()=>{let e=ve(a(be.current));P&&ae(be.current,e)&&e.blur()},[P]),P&&V!==-1&&Be(-1);let Ke=X.useMemo(()=>({...le,activeThumbIndex:V,disabled:P,dragging:je,orientation:b,max:p,min:m,minStepsBetweenValues:h,step:x,values:G}),[le,V,P,je,p,m,h,b,x,G]),qe=X.useMemo(()=>({active:V,controlRef:xe,disabled:P,dragging:je,validation:A,formatOptionsRef:Ee,handleInputChange:Ge,indicatorPosition:Re,inset:T!==`center`,labelId:N,rootLabelId:oe,largeStep:u,lastUsedThumbIndex:ke,lastChangedValueRef:z,lastChangeReasonRef:B,form:g,locale:d,max:p,min:m,minStepsBetweenValues:h,name:F,onValueCommitted:ce,orientation:b,pressedInputRef:L,pressedThumbCenterOffsetRef:Ce,pressedThumbIndexRef:we,pressedValuesRef:R,registerFieldControlRef:H,renderBeforeHydration:T===`edge`,setActive:Be,setDragging:Me,setIndicatorPosition:ze,setLabelId:_e,setValue:We,state:Ke,step:x,thumbCollisionBehavior:S,thumbMap:Ne,thumbRefs:Se,values:G}),[V,xe,N,oe,P,je,A,Ee,Ge,Re,u,ke,z,B,g,d,p,m,h,F,ce,b,L,Ce,we,R,H,Be,Me,ze,_e,We,Ke,x,S,T,Ne,Se,G]),Je=n(`div`,e,{state:Ke,ref:[t,be],props:[{"aria-labelledby":N,id:ie,role:`group`},A.getValidationProps,re],stateAttributesMapping:$r});return(0,Z.jsx)(ei.Provider,{value:qe,children:(0,Z.jsx)(De,{elementsRef:Se,onMapChange:Le,children:Je})})});function ai(e){let t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function oi(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function si(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(oi(t),oi(n))))}function ci({values:e,index:t,nextValue:n,min:r,max:i,step:a,minStepsBetweenValues:o,initialValues:s}){if(e.length===0)return[];let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=U(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e]??c[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=U(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e]??c[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=U(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function li({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;switch(e){case`swap`:{let e=u[i],t=1e-7,n=u.slice(),r=n[i-1],p=n[i+1],m=U(a,r==null?o:r+f,p==null?s:p-f),h=Number(m.toFixed(12));n[i]=h;let g=a>e,_=a<e,v=g&&p!=null&&a>=p-t,y=_&&r!=null&&a<=r+t;if(!v&&!y)return{value:n,thumbIndex:i,didSwap:!1};let b=v?i+1:i-1,x=n.map((e,t)=>t===i?h:d[t]??u[t]),S=a;S=v?Math.max(a,n[b]):Math.min(a,n[b]);let C=ci({values:n,index:b,nextValue:S,min:o,max:s,step:c,minStepsBetweenValues:l,initialValues:x}),w=v?b-1:b+1;if(w>=0&&w<C.length){let e=C[w-1],t=C[w+1],n=e==null?o:e+f;n=Math.max(n,o+w*f);let r=t==null?s:t-f;r=Math.min(r,s-(C.length-1-w)*f);let i=U(h,n,r);C[w]=Number(i.toFixed(12))}return{value:C,thumbIndex:b,didSwap:!0}}case`push`:return{value:ci({values:u,index:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}),thumbIndex:i,didSwap:!1};default:{let e=u.slice(),t=e[i-1],n=e[i+1],r=U(a,t==null?o:t+f,n==null?s:n-f);return e[i]=Number(r.toFixed(12)),{value:e,thumbIndex:i,didSwap:!1}}}}var ui=2;function di(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function fi(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var pi=X.forwardRef(function(e,r){let{render:i,className:o,style:s,...c}=e,{disabled:l,dragging:f,inset:p,lastChangedValueRef:m,lastChangeReasonRef:h,max:g,min:_,minStepsBetweenValues:v,onValueCommitted:y,orientation:b,pressedInputRef:x,pressedThumbCenterOffsetRef:S,pressedThumbIndexRef:C,pressedValuesRef:T,registerFieldControlRef:te,renderBeforeHydration:ne,setActive:re,setDragging:ie,setValue:se,state:ce,step:D,thumbCollisionBehavior:le,thumbRefs:O,values:k}=ti(),fe=ue(),me=k.length>1,A=b===`vertical`,j=X.useRef(null),ge=X.useRef(null),_e=E(e=>{e&&ge.current==null&&(ge.current=t(e).getComputedStyle(e))}),M=X.useRef(null),P=X.useRef(0),F=X.useRef(0),I=pe(k);function ye(e){C.current!==e&&(C.current=e);let t=O.current[e];if(!t){S.current=null,x.current=null;return}x.current=t.querySelector(`input[type="range"]`)}function be(e){let t=j.current;if(!t)return null;let{width:n,height:r,bottom:i,left:a,right:o}=t.getBoundingClientRect(),s=di(ge.current,A),c=F.current,l=(A?r:n)-s.start-s.end-c*2,u=S.current??0,d=e.x-u,f=e.y-u,p=U(((A?i-f-s.end:(fe===`rtl`?o-d:d-a)-s.start)-c)/l,0,1),m=(g-_)*p+_;if(m=si(m,D,_),m=U(m,_,g),!me)return{value:m,thumbIndex:0,didSwap:!1};let h=C.current;if(h<0)return null;let y=li({behavior:le,values:k,currentValues:I.current??k,initialValues:T.current,pressedIndex:h,nextValue:m,min:_,max:g,step:D,minStepsBetweenValues:v});return le===`swap`&&y.didSwap?ye(y.thumbIndex):C.current=y.thumbIndex,y}function xe(e){T.current=me?k.slice():null,I.current=k;let t=C.current,n=t;if(t>-1&&t<k.length){if(k[t]===g){let e=t;for(;e>0&&k[e-1]===g;)--e;n=e}}else{let t=A?`y`:`x`,r;n=-1;for(let i=0;i<O.current.length;i+=1){let a=O.current[i];if(oe(a)){let o=ai(a),s=Math.abs(e[t]-o[t]);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&ye(n),p){let e=O.current[n];oe(e)&&(F.current=e.getBoundingClientRect()[A?`height`:`width`]/2)}}function Se(e){let t=O.current?.[e]?.querySelector(`input[type="range"]`);t&&t.focus({preventScroll:!0,focusVisible:!1})}let L=E(e=>{let t=fi(e,M);if(t==null)return;if(P.current+=1,e.type===`pointermove`&&e.buttons===0){Ce(e);return}let n=be(t);n!=null&&Qr(n.value,D,v)&&(!f&&P.current>ui&&ie(!0),se(n.value,ee(he,e,void 0,{activeThumbIndex:n.thumbIndex})),I.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&Se(n.thumbIndex))});function Ce(e){re(-1),ie(!1),x.current=null,S.current=null;let t=fi(e,M),n=t==null?null:be(t);if(n!=null){let t=h.current;y(m.current??n.value,w(t,e))}`pointerType`in e&&j.current?.hasPointerCapture(e.pointerId)&&j.current?.releasePointerCapture(e.pointerId),C.current=-1,M.current=null,T.current=null,R()}let we=E(e=>{if(l)return;let t=e.changedTouches[0];t!=null&&(M.current=t.identifier);let n=fi(e,M);if(n!=null){xe(n);let t=be(n);if(t==null)return;Se(t.thumbIndex),se(t.value,ee(de,e,void 0,{activeThumbIndex:t.thumbIndex})),I.current=Array.isArray(t.value)?t.value:[t.value],t.didSwap&&Se(t.thumbIndex)}P.current=0;let r=a(j.current);r.addEventListener(`touchmove`,L,{passive:!0}),r.addEventListener(`touchend`,Ce,{passive:!0})}),R=E(()=>{let e=a(j.current);e.removeEventListener(`pointermove`,L),e.removeEventListener(`pointerup`,Ce),e.removeEventListener(`touchmove`,L),e.removeEventListener(`touchend`,Ce),T.current=null}),z=d();return X.useEffect(()=>{let e=j.current;if(!e)return()=>R();let t=u(e,`touchstart`,we,{passive:!0});return()=>{t(),z.cancel(),R()}},[R,we,j,z]),X.useEffect(()=>{l&&R()},[l,R]),n(`div`,e,{state:ce,ref:[r,te,j,_e],props:[{"data-base-ui-slider-control":ne?``:void 0,onPointerDown(e){let t=j.current,n=N(e.nativeEvent);if(!t||l||e.defaultPrevented||!oe(n)||e.button!==0)return;let r=fi(e,M);if(r!=null){xe(r);let n=be(r);if(n==null)return;ae(O.current[n.thumbIndex],ve(a(t)))?e.preventDefault():z.request(()=>{Se(n.thumbIndex)}),ie(!0),S.current??(se(n.value,ee(de,e.nativeEvent,void 0,{activeThumbIndex:n.thumbIndex})),I.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&Se(n.thumbIndex))}e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),P.current=0;let i=a(j.current);i.addEventListener(`pointermove`,L,{passive:!0}),i.addEventListener(`pointerup`,Ce,{once:!0})}},c],stateAttributesMapping:$r})}),mi=X.forwardRef(function(e,t){let{render:r,className:i,style:a,...o}=e,{state:s}=ti();return n(`div`,e,{state:s,ref:t,props:[{style:{position:`relative`}},o],stateAttributesMapping:$r})}),hi=function(e){return e.index=`data-index`,e.dragging=`data-dragging`,e.orientation=`data-orientation`,e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.focused=`data-focused`,e}({}),gi=new Set([...f,_,o]);function _i(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${mn(e[t],r,n)} start range`:`${mn(e[t],r,n)} end range`:n?mn(e[t],r,n):void 0}function vi(e,t,n,r,i){let a=n===1?e+t:e-t;return U(Number(a.toFixed(Math.max(oi(e),oi(t),oi(r)))),r,i)}var yi=X.forwardRef(function(e,i){let{render:a,children:c,className:l,"aria-describedby":u,"aria-label":d,"aria-labelledby":p,disabled:v=!1,getAriaLabel:y,getAriaValueText:S,id:w,index:ee,inputRef:te,onBlur:ne,onFocus:re,onKeyDown:ie,tabIndex:ae,style:oe,...se}=e,{nonce:ce}=Re(),D=j(w),{active:le,lastUsedThumbIndex:O,controlRef:k,disabled:de,validation:fe,formatOptionsRef:pe,handleInputChange:me,inset:A,labelId:he,largeStep:ge,locale:M,max:N,min:P,minStepsBetweenValues:ve,form:F,name:I,orientation:ye,pressedInputRef:be,pressedThumbCenterOffsetRef:xe,pressedThumbIndexRef:Se,renderBeforeHydration:L,setActive:Ce,setIndicatorPosition:we,state:R,step:z,values:B}=ti(),Te=ue(),De=v||de,V=B.length>1,Oe=ye===`vertical`,ke=Te===`rtl`,{setTouched:Ae,setFocused:je,validationMode:Me}=Pe(),Ne=X.useRef(null),Fe=X.useRef(null),Ie=X.useRef(!1),Le=j(),Be=ze(),Ve=V?Le:Be,{ref:He,index:Ue}=Ee({metadata:X.useMemo(()=>({inputId:Ve}),[Ve])}),H=V?ee??Ue:0,U=H===B.length-1,W=B[H],G=hn(W,P,N),[We,Ge]=X.useState(),Ke=On(),qe=O>=0&&O<B.length?O:-1,Je=E(()=>{let e=k.current,t=Ne.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=Oe?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*G/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;Ge(s),H===0?we(e=>[s,e[1]]):U&&we(e=>[e[0],s])});C(()=>{A&&queueMicrotask(Je)},[Je,A]),C(()=>{A&&Je()},[Je,A,G]),C(()=>{if(!A)return;let e=k.current,n=Ne.current;if(!e||!n)return;let r=t(e).ResizeObserver;if(typeof r!=`function`)return;let i=new r(Je);return i.observe(e),i.observe(n),()=>{i.disconnect()}},[k,Je,A]);let Ye=Oe?`bottom`:`insetInlineStart`,Xe=Oe?`left`:`top`,Ze;V?le===H?Ze=2:qe===H&&(Ze=1):le===H&&(Ze=1);let Qe;Qe=A?{"--position":`${We??0}%`,visibility:L&&Ke||We===void 0?`hidden`:void 0,position:`absolute`,[Ye]:`var(--position)`,[Xe]:`50%`,translate:`${(Oe||!ke?-1:1)*50}% ${(Oe?1:-1)*50}%`,zIndex:Ze}:Number.isFinite(G)?{position:`absolute`,[Ye]:`${G}%`,[Xe]:`50%`,translate:`${(Oe||!ke?-1:1)*50}% ${(Oe?1:-1)*50}%`,zIndex:Ze}:b;let $e;ye===`vertical`&&($e=ke?`vertical-rl`:`vertical-lr`);let et=typeof y==`function`?y(H):d,tt=T({"aria-label":et,"aria-labelledby":p??(et==null?he:void 0),"aria-describedby":u,"aria-orientation":ye,"aria-valuenow":W,"aria-valuetext":typeof S==`function`?S(mn(W,M,pe.current??void 0),W,H):_i(B,H,pe.current??void 0,M),disabled:De,form:F,id:Ve,max:N,min:P,name:I,onChange(e){me(e.currentTarget.valueAsNumber,H,e)},onFocus(e){let t=Ie.current;Ie.current=!1,Ce(H),je(!0),t&&e.stopPropagation()},onBlur(e){if(Ie.current){e.stopPropagation();return}Ne.current&&(Ce(-1),Ae(!0),je(!1),Me===`onBlur`&&fe.commit(Zr(W,H,P,N,V,B)))},onKeyDown(e){if(!gi.has(e.key))return;f.has(e.key)&&e.stopPropagation();let t=null,n=si(W,z,P);switch(e.key){case s:t=vi(n,e.shiftKey?ge:z,1,P,N);break;case r:t=vi(n,e.shiftKey?ge:z,ke?-1:1,P,N);break;case m:t=vi(n,e.shiftKey?ge:z,-1,P,N);break;case h:t=vi(n,e.shiftKey?ge:z,ke?1:-1,P,N);break;case _:t=vi(n,ge,1,P,N);break;case o:t=vi(n,ge,-1,P,N);break;case`End`:t=N,V&&(t=Number.isFinite(B[H+1])?B[H+1]-z*ve:N);break;case g:t=P,V&&(t=Number.isFinite(B[H-1])?B[H-1]+z*ve:P);break;default:break}if(t!==null){let n=e.currentTarget;_e(n)||(Ie.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),me(t,H,e),e.preventDefault()}},step:z,style:{...b,width:`100%`,height:`100%`,writingMode:$e},tabIndex:ae??void 0,type:`range`,value:W??``},fe.getInputValidationProps),nt=x(Fe,fe.inputRef,te);return n(`div`,e,{state:R,ref:[i,He,Ne],props:[{[hi.index]:H,children:(0,Z.jsxs)(X.Fragment,{children:[c,(0,Z.jsx)(`input`,{ref:nt,...tt,suppressHydrationWarning:!0}),A&&Ke&&L&&U&&(0,Z.jsx)(`script`,{nonce:ce,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();'},suppressHydrationWarning:!0})]}),id:D,onBlur:ne,onFocus:re,onPointerDown(e){if(Se.current=H,Ne.current!=null){let t=ye===`horizontal`?`x`:`y`,n=ai(Ne.current);xe.current=(ye===`horizontal`?e.clientX:e.clientY)-n[t]}Fe.current!=null&&be.current!==Fe.current&&(be.current=Fe.current)},style:Qe,suppressHydrationWarning:L||void 0},se],stateAttributesMapping:$r})});function bi(e,t,n,r,i,a){let o=n===void 0||t&&r===void 0?`hidden`:void 0,s=e?`bottom`:`insetInlineStart`,c=e?`height`:`width`,l={visibility:i&&a?`hidden`:o,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};return l[`--start-position`]=`${n??0}%`,t?(l[`--relative-size`]=`${(r??0)-(n??0)}%`,l[s]=`var(--start-position)`,l[c]=`var(--relative-size)`,l):(l[s]=0,l[c]=`var(--start-position)`,l)}function xi(e,t,n,r){let i=e?`bottom`:`insetInlineStart`,a=e?`height`:`width`,o={position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};if(!t)return o[i]=0,o[a]=`${n}%`,o;let s=r-n;return o[i]=`${n}%`,o[a]=`${s}%`,o}var Si=X.forwardRef(function(e,t){let{render:r,className:i,style:a,...o}=e,{indicatorPosition:s,inset:c,max:l,min:u,orientation:d,renderBeforeHydration:f,state:p,values:m}=ti(),h=On(),g=d===`vertical`,_=m.length>1,v=c?bi(g,_,s[0],s[1],f,h):xi(g,_,hn(m[0],u,l),hn(m[m.length-1],u,l));return n(`div`,e,{state:p,ref:t,props:[{"data-base-ui-slider-indicator":f?``:void 0,style:v,suppressHydrationWarning:f||void 0},o],stateAttributesMapping:$r})});function Ci({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=Array.isArray(n)?n:n===void 0?Array.isArray(t)?t:t===void 0?[r]:[t]:[n];return(0,Z.jsx)(ii,{className:p(`data-horizontal:w-full data-vertical:h-full`,e),"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,thumbAlignment:`edge`,...a,children:(0,Z.jsxs)(pi,{className:`relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col`,children:[(0,Z.jsx)(mi,{"data-slot":`slider-track`,className:`relative grow overflow-hidden rounded-full bg-primary/20 select-none data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5`,children:(0,Z.jsx)(Si,{"data-slot":`slider-range`,className:`bg-primary select-none data-horizontal:h-full data-vertical:w-full`})}),Array.from({length:o.length},(e,t)=>(0,Z.jsx)(yi,{"data-slot":`slider-thumb`,className:`relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow transition-colors select-none after:absolute after:-inset-2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-50`},t))]})})}var wi=[{label:`Move bundle`,value:`move`},{label:`Copy bundle`,value:`copy`}],Ti=e=>({enabled:e.enabled,message:e.message??``,rolloutCohortCount:e.rollout_cohort_count,shouldForceUpdate:e.should_force_update,targetAppVersion:e.target_app_version??``,targetCohorts:[...e.target_cohorts]}),Ei=(e,t)=>({enabled:t.enabled,message:t.message.trim()||null,rolloutCohortCount:t.rolloutCohortCount,shouldForceUpdate:t.shouldForceUpdate,...e.strategy===`APP_VERSION`?{targetAppVersion:t.targetAppVersion.trim()}:{},targetCohorts:t.targetCohorts}),Di=e=>(e/10).toFixed(1),Oi=e=>{let t=e.replace(`,`,`.`),[n=``,...r]=t.split(`.`),i=n.replace(/\D/g,``).slice(0,3),a=r.join(``).replace(/\D/g,``).slice(0,1);return t.includes(`.`)?`${i}.${a}`:i},ki=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?Math.min(1e3,Math.max(0,Math.trunc(t*10))):null};function Ai({value:e,onChange:t}){let[n,r]=(0,X.useState)(Di(e)),[i,a]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{i||r(Di(e))},[i,e]),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(Ci,{"aria-label":`Rollout percentage`,max:1e3,min:0,onValueChange:n=>t(Array.isArray(n)?n[0]??e:n),step:1,value:e}),(0,Z.jsxs)(nt,{className:`w-24 shrink-0`,children:[(0,Z.jsx)(Qe,{"aria-label":`Rollout percentage`,autoComplete:`off`,className:`text-right tabular-nums`,id:`release-rollout-percentage`,inputMode:`decimal`,name:`rolloutPercentage`,onBlur:()=>{let i=ki(n)??e;a(!1),r(Di(i)),t(i)},onChange:e=>{let n=Oi(e.target.value);r(n);let i=ki(n);i!==null&&t(i)},onFocus:()=>a(!0),value:n}),(0,Z.jsx)($e,{align:`inline-end`,children:(0,Z.jsx)(Ze,{children:`%`})})]})]})}function ji({channels:t,onOpenChange:n,onShowScope:r,open:a,releaseId:o}){let s=qt(o),c=s.data,l=rn(c?.bundle_id??``),u=l.data,d=u?gt(u):null,f=Zt(c?.scope_key??``),p=cn(),m=nn(),h=Yt(),g=$t(),[_,v]=(0,X.useState)(null),[y,b]=(0,X.useState)(``),[x,S]=(0,X.useState)(``),[C,w]=(0,X.useState)(!1),[T,ee]=(0,X.useState)(!1),[E,re]=(0,X.useState)(!1),[ae,oe]=(0,X.useState)(``),[D,le]=(0,X.useState)(`move`);(0,X.useEffect)(()=>{v(c?Ti(c):null),S(``)},[c]);let O=c?Ti(c):null,k=_!==null&&O!==null&&JSON.stringify(_)!==JSON.stringify(O),ue=m.isPending||p.isPending||h.isPending||g.isPending,de=()=>{if(!ue){if(k){w(!0);return}n(!1)}},fe=()=>{if(!_)return;let e=yt(y);if(!_t(e)){S(bt);return}v({..._,targetCohorts:Array.from(new Set([..._.targetCohorts,e]))}),b(``),S(``)},pe=async()=>{if(!c||!_)return;let e=_.targetCohorts.map(yt);if(e.some(e=>!_t(e))){S(bt);return}if(c.strategy===`APP_VERSION`&&!Hr(_.targetAppVersion.trim())){S(`Enter a valid target app version range.`);return}let t={expectedRevision:c.revision,patch:Ei(c,{..._,targetCohorts:e}),releaseId:c.id};S(``);try{await m.mutateAsync(t),await p.mutateAsync(t),q.success(`Bundle settings saved`),n(!1)}catch(e){S(e instanceof Error?e.message:`Bundle settings could not be saved.`)}},A=t.find(e=>e.id===c?.channel_id)?.name??c?.channel_id,he=t.filter(e=>e.id!==c?.channel_id),j=he.map(e=>({label:e.name,value:e.name})),_e=ae.trim(),M=D===`copy`,N=_?Hr(_.targetAppVersion.trim()):null,ve=()=>{oe(``),le(`move`)},F=e=>{!e&&g.isPending||(re(e),e||ve())};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ce,{onOpenChange:e=>e?void 0:de(),open:a,children:(0,Z.jsxs)(ne,{className:`min-w-0 overflow-hidden data-[side=right]:w-full sm:max-w-[600px]`,children:[(0,Z.jsxs)(P,{className:`shrink-0 pr-12`,children:[(0,Z.jsx)(ie,{children:`Bundle Detail`}),(0,Z.jsx)(ge,{className:`sr-only`,children:`Edit bundle delivery settings.`}),c?(0,Z.jsxs)(`div`,{className:`mt-1 flex min-w-0 flex-col gap-3 text-sm`,children:[(0,Z.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Nt,{className:`size-4`,platform:c.platform}),(0,Z.jsx)(`span`,{className:`font-medium`,children:c.platform===`ios`?`iOS`:`Android`})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`ID`}),(0,Z.jsxs)(`span`,{className:`min-w-0 basis-full sm:basis-auto`,children:[(0,Z.jsx)(pn,{bundleId:c.id,fullOnMobile:!0,maxLength:18}),c.bundle_id?null:(0,Z.jsx)(`span`,{className:`text-xs text-foreground`,children:`Built-in bundle`})]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Channel`}),(0,Z.jsx)(`span`,{className:`text-xs text-foreground`,translate:`no`,children:A})]}),A?(0,Z.jsx)(qr,{bundle:u,channel:A,release:c}):null,(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:`Platform`}),(0,Z.jsx)(`span`,{className:`text-xs text-foreground`,children:c.platform===`ios`?`iOS`:`Android`})]})]}):(0,Z.jsx)(e,{className:`h-12 w-full`})]}),(0,Z.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:[s.isError?(0,Z.jsxs)(dt,{className:`m-4 sm:m-6`,variant:`destructive`,children:[(0,Z.jsx)(lt,{}),(0,Z.jsx)(ot,{children:`Bundle details could not be loaded`}),(0,Z.jsx)(ut,{children:s.error.message})]}):null,c&&_?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6 px-4 pb-4 sm:px-6 sm:pb-6`,children:[A?(0,Z.jsx)(be,{release:{platform:c.platform,channel:A,releaseId:c.id,builtIn:!c.bundle_id}}):null,(0,Z.jsxs)(`section`,{"aria-labelledby":`delivery-settings-heading`,className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,id:`delivery-settings-heading`,children:`Delivery settings`}),(0,Z.jsxs)(Ut,{className:`gap-6`,children:[(0,Z.jsxs)(Kt,{children:[(0,Z.jsx)(Vt,{htmlFor:`release-message`,children:`Message`}),(0,Z.jsx)(et,{autoComplete:`off`,id:`release-message`,name:`message`,onChange:e=>v({..._,message:e.target.value}),rows:3,value:_.message})]}),c.strategy===`APP_VERSION`?(0,Z.jsxs)(Kt,{children:[(0,Z.jsx)(Vt,{htmlFor:`release-target`,children:`Target app version`}),(0,Z.jsx)(te,{autoComplete:`off`,id:`release-target`,name:`targetAppVersion`,onChange:e=>v({..._,targetAppVersion:e.target.value}),value:_.targetAppVersion}),N?(0,Z.jsx)(Wt,{children:N}):null]}):null,(0,Z.jsx)(Kt,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(Vt,{htmlFor:`release-enabled`,children:`Enabled`}),(0,Z.jsx)(ht,{label:`About Enabled`,children:`Disabling rolls devices back to the previous enabled bundle on their next check, or to the built-in app when none remains.`})]}),(0,Z.jsx)(at,{"aria-label":`Enabled`,checked:_.enabled,id:`release-enabled`,name:`enabled`,onCheckedChange:e=>v({..._,enabled:e})})]})}),(0,Z.jsx)(Kt,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(Vt,{htmlFor:`release-force-update`,children:`Force update`}),(0,Z.jsx)(ht,{label:`About Force update`,children:`Devices apply this bundle right away, and so do devices that skip it to update straight to a newer bundle.`})]}),(0,Z.jsx)(at,{"aria-label":`Force update`,checked:_.shouldForceUpdate,id:`release-force-update`,name:`shouldForceUpdate`,onCheckedChange:e=>v({..._,shouldForceUpdate:e})})]})}),(0,Z.jsxs)(Kt,{children:[(0,Z.jsx)(Vt,{htmlFor:`release-rollout-percentage`,children:`Rollout percentage`}),(0,Z.jsx)(Ai,{onChange:e=>v({..._,rolloutCohortCount:e}),value:_.rolloutCohortCount})]}),(0,Z.jsxs)(Kt,{children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Z.jsx)(Vt,{htmlFor:`release-cohort`,children:`Additional cohorts (optional)`}),(0,Z.jsx)(Kr,{releaseId:c.id,rolloutCohortCount:_.rolloutCohortCount,targetCohorts:_.targetCohorts})]}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(te,{autoComplete:`off`,id:`release-cohort`,name:`targetCohort`,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),fe())},placeholder:`e.g. qa-team…`,value:y}),(0,Z.jsx)(i,{"aria-label":`Add cohort`,disabled:!y.trim(),onClick:fe,size:`icon`,type:`button`,variant:`outline`,children:(0,Z.jsx)(Xe,{})})]}),_.targetCohorts.length?(0,Z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:_.targetCohorts.map(e=>(0,Z.jsxs)(K,{className:`gap-1 font-mono`,variant:`secondary`,children:[e,(0,Z.jsx)(`button`,{"aria-label":`Remove cohort ${e}`,className:`rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>v({..._,targetCohorts:_.targetCohorts.filter(t=>t!==e)}),type:`button`,children:(0,Z.jsx)(me,{className:`size-3`})})]},e))}):null,(0,Z.jsx)(Wt,{children:`Public names—no IDs or secrets.`})]})]}),x?(0,Z.jsx)(Gt,{children:x}):null,(0,Z.jsx)(i,{className:`w-full`,disabled:!k||ue,onClick:pe,size:`lg`,children:m.isPending||p.isPending?`Saving…`:`Save changes`})]}),(0,Z.jsx)(se,{className:`my-2`}),(0,Z.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-medium`,children:`Actions`}),(0,Z.jsx)(i,{className:`w-full`,disabled:!c.bundle_id||ue,onClick:()=>re(!0),size:`sm`,variant:`outline`,children:`Promote to channel`}),c.bundle_id?(0,Z.jsxs)(i,{className:`w-full`,disabled:ue,onClick:()=>{window.open(`/api/bundles/${encodeURIComponent(c.bundle_id)}/download`,`_blank`,`noopener,noreferrer`),q.success(`Bundle download started`)},size:`sm`,variant:`outline`,children:[(0,Z.jsx)(qe,{"data-icon":`inline-start`}),`Download manifest`]}):null,(0,Z.jsx)(i,{className:`w-full`,disabled:c.enabled||ue,onClick:()=>ee(!0),size:`sm`,variant:`destructive`,children:`Remove from channel`})]}),c.bundle_id&&l.isPending?(0,Z.jsx)(e,{className:`h-40 w-full`}):null,c.bundle_id&&l.isError?(0,Z.jsxs)(dt,{variant:`destructive`,children:[(0,Z.jsx)(lt,{}),(0,Z.jsx)(ot,{children:`Build details are unavailable`}),(0,Z.jsx)(ut,{children:`Delivery settings are unaffected.`})]}):null,!c.bundle_id||!l.isPending?(0,Z.jsx)(Wr,{bundle:u,release:c}):null,(0,Z.jsxs)(`details`,{className:`rounded-lg border bg-muted/10 p-4 text-xs`,children:[(0,Z.jsx)(`summary`,{className:`cursor-pointer font-medium`,children:`Advanced diagnostics`}),(0,Z.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-muted-foreground sm:grid-cols-2`,children:[(0,Z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Z.jsx)(`dt`,{children:`Artifact ID`}),(0,Z.jsx)(`dd`,{className:`mt-1 break-all font-mono text-foreground`,children:c.bundle_id??`Built-in bundle`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{children:`Revision`}),(0,Z.jsx)(`dd`,{className:`mt-1 font-mono text-foreground`,children:c.revision})]}),d?(0,Z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Z.jsx)(`dt`,{children:`Patch base artifact ID`}),(0,Z.jsx)(`dd`,{className:`mt-1 break-all font-mono text-foreground`,children:d})]}):null,(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{children:`Catalog generation`}),(0,Z.jsx)(`dd`,{className:`mt-1 font-mono text-foreground`,children:f.data?.generation??`—`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{children:`Catalog size`}),(0,Z.jsx)(`dd`,{className:`mt-1 font-mono text-foreground`,children:f.data?`${f.data.byte_size} bytes`:`—`})]}),(0,Z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,Z.jsx)(`dt`,{children:`Scope key`}),(0,Z.jsx)(`dd`,{className:`mt-1 break-all font-mono text-foreground`,children:c.scope_key}),r?(0,Z.jsx)(i,{className:`mt-1 h-auto px-0 text-xs`,onClick:()=>r(c.scope_key),size:`sm`,variant:`link`,children:`Show bundles for this target`}):null]})]}),f.isError?(0,Z.jsx)(`p`,{className:`mt-3 text-destructive`,children:`Diagnostics are unavailable. Bundle settings are unaffected.`}):null]})]}):null]})]})}),(0,Z.jsx)(Mt,{onOpenChange:w,open:C,children:(0,Z.jsxs)(Et,{children:[(0,Z.jsxs)(jt,{children:[(0,Z.jsx)(Dt,{children:`Discard unsaved changes?`}),(0,Z.jsx)(Tt,{children:`Your Bundle changes will be lost.`})]}),(0,Z.jsxs)(kt,{children:[(0,Z.jsx)(At,{children:`Keep editing`}),(0,Z.jsx)(Ot,{onClick:()=>{w(!1),n(!1)},variant:`destructive`,children:`Discard changes`})]})]})}),(0,Z.jsx)(Mt,{onOpenChange:ee,open:T,children:(0,Z.jsxs)(Et,{children:[(0,Z.jsxs)(jt,{children:[(0,Z.jsxs)(Dt,{children:[`Remove this Bundle from `,A??`the channel`,`?`]}),(0,Z.jsx)(Tt,{children:`The uploaded artifact stays available. This only removes the Bundle from the channel.`})]}),(0,Z.jsxs)(kt,{children:[(0,Z.jsx)(At,{children:`Cancel`}),(0,Z.jsx)(Ot,{onClick:async()=>{if(c)try{await h.mutateAsync({expectedRevision:c.revision,releaseId:c.id}),q.success(`Bundle removed from ${A??`the channel`}`),ee(!1),n(!1)}catch(e){S(e instanceof Error?e.message:`Bundle could not be removed from the channel.`)}},variant:`destructive`,children:`Remove from channel`})]})]})}),(0,Z.jsx)(Bt,{onOpenChange:F,open:E,children:(0,Z.jsxs)(It,{showCloseButton:!g.isPending,children:[(0,Z.jsxs)(Pt,{children:[(0,Z.jsx)(Lt,{children:`Promote to Channel`}),(0,Z.jsx)(Rt,{children:`Choose how to promote this Bundle, then select the target channel.`})]}),(0,Z.jsxs)(`div`,{className:`space-y-4 py-4`,children:[(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(Ht,{htmlFor:`promote-action`,children:`Action`}),(0,Z.jsxs)(Ge,{disabled:g.isPending,items:wi,onValueChange:e=>le(e),value:D,children:[(0,Z.jsx)(Be,{className:`w-full`,id:`promote-action`,children:(0,Z.jsx)(G,{placeholder:`Select an action`})}),(0,Z.jsx)(W,{children:(0,Z.jsxs)(We,{children:[(0,Z.jsx)(H,{value:`move`,children:`Move bundle`}),(0,Z.jsx)(H,{value:`copy`,children:`Copy bundle`})]})})]}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:M?`Make this Bundle available in the target channel and keep it in the current channel.`:`Move this Bundle to the target channel. Devices in the current channel may fall back to an earlier Bundle.`})]}),(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(Ht,{htmlFor:`target-channel`,children:`Target Channel`}),(0,Z.jsxs)(Ge,{disabled:g.isPending,items:j,onValueChange:e=>oe(e??``),value:ae||null,children:[(0,Z.jsx)(Be,{className:`w-full`,id:`target-channel`,children:(0,Z.jsx)(G,{placeholder:`Select a channel`})}),(0,Z.jsx)(W,{className:`max-h-64`,children:(0,Z.jsx)(We,{children:he.map(e=>(0,Z.jsx)(H,{value:e.name,children:e.name},e.id))})})]})]})]}),(0,Z.jsxs)(Ft,{children:[(0,Z.jsx)(i,{disabled:g.isPending,onClick:()=>F(!1),variant:`outline`,children:`Cancel`}),(0,Z.jsx)(i,{disabled:!_e||g.isPending,onClick:async()=>{if(c)try{await g.mutateAsync({action:D,expectedRevision:c.revision,releaseId:c.id,targetChannel:_e}),F(!1),q.success(M?`Bundle copied to ${_e}`:`Bundle moved to ${_e}`)}catch(e){q.error(e instanceof Error?e.message:`Bundle could not be promoted.`)}},children:g.isPending?M?`Copying…`:`Moving…`:M?`Copy`:`Move`})]})]})})]})}function Mi({release:e}){return(0,Z.jsxs)(K,{className:`gap-1 font-normal text-muted-foreground`,variant:e.enabled?`outline`:`secondary`,children:[e.enabled?(0,Z.jsx)(z,{className:`size-3`}):(0,Z.jsx)(Ke,{className:`size-3`}),e.enabled?`Enabled`:`Disabled`]})}var Ni=20,Pi=[{label:`iOS`,value:`ios`},{label:`Android`,value:`android`}],Fi=[{label:`Any Status`,value:`all`},{label:`Enabled`,value:`enabled`},{label:`Disabled`,value:`disabled`}],Ii=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),Li=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}),Ri=e=>t=>{t.target instanceof Element&&t.target.closest(`button, a, input, select, textarea`)||e()};function zi({channels:e,onChange:t,onClear:n,onManageChannels:r,search:a}){let o=L(a),s=a.channelId!==void 0,c=[{label:`All Channels`,value:`all`},...e.map(e=>({label:e.name,value:e.id}))];return(0,Z.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-2 border-b bg-background px-3 py-3 sm:h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:py-0 sm:backdrop-blur-sm`,children:[(0,Z.jsx)(fe,{className:`-ml-1`}),(0,Z.jsx)(`h1`,{className:`sr-only`,children:`Bundles`}),(0,Z.jsxs)(`div`,{className:`ml-1 flex items-center gap-1.5 text-muted-foreground sm:ml-2`,children:[(0,Z.jsx)(bn,{className:`size-3.5`}),(0,Z.jsx)(`span`,{className:`text-xs font-medium`,children:`Filters`})]}),(0,Z.jsxs)(Ge,{items:c,onValueChange:e=>t({channelId:e===null||e===`all`?void 0:e}),value:a.channelId??`all`,children:[(0,Z.jsx)(Be,{"aria-label":`Channel`,className:`h-8 w-[calc(50%-0.25rem)] min-w-[132px] text-xs sm:w-[140px]`,children:(0,Z.jsx)(G,{})}),(0,Z.jsx)(W,{children:(0,Z.jsxs)(We,{children:[(0,Z.jsx)(H,{value:`all`,children:`All Channels`}),e.map(e=>(0,Z.jsx)(H,{value:e.id,children:e.name},e.id))]})})]}),(0,Z.jsxs)(Ge,{disabled:!s,items:Pi,onValueChange:e=>t({platform:e===`android`?`android`:`ios`}),value:a.platform??`ios`,children:[(0,Z.jsx)(Be,{"aria-label":`Platform`,className:`h-8 w-[calc(50%-0.25rem)] min-w-[132px] text-xs sm:w-[140px]`,title:s?void 0:`Choose a channel first`,children:(0,Z.jsx)(G,{})}),(0,Z.jsx)(W,{children:(0,Z.jsxs)(We,{children:[(0,Z.jsx)(H,{value:`ios`,children:`iOS`}),(0,Z.jsx)(H,{value:`android`,children:`Android`})]})})]}),(0,Z.jsxs)(Ge,{disabled:!s&&a.scopeKey===void 0,items:Fi,onValueChange:e=>t({enabled:e===`enabled`?!0:e===`disabled`?!1:void 0}),value:a.enabled===void 0?`all`:a.enabled?`enabled`:`disabled`,children:[(0,Z.jsx)(Be,{"aria-label":`Status`,className:`h-8 w-[calc(50%-0.25rem)] min-w-[132px] text-xs sm:w-[140px]`,children:(0,Z.jsx)(G,{})}),(0,Z.jsx)(W,{children:(0,Z.jsxs)(We,{children:[(0,Z.jsx)(H,{value:`all`,children:`Any Status`}),(0,Z.jsx)(H,{value:`enabled`,children:`Enabled`}),(0,Z.jsx)(H,{value:`disabled`,children:`Disabled`})]})})]}),(0,Z.jsx)(i,{"aria-label":`Manage channels`,onClick:r,size:`icon-sm`,title:`Manage channels`,variant:`outline`,children:(0,Z.jsx)(Cn,{})}),a.bundleId?(0,Z.jsxs)(K,{className:`max-w-48 gap-1`,variant:`secondary`,children:[`Artifact filter`,(0,Z.jsx)(`button`,{"aria-label":`Clear artifact filter`,className:`rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>t({bundleId:void 0}),type:`button`,children:(0,Z.jsx)(me,{className:`size-3`})})]}):null,a.scopeKey?(0,Z.jsxs)(K,{className:`max-w-48 gap-1`,variant:`secondary`,children:[`Target filter`,(0,Z.jsx)(`button`,{"aria-label":`Clear target filter`,className:`rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>t({scopeKey:void 0}),type:`button`,children:(0,Z.jsx)(me,{className:`size-3`})})]}):null,o?(0,Z.jsxs)(i,{className:`h-8 px-2 text-xs text-muted-foreground hover:text-foreground sm:ml-auto`,onClick:n,size:`sm`,variant:`ghost`,children:[(0,Z.jsx)(me,{"data-icon":`inline-start`}),`Clear`]}):null]})}function Bi({expanded:e,onOpen:t,onToggleExpand:n,release:r}){let a=r.operation===`PROMOTE`?`Promoted`:r.operation===`ROLLBACK`?`Rollback`:null;return(0,Z.jsxs)(`div`,{className:`flex min-w-[240px] items-center gap-3`,children:[r.bundle_id?(0,Z.jsx)(i,{"aria-controls":`bundle-lineage-panel-${r.id}`,"aria-expanded":e,"aria-label":e?`Hide advanced artifact diagnostics`:`Show advanced artifact diagnostics`,title:`Advanced artifact diagnostics`,className:`size-8 shrink-0 touch-manipulation`,onClick:n,size:`icon`,type:`button`,variant:`ghost`,children:e?(0,Z.jsx)(B,{}):(0,Z.jsx)(Ne,{})}):(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-8 shrink-0`}),(0,Z.jsxs)(`button`,{"aria-label":`Open details for ID ${r.id}`,className:`min-w-0 rounded-sm text-left text-foreground transition-colors underline-offset-4 hover:text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:t,title:r.id,type:`button`,children:[(0,Z.jsx)(pn,{bundleId:r.id,fullOnMobile:!0}),r.bundle_id?null:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-sm`,children:[(0,Z.jsx)(tt,{className:`size-3.5`}),` Built-in bundle`]})]}),a?(0,Z.jsx)(K,{className:`shrink-0 font-normal`,variant:`secondary`,children:a}):null,r.currentlyUnreachable?(0,Z.jsxs)(`span`,{"aria-label":`Unreachable: no device gets this bundle with the current delivery settings.`,className:`inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground`,title:`No device gets this bundle with the current delivery settings.`,children:[(0,Z.jsx)(Ke,{className:`size-3.5`}),`Unreachable`]}):null]})}function Vi({onDetailClick:t,panelId:n,release:r}){let i=r.bundle_id??``,a=rn(i),o=en(i);return a.isError||o.isError?(0,Z.jsx)(`div`,{"aria-live":`polite`,className:`border-t bg-muted/10 p-4 text-sm text-muted-foreground`,id:n,children:`Patch lineage could not be loaded.`}):a.isPending?(0,Z.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2 border-t bg-muted/10 p-4`,id:n,children:[(0,Z.jsx)(e,{className:`h-10 w-full`}),(0,Z.jsx)(e,{className:`h-10 w-full`})]}):a.data?(0,Z.jsx)(Mn,{bundle:a.data,bundles:o.data??[],loading:o.isPending,onDetailClick:t,panelId:n}):(0,Z.jsx)(`div`,{"aria-live":`polite`,className:`border-t bg-muted/10 p-4 text-sm text-muted-foreground`,id:n,children:`Bundle details are unavailable.`})}function Hi(){let t=R.useSearch(),n=R.useNavigate(),r=D(),[a,o]=(0,X.useState)(!1),[s,l]=(0,X.useState)(),u=sn({afterReleaseId:t.afterReleaseId,beforeReleaseId:t.beforeReleaseId,filter:Ce(t),limit:Ni}),d=Qt().data??[],f=u.data?.data??[],m=on(Array.from(new Set(f.flatMap(e=>e.bundle_id?[e.bundle_id]:[])))).data??{},h=u.data?.next,g=u.data?.previous,_=f.flatMap(e=>{let t=d.find(t=>t.id===e.channel_id)?.name;return t?[{releaseId:e.id,platform:e.platform,channel:t,builtIn:!e.bundle_id}]:[]}),v=we(),y=10+v.length,b=new Map(d.map(e=>[e.id,e.name]));(0,X.useEffect)(()=>{s&&!f.some(e=>e.id===s)&&l(void 0)},[s,f]);let x=(e,t=!0)=>void n({resetScroll:t,search:e,to:`/`}),S=e=>x(Se(t,e)),C=e=>{let n=f.find(t=>t.bundle_id===e.id);if(l(void 0),n){x({...t,releaseId:n.id},!1);return}S({bundleId:e.id})},w=t.afterReleaseId!==void 0||t.beforeReleaseId!==void 0,T=g?{...t,afterReleaseId:g,beforeReleaseId:void 0,releaseId:void 0}:null,ee=h?{...t,afterReleaseId:void 0,beforeReleaseId:h,releaseId:void 0}:null,te={...t,afterReleaseId:void 0,beforeReleaseId:void 0,releaseId:void 0};return(0,Z.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,Z.jsx)(zi,{channels:d,onChange:S,onClear:()=>x({}),onManageChannels:()=>o(!0),search:t}),(0,Z.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-6 bg-muted/5 p-3 sm:p-6`,children:[u.isError?(0,Z.jsxs)(dt,{variant:`destructive`,children:[(0,Z.jsx)(lt,{}),(0,Z.jsx)(ot,{children:`Bundles could not be loaded`}),(0,Z.jsx)(ut,{children:u.error.message})]}):(0,Z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm [&_[data-slot=table-container]]:h-full [&_[data-slot=table-container]]:overflow-auto`,children:r?(0,Z.jsx)(`div`,{className:`h-full overflow-y-auto`,children:u.isPending?(0,Z.jsx)(`div`,{className:`flex flex-col gap-3 p-4`,children:Array.from({length:5},(t,n)=>(0,Z.jsx)(e,{className:`h-44 w-full`},n))}):f.length?f.map(e=>{let n=b.get(e.channel_id)??e.channel_id,r=e.bundle_id?m[e.bundle_id]:0,i=s===e.id,a=`bundle-lineage-panel-${e.id}`;return(0,Z.jsxs)(X.Fragment,{children:[(0,Z.jsxs)(`article`,{"aria-label":`Bundle ${e.id}`,className:p(`flex cursor-pointer touch-manipulation flex-col gap-4 border-b p-4 transition-[background-color,filter] last:border-b-0 hover:bg-muted/10 active:bg-muted/20 motion-reduce:transition-none data-[state=selected]:bg-muted/15`,e.currentlyUnreachable&&`bg-muted/35 saturate-50 hover:bg-muted/50 hover:saturate-100 focus-within:saturate-100`,i&&`border-b-0 bg-primary/5`),"data-state":t.releaseId===e.id?`selected`:void 0,onClick:Ri(()=>x({...t,releaseId:e.id},!1)),children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Z.jsx)(Bi,{expanded:i,onOpen:()=>x({...t,releaseId:e.id},!1),onToggleExpand:()=>l(i?void 0:e.id),release:e}),(0,Z.jsx)(An,{channel:n,className:`shrink-0`})]}),(0,Z.jsxs)(`dl`,{className:`grid grid-cols-2 gap-3 text-xs`,children:[(0,Z.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Platform`}),(0,Z.jsxs)(`dd`,{className:`mt-1 flex items-center gap-2 font-medium`,children:[(0,Z.jsx)(Nt,{className:`size-4`,platform:e.platform}),e.platform===`ios`?`iOS`:`Android`]})]}),(0,Z.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Created`}),(0,Z.jsx)(`dd`,{className:`mt-1 tabular-nums`,children:Ii.format(e.created_at_ms)})]}),(0,Z.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Rollout`}),(0,Z.jsx)(`dd`,{className:`mt-1`,children:(0,Z.jsx)(_n,{percentage:e.rollout_cohort_count/10})})]}),(0,Z.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Patches`}),(0,Z.jsx)(`dd`,{className:`mt-1`,children:r===void 0?`Checking`:r>0?`${r} ${r===1?`patch`:`patches`}`:`—`})]}),v.map(({Cell:t,feature:n,label:r})=>(0,Z.jsxs)(`div`,{className:`col-span-2 rounded-md bg-muted/40 p-3`,children:[(0,Z.jsx)(`dt`,{className:`mb-2 text-muted-foreground`,children:r}),(0,Z.jsx)(`dd`,{children:(0,Z.jsx)(t,{releaseId:e.id,releases:_})})]},n)),(0,Z.jsxs)(`div`,{className:`col-span-2 flex flex-wrap items-center gap-2 rounded-md bg-muted/40 p-3`,children:[(0,Z.jsx)(Mi,{release:e}),e.should_force_update?(0,Z.jsx)(K,{variant:`secondary`,children:`Force update`}):null]}),(0,Z.jsxs)(`div`,{className:`col-span-2 grid grid-cols-1 gap-2 rounded-md border bg-background/80 p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Target`}),(0,Z.jsx)(`dd`,{className:`min-w-0 truncate text-right font-mono`,children:e.target_app_version??e.fingerprint_hash??`—`})]}),(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Message`}),(0,Z.jsx)(`dd`,{className:`min-w-0 text-right text-foreground`,children:e.message||`—`})]})]})]})]}),i&&e.bundle_id?(0,Z.jsx)(Vi,{onDetailClick:C,panelId:a,release:e}):null]},e.id)}):(0,Z.jsx)(`p`,{className:`p-8 text-center text-sm text-muted-foreground`,children:w?`No more bundles on this side.`:L(t)?`No bundles match these filters.`:`No bundles yet. Deploy an update to see it here.`})}):(0,Z.jsxs)(fn,{className:`min-w-max`,children:[(0,Z.jsx)(ln,{className:`bg-muted/40`,children:(0,Z.jsxs)(dn,{className:`border-b border-border/60 hover:bg-transparent [&>th]:h-10 [&>th]:text-xs [&>th]:font-semibold [&>th]:uppercase [&>th]:text-muted-foreground/70`,children:[(0,Z.jsx)(J,{children:`ID`}),(0,Z.jsx)(J,{children:`Channel`}),(0,Z.jsx)(J,{children:`Platform`}),(0,Z.jsx)(J,{children:`Patches`}),(0,Z.jsx)(J,{children:`Target`}),(0,Z.jsx)(J,{children:`Enabled`}),(0,Z.jsx)(J,{children:`Force update`}),(0,Z.jsx)(J,{children:`Rollout`}),v.map(({feature:e,label:t})=>(0,Z.jsx)(J,{children:t},e)),(0,Z.jsx)(J,{children:`Message`}),(0,Z.jsx)(J,{children:`Created`})]})}),(0,Z.jsxs)(un,{children:[u.isPending?Array.from({length:7},(t,n)=>(0,Z.jsx)(dn,{children:(0,Z.jsx)(Y,{colSpan:y,children:(0,Z.jsx)(e,{className:`h-8 w-full`})})},n)):f.map(e=>{let n=s===e.id,r=`bundle-lineage-panel-${e.id}`;return(0,Z.jsxs)(X.Fragment,{children:[(0,Z.jsxs)(dn,{"aria-label":`Open bundle ${e.id}`,className:p(`cursor-pointer transition-[background-color,filter] hover:bg-muted/10 focus-within:bg-muted/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring motion-reduce:transition-none data-[state=selected]:bg-muted/15 [&>td]:py-3`,e.currentlyUnreachable&&`bg-muted/35 saturate-50 hover:bg-muted/50 hover:saturate-100 focus-within:saturate-100`,n&&`bg-primary/5`),"data-state":t.releaseId===e.id?`selected`:void 0,onClick:Ri(()=>x({...t,releaseId:e.id},!1)),onKeyDown:n=>{n.target!==n.currentTarget||n.key!==`Enter`&&n.key!==` `||(n.preventDefault(),x({...t,releaseId:e.id},!1))},tabIndex:0,children:[(0,Z.jsx)(Y,{children:(0,Z.jsx)(Bi,{expanded:n,onOpen:()=>x({...t,releaseId:e.id},!1),onToggleExpand:()=>l(n?void 0:e.id),release:e})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(An,{channel:b.get(e.channel_id)??e.channel_id})}),(0,Z.jsx)(Y,{className:`whitespace-nowrap`,children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Nt,{className:`size-4`,platform:e.platform}),e.platform===`ios`?`iOS`:`Android`]})}),(0,Z.jsx)(Y,{children:e.bundle_id&&m[e.bundle_id]===void 0?(0,Z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Checking`}):e.bundle_id&&m[e.bundle_id]>0?(0,Z.jsxs)(K,{variant:`secondary`,children:[m[e.bundle_id],` `,m[e.bundle_id]===1?`patch`:`patches`]}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}),(0,Z.jsx)(Y,{children:e.target_app_version?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(xe,{className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`font-medium`,children:e.target_app_version})]}):e.fingerprint_hash?(0,Z.jsxs)(`span`,{className:`flex min-w-[160px] items-center gap-2`,children:[(0,Z.jsx)(yn,{className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsx)(gn,{maxLength:12,value:e.fingerprint_hash})]}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}),(0,Z.jsx)(Y,{children:(0,Z.jsxs)(`span`,{className:`flex items-center`,children:[(0,Z.jsx)(jn,{enabled:e.enabled}),(0,Z.jsx)(`span`,{className:`sr-only`,children:e.enabled?`Enabled`:`Disabled`})]})}),(0,Z.jsx)(Y,{children:(0,Z.jsxs)(`span`,{className:`flex items-center`,children:[(0,Z.jsx)(jn,{enabled:e.should_force_update,falseIcon:`minus`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:e.should_force_update?`Required`:`Optional`})]})}),(0,Z.jsx)(Y,{children:(0,Z.jsx)(_n,{percentage:e.rollout_cohort_count/10})}),v.map(({Cell:t,feature:n})=>(0,Z.jsx)(Y,{children:(0,Z.jsx)(t,{releaseId:e.id,releases:_})},n)),(0,Z.jsx)(Y,{className:`text-sm text-muted-foreground`,title:e.message??void 0,children:e.message||`-`}),(0,Z.jsx)(Y,{className:`whitespace-nowrap text-xs text-muted-foreground`,title:Ii.format(e.created_at_ms),children:Li.format(e.created_at_ms)})]}),n&&e.bundle_id?(0,Z.jsx)(dn,{className:`hover:bg-transparent`,children:(0,Z.jsx)(Y,{className:`border-t-0 p-0`,colSpan:y,children:(0,Z.jsx)(Vi,{onDetailClick:C,panelId:r,release:e})})}):null]},e.id)}),!u.isPending&&f.length===0?(0,Z.jsx)(dn,{children:(0,Z.jsx)(Y,{className:`h-40 text-center text-muted-foreground`,colSpan:y,children:w?`No more bundles on this side.`:L(t)?`No bundles match these filters.`:`No bundles yet. Deploy an update to see it here.`})}):null]})]})}),!u.isError&&!u.isPending?(0,Z.jsxs)(`nav`,{"aria-label":`Bundle pagination`,className:`flex flex-col gap-3 px-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,Z.jsxs)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:[(0,Z.jsx)(`span`,{className:`text-foreground`,children:f.length}),` `,f.length===1?`entry`:`entries`,`, newest first`]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 sm:justify-end`,children:[w?(0,Z.jsx)(F,{className:c({className:`h-8 flex-1 px-3 text-xs sm:flex-none`,size:`sm`,variant:`ghost`}),search:te,to:`/`,children:`Newest`}):null,T?(0,Z.jsxs)(F,{className:c({className:`h-8 flex-1 px-3 text-xs sm:flex-none`,size:`sm`,variant:`outline`}),search:T,to:`/`,children:[(0,Z.jsx)(je,{"data-icon":`inline-start`}),`Previous`]}):(0,Z.jsxs)(i,{className:`h-8 flex-1 px-3 text-xs sm:flex-none`,disabled:!0,size:`sm`,variant:`outline`,children:[(0,Z.jsx)(je,{"data-icon":`inline-start`}),`Previous`]}),ee?(0,Z.jsxs)(F,{className:c({className:`h-8 flex-1 px-3 text-xs sm:flex-none`,size:`sm`,variant:`outline`}),search:ee,to:`/`,children:[`Next`,(0,Z.jsx)(Ne,{"data-icon":`inline-end`})]}):(0,Z.jsxs)(i,{className:`h-8 flex-1 px-3 text-xs sm:flex-none`,disabled:!0,size:`sm`,variant:`outline`,children:[`Next`,(0,Z.jsx)(Ne,{"data-icon":`inline-end`})]})]})]}):null]}),(0,Z.jsx)(ji,{channels:d,onOpenChange:e=>!e&&x({...t,releaseId:void 0},!1),onShowScope:e=>S({scopeKey:e}),open:!!t.releaseId,releaseId:t.releaseId??``}),(0,Z.jsx)(Nn,{onOpenChange:o,open:a})]})}export{Hi as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-BDdBIxYS.js","assets/sidebar-Di9SN47G.js","assets/alert-dialog-BqYScr9y.js","assets/select-CBIU0_M1.js","assets/useCompositeListItem-JmyDfo3-.js","assets/check-CXVR3s3X.js","assets/switch-BpdiHL_t.js","assets/valueToPercent-BLwGy_xK.js","assets/link-DTEyW70e.js","assets/arrow-right-CNII8TYn.js","assets/arrow-up-right-DK8Zdg40.js","assets/native-builds-BOC71grI.js","assets/relativeTime-YQt84dYr.js","assets/uuidv7-zXMtwR9Q.js","assets/chevron-right-BoUXo82O.js","assets/circle-off-C7Muo0ss.js","assets/download-Cf24LBde.js","assets/list--NIee1FZ.js","assets/plus-BReVKct-.js","assets/input-group-D3OUBk4n.js","assets/badge-DWFcDWho.js","assets/dist-CPlO6ko9.js","assets/HashValueDisplay-6lNRxDJX.js","assets/insights-search-DghCbEnk.js","assets/insights-api-BVCXJsoV.js","assets/useInfiniteQuery-DX4WpBRG.js","assets/PlatformIcon-BBWQlWm9.js","assets/RolloutPercentageBadge-Cxogpi8F.js","assets/dialog-CNUPxNxH.js","assets/field-D-2-mnNh.js","assets/table-Bpy3SvSo.js","assets/api-P2g8dCNg.js","assets/useMutation-DbYw7boA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,Gr as t,In as n,Ln as r,Vr as i,Wr as a,ar as o,et as s,ir as c,nr as l}from"./sidebar-Di9SN47G.js";import{t as u}from"./link-DTEyW70e.js";import{n as d,r as f,t as p}from"./preload-helper-B44EvKhG.js";import{a as ee,i as m,o as h}from"./console-features-api-DEXSwFtc.js";import{_ as g,m as _,s as te,x as v}from"./insights-api-BVCXJsoV.js";import{t as y}from"./key-round-DwNKkHhy.js";import{a as b}from"./switch-BpdiHL_t.js";import{d as x,l as S,o as C,s as w,u as T}from"./badge-DWFcDWho.js";import{n as E,o as D}from"./insights-search-DghCbEnk.js";var O=c(`chart-line`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),k=c(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),A=a(),j={apiKeys:{navigation:{icon:(0,A.jsx)(y,{}),paths:[`/api-keys`],link:({onClick:e})=>(0,A.jsx)(u,{to:`/api-keys`,onClick:e})}}},M=i({method:`GET`}).middleware([l]).handler(t(`b4bf4c461903edcdc44eea52468c737b5b600a586f542138ff022dcbbe86c45c`));function N(e){let t=e.map(({releaseId:e,platform:t,channel:n})=>({releaseId:e,platform:t,channel:n})).sort((e,t)=>e.releaseId.localeCompare(t.releaseId));return o({queryKey:[`bundle-activity`,t],queryFn:()=>M({data:t}),enabled:t.length>0,staleTime:3e4})}var P=[{label:`Downloaded`,field:`downloads`,color:`text-primary/85`},{label:`Launched`,field:`launched`,color:`text-success/85`},{label:`Crashed`,field:`failedLaunches`,color:`text-warning/85`}],F=e=>{let t=e.launched+e.failedLaunches;return t===0?`—`:`${(e.failedLaunches/t*100).toFixed(2)}%`},I=e=>Math.max(0,e.downloads-e.launched-e.failedLaunches);function L(){return(0,A.jsx)(D,{label:`About release insight metrics`,children:`Downloaded: got this bundle. Launched: ran it. Crashed: crashed on it and rolled back. Once every installation restarts, Downloaded = Launched + Crashed.`})}function R({report:t,loading:n=!1,input:i,variant:a=`inline`}){if(!t)return n?(0,A.jsx)(e,{"aria-label":`Loading release insights`,className:a===`card`?`h-16 w-full`:`h-4 w-40`}):(0,A.jsx)(`span`,{"aria-label":`Release insights unavailable`,className:`text-sm text-muted-foreground`,children:`—`});let o=i?.builtIn===!0,s=o?0:I(t),c=(0,A.jsx)(`dl`,{className:r(a===`card`?`grid grid-cols-[1fr_1fr_auto] gap-4`:`flex min-w-[220px] flex-wrap items-baseline gap-x-3 gap-y-1`),children:P.map(({label:e,field:n,color:i})=>(0,A.jsxs)(`div`,{className:r(`flex`,a===`card`?`min-w-0 flex-col gap-1`:`items-baseline gap-1.5 whitespace-nowrap`),children:[(0,A.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,A.jsxs)(`dd`,{className:r(`flex flex-wrap items-baseline gap-x-1.5 tabular-nums`,a===`card`?`text-xl font-semibold`:`text-sm font-medium`,t[n]>0&&!(n===`downloads`&&o)?i:`text-muted-foreground`),children:[n===`downloads`&&o?(0,A.jsx)(`span`,{title:`The built-in bundle is never downloaded`,children:`—`}):t[n].toLocaleString(),n===`failedLaunches`?(0,A.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,F(t),`)`]}):null]})]},n))});return(0,A.jsxs)(`div`,{className:r(`flex`,a===`card`?`flex-col gap-2`:`items-center gap-1`),children:[i?(0,A.jsx)(u,{className:`min-w-0 rounded-sm hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,to:`/insights`,search:{platform:i.platform,channel:i.channel,releaseId:i.releaseId,bundleWindow:E(i.releaseId)},children:c}):c,a===`card`&&s>0?(0,A.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[s.toLocaleString(),` downloaded but not launched yet: waiting for a restart, or passed over for a newer bundle.`]}):null,a===`inline`?(0,A.jsx)(L,{}):null]})}function z({input:t}){let n=te({platform:t.platform,channel:t.channel,releaseId:t.releaseId}),i=n.data;return(0,A.jsxs)(`div`,{className:`flex items-center gap-1`,children:[i?(0,A.jsx)(`dl`,{children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-1.5`,children:[(0,A.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Download failures`}),(0,A.jsxs)(`dd`,{className:r(`flex items-baseline gap-1.5 text-sm font-medium tabular-nums`,i.failedUpdates>0?`text-warning/85`:`text-muted-foreground`),children:[i.failedUpdates.toLocaleString(),(0,A.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,g(_(i)),`)`]})]})]})}):n.isPending?(0,A.jsx)(e,{"aria-label":`Loading download failures`,className:`h-4 w-40`}):(0,A.jsx)(`span`,{"aria-label":`Download failures unavailable`,className:`text-sm text-muted-foreground`,children:`—`}),(0,A.jsx)(D,{label:`About download failures`,children:`Failed downloads or installs of this bundle, at most one per installation a day. Rate = failures ÷ (failures + downloads).`})]})}function B({input:e}){let t=N([e]);return(0,A.jsxs)(C,{children:[(0,A.jsxs)(T,{className:`flex-row items-center justify-between px-4 pt-4 pb-3`,children:[(0,A.jsx)(x,{className:`text-sm font-medium`,children:`Insights`}),(0,A.jsx)(L,{})]}),(0,A.jsxs)(w,{className:`flex flex-col gap-3 px-4 pb-4`,children:[(0,A.jsx)(R,{variant:`card`,input:e,loading:t.isFetching,report:t.data?.[e.releaseId]}),(0,A.jsx)(s,{}),(0,A.jsx)(z,{input:e})]}),(0,A.jsx)(S,{className:`px-4 pb-4`,children:(0,A.jsxs)(u,{className:n({variant:`outline`,size:`sm`}),to:`/insights`,search:{platform:e.platform,channel:e.channel,releaseId:e.releaseId,bundleWindow:E(e.releaseId),healthChart:`adoption`},children:[(0,A.jsx)(O,{"aria-hidden":`true`,"data-icon":`inline-start`}),`View adoption`]})})]})}function V({input:e}){return m(`insightsAnalytics`)?null:(0,A.jsxs)(C,{children:[(0,A.jsx)(T,{className:`px-4 pt-4 pb-3`,children:(0,A.jsx)(x,{className:`text-sm font-medium`,children:`Insights`})}),(0,A.jsx)(w,{className:`px-4 pb-4`,children:(0,A.jsx)(z,{input:e})})]})}function H({releaseId:e,releases:t}){let n=N(t);return(0,A.jsx)(R,{input:t.find(t=>t.releaseId===e),loading:n.isFetching,report:n.data?.[e]})}var U={Cell:H},W={insights:{navigation:{icon:(0,A.jsx)(v,{}),paths:[`/insights`,`/insights/distribution`,`/installations`],link:({features:e,onClick:t})=>e.insightsAnalytics?(0,A.jsx)(u,{to:`/insights`,onClick:t}):(0,A.jsx)(u,{to:`/installations`,onClick:t})},releaseSection:({release:e})=>(0,A.jsx)(V,{input:e})},insightsAnalytics:{releaseColumn:U,releaseSection:({release:e})=>(0,A.jsx)(B,{input:e})}},G={remoteConfig:{navigation:{icon:(0,A.jsx)(b,{}),paths:[`/remote-config`],link:({onClick:e})=>(0,A.jsx)(u,{to:`/remote-config`,onClick:e})}}},K={...W,...j,...G},q=Object.keys(h),J=()=>{let e=ee().data?.features;return e===void 0?[]:q.flatMap(t=>{let n=K[t];return n!==void 0&&e[t]?[{...n,feature:t,label:h[t].label,features:e}]:[]})},Y=()=>J().flatMap(({feature:e,label:t,releaseColumn:n})=>n===void 0?[]:[{...n,feature:e,label:t}]);function X({release:e}){return J().map(({feature:t,releaseSection:n})=>n===void 0?null:(0,A.jsx)(n,{release:e},t))}var Z=e=>typeof e==`string`&&e.trim().length>0?e.trim():void 0;function Q(e){let t=Z(e.beforeReleaseId),n=t?void 0:Z(e.afterReleaseId),r=e.enabled===!0||e.enabled===`true`?!0:e.enabled===!1||e.enabled===`false`?!1:void 0,i=Z(e.bundleId),a=i?void 0:Z(e.scopeKey),o=i||a?void 0:Z(e.channelId),s=o===void 0?void 0:e.platform===`android`?`android`:`ios`;return{afterReleaseId:n,beforeReleaseId:t,bundleId:i,channelId:o,enabled:a||o?r:void 0,platform:s,releaseId:Z(e.releaseId),scopeKey:a}}function $(e){let t=e.enabled===void 0?{}:{enabled:e.enabled};return e.bundleId?{kind:`bundle`,bundleId:e.bundleId}:e.scopeKey?{kind:`scope`,scopeKey:e.scopeKey,...t}:e.channelId&&e.platform?{kind:`channelPlatform`,channelId:e.channelId,platform:e.platform,...t}:{kind:`all`}}function ne(e){return $(e).kind!==`all`}function re(e,t){let n={...e,...t};return t.bundleId?Q({bundleId:n.bundleId}):t.scopeKey?Q({scopeKey:n.scopeKey,enabled:n.enabled}):`channelId`in t||`platform`in t?Q({channelId:n.channelId,enabled:n.enabled,platform:n.platform}):Q({bundleId:n.bundleId,channelId:n.channelId,enabled:n.enabled,platform:n.platform,scopeKey:n.scopeKey})}var ie=f(`/`)({component:d(()=>p(()=>import(`./routes-BDdBIxYS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32])),`component`),validateSearch:Q});export{X as a,k as c,re as i,ne as n,J as o,$ as r,Y as s,ie as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ir as e}from"./sidebar-Di9SN47G.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$n as e,A as t,At as n,Bn as r,Bt as i,C as a,Cn as o,Ct as s,Dn as c,Dt as l,En as u,Et as d,Ft as f,Gn as p,Gt as m,Hn as h,Ht as g,It as _,Jn as v,Jt as y,Kt as b,L as x,Ln as S,Lt as C,Mn as w,Mt as T,Nn as E,Nt as ee,O as D,On as O,Ot as k,Pn as A,Pt as j,Qn as M,Rt as N,Sn as te,St as P,Tn as F,Tt as I,Un as L,Ut as ne,Vn as R,Vt as re,Wn as ie,Wr as z,Wt as B,Xn as V,Yn as H,Yt as ae,Zn as U,Zt as W,_n as oe,at as G,bn as se,bt as K,cn as q,ct as ce,dt as J,er as le,fn as ue,ft as de,gn as fe,gt as pe,hn as me,ht as he,ii as ge,ir as _e,jt as ve,kt as ye,lt as be,mt as xe,ot as Se,pt as Ce,qt as we,rn as Te,st as Ee,ti as De,tr as Oe,un as ke,ut as Ae,vt as Y,w as je,wn as Me,wt as Ne,xn as Pe,xt as X,yn as Fe,yt as Ie,zt as Le}from"./sidebar-Di9SN47G.js";import{t as Re}from"./check-CXVR3s3X.js";import{a as ze,i as Be,n as Ve,r as He,t as Ue}from"./useCompositeListItem-JmyDfo3-.js";var We=_e(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Z=ge(De()),Ge=`Escape`;function Ke(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function qe(e,t){return Ke(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Je(e,t,n){return Ke(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Ye(e,t,n){return Ke(t,n?e===o:e===Me,e===te)}function Xe(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Ge:Ke(t,n?e===Me:e===o,e===F)}function Ze(e,t){let{listRef:n,activeIndex:r,onNavigate:a=()=>{},enabled:o=!0,selectedIndex:s=null,allowEscape:d=!1,loopFocus:p=!1,nested:h=!1,rtl:g=!1,virtual:v=!1,focusItemOnOpen:y=`auto`,focusItemOnHover:x=!0,openOnArrowKeyDown:S=!0,disabledIndices:w=void 0,orientation:E=`vertical`,parentOrientation:D,cols:A=1,id:M,resetOnPointerLeave:te=!0,externalTree:P}=t,F=`rootStore`in e?e.rootStore:e,I=F.useState(`open`),L=F.useState(`floatingElement`),ne=F.useState(`domReferenceElement`),R=F.context.dataRef,ie=fe(L),z=oe(ne),B=we(ie),H=l(),W=k(P),G=Z.useRef(y),K=Z.useRef(s??-1),q=Z.useRef(null),ce=Z.useRef(!0),J=U(e=>{a(K.current===-1?null:K.current,e)}),le=Z.useRef(J),ue=Z.useRef(!!L),de=Z.useRef(I),pe=Z.useRef(!1),me=Z.useRef(!1),he=Z.useRef(null),ge=we(w),_e=we(I),ye=we(s),be=we(te),xe=b(),Se=b(),Ce=U(()=>{function e(e){v?W?.events.emit(`virtualfocus`,e):he.current=ve(e,{sync:pe.current,preventScroll:!0})}let t=n.current[K.current],r=me.current;t&&e(t),(pe.current?e=>e():e=>xe.request(e))(()=>{let i=n.current[K.current]||t;i&&(t||e(i),Me&&(r||!ce.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});V(()=>{R.current.orientation=E},[R,E]),V(()=>{o&&(I&&L?(K.current=s??-1,G.current&&s!=null&&(me.current=!0,J())):ue.current&&(K.current=-1,le.current()))},[o,I,L,s,J]),V(()=>{if(o){if(!I){pe.current=!1;return}if(L)if(r==null){if(pe.current=!1,ye.current!=null)return;if(ue.current&&(K.current=-1,Ce()),(!de.current||!ue.current)&&G.current&&(q.current!=null||G.current===!0&&q.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>Se.request(e):queueMicrotask)(t),e+=1):(K.current=q.current==null||Je(q.current,E,g)||h?N(n):C(n),q.current=null,J())};t()}}else i(n.current,r)||(K.current=r,Ce(),me.current=!1)}},[o,I,L,r,ye,h,n,E,g,J,Ce,Se]),V(()=>{if(!o||L||!W||v||!ue.current)return;let e=W.nodesRef.current,t=e.find(e=>e.id===H)?.context?.elements.floating,n=Fe(m(L)),r=e.some(e=>e.context&&se(e.context.elements.floating,n));t&&!r&&ce.current&&t.focus({preventScroll:!0})},[o,L,W,H,v]),V(()=>{le.current=J,de.current=I,ue.current=!!L}),V(()=>{I||(q.current=null,G.current=y)},[I,y]);let Ee=r!=null,De=U(e=>{if(!_e.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(K.current!==t||r!==t)&&(K.current=t,J(e))}),Ae=U(()=>D??W?.nodesRef.current.find(e=>e.id===H)?.context?.dataRef?.current.orientation),Y=U(()=>N(n,ge.current)),je=U(e=>{if(ce.current=!1,pe.current=!0,e.which===229||!_e.current&&e.currentTarget===B.current)return;if(h&&Xe(e.key,E,g,A)){qe(e.key,Ae())||O(e),F.setOpen(!1,ae(ke,e.nativeEvent)),Oe(ne)&&(v?W?.events.emit(`virtualfocus`,ne):ne.focus());return}let t=K.current,r=N(n,w),a=C(n,w);if(z||(e.key===`Home`&&(O(e),K.current=r,J(e)),e.key===`End`&&(O(e),K.current=a,J(e))),A>1){let t=Array.from({length:n.current.length},()=>({width:1,height:1})),i=T(t,A,!1),o=i.findIndex(e=>e!=null&&!re(n.current,e,w)),s=i.reduce((e,t,r)=>t!=null&&!re(n.current,t,w)?r:e,-1),c=i[_(i.map(e=>e==null?null:n.current[e]),{event:e,orientation:E,loopFocus:p,rtl:g,cols:A,disabledIndices:f([...(typeof w==`function`?null:w)||n.current.map((e,t)=>re(n.current,t,w)?t:void 0),void 0],i),minIndex:o,maxIndex:s,prevIndex:j(K.current>a?r:K.current,t,i,A,e.key===`ArrowDown`?`bl`:e.key===(g?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(K.current=c,J(e)),E===`both`)return}if(qe(e.key,E)){if(O(e),I&&!v&&Fe(e.currentTarget.ownerDocument)===e.currentTarget){K.current=Je(e.key,E,g)?r:a,J(e);return}Je(e.key,E,g)?p?t>=a?d&&t!==n.current.length?K.current=-1:(pe.current=!1,K.current=r):K.current=ee(n.current,{startingIndex:t,disabledIndices:w}):K.current=Math.min(a,ee(n.current,{startingIndex:t,disabledIndices:w})):p?t<=r?d&&t!==-1?K.current=n.current.length:(pe.current=!1,K.current=a):K.current=ee(n.current,{startingIndex:t,decrement:!0,disabledIndices:w}):K.current=Math.max(r,ee(n.current,{startingIndex:t,decrement:!0,disabledIndices:w})),i(n.current,K.current)&&(K.current=-1),J(e)}}),Me=Z.useMemo(()=>({onFocus(e){pe.current=!0,De(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){pe.current=!0,me.current=!1,x&&De(e)},onPointerLeave(e){if(!_e.current||!ce.current||e.pointerType===`touch`)return;pe.current=!0;let t=e.relatedTarget;if(!(!x||n.current.includes(t))&&be.current&&(he.current?.(),he.current=null,K.current=-1,J(e),!v)){let e=B.current,t=Fe(m(e));e&&se(e,t)&&e.focus({preventScroll:!0})}}}),[De,_e,B,x,n,J,be,v]),Ne=Z.useMemo(()=>v&&I&&Ee&&{"aria-activedescendant":`${M}-${r}`},[v,I,Ee,M,r]),X=Z.useMemo(()=>({"aria-orientation":E===`both`?void 0:E,...z?{}:Ne,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&I&&!v){let t=Pe(e.nativeEvent);if(t&&!se(B.current,t))return;O(e),F.setOpen(!1,ae(Te,e.nativeEvent)),Oe(ne)&&ne.focus();return}je(e)},onPointerMove(){ce.current=!0}}),[Ne,je,B,E,z,F,I,v,ne]),Ie=Z.useMemo(()=>{function e(e){F.setOpen(!0,ae(ke,e.nativeEvent,e.currentTarget))}function t(e){y===`auto`&&u(e.nativeEvent)&&(G.current=!v)}function n(e){G.current=y,y===`auto`&&c(e.nativeEvent)&&(G.current=!0)}return{onKeyDown(t){let n=F.select(`open`);ce.current=!1;let r=t.key.startsWith(`Arrow`),i=Ye(t.key,Ae(),g),a=qe(t.key,E),o=(h?i:a)||t.key===`Enter`||t.key.trim()===``;if(v&&n)return je(t);if(!(!n&&!S&&r)){if(o){let e=qe(t.key,Ae());q.current=h&&e?null:t.key}if(h){i&&(O(t),n?(K.current=Y(),J(t)):e(t));return}a&&(ye.current!=null&&(K.current=ye.current),O(t),!n&&S?e(t):je(t),n&&J(t))}},onFocus(e){F.select(`open`)&&!v&&(K.current=-1,J(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[je,y,Y,h,J,F,S,E,Ae,g,ye,v]),Le=Z.useMemo(()=>({...Ne,...Ie}),[Ne,Ie]);return Z.useMemo(()=>o?{reference:Le,floating:X,item:Me,trigger:Ie}:{},[o,Le,X,Ie,Me])}function Qe(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,onTyping:o,enabled:s=!0,resetMs:c=750,selectedIndex:l=null}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=E(),p=Z.useRef(``),m=Z.useRef(l??i??-1),h=Z.useRef(null),g=U(e=>{function t(e){let t=r?.current[e];return!t||Le(t)}function s(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let u=n.current;if(p.current.length>0&&e.key===` `&&(O(e),o?.(!0)),p.current.length>0&&p.current[0]!==` `&&s(u,p.current)===-1&&e.key!==` `&&o?.(!1),u==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;d&&e.key!==` `&&(O(e),o?.(!0));let g=p.current===``;g&&(m.current=l??i??-1),u.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&p.current===e.key&&(p.current=``,m.current=h.current),p.current+=e.key,f.start(c,()=>{p.current=``,m.current=h.current,o?.(!1)});let _=((g?l??i??-1:m.current)??0)+1,v=s(u,p.current,_);v===-1?e.key!==` `&&(p.current=``,o?.(!1)):(a?.(v),h.current=v)}),_=U(e=>{let t=e.relatedTarget,n=u.select(`domReferenceElement`),r=u.select(`floatingElement`);se(n,t)||se(r,t)||(f.clear(),p.current=``,m.current=h.current,o?.(!1))});V(()=>{!d&&l!==null||(f.clear(),h.current=null,p.current!==``&&(p.current=``))},[d,l,f]),V(()=>{d&&p.current===``&&(m.current=l??i??-1)},[d,l,i]);let v=Z.useMemo(()=>({onKeyDown:g,onBlur:_}),[g,_]);return Z.useMemo(()=>s?{reference:v,floating:v}:{},[s,v])}function $e(e){let[t,n]=Z.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var Q=z(),et=Z.createContext(void 0),tt={disableStyleElements:!1};function nt(){return Z.useContext(et)??tt}var rt=Z.createContext(null),it=Z.createContext(null);function at(){let e=Z.useContext(rt);if(e===null)throw Error(v(60));return e}function ot(){let e=Z.useContext(it);if(e===null)throw Error(v(61));return e}var st=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),ct={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},lt={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},ut={disabled:!1,...lt},dt={valid(e){return e===null?null:e?{[st.valid]:``}:{[st.invalid]:``}}},ft={invalid:void 0,name:void 0,validityData:{state:ct,errors:[],error:``,value:``,initialValue:null},setValidityData:L,disabled:void 0,touched:lt.touched,setTouched:L,dirty:lt.dirty,setDirty:L,filled:lt.filled,setFilled:L,focused:lt.focused,setFocused:L,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:ut,markedDirtyRef:{current:!1},registerFieldControl:L,validation:{getValidationProps:(e=h)=>e,getInputValidationProps:(e=h)=>e,inputRef:{current:null},commit:async()=>{}}},pt=Z.createContext(ft);function mt(e=!0){let t=Z.useContext(pt);if(t.setValidityData===L&&!e)throw Error(v(28));return t}function ht(e,t,n,r,i=!0){let{registerFieldControl:a}=mt(),o=Z.useRef(null);o.current||=Symbol(),V(()=>{let s=o.current;if(!(!s||!i))return a(s,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(s,void 0)}},[e,i,r,t,a,n])}var gt=Z.createContext({controlId:void 0,registerControlId:L,labelId:void 0,setLabelId:L,messageIds:[],setMessageIds:L,getDescriptionProps:e=>e});function _t(){return Z.useContext(gt)}function vt(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=_t(),o=Ae(t),s=n?i:void 0,c=M(()=>Symbol(`labelable-control`)),l=Z.useRef(!1),u=Z.useRef(t!=null),d=U(()=>{!l.current||a===L||(l.current=!1,a(c.current,void 0))});return V(()=>{if(a===L)return;let e;if(n){let n=r?.current;e=le(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),Z.useEffect(()=>d,[d]),i??o}var yt=(e,t)=>Object.is(e,t);function bt(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function xt(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:bt(t,e,n))}function St(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:bt(e,t,n))}function Ct(e,t,n){return e.filter(e=>!bt(t,e,n))}function wt(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Tt(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Et(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Tt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Dt(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return wt(e)}function Ot(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?wt(e.value):wt(e)}function kt(e,t,n){function r(){return Dt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=Tt(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function At(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(Z.Fragment,{children:kt(r,t,n)},i)),e),[])}var $={id:P(e=>e.id),labelId:P(e=>e.labelId),modal:P(e=>e.modal),multiple:P(e=>e.multiple),items:P(e=>e.items),itemToStringLabel:P(e=>e.itemToStringLabel),itemToStringValue:P(e=>e.itemToStringValue),isItemEqualToValue:P(e=>e.isItemEqualToValue),value:P(e=>e.value),hasSelectedValue:P(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ot(t,r)!==``}),hasNullItemLabel:P((e,t)=>t?Et(e.items):!1),open:P(e=>e.open),mounted:P(e=>e.mounted),forceMount:P(e=>e.forceMount),transitionStatus:P(e=>e.transitionStatus),openMethod:P(e=>e.openMethod),activeIndex:P(e=>e.activeIndex),selectedIndex:P(e=>e.selectedIndex),isActive:P((e,t)=>e.activeIndex===t),isSelected:P((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>bt(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:bt(n,i,r)}),isSelectedByFocus:P((e,t)=>e.selectedIndex===t),popupProps:P(e=>e.popupProps),triggerProps:P(e=>e.triggerProps),triggerElement:P(e=>e.triggerElement),positionerElement:P(e=>e.positionerElement),listElement:P(e=>e.listElement),popupSide:P(e=>e.popupSide),scrollUpArrowVisible:P(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:P(e=>e.scrollDownArrowVisible),hasScrollArrows:P(e=>e.hasScrollArrows)},jt=Z.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:L,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Mt(){return Z.useContext(jt)}function Nt(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Pt(e,t){return Math.max(0,e-t)}function Ft(e,t){if(t<=0)return 0;let n=Nt(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function It(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:s=!1,onOpenChange:c,name:l,form:u,autoComplete:d,disabled:f=!1,readOnly:p=!1,required:m=!1,modal:g=!0,actionsRef:_,inputRef:v,onOpenChangeComplete:y,items:b,multiple:x=!1,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w=yt,highlightItemOnHover:T=!0,children:E}=e,{clearErrors:ee}=Mt(),{setDirty:D,setTouched:O,setFocused:k,shouldValidateOnChange:j,validityData:N,setFilled:te,name:P,disabled:F,validation:L,validationMode:re}=mt(),z=vt({id:t}),W=F||f,oe=P??l,[G,se]=Be({controlled:n,default:x?r??R:r,name:`Select`,state:`value`}),[q,ce]=Be({controlled:o,default:s,name:`Select`,state:`open`}),J=Z.useRef([]),le=Z.useRef([]),de=Z.useRef(null),fe=Z.useRef(null),me=Z.useRef(0),ge=Z.useRef(null),_e=Z.useRef([]),ve=Z.useRef(!1),ye=Z.useRef(!1),be=Z.useRef(null),Se=Z.useRef(null),Ce=Z.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Te=Z.useRef(!1),{mounted:Ee,setMounted:De,transitionStatus:Oe}=Ie(q),{openMethod:ke,triggerProps:Ae}=a(q),Y=M(()=>new K({id:z,labelId:void 0,modal:g,multiple:x,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w,value:G,open:q,mounted:Ee,transitionStatus:Oe,items:b,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Me=X(Y,$.activeIndex),Pe=X(Y,$.selectedIndex),Fe=X(Y,$.triggerElement),Le=X(Y,$.positionerElement),Re=$e(ke),ze=ke??Re,Ve=Z.useMemo(()=>x&&Array.isArray(G)&&G.length===0?``:Ot(G,C),[x,G,C]),He=Z.useMemo(()=>x&&Array.isArray(G)?G.map(e=>Ot(e,C)):Ot(G,C),[x,G,C]);ht(we(Y.state.triggerElement),z,G,U(()=>He));let Ue=Z.useRef(G),We=x?Array.isArray(G)&&G.length>0:G!=null;V(()=>{G!==Ue.current&&Y.set(`forceMount`,!0)},[Y,G]),V(()=>{te(We)},[We,te]),V(function(){let e=_e.current,t;if(x){let n=Array.isArray(G)?G:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=St(e,r,w);t=i===-1?null:i}}else{let n=St(e,G,w);t=n===-1?null:n}t===null&&(Se.current=null),!q&&Y.set(`selectedIndex`,t)},[We,x,q,G,_e,w,Y,Se]),je(G,()=>{ee(oe),D(G!==N.initialValue),j()?L.commit(G):L.commit(G,!0)});let Ge=U((e,t)=>{if(c?.(e,t),!t.isCanceled&&(ce(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(O(!0),k(!1),re===`onBlur`&&L.commit(G)),!e&&Y.state.activeIndex!==null)){let e=J.current[Y.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Ke=U(()=>{De(!1),Y.update({activeIndex:null,openMethod:null}),y?.(!1)});pe({enabled:!_,open:q,ref:de,onComplete(){q||Ke()}}),Z.useImperativeHandle(_,()=>({unmount:Ke}),[Ke]);let qe=U((e,t)=>{i?.(e,t),!t.isCanceled&&se(e)}),Je=U(()=>{let e=Y.state.listElement||de.current;if(!e)return;let t=Pt(e.scrollHeight,e.clientHeight),n=Ft(e.scrollTop,t),r=n>0,i=n<t;Y.state.scrollUpArrowVisible!==r&&Y.set(`scrollUpArrowVisible`,r),Y.state.scrollDownArrowVisible!==i&&Y.set(`scrollDownArrowVisible`,i)}),Ye=xe({open:q,onOpenChange:Ge,elements:{reference:Fe,floating:Le}}),Xe=I(Ye,{enabled:!p&&!W,event:`mousedown`}),et=Ne(Ye),tt=Ze(Ye,{enabled:!p&&!W,listRef:J,activeIndex:Me,selectedIndex:Pe,disabledIndices:R,onNavigate(e){e===null&&!q||Y.set(`activeIndex`,e)},focusItemOnHover:T}),nt=Qe(Ye,{enabled:!p&&!W&&(q||!x),listRef:le,activeIndex:Me,selectedIndex:Pe,onMatch(e){q?Y.set(`activeIndex`,e):qe(_e.current[e],ae(`none`))},onTyping(e){ve.current=e}}),at=Z.useMemo(()=>{let e=H(nt.reference,tt.reference,et.reference,Xe.reference,Ae);return z&&(e.id=z),e},[Xe.reference,nt.reference,tt.reference,et.reference,Ae,z]),ot=Z.useMemo(()=>H(he,nt.floating,tt.floating,et.floating),[nt.floating,tt.floating,et.floating]),st=tt.item??h;A(()=>{Y.update({popupProps:ot,triggerProps:at})}),V(()=>{Y.update({id:z,modal:g,multiple:x,value:G,open:q,mounted:Ee,transitionStatus:Oe,popupProps:ot,triggerProps:at,items:b,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:w,openMethod:ze})},[Y,z,g,x,G,q,Ee,Oe,ot,at,b,S,C,w,ze]);let ct=Z.useMemo(()=>({store:Y,name:oe,required:m,disabled:W,readOnly:p,multiple:x,highlightItemOnHover:T,setValue:qe,setOpen:Ge,listRef:J,popupRef:de,scrollHandlerRef:fe,handleScrollArrowVisibility:Je,scrollArrowsMountedCountRef:me,itemProps:st,events:Ye.context.events,valueRef:ge,valuesRef:_e,labelsRef:le,typingRef:ve,selectionRef:Ce,firstItemTextRef:be,selectedItemTextRef:Se,validation:L,onOpenChangeComplete:y,keyboardActiveRef:ye,alignItemWithTriggerActiveRef:Te,initialValueRef:Ue}),[Y,oe,m,W,p,x,T,qe,Ge,st,Ye.context.events,L,y,Je]),lt=ie(v,L.inputRef),ut=x&&Array.isArray(G)&&G.length>0,dt=x?void 0:oe,ft=Z.useMemo(()=>!x||!Array.isArray(G)||!oe?null:G.map(e=>{let t=Ot(e,C);return(0,Q.jsx)(`input`,{type:`hidden`,form:u,name:oe,value:t},t)}),[x,G,u,oe,C]);return(0,Q.jsx)(rt.Provider,{value:ct,children:(0,Q.jsxs)(it.Provider,{value:Ye,children:[E,(0,Q.jsx)(`input`,{...L.getInputValidationProps({onFocus(){Y.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||W||p){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=ae(ue,e.nativeEvent);function r(){if(x)return;let e=_e.current.find(e=>Ot(e,C).toLowerCase()===t.toLowerCase()||Dt(e,S).toLowerCase()===t.toLowerCase());e!=null&&(D(e!==N.initialValue),qe(e,n),j()&&L.commit(e))}Y.set(`forceMount`,!0),queueMicrotask(r)}}),id:z&&dt==null?`${z}-hidden-input`:void 0,form:u,name:dt,autoComplete:d,value:Ve,disabled:W,required:m&&!ut,readOnly:p,ref:lt,style:oe?B:ne,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ft]})})}function Lt(e){return e==null?void 0:`${e}-label`}function Rt(e,t){return e??t}function zt(t){let n=t.getBoundingClientRect(),r=e(t),i=r.getComputedStyle(t,`::before`),a=r.getComputedStyle(t,`::after`);if(!(i.content!==`none`||a.content!==`none`))return n;let o=parseFloat(i.width)||0,s=parseFloat(i.height)||0,c=parseFloat(a.width)||0,l=parseFloat(a.height)||0,u=Math.max(n.width,o,c),d=Math.max(n.height,s,l),f=u-n.width,p=d-n.height;return{left:n.left-f/2,right:n.right+f/2,top:n.top-p/2,bottom:n.bottom+p/2}}var Bt=2,Vt=400,Ht={...de,...dt,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Ut=Z.forwardRef(function(e,t){let{render:n,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:h,disabled:g}=mt(),{labelId:_}=_t(),{store:v,setOpen:y,selectionRef:b,validation:x,readOnly:S,required:C,alignItemWithTriggerActiveRef:w,disabled:T,keyboardActiveRef:ee}=at(),D=g||T||o,O=X(v,$.open),k=X(v,$.mounted),A=X(v,$.value),j=X(v,$.triggerProps),M=X(v,$.positionerElement),N=X(v,$.listElement),te=X(v,$.popupSide),P=X(v,$.id),F=X(v,$.labelId),I=X(v,$.hasSelectedValue),L=k&&M?te:null,ne=a??P,R=Rt(_,F);vt({id:ne});let re=we(M),z=Z.useRef(null),{getButtonProps:B,buttonRef:V}=p({disabled:D,native:s}),oe=ie(t,z,V,U(e=>{v.set(`triggerElement`,e)})),G=E(),K=E(),q=E();Z.useEffect(()=>{if(O)return q.start(Vt,()=>{b.current.allowUnselectedMouseUp=!0,b.current.allowSelectedMouseUp=!0}),()=>{q.clear()};b.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},K.clear()},[O,b,K,q]);let ce=H(j,{id:ne,role:`combobox`,"aria-expanded":O?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":O?N?.id??fe(M)?.id:void 0,"aria-labelledby":R,"aria-readonly":S||void 0,"aria-required":C||void 0,tabIndex:D?-1:0,ref:oe,onFocus(e){d(!0),O&&w.current&&y(!1,ae(ue,e.nativeEvent)),G.start(0,()=>{v.set(`forceMount`,!0)})},onBlur(e){se(M,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&x.commit(A))},onPointerMove(){ee.current=!1},onKeyDown(){ee.current=!0},onMouseDown(e){if(O)return;let t=m(e.currentTarget);function n(e){if(!z.current)return;let t=e.target;if(se(z.current,t)||se(re.current,t)||t===z.current)return;let n=zt(z.current);e.clientX>=n.left-Bt&&e.clientX<=n.right+Bt&&e.clientY>=n.top-Bt&&e.clientY<=n.bottom+Bt||y(!1,ae(W,e))}K.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},x.getValidationProps,l,B);ce.role=`combobox`;let J={...h,open:O,disabled:D,value:A,readOnly:S,popupSide:L,placeholder:!I};return r(`button`,e,{ref:[t,z],state:J,stateAttributesMapping:Ht,props:ce})}),Wt={value:()=>null},Gt=Z.forwardRef(function(e,t){let{className:n,render:i,children:a,placeholder:o,style:s,...c}=e,{store:l,valueRef:u}=at(),d=X(l,$.value),f=X(l,$.items),p=X(l,$.itemToStringLabel),m=X(l,$.hasSelectedValue),h=!m&&o!=null&&a==null,g=X(l,$.hasNullItemLabel,h),_={value:d,placeholder:!m},v=null;return v=typeof a==`function`?a(d):a??(!m&&o!=null&&!g?o:Array.isArray(d)?At(d,f,p):kt(d,f,p)),r(`span`,e,{state:_,ref:[t,u],props:[{children:v},c],stateAttributesMapping:Wt})}),Kt=Z.forwardRef(function(e,t){let{render:n,className:i,style:a,...o}=e,{store:s}=at();return r(`span`,e,{state:{open:X(s,$.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},o],stateAttributesMapping:Ce})}),qt=Z.createContext(void 0),Jt=Z.forwardRef(function(e,t){let{store:n}=at(),r=X(n,$.mounted),i=X(n,$.forceMount);return r||i?(0,Q.jsx)(qt.Provider,{value:!0,children:(0,Q.jsx)(ye,{ref:t,...e})}):null}),Yt=Z.createContext(void 0);function Xt(){let e=Z.useContext(Yt);if(!e)throw Error(v(59));return e}function Zt(e,t){e&&Object.assign(e.style,t)}var Qt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},$t=20;function en(e,t,n,r){let[i,a]=Z.useState(!1);V(()=>{if(!e||!t||n==null){a(!1);return}let r=m(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-$t)},[e,t,n]),D(e&&(!t||i),r)}var tn={position:`fixed`},nn=Z.forwardRef(function(e,r){let{anchor:i,positionMethod:a=`absolute`,className:o,render:s,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=n,style:y,...b}=e,{store:x,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:w,selectedItemTextRef:T,valuesRef:E,initialValueRef:ee,popupRef:D,setValue:O}=at(),k=ot(),A=X(x,$.open),j=X(x,$.mounted),M=X(x,$.modal),N=X(x,$.value),te=X(x,$.openMethod),P=X(x,$.positionerElement),F=X(x,$.triggerElement),I=X(x,$.isItemEqualToValue),L=X(x,$.transitionStatus),ne=Z.useRef(null),R=Z.useRef(null),[re,ie]=Z.useState(_),z=j&&re&&te!==`touch`;!j&&re!==_&&ie(_),V(()=>{j||($.scrollUpArrowVisible(x.state)&&x.set(`scrollUpArrowVisible`,!1),$.scrollDownArrowVisible(x.state)&&x.set(`scrollDownArrowVisible`,!1))},[x,j]),Z.useImperativeHandle(w,()=>z),en((z||M)&&A,te===`touch`,P,F);let B=ce({anchor:i,floatingRootContext:k,positionMethod:a,mounted:j,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g??z,collisionAvoidance:v,keepMounted:!0}),H=z?`none`:B.side,W=z?tn:B.positionerStyles,oe={open:A,side:H,align:B.align,anchorHidden:B.anchorHidden};V(()=>{x.set(`popupSide`,B.side)},[x,B.side]);let se=Se(e,oe,{styles:W,transitionStatus:L,props:b,refs:[r,U(e=>{x.set(`positionerElement`,e)})],hidden:!j,inert:!A}),K=Z.useRef(0),q=U(e=>{if(e.size===0&&K.current===0||E.current.length===0)return;let t=K.current;if(K.current=e.size,e.size===t)return;let n=ae(ue);if(t!==0&&!x.state.multiple&&N!==null&&St(E.current,N,I)===-1){let e=ee.current,t=e!=null&&St(E.current,e,I)!==-1?e:null;O(t,n),t===null&&(x.set(`selectedIndex`,null),T.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(N)){let e=e=>St(E.current,e,I)!==-1,t=N.filter(t=>e(t));(t.length!==N.length||t.some(e=>!xt(N,e,I)))&&(O(t,n),t.length===0&&(x.set(`selectedIndex`,null),T.current=null))}if(A&&z){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Zt(P,e),Zt(D.current,e)}}),J=Z.useMemo(()=>({...B,side:H,alignItemWithTriggerActive:z,setControlledAlignItemWithTrigger:ie,scrollUpArrowRef:ne,scrollDownArrowRef:R}),[B,H,z,ie]);return(0,Q.jsx)(He,{elementsRef:S,labelsRef:C,onMapChange:q,children:(0,Q.jsxs)(Yt.Provider,{value:J,children:[j&&M&&(0,Q.jsx)(t,{inert:G(!A),cutout:F}),se]})})}),rn=`base-ui-disable-scrollbar`,an={className:rn,getElement(e){return(0,Q.jsx)(`style`,{nonce:e,href:rn,precedence:`base-ui:low`,children:`.${rn}{scrollbar-width:none}.${rn}::-webkit-scrollbar{display:none}`})}},on=Z.createContext(void 0);function sn(e){let t=Z.useContext(on);if(t===void 0&&!e)throw Error(v(69));return t}var cn={...J,...Y},ln=Z.forwardRef(function(t,n){let{render:i,className:a,style:o,finalFocus:s,...c}=t,{store:l,popupRef:u,onOpenChangeComplete:f,setOpen:p,valueRef:h,firstItemTextRef:g,selectedItemTextRef:_,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:C,scrollHandlerRef:T,listRef:E,highlightItemOnHover:ee}=at(),{side:D,align:O,alignItemWithTriggerActive:k,isPositioned:A,setControlledAlignItemWithTrigger:j,scrollDownArrowRef:M,scrollUpArrowRef:N}=Xt(),te=sn(!0)!=null,P=ot(),F=be(),{nonce:I,disableStyleElements:L}=nt(),ne=X(l,$.id),R=X(l,$.open),re=X(l,$.mounted),ie=X(l,$.popupProps),z=X(l,$.transitionStatus),B=X(l,$.triggerElement),H=X(l,$.positionerElement),W=X(l,$.listElement),oe=Z.useRef(!1),G=Z.useRef(!1),se=Z.useRef({}),K=b(),q=U(e=>{if(!H||!u.current||!G.current)return;if(oe.current||!k){C();return}let t=H.style.top===`0px`,n=H.style.bottom===`0px`;if(!t&&!n){C();return}let r=fn(H),i=pn(H.getBoundingClientRect().height,`y`,r),a=m(H),o=getComputedStyle(H),s=parseFloat(o.marginTop),c=parseFloat(o.marginBottom),l=un(getComputedStyle(u.current)),d=Math.min(a.documentElement.clientHeight-s-c,l),f=e.scrollTop,p=dn(e),h=0,g=null,_=!1,v=!1,y=e=>{H.style.height=`${e}px`},b=(t,n)=>{let r=Nt(t,0,d-i);r>0&&y(i+r),e.scrollTop=n,d-(i+r)<=1&&(oe.current=!0),C()},x=t?p-f:f,S=Math.min(i+x,d);if(h=S,x<=1){b(x,t?p:0);return}if(d-S>1?t?v=!0:g=0:(_=!0,n&&f<p&&(g=f-(x-(i+x-d)))),h=Math.ceil(h),h!==0&&y(h),v||g!=null){let t=dn(e),n=v?t:Nt(g,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(_||h>=d-1)&&(oe.current=!0),C()});Z.useImperativeHandle(T,()=>q,[q]),pe({open:R,ref:u,onComplete(){R&&f?.(!0)}});let ce={open:R,transitionStatus:z,side:D,align:O};V(()=>{!H||!u.current||Object.keys(se.current).length||(se.current={top:H.style.top||`0`,left:H.style.left||`0`,right:H.style.right,height:H.style.height,bottom:H.style.bottom,minHeight:H.style.minHeight,maxHeight:H.style.maxHeight,marginTop:H.style.marginTop,marginBottom:H.style.marginBottom})},[u,H]),V(()=>{R||k||(G.current=!1,oe.current=!1,Zt(H,se.current))},[R,k,H,u]),V(()=>{let t=u.current;if(!R||!B||!H||!t||k&&!A||l.state.transitionStatus===`ending`)return;if(!k){G.current=!0,K.request(C),t.style.removeProperty(`--transform-origin`);return}let n=gn(t);t.style.removeProperty(`--transform-origin`);try{let n=_.current;n?.isConnected||(n=!$.hasSelectedValue(l.state)&&g.current?.isConnected?g.current:null);let r=h.current,i=getComputedStyle(H),a=getComputedStyle(t),o=m(B),s=e(H),c=fn(B),u=mn(B.getBoundingClientRect(),c),d=mn(H.getBoundingClientRect(),c),f=u.height,p=W||t,v=p.scrollHeight,y=parseFloat(a.borderBottomWidth),b=parseFloat(i.marginTop)||10,x=parseFloat(i.marginBottom)||10,S=parseFloat(i.minHeight)||100,T=un(a),D=o.documentElement.clientHeight-b-x,O=o.documentElement.clientWidth,k=D-u.bottom+f,A,M=F===`rtl`?u.right-d.width:u.left,N=0;if(n&&r){let e=mn(r.getBoundingClientRect(),c);A=mn(n.getBoundingClientRect(),c),M=d.left+(F===`rtl`?e.right-A.right:e.left-A.left);let t=e.top-u.top+e.height/2;N=A.top-d.top+A.height/2-t}let te=k+N+x+y,P=Math.min(D,te),I=D-b-x,L=te-P,ne=O-5;H.style.left=`${Nt(M,5,ne-d.width)}px`,H.style.height=`${P}px`,H.style.maxHeight=`auto`,H.style.marginTop=`${b}px`,H.style.marginBottom=`${x}px`,t.style.height=`100%`;let R=dn(p),re=L>=R-1;re&&(P=Math.min(D,d.height)-(L-R));let ie=u.top<20||u.bottom>D-20||Math.ceil(P)+1<Math.min(v,S),z=(s.visualViewport?.scale??1)!==1&&w;if(ie||z){G.current=!0,Zt(H,se.current),j(!1);return}let V=Math.max(S,P);if(re){let e=Math.max(0,D-te);H.style.top=d.height>=I?`0`:`${e}px`,H.style.height=`${P}px`,p.scrollTop=dn(p)}else H.style.bottom=`0`,p.scrollTop=L;if(A){let e=d.top,n=d.height,r=A.top+A.height/2,i=Nt(n>0?(r-e)/n*100:50,0,100);t.style.setProperty(`--transform-origin`,`50% ${i}%`)}(V===D||P>=T)&&(oe.current=!0),C(),ee&&l.state.selectedIndex===null&&l.state.activeIndex===null&&E.current[0]!=null&&l.set(`activeIndex`,0),G.current=!0}finally{n()}},[l,R,H,B,h,g,_,u,C,k,j,K,M,N,W,E,ee,F,A]),Z.useEffect(()=>{if(!k||!H||!R)return;let t=e(H);function n(e){p(!1,ae(me,e))}return y(t,`resize`,n)},[p,k,H,R]);let J={...W?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":S||void 0,id:`${ne}-list`},onKeyDown(e){v.current=!0,te&&x.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onScroll(e){W||q(e.currentTarget)},...k&&{style:W?{height:`100%`}:Qt}},le=r(`div`,t,{ref:[n,u],state:ce,stateAttributesMapping:cn,props:[ie,J,Ee(z),{className:!W&&k?an.className:void 0},c]});return(0,Q.jsxs)(Z.Fragment,{children:[!L&&an.getElement(I),(0,Q.jsx)(d,{context:P,modal:!1,disabled:!re,returnFocus:s,restoreFocus:!0,children:le})]})});function un(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function dn(e){return Pt(e.scrollHeight,e.clientHeight)}function fn(e){return s.getScale(e)}function pn(e,t,n){return e/n[t]}function mn(e,t){return g({x:pn(e.x,`x`,t),y:pn(e.y,`y`,t),width:pn(e.width,`x`,t),height:pn(e.height,`y`,t)})}var hn=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function gn(e){let{style:t}=e,n={};for(let[e,r]of hn)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of hn){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var _n=Z.forwardRef(function(e,t){let{render:n,className:i,style:a,...o}=e,{store:s,scrollHandlerRef:c}=at(),{alignItemWithTriggerActive:l}=Xt(),u=X(s,$.hasScrollArrows),d=X(s,$.openMethod),f=X(s,$.multiple),p={id:`${X(s,$.id)}-list`,role:`listbox`,"aria-multiselectable":f||void 0,onScroll(e){c.current?.(e.currentTarget)},...l&&{style:Qt},className:u&&d!==`touch`?an.className:void 0};return r(`div`,e,{ref:[t,U(e=>{s.set(`listElement`,e)})],props:[p,o]})}),vn=Z.createContext(void 0);function yn(){let e=Z.useContext(vn);if(!e)throw Error(v(57));return e}var bn=Z.memo(Z.forwardRef(function(e,t){let{render:n,className:i,style:a,value:o=null,label:s,disabled:c=!1,nativeButton:l=!1,...d}=e,f=Z.useRef(null),m=Ve({label:s,textRef:f,indexGuessBehavior:Ue.GuessFromOrder}),{store:h,itemProps:g,setOpen:_,setValue:v,selectionRef:y,typingRef:b,valuesRef:x,multiple:S,selectedItemTextRef:C}=at(),w=X(h,$.isActive,m.index),T=X(h,$.isSelected,m.index,o),E=X(h,$.isSelectedByFocus,m.index),ee=X(h,$.isItemEqualToValue),D=m.index,O=D!==-1,k=Z.useRef(null);V(()=>{if(!O)return;let e=x.current;return e[D]=o,()=>{delete e[D]}},[O,D,o,x]),V(()=>{if(!O)return;let e=h.state.value,t=e;S&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&bt(o,t,ee)&&(h.set(`selectedIndex`,D),f.current&&(C.current=f.current))},[O,D,S,ee,h,o,C]);let A=Z.useRef(null),j=Z.useRef(`mouse`),M=Z.useRef(!1),{getButtonProps:N,buttonRef:te}=p({disabled:c,focusableWhenDisabled:!0,native:l,composite:!0}),P={disabled:c,selected:T,highlighted:w};function F(e){let t=h.state.value;if(S){let n=Array.isArray(t)?t:[];v(T?Ct(n,o,ee):[...n,o],ae(q,e))}else v(o,ae(q,e)),_(!1,ae(q,e))}function I(){y.current.dragY=0}let L={role:`option`,"aria-selected":T,tabIndex:w?0:-1,onKeyDown(e){A.current=e.key,h.set(`activeIndex`,D),e.key===` `&&b.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&j.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&u(e.nativeEvent)&&(n!==void 0||w),i=t&&!r&&!M.current;M.current=!1,!(e.type===`keydown`&&A.current===null)&&(c||e.type===`keydown`&&A.current===` `&&b.current||i||(A.current=null,F(e.nativeEvent)))},onPointerEnter(e){j.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=y.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){j.current=e.pointerType,M.current=!0,I()},onMouseUp(){if(I(),c||j.current===`touch`||M.current)return;let e=!y.current.allowSelectedMouseUp&&T,t=!y.current.allowUnselectedMouseUp&&!T;e||t||(M.current=!0,k.current?.click(),M.current=!1)}},ne=r(`div`,e,{ref:[te,t,m.ref,k],state:P,props:[g,L,d,N]}),R=Z.useMemo(()=>({selected:T,index:D,textRef:f,selectedByFocus:E,hasRegistered:O}),[T,D,f,E,O]);return(0,Q.jsx)(vn.Provider,{value:R,children:ne})})),xn=Z.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=yn();return n||r?(0,Q.jsx)(Sn,{...e,ref:t}):null}),Sn=Z.memo(Z.forwardRef((e,t)=>{let{render:n,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=yn(),l=Z.useRef(null),{transitionStatus:u,setMounted:d}=Ie(c),f=r(`span`,e,{ref:[t,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:Y});return pe({open:c,ref:l,onComplete(){c||d(!1)}}),f})),Cn=Z.memo(Z.forwardRef(function(e,t){let{index:n,textRef:i,selectedByFocus:a,hasRegistered:o}=yn(),{firstItemTextRef:s,selectedItemTextRef:c}=at(),{render:l,className:u,style:d,...f}=e;return r(`div`,e,{ref:[Z.useCallback(e=>{e&&(o&&n===0&&(s.current=e),o&&a&&(c.current=e))},[s,c,n,a,o]),t,i],props:f})})),wn=Z.forwardRef(function(e,t){let{render:n,className:i,style:a,direction:o,keepMounted:s=!1,...c}=e,l=o===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=at(),{side:h,scrollDownArrowRef:g,scrollUpArrowRef:_}=Xt(),v=X(u,l?$.scrollUpArrowVisible:$.scrollDownArrowVisible),y=X(u,$.openMethod),b=v&&y!==`touch`,x=E(),S=l?_:g,{transitionStatus:C,setMounted:w}=Ie(b);V(()=>(m.current+=1,u.state.hasScrollArrows||u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.state.hasScrollArrows&&u.set(`hasScrollArrows`,!1)}),[u,m]),pe({open:b,ref:S,onComplete(){b||w(!1)}});let T=r(`div`,e,{ref:[t,S],state:{direction:o,visible:b,side:h,transitionStatus:C},props:[{"aria-hidden":!0,children:l?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||x.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p();let n=Pt(e.scrollHeight,e.clientHeight),r=Ft(e.scrollTop,n),i=r===(l?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&u.set(l?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){x.clear();return}if(a.length>0){let t=S.current?.offsetHeight||0;e.scrollTop=Tn(a,l,r,e.clientHeight,t,n)}x.start(40,t)}x.start(40,t)},onMouseLeave(){x.clear()}},c]});return b||s?T:null});function Tn(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?Ft(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?Ft(l.offsetTop+l.offsetHeight-r+i,a):a}var En=Z.forwardRef(function(e,t){return(0,Q.jsx)(wn,{...e,ref:t,direction:`down`})}),Dn=Z.forwardRef(function(e,t){return(0,Q.jsx)(wn,{...e,ref:t,direction:`up`})}),On=Z.createContext(void 0),kn=Z.forwardRef(function(e,t){let{render:n,className:i,style:a,...o}=e,[s,c]=Z.useState(),l=Z.useMemo(()=>({labelId:s,setLabelId:c}),[s,c]),u=r(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":s},o]});return(0,Q.jsx)(On.Provider,{value:l,children:u})}),An=It;function jn({className:e,...t}){return(0,Q.jsx)(kn,{"data-slot":`select-group`,className:S(`scroll-my-1 p-1`,e),...t})}function Mn({className:e,...t}){return(0,Q.jsx)(Gt,{"data-slot":`select-value`,className:S(`flex flex-1 text-left`,e),...t})}function Nn({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(Ut,{"data-slot":`select-trigger`,"data-size":t,className:S(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,e),...r,children:[n,(0,Q.jsx)(Kt,{render:(0,Q.jsx)(ze,{className:`pointer-events-none size-3.5 text-muted-foreground`})})]})}function Pn({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,Q.jsx)(Jt,{children:(0,Q.jsx)(nn,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(ln,{"data-slot":`select-content`,"data-align-trigger":o,className:S(`dark relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[(0,Q.jsx)(In,{}),(0,Q.jsx)(_n,{children:t}),(0,Q.jsx)(Ln,{})]})})})}function Fn({className:e,children:t,...n}){return(0,Q.jsxs)(bn,{"data-slot":`select-item`,className:S(`relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Q.jsx)(Cn,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(xn,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`}),children:(0,Q.jsx)(Re,{className:`pointer-events-none`})})]})}function In({className:e,...t}){return(0,Q.jsx)(Dn,{"data-slot":`select-scroll-up-button`,className:S(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5`,e),...t,children:(0,Q.jsx)(We,{})})}function Ln({className:e,...t}){return(0,Q.jsx)(En,{"data-slot":`select-scroll-down-button`,className:S(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5`,e),...t,children:(0,Q.jsx)(ze,{})})}export{mt as A,Ct as C,ht as D,_t as E,Ze as F,dt as M,nt as N,ft as O,Qe as P,St as S,vt as T,Tt as _,Nn as a,bt as b,an as c,Lt as d,Rt as f,Et as g,Mt as h,Fn as i,lt as j,pt as k,en as l,Nt as m,Pn as n,Mn as o,Ft as p,jn as r,sn as s,An as t,zt as u,Dt as v,xt as w,yt as x,Ot as y};
|