1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{76866:function(e,t,s){Promise.resolve().then(s.bind(s,18761)),Promise.resolve().then(s.bind(s,60981)),Promise.resolve().then(s.t.bind(s,91308,23)),Promise.resolve().then(s.bind(s,68267)),Promise.resolve().then(s.bind(s,82553)),Promise.resolve().then(s.t.bind(s,22147,23)),Promise.resolve().then(s.t.bind(s,89347,23)),Promise.resolve().then(s.t.bind(s,53834,23)),Promise.resolve().then(s.t.bind(s,75976,23)),Promise.resolve().then(s.t.bind(s,6,23))},18761:function(e,t,s){"use strict";s.d(t,{Footer:function(){return x}});var r=s(27573);s(7653);var a=s(88146),l=s(50294);let n=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),c=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})}),o=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),i=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"})}),d=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058 1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.28.073-1.689.073-4.948 0-3.204-.014-3.583-.07-4.849-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})}),h=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,r.jsx)("path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})}),x=()=>(0,r.jsx)("footer",{className:"bg-white text-gray-800 py-12 px-7 font-sora mt-7",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-8",children:[(0,r.jsx)("div",{className:"md:col-span-1",children:(0,r.jsx)(l.default,{src:"https://cdn.prod.website-files.com/661983eeaea983f3acef2f78/663206cb8f9bd578a9737c35_logo%20(2).svg",alt:"logo",width:120,height:32,className:"h-8 w-auto mb-4"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-[20px] text-[#b092f8] uppercase mb-4 font-anton",children:"PRODUCTS"}),(0,r.jsxs)("ul",{className:"space-y-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/drive",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Embedded ELD"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/dispatch-ai",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Load Optimization"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/dispatch-ai",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Dispatch AI"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://stopcallingbrokers.com/",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Voice AI"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-[20px] text-[#b092f8] uppercase mb-4 font-anton",children:"COMPANY"}),(0,r.jsxs)("ul",{className:"space-y-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/about-us",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"About"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/contact-us",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Contact Us"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/careers",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Careers"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/our-solution",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Our Solution"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-[20px] text-[#b092f8] uppercase mb-4 font-anton",children:"LEGAL"}),(0,r.jsxs)("ul",{className:"space-y-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/privacy-policy",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Privacy Policy"})}),(0,r.jsx)("li",{children:(0,r.jsx)(a.default,{href:"https://www.class8.com/terms-of-service",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors",children:"Terms of Service"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-[20px] text-[#b092f8] uppercase mb-4 font-anton",children:"SOCIAL"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-3",children:[(0,r.jsxs)(a.default,{href:"https://www.linkedin.com/company/class8trucks",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors flex items-center gap-2",children:[(0,r.jsx)(n,{}),"LinkedIn"]}),(0,r.jsxs)(a.default,{href:"https://www.youtube.com/@class8-trucks",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors flex items-center gap-2",children:[(0,r.jsx)(c,{}),"YouTube"]}),(0,r.jsxs)(a.default,{href:"https://www.facebook.com/class8truck",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors flex items-center gap-2",children:[(0,r.jsx)(o,{}),"Facebook"]}),(0,r.jsxs)(a.default,{href:"https://www.tiktok.com/@class8truck",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors flex items-center gap-2",children:[(0,r.jsx)(i,{}),"TikTok"]}),(0,r.jsxs)(a.default,{href:"https://instagram.com/class8truck",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors flex items-center gap-2",children:[(0,r.jsx)(d,{}),"Instagram"]}),(0,r.jsxs)(a.default,{href:"https://x.com/Class8Truck",target:"_blank",className:"text-[#01031e] hover:text-[#5f48f5] transition-colors flex items-center gap-2 whitespace-nowrap",children:[(0,r.jsx)(h,{}),"X (Twitter)"]})]})]})]}),(0,r.jsx)("div",{className:"mt-12 pt-8 border-t border-gray-200",children:(0,r.jsx)("p",{className:"text-center text-gray-600",children:"Class 8, Inc. \xa9 2025"})})]})})},60981:function(e,t,s){"use strict";s.d(t,{Header:function(){return f}});var r=s(27573),a=s(7653),l=s(82553),n=s(74633),c=s(50294),o=s(88146),i=s(82358),d=s(50825),h=s(24784),x={src:"/_next/static/media/class8_logo_wide.6d8b7cf4.svg",height:20,width:108,blurWidth:0,blurHeight:0};let u=e=>{let{size:t=20,color:s="white"}=e;return(0,r.jsx)("svg",{width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Icons / right arrow",children:(0,r.jsx)("path",{id:"Vector",d:"M5.69525 4.30493L9.99994 8.60962L14.3046 4.30493C14.689 3.92052 15.3107 3.92052 15.6951 4.30493C16.0795 4.68934 16.0795 5.31097 15.6951 5.69537L11.3904 10.
10001L15.6951 14.3048C16.0795 14.6892 16.0795 15.3108 15.6951 15.6952C15.5034 15.8869 15.2514 15.9833 14.9998 15.9833C14.7483 15.9833 14.4963 15.8869 14.3046 15.6952L9.99994 11.3905L5.69525 15.6952C5.50356 15.8869 5.25161 15.9833 5.00003 15.9833C4.74844 15.9833 4.4965 15.8869 4.3048 15.6952C3.9204 15.3108 3.9204 14.6892 4.3048 14.3048L8.60949 10.0001L4.3048 5.69537C3.9204 5.31097 3.9204 4.68934 4.3048 4.30493C4.68921 3.92052 5.31084 3.92052 5.69525 4.30493Z",fill:s,stroke:s,strokeWidth:"0.3"})})})},f=()=>{let[e,t]=(0,a.useState)(!1),[s,f]=(0,a.useState)(!1),{user:m}=(0,l.aF)(),p=[{name:"PRODUCTS",href:"#",hasDropdown:!0},{name:"ABOUT",href:"https://www.class8.com/about-us"},{name:"CAREERS",href:"https://www.class8.com/careers"},{name:"CONTACT US",href:"https://www.class8.com/contact-us"}],g=[{category:"Drive:",product:"EMBEDDED ELD",href:"https://www.class8.com/drive"},{category:"Grow:",product:"LOAD OPTIMIZATION",href:"https://www.class8.com/load-optimization"},{category:"Scale:",product:"DISPATCH AI",href:"https://www.class8.com/dispatch-ai"},{category:"Automate:",product:"VOICE AI",href:"https://stopcallingbrokers.com/"}],v=()=>{t(!1),f(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("header",{className:"bg-transparent font-sora z-50 relative",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-7",children:(0,r.jsxs)("div",{className:"flex justify-between items-center h-24",children:[(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)(o.default,{href:"/",className:"flex items-center",children:(0,r.jsx)(c.default,{src:x,alt:"Class8 Logo",width:140,height:40,className:"h-6 w-auto"})})}),(0,r.jsxs)("div",{className:"flex items-center space-x-12",children:[(0,r.jsx)("nav",{className:"hidden md:flex items-center space-x-10",children:p.map(e=>(0,r.jsx)("div",{className:"relative",children:e.hasDropdown?(0,r.jsx)(h.J2,{className:"relative",children:t=>{let{open:s}=t;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(h.O7,{className:"text-white hover:text-gray-300 transition-colors text-[18px] flex items-center gap-1 font-bold tracking-widest focus:outline-none",children:[e.name,(0,r.jsx)(i.Z,{className:"h-3 w-3 transition-transform ".concat(s?"rotate-180":"")})]}),(0,r.jsx)(h.Hi,{transition:!0,className:"absolute left-0 top-full mt-2 w-80 bg-[#01031e] border border-gray-800 rounded-lg shadow-2xl z-50 transition data-[closed]:translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:(0,r.jsx)("div",{className:"p-6",children:g.map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsxs)(o.default,{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"block hover:bg-gray-900 transition-colors rounded-md p-3 -m-3",children:[(0,r.jsx)("div",{className:"text-gray-400 text-xs font-normal mb-1",children:e.category}),(0,r.jsx)("div",{className:"text-white text-xl font-anton uppercase tracking-wide",children:e.product})]}),t<g.length-1&&(0,r.jsx)("div",{className:"border-b border-gray-800 my-4"})]},e.category))})})]})}}):(0,r.jsx)(o.default,{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-white hover:text-gray-300 transition-colors font-bold text-[16px] tracking-widest",children:e.name})},e.name))}),(0,r.jsx)("div",{className:"flex items-center",children:m?(0,r.jsx)("a",{href:"/api/auth/logout",children:(0,r.jsx)(n.t,{variant:"secondary",title:"LOG OUT",className:"max-w-[400px] min-w-[120px] h-11 text-xs px-6 bg-transparent border-white text-white hover:bg-white hover:text-black transition-all"})}):(0,r.jsx)(o.default,{href:"https://www.class8.com/get-started",children:(0,r.jsx)("button",{className:"bg-gradient-to-r from-[#ff4d4d] to-[#ff3333] hover:from-[#ff3333] hover:to-[#ff1a1a] text-white font-bold text-[16px] tracking-widest px-8 py-4 rounded-sm transition-all shadow-lg uppercase hidden md:block",children:"Get Started"})})}),(0,r.jsx)("div",{className:"md:hidden",children:(0,r.jsx)("button",{onClick:()=>t(!0),className:"text-white hover:text-gray-300 transition-colors",children:(0,r.jsx)("svg",{className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8h16M4 12h16M4 16h16"})})})})]})]})})}),(0,r.jsxs)(d.Vq,{open:e,onClose:v,className:"relative z-[10000] md:hidden",children:[(0,r.jsx)(d.ZR,{transition:!0,className:"fixed inset-0 bg-[#01031e]/95 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in"}),(0,r.jsx)("div",{className:"fixed inset-0",children:(0,r.jsx)(d.EM,{transition:!0,className:"w-full h-full bg-[#01031e] transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex flex-col min-h-full",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center p-7 border-b border-gray-800",children:[(0,r.jsx)(o.default,{href:"/",onClick:v,children:(0,r.jsx)(c.default,{src:x,alt:"Class8 Logo",width:120,height:32,className:"h-8 w-auto"})}),(0,r.jsx)("button",{onClick:v,className:"text-white hover:text-gray-300 transition-colors",children:(0,r.jsx)(u,{size:24})})]}),(0,r.jsx)("nav",{className:"flex-1 px-7 py-8",children:(0,r.jsxs)("div",{className:"space-y-0",children:[p.map((e,t)=>(0,r.jsxs)("div",{children:[e.hasDropdown?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>f(!s),className:"w-full flex justify-between items-center py-6 text-white hover:text-gray-300 transition-colors font-bold text-lg tracking-widest text-left",children:[e.name,(0,r.jsx)(i.Z,{className:"h-5 w-5 transition-transform ".concat(s?"rotate-180":"")})]}),s&&(0,r.jsx)("div",{className:"pl-4 pb-4 space-y-4",children:g.map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsxs)(o.default,{href:e.href,target:"_blank",rel:"noopener noreferrer",onClick:v,className:"block py-3",children:[(0,r.jsx)("div",{className:"text-gray-400 text-sm font-normal mb-1",children:e.category}),(0,r.jsx)("div",{className:"text-white text-2xl font-anton uppercase tracking-wide",children:e.product})]}),t<g.length-1&&(0,r.jsx)("div",{className:"border-b border-gray-800"})]},e.category))})]}):(0,r.jsx)(o.default,{href:e.href,target:"_blank",rel:"noopener noreferrer",onClick:v,className:"block py-6 text-white hover:text-gray-300 transition-colors font-bold text-lg tracking-widest",children:e.name}),t<p.length-1&&(0,r.jsx)("div",{className:"border-b border-gray-800"})]},e.name)),(0,r.jsx)("div",{className:"mt-8 pt-8 border-t border-gray-800",children:m?(0,r.jsx)("a",{href:"/api/auth/logout",onClick:v,children:(0,r.jsx)(n.t,{variant:"secondary",title:"LOG OUT",className:"w-full h-14 text-sm font-bold tracking-widest border-white text-white"})}):(0,r.jsx)(o.default,{href:"https://www.class8.com/get-started",onClick:v,children:(0,r.jsx)("button",{className:"w-full bg-gradient-to-r from-[#ff4d4d] to-[#ff3333] text-white font-bold text-sm tracking-widest py-5 rounded-sm shadow-lg uppercase",children:"Get Started"})})})]})})]})})})]})]})}},68267:function(e,t,s){"use strict";s.d(t,{default:function(){return j},W:function(){return b}});
1var r=s(27573),a=s(70772),l=s(77930),n=s(7653),c=s(37632),o=s(64520),i=s(96868),d=s(28671),h=s(82553);let x=e=>{let{url:t,pingInterval:s=3e4,reconnectInterval:r=5e3,maxReconnectAttempts:a=5,onMessage:l,onConnect:c,onDisconnect:o,onError:i}=e,[d,h]=(0,n.useState)(null),[x,u]=(0,n.useState)(!1),[f,m]=(0,n.useState)("disconnected"),p=(0,n.useRef)(null),g=(0,n.useRef)(null),v=(0,n.useRef)(0),w=(0,n.useRef)(!0),b=(0,n.useRef)({onMessage:l,onConnect:c,onDisconnect:o,onError:i});(0,n.useEffect)(()=>{b.current={onMessage:l,onConnect:c,onDisconnect:o,onError:i}},[l,c,o,i]);let j=(0,n.useCallback)(()=>{p.current&&(clearInterval(p.current),p.current=null),g.current&&(clearTimeout(g.current),g.current=null)},[]),N=(0,n.useCallback)(e=>{j(),p.current=setInterval(()=>{e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({action:"ping",message:""}))},s)},[s,j]),k=(0,n.useCallback)(()=>{if(t&&(null==d?void 0:d.readyState)!==WebSocket.CONNECTING&&(null==d?void 0:d.readyState)!==WebSocket.OPEN){m("connecting");try{let e=new WebSocket(t);e.onopen=()=>{var t,s;u(!0),m("connected"),h(e),v.current=0,N(e),null===(t=(s=b.current).onConnect)||void 0===t||t.call(s)},e.onmessage=e=>{var t,s,r,a;try{let r=JSON.parse(e.data);if("pong"===r.type)return;null===(t=(s=b.current).onMessage)||void 0===t||t.call(s,r)}catch(t){console.error("Failed to parse WebSocket message:",t,"Raw data:",e.data),null===(r=(a=b.current).onMessage)||void 0===r||r.call(a,e.data)}},e.onclose=()=>{var e,t;u(!1),m("disconnected"),h(null),j(),null===(e=(t=b.current).onDisconnect)||void 0===e||e.call(t),w.current&&v.current<a&&(v.current+=1,g.current=setTimeout(()=>{k()},r))},e.onerror=e=>{var t,s;m("error"),null===(t=(s=b.current).onError)||void 0===t||t.call(s,e),console.error("WebSocket error:",e)}}catch(e){m("error"),console.error("Failed to create WebSocket connection:",e)}}},[t,N,j,a,r]),y=(0,n.useCallback)(()=>{w.current=!1,j(),d&&(d.close(),h(null)),u(!1),m("disconnected")},[d,j]),C=(0,n.useCallback)(e=>{(null==d?void 0:d.readyState)===WebSocket.OPEN?d.send(JSON.stringify(e)):console.warn("WebSocket is not connected. Message not sent:",e)},[d]),S=(0,n.useCallback)(()=>{v.current=0,w.current=!0,y(),setTimeout(k,1e3)},[k,y]);return(0,n.useEffect)(()=>(t&&(w.current=!0,k()),()=>{w.current=!1,y()}),[t]),{socket:d,isConnected:x,connectionState:f,sendMessage:C,reconnect:S}};var u=s(31988),f=s(13908);let m=()=>{let{user:e,isLoading:t}=(0,h.aF)();return(0,u.a)({queryKey:["accessToken"],queryFn:async()=>{try{let e=await f.Z.get("/api/auth/token");if(204===e.status)return null;return e.data.accessToken}catch(e){return console.error("Failed to fetch access token:",e),null}},enabled:!t&&!!e,staleTime:3e6,gcTime:33e5,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4)})};var p=s(48638),g=s(74859);function v(e){let{children:t}=e,[s,a]=(0,n.useState)(null),{data:l}=m(),c=(0,n.useMemo)(()=>l?"".concat(g.env.NEXT_PUBLIC_CALLER_WEBSOCKET_URL,"?accessToken=").concat(l):null,[l]),o=(0,n.useRef)(new Map),i=(0,n.useMemo)(()=>(0,p.M$)(o,a),[]),{isConnected:d,connectionState:h,sendMessage:u}=x({url:c,onConnect:()=>{console.debug("WebSocket connected (caller-plg-app)")},onDisconnect:()=>{console.debug("WebSocket disconnected (caller-plg-app)")},onMessage:e=>{console.debug("WebSocket message received (caller-plg-app):",e),i(e),(null==e?void 0:e.type)==="call-summary-update"&&console.debug("Call summary updates received (caller-plg-app):",e)},onError:e=>{console.error("WebSocket error (caller-plg-app):",e)}}),f=(0,n.useCallback)((e,t)=>(o.current.has(e)||o.current.set(e,new Set),o.current.get(e).add(t),()=>{let s=o.current.get(e);s&&(s.delete(t),0===s.size&&o.current.delete(e))}),[]);return(0,r.jsx)(p.qJ,{isConnected:d,connectionState:h,sendMessage:u,subscribeToMessages:f,lastMessage:s,children:t})}let w=(0,n.createContext)(!1),b=()=>(0,n.useContext)(w);function j(e){let{children:t}=e,[s]=(0,n.useState)(()=>new a.S),{user:x}=(0,h.aF)();(0,n.useEffect)(()=>{(0,d.u1)("c3b477169a627e87732b7df597a14f26")},[]),(0,n.useEffect)(()=>{(null==x?void 0:x.email)&&(0,d.xU)(x.email)},[x]);let{isLoaded:u}=(0,c.Ji)({googleMapsApiKey:"AIzaSyAFfVIJsLyMZf5TVVWQ7s6J0hJgFJucfc8",id:"google-map-script",libraries:o._0});return(0,r.jsx)(w.Provider,{value:u,children:(0,r.jsx)(l.aH,{client:s,children:(0,r.jsx)(i.N,{children:(0,r.jsx)(v,{children:t})})})})}},96868:function(e,t,s){"use strict";s.d(t,{N:function(){return c},z:function(){return o}});var r=s(27573),a=s(7653),l=s(71170);let n=(0,a.createContext)({});n.displayName="NotificationsContext";let c=e=>{let[t,s]=(0,a.useState)(!1),[c,o]=(0,a.useState)({type:void 0,title:"Unexpected Error occurred"});return(0,r.jsxs)(n.Provider,{value:{isNotificationVisible:t,setIsNotificationVisible:s,notificationData:c,showNotification:(e,t,r)=>{o({type:e,title:t}),s(!0);let a=null!=r?r:4e3;a>0&&setTimeout(()=>{s(!1)},a)}},...e,children:[(0,r.jsx)(l.P,{wrapperClassName:"fixed top-0 right-0 z-[1000000]",type:c.type,title:c.title,setIsvisible:s,isVisible:t}),e.children]})};function o(){let e=(0,a.useContext)(n);if(void 0===e||0===Object.keys(e).length)throw Error("useNotifications must be used within a NotificationsProvider");return e}},91308:function(){}},function(e){e.O(0,[435,8,239,527,705,518,297,410,331,568,333,633,293,528,744],function(){return e(e.s=76866)}),_N_E=e.O()}]);
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.