@hot-updater/console 1.0.0-rc.34 → 1.0.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/EventDetails-Dq4cNFqK.js +1 -0
- package/.output/public/assets/InsightsPageHeader-CASeYum3.js +1 -0
- package/.output/public/assets/api-BiZP_i-u.js +1 -0
- package/.output/public/assets/{index-DLywK4wD.js → index-FK9kCYK-.js} +2 -2
- package/.output/public/assets/{insights-BHVhJLZs.js → insights-C6quvfAt.js} +2 -2
- package/.output/public/assets/{insights-CwSFpdR7.js → insights-CJg4_d2u.js} +2 -2
- package/.output/public/assets/{insights-usage-rpc-Ceygyqz5.js → insights-usage-rpc-pz2XQBi3.js} +1 -1
- package/.output/public/assets/{insights_.distribution-Bggs1UiO.js → insights_.distribution-NyB0_bbh.js} +2 -2
- package/.output/public/assets/insights_.distribution-jH_7sKdg.js +1 -0
- package/.output/public/assets/{installations-C5o3yQUx.js → installations-BbQWgGE1.js} +2 -2
- package/.output/public/assets/installations-D7L5-z0G.js +1 -0
- package/.output/public/assets/{routes-D7JFd6Ld.js → routes-BpgH_gwT.js} +2 -2
- package/.output/public/assets/routes-Cxbe-0Zj.js +1 -0
- package/.output/public/assets/styles-C0s3e1IX.css +2 -0
- package/.output/public/assets/valueToPercent-Ci2-fmWp.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-CMzN45LR.mjs → __23tanstack-start-server-fn-resolver-DuCwpCln.mjs} +36 -36
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BePOaYdQ.mjs → ConsoleFeatureUnavailable-DNk9T0Va.mjs} +5 -5
- package/.output/server/_ssr/{EventDetails-DHw6vvc1.mjs → EventDetails-CjrwO7OJ.mjs} +20 -13
- package/.output/server/_ssr/{InsightsInfo-rickLIKC.mjs → InsightsInfo-DOuzpAbj.mjs} +2 -2
- package/.output/server/_ssr/{InsightsPageHeader-D2QKR4NE.mjs → InsightsPageHeader-U0pUqxnB.mjs} +16 -5
- package/.output/server/_ssr/{NotFoundPage-7kgnOYoZ.mjs → NotFoundPage-o4J5D--_.mjs} +2 -2
- package/.output/server/_ssr/{alert-dialog-Cy5oW1OK.mjs → alert-dialog-BM225xTh.mjs} +1 -1
- package/.output/server/_ssr/{api-keys-9IA3wKzT.mjs → api-keys-BF07i763.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-CIuDzLRa.mjs → api-keys-C0LJp4rR.mjs} +8 -8
- package/.output/server/_ssr/{api-keys-rpc-BlL8omBQ.mjs → api-keys-rpc-sfk_j3kK.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-A8RuhFqA.mjs → api-rpc-BYblw1zi.mjs} +4 -4
- package/.output/server/_ssr/{api-BEifWU1L.mjs → api-xDFh8e5h.mjs} +4 -13
- package/.output/server/_ssr/{auth-rpc-jn0QR6Qc.mjs → auth-rpc-DlHGCOVu.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-LG-3XNtU.mjs → auth.server-DiKsrvKb.mjs} +2 -2
- package/.output/server/_ssr/{card-DufjUCUf.mjs → card-DeSBXJ-H.mjs} +1 -1
- package/.output/server/_ssr/{config.server-mXq2F40L.mjs → config.server-CAxrnUfg.mjs} +4 -4
- package/.output/server/_ssr/{console-access-Bsfu4-wI.mjs → console-access-BQKtBhET.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-BIoKQpjV.mjs → console-features-api-BWnDXq_5.mjs} +3 -3
- package/.output/server/_ssr/{console-features-rpc-Cr7xATte.mjs → console-features-rpc-DejnhLnR.mjs} +3 -3
- package/.output/server/_ssr/{dialog-BcR3TaRn.mjs → dialog-_4WEab0m.mjs} +1 -1
- package/.output/server/_ssr/{empty-7eCFbUR1.mjs → empty-lVx1VQFt.mjs} +2 -2
- package/.output/server/_ssr/{field-CftUuRGT.mjs → field-ktuJP1a2.mjs} +2 -2
- package/.output/server/_ssr/{input-group-B8NgjfnY.mjs → input-group-BPpCOm4q.mjs} +1 -1
- package/.output/server/_ssr/{insights-BErfy6gb.mjs → insights-B0mYAK3G.mjs} +2 -2
- package/.output/server/_ssr/{insights-C1DauJsA.mjs → insights-BSyzvMMS.mjs} +17 -17
- package/.output/server/_ssr/{insights-CyIHTm2V.mjs → insights-CRV4QGI8.mjs} +5 -5
- package/.output/server/_ssr/{insights-api-BjpBb5RH.mjs → insights-api-aJqnBQun.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-CGbfcqA_.mjs → insights-failures-rpc-Lx8emYGI.mjs} +6 -6
- package/.output/server/_ssr/{insights-recovery-rpc-kJB2Lm7d.mjs → insights-recovery-rpc-CUMiMy2T.mjs} +4 -4
- package/.output/server/_ssr/{insights-rpc-Bp37kTUO.mjs → insights-rpc-Cf7LiMn7.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-BQj6zT4P.mjs → insights-usage-rpc-B4EpxPxl.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-wK4V10_L.mjs → insights-usage-rpc-C9dPXUu0.mjs} +4 -4
- package/.output/server/_ssr/{insights_.distribution-CMiAe-4s.mjs → insights_.distribution-B8gS8juN.mjs} +31 -18
- package/.output/server/_ssr/{insights_.distribution-Do43tP1z.mjs → insights_.distribution-CahPi1S1.mjs} +7 -5
- package/.output/server/_ssr/{insights_.distribution-BPbcLkNH.mjs → insights_.distribution-DVPnEO1W.mjs} +4 -2
- package/.output/server/_ssr/{installations-BzGjXeDk.mjs → installations-B8L67WWr.mjs} +14 -14
- package/.output/server/_ssr/{installations-v2fxmirr.mjs → installations-CAbqDYfc.mjs} +2 -2
- package/.output/server/_ssr/{installations-C1sWyxHQ.mjs → installations-CBFW4MSe.mjs} +4 -4
- package/.output/server/_ssr/{release-adoption-rpc-CGb5YaUb.mjs → release-adoption-rpc-BxT7cEgI.mjs} +6 -6
- package/.output/server/_ssr/{router-BTBus5eb.mjs → router-C09402U1.mjs} +13 -13
- package/.output/server/_ssr/{routes-D3HLaV-d.mjs → routes-2JI2lvti.mjs} +8 -8
- package/.output/server/_ssr/{routes-B90daKJt.mjs → routes-SfHtfKLr.mjs} +11 -11
- package/.output/server/_ssr/{runtime.server-CjFHKMDC.mjs → runtime.server-CvaX5cgr.mjs} +61 -2
- package/.output/server/_ssr/{select-B1pr-XlQ.mjs → select-BHrdDjSR.mjs} +9 -2
- package/.output/server/_ssr/{server-5yoamCil.mjs → server-C-NrMZS6.mjs} +18 -14
- package/.output/server/_ssr/{sidebar-C6sFGsND.mjs → sidebar-Cfi4kp6N.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{table-C5JYQkoQ.mjs → table-PUedhadu.mjs} +1 -1
- package/.output/server/{_tanstack-start-manifest_v-CVNbCkls.mjs → _tanstack-start-manifest_v-DzVFxaMl.mjs} +26 -26
- package/.output/server/index.mjs +141 -141
- package/package.json +7 -7
- package/src/components/features/insights/BuiltinBundle.tsx +21 -0
- package/src/components/features/insights/EventDetails.tsx +11 -3
- package/src/components/features/insights/InstallationHistoryCard.tsx +8 -1
- package/src/lib/insights-usage.ts +2 -0
- package/src/routes/insights_.distribution.tsx +29 -3
- package/.output/public/assets/EventDetails-DkYtmL2k.js +0 -1
- package/.output/public/assets/InsightsPageHeader-DUgKPOEO.js +0 -1
- package/.output/public/assets/api-DzoeMzNP.js +0 -1
- package/.output/public/assets/insights_.distribution-DNls5vGb.js +0 -1
- package/.output/public/assets/installations-DVsP_8Sx.js +0 -1
- package/.output/public/assets/routes-BR7N_DAZ.js +0 -1
- package/.output/public/assets/styles-SFFk8Ipe.css +0 -2
- package/.output/public/assets/valueToPercent-BjsIMB74.js +0 -1
package/.output/nitro.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$r as e,Fn as t,Hr as n,_ as r,ar as i,b as a,g as o,ni as s,v as c,x as l,y as u}from"./sidebar-RBvHzq8e.js";import{p as d}from"./preload-helper-DuV6lz46.js";import{a as f,i as p,r as m,t as h}from"./empty-DtangHOp.js";import{f as g,s as _}from"./field-bPoDrs6K.js";import{o as v}from"./useCompositeListItem-BxJspDxS.js";import{l as y,s as b,u as x}from"./input-group-_PD0i7wZ.js";import{n as S}from"./dist-BzWwzt98.js";import{n as C,r as w}from"./InsightsPageHeader-CASeYum3.js";var T=i(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),E=i(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),D=i(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),O=s(e(),1),k=n(),A={UPDATE_DOWNLOADED:{label:`Downloaded`,description:`Download complete. Waiting for the app to restart and apply it.`,variant:`default`,icon:x},UPDATE_APPLIED:{label:`Update applied`,description:`The app started using the downloaded update.`,variant:`success`,icon:g},RECOVERED:{label:`Recovered`,description:`Recovered from a crashed bundle.`,variant:`warning`,icon:y},UPDATE_FAILED:{label:`Update failed`,description:`An update check, download, or install failed.`,variant:`destructive`,icon:E},UNCHANGED:{label:`No change`,description:`No download or apply was reported at this point.`,variant:`secondary`,icon:T}};function j(){let[e,t]=(0,O.useState)(`UTC`);return(0,O.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:`shortOffset`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}function M(e,t){let n=Object.fromEntries(t.formatToParts(new Date(e)).map(({type:e,value:t})=>[e,t])),r=n.timeZoneName===`GMT`?`GMT+0`:n.timeZoneName;return`${n.year}/${n.month}/${n.day} ${n.hour}:${n.minute}:${n.second} ${r}`}function N({value:e,formatter:t,touch:n=!1}){let r=new Date(e),i=M(e,t);return(0,k.jsxs)(`details`,{className:`group/time`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${n?`flex min-h-11 items-center`:``}`,children:(0,k.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,k.jsx)(`time`,{dateTime:r.toISOString(),className:`whitespace-nowrap`,children:i}),(0,k.jsx)(v,{"aria-hidden":`true`,className:`size-3 text-muted-foreground group-open/time:rotate-180`})]})}),(0,k.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r.toISOString().replace(`T`,` `).replace(`Z`,` UTC`)})]})}var P={patch:`A patch delivered it.`,manifest:`Only the changed files were downloaded.`,archive:`The full archive was downloaded.`},F=e=>{if(e.type===`UPDATE_FAILED`&&e.failure)return d(e.failure);if(e.type===`UPDATE_DOWNLOADED`&&e.delivery){let t=P[e.delivery]??null;return e.patchFallback?`The patch failed. ${t??``}`.trim():t}return null};function I({response:e}){let n=async()=>{try{await navigator.clipboard.writeText(e.body),S.success(`Response body copied`)}catch{S.error(`Could not copy the response body`)}};return(0,k.jsxs)(`section`,{"aria-label":`Response body`,className:`flex min-w-0 flex-col gap-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-medium`,children:`Response body`}),(0,k.jsxs)(t,{variant:`outline`,className:`min-h-11`,disabled:e.body===null||e.body===``,onClick:()=>void n(),children:[(0,k.jsx)(D,{"aria-hidden":`true`,"data-icon":`inline-start`}),` Copy body`]})]}),e.bodyTruncated?(0,k.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Truncated to the 4 KiB reporting limit. Copy includes only the stored text.`}):null,e.body?(0,k.jsx)(`pre`,{className:`rounded-md border bg-muted/30 p-4 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:e.body}):(0,k.jsx)(h,{children:(0,k.jsxs)(p,{children:[(0,k.jsx)(f,{children:e.body===null?`Response body unavailable`:`Empty response body`}),(0,k.jsx)(m,{children:e.body===null?`The client received the HTTP status but could not read the body.`:e.status===304?`The server returned no body. The client can reuse its cached catalog.`:`The server returned no text in this response.`})]})})]})}function L({event:e}){let n=e.httpResponse,i=j(),s=n.status===304?`Not modified`:n.status>=500?`Server error`:n.status>=400?`Request error`:n.status>=300?`Redirect`:`Success`,d=n.resource===`catalog`?`Catalog`:`Artifact`,f=[[`App`,e.platform&&`${e.platform===`ios`?`iOS`:`Android`} ${e.appVersion}`],[`Channel`,e.channel],[`SDK`,e.sdkVersion],[`Installation`,e.installId]].filter(([,e])=>e!=null);return(0,k.jsxs)(o,{children:[(0,k.jsxs)(l,{"aria-label":`View ${d.toLowerCase()} response: HTTP ${n.status}`,render:(0,k.jsx)(t,{variant:`ghost`,className:`-ml-2 h-auto min-h-11 justify-start`}),children:[(0,k.jsxs)(_,{variant:n.status>=400?`destructive`:`secondary`,children:[`HTTP `,n.status]}),(0,k.jsxs)(`span`,{children:[d,` response`]})]}),(0,k.jsxs)(r,{className:`data-[side=right]:w-full data-[side=right]:sm:max-w-2xl`,children:[(0,k.jsxs)(u,{className:`border-b pr-14`,children:[(0,k.jsx)(a,{children:`HTTP response`}),(0,k.jsxs)(c,{children:[d,` · HTTP `,n.status,` · `,s,`. Most recent response available when this report was created.`]})]}),(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-6`,children:[(0,k.jsxs)(`section`,{"aria-label":`Request`,className:`flex min-w-0 flex-col gap-2`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-medium`,children:`Request`}),(0,k.jsxs)(`p`,{className:`font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:[`GET `,n.path]}),n.receivedAtMs==null?null:(0,k.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Response received`,` `,(0,k.jsx)(N,{value:n.receivedAtMs,formatter:i})]})]}),(0,k.jsx)(I,{response:n}),f.length?(0,k.jsxs)(`section`,{"aria-label":`Response context`,className:`flex flex-col gap-3`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-medium`,children:`Response context`}),(0,k.jsx)(`dl`,{className:`grid grid-cols-2 gap-x-6 gap-y-4`,children:f.map(([e,t])=>(0,k.jsxs)(`div`,{className:`min-w-0`,children:[(0,k.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,k.jsx)(`dd`,{className:`mt-1 text-sm wrap-anywhere`,children:t})]},e))})]}):null]})]})]})}function R({event:e}){let t=A[e.type],n=t.icon,r=F(e);return(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start gap-2`,children:[(0,k.jsxs)(_,{variant:t.variant,className:`gap-1 whitespace-nowrap [&_svg]:size-3`,children:[(0,k.jsx)(n,{"aria-hidden":`true`}),t.label]}),(0,k.jsx)(`p`,{className:`max-w-56 whitespace-pre-wrap wrap-anywhere text-xs text-muted-foreground`,children:e.type===`UPDATE_FAILED`&&r?r:t.description}),e.httpResponse?(0,k.jsx)(L,{event:e}):null,e.type===`UPDATE_FAILED`&&e.failure?.errorStack?(0,k.jsxs)(`details`,{className:`w-full max-w-56 text-xs`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer text-muted-foreground`,children:`Stack trace`}),(0,k.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap wrap-anywhere font-mono`,children:e.failure.errorStack})]}):null,e.type!==`UPDATE_FAILED`&&r?(0,k.jsx)(`p`,{className:`max-w-56 whitespace-normal text-xs text-muted-foreground`,children:r}):null]})}function z({event:e,touch:t=!1}){let n=e.type===`UPDATE_DOWNLOADED`,r=e.type===`UPDATE_FAILED`,i=!r||e.failure?.stage!==`check`,a=n||r||e.type===`UPDATE_APPLIED`||e.type===`RECOVERED`;return(0,k.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2`,children:[e.fromBundleId&&a?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`dt`,{className:`text-muted-foreground`,children:n||r?`Running`:`From`}),(0,k.jsxs)(`dd`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,k.jsx)(b,{value:e.fromBundleId,buttonClassName:t?`min-h-11 px-3`:void 0}),w(e.fromBundleId,e.minBundleId)?(0,k.jsx)(C,{}):null]})]}):null,i?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`dt`,{className:`text-muted-foreground`,children:n?`Pending`:r?`Target`:a?`To`:`Current`}),(0,k.jsxs)(`dd`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,k.jsx)(b,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0}),w(e.toBundleId,e.minBundleId)?(0,k.jsx)(C,{}):null]})]}):null]})}export{L as a,I as i,N as n,j as o,R as r,D as s,z as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$r as e,At as t,B as n,Bn as r,F as i,Ft as a,G as o,Gn as s,Hn as c,Hr as l,I as u,In as d,It as f,Jn as p,K as m,Kn as h,L as g,Ln as _,M as v,Mt as y,N as b,Nt as x,P as S,Pt as C,Qt as w,Rn as T,Rt as E,Ut as D,V as O,Vn as k,W as A,Wn as j,Xn as M,Zn as N,_n as P,_t as F,ct as I,gt as L,ht as R,jt as z,ln as B,mt as V,ni as H,nn as U,p as W,q as G,qn as K,qt as q,rt as ee,st as te,un as ne,vn as re,yn as ie,z as ae,zt as J}from"./sidebar-RBvHzq8e.js";import{i as oe,l as se,s as ce}from"./console-features-api-BhUIxeL-.js";import{C as le,S as ue}from"./preload-helper-DuV6lz46.js";import{c as de,d as fe,s as pe,u as me}from"./field-bPoDrs6K.js";import{a as he,i as ge,n as _e,r as ve}from"./useCompositeListItem-BxJspDxS.js";import{s as ye}from"./card-DKr2pZMA.js";var Y=l();function be({error:e,fallbackTitle:t}){return ce(e)?(0,Y.jsxs)(de,{children:[(0,Y.jsx)(ue,{"aria-hidden":`true`}),(0,Y.jsx)(fe,{children:`Insights not installed`}),(0,Y.jsx)(me,{children:e.message})]}):(0,Y.jsxs)(de,{variant:`destructive`,children:[(0,Y.jsx)(ye,{"aria-hidden":`true`}),(0,Y.jsx)(fe,{children:t}),(0,Y.jsx)(me,{children:`Refresh to try again. If this keeps happening, check your Insights provider connection.`})]})}var X=H(e()),xe=X.createContext(void 0);function Z(){let e=X.useContext(xe);if(e===void 0)throw Error(p(64));return e}var Se=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),Q={tabActivationDirection:e=>({[Se.activationDirection]:e})},Ce=X.forwardRef(function(e,t){let{className:n,defaultValue:i=0,onValueChange:a,orientation:o=`horizontal`,render:s,value:c,style:l,...u}=e,d=e.defaultValue!==void 0,f=X.useRef([]),[p,m]=X.useState(()=>new Map),[h,g]=ge({controlled:c,default:i,name:`Tabs`,state:`value`}),_=c!==void 0,[v,y]=X.useState(()=>new Map),b=X.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of v.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[v]),[x,S]=X.useState(()=>({previousValue:h,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:T}=x,E=T,D=!1;C!==h&&(E=we(C,h,o,v),D=C!=null&&h!=null&&b(h)==null);let O=D?C:h,k=C!==O||T!==E;M(()=>{k&&S({previousValue:O,tabActivationDirection:E})},[O,k,E]);let A=N((e,t)=>{t.activationDirection=we(h,e,o,v),a?.(e,t),!t.isCanceled&&g(e)}),j=N((e,t)=>{a?.(e,q(t,void 0,void 0,{activationDirection:`none`}))}),P=N((e,t)=>{m(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),F=N((e,t)=>{m(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),I=X.useCallback(e=>p.get(e),[p]),L=X.useCallback(e=>{for(let t of v.values())if(e===t?.value)return t?.id},[v]),R=X.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:L,getTabPanelIdByValue:I,onValueChange:A,orientation:o,registerMountedTabPanel:P,setTabMap:y,unregisterMountedTabPanel:F,tabActivationDirection:E,value:h}),[b,L,I,A,o,P,y,F,E,h]),z=X.useMemo(()=>{for(let e of v.values())if(e!=null&&e.value===h)return e},[v,h]),V=X.useMemo(()=>{for(let e of v.values())if(e!=null&&!e.disabled)return e.value},[v]),H=X.useRef(!d),W=X.useRef(d),G=X.useRef(!1);M(()=>{if(_)return;function e(e,t){g(e),S(t=>t.previousValue===e&&t.tabActivationDirection===`none`?t:{previousValue:e,tabActivationDirection:`none`}),j(e,t),H.current=!1}if(v.size===0){if(!G.current||h===null)return;e(null,B);return}G.current=!0;let t=z?.disabled,n=z==null&&h!==null;if(!t&&h===i&&(W.current=!1),W.current&&t&&h===i)return;let r=H.current;if(t||n){let n=V??null;if(h===n){H.current=!1;return}let i=B;r?i=U:t&&(i=w),e(n,i);return}r&&z!=null&&(j(h,U),H.current=!1)},[i,V,_,j,z,g,v,h]);let K=r(`div`,e,{state:{orientation:o,tabActivationDirection:E},ref:t,props:u,stateAttributesMapping:Q});return(0,Y.jsx)(xe.Provider,{value:R,children:(0,Y.jsx)(ve,{elementsRef:f,children:K})})});function we(e,t,n,r){if(e==null||t==null)return`none`;let i=null,a=null;for(let[n,o]of r.entries()){if(o==null)continue;let r=o.value??o.index;if(e===r&&(i=n),t===r&&(a=n),i!=null&&a!=null)break}if(i==null||a==null)return i!==a&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?n===`horizontal`?t>e?`right`:`left`:t>e?`down`:`up`:`none`;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect();if(n===`horizontal`){if(s.left<o.left)return`left`;if(s.left>o.left)return`right`}else{if(s.top<o.top)return`up`;if(s.top>o.top)return`down`}return`none`}var Te=`data-composite-item-active`;function Ee(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=K(),{ref:i,index:a}=_e(e),o=n===a,s=X.useRef(null),c=j(i,s);return{compositeProps:X.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var De=X.createContext(void 0);function Oe(){let e=X.useContext(De);if(e===void 0)throw Error(p(65));return e}var ke=X.forwardRef(function(e,t){let{className:n,disabled:i=!1,render:a,value:o,id:c,nativeButton:l=!0,style:u,...d}=e,{value:f,getTabPanelIdByValue:p,orientation:m}=Z(),{activateOnFocus:h,highlightedTabIndex:g,onTabActivation:_,registerTabResizeObserverElement:v,setHighlightedTabIndex:y,tabsListElement:b}=Oe(),x=I(c),{compositeProps:S,compositeRef:C,index:w}=Ee({metadata:X.useMemo(()=>({disabled:i,id:x,value:o}),[i,x,o])}),T=o===f,E=X.useRef(!1),O=X.useRef(null);X.useEffect(()=>{let e=O.current;if(e)return v(e)},[v]),M(()=>{if(E.current){E.current=!1;return}if(!(T&&w>-1&&g!==w))return;let e=b;if(e!=null){let t=P(D(e));if(t&&re(e,t))return}i||y(w)},[T,w,g,y,i,b]);let{getButtonProps:k,buttonRef:A}=s({disabled:i,native:l,focusableWhenDisabled:!0}),j=p(o),N=X.useRef(!1),F=X.useRef(!1);function L(e){T||i||_(o,q(ne,e.nativeEvent,void 0,{activationDirection:`none`}))}function R(e){T||(w>-1&&!i&&y(w),!i&&h&&(!N.current||N.current&&F.current)&&_(o,q(ne,e.nativeEvent,void 0,{activationDirection:`none`})))}function z(e){if(T||i)return;N.current=!0;function t(){N.current=!1,F.current=!1}(!e.button||e.button===0)&&(F.current=!0,D(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return r(`button`,e,{state:{disabled:i,active:T,orientation:m},ref:[t,A,C,O],props:[S,{role:`tab`,"aria-controls":j,"aria-selected":T,id:x,onClick:L,onFocus:R,onPointerDown:z,[Te]:T?``:void 0,onKeyDownCapture(){E.current=!0}},d,k]})}),Ae=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=R.startingStyle]=`startingStyle`,e[e.endingStyle=R.endingStyle]=`endingStyle`,e}({}),je={...Q,...L},Me=X.forwardRef(function(e,t){let{className:n,value:i,render:a,keepMounted:o=!1,style:s,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=Z(),h=I(),{ref:g,index:_}=_e({metadata:X.useMemo(()=>({id:h,value:i}),[h,i])}),v=i===l,{mounted:y,transitionStatus:b,setMounted:x}=F(v),S=!y,C=u(i),w={hidden:S,orientation:d,tabActivationDirection:f,transitionStatus:b},T=X.useRef(null),E=r(`div`,e,{state:w,ref:[t,g,T],props:[{"aria-labelledby":C,hidden:S,id:h,role:`tabpanel`,tabIndex:v?0:-1,inert:ee(!v),[Ae.index]:_},c],stateAttributesMapping:je});return V({open:v,ref:T,onComplete(){v||x(!1)}}),M(()=>{if(!(S&&!o)&&h!=null)return p(i,h),()=>{m(i,h)}},[S,o,i,h,p,m]),o||y?E:null});function Ne(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Pe=[];function Fe(e){let{itemSizes:r,cols:s=1,loopFocus:c=!0,onLoop:l,dense:d=!1,orientation:p=`both`,direction:h,highlightedIndex:_,onHighlightedIndexChange:w,rootRef:T,enableHomeAndEndKeys:D=!1,stopEventPropagation:O=!1,disabledIndices:k,modifierKeys:M=Pe}=e,[P,F]=X.useState(0),I=s>1,L=X.useRef(null),R=j(L,T),B=X.useRef([]),V=X.useRef(!1),H=_??P,U=N((e,t=!1)=>{if((w??F)(e),t){let t=B.current[e];G(L.current,t,h,p)}}),W=N(e=>{if(e.size===0||V.current)return;V.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&U(r),G(L.current,n,h,p)}),K=N((e,t,n)=>l?l?.(e,t,n,B):n),q=X.useMemo(()=>({"aria-orientation":p===`both`?void 0:p,ref:R,onFocus(e){let t=L.current,n=ie(e.nativeEvent);!t||n==null||!m(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let _=D?g:b;if(!_.has(e.key)||Ie(e,M)||!L.current)return;let w=h===`rtl`,T=w?S:i,j={horizontal:T,vertical:v,both:T}[p],N=w?i:S,P={horizontal:N,vertical:u,both:N}[p],F=ie(e.nativeEvent);if(F!=null&&m(F)&&!Ne(F)){let t=F.selectionStart,n=F.selectionEnd,r=F.value??``;if(t==null||e.shiftKey||t!==n||e.key!==P&&t<r.length||e.key!==j&&t>0)return}let R=H,V=f(B,k),W=a(B,k);if(I){let n=r||Array.from({length:B.current.length},()=>({width:1,height:1})),i=t(n,s,d),a=i.findIndex(e=>e!=null&&!J(B.current,e,k)),o=i.reduce((e,t,n)=>t!=null&&!J(B.current,t,k)?n:e,-1);R=i[C(i.map(e=>e==null?null:B.current[e]),{event:e,orientation:p,loopFocus:c,onLoop:K,cols:s,disabledIndices:x([...k||B.current.map((e,t)=>J(B.current,t)?t:void 0),void 0],i),minIndex:a,maxIndex:o,prevIndex:y(H>W?V:H,n,i,s,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:w})]}let G={horizontal:[T],vertical:[v],both:[T,v]}[p],q={horizontal:[N],vertical:[u],both:[N,u]}[p],ee=I?_:{horizontal:D?n:ae,vertical:D?o:A,both:_}[p];D&&(e.key===`Home`?R=V:e.key===`End`&&(R=W)),R===H&&(G.includes(e.key)||q.includes(e.key))&&(c&&R===W&&G.includes(e.key)?(R=V,l&&(R=l(e,H,R,B))):c&&R===V&&q.includes(e.key)?(R=W,l&&(R=l(e,H,R,B))):R=z(B.current,{startingIndex:R,decrement:q.includes(e.key),disabledIndices:k})),R!==H&&!E(B.current,R)&&(O&&e.stopPropagation(),ee.has(e.key)&&e.preventDefault(),U(R,!0),queueMicrotask(()=>{B.current[R]?.focus()}))}}),[s,d,h,k,B,D,H,I,r,c,l,K,R,M,U,p,O]);return X.useMemo(()=>({props:q,highlightedIndex:H,onHighlightedIndexChange:U,elementsRef:B,disabledIndices:k,onMapChange:W,relayKeyboardEvent:q.onKeyDown}),[q,H,U,B,k,W])}function Ie(e,t){for(let n of O.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Le(e){let{render:t,className:n,style:i,refs:a=k,props:o=k,state:s=c,stateAttributesMapping:l,highlightedIndex:u,onHighlightedIndexChange:d,orientation:f,dense:p,itemSizes:m,loopFocus:g,onLoop:_,cols:v,enableHomeAndEndKeys:y,onMapChange:b,stopEventPropagation:x=!0,rootRef:S,disabledIndices:C,modifierKeys:w,highlightItemOnHover:T=!1,tag:E=`div`,...D}=e,{props:O,highlightedIndex:A,onHighlightedIndexChange:j,elementsRef:M,onMapChange:N,relayKeyboardEvent:P}=Fe({itemSizes:m,cols:v,loopFocus:g,onLoop:_,dense:p,orientation:f,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:S,stopEventPropagation:x,enableHomeAndEndKeys:y,direction:te(),disabledIndices:C,modifierKeys:w}),F=r(E,e,{state:s,ref:a,props:[O,...o,D],stateAttributesMapping:l}),I=X.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:j,highlightItemOnHover:T,relayKeyboardEvent:P}),[A,j,T,P]);return(0,Y.jsx)(h.Provider,{value:I,children:(0,Y.jsx)(ve,{elementsRef:M,onMapChange:e=>{b?.(e),N(e)},children:F})})}var Re=X.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=Z(),[p,m]=X.useState(0),[h,g]=X.useState(null),_=X.useRef(new Set),v=X.useRef(new Set),y=X.useRef(null);X.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.forEach(e=>{e()})});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h]);let b=N(e=>(_.current.add(e),()=>{_.current.delete(e)})),x=N(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),S=N((e,t)=>{e!==u&&c(e,t)}),C={orientation:l,tabActivationDirection:f},w={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},T=X.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:b,registerTabResizeObserverElement:x,onTabActivation:S,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,b,x,S,m,h]);return(0,Y.jsx)(De.Provider,{value:T,children:(0,Y.jsx)(Le,{render:a,className:r,style:o,state:C,refs:[t,g],props:[w,s],stateAttributesMapping:Q,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:k})})});function ze({className:e,orientation:t=`horizontal`,...n}){return(0,Y.jsx)(Ce,{orientation:t,"data-slot":`tabs`,"data-orientation":t,className:_(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Be=T(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Ve({className:e,variant:t=`default`,...n}){return(0,Y.jsx)(Re,{"data-slot":`tabs-list`,"data-variant":t,className:_(Be({variant:t}),e),...n})}function He({className:e,...t}){return(0,Y.jsx)(ke,{"data-slot":`tabs-trigger`,className:_(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Ue({className:e,...t}){return(0,Y.jsx)(Me,{"data-slot":`tabs-content`,className:_(`flex-1 text-xs/relaxed outline-none`,e),...t})}var $={"24h":{label:`DAU`,period:`24 hours`,interval:`hour`},"7d":{label:`WAU`,period:`7 days`,interval:`6 hours`},"30d":{label:`MAU`,period:`30 days`,interval:`day`},"12m":{label:`YAU`,period:`12 months`,interval:`week`}};function We({label:e,onPeriodChange:t,period:n,periods:r}){return(0,Y.jsx)(ze,{value:n,onValueChange:e=>{let n=r.find(t=>t.value===e);n&&t(n.value)},children:(0,Y.jsx)(Ve,{"aria-label":e,className:`min-h-11 sm:min-h-9`,children:r.map(({value:e,name:t})=>(0,Y.jsx)(He,{value:e,"aria-label":t,className:`min-w-12 px-3`,children:e},e))})})}var Ge=[`24h`,`7d`,`30d`].map(e=>({value:e,name:$[e].period})),Ke=Object.keys($).map(e=>({value:e,name:$[e].period}));function qe({window:e,onWindowChange:t}){return(0,Y.jsx)(We,{label:`Reporting period`,onPeriodChange:t,period:e,periods:Ge})}function Je({window:e,onWindowChange:t,twelveMonths:n=!0}){return(0,Y.jsx)(We,{label:`Reporting period`,onPeriodChange:t,period:e,periods:Ke.filter(({value:e})=>n||e!==`12m`)})}var Ye=(e,t)=>e!=null&&e===t;function Xe(){return(0,Y.jsx)(pe,{className:`shrink-0 font-sans font-normal`,title:`The bundle the native build shipped`,variant:`secondary`,children:`Built-in app`})}function Ze({view:e,overviewSearch:t}){let n=oe(`insightsAnalytics`);return(0,Y.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-3 border-b bg-background px-3 py-3 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,Y.jsx)(W,{className:`-ml-1 size-11 lg:size-7`}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(le,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,Y.jsx)(`h1`,{className:`text-sm font-medium`,children:`Insights`})]}),(0,Y.jsxs)(`nav`,{"aria-label":`Insights views`,className:`ml-auto flex gap-2`,children:[n?(0,Y.jsx)(se,{"aria-current":e===`overview`?`page`:void 0,className:_(d({className:`h-11 px-3 lg:h-8 lg:px-2.5`,size:`lg`,variant:e===`overview`?`secondary`:`ghost`})),search:t,to:`/insights`,children:`Overview`}):null,(0,Y.jsxs)(se,{"aria-current":e===`events`?`page`:void 0,className:_(d({className:`h-11 px-3 lg:h-8 lg:px-2.5`,size:`lg`,variant:e===`events`?`secondary`:`ghost`})),to:`/installations`,children:[(0,Y.jsx)(he,{"aria-hidden":`true`,"data-icon":`inline-start`}),`All events`]})]})]})}export{We as a,ze as c,He as d,be as f,qe as i,Ue as l,Xe as n,Je as o,Ye as r,$ as s,Ze as t,Ve as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ur as e,Vr as t,ar as n,cr as r,nr as i,rr as a}from"./sidebar-RBvHzq8e.js";import{d as o}from"./alert-dialog-DXxrSU0G.js";var s=n(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),c=n(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),l=a({method:`GET`}).middleware([i]).handler(e(`206547cb1526f961070a989818ca7b9e34f6b2b0e4ab851698c3807fe9fb5e0c`)),u=a({method:`GET`}).middleware([i]).handler(e(`a6f23116eeaf76166d405e28a95213123025613c6603030894e519015bf48032`)),d=a({method:`POST`}).middleware([i]).handler(e(`7ea0186f19f9f2bc2ca4b26e3c59636891cf046957f84287b6783f8d88bd8cb7`)),f=a({method:`POST`}).middleware([i]).handler(e(`b46c95dba95a6a3e8fa5c9d100e3622fa5ae7af4f38e10fb1ed2fa48289a3a8f`)),p=a({method:`POST`}).middleware([i]).handler(e(`d5b58722ce514e3b63a377f736b4823c2011782495442ae4870ed547e392c70b`)),m=a({method:`POST`}).middleware([i]).handler(e(`956539a300d79a7efa191c1cc2d529d62fc4bfd940442548fdbc1404e0d53078`)),h=a({method:`GET`}).middleware([i]).handler(e(`e8c24b7247936f045a145ffd5c177fd0e3df3b52769d67dfbd8d1de491d66396`)),g=a().middleware([i]).handler(e(`51a34c05479a893c7d320bd4cd1604427289d667698c48b9f30a01aabf8a5e68`)),_=a().middleware([i]).handler(e(`79ada05964de8f2123bfcd62b10097d59bf8fd689ef5c7161031e5871d8396c5`)),v=a({method:`POST`}).middleware([i]).handler(e(`2b9b8d1f49f79a511589617d8d4bfc6094a3acf5264f33651b9569ba66d3f321`)),y=a({method:`POST`}).middleware([i]).handler(e(`52756dde414919a906bfe83d1ab6d29910c63bcafdb47653d6f1df562d958920`));a().middleware([i]).handler(e(`f8bdca3d0579adb812d6404f55d9261a89cdb025e920b1fcad82883646a5fe9e`)),a({method:`GET`}).middleware([i]).handler(e(`00ccacb4a0212c83ec29f4d11719046ad91ea8291cfc557d514dbf00d3bd7f5f`));var b=a({method:`GET`}).middleware([i]).handler(e(`1bd85c2a50e24785cb6abb023a247a9f048f37ddfa85cbb1c57e579563bad013`)),x=a({method:`GET`}).middleware([i]).handler(e(`4370f1bf70b91f1168d85379d3008449a1bedb915e9878ca4ef89d5f3a80fa7f`)),S=a({method:`GET`}).middleware([i]).handler(e(`4ca367070b00f58179a572f0bb8196a4ccdd3881e9b1dbfe33deee0cb6e1f549`)),C=[`bundles`],w=[`releases`],T={config:[`config`],channels:[`channels`],configLoaded:[`config-loaded`],bundles:{all:C,list:e=>[...C,e??{}]},releases:{all:w,list:e=>[...w,e??{}]},release:e=>[`release`,e],releaseCatalog:e=>[`release-catalog`,e],bundleChildren:{all:[`bundle-children`],list:e=>[`bundle-children`,e],counts:e=>[`bundle-children`,`counts`,...e]},bundle:e=>[`bundle`,e]};function E(){return r({queryKey:T.config,queryFn:()=>g(),staleTime:1/0})}function D(){return r({queryKey:T.channels,queryFn:()=>_(),staleTime:1/0})}function O(e){return r({queryKey:T.releases.list(e),queryFn:()=>l({data:e}),placeholderData:e=>e})}function k(e){return r({enabled:e.length>0,queryFn:()=>u({data:{releaseId:e}}),queryKey:T.release(e)})}function A(e){return r({enabled:e.length>0,queryFn:()=>h({data:{scopeKey:e}}),queryKey:T.releaseCatalog(e)})}function j(e){return r({queryKey:T.bundle(e),queryFn:()=>b({data:{bundleId:e}}),staleTime:1/0,enabled:!!e})}function M(e){return r({queryKey:T.bundleChildren.list(e),queryFn:()=>x({data:{baseBundleId:e}}),staleTime:1/0,enabled:!!e})}function N(e){let t=[...e].sort((e,t)=>e.localeCompare(t));return r({queryKey:T.bundleChildren.counts(t),queryFn:()=>S({data:{bundleIds:t}}),staleTime:1/0,enabled:t.length>0})}function P(){let e=t();return o({mutationFn:e=>v({data:e}).then(e=>e.data),onSuccess:async()=>{await e.invalidateQueries({queryKey:T.channels})}})}function F(){let e=t();return o({mutationFn:e=>y({data:e}).then(e=>e.data),onSettled:async()=>{await e.invalidateQueries({queryKey:T.channels})}})}function I(){let e=t();return o({mutationFn:e=>d({data:e}),onSuccess:async(t,n)=>{await Promise.all([e.invalidateQueries({queryKey:T.releases.all}),e.invalidateQueries({queryKey:T.release(n.releaseId)}),e.invalidateQueries({queryKey:[`release-catalog`]}),e.invalidateQueries({queryKey:T.channels})])}})}function L(){return o({mutationFn:e=>f({data:e})})}function R(){let e=t();return o({mutationFn:e=>p({data:e}),onSuccess:async(t,n)=>{e.removeQueries({queryKey:T.release(n.releaseId)}),await Promise.all([e.invalidateQueries({queryKey:T.releases.all}),e.invalidateQueries({queryKey:[`release-catalog`]}),e.invalidateQueries({queryKey:T.channels}),e.invalidateQueries({queryKey:T.bundles.all}),e.invalidateQueries({queryKey:[`bundle`]}),e.invalidateQueries({queryKey:T.bundleChildren.all})])}})}function z(){let e=t();return o({mutationFn:e=>m({data:e}),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:T.releases.all}),e.invalidateQueries({queryKey:[`release`]}),e.invalidateQueries({queryKey:[`release-catalog`]}),e.invalidateQueries({queryKey:T.channels})])}})}export{E as a,R as c,A as d,k as f,s as g,c as h,D as i,L as l,I as m,M as n,P as o,O as p,j as r,F as s,N as t,z as u};
|