1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6934],{84979:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},63231:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]])},47737:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},30143:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},42841:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},1470:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]])},94933:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=(0,n(91373).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},90495:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/chat/[id]",function(){return n(67986)}])},72685:function(e,t,n){"use strict";n.d(t,{I:function(){return c}});var r=n(26042),o=n(99534),a=n(85893),i=n(67294),s=n(62461),c=i.forwardRef((function(e,t){var n=e.className,i=e.type,c=(0,o.Z)(e,["className","type"]);return(0,a.jsx)("input",(0,r.Z)({type:i,className:(0,s.cn)("flex h-10 w-full rounded-md border border-foreground
1/50 bg-background px-3 py-2 text-base text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-[13px]",n),ref:t},c))}));c.displayName="Input"},43341:function(e,t,n){"use strict";n.d(t,{J2:function(){return u},xo:function(){return d},yk:function(){return l}});var r=n(26042),o=n(99534),a=n(85893),i=n(67294),s=n(86419),c=n(62461),u=s.fC,d=s.xz,l=i.forwardRef((function(e,t){var n=e.className,i=e.align,u=void 0===i?"center":i,d=e.sideOffset,l=void 0===d?4:d,f=e.portalled,p=void 0===f||f,h=(0,o.Z)(e,["className","align","sideOffset","portalled"]),v=(0,a.jsx)(s.VY,(0,r.Z)({ref:t,align:u,sideOffset:l,className:(0,c.cn)("z-[100] w-72 rounded-md border bg-charcoal/50 p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-popover-content-transform-origin)]",n)},h));return p?(0,a.jsx)(s.h_,{children:v}):v}));l.displayName=s.VY.displayName},67986:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return y}});var r=n(47568),o=n(26042),a=n(69396),i=n(97582),s=n(85893),c=n(96486),u=n(36316),d=n(67294),l=n(19201),f=n(99209),p=n(96076),h=n(45508),v=n(93520),g=n(89756),m=n(24271),_=n(89355),x=n(46945);function y(){var e=(0,d.useState)(!0),t=e[0],n=e[1],y=(0,d.useState)(""),b=y[0],w=y[1],C=(0,d.useState)(null),P=C[0],j=C[1],k=(0,d.useState)(null),M=k[0],A=k[1],O=(0,d.useState)(null),Z=O[0],N=O[1],E=(0,d.useState)(null),R=E[0],D=E[1],F=(0,d.useState)({}),I=F[0],L=F[1],S=(0,d.useState)(!1),H=S[0],V=S[1],z=function(){var e=(0,r.Z)((function(e,t){var r,s,u,d,l,p,h,v,g,x;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),n(!0),[4,(0,f.oF)({baseURL:e.base_url,itemId:t.item_id,itemType:t.item_type,token:e.token,userId:e.user_id,lcId:null!==(r=t.lcId)&&void 0!==r?r:"",lcApi:null!==(s=t.lcApi)&&void 0!==s?s:""})];case 1:return u=i.sent(),d=u.firebase_config,l=u.user_id,p=u.user_name,h=u.chat_delay,v=u.chat_character_limit,(0,c.isEmpty)(d)?(w("Failed to fetch config"),D(null),[2]):(function(e,t,n){if(e&&t&&n)try{var r=(0,_.N8)(e),o=(0,_.iH)(r,"/LiveViewData/".concat(t,"/").concat(n));(0,_.t8)(o,!0)}catch(x){console.log("failed to add user to live view data",x)}}(g=(0,m.G5)(d),t.recording_schedule,l),function(e,t){if(e&&t)try{var n=(0,_.N8)(e),r=(0,_.iH)(n,"/videoStatus/".concat(t));(0,_.jM)(r,(function(e){V("0"==e.val())}))}catch(x){console.log("failed to handle class ended check",x)}}(g,t.recording_schedule),D(g),N((0,a.Z)((0,o.Z)({},e),{userid:String(e.user_id),userId:String(e.user_id),name:p})),L({chatDelay:h>0?"1":"0",chatCharacterLimit:null!==v&&void 0!==v?v:100}),[3,4]);case 2:return x=i.sent(),w(x.message),D(null),[3,4];case 3:return n(!1),[7];case 4:return[2]}}
1))}));return function(t,n){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){var e=function(e){try{var t=e.data,r=t.type,o=t.data;if(r===p.Rv.CHAT_DETAILS){var a=o.chat_status,i=o.recording_schedule,s=o.video_id,c=o.user_name,u=o.user_id,d=o.lcApi,f=o.lcId,g=o.token,m=o.course_id,_=o.ytflag,x=o.folder_wise_course,y=o.default_chat_mode,b=void 0===y?1:y,C=o.base_url,P=o.enable_handraise,k={chat_status:a,ytFlagWeb:_,recording_schedule:i,video_id:s},M={name:c,userid:u,token:g,base_url:C},O=!!f,Z=O?(0,h.NA)(d):"";if(Z)try{Z.startsWith("http")||(Z="https://".concat(Z)),Z=new URL(Z).host}catch(R){console.log("failed to get host from lcApiUrl",R)}var E={item_id:O?f:m,item_type:O?"11":(0,v.hb)(x)?"10":"1",lcId:O?f:"",lcApi:Z,enableHandraise:P,defaultChatMode:"1"==b?p.MV.ALL.value:p.MV.SELF.value};w(""),j(k),N(M),A(E),z(M,E)}}catch(D){n(!1),console.log("failed to handle client message"),w(D.message),l.A.error(D.message)}};return window.addEventListener("message",e),function(){window.removeEventListener("message",e),function(e,t,n){if(e&&t&&n&&!H)try{var r=(0,_.N8)(e),o=(0,_.iH)(r,"/LiveViewData/".concat(t,"/").concat(n));(0,_.t8)(o,null)}catch(a){console.log("failed to remove user from live view data",a)}}(R,M.recording_schedule,Z.userid)}}),[]),(0,d.useEffect)((function(){var e=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(e){return""==M.recording_schedule||H||(0,x.Hf)(Z.base_url,M.recording_schedule),[2]}))}));return function(t){return e.apply(this,arguments)}}();return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}),[M,Z,H]),H?(0,s.jsx)("div",{className:"h-screen w-screen flex items-center justify-center",children:(0,s.jsx)("div",{className:"text-xl",children:"Session has ended"})}):t?(0,s.jsxs)("div",{className:"flex items-center justify-center h-screen w-full",children:[(0,s.jsx)("span",{className:"sr-only",children:"Loading..."}),(0,s.jsx)(u.Z,{className:"animate-spin h-8 w-8 text-primary"})]}):b?(0,s.jsx)("div",{className:"h-screen w-screen flex items-center justify-center",children:(0,s.jsx)("div",{className:"text-xl",children:b})}):(0,s.jsx)("div",{id:"hlsplayerwithchat",className:"bg-background h-screen w-screen",children:(0,s.jsx)("div",{id:"chatContainer",className:"bg-background h-screen w-screen",children:(0,s.jsx)(g.Z,{chatConfig:I,defaultChatMode:M.defaultChatMode,video:P,firebase:R,currentUser:Z,disableHandraise:!(0,v.hb)(null===M||void 0===M?void 0:M.enableHandraise)})})})}y.getInitialProps=function(){var e=(0,r.Z)((function(e){var t;return(0,i.__generator)(this,(function(n){return t=e.query,[2,(0,o.Z)({},t)]}))}));return function(t){return e.apply(this,arguments)}}(),y.layout=function(e){var t=e.children;return(0,s.jsx)("div",{children:t})},y.layoutTagmango=function(e){var t=e.children;return(0,s.jsx)("div",{children:t})}},86419:function(e,t,n){"use strict";n.d(t,{VY:function(){return Y},ee:function(){return U},fC:function(){return T},h_:function(){return W},xz:function(){return q}});var r=n(67294),o=n(36206),a=n(28771),i=n(25360),s=n(90667),c=n(27552),u=n(95420),d=n(91276),l=n(94047),f=n(42651),p=n(29115),h=n(75320),v=n(88426),g=n(69939),m=n(23541),_=n(71930),x=n(85893),y=Object.defineProperty,b=(e,t)=>y(e,"name",{value:t,configurable:!0}),w="Popover",[C,P]=(0,i.b)(w,[l.D7]),j=(0,l.D7)(),[k,M]=C(w),A=b((e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:a,onOpenChange:i,modal:s=!1}=e,c=j(t),u=r.useRef(null),[f,p]=r.useState(!1),[h,v]=(0,g.T)({prop:o,defaultProp:a??!1,onChange:i,caller:w});return(0,x.jsx)(l.fC,{...c,children:(0,x.jsx)(k,{scope:t,contentId:(0,d.M)(),triggerRef:u,open:h,onOpenChange:v,onOpenToggle:r.useCallback((()=>v((e=>!e))),[v]),hasCustomAnchor:f,onCustomAnchorAdd:r.useCallback((()=>p(!0)),[]),onCustomAnchorRemove:r.useCallback((()=>p(!1)),[]),modal:s,children:n})})}),"Popover"),O=r.forwardRef(b((function(e,t){const{__scopePopover:n,...o}=e,a=M("PopoverAnchor",n),i=j(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=a;return r.useEffect((()=>(s(),()=>c())),[s,c]),(0,x.jsx)(l.ee,{...i,...o,ref:t})}),"PopoverAnchor")),Z=r.forwardRef(b((function(e,t){const{__scopePopover:n,...r}=e,i=M("PopoverTrigger",n),s=j(n),c=(0,a.e)(t,i.triggerRef),u=(0,x.jsx)(h.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":z(i.open),...r,ref:c,onClick:(0,o.Mj)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,x.jsx)(l.ee,{asChild:!0,...s,children:u})}),"PopoverTrigger")),N="PopoverPortal",[E,R]=C(N,{forceMount:void 0}),D=b((e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=M(N,t);return(0,x.jsx)(E,{scope:t,forceMount:n,children:(0,x.jsx)(p.z,{present:n||a.open,children:(0,x.jsx)(f.h,{asChild:!0,container:o,children:r})})})}),"PopoverPortal"),F="PopoverContent",I=r.forwardRef(b((function(e,t){const n=R(F,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=M(F,e.__scopePopover);return(0,x.jsx)(p.z,{present:r||a.open,children:a.modal?(0,x.jsx)(S,{...o,ref:t}):(0,x.jsx)(H,{...o,ref:t})})}),"PopoverContent")),L=(0,v.Z8)("PopoverContent.RemoveScroll"),S=r.forwardRef(b((function(e,t){const n=M(F,e.__scopePopover),i=r.useRef(null),s=(0,a.e)(t,i),c=r.useRef(!1);return r.useEffect((()=>{const e=i.current;if(e)return(0,m.Ry)(e)}),[]),(0,x.jsx)(_.Z,{as:L,allowPinchZoom:!0,children:(0,x.jsx)(V,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.Mj)(e.onCloseAutoFocus,(e=>{e.preventDefault(),c.current||n.triggerRef.current?.focus()})),onPointerDownOutside:(0,o.Mj)(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;c.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:(0,o.Mj)(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})}),"PopoverContentModal")),H=r.forwardRef(b((function(e,t){const n=M(F,e.__scopePopover),o=r.useRef(!1),a=r.useRef(!1);return(0,x.jsx)(V,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||n.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const r=t.target,i=n.triggerRef.current?.contains(r);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),"PopoverContentNonModal")),V=r.forwardRef(b((function(e,t){const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,...v}=e,g=M(F,n),m=j(n);return(0,c.EW)(),(0,x.jsx)(u.M,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,x.jsx)(s.XB,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:h,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,x.jsx)(l.VY,{"data-state":z(g.open),role:"dialog",id:g.contentId,...m,...v,ref:t,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),"PopoverContentImpl"));function z(e){return e?"open":"closed"}b(z,"getState");var T=A,U=O,q=Z,W=D,Y=I}},function(e){e.O(0,[4288,7340,9756,9774,2888,179],(function(){return t=90495,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.