1"use strict";(self.rspackChunkcircle=self.rspackChunkcircle||[]).push([[1479],{130449(e,t,r){var i=r(391426),n=r(570310),l=r(417980),o=r(288513),s=function(e){var t=e.iconUrl,r=e.name,s=e.className,a=e.imageClassName,c=e.variant,d="outlined-sm"===(void 0===c?"default":c);return(0,i.jsx)("div",{className:(0,n.x)((0,o.W2)("brand-icon"),"outline-none",{"h-[30px] w-[30px] rounded-lg border border-primary bg-primary shadow-2xs":d,"!h-8 !w-8 !rounded-md":!d},void 0===s?"":s),children:(0,i.jsx)("img",{loading:"eager",className:(0,n.x)({"h-[30px] w-[30px] rounded-lg object-cover":d,"!h-8 !w-8 !max-h-8 !max-w-8 rounded-md":!d},void 0===a?"":a),alt:(0,l.t)("community_logo_alt",{community_name:r}),src:t})})};r.d(t,{M:()=>s})},734095(e,t,r){var i=r(391426),n=r(570310),l=r(417980),o=r(288513),s=function(e){var t=e.logoURL,r=e.name,s=e.imageClassName,a=e.variant,c="outlined-sm"===(void 0===a?"default":a);return(0,i.jsx)("div",{className:(0,n.x)((0,o.W2)("community__logo"),{"h-[30px] w-[30px] rounded-lg border border-primary bg-primary shadow-2xs":c}),children:(0,i.jsx)("img",{loading:"eager",alt:(0,l.t)("community_logo_alt",{community_name:r}),src:t,className:(0,n.x)({"h-[30px] w-[30px] rounded-lg object-cover":c},void 0===s?"":s)})})};r.d(t,{A:()=>s})},884028(e,t,r){r.r(t),r.d(t,{component:()=>eu});var i=r(391426),n=r(655726),l=r(230763),o=r(693410),s=r(451430),a=r(933578),c=r(717526),d=r(746523),u=r(677727),m=r(417980),p=r(660308),x=function(e){var t=e.onClick;return(0,i.jsx)(p.M.IconButton,{icon:"16-info",tooltipText:(0,m.t)("live_streams.room.button_tooltips.stream.info"),onClick:t})},v=r(248638),f=r(390753),h=function(){var e=(0,f.tX)().leaveStream,t=(0,v.f)({title:(0,m.t)("live_streams.pre_join.stream.hang_up_confirmation"),onConfirm:e}),r=t.confirmModal,n=t.onConfirmButtonClick;return(0,i.jsxs)(i.Fragment,{children:[r,(0,i.jsx)(p.M.Button,{"aria-label":(0,m.t)("live_streams.room.button_tooltips.leave"),onClick:n,icon:"live-leave",label:(0,m.t)("live_streams.room.leave")})]})},g=r(83080),b=function(e){var t=e.room,r=(0,f.tX)(),n=r.toggleChatSidebar,l=r.toggleParticipantsSidebar,o=(0,f.cX)().sidebarView,s=!!o,a=o===f.AG.CHAT,c=(0,g.uf)().activeCount,d=(0,g.$R)({refetchInterval:3e4}).count,u=!!(null==t?void 0:t.hide_participants_list),x=!!(null==t?void 0:t.chat_disabled);return(0,i.jsxs)(p.M,{autoHide:!1,children:[(0,i.jsx)(p.M.Group,{children:(0,i.jsx)(p.M.Item,{})}),(0,i.jsxs)(p.M.Group,{children:[!x&&(0,i.jsx)(p.M.Button,{icon:"live-chat",tooltipText:(0,m.t)("live_streams.room.button_tooltips.chat"),"aria-label":(0,m.t)("live_streams.room.button_tooltips.chat"),onClick:n,active:s&&a}),!u&&(0,i.jsx)(p.M.Button,{tooltipText:(0,m.t)("live_streams.room.button_tooltips.participants"),"aria-label":(0,m.t)("live_streams.room.button_tooltips.participants"),onClick:l,active:s&&!a,icon:"live-users",label:c+d})]}),(0,i.jsx)(p.M.Group,{children:(0,i.jsx)(h,{})})]})},j=r(702615),_=function(e){var t=e.room,r=(0,f.cX)(),n=r.isInfoBoxOpen,l=r.actions.toggleInfoBox,o=t.description;return(0,i.jsx)(j.c,{isOpen:n,title:(0,m.t)("live_streams.room_info.title"),onClose:l,onAction:l,actionVariant:"circle",actionText:(0,m.t)("live_streams.room_info.action"),children:(0,i.jsx)("div",{className:"min-h-[233px]",children:o&&(0,i.jsx)("div",{className:"text-dark pt-6",children:o})})})},y=r(173738),O=r(256483),w=r(298463),N=r(674251),C=r(441594),k=function(e){var t=e.buttonTextColor,r=(0,C.L)(),n=r.canSignIn,l=r.redirectToUrl;return n?(0,i.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3",children:[(0,i.jsx)(N.o.LabelSm,{as:"span",weight:"semibold",color:"text-disabled",children:(0,m.t)("public_live_stream.pre_join.already_a_member")}),(0,i.jsx)("button",{type:"button",onClick:l,className:"border-very-dark border-b",children:(0,i.jsx)(N.o.LabelSm,{as:"span",weight:"semibold",color:void 0===t?"text-live":t,children:(0,m.t)("public_live_stream.pre_join.login")})})]}):null},S=function(e){var t=e.room,r=e.hasLeftStream,n=(0,w.J)().goToCommunityRootPath,l=!r&&((0,o.pl)(t)||(0,o.wH)(t)),s=!r&&(0,o.iA)(t),a=!t;return(0,i.jsxs)(O.U,{children:[(0,i.jsxs)("div",{className:"flex flex-col items-center gap-6 text-live",children:[s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"text-3xl leading-tight",children:(0,m.t)("live_streams.public.landing.wave")}),(0,i.jsx)("div",{className:"text-live",children:(0,i.jsx)(N.o.TitleXl,{color:"text-inherit",children:null==t?void 0:t.name})}
1),(0,i.jsx)(N.o.BodyMd,{color:"text-gray-300",textAlign:"text-center",children:(0,m.t)("live_streams.public.landing.not_started")})]}),l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"text-3xl leading-tight",children:(0,m.t)("live_streams.public.landing.checkered_flag")}),(0,i.jsx)(N.o.TitleXl,{color:"text-inherit",children:(0,m.t)("live_streams.public.landing.left")}),(0,i.jsx)(N.o.BodyMd,{color:"text-gray-300",textAlign:"text-center",children:(0,m.t)("live_streams.public.landing.ended")})]}),r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"text-3xl leading-tight",children:(0,m.t)("live_streams.public.landing.hands_raised")}),(0,i.jsx)(N.o.TitleXl,{color:"text-white",children:(0,m.t)("live_streams.public.landing.left")})]}),a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"text-3xl leading-tight",children:(0,m.t)("live_streams.public.landing.disappointed")}),(0,i.jsx)(N.o.TitleXl,{color:"text-white",children:(0,m.t)("live_streams.public.landing.not_found_title")}),(0,i.jsx)(N.o.BodyMd,{color:"text-gray-300",textAlign:"text-center",children:(0,m.t)("live_streams.public.landing.not_found_description")})]}),(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsx)(y.Z,{onClick:n,children:(0,m.t)("live_streams.public.landing.back_to_community_button_label")})})]}),(0,i.jsx)(k,{})]})},P=function(){return(0,i.jsx)(O.U,{children:(0,i.jsxs)("div",{className:"flex max-w-lg flex-col items-center justify-center gap-6",children:[(0,i.jsx)("div",{className:"text-3xl leading-tight",children:(0,m.t)("live_streams.public.landing.disappointed")}),(0,i.jsx)("div",{className:"text-live",children:(0,i.jsx)(N.o.TitleXl,{color:"text-inherit",children:(0,m.t)("live_streams.public.landing.full_title")})}),(0,i.jsx)(N.o.BodyMd,{color:"text-gray-400",textAlign:"text-center",children:(0,m.t)("live_streams.public.landing.full_description")}),(0,i.jsx)(y.Z,{onClick:function(){window.location.reload()},children:(0,m.t)("retry")})]})})},T=r(257957),I=r(857213),M=r(973646),A=r(570310),E=r(898666),F=r(288513),B=function(e){var t,r,n=e.active,l=e.autoWidth,o=e.children,s=e.disabled,a=void 0!==s&&s,c=e.noMargin,d=e.onClick,u=e.tooltipPlacement,m=e.tooltipText,p=e.variant,x=void 0===p?"default":p,v=e.className,f=function(e,t){if(null==e)return{};var r,i,n,l={};if("u">typeof Reflect&&Reflect.ownKeys){for(r=Reflect.ownKeys(Object(e)),n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(l[i]=e[i]);return l}if(l=function(e,t){if(null==e)return{};var r,i,n={},l=Object.getOwnPropertyNames(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}(e,t),Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(e),n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(l[i]=e[i]);return l}(e,["active","autoWidth","children","disabled","noMargin","onClick","tooltipPlacement","tooltipText","variant","className"]);return(0,i.jsx)(E.$,{placement:void 0===u?"top":u,content:m,enabled:!!m&&!a,className:"inline-block",children:(0,i.jsx)("button",(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){var i;i=r[t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})}return e}({type:"button",disabled:a,className:(0,A.x)((0,F._h)("icon-button"),"mr-2 flex size-[38px] cursor-pointer items-center justify-center p-2 focus-visible:!outline-secondary focus-visible:!outline focus-visible:!outline-2 focus-visible:!outline-offset-2 [&_.icon]:size-6 [&>div]:flex",{"text-live hover:text-live-light":"default"===x,"light:text-dark light:hover:text-darkest dark:text-lightest dark:hover:text-light":"dark-background"===x,"flex !h-auto !w-auto gap-2 !px-4 !py-3":"labeled"===x,"!w-auto":void 0!==l&&l,"!mr-0":void 0!==c&&c,"bg-live-medium text-live-light rounded-md":void 0!==n&&n,"!cursor-not-allowed":a},void 0===v?"":v),onClick:function(e){!a&&d&&d(e)}},f),r=r={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}
1)(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))})},R=function(e){var t=e.onClick,r=void 0===t?s.noop:t,n=e.isFullscreen;return(0,i.jsx)("div",{className:"absolute right-7 top-7 z-10",children:(0,i.jsxs)(B,{tooltipText:(0,m.t)("live_streams.room.button_tooltips.fullscreen"),"aria-label":(0,m.t)("live_streams.room.button_tooltips.fullscreen"),tooltipPlacement:"left",onClick:r,noMargin:!0,children:[!n&&(0,i.jsx)(M.In,{type:"fullscreen",size:24}),n&&(0,i.jsx)(M.In,{type:"exit-fullscreen",size:24})]})})},X=function(){return!!document.fullscreenElement},L=function(){var e=(0,f.cX)(),t=e.isFullscreen,r=e.actions.setIsFullscreen,i=(0,a.useRef)(null);return(0,a.useEffect)(function(){var e=function(){r(X())};return document.addEventListener("fullscreenchange",e),function(){document.removeEventListener("fullscreenchange",e)}},[r]),{elementRef:i,toggleFullscreen:function(){var e=i.current;e&&(X()?document.exitFullscreen():e.requestFullscreen())},isFullscreen:t}},G=function(e){var t=e.hlsUrl,r=(0,f.cX)().isGuestPromptOpen,n=!t||r,l=L(),o=l.elementRef,s=l.toggleFullscreen,a=l.isFullscreen;return(0,i.jsxs)("div",{ref:o,className:"group relative size-full",onDoubleClick:s,children:[!n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"opacity-0 transition-opacity group-hover:opacity-100",children:(0,i.jsx)(R,{onClick:s,isFullscreen:a})}),(0,i.jsx)(I.q,{url:t})]}),n&&(0,i.jsx)(T.a,{className:"absolute flex size-full justify-center align-middle"})]})},q=r(927561),z=r(387099),H=function(e){var t=e.isOpen,r=(0,f.tX)(),n=r.setGuestName,l=r.setIsGuestPromptOpen,o=(0,f.cX)().guest.name;return(0,i.jsxs)(j.c,{size:"sm",title:(0,m.t)("public_live_stream.pre_join.join_stream_title"),isOpen:t,contentPortalId:"prejoin-modal",modalBodyClassName:"mb-6",children:[(0,i.jsxs)(q.l,{onSubmit:function(e){n(e.name),l(!1)},defaultValues:{name:o},className:"w-full",children:[(0,i.jsx)(q.l.Item,{hideDescription:!0,hideBorder:!0,fullWidth:!0,hideLabel:!0,name:"name",placeholder:(0,m.t)("public_live_stream.pre_join.your_name"),rules:{required:(0,m.t)("messaging.validations.room_name_required"),maxLength:{value:80,message:(0,m.t)("messaging.validations.room_name_max_length")}},children:(0,i.jsx)(q.l.Input,{autoFocus:!0})}),(0,i.jsx)(z.$,{full:!0,large:!0,className:"my-4",variant:"circle",children:(0,m.t)("public_live_stream.pre_join.join_stream")})]}),(0,i.jsx)("div",{className:"mt-3 text-center",children:(0,i.jsx)(k,{buttonTextColor:"text-dark"})})]})},D=r(858884),U=r(915779),V=r(355104),$=r(647976),W=r(568316),K=function(e){var t=e.title,r=e.onClick;return(0,i.jsxs)("div",{className:"border-primary flex h-16 items-center justify-between border-b px-6 py-5",children:[(0,i.jsx)(W.o.TitleSm,{weight:"semibold",children:t}),(0,i.jsx)("button",{type:"submit",onClick:r,"aria-label":(0,m.t)("live_streams.room.close_sidebar_button_aria_label"),children:(0,i.jsx)(M.In,{type:"20-close-md"})})]})},Z=r(999930),J=r(665146),Y=function(e){var t=e.title,r=e.onClick;return(0,i.jsxs)("div",{className:"border-primary flex h-14 items-center justify-between border-b px-6 py-3",children:[(0,i.jsx)(J.o5,{variant:"heading-md",children:t}),(0,i.jsx)(Z.K,{icon:"cross",variant:"ghost","aria-label":(0,m.t)("live_streams.room.close_sidebar_button_aria_label"),onClick:r})]})},Q=r(426075);function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}var et=function(e){var t,r=e.activeParticipants,i=void 0===r?[]:r,n=(0,g.Ss)().room,l=i.find(function(e){return"host"===e.role&&e.id===(null==n?void 0:n.created_by_id)}),o=i.filter(function(e){return"host"===e.role&&e.id!==(null==n?void 0:n.created_by_id)}),a=(0,s.groupBy)(i,"role"),c={moderators:l?[l].concat(function(e){if(Array.isArray(e))return ee(e)}(t=a.moderator||[])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return ee(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ee(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):a.moderator||[],cohosts:o,participants:a.hlsspectator||[]};return{host:l,participantsGroup:c||{}}},er=r(818724),ei=r(90604),en=function(e){var t=e.participant,r=e.host;if(!t)return null;var n=t.name,l=t.avatar_url,s=t.id,a=t.role;return a===o.hq.HOST&&(null==r?void 0:r.id)!==s&&(a=o.hq.COHOST),(0,i.jsxs)("div",{className:"mx-3 flex items-center justify-start rounded-md px-3 py-2",children:[(0,i.jsx)("div",{className:"relative mr-4 size-10",children:(0,i.jsx)(er.t,{name:n,src:l,size:"sm"})}),(0,i.jsxs)("div",{className:"text-darkest mr-2 truncate font-medium",children:[n,!!a&&(0,i.jsx)(ei.i,{role:a})]})]})},el=function(){var e=(0,g.uf)(),t=e.activeParticipants,r=e.isLoading,n=et({activeParticipants:t}),l=n.host,o=n.participantsGroup,c=(0,g.$R)().guests,d=[{group:o.moderators,title:(0,m.t)("live_roles.moderators")},{group:o.cohosts,title:(0,m.t)("live_roles.cohosts")},{group:o.participants,title:(0,m.t)("live_roles.participants")}
1,{group:c,title:(0,m.t)("live_roles.guests")}];return r?(0,i.jsx)(T.a,{center:!0}):(0,i.jsx)("div",{className:"mt-2 flex grow flex-col items-stretch justify-start overflow-auto",children:d.map(function(e){var t=e.group,r=e.title;return(0,s.isEmpty)(t)?null:(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(Q.R,{title:r}),t.map(function(e){return(0,i.jsx)(en,{participant:e,host:l},"participant-".concat(r,"-").concat(e.id))})]},"participant-group-".concat(r))})})},eo=r(888191),es=r(524089),ea=function(e){var t=e.participant,r=e.host;if(!t)return null;var n=t.name,l=t.avatar_url,s=t.id,a=t.role,c=a===o.hq.HOST&&(null==r?void 0:r.id)===s,d=a===o.hq.MODERATOR,u=a===o.hq.HOST&&(null==r?void 0:r.id)!==s,m=c?o.hq.HOST:d?o.hq.MODERATOR:u?o.hq.COHOST:null;return(0,i.jsxs)("div",{className:"mx-3 flex items-center justify-start px-3 py-2 gap-x-2",children:[(0,i.jsx)(es.t,{name:n,src:l,size:"md"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-x-1",children:[(0,i.jsx)(J.o5,{variant:"body-sm",truncate:!0,children:n}),(0,i.jsx)(eo.p,{role:m})]})]})},ec=function(){var e=(0,g.uf)(),t=e.activeParticipants,r=e.isLoading,n=et({activeParticipants:t}),l=n.host,o=n.participantsGroup,c=(0,g.$R)().guests,d=[{group:o.moderators,title:(0,m.t)("live_roles.moderators")},{group:o.cohosts,title:(0,m.t)("live_roles.cohosts")},{group:o.participants,title:(0,m.t)("live_roles.participants")},{group:c,title:(0,m.t)("live_roles.guests")}];return r?(0,i.jsx)(T.a,{center:!0}):(0,i.jsx)("div",{className:"mt-2 flex grow flex-col items-stretch justify-start overflow-auto",children:d.map(function(e){var t=e.group,r=e.title;return(0,s.isEmpty)(t)?null:(0,i.jsx)(a.Fragment,{children:t.map(function(e){return(0,i.jsx)(ea,{participant:e,host:l},"participant-".concat(r,"-").concat(e.id))})},"participant-group-".concat(r))})})},ed=function(e){var t=e.room,r=(0,f.tX)().hideSidebar,n=(0,f.cX)().sidebarView,l=n===f.AG.CHAT,o=(0,D.N)(),s=(0,V.c)().isCircleV4,a=!!(null==t?void 0:t.chat_disabled),c=l&&!a;return(0,i.jsxs)("div",{className:(0,A.x)("border-primary bg-primary my-4 mr-4 flex w-96 shrink-0 flex-col items-stretch rounded-md border-l",{"rounded-xl border":s,hidden:!n}),children:[(0,i.jsx)(s?Y:K,{title:(0,m.t)(c?"live_streams.room.chat":"live_streams.room.participants"),onClick:r}),c?(0,i.jsx)($.r,{getMessagesEndpoint:function(e){var t=e.params;return U.xV.rooms.messages.index({slug:o||"",params:void 0===t?{}:t})},getParticipantsEndpoint:function(e){var t=e.params;return U.xV.rooms.participants.index({slug:o||"",params:void 0===t?{}:t})},roomSlug:o}):(0,i.jsx)(s?ec:el,{})]})},eu=function(){(0,g.dV)();var e=(0,l.Od)(),t=e.currentCommunityMember,r=e.isLoading,m=(0,g.Ss)(),p=m.room,v=m.isLoading,h=m.isError,j=m.error,y=(0,f.cX)(),O=y.hasLeftStream,w=y.isGuestPromptOpen,N=y.isInfoBoxOpen,C=y.actions,k=C.setGuestName,T=C.toggleInfoBox,I=v||r,M=!(0,o.DG)(p)||!p||O,A=h&&(null==j?void 0:j.status)===403;if((0,a.useEffect)(function(){r||(0,s.isEmpty)(t)||k((null==t?void 0:t.name)||"")},[r,t,k]),I)return(0,i.jsx)("div",{className:"bg-primary absolute",children:(0,i.jsx)(u.I,{})});if(A)return(0,i.jsx)(P,{});if(M)return(0,i.jsx)(S,{room:p,hasLeftStream:O});var E=(null==p?void 0:p.description)?(0,i.jsx)(x,{onClick:T}):null;return(0,i.jsx)(c.t,{defaultOptions:{placement:"top"},children:(0,i.jsxs)(n.$,{title:p.name,bodyClassNames:"overflow-hidden",children:[(0,i.jsxs)("div",{className:"bg-live flex h-screen w-screen",children:[(0,i.jsxs)("div",{className:"flex grow flex-col",children:[(0,i.jsx)(d.Y,{room:p,infoButton:E,isPublic:!0}),(0,i.jsxs)("div",{className:"relative grow px-6",children:[(0,i.jsx)(G,{hlsUrl:p.hls_url}),N&&(0,i.jsx)(_,{room:p})]}),(0,i.jsx)(b,{room:p})]}),(0,i.jsx)(ed,{room:p})]}),w&&(0,i.jsx)(H,{isOpen:w})]})})}}}]); 2//# sourceMappingURL=/packs/js/1479-0fba510fb9726d9a.chunk.js.map
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.