PageSourceSearch

https://webinar.gg/assets/layout1-DNIgBc6h.js

js webinar.gg collected 2026-10-04 13:49:56 UTC 16,484 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-query-BgfFx4gZ.js";import{b4 as s,f as r,u as a,y as t,a as i,bb as n,bc as o,bd as l,be as d,c,bf as m,a2 as h,B as x,I as u,bg as p,bh as f,h as g,bi as j,bj as b,bk as v,z as y,g as w,bl as N}from"./index-CMQCNUjM.js";import{f as C,u as k,r as S,L as O,O as $}from"./vendor-react-Bd4b23er.js";import{A,a as P,b as E}from"./avatar-5C5W7ZVq.js";import{s as z,g as L}from"./get-browser-timezone-LhZFXdhG.js";import{P as T,a as R,b as W}from"./popover-CbI5MfJ7.js";import{T as I,a as D,b as F,c as M}from"./tooltip-DAmWRPs9.js";import{S as _}from"./switch-ZzU0u9S6.js";import{W as q,Y as B,F as U,Z as V,L as H,V as K,r as Y,e as Z,_ as G,n as J}from"./vendor-ui-IBV4yzoM.js";import"./vendor-zustand-B2xOjIeg.js";function Q(e,a="Something went wrong. Please try again."){if(s(e)){const s=e.response?.data;if("string"==typeof s&&s.trim())return s.trim();if(s&&"object"==typeof s){const e=s;if("string"==typeof e.message&&e.message.trim())return e.message.trim();if("string"==typeof e.error&&e.error.trim())return e.error.trim()}if("string"==typeof e.message&&e.message.trim())return e.message.trim()}return e instanceof Error&&e.message.trim()?e.message.trim():r.isAxiosError(e)&&"ERR_NETWORK"===e.code?"Could not reach the server. Check your connection and try again.":a}const X={Dashboard:"common:buttons.dashboard",Webinars:"nav.webinars",Recordings:"nav.recordings",Attachments:"nav.attachments",Files:"nav.files","Offer cards":"nav.offerCards","Support Chat":"nav.supportChat",Profile:"nav.profile",Create:"nav.create",Live:"nav.live",Upcoming:"nav.upcoming",Previous:"nav.previous",More:"nav.more"};function ee(e,s){const r=X[e];return r?s(r):e}function se({isMobile:s=!1}){const{t:$}=a("dashboard"),X=C(),{user:se}=t(e=>e),{toast:re}=i(),ae=k(),[te,ie]=S.useState(new Set),[ne,oe]=S.useState(!1),[le,de]=S.useState(!1),[ce,me]=S.useState(!1),[he,xe]=S.useState(!1),[ue,pe]=S.useState(""),[fe,ge]=S.useState(!1),[je,be]=S.useState(!1),ve=async()=>{try{await y(),ae("/",{replace:!0})}catch(e){return re({title:$("sidebar.logoutFailed"),variant:"destructive"})}},ye=e=>X.pathname.includes(e),we=(e,s)=>s&&s.length>0?s.some(e=>ye(e.href)):ye(e),Ne=()=>n.map(e=>"Webinars"===e.name?{...e,children:o}:"Attachments"===e.name?{...e,children:l}:e).filter(e=>"Support Chat"!==e.name||Boolean(se?.isPremium));S.useEffect(()=>{ie(e=>{const s=new Set(e);let r=!1;for(const a of n){const e="Webinars"===a.name?o:"Attachments"===a.name?l:null;e?.some(e=>X.pathname.includes(e.href))&&!s.has(a.id)&&(s.add(a.id),r=!0)}return r?s:e})},[X.pathname]);const Ce=async()=>{if(!je){be(!0);try{const e=`${se?.firstname??""} ${se?.lastname??""}`.trim(),s=$("sidebar.defaultTitle",{name:e}).trim(),a=ue.trim()||s;if(a.length<3)return void re({variant:"destructive",title:$("sidebar.titleTooShort")});const t=z(a);if("error"in t)return void re({variant:"destructive",title:t.error});const i={title:t.title,startImmediately:!0,dateTime:(new Date).toISOString(),timezone:L(),authentication:!1,provider:"streamos",producer:"daily",passcode:"",requireLogin:!1,showLiveUsersCount:!1,requireApproval:!1,recordingEnabled:!se?.recordingOverride&&fe,recordingVisibility:"public",watermarkEnabled:!1,isPreRecorded:!1,preRecordedVideoId:null},n=await r.post(`${w}/api/webinar`,i,{withCredentials:!0}),o=n.data.id;if(!o)return void re({variant:"destructive",title:n.data.message||$("sidebar.startFailed")});xe(!1),pe(""),ge(!1),ae(`/webinar-page/${o}`,{state:{showInviteModal:!0,webinarTitle:a}})}catch(s){const a=r.isAxiosError(s)?s.response?.data?.error:void 0,t=r.isAxiosError(s)?s.response?.data?.licenseCount??1:1;re("CONCURRENT_LIMIT_REACHED"===a?{variant:"destructive",title:$("sidebar.concurrentLimit"),description:Q(s,$("sidebar.concurrentLimitDescription",{count:t})),action:e.jsx(N,{altText:$("sidebar.buyLicense"),onClick:()=>ae("/billing/billing-management"),children:$("sidebar.buyLicense")})}:{variant:"destructive",title:$("sidebar.startFailedTitle"),description:Q(s,$("sidebar.tryAgain"))})}finally{be(!1)}}};if(s){const s=Ne().filter(e=>d.slice(0,3).some(s=>s.id===e.id)),r=d.slice(3).filter(e=>"Support Chat"!==e.name||Boolean(se?.isPremium)),a=({id:s,name:r,icon:a,href:t,children:i,open:n,onOpenChange:o})=>{const l=we(t,i);return e.jsxs(T,{open:n,onOpenChange:o,children:[e.jsx(R,{asChild:!0,children:e.jsxs("button",{className:c("flex flex-col items-center gap-1 p-3 rounded-2xl transition-all duration-300 w-full relative overflow-hidden flex-1",l?"bg-primary text-white shadow-lg shadow-primary/25":"text-secondary-foreground hover:bg-secondary hover:text-primary"),children:[e.jsx(a,{className:c("w-5 h-5 shrink-0 transition-all duration-200",l?"text-white":"text-secondary-foreground")}),e.jsx("span",{className:c("text-xs font-medium transition-all duration-200",l?"text-white":"text-secondary-foreground"),children:ee(r,$)}),l&&e.jsx("div",{className:"absolute top-1 left-1/2 -translate-x-1/2 w-6 h-1 bg-white rounded-full"})]})}),e.jsx(W,{className:"w-48 p-2",align:"center",side:"top",sideOffset:8,children:e.jsx("div",{className:"flex flex-col gap-1",children:i.map(s=>{const a=s.icon;return e.jsxs(O,{to:s.href,onClick:()=>o(!1),className:c("flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium transition-colors",ye(s.href)?"bg-primary text-white":"text-secondary-foreground hover:bg-secondary hover:text-primary"),children:[a&&e.jsx(a,{className:"w-3.5 h-3.5 shrink-0"}),ee(s.name,$)]},`${r}-child-${s.id}`)})})})]},`popover-${s}`)};return e.jsx("aside",{className:"w-full bg-white/75 backdrop-blur-sm h-fit border-t",children:e.jsxs("div",{className:"flex justify-center w-full items-center gap-1 p-2",children:[s.map(({id:s,name:r,icon:t,href:i})=>{if("Webinars"===r)return a({id:s,name:r,icon:t,href:i,children:o,open:ne,onOpenChange:oe});if("Attachments"===r)return a({id:s,name:r,icon:t,href:i,children:l,open:le,onOpenChange:de});const n=ye(i);return e.jsx(O,{to:i,className:"flex-1",children:e.jsxs("button",{className:c("flex flex-col items-center gap-1 p-3 rounded-2xl transition-all duration-300 w-full relative overflow-hidden",n?"bg-primary text-white shadow-lg shadow-primary/25":"text-secondary-foreground hover:bg-secondary hover:text-primary"),children:[e.jsx(t,{className:c("w-5 h-5 shrink-0 transition-all duration-200",n?"text-white":"text-secondary-foreground")}),e.jsx("span",{className:c("text-xs font-medium transition-all duration-200",n?"text-white":"text-secondary-foreground"),children:ee(r,$)}),n&&e.jsx("div",{className:"absolute top-1 left-1/2 -translate-x-1/2 w-6 h-1 bg-white rounded-full"})]})},`nav-item-${s}`)}),r.length>0&&e.jsxs(T,{open:ce,onOpenChange:me,children:[e.jsx(R,{asChild:!0,children:e.jsxs("button",{className:c("flex flex-col items-center gap-1 p-3 rounded-2xl transition-all duration-300 w-full relative overflow-hidden flex-1",r.some(e=>"Attachments"===e.name?l.some(e=>ye(e.href)):ye(e.href))?"bg-primary text-white shadow-lg shadow-primary/25":"text-secondary-foreground hover:bg-secondary hover:text-primary"),children:[e.jsx(q,{className:c("w-5 h-5 shrink-0 transition-all duration-200",r.some(e=>"Attachments"===e.name?l.some(e=>ye(e.href)):ye(e.href))?"text-white":"text-secondary-foreground")}),e.jsx("span",{className:c("text-xs font-medium transition-all duration-200",r.some(e=>"Attachments"===e.name?l.some(e=>ye(e.href)):ye(e.href))?"text-white":"text-secondary-foreground"),children:$("nav.more")})]})}),e.jsx(W,{className:"z-[60] w-56 p-2",align:"center",side:"top",sideOffset:8,children:e.jsxs("div",{className:"flex flex-col gap-1",children:[r.map(({id:s,name:r,icon:a,href:t})=>"Attachments"===r?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-semibold text-muted-foreground",children:[e.jsx(a,{className:"w-3.5 h-3.5 shrink-0"}),e.jsx("span",{children:ee(r,$)})]}),l.map(s=>{const r=s.icon;return e.jsxs(O,{to:s.href,onClick:()=>me(!1),className:c("flex items-center gap-2 px-3 py-2 pl-8 rounded-lg text-sm font-medium transition-colors",ye(s.href)?"bg-primary text-white":"text-secondary-foreground hover:bg-secondary hover:text-primary"),children:[e.jsx(r,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:ee(s.name,$)})]},`mobile-overflow-att-${s.id}`)})]},`mobile-overflow-${s}`):e.jsxs(O,{to:t,onClick:()=>me(!1),className:c("flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium transition-colors",ye(t)?"bg-primary text-white":"text-secondary-foreground hover:bg-secondary hover:text-primary"),children:[e.jsx(a,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:ee(r,$)})]},`mobile-overflow-${s}`)),se?.isPremium&&e.jsxs(O,{to:"/settings",onClick:()=>me(!1),className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium text-secondary-foreground hover:bg-secondary hover:text-primary transition-colors",children:[e.jsx(B,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:$("sidebar.integrations")})]}),e.jsxs(O,{to:"/terms-conditions",onClick:()=>me(!1),className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium text-secondary-foreground hover:bg-secondary hover:text-primary transition-colors",children:[e.jsx(U,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:$("sidebar.termsConditions")})]}),e.jsxs(O,{to:"/privacy-policy",onClick:()=>me(!1),className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium text-secondary-foreground hover:bg-secondary hover:text-primary transition-colors",children:[e.jsx(U,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:$("sidebar.privacyPolicy")})]}),e.jsx("div",{className:"my-1 h-px bg-border"}),e.jsx(m,{variant:"inline",className:"px-1 pb-1",onLanguageSelected:()=>me(!1)}),e.jsx("div",{className:"my-1 h-px bg-border"}),e.jsxs("button",{type:"button",onClick:()=>{me(!1),ve()},className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors",children:[e.jsx(V,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:$("sidebar.signOut")})]})]})})]})]})})}return e.jsx(e.Fragment,{children:e.jsxs("aside",{className:"bg-muted sticky top-0 hidden h-dvh w-14 flex-col overflow-y-auto overflow-x-hidden border-r md:flex lg:w-64 shadow-sm",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2 py-3 px-4 border-b justify-between",children:[e.jsx(h,{className:"w-6 h-6 shrink-0"}),se?.isPremium?e.jsxs(T,{open:he,onOpenChange:e=>{xe(e),e||(pe(""),ge(!1))},children:[e.jsx(I,{delayDuration:300,children:e.jsxs(D,{children:[e.jsx(F,{asChild:!0,children:e.jsx(R,{asChild:!0,children:e.jsx(x,{size:"sm",className:"max-w-[9.5rem] min-w-0 overflow-hidden",children:e.jsx("span",{className:"truncate",children:$("sidebar.instantWebinar")})})})}),e.jsx(M,{side:"bottom",className:"max-w-xs",children:$("sidebar.instantWebinar")})]})}),e.jsxs(W,{className:"w-72 p-4",align:"end",children:[e.jsx("p",{className:"text-sm font-semibold mb-3",children:$("sidebar.startAWebinar")}),e.jsx(u,{placeholder:`Webinar by ${se?.firstname??""} ${se?.lastname??""}`.trim(),value:ue,onChange:e=>pe(e.target.value),onKeyDown:e=>"Enter"===e.key&&Ce(),className:"mb-3",disabled:je}),!se?.recordingOverride&&e.jsx("div",{className:"mb-3 space-y-1",children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:$("sidebar.enableRecording")}),e.jsx(_,{checked:fe,onCheckedChange:ge,disabled:je})]})}),e.jsxs(x,{size:"sm",className:"w-full",onClick:Ce,disabled:je,children:[je?e.jsx(H,{className:"h-4 w-4 animate-spin mr-2"}):null,$("sidebar.startNow")]})]})]}):e.jsx(x,{size:"sm",onClick:()=>ae("/billing/billing-management"),variant:"premium",children:$("sidebar.upgrade")})]}),e.jsx("section",{className:"flex flex-col gap-2 w-full p-3 h-full",children:Ne().map(({id:s,name:r,icon:a,href:t,children:i})=>{const n=te.has(s),o=we(t,i),l=i&&i.length>0;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:c("flex items-center w-full px-3 py-3 rounded-xl transition-all duration-300 gap-2 relative group border cursor-pointer",o?"bg-secondary text-primary shadow shadow-primary/25 border-primary":"hover:bg-secondary hover:text-primary border-transparent"),onClick:()=>{l?(e=>{const s=new Set(te);s.has(e)?s.delete(e):s.add(e),ie(s)})(s):ae(t)},children:[o&&e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-primary rounded-r-full"}),e.jsx(a,{className:c("w-4 h-4 shrink-0 transition-all duration-200",o?"text-primary":"text-secondary-foreground")}),e.jsx("p",{className:c("text-sm font-medium truncate transition-all duration-200 flex-1",o?"text-primary":"text-secondary-foreground"),children:ee(r,$)}),l&&e.jsx("div",{className:"ml-auto",children:n?e.jsx(K,{className:"w-4 h-4 text-secondary-foreground transition-transform duration-200"}):e.jsx(Y,{className:"w-4 h-4 text-secondary-foreground transition-transform duration-200"})}),!l&&o&&e.jsx("div",{className:"ml-auto w-2 h-2 bg-primary rounded-full"})]}),l&&n&&e.jsx("div",{className:"mt-1 ml-6 space-y-1",children:i.map(s=>{const r=ye(s.href),a=s.icon;return e.jsxs(O,{to:s.href,className:c("flex items-center w-full px-3 py-2 rounded-lg transition-all duration-200 gap-2 text-sm relative",r?"bg-primary/10 text-primary font-medium":"text-secondary-foreground hover:bg-secondary/50 hover:text-primary"),children:[r&&e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-4 bg-primary rounded-r-full"}),a&&e.jsx(a,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:ee(s.name,$)}),r&&e.jsx("div",{className:"ml-auto w-1.5 h-1.5 bg-primary rounded-full"})]},`nav-child-item-${s.id}`)})})]},`nav-section-item-${s}`)})}),e.jsx("section",{className:"flex flex-col gap-2 w-full p-2 border-t items-center justify-center",children:e.jsx("div",{className:"rounded-2xl bg-white border w-full",children:e.jsxs(p,{modal:!1,children:[e.jsx(f,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-3 justify-between w-full min-w-0 p-3 rounded-2xl hover:bg-secondary transition-all duration-200",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsxs(A,{className:c("w-10 h-10 border rounded-xl",se?.isPremium&&"border-yellow-500"),children:[e.jsx(P,{src:se?.avatar||"",alt:`${se?.firstname}'s avatar`,className:"object-cover"}),e.jsx(E,{className:"text-sm font-semibold bg-primary/10 text-primary",children:(ke=`${se?.firstname} ${se?.lastname}`,ke.split(" ").map(e=>e[0]).join("")||"HI")})]}),se?.isPremium&&e.jsx(g,{variant:"premium",size:"icon",className:"absolute -top-2 -right-2",children:e.jsx(Z,{className:"w-2.5 h-2.5"})})]}),e.jsx("div",{className:"hidden lg:block text-left min-w-0",children:e.jsxs("p",{className:"text-xs font-medium text-secondary-foreground truncate max-w-full",children:[se?.firstname," ",se?.lastname]})})]}),e.jsx("div",{className:"hidden lg:block p-1 shrink-0",children:e.jsx(G,{className:"w-4 h-4"})})]})}),e.jsxs(j,{align:"end",className:"w-56 z-50",sideOffset:5,avoidCollisions:!0,children:[e.jsx(b,{children:e.jsxs(O,{to:"/profile",className:"flex items-center gap-3 w-full",children:[e.jsx(J,{className:"w-4 h-4"}),e.jsx("span",{children:$("sidebar.profileSettings")})]})}),se?.isPremium&&e.jsx(b,{children:e.jsxs(O,{to:"/settings",className:"flex items-center gap-3 w-full",children:[e.jsx(B,{className:"w-4 h-4"}),e.jsx("span",{children:$("sidebar.integrations")})]})}),e.jsx(b,{children:e.jsxs(O,{to:"/terms-conditions",className:"flex items-center gap-3 w-full",children:[e.jsx(U,{className:"w-4 h-4"}),e.jsx("span",{children:$("sidebar.termsConditions")})]})}),e.jsx(b,{children:e.jsxs(O,{to:"/privacy-policy",className:"flex items-center gap-3 w-full",children:[e.jsx(U,{className:"w-4 h-4"}),e.jsx("span",{children:$("sidebar.privacyPolicy")})]})}),e.jsx(v,{}),e.jsx(m,{variant:"submenu"}),e.jsx(v,{}),e.jsx(b,{onClick:ve,children:e.jsxs("div",{className:"flex items-center gap-3 w-full",children:[e.jsx(V,{className:"w-4 h-4"}),e.jsx("span",{children:$("sidebar.signOut")})]})})]})]})})})]})});var ke}function re(){return e.jsxs("div",{className:"flex flex-col lg:flex-row relative min-h-dvh",children:[e.jsx("div",{className:"hidden lg:flex",children:e.jsx(se,{})}),e.jsx("main",{className:"flex-1",children:e.jsx($,{})}),e.jsx("div",{className:"l
1g:hidden sticky bottom-0 z-50 mt-auto",children:e.jsx(se,{isMobile:!0})})]})}export{re as default};

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.