2 lines
47 KiB
JavaScript

(()=>{var a={};a.id=311,a.ids=[311],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3166:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/dashboard/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/dashboard/page.tsx","default")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20559:(a,b,c)=>{Promise.resolve().then(c.bind(c,92900))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},42378:(a,b,c)=>{"use strict";var d=c(91330);c.o(d,"usePathname")&&c.d(b,{usePathname:function(){return d.usePathname}}),c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}})},51074:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>J,handler:()=>L,pages:()=>I,routeModule:()=>K,tree:()=>H});var d=c(49754),e=c(9117),f=c(46595),g=c(32324),h=c(39326),i=c(38928),j=c(20175),k=c(12),l=c(54290),m=c(12696),n=c(82802),o=c(77533),p=c(45229),q=c(32822),r=c(261),s=c(26453),t=c(52474),u=c(26713),v=c(51356),w=c(62685),x=c(36225),y=c(63446),z=c(2762),A=c(45742),B=c(86439),C=c(81170),D=c.n(C),E=c(62506),F=c(91203),G={};for(let a in E)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(G[a]=()=>E[a]);c.d(b,G);let H={children:["",{children:["(protected)",{children:["dashboard",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,3166)),"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/dashboard/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,80454)),"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/layout.tsx"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,87028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,90461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,32768,23)),"next/dist/client/components/builtin/unauthorized.js"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,51472)),"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,81170,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,87028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,90461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,32768,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,I=["/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/dashboard/page.tsx"],J={require:c,loadChunk:()=>Promise.resolve()},K=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(protected)/dashboard/page",pathname:"/dashboard",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:H},distDir:".next",relativeProjectDir:""});async function L(a,b,d){var C;let G="/(protected)/dashboard/page";"/index"===G&&(G="/");let M=(0,h.getRequestMeta)(a,"postponed"),N=(0,h.getRequestMeta)(a,"minimalMode"),O=await K.prepare(a,b,{srcPage:G,multiZoneDraftMode:!1});if(!O)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:P,query:Q,params:R,parsedUrl:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,interceptionRoutePatterns:ae}=O,af=S.pathname||"/",ag=(0,r.normalizeAppPath)(G),{isOnDemandRevalidate:ah}=O,ai=K.match(af,$),aj=!!$.routes[aa],ak=!!(ai||aj||$.routes[ag]),al=a.headers["user-agent"]||"",am=(0,u.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[t.RSC_HEADER],aq=(0,s.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr)&&(null==(C=$.routes[ag]??$.dynamicRoutes[ag])?void 0:C.renderingMode)==="PARTIALLY_STATIC",as=!1,at=!1,au=ar?M:void 0,av=ar&&ap&&!ao,aw=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ax=!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots);an&&ar&&(ak=!1,ax=!1);let ay=!0===K.isDev||!ak||"string"==typeof M||av,az=an&&ar,aA=null;_||!ak||ay||aq||au||av||(aA=aa);let aB=aA;!aB&&K.isDev&&(aB=aa),K.isDev||_||!ak||!ap||av||(0,k.d)(a.headers);let aC={...E,tree:H,pages:I,GlobalError:D(),handler:L,routeModule:K,__next_app__:J};X&&Y&&(0,o.setReferenceManifestsSingleton)({page:G,clientReferenceManifest:Y,serverActionsManifest:X,serverModuleMap:(0,q.createServerModuleMap)({serverActionsManifest:X})});let aD=a.method||"GET",aE=(0,g.getTracer)(),aF=aE.getActiveScopeSpan();try{let f=K.getVaryHeader(aa,ae);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return K.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aE.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aD} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aD} ${a.url}`)})},m=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:Q,params:R,page:ag,sharedContext:{buildId:P},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aC,Component:(0,j.T)(aC),params:R,routeModule:K,page:G,postponed:f,shouldWaitOnAllReady:az,serveStreamingMetadata:ax,supportsDynamicResponse:"string"==typeof f||ay,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,serverActionsManifest:X,clientReferenceManifest:Y,setIsrStatus:null==ac?void 0:ac.setIsrStatus,dir:c(33873).join(process.cwd(),K.relativeProjectDir),isDraftMode:_,isRevalidate:ak&&!f&&!av,botType:am,isOnDemandRevalidate:ah,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,previewProps:$.preview,deploymentId:ad.deploymentId,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,devtoolSegmentExplorer:ad.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ad.experimental.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...as?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:as}:{},experimental:{isRoutePPREnabled:ar,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,cacheComponents:!!ad.experimental.cacheComponents,clientSegmentCache:!!ad.experimental.clientSegmentCache,clientParamParsing:!!ad.experimental.clientParamParsing,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[]},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>K.onRequestError(a,b,d,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:K.isDev}},l=await k(e,i),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[y.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,ak&&(null==n?void 0:n.revalidate)===0&&!K.isDev&&!ar){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},o=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===K.isDev,l=c||b.writableEnded;if(ah&&ab&&!f&&!N)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ai&&(j=(0,w.parseFallbackField)(ai.fallback)),j===w.FallbackMode.PRERENDER&&(0,u.isBot)(al)&&(!ar||an)&&(j=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ah=!0),ah&&(j!==w.FallbackMode.NOT_FOUND||f)&&(j=w.FallbackMode.BLOCKING_STATIC_RENDER),!N&&j!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aB&&!l&&!_&&T&&(k||!aj)){let b;if((k||ai)&&j===w.FallbackMode.NOT_FOUND)throw new B.NoFallbackError;if(ar&&!ap){let c="string"==typeof(null==ai?void 0:ai.fallback)?ai.fallback:k?ag:null;if(b=await K.handleResponse({cacheKey:c,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:ar,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||at?(0,n.u)(ag):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let o=ah||g||!au?void 0:au;if(as&&void 0!==o)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=T&&ar&&((0,h.getRequestMeta)(a,"renderFallbackShell")||at)?(0,n.u)(af):null;return m({span:i,postponed:o,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,n=await K.handleResponse({cacheKey:aA,responseGenerator:a=>o({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ah,isRoutePPREnabled:ar,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),K.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!n){if(aA)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof n.value.postponed;ak&&!av&&(!p||ao)&&(N||b.setHeader("x-nextjs-cache",ah?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=n;if(au)l={revalidate:0,expire:void 0};else if(N&&ap&&!ao&&ar)l={revalidate:0,expire:void 0};else if(!K.isDev)if(_)l={revalidate:0,expire:void 0};else if(ak){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:y.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(n.cacheControl=l,"string"==typeof aw&&(null==q?void 0:q.kind)===v.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];N&&ak&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(aw);return void 0!==d?(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...n,value:{...n.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&au)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(N&&ak||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(N&&ak&&s&&"string"==typeof s&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,s),!q.status||ap&&ar||(b.statusCode=q.status),!N&&q.status&&F.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),p&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:av?{revalidate:0,expire:void 0}:n.cacheControl})}return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.fromStatic(q.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let u=q.html;if(!p||N||ap)return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:n.cacheControl});if(as)return u.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:{revalidate:0,expire:void 0}});let w=new TransformStream;return u.push(w.readable),m({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(w.writable)}).catch(a=>{w.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:{revalidate:0,expire:void 0}})};if(!aF)return await aE.withPropagatedContext(a.headers,()=>aE.trace(i.BaseServerSpan.handleRequest,{spanName:`${aD} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aD,"http.target":a.url}},p));await p(aF)}catch(b){throw aF||b instanceof B.NoFallbackError||await K.onRequestError(a,b,{routerKind:"App Router",routePath:G,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:ak,isOnDemandRevalidate:ah})},ac),b}}},57201:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k});var d=c(21124),e=c(38301),f=c(3991),g=c.n(f),h=c(42378);function i({onToggleSidebar:a}){(0,h.usePathname)();let[b,c]=(0,e.useState)(""),[f,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1);return(0,d.jsx)("header",{className:"sticky top-0 z-40 bg-white dark:bg-[#0e1726] border-b border-[#e0e6ed] dark:border-[#191e3a] shadow-sm",children:(0,d.jsxs)("div",{className:"relative flex w-full items-center px-5 py-2.5",children:[(0,d.jsx)("div",{className:"horizontal-logo flex lg:hidden justify-between items-center ltr:mr-2 rtl:ml-2",children:(0,d.jsx)(g(),{href:"/",className:"main-logo flex items-center shrink-0",children:(0,d.jsx)("span",{className:"text-2xl font-semibold align-middle text-primary dark:text-white-light",children:"AvanzaCast"})})}),(0,d.jsx)("button",{type:"button",className:"collapse-icon flex-none dark:text-[#d0d2d6] hover:text-primary dark:hover:text-primary flex lg:hidden ltr:mr-2 rtl:ml-2 p-2 rounded-full bg-white-light/40 dark:bg-dark/40 hover:bg-white-light/90 dark:hover:bg-dark/60",onClick:a,children:(0,d.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{d:"M20 7L4 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M20 12L4 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{d:"M20 17L4 17",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),(0,d.jsx)("div",{className:"sm:ltr:mr-auto sm:rtl:ml-auto hidden sm:block",children:(0,d.jsx)("form",{className:"sm:relative absolute inset-x-0 sm:top-0 top-1/2 sm:translate-y-0 -translate-y-1/2 sm:mx-0 mx-4 z-10 sm:block hidden",action:"",method:"GET",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:"text",className:"form-input ltr:pl-9 rtl:pr-9 ltr:sm:pr-4 rtl:sm:pl-4 ltr:pr-9 rtl:pl-9 peer sm:bg-transparent bg-gray-100 placeholder:tracking-widest",placeholder:"Buscar...",value:b,onChange:a=>c(a.target.value)}),(0,d.jsx)("button",{type:"button",className:"absolute w-9 h-9 inset-0 ltr:right-auto rtl:left-auto appearance-none peer-focus:text-primary",children:(0,d.jsxs)("svg",{className:"mx-auto",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("circle",{cx:"11.5",cy:"11.5",r:"9.5",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.5"}),(0,d.jsx)("path",{d:"M18.5 18.5L22 22",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]})})}),(0,d.jsxs)("div",{className:"ltr:ml-auto rtl:mr-auto flex items-center space-x-1.5 lg:space-x-2 rtl:space-x-reverse dark:text-[#d0d2d6]",children:[(0,d.jsx)(g(),{href:"/studio",children:(0,d.jsx)("button",{className:"btn btn-gradient !mt-0 w-full border-0 uppercase shadow-[0_10px_20px_-10px_rgba(67,97,238,0.44)]",children:(0,d.jsxs)("span",{className:"flex items-center",children:[(0,d.jsx)("span",{className:"w-2 h-2 bg-white rounded-full animate-pulse ltr:mr-2 rtl:ml-2"}),"Ir en Vivo"]})})}),(0,d.jsx)("button",{type:"button",className:"flex items-center p-2 rounded-full bg-white-light/40 dark:bg-dark/40 hover:text-primary hover:bg-white-light/90 dark:hover:bg-dark/60",children:(0,d.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{d:"M12 2V4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{d:"M12 20V22",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{d:"M4 12L2 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{d:"M22 12L20 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M19.7778 4.22266L17.5558 6.25424",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M4.22217 4.22266L6.44418 6.25424",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M6.44434 17.5557L4.22211 19.7779",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M19.7778 19.7773L17.5558 17.5551",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("button",{type:"button",className:"relative flex items-center p-2 rounded-full bg-white-light/40 dark:bg-dark/40 hover:text-primary hover:bg-white-light/90 dark:hover:bg-dark/60",onClick:()=>i(!f),children:[(0,d.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{d:"M19.0001 9.7041V9C19.0001 5.13401 15.8661 2 12.0001 2C8.13407 2 5.00006 5.13401 5.00006 9V9.7041C5.00006 10.5491 4.74995 11.3752 4.28123 12.0783L3.13263 13.8012C2.08349 15.3749 2.88442 17.5139 4.70913 18.0116C9.48258 19.3134 14.5175 19.3134 19.291 18.0116C21.1157 17.5139 21.9166 15.3749 20.8675 13.8012L19.7189 12.0783C19.2502 11.3752 19.0001 10.5491 19.0001 9.7041Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{opacity:"0.5",d:"M7.5 19C8.15503 20.7478 9.92246 22 12 22C14.0775 22 15.845 20.7478 16.5 19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),(0,d.jsx)("span",{className:"absolute top-0 ltr:right-0 rtl:left-0 w-2 h-2 rounded-full bg-danger"})]}),f&&(0,d.jsxs)("div",{className:"absolute top-full ltr:right-0 rtl:left-0 mt-2 w-80 bg-white dark:bg-black rounded shadow-lg z-50 overflow-hidden",children:[(0,d.jsx)("div",{className:"px-4 py-3 border-b border-white-light dark:border-[#1b2e4b]",children:(0,d.jsx)("h5",{className:"font-semibold text-black dark:text-white-light",children:"Notificaciones"})}),(0,d.jsx)("div",{className:"p-4 text-center text-sm",children:"No hay notificaciones nuevas"})]})]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("button",{type:"button",className:"flex items-center space-x-2 p-2 rounded-full bg-white-light/40 dark:bg-dark/40 hover:text-primary hover:bg-white-light/90 dark:hover:bg-dark/60",onClick:()=>k(!j),children:[(0,d.jsx)("div",{className:"h-9 w-9 rounded-full bg-primary flex items-center justify-center text-white font-semibold",children:"U"}),(0,d.jsxs)("div",{className:"hidden md:block ltr:text-left rtl:text-right",children:[(0,d.jsx)("h4",{className:"text-xs font-semibold text-black dark:text-white-light",children:"Usuario"}),(0,d.jsx)("span",{className:"text-[10px] text-white-dark",children:"Free Plan"})]}),(0,d.jsx)("svg",{className:"h-4 w-4 shrink-0",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M19 9L12 15L5 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),j&&(0,d.jsx)("div",{className:"absolute top-full ltr:right-0 rtl:left-0 mt-2 w-56 bg-white dark:bg-black rounded shadow-lg z-50 overflow-hidden",children:(0,d.jsxs)("ul",{className:"py-2",children:[(0,d.jsx)("li",{children:(0,d.jsxs)(g(),{href:"/profile",className:"flex items-center px-4 py-2 hover:bg-white-light dark:hover:bg-dark/40",children:[(0,d.jsxs)("svg",{className:"ltr:mr-2 rtl:ml-2 shrink-0",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("circle",{cx:"12",cy:"6",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{opacity:"0.5",d:"M20 17.5C20 19.9853 20 22 12 22C4 22 4 19.9853 4 17.5C4 15.0147 7.58172 13 12 13C16.4183 13 20 15.0147 20 17.5Z",fill:"currentColor"})]}),"Perfil"]})}),(0,d.jsx)("li",{children:(0,d.jsxs)(g(),{href:"/settings",className:"flex items-center px-4 py-2 hover:bg-white-light dark:hover:bg-dark/40",children:[(0,d.jsxs)("svg",{className:"ltr:mr-2 rtl:ml-2 shrink-0",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{opacity:"0.5",d:"M13.7654 2.15224C13.3978 2 12.9319 2 12 2C11.0681 2 10.6022 2 10.2346 2.15224C9.74457 2.35523 9.35522 2.74458 9.15223 3.23463C9.05957 3.45834 9.0233 3.7185 9.00911 4.09799C8.98826 4.65568 8.70226 5.17189 8.21894 5.45093C7.73564 5.72996 7.14559 5.71954 6.65219 5.45876C6.31645 5.2813 6.07301 5.18262 5.83294 5.15102C5.30704 5.08178 4.77518 5.22429 4.35436 5.5472C4.03874 5.78938 3.80577 6.1929 3.33983 6.99993C2.87389 7.80697 2.64092 8.21048 2.58899 8.60491C2.51976 9.1308 2.66227 9.66266 2.98518 10.0835C3.13256 10.2756 3.3397 10.437 3.66119 10.639C4.1338 10.936 4.43789 11.4419 4.43786 12C4.43783 12.5581 4.13375 13.0639 3.66118 13.3608C3.33965 13.5629 3.13248 13.7244 2.98508 13.9165C2.66217 14.3373 2.51966 14.8691 2.5889 15.395C2.64082 15.7894 2.87379 16.193 3.33973 17C3.80568 17.807 4.03865 18.2106 4.35426 18.4527C4.77508 18.7756 5.30694 18.9181 5.83284 18.8489C6.07289 18.8173 6.31632 18.7186 6.65204 18.5412C7.14547 18.2804 7.73556 18.27 8.2189 18.549C8.70224 18.8281 8.98826 19.3443 9.00911 19.9021C9.02331 20.2815 9.05957 20.5417 9.15223 20.7654C9.35522 21.2554 9.74457 21.6448 10.2346 21.8478C10.6022 22 11.0681 22 12 22C12.9319 22 13.3978 22 13.7654 21.8478C14.2554 21.6448 14.6448 21.2554 14.8477 20.7654C14.9404 20.5417 14.9767 20.2815 14.9909 19.902C15.0117 19.3443 15.2977 18.8281 15.781 18.549C16.2643 18.2699 16.8544 18.2804 17.3479 18.5412C17.6836 18.7186 17.927 18.8172 18.167 18.8488C18.6929 18.9181 19.2248 18.7756 19.6456 18.4527C19.9612 18.2105 20.1942 17.807 20.6601 16.9999C21.1261 16.1929 21.3591 15.7894 21.411 15.395C21.4802 14.8691 21.3377 14.3372 21.0148 13.9164C20.8674 13.7243 20.6602 13.5628 20.3387 13.3608C19.8662 13.0639 19.5621 12.558 19.5621 11.9999C19.5621 11.4418 19.8662 10.9361 20.3387 10.6392C20.6603 10.4371 20.8675 10.2757 21.0149 10.0835C21.3378 9.66273 21.4803 9.13087 21.4111 8.60497C21.3592 8.21055 21.1262 7.80703 20.6602 7C20.1943 6.19297 19.9613 5.78945 19.6457 5.54727C19.2249 5.22436 18.693 5.08185 18.1671 5.15109C17.9271 5.18269 17.6837 5.28136 17.3479 5.4588C16.8545 5.71959 16.2644 5.73002 15.7811 5.45096C15.2977 5.17191 15.0117 4.65566 14.9909 4.09794C14.9767 3.71848 14.9404 3.45833 14.8477 3.23463C14.6448 2.74458 14.2554 2.35523 13.7654 2.15224Z",stroke:"currentColor",strokeWidth:"1.5"})]}),"Configuraci\xf3n"]})}),(0,d.jsx)("li",{className:"border-t border-white-light dark:border-white-light/10",children:(0,d.jsxs)(g(),{href:"/auth/login",className:"flex items-center px-4 py-2 text-danger hover:bg-white-light dark:hover:bg-dark/40",children:[(0,d.jsxs)("svg",{className:"ltr:mr-2 rtl:ml-2 shrink-0",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{opacity:"0.5",d:"M17 9.00195C19.175 9.01406 20.3529 9.11051 21.1213 9.8789C22 10.7576 22 12.1718 22 15.0002V16.0002C22 18.8286 22 20.2429 21.1213 21.1215C20.2426 22.0002 18.8284 22.0002 16 22.0002H8C5.17157 22.0002 3.75736 22.0002 2.87868 21.1215C2 20.2429 2 18.8286 2 16.0002L2 15.0002C2 12.1718 2 10.7576 2.87868 9.87889C3.64706 9.11051 4.82497 9.01406 7 9.00195",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{d:"M12 15L12 2M12 2L15 5.5M12 2L9 5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Cerrar Sesi\xf3n"]})})]})})]})]})]})})}function j({isOpen:a,onToggle:b}){let c=(0,h.usePathname)(),[f,i]=(0,e.useState)("");return(0,d.jsxs)(d.Fragment,{children:[a&&(0,d.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60 lg:hidden",onClick:b}),(0,d.jsx)("nav",{className:`sidebar fixed top-0 bottom-0 z-50 h-full min-h-screen w-[260px] shadow-[5px_0_25px_0_rgba(94,92,154,0.1)] transition-all duration-300 ${a?"ltr:left-0 rtl:right-0":"ltr:-left-[260px] rtl:-right-[260px]"} lg:ltr:left-0 lg:rtl:right-0`,children:(0,d.jsxs)("div",{className:"h-full bg-white dark:bg-black",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,d.jsx)(g(),{href:"/broadcasts",className:"main-logo flex shrink-0 items-center",children:(0,d.jsx)("span",{className:"align-middle text-2xl font-semibold text-primary ltr:ml-1.5 rtl:mr-1.5 dark:text-white-light",children:"AvanzaCast"})}),(0,d.jsx)("button",{type:"button",className:"collapse-icon flex h-8 w-8 items-center rounded-full transition duration-300 hover:bg-gray-500/10 rtl:rotate-180 dark:text-white-light dark:hover:bg-dark-light/10",onClick:b,children:(0,d.jsxs)("svg",{className:"m-auto rotate-90",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{d:"M13 19L7 12L13 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M16.9998 19L10.9998 12L16.9998 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,d.jsx)("div",{className:"relative h-[calc(100vh-80px)] space-y-0.5 overflow-y-auto overflow-x-hidden p-4 py-0 font-semibold",children:(0,d.jsxs)("ul",{className:"relative space-y-0.5",children:[(0,d.jsx)("li",{className:"nav-item",children:(0,d.jsx)(g(),{href:"/broadcasts",className:`group ${"/broadcasts"===c?"active":""}`,children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("svg",{className:"shrink-0 group-hover:!text-primary",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{opacity:"0.5",d:"M2 12.2039C2 9.91549 2 8.77128 2.5192 7.82274C3.0384 6.87421 3.98695 6.28551 5.88403 5.10813L7.88403 3.86687C9.88939 2.62229 10.8921 2 12 2C13.1079 2 14.1106 2.62229 16.116 3.86687L18.116 5.10812C20.0131 6.28551 20.9616 6.87421 21.4808 7.82274C22 8.77128 22 9.91549 22 12.2039V13.725C22 17.6258 22 19.5763 20.8284 20.7881C19.6569 22 17.7712 22 14 22H10C6.22876 22 4.34315 22 3.17157 20.7881C2 19.5763 2 17.6258 2 13.725V12.2039Z",fill:"currentColor"}),(0,d.jsx)("path",{d:"M9 17.25C8.58579 17.25 8.25 17.5858 8.25 18C8.25 18.4142 8.58579 18.75 9 18.75H15C15.4142 18.75 15.75 18.4142 15.75 18C15.75 17.5858 15.4142 17.25 15 17.25H9Z",fill:"currentColor"})]}),(0,d.jsx)("span",{className:"text-black ltr:pl-3 rtl:pr-3 dark:text-[#506690] dark:group-hover:text-white-dark",children:"Transmisiones"})]})})}),(0,d.jsx)("h2",{className:"-mx-4 mb-1 flex items-center bg-white-light/30 px-7 py-3 font-extrabold uppercase dark:bg-dark dark:bg-opacity-[0.08]",children:(0,d.jsx)("span",{children:"Streaming"})}),(0,d.jsx)("li",{className:"nav-item",children:(0,d.jsx)(g(),{href:"/studio",className:`group ${"/studio"===c?"active":""}`,children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)("svg",{className:"shrink-0 group-hover:!text-primary",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,d.jsx)("span",{className:"text-black ltr:pl-3 rtl:pr-3 dark:text-[#506690] dark:group-hover:text-white-dark",children:"Estudio Virtual"})]})})}),(0,d.jsxs)("li",{className:"menu nav-item",children:[(0,d.jsxs)("button",{type:"button",className:`${"streams"===f?"active":""} group w-full nav-link`,onClick:()=>{var a;return a="streams",void i(b=>b===a?"":a)},children:[(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("svg",{className:"shrink-0 group-hover:!text-primary",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{d:"M2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{opacity:"0.5",d:"M13 15.5H17M13 8.5H17M6.96967 8.03033C7.26256 7.73744 7.73744 7.73744 8.03033 8.03033L9.5 9.5L8.03033 10.9697C7.73744 11.2626 7.26256 11.2626 6.96967 10.9697C6.67678 10.6768 6.67678 10.2019 6.96967 9.90901L7.43934 9.43934L6.96967 8.96967C6.67678 8.67678 6.67678 8.20191 6.96967 7.90901ZM6.96967 13.9697C7.26256 13.6768 7.73744 13.6768 8.03033 13.9697L9.5 15.4393L8.03033 16.909C7.73744 17.2019 7.26256 17.2019 6.96967 16.909C6.67678 16.6161 6.67678 16.1412 6.96967 15.8483L7.43934 15.3787L6.96967 14.909C6.67678 14.6161 6.67678 14.1412 6.96967 13.8483Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),(0,d.jsx)("span",{className:"text-black ltr:pl-3 rtl:pr-3 dark:text-[#506690] dark:group-hover:text-white-dark",children:"Transmisiones"})]}),(0,d.jsx)("div",{className:"streams"!==f?"-rotate-90 rtl:rotate-90":"",children:(0,d.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M19 9L12 15L5 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,d.jsx)("div",{className:`${"streams"===f?"block":"hidden"}`,children:(0,d.jsxs)("ul",{className:"sub-menu space-y-2 text-gray-500",children:[(0,d.jsx)("li",{children:(0,d.jsx)(g(),{href:"/streams",children:"Todas"})}),(0,d.jsx)("li",{children:(0,d.jsx)(g(),{href:"/streams/create",children:"Nueva Transmisi\xf3n"})}),(0,d.jsx)("li",{children:(0,d.jsx)(g(),{href:"/streams/scheduled",children:"Programadas"})}),(0,d.jsx)("li",{children:(0,d.jsx)(g(),{href:"/streams/history",children:"Historial"})})]})})]}),(0,d.jsx)("li",{className:"nav-item",children:(0,d.jsx)(g(),{href:"/analytics",className:`group ${"/analytics"===c?"active":""}`,children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("svg",{className:"shrink-0 group-hover:!text-primary",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{d:"M7 18V16M12 18V15M17 18V13M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,d.jsx)("path",{opacity:"0.5",d:"M21.5 9H14L12.5 11H9.5L8 9H2.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,d.jsx)("span",{className:"text-black ltr:pl-3 rtl:pr-3 dark:text-[#506690] dark:group-hover:text-white-dark",children:"Analytics"})]})})}),(0,d.jsx)("h2",{className:"-mx-4 mb-1 flex items-center bg-white-light/30 px-7 py-3 font-extrabold uppercase dark:bg-dark dark:bg-opacity-[0.08]",children:(0,d.jsx)("span",{children:"Configuraci\xf3n"})}),(0,d.jsx)("li",{className:"nav-item",children:(0,d.jsx)(g(),{href:"/platforms",className:`group ${"/platforms"===c?"active":""}`,children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)("svg",{className:"shrink-0 group-hover:!text-primary",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,d.jsx)("span",{className:"text-black ltr:pl-3 rtl:pr-3 dark:text-[#506690] dark:group-hover:text-white-dark",children:"Plataformas"})]})})}),(0,d.jsx)("li",{className:"nav-item",children:(0,d.jsx)(g(),{href:"/settings",className:`group ${"/settings"===c?"active":""}`,children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsxs)("svg",{className:"shrink-0 group-hover:!text-primary",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"1.5"}),(0,d.jsx)("path",{opacity:"0.5",d:"M13.7654 2.15224C13.3978 2 12.9319 2 12 2C11.0681 2 10.6022 2 10.2346 2.15224C9.74457 2.35523 9.35522 2.74458 9.15223 3.23463C9.05957 3.45834 9.0233 3.7185 9.00911 4.09799C8.98826 4.65568 8.70226 5.17189 8.21894 5.45093C7.73564 5.72996 7.14559 5.71954 6.65219 5.45876C6.31645 5.2813 6.07301 5.18262 5.83294 5.15102C5.30704 5.08178 4.77518 5.22429 4.35436 5.5472C4.03874 5.78938 3.80577 6.1929 3.33983 6.99993C2.87389 7.80697 2.64092 8.21048 2.58899 8.60491C2.51976 9.1308 2.66227 9.66266 2.98518 10.0835C3.13256 10.2756 3.3397 10.437 3.66119 10.639C4.1338 10.936 4.43789 11.4419 4.43786 12C4.43783 12.5581 4.13375 13.0639 3.66118 13.3608C3.33965 13.5629 3.13248 13.7244 2.98508 13.9165C2.66217 14.3373 2.51966 14.8691 2.5889 15.395C2.64082 15.7894 2.87379 16.193 3.33973 17C3.80568 17.807 4.03865 18.2106 4.35426 18.4527C4.77508 18.7756 5.30694 18.9181 5.83284 18.8489C6.07289 18.8173 6.31632 18.7186 6.65204 18.5412C7.14547 18.2804 7.73556 18.27 8.2189 18.549C8.70224 18.8281 8.98826 19.3443 9.00911 19.9021C9.02331 20.2815 9.05957 20.5417 9.15223 20.7654C9.35522 21.2554 9.74457 21.6448 10.2346 21.8478C10.6022 22 11.0681 22 12 22C12.9319 22 13.3978 22 13.7654 21.8478C14.2554 21.6448 14.6448 21.2554 14.8477 20.7654C14.9404 20.5417 14.9767 20.2815 14.9909 19.902C15.0117 19.3443 15.2977 18.8281 15.781 18.549C16.2643 18.2699 16.8544 18.2804 17.3479 18.5412C17.6836 18.7186 17.927 18.8172 18.167 18.8488C18.6929 18.9181 19.2248 18.7756 19.6456 18.4527C19.9612 18.2105 20.1942 17.807 20.6601 16.9999C21.1261 16.1929 21.3591 15.7894 21.411 15.395C21.4802 14.8691 21.3377 14.3372 21.0148 13.9164C20.8674 13.7243 20.6602 13.5628 20.3387 13.3608C19.8662 13.0639 19.5621 12.558 19.5621 11.9999C19.5621 11.4418 19.8662 10.9361 20.3387 10.6392C20.6603 10.4371 20.8675 10.2757 21.0149 10.0835C21.3378 9.66273 21.4803 9.13087 21.4111 8.60497C21.3592 8.21055 21.1262 7.80703 20.6602 7C20.1943 6.19297 19.9613 5.78945 19.6457 5.54727C19.2249 5.22436 18.693 5.08185 18.1671 5.15109C17.9271 5.18269 17.6837 5.28136 17.3479 5.4588C16.8545 5.71959 16.2644 5.73002 15.7811 5.45096C15.2977 5.17191 15.0117 4.65566 14.9909 4.09794C14.9767 3.71848 14.9404 3.45833 14.8477 3.23463C14.6448 2.74458 14.2554 2.35523 13.7654 2.15224Z",stroke:"currentColor",strokeWidth:"1.5"})]}),(0,d.jsx)("span",{className:"text-black ltr:pl-3 rtl:pr-3 dark:text-[#506690] dark:group-hover:text-white-dark",children:"Configuraci\xf3n"})]})})})]})})]})})]})}function k({children:a}){let[b,c]=(0,e.useState)(!0);return(0,d.jsxs)("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[(0,d.jsx)(j,{isOpen:b,onToggle:()=>c(!b)}),(0,d.jsxs)("div",{className:"main-content flex min-h-screen flex-col",children:[(0,d.jsx)(i,{onToggleSidebar:()=>c(!b)}),(0,d.jsx)("div",{className:`animate-[fadeIn_0.2s_ease-in-out] p-6 ${b?"ltr:xl:ml-[260px] rtl:xl:mr-[260px]":""}`,children:a})]})]})}},57437:(a,b,c)=>{Promise.resolve().then(c.bind(c,80454))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67415:(a,b,c)=>{Promise.resolve().then(c.bind(c,3166))},80454:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/layout.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/xesar/Documentos/Nextream/AvanzaCast/src/app/(protected)/layout.tsx","default")},85053:(a,b,c)=>{Promise.resolve().then(c.bind(c,57201))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92900:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>i});var d=c(21124),e=c(38301),f=c(3991),g=c.n(f),h=c(9503);function i(){let{user:a}=(0,h.As)(),{streams:b,isLoading:c}=(0,h.fJ)(),{platforms:f}=(0,h.gn)(),[i,j]=(0,e.useState)({totalStreams:0,totalViews:0,liveStreams:0,connectedPlatforms:0}),k=a=>new Date(a).toLocaleDateString("es-ES",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"});return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsxs)("h1",{className:"text-3xl font-bold text-black dark:text-white",children:["\xa1Hola, ",a?.name||"Usuario","! \uD83D\uDC4B"]}),(0,d.jsx)("p",{className:"text-white-dark mt-1",children:"Bienvenido de vuelta a tu estudio de streaming profesional"})]}),(0,d.jsxs)("div",{className:"mb-6 grid gap-6 sm:grid-cols-2 xl:grid-cols-4",children:[(0,d.jsxs)("div",{className:"panel bg-gradient-to-r from-cyan-500 to-cyan-400 text-white",children:[(0,d.jsx)("div",{className:"flex justify-between",children:(0,d.jsx)("div",{className:"text-md font-semibold ltr:mr-1 rtl:ml-1",children:"Total Streams"})}),(0,d.jsx)("div",{className:"mt-5 flex items-center",children:(0,d.jsx)("div",{className:"text-3xl font-bold ltr:mr-3 rtl:ml-3",children:i.totalStreams})}),(0,d.jsx)("div",{className:"mt-5 flex items-center font-semibold",children:"Transmisiones realizadas"})]}),(0,d.jsxs)("div",{className:"panel bg-gradient-to-r from-violet-500 to-violet-400 text-white",children:[(0,d.jsx)("div",{className:"flex justify-between",children:(0,d.jsx)("div",{className:"text-md font-semibold ltr:mr-1 rtl:ml-1",children:"Total Views"})}),(0,d.jsx)("div",{className:"mt-5 flex items-center",children:(0,d.jsx)("div",{className:"text-3xl font-bold ltr:mr-3 rtl:ml-3",children:i.totalViews.toLocaleString()})}),(0,d.jsx)("div",{className:"mt-5 flex items-center font-semibold",children:"Vistas totales acumuladas"})]}),(0,d.jsxs)("div",{className:"panel bg-gradient-to-r from-blue-500 to-blue-400 text-white",children:[(0,d.jsx)("div",{className:"flex justify-between",children:(0,d.jsx)("div",{className:"text-md font-semibold ltr:mr-1 rtl:ml-1",children:"En Vivo Ahora"})}),(0,d.jsx)("div",{className:"mt-5 flex items-center",children:(0,d.jsx)("div",{className:"text-3xl font-bold ltr:mr-3 rtl:ml-3",children:i.liveStreams})}),(0,d.jsxs)("div",{className:"mt-5 flex items-center font-semibold",children:[(0,d.jsx)("div",{className:"h-2 w-2 rounded-full bg-white animate-pulse ltr:mr-2 rtl:ml-2"}),"Transmisiones activas"]})]}),(0,d.jsxs)("div",{className:"panel bg-gradient-to-r from-fuchsia-500 to-fuchsia-400 text-white",children:[(0,d.jsx)("div",{className:"flex justify-between",children:(0,d.jsx)("div",{className:"text-md font-semibold ltr:mr-1 rtl:ml-1",children:"Plataformas"})}),(0,d.jsx)("div",{className:"mt-5 flex items-center",children:(0,d.jsxs)("div",{className:"text-3xl font-bold ltr:mr-3 rtl:ml-3",children:[i.connectedPlatforms,"/4"]})}),(0,d.jsx)("div",{className:"mt-5 flex items-center font-semibold",children:"Conectadas y activas"})]})]}),(0,d.jsxs)("div",{className:"panel mb-6",children:[(0,d.jsx)("div",{className:"mb-5 flex items-center justify-between",children:(0,d.jsx)("h5",{className:"text-lg font-semibold dark:text-white-light",children:"Acciones R\xe1pidas"})}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4",children:[(0,d.jsx)(g(),{href:"/studio",children:(0,d.jsxs)("div",{className:"group relative overflow-hidden rounded-lg border border-white-light bg-white p-6 transition hover:border-primary hover:shadow-lg dark:border-[#1b2e4b] dark:bg-[#1b2e4b] dark:hover:border-primary",children:[(0,d.jsx)("h5",{className:"mb-2 text-xl font-semibold text-[#3b3f5c] dark:text-white-light",children:"Ir al Estudio"}),(0,d.jsx)("p",{className:"text-white-dark",children:"Accede al estudio virtual para streaming"})]})}),(0,d.jsx)(g(),{href:"/streams/create",children:(0,d.jsxs)("div",{className:"group relative overflow-hidden rounded-lg border border-white-light bg-white p-6 transition hover:border-success hover:shadow-lg dark:border-[#1b2e4b] dark:bg-[#1b2e4b] dark:hover:border-success",children:[(0,d.jsx)("h5",{className:"mb-2 text-xl font-semibold text-[#3b3f5c] dark:text-white-light",children:"Nueva Transmisi\xf3n"}),(0,d.jsx)("p",{className:"text-white-dark",children:"Crear una nueva transmisi\xf3n programada"})]})}),(0,d.jsx)(g(),{href:"/platforms",children:(0,d.jsxs)("div",{className:"group relative overflow-hidden rounded-lg border border-white-light bg-white p-6 transition hover:border-warning hover:shadow-lg dark:border-[#1b2e4b] dark:bg-[#1b2e4b] dark:hover:border-warning",children:[(0,d.jsx)("h5",{className:"mb-2 text-xl font-semibold text-[#3b3f5c] dark:text-white-light",children:"Conectar Plataformas"}),(0,d.jsx)("p",{className:"text-white-dark",children:"Gestiona tus conexiones de streaming"})]})}),(0,d.jsx)(g(),{href:"/analytics",children:(0,d.jsxs)("div",{className:"group relative overflow-hidden rounded-lg border border-white-light bg-white p-6 transition hover:border-info hover:shadow-lg dark:border-[#1b2e4b] dark:bg-[#1b2e4b] dark:hover:border-info",children:[(0,d.jsx)("h5",{className:"mb-2 text-xl font-semibold text-[#3b3f5c] dark:text-white-light",children:"Ver Analytics"}),(0,d.jsx)("p",{className:"text-white-dark",children:"Analizar el rendimiento de streams"})]})})]})]}),(0,d.jsxs)("div",{className:"panel",children:[(0,d.jsxs)("div",{className:"mb-5 flex items-center justify-between",children:[(0,d.jsx)("h5",{className:"text-lg font-semibold dark:text-white-light",children:"Transmisiones Recientes"}),(0,d.jsx)(g(),{href:"/streams",className:"font-semibold text-primary hover:text-primary/80",children:"Ver Todas"})]}),c?(0,d.jsx)("div",{className:"flex justify-center py-8",children:(0,d.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-b-2 border-primary"})}):b&&b.length>0?(0,d.jsx)("div",{className:"table-responsive",children:(0,d.jsxs)("table",{className:"table-striped table-hover",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{children:"Transmisi\xf3n"}),(0,d.jsx)("th",{children:"Fecha"}),(0,d.jsx)("th",{children:"Viewers"}),(0,d.jsx)("th",{children:"Estado"})]})}),(0,d.jsx)("tbody",{children:b.slice(0,5).map(a=>{var b;return(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:(0,d.jsx)("div",{className:"font-semibold",children:a.title})}),(0,d.jsx)("td",{children:(0,d.jsx)("div",{className:"text-white-dark",children:a.startedAt?k(a.startedAt):a.scheduledAt?k(a.scheduledAt):"Borrador"})}),(0,d.jsx)("td",{children:a.maxViewers}),(0,d.jsx)("td",{children:(b=a.status,(0,d.jsx)("span",{className:{live:"badge bg-success text-white",scheduled:"badge bg-warning text-white",ended:"badge bg-secondary text-white",draft:"badge bg-dark text-white"}[b],children:{live:"En Vivo",scheduled:"Programado",ended:"Finalizado",draft:"Borrador"}[b]}))})]},a.id)})})]})}):(0,d.jsxs)("div",{className:"py-12 text-center",children:[(0,d.jsx)("h3",{className:"mb-2 text-lg font-semibold text-black dark:text-white",children:"No hay transmisiones a\xfan"}),(0,d.jsx)("p",{className:"mb-6 text-white-dark",children:"Crea tu primera transmisi\xf3n para comenzar"}),(0,d.jsx)(g(),{href:"/studio",className:"btn btn-primary",children:"Crear Primera Transmisi\xf3n"})]})]})]})}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[586,851,991,348],()=>b(b.s=51074));module.exports=c})();