PageSourceSearch

https://livekit-drivethru.vercel.app/_next/static/chunks/823-34e0d…?dpl=dpl_Ci6uYAvjsSp2aqMyVd2XF7H7AcQV

js livekit-drivethru.vercel.app collected 2026-10-03 07:14:49 UTC 17,094 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[823],{3760:(e,t,r)=>{r.d(t,{Toggle:()=>i});var a=r(5306);r(2274);var o=r(1516),n=r(2634),s=r(7874);let l=(0,o.F)(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:border-ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:r,size:o,...i}=e;return(0,a.jsx)(n.b,{"data-slot":"toggle",className:(0,s.cn)(l({variant:r,size:o,className:t})),...i})}},4792:(e,t,r)=>{r.d(t,{TrackToggle:()=>p});var a=r(5306),o=r(2274),n=r(7572),s=r(7965),l=r(6847),i=r(1482),c=r(1537),d=r(2125),u=r(9662),g=r(3760),f=r(7874);function p(e){let{source:t,pressed:r,pending:p,className:v,...h}=e,b=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r)return s.N;switch(e){case n.CC.Source.Microphone:return t?l.c:i.z;case n.CC.Source.Camera:return t?c.U:d.h;case n.CC.Source.ScreenShare:return u.G;default:return o.Fragment}}(t,null!=r&&r,p);return(0,a.jsxs)(g.Toggle,{pressed:r,"aria-label":"Toggle ".concat(t),className:(0,f.cn)(v),...h,children:[(0,a.jsx)(b,{weight:"bold",className:(0,f.cn)(p&&"animate-spin")}),h.children]})}},5823:(e,t,r)=>{r.d(t,{AgentControlBar:()=>S});var a=r(5306),o=r(2274),n=r(7572),s=r(3606),l=r(7414),i=r(812),c=r(2474),d=r(1516),u=r(82),g=r(7874);let f=(0,d.F)(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"bg-primary text-primary-foreground hover:bg-primary-hover focus:bg-primary-hover",secondary:"bg-secondary text-secondary-foregroun hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function p(e){let{className:t,variant:r,size:o,asChild:n=!1,...s}=e,l=n?u.DX:"button";return(0,a.jsx)(l,{"data-slot":"button",className:(0,g.cn)(f({variant:r,size:o,className:t})),...s})}function v(e){let{onSend:t,className:r,disabled:n,...s}=e,l=(0,o.useRef)(null),[i,c]=(0,o.useState)(""),d=n||0===i.trim().length;return(0,o.useEffect)(()=>{var e;n||null==(e=l.current)||e.focus()},[n]),(0,a.jsxs)("form",{...s,onSubmit:e=>{var r;e.preventDefault(),null==(r=s.onSubmit)||r.call(s,e),null==t||t(i),c("")},className:(0,g.cn)("flex items-center gap-2 rounded-md pl-1 text-sm",r),children:[(0,a.jsx)("input",{autoFocus:!0,ref:l,type:"text",value:i,disabled:n,placeholder:"Type something...",onChange:e=>c(e.target.value),className:"flex-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"}),(0,a.jsx)(p,{size:"sm",type:"submit",variant:d?"secondary":"primary",disabled:d,className:"font-mono",children:"SEND"})]})}var h=r(3760),b=r(8169),m=r(4792),x=r(418);let C=e=>{switch(e){case n.CC.Source.Camera:return 1;case n.CC.Source.Microphone:return 2;case n.CC.Source.ScreenShare:return 3;default:return 0}};
1function S(e){let{controls:t,saveUserChoices:r=!0,capabilities:d,className:u,onSendMessage:f,onChatOpenChange:S,onDisconnect:j,onDeviceError:y,...w}=e,k=(0,s.M)(),[N,z]=o.useState(!1),[D,T]=o.useState(!1),_=k.some(e=>e.isAgent),E=!N||!_||D,{micTrackRef:P,visibleControls:I,cameraToggle:M,microphoneToggle:A,screenShareToggle:V,handleAudioDeviceChange:L,handleVideoDeviceChange:F,handleDisconnect:B}=function(){var e,t,r,a;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{controls:i,saveUserChoices:c=!0}=l,d={leave:!0,...i},{microphoneTrack:u,localParticipant:g}=(0,s.C)(),f=function(){var e;let t=(0,s.A)(),r=e=>!!(null==t?void 0:t.canPublish)&&(0===t.canPublishSources.length||t.canPublishSources.includes(C(e)));return{camera:r(n.CC.Source.Camera),microphone:r(n.CC.Source.Microphone),screenShare:r(n.CC.Source.ScreenShare),data:null!=(e=null==t?void 0:t.canPublishData)&&e}}(),p=(0,x.f)(),v=(0,s.h)({source:n.CC.Source.Microphone,onDeviceError:e=>{var t;return null==(t=l.onDeviceError)?void 0:t.call(l,{source:n.CC.Source.Microphone,error:e})}}),h=(0,s.h)({source:n.CC.Source.Camera,onDeviceError:e=>{var t;return null==(t=l.onDeviceError)?void 0:t.call(l,{source:n.CC.Source.Camera,error:e})}}),b=(0,s.h)({source:n.CC.Source.ScreenShare,onDeviceError:e=>{var t;return null==(t=l.onDeviceError)?void 0:t.call(l,{source:n.CC.Source.ScreenShare,error:e})}}
1),m=h.enabled,S=h.toggle,j=v.enabled,y=v.toggle,w=b.enabled,k=b.toggle,N=o.useMemo(()=>({participant:g,source:n.CC.Source.Microphone,publication:u}),[g,u]);null!=d.microphone||(d.microphone=f.microphone),null!=d.screenShare||(d.screenShare=f.screenShare),null!=d.camera||(d.camera=f.camera),null!=d.chat||(d.chat=f.data);let{saveAudioInputEnabled:z,saveAudioInputDeviceId:D,saveVideoInputEnabled:T,saveVideoInputDeviceId:_}=(0,s.x)({preventSave:!c}),E=o.useCallback(()=>{p&&p.disconnect()},[p]),P=o.useCallback(e=>{D(null!=e?e:"default")},[D]),I=o.useCallback(e=>{_(null!=e?e:"default")},[_]),M=o.useCallback(async e=>{w&&k(!1),await S(e),T(!m)},[m,S,T,w,k]),A=o.useCallback(async e=>{await y(e),z(!j)},[j,y,z]),V=o.useCallback(async e=>{m&&S(!1),await k(e)},[m,S,k]);return{micTrackRef:N,visibleControls:d,cameraToggle:{...h,toggle:M},microphoneToggle:{...v,toggle:A},screenShareToggle:{...b,toggle:V},handleDisconnect:E,handleAudioDeviceChange:P,handleVideoDeviceChange:I}}({controls:t,saveUserChoices:r}),O=async e=>{T(!0);try{await (null==f?void 0:f(e))}finally{T(!1)}};return o.useEffect(()=>{null==S||S(N)},[N,S]),(0,a.jsxs)("div",{"aria-label":"Voice assistant controls",className:(0,g.cn)("bg-background border-bg2 dark:border-separator1 flex flex-col rounded-[31px] border p-3 drop-shadow-md/3",u),...w,children:[d.supportsChatInput&&(0,a.jsxs)("div",{inert:!N,className:(0,g.cn)("overflow-hidden transition-[height] duration-300 ease-out",N?"h-[57px]":"h-0"),children:[(0,a.jsx)("div",{className:"flex h-8 w-full",children:(0,a.jsx)(v,{onSend:O,disabled:E,className:"w-full"})}),(0,a.jsx)("hr",{className:"border-bg2 my-3"})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between gap-1",children:[(0,a.jsxs)("div",{className:"flex gap-1",children:[I.microphone&&(0,a.jsxs)("div",{className:"flex items-center gap-0",children:[(0,a.jsx)(m.TrackToggle,{variant:"primary",source:n.CC.Source.Microphone,pressed:A.enabled,disabled:A.pending,onPressedChange:A.toggle,className:"peer/track group/track relative w-auto pr-3 pl-3 md:rounded-r-none md:border-r-0 md:pr-2",children:(0,a.jsx)(l.B,{barCount:3,trackRef:P,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-0.5",children:(0,a.jsx)("span",{className:(0,g.cn)(["h-full w-0.5 origin-center rounded-2xl","group-data-[state=on]/track:bg-fg1 group-data-[state=off]/track:bg-destructive-foreground","data-lk-muted:bg-muted"])})})}),(0,a.jsx)("hr",{className:"bg-separator1 peer-data-[state=off]/track:bg-separatorSerious relative z-10 -mr-px hidden h-4 w-px md:block"}),(0,a.jsx)(b.DeviceSelect,{size:"sm",kind:"audioinput",onError:e=>null==y?void 0:y({source:n.CC.Source.Microphone,error:e}),onActiveDeviceChange:L,className:(0,g.cn)(["pl-2","peer-data-[state=off]/track:text-destructive-foreground","hover:text-fg1 focus:text-fg1","hover:peer-data-[state=off]/track:text-destructive-foreground focus:peer-data-[state=off]/track:text-destructive-foreground","hidden rounded-l-none md:block"])})]}),d.supportsVideoInput&&I.camera&&(0,a.jsxs)("div",{className:"flex items-center gap-0",children:[(0,a.jsx)(m.TrackToggle,{variant:"primary",source:n.CC.Source.Camera,pressed:M.enabled,pending:M.pending,disabled:M.pending,onPressedChange:M.toggle,className:"peer/track relative w-auto rounded-r-none pr-3 pl-3 disabled:opacity-100 md:border-r-0 md:pr-2"}),(0,a.jsx)("hr",{className:"bg-separator1 peer-data-[state=off]/track:bg-separatorSerious relative z-10 -mr-px hidden h-4 w-px md:block"}),(0,a.jsx)(b.DeviceSelect,{size:"sm",kind:"videoinput",onError:e=>null==y?void 0:y({source:n.CC.Source.Camera,error:e}),onActiveDeviceChange:F,className:(0,g.cn)(["pl-2","peer-data-[state=off]/track:text-destructive-foreground","hover:text-fg1 focus:text-fg1","hover:peer-data-[state=off]/track:text-destructive-foreground focus:peer-data-[state=off]/track:text-destructive-foreground","rounded-l-none"])})]}),d.supportsScreenShare&&I.screenShare&&(0,a.jsx)("div",{className:"flex items-center gap-0",children:(0,a.jsx)(m.TrackToggle,{variant:"secondary",source:n.CC.Source.ScreenShare,pressed:V.enabled,disabled:V.pending,onPressedCh
1ange:V.toggle,className:"relative w-auto"})}),I.chat&&(0,a.jsx)(h.Toggle,{variant:"secondary","aria-label":"Toggle chat",pressed:N,onPressedChange:z,disabled:!_,className:"aspect-square h-full",children:(0,a.jsx)(i.$,{weight:"bold"})})]}),I.leave&&(0,a.jsxs)(p,{variant:"destructive",onClick:()=>{B(),null==j||j()},className:"font-mono",children:[(0,a.jsx)(c.c,{weight:"bold"}),(0,a.jsx)("span",{className:"hidden md:inline",children:"END CALL"}),(0,a.jsx)("span",{className:"inline md:hidden",children:"END"})]})]})]})}},7568:(e,t,r)=>{r.d(t,{Select:()=>c,SelectContent:()=>g,SelectItem:()=>f,SelectTrigger:()=>u,SelectValue:()=>d});var a=r(5306);r(2274);var o=r(6407),n=r(4877),s=r(5212),l=r(1150),i=r(7874);function c(e){let{...t}=e;return(0,a.jsx)(l.bL,{"data-slot":"select",...t})}function d(e){let{...t}=e;return(0,a.jsx)(l.WT,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:r="default",children:n,...s}=e;return(0,a.jsxs)(l.l9,{"data-slot":"select-trigger","data-size":r,className:(0,i.cn)(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 outline-none focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","data-[placeholder]:text-muted-foreground","data-[size=default]:h-9 data-[size=sm]:h-8","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],t),...s,children:[n,(0,a.jsx)(l.In,{asChild:!0,children:(0,a.jsx)(o.b,{weight:"bold",className:"size-4 transition-colors"})})]})}function g(e){let{className:t,children:r,position:o="popper",...n}=e;return(0,a.jsx)(l.ZL,{children:(0,a.jsxs)(l.UC,{"data-slot":"select-content",className:(0,i.cn)(["bg-popover text-popover-foreground relative z-50 overflow-x-hidden overflow-y-auto rounded-md border drop-shadow-xl/5","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],"popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...n,children:[(0,a.jsx)(p,{}),(0,a.jsx)(l.LM,{className:(0,i.cn)("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),(0,a.jsx)(v,{})]})})}function f(e){let{className:t,children:r,...o}=e;return(0,a.jsxs)(l.q7,{"data-slot":"select-item",className:(0,i.cn)(["relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],t),...o,children:[(0,a.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(l.VF,{children:(0,a.jsx)(n.S,{className:"size-4",weight:"bold"})})}),(0,a.jsx)(l.p4,{children:r})]})}function p(e){let{className:t,...r}=e;return(0,a.jsx)(l.PP,{"data-slot":"select-scroll-up-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(s.S,{className:"size-4",weight:"bold"})})}function v(e){let{className:t,...r}=e;return(0,a.jsx)(l.wn,{"data-slot":"select-scroll-down-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(o.b,{className:"size-4",weight:"bold"})})}},7874:(e,t,r)=>{r.d(t,{uj:()=>u,wN:()=>d,cn:()=>g});
1var a=r(2274),o=r(2042),n=r(6541);let s={companyName:"LiveKit",pageTitle:"LiveKit Drive Thru Agent",pageDescription:"A Drive Thru agent built with LiveKit",supportsChatInput:!0,supportsVideoInput:!0,supportsScreenShare:!0,isPreConnectBufferEnabled:!0,logo:"/lk-logo.svg",accent:"#002cf2",logoDark:"/lk-logo-dark.svg",accentDark:"#1fd5f9",startButtonText:"Start Drive Thru",agentName:"devday-drive-thru-agent"};var l=r(1892);let i=l.env.NEXT_PUBLIC_APP_CONFIG_ENDPOINT,c=l.env.SANDBOX_ID,d="theme-mode",u="(prefers-color-scheme: dark)";function g(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.twMerge)((0,o.$)(t))}(0,a.cache)(async e=>{if(i){let t=null!=c?c:e.split(".")[0];try{let e=await fetch(i,{cache:"no-store",headers:{"X-Sandbox-ID":t}}),r=await e.json(),a={...s};for(let[e,t]of Object.entries(r))null!==t&&e in a&&typeof a[e]===t.type&&typeof a[e]==typeof t.value&&(a[e]=t.value);return a}catch(e){console.error("!!!",e)}}return s})},8169:(e,t,r)=>{r.d(t,{DeviceSelect:()=>d});var a=r(5306),o=r(1516),n=r(418),s=r(3606),l=r(7568),i=r(7874);let c=(0,o.F)(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function d(e){let{kind:t,track:r,requestPermissions:o,onError:d,...u}=e,g=u.size||"default",f=(0,n.w)(),{devices:p,activeDeviceId:v,setActiveMediaDevice:h}=(0,s.e)({kind:t,room:f,track:r,requestPermissions:o,onError:d});return(0,a.jsxs)(l.Select,{value:v,onValueChange:h,children:[(0,a.jsx)(l.SelectTrigger,{className:(0,i.cn)(c({size:g}),u.className),children:"sm"!==g&&(0,a.jsx)(l.SelectValue,{className:"font-mono text-sm",placeholder:"Select a ".concat(t)})}),(0,a.jsx)(l.SelectContent,{children:p.map(e=>(0,a.jsx)(l.SelectItem,{value:e.deviceId,className:"font-mono text-xs",children:e.label},e.deviceId))})]})}}}]);

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.