1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d9268ab4-614f-4767-9029-b64088087ad8",e._sentryDebugIdIdentifier="sentry-dbid-d9268ab4-614f-4767-9029-b64088087ad8")}catch(e){}}();var _sentryModuleMetadataGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};"use strict";_sentryModuleMetadataGlobal._sentryModuleMetadata=_sentryModuleMetadataGlobal._sentryModuleMetadata||{},_sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack]=Object.assign({},_sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack],{"_sentryBundlerPluginAppKey:sentry-application-key":!0}),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3756],{63756:(e,t,a)=>{a.r(t),a.d(t,{WatchersChat:()=>W});var o=a(45526),n=a(67684),r=a(62701),d=a(20294),s=a(37876),i=a(14232),u=a(74359),l=a(7819),c=a(46341),p=a(51802),f=a(4173),y=a(96653),m=a(33826),h=a(52635),b=a(37198),k=a(73579),w=a(17316),g=a(1049),I=a(14903),v=a(83626),M=a(36624),_=a(61471),S=a(89099),C=a(15323),E=a(2127),G=a(55307),T={"theme-dark":"dark","theme-light":"light"},x={eng:"en",aze:"az"},N="https://chat.watchers.io",L=p.KC([p.eu("deposit"),p.eu("withdraw"),p.Yj().regex(/^promotions\/.+$/)]),R=p.gM("type",[p.Ik({type:p.eu("watchersWindowClose")}),p.Ik({type:p.eu("joinChatClick")}),p.Ik({type:p.eu("betRepeat"),body:p.Ik({action:p.eu("share"),data:p.Ik({barcode:p.Yj()})})}),p.Ik({type:p.eu("share"),body:p.Ik({action:p.eu("share"),data:p.Ik({externalRoomId:p.Yj()})})}),p.Ik({type:p.eu("fullscreen"),body:p.Ik({action:p.KC([p.eu("collapse"),p.eu("expand")])})}),p.Ik({type:p.eu("link"),body:p.Ik({action:p.eu("open"),data:p.Ik({link:p.Yj().optional()})})})]);function W(e){var t=e.roomId,a=e.roomType,p=e.closeChat,W=e.className,$=(0,i.useRef)(null),j=(0,d._)((0,i.useState)(!1),2),A=j[0],z=j[1],Y=(0,_.c)(["common"]).t,H=(0,w.D)().theme,D=(0,g.F)().locale,K=(0,c.A)(),O=(0,k.lg)(),B=(0,d._)((0,f.wM)(),2),P=(B[0],B[1]),U=(0,S.useRouter)(),F=(0,u.I)((0,r._)((0,n._)({},l.FH.account.accountQueryOptions()),{enabled:K.isAuthenticated})),q=l.FH.account.useRegenerateTicketMutation({onSuccess:function(e){var t,a={SINGLE:y.G$.Single,COMBO:y.G$.Combo,SYSTEM:y.G$.System,MULTI_SINGLE:y.G$.Single,MULTI_SYSTEM:y.G$.System};O.generateBetSlip({activeTicketTypeTab:a[e.ticketType],stakes:(t={},(0,o._)(t,y.G$.Single,e.totalStake.toString()),(0,o._)(t,y.G$.Combo,e.totalStake.toString()),(0,o._)(t,y.G$.System,e.totalStake.toString()),t),betLines:e.betLines.map(function(e){return{stake:e.stake.toString(),isLive:e.currentlyLive,outcomeId:e.outcomeRefId,producerType:e.currentlyLive?y.hr.Live:y.hr.PreMatch,removed:!1,currentOdd:e.odd,banco:!1,bettingScore:(0,m.Qf)(e),marketId:(0,h.pr)(e.eventId,e.marketHash),id:(0,b.$v)("",(0,h.pr)(e.eventId,e.marketHash),e.outcomeRefId),categoryId:e.categoryId,eventId:e.eventId,eventName:e.eventName,eventType:e.eventType,marketHash:e.marketHash,marketStatus:e.marketStatus,frozen:e.frozen,marketName:e.marketName,mbn:e.mbn,odd:e.odd,marketRefId:e.marketRefId,outcomeName:e.outcomeName,outcomeStatus:e.outcomeStatus,tournamentId:e.tournamentId,sportTypeId:e.sportTypeId,closed:(0,h.hY)({frozen:e.frozen,status:e.marketStatus})||(0,h.vW)({status:e.outcomeStatus,odd:e.odd})}})}),p()},onError:function(e){var t;(0,M.p6)({message:null!=(t=(0,G.ue)(e).reason)?t:Y("copyBetError")})}});function Q(){P({"auth-modal-component":"login"})}function J(e){if(e.origin===N){var t=R.safeParse(e.data);if(t.success){var o=t.data;if("watchersWindowClose"===o.type)p();else if("joinChatClick"===o.type)Q();else if("share"===o.type){var s=o.body.data.externalRoomId,i=(0,C.W)((0,r._)((0,n._)({},U.query),{"room-id":s,"room-type":a})),u="".concat(window.location.origin).concat(U.pathname,"?").concat(i);navigator.clipboard.writeText(u),(0,M.CE)({message:Y("copiedUrl")})}else if("betRepeat"===o.type){if(!K.isAuthenticated)return void Q();q.mutate({ticketCode:o.body.data.barcode})}else if("fullscreen"===o.type)"expand"===o.body.action?z(!0):"collapse"===o.body.action&&z(!1);else if("link"===o.type){var l=o.body.data.link;if(void 0===l)return;try{var c=L.parse(l);if("deposit"===c)U.push(I.bw.deposit.path);else if("withdraw"===c)U.push(I.bw.withdraw.path);else if(c.startsWith("promotions/")){var f=(0,d._)(c.split("promotions/"),2)[1];if(void 0===f||""===f)return;U.push("/promotions/".concat(f))}}catch(e){setTimeout(function(){window.open(l,"_blank","noopener,noreferrer")})}}}}}(0,i.useEffect)(function(){return window.addEventListener("message",J),function(){window.removeEventListener("message",J)}},[U.query,K.isAuthenticated]),(0,i.useEffect)(function(){var e;(null==(e=$.current)?void 0:e.contentWindow)&&(console.log("theme",H),$.current.contentWindow.postMessage({type:"mode",body:{data:T[H]}},"*"))},[H]),(0,i.useEffect)(function(){var e;(null==(e=$.current)?void 0:e.contentWindow)&&$.current.contentWindow.postMessage({type:"lang",body:{data:x[D]}},"*")},[D]);var V=(0,i.useMemo)(function(){var e,a,o=new URLSearchParams;return o.set("apikey",E.K.watchersApiKey),o.set("roomId",t),o.set("userId",null!=(a=null==(e=F.data)?void 0:e.encryptedWatchersAccountNumber)?a:"0"),o.set("readonly",K.isAuthenticated?"false":"true"),o.set("lang",x[D]),o.set("mode",T[H]),"".concat(N,"?").concat(o.toString())},[t,K.isAuthenticated,F.data]);return(0,s.jsx)("div",{className:(0,v.cn)("fixed bottom-0 z-10001 h-[532px] w-full md:h-[584px] lg:right-0 lg:left-auto lg:h-[564px] lg:w-[407px]",A&&"z-300",W),children:(0,s.jsx)("iframe",{ref:$,src:V,className:(0,v.cn)("h-full w-full rounded-md",A&&"fixed top-0 left-0 h-full w-screen"),allow:"clipboard-read; clipboard-write; microphone; fullscreen;"})})}}}]);
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.