1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="33be5b59-d971-5fdb-b0c4-df91eeb23eff")}catch(e){}}(); 3!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0d435-3096-0000-87c3-aca2d31ea39c";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="9146b10f-0c27-5d11-9af8-bec640408e09")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[876],{70876:(e,t,a)=>{a.r(t),a.d(t,{default:()=>h});let r=["af","am","ar","az","bg","bn","bs","cs","da","de","el","en","es","es-MX","et","fa","fa-AF","fi","fr","fr-CA","ha","he","hi","hr","hu","id","it","ja","ka","ko","lt","lv","ms","nl","no","pl","ps","pt","ro","ru","sk","sl","so","sq","sr","sv","sw","ta","th","tl","tr","uk","ur","vi","zh","zh-TW"];function n(e){return r.includes(e)}var s=a(82216),i=a(29837),c=a(80820),o=a(57833),l=a(3982);class u{static init(e,t){(this.instance=new u(e),(0,c.uy)(t))?console.info("No chat config present, skipping chat service initialization"):!(0,c.uy)(t)&&(0,c.uy)(t.streamChatKey)?console.error("Missing chatConfig.streamChatKey brand setting, unable to initialize chat service"):(console.info("Initializing chat service with key",{key:t.streamChatKey}),this.client=s.hxx.getInstance(t.streamChatKey,{timeout:6e3}),this.client.setMessageComposerSetupFunction(e=>{let{composer:t}=e;t.textComposer.middlewareExecutor.remove("stream-io/text-composer/mentions-middleware"),t.textComposer.middlewareExecutor.remove("stream-io/text-composer/commands-middleware")}))}static async refreshToken(e,t){let a=u.store.getState().brand.id,{data:r}=await l.A.client.query({query:o.OXq,variables:{brand_id:a,stream_chat_user_id:e,verification_code:t}});return r.refreshStreamChatToken.stream_chat_user_token}static languageForChat(){var e=u.store.getState().locale.language;if(!e)return;if(n(e))return e;let t=e.split("-")[0];return t&&n(t)?t:void 0}static async connect(){let e=u.store.getState().auth.uid;if(!(0,c.uy)(e)){let e=u.store.getState().brand.id,{data:t}=await l.A.client.query({query:o.wCP,variables:{brand_id:e}}),a=t.getOrCreateStreamChatUser.stream_chat_user_id;return await u.client.connectUser({id:a},async()=>u.refreshToken(a)),a}let{streamUserId:t,verificationCode:a}=u.store.getState().chat;if(!(0,c.uy)(t)&&!(0,c.uy)(a))return await u.client.connectUser({id:t},async()=>u.refreshToken(t,a)),t;await u.client.connectAnonymousUser()}static async disconnect(){await u.client.disconnectUser()}static async queryChannels(e){return u.client.queryChannels(e)}static getI18nInstance(){let e=u.languageForChat();return new i.L({language:e})}constructor(e){u.store=e,u.instance=this}}let h=u}}]); 4//# sourceMappingURL=876.9f6923b7630c2853.js.map 5//# chunkId=9146b10f-0c27-5d11-9af8-bec640408e09 6//# debugId=33be5b59-d971-5fdb-b0c4-df91eeb23eff
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.