@hot-updater/console 1.2.0-rc.34 → 1.2.0-rc.36
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-DNupPw5R.js +1 -0
- package/.output/public/assets/{CompositeItem-CyQoQkYs.js → CompositeItem-CcgQyrSU.js} +1 -1
- package/.output/public/assets/{ConsoleFeatureUnavailable-C0iDIboF.js → ConsoleFeatureUnavailable-P2up1IkX.js} +1 -1
- package/.output/public/assets/{EventDetails-DFWS-HcW.js → EventDetails-BYZUOYsT.js} +1 -1
- package/.output/public/assets/{HashValueDisplay-DKziWjEg.js → HashValueDisplay-N89T2mVj.js} +1 -1
- package/.output/public/assets/{InsightsPageHeader-BATHTZWn.js → InsightsPageHeader-DhOT-Tmn.js} +1 -1
- package/.output/public/assets/IosInstall-BkjuGzx0.js +1 -0
- package/.output/public/assets/{NativeBuildsNav-D3FIlSu0.js → NativeBuildsNav-CivF1UpI.js} +1 -1
- package/.output/public/assets/{RelativeTime-CP7nosYx.js → RelativeTime-CAIee8Fr.js} +1 -1
- package/.output/public/assets/RolloutPercentageBadge-BmtfOGOm.js +1 -0
- package/.output/public/assets/{RowReason-D7TZ2xwW.js → RowReason-Cuf4SbKm.js} +1 -1
- package/.output/public/assets/{SandboxBadge-BPf2uve4.js → SandboxBadge-Cn1mlvQg.js} +1 -1
- package/.output/public/assets/{TargetDisplay-DzSkf5yP.js → TargetDisplay-DeKn2_3n.js} +1 -1
- package/.output/public/assets/api-USY_IWMu.js +1 -0
- package/.output/public/assets/api-keys-Bjv4olzj.js +1 -0
- package/.output/public/assets/api-keys-CrrBMw2x.js +1 -0
- package/.output/public/assets/{uuidv7-DgXZ1zRR.js → constants-CNrAvpew.js} +1 -1
- package/.output/public/assets/dist-BDfiL2Qz.js +1 -0
- package/.output/public/assets/{index-CccnEzaa.js → index-DHcRzryp.js} +3 -3
- package/.output/public/assets/insights-9CSkLhLx.js +2 -0
- package/.output/public/assets/{insights-Bm4Kua5R.js → insights-BGMOFCgn.js} +2 -2
- package/.output/public/assets/insights-QaHXTgmd.js +1 -0
- package/.output/public/assets/insights-search-Bax3nNBz.js +1 -0
- package/.output/public/assets/{insights-usage-rpc-DdmD1Nuy.js → insights-usage-rpc-BG7EOn2n.js} +1 -1
- package/.output/public/assets/insights_.distribution-BfEb7XIX.js +1 -0
- package/.output/public/assets/insights_.distribution-Ce5y7hIU.js +2 -0
- package/.output/public/assets/insights_.distribution-gCONJgiU.js +1 -0
- package/.output/public/assets/installations-BKAdFmTM.js +1 -0
- package/.output/public/assets/{installations-DYT2mSjX.js → installations-BfbwP-Ub.js} +2 -2
- package/.output/public/assets/installations-D5bvOxlY.js +1 -0
- package/.output/public/assets/native-builds-CrRx3_wN.js +1 -0
- package/.output/public/assets/native-builds-FBNFjP4d.js +1 -0
- package/.output/public/assets/native-builds-FpedinKi.js +2 -0
- package/.output/public/assets/native-builds_._buildId-D0Y_qtSu.js +2 -0
- package/.output/public/assets/native-builds_._buildId-UU2Ja88v.js +1 -0
- package/.output/public/assets/native-builds_.devices-B0GrWGwS.js +2 -0
- package/.output/public/assets/native-builds_.devices-DossOQcr.js +1 -0
- package/.output/public/assets/remote-config-9h5s5yCy.js +1 -0
- package/.output/public/assets/{remote-config-D1EMK2er.js → remote-config-BbLyVNLo.js} +1 -1
- package/.output/public/assets/remote-config-CqFs9CSU.js +6 -0
- package/.output/public/assets/routes-BV7VD8Tr.js +1 -0
- package/.output/public/assets/routes-COOKrhya.js +2 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-CUEijItf.mjs → __23tanstack-start-server-fn-resolver-DEsK7hJ-.mjs} +58 -58
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_libs/lucide-react.mjs +13 -1
- package/.output/server/_ssr/{-native-builds-search-OJ8XmaBa.mjs → -native-builds-search-woFrbAdI.mjs} +19 -7
- package/.output/server/_ssr/{BundleIdDisplay-C2Yhau3H.mjs → BundleIdDisplay-BLXpHocZ.mjs} +2 -2
- package/.output/server/_ssr/{ChannelBadge-BTUSgvbr.mjs → ChannelBadge-CWIc9tmb.mjs} +3 -3
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BDSJSs7U.mjs → ConsoleFeatureUnavailable-B4w26Z-l.mjs} +7 -7
- package/.output/server/_ssr/{EventDetails-wqpPsSDt.mjs → EventDetails-CnAKWnvZ.mjs} +8 -8
- package/.output/server/_ssr/{HashValueDisplay-yosN9R32.mjs → HashValueDisplay-DbMfscEm.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-DUvHESff.mjs → InsightsPageHeader-CGB3vsS1.mjs} +8 -8
- package/.output/server/_ssr/{IosInstall-DAZxDeBB.mjs → IosInstall-D9zJGmaC.mjs} +9 -9
- package/.output/server/_ssr/{NativeBuildsNav-JvQo5YkG.mjs → NativeBuildsNav-CEKiVJZ2.mjs} +3 -3
- package/.output/server/_ssr/{NotFoundPage-Z48ip8aB.mjs → NotFoundPage-DZ6L0Lix.mjs} +2 -2
- package/.output/server/_ssr/{PlatformIcon-X18AN8Yp.mjs → PlatformIcon-C22qEcwo.mjs} +1 -1
- package/.output/server/_ssr/{QrCode-NrGOfAPX.mjs → QrCode-Be-7de3s.mjs} +2 -2
- package/.output/server/_ssr/{RelativeTime-BiGH0j0S.mjs → RelativeTime-B2N63vu0.mjs} +4 -4
- package/.output/server/_ssr/{RolloutPercentageBadge-O0jbSRuI.mjs → RolloutPercentageBadge-DgyHwvnj.mjs} +3 -3
- package/.output/server/_ssr/{RowReason-DneEz--P.mjs → RowReason-DOCMSWpB.mjs} +5 -5
- package/.output/server/_ssr/{SandboxBadge-ujAuQ6FN.mjs → SandboxBadge-DVOkxy3O.mjs} +2 -2
- package/.output/server/_ssr/{TargetDisplay-DFV5VpPn.mjs → TargetDisplay-DcY84JrG.mjs} +3 -3
- package/.output/server/_ssr/{alert-dialog-B2IG3q93.mjs → alert-dialog-Bj6jW5-Q.mjs} +1 -1
- package/.output/server/_ssr/{api-CHpFJ_c4.mjs → api-BYa88in2.mjs} +13 -10
- package/.output/server/_ssr/{api-keys-ZufcGzhb.mjs → api-keys-C3gWr3Qj.mjs} +10 -10
- package/.output/server/_ssr/{api-keys-DpSj11mK.mjs → api-keys-CIB4jF6t.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-N3V7gkvv.mjs → api-keys-rpc-CtMsJx1w.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-DXvqIbGs.mjs → api-rpc-sxif8D9h.mjs} +16 -16
- package/.output/server/_ssr/{auth-rpc-Cx72ajwL.mjs → auth-rpc-DYXg2d-s.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DT4SuI6u.mjs → auth.server-BCtkdsmT.mjs} +25 -8
- package/.output/server/_ssr/{badge-DNrlMwwO.mjs → badge-DVmF0rbO.mjs} +1 -1
- package/.output/server/_ssr/{bundleActivity-a-pEDiqu.mjs → bundleActivity-CjE9yslP.mjs} +1 -1
- package/.output/server/_ssr/{card-BSFwWT9T.mjs → card-C7gkmtDR.mjs} +1 -1
- package/.output/server/_ssr/{config.server-BEg-Ln3t.mjs → config.server-D5yjc-Hm.mjs} +3 -3
- package/.output/server/_ssr/{console-access-CPYdc4mK.mjs → console-access-MNaEuKXy.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-D_KFX0JV.mjs → console-features-api-B8PfM6k1.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-CSogovr5.mjs → console-features-rpc-Dl1bAdxy.mjs} +3 -3
- package/.output/server/_ssr/constants-B8b1IliD.mjs +8 -0
- package/.output/server/_ssr/{deviceProfileToken-xzDLfE0T.mjs → deviceProfileToken-Eeltr-o0.mjs} +1 -1
- package/.output/server/_ssr/{dialog-BE-0BoPu.mjs → dialog-COs-Oov4.mjs} +1 -1
- package/.output/server/_ssr/{downloadBundle-C1KOnpiF.mjs → downloadBundle-DLkb7A7E.mjs} +1 -1
- package/.output/server/_ssr/{empty-DVeNY_6z.mjs → empty-BCi8eUlp.mjs} +2 -2
- package/.output/server/_ssr/{failureReports-BVufgM3l.mjs → failureReports-Bd7CaadE.mjs} +3 -3
- package/.output/server/_ssr/{field-C_NBjv_7.mjs → field-D7na2Ch2.mjs} +2 -2
- package/.output/server/_ssr/{foldedPage-CUjJqtlF.mjs → foldedPage-DrxWt5XS.mjs} +1 -1
- package/.output/server/_ssr/{getBundleChildren-CnOf4Frp.mjs → getBundleChildren-DA9zbUBD.mjs} +1 -1
- package/.output/server/_ssr/{input-group-CGiryg7I.mjs → input-group-B64ZFSYp.mjs} +1 -1
- package/.output/server/_ssr/{insights-hDsGL-yq.mjs → insights-B9kdn-hT.mjs} +29 -28
- package/.output/server/_ssr/{insights-DNNsxJlD.mjs → insights-DaaYBkr3.mjs} +5 -5
- package/.output/server/_ssr/{insights-ECnoz9jp.mjs → insights-Do0mUArh.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-DvbUK1vp.mjs → insights-api-C6hqqqUk.mjs} +5 -5
- package/.output/server/_ssr/{insights-errors-DwUaDs0Z.mjs → insights-errors-BrToSfI9.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-DGO2_3Vx.mjs → insights-failures-lmcxwKb3.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-DCu8iR4V.mjs → insights-failures-rpc-k6uyvIeh.mjs} +8 -8
- package/.output/server/_ssr/{insights-recovery-Cdg3Msrj.mjs → insights-recovery-Dhg3WGpC.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc-Bla1PuCq.mjs → insights-recovery-rpc-DPW8WjEX.mjs} +5 -5
- package/.output/server/_ssr/{insights-rpc-ViJh0Q-s.mjs → insights-rpc-DDLtqUqS.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-DfEqsfAa.mjs → insights-search-BxLGFC2Y.mjs} +3 -5
- package/.output/server/_ssr/{insights-usage-BVm7CDw9.mjs → insights-usage-gW3T5N6N.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-DWSPBftd.mjs → insights-usage-rpc-_3iuUmaJ.mjs} +5 -5
- package/.output/server/_ssr/{insights-usage-rpc-CLsYlcnO.mjs → insights-usage-rpc-a9HwsRB_.mjs} +4 -4
- package/.output/server/_ssr/{insightsUsage-lPKyRC2o.mjs → insightsUsage-B_7pM9wp.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-6t26Hce4.mjs → insights_.distribution-BjWQk0tw.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-CbZmys6X.mjs → insights_.distribution-CCCQgeXp.mjs} +16 -16
- package/.output/server/_ssr/{insights_.distribution-Bj054JTo.mjs → insights_.distribution-DTvhOF_Z.mjs} +5 -5
- package/.output/server/_ssr/{installations-BOzetKfl.mjs → installations-BgKaxLj8.mjs} +2 -2
- package/.output/server/_ssr/{installations-ARFvJMie.mjs → installations-DZoaae-j.mjs} +12 -12
- package/.output/server/_ssr/{installations-CL-nVRbZ.mjs → installations-IiZ1O2zJ.mjs} +4 -4
- package/.output/server/_ssr/{ios-devices-rpc-Xln3pLFJ.mjs → ios-devices-rpc-mzVC4RTM.mjs} +8 -8
- package/.output/server/_ssr/{iosDeviceCookie-BG4X3Kbt.mjs → iosDeviceCookie-LOJ7WfKJ.mjs} +5 -5
- package/.output/server/_ssr/{iosDeviceProfile-C8NvflH9.mjs → iosDeviceProfile-DtTmTG9a.mjs} +6 -6
- package/.output/server/_ssr/{iosDevices-Ck5ko5IX.mjs → iosDevices-DC-DR7X-.mjs} +3 -3
- package/.output/server/_ssr/{listReleases-QF91GLE7.mjs → listReleases-B2Q9xwFv.mjs} +3 -3
- package/.output/server/_ssr/{native-artifact-BRNP_q-y.mjs → native-artifact-BurROe05.mjs} +43 -2
- package/.output/server/_ssr/{native-builds-nRuXKypG.mjs → native-builds-Bnx0fVWs.mjs} +10 -5
- package/.output/server/_ssr/{native-builds-B70NqL0z.mjs → native-builds-DBVS616m.mjs} +63 -32
- package/.output/server/_ssr/{native-builds-6Kq2Pamq.mjs → native-builds-uMIPDSmT.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-B4uQUP7t.mjs → native-builds_._buildId-BmB6oLsi.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-zbXBoGs8.mjs → native-builds_._buildId-CfYzRkoT.mjs} +61 -45
- package/.output/server/_ssr/{native-builds_.devices-OLR3gTfc.mjs → native-builds_.devices-CBoAFcVA.mjs} +18 -18
- package/.output/server/_ssr/{native-builds_.devices-DcgdiEiK.mjs → native-builds_.devices-PvBuqXp0.mjs} +3 -3
- package/.output/server/_ssr/{nativeBuildDownloadLink-DHsPiwsg.mjs → nativeBuildDownloadLink-B-Slw1_O.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-DnpC3dUR.mjs → nativeBuildInstall-_vrEhN0E.mjs} +8 -8
- package/.output/server/_ssr/{nativeBuilds-DaF-TcfO.mjs → nativeBuilds-WKdqgemR.mjs} +7 -7
- package/.output/server/_ssr/{publicConsoleBase-wTKw3_iB.mjs → publicConsoleBase-C3sNbafy.mjs} +1 -1
- package/.output/server/_ssr/{release-adoption-gfhE5tz5.mjs → release-adoption-D2719HVh.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-C8oj79w3.mjs → release-adoption-rpc-BsUYFCSo.mjs} +7 -7
- package/.output/server/_ssr/{releaseAdoption-DfEYq7I4.mjs → releaseAdoption-CxGKmUXx.mjs} +4 -4
- package/.output/server/_ssr/{releaseReachability-Ch1JpJkY.mjs → releaseReachability-sWr0bLRk.mjs} +1 -1
- package/.output/server/_ssr/{remote-config-DOinV02U.mjs → remote-config-D-8SQ4po.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-MEFtxtmM.mjs → remote-config-DQzpUpwK.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-ClsnMl5Y.mjs → remote-config-ZObJS2_F.mjs} +20 -20
- package/.output/server/_ssr/{remote-config-rpc-CCPIk5TC.mjs → remote-config-rpc-COjwhaa3.mjs} +3 -3
- package/.output/server/_ssr/{router-jomm2ZkW.mjs → router-DFO8ezEY.mjs} +37 -37
- package/.output/server/_ssr/{routes-D0sAXxvj.mjs → routes-B0kFLck5.mjs} +96 -44
- package/.output/server/_ssr/{routes-YuEmTB66.mjs → routes-DLdhFkXy.mjs} +48 -14
- package/.output/server/_ssr/{schema-migration-rpc-CzOI4qIc.mjs → schema-migration-rpc-BTlEpk00.mjs} +3 -3
- package/.output/server/_ssr/{select-jxef2GHj.mjs → select-l3hYdF9p.mjs} +2 -2
- package/.output/server/_ssr/{server-DowlVz8B.mjs → server-Dsb2hUyp.mjs} +4 -4
- package/.output/server/_ssr/{sidebar-DbK9IOE6.mjs → sidebar-DU3F2THA.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BaUpXI0L.mjs → start-BXlykDIg.mjs} +1 -1
- package/.output/server/_ssr/{switch-PuW4wKem.mjs → switch-B_NczfZN.mjs} +2 -2
- package/.output/server/_ssr/{table-CTjtU7u0.mjs → table-DScwmE5W.mjs} +1 -1
- package/.output/server/_ssr/{tabs-CYGM4B-P.mjs → tabs-DodX8IAE.mjs} +2 -2
- package/.output/server/_ssr/{updateFailures-BwDwIoNu.mjs → updateFailures-DGuFoK6A.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-Dzfgn9EO.mjs → _tanstack-start-manifest_v-D4QtfwLE.mjs} +94 -95
- package/.output/server/index.mjs +311 -318
- package/package.json +7 -7
- package/src/components/features/insights/AppUsage.tsx +3 -5
- package/src/components/features/insights/InsightsControls.tsx +2 -2
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +21 -5
- package/src/components/features/native-builds/InstallCard.tsx +32 -24
- package/src/components/features/native-builds/IosInstall.tsx +3 -2
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +2 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +79 -21
- package/src/components/features/native-builds/NativeBuildsTable.tsx +8 -6
- package/src/components/features/native-builds/PatchesCard.tsx +28 -20
- package/src/lib/api-rpc.ts +2 -1
- package/src/lib/api.ts +10 -2
- package/src/lib/constants.ts +12 -0
- package/src/lib/insights-search.ts +0 -3
- package/src/lib/native-builds.ts +10 -3
- package/src/lib/server/nativeBuildInstall.ts +3 -1
- package/src/lib/server/nativeBuilds.ts +15 -8
- package/src/routes/-native-builds-search.ts +32 -4
- package/src/routes/-releases-search.ts +63 -2
- package/src/routes/index.tsx +113 -29
- package/src/routes/insights.tsx +3 -5
- package/src/routes/insights_.distribution.tsx +2 -2
- package/.output/public/assets/-native-builds-search-BvCftqF2.js +0 -1
- package/.output/public/assets/IosInstall-DsKczesK.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-DnmU8XbU.js +0 -1
- package/.output/public/assets/api-B1z_XXrQ.js +0 -1
- package/.output/public/assets/api-keys-C_u_ZmPS.js +0 -1
- package/.output/public/assets/api-keys-DPuPM7ag.js +0 -1
- package/.output/public/assets/dist-BEIz5ojx.js +0 -1
- package/.output/public/assets/insights-CpnFoyo5.js +0 -2
- package/.output/public/assets/insights-MQrx_wbP.js +0 -1
- package/.output/public/assets/insights-search-CtEcj6lz.js +0 -1
- package/.output/public/assets/insights_.distribution-Bjo0aQE4.js +0 -1
- package/.output/public/assets/insights_.distribution-Dd2mYz8D.js +0 -2
- package/.output/public/assets/insights_.distribution-REbBAqgL.js +0 -1
- package/.output/public/assets/installations-Di02gX_V.js +0 -1
- package/.output/public/assets/installations-iqDa8KPW.js +0 -1
- package/.output/public/assets/native-builds-7sC78eTq.js +0 -1
- package/.output/public/assets/native-builds-BOSmoLed.js +0 -1
- package/.output/public/assets/native-builds-CXDwW54k.js +0 -2
- package/.output/public/assets/native-builds_._buildId-C7-yUwvH.js +0 -2
- package/.output/public/assets/native-builds_._buildId-u5dG7ej5.js +0 -1
- package/.output/public/assets/native-builds_.devices-CQ_tB3SO.js +0 -1
- package/.output/public/assets/native-builds_.devices-C_YZoRxB.js +0 -2
- package/.output/public/assets/refresh-cw-CpCxPYma.js +0 -1
- package/.output/public/assets/remote-config-CD50k2u7.js +0 -6
- package/.output/public/assets/remote-config-Dmuqm9xx.js +0 -1
- package/.output/public/assets/routes-Dj_ukxU_.js +0 -2
- package/.output/public/assets/routes-DvCD6Kib.js +0 -1
- /package/.output/public/assets/{BundleIdDisplay-D8oR8mcP.js → BundleIdDisplay-Bm85NZma.js} +0 -0
- /package/.output/public/assets/{ChannelBadge-Do-lWsLM.js → ChannelBadge-B04sTjw5.js} +0 -0
- /package/.output/public/assets/{NotFoundPage-CijSy63W.js → NotFoundPage-DUWkihqx.js} +0 -0
- /package/.output/public/assets/{PlatformIcon-Kq3q98tU.js → PlatformIcon-CZjIJt0C.js} +0 -0
- /package/.output/public/assets/{QrCode-D3-Vuudy.js → QrCode-DJ5leikY.js} +0 -0
- /package/.output/public/assets/{alert-dialog-Dihztkem.js → alert-dialog-ndHfUqUh.js} +0 -0
- /package/.output/public/assets/{card-BfeRlTvj.js → card-VtWYErXu.js} +0 -0
- /package/.output/public/assets/{dialog-e9AF5T6h.js → dialog-Dx9gstou.js} +0 -0
- /package/.output/public/assets/{empty-DpSPWLc2.js → empty-Cdfs8tuN.js} +0 -0
- /package/.output/public/assets/{field-PkdRPD3A.js → field-CubHQ_EM.js} +0 -0
- /package/.output/public/assets/{relativeTime-D_aYJRc7.js → relativeTime-Wk64dka-.js} +0 -0
- /package/.output/public/assets/{table-r_sYqKTQ.js → table-DtcLx8yw.js} +0 -0
- /package/.output/public/assets/{tabs-BBfg-c0h.js → tabs-DYlO8l4M.js} +0 -0
- /package/.output/public/assets/{valueToPercent-Bn8p2lng.js → valueToPercent-Db73Kirz.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Di as t,Hr as n,Oi as r,Q as i,Ri as a,Si as o,Vi as s,Vr as c,gr as l,p as u,wi as d,zr as f}from"./sidebar-UnsNYOry.js";import{t as p}from"./useMutation-BWX97JX2.js";import{t as ee}from"./check-Dz_5aNwx.js";import{t as te}from"./clipboard-D8uvj6FN.js";import{t as m}from"./key-round-B-vaAsR7.js";import{t as ne}from"./loader-circle-C26cZDSM.js";import{t as h}from"./plus-Bp6IqwOH.js";import{t as g}from"./refresh-cw-CpCxPYma.js";import{a as re,i as _,n as v,o as y,r as b,t as x}from"./badge-D4Tiwei-.js";import{n as S}from"./dist-BEIz5ojx.js";import{a as ie,n as ae,o as C,t as w}from"./card-BfeRlTvj.js";import{a as T,i as E,n as D,r as O,t as k}from"./field-PkdRPD3A.js";import{a as A,c as j,i as M,l as N,n as P,o as F,r as I,s as L,t as R,u as z}from"./alert-dialog-Dihztkem.js";import{a as B,i as V,n as oe,o as H,r as U,t as W}from"./dialog-e9AF5T6h.js";import{a as G,i as K,n as q,o as J,r as Y,t as se}from"./table-r_sYqKTQ.js";var X=c(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),Z=s(a(),1),ce=d({method:`GET`}).middleware([f]).handler(r(`2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b`)),le=d({method:`POST`}).middleware([f]).handler(r(`68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b`)),ue=d({method:`POST`}).middleware([f]).handler(r(`a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795`)),Q={list:[`api-keys`,`list`]},de=()=>n({queryKey:Q.list,queryFn:()=>ce()}),fe=()=>{let e=o();return p({mutationFn:e=>le({data:{name:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:Q.list})}})},pe=()=>{let e=o();return p({mutationFn:e=>ue({data:{id:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:Q.list})}})},$=t(),me=e=>new Date(e).toISOString().slice(0,10);function he(){let[e,t]=(0,Z.useState)(!1),[n,r]=(0,Z.useState)(``),[a,o]=(0,Z.useState)(null),s=fe(),c=n.trim(),u=c.length>64?`Name must be 64 characters or fewer.`:null,d=()=>{r(``),o(null),s.reset()},f=e=>{t(e),e||d()};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(l,{className:`max-md:h-11`,onClick:()=>t(!0),children:[(0,$.jsx)(h,{"data-icon":`inline-start`}),`Create API key`]}),(0,$.jsx)(W,{open:e,onOpenChange:f,children:(0,$.jsxs)(oe,{showCloseButton:a===null,children:[(0,$.jsxs)(B,{children:[(0,$.jsx)(H,{children:a===null?`Create API key`:`Save your API key`}),(0,$.jsx)(U,{children:a===null?`Name the app or environment that will use this key.`:`This key is shown once. Store it securely before closing.`})]}),a===null?(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(c.length===0||u!==null))try{o((await s.mutateAsync(c)).apiKey),S.success(`API key created`)}catch(e){S.error(e instanceof Error?e.message:`Unable to create API key`)}},children:[(0,$.jsx)(E,{children:(0,$.jsxs)(k,{"data-invalid":u!==null||void 0,children:[(0,$.jsx)(T,{htmlFor:`api-key-name`,children:`Name`}),(0,$.jsx)(i,{id:`api-key-name`,autoComplete:`off`,maxLength:65,onChange:e=>r(e.target.value),placeholder:`Production app`,value:n}),(0,$.jsx)(D,{children:`Use a name you can identify before revoking the key.`}),(0,$.jsx)(O,{children:u})]})}),(0,$.jsx)(V,{className:`mt-4`,children:(0,$.jsxs)(l,{disabled:s.isPending||c.length===0||u!==null,type:`submit`,children:[s.isPending?(0,$.jsx)(ne,{"data-icon":`inline-start`,className:`animate-spin motion-reduce:animate-none`}):(0,$.jsx)(m,{"data-icon":`inline-start`}),`Create API key`]})})]}):(0,$.jsxs)(E,{children:[(0,$.jsxs)(k,{children:[(0,$.jsx)(T,{htmlFor:`created-api-key`,children:`API key`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(i,{id:`created-api-key`,className:`font-mono`,readOnly:!0,value:a}),(0,$.jsxs)(l,{onClick:async()=>{if(a!==null)try{await navigator.clipboard.writeText(a),S.success(`API key copied`)}catch{S.error(`Unable to copy API key`)}},type:`button`,variant:`outline`,children:[(0,$.jsx)(te,{"data-icon":`inline-start`}),`Copy`]})]})]}),(0,$.jsx)(V,{children:(0,$.jsxs)(l,{onClick:()=>f(!1),children:[(0,$.jsx)(ee,{"data-icon":`inline-start`}),`Done`]})})]})]})})]})}function ge({record:e}){let[t,n]=(0,Z.useState)(!1),r=pe(),i=async t=>{t.preventDefault();try{await r.mutateAsync(e.id),n(!1),S.success(`API key revoked`)}catch(e){S.error(e instanceof Error?e.message:`Unable to revoke API key`)}};return(0,$.jsxs)(R,{open:t,onOpenChange:e=>{r.isPending||n(e)},children:[(0,$.jsxs)(z,{render:(0,$.jsx)(l,{className:`max-md:h-11`,size:`sm`,variant:`ghost`}),children:[(0,$.jsx)(X,{"data-icon":`inline-start`}),`Revoke`]}),(0,$.jsxs)(M,{children:[(0,$.jsxs)(L,{children:[(0,$.jsx)(j,{children:(0,$.jsx)(X,{})}),(0,$.jsxs)(N,{children:[`Revoke `,e.name,`?`]}),(0,$.jsxs)(A,{children:[`Apps using `,e.prefix,`… will immediately lose OTA update and insights access. This action cannot be undone.`]})]}),(0,$.jsxs)(F,{children:[(0,$.jsx)(I,{disabled:r.isPending,children:`Cancel`}),(0,$.jsx)(P,{disabled:r.isPending,onClick:e=>void i(e),variant:`destructive`,children:`Revoke API key`})]})]})]})}function _e(){let t=de();return(0,$.jsxs)(w,{className:`overflow-hidden shadow-sm`,children:[(0,$.jsxs)(ie,{className:`flex-row items-center justify-between space-y-0 border-b px-4 py-3`,children:[(0,$.jsx)(C,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`API keys`})}),(0,$.jsx)(he,{})]}),(0,$.jsx)(ae,{className:`p-0`,children:t.isError?(0,$.jsx)(`div`,{className:`p-4`,children:(0,$.jsxs)(v,{variant:`destructive`,children:[(0,$.jsx)(y,{}),(0,$.jsx)(re,{children:`API keys couldn't be loaded`}),(0,$.jsx)(_,{children:`Check your connection and try again.`}),(0,$.jsx)(b,{children:(0,$.jsxs)(l,{onClick:()=>void t.refetch(),size:`xs`,variant:`outline`,children:[(0,$.jsx)(g,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,$.jsxs)(se,{"aria-label":`API keys`,className:`table-fixed`,children:[(0,$.jsx)(G,{children:(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:`Key`}),(0,$.jsx)(K,{className:`w-32`,children:`Created`}),(0,$.jsx)(K,{className:`w-24 text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(q,{children:t.isLoading?Array.from({length:3},(t,n)=>(0,$.jsxs)(J,{children:[(0,$.jsxs)(Y,{className:`space-y-2 py-3`,children:[n===0?(0,$.jsx)(`span`,{className:`sr-only`,children:`Loading API keys`}):null,(0,$.jsx)(e,{className:`h-3.5 w-32`}),(0,$.jsx)(e,{className:`h-3 w-20`})]}),(0,$.jsx)(Y,{children:(0,$.jsx)(e,{className:`h-3.5 w-20`})}),(0,$.jsx)(Y,{children:(0,$.jsx)(e,{className:`ml-auto h-6 w-16`})})]},n)):t.data?.length===0?(0,$.jsx)(J,{children:(0,$.jsx)(Y,{colSpan:3,className:`h-40 text-center text-muted-foreground`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex max-w-xs flex-col items-center gap-2`,children:[(0,$.jsx)(m,{className:`size-5`}),(0,$.jsx)(`p`,{className:`font-medium text-foreground`,children:`No API keys`}),(0,$.jsx)(`p`,{children:`Create an API key to connect an app.`})]})})}):t.data?.map(e=>(0,$.jsxs)(J,{className:e.revoked_at_ms===null?void 0:`text-muted-foreground`,children:[(0,$.jsx)(Y,{className:`whitespace-normal py-3`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`p`,{className:`break-words font-medium text-foreground`,children:e.name}),(0,$.jsxs)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:[e.prefix,`…`]})]})}),(0,$.jsx)(Y,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(`time`,{dateTime:new Date(e.created_at_ms).toISOString(),children:me(e.created_at_ms)})}),(0,$.jsx)(Y,{className:`text-right`,children:e.revoked_at_ms===null?(0,$.jsx)(ge,{record:e}):(0,$.jsx)(x,{variant:`outline`,children:`Revoked`})})]},e.id))})]})})]})}function ve(){return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,$.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,$.jsx)(u,{className:`-ml-1`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`API keys`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`API keys can download OTA updates and submit insights only.`})]}),(0,$.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-5xl`,children:(0,$.jsx)(_e,{})})})]})}export{ve as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ConsoleFeatureUnavailable-C0iDIboF.js";var t=e;export{t as notFoundComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Li as e,Ri as t,Vi as n}from"./sidebar-UnsNYOry.js";var r=n(t(),1),i=n(e(),1);function a(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var o=e=>{switch(e){case`success`:return l;case`info`:return d;case`warning`:return u;case`error`:return f;default:return null}},s=Array(12).fill(0),c=({visible:e,className:t})=>r.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},r.createElement(`div`,{className:`sonner-spinner`},s.map((e,t)=>r.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),l=r.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},r.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),u=r.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},r.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),d=r.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},r.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),f=r.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},r.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),p=r.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},r.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),r.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ee=()=>{let[e,t]=r.useState(document.hidden);return r.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},m=1,h=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:m++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let i=Promise.resolve(e instanceof Function?e():e),a=n!==void 0,o,s=i.then(async e=>{if(o=[`resolve`,e],r.isValidElement(e))a=!1,this.create({id:n,type:`default`,message:e});else if(_(e)&&!e.ok){a=!1;let i=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,o=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,s=typeof i==`object`&&!r.isValidElement(i)?i:{message:i};this.create({id:n,type:`error`,description:o,...s})}else if(e instanceof Error){a=!1;let i=typeof t.error==`function`?await t.error(e):t.error,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof i==`object`&&!r.isValidElement(i)?i:{message:i};this.create({id:n,type:`error`,description:o,...s})}else if(t.success!==void 0){a=!1;let i=typeof t.success==`function`?await t.success(e):t.success,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof i==`object`&&!r.isValidElement(i)?i:{message:i};this.create({id:n,type:`success`,description:o,...s})}}).catch(async e=>{if(o=[`reject`,e],t.error!==void 0){a=!1;let i=typeof t.error==`function`?await t.error(e):t.error,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof i==`object`&&!r.isValidElement(i)?i:{message:i};this.create({id:n,type:`error`,description:o,...s})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=t?.id||m++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},g=(e,t)=>{let n=t?.id||m++;return h.addToast({title:e,...t,id:n}),n},_=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,v=Object.assign(g,{success:h.success,info:h.info,warning:h.warning,error:h.error,custom:h.custom,message:h.message,promise:h.promise,dismiss:h.dismiss,loading:h.loading},{getHistory:()=>h.toasts,getToasts:()=>h.getActiveToasts()});a(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function y(e){return e.label!==void 0}var te=3,b=`24px`,x=`16px`,S=4e3,C=356,w=14,T=45,E=200;function D(...e){return e.filter(Boolean).join(` `)}function ne(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var O=e=>{let{invert:t,toast:n,unstyled:i,interacting:a,setHeights:s,visibleToasts:l,heights:u,index:d,toasts:f,expanded:m,removeToast:h,defaultRichColors:g,closeButton:_,style:v,cancelButtonStyle:te,actionButtonStyle:b,className:x=``,descriptionClassName:C=``,duration:w,position:O,gap:k,expandByDefault:A,classNames:j,icons:M,closeButtonAriaLabel:re=`Close toast`}=e,[N,P]=r.useState(null),[F,ie]=r.useState(null),[I,L]=r.useState(!1),[R,z]=r.useState(!1),[B,V]=r.useState(!1),[ae,oe]=r.useState(!1),[se,ce]=r.useState(!1),[le,H]=r.useState(0),[ue,U]=r.useState(0),W=r.useRef(n.duration||w||S),de=r.useRef(null),G=r.useRef(null),fe=d===0,pe=d+1<=l,K=n.type,q=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,J=r.useMemo(()=>u.findIndex(e=>e.toastId===n.id)||0,[u,n.id]),ge=r.useMemo(()=>n.closeButton??_,[n.closeButton,_]),_e=r.useMemo(()=>n.duration||w||S,[n.duration,w]),Y=r.useRef(0),X=r.useRef(0),ve=r.useRef(0),Z=r.useRef(null),[ye,be]=O.split(`-`),xe=r.useMemo(()=>u.reduce((e,t,n)=>n>=J?e:e+t.height,0),[u,J]),Se=ee(),Ce=n.invert||t,Q=K===`loading`;X.current=r.useMemo(()=>J*k+xe,[J,xe]),r.useEffect(()=>{W.current=_e},[_e]),r.useEffect(()=>{L(!0)},[]),r.useEffect(()=>{let e=G.current;if(e){let t=e.getBoundingClientRect().height;return U(t),s(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>s(e=>e.filter(e=>e.toastId!==n.id))}},[s,n.id]),r.useLayoutEffect(()=>{if(!I)return;let e=G.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,U(r),s(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[I,n.title,n.description,s,n.id,n.jsx,n.action,n.cancel]);let $=r.useCallback(()=>{z(!0),H(X.current),s(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{h(n)},E)},[n,h,s,X]);r.useEffect(()=>{if(n.promise&&K===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return m||a||Se?(()=>{if(ve.current<Y.current){let e=new Date().getTime()-Y.current;W.current-=e}ve.current=new Date().getTime()})():W.current!==1/0&&(Y.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),$()},W.current)),()=>clearTimeout(e)},[m,a,n,K,Se,$]),r.useEffect(()=>{n.delete&&($(),n.onDismiss==null||n.onDismiss.call(n,n))},[$,n.delete]);function we(){return M?.loading?r.createElement(`div`,{className:D(j?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":K===`loading`},M.loading):r.createElement(c,{className:D(j?.loader,n?.classNames?.loader),visible:K===`loading`})}let Te=n.icon||M?.[K]||o(K);return r.createElement(`li`,{tabIndex:0,ref:G,className:D(x,me,j?.toast,n?.classNames?.toast,j?.default,j?.[K],n?.classNames?.[K]),"data-sonner-toast":``,"data-rich-colors":n.richColors??g,"data-styled":!(n.jsx||n.unstyled||i),"data-mounted":I,"data-promise":!!n.promise,"data-swiped":se,"data-removed":R,"data-visible":pe,"data-y-position":ye,"data-x-position":be,"data-index":d,"data-front":fe,"data-swiping":B,"data-dismissible":q,"data-type":K,"data-invert":Ce,"data-swipe-out":ae,"data-swipe-direction":F,"data-expanded":!!(m||A&&I),"data-testid":n.testId,style:{"--index":d,"--toasts-before":d,"--z-index":f.length-d,"--offset":`${R?le:X.current}px`,"--initial-height":A?`auto`:`${ue}px`,...v,...n.style},onDragEnd:()=>{V(!1),P(null),Z.current=null},onPointerDown:e=>{e.button!==2&&(Q||!q||(de.current=new Date,H(X.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(V(!0),Z.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(ae||!q)return;Z.current=null;let e=Number(G.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(G.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-de.current?.getTime(),i=N===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=T||a>.11){H(X.current),n.onDismiss==null||n.onDismiss.call(n,n),ie(N===`x`?e>0?`right`:`left`:t>0?`down`:`up`),$(),oe(!0);return}else{var o,s;(o=G.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=G.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}ce(!1),V(!1),P(null)},onPointerMove:t=>{var n,r;if(!Z.current||!q||window.getSelection()?.toString().length>0)return;let i=t.clientY-Z.current.y,a=t.clientX-Z.current.x,o=e.swipeDirections??ne(O);!N&&(Math.abs(a)>1||Math.abs(i)>1)&&P(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(N===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(N===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&ce(!0),(n=G.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=G.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ge&&!n.jsx&&K!==`loading`?r.createElement(`button`,{"aria-label":re,"data-disabled":Q,"data-close-button":!0,onClick:Q||!q?()=>{}:()=>{$(),n.onDismiss==null||n.onDismiss.call(n,n)},className:D(j?.closeButton,n?.classNames?.closeButton)},M?.close??p):null,(K||n.icon||n.promise)&&n.icon!==null&&(M?.[K]!==null||n.icon)?r.createElement(`div`,{"data-icon":``,className:D(j?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||we():null,n.type===`loading`?null:Te):null,r.createElement(`div`,{"data-content":``,className:D(j?.content,n?.classNames?.content)},r.createElement(`div`,{"data-title":``,className:D(j?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?r.createElement(`div`,{"data-description":``,className:D(C,he,j?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),r.isValidElement(n.cancel)?n.cancel:n.cancel&&y(n.cancel)?r.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||te,onClick:e=>{y(n.cancel)&&q&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),$())},className:D(j?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,r.isValidElement(n.action)?n.action:n.action&&y(n.action)?r.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||b,onClick:e=>{y(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&$())},className:D(j?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function k(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function A(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?x:b;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var j=r.forwardRef(function(e,t){let{id:n,invert:a,position:o=`bottom-right`,hotkey:s=[`altKey`,`KeyT`],expand:c,closeButton:l,className:u,offset:d,mobileOffset:f,theme:p=`light`,richColors:ee,duration:m,style:g,visibleToasts:_=te,toastOptions:v,dir:y=k(),gap:b=w,icons:x,containerAriaLabel:S=`Notifications`}=e,[T,E]=r.useState([]),D=r.useMemo(()=>n?T.filter(e=>e.toasterId===n):T.filter(e=>!e.toasterId),[T,n]),ne=r.useMemo(()=>Array.from(new Set([o].concat(D.filter(e=>e.position).map(e=>e.position)))),[D,o]),[j,M]=r.useState([]),[re,N]=r.useState(!1),[P,F]=r.useState(!1),[ie,I]=r.useState(p===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p),L=r.useRef(null),R=s.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),z=r.useRef(null),B=r.useRef(!1),V=r.useCallback(e=>{E(t=>(t.find(t=>t.id===e.id)?.delete||h.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return r.useEffect(()=>h.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{E(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{i.flushSync(()=>{E(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[T]),r.useEffect(()=>{if(p!==`system`){I(p);return}if(p===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?I(`dark`):I(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{I(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{I(e?`dark`:`light`)}catch(e){console.error(e)}})}},[p]),r.useEffect(()=>{T.length<=1&&N(!1)},[T]),r.useEffect(()=>{let e=e=>{if(s.every(t=>e[t]||e.code===t)){var t;N(!0),(t=L.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===L.current||L.current?.contains(document.activeElement))&&N(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]),r.useEffect(()=>{if(L.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,B.current=!1)}},[L.current]),r.createElement(`section`,{ref:t,"aria-label":`${S} ${R}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},ne.map((t,n)=>{let[i,o]=t.split(`-`);return D.length?r.createElement(`ol`,{key:t,dir:y===`auto`?k():y,tabIndex:-1,ref:L,className:u,"data-sonner-toaster":!0,"data-sonner-theme":ie,"data-y-position":i,"data-x-position":o,style:{"--front-toast-height":`${j[0]?.height||0}px`,"--width":`${C}px`,"--gap":`${b}px`,...g,...A(d,f)},onBlur:e=>{B.current&&!e.currentTarget.contains(e.relatedTarget)&&(B.current=!1,z.current&&=(z.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||B.current||(B.current=!0,z.current=e.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{P||N(!1)},onDragEnd:()=>N(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F(!0)},onPointerUp:()=>F(!1)},D.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>r.createElement(O,{key:n.id,icons:x,index:i,toast:n,defaultRichColors:ee,duration:v?.duration??m,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:a,visibleToasts:_,closeButton:v?.closeButton??l,interacting:P,position:t,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:V,toasts:D.filter(e=>e.position==n.position),heights:j.filter(e=>e.position==n.position),setHeights:M,expandByDefault:c,gap:b,expanded:re,swipeDirections:e.swipeDirections}))):null}))});export{v as n,j as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/insights-MQrx_wbP.js","assets/ConsoleFeatureUnavailable-C0iDIboF.js","assets/sidebar-UnsNYOry.js","assets/console-features-api-De6tXQnd.js","assets/arrow-up-right-BPRe5soE.js","assets/NotFoundPage-CijSy63W.js","assets/link-D95E0fwF.js","assets/empty-DpSPWLc2.js","assets/insights-Bm4Kua5R.js","assets/alert-dialog-Dihztkem.js","assets/select-BAd2hAoW.js","assets/useCompositeListItem-B9ONn9qn.js","assets/check-Dz_5aNwx.js","assets/tabs-BBfg-c0h.js","assets/insights-usage-rpc-DdmD1Nuy.js","assets/valueToPercent-Bn8p2lng.js","assets/EventDetails-DFWS-HcW.js","assets/insights-api-CXXCRZhF.js","assets/preload-helper-52zhjEsw.js","assets/copy-BxI24-g-.js","assets/download-ekENI2Sw.js","assets/input-group-DNfVeeYZ.js","assets/smartphone-lSZWrqxx.js","assets/badge-D4Tiwei-.js","assets/dist-BEIz5ojx.js","assets/HashValueDisplay-DKziWjEg.js","assets/InsightsPageHeader-BATHTZWn.js","assets/list-Dq40Mmoj.js","assets/arrow-right-jHG0fJt7.js","assets/chevron-right-CuYrscDY.js","assets/circle-off-BZFOMb8J.js","assets/refresh-cw-CpCxPYma.js","assets/rotate-cw-Bn3fIWmY.js","assets/undo-2-CGeTBZjC.js","assets/BundleIdDisplay-D8oR8mcP.js","assets/insights-search-CtEcj6lz.js","assets/uuidv7-DgXZ1zRR.js","assets/PlatformIcon-Kq3q98tU.js","assets/card-BfeRlTvj.js","assets/table-r_sYqKTQ.js","assets/api-B1z_XXrQ.js","assets/useMutation-BWX97JX2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,r as t,t as n}from"./preload-helper-52zhjEsw.js";import{r}from"./console-features-api-De6tXQnd.js";import{a as i}from"./insights-search-CtEcj6lz.js";var a=e(`/insights`)({beforeLoad:({context:e})=>r(e.queryClient,`insightsAnalytics`),notFoundComponent:t(()=>n(()=>import(`./insights-MQrx_wbP.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:t(()=>n(()=>import(`./insights-Bm4Kua5R.js`),__vite__mapDeps([8,2,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,3,27,7,28,4,29,30,31,32,33,34,35,36,37,38,39,40,41])),`component`),validateSearch:i});export{a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ConsoleFeatureUnavailable-C0iDIboF.js";var t=e;export{t as notFoundComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Di as e,Ri as t,Vi as n,at as r,gr as i,nt as a,rt as o}from"./sidebar-UnsNYOry.js";import{b as s}from"./insights-api-CXXCRZhF.js";import{m as c,t as l}from"./uuidv7-DgXZ1zRR.js";var u=n(t(),1),d=e();function f({label:e,children:t}){let n=(0,u.useId)(),[c,l]=(0,u.useState)(!1);return(0,d.jsxs)(a,{open:c,onOpenChange:l,triggerId:n,children:[(0,d.jsx)(r,{id:n,"aria-describedby":c?`${n}-description`:void 0,closeOnClick:!1,onClick:()=>l(e=>!e),render:(0,d.jsx)(i,{"aria-label":e,className:`size-11 sm:size-7`,size:`icon`,variant:`ghost`}),children:(0,d.jsx)(s,{})}),(0,d.jsx)(o,{id:`${n}-description`,role:`tooltip`,className:`max-w-64`,side:`bottom`,children:t})]})}var p=e=>typeof e==`string`&&e.trim().length>0&&e.length<=1024?e:void 0,m=e=>e===`24h`||e===`7d`||e===`30d`?e:void 0,h=e=>e===`adoption`||e===`crashes`?e:void 0,g=e=>e===`12m`?e:m(e),_=`production`,v=e=>e===`all`||e===`ios`||e===`android`?e:void 0;function y(e){return{platform:v(e.platform),channel:p(e.channel),appVersion:p(e.appVersion),window:g(e.window),bundleWindow:m(e.bundleWindow),releaseId:p(e.releaseId),healthChart:h(e.healthChart),bundles:p(e.bundles)}}function b(e){return{...y(e),version:p(e.version),page:typeof e.page==`number`&&Number.isSafeInteger(e.page)&&e.page>0?e.page:void 0}}function x(e,t=Date.now()){if(!c(e))return`7d`;let n=t-l(e);return n<=864e5?`24h`:n<=7*864e5?`7d`:`30d`}var S=e=>e===void 0?void 0:[...new Set(e.split(`,`).filter(e=>e.length>0))];export{y as a,b as i,x as n,f as o,S as r,_ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Di as t,Hr as n,_r as r,gr as i}from"./sidebar-UnsNYOry.js";import{t as a}from"./link-D95E0fwF.js";import{t as o}from"./arrow-left-CxxDwBQs.js";import{t as s}from"./arrow-up-right-BPRe5soE.js";import{o as c,u as ee}from"./insights-api-CXXCRZhF.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./select-BAd2hAoW.js";import{t as h}from"./rotate-cw-Bn3fIWmY.js";import{a as g,i as _,n as v,t as y}from"./badge-D4Tiwei-.js";import{a as te,o as ne}from"./insights-search-CtEcj6lz.js";import{a as re,i as b,n as x,o as S,t as C}from"./card-BfeRlTvj.js";import{a as w,t as T}from"./field-PkdRPD3A.js";import{i as E,o as D,r as O,t as k}from"./empty-DpSPWLc2.js";import{t as A}from"./PlatformIcon-Kq3q98tU.js";import{t as j}from"./insights_.distribution-Dd2mYz8D.js";import{t as M}from"./BundleIdDisplay-D8oR8mcP.js";import{n as N,t as P}from"./insights-usage-rpc-DdmD1Nuy.js";import{c as ie,n as F,o as I,t as L}from"./InsightsPageHeader-BATHTZWn.js";var R=t(),z=20,B=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`}),V=e=>e.releaseId??(e.builtinBundleId?`Built-in bundle ${e.builtinBundleId}`:`Unknown bundle`);function H({bundleId:e}){return(0,R.jsxs)(`div`,{className:`flex min-h-11 min-w-0 flex-wrap items-center gap-2 md:min-h-9`,children:[(0,R.jsx)(F,{}),(0,R.jsx)(M,{bundleId:e,className:`text-muted-foreground`})]})}function U(){let t=j.useSearch(),M=c(),F=j.useNavigate(),U={platform:t.platform??`all`,channel:t.channel??`production`,appVersion:t.appVersion,window:t.window??`24h`},W=n({queryKey:[`insights`,`app-usage`,U],queryFn:()=>P({data:U}),staleTime:3e4}),G=W.error?void 0:W.data,K=G?`since ${B.format(G.distributionSinceMs)}, 00:00 UTC`:`in this period`,q=(G?.bundleDistribution??[]).filter(e=>!t.version||e.appVersion===t.version),J=q.reduce((e,t)=>e+t.installations,0),Y=Math.max(1,Math.ceil(q.length/z)),X=Math.min(t.page??1,Y),Z=[...new Set([...G?.versions.map(e=>e.name)??[],...t.version?[t.version]:[]])],Q=te(t),$=e=>void F({search:{...t,page:void 0,...e}});return(0,R.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,R.jsx)(L,{view:`distribution`,overviewSearch:Q}),(0,R.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 px-4 py-6 sm:p-8`,children:(0,R.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-6`,children:[(0,R.jsxs)(a,{to:`/insights`,search:Q,className:r({variant:`ghost`,className:`h-11 w-fit sm:h-9`}),children:[(0,R.jsx)(o,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to overview`]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Distribution`}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(I,{twelveMonths:ee(M),window:U.window,onWindowChange:e=>$({window:e})}),(0,R.jsx)(i,{"aria-label":`Refresh distribution`,variant:`ghost`,size:`icon`,className:`size-11 sm:size-9`,disabled:W.isFetching,onClick:()=>void W.refetch(),children:(0,R.jsx)(h,{"aria-hidden":`true`})})]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-4`,children:[(0,R.jsxs)(T,{className:`w-full sm:w-64`,children:[(0,R.jsx)(w,{htmlFor:`distribution-version`,children:`App version`}),(0,R.jsxs)(m,{items:Object.fromEntries([[`all`,`All versions`],...Z.map(e=>[`version:${e}`,e])]),value:t.version?`version:${t.version}`:`all`,onValueChange:e=>{e!==null&&$({version:e===`all`?void 0:e.slice(8)})},children:[(0,R.jsx)(l,{id:`distribution-version`,className:`min-h-11 w-full sm:min-h-9`,children:(0,R.jsx)(f,{})}),(0,R.jsx)(d,{children:(0,R.jsxs)(p,{children:[(0,R.jsx)(u,{value:`all`,children:`All versions`}),Z.map(e=>(0,R.jsx)(u,{value:`version:${e}`,children:e},e))]})})]})]}),(0,R.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center gap-2`,"aria-label":`Distribution scope`,children:[(0,R.jsxs)(y,{variant:`outline`,className:`gap-1.5`,children:[U.platform===`all`?null:(0,R.jsx)(A,{platform:U.platform,className:`size-3.5`}),U.platform===`all`?`All platforms`:U.platform===`ios`?`iOS`:`Android`]}),(0,R.jsx)(y,{variant:`outline`,children:U.channel}),U.appVersion?(0,R.jsxs)(y,{variant:`outline`,children:[`Reports from `,U.appVersion]}):null]})]}),(0,R.jsxs)(C,{"aria-label":`Bundles by app version`,role:`region`,className:`min-w-0`,children:[(0,R.jsxs)(re,{className:`flex flex-col gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(S,{children:`Bundles by app version`}),(0,R.jsxs)(ne,{label:`How bundle distribution is counted`,children:[`Each installation counts once, by its latest report`,` `,K,`. Shares are within each app version. Built-in bundle: the bundle the native build shipped, by its ID. Unknown bundle: no deployment and no built-in bundle ID.`]})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[W.isPending?(0,R.jsx)(e,{className:`h-9 w-16`}):(0,R.jsx)(`p`,{className:`text-3xl font-semibold tabular-nums`,children:G?`${G.truncated?`≥`:``}${J.toLocaleString()}`:`—`}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Reporting installations`})]})]}),(0,R.jsxs)(x,{className:`flex min-w-0 flex-col gap-4`,children:[G?.truncated?(0,R.jsxs)(v,{children:[(0,R.jsx)(g,{children:`Partial history`}),(0,R.jsxs)(_,{children:[`Counts and shares reflect reports since`,` `,new Date(G.sinceMs).toLocaleString(`en`,{timeZone:`UTC`}),` `,`UTC. Choose a shorter period for a more complete view.`]})]}):null,W.isPending?(0,R.jsx)(e,{"aria-label":`Loading bundle distribution`,className:`h-64`}):W.error?(0,R.jsxs)(`div`,{className:`flex flex-col items-start gap-4`,children:[(0,R.jsx)(ie,{error:W.error,fallbackTitle:`Distribution unavailable`}),(0,R.jsx)(i,{variant:`outline`,onClick:()=>void W.refetch(),children:`Retry distribution`})]}):q.length===0?(0,R.jsxs)(k,{children:[(0,R.jsxs)(E,{children:[(0,R.jsx)(D,{children:`No bundles reported`}),(0,R.jsx)(O,{children:`Choose another version or period, or change the filters in the overview.`})]}),(0,R.jsx)(i,{variant:`outline`,onClick:()=>$({version:void 0}),children:`Show all versions`})]}):(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] gap-4 border-b px-3 pb-3 text-xs text-muted-foreground md:grid`,children:[(0,R.jsx)(`span`,{children:`App version`}),(0,R.jsx)(`span`,{children:`Bundle ID`}),(0,R.jsx)(`span`,{className:`text-right`,children:`Active installations`}),(0,R.jsx)(`span`,{className:`text-right`,children:`Version share`})]}),(0,R.jsx)(`ul`,{"aria-label":`Bundle distribution`,className:`divide-y`,children:q.slice((X-1)*z,X*z).map(e=>{let t=G?.versions.find(t=>t.name===e.appVersion)?.installations??0,n=t>0?e.installations/t*100:0;return(0,R.jsxs)(`li`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 gap-y-3 px-1 py-4 md:grid-cols-[8rem_minmax(0,1fr)_7rem_7rem] md:px-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,title:e.appVersion,children:e.appVersion}),(0,R.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,R.jsx)(A,{platform:e.platform,className:`size-3.5`}),e.platform===`ios`?`iOS`:`Android`]})]}),(0,R.jsxs)(`div`,{className:`col-span-2 row-start-2 min-w-0 md:col-span-1 md:row-auto`,children:[e.releaseId?(0,R.jsxs)(a,{to:`/`,search:{releaseId:e.releaseId},"aria-label":`Review bundle ${e.releaseId} for app version ${e.appVersion}`,className:`flex min-h-11 min-w-0 items-center gap-2 text-xs underline-offset-4 hover:underline md:min-h-9`,children:[(0,R.jsx)(`span`,{className:`break-all font-mono`,children:e.releaseId}),(0,R.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})]}):e.builtinBundleId?null:(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Unknown bundle`}),e.builtinBundleId?(0,R.jsx)(H,{bundleId:e.builtinBundleId}):null]}),(0,R.jsxs)(`div`,{className:`col-start-2 row-start-1 text-right md:col-auto md:row-auto`,children:[(0,R.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:e.installations.toLocaleString()}),(0,R.jsx)(`span`,{className:`ml-1 text-xs text-muted-foreground md:sr-only`,children:`active`}),(0,R.jsxs)(`p`,{className:`mt-1 text-xs tabular-nums text-muted-foreground md:hidden`,children:[n.toFixed(1),`% of version`]})]}),(0,R.jsxs)(`div`,{className:`hidden flex-col gap-2 md:flex`,children:[(0,R.jsxs)(`span`,{className:`text-right text-sm tabular-nums`,children:[n.toFixed(1),`%`]}),(0,R.jsx)(N,{"aria-label":`${V(e)} share in ${e.appVersion} on ${e.platform}`,value:n})]})]},JSON.stringify([e.appVersion,e.platform,e.releaseId,e.builtinBundleId]))})})]})]}),G&&q.length>0?(0,R.jsxs)(b,{className:`flex flex-wrap items-center justify-between gap-3 border-t pt-4`,children:[(0,R.jsxs)(`p`,{className:`text-xs tabular-nums text-muted-foreground`,children:[(X-1)*z+1,`–`,Math.min(X*z,q.length),` of `,q.length]}),(0,R.jsxs)(`nav`,{"aria-label":`Distribution pages`,className:`flex gap-2`,children:[(0,R.jsx)(i,{variant:`outline`,className:`h-11 sm:h-9`,disabled:X<=1,onClick:()=>$({page:X-1}),children:`Previous`}),(0,R.jsx)(i,{variant:`outline`,className:`h-11 sm:h-9`,disabled:X>=Y,onClick:()=>$({page:X+1}),children:`Next`})]})]}):null]})]})})]})}export{U as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/insights_.distribution-REbBAqgL.js","assets/ConsoleFeatureUnavailable-C0iDIboF.js","assets/sidebar-UnsNYOry.js","assets/console-features-api-De6tXQnd.js","assets/arrow-up-right-BPRe5soE.js","assets/NotFoundPage-CijSy63W.js","assets/link-D95E0fwF.js","assets/empty-DpSPWLc2.js","assets/insights_.distribution-Bjo0aQE4.js","assets/select-BAd2hAoW.js","assets/useCompositeListItem-B9ONn9qn.js","assets/check-Dz_5aNwx.js","assets/insights-usage-rpc-DdmD1Nuy.js","assets/valueToPercent-Bn8p2lng.js","assets/arrow-left-CxxDwBQs.js","assets/insights-api-CXXCRZhF.js","assets/preload-helper-52zhjEsw.js","assets/rotate-cw-Bn3fIWmY.js","assets/badge-D4Tiwei-.js","assets/BundleIdDisplay-D8oR8mcP.js","assets/insights-search-CtEcj6lz.js","assets/uuidv7-DgXZ1zRR.js","assets/PlatformIcon-Kq3q98tU.js","assets/InsightsPageHeader-BATHTZWn.js","assets/tabs-BBfg-c0h.js","assets/list-Dq40Mmoj.js","assets/card-BfeRlTvj.js","assets/field-PkdRPD3A.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,r as t,t as n}from"./preload-helper-52zhjEsw.js";import{r}from"./console-features-api-De6tXQnd.js";import{i}from"./insights-search-CtEcj6lz.js";var a=e(`/insights_/distribution`)({beforeLoad:({context:e})=>r(e.queryClient,`insightsAnalytics`),notFoundComponent:t(()=>n(()=>import(`./insights_.distribution-REbBAqgL.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`notFoundComponent`),component:t(()=>n(()=>import(`./insights_.distribution-Bjo0aQE4.js`),__vite__mapDeps([8,2,9,10,11,12,13,6,14,4,15,16,17,18,19,20,21,22,23,24,3,25,26,7,27])),`component`),validateSearch:i});export{a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ConsoleFeatureUnavailable-C0iDIboF.js";var t=e;export{t as notFoundComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ConsoleFeatureUnavailable-C0iDIboF.js";var t=e;export{t as notFoundComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Br as t,Di as n,Ri as r,Vi as i,_r as a,et as o,gr as s,vr as c}from"./sidebar-UnsNYOry.js";import{h as l,i as u,m as d,t as f}from"./link-D95E0fwF.js";import{c as p,s as m}from"./preload-helper-52zhjEsw.js";import{a as h,n as g,o as _,r as v,t as y}from"./EventDetails-DFWS-HcW.js";import{t as b}from"./arrow-left-CxxDwBQs.js";import{t as x}from"./arrow-up-right-BPRe5soE.js";import{a as S,c as C,i as w,l as T,n as E,o as ee,r as te}from"./insights-api-CXXCRZhF.js";import{t as D}from"./check-Dz_5aNwx.js";import{a as O}from"./useCompositeListItem-B9ONn9qn.js";import{t as k}from"./refresh-cw-CpCxPYma.js";import{i as A,n as j,r as M,t as N}from"./input-group-DNfVeeYZ.js";import{t as P}from"./search-DeKSyo9Q.js";import{a as F,n as I,o as L,r as R,t as z}from"./card-BfeRlTvj.js";import{a as ne,t as re}from"./field-PkdRPD3A.js";import{a as B,i as ie,n as ae,o as oe,r as se,t as ce}from"./installations-DYT2mSjX.js";import{a as V,i as H,n as le,o as U,r as W,t as G}from"./table-r_sYqKTQ.js";import{n as ue,t as K}from"./HashValueDisplay-DKziWjEg.js";import{a as de,c as q,n as fe,r as pe,t as me}from"./InsightsPageHeader-BATHTZWn.js";function he(){l(u(),!0)}function ge(e){return he(),d(u(),e)}function _e(e){let t=u();return p(t.stores.location,m(e,t))}var J=i(r(),1),Y=n();function ve({events:e,formatter:t,renderIdentity:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,Y.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,Y.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,Y.jsx)(v,{event:e}),(0,Y.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,Y.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,Y.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,Y.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,Y.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,Y.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,Y.jsx)(y,{event:e,touch:!0})})]},e.id))})]})}function X({hasPrevious:e,label:t,nextCursor:n,onNext:r,onPrevious:i,pageLength:a,pageNumber:o}){return(0,Y.jsxs)(`nav`,{"aria-label":`${t} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,o,` · `,a.toLocaleString(),` rows`]}),(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsx)(s,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,Y.jsx)(s,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:n===null,onClick:r,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}var ye=e=>se.filter((t,n)=>n===0||B[t].durationMs<=e*864e5);function be({event:e,eventsLocation:t,touch:n=!1}){return(0,Y.jsxs)(`div`,{className:n?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,Y.jsxs)(f,{className:a({className:n?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},state:e=>({insightsPagination:{eventsBack:e.insightsPagination?.eventsBack}}),"aria-label":`View history for ${e.userId??`anonymous installation`} (${e.installId})`,children:[(0,Y.jsx)(`span`,{className:n?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??`Anonymous installation`}),(0,Y.jsx)(x,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,Y.jsx)(K,{value:e.installId,maxLength:13,buttonClassName:n?`min-h-11 px-3`:void 0})]})}function xe({children:t,description:n,error:r,eventsLocation:i,history:a,isFetching:o,isLoading:c,onNext:l,onPrevious:u,onRangeChange:d,onRefresh:f,pageNumber:p,range:m,rawDays:h=90,title:b=`All events`}){let x=_(),S=p>1,C=ye(h),w=m===void 0?void 0:oe(m),T=w!==void 0&&C.includes(w)?w:void 0,E=T!==void 0&&d?(0,Y.jsx)(s,{className:`h-11 px-3 lg:h-8`,onClick:()=>d(T),type:`button`,variant:`outline`,children:`Show the last ${B[T].period}`}):null;return(0,Y.jsxs)(z,{className:`@container min-w-0 shadow-sm`,"aria-busy":o,children:[(0,Y.jsxs)(F,{className:`gap-4 p-4 sm:p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsx)(L,{children:(0,Y.jsx)(`h2`,{children:b})}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[m!==void 0&&d?(0,Y.jsx)(de,{label:`Time range`,onPeriodChange:d,period:m,periods:C.map(e=>({value:e,name:`Last ${B[e].period}`}))}):null,(0,Y.jsxs)(s,{className:`h-11 lg:h-8`,disabled:o,onClick:f,size:`lg`,variant:`outline`,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]})]}),n?(0,Y.jsx)(R,{children:n}):null]}),t]}),(0,Y.jsx)(I,{className:`min-w-0 p-0`,children:c?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`}),(0,Y.jsx)(e,{className:`h-12 w-full`})]}):r?(0,Y.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Y.jsx)(q,{error:r,fallbackTitle:`Event history unavailable`})}):a?(0,Y.jsxs)(Y.Fragment,{children:[a.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,Y.jsx)(ve,{events:a.data,formatter:x,renderIdentity:e=>(0,Y.jsx)(be,{event:e,eventsLocation:i,touch:!0})})}),(0,Y.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-4xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-48`,children:`User / installation`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:a.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:x})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(be,{event:e,eventsLocation:i})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})})]}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:S?`No older events in this range.`:m===void 0?b===`All events`?`No events recorded yet`:`No matching reports in this period`:`No events in the last ${B[m].period}.`}),S?null:E]}),m!==void 0&&a.nextCursor===null&&(a.data.length>0||S)?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Start of range reached`}),E]}):null,a.data.length>0||S||a.nextCursor?(0,Y.jsx)(X,{hasPrevious:S,label:b,nextCursor:a.nextCursor,onNext:l,onPrevious:u,pageLength:a.data.length,pageNumber:p}):null]}):null})]})}var Se=e=>e.userId??`—`,Ce=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.type===`UPDATE_DOWNLOADED`||e.type===`UPDATE_FAILED`?e.fromBundleId:e.toBundleId;function we({error:t,history:n,isLoading:r,onNext:i,onPrevious:a,onRefresh:c,pageNumber:l,retention:u=C,selectedEvent:d,selectedInstallId:f}){let p=_(),m=d?Ce(d):void 0,b=d&&`pendingBundleId`in d?d.pendingBundleId:d&&`type`in d&&d.type===`UPDATE_DOWNLOADED`?d.toBundleId:null;return(0,Y.jsxs)(z,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(F,{className:`p-4 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,Y.jsx)(L,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:f===void 0?`Select an installation`:`Installation history`})}),f===void 0?null:(0,Y.jsxs)(R,{children:[`Bundle changes and update failures are kept for`,` `,T(u.rawDays),`; the latest report, for`,` `,T(u.dailyDays),` after the installation last reports.`]})]}),c&&f!==void 0?(0,Y.jsxs)(s,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:c,disabled:r,children:[(0,Y.jsx)(k,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,Y.jsxs)(I,{className:`min-h-0 p-0`,children:[f!==void 0&&d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,Y.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:Se(d)})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,Y.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,Y.jsx)(K,{value:f,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,Y.jsxs)(`dd`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2 font-mono text-xs`,children:[m?(0,Y.jsx)(K,{value:m,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`,pe(m,d.minBundleId)?(0,Y.jsx)(fe,{}):null]})]}),b?(0,Y.jsxs)(`div`,{className:`col-span-2 min-w-0`,children:[(0,Y.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Downloaded · Not launched yet`}),(0,Y.jsx)(`dd`,{className:`mt-1 text-xs`,children:(0,Y.jsx)(K,{value:b})})]}):null]}),d.httpResponse?(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(h,{event:d})}):null]}),(0,Y.jsx)(o,{})]}):null,f===void 0?null:r?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`}),(0,Y.jsx)(e,{className:`h-10 w-full`})]}):t?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:t instanceof Error?t:Error(),fallbackTitle:`Installation history unavailable`})}):n&&n.data.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,Y.jsx)(ve,{events:n.data,formatter:p})}),(0,Y.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,Y.jsxs)(G,{className:`min-w-3xl table-fixed`,children:[(0,Y.jsx)(V,{children:(0,Y.jsxs)(U,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,Y.jsx)(H,{className:`w-64`,children:`Time`}),(0,Y.jsx)(H,{className:`w-48`,children:`Event`}),(0,Y.jsx)(H,{className:`w-32`,children:`App`}),(0,Y.jsx)(H,{className:`w-52`,children:`Bundle`})]})}),(0,Y.jsx)(le,{children:n.data.map(e=>(0,Y.jsxs)(U,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,Y.jsx)(W,{className:`whitespace-normal text-xs tabular-nums`,children:(0,Y.jsx)(g,{value:e.receivedAtMs,formatter:p})}),(0,Y.jsx)(W,{children:(0,Y.jsx)(v,{event:e})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,Y.jsx)(W,{className:`whitespace-normal text-xs`,children:(0,Y.jsx)(y,{event:e})})]},e.id))})]})}),(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:n.nextCursor,onNext:i,onPrevious:a,pageLength:n.data.length,pageNumber:l})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1?`No older bundle changes.`:`No bundle changes recorded yet.`}),n&&(l>1||n.nextCursor)?(0,Y.jsx)(X,{hasPrevious:l>1,label:`Installation history`,nextCursor:n.nextCursor,onNext:i,onPrevious:a,pageLength:0,pageNumber:l}):null]})]})]})}var Te=e=>e.lastKnownBundleId,Ee=e=>e.userId??`—`;function De({error:e,onNext:t,onPrevious:n,onSelect:r,pageNumber:i,results:o,selectedInstallId:l}){let[u,d]=(0,J.useState)(!1),f=(0,J.useId)(),p=(0,J.useRef)(null),m=!e&&o&&o.data.length>0;return(0,Y.jsxs)(z,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,Y.jsx)(F,{className:`p-4 sm:px-6`,children:(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,Y.jsx)(L,{className:`text-sm font-medium`,children:(0,Y.jsx)(`h2`,{children:`Matching installations`})})}),(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,Y.jsx)(s,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,Y.jsx)(O,{"aria-hidden":`true`,className:c(u&&`rotate-180`)})}):null})]})}),(0,Y.jsxs)(I,{className:c(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,Y.jsx)(`div`,{className:`p-6`,children:(0,Y.jsx)(q,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):o&&o.data.length>0?(0,Y.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:o.data.map(e=>{let t=Te(e),n=e.installId===l;return(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{"aria-label":`${Ee(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{r(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,Y.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:Ee(e)}),n?(0,Y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,Y.jsx)(D,{"aria-hidden":`true`,className:`size-3.5`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,Y.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:ue(e.installId)})}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,Y.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:ue(t)}):(0,Y.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,Y.jsx)(`a`,{className:a({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),o&&(o.data.length>0||i>1||o.nextCursor)?(0,Y.jsx)(X,{hasPrevious:i>1,label:`Installation results`,nextCursor:o.nextCursor,onNext:t,onPrevious:n,pageLength:o.data.length,pageNumber:i}):null]})]})}function Oe({draftQuery:e,onDraftQueryChange:n,onSubmit:r,onClear:i}){return(0,Y.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&r()},role:`search`,children:(0,Y.jsxs)(re,{className:`gap-2`,children:[(0,Y.jsx)(ne,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Y.jsxs)(N,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,Y.jsx)(j,{children:(0,Y.jsx)(P,{"aria-hidden":`true`})}),(0,Y.jsx)(A,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>n(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,Y.jsx)(j,{align:`inline-end`,children:(0,Y.jsx)(M,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:i,size:`icon-xs`,children:(0,Y.jsx)(t,{"aria-hidden":`true`})})}):null]}),(0,Y.jsx)(s,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function ke(){return(0,Y.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`}),(0,Y.jsx)(e,{className:`h-64 w-full lg:h-full`})]})}var Ae=20,je=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Me(){let e=ce.useSearch(),t=ce.useNavigate(),n=ee(),[r,i]=(0,J.useState)(e.query??``),[a]=(0,J.useState)(Z),[o]=(0,J.useState)(Z),c=_e({select:e=>e.state.insightsPagination}),l=c?.eventsBack??[],u=c?.searchBack??[],d=c?.historyBack??[],f=e.query?.trim()??``,p=f.length>0,m=e.installId!==void 0,h=p||m,g=e.eventsBefore??a,_=e.eventsRange??`7d`,v=e.historyBefore??o,y=(n,r=!1,i={})=>{t({to:`/installations`,search:{...e,...n},state:e=>({...e,insightsPagination:{...e.insightsPagination,...i}}),replace:r})};(0,J.useEffect)(()=>{i(e.query??``)},[e.query]),(0,J.useEffect)(()=>{e.eventsBefore===void 0&&y({eventsBefore:g},!0)},[g,e.eventsBefore]),(0,J.useEffect)(()=>{m&&e.historyBefore===void 0&&y({historyBefore:v},!0)},[m,v,e.historyBefore]);let x=E({...ie(_,g),cursor:e.eventsCursor,limit:20},!h),C=S({cursor:e.searchCursor,identity:f,limit:Ae},p);(0,J.useEffect)(()=>{let e=C.data?.data[0]?.installId;!p||m||e===void 0||y({historyBefore:Z(),historyCursor:void 0,installId:e},!0,{historyBack:[]})},[p,m,C.data?.data]);let D=w(e.installId??``,m),O=te({beforeReceivedAtMs:v,cursor:e.historyCursor,installId:e.installId??``,limit:je},m),k=D.data??C.data?.data.find(({installId:t})=>t===e.installId)??O.data?.data[0],A=h?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,j=(0,J.useRef)(null),M=ge({id:A,getKey:ae});(0,J.useLayoutEffect)(()=>{!h&&!x.isLoading&&j.current&&(j.current.scrollTop=M?.scrollY??0)},[x.isLoading,h,M?.scrollY,A]);let N=()=>{i(``),y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})},P=(0,Y.jsx)(Oe,{draftQuery:r,onClear:N,onDraftQueryChange:i,onSubmit:()=>{let e=r.trim();if(!e){N();return}y({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0},!1,{historyBack:[],searchBack:[]})}});return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.jsx)(me,{view:`events`}),(0,Y.jsx)(`div`,{ref:j,"data-scroll-restoration-id":A,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[h?(0,Y.jsx)(z,{className:`shadow-sm`,children:(0,Y.jsxs)(I,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,Y.jsxs)(s,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:N,variant:`ghost`,children:[(0,Y.jsx)(b,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),P]})}):null,h?C.isLoading&&p?(0,Y.jsx)(ke,{}):(0,Y.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${p?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[p?(0,Y.jsx)(De,{error:C.error,onNext:()=>{C.data?.nextCursor&&y({installId:void 0,searchCursor:C.data.nextCursor},!0,{searchBack:Q(u,e.searchCursor)})},onPrevious:()=>{let e=$(u);y({installId:void 0,searchCursor:e.cursor},!0,{searchBack:e.stack})},onSelect:e=>{y({historyBefore:Z(),historyCursor:void 0,installId:e},!1,{historyBack:[]})},pageNumber:u.length+1,results:C.data,selectedInstallId:e.installId}):null,(0,Y.jsx)(we,{error:O.error??D.error,history:O.data,isLoading:O.isLoading||D.isLoading,onNext:()=>{O.data?.nextCursor&&y({historyCursor:O.data.nextCursor},!0,{historyBack:Q(d,e.historyCursor)})},onPrevious:()=>{let e=$(d);y({historyCursor:e.cursor},!0,{historyBack:e.stack})},onRefresh:()=>{y({historyBefore:Z(),historyCursor:void 0},!0,{historyBack:[]})},pageNumber:d.length+1,retention:n,selectedEvent:k,selectedInstallId:e.installId})]}):(0,Y.jsx)(xe,{description:`Downloads, launches, crashes, update failures, and other changes to what an installation runs, newest first, kept for ${T(n.rawDays)}. Launches that change nothing aren't listed.`,error:x.error,eventsLocation:{eventsBefore:g,eventsCursor:e.eventsCursor,eventsRange:e.eventsRange},history:x.data,isFetching:x.isFetching,isLoading:x.isLoading,onNext:()=>{x.data?.nextCursor&&y({eventsCursor:x.data.nextCursor},!0,{eventsBack:Q(l,e.eventsCursor)})},onPrevious:()=>{let e=$(l);y({eventsCursor:e.cursor},!0,{eventsBack:e.stack})},onRangeChange:e=>{y({eventsBefore:Z(),eventsCursor:void 0,eventsRange:e},!1,{eventsBack:[]})},onRefresh:()=>{y({eventsBefore:Z(),eventsCursor:void 0},!0,{eventsBack:[]})},pageNumber:l.length+1,range:_,rawDays:n.rawDays,children:P})]})},A)]})}export{Me as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Di as e,Vr as t,_r as n,gr as r,h as i,p as a}from"./sidebar-UnsNYOry.js";import{t as o}from"./link-D95E0fwF.js";import{o as s}from"./preload-helper-52zhjEsw.js";import{t as c}from"./arrow-up-right-BPRe5soE.js";import{i as l,n as u,r as d,t as f}from"./TargetDisplay-DzSkf5yP.js";import{a as p,i as m,n as ee,o as te,r as ne,t as re}from"./select-BAd2hAoW.js";import{t as ie}from"./download-ekENI2Sw.js";import{a as h}from"./-native-builds-search-BvCftqF2.js";import{t as ae}from"./history-DwdBLzJP.js";import{S as g,_ as oe,b as se,g as ce,h as _,m as v,u as y}from"./native-builds-BOSmoLed.js";import{t as b}from"./refresh-cw-CpCxPYma.js";import{a as le,i as ue,n as de,o as fe,r as pe,t as me}from"./badge-D4Tiwei-.js";import{t as he}from"./uuidv7-DgXZ1zRR.js";import{g as ge,i as _e,p as ve}from"./api-B1z_XXrQ.js";import{t as x}from"./native-builds-CXDwW54k.js";import{n as ye,t as be}from"./PlatformIcon-Kq3q98tU.js";import{a as xe,n as Se,o as Ce,r as we,s as Te,t as Ee}from"./dialog-e9AF5T6h.js";import{i as S,r as C}from"./table-r_sYqKTQ.js";import{t as De}from"./ChannelBadge-Do-lWsLM.js";import{a as w,c as T,d as E,f as Oe,i as ke,l as Ae,n as je,o as D,p as Me,r as Ne,s as O,t as k,u as Pe}from"./RelativeTime-CP7nosYx.js";import{a as A,c as Fe,i as j,l as Ie,n as Le,o as Re,r as ze,s as Be,t as Ve}from"./RowReason-D7TZ2xwW.js";import{t as M}from"./NativeBuildsNav-D3FIlSu0.js";import{i as He,n as Ue,r as N,t as P}from"./SandboxBadge-BPf2uve4.js";var We=t(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),F=e(),I=`npx hot-updater native-build import <file>`,L=`https://hot-updater.dev/docs/guides/native-build#import-a-build-made-elsewhere`;function Ge(){return(0,F.jsxs)(Ee,{children:[(0,F.jsxs)(Te,{render:(0,F.jsx)(r,{"aria-label":`Import a build`,className:`min-h-11 min-w-11 sm:min-h-7 sm:min-w-0`,size:`sm`,variant:`outline`}),children:[(0,F.jsx)(We,{"data-icon":`inline-start`}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:`Import a build`})]}),(0,F.jsxs)(Se,{className:`sm:max-w-lg`,children:[(0,F.jsxs)(xe,{children:[(0,F.jsx)(Ce,{children:`Import a build`}),(0,F.jsx)(we,{children:`Track an .ipa, .aab, .apk or .app built elsewhere as a patch base.`})]}),(0,F.jsx)(l,{label:`the import command`,value:I,wrap:!0}),(0,F.jsxs)(`a`,{className:n({className:`min-h-11 w-full sm:min-h-8 sm:w-fit`,variant:`outline`}),href:L,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]})]})]})}var Ke={"app-store":`App Store`,"ad-hoc":`ad hoc`,development:`development`,enterprise:`enterprise`},R=e=>{let t=v[e.artifact_kind].label,n=e.submitted_to===null?e.artifact_kind===`ipa`&&e.export_method!==null?`${Ke[e.export_method]} ${t}`:t:`${He[e.submitted_to]} build`;return e.is_sandbox?`sandbox ${n}`:n},qe=e=>{if(e===void 0)return{sentence:`A newer build on its channel reaches people the same way.`,label:`Older: a newer build on its channel reaches people the same way`};let t=se(e);return{sentence:`A newer ${R(e)} exists${t===null?`.`:`: ${t}`}`,label:`Older: a newer ${R(e)} exists${t===null?``:`, ${t}`}`}};function z({newer:e}){let t=qe(e);return(0,F.jsx)(Ve,{icon:ae,label:t.label,reason:t.sentence,children:`Older`})}var Je=`https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked`,B=10,V=e=>e===void 0?{}:{channel:e},Ye={one:`older build`,other:`older builds`};function Xe({channel:e,paged:t,folded:i,onClearChannel:a}){return t||i?(0,F.jsx)(O,{icon:h,title:i?`Each build here has a newer one`:`No more native builds`,children:(0,F.jsx)(o,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),search:V(e),to:`/native-builds`,children:`Show the newest builds`})}):e===void 0?(0,F.jsxs)(O,{icon:h,title:`No native builds`,children:[(0,F.jsxs)(`p`,{children:[`Build one with`,` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build android`}),` or`,` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:`native-build ios`}),`, or import one built elsewhere:`]}),(0,F.jsx)(`div`,{className:`w-full text-left`,children:(0,F.jsx)(l,{label:`the import command`,value:I,wrap:!0})}),(0,F.jsxs)(`a`,{className:n({className:`mt-1 min-h-11 sm:min-h-8`,variant:`outline`}),href:Je,rel:`noreferrer`,target:`_blank`,children:[`Native build guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]}),(0,F.jsxs)(`a`,{className:n({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:L,rel:`noreferrer`,target:`_blank`,children:[`Import guide`,(0,F.jsx)(c,{"data-icon":`inline-end`})]})]}):(0,F.jsxs)(O,{icon:h,title:(0,F.jsxs)(F.Fragment,{children:[`No native build embeds `,(0,F.jsx)(`span`,{translate:`no`,children:e})]}),children:[(0,F.jsx)(`p`,{children:`A build embeds the channel it was built on. Build one on this channel, or list every channel's builds.`}),(0,F.jsx)(r,{className:`mt-1 min-h-11 sm:min-h-8`,onClick:a,variant:`outline`,children:`Show all channels`})]})}var H=e=>`${g(e.platform)} ${v[e.artifact_kind].label}`;function U({build:e}){return(0,F.jsx)(o,{"aria-label":H(e),className:`relative rounded-sm font-medium whitespace-nowrap text-foreground transition-colors underline-offset-4 after:absolute after:-inset-x-[10px] after:-inset-y-[10px] hover:text-primary hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,params:{buildId:e.id},to:`/native-builds/$buildId`,children:v[e.artifact_kind].label})}function W({build:e,inTable:t=!1,older:n=!1,newer:r}){return t?(0,F.jsxs)(`span`,{className:`flex max-w-24 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,F.jsx)(U,{build:e}),(0,F.jsx)(P,{build:e}),n?(0,F.jsx)(z,{newer:r}):null]}):(0,F.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1`,children:[(0,F.jsx)(U,{build:e}),(0,F.jsx)(P,{build:e})]})}function G({channel:e,onChannel:t}){return(0,F.jsx)(`button`,{"aria-label":`Show the builds that embed ${e}`,className:`relative flex max-w-full min-w-0 rounded-md text-left after:absolute after:-inset-x-1 after:-inset-y-[11px] focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden`,onClick:()=>t(e),title:e,type:`button`,children:(0,F.jsx)(De,{channel:e,className:`block max-w-32 truncate`})})}function Ze({build:e}){return!N(e)&&!e.is_store_build?(0,F.jsx)(u,{}):(0,F.jsx)(K,{build:e,className:`flex flex-col items-start gap-1`})}function K({build:e,className:t}){return(0,F.jsxs)(`span`,{className:t,children:[(0,F.jsx)(Ue,{build:e}),e.is_store_build?(0,F.jsx)(me,{className:`px-1.5`,variant:`muted`,children:`Store build`}):null]})}function q({build:e}){return(0,F.jsxs)(`a`,{"aria-label":`Download ${oe(e)}`,className:n({className:`min-h-11 sm:min-h-8`,size:`sm`,variant:`outline`}),download:!0,href:ce(e.id),children:[(0,F.jsx)(ie,{"data-icon":`inline-start`}),`Download`]})}function Qe({build:e}){return e.build_number?(0,F.jsx)(`span`,{className:`font-mono tabular-nums`,translate:`no`,children:e.build_number}):(0,F.jsx)(u,{})}var J=e=>he(e.id);function Y({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=_(e);return(0,F.jsxs)(E,{"aria-label":`Open native build ${e.id}`,className:`data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onOpen:()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}}),children:[(0,F.jsx)(C,{children:(0,F.jsx)(W,{build:e,inTable:!0,newer:n,older:t})}),(0,F.jsx)(C,{children:(0,F.jsx)(G,{channel:a,onChannel:r})}),(0,F.jsx)(C,{className:`whitespace-nowrap`,children:(0,F.jsx)(ye,{platform:e.platform})}),(0,F.jsx)(C,{children:(0,F.jsx)(Qe,{build:e})}),(0,F.jsx)(C,{children:(0,F.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})}),(0,F.jsx)(C,{children:(0,F.jsx)(f,{value:e.build_key})}),(0,F.jsx)(C,{children:(0,F.jsx)(Ze,{build:e})}),(0,F.jsx)(C,{className:`whitespace-nowrap text-muted-foreground tabular-nums`,children:y(e.byte_size)}),(0,F.jsx)(C,{className:`text-xs text-muted-foreground`,children:(0,F.jsx)(k,{ms:J(e)})}),(0,F.jsx)(C,{className:`text-right`,children:(0,F.jsx)(q,{build:e})})]})}function X({build:e,older:t=!1,newer:n,onChannel:r}){let i=s(),a=_(e),o=N(e)||e.is_store_build;return(0,F.jsxs)(je,{"aria-label":`Native build ${H(e)} ${e.id}`,className:`gap-3 border-b-0 data-[older=true]:bg-muted/60 data-[older=true]:saturate-50 data-[older=true]:hover:bg-muted/60 data-[older=true]:hover:saturate-100 data-[older=true]:focus-within:saturate-100`,"data-older":t?!0:void 0,onClick:Me(()=>void i({to:`/native-builds/$buildId`,params:{buildId:e.id}})),children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-x-2.5`,children:[(0,F.jsx)(be,{className:`size-4 shrink-0 text-muted-foreground`,platform:e.platform}),(0,F.jsx)(W,{build:e}),t?(0,F.jsx)(z,{newer:n}):null]}),(0,F.jsx)(q,{build:e})]}),(0,F.jsx)(`div`,{className:`flex min-w-0`,children:(0,F.jsx)(G,{channel:a,onChannel:r})}),(0,F.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:g(e.platform)}),e.build_number?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{translate:`no`,children:[`Build`,` `,(0,F.jsx)(`span`,{className:`font-mono tabular-nums text-foreground`,children:e.build_number})]}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`·`})]}):null,(0,F.jsx)(`span`,{className:`tabular-nums`,children:y(e.byte_size)}),(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,F.jsx)(k,{ms:J(e)})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-4 gap-y-6 text-xs`,children:[(0,F.jsxs)(`span`,{className:`flex items-center`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:`Target `}),(0,F.jsx)(d,{appVersion:e.app_version,fingerprintHash:e.fingerprint_hash,nativeAppVersion:e.native_app_version})]}),e.build_key?(0,F.jsxs)(`span`,{className:`flex items-center`,children:[(0,F.jsx)(`span`,{className:`sr-only`,children:`Build key `}),(0,F.jsx)(f,{value:e.build_key})]}):null]}),o?(0,F.jsx)(K,{build:e,className:`flex flex-wrap items-center gap-1.5`}):null]})}function $e({fold:e,channel:t,isMobile:n,open:r,onOpenChange:i,onChannel:a}){let o=ve(t,{...e.from===void 0?{}:{from:e.from},to:e.to},r),s=o.data?.pages??[],c=Object.assign({},...s.map(e=>e.newer)),l=s.flatMap(e=>e.rows),u=n?void 0:B,d=o.isError?(0,F.jsx)(j,{columns:u,label:`Older builds`,onRetry:()=>void o.refetch(),state:`error`}):o.isPending||o.isFetchingNextPage?(0,F.jsx)(j,{columns:u,label:`Loading older builds`,state:`loading`}):o.hasNextPage?(0,F.jsx)(j,{columns:u,label:`Older builds`,onMore:()=>void o.fetchNextPage(),state:`more`}):null,f={label:Re(e,Ye),open:r,onOpenChange:i,panelId:`native-build-fold-${e.to}`};return n?(0,F.jsxs)(Le,{...f,inList:!0,children:[l.map(e=>(0,F.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,F.jsx)(X,{build:e,newer:c[e.id],older:!0,onChannel:a})},e.id)),d]}):(0,F.jsxs)(ze,{...f,columns:B,children:[l.map(e=>(0,F.jsx)(Y,{build:e,newer:c[e.id],older:!0,onChannel:a},e.id)),d]})}function et({builds:e,channel:t,paged:n,onChannel:a}){let o=i(),s=Ie(),c=e.data?.entries,{next:l,previous:u}=e.data??{},d=c?.filter(({kind:e})=>e===`row`).length??0;if(e.isError)return(0,F.jsxs)(de,{variant:`destructive`,children:[(0,F.jsx)(fe,{}),(0,F.jsx)(le,{children:`Native builds couldn't be loaded`}),(0,F.jsx)(ue,{children:`Check your connection and try again.`}),(0,F.jsx)(pe,{children:(0,F.jsxs)(r,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,F.jsx)(b,{"data-icon":`inline-start`}),`Retry`]})})]});let f=(0,F.jsx)(Xe,{channel:t,folded:(c?.length??0)>0,onClearChannel:()=>a(void 0),paged:n}),p=e=>(0,F.jsx)($e,{channel:t,fold:e,isMobile:o,onChannel:a,onOpenChange:t=>s.set(A(e),t),open:s.isOpen(A(e))},`fold-${e.to}`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(T,{children:o?(0,F.jsx)(`div`,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`h-full overflow-y-auto aria-busy:opacity-60`,role:`list`,children:e.isLoading?(0,F.jsx)(Ne,{label:`Loading native builds`}):(0,F.jsxs)(F.Fragment,{children:[d===0?(0,F.jsx)(ke,{children:f}):null,c?.map(e=>e.kind===`fold`?p(e):(0,F.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,F.jsx)(X,{build:e.row,onChannel:a})},e.row.id))]})}):(0,F.jsx)(w,{"aria-busy":e.isPlaceholderData,"aria-label":`Native builds`,className:`aria-busy:opacity-60 [&_td]:px-1.5 [&_th]:px-1.5`,header:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(S,{children:`Artifact`}),(0,F.jsx)(S,{children:`Channel`}),(0,F.jsx)(S,{children:`Platform`}),(0,F.jsx)(S,{children:`Build`}),(0,F.jsx)(S,{children:`Target`}),(0,F.jsx)(S,{children:`Build key`}),(0,F.jsx)(S,{children:`Store`}),(0,F.jsx)(S,{children:`Size`}),(0,F.jsx)(S,{children:`Created`}),(0,F.jsx)(S,{className:`text-right`,children:(0,F.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),rowGroups:!0,children:e.isLoading?(0,F.jsx)(D,{children:(0,F.jsx)(Oe,{columns:B,label:`Loading native builds`})}):(0,F.jsxs)(F.Fragment,{children:[d===0?(0,F.jsx)(D,{children:(0,F.jsx)(Ae,{columns:B,children:f})}):null,Fe(c??[]).map(e=>e.kind===`fold`?p(e.fold):(0,F.jsx)(D,{children:e.rows.map(e=>(0,F.jsx)(Y,{build:e,onChannel:a},e.id))},`rows-${e.rows[0].id}`))]})})}),e.isLoading||c===void 0?null:(0,F.jsx)(Pe,{count:d,folded:{...Be(c),label:`older`},label:`Native build pages`,noun:[`build`,`builds`],pending:e.isPlaceholderData,newest:n?{search:V(t),to:`/native-builds`}:void 0,next:l===void 0?void 0:{search:{...V(t),before:l},to:`/native-builds`},previous:u===void 0?void 0:{search:{...V(t),...u},to:`/native-builds`}})]})}var Z=`all`,Q=`channel:`,$=e=>`${Q}${e}`;function tt({search:e,onSearchChange:t}){let{channel:n,before:i,after:o}=e,s=ge(e),c=_e(),l=c.data?.map(({name:e})=>e)??[],u=n===void 0||l.includes(n)?l:[n,...l],d=e=>t(e===void 0?{}:{channel:e});return(0,F.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,F.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,F.jsx)(a,{className:`-ml-1 size-11 lg:size-7`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(h,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,F.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,F.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`Store and test builds, each the built-in bundle its OTAs patch from.`})]}),(0,F.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 bg-muted/5 p-3 sm:p-6`,children:[(0,F.jsx)(M,{current:`builds`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(re,{items:[{label:`All channels`,value:Z},...u.map(e=>({label:e,value:$(e)}))],onOpenChange:e=>{e&&c.refetch()},onValueChange:e=>d(e?.startsWith(Q)?e.slice(8):void 0),value:n===void 0?Z:$(n),children:[(0,F.jsx)(p,{"aria-label":`Channel`,className:`min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-48 sm:flex-none sm:data-[size=default]:h-8`,children:(0,F.jsx)(te,{})}),(0,F.jsx)(ee,{children:(0,F.jsxs)(ne,{children:[(0,F.jsx)(m,{value:Z,children:`All channels`}),u.map(e=>(0,F.jsx)(m,{translate:`no`,value:$(e),children:e},e))]})})]}),(0,F.jsx)(`div`,{className:`ml-auto`,children:(0,F.jsx)(Ge,{})}),(0,F.jsx)(r,{"aria-label":`Refresh native builds`,className:`size-11 sm:size-7`,disabled:s.isLoading,onClick:()=>void s.refetch(),size:`icon-sm`,variant:`ghost`,children:(0,F.jsx)(b,{"aria-hidden":`true`})})]}),(0,F.jsx)(et,{builds:s,channel:n,onChannel:d,paged:i!==void 0||o!==void 0})]})]})}function nt(){let e=x.useSearch(),t=x.useNavigate();return(0,F.jsx)(tt,{onSearchChange:e=>void t({search:e}),search:e})}export{nt as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-UnsNYOry.js";import{f as t,p as n}from"./uuidv7-DgXZ1zRR.js";var r=e(`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`}]]),i=e=>/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`,a={apk:{label:`APK`,installs:`Android device or emulator`},aab:{label:`AAB`,installs:`Google Play or bundletool`},app:{label:`Simulator app`,installs:`iOS Simulator`},ipa:{label:`IPA`,installs:`registered iOS devices`}},o=e=>e===`ios`?`iOS`:`Android`,s=e=>{let t=e.submitted_version??[e.app_version??e.native_app_version??null,e.build_number===null?null:`(${e.build_number})`].filter(e=>e!==null).join(` `);return t===``?null:`${o(e.platform)} ${t}`},c=e=>`/api/native-builds/${encodeURIComponent(e)}/download`,l=(e,t,n)=>`${e.origin}${u(e,t)}${c(t)}?t=${encodeURIComponent(n)}`,u=(e,t)=>{let n=p(t);return e.pathname.endsWith(n)?e.pathname.slice(0,-n.length):``},d=(e,t)=>{let n=e.pathname.replace(/\/$/u,``),r=t.replace(/\/$/u,``);return n.endsWith(r)?n.slice(0,n.length-r.length):``},f=e=>{let t=e.pathname.lastIndexOf(`/native-builds`);return t<0?``:e.pathname.slice(0,t)},p=e=>`/native-builds/${encodeURIComponent(e)}`,m=3600*1e3,h=`hot-updater-ios-udid`,g=`hot-updater-ios-device-receipt`,_=`hot-updater-ios-device-pending-receipt`,v=e=>{try{let t=e.split(`.`)[0].replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=JSON.parse(atob(t)).x;return typeof n==`number`?n:0}catch{return 0}},y=e=>{try{let t=JSON.parse(window.sessionStorage.getItem(`hot-updater-ios-device-pending-receipt`)??`null`);return typeof t?.receipt==`string`?v(t.receipt)<=Date.now()?(window.sessionStorage.removeItem(_),null):e!==null&&t.udid===e?t.receipt:null:null}catch{return null}},b=(e,t)=>{try{window.sessionStorage.setItem(_,JSON.stringify({udid:e,receipt:t}))}catch{}},x=e=>{try{JSON.parse(window.sessionStorage.getItem(`hot-updater-ios-device-pending-receipt`)??`null`)?.receipt===e&&window.sessionStorage.removeItem(_)}catch{}},S=/^(?:[0-9a-f]{40}|[0-9a-f]{8}-[0-9a-f]{16})$/iu,C=`/native-builds/devices`,w=`/_hot-updater/devices/device.mobileconfig`,T=(e,t)=>`${e}${w}?t=${encodeURIComponent(t)}`,E=`npx hot-updater native-build devices add`,D=e=>`…${e.slice(-6)}`,O=e=>`/_hot-updater/native-builds/${encodeURIComponent(e)}/manifest.plist`,k=(e,t,n)=>{let r=`${e.origin}${u(e,t)}${O(t)}?t=${encodeURIComponent(n)}`;return`itms-services://?action=download-manifest&url=${encodeURIComponent(r)}`},A=e=>n(e.channel_id.slice(8)),j=e=>{if(e.fingerprintHash!==null)return{platform:e.platform,channel:e.channel,fingerprintHash:e.fingerprintHash,appVersion:null};let n=e.targetAppVersion;return n===null||t(n)!==n?null:{platform:e.platform,channel:e.channel,fingerprintHash:null,appVersion:n}},M=e=>{let t=(e.artifact_storage_uri.split(/[?#]/,1)[0]??``).split(`/`).at(-1)??``;try{return decodeURIComponent(t)}catch{return t}},N=[`B`,`KB`,`MB`,`GB`],P=e=>{let t=e,n=0;for(;t>=1024&&n<N.length-1;)t/=1024,n+=1;return`${n===0?t:t.toFixed(1)} ${N[n]}`},F=e=>`npx hot-updater native-build install ${i(e.id)}`;export{y as C,r as D,i as E,o as S,x as T,M as _,h as a,s as b,u as c,b as d,T as f,c as g,A as h,S as i,f as l,a as m,C as n,m as o,D as p,g as r,d as s,E as t,P as u,F as v,j as w,l as x,k as y};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds-7sC78eTq.js","assets/sidebar-UnsNYOry.js","assets/preload-helper-52zhjEsw.js","assets/link-D95E0fwF.js","assets/select-BAd2hAoW.js","assets/useCompositeListItem-B9ONn9qn.js","assets/check-Dz_5aNwx.js","assets/arrow-up-right-BPRe5soE.js","assets/TargetDisplay-DzSkf5yP.js","assets/copy-BxI24-g-.js","assets/key-round-B-vaAsR7.js","assets/native-builds-BOSmoLed.js","assets/uuidv7-DgXZ1zRR.js","assets/dist-BEIz5ojx.js","assets/HashValueDisplay-DKziWjEg.js","assets/download-ekENI2Sw.js","assets/-native-builds-search-BvCftqF2.js","assets/history-DwdBLzJP.js","assets/refresh-cw-CpCxPYma.js","assets/badge-D4Tiwei-.js","assets/ChannelBadge-Do-lWsLM.js","assets/RelativeTime-CP7nosYx.js","assets/relativeTime-D_aYJRc7.js","assets/chevron-right-CuYrscDY.js","assets/table-r_sYqKTQ.js","assets/RowReason-D7TZ2xwW.js","assets/PlatformIcon-Kq3q98tU.js","assets/NativeBuildsNav-D3FIlSu0.js","assets/tabs-BBfg-c0h.js","assets/SandboxBadge-BPf2uve4.js","assets/dialog-e9AF5T6h.js","assets/api-B1z_XXrQ.js","assets/useMutation-BWX97JX2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,r as t,t as n}from"./preload-helper-52zhjEsw.js";import{r}from"./-native-builds-search-BvCftqF2.js";var i=e(`/native-builds`)({component:t(()=>n(()=>import(`./native-builds-7sC78eTq.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:r});export{i as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_._buildId-u5dG7ej5.js","assets/sidebar-UnsNYOry.js","assets/link-D95E0fwF.js","assets/relativeTime-D_aYJRc7.js","assets/arrow-up-right-BPRe5soE.js","assets/TargetDisplay-DzSkf5yP.js","assets/copy-BxI24-g-.js","assets/key-round-B-vaAsR7.js","assets/native-builds-BOSmoLed.js","assets/uuidv7-DgXZ1zRR.js","assets/dist-BEIz5ojx.js","assets/HashValueDisplay-DKziWjEg.js","assets/chevron-right-CuYrscDY.js","assets/download-ekENI2Sw.js","assets/RolloutPercentageBadge-DnmU8XbU.js","assets/badge-D4Tiwei-.js","assets/git-branch-BWrvONjc.js","assets/-native-builds-search-BvCftqF2.js","assets/history-DwdBLzJP.js","assets/refresh-cw-CpCxPYma.js","assets/smartphone-lSZWrqxx.js","assets/QrCode-D3-Vuudy.js","assets/BundleIdDisplay-D8oR8mcP.js","assets/ChannelBadge-Do-lWsLM.js","assets/PlatformIcon-Kq3q98tU.js","assets/IosInstall-DsKczesK.js","assets/useMutation-BWX97JX2.js","assets/loader-circle-C26cZDSM.js","assets/field-PkdRPD3A.js","assets/api-B1z_XXrQ.js","assets/preload-helper-52zhjEsw.js","assets/SandboxBadge-BPf2uve4.js","assets/card-BfeRlTvj.js","assets/empty-DpSPWLc2.js","assets/table-r_sYqKTQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{Vr as e}from"./sidebar-UnsNYOry.js";import{i as t,r as n,t as r}from"./preload-helper-52zhjEsw.js";import{n as i}from"./-native-builds-search-BvCftqF2.js";var a=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),o=t(`/native-builds_/$buildId`)({component:n(()=>r(()=>import(`./native-builds_._buildId-u5dG7ej5.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,33,34])),`component`),validateSearch:i});export{a as n,o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Di as t,Ri as n,Vi as r,Vr as i,_r as a,gr as o,p as s}from"./sidebar-UnsNYOry.js";import{t as c}from"./link-D95E0fwF.js";import{t as l}from"./arrow-up-right-BPRe5soE.js";import{a as u,i as d,n as f,r as p,t as ee}from"./TargetDisplay-DzSkf5yP.js";import{t as m}from"./chevron-right-CuYrscDY.js";import{n as te,t as h}from"./native-builds_._buildId-C7-yUwvH.js";import{t as g}from"./download-ekENI2Sw.js";import{i as ne,n as re,r as _,t as ie}from"./RolloutPercentageBadge-DnmU8XbU.js";import{t as ae}from"./git-branch-BWrvONjc.js";import{a as oe}from"./-native-builds-search-BvCftqF2.js";import{t as se}from"./history-DwdBLzJP.js";import{E as v,S as y,_ as b,b as ce,g as x,m as S,p as le,u as C,v as w,x as ue}from"./native-builds-BOSmoLed.js";import{t as T}from"./refresh-cw-CpCxPYma.js";import{t as de}from"./smartphone-lSZWrqxx.js";import{a as E,i as D,n as O,o as k,r as A,t as j}from"./badge-D4Tiwei-.js";import{n as M}from"./dist-BEIz5ojx.js";import{a as N,n as P,o as F,t as I}from"./card-BfeRlTvj.js";import{r as fe}from"./uuidv7-DgXZ1zRR.js";import{n as pe}from"./relativeTime-D_aYJRc7.js";import{a as me,d as he,f as ge,h as _e,l as ve,u as ye}from"./api-B1z_XXrQ.js";import{a as be,m as xe,n as Se}from"./IosInstall-DsKczesK.js";import{a as L,i as R,n as z,o as B,r as V,t as H}from"./empty-DpSPWLc2.js";import{t as Ce}from"./PlatformIcon-Kq3q98tU.js";import{a as U,i as W,n as G,o as K,r as q,t as J}from"./table-r_sYqKTQ.js";import{t as we}from"./BundleIdDisplay-D8oR8mcP.js";import{t as Te}from"./ChannelBadge-Do-lWsLM.js";import{a as Y,n as Ee,r as X,t as De}from"./SandboxBadge-BPf2uve4.js";import{t as Oe}from"./QrCode-D3-Vuudy.js";var ke=i(`package-open`,[[`path`,{d:`M12 22v-9`,key:`x3hkom`}],[`path`,{d:`M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z`,key:`2ntwy6`}],[`path`,{d:`M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13`,key:`1pmm1c`}],[`path`,{d:`M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z`,key:`12ttoo`}]]),Z=t();function Ae({value:e,length:t,shown:n=e.slice(0,t),label:r}){let i=async()=>{try{await navigator.clipboard.writeText(e),M.success(`Copied to clipboard`,{description:e})}catch{M.error(`Could not copy the ${r}`)}};return(0,Z.jsx)(`button`,{"aria-label":`Copy the ${r} ${e}`,className:`relative cursor-copy rounded-sm font-mono after:absolute after:-inset-x-2 after:-inset-y-4 sm:after:hidden text-xs whitespace-nowrap tabular-nums underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,onClick:e=>{e.stopPropagation(),i()},title:e,translate:`no`,type:`button`,children:n})}function je({hash:e}){let t=me();if(e===null)return(0,Z.jsx)(f,{});let n=re(t.data?.console.gitUrl,e);return n===null?(0,Z.jsx)(Ae,{label:`commit`,length:7,value:e}):(0,Z.jsx)(`a`,{className:`relative font-mono text-xs whitespace-nowrap underline-offset-4 after:absolute after:-inset-x-2 after:-inset-y-4 hover:underline sm:after:hidden`,href:n,onClick:e=>e.stopPropagation(),rel:`noreferrer`,target:`_blank`,title:e,translate:`no`,children:e.slice(0,7)})}function Q({label:e,children:t}){return(0,Z.jsxs)(`div`,{className:`grid gap-1 sm:grid-cols-[10rem_minmax(0,1fr)] sm:gap-4`,children:[(0,Z.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e}),(0,Z.jsx)(`dd`,{className:`min-w-0 text-sm`,children:t})]})}function Me({detail:e}){let{build:t}=e,n=ve();if(t.is_sandbox)return null;let r=!t.is_store_build;return(0,Z.jsx)(o,{className:`min-h-11 shrink-0 sm:min-h-8`,disabled:n.isPending,onClick:()=>n.mutate({id:t.id,storeBuild:r},{onSuccess:()=>{M.success(r?`Marked as the store build`:`Mark cleared`)},onError:e=>{M.error(`Could not change the mark`,{description:e.message})}}),size:`sm`,type:`button`,variant:`outline`,children:r?`Mark as store build`:`Clear mark`})}function Ne({detail:e}){let{build:t,newestInScope:n,storeBuildInScope:r}=e,i=r??n;if(i===null)return null;let a=i.id===t.id;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-md border bg-muted/40 p-3 text-xs sm:flex-row sm:items-center sm:justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(a?te:se,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}),r?.id===t.id?(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Store build.`}),` New deploys to this scope patch from this build.`]}):a?(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Current baseline.`}),` The newest build, and no store build is marked. New deploys to this scope patch from this build.`]}):(0,Z.jsxs)(`p`,{children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Not the base.`}),` New deploys patch from`,` `,(0,Z.jsxs)(c,{className:`inline-flex items-center gap-0.5 font-medium underline underline-offset-4`,params:{buildId:i.id},to:`/native-builds/$buildId`,children:[ce(i)??(0,Z.jsxs)(Z.Fragment,{children:[y(i.platform),` `,S[i.artifact_kind].label,` ·`,` `,(0,Z.jsx)(_,{uuid:i.id})]}),(0,Z.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]}),`, so this one gets no new patches.`]})]}),(0,Z.jsx)(Me,{detail:e})]})}function Pe({detail:e}){let{build:t,builtInBundle:n,channel:r}=e,i=n?.childCount??0;return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Built-in bundle`})})}),(0,Z.jsxs)(P,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(Q,{label:`Bundle ID`,children:(0,Z.jsx)(we,{bundleId:t.min_bundle_id})}),(0,Z.jsx)(Q,{label:`OTAs patching from it`,children:(0,Z.jsx)(`span`,{className:`tabular-nums`,children:i===1?`1 bundle`:`${i} bundles`})}),(0,Z.jsx)(Q,{label:`Scope`,children:(0,Z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,Z.jsx)(c,{"aria-label":`Show the builds that embed ${r}`,className:`relative rounded-md after:absolute after:-inset-x-1 after:-inset-y-[11px] sm:after:hidden`,search:{channel:r},to:`/native-builds`,children:(0,Z.jsx)(Te,{channel:r})}),(0,Z.jsx)(`span`,{className:`text-xs`,children:y(t.platform)})]})}),(0,Z.jsx)(Q,{label:`Target`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(p,{appVersion:t.app_version,fingerprintHash:t.fingerprint_hash,nativeAppVersion:t.native_app_version})})}),(0,Z.jsx)(Q,{label:`Build key`,children:(0,Z.jsx)(`span`,{className:`text-xs`,children:(0,Z.jsx)(ee,{value:t.build_key})})}),t.build_number?(0,Z.jsx)(Q,{label:`Build`,children:(0,Z.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,translate:`no`,children:t.build_number})}):null,X(t)?(0,Z.jsx)(Q,{label:`Store`,children:(0,Z.jsx)(Ee,{build:t,withTime:!0})}):null,(0,Z.jsx)(Q,{label:`Commit`,children:(0,Z.jsx)(je,{hash:t.git_commit_hash})}),(0,Z.jsx)(Q,{label:`Created`,children:(0,Z.jsx)(_,{format:`both`,uuid:t.id})})]}),(0,Z.jsx)(Ne,{detail:e}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A store or test install of this build runs this bundle until its first OTA. That OTA downloads as a patch from this bundle when one exists, and as the full bundle otherwise.`})]})]})}var Fe=r(pe(),1),Ie=r(n(),1),$={ipa:`The .ipa installs only on devices its signing profile allows (development or ad hoc); an App Store export reaches testers through TestFlight.`,aab:`The .aab installs through Google Play or bundletool, not from the file.`},Le={apk:`Scan with an Android phone's camera, then open the APK to install it.`,ipa:`Scan to download. ${$.ipa}`,aab:`Scan to download. ${$.aab}`,app:`Scan to download the .app.zip on a Mac.`};function Re(){let{origin:e,pathname:t}=window.location;return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Oe,{className:`size-48`,label:`Open this page on an iPhone`,value:`${e}${t}`}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:`Scan with an iPhone to install this build from here. The phone signs in to the Console first.`})]})}function ze({build:e,url:t,note:n}){return(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,Z.jsx)(Oe,{className:`size-48`,label:`Download ${b(e)}`,value:t}),(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:Le[e.artifact_kind]}),n?(0,Z.jsx)(`p`,{className:`max-w-56 text-center text-xs text-muted-foreground`,children:n}):null]})}function Be({message:e}){return(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`The download link couldn't be created`}),(0,Z.jsx)(D,{children:e})]})}function Ve({build:t}){let n=ge(t.id),r=n.data?.url;if(r===null){let e=$[t.artifact_kind];return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{children:`This storage gives no download link a phone can open without signing in, so there is no QR code. Download the build here, or open this page on the phone signed in to the console.`}),e?(0,Z.jsx)(`p`,{children:e}):null]})}return r===void 0?n.isError?(0,Z.jsx)(Be,{message:n.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(ze,{build:t,note:`This link expires. If the download fails, reload this page.`,url:r})}function He({build:e}){return(0,Z.jsx)(`span`,{className:`font-mono text-foreground`,translate:`no`,children:e.submitted_version??`this build`})}function Ue({build:e}){let t=e.submitted_to===`testflight`?{name:`App Store Connect`,url:`https://appstoreconnect.apple.com/apps`}:{name:`Play Console`,url:`https://play.google.com/console`};return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),(0,Z.jsxs)(P,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(We,{build:e}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,Z.jsxs)(`a`,{className:a({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`}),href:t.url,rel:`noreferrer`,target:`_blank`,children:[(0,Z.jsx)(ne,{"data-icon":`inline-start`}),`Open `,t.name]}),(0,Z.jsxs)(`a`,{className:a({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,variant:`outline`}),download:!0,href:x(e.id),children:[(0,Z.jsx)(g,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,b(e)]})]})]})]})]})}function We({build:e}){switch(e.artifact_kind){case`apk`:return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Your browser needs the "Install unknown apps" permission.`}),e.is_sandbox?(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Its .sandbox ID installs it beside a Play copy.`}):(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`If this package is already installed with another signing key, such as a Play copy, the install fails. Uninstall that copy first, or build with sandbox: true, whose .sandbox ID installs beside it.`}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`On an emulator or a phone over USB, install and open it from your project:`}),(0,Z.jsx)(d,{label:`the install command`,value:w(e)})]});case`app`:return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`It runs only in the iOS Simulator. In your project, install and open it on the booted one:`}),(0,Z.jsx)(d,{label:`the install command`,value:w(e)})]});case`aab`:return X(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Submitted to`,` `,e.submitted_to===`play-internal`?Y[`play-internal`].name:Y[e.submitted_to].label,` `,`as `,(0,Z.jsx)(He,{build:e}),`.`,` `,e.submitted_to===`play-production`?`Users`:`Testers`,` get it once its release is rolled out; on an app Play Console hasn't published, the release is a draft you roll out in Play Console.`]}):(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`For testers, build and release to internal testing:`}),(0,Z.jsx)(d,{label:`the Google Play command`,value:`npx hot-updater google-play upload`})]});case`ipa`:return X(e)?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`On TestFlight as `,(0,Z.jsx)(He,{build:e}),`. Internal testers install it from the TestFlight app once App Store Connect has processed it, and a preview's pull request comment shows that state.`]}):(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Over USB, Xcode or Apple Configurator installs it. For testers without a registered device:`}),(0,Z.jsx)(d,{label:`the TestFlight command`,value:`npx hot-updater testflight`})]})}}function Ge({link:e,url:t}){return e?.status===`no-secret`?(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:[`Set `,e.secretName,` on the Console to create links.`]}):e?.status!==`issued`||t===null?null:(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsx)(d,{label:`the download link`,value:t}),(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Anyone with this link can download this build until`,` `,(0,Z.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,Fe.default)(e.expiresAt).format(`YYYY-MM-DD`),`.`]})]})]})}function Ke({build:e}){return X(e)&&(e.artifact_kind===`ipa`||e.artifact_kind===`aab`)?(0,Z.jsx)(Ue,{build:e}):(0,Z.jsx)(Je,{build:e})}function qe({children:e}){let[t,n]=(0,Ie.useState)(!1),r=(0,Ie.useId)();return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 border-t pt-3`,children:[(0,Z.jsxs)(`button`,{"aria-controls":r,"aria-expanded":t,className:`group/other -mx-1 flex min-h-11 items-center gap-1.5 self-start rounded-md px-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none motion-reduce:transition-none sm:min-h-8`,onClick:()=>n(e=>!e),type:`button`,children:[(0,Z.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 transition-transform group-aria-expanded/other:rotate-90 motion-reduce:transition-none`}),`Other ways to install`]}),(0,Z.jsx)(`div`,{hidden:!t,id:r,children:e})]})}function Je({build:t}){let n=b(t),r=he(t.id),i=r.data?.status===`issued`?ue(window.location,t.id,r.data.token):null,o=be(),s=t.artifact_kind===`ipa`,c=s&&o?.ios===!0,l=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,Z.jsx)(We,{build:t}),(0,Z.jsxs)(`a`,{className:a({className:`h-auto min-h-11 w-full min-w-0 py-2 whitespace-normal sm:min-h-8 sm:w-fit`,variant:`outline`}),download:!0,href:i??x(t.id),children:[(0,Z.jsx)(g,{"data-icon":`inline-start`}),(0,Z.jsxs)(`span`,{className:`text-left [overflow-wrap:anywhere]`,children:[`Download `,n]})]}),(0,Z.jsx)(Ge,{link:r.data,url:i})]});return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Install`})})}),c?(0,Z.jsxs)(P,{className:`flex min-w-0 flex-col gap-4 p-4 sm:p-6`,children:[(0,Z.jsx)(Se,{build:t,device:o}),(0,Z.jsx)(qe,{children:l})]}):(0,Z.jsxs)(P,{className:`grid gap-6 p-4 sm:grid-cols-[12rem_minmax(0,1fr)] sm:p-6`,children:[s&&i!==null?(0,Z.jsx)(Re,{}):i===null?r.data===void 0?r.isError?(0,Z.jsx)(Be,{message:r.error.message}):(0,Z.jsx)(e,{className:`size-48`}):(0,Z.jsx)(Ve,{build:t}):(0,Z.jsx)(ze,{build:t,url:i}),l]})]})}function Ye({build:t}){let n=xe(t.id),r=n.data;if(r?.status===`store`||r?.status===`enterprise`)return null;let i=r?.status===`listed`?r.devices:null;return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(N,{className:`flex flex-row items-center gap-2 border-b px-4 py-3`,children:[(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Devices in this build`})}),i===null?null:(0,Z.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:i.length}),(0,Z.jsx)(c,{className:a({className:`ml-auto h-11 sm:h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds/devices`,children:`iOS devices`})]}),(0,Z.jsx)(P,{className:`p-0`,children:n.isPending?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Reading this IPA's devices`}),(0,Z.jsx)(e,{className:`h-8 w-full`}),(0,Z.jsx)(e,{className:`h-8 w-full`})]}):n.isError||r?.status===`unavailable`?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{className:`min-w-0 flex-1`,children:`The Console couldn't read this IPA's devices from storage.`}),(0,Z.jsxs)(o,{className:`h-11 sm:h-7`,onClick:()=>void n.refetch(),size:`sm`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})]}):i?.length===0?(0,Z.jsx)(`p`,{className:`p-4 text-xs text-muted-foreground`,children:`This IPA lists no devices.`}):(0,Z.jsx)(`ul`,{"aria-label":`Devices in this build`,className:`divide-y`,children:i?.map(e=>(0,Z.jsxs)(`li`,{className:`flex min-h-11 min-w-0 items-center gap-3 px-4 py-2 text-sm`,children:[(0,Z.jsx)(de,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start`,children:[(0,Z.jsx)(`span`,{className:e.name===null?`truncate text-muted-foreground`:`truncate`,children:e.name??`Unknown device`}),(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(Ae,{label:`UDID`,shown:le(e.udid),value:e.udid})})]})]},e.udid))})})]})}var Xe=`https://hot-updater.dev/docs/guides/bundle-diffing#first-ota-update`;function Ze({detail:t,page:n,onPage:r}){let i=n.before!==void 0||n.after!==void 0,s=_e(t.build.min_bundle_id,n,i),d=i?s.data:t.patches,{next:f,previous:p}=d??{};return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,id:`patches`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Patches from this build`})})}),(0,Z.jsxs)(P,{className:`p-0`,children:[i&&s.isError?(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`Patches couldn't be loaded`}),(0,Z.jsx)(D,{children:s.error.message}),(0,Z.jsx)(A,{children:(0,Z.jsxs)(o,{onClick:()=>void s.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]})}):d===void 0?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Loading patches`}),(0,Z.jsx)(e,{className:`h-4 w-full`}),(0,Z.jsx)(e,{className:`h-4 w-2/3`})]}):d.data.length===0?i?(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsx)(R,{children:(0,Z.jsx)(B,{children:`No more patches`})}),(0,Z.jsx)(o,{className:`min-h-11 sm:min-h-8`,onClick:()=>r({}),variant:`outline`,children:`Show the newest patches`})]}):(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(ae,{})}),(0,Z.jsx)(B,{children:`No patches from this build`}),(0,Z.jsxs)(V,{children:[`A deploy adds a patch from this build's bundle while it is its scope's store build, or its newest build with none marked, and the deploy config turns patches on, with`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`patch`}),` in`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`hot-updater.config.ts`}),`.`]})]}),(0,Z.jsx)(z,{children:(0,Z.jsxs)(`a`,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),href:Xe,rel:`noreferrer`,target:`_blank`,children:[`Bundle diffing guide`,(0,Z.jsx)(l,{"data-icon":`inline-end`})]})})]}):(0,Z.jsxs)(J,{"aria-busy":i&&s.isPlaceholderData,"aria-label":`Patches from this build`,className:`table-fixed`,children:[(0,Z.jsx)(U,{children:(0,Z.jsxs)(K,{children:[(0,Z.jsx)(W,{children:`Target bundle`}),(0,Z.jsx)(W,{className:`w-28`,children:`Patch size`}),(0,Z.jsx)(W,{className:`hidden w-32 sm:table-cell`,children:`Created`})]})}),(0,Z.jsx)(G,{children:d.data.map(e=>(0,Z.jsxs)(K,{children:[(0,Z.jsx)(q,{className:`py-3 whitespace-normal`,children:(0,Z.jsx)(c,{className:`block font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline`,search:{bundleId:e.bundleId},title:e.bundleId,to:`/`,translate:`no`,children:e.bundleId})}),(0,Z.jsx)(q,{className:`text-xs tabular-nums`,children:C(e.byteSize)}),(0,Z.jsx)(q,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(_,{uuid:e.bundleId})})]},e.bundleId))})]}),f!==void 0||p!==void 0?(0,Z.jsxs)(`nav`,{"aria-label":`Patch pages`,className:`flex items-center justify-end gap-2 border-t px-4 py-2`,children:[(0,Z.jsxs)(o,{className:`min-h-11 sm:min-h-7`,disabled:p===void 0||i&&s.isPlaceholderData,onClick:()=>r({after:p}),size:`sm`,variant:`ghost`,children:[(0,Z.jsx)(u,{"data-icon":`inline-start`}),`Newer`]}),(0,Z.jsxs)(o,{className:`min-h-11 sm:min-h-7`,disabled:f===void 0||i&&s.isPlaceholderData,onClick:()=>r({before:f}),size:`sm`,variant:`ghost`,children:[`Older`,(0,Z.jsx)(m,{"data-icon":`inline-end`})]})]}):null]})]})}var Qe=(e,t)=>{let n=e.data.find(e=>e.bundleId===t);if(n!==void 0)return{kind:`patch`,byteSize:n.byteSize};let r=e.data.at(-1)?.bundleId;return e.next!==void 0&&r!==void 0&&t<r?{kind:`unknown`}:{kind:`full`}};function $e({download:e}){switch(e.kind){case`patch`:return(0,Z.jsxs)(`span`,{className:`text-xs`,children:[`Patch`,` `,(0,Z.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`(`,C(e.byteSize),`)`]})]});case`full`:return(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Full bundle`});case`unknown`:return(0,Z.jsx)(`a`,{className:`text-xs underline-offset-4 hover:underline`,href:`#patches`,children:`See patches`})}}function et({detail:e}){let{build:t,channel:n,servedNow:r,patches:i,catalogScopeKey:o}=e,s=r.find(({rolloutCohortCount:e,targetCohorts:t})=>e>0||t.length>0)?.bundleId,u=t.is_store_build&&s!=null&&Qe(i,s).kind===`full`?[`npx hot-updater patch`,`-p ${t.platform}`,`-c ${v(n)}`,`-b ${v(s)}`,`--base-artifact-id ${v(t.min_bundle_id)}`].join(` `):null,f=(0,Z.jsxs)(c,{className:`inline-flex items-center gap-0.5 underline-offset-4 hover:underline`,search:{scopeKey:o},to:`/`,children:[`All releases in this scope`,(0,Z.jsx)(l,{"aria-hidden":`true`,className:`size-3`})]});return(0,Z.jsxs)(I,{className:`overflow-hidden shadow-sm`,children:[(0,Z.jsx)(N,{className:`border-b px-4 py-3`,children:(0,Z.jsx)(F,{className:`text-sm`,children:(0,Z.jsx)(`h2`,{children:`Served now`})})}),(0,Z.jsx)(P,{className:`p-0`,children:r.length===0?(0,Z.jsxs)(H,{className:`py-10`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(ke,{})}),(0,Z.jsx)(B,{children:`No OTA for this build yet`}),(0,Z.jsxs)(V,{children:[`No release in this build's scope is newer than its built-in bundle. Deploy one with`,` `,(0,Z.jsx)(`code`,{className:`font-mono`,children:`hot-updater deploy`}),`, and it shows here.`]})]}),(0,Z.jsx)(z,{children:(0,Z.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),search:{scopeKey:o},to:`/`,children:`All releases in this scope`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(J,{"aria-label":`Served now`,className:`table-fixed`,children:[(0,Z.jsx)(U,{children:(0,Z.jsxs)(K,{children:[(0,Z.jsx)(W,{children:`Bundle`}),(0,Z.jsx)(W,{className:`hidden w-40 md:table-cell`,children:`Rollout`}),(0,Z.jsx)(W,{className:`hidden w-32 sm:table-cell`,children:`Created`}),(0,Z.jsx)(W,{className:`w-32`,children:`First OTA download`})]})}),(0,Z.jsx)(G,{children:r.map(e=>{let t=e.bundleId,n=e.rolloutCohortCount/fe*100;return(0,Z.jsxs)(K,{children:[(0,Z.jsx)(q,{className:`py-3 whitespace-normal`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(c,{className:`font-mono text-xs [overflow-wrap:anywhere] underline-offset-4 hover:underline`,search:{releaseId:e.releaseId},title:t,to:`/`,translate:`no`,children:t}),e.message?(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.message}):null]})}),(0,Z.jsx)(q,{className:`hidden md:table-cell`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.targetCohorts.length>0?(0,Z.jsx)(j,{variant:`secondary`,children:e.targetCohorts.length===1?`1 cohort`:`${e.targetCohorts.length} cohorts`}):(0,Z.jsx)(ie,{percentage:n}),e.shouldForceUpdate?(0,Z.jsx)(j,{variant:`outline`,children:`Forced`}):null]})}),(0,Z.jsx)(q,{className:`hidden sm:table-cell`,children:(0,Z.jsx)(_,{uuid:t})}),(0,Z.jsx)(q,{children:(0,Z.jsx)($e,{download:Qe(i,t)})})]},e.releaseId)})})]}),u===null?null:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-4 py-3 text-xs`,children:[(0,Z.jsx)(`p`,{children:`The OTA fresh installs get first has no patch from this store build, so they download all of it. Add one from your project:`}),(0,Z.jsx)(d,{label:`the patch command`,value:u})]}),(0,Z.jsxs)(`p`,{className:`border-t px-4 py-3 text-xs text-muted-foreground`,children:[`What the update check serves an install of this build now, newest first: not the history. `,f]})]})})]})}function tt({buildId:t,search:n,onSearchChange:r}){let i=ye(t),l=i.data,d={...n.patchesBefore===void 0?{}:{before:n.patchesBefore},...n.patchesAfter===void 0?{}:{after:n.patchesAfter}};return(0,Z.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Z.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 items-center gap-x-2 border-b bg-background px-3 py-3 sm:min-h-12 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,Z.jsx)(s,{className:`-ml-1 size-11 lg:size-7`}),(0,Z.jsxs)(c,{className:a({className:`min-h-11 sm:min-h-7`,size:`sm`,variant:`ghost`}),to:`/native-builds`,children:[(0,Z.jsx)(u,{"data-icon":`inline-start`}),`Native builds`]}),l?(0,Z.jsxs)(`h1`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,Z.jsx)(Ce,{className:`size-3.5 shrink-0 text-muted-foreground`,platform:l.build.platform}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,Z.jsxs)(`span`,{className:`sr-only`,children:[y(l.build.platform),` `]}),S[l.build.artifact_kind].label,(0,Z.jsx)(De,{build:l.build})]}),(0,Z.jsxs)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`· `,(0,Z.jsx)(`span`,{translate:`no`,children:l.channel})]})]}),(0,Z.jsx)(`span`,{className:`hidden text-xs font-normal text-muted-foreground tabular-nums sm:inline`,children:C(l.build.byte_size)})]}):(0,Z.jsx)(`h1`,{className:`sr-only`,children:`Native build`})]}),(0,Z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Z.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6`,children:i.isError?(0,Z.jsxs)(O,{variant:`destructive`,children:[(0,Z.jsx)(k,{}),(0,Z.jsx)(E,{children:`The native build couldn't be loaded`}),(0,Z.jsx)(D,{children:i.error.message}),(0,Z.jsx)(A,{children:(0,Z.jsxs)(o,{onClick:()=>void i.refetch(),size:`xs`,variant:`outline`,children:[(0,Z.jsx)(T,{"data-icon":`inline-start`}),`Retry`]})})]}):l===void 0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:`Loading the native build`}),(0,Z.jsx)(e,{className:`h-56 w-full rounded-xl`}),(0,Z.jsx)(e,{className:`h-64 w-full rounded-xl`})]}):l===null?(0,Z.jsxs)(H,{className:`border py-16`,children:[(0,Z.jsxs)(R,{children:[(0,Z.jsx)(L,{variant:`icon`,children:(0,Z.jsx)(oe,{})}),(0,Z.jsx)(B,{children:`Native build not found`}),(0,Z.jsx)(V,{children:`No native build has this ID. It may have been deleted, or be from another console.`})]}),(0,Z.jsx)(z,{children:(0,Z.jsx)(c,{className:a({className:`min-h-11 sm:min-h-8`,variant:`outline`}),to:`/native-builds`,children:`Show all native builds`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ke,{build:l.build}),l.build.artifact_kind===`ipa`&&!X(l.build)?(0,Z.jsx)(Ye,{build:l.build}):null,(0,Z.jsx)(Pe,{detail:l}),(0,Z.jsx)(et,{detail:l}),(0,Z.jsx)(Ze,{detail:l,onPage:e=>r({...e.before===void 0?{}:{patchesBefore:e.before},...e.after===void 0?{}:{patchesAfter:e.after}}),page:d})]})})})]})}function nt(){let{buildId:e}=h.useParams(),t=h.useSearch(),n=h.useNavigate();return(0,Z.jsx)(tt,{buildId:e,onSearchChange:e=>void n({search:e,replace:!0}),search:t})}export{nt as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,An as n,Ar as r,At as i,Bt as a,C as o,Cr as s,Ct as c,Di as l,Dt as u,Er as d,Et as f,Ft as p,Gt as m,Hn as h,Ht as g,In as _,Jt as v,Kt as ee,L as te,Li as y,Lr as b,Mr as ne,Mt as x,Nr as S,Or as C,Ot as w,Pr as T,Pt as re,Q as E,Qn as D,Qt as O,Ri as ie,Rr as k,Rt as A,Si as j,Sn as M,Sr as N,St as P,Tr as F,Tt as ae,Ut as oe,Vi as I,Vr as L,Vt as se,Wt as ce,Xt as le,Yt as R,Zt as z,_r as B,_t as ue,ct as V,dt as de,en as H,fr as fe,ft as U,gr as W,gt as pe,h as me,hn as he,hr as G,jn as ge,jr as _e,kr as K,kt as q,lt as J,mr as ve,mt as ye,nn as be,ot as Y,p as xe,pr as Se,pt as Ce,qt as X,rn as we,st as Te,tn as Ee,tt as De,ur as Oe,ut as ke,vn as Ae,vr as je,vt as Me,wn as Ne,wt as Pe,xr as Fe,xt as Ie,yt as Le}from"./sidebar-UnsNYOry.js";import{t as Re}from"./link-D95E0fwF.js";import{t as ze}from"./check-Dz_5aNwx.js";import{n as Be,r as Ve}from"./useCompositeListItem-B9ONn9qn.js";import{i as He,n as Ue}from"./TargetDisplay-DzSkf5yP.js";import{F as We,P as Ge,a as Ke,i as qe,l as Je,n as Ye,o as Xe,r as Ze,s as Qe,t as $e,u as et}from"./select-BAd2hAoW.js";import{a as tt}from"./-native-builds-search-BvCftqF2.js";import{t as nt}from"./loader-circle-C26cZDSM.js";import{c as rt,f as it,n as at,p as ot,t as st}from"./native-builds-BOSmoLed.js";import{n as ct,t as lt}from"./CompositeItem-CyQoQkYs.js";import{t as ut}from"./refresh-cw-CpCxPYma.js";import{t as dt}from"./smartphone-lSZWrqxx.js";import{t as ft}from"./trash-2-BPH7ydek.js";import{a as pt,i as mt,n as ht,o as gt,r as _t,t as vt}from"./badge-D4Tiwei-.js";import{a as yt,n as bt,o as xt,t as St}from"./card-BfeRlTvj.js";import{t as Ct}from"./uuidv7-DgXZ1zRR.js";import{n as wt}from"./relativeTime-D_aYJRc7.js";import{a as Tt,i as Et,n as Dt,r as Ot,t as kt}from"./field-PkdRPD3A.js";import{_ as At,a as jt,c as Mt,d as Nt,f as Pt,g as Ft,h as It,i as Lt,l as Rt,p as zt,s as Bt,t as Vt,u as Ht}from"./IosInstall-DsKczesK.js";import{a as Ut,i as Wt,l as Gt,n as Kt,o as qt,r as Jt,s as Yt,t as Xt}from"./alert-dialog-Dihztkem.js";import{a as Zt,i as Qt,n as $t,o as en,r as tn,t as nn}from"./dialog-e9AF5T6h.js";import{t as rn}from"./native-builds_.devices-C_YZoRxB.js";import{i as Z,o as an,r as on}from"./table-r_sYqKTQ.js";import{a as sn,c as cn,f as ln,i as un,l as dn,n as fn,r as pn,s as mn,t as hn}from"./RelativeTime-CP7nosYx.js";import{t as gn}from"./NativeBuildsNav-D3FIlSu0.js";import{t as _n}from"./QrCode-D3-Vuudy.js";var vn=L(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Q=I(ie()),yn=Q.createContext(void 0);function bn(e=!0){let t=Q.useContext(yn);if(t===void 0&&!e)throw Error(K(25));return t}var xn=Q.createContext(void 0);function Sn(e){let t=Q.useContext(xn);if(t===void 0&&!e)throw Error(K(33));return t}var Cn=Q.createContext(void 0);function wn(e){let t=Q.useContext(Cn);if(t===void 0&&!e)throw Error(K(36));return t}function Tn(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=bn(!0),d=u!==void 0;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:_})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,d&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||d&&!Oe&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!d||e.button===2)&&(!c||c.type===`regular-item`)&&s.current.click()}}),[t,n,r,l,i,a,o,s,u,d,c])}var En={type:`regular-item`};function Dn(e){let{closeOnClick:t,disabled:n=!1,highlighted:i,id:a,store:o,typingRef:s=o.context.typingRef,nativeButton:c,itemMetadata:l,nodeId:u}=e,f=Q.useRef(null),{getButtonProps:p,buttonRef:m}=d({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),h=Tn({closeOnClick:t,highlighted:i,id:a,nodeId:u,store:o,typingRef:s,itemRef:f,itemMetadata:l}),g=Q.useCallback(e=>r(h,{onMouseEnter(){l.type===`submenu-trigger`&&l.setActive()}},e,p),[h,p,l]),_=F(f,m);return Q.useMemo(()=>({getItemProps:g,itemRef:_}),[g,_])}var On=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=Be({label:a}),f=Sn(!0),p=U(i),{store:m}=wn(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=Dn({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:En});return Fe(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),$=l(),kn={...Ce,...x},An=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=wn(),{side:c,align:l}=Sn(),u=Qe(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),_=s.useState(`activeTriggerElement`),v=s.useState(`parent`),ee=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),ne=s.useState(`floatingTreeRoot`),x=s.useState(`closeDelay`),S=s.useState(`activeTriggerElement`),C=s.useState(`hoverEnabled`),w=s.useState(`disabled`),T=v.type===`context-menu`;q({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){s.setOpen(!1,M(e.reason,e.domEvent))}return ne.events.on(`close`,e),()=>{ne.events.off(`close`,e)}},[ne.events,s]),Me(b,{enabled:C&&!w&&!T&&v.type!==`menubar`,closeDelay:x});let re=Q.useCallback(e=>{s.set(`popupElement`,e)},[s]),E=Fe(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:v.type===`menu`,instant:h},ref:[t,s.context.popupRef,re],stateAttributesMapping:kn,props:[p,{onKeyDown(e){u&&te.has(e.key)&&e.stopPropagation()}},V(f),o,{"data-rootownerid":y}]}),D=v.type===void 0||T;return(_||v.type===`menubar`&&ee!==`outside-press`)&&(D=!0),(0,$.jsx)(g,{context:b,modal:T,disabled:!m,returnFocus:a===void 0?D:a,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:ne,previousFocusableElement:S,nextFocusableElement:v.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:E})}),jn=Q.createContext(void 0);function Mn(){let e=Q.useContext(jn);if(e===void 0)throw Error(K(32));return e}var Nn=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=wn();return i.useState(`mounted`)||n?(0,$.jsx)(jn.Provider,{value:n,children:(0,$.jsx)(R,{ref:t,...r})}):null}),Pn=Q.forwardRef(function(e,n){let{anchor:r,positionMethod:a=`absolute`,className:o,render:s,side:c,align:l,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:_=!1,collisionAvoidance:v=le,style:ee,...te}=e,{store:y}=wn(),b=Mn(),ne=bn(!0),x=y.useState(`parent`),S=y.useState(`floatingRootContext`),C=y.useState(`floatingTreeRoot`),w=y.useState(`mounted`),T=y.useState(`open`),re=y.useState(`modal`),E=y.useState(`openMethod`),D=y.useState(`activeTriggerElement`),O=y.useState(`transitionStatus`),ie=y.useState(`positionerElement`),k=y.useState(`instantType`),A=y.useState(`hasViewport`),j=y.useState(`lastOpenChangeReason`),N=y.useState(`floatingNodeId`),P=y.useState(`floatingParentNodeId`),F=S.useState(`domReferenceElement`),ae=Q.useRef(null),I=i(ie,!1,!1),L=r,se=u,ce=d,R=l,B=v;x.type===`context-menu`&&(L=r??x.context?.anchor,R??=`start`,!c&&R!==`center`&&(ce=e.alignOffset??2,se=e.sideOffset??-5));let ue=c,V=R;x.type===`menu`?(ue??=`inline-end`,V??=`start`,B=e.collisionAvoidance??z):x.type===`menubar`&&(ue??=`bottom`,V??=`start`);let de=x.type===`context-menu`,H=J({anchor:L,floatingRootContext:S,positionMethod:ne?`fixed`:a,mounted:w,side:ue,sideOffset:se,align:V,alignOffset:ce,arrowPadding:de?0:m,collisionBoundary:f,collisionPadding:p,sticky:g,nodeId:N,keepMounted:b,disableAnchorTracking:_,collisionAvoidance:B,shiftCrossAxis:de&&!(`side`in B&&B.side===`flip`),externalTree:C,adaptiveOrigin:A?ke:void 0});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===N&&y.set(`hoverEnabled`,!1),e.nodeId!==N&&e.parentNodeId===y.select(`floatingParentNodeId`)&&y.setOpen(!1,M(h)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[y,C.events,N]),Q.useEffect(()=>{if(y.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==y.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;y.setOpen(!1,M(t))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,y]);let U=fe();Q.useEffect(()=>{T||U.clear()},[T,U]),Q.useEffect(()=>{function e(e){if(!(!T||e.nodeId!==y.select(`floatingParentNodeId`)))if(e.target&&D&&D!==e.target){let e=y.select(`closeDelay`);e>0?U.isStarted()||U.start(e,()=>{y.setOpen(!1,M(h))}):y.setOpen(!1,M(h))}else U.clear()}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,D,y,U]),Q.useEffect(()=>{let e={open:T,nodeId:N,parentNodeId:P,reason:y.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,y,N,P]),_e(()=>{let e=F,t=ae.current;if(e&&(ae.current=e),t&&e&&e!==t){y.set(`instantType`,void 0);let e=new AbortController;return I(()=>{y.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[F,I,y]);let W={open:T,side:H.side,align:H.align,anchorHidden:H.anchorHidden,nested:x.type===`menu`,instant:k},pe=x.type===`menubar`&&x.context.modal;Je(T&&(pe||re&&j!==`trigger-hover`),E===`touch`,ie,D);let me=Te(e,W,{styles:H.positionerStyles,transitionStatus:O,props:te,refs:[n,y.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),he=w&&x.type!==`menu`&&(x.type!==`menubar`&&re&&j!==`trigger-hover`||x.type===`menubar`&&x.context.modal),G=null;return x.type===`menubar`?G=x.context.contentElement:x.type===void 0&&(G=D),(0,$.jsxs)(xn.Provider,{value:H,children:[he&&(0,$.jsx)(t,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:Y(!T),cutout:G}),(0,$.jsx)(oe,{id:N,children:(0,$.jsx)(Ve,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:me})})]})}),Fn=Q.createContext(null);function In(e){let t=Q.useContext(Fn);if(t===null&&!e)throw Error(K(5));return t}var Ln={...P,disabled:A(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:A(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:A(e=>e.openMethod),allowMouseEnter:A(e=>e.allowMouseEnter),stickIfOpen:A(e=>e.stickIfOpen),parent:A(e=>e.parent),rootId:A(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:A(e=>e.activeIndex),isActive:A((e,t)=>e.activeIndex===t),hoverEnabled:A(e=>e.hoverEnabled),instantType:A(e=>e.instantType),lastOpenChangeReason:A(e=>e.openChangeReason),floatingTreeRoot:A(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:A(e=>e.floatingNodeId),floatingParentNodeId:A(e=>e.floatingParentNodeId),itemProps:A(e=>e.itemProps),closeDelay:A(e=>e.closeDelay),hasViewport:A(e=>e.hasViewport),keyboardEventRelay:A(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Rn=class e extends p{constructor(e){super({...zn(),...e},{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:new c},Ln),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=S(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function zn(){return{...Ie(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new v,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:s,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Bn=Q.createContext(void 0);function Vn(){return Q.useContext(Bn)}var Hn=ve(function(e){let{children:t,open:n,onOpenChange:i,onOpenChangeComplete:c,defaultOpen:l=!1,disabled:d=!1,modal:p,loopFocus:h=!0,orientation:g=`vertical`,actionsRef:_,closeParentOnEsc:v=!1,handle:te,triggerId:y,defaultTriggerId:b=null,highlightItemOnHover:x=!0}=e,S=bn(!0),C=wn(!0),w=In(!0),T=Vn(),E=Q.useMemo(()=>T&&C?{type:`menu`,store:C.store}:w?{type:`menubar`,context:w}:S&&!C?{type:`context-menu`,context:S}:{type:void 0},[S,C,w,T]),D=Rn.useStore(te?.store,{open:l,openProp:n,activeTriggerId:b,triggerIdProp:y,parent:E});Se(()=>{n===void 0&&D.state.open===!1&&l===!0&&D.update({open:!0,activeTriggerId:b})}),D.useControlledProp(`openProp`,n),D.useControlledProp(`triggerIdProp`,y),D.useContextCallback(`onOpenChangeComplete`,c);let ie=O(),k=O(),A=D.useState(`floatingTreeRoot`),j=m(A),P=ee(),F=D.useState(`open`),oe=D.useState(`activeTriggerElement`),I=D.useState(`positionerElement`),L=D.useState(`hoverEnabled`),se=D.useState(`disabled`),le=D.useState(`lastOpenChangeReason`),R=D.useState(`parent`),z=D.useState(`activeIndex`),B=D.useState(`payload`),ue=D.useState(`floatingParentNodeId`),V=Q.useRef(null),H=Q.useRef(R.type!==`context-menu`),U=fe(),W=Q.useRef(!0),pe=fe(),me=ue!=null,{openMethod:he,triggerProps:G}=o(F);D.useSyncedValues({disabled:d,modal:R.type===void 0?p:void 0,openMethod:he,rootId:ie}),ae(D);let{forceUnmount:K}=f(F,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0})});_e(()=>{S&&!C?D.update({parent:{type:`context-menu`,context:S},floatingNodeId:j,floatingParentNodeId:P}):C&&D.update({floatingNodeId:j,floatingParentNodeId:P})},[S,C,j,P,D]),Q.useEffect(()=>{if(F||(V.current=null),R.type===`context-menu`){if(!F){U.clear(),H.current=!1;return}U.start(500,()=>{H.current=!0})}},[U,F,R.type]),_e(()=>{!F&&!L&&D.set(`hoverEnabled`,!0)},[F,L,D]);let q=ne((e,t)=>{let n=t.reason;if(F===e&&t.trigger===oe&&le===n||(t.preventUnmountOnClose=()=>{D.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=oe??void 0),i?.(e,t),t.isCanceled))return;D.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(e===!1&&r?.type===`click`&&r.pointerType===`touch`&&!W.current)return;if(!e&&z!==null){let e=D.context.itemDomElements.current[z];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(W.current=!1,pe.start(300,()=>{W.current=!0})):(W.current=!0,pe.clear());let a=(n===`trigger-press`||n===`item-press`)&&r.detail===0&&r?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};V.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),D.update(s),R.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?D.set(`instantType`,`group`):a||o?D.set(`instantType`,a?`click`:`dismiss`):D.set(`instantType`,void 0)}),J=re({popupStore:D,floatingId:k,nested:P!=null,onOpenChange:q}),ve=J.context.events;Q.useEffect(()=>{let e=({open:e,eventDetails:t})=>q(e,t);return ve.on(`setOpen`,e),()=>{ve?.off(`setOpen`,e)}},[ve,q]);let ye=Q.useCallback(()=>{D.setOpen(!1,M(ge))},[D]);Q.useImperativeHandle(_,()=>({unmount:K,close:ye}),[K,ye]);let be;R.type===`context-menu`&&(be=R.context),Q.useImperativeHandle(be?.positionerRef,()=>I,[I]),Q.useImperativeHandle(be?.actionsRef,()=>({setOpen:q}),[q]);let Y=a(J,{enabled:!se,bubbles:{escapeKey:v&&R.type===`menu`},outsidePress(){return R.type!==`context-menu`||V.current?.type===`contextmenu`?!0:H.current},externalTree:me?A:void 0}),xe=de(),Ce=Q.useCallback(e=>{D.select(`activeIndex`)!==e&&D.set(`activeIndex`,e)},[D]),X=We(J,{enabled:!se,listRef:D.context.itemDomElements,activeIndex:z,nested:R.type!==void 0,loopFocus:h,orientation:g,parentOrientation:R.type===`menubar`?R.context.orientation:void 0,rtl:xe===`rtl`,disabledIndices:N,onNavigate:Ce,openOnArrowKeyDown:R.type!==`context-menu`,externalTree:me?A:void 0,focusItemOnHover:x}),we=Q.useCallback(e=>{D.context.typingRef.current=e},[D]),Te=Ge(J,{listRef:D.context.itemLabels,elementsRef:D.context.itemDomElements,activeIndex:z,resetMs:500,onMatch:e=>{F&&e!==z&&D.set(`activeIndex`,e)},onTyping:we});u(D,{floatingRootContext:J,activeTriggerProps:Q.useMemo(()=>{let e=r(Te.reference,X.reference,Y.reference,{onMouseMove(){D.set(`allowMouseEnter`,!0)}},G);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=F,e},[D,Te.reference,X.reference,Y.reference,G,F]),inactiveTriggerProps:Q.useMemo(()=>{let e=r(X.trigger,Y.trigger,G);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[X.trigger,Y.trigger,G]),popupProps:Q.useMemo(()=>r(Pe,{id:k,role:`menu`,"aria-labelledby":oe?.id,onMouseMove(){D.set(`allowMouseEnter`,!0),R.type===`menu`&&D.set(`hoverEnabled`,!1)},onClick(){D.select(`hoverEnabled`)&&D.set(`hoverEnabled`,!1)},onKeyDown(e){let t=D.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Te.floating,X.floating,Y.floating),[oe,k,R.type,D,Te.floating,X.floating,Y.floating]),itemProps:X.item??s});let Ee=Q.useMemo(()=>({store:D,parent:E}),[D,E]),De=(0,$.jsx)(Cn.Provider,{value:Ee,children:typeof t==`function`?t({payload:B}):t});return R.type===void 0||R.type===`context-menu`?(0,$.jsx)(ce,{externalTree:A,children:De}):De});function Un(e){if(b(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!k(e))return Un(T(e))}var Wn=I(y());function Gn(e,t){let r=Q.useRef(null);function i(t){Wn.flushSync(()=>{e.setOpen(!1,M(n,t.nativeEvent,t.currentTarget))}),be(r.current)?.focus()}function a(r){let i=e.select(`positionerElement`);if(i&&we(r,i))e.context.beforeContentFocusGuardRef.current?.focus();else{Wn.flushSync(()=>{e.setOpen(!1,M(n,r.nativeEvent,r.currentTarget))});let a=Ee(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&D(i,a);){let e=a;if(a=H(a),a===e)break}a?.focus()}}return{preFocusGuardRef:r,handlePreFocusGuardFocus:i,handleFocusTargetFocus:a}}function Kn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Ae(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:s,[t,n,r])}var qn=2,Jn=G(function(e,t){let{render:n,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:l,openOnHover:u,delay:f=100,closeDelay:p=0,handle:h,payload:g,..._}=e,te=wn(!0),y=h?.store??te?.store;if(!y)throw Error(K(85));let b=U(l),x=y.useState(`isTriggerActive`,b),S=y.useState(`floatingRootContext`),T=y.useState(`isOpenedByTrigger`,b),re=y.useState(`triggerPopupId`,b),E=Q.useRef(null),O=Xn(),ie=C(!0),k=X(),A=Q.useMemo(()=>k??new v,[k]),{registerTrigger:j,isMountedByThisTrigger:M}=w(b,E,y,{payload:g,closeDelay:p,parent:O,floatingTreeRoot:A,floatingNodeId:m(A),floatingParentNodeId:ee(),keyboardEventRelay:ie?.relayKeyboardEvent}),N=O.type===`menubar`,P=y.useState(`disabled`),F=o||P||N&&O.context.disabled,{getButtonProps:ae,buttonRef:oe}=d({disabled:F,native:c});Q.useEffect(()=>{!T&&O.type===void 0&&(y.context.allowMouseUpTriggerRef.current=!1)},[y,T,O.type]);let I=Q.useRef(null),L=fe(),ce=ne(e=>{if(!I.current)return;L.clear(),y.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(D(I.current,t)||D(y.select(`positionerElement`),t)||t===I.current||t!=null&&Un(t)===y.select(`rootId`))return;let n=et(I.current);e.clientX>=n.left-qn&&e.clientX<=n.right+qn&&e.clientY>=n.top-qn&&e.clientY<=n.bottom+qn||A.events.emit(`close`,{domEvent:e,reason:Ne})});Q.useEffect(()=>{T&&y.select(`lastOpenChangeReason`)===`trigger-hover`&&Ae(I.current).addEventListener(`mouseup`,ce,{once:!0})},[T,ce,y]);let le=N&&O.context.hasSubmenuOpen,R=ue(S,{enabled:(u??le)&&!F&&O.type!==`context-menu`&&(!N||le&&!M),handleClose:pe({blockPointerEvents:!N}),mouseOnly:!0,move:!1,restMs:O.type===void 0?f:void 0,delay:{close:p},triggerElementRef:E,externalTree:A,isActiveTrigger:x,isClosing:()=>y.select(`transitionStatus`)===`ending`}),z=Yn(T,y.select(`lastOpenChangeReason`)),B=se(S,{enabled:!F&&O.type!==`context-menu`,event:T&&N?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:O.type===void 0?z:!1}),V=Le(S,{enabled:!F&&le}),de=Kn({open:T,enabled:N,mouseDownAction:`open`}),H=Q.useMemo(()=>r(V.reference,B.reference),[V.reference,B.reference]),W=y.useState(`triggerProps`,M),{preFocusGuardRef:me,handlePreFocusGuardFocus:G,handleFocusTargetFocus:ge}=Gn(y,E),_e={disabled:F,open:T},q=[I,t,oe,j,E],J=[H,R??s,W,{"aria-haspopup":`menu`,"aria-controls":re,id:b,onMouseDown:e=>{y.select(`open`)||(L.start(200,()=>{y.context.allowMouseUpTriggerRef.current=!0}),Ae(e.currentTarget).addEventListener(`mouseup`,ce,{once:!0}))}},N?{role:`menuitem`}:{},de,_,ae],ve=Fe(`button`,e,{enabled:!N,stateAttributesMapping:ye,state:_e,ref:q,props:J});return N?(0,$.jsx)(lt,{tag:`button`,render:n,className:i,style:a,state:_e,refs:q,props:J,stateAttributesMapping:ye}):T?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(he,{ref:me,onFocus:G},`${b}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:ve},b),(0,$.jsx)(he,{ref:y.context.triggerFocusTargetRef,onFocus:ge},`${b}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:ve},b)});function Yn(e,t){let n=fe(),[r,i]=Q.useState(!1);return _e(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Xn(){let e=bn(!0),t=wn(!0),n=In(!0);return Q.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var Zn=I(wt(),1);function Qn({...e}){return(0,$.jsx)(Hn,{"data-slot":`dropdown-menu`,...e})}function $n({...e}){return(0,$.jsx)(Jn,{"data-slot":`dropdown-menu-trigger`,...e})}function er({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(Nn,{children:(0,$.jsx)(Pn,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(An,{"data-slot":`dropdown-menu-content`,className:je(`dark 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 p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function tr({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(On,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:je(`group/dropdown-menu-item relative flex min-h-7 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-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function nr({className:e,...t}){return(0,$.jsx)(De,{"data-slot":`dropdown-menu-separator`,className:je(`-mx-1 my-1 h-px bg-border/50`,e),...t})}var rr={pending:`Requested`,approved:`Approved`,registered:`Registered`},ir={pending:`warning`,approved:`secondary`,registered:`muted`},ar=`all`,or=6,sr=()=>window.location.pathname.endsWith(`/native-builds/devices`)?window.location.pathname.slice(0,-at.length):rt(window.location,``),cr=(e,t)=>({approve:t.canApprove&&e.status===`pending`,rename:t.canApprove,remove:t.canApprove,withdraw:!t.canApprove&&e.status===`pending`&&e.requested_by===t.email}),lr=e=>e.status===`approved`&&e.apple_error!==null,ur=e=>e.requested_by??`Added from a terminal`;function dr({device:e,inTable:t=!1}){return e.apple_error===null?null:t?(0,$.jsx)(`span`,{className:`line-clamp-2 max-w-48 text-xs whitespace-normal text-muted-foreground`,title:e.apple_error,children:e.apple_error}):(0,$.jsx)(`span`,{className:`max-w-64 text-xs whitespace-normal text-muted-foreground`,children:e.apple_error})}function fr({device:e,withError:t=!0}){return(0,$.jsxs)(`div`,{className:`flex min-w-0 shrink-0 flex-col items-start gap-1`,children:[lr(e)?(0,$.jsx)(vt,{variant:`warning`,children:`Apple refused`}):(0,$.jsx)(vt,{variant:ir[e.status],children:rr[e.status]}),t?(0,$.jsx)(dr,{device:e,inTable:!0}):null]})}function pr({device:e}){if(e.build_id===null)return(0,$.jsx)(Ue,{});let t=`A build`;try{t=`Build of ${(0,Zn.default)(Ct(e.build_id)).format(`MMM D`)}`}catch{}return(0,$.jsx)(Re,{className:`text-xs font-medium underline-offset-4 hover:underline`,params:{buildId:e.build_id},to:`/native-builds/$buildId`,children:t})}function mr({device:e,viewer:t,onOpen:n}){let r=cr(e,t);return!r.approve&&!r.rename&&!r.remove&&!r.withdraw?null:(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[r.approve?(0,$.jsxs)(W,{className:`h-11 sm:h-8`,onClick:()=>n({kind:`approve`,device:e}),size:`sm`,children:[(0,$.jsx)(ze,{"data-icon":`inline-start`}),`Approve`]}):null,r.withdraw?(0,$.jsx)(W,{className:`h-11 sm:h-8`,onClick:()=>n({kind:`remove`,device:e}),size:`sm`,variant:`outline`,children:`Withdraw`}):null,r.rename||r.remove?(0,$.jsxs)(Qn,{children:[(0,$.jsx)($n,{render:(0,$.jsx)(W,{"aria-label":`More actions for ${e.name}`,className:`size-11 sm:size-8`,size:`icon-sm`,variant:`ghost`}),children:(0,$.jsx)(vn,{"aria-hidden":`true`})}),(0,$.jsxs)(er,{align:`end`,children:[(0,$.jsxs)(tr,{onClick:()=>n({kind:`rename`,device:e}),children:[(0,$.jsx)(ct,{"aria-hidden":`true`}),`Rename`]}),(0,$.jsx)(nr,{}),(0,$.jsxs)(tr,{onClick:()=>n({kind:`remove`,device:e}),variant:`destructive`,children:[(0,$.jsx)(ft,{"aria-hidden":`true`}),e.status===`pending`?`Decline`:`Remove`]})]})]}):null]})}function hr(){return(0,$.jsx)(vt,{className:`shrink-0 px-1.5`,variant:`muted`,children:`This iPhone`})}function gr({device:e,viewer:t,onOpen:n,isThisIphone:r}){return(0,$.jsxs)(an,{children:[(0,$.jsx)(on,{className:`font-medium`,children:(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[e.name,r?(0,$.jsx)(hr,{}):null]})}),(0,$.jsx)(on,{children:(0,$.jsx)(`span`,{className:`font-mono text-xs`,title:e.udid,translate:`no`,children:ot(e.udid)})}),(0,$.jsx)(on,{className:`text-xs`,children:e.requested_by??(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:ur(e)})}),(0,$.jsx)(on,{children:(0,$.jsx)(fr,{device:e})}),(0,$.jsx)(on,{className:`text-xs`,children:(0,$.jsx)(hn,{ms:e.created_at_ms})}),(0,$.jsx)(on,{children:(0,$.jsx)(pr,{device:e})}),(0,$.jsx)(on,{className:`text-right`,children:(0,$.jsx)(mr,{device:e,onOpen:n,viewer:t})})]})}function _r({device:e,viewer:t,onOpen:n,isThisIphone:r}){return(0,$.jsxs)(fn,{className:`cursor-default gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-medium`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:e.name}),r?(0,$.jsx)(hr,{}):null]}),(0,$.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:ot(e.udid)})]}),(0,$.jsx)(fr,{device:e,withError:!1})]}),(0,$.jsx)(dr,{device:e}),(0,$.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(`span`,{children:ur(e)}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(hn,{ms:e.created_at_ms}),e.build_id===null?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,$.jsx)(pr,{device:e})]})]}),(0,$.jsx)(mr,{device:e,onOpen:n,viewer:t})]})}function vr({target:e,onClose:t}){let n=Rt(),r=Ft(),i=e.kind===`approve`?n:r,[a,o]=(0,Q.useState)(e.device.name),s=a.trim();return(0,$.jsx)(nn,{onOpenChange:e=>e?null:t(),open:!0,children:(0,$.jsxs)($t,{children:[(0,$.jsxs)(Zt,{children:[(0,$.jsx)(en,{children:e.kind===`approve`?`Approve ${e.device.name}?`:`Rename ${e.device.name}`}),(0,$.jsx)(tn,{children:e.kind===`approve`?`The next ad hoc build registers this iPhone with your Apple account. Each new iPhone uses one of the account's 100 a year, and removing it never gives the slot back.`:`The registry shows this name. The next ad hoc build doesn't rename it at Apple.`})]}),(0,$.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),s!==``&&i.mutate({id:e.device.id,name:s},{onSuccess:t})},children:[(0,$.jsxs)(Et,{children:[e.kind===`approve`?(0,$.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm`,children:[(0,$.jsx)(`dt`,{className:`text-muted-foreground`,children:`Requested by`}),(0,$.jsx)(`dd`,{className:`truncate`,children:e.device.requested_by??`Terminal (CLI)`}),(0,$.jsx)(`dt`,{className:`text-muted-foreground`,children:`UDID`}),(0,$.jsx)(`dd`,{className:`font-mono text-xs break-all select-all`,translate:`no`,children:e.device.udid})]}):null,(0,$.jsxs)(kt,{"data-invalid":i.isError||void 0,children:[(0,$.jsx)(Tt,{htmlFor:`ios-device-dialog-name`,children:`Name`}),(0,$.jsx)(E,{autoComplete:`off`,id:`ios-device-dialog-name`,maxLength:100,onChange:e=>o(e.target.value),value:a}),e.kind===`approve`?(0,$.jsx)(Dt,{children:`The iPhone's ID comes from the person who asked. Approve devices you recognize.`}):null,(0,$.jsx)(Ot,{children:i.isError?`Couldn't ${e.kind===`approve`?`approve`:`rename`} ${e.device.name}. Check your connection and try again.`:null})]})]}),(0,$.jsx)(Qt,{className:`mt-4`,children:(0,$.jsxs)(W,{className:`h-11 sm:h-8`,disabled:s===``||i.isPending,type:`submit`,children:[i.isPending?(0,$.jsx)(nt,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,$.jsx)(ze,{"data-icon":`inline-start`}),e.kind===`approve`?`Approve`:`Rename`]})})]})]})})}function yr({device:e,viewer:t,onClose:n}){let r=It(),i=!t.canApprove,a=e.status===`pending`;return(0,$.jsx)(Xt,{onOpenChange:e=>e?null:n(),open:!0,children:(0,$.jsxs)(Wt,{children:[(0,$.jsxs)(Yt,{children:[(0,$.jsx)(Gt,{children:i?`Withdraw ${e.name}?`:a?`Decline ${e.name}?`:`Remove ${e.name}?`}),(0,$.jsx)(Ut,{children:a?`It leaves the list. Its owner can request it again.`:`It leaves the list. New ad hoc builds keep it until it's disabled at Apple.`})]}),r.isError?(0,$.jsxs)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:[`Couldn't `,i?`withdraw`:a?`decline`:`remove`,` `,e.name,`. Check your connection and try again.`]}):null,(0,$.jsxs)(qt,{children:[(0,$.jsx)(Jt,{disabled:r.isPending,children:`Cancel`}),(0,$.jsxs)(Kt,{disabled:r.isPending,onClick:t=>{t.preventDefault(),r.mutate({udid:e.udid},{onSuccess:n})},variant:`destructive`,children:[r.isPending?(0,$.jsx)(nt,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):null,i?`Withdraw`:a?`Decline`:`Remove`]})]})]})})}function br({device:e,viewer:t}){let n=t?.canApprove===!0;return e.apple_error===null?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsx)(`p`,{className:`truncate text-sm font-medium`,children:e.name}),(0,$.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,translate:`no`,children:ot(e.udid)})]}),(0,$.jsx)(fr,{device:e,withError:!1})]}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:e.status===`pending`?n?`Approve it below, and it joins the next ad hoc build.`:`A maintainer approves it next.`:e.status===`approved`?`It joins the next ad hoc build.`:`New ad hoc builds install on it.`})]}):(0,$.jsx)(Vt,{canApprove:n,device:e,onDevicesPage:!0})}function xr({status:e,secretName:t}){return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:e===`local-console`?`iPhones register through your hosted Console: an iPhone can't reach this computer's.`:`Set ${t} on this Console to register iPhones.`})}function Sr({view:t,phone:n}){let[r,i]=(0,Q.useState)(null),a=r??t?.defaultName??``,[o,s]=(0,Q.useState)(a);(0,Q.useEffect)(()=>{let e=setTimeout(()=>s(a.trim()),400);return()=>clearTimeout(e)},[a]);let c=n?.ios===!0,l=Ht({mode:`register`,name:o||`iPhone`},c&&t?.registration===`ready`),u=n===null||window.location.protocol===`https:`,d=c?n.udid:null,f=Nt(d),p=n?.answers??0,{refetch:m}=f,h=(0,Q.useRef)({udid:d,answers:p});(0,Q.useEffect)(()=>{let e=h.current;h.current={udid:d,answers:p},d!==null&&d===e.udid&&p>e.answers&&m()},[d,p,m]);let g=n===null?``:sr(),_=zt(g,n?.receipt??null,c&&t?.registration===`ready`&&(d===null||n.receipt!==null||f.data===null));Lt(n,_.data?.udid);let v=At(g),ee=c&&Mt(_.data?.udid,n.udid),te=(()=>{if(n===null||c&&n.udid!==null&&f.isPending)return(0,$.jsx)(e,{"aria-label":`Loading`,className:`h-36 w-full`});if(c&&f.data)return(0,$.jsx)(br,{device:f.data,viewer:t?.viewer});if(t!==void 0&&(t.registration===`local-console`||t.registration===`no-secret`))return(0,$.jsx)(xr,{secretName:t.secretName,status:t.registration});if(!c)return(0,$.jsxs)(`div`,{className:`flex flex-col items-start gap-4 sm:flex-row sm:items-center`,children:[(0,$.jsx)(_n,{className:`size-36 shrink-0`,label:`Open this page on an iPhone`,value:`${window.location.origin}${sr()}${at}`}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium`,children:`Open this page on the iPhone, in Safari.`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`It installs a profile that reads the iPhone's ID, then lists the iPhone here as requested. Nothing stays installed.`})]})]});if(!u)return(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:`iPhones need this Console on HTTPS.`});if(f.data===null&&_.isFetching&&!ee)return(0,$.jsx)(e,{"aria-label":`Loading`,className:`h-36 w-full`});if(ee){let e=a.trim();return(0,$.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:t=>{t.preventDefault(),e!==``&&v.mutate({name:e,receipt:n.receipt})},children:[(0,$.jsxs)(kt,{"data-invalid":v.isError||void 0,children:[(0,$.jsx)(Tt,{htmlFor:`ios-device-register-name`,children:`This iPhone's name`}),(0,$.jsx)(E,{autoComplete:`off`,className:`h-11`,id:`ios-device-register-name`,maxLength:100,onChange:e=>i(e.target.value),value:a}),(0,$.jsx)(Dt,{children:`This Safari checked it before, so no profile is needed.`}),(0,$.jsx)(Ot,{children:v.isError?`The request didn't go through. Try again.`:null})]}),(0,$.jsxs)(W,{className:`h-11 w-full`,disabled:e===``||v.isPending,type:`submit`,children:[v.isPending?(0,$.jsx)(nt,{className:`animate-spin motion-reduce:animate-none`,"data-icon":`inline-start`}):(0,$.jsx)(dt,{"data-icon":`inline-start`}),`Request this iPhone`]})]})}return l.data?.status===`local-console`?(0,$.jsx)(xr,{status:`local-console`}):l.data?.status===`no-secret`?(0,$.jsx)(xr,{secretName:l.data.secretName,status:`no-secret`}):(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,$.jsxs)(kt,{children:[(0,$.jsx)(Tt,{htmlFor:`ios-device-register-name`,children:`This iPhone's name`}),(0,$.jsx)(E,{autoComplete:`off`,className:`h-11`,id:`ios-device-register-name`,maxLength:100,onChange:e=>i(e.target.value),value:a})]}),l.data?.status===`issued`&&o===a.trim()?(0,$.jsxs)(`a`,{className:B({className:`h-auto min-h-11 w-full whitespace-normal`}),href:it(sr(),l.data.token),children:[(0,$.jsx)(dt,{"data-icon":`inline-start`}),`Install profile`]}):(0,$.jsx)(e,{"aria-label":`Preparing the profile`,className:`h-11 w-full`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Safari only. Allow the download, then install it in Settings, where iOS calls it not signed. Safari comes back here, and nothing stays installed.`})]})})();return(0,$.jsxs)(St,{className:`shadow-sm`,children:[(0,$.jsx)(yt,{className:`border-b px-4 py-3`,children:(0,$.jsx)(xt,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`Register an iPhone`})})}),(0,$.jsx)(bt,{className:`p-4 sm:p-6`,children:te})]})}function Cr({search:e,onSearchChange:t}){let n=me(),r=Pt(e.status),i=r.data,a=i?.devices,o=j(),s=()=>void o.invalidateQueries({queryKey:Bt.all}),[c,l]=(0,Q.useState)(null),u=jt(),d=u?.ios===!0?u.udid?.toLowerCase()??null:null,f=()=>l(null),p=(0,$.jsx)(mn,{icon:dt,title:e.status===void 0?`No iPhones yet`:`No ${rr[e.status].toLowerCase()} iPhones`,children:e.status===void 0?(0,$.jsx)(`p`,{children:`Open this page on an iPhone to register it.`}):(0,$.jsx)(W,{className:`h-11 sm:h-8`,onClick:()=>t({}),size:`sm`,variant:`outline`,children:`Show all`})});return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 min-w-0 flex-col`,children:[(0,$.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,$.jsx)(xe,{className:`-ml-1 size-11 lg:size-7`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(tt,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`Native builds`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`The iPhones and iPads ad hoc builds install on. Android needs none.`})]}),(0,$.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:[(0,$.jsx)(gn,{current:`devices`}),(0,$.jsx)(Sr,{phone:u,view:i}),i!==void 0&&!i.viewer.approversConfigured?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(`p`,{children:`Nobody approves in this Console. Approve from a terminal:`}),(0,$.jsx)(He,{label:`the approve command`,value:st})]}):null,(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)($e,{items:[{label:`All statuses`,value:ar},...Object.keys(rr).map(e=>({label:rr[e],value:e}))],onValueChange:e=>t(e===null||e===ar?{}:{status:e}),value:e.status??ar,children:[(0,$.jsx)(Ke,{"aria-label":`Status`,className:`min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-44 sm:flex-none sm:data-[size=default]:h-8`,children:(0,$.jsx)(Xe,{})}),(0,$.jsx)(Ye,{children:(0,$.jsxs)(Ze,{children:[(0,$.jsx)(qe,{value:ar,children:`All statuses`}),Object.keys(rr).map(e=>(0,$.jsx)(qe,{value:e,children:rr[e]},e))]})})]}),(0,$.jsx)(W,{"aria-label":`Refresh iOS devices`,className:`ml-auto size-11 sm:size-7`,disabled:r.isFetching,onClick:s,size:`icon-sm`,variant:`ghost`,children:(0,$.jsx)(ut,{"aria-hidden":`true`})})]}),r.isError?(0,$.jsxs)(ht,{variant:`destructive`,children:[(0,$.jsx)(gt,{}),(0,$.jsx)(pt,{children:`iOS devices couldn't be loaded`}),(0,$.jsx)(mt,{children:`Check your connection and try again.`}),(0,$.jsx)(_t,{children:(0,$.jsxs)(W,{onClick:s,size:`xs`,variant:`outline`,children:[(0,$.jsx)(ut,{"data-icon":`inline-start`}),`Retry`]})})]}):(0,$.jsx)(cn,{className:`flex-none`,children:n?(0,$.jsx)(`div`,{"aria-busy":r.isPlaceholderData,"aria-label":`iOS devices`,className:`aria-busy:opacity-60`,role:`list`,children:r.isLoading?(0,$.jsx)(pn,{label:`Loading iOS devices`}):a?.length===0?(0,$.jsx)(un,{children:p}):a?.map(e=>(0,$.jsx)(`div`,{className:`border-b last:border-b-0`,role:`listitem`,children:(0,$.jsx)(_r,{device:e,isThisIphone:e.udid===d,onOpen:l,viewer:i.viewer})},e.id))}):(0,$.jsx)(sn,{"aria-busy":r.isPlaceholderData,"aria-label":`iOS devices`,className:`aria-busy:opacity-60`,header:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Z,{children:`Name`}),(0,$.jsx)(Z,{children:`UDID`}),(0,$.jsx)(Z,{children:`Requested by`}),(0,$.jsx)(Z,{children:`Status`}),(0,$.jsx)(Z,{children:`Added`}),(0,$.jsx)(Z,{children:`Build`}),(0,$.jsx)(Z,{className:`text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),children:r.isLoading?(0,$.jsx)(ln,{columns:or+1,label:`Loading iOS devices`}):a?.length===0?(0,$.jsx)(dn,{columns:or+1,children:p}):a?.map(e=>(0,$.jsx)(gr,{device:e,isThisIphone:e.udid===d,onOpen:l,viewer:i.viewer},e.id))})})]}),c!==null&&c.kind!==`remove`?(0,$.jsx)(vr,{onClose:f,target:c},c.device.id):null,c?.kind===`remove`&&i!==void 0?(0,$.jsx)(yr,{device:c.device,onClose:f,viewer:i.viewer},c.device.id):null]})}function wr(){let e=rn.useSearch(),t=rn.useNavigate();return(0,$.jsx)(Cr,{onSearchChange:e=>void t({search:e,replace:!0}),search:e})}export{wr as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-builds_.devices-CQ_tB3SO.js","assets/sidebar-UnsNYOry.js","assets/alert-dialog-Dihztkem.js","assets/select-BAd2hAoW.js","assets/useCompositeListItem-B9ONn9qn.js","assets/check-Dz_5aNwx.js","assets/CompositeItem-CyQoQkYs.js","assets/tabs-BBfg-c0h.js","assets/link-D95E0fwF.js","assets/relativeTime-D_aYJRc7.js","assets/TargetDisplay-DzSkf5yP.js","assets/copy-BxI24-g-.js","assets/key-round-B-vaAsR7.js","assets/native-builds-BOSmoLed.js","assets/uuidv7-DgXZ1zRR.js","assets/dist-BEIz5ojx.js","assets/HashValueDisplay-DKziWjEg.js","assets/-native-builds-search-BvCftqF2.js","assets/loader-circle-C26cZDSM.js","assets/refresh-cw-CpCxPYma.js","assets/smartphone-lSZWrqxx.js","assets/trash-2-BPH7ydek.js","assets/badge-D4Tiwei-.js","assets/QrCode-D3-Vuudy.js","assets/RelativeTime-CP7nosYx.js","assets/chevron-right-CuYrscDY.js","assets/table-r_sYqKTQ.js","assets/IosInstall-DsKczesK.js","assets/useMutation-BWX97JX2.js","assets/field-PkdRPD3A.js","assets/api-B1z_XXrQ.js","assets/preload-helper-52zhjEsw.js","assets/NativeBuildsNav-D3FIlSu0.js","assets/card-BfeRlTvj.js","assets/dialog-e9AF5T6h.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,r as t,t as n}from"./preload-helper-52zhjEsw.js";import{t as r}from"./-native-builds-search-BvCftqF2.js";var i=e(`/native-builds_/devices`)({component:t(()=>n(()=>import(`./native-builds_.devices-CQ_tB3SO.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,33,34])),`component`),validateSearch:r});export{i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Vr as e}from"./sidebar-UnsNYOry.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);export{t};
|