PageSourceSearch

https://myaccount.sbs.com.au/assets/d197cac/status-announcer-provider-twgJHQuP.js

js sbs.com.au collected 2026-09-24 08:25:13 UTC 3,963 bytes, 1 lines download raw bytes

1import{a}from"./chunk-EPOLDU6W-Cy0pbNoL.js";import{g as O,b as j}from"./i18nInstance-CHFDjdcJ.js";import{j as z}from"./jsx-runtime-u17CrQMm.js";const M=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);p(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},v={},E=(e,t,n,r)=>{p(n)&&v[n]||(p(n)&&(v[n]=new Date),M(e,t,n,r))},F=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},T=(e,t,n)=>{e.loadNamespaces(t,F(e,n))},I=(e,t,n,r)=>{if(p(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return T(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,F(e,r))},k=(e,t,n={})=>!t.languages||!t.languages.length?(E(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),p=e=>typeof e=="string",U=e=>typeof e=="object"&&e!==null,_=a.createContext();class G{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const $=(e,t)=>{const n=a.useRef();return a.useEffect(()=>{n.current=e},[e,t]),n.current},L=(e,t,n,r)=>e.getFixedT(t,n,r),q=(e,t,n,r)=>a.useCallback(L(e,t,n,r),[e,t,n,r]),Y=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=a.useContext(_)||{},s=n||r||O();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new G),!s){E(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const u=(d,g)=>p(g)?g:U(g)&&p(g.defaultValue)?g.defaultValue:Array.isArray(d)?d[d.length-1]:d,l=[u,{},!1];return l.t=u,l.i18n={},l.ready=!1,l}s.options.react?.wait&&E(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...j(),...s.options.react,...t},{useSuspense:m,keyPrefix:h}=f;let o=e||i||s.options?.defaultNS;o=p(o)?[o]:o||["translation"],s.reportNamespaces.addUsedNamespaces?.(o);const c=(s.isInitialized||s.initializedStoreOnce)&&o.every(u=>k(u,s,f)),w=q(s,t.lng||null,f.nsMode==="fallback"?o:o[0],h),y=()=>w,x=()=>L(s,t.lng||null,f.nsMode==="fallback"?o:o[0],h),[A,S]=a.useState(y);let C=o.join();t.lng&&(C=`${t.lng}${C}`);const R=$(C),N=a.useRef(!0);a.useEffect(()=>{const{bindI18n:u,bindI18nStore:l}=f;N.current=!0,!c&&!m&&(t.lng?I(s,t.lng,o,()=>{N.current&&S(x)}):T(s,o,()=>{N.current&&S(x)})),c&&R&&R!==C&&N.current&&S(x);const d=()=>{N.current&&S(x)};return u&&s?.on(u,d),l&&s?.store.on(l,d),()=>{N.current=!1,s&&u&&u?.split(" ").forEach(g=>s.off(g,d)),l&&s&&l.split(" ").forEach(g=>s.store.off(g,d))}},[s,C]),a.useEffect(()=>{N.current&&c&&S(y)},[s,h,c]);const b=[A,s,c];if(b.t=A,b.i18n=s,b.ready=c,c||!c&&!m)return b;throw new Promise(u=>{t.lng?I(s,t.lng,o,()=>u()):T(s,o,()=>u())})},P=a.createContext(void 0);function B({children:e}){const[t,n]=a.useState(""),[r,i]=a.useState("off"),s=a.useRef(r),f=a.useRef([]),m=a.useCallback(()=>{f.current.forEach(c=>cancelAnimationFrame(c)),f.current=[]},[]),h=a.useCallback((c,w)=>{if(m(),w===s.current){i(w),n(c);return}s.current=w,i(w);const y=requestAnimationFrame(()=>{const x=requestAnimationFrame(()=>{n(c)});f.current.push(x)});f.current.push(y)},[m]);a.useEffect(()=>m(),[m]);const o=a.useMemo(()=>({statusMessage:t,statusLevel:r,announce:h}),[h,r,t]);return z.jsx(P.Provider,{value:o,children:e})}const D=()=>{const e=a.useContext(P);if(!e)throw new Error("useStatusAnnouncerContext must be used within a StatusAnnouncerProvider");return e};export{_ as I,B as S,Y as a,M as b,U as c,p as i,D as u,E as w};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.