try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3616a1ef-b948-46b7-a237-71d45b7ef463`,e._sentryDebugIdIdentifier=`sentry-dbid-3616a1ef-b948-46b7-a237-71d45b7ef463`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{jg as t,ng as n}from"./entry.client-mpghtlrl.js";import{t as r}from"./Announcer-b6q4a41y.js";var i=e(t(),1),a=(0,i.createContext)(void 0);a.displayName=`AnnouncementContext`;var o=()=>{let e=(0,i.useContext)(a);if(!e)throw Error(`This context can only be used by components inside <AnnouncementProvider>...</AnnouncementProvider>`);return e},s=n();function c({children:e}){let[t,n]=(0,i.useState)({}),o=(0,i.useRef)({}),c=(0,i.useCallback)((e,t)=>{(!(e in o.current)||o.current[e].text!==t.text||o.current[e].priority!==t.priority)&&n(n=>{let r={...n,[e]:t};return o.current=r,r})},[o,n]),l=(0,i.useCallback)(e=>{e in o.current&&n(t=>{let{[e]:n,...r}=t;return o.current=r,r})},[o,n]),u=(0,i.useMemo)(()=>({announcements:t,addAnnouncement:c,removeAnnouncement:l}),[t,c,l]);return(0,s.jsxs)(a.Provider,{value:u,children:[(0,s.jsx)(r,{announcements:t}),e]})}export{o as n,c as t};