@vanira/sdk 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -0
- package/dist/chunks/html2canvas.js +6 -0
- package/dist/headless/index.cjs +489 -0
- package/dist/headless/index.d.ts +30 -0
- package/dist/headless/index.js +6437 -0
- package/dist/index.d.ts +176 -0
- package/dist/platforms/browser.cjs +8 -0
- package/dist/platforms/browser.d.ts +26 -0
- package/dist/platforms/browser.js +1540 -0
- package/dist/platforms/react-native.cjs +1 -0
- package/dist/platforms/react-native.d.ts +6 -0
- package/dist/platforms/react-native.js +1185 -0
- package/dist/vanira-sdk.es.js +11475 -0
- package/dist/vanira-sdk.js +3031 -0
- package/dist/vanira-sdk.umd.js +3302 -0
- package/package.json +92 -0
|
@@ -0,0 +1,3302 @@
|
|
|
1
|
+
"use strict";var wn=Object.defineProperty;var xn=(n,e,t)=>e in n?wn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var p=(n,e,t)=>xn(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),B=require("react/jsx-runtime");var pt=typeof document<"u"?document.currentScript:null;const je="https://api.vanira.io",y={Form:"vanira_form",Calendar:"vanira_calendar",Navigate:"vanira_navigate",Upload:"vanira_upload",Camera:"vanira_camera",HighlightElement:"vanira_highlight_element",ClickElement:"vanira_click_element",SelectOption:"vanira_select_option",SetDate:"vanira_set_date",TypeText:"vanira_type_text",EraseText:"vanira_erase_text",Draw:"vanira_draw",EraseDraw:"vanira_erase_draw",LiveVision:"vanira_live_vision",CloseLiveCamera:"vanira_close_live_camera",LiveScreen:"vanira_live_screen",CloseLiveScreen:"vanira_close_live_screen",ClipRegion:"vanira_clip_region",TabScreenshot:"vanira_tab_screenshot",ScreenInk:"vanira_screen_ink",ScreenCursor:"vanira_screen_cursor",ScreenClick:"vanira_screen_click",ClearScreenOverlay:"vanira_clear_screen_overlay",PageScan:"vanira_page_scan",PointAt:"vanira_point_at",OutlineTargets:"vanira_outline_targets",ClearGuide:"vanira_clear_guide"},Ai=Object.values(y),Cn=new Set(Ai),yi=new Set([y.Camera,y.LiveVision,y.LiveScreen]),bi=new Set([y.Navigate,y.HighlightElement,y.ClickElement,y.SelectOption,y.SetDate,y.TypeText,y.EraseText,y.Draw,y.EraseDraw,y.LiveVision,y.CloseLiveCamera,y.LiveScreen,y.CloseLiveScreen,y.TabScreenshot,y.ScreenInk,y.ScreenCursor,y.ScreenClick,y.ClearScreenOverlay,y.PageScan,y.PointAt,y.OutlineTargets,y.ClearGuide]),wi=new Set([y.TypeText,y.EraseText,y.Draw,y.EraseDraw]),xi=new Set([]);function X(n){return!!n&&Cn.has(n)}function Ci(n){return X(n)&&bi.has(n)}function xt(n){return X(n)&&wi.has(n)}function Ee(n){return X(n)&&yi.has(n)}const En=new Set([y.Form,y.Calendar]);function ke(n){return X(n)&&En.has(n)}function Ue(n,e,t){return t!=null&&t.action_name?String(t.action_name):n===y.Calendar?"calendar_slot_selected":`user_submitted_${e||"collect_user_data"}`}function Se(n){return X(n)&&!Ee(n)&&!ke(n)}function kn(n){return Se(n)}function Sn(n){return X(n)&&xi.has(n)}const Ei=new Set([y.ScreenInk,y.ScreenCursor,y.ScreenClick,y.ClearScreenOverlay,y.PointAt,y.OutlineTargets,y.ClearGuide]),Bn=new Set([...Ei,y.PageScan,y.TabScreenshot]);function ki(n){return X(n)&&Ei.has(n)}function In(n){return X(n)&&Bn.has(n)}function Si(n){if(typeof n=="string")try{return JSON.parse(n)}catch{return{}}return n&&typeof n=="object"?n:{}}const Gt={type_on_whiteboard:y.TypeText,write_on_whiteboard:y.TypeText,write_on_white_board:y.TypeText,dom_typing_simulation:y.TypeText,erase_text:y.EraseText,dom_erase:y.EraseText,draw_on_board:y.Draw,erase_drawing_board:y.EraseDraw,open_live_camera:y.LiveVision,live_vision:y.LiveVision,close_live_camera:y.CloseLiveCamera,stop_live_camera:y.CloseLiveCamera,open_live_screen:y.LiveScreen,close_live_screen:y.CloseLiveScreen,screen_ink:y.ScreenInk,screen_cursor:y.ScreenCursor,screen_click:y.ScreenClick,clear_screen_overlay:y.ClearScreenOverlay,tab_screenshot:y.TabScreenshot,capture_tab:y.TabScreenshot,capture_tab_screenshot:y.TabScreenshot,screenshot_tab:y.TabScreenshot,page_scan:y.PageScan,scan_page:y.PageScan,point_at:y.PointAt,outline_targets:y.OutlineTargets,outline_elements:y.OutlineTargets,clear_guide:y.ClearGuide};function Ft(n,e){const t=n.text_to_type??(e==null?void 0:e.text_to_type)??n.text??(e==null?void 0:e.text)??n.value??(e==null?void 0:e.value);return typeof t=="string"&&t.trim().length>0}function Mn(n,e){const t=n.fields??(e==null?void 0:e.fields);return Array.isArray(t)?t.length>0:typeof t=="string"?t.split(",").map(i=>i.trim()).filter(Boolean).length>0:!1}function Bi(n,e){const t=n==null?void 0:n.preset_id;if(typeof t=="string"&&X(t))return t;const s=Si(e).preset_id;if(typeof s=="string"&&X(s))return s}function Be(n,e,t){const i=Si(e);let s=Bi(n,i);if(s===y.Form&&Ft(i,n)&&!Mn(i,n))return y.TypeText;if(s)return s;const r=String(t??"").trim().toLowerCase();if(r&&Gt[r])return Gt[r];if(Ft(i,n))return y.TypeText}const et="vanira_latest_call_id",Ct="vanira_prospect_id";function tt(n){return`vanira_latest_call_id_${n}`}function it(n){return`vanira_prospect_id_${n}`}function Ii(n){return`vanira_call_meta_${n}`}function ce(n,e){if(!n)return null;try{return n.getItem(e)}catch{return null}}function Oe(n){if(typeof window>"u"||!n)return null;const e=[],t=ce(window.localStorage,Ii(n));if(t)try{const a=JSON.parse(t);a!=null&&a.callId&&e.push({callId:a.callId,prospectId:a.prospectId,updatedAt:a.updatedAt||0})}catch{}const i=(a,l,c)=>{a&&e.push({callId:a,prospectId:l||void 0,updatedAt:c})},s=ce(window.localStorage,it(n)),r=ce(window.sessionStorage,it(n)),o=ce(window.localStorage,Ct);return i(ce(window.localStorage,tt(n)),s||o,2),i(ce(window.sessionStorage,tt(n)),r||o,1),i(ce(window.localStorage,et),o,0),i(ce(window.sessionStorage,et),o,0),e.length?(e.sort((a,l)=>l.updatedAt-a.updatedAt),e[0]):null}function Nt(n,e,t){var s,r,o,a,l,c,h,d,g;if(typeof window>"u"||!n||!e)return;const i={callId:e,prospectId:t,updatedAt:Date.now()};try{(s=window.localStorage)==null||s.setItem(Ii(n),JSON.stringify(i)),(r=window.localStorage)==null||r.setItem(tt(n),e),(o=window.sessionStorage)==null||o.setItem(tt(n),e),t&&((a=window.localStorage)==null||a.setItem(it(n),t),(l=window.sessionStorage)==null||l.setItem(it(n),t)),(c=window.localStorage)==null||c.setItem(et,e),(h=window.sessionStorage)==null||h.setItem(et,e),t&&((d=window.localStorage)==null||d.setItem(Ct,t),(g=window.sessionStorage)==null||g.setItem(Ct,t))}catch{}}function Qt(n){var e;return!!((e=Oe(n))!=null&&e.callId)}const Tn=new Set(["client_tool_call","clearAudio","client_tool_cancel"]);function Mi(n){if(!n||typeof n!="object")return!1;const e=n.event;return typeof e=="string"&&Tn.has(e)}const ut=16*1024,Dn=256*1024;function gt(n,e){return(n==null?void 0:n.readyState)==="open"&&(e==null?void 0:e.readyState)==="open"}function Pn(n,e){return{control:(n==null?void 0:n.readyState)??"missing",mediaBytes:(e==null?void 0:e.readyState)??"missing"}}async function Ln(n,e,t=8e3){if(gt(n,e))return!0;const i=Date.now()+t;for(;Date.now()<i;){if(gt(n,e))return!0;await new Promise(s=>setTimeout(s,50))}return gt(n,e)}async function Vt(n){for(;n.bufferedAmount>Dn;)await new Promise(e=>setTimeout(e,10))}async function Nn(n){const{bytes:e,filename:t,contentType:i,reason:s,message:r,callId:o,mediaBytesChannel:a,sendControlEvent:l,uploadId:c=crypto.randomUUID(),uploadKind:h="media"}=n,d=e.byteLength,g=d===0?0:Math.ceil(d/ut);l("client_media_upload_start",{data:{upload_id:c,call_id:o,reason:s,message:r,filename:t,content_type:i,size:d,chunk_count:g,upload_kind:h}});const u=new Uint8Array(e);for(let m=0;m<d;m+=ut){await Vt(a);const A=Math.min(m+ut,d);a.send(u.subarray(m,A))}return await Vt(a),l("client_media_upload_complete",{data:{upload_id:c,call_id:o,reason:s,message:r,chunk_count:g,upload_kind:h}}),{media_id:c,url:"",content_type:i}}async function Qn(n){return typeof n.arrayBuffer=="function"?n.arrayBuffer():new Response(n).arrayBuffer()}let ge=null;const Rn=4e3;function Rt(n){if(typeof window>"u")return n||"/";const e=(n||"/").trim();if(!e)return"/";try{const t=new URL(e,window.location.origin);return t.origin!==window.location.origin?e:`${t.pathname}${t.search}${t.hash}`||"/"}catch{return e.startsWith("/")?e:`/${e}`}}function Ti(n,e){ge={targetRoute:Rt(n),presetId:e==null?void 0:e.presetId,toolName:e==null?void 0:e.toolName,expiresAt:Date.now()+Rn}}function zn(n){if(!ge)return null;if(Date.now()>ge.expiresAt)return ge=null,null;const e=Rt(n),t=ge.targetRoute;if(!(e===t||e.startsWith(t.split("#")[0])||t.startsWith(e.split("#")[0])))return null;const s=ge;return ge=null,s}function Qe(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`||"/"}class Di{constructor(e){p(this,"active",!1);p(this,"initialSent",!1);p(this,"lastRoute","");p(this,"sendContext");p(this,"isReady");p(this,"cleanupFns",[]);p(this,"initialRetryTimer",null);p(this,"routePollTimer",null);p(this,"originalPushState",null);p(this,"originalReplaceState",null);this.sendContext=e.sendContext,this.isReady=e.isReady??(()=>!0)}start(){typeof window>"u"||this.active||(this.active=!0,this.initialSent=!1,this.lastRoute=Qe(),this.attachListeners(),this.scheduleInitialContextSend())}stop(){if(!(!this.active&&this.cleanupFns.length===0)){this.active=!1,this.initialSent=!1,this.initialRetryTimer!==null&&(clearTimeout(this.initialRetryTimer),this.initialRetryTimer=null),this.routePollTimer!==null&&(clearInterval(this.routePollTimer),this.routePollTimer=null);for(const e of this.cleanupFns)try{e()}catch{}this.cleanupFns.length=0,this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null)}}onChannelReady(){this.scheduleInitialContextSend()}scheduleInitialContextSend(e=0){if(!(!this.active||this.initialSent)){if(this.isReady()){this.sendRouteContext("call_started"),this.initialSent=!0;return}e>=30||(this.initialRetryTimer=window.setTimeout(()=>this.scheduleInitialContextSend(e+1),100))}}attachListeners(){const e=(r,o=0)=>{const a=()=>{const l=Qe();l!==this.lastRoute&&this.handleRouteChange(l,r)};o>0?window.setTimeout(a,o):queueMicrotask(a)},t=()=>e("popstate"),i=()=>e("hashchange"),s=r=>{const o=r.detail;if((o==null?void 0:o.initiated_by)==="agent"){e("vanira_navigate_agent",120);return}e("vanira_navigate",120)};window.addEventListener("popstate",t),window.addEventListener("hashchange",i),window.addEventListener("vanira:navigate",s),this.cleanupFns.push(()=>window.removeEventListener("popstate",t),()=>window.removeEventListener("hashchange",i),()=>window.removeEventListener("vanira:navigate",s)),this.originalPushState=history.pushState.bind(history),this.originalReplaceState=history.replaceState.bind(history),history.pushState=(...r)=>{this.originalPushState(...r),e("pushState")},history.replaceState=(...r)=>{this.originalReplaceState(...r),e("replaceState")},this.routePollTimer=window.setInterval(()=>{if(!this.active)return;const r=Qe();r!==this.lastRoute&&this.handleRouteChange(r,"location_poll")},1e3)}handleRouteChange(e,t){if(!this.active)return;const i=this.lastRoute;if(i===e)return;if(this.lastRoute=e,!this.initialSent){this.scheduleInitialContextSend();return}!this.isReady()||zn(e)||this.sendRouteContext("route_changed",i,t,"user")}sendRouteContext(e,t,i,s="user"){const r=Qe();this.lastRoute=r;const o={ui_state:"page_navigation",navigation_led_by:s,current_route:r,current_page:r,user_action:e==="call_started"?"call_started_on_page":"user_navigated"};e==="call_started"?o.message=`User started the call while viewing ${r}.`:(o.previous_route=t??"",o.message=`User navigated from ${t||"(unknown)"} to ${r}.`,i&&(o.navigation_source=i));try{this.sendContext(o)}catch{}}}const ae=class ae{constructor(e){p(this,"serverUrl");p(this,"agentId");p(this,"callId");p(this,"prospectId");p(this,"apiKey");p(this,"backendUrl");p(this,"token");p(this,"onConnected");p(this,"onDisconnected");p(this,"onError");p(this,"onTranscription");p(this,"onLocalStream");p(this,"onRemoteTrack");p(this,"onClientToolCall");p(this,"onSessionStarted");p(this,"sessionStartedEmitted",!1);p(this,"pc",null);p(this,"dataChannel",null);p(this,"mediaBytesChannel",null);p(this,"audioElement",null);p(this,"localStream",null);p(this,"micMuted",!1);p(this,"connected",!1);p(this,"icePollInterval",null);p(this,"appliedRemoteCandidates",new Set);p(this,"iceServers");p(this,"callSessionLoaded",!1);p(this,"connectGeneration",0);p(this,"runtime");p(this,"sessionBehavior");p(this,"routeTracker",null);p(this,"_status","idle");p(this,"listeners",new Map);p(this,"liveVision");p(this,"liveVisionAutoStarted",!1);if(!e.agentId)throw new Error("agentId is required");const t=!!(e.apiKey||e.token),i=!!(e.serverUrl&&e.callId),s=ae.normalizeIceServers(e.iceServers);if(!t&&!i)throw new Error("apiKey or token is required — or pass serverUrl and callId from a prior POST /calls/create");this.agentId=e.agentId,this.sessionBehavior=e.sessionBehavior,this.serverUrl=(e.serverUrl||"").replace(/\/$/,""),this.apiKey=e.apiKey,this.token=e.token,this.backendUrl=(e.backendUrl||je).replace(/\/$/,""),s.length&&(this.iceServers=s),i&&(this.callSessionLoaded=!0);const r=typeof window<"u";this.prospectId=e.prospectId;const o=e.sessionBehavior==="continue";if(o&&r&&!e.callId){const l=Oe(this.agentId);l&&(e.callId||(this.callId=l.callId),!this.prospectId&&l.prospectId&&(this.prospectId=l.prospectId))}if(!this.prospectId&&r)try{const l=Oe(this.agentId);this.prospectId=(l==null?void 0:l.prospectId)||window.sessionStorage&&window.sessionStorage.getItem("vanira_prospect_id")||window.localStorage&&window.localStorage.getItem("vanira_prospect_id")||void 0}catch{}e.callId?this.callId=e.callId:o||(this.callId=void 0);const a=e.onSessionStarted;this.onSessionStarted=l=>{a==null||a(l),this.emit("session_started",l)},this.liveVision=e.liveVision,this.onConnected=()=>{var l;this._status="connected",(l=e.onConnected)==null||l.call(e),this.emit("connected"),this.maybeAutoStartLiveCamera()},this.onDisconnected=()=>{var l;this._status="disconnected",(l=e.onDisconnected)==null||l.call(e),this.emit("disconnected")},this.onError=l=>{var h;this._status="error";const c=typeof l=="string"?l:(l==null?void 0:l.message)||"Connection error";(h=e.onError)==null||h.call(e,l),this.emit("error",c)},this.onTranscription=(l,c)=>{var h;(h=e.onTranscription)==null||h.call(e,l,c),this.emit("transcription",{text:l,isFinal:c})},this.onLocalStream=e.onLocalStream||(()=>{}),this.onRemoteTrack=(l,c)=>{var h;(h=e.onRemoteTrack)==null||h.call(e,l,c),this.emit("track",{track:l,stream:c})},this.onClientToolCall=l=>{var d;(d=e.onClientToolCall)==null||d.call(e,l);const c=(l==null?void 0:l.data)||l,h={name:String(c.name||c.tool_name||""),arguments:c.arguments||c.args||{},tool_call_id:String(c.tool_call_id||c.call_id||""),execution_mode:c.execution_mode==="blocking"?"blocking":"fire_and_forget",client_fields:c.client_fields||{}};h.name&&h.tool_call_id&&this.emit("tool_call",h)},this.runtime=e.runtime,typeof window<"u"&&e.trackRouteContext!==!1&&(this.routeTracker=new Di({sendContext:l=>this.sendContextUpdate(l),isReady:()=>{var l;return((l=this.dataChannel)==null?void 0:l.readyState)==="open"}}))}async createCall(){return this.connect()}async connect(){var t;this._status="connecting";const e=++this.connectGeneration;if(await this.loadCallSession(),!this.isConnectCancelled(e)){if(!this.serverUrl)throw new Error("[VaniraClient] worker_url missing from /calls/create");if(!this.callId)throw new Error("[VaniraClient] call_id missing — must come from POST /calls/create");if(this.onSessionStarted&&this.prospectId&&this.callId&&!this.sessionStartedEmitted)try{this.onSessionStarted({prospectId:this.prospectId,callId:this.callId,serverUrl:this.serverUrl}),this.sessionStartedEmitted=!0}catch{}try{this.appliedRemoteCandidates.clear(),this.stopRemoteIcePolling();const i=this.getIceServers();this.pc=new RTCPeerConnection({iceServers:i,iceTransportPolicy:"all"});let s;try{s=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,sampleRate:{ideal:16e3},channelCount:1}})}catch(d){if(d.name==="NotAllowedError"||d.name==="PermissionDeniedError"||(t=d.message)!=null&&t.includes("Permission denied")){const g=navigator.userAgent,u=/iPad|iPhone|iPod/.test(g)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;let m="Microphone access denied. Please allow microphone access in your browser settings.";u&&(g.includes("CriOS")?m="Microphone access blocked. Please enable it in iOS Settings > Chrome > Microphone, then reload the page.":g.includes("FxiOS")?m="Microphone access blocked. Please enable it in iOS Settings > Firefox > Microphone, then reload the page.":m="Microphone access blocked. Please enable it in iOS Settings > Safari > Microphone (or tap 'aA' > Website Settings > Allow Microphone).");const A=new Error(m);throw A.name=d.name,A}throw d}if(this.isConnectCancelled(e)){s.getTracks().forEach(d=>d.stop());return}if(this.localStream=s,!this.pc||this.isConnectCancelled(e)){s.getTracks().forEach(d=>d.stop());return}if(this.onLocalStream(s),s.getTracks().forEach(d=>{var g;(g=this.pc)==null||g.addTrack(d,s)}),!this.pc)throw new Error("RTCPeerConnection was closed unexpectedly");this.dataChannel=this.pc.createDataChannel("control"),this.dataChannel.onopen=()=>{var d;(d=this.routeTracker)==null||d.onChannelReady()},this.dataChannel.onmessage=d=>{if(typeof d.data=="string")try{this.handleControlEvent(JSON.parse(d.data))}catch{}else if(d.data instanceof ArrayBuffer)try{const g=new TextDecoder().decode(d.data);try{const u=JSON.parse(g);Mi(u)&&this.handleControlEvent(u)}catch{}}catch{}else d.data instanceof Blob&&d.data.text().then(g=>{try{this.handleControlEvent(JSON.parse(g))}catch{}})},this.dataChannel.onerror=d=>{},this.mediaBytesChannel=this.pc.createDataChannel("media-bytes",{ordered:!0}),this.mediaBytesChannel.binaryType="arraybuffer",this.mediaBytesChannel.onopen=()=>{},this.mediaBytesChannel.onerror=d=>{},this.pc.ontrack=d=>{const g=d.track,u=d.streams[0];g.kind==="audio"?(this.audioElement=new Audio,this.audioElement.srcObject=u,this.audioElement.play().catch(m=>{}),this.audioElement.onended=()=>{this.sendEvent("playedStream"),typeof window<"u"&&window.dispatchEvent(new CustomEvent("vanira:agent-playback-ended"))},this.onRemoteTrack(g,u)):g.kind==="video"&&this.onRemoteTrack(g,u)};const r=()=>{var u,m,A,v,f,b,C,w,x,E,k;const d=((u=this.pc)==null?void 0:u.connectionState)==="connected"||((m=this.pc)==null?void 0:m.iceConnectionState)==="connected"||((A=this.pc)==null?void 0:A.iceConnectionState)==="completed",g=((v=this.pc)==null?void 0:v.connectionState)==="failed"||((f=this.pc)==null?void 0:f.iceConnectionState)==="failed"||((b=this.pc)==null?void 0:b.connectionState)==="closed"||((C=this.pc)==null?void 0:C.iceConnectionState)==="closed"||((w=this.pc)==null?void 0:w.connectionState)==="disconnected"||((x=this.pc)==null?void 0:x.iceConnectionState)==="disconnected";((E=this.pc)==null?void 0:E.connectionState)==="connected"&&this.stopRemoteIcePolling(),d&&!this.connected?(this.connected=!0,(k=this.routeTracker)==null||k.start(),this.onConnected()):g&&this.connected&&(this.connected=!1,this.liveVisionAutoStarted=!1,this.onDisconnected())};this.pc.onconnectionstatechange=r,this.pc.oniceconnectionstatechange=r;const o=this.getIceTrickleUrl();this.pc.onicecandidate=d=>{d.candidate&&fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({candidate:d.candidate.toJSON()})}).catch(g=>{})};const a=await this.pc.createOffer();if(this.isConnectCancelled(e)||(await this.pc.setLocalDescription(a),this.isConnectCancelled(e)))return;const l=this.serverUrl.includes("?")?this.serverUrl:`${this.serverUrl}/webrtc?agent=${this.agentId}_${this.callId}`,c=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({offer:this.pc.localDescription,agentId:this.agentId,callId:this.callId})});if(this.isConnectCancelled(e))return;if(!c.ok){const d=await c.json();throw new Error(d.error||`HTTP ${c.status}`)}const{answer:h}=await c.json();if(this.isConnectCancelled(e)||!this.pc||(await this.pc.setRemoteDescription(h),this.isConnectCancelled(e)))return;this.startRemoteIcePolling(o)}catch(i){if(this.isConnectCancelled(e))return;throw this.disconnect(),this.onError(i.message||i),i}}}createCallCacheKey(e,t){const i=this.apiKey?`key:${this.apiKey.slice(0,16)}`:`token:${(this.token||"").slice(-16)}`;return[this.backendUrl,this.agentId,e,t||"",this.prospectId||"",i].join("|")}async postCreateCall(e,t,i){var a,l,c;const s=await fetch(`${this.backendUrl}/calls/create`,{method:"POST",headers:e,body:JSON.stringify({agent_id:this.agentId,type:((a=this.runtime)==null?void 0:a.callType)||"web",mode:t,...(l=this.runtime)!=null&&l.runtimeName?{runtime:this.runtime.runtimeName}:{},prospect_id:this.prospectId,...i?{call_id:i}:{}})});if(!s.ok){const h=await s.json().catch(()=>({}));throw new Error(`[VaniraClient] createCall failed (${s.status}): ${((c=h==null?void 0:h.detail)==null?void 0:c.message)||(h==null?void 0:h.message)||s.statusText}`)}const r=await s.json();if(!r.call_id||!r.worker_url)throw new Error("[VaniraClient] /calls/create response missing call_id or worker_url");const o=ae.normalizeIceServers(r.ice_servers);if(!o.length)throw new Error("[VaniraClient] /calls/create response missing ice_servers");return{callId:r.call_id,prospectId:r.prospect_id||this.prospectId,serverUrl:r.worker_url.replace(/\/$/,""),iceServers:o}}applyCreateCallSession(e){if(this.callId=e.callId,this.prospectId=e.prospectId||this.prospectId,this.serverUrl=e.serverUrl,this.iceServers=e.iceServers,this.callSessionLoaded=!0,Nt(this.agentId,this.callId||"",this.prospectId),this.onSessionStarted&&this.prospectId&&this.callId&&!this.sessionStartedEmitted)try{this.onSessionStarted({prospectId:this.prospectId,callId:this.callId,serverUrl:this.serverUrl}),this.sessionStartedEmitted=!0}catch{}}async loadCallSession(){if(this.callSessionLoaded)return;if(this.serverUrl&&this.callId){this.callSessionLoaded=!0;return}if(!this.apiKey&&!this.token)throw new Error("[VaniraClient] apiKey or token is required to create a call session");const e={"Content-Type":"application/json"};this.apiKey?e["X-API-Key"]=this.apiKey:this.token&&(e.Authorization=this.token.startsWith("Bearer ")?this.token:`Bearer ${this.token}`);const t=this.sessionBehavior==="continue"?this.callId:void 0,i=this.sessionBehavior==="continue"?"continue":"new",s=this.createCallCacheKey(i,t);let r=ae.inflightCreates.get(s);r||(r=this.postCreateCall(e,i,t),ae.inflightCreates.set(s,r),r.finally(()=>{ae.inflightCreates.get(s)===r&&ae.inflightCreates.delete(s)}));const o=await r;this.applyCreateCallSession(o)}getIceServers(){var e;if((e=this.iceServers)!=null&&e.length)return this.iceServers;throw new Error("[VaniraClient] ice_servers missing — pass iceServers from POST /calls/create")}static normalizeIceServers(e){if(!Array.isArray(e))return[];const t=[];for(const i of e){const s=i==null?void 0:i.urls,r=Array.isArray(s)?s.filter(Boolean):typeof s=="string"&&s.trim()?[s.trim()]:[];if(!r.length)continue;const o={urls:r.length===1?r[0]:r},a=i.username,l=i.credential;a&&(o.username=a),l&&(o.credential=l),t.push(o)}return t}getWorkerOrigin(){var e;if(!((e=this.serverUrl)!=null&&e.trim()))return"";try{return new URL(this.serverUrl).origin}catch{return this.serverUrl.replace(/\/webrtc.*$/,"").replace(/\/$/,"")}}getIceTrickleUrl(){try{const e=new URL(this.serverUrl);return e.pathname.endsWith("/webrtc")?e.pathname=`${e.pathname}/ice`:e.pathname="/webrtc/ice",e.toString()}catch{return`${this.getWorkerOrigin()}/webrtc/ice?agent_id=${this.agentId}&call_id=${this.callId}`}}startRemoteIcePolling(e){this.stopRemoteIcePolling(),this.icePollInterval=setInterval(async()=>{if(!this.pc){this.stopRemoteIcePolling();return}if(this.pc.connectionState==="connected"){this.stopRemoteIcePolling();return}try{const t=await fetch(e);if(!t.ok)return;const{candidates:i}=await t.json();for(const s of i||[]){const r=JSON.stringify(s);if(!this.appliedRemoteCandidates.has(r)){this.appliedRemoteCandidates.add(r);try{await this.pc.addIceCandidate(s)}catch{}}}}catch{}},150)}stopRemoteIcePolling(){this.icePollInterval!==null&&(clearInterval(this.icePollInterval),this.icePollInterval=null)}sendEvent(e,t={}){var i;if(((i=this.dataChannel)==null?void 0:i.readyState)==="open"){const s={event:e,...t};this.dataChannel.send(JSON.stringify(s))}}async sendEventWhenReady(e,t={},i=1e4){var r;const s=Date.now()+i;for(;Date.now()<s;){if(((r=this.dataChannel)==null?void 0:r.readyState)==="open")return this.sendEvent(e,t),!0;await new Promise(o=>setTimeout(o,50))}return!1}startLiveCamera(e={}){const t={...this.liveVision,...e};this.emit("tool_call",this.buildOpenLiveCameraToolCall(t))}buildOpenLiveCameraToolCall(e={}){const t=e.scope??"until_call_end";return{name:"open_live_camera",tool_call_id:`lv_${crypto.randomUUID()}`,execution_mode:"fire_and_forget",client_fields:{preset_id:y.LiveVision},arguments:{mode:"live",scope:t,target_fps:e.target_fps??1,max_fps:e.max_fps??3,max_width:e.max_width??640,reason:e.reason??"camera_capture",facing_mode:e.facing_mode??"environment",show_preview:e.show_preview??!0,...t==="timed"&&e.duration_sec?{duration_sec:e.duration_sec}:{}}}}maybeAutoStartLiveCamera(){const e=this.liveVision;!(e!=null&&e.enabled)||e.scope!=="full_call"||this.liveVisionAutoStarted||(this.liveVisionAutoStarted=!0,this.emit("tool_call",this.buildOpenLiveCameraToolCall(e)))}handleControlEvent(e){var t;switch(e.event){case"clearAudio":break;case"transcription":this.onTranscription(e.text,e.isFinal);break;case"mark":break;case"client_tool_cancel":{const s=(e.data||e).tool_call_id||e.tool_call_id;this.dispatchBoardAbort("Tool cancelled by server",s);break}case"client_tool_call":{const i=e.tool_call||e.data||e,s=(i==null?void 0:i.tool_call_id)||(i==null?void 0:i.call_id)||e.tool_call_id||"";s&&((t=this.dataChannel)==null?void 0:t.readyState)==="open"&&this.dataChannel.send(JSON.stringify({event:"client_tool_ack",data:{tool_call_id:s}}));const r=(i==null?void 0:i.arguments)||(i==null?void 0:i.args)||{},o=(i==null?void 0:i.client_fields)||{},a=(i==null?void 0:i.name)||(i==null?void 0:i.tool_name)||"",l=Be(o,r,a);if(a==="end_call"){s&&this.sendToolResult(s,{status:"client_ack_end_call",message:"Ending call."}),window.setTimeout(()=>this.disconnect(),120);break}if(l){window.dispatchEvent(new CustomEvent("vanira:preset",{detail:{toolCall:i,client:this}})),this.onClientToolCall(i);break}this.onClientToolCall(i);break}}}disconnect(){var e;this.connectGeneration++,this.stopRemoteIcePolling(),this.appliedRemoteCandidates.clear(),this.audioElement&&(this.audioElement.pause(),this.audioElement.srcObject=null),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null),this.mediaBytesChannel&&(this.mediaBytesChannel.close(),this.mediaBytesChannel=null),this.pc&&(this.pc.getSenders().forEach(t=>{t.track&&t.track.stop()}),this.pc.close(),this.pc=null),this.localStream&&(this.localStream.getTracks().forEach(t=>{try{t.stop()}catch{}}),this.localStream=null),this.connected=!1,(e=this.routeTracker)==null||e.stop(),this.callSessionLoaded=!1,this.sessionStartedEmitted=!1,this.serverUrl="",this.callId=void 0,this.micMuted=!1,this.iceServers=void 0,this.onDisconnected()}setMicrophoneMuted(e){var t,i;this.micMuted=e,(t=this.localStream)==null||t.getAudioTracks().forEach(s=>{s.enabled=!e}),(i=this.pc)==null||i.getSenders().forEach(s=>{var r;((r=s.track)==null?void 0:r.kind)==="audio"&&(s.track.enabled=!e)})}isMicrophoneMuted(){return this.micMuted}toggleMicrophoneMuted(){return this.setMicrophoneMuted(!this.micMuted),this.micMuted}isConnectCancelled(e){return e!==this.connectGeneration}dispatchBoardAbort(e,t){typeof window>"u"||window.dispatchEvent(new CustomEvent("vanira:board_abort",{detail:{reason:e,toolCallId:t}}))}sendToolResult(e,t){this.callId,this.sendEvent("client_tool_result",{call_id:this.callId,data:{tool_call_id:e,result:t},result:t})}sendToolAck(e){var t;((t=this.dataChannel)==null?void 0:t.readyState)==="open"&&this.dataChannel.send(JSON.stringify({event:"client_tool_ack",data:{tool_call_id:e}}))}sendContextUpdate(e){this.sendEvent("client_context_update",{data:{context:e}})}sendActionTrigger(e,t={}){this.sendEvent("client_action_trigger",{data:{action_name:e,data:t}})}triggerActionInterrupt(){this.sendEvent("action_interrupt")}async uploadMediaForToolResult(e,t="general"){return this._postMediaUpload(e,t)}async uploadMedia(e,t="general",i=""){return await Ln(this.dataChannel,this.mediaBytesChannel)?this._uploadMediaViaDataChannel(e,t,i):(Pn(this.dataChannel,this.mediaBytesChannel),this._uploadMediaViaHTTP(e,t,i))}async uploadMediaFrame(e,t="camera_capture",i){const s=i&&!(e instanceof File)?new File([e],i,{type:e.type||"image/jpeg"}):e,{media_id:r,url:o,contentType:a}=await this._postMediaUpload(s,t,!0);if(!r||!o)throw new Error("Frame upload failed: server response missing media_id or url");return{media_id:r,url:o,content_type:a}}async _uploadBytesViaDataChannel(e,t,i,s,r){if(!this.callId||!this.mediaBytesChannel)throw new Error("Upload failed: call not ready for WebRTC media upload.");const o=r||(e instanceof File?e.name:s==="frame"?"frame.jpg":"upload.bin"),a=e.type||(s==="frame"?"image/jpeg":"application/octet-stream"),l=await Qn(e);return Nn({bytes:l,filename:o,contentType:a,reason:t,message:i,callId:this.callId,mediaBytesChannel:this.mediaBytesChannel,sendControlEvent:(c,h)=>this.sendEvent(c,h),uploadKind:s})}async _uploadMediaViaDataChannel(e,t,i){const s=await this._uploadBytesViaDataChannel(e,t,i,"media");return{media_id:s.media_id,url:s.url}}async _uploadMediaViaHTTP(e,t="general",i=""){const{media_id:s,url:r,contentType:o}=await this._postMediaUpload(e,t,!0);if(this.dataChannel&&this.dataChannel.readyState==="open"){const a={event:"client_media_update",data:{media_id:s,media_url:r,content_type:o,reason:t,message:i}};this.dataChannel.send(JSON.stringify(a))}return{media_id:s,url:r}}async _postMediaUpload(e,t,i=!1){if(!this.serverUrl)throw new Error("Upload failed: serverUrl is not set. Connect the VaniraClient first.");if(!this.callId)throw new Error("Upload failed: callId is missing.");const s=this.getWorkerOrigin();if(!s)throw new Error("Upload failed: worker_url is not set. Connect the call before uploading media.");const r=`${s}/media/upload`,o=new FormData;o.append("file",e),o.append("call_id",this.callId),o.append("reason",t);const a=await fetch(r,{method:"POST",body:o});if(!a.ok){let g=`HTTP ${a.status}`;try{g=(await a.json()).error||g}catch{}throw new Error(`Upload failed: ${g}`)}const l=await a.json(),c=l.media_id,h=l.url,d=l.content_type||e.type;if(!c||!h)throw new Error("Upload failed: server response missing media_id or url");return i?{media_id:c,url:h,contentType:d}:{media_id:c,url:h,contentType:d}}get status(){return this._status}get isConnected(){return this._status==="connected"}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),this}off(e,t){var i;return(i=this.listeners.get(e))==null||i.delete(t),this}emit(e,t){var i;(i=this.listeners.get(e))==null||i.forEach(s=>s(t))}async start(){return await this.connect(),{callId:this.callId||"",prospectId:this.prospectId||"",serverUrl:this.serverUrl||""}}stop(){this.disconnect(),this._status="disconnected"}sendToolError(e,t){this.sendToolResult(e,{status:"error",error:t})}updateContext(e){this.sendContextUpdate(e)}triggerInterrupt(e,t={}){this.triggerActionInterrupt(),this.sendActionTrigger(e,t)}interruptAudioOnly(){this.triggerActionInterrupt()}};p(ae,"inflightCreates",new Map);let de=ae;const ye=class ye{constructor(e){p(this,"tabId");p(this,"sessionKey");p(this,"channelName");p(this,"channel",null);p(this,"heartbeatTimer",null);p(this,"listeners",new Map);const t=e.replace(/[^a-z0-9_-]/gi,"_");this.sessionKey=`vaniraai_session_${t}`,this.channelName=`vaniraai_channel_${t}`,this.tabId=this._getOrCreateTabId(),this._setupChannel()}getTabId(){return this.tabId}claimSession(){const e=this._loadSession();if(e){const s=Date.now()-e.lastActive,r=e.tabId===this.tabId,o=s>ye.HEARTBEAT_TIMEOUT_MS;if(r)return this._startHeartbeat(),this._emit("session_restored"),!0;if(!o)return this._emit("tab_conflict"),!1}const t=e?{...e,tabId:this.tabId,lastActive:Date.now()}:{tabId:this.tabId,prospectId:"",chatId:null,conversationId:null,messages:[],lastActive:Date.now()};this._saveSession(t),this._startHeartbeat(),this._broadcast({type:"took_over",tabId:this.tabId});const i=!!(e!=null&&e.prospectId);return this._emit(i?"session_restored":"session_claimed"),!0}forceClaimSession(){const e=this._loadSession(),t=e?{...e,tabId:this.tabId,lastActive:Date.now()}:{tabId:this.tabId,prospectId:"",chatId:null,conversationId:null,messages:[],lastActive:Date.now()};this._saveSession(t),this._startHeartbeat(),this._broadcast({type:"took_over",tabId:this.tabId}),this._emit("session_claimed")}saveIds(e,t,i){const s=this._loadSession()??this._blankSession();this._saveSession({...s,prospectId:e,chatId:t,conversationId:i??s.conversationId??null,tabId:this.tabId,lastActive:Date.now()})}pushMessage(e,t){const i=this._loadSession()??this._blankSession();i.messages.push({role:e,content:t,timestamp:Date.now()}),i.messages.length>100&&(i.messages=i.messages.slice(-100)),this._saveSession({...i,tabId:this.tabId,lastActive:Date.now()})}updateLastAssistantMessage(e){const t=this._loadSession()??this._blankSession(),i=t.messages;let s=!1;for(let r=i.length-1;r>=0;r--)if(i[r].role==="assistant"&&i[r].content===""){i[r].content=e,s=!0;break}if(!s){for(let r=i.length-1;r>=0;r--)if(i[r].role==="assistant"){i[r].content=e,s=!0;break}}s||i.push({role:"assistant",content:e,timestamp:Date.now()}),this._saveSession({...t,tabId:this.tabId,lastActive:Date.now()})}getSession(){return this._loadSession()}clearSession(){localStorage.removeItem(this.sessionKey),this._broadcast({type:"session_cleared",tabId:this.tabId}),this._emit("session_cleared")}clearChatKeepProspect(){const e=this._loadSession();e&&this._saveSession({...e,chatId:null,conversationId:null,messages:[],lastActive:Date.now()})}destroy(){this._stopHeartbeat(),this.channel&&(this.channel.close(),this.channel=null)}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),this}off(e,t){var i;return(i=this.listeners.get(e))==null||i.delete(t),this}_getOrCreateTabId(){let e=sessionStorage.getItem("vaniraai_tab_id");return e||(e=`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,sessionStorage.setItem("vaniraai_tab_id",e)),e}_setupChannel(){typeof BroadcastChannel>"u"||(this.channel=new BroadcastChannel(this.channelName),this.channel.onmessage=e=>{const t=e.data;t.tabId!==this.tabId&&(t.type==="took_over"&&(this._stopHeartbeat(),this._emit("tab_took_over")),t.type,t.type==="session_cleared"&&this._emit("session_cleared"))})}_broadcast(e){var t;(t=this.channel)==null||t.postMessage(e)}_startHeartbeat(){this._stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{const e=this._loadSession();e&&e.tabId===this.tabId&&(this._saveSession({...e,lastActive:Date.now()}),this._broadcast({type:"heartbeat",tabId:this.tabId}))},ye.HEARTBEAT_INTERVAL_MS)}_stopHeartbeat(){this.heartbeatTimer!==null&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}_loadSession(){try{const e=localStorage.getItem(this.sessionKey);return e?JSON.parse(e):null}catch{return null}}_saveSession(e){try{localStorage.setItem(this.sessionKey,JSON.stringify(e))}catch{}}_blankSession(){return{tabId:this.tabId,prospectId:"",chatId:null,conversationId:null,messages:[],lastActive:Date.now()}}_emit(e){var t;(t=this.listeners.get(e))==null||t.forEach(i=>i())}};p(ye,"HEARTBEAT_INTERVAL_MS",5e3),p(ye,"HEARTBEAT_TIMEOUT_MS",15e3);let nt=ye;function Pi(){var n;if(typeof window>"u")return!1;try{if(window.__VANIRA_DEBUG__===!0||localStorage.getItem("vanira:debug")==="1"||new URLSearchParams(window.location.search).has("vanira_debug"))return!0}catch{}try{if(((n={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:pt&&pt.tagName.toUpperCase()==="SCRIPT"&&pt.src||new URL("vanira-sdk.umd.js",document.baseURI).href}.env)==null?void 0:n.DEV)===!0)return!0}catch{}return!1}let Je=null;function zt(){return Je===null&&(Je=Pi()),Je}function Hn(){Je=Pi()}function Li(n,e,t){if(!(typeof window>"u"))try{const i=window.__VANIRA_DEBUG_LOG__??[];for(i.push({t:Date.now(),tag:n,message:e,data:t});i.length>250;)i.shift();window.__VANIRA_DEBUG_LOG__=i}catch{}}function Z(n,e,t){zt()&&Li(n,e,t)}function Ni(n,e,t){zt()&&Li(n,`WARN ${e}`,t)}class Qi{static async fetchWidgetConfig(e,t){var s;const i={"Content-Type":"application/json"};t&&(i["X-API-Key"]=t);try{const r=await fetch(`${je}/assistant/widget/${e}/config`,{method:"GET",headers:i});if(!r.ok)throw new Error(`Widget config fetch failed: HTTP ${r.status}`);const o=await r.json();return(s=o.agent)!=null&&s.client&&(o.client=o.agent.client),o}catch(r){throw r}}}let Me="https://inboxapi.vanira.io";const Un="https://coredb.travelr.club/v1/graphql";class oe{static setChatUrl(e){Me=e}static async createChatProspect(e){var i,s;const t=`
|
|
2
|
+
mutation CreateChatProspect($prospectGroupId: uuid!, $name: String!) {
|
|
3
|
+
insert_prospects_one(object: {prospect_group_id: $prospectGroupId, name: $name, source: WEBSITE_WIDGET}) {
|
|
4
|
+
id
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
`;try{const o=await(await fetch(Un,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,variables:{prospectGroupId:e,name:`Widget Guest ${new Date().toLocaleString()}`}})})).json();return o.errors?`anon_${Date.now()}_${Math.random().toString(36).substr(2,9)}`:((s=(i=o.data)==null?void 0:i.insert_prospects_one)==null?void 0:s.id)||`anon_${Date.now()}`}catch{return`anon_${Date.now()}`}}static async fetchWelcomeMessage(e,t,i,s){try{const r={"Content-Type":"application/json"},o=await fetch(`${Me}/widget/chat`,{method:"POST",headers:r,body:JSON.stringify({agent_id:e,...i?{widget_id:i}:{},message:"",prospect_id:t,stream:!1})});if(!o.ok)throw new Error("Failed to fetch welcome message");const a=await o.json();let l=a.response||"Hey! how can I help you ?",c;const h=a.chat_id||a.inbox_id,d=a.conversation_id||null;return a.widget&&(c=a.widget),{role:"assistant",content:l,widget:c,chatId:h,conversationId:d}}catch{return{role:"assistant",content:"Hey! how can I help you ?"}}}static async sendChatMessage(e,t,i,s,r,o,a,l,c){var h,d,g,u;try{const m={"Content-Type":"application/json"},A={agent_id:e,message:i,prospect_id:t,stream:!0};s&&(A.inbox_id=s),l&&(A.widget_id=l);const v=await fetch(`${Me}/widget/chat`,{method:"POST",headers:m,body:JSON.stringify(A)});if(!v.ok)throw new Error("Chat request failed");const f=(h=v.body)==null?void 0:h.getReader(),b=new TextDecoder;if(!f)throw new Error("No reader");let C="",w="",x=null,E=null;for(;;){const{done:k,value:S}=await f.read();if(k)break;w+=b.decode(S,{stream:!0});const I=w.split(`
|
|
8
|
+
`);w=I.pop()||"";for(const P of I){const z=P.trim();if(z&&z.startsWith("data: ")){const Q=z.slice(6);if(Q==="[DONE]"){a(x,E);return}try{const L=JSON.parse(Q);if(L.type==="metadata"){(L.chat_id||L.inbox_id)&&(x=L.chat_id||L.inbox_id),L.conversation_id&&(E=L.conversation_id);continue}const Y=(u=(g=(d=L.choices)==null?void 0:d[0])==null?void 0:g.delta)==null?void 0:u.content;Y&&(C+=Y,r(C)),L.widget&&o(L.widget),L.chat_id&&!x&&(x=L.chat_id),L.conversation_id&&!E&&(E=L.conversation_id)}catch{}}}}a(x,E)}catch{r("Sorry, I encountered an error. Please try again."),a(null,null)}}static listenForAdminReplies(e,t,i){const s=`${Me}/inbox/stream?inbox_id=${e}&sender=${encodeURIComponent(t)}`;let r=null,o=0,a=!1;const l=()=>{a||(r=new EventSource(s),r.onopen=()=>{o=0},r.onmessage=c=>{try{const h=JSON.parse(c.data),d=h.direction==="outgoing",g=!!h.content,u=h.source!=="ai";d&&g&&u&&i(h.content)}catch{}},r.onerror=c=>{if(r&&(r.close(),r=null),a)return;const h=Math.min(2e3*Math.pow(2,o),3e4);o++,setTimeout(l,h)})};return l(),{close:()=>{a=!0,r&&(r.close(),r=null)}}}static async createCall(e,t,i,s,r){try{const o={"Content-Type":"application/json"};r&&(o["X-API-Key"]=r);const a=await fetch(`${je}/calls/create`,{method:"POST",headers:o,body:JSON.stringify({agent_id:e,prospect_id:i||void 0,type:"web"})}),l=await a.json();if(!a.ok)throw new Error(`[VaniraAI] Call creation failed HTTP ${a.status}`);if(!l.worker_url)throw new Error("[VaniraAI] Worker URL missing from response. Call cannot proceed.");return{callId:l.call_id||l.id||`web_${Date.now()}`,workerUrl:l.worker_url}}catch(o){throw o}}static async resolveConversation(e){try{if(!(await fetch(`${Me}/inbox/conversations/resolve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:e})})).ok)throw new Error("Failed to resolve conversation")}catch(t){throw t}}}class On{constructor(e){p(this,"config");p(this,"root",null);this.config=e}async initialize(e,t){this.config=e}isCallActive(){return!1}updateContext(e){return!1}triggerInterrupt(e,t){return!1}sendToolResult(e,t){return!1}}const Ri="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAIABJREFUeF7snQecVNX1x3/3zWzvSxM0RkzUJMYKGEtiizVG2Fn/S+wisLOoKcaaxCRumolJ1CTWfYNIVEx0ZWcBFVsECwqyi2KX3hHZXmZ32rt/7rLoAltm5vX3zv18+JDIu+ee+z135v3mvXPPZaBGBIgAESACRIAIuI4Ac92MacJEgAgQASJABIgASADQIiACRIAIEAEi4EICJABcGHSaMhEgAkSACBABEgC0BogAESACRIAIuJAACQAXBp2mTASIABEgAkSABACtASJABIgAESACLiRAAsCFQacpEwEiQASIABEgAUBrgAgQASJABIiACwmQAHBh0GnKRIAIEAEiQARIANAaIAIGEzj//PPzs7OzxyiKMpwxNgLASM55IWPMwznP38edOIA2RVF6/jNjrI0xtgPA516vdyuAJgDxnJyc2IYNG2KLFy+OGTwdGo4IEAGbEiABYNPAkdvWJ3DOOefk5ObmjuOcnwDgCACH9/49SkPvuxljn3POhRjYAGAdgNWMsU9jsdj6jIyM7u7u7mh7e3uExIGG1MkUEXAAARIADggiTcEaBMQNPysr60xJks7lnJ/MGDsKgNdE7yKc81WMsfcVRflAkqT3IpHIR+np6R3xeLyrra2ti0SBidGhoYmAyQRIAJgcABre3gTKysqKo9HojwBMYoydBiDT4jPqBvAJ5/xdxtiyeDy+LCMjYzuALvGnuro6YnH/yT0iQAQ0IkACQCOQZMY9BMrKyjzxePwCzvlVAH4IIN3Gs1c456sBvC1J0nIASwFsCY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IIEwEKwEJtJVz3B265/HZVdeeoSljS9QuFt8Nxvq8yD0GkTQEIgiLjIAESsIUABWChplP5/CfSvb3KXoLVCkCptBq+fyrsjZ4CEPYaZP5JgATaSYACsEA7vWrV1alHH322nexfnJZSAWiMAhSLzwC4WhWAINKlAARBkXGQAAnYQoACAETi8Wp+//6kyjpXLwAGfAagAKhswkybBEggbAQoAOqH/6XNKBeAxihAqfRF+P6Hw9aIz+WXAhDWmmO+SYAEVBCwXQDimczT3u7dW1Ww1+oTQEMAtm/Pol7/LoCbVANZTvoUgOVQ4z0kQAK2ErBZAKLJ5Fg0m93qPvLIgOr612IEoCEBMhpRKNwBx7kXQEY1mGbSpwA0Q4vXkgAJ2E7ARgFwHAdxz3sw09//bgeo69AGtBGAnw+nFwpXAHgXHOe1AF4D4GW6fKpYrMIoADo0ZeaBBEggLARsEYBILDYXiccHItHovkgsdl+6p+cnOtXR/wIx1xFoHvK3GAAAAABJRU5ErkJggg==",_t=n=>{n=n.replace(/^#/,"");let e,t,i;return n.length===3?(e=parseInt(n.charAt(0)+n.charAt(0),16),t=parseInt(n.charAt(1)+n.charAt(1),16),i=parseInt(n.charAt(2)+n.charAt(2),16)):(e=parseInt(n.substring(0,2),16),t=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16)),isNaN(e)||isNaN(t)||isNaN(i)?"0, 0, 0":`${e}, ${t}, ${i}`},Yn=(n,e)=>{const t=_t(n),i=_t(e||n);return`
|
|
9
|
+
--primary: ${n};
|
|
10
|
+
--primary-rgb: ${t};
|
|
11
|
+
--primary-hover: ${e||n};
|
|
12
|
+
--secondary: ${e||n};
|
|
13
|
+
--secondary-rgb: ${i};
|
|
14
|
+
`},jn=`
|
|
15
|
+
@keyframes fadeInScale {
|
|
16
|
+
from { opacity: 0; transform: scale(0.8); }
|
|
17
|
+
to { opacity: 1; transform: scale(1); }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes pulse {
|
|
21
|
+
0%, 100% { opacity: 1; }
|
|
22
|
+
50% { opacity: 0.5; }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@keyframes wave {
|
|
26
|
+
0%, 100% { transform: translateY(0); }
|
|
27
|
+
50% { transform: translateY(-4px); }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes wave-rotate-1 {
|
|
31
|
+
0% { transform: rotate(0deg) scale(1); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
|
|
32
|
+
25% { transform: rotate(90deg) scale(1.02); border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
|
|
33
|
+
50% { transform: rotate(180deg) scale(1); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
|
|
34
|
+
75% { transform: rotate(270deg) scale(0.98); border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%; }
|
|
35
|
+
100% { transform: rotate(360deg) scale(1); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes wave-rotate-2 {
|
|
39
|
+
0% { transform: rotate(60deg) scale(1.02); border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
|
|
40
|
+
33% { transform: rotate(180deg) scale(0.98); border-radius: 60% 40% 40% 60% / 40% 60% 40% 60%; }
|
|
41
|
+
66% { transform: rotate(300deg) scale(1.02); border-radius: 50% 50% 40% 60% / 60% 40% 50% 50%; }
|
|
42
|
+
100% { transform: rotate(420deg) scale(1.02); border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes wave-rotate-3 {
|
|
46
|
+
0% { transform: rotate(120deg) scale(1); border-radius: 50% 50% 50% 50%; }
|
|
47
|
+
50% { transform: rotate(300deg) scale(1.05); border-radius: 40% 60% 50% 50% / 50% 50% 60% 40%; }
|
|
48
|
+
100% { transform: rotate(480deg) scale(1); border-radius: 50% 50% 50% 50%; }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes clickBounce {
|
|
52
|
+
0% { transform: scale(1); }
|
|
53
|
+
25% { transform: scale(0.9) rotate(-5deg); }
|
|
54
|
+
50% { transform: scale(1.15) rotate(5deg); }
|
|
55
|
+
75% { transform: scale(0.95) rotate(-2deg); }
|
|
56
|
+
100% { transform: scale(1) rotate(0deg); }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes pulseGlow {
|
|
60
|
+
0%, 100% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); }
|
|
61
|
+
50% { box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6), 0 0 32px rgba(239, 68, 68, 0.3); }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes typingBounce {
|
|
65
|
+
0%, 80%, 100% { transform: translateY(0); }
|
|
66
|
+
40% { transform: translateY(-6px); }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes floatOrb {
|
|
70
|
+
0%, 100% { transform: translateY(0); }
|
|
71
|
+
50% { transform: translateY(-10px); }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@keyframes pulseGlowIdle {
|
|
75
|
+
0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
|
|
76
|
+
50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes orb-breathe {
|
|
80
|
+
0%, 100% { transform: scale(1); opacity: 0.5; }
|
|
81
|
+
50% { transform: scale(1.05); opacity: 1; }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes orb-breathe-delayed {
|
|
85
|
+
0%, 100% { transform: scale(1); opacity: 0.35; }
|
|
86
|
+
50% { transform: scale(1.07); opacity: 0.85; }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes human-wave-hand {
|
|
90
|
+
0%, 100% { transform: rotate(0deg); }
|
|
91
|
+
15% { transform: rotate(18deg); }
|
|
92
|
+
30% { transform: rotate(-10deg); }
|
|
93
|
+
45% { transform: rotate(16deg); }
|
|
94
|
+
60% { transform: rotate(-6deg); }
|
|
95
|
+
75% { transform: rotate(12deg); }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes human-presence-pulse {
|
|
99
|
+
0% { transform: scale(1); opacity: 0.6; }
|
|
100
|
+
70% { transform: scale(1.18); opacity: 0; }
|
|
101
|
+
100% { transform: scale(1.18); opacity: 0; }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes spin {
|
|
105
|
+
from { transform: rotate(0deg); }
|
|
106
|
+
to { transform: rotate(360deg); }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes voice-bars-orb {
|
|
110
|
+
0%, 100% { transform: scaleY(1); opacity: 0.7; }
|
|
111
|
+
50% { transform: scaleY(1.8); opacity: 1; }
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@keyframes doodleFloat {
|
|
115
|
+
0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.55; }
|
|
116
|
+
50% { transform: translateY(-7px) rotate(10deg); opacity: 1; }
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@keyframes doodleFloatAlt {
|
|
120
|
+
0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.45; }
|
|
121
|
+
50% { transform: translateY(6px) rotate(-12deg); opacity: 0.9; }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes doodleDraw {
|
|
125
|
+
0% { stroke-dashoffset: 48; opacity: 0.35; }
|
|
126
|
+
50% { stroke-dashoffset: 0; opacity: 1; }
|
|
127
|
+
100% { stroke-dashoffset: -48; opacity: 0.35; }
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@keyframes doodleSparkle {
|
|
131
|
+
0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.4; }
|
|
132
|
+
50% { transform: scale(1.2) rotate(18deg); opacity: 1; }
|
|
133
|
+
}
|
|
134
|
+
`,Gn=`
|
|
135
|
+
:host(.vanira-portal) {
|
|
136
|
+
position: fixed !important;
|
|
137
|
+
bottom: 0 !important;
|
|
138
|
+
right: 0 !important;
|
|
139
|
+
top: auto !important;
|
|
140
|
+
left: auto !important;
|
|
141
|
+
width: 0 !important;
|
|
142
|
+
height: 0 !important;
|
|
143
|
+
pointer-events: none !important;
|
|
144
|
+
z-index: 2147483647;
|
|
145
|
+
overflow: visible !important;
|
|
146
|
+
contain: none !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Hidden while page-region clip is active — clip overlay must sit above and capture cleanly */
|
|
150
|
+
:host(.vanira-clip-suppressed) {
|
|
151
|
+
visibility: hidden !important;
|
|
152
|
+
pointer-events: none !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host {
|
|
156
|
+
display: block;
|
|
157
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
|
|
160
|
+
/* Default Theme Variables */
|
|
161
|
+
--primary: #000000;
|
|
162
|
+
--primary-hover: #111111;
|
|
163
|
+
--primary-rgb: 0, 0, 0;
|
|
164
|
+
--secondary: #111111;
|
|
165
|
+
--secondary-rgb: 17, 17, 17;
|
|
166
|
+
--bg: #ffffff;
|
|
167
|
+
--text: #1f2937;
|
|
168
|
+
--text-muted: #6b7280;
|
|
169
|
+
--border: #e5e7eb;
|
|
170
|
+
--shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
|
|
171
|
+
--shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host * {
|
|
175
|
+
box-sizing: border-box;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
${jn}
|
|
179
|
+
|
|
180
|
+
.widget-fab {
|
|
181
|
+
position: fixed;
|
|
182
|
+
z-index: 2147483647;
|
|
183
|
+
pointer-events: auto !important;
|
|
184
|
+
width: 64px;
|
|
185
|
+
height: 64px;
|
|
186
|
+
border-radius: 50%;
|
|
187
|
+
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
|
|
188
|
+
border: none;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
justify-content: center;
|
|
193
|
+
box-shadow: var(--shadow);
|
|
194
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
195
|
+
animation: fadeInScale 0.4s ease-out;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.widget-fab:hover {
|
|
199
|
+
transform: scale(1.1);
|
|
200
|
+
box-shadow: var(--shadow-lg);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.widget-fab:active {
|
|
204
|
+
transform: scale(0.95);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.widget-fab svg {
|
|
208
|
+
width: 28px;
|
|
209
|
+
height: 28px;
|
|
210
|
+
color: white;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.widget-fab.hidden-launcher {
|
|
214
|
+
display: none !important;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* ElevenLabs-style voice pill (active call, panel minimized) */
|
|
218
|
+
.widget-voice-pill {
|
|
219
|
+
position: fixed;
|
|
220
|
+
z-index: 2147483647;
|
|
221
|
+
pointer-events: auto !important;
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: 0.5rem;
|
|
225
|
+
padding: 0.35rem 0.35rem 0.35rem 0.35rem;
|
|
226
|
+
border-radius: 999px;
|
|
227
|
+
background: rgba(255, 255, 255, 0.98);
|
|
228
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
229
|
+
box-shadow: 0 2px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
|
|
230
|
+
left: 50%;
|
|
231
|
+
transform: translateX(-50%);
|
|
232
|
+
bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
|
|
233
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
234
|
+
animation: fadeInScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
235
|
+
font-family: inherit;
|
|
236
|
+
-webkit-tap-highlight-color: transparent;
|
|
237
|
+
min-width: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.widget-voice-pill.hidden {
|
|
241
|
+
display: none !important;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.widget-voice-pill:hover {
|
|
245
|
+
transform: translateX(-50%) translateY(-1px);
|
|
246
|
+
box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.widget-voice-pill-main {
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
gap: 0.625rem;
|
|
253
|
+
flex: 1;
|
|
254
|
+
min-width: 0;
|
|
255
|
+
padding: 0 0.15rem 0 0;
|
|
256
|
+
border: none;
|
|
257
|
+
background: transparent;
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
font: inherit;
|
|
260
|
+
text-align: left;
|
|
261
|
+
-webkit-tap-highlight-color: transparent;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.widget-voice-pill-main:active {
|
|
265
|
+
opacity: 0.85;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.widget-voice-pill-hangup {
|
|
269
|
+
width: 2rem;
|
|
270
|
+
height: 2rem;
|
|
271
|
+
border-radius: 999px;
|
|
272
|
+
flex-shrink: 0;
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
justify-content: center;
|
|
276
|
+
border: none;
|
|
277
|
+
background: #fef2f2;
|
|
278
|
+
color: #dc2626;
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
transition: background 0.15s ease, transform 0.15s ease;
|
|
281
|
+
-webkit-tap-highlight-color: transparent;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.widget-voice-pill-hangup:hover {
|
|
285
|
+
background: #fee2e2;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.widget-voice-pill-hangup:active {
|
|
289
|
+
transform: scale(0.94);
|
|
290
|
+
background: #fecaca;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.widget-voice-pill-hangup svg {
|
|
294
|
+
width: 0.95rem;
|
|
295
|
+
height: 0.95rem;
|
|
296
|
+
transform: rotate(135deg);
|
|
297
|
+
stroke: #dc2626;
|
|
298
|
+
color: #dc2626;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.widget-voice-pill-mute {
|
|
302
|
+
width: 2rem;
|
|
303
|
+
height: 2rem;
|
|
304
|
+
border-radius: 999px;
|
|
305
|
+
flex-shrink: 0;
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: center;
|
|
309
|
+
border: none;
|
|
310
|
+
background: #f4f4f5;
|
|
311
|
+
color: #334155;
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
|
|
314
|
+
-webkit-tap-highlight-color: transparent;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.widget-voice-pill-mute:hover:not(:disabled) {
|
|
318
|
+
background: #e4e4e7;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.widget-voice-pill-mute:active:not(:disabled) {
|
|
322
|
+
transform: scale(0.94);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.widget-voice-pill-mute:disabled {
|
|
326
|
+
opacity: 0.45;
|
|
327
|
+
cursor: not-allowed;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.widget-voice-pill-mute.is-muted {
|
|
331
|
+
background: #fef2f2;
|
|
332
|
+
color: #dc2626;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.widget-voice-pill-mute svg {
|
|
336
|
+
width: 0.95rem;
|
|
337
|
+
height: 0.95rem;
|
|
338
|
+
stroke: currentColor;
|
|
339
|
+
color: currentColor;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.widget-voice-pill-icon {
|
|
343
|
+
width: 2rem;
|
|
344
|
+
height: 2rem;
|
|
345
|
+
border-radius: 999px;
|
|
346
|
+
flex-shrink: 0;
|
|
347
|
+
background: #f4f4f5;
|
|
348
|
+
display: flex;
|
|
349
|
+
align-items: center;
|
|
350
|
+
justify-content: center;
|
|
351
|
+
position: relative;
|
|
352
|
+
overflow: hidden;
|
|
353
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.widget-voice-pill-icon::after {
|
|
357
|
+
display: none;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.widget-voice-pill-icon svg {
|
|
361
|
+
width: 0.9rem;
|
|
362
|
+
height: 0.9rem;
|
|
363
|
+
position: relative;
|
|
364
|
+
z-index: 1;
|
|
365
|
+
stroke: #0a0a0a;
|
|
366
|
+
color: #0a0a0a;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.widget-voice-pill-text {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
align-items: flex-start;
|
|
373
|
+
gap: 0.05rem;
|
|
374
|
+
min-width: 0;
|
|
375
|
+
text-align: left;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.widget-voice-pill-title {
|
|
379
|
+
font-size: 0.8125rem;
|
|
380
|
+
font-weight: 600;
|
|
381
|
+
color: #0f172a;
|
|
382
|
+
letter-spacing: -0.02em;
|
|
383
|
+
line-height: 1.15;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.widget-voice-pill-status-row {
|
|
387
|
+
display: inline-flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
gap: 0.35rem;
|
|
390
|
+
min-height: 0.875rem;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.widget-voice-pill-bars {
|
|
394
|
+
display: inline-flex;
|
|
395
|
+
align-items: flex-end;
|
|
396
|
+
gap: 2px;
|
|
397
|
+
height: 0.625rem;
|
|
398
|
+
flex-shrink: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.widget-voice-pill-bars.hidden {
|
|
402
|
+
display: none;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.widget-voice-pill-bars i {
|
|
406
|
+
display: block;
|
|
407
|
+
width: 2px;
|
|
408
|
+
height: 3px;
|
|
409
|
+
border-radius: 999px;
|
|
410
|
+
background: currentColor;
|
|
411
|
+
opacity: 0.55;
|
|
412
|
+
animation: pillBarListen 1s ease-in-out infinite;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.widget-voice-pill-bars i:nth-child(2) {
|
|
416
|
+
animation-delay: 0.12s;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.widget-voice-pill-bars i:nth-child(3) {
|
|
420
|
+
animation-delay: 0.24s;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.widget-voice-pill-bars.speaking i {
|
|
424
|
+
animation-name: pillBarSpeak;
|
|
425
|
+
opacity: 0.85;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
@keyframes pillBarListen {
|
|
429
|
+
0%, 100% { height: 3px; transform: translateY(0); }
|
|
430
|
+
50% { height: 7px; transform: translateY(0); }
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@keyframes pillBarSpeak {
|
|
434
|
+
0%, 100% { height: 4px; }
|
|
435
|
+
35% { height: 9px; }
|
|
436
|
+
65% { height: 6px; }
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.widget-voice-pill-status {
|
|
440
|
+
font-size: 0.6875rem;
|
|
441
|
+
font-weight: 500;
|
|
442
|
+
color: #64748b;
|
|
443
|
+
line-height: 1.1;
|
|
444
|
+
letter-spacing: -0.01em;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.widget-voice-pill.is-connecting .widget-voice-pill-status {
|
|
448
|
+
color: #94a3b8;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.widget-voice-pill.is-listening .widget-voice-pill-status,
|
|
452
|
+
.widget-voice-pill.is-speaking .widget-voice-pill-status {
|
|
453
|
+
color: #475569;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.widget-voice-pill.is-listening .widget-voice-pill-bars,
|
|
457
|
+
.widget-voice-pill.is-speaking .widget-voice-pill-bars {
|
|
458
|
+
color: #64748b;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.widget-voice-pill.is-error .widget-voice-pill-status {
|
|
462
|
+
color: #dc2626;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.widget-panel {
|
|
466
|
+
position: fixed;
|
|
467
|
+
z-index: 2147483647;
|
|
468
|
+
pointer-events: auto;
|
|
469
|
+
background: rgba(255, 255, 255, 0.98);
|
|
470
|
+
backdrop-filter: blur(20px);
|
|
471
|
+
-webkit-backdrop-filter: blur(20px);
|
|
472
|
+
border: 1px solid #d1d5db;
|
|
473
|
+
border-radius: 28px;
|
|
474
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
475
|
+
overflow: hidden;
|
|
476
|
+
display: flex;
|
|
477
|
+
flex-direction: column;
|
|
478
|
+
transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
|
|
479
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
480
|
+
|
|
481
|
+
/* Default Dimensions */
|
|
482
|
+
width: 400px;
|
|
483
|
+
height: 600px;
|
|
484
|
+
max-height: 90vh;
|
|
485
|
+
max-width: 95vw;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.widget-panel.maximized {
|
|
489
|
+
width: 90vw !important;
|
|
490
|
+
height: 90vh !important;
|
|
491
|
+
top: 5vh !important;
|
|
492
|
+
left: 5vw !important;
|
|
493
|
+
right: 5vw !important;
|
|
494
|
+
bottom: 5vh !important;
|
|
495
|
+
margin: auto;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.widget-body {
|
|
499
|
+
padding: 0;
|
|
500
|
+
flex: 1;
|
|
501
|
+
display: flex;
|
|
502
|
+
flex-direction: column;
|
|
503
|
+
overflow: hidden;
|
|
504
|
+
min-height: 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.widget-panel.hidden {
|
|
508
|
+
opacity: 0;
|
|
509
|
+
pointer-events: none !important;
|
|
510
|
+
transform: translateY(20px) scale(0.95);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.widget-header {
|
|
514
|
+
background: #1f2937;
|
|
515
|
+
color: white;
|
|
516
|
+
padding: 14px 20px;
|
|
517
|
+
display: flex;
|
|
518
|
+
justify-content: space-between;
|
|
519
|
+
align-items: center;
|
|
520
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.widget-title {
|
|
524
|
+
font-size: 18px;
|
|
525
|
+
font-weight: 600;
|
|
526
|
+
margin: 0;
|
|
527
|
+
letter-spacing: 0.3px;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.close-btn {
|
|
531
|
+
background: rgba(255, 255, 255, 0.15);
|
|
532
|
+
border: none;
|
|
533
|
+
width: 36px;
|
|
534
|
+
height: 36px;
|
|
535
|
+
border-radius: 50%;
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
justify-content: center;
|
|
539
|
+
cursor: pointer;
|
|
540
|
+
transition: all 0.2s;
|
|
541
|
+
backdrop-filter: blur(10px);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.close-btn:hover {
|
|
545
|
+
background: rgba(255, 255, 255, 0.25);
|
|
546
|
+
transform: scale(1.1);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.close-btn.maximize-btn,
|
|
550
|
+
.close-btn.collapse-panel-btn {
|
|
551
|
+
display: flex;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.close-btn.collapse-panel-btn svg {
|
|
555
|
+
width: 16px;
|
|
556
|
+
height: 16px;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.close-btn svg {
|
|
560
|
+
width: 18px;
|
|
561
|
+
height: 18px;
|
|
562
|
+
color: white;
|
|
563
|
+
flex-shrink: 0;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.status-indicator {
|
|
567
|
+
display: flex;
|
|
568
|
+
align-items: center;
|
|
569
|
+
gap: 12px;
|
|
570
|
+
padding: 16px;
|
|
571
|
+
background: #f9fafb;
|
|
572
|
+
border-radius: 12px;
|
|
573
|
+
margin-bottom: 20px;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.status-dot {
|
|
577
|
+
width: 10px;
|
|
578
|
+
height: 10px;
|
|
579
|
+
border-radius: 50%;
|
|
580
|
+
background: #10b981;
|
|
581
|
+
animation: pulse 2s infinite;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.status-text {
|
|
585
|
+
font-size: 14px;
|
|
586
|
+
color: var(--text-muted);
|
|
587
|
+
margin: 0;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.controls {
|
|
591
|
+
display: flex;
|
|
592
|
+
gap: 12px;
|
|
593
|
+
justify-content: center;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.control-btn {
|
|
597
|
+
flex: 1;
|
|
598
|
+
padding: 14px 20px;
|
|
599
|
+
border: none;
|
|
600
|
+
border-radius: 12px;
|
|
601
|
+
font-size: 14px;
|
|
602
|
+
font-weight: 600;
|
|
603
|
+
cursor: pointer;
|
|
604
|
+
transition: all 0.2s;
|
|
605
|
+
display: flex;
|
|
606
|
+
align-items: center;
|
|
607
|
+
justify-content: center;
|
|
608
|
+
gap: 8px;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.control-btn svg {
|
|
612
|
+
width: 18px;
|
|
613
|
+
height: 18px;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.control-btn.primary {
|
|
617
|
+
background: #1f2937;
|
|
618
|
+
color: white;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.control-btn.primary:hover {
|
|
622
|
+
background: #374151;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.control-btn.danger {
|
|
626
|
+
background: #ef4444;
|
|
627
|
+
color: white;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.control-btn.danger:hover {
|
|
631
|
+
background: #dc2626;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.voice-mode-container {
|
|
635
|
+
display: flex;
|
|
636
|
+
flex-direction: column;
|
|
637
|
+
align-items: center;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
height: 100%;
|
|
640
|
+
padding: 16px 12px;
|
|
641
|
+
box-sizing: border-box;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.voice-idle-stack {
|
|
645
|
+
display: flex;
|
|
646
|
+
flex-direction: column;
|
|
647
|
+
align-items: center;
|
|
648
|
+
gap: 10px;
|
|
649
|
+
width: 100%;
|
|
650
|
+
max-width: 220px;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.voice-idle-stack .central-orb-container {
|
|
654
|
+
margin-bottom: 0;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.voice-idle-stack .voice-status-text {
|
|
658
|
+
margin-bottom: 0;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.voice-idle-stack .voice-status-subtext {
|
|
662
|
+
margin-top: -4px;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.voice-mode-container.has-session-choice .voice-idle-stack {
|
|
666
|
+
gap: 10px;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.voice-mode-container.has-session-choice .voice-doodle-stage {
|
|
670
|
+
width: 72px;
|
|
671
|
+
height: 72px;
|
|
672
|
+
margin-bottom: 0;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.voice-mode-container.has-session-choice .voice-doodle-squiggle,
|
|
676
|
+
.voice-mode-container.has-session-choice .voice-doodle-spark,
|
|
677
|
+
.voice-mode-container.has-session-choice .voice-doodle-ring-b {
|
|
678
|
+
display: none;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.voice-mode-container.has-session-choice .voice-doodle-title::after {
|
|
682
|
+
display: none;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.voice-mode-container.has-session-choice .central-orb-container {
|
|
686
|
+
width: 56px;
|
|
687
|
+
height: 56px;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.voice-mode-container.has-session-choice .voice-doodle-emoji {
|
|
691
|
+
font-size: 30px;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.voice-doodle-stage {
|
|
695
|
+
position: relative;
|
|
696
|
+
width: 148px;
|
|
697
|
+
height: 148px;
|
|
698
|
+
display: flex;
|
|
699
|
+
align-items: center;
|
|
700
|
+
justify-content: center;
|
|
701
|
+
margin-bottom: 4px;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.voice-doodle-squiggle {
|
|
705
|
+
position: absolute;
|
|
706
|
+
color: #f59e0b;
|
|
707
|
+
pointer-events: none;
|
|
708
|
+
z-index: 1;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.voice-doodle-squiggle path {
|
|
712
|
+
stroke-dasharray: 48;
|
|
713
|
+
stroke-dashoffset: 48;
|
|
714
|
+
animation: doodleDraw 2.8s ease-in-out infinite;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.voice-doodle-squiggle-1 {
|
|
718
|
+
top: 6%;
|
|
719
|
+
left: -4%;
|
|
720
|
+
width: 40px;
|
|
721
|
+
animation: doodleFloat 3.2s ease-in-out infinite;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.voice-doodle-squiggle-1 path {
|
|
725
|
+
animation-delay: 0s;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.voice-doodle-squiggle-2 {
|
|
729
|
+
bottom: 10%;
|
|
730
|
+
right: -6%;
|
|
731
|
+
width: 44px;
|
|
732
|
+
transform: rotate(12deg);
|
|
733
|
+
animation: doodleFloatAlt 3.6s ease-in-out infinite;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.voice-doodle-squiggle-2 path {
|
|
737
|
+
animation-delay: 0.6s;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.voice-doodle-spark {
|
|
741
|
+
position: absolute;
|
|
742
|
+
font-size: 14px;
|
|
743
|
+
line-height: 1;
|
|
744
|
+
color: #fbbf24;
|
|
745
|
+
pointer-events: none;
|
|
746
|
+
z-index: 1;
|
|
747
|
+
animation: doodleSparkle 2.4s ease-in-out infinite;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.voice-doodle-spark-1 {
|
|
751
|
+
top: 18%;
|
|
752
|
+
right: 6%;
|
|
753
|
+
animation-delay: 0.2s;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.voice-doodle-spark-2 {
|
|
757
|
+
bottom: 16%;
|
|
758
|
+
left: 8%;
|
|
759
|
+
font-size: 11px;
|
|
760
|
+
animation-delay: 0.9s;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.voice-doodle-ring {
|
|
764
|
+
position: absolute;
|
|
765
|
+
inset: 0;
|
|
766
|
+
border: 2px dashed rgba(245, 158, 11, 0.35);
|
|
767
|
+
pointer-events: none;
|
|
768
|
+
z-index: 0;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.voice-doodle-ring-a {
|
|
772
|
+
inset: -6px;
|
|
773
|
+
border-radius: 58% 42% 34% 66% / 58% 34% 66% 42%;
|
|
774
|
+
animation: wave-rotate-1 9s linear infinite;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.voice-doodle-ring-b {
|
|
778
|
+
inset: -14px;
|
|
779
|
+
border-radius: 42% 58% 66% 34% / 42% 66% 34% 58%;
|
|
780
|
+
opacity: 0.45;
|
|
781
|
+
animation: wave-rotate-2 13s linear infinite reverse;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.central-orb.voice-doodle-tap {
|
|
785
|
+
background: linear-gradient(155deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%) !important;
|
|
786
|
+
border: 2px solid rgba(245, 158, 11, 0.28);
|
|
787
|
+
box-shadow: 0 10px 28px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
|
|
788
|
+
animation: human-wave-hand 0.9s ease-in-out infinite !important;
|
|
789
|
+
transform-origin: 65% 85%;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.central-orb.voice-doodle-tap:hover {
|
|
793
|
+
transform: scale(1.06) rotate(2deg);
|
|
794
|
+
box-shadow: 0 14px 32px rgba(245, 158, 11, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.voice-doodle-emoji {
|
|
798
|
+
font-size: 44px;
|
|
799
|
+
line-height: 1;
|
|
800
|
+
display: block;
|
|
801
|
+
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
|
|
802
|
+
user-select: none;
|
|
803
|
+
pointer-events: none;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.voice-doodle-title {
|
|
807
|
+
position: relative;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.voice-doodle-title::after {
|
|
811
|
+
content: '';
|
|
812
|
+
display: block;
|
|
813
|
+
width: 72px;
|
|
814
|
+
height: 6px;
|
|
815
|
+
margin: 5px auto 0;
|
|
816
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 6' fill='none'%3E%3Cpath d='M2 4C12 1 22 5 36 3C50 1 60 5 70 2' stroke='%23F59E0B' stroke-width='2' stroke-linecap='round' stroke-dasharray='4 4'/%3E%3C/svg%3E");
|
|
817
|
+
background-repeat: no-repeat;
|
|
818
|
+
background-position: center;
|
|
819
|
+
opacity: 0.7;
|
|
820
|
+
animation: doodleFloat 2.5s ease-in-out infinite;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.central-orb-container {
|
|
824
|
+
position: relative;
|
|
825
|
+
width: 120px;
|
|
826
|
+
height: 120px;
|
|
827
|
+
margin-bottom: 0;
|
|
828
|
+
cursor: pointer;
|
|
829
|
+
z-index: 2;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.central-orb {
|
|
833
|
+
width: 100%;
|
|
834
|
+
height: 100%;
|
|
835
|
+
border-radius: 50%;
|
|
836
|
+
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
|
|
837
|
+
display: flex;
|
|
838
|
+
align-items: center;
|
|
839
|
+
justify-content: center;
|
|
840
|
+
color: white;
|
|
841
|
+
position: relative;
|
|
842
|
+
z-index: 10;
|
|
843
|
+
box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
|
|
844
|
+
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.central-orb.active {
|
|
848
|
+
animation: pulse 2s infinite;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
.central-orb.idle {
|
|
852
|
+
animation: floatOrb 4s ease-in-out infinite;
|
|
853
|
+
cursor: pointer;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.central-orb.idle:hover {
|
|
857
|
+
transform: scale(1.05);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.central-orb-glow {
|
|
861
|
+
position: absolute;
|
|
862
|
+
top: 50%;
|
|
863
|
+
left: 50%;
|
|
864
|
+
transform: translate(-50%, -50%);
|
|
865
|
+
width: 140%;
|
|
866
|
+
height: 140%;
|
|
867
|
+
background: radial-gradient(circle, rgba(var(--primary-rgb), 0.2) 0%, transparent 70%);
|
|
868
|
+
animation: pulseGlowIdle 4s ease-in-out infinite;
|
|
869
|
+
z-index: -1;
|
|
870
|
+
pointer-events: none;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.central-orb svg {
|
|
874
|
+
width: 24px;
|
|
875
|
+
height: 24px;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.voice-status-text {
|
|
879
|
+
font-size: 20px;
|
|
880
|
+
font-weight: 600;
|
|
881
|
+
color: var(--text);
|
|
882
|
+
margin-bottom: 8px;
|
|
883
|
+
text-align: center;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.voice-status-subtext {
|
|
887
|
+
font-size: 14px;
|
|
888
|
+
color: var(--text-muted);
|
|
889
|
+
text-align: center;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/* Chat Mode Styles */
|
|
893
|
+
.chat-messages {
|
|
894
|
+
flex: 1;
|
|
895
|
+
min-height: 0;
|
|
896
|
+
overflow-y: auto;
|
|
897
|
+
padding: 16px;
|
|
898
|
+
display: flex;
|
|
899
|
+
flex-direction: column;
|
|
900
|
+
gap: 12px;
|
|
901
|
+
background: #f9fafb;
|
|
902
|
+
|
|
903
|
+
scrollbar-width: thin;
|
|
904
|
+
scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.chat-messages::-webkit-scrollbar {
|
|
908
|
+
width: 6px;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
.chat-messages::-webkit-scrollbar-track {
|
|
912
|
+
background: transparent;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.chat-messages::-webkit-scrollbar-thumb {
|
|
916
|
+
background-color: rgba(156, 163, 175, 0.5);
|
|
917
|
+
border-radius: 3px;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.chat-message {
|
|
921
|
+
max-width: 85%;
|
|
922
|
+
padding: 12px 16px;
|
|
923
|
+
border-radius: 16px;
|
|
924
|
+
font-size: 14px;
|
|
925
|
+
line-height: 1.5;
|
|
926
|
+
word-wrap: break-word;
|
|
927
|
+
white-space: pre-wrap;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.chat-message.user {
|
|
931
|
+
align-self: flex-end;
|
|
932
|
+
background: #000000;
|
|
933
|
+
color: white;
|
|
934
|
+
border-bottom-right-radius: 4px;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.chat-message.assistant {
|
|
938
|
+
align-self: flex-start;
|
|
939
|
+
background: #ffffff;
|
|
940
|
+
border: 1px solid #e5e7eb;
|
|
941
|
+
color: var(--text);
|
|
942
|
+
border-bottom-left-radius: 4px;
|
|
943
|
+
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.chat-input-area {
|
|
947
|
+
padding: 20px;
|
|
948
|
+
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
949
|
+
display: flex;
|
|
950
|
+
gap: 10px;
|
|
951
|
+
align-items: center;
|
|
952
|
+
background: white;
|
|
953
|
+
z-index: 30;
|
|
954
|
+
position: relative;
|
|
955
|
+
border-bottom-left-radius: 28px;
|
|
956
|
+
border-bottom-right-radius: 28px;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
.chat-input {
|
|
960
|
+
flex: 1;
|
|
961
|
+
padding: 14px 20px;
|
|
962
|
+
border: 1px solid #e5e7eb;
|
|
963
|
+
border-radius: 28px;
|
|
964
|
+
font-size: 15px;
|
|
965
|
+
outline: none;
|
|
966
|
+
transition: all 0.3s;
|
|
967
|
+
background: #f3f4f6;
|
|
968
|
+
color: #1f2937;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
.chat-input:focus {
|
|
972
|
+
border-color: var(--primary);
|
|
973
|
+
background: white;
|
|
974
|
+
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
.chat-send-btn {
|
|
978
|
+
width: 48px;
|
|
979
|
+
height: 48px;
|
|
980
|
+
border-radius: 50%;
|
|
981
|
+
background: var(--primary);
|
|
982
|
+
border: none;
|
|
983
|
+
cursor: pointer;
|
|
984
|
+
display: flex;
|
|
985
|
+
align-items: center;
|
|
986
|
+
justify-content: center;
|
|
987
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
988
|
+
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
|
|
989
|
+
flex-shrink: 0;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.chat-send-btn:hover {
|
|
993
|
+
transform: scale(1.05) rotate(-10deg);
|
|
994
|
+
background: var(--primary-hover);
|
|
995
|
+
box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.chat-send-btn:active {
|
|
999
|
+
transform: scale(0.95);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.chat-send-btn svg {
|
|
1003
|
+
width: 22px;
|
|
1004
|
+
height: 22px;
|
|
1005
|
+
color: white;
|
|
1006
|
+
margin-left: 2px;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.avatar-container {
|
|
1010
|
+
background: transparent;
|
|
1011
|
+
flex: 1;
|
|
1012
|
+
display: flex;
|
|
1013
|
+
align-items: center;
|
|
1014
|
+
justify-content: center;
|
|
1015
|
+
position: relative;
|
|
1016
|
+
overflow: hidden;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.avatar-video {
|
|
1020
|
+
width: 100%;
|
|
1021
|
+
height: 100%;
|
|
1022
|
+
object-fit: cover;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.voice-btn-simple {
|
|
1026
|
+
position: relative;
|
|
1027
|
+
width: 44px;
|
|
1028
|
+
height: 44px;
|
|
1029
|
+
border-radius: 50%;
|
|
1030
|
+
border: 1.5px solid #e5e7eb;
|
|
1031
|
+
cursor: pointer;
|
|
1032
|
+
display: flex;
|
|
1033
|
+
align-items: center;
|
|
1034
|
+
justify-content: center;
|
|
1035
|
+
transition: all 0.3s;
|
|
1036
|
+
overflow: visible;
|
|
1037
|
+
background: white;
|
|
1038
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.voice-btn-simple:hover {
|
|
1042
|
+
transform: scale(1.05);
|
|
1043
|
+
background: #f9fafb;
|
|
1044
|
+
border-color: #9ca3af;
|
|
1045
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.voice-btn-icon {
|
|
1049
|
+
width: 100%;
|
|
1050
|
+
height: 100%;
|
|
1051
|
+
display: flex;
|
|
1052
|
+
align-items: center;
|
|
1053
|
+
justify-content: center;
|
|
1054
|
+
color: #4b5563;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.voice-btn-icon svg {
|
|
1058
|
+
width: 20px;
|
|
1059
|
+
height: 20px;
|
|
1060
|
+
stroke-width: 2px;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.absolute { position: absolute; }
|
|
1064
|
+
.relative { position: relative; }
|
|
1065
|
+
.rounded-full { border-radius: 9999px; }
|
|
1066
|
+
.flex { display: flex; }
|
|
1067
|
+
.items-center { align-items: center; }
|
|
1068
|
+
.justify-center { justify-content: center; }
|
|
1069
|
+
.w-full { width: 100%; }
|
|
1070
|
+
.h-full { height: 100%; }
|
|
1071
|
+
.z-50 { z-index: 50; }
|
|
1072
|
+
|
|
1073
|
+
.branding-footer {
|
|
1074
|
+
display: flex;
|
|
1075
|
+
justify-content: center;
|
|
1076
|
+
padding: 4px 0 8px 0;
|
|
1077
|
+
background-color: #f9fafb;
|
|
1078
|
+
font-size: 10px;
|
|
1079
|
+
color: #9ca3af;
|
|
1080
|
+
font-weight: 500;
|
|
1081
|
+
letter-spacing: 0.025em;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
.branding-footer b {
|
|
1085
|
+
color: #3b82f6;
|
|
1086
|
+
font-weight: 700;
|
|
1087
|
+
margin-left: 4px;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
@media (max-width: 640px) {
|
|
1091
|
+
.widget-panel {
|
|
1092
|
+
width: 75vw !important;
|
|
1093
|
+
height: 50vh !important;
|
|
1094
|
+
max-width: 75vw !important;
|
|
1095
|
+
max-height: 50vh !important;
|
|
1096
|
+
top: auto !important;
|
|
1097
|
+
left: auto !important;
|
|
1098
|
+
right: 16px !important;
|
|
1099
|
+
bottom: 16px !important;
|
|
1100
|
+
border-radius: 20px !important;
|
|
1101
|
+
margin: 0 !important;
|
|
1102
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.widget-panel.maximized {
|
|
1106
|
+
width: 100vw !important;
|
|
1107
|
+
height: 100vh !important;
|
|
1108
|
+
max-width: 100vw !important;
|
|
1109
|
+
max-height: 100vh !important;
|
|
1110
|
+
top: 0 !important;
|
|
1111
|
+
left: 0 !important;
|
|
1112
|
+
right: 0 !important;
|
|
1113
|
+
bottom: 0 !important;
|
|
1114
|
+
border-radius: 0 !important;
|
|
1115
|
+
margin: 0 !important;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.widget-fab {
|
|
1119
|
+
width: 56px;
|
|
1120
|
+
height: 56px;
|
|
1121
|
+
bottom: 16px !important;
|
|
1122
|
+
right: 16px !important;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
:host(.vanira-panel-open) .widget-fab {
|
|
1126
|
+
display: none !important;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
.close-btn.collapse-panel-btn {
|
|
1130
|
+
display: flex !important;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
.widget-header {
|
|
1134
|
+
padding: 12px 16px;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
.widget-title {
|
|
1138
|
+
font-size: 16px;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.chat-input-area {
|
|
1142
|
+
padding: 12px;
|
|
1143
|
+
padding-bottom: env(safe-area-inset-bottom, 12px);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/* Voice overlay mobile default view adjustments */
|
|
1147
|
+
.widget-panel:not(.maximized) .voice-content-container {
|
|
1148
|
+
padding: 12px 16px 8px !important;
|
|
1149
|
+
min-height: 0 !important;
|
|
1150
|
+
flex: 1 !important;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.widget-panel:not(.maximized) .voice-orb-wrapper {
|
|
1154
|
+
width: 140px !important;
|
|
1155
|
+
height: 140px !important;
|
|
1156
|
+
transform: scale(0.65) !important;
|
|
1157
|
+
transform-origin: center !important;
|
|
1158
|
+
margin: 4px 0 !important;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.widget-panel:not(.maximized) .voice-video-container {
|
|
1162
|
+
max-width: 140px !important;
|
|
1163
|
+
margin-bottom: 8px !important;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
.widget-panel:not(.maximized) .voice-status-area {
|
|
1167
|
+
margin-top: 4px !important;
|
|
1168
|
+
gap: 4px !important;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.widget-panel:not(.maximized) .voice-status-area p {
|
|
1172
|
+
margin: 0 !important;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
.widget-panel:not(.maximized) .voice-transcription {
|
|
1176
|
+
margin-top: 4px !important;
|
|
1177
|
+
font-size: 11px !important;
|
|
1178
|
+
min-height: 24px !important;
|
|
1179
|
+
max-height: 40px !important;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.widget-panel:not(.maximized) .voice-footer {
|
|
1183
|
+
padding: 0 12px 12px !important;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.widget-panel:not(.maximized) .voice-hangup-btn {
|
|
1187
|
+
padding: 8px 20px !important;
|
|
1188
|
+
font-size: 12px !important;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
/* Session toggle — Continue / Restart */
|
|
1193
|
+
.session-selector-container {
|
|
1194
|
+
display: flex;
|
|
1195
|
+
gap: 8px;
|
|
1196
|
+
background: #eef2f6;
|
|
1197
|
+
padding: 4px;
|
|
1198
|
+
border-radius: 999px;
|
|
1199
|
+
margin-top: 4px;
|
|
1200
|
+
width: 100%;
|
|
1201
|
+
max-width: 220px;
|
|
1202
|
+
box-sizing: border-box;
|
|
1203
|
+
border: none;
|
|
1204
|
+
pointer-events: auto !important;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
.session-option {
|
|
1208
|
+
flex: 1 1 auto;
|
|
1209
|
+
display: flex;
|
|
1210
|
+
flex-direction: row;
|
|
1211
|
+
align-items: center;
|
|
1212
|
+
justify-content: center;
|
|
1213
|
+
gap: 6px;
|
|
1214
|
+
min-width: 88px;
|
|
1215
|
+
padding: 9px 16px;
|
|
1216
|
+
background: transparent;
|
|
1217
|
+
border-radius: 999px;
|
|
1218
|
+
cursor: pointer;
|
|
1219
|
+
transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
|
|
1220
|
+
border: none;
|
|
1221
|
+
user-select: none;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
.session-option:hover:not(.active) {
|
|
1225
|
+
background: rgba(255, 255, 255, 0.55);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
.session-option.active {
|
|
1229
|
+
background: #ffffff;
|
|
1230
|
+
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
.session-option .session-icon {
|
|
1234
|
+
display: flex;
|
|
1235
|
+
align-items: center;
|
|
1236
|
+
justify-content: center;
|
|
1237
|
+
flex-shrink: 0;
|
|
1238
|
+
width: 14px;
|
|
1239
|
+
height: 14px;
|
|
1240
|
+
color: #64748b;
|
|
1241
|
+
transition: color 0.18s ease;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
.session-option .session-icon svg {
|
|
1245
|
+
width: 13px;
|
|
1246
|
+
height: 13px;
|
|
1247
|
+
display: block;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.session-option.active .session-icon {
|
|
1251
|
+
color: #0f172a;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.session-option .session-title {
|
|
1255
|
+
font-size: 12px;
|
|
1256
|
+
font-weight: 500;
|
|
1257
|
+
color: #475569;
|
|
1258
|
+
margin: 0;
|
|
1259
|
+
letter-spacing: -0.01em;
|
|
1260
|
+
text-transform: none;
|
|
1261
|
+
line-height: 1;
|
|
1262
|
+
white-space: nowrap;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
.session-option.active .session-title {
|
|
1266
|
+
color: #0f172a;
|
|
1267
|
+
font-weight: 600;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.session-option .session-desc {
|
|
1271
|
+
display: none;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/* Selector styling for clean card launcher */
|
|
1275
|
+
.clean-card-launcher .session-selector-container {
|
|
1276
|
+
width: 100%;
|
|
1277
|
+
margin-top: 0;
|
|
1278
|
+
margin-bottom: 0;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.clean-card-launcher.has-session-choice .session-selector-container {
|
|
1282
|
+
margin-top: 2px;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.clean-card-launcher .session-option {
|
|
1286
|
+
padding: 7px 10px;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.clean-card-launcher .session-option .session-title {
|
|
1290
|
+
font-size: 12px;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/* Thin Resolve Bar & Link above text input */
|
|
1294
|
+
.chat-resolve-bar {
|
|
1295
|
+
padding: 8px 16px;
|
|
1296
|
+
border-top: 1px solid rgba(0, 0, 0, 0.05);
|
|
1297
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.03);
|
|
1298
|
+
background: #ffffff;
|
|
1299
|
+
display: flex;
|
|
1300
|
+
justify-content: center;
|
|
1301
|
+
align-items: center;
|
|
1302
|
+
z-index: 25;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.chat-resolve-link {
|
|
1306
|
+
background: none;
|
|
1307
|
+
border: none;
|
|
1308
|
+
font-size: 11px;
|
|
1309
|
+
font-weight: 500;
|
|
1310
|
+
color: var(--primary);
|
|
1311
|
+
cursor: pointer;
|
|
1312
|
+
transition: all 0.2s;
|
|
1313
|
+
text-decoration: underline;
|
|
1314
|
+
opacity: 0.8;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
.chat-resolve-link:hover {
|
|
1318
|
+
opacity: 1;
|
|
1319
|
+
color: var(--primary-hover);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/* ── Voice active overlay (in-call UI) ─────────────────────────────────── */
|
|
1323
|
+
#voice-active-overlay {
|
|
1324
|
+
position: absolute;
|
|
1325
|
+
inset: 0;
|
|
1326
|
+
background: #fafafa;
|
|
1327
|
+
pointer-events: auto;
|
|
1328
|
+
z-index: 60;
|
|
1329
|
+
display: none;
|
|
1330
|
+
flex-direction: column;
|
|
1331
|
+
align-items: center;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
#voice-active-overlay .voice-content-container {
|
|
1335
|
+
flex: 1;
|
|
1336
|
+
min-height: 0;
|
|
1337
|
+
display: flex;
|
|
1338
|
+
flex-direction: column;
|
|
1339
|
+
align-items: center;
|
|
1340
|
+
justify-content: center;
|
|
1341
|
+
width: 100%;
|
|
1342
|
+
padding: 20px 16px 8px;
|
|
1343
|
+
box-sizing: border-box;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
#voice-active-overlay .voice-orb-wrapper {
|
|
1347
|
+
position: relative;
|
|
1348
|
+
width: 140px;
|
|
1349
|
+
height: 140px;
|
|
1350
|
+
display: flex;
|
|
1351
|
+
align-items: center;
|
|
1352
|
+
justify-content: center;
|
|
1353
|
+
margin: 0 0 10px;
|
|
1354
|
+
flex-shrink: 0;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
#voice-active-overlay .voice-orb-connecting-ring,
|
|
1358
|
+
#voice-active-overlay .voice-orb-error-ring {
|
|
1359
|
+
position: absolute;
|
|
1360
|
+
width: 112px;
|
|
1361
|
+
height: 112px;
|
|
1362
|
+
border-radius: 50%;
|
|
1363
|
+
border: 2px solid #e2e8f0;
|
|
1364
|
+
border-top-color: #64748b;
|
|
1365
|
+
background: transparent;
|
|
1366
|
+
display: none;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
#voice-active-overlay .voice-orb-error-ring {
|
|
1370
|
+
border-color: #fecaca;
|
|
1371
|
+
border-top-color: #ef4444;
|
|
1372
|
+
animation: spin 1.2s linear infinite;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
#voice-active-overlay .voice-orb-ring-outer {
|
|
1376
|
+
position: absolute;
|
|
1377
|
+
width: 124px;
|
|
1378
|
+
height: 124px;
|
|
1379
|
+
border-radius: 50%;
|
|
1380
|
+
border: 1px solid color-mix(in srgb, var(--voice-secondary, #64748b) 18%, transparent);
|
|
1381
|
+
background: transparent;
|
|
1382
|
+
animation: orb-breathe 2.6s ease-in-out infinite;
|
|
1383
|
+
display: none;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
#voice-active-overlay .voice-orb-ring-mid {
|
|
1387
|
+
position: absolute;
|
|
1388
|
+
width: 116px;
|
|
1389
|
+
height: 116px;
|
|
1390
|
+
border-radius: 50%;
|
|
1391
|
+
border: 1px solid rgba(15, 23, 42, 0.07);
|
|
1392
|
+
background: transparent;
|
|
1393
|
+
animation: orb-breathe-delayed 2.6s ease-in-out infinite;
|
|
1394
|
+
display: none;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
#voice-active-overlay .voice-orb-disc {
|
|
1398
|
+
position: absolute;
|
|
1399
|
+
width: 100px;
|
|
1400
|
+
height: 100px;
|
|
1401
|
+
border-radius: 50%;
|
|
1402
|
+
background: linear-gradient(165deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
|
|
1403
|
+
box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.95);
|
|
1404
|
+
border: 1px solid rgba(15, 23, 42, 0.06);
|
|
1405
|
+
display: none;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
#voice-active-overlay .voice-orb-shine {
|
|
1409
|
+
position: absolute;
|
|
1410
|
+
width: 100px;
|
|
1411
|
+
height: 100px;
|
|
1412
|
+
border-radius: 50%;
|
|
1413
|
+
background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85) 0%, transparent 58%);
|
|
1414
|
+
display: none;
|
|
1415
|
+
pointer-events: none;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
#voice-active-overlay .voice-connecting-orb {
|
|
1419
|
+
position: relative;
|
|
1420
|
+
z-index: 10;
|
|
1421
|
+
width: 80px;
|
|
1422
|
+
height: 80px;
|
|
1423
|
+
border-radius: 50%;
|
|
1424
|
+
display: none;
|
|
1425
|
+
align-items: center;
|
|
1426
|
+
justify-content: center;
|
|
1427
|
+
background: linear-gradient(135deg, var(--voice-primary, #0f172a) 0%, var(--voice-secondary, #334155) 100%);
|
|
1428
|
+
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
#voice-active-overlay .voice-orb-center {
|
|
1432
|
+
position: relative;
|
|
1433
|
+
z-index: 10;
|
|
1434
|
+
width: 44px;
|
|
1435
|
+
height: 44px;
|
|
1436
|
+
border-radius: 50%;
|
|
1437
|
+
display: flex;
|
|
1438
|
+
align-items: center;
|
|
1439
|
+
justify-content: center;
|
|
1440
|
+
background: #ffffff;
|
|
1441
|
+
border: 1px solid #e5e7eb;
|
|
1442
|
+
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
|
|
1443
|
+
color: #0f172a;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
#voice-active-overlay .voice-orb-center svg {
|
|
1447
|
+
width: 20px;
|
|
1448
|
+
height: 20px;
|
|
1449
|
+
stroke: #0f172a;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
#voice-active-overlay .voice-orb-center.is-error {
|
|
1453
|
+
border-color: #fecaca;
|
|
1454
|
+
color: #dc2626;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
#voice-active-overlay .voice-orb-center.is-error svg {
|
|
1458
|
+
stroke: #dc2626;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
#voice-active-overlay .voice-status-area {
|
|
1462
|
+
display: flex;
|
|
1463
|
+
flex-direction: column;
|
|
1464
|
+
align-items: center;
|
|
1465
|
+
gap: 4px;
|
|
1466
|
+
margin-top: 2px;
|
|
1467
|
+
width: 100%;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
#voice-active-overlay .voice-connecting-label {
|
|
1471
|
+
display: none;
|
|
1472
|
+
margin: 0;
|
|
1473
|
+
font-size: 12px;
|
|
1474
|
+
font-weight: 600;
|
|
1475
|
+
color: #334155;
|
|
1476
|
+
letter-spacing: -0.01em;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
#voice-active-overlay .voice-connecting-hint {
|
|
1480
|
+
display: none;
|
|
1481
|
+
margin: 0;
|
|
1482
|
+
font-size: 11px;
|
|
1483
|
+
font-weight: 400;
|
|
1484
|
+
color: #94a3b8;
|
|
1485
|
+
letter-spacing: -0.01em;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
#voice-active-overlay .voice-connected-badge {
|
|
1489
|
+
display: none;
|
|
1490
|
+
align-items: center;
|
|
1491
|
+
gap: 6px;
|
|
1492
|
+
padding: 0;
|
|
1493
|
+
background: transparent;
|
|
1494
|
+
border: none;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
#voice-active-overlay .voice-live-status-text {
|
|
1498
|
+
font-size: 12px;
|
|
1499
|
+
font-weight: 600;
|
|
1500
|
+
color: #475569;
|
|
1501
|
+
letter-spacing: -0.01em;
|
|
1502
|
+
line-height: 1.2;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
#voice-active-overlay .voice-timer {
|
|
1506
|
+
display: none;
|
|
1507
|
+
font-size: 13px;
|
|
1508
|
+
font-weight: 500;
|
|
1509
|
+
color: #94a3b8;
|
|
1510
|
+
font-variant-numeric: tabular-nums;
|
|
1511
|
+
letter-spacing: 0.02em;
|
|
1512
|
+
line-height: 1.2;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
#voice-active-overlay .voice-error-label {
|
|
1516
|
+
display: none;
|
|
1517
|
+
margin: 0;
|
|
1518
|
+
font-size: 12px;
|
|
1519
|
+
color: #dc2626;
|
|
1520
|
+
font-weight: 500;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
#voice-active-overlay .voice-retry-btn {
|
|
1524
|
+
display: none;
|
|
1525
|
+
padding: 5px 12px;
|
|
1526
|
+
background: #f1f5f9;
|
|
1527
|
+
border: none;
|
|
1528
|
+
border-radius: 999px;
|
|
1529
|
+
font-size: 11px;
|
|
1530
|
+
font-weight: 500;
|
|
1531
|
+
color: #475569;
|
|
1532
|
+
cursor: pointer;
|
|
1533
|
+
pointer-events: auto;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
#voice-active-overlay .voice-retry-btn:hover {
|
|
1537
|
+
background: #e2e8f0;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
#voice-active-overlay .voice-transcription {
|
|
1541
|
+
margin-top: 8px;
|
|
1542
|
+
padding: 0 12px;
|
|
1543
|
+
text-align: center;
|
|
1544
|
+
min-height: 28px;
|
|
1545
|
+
max-height: 56px;
|
|
1546
|
+
overflow-y: auto;
|
|
1547
|
+
font-size: 12px;
|
|
1548
|
+
color: #94a3b8;
|
|
1549
|
+
font-style: italic;
|
|
1550
|
+
line-height: 1.35;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
#voice-active-overlay .voice-footer {
|
|
1554
|
+
width: 100%;
|
|
1555
|
+
display: flex;
|
|
1556
|
+
justify-content: center;
|
|
1557
|
+
align-items: center;
|
|
1558
|
+
gap: 10px;
|
|
1559
|
+
padding: 8px 16px 14px;
|
|
1560
|
+
pointer-events: auto;
|
|
1561
|
+
flex-shrink: 0;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
#voice-active-overlay .voice-mute-btn {
|
|
1565
|
+
display: inline-flex;
|
|
1566
|
+
align-items: center;
|
|
1567
|
+
justify-content: center;
|
|
1568
|
+
gap: 6px;
|
|
1569
|
+
padding: 8px 16px;
|
|
1570
|
+
background: #f4f4f5;
|
|
1571
|
+
color: #334155;
|
|
1572
|
+
border: none;
|
|
1573
|
+
border-radius: 999px;
|
|
1574
|
+
font-size: 12px;
|
|
1575
|
+
font-weight: 600;
|
|
1576
|
+
cursor: pointer;
|
|
1577
|
+
pointer-events: auto;
|
|
1578
|
+
transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
#voice-active-overlay .voice-mute-btn:hover:not(:disabled) {
|
|
1582
|
+
background: #e4e4e7;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
#voice-active-overlay .voice-mute-btn:active:not(:disabled) {
|
|
1586
|
+
transform: scale(0.96);
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
#voice-active-overlay .voice-mute-btn:disabled {
|
|
1590
|
+
opacity: 0.45;
|
|
1591
|
+
cursor: not-allowed;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
#voice-active-overlay .voice-mute-btn.is-muted {
|
|
1595
|
+
background: #fef2f2;
|
|
1596
|
+
color: #dc2626;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
#voice-active-overlay .voice-mute-icon {
|
|
1600
|
+
display: flex;
|
|
1601
|
+
align-items: center;
|
|
1602
|
+
justify-content: center;
|
|
1603
|
+
line-height: 0;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
#voice-active-overlay .voice-mute-icon svg {
|
|
1607
|
+
width: 14px;
|
|
1608
|
+
height: 14px;
|
|
1609
|
+
stroke: currentColor;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
#voice-active-overlay .voice-mute-label {
|
|
1613
|
+
letter-spacing: -0.01em;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
#voice-active-overlay .voice-hangup-btn {
|
|
1617
|
+
display: inline-flex;
|
|
1618
|
+
align-items: center;
|
|
1619
|
+
justify-content: center;
|
|
1620
|
+
gap: 6px;
|
|
1621
|
+
padding: 8px 18px;
|
|
1622
|
+
background: #ef4444;
|
|
1623
|
+
color: #ffffff;
|
|
1624
|
+
border: none;
|
|
1625
|
+
border-radius: 999px;
|
|
1626
|
+
font-size: 12px;
|
|
1627
|
+
font-weight: 600;
|
|
1628
|
+
cursor: pointer;
|
|
1629
|
+
pointer-events: auto;
|
|
1630
|
+
transition: background 0.15s ease, transform 0.15s ease;
|
|
1631
|
+
box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
#voice-active-overlay .voice-hangup-btn:hover {
|
|
1635
|
+
background: #dc2626;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
#voice-active-overlay .voice-hangup-btn:active {
|
|
1639
|
+
transform: scale(0.96);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
#voice-active-overlay .voice-hangup-icon {
|
|
1643
|
+
display: flex;
|
|
1644
|
+
align-items: center;
|
|
1645
|
+
justify-content: center;
|
|
1646
|
+
line-height: 0;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
#voice-active-overlay .voice-hangup-icon svg {
|
|
1650
|
+
width: 14px;
|
|
1651
|
+
height: 14px;
|
|
1652
|
+
transform: rotate(135deg);
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
#voice-active-overlay .voice-hangup-label {
|
|
1656
|
+
letter-spacing: -0.01em;
|
|
1657
|
+
text-transform: none;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
/* Human presence launcher — waving hand pill */
|
|
1661
|
+
.human-presence-launcher {
|
|
1662
|
+
position: fixed;
|
|
1663
|
+
z-index: 9999;
|
|
1664
|
+
bottom: 20px;
|
|
1665
|
+
right: 20px;
|
|
1666
|
+
display: flex;
|
|
1667
|
+
align-items: center;
|
|
1668
|
+
gap: 12px;
|
|
1669
|
+
padding: 6px 16px 6px 6px;
|
|
1670
|
+
margin: 0;
|
|
1671
|
+
appearance: none;
|
|
1672
|
+
-webkit-appearance: none;
|
|
1673
|
+
background: rgba(10, 10, 12, 0.82);
|
|
1674
|
+
backdrop-filter: blur(20px);
|
|
1675
|
+
-webkit-backdrop-filter: blur(20px);
|
|
1676
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
1677
|
+
border-radius: 999px;
|
|
1678
|
+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
|
1679
|
+
cursor: pointer;
|
|
1680
|
+
pointer-events: auto !important;
|
|
1681
|
+
animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
1682
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
1683
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
|
|
1684
|
+
max-width: min(240px, calc(100vw - 32px));
|
|
1685
|
+
text-align: left;
|
|
1686
|
+
-webkit-tap-highlight-color: transparent;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.human-presence-launcher:hover {
|
|
1690
|
+
transform: translateY(-2px);
|
|
1691
|
+
border-color: rgba(255, 255, 255, 0.16);
|
|
1692
|
+
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
.human-presence-launcher:active {
|
|
1696
|
+
transform: scale(0.98);
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
.human-presence-wave-icon {
|
|
1700
|
+
flex-shrink: 0;
|
|
1701
|
+
width: 44px;
|
|
1702
|
+
height: 44px;
|
|
1703
|
+
border-radius: 50%;
|
|
1704
|
+
display: flex;
|
|
1705
|
+
align-items: center;
|
|
1706
|
+
justify-content: center;
|
|
1707
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1708
|
+
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
1709
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
|
|
1710
|
+
transform-origin: 65% 85%;
|
|
1711
|
+
animation: human-wave-hand 0.9s ease-in-out infinite;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.human-presence-wave-emoji {
|
|
1715
|
+
font-size: 26px;
|
|
1716
|
+
line-height: 1;
|
|
1717
|
+
display: block;
|
|
1718
|
+
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
|
|
1719
|
+
user-select: none;
|
|
1720
|
+
pointer-events: none;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
.human-presence-copy {
|
|
1724
|
+
display: flex;
|
|
1725
|
+
flex-direction: column;
|
|
1726
|
+
gap: 2px;
|
|
1727
|
+
min-width: 0;
|
|
1728
|
+
flex: 1;
|
|
1729
|
+
padding-right: 2px;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
.human-presence-greeting {
|
|
1733
|
+
font-size: 12px;
|
|
1734
|
+
font-weight: 600;
|
|
1735
|
+
color: rgba(255, 255, 255, 0.94);
|
|
1736
|
+
letter-spacing: -0.02em;
|
|
1737
|
+
line-height: 1.25;
|
|
1738
|
+
white-space: nowrap;
|
|
1739
|
+
overflow: hidden;
|
|
1740
|
+
text-overflow: ellipsis;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.human-presence-subtitle {
|
|
1744
|
+
font-size: 11px;
|
|
1745
|
+
font-weight: 500;
|
|
1746
|
+
color: rgba(255, 255, 255, 0.42);
|
|
1747
|
+
letter-spacing: -0.01em;
|
|
1748
|
+
line-height: 1.25;
|
|
1749
|
+
white-space: nowrap;
|
|
1750
|
+
overflow: hidden;
|
|
1751
|
+
text-overflow: ellipsis;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
/* Voice overlay live status (listening / speaking) */
|
|
1755
|
+
.voice-live-status-bars {
|
|
1756
|
+
display: inline-flex;
|
|
1757
|
+
align-items: flex-end;
|
|
1758
|
+
gap: 2px;
|
|
1759
|
+
height: 10px;
|
|
1760
|
+
flex-shrink: 0;
|
|
1761
|
+
color: #64748b;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
.voice-live-status-bars i {
|
|
1765
|
+
display: block;
|
|
1766
|
+
width: 2px;
|
|
1767
|
+
height: 3px;
|
|
1768
|
+
border-radius: 999px;
|
|
1769
|
+
background: currentColor;
|
|
1770
|
+
opacity: 0.55;
|
|
1771
|
+
animation: pillBarListen 1s ease-in-out infinite;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
.voice-live-status-bars i:nth-child(2) {
|
|
1775
|
+
animation-delay: 0.12s;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
.voice-live-status-bars i:nth-child(3) {
|
|
1779
|
+
animation-delay: 0.24s;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
.voice-live-status-bars.speaking i {
|
|
1783
|
+
animation-name: pillBarSpeak;
|
|
1784
|
+
opacity: 0.85;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.voice-connected-badge.is-speaking .voice-live-status-text,
|
|
1788
|
+
.voice-connected-badge.is-speaking .voice-live-status-bars {
|
|
1789
|
+
color: #334155;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
/* Audio-only compact panel */
|
|
1793
|
+
.widget-panel.voice-only-panel {
|
|
1794
|
+
width: 168px !important;
|
|
1795
|
+
height: 252px !important;
|
|
1796
|
+
border-radius: 18px !important;
|
|
1797
|
+
transition: width 0.25s ease;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
.widget-panel.voice-only-panel:has(.has-session-choice) {
|
|
1801
|
+
width: 236px !important;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
.widget-panel.voice-only-panel .widget-header {
|
|
1805
|
+
padding: 8px 12px !important;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
.widget-panel.voice-only-panel .widget-title {
|
|
1809
|
+
font-size: 12px !important;
|
|
1810
|
+
font-weight: 600 !important;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.widget-panel.voice-only-panel .close-btn {
|
|
1814
|
+
width: 24px !important;
|
|
1815
|
+
height: 24px !important;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
.widget-panel.voice-only-panel .close-btn svg {
|
|
1819
|
+
width: 12px !important;
|
|
1820
|
+
height: 12px !important;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.widget-panel.voice-only-panel .voice-idle-stack {
|
|
1824
|
+
max-width: calc(100% - 8px) !important;
|
|
1825
|
+
gap: 10px !important;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
.widget-panel.voice-only-panel .voice-mode-container.has-session-choice .voice-idle-stack {
|
|
1829
|
+
gap: 12px !important;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
.widget-panel.voice-only-panel .voice-doodle-stage {
|
|
1833
|
+
width: 88px !important;
|
|
1834
|
+
height: 88px !important;
|
|
1835
|
+
margin-bottom: 2px !important;
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
.widget-panel.voice-only-panel .central-orb-container {
|
|
1839
|
+
width: 56px !important;
|
|
1840
|
+
height: 56px !important;
|
|
1841
|
+
margin-bottom: 0 !important;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
.widget-panel.voice-only-panel .voice-doodle-emoji {
|
|
1845
|
+
font-size: 28px !important;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
.widget-panel.voice-only-panel .voice-doodle-squiggle {
|
|
1849
|
+
width: 28px !important;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
.widget-panel.voice-only-panel .voice-doodle-spark {
|
|
1853
|
+
font-size: 10px !important;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
.widget-panel.voice-only-panel .voice-doodle-ring-a {
|
|
1857
|
+
inset: -4px !important;
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
.widget-panel.voice-only-panel .voice-doodle-ring-b {
|
|
1861
|
+
inset: -9px !important;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
.widget-panel.voice-only-panel .voice-doodle-title::after {
|
|
1865
|
+
width: 52px !important;
|
|
1866
|
+
height: 4px !important;
|
|
1867
|
+
margin-top: 3px !important;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
.widget-panel.voice-only-panel .voice-status-text {
|
|
1871
|
+
font-size: 12px !important;
|
|
1872
|
+
font-weight: 600 !important;
|
|
1873
|
+
margin-bottom: 0 !important;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
.widget-panel.voice-only-panel .voice-status-subtext {
|
|
1877
|
+
font-size: 10px !important;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
.widget-panel.voice-only-panel .session-selector-container {
|
|
1881
|
+
width: 100% !important;
|
|
1882
|
+
max-width: none !important;
|
|
1883
|
+
gap: 6px !important;
|
|
1884
|
+
padding: 4px !important;
|
|
1885
|
+
margin-top: 6px !important;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
.widget-panel.voice-only-panel .session-option {
|
|
1889
|
+
flex: 1 1 0 !important;
|
|
1890
|
+
min-width: 96px !important;
|
|
1891
|
+
padding: 10px 14px !important;
|
|
1892
|
+
gap: 6px !important;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
.widget-panel.voice-only-panel .session-option .session-title {
|
|
1896
|
+
font-size: 12px !important;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
.widget-panel.voice-only-panel .session-option .session-icon {
|
|
1900
|
+
width: 13px !important;
|
|
1901
|
+
height: 13px !important;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
.widget-panel.voice-only-panel .session-option .session-icon svg {
|
|
1905
|
+
width: 12px !important;
|
|
1906
|
+
height: 12px !important;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
/* Active call overlay — compact balanced layout */
|
|
1910
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-content-container {
|
|
1911
|
+
padding: 6px 12px 2px !important;
|
|
1912
|
+
justify-content: center !important;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-wrapper {
|
|
1916
|
+
width: 88px !important;
|
|
1917
|
+
height: 88px !important;
|
|
1918
|
+
margin: 0 0 8px !important;
|
|
1919
|
+
transform: none !important;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-ring-outer,
|
|
1923
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-ring-mid {
|
|
1924
|
+
display: none !important;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-disc,
|
|
1928
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-shine {
|
|
1929
|
+
width: 72px !important;
|
|
1930
|
+
height: 72px !important;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-connecting-orb {
|
|
1934
|
+
width: 64px !important;
|
|
1935
|
+
height: 64px !important;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-center {
|
|
1939
|
+
width: 36px !important;
|
|
1940
|
+
height: 36px !important;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-orb-center svg {
|
|
1944
|
+
width: 16px !important;
|
|
1945
|
+
height: 16px !important;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-status-area {
|
|
1949
|
+
gap: 3px !important;
|
|
1950
|
+
margin-top: 0 !important;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-connecting-label {
|
|
1954
|
+
font-size: 11px !important;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-connecting-hint {
|
|
1958
|
+
font-size: 10px !important;
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-live-status-text {
|
|
1962
|
+
font-size: 11px !important;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-live-status-bars {
|
|
1966
|
+
height: 9px !important;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-timer {
|
|
1970
|
+
font-size: 12px !important;
|
|
1971
|
+
color: #64748b !important;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-transcription {
|
|
1975
|
+
margin-top: 4px !important;
|
|
1976
|
+
font-size: 10px !important;
|
|
1977
|
+
min-height: 0 !important;
|
|
1978
|
+
max-height: 32px !important;
|
|
1979
|
+
padding: 0 8px !important;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-footer {
|
|
1983
|
+
padding: 6px 12px 12px !important;
|
|
1984
|
+
gap: 8px !important;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-mute-btn {
|
|
1988
|
+
width: 36px !important;
|
|
1989
|
+
height: 36px !important;
|
|
1990
|
+
padding: 0 !important;
|
|
1991
|
+
border-radius: 50% !important;
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-mute-label {
|
|
1995
|
+
display: none !important;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-mute-icon svg {
|
|
1999
|
+
width: 15px !important;
|
|
2000
|
+
height: 15px !important;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-hangup-btn {
|
|
2004
|
+
width: 36px !important;
|
|
2005
|
+
height: 36px !important;
|
|
2006
|
+
padding: 0 !important;
|
|
2007
|
+
border-radius: 50% !important;
|
|
2008
|
+
box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-hangup-label {
|
|
2012
|
+
display: none !important;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
.widget-panel.voice-only-panel #voice-active-overlay .voice-hangup-icon svg {
|
|
2016
|
+
width: 15px !important;
|
|
2017
|
+
height: 15px !important;
|
|
2018
|
+
}
|
|
2019
|
+
`,U={phone:`
|
|
2020
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2021
|
+
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
|
|
2022
|
+
</svg>
|
|
2023
|
+
`,close:`
|
|
2024
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2025
|
+
<line x1="18" y1="6" x2="6" y2="18"/>
|
|
2026
|
+
<line x1="6" y1="6" x2="18" y2="18"/>
|
|
2027
|
+
</svg>
|
|
2028
|
+
`,sessionContinue:`
|
|
2029
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2030
|
+
<polygon points="5 3 19 12 5 21 5 3"/>
|
|
2031
|
+
</svg>
|
|
2032
|
+
`,sessionRestart:`
|
|
2033
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2034
|
+
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
|
|
2035
|
+
<path d="M3 3v5h5"/>
|
|
2036
|
+
</svg>
|
|
2037
|
+
`,mic:`
|
|
2038
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2039
|
+
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"/>
|
|
2040
|
+
<path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
|
|
2041
|
+
<line x1="12" y1="19" x2="12" y2="22"/>
|
|
2042
|
+
</svg>
|
|
2043
|
+
`,micOff:`
|
|
2044
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2045
|
+
<line x1="1" y1="1" x2="23" y2="23"/>
|
|
2046
|
+
<path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"/>
|
|
2047
|
+
<path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"/>
|
|
2048
|
+
<line x1="12" y1="19" x2="12" y2="23"/>
|
|
2049
|
+
</svg>
|
|
2050
|
+
`,send:`
|
|
2051
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2052
|
+
<line x1="22" y1="2" x2="11" y2="13"/>
|
|
2053
|
+
<polygon points="22 2 15 22 11 13 2 9 22 2"/>
|
|
2054
|
+
</svg>
|
|
2055
|
+
`,chat:`
|
|
2056
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2057
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
|
|
2058
|
+
</svg>
|
|
2059
|
+
`,audioLines:`
|
|
2060
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2061
|
+
<path d="M2 10v3"/>
|
|
2062
|
+
<path d="M6 6v11"/>
|
|
2063
|
+
<path d="M10 3v18"/>
|
|
2064
|
+
<path d="M14 8v7"/>
|
|
2065
|
+
<path d="M18 5v13"/>
|
|
2066
|
+
<path d="M22 10v3"/>
|
|
2067
|
+
</svg>
|
|
2068
|
+
`,minimize2:`
|
|
2069
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2070
|
+
<polyline points="4 14 10 14 10 20"/>
|
|
2071
|
+
<polyline points="20 10 14 10 14 4"/>
|
|
2072
|
+
<line x1="14" y1="10" x2="21" y2="3"/>
|
|
2073
|
+
<line x1="3" y1="21" x2="10" y2="14"/>
|
|
2074
|
+
</svg>
|
|
2075
|
+
`,voice_orb:`
|
|
2076
|
+
<div style="display: flex; align-items: center; justify-content: center; gap: 3px; height: 100%; width: 100%;">
|
|
2077
|
+
<div style="width: 3px; height: 10px; background: white; border-radius: 10px; animation: voice-bars-orb 1.2s infinite ease-in-out; animation-delay: 0s;"></div>
|
|
2078
|
+
<div style="width: 3px; height: 18px; background: white; border-radius: 10px; animation: voice-bars-orb 1.2s infinite ease-in-out; animation-delay: 0.2s;"></div>
|
|
2079
|
+
<div style="width: 3px; height: 14px; background: white; border-radius: 10px; animation: voice-bars-orb 1.2s infinite ease-in-out; animation-delay: 0.4s;"></div>
|
|
2080
|
+
<div style="width: 3px; height: 22px; background: white; border-radius: 10px; animation: voice-bars-orb 1.2s infinite ease-in-out; animation-delay: 0.1s;"></div>
|
|
2081
|
+
<div style="width: 3px; height: 12px; background: white; border-radius: 10px; animation: voice-bars-orb 1.2s infinite ease-in-out; animation-delay: 0.3s;"></div>
|
|
2082
|
+
</div>
|
|
2083
|
+
`},Hi={automotive:`
|
|
2084
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2085
|
+
<path d="M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"/>
|
|
2086
|
+
<circle cx="7" cy="17" r="2"/>
|
|
2087
|
+
<path d="M9 17h6"/>
|
|
2088
|
+
<circle cx="17" cy="17" r="2"/>
|
|
2089
|
+
</svg>
|
|
2090
|
+
`,education:`
|
|
2091
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2092
|
+
<path d="M22 10v6M2 10l10-5 10 5-10 5z"/>
|
|
2093
|
+
<path d="M6 12v5c3 3 9 3 12 0v-5"/>
|
|
2094
|
+
</svg>
|
|
2095
|
+
`,finance:`
|
|
2096
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2097
|
+
<line x1="3" y1="21" x2="21" y2="21"/>
|
|
2098
|
+
<line x1="6" y1="21" x2="6" y2="12"/>
|
|
2099
|
+
<line x1="18" y1="21" x2="18" y2="12"/>
|
|
2100
|
+
<line x1="6" y1="12" x2="18" y2="12"/>
|
|
2101
|
+
<path d="M5 6 L12 2 L19 6"/>
|
|
2102
|
+
<line x1="6" y1="6" x2="6" y2="12"/>
|
|
2103
|
+
<line x1="18" y1="6" x2="18" y2="12"/>
|
|
2104
|
+
<line x1="10" y1="21" x2="10" y2="12"/>
|
|
2105
|
+
<line x1="14" y1="21" x2="14" y2="12"/>
|
|
2106
|
+
</svg>
|
|
2107
|
+
`,fitness:`
|
|
2108
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2109
|
+
<path d="m6.5 6.5 11 11"/>
|
|
2110
|
+
<path d="m21 21-1-1"/>
|
|
2111
|
+
<path d="m3 3 1 1"/>
|
|
2112
|
+
<path d="m18 22 4-4"/>
|
|
2113
|
+
<path d="m2 6 4-4"/>
|
|
2114
|
+
<path d="m3 10 7-7"/>
|
|
2115
|
+
<path d="m14 21 7-7"/>
|
|
2116
|
+
</svg>
|
|
2117
|
+
`,food:`
|
|
2118
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2119
|
+
<path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"/>
|
|
2120
|
+
<path d="M7 2v20"/>
|
|
2121
|
+
<path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"/>
|
|
2122
|
+
</svg>
|
|
2123
|
+
`,government:`
|
|
2124
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2125
|
+
<rect x="4" y="2" width="16" height="20" rx="2" ry="2"/>
|
|
2126
|
+
<path d="M9 22v-4h6v4"/>
|
|
2127
|
+
<path d="M8 6h.01"/>
|
|
2128
|
+
<path d="M16 6h.01"/>
|
|
2129
|
+
<path d="M12 6h.01"/>
|
|
2130
|
+
<path d="M12 10h.01"/>
|
|
2131
|
+
<path d="M12 14h.01"/>
|
|
2132
|
+
<path d="M16 10h.01"/>
|
|
2133
|
+
<path d="M16 14h.01"/>
|
|
2134
|
+
<path d="M8 10h.01"/>
|
|
2135
|
+
<path d="M8 14h.01"/>
|
|
2136
|
+
</svg>
|
|
2137
|
+
`,healthcare:`
|
|
2138
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2139
|
+
<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>
|
|
2140
|
+
</svg>
|
|
2141
|
+
`,travel:`
|
|
2142
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2143
|
+
<path d="M12 2a5 5 0 0 1 5 5c0 4.5-9 13-9 13S3 11.5 3 7a5 5 0 0 1 10 0Z"/>
|
|
2144
|
+
<circle cx="12" cy="7" r="2"/>
|
|
2145
|
+
</svg>
|
|
2146
|
+
`,legal:`
|
|
2147
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2148
|
+
<path d="m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1z"/>
|
|
2149
|
+
<path d="m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1z"/>
|
|
2150
|
+
<path d="M7 21h10"/>
|
|
2151
|
+
<path d="M12 3v18"/>
|
|
2152
|
+
<path d="M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2"/>
|
|
2153
|
+
</svg>
|
|
2154
|
+
`,manufacturing:`
|
|
2155
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2156
|
+
<path d="M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/>
|
|
2157
|
+
<path d="M17 18h1"/>
|
|
2158
|
+
<path d="M12 18h1"/>
|
|
2159
|
+
<path d="M7 18h1"/>
|
|
2160
|
+
</svg>
|
|
2161
|
+
`,media:`
|
|
2162
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2163
|
+
<rect width="20" height="20" x="2" y="2" rx="2.18" ry="2.18"/>
|
|
2164
|
+
<line x1="7" x2="7" y1="2" y2="22"/>
|
|
2165
|
+
<line x1="17" x2="17" y1="2" y2="22"/>
|
|
2166
|
+
<line x1="2" x2="22" y1="12" y2="12"/>
|
|
2167
|
+
<line x1="2" x2="7" y1="7" y2="7"/>
|
|
2168
|
+
<line x1="2" x2="7" y1="17" y2="17"/>
|
|
2169
|
+
<line x1="17" x2="22" y1="17" y2="17"/>
|
|
2170
|
+
<line x1="17" x2="22" y1="7" y2="7"/>
|
|
2171
|
+
</svg>
|
|
2172
|
+
`,nonprofit:`
|
|
2173
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2174
|
+
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/>
|
|
2175
|
+
</svg>
|
|
2176
|
+
`,professional:`
|
|
2177
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2178
|
+
<rect width="20" height="14" x="2" y="7" rx="2" ry="2"/>
|
|
2179
|
+
<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/>
|
|
2180
|
+
</svg>
|
|
2181
|
+
`,realestate:`
|
|
2182
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2183
|
+
<path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
|
|
2184
|
+
<polyline points="9 22 9 12 15 12 15 22"/>
|
|
2185
|
+
</svg>
|
|
2186
|
+
`,retail:`
|
|
2187
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2188
|
+
<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"/>
|
|
2189
|
+
<path d="M3 6h18"/>
|
|
2190
|
+
<path d="M16 10a4 4 0 0 1-8 0"/>
|
|
2191
|
+
</svg>
|
|
2192
|
+
`,technology:`
|
|
2193
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2194
|
+
<rect width="18" height="12" x="3" y="4" rx="2" ry="2"/>
|
|
2195
|
+
<line x1="2" x2="22" y1="20" y2="20"/>
|
|
2196
|
+
</svg>
|
|
2197
|
+
`},st={...Hi,default_chat:U.chat,default_voice:U.mic,voice_orb:U.voice_orb,male:`<img src="${Ri}" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;" />`,female:`<img src="${zi}" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;" />`};Object.entries(Hi).forEach(([n,e])=>{st[`male_${n} `]=`
|
|
2198
|
+
< div style = "position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: white; border-radius: 50%;" >
|
|
2199
|
+
<div style="width: 60%; height: 60%; color: #000000;" >
|
|
2200
|
+
${e}
|
|
2201
|
+
</div>
|
|
2202
|
+
< div style = "
|
|
2203
|
+
position: absolute;
|
|
2204
|
+
bottom: -2px;
|
|
2205
|
+
right: -2px;
|
|
2206
|
+
width: 28px;
|
|
2207
|
+
height: 28px;
|
|
2208
|
+
background: white;
|
|
2209
|
+
border - radius: 50 %;
|
|
2210
|
+
border: 2px solid white;
|
|
2211
|
+
box - shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
2212
|
+
overflow: hidden;
|
|
2213
|
+
">
|
|
2214
|
+
< img src = "${Ri}" style = "width: 100%; height: 100%; object-fit: cover;" />
|
|
2215
|
+
</div>
|
|
2216
|
+
</div>
|
|
2217
|
+
`,st[`female_${n} `]=`
|
|
2218
|
+
< div style = "position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: white; border-radius: 50%;" >
|
|
2219
|
+
<div style="width: 60%; height: 60%; color: #000000;" >
|
|
2220
|
+
${e}
|
|
2221
|
+
</div>
|
|
2222
|
+
< div style = "
|
|
2223
|
+
position: absolute;
|
|
2224
|
+
bottom: -2px;
|
|
2225
|
+
right: -2px;
|
|
2226
|
+
width: 28px;
|
|
2227
|
+
height: 28px;
|
|
2228
|
+
background: white;
|
|
2229
|
+
border - radius: 50 %;
|
|
2230
|
+
border: 2px solid white;
|
|
2231
|
+
box - shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
2232
|
+
overflow: hidden;
|
|
2233
|
+
">
|
|
2234
|
+
< img src = "${zi}" style = "width: 100%; height: 100%; object-fit: cover;" />
|
|
2235
|
+
</div>
|
|
2236
|
+
</div>
|
|
2237
|
+
`});class Jt{constructor(e,t,i,s=U.chat){p(this,"element");p(this,"iconContainer");p(this,"posX",0);p(this,"posY",0);p(this,"isDragging",!1);p(this,"startX",0);p(this,"startY",0);p(this,"currentX",0);p(this,"currentY",0);p(this,"hasMoved",!1);this.onClick=e,this.onMove=t,this.onMoveEnd=i,this.element=document.createElement("button"),this.element.className="widget-fab",this.element.onpointerdown=this.dragStart.bind(this),this.iconContainer=document.createElement("div"),this.iconContainer.style.cssText="display:flex; align-items:center; justify-content:center; width:100%; height:100%;",this.iconContainer.innerHTML=s,this.element.appendChild(this.iconContainer)}dragStart(e){if(e.button!==0)return;const t=this.element.getBoundingClientRect();this.isDragging=!0,this.hasMoved=!1,this.startX=e.clientX,this.startY=e.clientY,this.currentX=t.left,this.currentY=t.top,this.element.setPointerCapture(e.pointerId),this.element.style.transition="none",this.element.style.cursor="grabbing";const i=r=>{var l;if(!this.isDragging)return;const o=r.clientX-this.startX,a=r.clientY-this.startY;(Math.abs(o)>5||Math.abs(a)>5)&&(this.hasMoved=!0),this.hasMoved&&(this.posX=this.currentX+o,this.posY=this.currentY+a,this.posX=Math.max(0,Math.min(this.posX,window.innerWidth-this.element.offsetWidth)),this.posY=Math.max(0,Math.min(this.posY,window.innerHeight-this.element.offsetHeight)),this.element.style.left=`${this.posX}px`,this.element.style.top=`${this.posY}px`,this.element.style.right="auto",this.element.style.bottom="auto",(l=this.onMove)==null||l.call(this,this.posX,this.posY))},s=r=>{var o;this.isDragging=!1,this.element.hasPointerCapture(r.pointerId)&&this.element.releasePointerCapture(r.pointerId),this.element.style.transition="all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",this.element.style.cursor="pointer",window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",s),this.hasMoved?(o=this.onMoveEnd)==null||o.call(this,this.posX,this.posY):this.onClick()};window.addEventListener("pointermove",i),window.addEventListener("pointerup",s)}getElement(){return this.element}setIcon(e){this.iconContainer.innerHTML=e}setPosition(e){this.element.style.cssText="",e.split(";").filter(i=>i.trim()).forEach(i=>{const[s,r]=i.split(":").map(o=>o.trim());s&&r&&(this.element.style[s]=r)}),this.element.style.position="fixed",this.element.style.zIndex="2147483647"}updateCoordinates(e,t){this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.element.style.right="auto",this.element.style.bottom="auto"}static get styles(){return`
|
|
2238
|
+
.widget-fab {
|
|
2239
|
+
position: fixed;
|
|
2240
|
+
z-index: 9999;
|
|
2241
|
+
width: 60px;
|
|
2242
|
+
height: 60px;
|
|
2243
|
+
border-radius: 50%;
|
|
2244
|
+
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
|
|
2245
|
+
border: none;
|
|
2246
|
+
cursor: pointer;
|
|
2247
|
+
display: flex;
|
|
2248
|
+
align-items: center;
|
|
2249
|
+
justify-content: center;
|
|
2250
|
+
box-shadow: var(--shadow);
|
|
2251
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2252
|
+
animation: fadeInScale 0.4s ease-out;
|
|
2253
|
+
touch-action: none;
|
|
2254
|
+
padding: 0;
|
|
2255
|
+
margin: 0;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
.widget-fab:hover {
|
|
2259
|
+
transform: scale(1.05);
|
|
2260
|
+
box-shadow: var(--shadow-lg);
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
.widget-fab:active {
|
|
2264
|
+
transform: scale(0.95);
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
.widget-fab svg {
|
|
2268
|
+
width: 26px;
|
|
2269
|
+
height: 26px;
|
|
2270
|
+
color: white;
|
|
2271
|
+
}
|
|
2272
|
+
`}}class Wt{constructor(e,t="Assistant",i){p(this,"element");p(this,"header");p(this,"titleElement");p(this,"contentArea");p(this,"collapseBtn",null);p(this,"closeBtn");this.onClose=e,this.title=t,this.onMinimize=i,this.element=document.createElement("div"),this.element.className="widget-panel hidden",this.header=document.createElement("div"),this.header.className="widget-header",this.titleElement=document.createElement("h3"),this.titleElement.className="widget-title",this.titleElement.textContent=this.title,this.header.appendChild(this.titleElement);const s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.gap="8px",s.style.marginLeft="auto",this.onMinimize&&(this.collapseBtn=document.createElement("button"),this.collapseBtn.className="close-btn collapse-panel-btn",this.collapseBtn.innerHTML=U.minimize2,this.collapseBtn.setAttribute("aria-label","Minimize to voice pill"),this.collapseBtn.onclick=()=>this.onMinimize(),s.appendChild(this.collapseBtn)),this.closeBtn=document.createElement("button"),this.closeBtn.className="close-btn",this.closeBtn.innerHTML=U.close,this.closeBtn.setAttribute("aria-label","Close widget"),this.closeBtn.onclick=this.onClose,s.appendChild(this.closeBtn),this.header.appendChild(s),this.contentArea=document.createElement("div"),this.contentArea.className="widget-body",this.contentArea.style.flex="1",this.contentArea.style.display="flex",this.contentArea.style.flexDirection="column",this.contentArea.style.overflow="hidden",this.contentArea.style.padding="0",this.element.appendChild(this.header),this.element.appendChild(this.contentArea)}getElement(){return this.element}setContent(e){this.contentArea.innerHTML="",this.contentArea.appendChild(e)}addToContent(e){this.contentArea.appendChild(e)}setTitle(e){this.titleElement.textContent=e}open(e){this.element.classList.remove("hidden"),this.updatePosition(e)}updatePosition(e){this.element.style.top="auto",this.element.style.bottom="auto",this.element.style.left="auto",this.element.style.right="auto",Object.assign(this.element.style,e),this.element.style.position="fixed",this.element.style.zIndex="2147483647"}close(){this.element.classList.add("hidden")}static get styles(){return`
|
|
2273
|
+
/* Panel Styles handled in widget.css.ts mostly, specific overrides here */
|
|
2274
|
+
`}}class Ui{constructor(e,t="#000000",i="#111111",s){p(this,"element");p(this,"contentContainer");p(this,"orbWrapper");p(this,"connectingRing");p(this,"errorRing");p(this,"waveLayers",[]);p(this,"outerGlow");p(this,"wave1");p(this,"wave2");p(this,"wave3");p(this,"centerIcon");p(this,"connectingOrb");p(this,"statusArea");p(this,"connectingLabel");p(this,"connectedBadge");p(this,"connectedStatusBars");p(this,"connectedStatusText");p(this,"errorLabel");p(this,"giveItAMinuteLabel");p(this,"retryBtn");p(this,"timerEl");p(this,"transcriptionEl");p(this,"hangupBtn");p(this,"muteBtn");p(this,"onToggleMute");p(this,"videoContainer");p(this,"videoElement");p(this,"prepareBadge");p(this,"statusBadge");p(this,"startTime",null);p(this,"timerInterval",null);p(this,"isAvatarMode",!1);p(this,"callStartedAt",null);p(this,"liveActivity","listening");this.onHangup=e,this.primaryColor=t,this.secondaryColor=i,this.onCallEnded=s,this.element=document.createElement("div"),this.element.id="voice-active-overlay",this.element.style.setProperty("--voice-primary",this.primaryColor),this.element.style.setProperty("--voice-secondary",this.secondaryColor),this.contentContainer=document.createElement("div"),this.contentContainer.className="voice-content-container",this.videoContainer=document.createElement("div"),this.videoContainer.className="voice-video-container",this.videoContainer.style.cssText=`
|
|
2275
|
+
display: none; position: relative; width: 100%; max-width: 260px;
|
|
2276
|
+
aspect-ratio: 1/1; margin-bottom: 16px; overflow: hidden;
|
|
2277
|
+
border-radius: 16px;
|
|
2278
|
+
box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(17,24,39,0.05);
|
|
2279
|
+
`,this.videoElement=document.createElement("video"),this.videoElement.style.cssText="width:100%; height:100%; object-fit:cover; background:black;",this.videoElement.autoplay=!0,this.videoElement.playsInline=!0,this.videoElement.muted=!0,this.videoContainer.appendChild(this.videoElement),this.contentContainer.appendChild(this.videoContainer),this.orbWrapper=document.createElement("div"),this.orbWrapper.className="voice-orb-wrapper",this.connectingRing=document.createElement("div"),this.connectingRing.className="voice-orb-connecting-ring",this.orbWrapper.appendChild(this.connectingRing),this.errorRing=document.createElement("div"),this.errorRing.className="voice-orb-error-ring",this.orbWrapper.appendChild(this.errorRing),this.outerGlow=document.createElement("div"),this.outerGlow.className="voice-orb-ring-outer",this.orbWrapper.appendChild(this.outerGlow),this.wave1=document.createElement("div"),this.wave1.className="voice-orb-ring-mid",this.orbWrapper.appendChild(this.wave1),this.wave2=document.createElement("div"),this.wave2.className="voice-orb-disc",this.orbWrapper.appendChild(this.wave2),this.wave3=document.createElement("div"),this.wave3.style.display="none";const r=document.createElement("div");r.className="voice-orb-shine",r.id="voice-shine",this.orbWrapper.appendChild(r),this.waveLayers=[this.outerGlow,this.wave1,this.wave2,r],this.connectingOrb=document.createElement("div"),this.connectingOrb.className="voice-connecting-orb",this.connectingOrb.innerHTML=U.voice_orb,this.orbWrapper.appendChild(this.connectingOrb),this.centerIcon=document.createElement("div"),this.centerIcon.className="voice-orb-center",this.centerIcon.innerHTML=U.audioLines,this.orbWrapper.appendChild(this.centerIcon),this.contentContainer.appendChild(this.orbWrapper),this.statusArea=document.createElement("div"),this.statusArea.className="voice-status-area",this.connectingLabel=document.createElement("p"),this.connectingLabel.className="voice-connecting-label",this.connectingLabel.textContent="Connecting…",this.statusArea.appendChild(this.connectingLabel),this.giveItAMinuteLabel=document.createElement("p"),this.giveItAMinuteLabel.className="voice-connecting-hint",this.giveItAMinuteLabel.textContent="This may take a moment",this.statusArea.appendChild(this.giveItAMinuteLabel),this.connectedBadge=document.createElement("div"),this.connectedBadge.className="voice-connected-badge is-listening",this.connectedStatusBars=document.createElement("span"),this.connectedStatusBars.className="voice-live-status-bars listening",this.connectedStatusBars.innerHTML="<i></i><i></i><i></i>",this.connectedStatusBars.setAttribute("aria-hidden","true"),this.connectedStatusText=document.createElement("span"),this.connectedStatusText.className="voice-live-status-text",this.connectedStatusText.textContent="Listening…",this.connectedBadge.appendChild(this.connectedStatusBars),this.connectedBadge.appendChild(this.connectedStatusText),this.statusArea.appendChild(this.connectedBadge),this.timerEl=document.createElement("div"),this.timerEl.className="voice-timer",this.timerEl.textContent="00:00",this.statusArea.appendChild(this.timerEl),this.errorLabel=document.createElement("p"),this.errorLabel.className="voice-error-label",this.errorLabel.textContent="Connection failed",this.statusArea.appendChild(this.errorLabel),this.retryBtn=document.createElement("button"),this.retryBtn.className="voice-retry-btn",this.retryBtn.textContent="Retry",this.statusArea.appendChild(this.retryBtn),this.prepareBadge=document.createElement("p"),this.prepareBadge.style.cssText="display:none; font-size:11px; font-weight:600; color:#a855f7; text-transform:uppercase; letter-spacing:0.1em; margin:0; animation:pulse 1.5s infinite;",this.statusArea.appendChild(this.prepareBadge),this.statusBadge=document.createElement("div"),this.statusBadge.style.cssText="display:none; align-items:center; gap:8px; padding:5px 16px; background:#f0fdf4; border-radius:9999px; border:1px solid #dcfce7;";const o=document.createElement("div");o.style.cssText="width:8px; height:8px; border-radius:50%; background:#22c55e; flex-shrink:0; padding:0 !important; animation:pulse 2s infinite;";const a=document.createElement("span");a.textContent="Connected",a.style.cssText="font-size:11px; font-weight:600; color:#15803d; text-transform:uppercase; letter-spacing:0.1em;",this.statusBadge.appendChild(o),this.statusBadge.appendChild(a),this.statusArea.appendChild(this.statusBadge),this.contentContainer.appendChild(this.statusArea),this.transcriptionEl=document.createElement("div"),this.transcriptionEl.className="voice-transcription",this.contentContainer.appendChild(this.transcriptionEl),this.element.appendChild(this.contentContainer);const l=document.createElement("div");l.className="voice-footer",this.muteBtn=document.createElement("button"),this.muteBtn.type="button",this.muteBtn.className="voice-mute-btn",this.muteBtn.setAttribute("aria-label","Mute microphone"),this.muteBtn.disabled=!0,this.muteBtn.innerHTML=`<span class="voice-mute-icon">${U.mic}</span><span class="voice-mute-label">Mute</span>`,this.muteBtn.onclick=()=>{this.onToggleMute&&this.setMicMuted(this.onToggleMute())},this.hangupBtn=document.createElement("button"),this.hangupBtn.className="voice-hangup-btn",this.hangupBtn.setAttribute("aria-label","End call"),this.hangupBtn.innerHTML=`
|
|
2280
|
+
<span class="voice-hangup-icon">
|
|
2281
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2282
|
+
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.77a16 16 0 0 0 6.29 6.29l.87-.87a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/>
|
|
2283
|
+
</svg>
|
|
2284
|
+
</span>
|
|
2285
|
+
<span class="voice-hangup-label">End call</span>
|
|
2286
|
+
`,this.hangupBtn.onclick=()=>{const c=this.callStartedAt?Date.now()-this.callStartedAt:0,h=this.callStartedAt??Date.now();this.onCallEnded&&c>0&&this.onCallEnded(c,h),this.onHangup()},l.appendChild(this.muteBtn),l.appendChild(this.hangupBtn),this.element.appendChild(l)}bindMicMuteToggle(e){this.onToggleMute=e}setMicMuted(e){this.muteBtn.classList.toggle("is-muted",e),this.muteBtn.setAttribute("aria-label",e?"Unmute microphone":"Mute microphone");const t=this.muteBtn.querySelector(".voice-mute-icon");t&&(t.innerHTML=e?U.micOff:U.mic);const i=this.muteBtn.querySelector(".voice-mute-label");i&&(i.textContent=e?"Unmute":"Mute")}setMicMuteEnabled(e){this.muteBtn.disabled=!e}applyCenterIcon(e){this.centerIcon.classList.remove("is-error"),e==="error"&&this.centerIcon.classList.add("is-error")}getElement(){return this.element}setMode(e){this.isAvatarMode=e==="avatar"}setVideoTrack(e){if(this.isAvatarMode=!0,e.kind==="video"&&this.videoElement){const t=new MediaStream([e]);this.videoElement.srcObject=t,this.videoContainer.style.display="block",this.orbWrapper.style.display="none",this.connectingLabel.style.display="none",this.timerEl.style.display="none",this.videoElement.onplaying=()=>{this.prepareBadge.style.display="none",this.statusBadge.style.display="flex"},this.videoElement.play().catch(i=>{})}}setStatus(e,t){e==="connecting"?(this.muteBtn.disabled=!0,this.connectingOrb.style.display="flex",this.centerIcon.style.display="none",this.isAvatarMode?(this.videoContainer.style.display="block",this.orbWrapper.style.display="none",this.prepareBadge.textContent="CONNECTING...",this.prepareBadge.style.display="block",this.statusBadge.style.display="none",this.connectingLabel.style.display="none"):(this.orbWrapper.style.display="flex",this.videoContainer.style.display="none",this.connectingRing.style.display="none",this.errorRing.style.display="none",this.waveLayers.forEach(i=>i.style.display="none"),this.connectingLabel.style.display="block",this.giveItAMinuteLabel.style.display="block",this.connectedBadge.style.display="none",this.timerEl.style.display="none",this.errorLabel.style.display="none",this.retryBtn.style.display="none"),this.stopTimer()):e==="connected"?(this.muteBtn.disabled=!1,this.connectingOrb.style.display="none",this.centerIcon.style.display="flex",this.applyCenterIcon("audio"),this.isAvatarMode?this.videoElement&&!this.videoElement.paused&&this.videoElement.readyState>2?(this.prepareBadge.style.display="none",this.statusBadge.style.display="flex"):(this.prepareBadge.textContent="AGENT IS ON THE WAY...",this.prepareBadge.style.display="block",setTimeout(()=>{this.prepareBadge.style.display!=="none"&&(this.prepareBadge.style.display="none",this.statusBadge.style.display="flex")},5e3)):(this.connectingRing.style.display="none",this.errorRing.style.display="none",this.waveLayers.forEach(i=>{i.style.display="block"}),this.connectingLabel.style.display="none",this.giveItAMinuteLabel.style.display="none",this.connectedBadge.style.display="flex",this.setActivity("listening"),this.timerEl.style.display="block",this.errorLabel.style.display="none",this.retryBtn.style.display="none",this.startTimer())):e==="error"&&(this.muteBtn.disabled=!0,this.connectingOrb.style.display="none",this.centerIcon.style.display="flex",this.applyCenterIcon("error"),this.connectingRing.style.display="none",this.errorRing.style.display="block",this.waveLayers.forEach(i=>i.style.display="none"),this.connectingLabel.style.display="none",this.giveItAMinuteLabel.style.display="none",this.connectedBadge.style.display="none",this.timerEl.style.display="none",this.errorLabel.textContent=t||"Connection failed",this.errorLabel.style.display="block",this.retryBtn.style.display="block",this.stopTimer())}setActivity(e){this.liveActivity!==e&&(this.liveActivity=e,this.connectedBadge.classList.remove("is-listening","is-speaking"),this.connectedBadge.classList.add(e==="speaking"?"is-speaking":"is-listening"),this.connectedStatusBars.classList.remove("listening","speaking"),this.connectedStatusBars.classList.add(e),this.connectedStatusText.textContent=e==="speaking"?"Speaking…":"Listening…")}setTranscription(e,t){this.transcriptionEl.textContent=`"${e}"`,this.transcriptionEl.style.color=t?"#1f2937":"#9ca3af",this.transcriptionEl.style.fontStyle=t?"normal":"italic"}show(){this.callStartedAt=Date.now(),this.element.style.display="flex",this.setStatus("connecting")}hide(){this.element.style.display="none",this.reset()}reset(){this.videoElement&&(this.videoElement.srcObject=null),this.isAvatarMode=!1,this.callStartedAt=null,this.stopTimer(),this.transcriptionEl.textContent="",this.videoContainer.style.display="none",this.orbWrapper.style.display="flex",this.connectingOrb.style.display="none",this.centerIcon.style.display="flex",this.connectingRing.style.display="none",this.errorRing.style.display="none",this.waveLayers.forEach(e=>e.style.display="none"),this.connectingLabel.style.display="none",this.connectedBadge.style.display="none",this.timerEl.style.display="none",this.errorLabel.style.display="none",this.retryBtn.style.display="none",this.prepareBadge.style.display="none",this.statusBadge.style.display="none",this.giveItAMinuteLabel.style.display="none",this.muteBtn.disabled=!0,this.setMicMuted(!1),this.applyCenterIcon("audio")}startTimer(){this.timerInterval&&clearInterval(this.timerInterval),this.startTime=Date.now(),this.timerEl.textContent="00:00",this.timerInterval=setInterval(()=>{if(!this.startTime)return;const e=Math.floor((Date.now()-this.startTime)/1e3),t=Math.floor(e/60).toString().padStart(2,"0"),i=(e%60).toString().padStart(2,"0");this.timerEl.textContent=`${t}:${i}`},1e3)}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=null),this.timerEl.textContent=""}setFullScreen(e){e?(this.videoContainer.style.position="absolute",this.videoContainer.style.top="0",this.videoContainer.style.left="0",this.videoContainer.style.width="100%",this.videoContainer.style.height="100%",this.videoContainer.style.maxWidth="none",this.videoContainer.style.borderRadius="0",this.videoContainer.style.margin="0",this.videoContainer.style.zIndex="0"):(this.videoContainer.style.position="relative",this.videoContainer.style.width="100%",this.videoContainer.style.maxWidth="260px",this.videoContainer.style.height="auto",this.videoContainer.style.aspectRatio="1/1",this.videoContainer.style.borderRadius="16px",this.videoContainer.style.marginBottom="16px")}}class Oi{constructor(e){p(this,"element");p(this,"messageContainer");p(this,"inputArea");p(this,"input");p(this,"sendBtn");p(this,"typingIndicator",null);p(this,"resolveBar",null);this.onSend=e,this.element=document.createElement("div"),this.element.style.display="flex",this.element.style.flexDirection="column",this.element.style.flex="1",this.element.style.overflow="hidden",this.element.style.minHeight="0",this.messageContainer=document.createElement("div"),this.messageContainer.className="chat-messages",this.inputArea=document.createElement("div"),this.inputArea.className="chat-input-area",this.input=document.createElement("input"),this.input.className="chat-input",this.input.placeholder="Type a message...",this.input.addEventListener("keypress",i=>{i.key==="Enter"&&this.handleSend()}),this.sendBtn=document.createElement("button"),this.sendBtn.className="chat-send-btn",this.sendBtn.innerHTML=U.send,this.sendBtn.onclick=()=>this.handleSend(),this.inputArea.appendChild(this.input),this.inputArea.appendChild(this.sendBtn);const t=document.createElement("div");t.className="branding-footer",t.innerHTML="Technology Powered by <b>Vanira AI</b>",this.element.appendChild(this.messageContainer),this.element.appendChild(this.inputArea),this.element.appendChild(t)}getElement(){return this.element}formatTime(e=new Date){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}addMessage(e,t,i){const s=document.createElement("div");s.style.cssText=`
|
|
2287
|
+
display: flex;
|
|
2288
|
+
flex-direction: column;
|
|
2289
|
+
align-items: ${e==="user"?"flex-end":"flex-start"};
|
|
2290
|
+
margin-bottom: 2px;
|
|
2291
|
+
`;const r=document.createElement("div");r.className=`chat-message ${e}`,r.textContent=t,s.appendChild(r);const o=document.createElement("span");o.style.cssText=`
|
|
2292
|
+
font-size: 10px;
|
|
2293
|
+
color: #9ca3af;
|
|
2294
|
+
margin: 2px 4px 6px;
|
|
2295
|
+
display: block;
|
|
2296
|
+
`,o.textContent=this.formatTime(i?new Date(i):void 0),s.appendChild(o),this.messageContainer.appendChild(s),this.scrollToBottom()}updateLastAssistantMessage(e){const t=this.messageContainer.lastElementChild;if(t){const i=t.querySelector(".chat-message.assistant");if(i){i.textContent=e,this.scrollToBottom();return}}this.addMessage("assistant",e)}addButtons(e){const t=document.createElement("div");t.className="chat-buttons-container",t.style.display="flex",t.style.flexWrap="wrap",t.style.gap="8px",t.style.marginTop="8px",t.style.marginBottom="12px",t.style.justifyContent="flex-start",e.forEach(i=>{const s=document.createElement("button");s.className="chat-suggestion-chip",s.textContent=i.title,s.style.padding="6px 12px",s.style.borderRadius="16px",s.style.border="1px solid #e5e7eb",s.style.backgroundColor="white",s.style.fontSize="12px",s.style.color="#4b5563",s.style.cursor="pointer",s.style.transition="all 0.2s",s.onmouseenter=()=>{s.style.backgroundColor="#f3f4f6",s.style.borderColor="#d1d5db"},s.onmouseleave=()=>{s.style.backgroundColor="white",s.style.borderColor="#e5e7eb"},s.onclick=()=>{this.handleSend(i.payload)},t.appendChild(s)}),this.messageContainer.appendChild(t),this.scrollToBottom()}handleSend(e){const t=e||this.input.value.trim();t&&(this.onSend(t),e||(this.input.value=""))}setTyping(e){if(this.typingIndicator&&(this.typingIndicator.remove(),this.typingIndicator=null),e){this.typingIndicator=document.createElement("div"),this.typingIndicator.className="typing-indicator";for(let t=0;t<3;t++){const i=document.createElement("div");i.className="typing-dot",this.typingIndicator.appendChild(i)}this.messageContainer.appendChild(this.typingIndicator),this.scrollToBottom()}}addCallRecord(e,t=Date.now()){const i=Math.floor(e/6e4),s=Math.floor(e%6e4/1e3),r=i>0?`${i}m ${s}s`:`${s}s`,o=document.createElement("div");o.dataset.callTimestamp=String(t),o.style.cssText=`
|
|
2297
|
+
display: flex; justify-content: center;
|
|
2298
|
+
margin: 10px 16px;
|
|
2299
|
+
`,o.innerHTML=`
|
|
2300
|
+
<div style="
|
|
2301
|
+
display: flex; align-items: center; gap: 8px;
|
|
2302
|
+
background: #f3f4f6; border: 1px solid #e5e7eb;
|
|
2303
|
+
border-radius: 12px; padding: 8px 14px;
|
|
2304
|
+
font-size: 12px; color: #6b7280;
|
|
2305
|
+
max-width: 210px; width: fit-content;
|
|
2306
|
+
">
|
|
2307
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#9ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2308
|
+
<rect x="2" y="9" width="4" height="12" rx="2"/>
|
|
2309
|
+
<rect x="9" y="5" width="4" height="16" rx="2"/>
|
|
2310
|
+
<rect x="16" y="2" width="4" height="20" rx="2"/>
|
|
2311
|
+
</svg>
|
|
2312
|
+
<span>
|
|
2313
|
+
<span style="font-weight:500; color:#374151;">Voice call ended</span>
|
|
2314
|
+
<span style="margin-left:6px; color:#9ca3af;">·</span>
|
|
2315
|
+
<span style="margin-left:6px;">${r}</span>
|
|
2316
|
+
</span>
|
|
2317
|
+
</div>
|
|
2318
|
+
`,this.messageContainer.appendChild(o),this.scrollToBottom()}clearMessages(){this.messageContainer.innerHTML=""}setResolveCallback(e){this.resolveBar&&this.resolveBar.remove(),this.resolveBar=document.createElement("div"),this.resolveBar.className="chat-resolve-bar";const t=document.createElement("button");t.className="chat-resolve-link",t.textContent="Mark as resolved, start new",t.onclick=()=>{confirm("Are you sure you want to mark this conversation as resolved and start fresh?")&&e()},this.resolveBar.appendChild(t),this.element.insertBefore(this.resolveBar,this.inputArea)}scrollToBottom(){this.messageContainer.scrollTop=this.messageContainer.scrollHeight}}class Fn{constructor(e){p(this,"element");p(this,"videoElement");p(this,"placeholderContainer");this.element=document.createElement("div"),this.element.className="avatar-container",this.element.style.position="relative",this.element.style.width="100%",this.element.style.height="100%",this.element.style.background="#ffffff",this.element.style.borderRadius="16px",this.element.style.overflow="hidden",this.placeholderContainer=document.createElement("div"),this.placeholderContainer.style.width="100%",this.placeholderContainer.style.height="100%",this.placeholderContainer.style.display="flex",this.placeholderContainer.style.alignItems="center",this.placeholderContainer.style.justifyContent="center";const t=e||"https://www.simli.com/jenna.mp4",i=t.endsWith(".mp4")||t.endsWith(".webm");let s;if(i){const r=document.createElement("video");r.src=t,r.muted=!0,r.loop=!0,r.autoplay=!0,r.playsInline=!0,s=r}else{const r=document.createElement("img");r.src=t,s=r}s.style.width="140px",s.style.height="140px",s.style.borderRadius="50%",s.style.objectFit="cover",s.style.backgroundColor="#f3f4f6",this.placeholderContainer.appendChild(s),this.element.appendChild(this.placeholderContainer),this.videoElement=document.createElement("video"),this.videoElement.className="avatar-video",this.videoElement.autoplay=!0,this.videoElement.playsInline=!0,this.videoElement.muted=!0,this.videoElement.style.display="none",this.element.appendChild(this.videoElement)}getElement(){return this.element}setStream(e){this.videoElement.srcObject=e,this.videoElement.style.display="block",this.placeholderContainer.style.display="none"}}class Vn{constructor(e,t){p(this,"element");p(this,"showSessionSelector",!1);this.onClick=e,this.agentId=t,this.element=document.createElement("div"),this.element.className="voice-mode-container";const i=this.agentId?Qt(this.agentId):typeof window<"u"&&!!((window.sessionStorage.getItem("vanira_prospect_id")||window.localStorage.getItem("vanira_prospect_id"))&&(window.sessionStorage.getItem("vanira_latest_call_id")||window.localStorage.getItem("vanira_latest_call_id")));this.render(i)}doodleSquiggle(e){return`
|
|
2319
|
+
<svg class="voice-doodle-squiggle ${e}" viewBox="0 0 48 24" fill="none" aria-hidden="true">
|
|
2320
|
+
<path d="M3 14C10 4 18 20 26 10C32 4 38 8 45 12" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
|
|
2321
|
+
</svg>
|
|
2322
|
+
`}render(e){this.element.innerHTML=`
|
|
2323
|
+
<div class="voice-idle-stack">
|
|
2324
|
+
<div class="voice-doodle-stage">
|
|
2325
|
+
${this.doodleSquiggle("voice-doodle-squiggle-1")}
|
|
2326
|
+
${this.doodleSquiggle("voice-doodle-squiggle-2")}
|
|
2327
|
+
<span class="voice-doodle-spark voice-doodle-spark-1" aria-hidden="true">✦</span>
|
|
2328
|
+
<span class="voice-doodle-spark voice-doodle-spark-2" aria-hidden="true">✧</span>
|
|
2329
|
+
<div class="central-orb-container">
|
|
2330
|
+
<div class="voice-doodle-ring voice-doodle-ring-a" aria-hidden="true"></div>
|
|
2331
|
+
<div class="voice-doodle-ring voice-doodle-ring-b" aria-hidden="true"></div>
|
|
2332
|
+
<div class="central-orb idle voice-doodle-tap">
|
|
2333
|
+
<span class="voice-doodle-emoji">👋</span>
|
|
2334
|
+
</div>
|
|
2335
|
+
</div>
|
|
2336
|
+
</div>
|
|
2337
|
+
<div class="voice-status-text voice-doodle-title">Tap to speak</div>
|
|
2338
|
+
<div class="voice-status-subtext">Start a conversation</div>
|
|
2339
|
+
<div class="session-selector-container" style="display: none; opacity: 0; transition: opacity 0.3s ease;">
|
|
2340
|
+
<div class="session-option active" data-behavior="continue">
|
|
2341
|
+
<span class="session-icon" aria-hidden="true">${U.sessionContinue}</span>
|
|
2342
|
+
<span class="session-title">Continue</span>
|
|
2343
|
+
</div>
|
|
2344
|
+
<div class="session-option" data-behavior="new">
|
|
2345
|
+
<span class="session-icon" aria-hidden="true">${U.sessionRestart}</span>
|
|
2346
|
+
<span class="session-title">Restart</span>
|
|
2347
|
+
</div>
|
|
2348
|
+
</div>
|
|
2349
|
+
</div>
|
|
2350
|
+
`;const t=this.element.querySelector(".central-orb-container"),i=this.element.querySelector(".session-selector-container"),s=this.element.querySelector(".voice-status-text"),r=this.element.querySelector(".voice-status-subtext");t&&(t.onclick=()=>{e&&!this.showSessionSelector?(this.showSessionSelector=!0,this.element.classList.add("has-session-choice"),s&&(s.textContent="Welcome back"),r&&(r.style.display="none"),i&&(i.style.display="flex",i.offsetHeight,i.style.opacity="1")):this.onClick("continue")});const o=this.element.querySelectorAll(".session-option");o.forEach(a=>{a.addEventListener("click",l=>{l.stopPropagation(),o.forEach(h=>h.classList.remove("active")),a.classList.add("active");const c=a.getAttribute("data-behavior");this.onClick(c)})})}getElement(){return this.element}}class qt{constructor(e){p(this,"element");p(this,"chips",[]);this.onChipClick=e,this.element=document.createElement("div"),this.element.className="welcome-chips-container"}setChips(e){this.chips=e,this.render()}getElement(){return this.element}setPosition(e){this.element.style.cssText="",e.split(";").filter(i=>i.trim()).forEach(i=>{const[s,r]=i.split(":").map(o=>o.trim());s&&r&&(this.element.style[s]=r)}),this.element.style.bottom?this.element.style.bottom=parseInt(this.element.style.bottom)+76+"px":this.element.style.top&&(this.element.style.top=parseInt(this.element.style.top)+76+"px"),this.element.style.position="fixed",this.element.style.zIndex="2147483646",this.element.style.alignItems=this.element.style.left?"flex-start":"flex-end"}updateCoordinates(e,t,i=!0){this.element.style.left=`${e}px`,i?(this.element.style.top="auto",this.element.style.bottom=`${window.innerHeight-t+16}px`):(this.element.style.bottom="auto",this.element.style.top=`${t+76}px`),this.element.style.right="auto"}render(){this.element.innerHTML="",this.chips.forEach((e,t)=>{const i=document.createElement("button");i.className="welcome-chip-btn",i.textContent=e.title,i.onclick=s=>{s.stopPropagation(),this.onChipClick(e.title)},i.style.animationDelay=`${t*.1}s`,this.element.appendChild(i)})}static get styles(){return`
|
|
2351
|
+
.welcome-chips-container {
|
|
2352
|
+
position: fixed;
|
|
2353
|
+
z-index: 9998;
|
|
2354
|
+
display: flex;
|
|
2355
|
+
flex-direction: column; /* Stack vertically */
|
|
2356
|
+
align-items: flex-end; /* Align to right (usually) */
|
|
2357
|
+
gap: 12px;
|
|
2358
|
+
pointer-events: none; /* Container passes clicks */
|
|
2359
|
+
/* Max width to prevent huge buttons */
|
|
2360
|
+
max-width: 300px;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
/* Adjust alignment based on position */
|
|
2364
|
+
/* We might need to know if it's left or right to align flex-start or flex-end
|
|
2365
|
+
For now, defaulting to flex-end (right) which matches most widgets.
|
|
2366
|
+
TODO: Pass alignment if needed.
|
|
2367
|
+
*/
|
|
2368
|
+
|
|
2369
|
+
.welcome-chip-btn {
|
|
2370
|
+
background: white;
|
|
2371
|
+
color: #4f46e5; /* Secondary/Primary color - hardcoded or use var */
|
|
2372
|
+
color: var(--primary);
|
|
2373
|
+
border: 1px solid transparent;
|
|
2374
|
+
padding: 10px 18px;
|
|
2375
|
+
border-radius: 20px;
|
|
2376
|
+
font-family: inherit;
|
|
2377
|
+
font-size: 14px;
|
|
2378
|
+
font-weight: 500;
|
|
2379
|
+
cursor: pointer;
|
|
2380
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
2381
|
+
transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
2382
|
+
pointer-events: auto;
|
|
2383
|
+
opacity: 0;
|
|
2384
|
+
margin-bottom: 4px; /* Tiny spacing */
|
|
2385
|
+
|
|
2386
|
+
/* Animation */
|
|
2387
|
+
animation: slideUpFade 0.4s ease-out forwards;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
.welcome-chip-btn:hover {
|
|
2391
|
+
transform: translateY(-2px);
|
|
2392
|
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
|
|
2393
|
+
background: #f8fafc;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
@keyframes slideUpFade {
|
|
2397
|
+
from {
|
|
2398
|
+
opacity: 0;
|
|
2399
|
+
transform: translateY(20px);
|
|
2400
|
+
}
|
|
2401
|
+
to {
|
|
2402
|
+
opacity: 1;
|
|
2403
|
+
transform: translateY(0);
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
`}}const _n=`
|
|
2407
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2408
|
+
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.77a16 16 0 0 0 6.29 6.29l.87-.87a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/>
|
|
2409
|
+
</svg>
|
|
2410
|
+
`;class Jn{constructor(e,t,i="Voice chat"){p(this,"element");p(this,"statusEl");p(this,"titleEl");p(this,"barsEl");p(this,"muteBtn");p(this,"activity","idle");p(this,"onToggleMute");this.onExpand=e,this.onHangup=t,this.element=document.createElement("div"),this.element.className="widget-voice-pill hidden",this.element.setAttribute("role","group"),this.element.setAttribute("aria-label","Active voice call");const s=document.createElement("button");s.type="button",s.className="widget-voice-pill-main",s.setAttribute("aria-label","Expand voice chat");const r=document.createElement("div");r.className="widget-voice-pill-icon",r.innerHTML=U.phone;const o=document.createElement("div");o.className="widget-voice-pill-text",this.titleEl=document.createElement("span"),this.titleEl.className="widget-voice-pill-title",this.titleEl.textContent=i;const a=document.createElement("span");a.className="widget-voice-pill-status-row",this.barsEl=document.createElement("span"),this.barsEl.className="widget-voice-pill-bars",this.barsEl.innerHTML="<i></i><i></i><i></i>",this.barsEl.setAttribute("aria-hidden","true"),this.statusEl=document.createElement("span"),this.statusEl.className="widget-voice-pill-status",a.appendChild(this.barsEl),a.appendChild(this.statusEl),o.appendChild(this.titleEl),o.appendChild(a),s.appendChild(r),s.appendChild(o),s.onclick=()=>this.onExpand(),this.muteBtn=document.createElement("button"),this.muteBtn.type="button",this.muteBtn.className="widget-voice-pill-mute",this.muteBtn.setAttribute("aria-label","Mute microphone"),this.muteBtn.disabled=!0,this.muteBtn.innerHTML=U.mic,this.muteBtn.onclick=c=>{c.stopPropagation(),this.onToggleMute&&this.setMicMuted(this.onToggleMute())};const l=document.createElement("button");l.type="button",l.className="widget-voice-pill-hangup",l.setAttribute("aria-label","End call"),l.innerHTML=_n,l.onclick=c=>{c.stopPropagation(),this.onHangup()},this.element.appendChild(s),this.element.appendChild(this.muteBtn),this.element.appendChild(l),this.setActivity("idle")}bindMicMuteToggle(e){this.onToggleMute=e}setMicMuted(e){this.muteBtn.classList.toggle("is-muted",e),this.muteBtn.setAttribute("aria-label",e?"Unmute microphone":"Mute microphone"),this.muteBtn.innerHTML=e?U.micOff:U.mic}setMicMuteEnabled(e){this.muteBtn.disabled=!e}getElement(){return this.element}setTitle(e){this.titleEl.textContent=e}setActivity(e){this.activity=e,this.element.classList.remove("is-connecting","is-listening","is-speaking","is-error"),this.barsEl.classList.remove("listening","speaking","hidden"),e==="connecting"?(this.statusEl.textContent="Connecting…",this.element.classList.add("is-connecting"),this.barsEl.classList.add("listening"),this.muteBtn.disabled=!0):e==="speaking"?(this.statusEl.textContent="Speaking…",this.element.classList.add("is-speaking"),this.barsEl.classList.add("speaking"),this.muteBtn.disabled=!1):e==="listening"?(this.statusEl.textContent="Listening…",this.element.classList.add("is-listening"),this.barsEl.classList.add("listening"),this.muteBtn.disabled=!1):e==="error"?(this.statusEl.textContent="Connection issue",this.element.classList.add("is-error"),this.barsEl.classList.add("hidden"),this.muteBtn.disabled=!0):(this.statusEl.textContent="Voice chat",this.barsEl.classList.add("hidden"),this.muteBtn.disabled=!0,this.setMicMuted(!1))}setStatus(e){e==="connecting"?this.setActivity("connecting"):e==="connected"?this.setActivity("listening"):e==="error"?this.setActivity("error"):this.setActivity("idle")}getActivity(){return this.activity}show(){this.element.classList.remove("hidden")}hide(){this.element.classList.add("hidden")}}class Wn{constructor(e,t={}){p(this,"element");this.onOpen=e;const i=t.greeting||"Hi there!",s=t.subtitle||"I'm here to help";this.element=document.createElement("button"),this.element.type="button",this.element.className="human-presence-launcher",this.element.setAttribute("aria-label",`${i} ${s}`),this.element.innerHTML=`
|
|
2411
|
+
<span class="human-presence-wave-icon" aria-hidden="true">
|
|
2412
|
+
<span class="human-presence-wave-emoji">👋</span>
|
|
2413
|
+
</span>
|
|
2414
|
+
<span class="human-presence-copy">
|
|
2415
|
+
<span class="human-presence-greeting">${i}</span>
|
|
2416
|
+
<span class="human-presence-subtitle">${s}</span>
|
|
2417
|
+
</span>
|
|
2418
|
+
`,this.element.onclick=r=>{r.stopPropagation(),this.onOpen()}}getElement(){return this.element}show(){this.element.style.display="flex"}hide(){this.element.style.display="none"}}class Yi{constructor(e,t,i="#000000",s="#111111",r){p(this,"element");p(this,"overlay");p(this,"onStartCall");p(this,"onHangup");p(this,"primaryColor");p(this,"secondaryColor");p(this,"onCallEnded");this.onStartCall=e,this.onHangup=t,this.primaryColor=i,this.secondaryColor=s,this.onCallEnded=r,this.element=document.createElement("div"),this.element.style.height="100%",this.element.style.position="relative"}initOverlay(){this.overlay=new Ui(()=>this.onHangup(),this.primaryColor,this.secondaryColor,this.onCallEnded),this.element.appendChild(this.overlay.getElement())}getElement(){return this.element}setCallActive(e){e?this.overlay.show():this.overlay.hide()}setStatus(e,t){this.overlay.setStatus(e,t)}setActivity(e){this.overlay.setActivity(e)}setTranscription(e,t){this.overlay.setTranscription(e,t)}setVideoTrack(e){this.overlay.setVideoTrack(e)}bindMicMuteToggle(e){this.overlay.bindMicMuteToggle(e)}setMicMuted(e){this.overlay.setMicMuted(e)}setMicMuteEnabled(e){this.overlay.setMicMuteEnabled(e)}}class qn extends Yi{constructor(t,i,s="#000000",r="#111111",o,a){super(t,i,s,r,o);p(this,"voiceOrb");this.element.style.background="#f9fafb",this.voiceOrb=new Vn(l=>{this.onStartCall(l)},a),this.element.appendChild(this.voiceOrb.getElement()),this.initOverlay()}}class Xn{constructor(e){p(this,"element");p(this,"chatWindow");this.onSendMessage=e,this.element=document.createElement("div"),this.element.style.flex="1",this.element.style.width="100%",this.element.style.minHeight="0",this.element.style.display="flex",this.element.style.flexDirection="column",this.chatWindow=new Oi(t=>this.onSendMessage(t)),this.element.appendChild(this.chatWindow.getElement())}getElement(){return this.element}getChatWindow(){return this.chatWindow}}class ji{constructor(e,t,i,s="#000000",r="#111111",o){p(this,"element");p(this,"chatWindow");p(this,"overlay");p(this,"voiceTrigger");this.onSendMessage=e,this.onStartCall=t,this.onHangup=i,this.primaryColor=s,this.secondaryColor=r,this.onCallEnded=o,this.element=document.createElement("div"),this.element.style.flex="1",this.element.style.display="flex",this.element.style.flexDirection="column",this.element.style.minHeight="0",this.element.style.position="relative"}setupChat(){this.chatWindow=new Oi(t=>this.onSendMessage(t));const e=this.chatWindow.getElement();e.style.flex="1",this.element.appendChild(e),this.injectVoiceTrigger(),this.overlay=new Ui(()=>this.onHangup(),this.primaryColor,this.secondaryColor,this.onCallEnded),this.element.appendChild(this.overlay.getElement())}injectVoiceTrigger(){const e=document.createElement("button");this.voiceTrigger=e,e.className="voice-btn-simple",e.innerHTML=`<div class="voice-btn-icon">${U.audioLines}</div>`,e.onclick=()=>this.onStartCall();const t=this.chatWindow.getElement().querySelector(".chat-input-area");t&&t.insertBefore(this.voiceTrigger,t.firstChild)}getElement(){return this.element}getChatWindow(){return this.chatWindow}setCallActive(e){e?(this.overlay.show(),this.chatWindow&&(this.chatWindow.getElement().style.display="none")):(this.overlay.hide(),this.chatWindow&&(this.chatWindow.getElement().style.display="flex"))}setStatus(e,t){this.overlay.setStatus(e,t)}setActivity(e){this.overlay.setActivity(e)}setTranscription(e,t){this.overlay.setTranscription(e,t)}setVideoTrack(e){this.overlay.setVideoTrack(e)}bindMicMuteToggle(e){this.overlay.bindMicMuteToggle(e)}setMicMuted(e){this.overlay.setMicMuted(e)}setMicMuteEnabled(e){this.overlay.setMicMuteEnabled(e)}}class Kn extends ji{constructor(e,t,i,s="#000000",r="#111111",o){super(e,t,i,s,r,o),this.setupChat()}}class Zn extends Yi{constructor(t,i,s="#000000",r="#111111",o){super(t,i,s,r,o);p(this,"avatarView");p(this,"startCallBtn");p(this,"controlsContainer");this.element.style.display="flex",this.element.style.flexDirection="column",this.avatarView=new Fn;const a=this.avatarView.getElement();a.style.width="100%",a.style.maxWidth="300px",a.style.aspectRatio="1/1",a.style.borderRadius="16px",a.style.overflow="hidden",a.style.margin="auto",a.style.position="relative",this.element.appendChild(a),this.controlsContainer=document.createElement("div"),this.controlsContainer.className="widget-body",this.controlsContainer.style.position="absolute",this.controlsContainer.style.bottom="20px",this.controlsContainer.style.width="100%",this.controlsContainer.style.zIndex="10";const l=document.createElement("div");l.className="controls",this.startCallBtn=document.createElement("button"),this.startCallBtn.className="control-btn primary",this.startCallBtn.innerHTML=`${U.phone} <span>Start Call</span>`,this.startCallBtn.onclick=()=>this.onStartCall(),l.appendChild(this.startCallBtn),this.controlsContainer.appendChild(l),this.element.appendChild(this.controlsContainer),this.initOverlay(),this.overlay.setMode("avatar")}getAvatarView(){return this.avatarView}setCallActive(t){t&&this.overlay.setMode("avatar"),super.setCallActive(t),t?this.controlsContainer.style.display="none":this.controlsContainer.style.display="block"}}class $n extends ji{constructor(e,t,i,s="#000000",r="#111111",o){super(e,t,i,s,r,o),this.setupChat(),this.overlay.setMode("avatar")}injectVoiceTrigger(){const e=document.createElement("button");this.voiceTrigger=e,e.className="voice-btn-simple",e.style.overflow="hidden",e.style.padding="0",e.style.border="1.5px solid #e5e7eb",e.innerHTML=`
|
|
2419
|
+
<video
|
|
2420
|
+
src="https://www.simli.com/jenna.mp4"
|
|
2421
|
+
autoplay loop muted pip="false" playsinline
|
|
2422
|
+
style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%;">
|
|
2423
|
+
</video>
|
|
2424
|
+
<div style="position: absolute; bottom: -2px; right: -2px; background: white; border-radius: 50%; padding: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.1);">
|
|
2425
|
+
${U.audioLines.replace('width="24"','width="12"').replace('height="24"','height="12"')}
|
|
2426
|
+
</div>
|
|
2427
|
+
`;const t=e.querySelector("div");if(t){const r=t.querySelector("svg");r&&(r.style.width="12px",r.style.height="12px")}e.onclick=()=>this.onStartCall();const i=this.chatWindow.getElement().querySelector(".chat-input-area"),s=i==null?void 0:i.querySelector(".chat-send-btn");i&&s&&i.insertBefore(this.voiceTrigger,s)}}class es{async sendMessage(e,t,i,s,r,o,a,l,c){return oe.sendChatMessage(t,i,e,s,h=>{o&&o(h)},r,(h,d)=>{a&&h&&a(h,d||void 0)},l,c)}async sendFile(e){throw new Error("Method not implemented.")}async likeDislike(e,t){}}const We="vanira:clip-region-active";function Et(n){typeof window>"u"||window.dispatchEvent(new CustomEvent(We,{detail:{active:n}}))}const ts="vanira:board-active";function mt(n,e=!1){typeof window>"u"||window.dispatchEvent(new CustomEvent(ts,{detail:{active:n,reduced:e}}))}const is="vnr-clip-overlay";function ns(n){var e;return((e=n.classList)==null?void 0:e.contains(is))??!1}function ss(n){var t;return((t=n.tagName)==null?void 0:t.toLowerCase())==="vanira-convai"?!0:typeof n.closest=="function"&&!!n.closest("vanira-convai")}function Gi(n){var e;return ns(n)||ss(n)||(e=n.classList)!=null&&e.contains("vnr-screen-overlay-root")?!0:typeof n.closest=="function"&&!!n.closest(".vnr-screen-overlay-root")}async function Fi(){const n=document.documentElement.clientWidth,e=document.documentElement.clientHeight;return _i({left:0,top:0,width:n,height:e})}function Vi(n,e){if(n.width<=e)return n;const t=e/n.width,i=document.createElement("canvas");i.width=e,i.height=Math.round(n.height*t);const s=i.getContext("2d");return s?(s.drawImage(n,0,0,i.width,i.height),i):n}async function _i(n){const{default:e}=await Promise.resolve().then(()=>require("./chunks/html2canvas.js")),t=window.devicePixelRatio||1,i=window.scrollX+n.left,s=window.scrollY+n.top;return e(document.body,{x:i,y:s,width:n.width,height:n.height,windowWidth:document.documentElement.clientWidth,windowHeight:document.documentElement.clientHeight,scrollX:-window.scrollX,scrollY:-window.scrollY,useCORS:!0,allowTaint:!1,scale:t,ignoreElements:r=>Gi(r),logging:!1})}async function Ht(n,e=.88){try{const t=await new Promise(i=>n.toBlob(s=>i(s),"image/jpeg",e));if(!t)throw new Error("Failed to encode clip as JPEG");return t}catch(t){const i=t instanceof Error?t.message:String(t);throw/tainted|security|cross-origin/i.test(i)?new Error("Could not export this page region (cross-origin content). Try selecting a simpler area."):t}}const qe="vnr-clip-overlay",Xt="2147483647",rs="rgba(0, 0, 0, 0.28)";function os(n={}){const e=n.minSizePx??24,t=n.hint??"Drag to select an area — release to clip.";return new Promise(i=>{let s=!1,r=!1,o=0,a=0,l=!1,c={left:0,top:0,width:0,height:0},h=!1,d=null;const g=M=>{s||(s=!0,L(),i(M))},u=document.createElement("div");u.className=qe,u.style.cssText=["position:fixed","inset:0",`z-index:${Xt}`,"cursor:crosshair","user-select:none","touch-action:none","background:transparent","font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"].join(";");const m=document.createElement("div");m.style.cssText=["position:absolute","display:none","pointer-events:none","border:2px solid #6366f1","border-radius:2px","background:transparent","box-shadow:none"].join(";");const A=document.createElement("div");A.style.cssText=["position:absolute","display:none","pointer-events:none","padding:2px 6px","border-radius:4px","font-size:11px","font-weight:600","color:#fff","background:rgba(15,23,42,0.82)","white-space:nowrap"].join(";");const v=document.createElement("div");v.className=qe,v.style.cssText=["position:fixed","top:16px","left:50%","transform:translateX(-50%)",`z-index:${Xt}`,"display:flex","align-items:center","gap:10px","padding:10px 14px","border-radius:14px","background:#0f172a","border:1px solid rgba(255,255,255,0.12)","box-shadow:0 8px 24px rgba(0,0,0,0.25)","max-width:min(520px,calc(100vw - 32px))"].join(";");const f=document.createElement("span");f.style.cssText="flex:1;font-size:13px;color:#e2e8f0;line-height:1.4",f.textContent=t;const b=document.createElement("button");b.type="button",b.textContent="Cancel",b.style.cssText=["padding:8px 12px","border:1px solid rgba(255,255,255,0.15)","border-radius:10px","background:transparent","color:#e2e8f0","font-size:13px","font-weight:600","cursor:pointer"].join(";"),v.appendChild(f),v.appendChild(b);const C=M=>{M.key==="Escape"&&!r&&g(null)},w=()=>h&&c.width>=e&&c.height>=e,x=()=>{h=!1,c={left:0,top:0,width:0,height:0},E()},E=()=>{if(!h||c.width<1||c.height<1){m.style.display="none",A.style.display="none";return}m.style.display="block",m.style.left=`${c.left}px`,m.style.top=`${c.top}px`,m.style.width=`${c.width}px`,m.style.height=`${c.height}px`,m.style.boxShadow=`0 0 0 9999px ${rs}`,A.style.display="block",A.textContent=`${Math.round(c.width)} × ${Math.round(c.height)}`,A.style.left=`${c.left}px`,A.style.top=`${Math.max(8,c.top-26)}px`},k=M=>{const T=M instanceof Error?M.message:"Capture failed";f.textContent=T.length>120?`${T.slice(0,117)}…`:T,f.style.color="#fca5a5",window.setTimeout(()=>{f.textContent=t,f.style.color="#e2e8f0"},4500)},S=async M=>{if(!(r||s)){r=!0,b.disabled=!0,f.textContent="Clipping…",f.style.color="#e2e8f0",u.style.visibility="hidden",v.style.visibility="hidden";try{const T=await _i(M),N=await Ht(T),H=document.documentElement.clientWidth,j=document.documentElement.clientHeight;g({blob:N,region:{x:M.left/H,y:M.top/j,w:M.width/H,h:M.height/j},viewport:{width:H,height:j},pixelSize:{width:T.width,height:T.height}})}catch(T){r=!1,b.disabled=!1,u.style.visibility="visible",v.style.visibility="visible",k(T),x()}}},I=M=>{const T=M??d;if(T!==null)try{u.releasePointerCapture(T)}catch{}d=null},P=M=>{if(!(!l||r)){if(l=!1,I(M==null?void 0:M.pointerId),w()){S({...c});return}x()}},z=M=>{r||M.target.closest(`.${qe}`)!==v&&(l=!0,h=!0,o=M.clientX,a=M.clientY,c={left:o,top:a,width:0,height:0},d=M.pointerId,u.setPointerCapture(M.pointerId),E())},Q=M=>{if(!l||r)return;const T=Math.min(o,M.clientX),N=Math.min(a,M.clientY),H=Math.max(o,M.clientX),j=Math.max(a,M.clientY);c={left:T,top:N,width:H-T,height:j-N},E()},L=()=>{Et(!1),document.removeEventListener("keydown",C),window.removeEventListener("pointerup",Y,!0),window.removeEventListener("pointercancel",Y,!0),u.removeEventListener("pointerdown",z),u.removeEventListener("pointermove",Q),u.removeEventListener("pointerup",P),u.removeEventListener("pointercancel",P),I(),u.remove(),v.remove()},Y=M=>P(M);b.addEventListener("click",()=>g(null)),Et(!0),u.appendChild(m),u.appendChild(A),document.body.appendChild(u),document.body.appendChild(v),document.addEventListener("keydown",C),window.addEventListener("pointerup",Y,!0),window.addEventListener("pointercancel",Y,!0),u.addEventListener("pointerdown",z),u.addEventListener("pointermove",Q),u.addEventListener("pointerup",P),u.addEventListener("pointercancel",P)})}function ft(){document.querySelectorAll(`.${qe}`).forEach(n=>n.remove()),Et(!1)}const as=["a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'[role="button"]','[role="link"]','[role="tab"]','[role="menuitem"]','[role="checkbox"]','[role="radio"]',"label","h1","h2","h3","h4","h5","h6","img[alt]","[data-testid]","[aria-label]","[onclick]"].join(", "),ls='[id]:not([id=""]), svg[id], polygon[id]',cs="svg[id], polygon[id], svg[data-vanira-static-diagram], svg[data-vanira-static-diagram] polygon",Ji=new Set(["root","app","__next"]);function Kt(n,e,t){const i=n.getScreenCTM(),s=n.ownerSVGElement;if(!i||!s)return[];const r=[];for(let o=0;o<n.points.length;o++){const a=n.points.getItem(o),l=s.createSVGPoint();l.x=a.x,l.y=a.y;const c=l.matrixTransform(i);r.push({x:c.x/e,y:c.y/t})}return r}function Wi(n,e,t){if(n instanceof SVGPolygonElement){const i=Kt(n,e,t);return i.length>=2?i:void 0}if(n instanceof SVGSVGElement){const i=n.querySelector("polygon");if(!i)return;const s=Kt(i,e,t);return s.length>=2?s:void 0}}function ds(n,e=40){return n.elements.slice(0,e).map(t=>{var s;let i=`${t.css_selector} (${t.tag}) "${t.label.slice(0,48)}" center=(${t.center_x.toFixed(3)},${t.center_y.toFixed(3)}) bbox=(${t.x.toFixed(3)},${t.y.toFixed(3)},${t.width.toFixed(3)},${t.height.toFixed(3)})`;if((s=t.stroke_points)!=null&&s.length){const r=t.stroke_points.map(o=>[Number(o.x.toFixed(3)),Number(o.y.toFixed(3))]);i+=` stroke_points=${JSON.stringify(r)} close=true`}return i}).join(`
|
|
2428
|
+
`)}function Zt(n,e="#f97316"){const t=document.querySelector(n);if(!t)return null;const i=document.documentElement.clientWidth,s=document.documentElement.clientHeight,r=Wi(t,i,s);if(r!=null&&r.length)return{points:r.map(a=>[a.x,a.y]),close:!0,color:e};const o=t.getBoundingClientRect();return o.width<1||o.height<1?null:{points:[[o.left/i,o.top/s],[(o.left+o.width)/i,o.top/s],[(o.left+o.width)/i,(o.top+o.height)/s],[o.left/i,(o.top+o.height)/s]],close:!0,color:e}}function $t(n){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(n):n.replace(/([^\w-])/g,"\\$1")}function hs(n){if(n.id){const s=`#${$t(n.id)}`;try{if(document.querySelectorAll(s).length===1)return s}catch{}}const e=n.getAttribute("data-testid");if(e){const s=`[data-testid="${e.replace(/"/g,'\\"')}"]`;try{if(document.querySelectorAll(s).length===1)return s}catch{}}const t=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){let s=i.tagName.toLowerCase();if(i.classList.length>0){const o=[...i.classList].filter(a=>!a.startsWith("vnr-")).slice(0,2).map(a=>`.${$t(a)}`).join("");s+=o}const r=i.parentElement;if(r){const o=[...r.children].filter(a=>a.tagName===i.tagName);o.length>1&&(s+=`:nth-of-type(${o.indexOf(i)+1})`)}t.unshift(s);try{const o=t.join(" > ");if(document.querySelectorAll(o).length===1)return o}catch{}if(i=i.parentElement,t.length>=8)break}return t.join(" > ")||n.tagName.toLowerCase()}function qi(n,e,t){const i=n.getBoundingClientRect();if(i.width<2||i.height<2||i.bottom<=0||i.right<=0||i.top>=t||i.left>=e)return!1;if(n instanceof SVGElement||n instanceof HTMLElement){const s=window.getComputedStyle(n);if(s.display==="none"||s.visibility==="hidden"||Number(s.opacity)===0)return!1}else return!1;return n.getAttribute("aria-hidden")!=="true"}function ps(n,e,t){var a;const i=((a=n.id)==null?void 0:a.toLowerCase())??"";if(Ji.has(i)||n===document.body||n===document.documentElement)return!0;const s=n.tagName.toLowerCase();if(s!=="div"&&s!=="main")return!1;const r=n.getBoundingClientRect();return r.width*r.height/Math.max(1,e*t)>.9}function Xi(n){return Gi(n)?!0:typeof n.closest!="function"?!1:!!n.closest("script, style, noscript, template, head")}function us(n,e){const t=n.tagName.toLowerCase();return t==="svg"||t==="polygon"?"diagram":t==="button"||e==="button"?"button":t==="a"||e==="link"?"link":t==="input"||t==="select"||t==="textarea"?"input":/^h[1-6]$/.test(t)?"heading":t==="img"?"image":t==="label"?"label":e?"interactive":"text"}function gs(n){const e=n.getAttribute("aria-label")||n.getAttribute("title")||"";if(e.trim())return e.trim().replace(/\s+/g," ").slice(0,240);if(n instanceof SVGPolygonElement&&n.id)return n.id.replace(/-/g," ").slice(0,240);if(n instanceof SVGSVGElement&&n.id)return(e.trim()||n.id.replace(/-/g," ")).slice(0,240);if(!(n instanceof HTMLElement))return n.id?n.id.replace(/-/g," ").slice(0,240):"";if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){const i=n.getAttribute("placeholder")||n.getAttribute("name")||"";if(i.trim())return i.trim().slice(0,240)}return n instanceof HTMLImageElement&&n.alt.trim()?n.alt.trim().slice(0,240):(n.innerText||n.textContent||"").replace(/\s+/g," ").trim().slice(0,240)}function ms(n){var e,t;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){const i=(e=n.value)==null?void 0:e.trim();return i?i.slice(0,240):void 0}if(n instanceof HTMLAnchorElement){const i=(t=n.getAttribute("href"))==null?void 0:t.trim();return i?i.slice(0,240):void 0}}function fs(n,e,t){const i=Math.round(n.left),s=Math.round(n.top),r=Math.round(n.width),o=Math.round(n.height),a=i+r/2,l=s+o/2;return{x:n.left/e,y:n.top/t,width:n.width/e,height:n.height/t,center_x:a/e,center_y:l/t,px:{left:i,top:s,width:r,height:o,center_x:Math.round(a),center_y:Math.round(l)}}}function ei(n){var t;let e=n.label?2:0;switch(n.kind){case"diagram":e+=22;break;case"button":case"link":case"input":e+=12;break;case"heading":e+=9;break;case"interactive":e+=8;break;case"image":case"label":e+=5;break;default:e+=3}return n.kind!=="text"&&(e+=Math.min(4,n.px.width*n.px.height/12e3)),(t=n.stroke_points)!=null&&t.length&&(e+=18),n.id&&Ji.has(n.id.toLowerCase())&&(e-=50),e}function rt(n,e,t,i,s){if(Xi(n)||ps(n,i,s)||!qi(n,i,s))return;const r=gs(n),o=ms(n),a=Wi(n,i,s),l=n.id||void 0;if(!r&&!o&&!l&&!a&&n.tagName.toLowerCase()!=="input")return;const c=(n.getAttribute("role")||"").trim()||void 0,h=hs(n);if(t.has(h))return;t.add(h);const d=fs(n.getBoundingClientRect(),i,s);e.push({tag:n.tagName.toLowerCase(),kind:us(n,c??""),role:c,label:r||o||l||h,value:o,id:l,css_selector:h,stroke_points:a,...d})}function vs(n,e,t,i){for(const s of document.querySelectorAll(cs))rt(s,n,e,t,i);for(const s of document.querySelectorAll("svg"))if(!(Xi(s)||!qi(s,t,i)))for(const r of s.querySelectorAll("polygon"))rt(r,n,e,t,i)}function Ki(n){const e=Math.max(1,Math.min(200,(n==null?void 0:n.maxElements)??80)),t=document.documentElement.clientWidth,i=document.documentElement.clientHeight,s=new Set,r=[];vs(r,s,t,i);for(const a of document.querySelectorAll(as))rt(a,r,s,t,i);for(const a of document.querySelectorAll(ls))rt(a,r,s,t,i);r.sort((a,l)=>ei(l)-ei(a));const o=r.slice(0,e).map((a,l)=>({...a,element_id:`e${l+1}`}));return{url:window.location.href,title:document.title,viewport:{width:t,height:i},scroll:{x:window.scrollX,y:window.scrollY},coordinate_system:"normalized_viewport",elements:o}}function As(n){if(n instanceof SVGPathElement&&typeof n.getTotalLength=="function"){const e=n.getTotalLength();if(e>0)return e}if(n instanceof SVGLineElement){const e=Number(n.getAttribute("x1")),t=Number(n.getAttribute("y1")),i=Number(n.getAttribute("x2")),s=Number(n.getAttribute("y2"));return Math.hypot(i-e,s-t)}if(n instanceof SVGCircleElement){const e=Number(n.getAttribute("r"));return 2*Math.PI*e}if(n instanceof SVGEllipseElement){const e=Number(n.getAttribute("rx")),t=Number(n.getAttribute("ry"));return Math.PI*(3*(e+t)-Math.sqrt((3*e+t)*(e+3*t)))}if(n instanceof SVGRectElement){const e=Number(n.getAttribute("width")),t=Number(n.getAttribute("height"));return 2*(e+t)}return 100}function ti(n){n.style.strokeDasharray="",n.style.strokeDashoffset="",n.style.transition="",n.removeAttribute("stroke-dasharray"),n.removeAttribute("stroke-dashoffset")}function kt(n,e){if(e<=0)return ti(n),Promise.resolve();n instanceof SVGLineElement&&(n.style.vectorEffect="none");const t=Math.max(1,As(n));return n.setAttribute("stroke-dasharray",String(t)),n.setAttribute("stroke-dashoffset",String(t)),n.getBoundingClientRect(),new Promise(i=>{requestAnimationFrame(()=>{n.style.transition=`stroke-dashoffset ${e}ms ease-out`,n.setAttribute("stroke-dashoffset","0"),setTimeout(()=>{ti(n),i()},e+30)})})}function Ut(n){return new Promise(e=>setTimeout(e,n))}const Te=4,vt=750,ii=90,ys="2147483647";let ni=!1;function bs(){if(ni||typeof document>"u")return;ni=!0;const n=document.createElement("style");n.id="vnr-screen-overlay-styles",n.textContent=`
|
|
2429
|
+
@keyframes vnr-screen-ripple {
|
|
2430
|
+
0% { transform: translate(-50%, -50%) scale(0.35); opacity: 0.95; }
|
|
2431
|
+
100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
|
|
2432
|
+
}
|
|
2433
|
+
@keyframes vnr-screen-cursor-pulse {
|
|
2434
|
+
0%, 100% { transform: translate(0, 0) scale(1); }
|
|
2435
|
+
50% { transform: translate(0, 0) scale(1.08); }
|
|
2436
|
+
}
|
|
2437
|
+
.vnr-screen-overlay-root {
|
|
2438
|
+
position: fixed;
|
|
2439
|
+
inset: 0;
|
|
2440
|
+
z-index: ${ys};
|
|
2441
|
+
pointer-events: none;
|
|
2442
|
+
overflow: hidden;
|
|
2443
|
+
}
|
|
2444
|
+
.vnr-screen-overlay-root.vnr-screen-overlay-interactive {
|
|
2445
|
+
pointer-events: auto;
|
|
2446
|
+
cursor: crosshair;
|
|
2447
|
+
touch-action: none;
|
|
2448
|
+
}
|
|
2449
|
+
.vnr-screen-ink-svg {
|
|
2450
|
+
position: absolute;
|
|
2451
|
+
inset: 0;
|
|
2452
|
+
width: 100%;
|
|
2453
|
+
height: 100%;
|
|
2454
|
+
overflow: visible;
|
|
2455
|
+
}
|
|
2456
|
+
.vnr-screen-ink-stroke {
|
|
2457
|
+
fill: none;
|
|
2458
|
+
stroke-linecap: round;
|
|
2459
|
+
stroke-linejoin: round;
|
|
2460
|
+
}
|
|
2461
|
+
.vnr-screen-cursor {
|
|
2462
|
+
position: absolute;
|
|
2463
|
+
width: 28px;
|
|
2464
|
+
height: 28px;
|
|
2465
|
+
margin-left: -2px;
|
|
2466
|
+
margin-top: -2px;
|
|
2467
|
+
filter: drop-shadow(0 1px 3px rgba(0,0,0,0.45));
|
|
2468
|
+
animation: vnr-screen-cursor-pulse 1.2s ease-in-out infinite;
|
|
2469
|
+
}
|
|
2470
|
+
.vnr-screen-cursor.vnr-screen-cursor-flying {
|
|
2471
|
+
animation: none;
|
|
2472
|
+
}
|
|
2473
|
+
.vnr-screen-cursor-label {
|
|
2474
|
+
position: absolute;
|
|
2475
|
+
margin-top: 22px;
|
|
2476
|
+
margin-left: 8px;
|
|
2477
|
+
padding: 4px 8px;
|
|
2478
|
+
border-radius: 6px;
|
|
2479
|
+
font-size: 12px;
|
|
2480
|
+
font-weight: 600;
|
|
2481
|
+
color: #fff;
|
|
2482
|
+
white-space: nowrap;
|
|
2483
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
2484
|
+
}
|
|
2485
|
+
.vnr-screen-click-ripple {
|
|
2486
|
+
position: absolute;
|
|
2487
|
+
width: 48px;
|
|
2488
|
+
height: 48px;
|
|
2489
|
+
border-radius: 50%;
|
|
2490
|
+
border: 3px solid currentColor;
|
|
2491
|
+
animation: vnr-screen-ripple 650ms ease-out forwards;
|
|
2492
|
+
}
|
|
2493
|
+
.vnr-screen-labels-layer {
|
|
2494
|
+
position: absolute;
|
|
2495
|
+
inset: 0;
|
|
2496
|
+
pointer-events: none;
|
|
2497
|
+
}
|
|
2498
|
+
.vnr-screen-ink-label {
|
|
2499
|
+
position: absolute;
|
|
2500
|
+
transform: translate(-50%, -50%);
|
|
2501
|
+
font-family: Georgia, "Times New Roman", serif;
|
|
2502
|
+
font-weight: 600;
|
|
2503
|
+
line-height: 1;
|
|
2504
|
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.35);
|
|
2505
|
+
white-space: nowrap;
|
|
2506
|
+
pointer-events: none;
|
|
2507
|
+
}
|
|
2508
|
+
`,document.head.appendChild(n)}function F(n,e){const t=Number(n);return Number.isFinite(t)?t:e}function G(n,e=""){return typeof n=="string"?n:e}function $(n){if(n===!0||n===1)return!0;if(typeof n=="string"){const e=n.trim().toLowerCase();return e==="true"||e==="1"||e==="yes"}return!1}function si(n){if(n===!1||n===0)return!0;if(typeof n=="string"){const e=n.trim().toLowerCase();return e==="false"||e==="0"||e==="no"}return!1}function ie(n,e){return n>=0&&n<=1?n*e:n}function fe(n,e){const t=window.innerWidth,i=window.innerHeight;return{px:ie(n,t),py:ie(e,i)}}function St(n){const e=document.querySelector(n);if(!e)return null;const t=e.getBoundingClientRect();return{px:t.left+t.width/2,py:t.top+t.height/2}}function ws(n){const e=G(n.css_selector||n.selector);if(e){const s=St(e);if(s)return s}const t=n.x??n.client_x,i=n.y??n.client_y;return t==null||i==null?null:fe(F(t,NaN),F(i,NaN))}function ri(n){if(Array.isArray(n))return n;if(typeof n=="string"){const e=n.trim();if(!e)return[];try{const i=JSON.parse(e);if(Array.isArray(i))return i.length>0&&Array.isArray(i[0])?[{points:i,close:!0}]:i}catch{}const t=e.split(/\s+/).map(i=>{const[s,r]=i.split(","),o=Number(s),a=Number(r);return Number.isFinite(o)&&Number.isFinite(a)?[o,a]:null}).filter(i=>i!=null);if(t.length>=2)return[{points:t,close:!0}]}return[]}function xs(n){if(Array.isArray(n))return n;if(typeof n=="string"){const e=n.trim();if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}return[]}function Bt(n,e){const t=G(n,e).trim().toLowerCase();return!t||t==="#000"||t==="#000000"||t==="black"?"#ece6d9":G(n,e)}function Zi(n,e){if(!n||typeof n!="object")return null;const t=n,i=G(t.text??t.label??t.annotation??(typeof t.annotations=="string"?t.annotations:"")).trim();if(!i)return null;let s=t.x??t.client_x,r=t.y??t.client_y;if((s==null||r==null)&&Array.isArray(t.points)&&t.points.length>0){const l=Ot(t.points[0]);if(l){const c=window.innerWidth,h=window.innerHeight;s=l.px/c,r=l.py/h}}if(s==null||r==null)return null;const o=Number(s),a=Number(r);return!Number.isFinite(o)||!Number.isFinite(a)?null:{x:o,y:a,text:i,color:Bt(t.color,e),font_size:t.font_size!=null?F(t.font_size,18):void 0}}function Cs(n,e){if(!n||typeof n!="object")return null;const t=n;return t.text!=null||t.label!=null||t.annotation!=null||typeof t.annotations=="string"?Zi(n,e):null}function Es(n){return Array.isArray(n)&&n.length>0&&Array.isArray(n[0])?{points:n,close:!0}:n}function ks(n){return ie(n,Math.min(window.innerWidth,window.innerHeight))}function Ss(n){if(n.length<2)return null;const e=window.innerWidth,t=window.innerHeight,i=n.map(c=>c.px),s=n.map(c=>c.py),r=(Math.min(...i)+Math.max(...i))/2,o=(Math.min(...s)+Math.max(...s))/2,a=Math.max(...n.map(c=>Math.hypot(c.px-r,c.py-o))),l=Math.min(e,t);return{cx:r/e,cy:o/t,r:a/l}}function Bs(n,e,t,i){const s=G(n.kind||n.shape).toLowerCase(),r=s==="circle"||s==="ellipse"||n.r!=null||n.radius!=null||n.rx!=null||n.ry!=null;let o=n.cx??n.center_x??n.x,a=n.cy??n.center_y??n.y,l=n.r??n.radius;const c=n.rx,h=n.ry;if(Array.isArray(i)&&i.length>=3){const m=[];for(const v of i){const f=Ot(v);f&&m.push(f)}const A=Ss(m);A&&(r||$(n.close)&&m.length>=8)&&(o=o??A.cx,a=a??A.cy,l=l??A.r)}if(o==null||a==null)return null;const d=Number(o),g=Number(a);if(!Number.isFinite(d)||!Number.isFinite(g))return null;const u={kind:s==="ellipse"||c!=null||h!=null?"ellipse":"circle",cx:d,cy:g,color:G(n.color,e),stroke_width:n.stroke_width!=null?F(n.stroke_width,t):t};return c!=null||h!=null?(u.rx=Number(c??h),u.ry=Number(h??c),u):l!=null&&Number.isFinite(Number(l))?(u.r=Number(l),u):null}function oi(n,e,t){if(!n||typeof n!="object")return null;const i=n,s=G(i.path_d||i.path||i.d),r=G(i.color,e),o=i.stroke_width!=null?F(i.stroke_width,t):t;if(s)return{path_d:s,close:$(i.close),color:r,stroke_width:o,css_selector:G(i.css_selector)||void 0};const a=G(i.css_selector||i.selector),l=i.points,c=Bs(i,e,t,l);if(c)return c;if(a&&!Array.isArray(l))return{css_selector:a,color:r,stroke_width:o};let h=l;if(!Array.isArray(h)){const d=i.from_x,g=i.from_y,u=i.to_x,m=i.to_y;d!=null&&g!=null&&u!=null&&m!=null&&(h=[[d,g],[u,m]])}if(Array.isArray(h)&&h.length>=2){const d=G(i.kind),g=$(i.close)||d==="triangle"||d==="polygon";return{points:h,close:g,color:r,stroke_width:o,css_selector:a||void 0}}return a?{css_selector:a,color:r,stroke_width:o}:null}function Ot(n){if(Array.isArray(n)&&n.length>=2){const e=Number(n[0]),t=Number(n[1]);return!Number.isFinite(e)||!Number.isFinite(t)?null:fe(e,t)}if(n&&typeof n=="object"&&"x"in n&&"y"in n){const e=Number(n.x),t=Number(n.y);return!Number.isFinite(e)||!Number.isFinite(t)?null:fe(e,t)}return null}function Is(n){const e=n.points;if(!Array.isArray(e))return[];const t=[];for(const i of e){const s=Ot(i);s&&t.push(s)}return t}function De(n,e){return{class:"vnr-screen-ink-stroke",fill:"none",stroke:n,"stroke-width":String(e),"stroke-linecap":"round","stroke-linejoin":"round"}}function Pe(n,e){for(const[t,i]of Object.entries(e))n.setAttribute(t,i)}function Ms(n,e){if(n.length===0)return"";const t=n.map((i,s)=>`${s===0?"M":"L"} ${i.px} ${i.py}`).join(" ");return e&&n.length>=3?`${t} Z`:t}function Ts(n){return`<svg class="vnr-screen-cursor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2509
|
+
<path d="M4 4L4 19L9 14L13 20L15 19L11 13L17 13L4 4Z" fill="${n}" stroke="#fff" stroke-width="1.2"/>
|
|
2510
|
+
</svg>`}class Ds{constructor(){p(this,"root",null);p(this,"inkSvg",null);p(this,"labelsLayer",null);p(this,"cursorEl",null);p(this,"cursorTimer",null);p(this,"lastCursorPoint",null);p(this,"flyFrameId",null);p(this,"userDrawActive",!1);p(this,"userDrawColor","#f97316");p(this,"userStrokeWidth",Te);p(this,"userDrawPath",null);p(this,"userDrawPoints",[]);p(this,"userDrawBound",!1);p(this,"userDrawLayer",null);p(this,"onUserPointerDown",e=>this.handleUserPointerDown(e));p(this,"onUserPointerMove",e=>this.handleUserPointerMove(e));p(this,"onUserPointerUp",e=>this.handleUserPointerUp(e))}ensureRoot(){var e;return bs(),(e=this.root)!=null&&e.isConnected?this.root:(this.root=document.createElement("div"),this.root.className="vnr-screen-overlay-root",this.root.setAttribute("aria-hidden","true"),document.body.appendChild(this.root),this.root)}clear(){this.disableUserDrawing(),this.cursorTimer&&(clearTimeout(this.cursorTimer),this.cursorTimer=null),this.root&&(this.root.remove(),this.root=null),this.inkSvg=null,this.cursorEl=null,this.labelsLayer=null}clearInk(){this.inkSvg&&(this.inkSvg.remove(),this.inkSvg=null),this.labelsLayer&&(this.labelsLayer.remove(),this.labelsLayer=null)}addTextLabels(e,t="#ece6d9"){var r;if(e.length===0)return 0;const i=this.ensureRoot();(r=this.labelsLayer)!=null&&r.isConnected||(this.labelsLayer=document.createElement("div"),this.labelsLayer.className="vnr-screen-labels-layer",i.appendChild(this.labelsLayer));const s=this.labelsLayer;for(const o of e){const a=fe(o.x,o.y),l=document.createElement("div");l.className="vnr-screen-ink-label",l.textContent=o.text;const c=Bt(o.color,t),h=o.font_size??20;l.style.cssText=`left:${a.px}px;top:${a.py}px;color:${c};font-size:${h}px;`,s.appendChild(l)}return e.length}hideCursor(){this.cancelFly(),this.cursorTimer&&(clearTimeout(this.cursorTimer),this.cursorTimer=null),this.cursorEl&&(this.cursorEl.remove(),this.cursorEl=null)}getLastCursorPoint(){return this.lastCursorPoint}cancelFly(){this.flyFrameId!=null&&(cancelAnimationFrame(this.flyFrameId),this.flyFrameId=null)}defaultFlyStart(){if(this.lastCursorPoint)return this.lastCursorPoint;const e=window.innerWidth,t=window.innerHeight;return{px:e*.82,py:t*.86}}placeCursorWrap(e,t,i,s){if(e.style.cssText=`position:absolute;left:${t.px}px;top:${t.py}px;`,e.innerHTML=Ts(i),s){const r=document.createElement("div");r.className="vnr-screen-cursor-label",r.style.background=i,r.textContent=s,e.appendChild(r)}}async flyCursorTo(e,t={}){this.cancelFly(),this.cursorTimer&&(clearTimeout(this.cursorTimer),this.cursorTimer=null);const i=t.from??this.defaultFlyStart(),s=G(t.color,"#f97316"),r=F(t.fly_duration_ms,680),o=this.ensureRoot();this.hideCursor();const a=document.createElement("div");this.placeCursorWrap(a,i,s);const l=a.querySelector(".vnr-screen-cursor");l&&l.classList.add("vnr-screen-cursor-flying"),o.appendChild(a),this.cursorEl=a;const c=Math.max(72,Math.abs(i.py-e.py)*.38),h={px:(i.px+e.px)/2,py:Math.min(i.py,e.py)-c};await new Promise(u=>{const m=performance.now(),A=v=>{const f=Math.min(1,(v-m)/r),b=f<.5?2*f*f:1-Math.pow(-2*f+2,2)/2,C=1-b,w=C*C*i.px+2*C*b*h.px+b*b*e.px,x=C*C*i.py+2*C*b*h.py+b*b*e.py;a.style.left=`${w}px`,a.style.top=`${x}px`;const E=e.px-w,k=e.py-x;if(l&&Math.hypot(E,k)>6){const S=Math.atan2(k,E)*180/Math.PI;l.style.transform=`rotate(${S-45}deg)`,l.style.transformOrigin="2px 2px"}f<1?this.flyFrameId=requestAnimationFrame(A):(a.style.left=`${e.px}px`,a.style.top=`${e.py}px`,this.flyFrameId=null,u())};this.flyFrameId=requestAnimationFrame(A)}),l&&l.classList.remove("vnr-screen-cursor-flying");const d=G(t.label);if(d){let u=a.querySelector(".vnr-screen-cursor-label");u||(u=document.createElement("div"),u.className="vnr-screen-cursor-label",a.appendChild(u)),u.style.background=s,u.textContent=d}this.lastCursorPoint=e;const g=F(t.duration_ms,0);return g>0&&(this.cursorTimer=setTimeout(()=>this.hideCursor(),g)),e}async outlineSelectors(e,t="#f97316",i={}){const s=e.map(r=>({css_selector:r,close:!0,color:t})).filter(r=>!!r.css_selector);return s.length===0?0:this.addStrokes(s,t,{animate:i.animate!==!1,duration_ms:i.duration_ms??600,gap_ms:i.gap_ms??60,stroke_width:i.stroke_width??Te})}syncInkSvgViewport(e){const t=window.innerWidth,i=window.innerHeight;e.setAttribute("width",String(t)),e.setAttribute("height",String(i)),e.setAttribute("viewBox",`0 0 ${t} ${i}`)}ensureInkSvg(){var i;const e=this.ensureRoot();if((i=this.inkSvg)!=null&&i.isConnected)return this.syncInkSvgViewport(this.inkSvg),this.inkSvg;const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("class","vnr-screen-ink-svg"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("preserveAspectRatio","none"),this.syncInkSvgViewport(t),e.appendChild(t),this.inkSvg=t,t}createCircleElement(e,t,i){if(e.cx==null||e.cy==null)return null;const s=window.innerWidth,r=window.innerHeight,o=ie(e.cx,s),a=ie(e.cy,r),l="http://www.w3.org/2000/svg";if(e.kind==="ellipse"||e.rx!=null||e.ry!=null){const h=e.rx??e.r,d=e.ry??e.r;if(h==null||d==null)return null;const g=document.createElementNS(l,"ellipse");return g.setAttribute("cx",String(o)),g.setAttribute("cy",String(a)),g.setAttribute("rx",String(ie(Number(h),s))),g.setAttribute("ry",String(ie(Number(d),r))),Pe(g,De(t,i)),g}if(e.r==null)return null;const c=document.createElementNS(l,"circle");return c.setAttribute("cx",String(o)),c.setAttribute("cy",String(a)),c.setAttribute("r",String(ks(Number(e.r)))),Pe(c,De(t,i)),c}createFreeformElement(e,t,i){const s=G(e.color,t),r=e.stroke_width!=null?F(e.stroke_width,i):i;if(e.kind==="circle"||e.kind==="ellipse"||e.r!=null||e.rx!=null||e.ry!=null)return this.createCircleElement(e,s,r);const a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=G(e.path_d);if(l)return a.setAttribute("d",l),Pe(a,De(s,r)),a;let c=e;if(e.css_selector){const d=Zt(e.css_selector,s);d&&(c={...e,points:d.points,close:d.close,color:d.color})}const h=Is(c);return h.length<2?null:(a.setAttribute("d",Ms(h,$(c.close))),Pe(a,De(s,r)),a)}async addStrokes(e,t="#f97316",i={}){const s=this.ensureInkSvg(),r=i.animate!==!1,o=i.duration_ms??vt,a=i.gap_ms??ii,l=i.stroke_width??Te;let c=0;for(const h of e){const d=this.createFreeformElement(h,t,l);d&&(s.appendChild(d),c+=1,r&&await kt(d,o),r&&a>0&&await Ut(a))}return c}async addInk(e,t,i){return this.addStrokes(e,t,i)}enableUserDrawing(e){const t=this.ensureRoot();if(this.userDrawActive=!0,this.userDrawColor=G(e==null?void 0:e.color,"#f97316"),this.userStrokeWidth=F(e==null?void 0:e.stroke_width,Te),e!=null&&e.region){const i=window.innerWidth,s=window.innerHeight,r=e.region,o=ie(r.x,i),a=ie(r.y,s),l=ie(r.width,i),c=ie(r.height,s),h=document.createElement("div");h.className="vnr-screen-user-draw-layer",h.style.cssText=`position:fixed;left:${o}px;top:${a}px;width:${l}px;height:${c}px;pointer-events:auto;cursor:crosshair;touch-action:none;z-index:1;`,t.appendChild(h),this.userDrawLayer=h,this.bindUserDrawEvents(h)}else t.classList.add("vnr-screen-overlay-interactive"),this.bindUserDrawEvents(t)}bindUserDrawEvents(e){this.userDrawBound||(e.addEventListener("pointerdown",this.onUserPointerDown),e.addEventListener("pointermove",this.onUserPointerMove),e.addEventListener("pointerup",this.onUserPointerUp),e.addEventListener("pointercancel",this.onUserPointerUp),this.userDrawBound=!0)}unbindUserDrawEvents(e){!e||!this.userDrawBound||(e.removeEventListener("pointerdown",this.onUserPointerDown),e.removeEventListener("pointermove",this.onUserPointerMove),e.removeEventListener("pointerup",this.onUserPointerUp),e.removeEventListener("pointercancel",this.onUserPointerUp),this.userDrawBound=!1)}disableUserDrawing(){this.userDrawActive=!1,this.userDrawPath=null,this.userDrawPoints=[],this.userDrawLayer?(this.unbindUserDrawEvents(this.userDrawLayer),this.userDrawLayer.remove(),this.userDrawLayer=null):this.root&&(this.unbindUserDrawEvents(this.root),this.root.classList.remove("vnr-screen-overlay-interactive"))}handleUserPointerDown(e){if(!this.userDrawActive||e.button!==0)return;e.preventDefault(),e.stopPropagation();const t=e.currentTarget??this.root;t==null||t.setPointerCapture(e.pointerId);const i=this.ensureInkSvg(),s=document.createElementNS("http://www.w3.org/2000/svg","path");Pe(s,De(this.userDrawColor,this.userStrokeWidth)),this.userDrawPath=s,this.userDrawPoints=[`M ${e.clientX} ${e.clientY}`],s.setAttribute("d",this.userDrawPoints.join(" ")),i.appendChild(s)}handleUserPointerMove(e){!this.userDrawActive||!this.userDrawPath||(e.preventDefault(),this.userDrawPoints.push(`L ${e.clientX} ${e.clientY}`),this.userDrawPath.setAttribute("d",this.userDrawPoints.join(" ")))}async handleUserPointerUp(e){var i;if(!this.userDrawPath)return;e.preventDefault();const t=this.userDrawPath;this.userDrawPath=null,this.userDrawPoints=[];try{(i=e.currentTarget)==null||i.releasePointerCapture(e.pointerId)}catch{}await kt(t,vt)}showCursor(e,t="#f97316"){const i=e,s=ws(i);if(!s)return null;const r=G(e.color,t),o=G(e.label)||void 0;if($(e.fly)||$(i.fly))return this.flyCursorTo(s,{color:r,label:o,fly_duration_ms:F(e.fly_duration_ms??i.fly_duration_ms,680),duration_ms:F(e.duration_ms,0)}),s;this.hideCursor();const l=this.ensureRoot(),c=document.createElement("div");this.placeCursorWrap(c,s,r,o),l.appendChild(c),this.cursorEl=c,this.lastCursorPoint=s;const h=F(e.duration_ms,2500);return h>0&&(this.cursorTimer=setTimeout(()=>this.hideCursor(),h)),s}showClickRipple(e,t,i="#f97316"){const s=this.ensureRoot(),r=document.createElement("div");r.className="vnr-screen-click-ripple",r.style.cssText=`left:${e}px;top:${t}px;color:${i};`,s.appendChild(r),setTimeout(()=>r.remove(),700)}async applyInkFromArgs(e,t){const i=G(e.color||t.color,"#f97316"),s=Bt(e.label_color??t.label_color,"#ece6d9"),r=$(e.clear)||$(e.clear_before)||$(t.clear_before),o=!si(e.animate)&&!si(t.animate),a=F(e.duration_ms??t.duration_ms,vt),l=F(e.gap_ms??t.gap_ms,ii),c=F(e.stroke_width??t.stroke_width,Te),h=$(e.interactive)||$(e.user_draw)||$(t.interactive),d=e.interactive_region??t.interactive_region;let g;if(d&&typeof d=="object"){const b=d;g={x:F(b.x,0),y:F(b.y,0),width:F(b.width??b.w,1),height:F(b.height??b.h,1)}}const u=[];for(const b of xs(e.labels??t.labels)){const C=Zi(b,s);C&&u.push(C)}let m=ri(e.strokes??t.strokes);m.length===0&&(m=ri(e.annotations??t.annotations));const A=[];for(const b of m){const C=Es(b),w=Cs(C,s);if(w){u.push(w);continue}const x=oi(C,i,c);x&&A.push(x)}if(A.length===0){const b=G(e.css_selector??e.selector??t.css_selector??t.selector);if(b){const C=Zt(b,i);C&&A.push({css_selector:b,...C,stroke_width:c})}}if(A.length===0){const b=oi({kind:e.kind??e.shape??t.kind,cx:e.cx??e.center_x??t.cx,cy:e.cy??e.center_y??t.cy,r:e.r??e.radius??t.r,rx:e.rx??t.rx,ry:e.ry??t.ry,points:e.points??t.points,path_d:e.path_d??e.path??e.d??t.path_d??t.path,close:e.close??t.close,css_selector:e.css_selector??e.selector??t.css_selector??t.selector,from_x:e.from_x??t.from_x,from_y:e.from_y??t.from_y,to_x:e.to_x??t.to_x,to_y:e.to_y??t.to_y,color:i,stroke_width:c},i,c);b&&A.push(b)}r&&this.clearInk();let v=0;A.length>0&&(v=await this.addStrokes(A,i,{animate:o,duration_ms:a,gap_ms:l,stroke_width:c}));const f=this.addTextLabels(u,s);return h&&this.enableUserDrawing({color:i,stroke_width:c,region:g}),{strokes:v,labels:f}}}let we=null;function ze(){return we||(we=new Ds),we}function ot(){we==null||we.clear()}function Ps(n,e){const t=document.elementsFromPoint(n,e);for(const i of t)if(i instanceof HTMLElement&&!i.closest(".vnr-screen-overlay-root"))return i;return null}function Ls(n){try{n.focus({preventScroll:!0})}catch{}const e=n.tagName.toLowerCase(),t=e==="input"?n.type.toLowerCase():"";if((e==="button"||e==="a"||["submit","button","checkbox","radio","reset"].includes(t))&&typeof n.click=="function"){n.click();return}const s={bubbles:!0,cancelable:!0,view:window,button:0,buttons:1};n.dispatchEvent(new MouseEvent("mousedown",s)),n.dispatchEvent(new MouseEvent("mouseup",s)),n.dispatchEvent(new MouseEvent("click",s))}const It=new Map,Mt=new Map;function Le(n,e=""){return typeof n=="string"?n:e}function Ns(n){It.clear(),Mt.clear();for(const e of n.elements)e.element_id&&It.set(e.element_id,e),Mt.set(e.css_selector,e)}function Qs(n){return It.get(n.trim())}function Rs(n,e=48){return n.elements.slice(0,e).map(t=>{var o;const i=t.element_id??"?",s=t.label.slice(0,56).replace(/\s+/g," ");let r=`${i} ${t.kind} "${s}" center=(${t.center_x.toFixed(3)},${t.center_y.toFixed(3)}) sel=${t.css_selector}`;if((o=t.stroke_points)!=null&&o.length){const a=t.stroke_points.map(l=>[Number(l.x.toFixed(3)),Number(l.y.toFixed(3))]);r+=` stroke_points=${JSON.stringify(a)}`}return r}).join(`
|
|
2511
|
+
`)}function zs(n){if(n.length===0)return null;let e=0,t=0;for(const r of n)e+=r.x,t+=r.y;const i=e/n.length,s=t/n.length;return fe(i,s)}function Xe(n,e={}){var o;const t=Le(n.element_id??n.target??n.element??e.element_id??e.target).trim();if(t){const a=Qs(t);if(a){const l=(o=a.stroke_points)!=null&&o.length?zs(a.stroke_points):null,c=l?null:St(a.css_selector),h=l??c??fe(a.center_x,a.center_y);return{element_id:a.element_id,css_selector:a.css_selector,point:h,label:Le(n.label,a.label),kind:a.kind}}}const i=Le(n.css_selector??n.selector??e.css_selector??e.selector).trim();if(i){const a=St(i);if(a){const l=Mt.get(i);return{css_selector:i,point:a,label:Le(n.label,(l==null?void 0:l.label)??""),element_id:l==null?void 0:l.element_id,kind:l==null?void 0:l.kind}}}const s=n.x??n.client_x??e.x,r=n.y??n.client_y??e.y;if(s!=null&&r!=null){const a=Number(s),l=Number(r);if(Number.isFinite(a)&&Number.isFinite(l))return{point:fe(a,l),label:Le(n.label)}}return null}function Hs(n,e={}){const t=n.targets??n.element_ids??n.elements??e.targets??e.element_ids;if(Array.isArray(t)){const s=[];for(const r of t)if(typeof r=="string"){const o=Xe({element_id:r},e);o&&s.push(o)}else if(r&&typeof r=="object"){const o=Xe(r,e);o&&s.push(o)}if(s.length>0)return s}const i=Xe(n,e);return i?[i]:[]}function Ye(n,e=""){return typeof n=="string"?n:e}function xe(n,e=!0){if(n==null)return e;if(n===!0||n===1)return!0;if(n===!1||n===0)return!1;const t=String(n).trim().toLowerCase();return t==="true"||t==="1"||t==="yes"?!0:t==="false"||t==="0"||t==="no"?!1:e}function Us(n,e,t,i){const s=n.args??{},r=n.clientFields??{},o=Ye(s.prompt??s.message??r.default_prompt).trim(),a=Number(s.max_elements??r.max_elements??64),l=xe(s.include_image??r.include_image,!1),c=Number(s.max_width??r.max_width??1280),h=Ye(s.reason??r.reason,"page_scan");if(typeof document>"u"){t("Page scan is only available in browser environments");return}(async()=>{try{const d=Ki({maxElements:Number.isFinite(a)?a:64});Ns(d);const g=Rs(d),m=`${o?`Page scanned. Context: ${o}`:"Visible page scanned — use element ids below for point_at and outline_targets."}
|
|
2512
|
+
|
|
2513
|
+
DOM-FIRST GUIDE (better than screenshot-only tutors):
|
|
2514
|
+
- Call point_at with element_id (e.g. e3) from this scan — cursor flies to the live element.
|
|
2515
|
+
- Call outline_targets with element_ids to draw animated outlines on the real DOM.
|
|
2516
|
+
- Prefer element_id or css_selector; raw x/y only as fallback.
|
|
2517
|
+
|
|
2518
|
+
viewport=${d.viewport.width}x${d.viewport.height} · ${d.elements.length} elements
|
|
2519
|
+
coordinate_system=${d.coordinate_system}
|
|
2520
|
+
|
|
2521
|
+
CATALOG (id kind "label" center sel):
|
|
2522
|
+
${g}`;e({status:"success",preset_id:y.PageScan,viewport:d.viewport,element_count:d.elements.length,catalog:g,elements:d.elements,coordinate_system:d.coordinate_system,message:m,guide:'Next: point_at { element_id: "eN", label: "..." } or outline_targets { targets: ["e1","e5"] }'}),l&&(i!=null&&i.uploadMediaForToolResult)&&(async()=>{try{let A=await Fi();Number.isFinite(c)&&c>0&&(A=Vi(A,c));const v=await Ht(A),f=new File([v],`page-scan-${Date.now()}.jpg`,{type:"image/jpeg"});await i.uploadMediaForToolResult(f,h)}catch{}})()}catch(d){const g=d instanceof Error?d.message:"Page scan failed";t(g,{status:"cancelled"})}})()}function Os(n,e,t){const i=n.args??{},s=n.clientFields??{},r=Ye(i.color??s.color,"#f97316"),o=xe(i.fly??s.fly,!0),a=xe(i.outline??s.outline,!0),l=Number(i.fly_duration_ms??s.fly_duration_ms??680),c=Number(i.duration_ms??s.duration_ms??0),h=xe(i.clear_before??s.clear_before,!1),d=Xe(i,s);if(!d){t("No valid target — provide element_id from page_scan, css_selector, or x/y");return}const g=Ye(i.label,d.label)||void 0,u=ze();(async()=>(h&&u.clearInk(),a&&d.css_selector&&await u.outlineSelectors([d.css_selector],r,{animate:!0,duration_ms:520,gap_ms:0}),o?await u.flyCursorTo(d.point,{color:r,label:g,fly_duration_ms:l,duration_ms:c}):u.showCursor({x:d.point.px/window.innerWidth,y:d.point.py/window.innerHeight,label:g,color:r,duration_ms:c}),e({status:"success",preset_id:y.PointAt,message:g?`Pointing at: ${g}`:"Cursor placed on target",element_id:d.element_id,css_selector:d.css_selector,x:d.point.px,y:d.point.py,label:g})))()}function Ys(n,e,t){const i=n.args??{},s=n.clientFields??{},r=Ye(i.color??s.color,"#f97316"),o=xe(i.animate??s.animate,!0),a=Number(i.duration_ms??s.duration_ms??600),l=xe(i.clear_before??s.clear_before,!1),c=Hs(i,s);if(c.length===0){t('No valid targets — provide targets: ["e1","e3"] or element_id / css_selector');return}const h=c.map(g=>g.css_selector).filter(g=>!!g);if(h.length===0){t("Targets resolved but no live css_selector — run page_scan first");return}const d=ze();(async()=>{l&&d.clearInk();const g=await d.outlineSelectors(h,r,{animate:o,duration_ms:a,gap_ms:50});e({status:"success",preset_id:y.OutlineTargets,message:`Outlined ${g} element(s) on the live page`,outlined_count:g,element_ids:c.map(u=>u.element_id).filter(Boolean),selectors:h})})()}function js(n,e){ot(),e({status:"success",preset_id:y.ClearGuide,message:"Guide overlay cleared (cursor, ink, outlines)"})}const ai="vanira:agent-playback-ended",Gs="You might have missed the whiteboard — call type_on_whiteboard or draw_on_board so the student can see what you explained. if you are on other task or waiting for user to show something then fine";function Fs(n){return!!(n.has_notes_on_board||n.has_diagram_geometry)}class Vs{constructor(e,t){p(this,"active",!1);p(this,"sendContext",null);p(this,"getSnapshot");p(this,"isBoardBusy");p(this,"onAgentTurnEnd");this.getSnapshot=e,this.isBoardBusy=t,this.onAgentTurnEnd=()=>this.checkAfterAgentTurn()}start(e){if(this.active){this.sendContext=e;return}this.active=!0,this.sendContext=e,window.addEventListener(ai,this.onAgentTurnEnd)}stop(){this.active&&(this.active=!1,this.sendContext=null,window.removeEventListener(ai,this.onAgentTurnEnd))}checkAfterAgentTurn(){if(!this.active||!this.sendContext||this.isBoardBusy())return;const e=this.getSnapshot();if(Fs(e))return;const t={board_turn_check:{has_whiteboard:!1,...e,message:Gs}};try{this.sendContext(t)}catch{}}}const he=800,pe=500,_s="#4A9EFF",Ne=2e3,li=80;function $i(n){if(!document.getElementById("vnr-board-line-styles")){const t=document.createElement("style");t.id="vnr-board-line-styles",t.textContent=`
|
|
2523
|
+
.vnr-whiteboard-draw-layer path.vnr-board-stroke,
|
|
2524
|
+
.vnr-whiteboard-draw-layer line.vnr-board-stroke,
|
|
2525
|
+
.vnr-whiteboard-draw-layer circle.vnr-board-stroke,
|
|
2526
|
+
.vnr-whiteboard-draw-layer ellipse.vnr-board-stroke {
|
|
2527
|
+
fill: none;
|
|
2528
|
+
stroke: #ffffff;
|
|
2529
|
+
stroke-width: 6px;
|
|
2530
|
+
stroke-linecap: round;
|
|
2531
|
+
stroke-linejoin: round;
|
|
2532
|
+
vector-effect: non-scaling-stroke;
|
|
2533
|
+
}
|
|
2534
|
+
.vnr-whiteboard-draw-layer text.vnr-board-label {
|
|
2535
|
+
fill: #4A9EFF !important;
|
|
2536
|
+
font-family: 'Architects Daughter', 'Caveat', cursive, sans-serif;
|
|
2537
|
+
font-size: 28px;
|
|
2538
|
+
paint-order: stroke fill;
|
|
2539
|
+
}
|
|
2540
|
+
`,document.head.appendChild(t)}if(n.querySelector("#vnr-chalk-defs"))return;const e=document.createElementNS("http://www.w3.org/2000/svg","defs");e.id="vnr-chalk-defs",n.appendChild(e)}function ue(n){let e=n.querySelector(".vnr-whiteboard-draw-layer");return e||(e=document.createElementNS("http://www.w3.org/2000/svg","svg"),e.setAttribute("class","vnr-whiteboard-draw-layer"),e.setAttribute("viewBox",`0 0 ${he} ${pe}`),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.style.position="absolute",e.style.inset="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="none",e.style.zIndex="0",$i(e),n.insertBefore(e,n.firstChild),e)}function Ke(n){[...n.childNodes].forEach(e=>{e instanceof SVGDefsElement||e.remove()})}function en(n){$i(n)}const at=6,Js="#ffffff";function _(n,e){if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"&&n.trim()!==""){const t=Number(n);if(Number.isFinite(t))return t}return e}function ee(n,e=""){return typeof n=="string"?n:e}function Ce(n){if(n===!0||n===1)return!0;if(typeof n=="string"){const e=n.trim().toLowerCase();return e==="true"||e==="1"||e==="yes"}return!1}function ci(n){if(n===!1||n===0)return!0;if(typeof n=="string"){const e=n.trim().toLowerCase();return e==="false"||e==="0"||e==="no"}return!1}function di(n){if(n===!0||n===1)return!0;if(n===!1||n===0||n===null||n===void 0||n==="")return!1;const e=String(n).trim().toLowerCase();return e==="true"||e==="1"||e==="yes"}function me(n,e){return n>=0&&n<=1?n*e:n}function Tt(n,e){return{bx:me(n,he),by:me(e,pe)}}function hi(n){if(Array.isArray(n))return n;if(typeof n=="string"){const e=n.trim();if(!e)return[];try{const i=JSON.parse(e);if(Array.isArray(i))return i.length>0&&Array.isArray(i[0])?[{points:i,close:!0}]:i}catch{}const t=e.split(/\s+/).map(i=>{const[s,r]=i.split(","),o=Number(s),a=Number(r);return Number.isFinite(o)&&Number.isFinite(a)?[o,a]:null}).filter(i=>i!=null);if(t.length>=2)return[{points:t,close:!0}]}return[]}function Ws(n){if(Array.isArray(n))return n;if(typeof n=="string"){const e=n.trim();if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}return[]}function tn(n,e){const t=ee(n,e).trim().toLowerCase();return!t||t==="#000"||t==="#000000"||t==="black"?e:ee(n,e)}function nn(n,e){if(!n||typeof n!="object")return null;const t=n,i=ee(t.text??t.label??t.label_text??t.annotation??(typeof t.annotations=="string"?t.annotations:"")).trim();if(!i)return null;const s=t.x??t.label_x??t.client_x,r=t.y??t.label_y??t.client_y;if(s==null||r==null)return null;const o=Number(s),a=Number(r);return!Number.isFinite(o)||!Number.isFinite(a)?null:{x:o,y:a,text:i,color:tn(t.color??t.label_color,e),font_size:t.font_size!=null?_(t.font_size,28):void 0}}function qs(n,e){if(!n||typeof n!="object")return null;const t=n;return t.text!=null||t.label!=null||t.label_text!=null||t.annotation!=null||typeof t.annotations=="string"?nn(n,e):null}function Xs(n){return Array.isArray(n)&&n.length>0&&Array.isArray(n[0])?{points:n,close:!0}:n}function sn(n){if(Array.isArray(n)&&n.length>=2){const e=Number(n[0]),t=Number(n[1]);return!Number.isFinite(e)||!Number.isFinite(t)?null:Tt(e,t)}if(n&&typeof n=="object"&&"x"in n&&"y"in n){const e=Number(n.x),t=Number(n.y);return!Number.isFinite(e)||!Number.isFinite(t)?null:Tt(e,t)}return null}function Ks(n){return me(n,Math.min(he,pe))}function Zs(n,e,t,i){const s=ee(n.kind||n.shape).toLowerCase(),r=s==="circle"||s==="ellipse"||n.r!=null||n.radius!=null||n.rx!=null||n.ry!=null;let o=n.cx??n.center_x??n.x,a=n.cy??n.center_y??n.y,l=n.r??n.radius;const c=n.rx,h=n.ry;if(Array.isArray(i)&&i.length>=3){const m=[];for(const A of i){const v=sn(A);v&&m.push(v)}if(m.length>=8&&r){const A=m.map(w=>w.bx),v=m.map(w=>w.by),f=(Math.min(...A)+Math.max(...A))/2,b=(Math.min(...v)+Math.max(...v))/2,C=Math.max(...m.map(w=>Math.hypot(w.bx-f,w.by-b)));o=o??f/he,a=a??b/pe,l=l??C/Math.min(he,pe)}}if(!r||o==null||a==null)return null;const d=Number(o),g=Number(a);if(!Number.isFinite(d)||!Number.isFinite(g))return null;const u={kind:s==="ellipse"||c!=null||h!=null?"ellipse":"circle",cx:d,cy:g,color:ee(n.color,e),stroke_width:n.stroke_width!=null?_(n.stroke_width,t):t};return c!=null||h!=null?(u.rx=Number(c??h),u.ry=Number(h??c),u):l!=null&&Number.isFinite(Number(l))?(u.r=Number(l),u):null}function Dt(n,e,t){if(!n||typeof n!="object")return null;const i=n,s=ee(i.path_d||i.path||i.d),r=ee(i.color,e),o=i.stroke_width!=null?_(i.stroke_width,t):t;if(s)return{path_d:s,close:Ce(i.close),color:r,stroke_width:o};const a=i.points,l=Zs(i,e,t,a);if(l)return l;let c=a;if(!Array.isArray(c)){const h=i.from_x??i.p1_x??i.x1,d=i.from_y??i.p1_y??i.y1,g=i.to_x??i.p2_x??i.x2,u=i.to_y??i.p2_y??i.y2;h!=null&&d!=null&&g!=null&&u!=null&&(c=[[h,d],[g,u]])}if(Array.isArray(c)&&c.length>=2){const h=ee(i.kind||i.shape_type||i.type).toLowerCase(),d=Ce(i.close??i.close_path)||h==="triangle"||h==="polygon"||h==="rectangle";return{points:c,close:d,color:r,stroke_width:o}}return null}function At(n,e,t,i,s){const r=_(n[e])??(i?_(n[i]):void 0),o=_(n[t])??(s?_(n[s]):void 0);return r===void 0||o===void 0?null:[r,o]}function $s(n,e,t){const i=[],s=[],r=ee(n.label_text??n.text).trim(),o=_(n.label_x??n.x),a=_(n.label_y??n.y);r&&o!=null&&a!=null&&s.push({x:o,y:a,text:r,color:t});const l=At(n,"p1_x","p1_y","x1","y1"),c=At(n,"p2_x","p2_y","x2","y2"),h=At(n,"p3_x","p3_y","x3","y3");if(l&&c&&h)return i.push({points:[l,c,h],close:!0,color:e}),{strokes:i,labels:s};if(l&&c)return i.push({points:[l,c],close:!1,color:e}),{strokes:i,labels:s};const d=Dt({...n,color:n.color??e},e,_(n.stroke_width,at)??at);if(d)return i.push(d),{strokes:i,labels:s};const g=_(n.rect_x),u=_(n.rect_y),m=_(n.rect_width??n.width),A=_(n.rect_height??n.height);return g!=null&&u!=null&&m!=null&&A!=null&&i.push({points:[[g,u],[g+m,u],[g+m,u+A],[g,u+A]],close:!0,color:e}),{strokes:i,labels:s}}function er(n,e={}){const t={...e,...n},i=ee(t.color??e.color,Js),s=tn(t.label_color??e.label_color,_s),r=_(t.stroke_width??e.stroke_width,at)??at,o=di(t.clear_old_diagrams_on_board)||di(t.clear_drawings)||Ce(t.clear)||Ce(t.clear_before)||Ce(e.clear_before),a=ci(t.animate)||ci(e.animate);let l=Math.max(0,_(t.shape_duration_ms??t.duration_ms??e.duration_ms,Ne)??Ne),c=Math.max(0,_(t.shape_gap_ms??t.gap_ms??e.gap_ms,li)??li),h=!a;h&&l>0&&l<Ne&&(l=Ne),l>=Ne&&(h=!0);const d=[];for(const A of Ws(t.labels??e.labels)){const v=nn(A,s);v&&d.push(v)}let g=hi(t.strokes??e.strokes);g.length===0&&(g=hi(t.annotations??e.annotations));const u=[];for(const A of g){const v=Xs(A),f=qs(v,s);if(f){d.push(f);continue}const b=Dt(v,i,r);b&&u.push(b)}if(u.length===0){const A=t.points??e.points;if(A!=null){const v=Dt({points:A,close:t.close??t.close_path??!0,color:i},i,r);v&&u.push(v)}}const m=$s(t,i,s);for(const A of m.labels)d.some(v=>v.text===A.text&&v.x===A.x&&v.y===A.y)||d.push(A);return u.length===0&&u.push(...m.strokes),{strokes:u,labels:d,clearBefore:o,animate:h,durationMs:l,gapMs:c,strokeWidth:r,strokeColor:i,labelColor:s}}function tr(n){const e=n.points;if(!Array.isArray(e))return[];const t=[];for(const i of e){const s=sn(i);s&&t.push(s)}return t}function ir(n,e){if(n.length===0)return"";const t=n.map((i,s)=>`${s===0?"M":"L"} ${i.bx} ${i.by}`).join(" ");return e&&n.length>=3?`${t} Z`:t}function lt(n,e){return{class:"vnr-board-stroke",fill:"none",stroke:n,"stroke-width":String(e),"stroke-linecap":"round","stroke-linejoin":"round"}}function ct(n,e){for(const[t,i]of Object.entries(e))n.setAttribute(t,i)}function nr(n,e,t){if(n.cx==null||n.cy==null)return null;const i=me(n.cx,he),s=me(n.cy,pe),r="http://www.w3.org/2000/svg";if(n.kind==="ellipse"||n.rx!=null||n.ry!=null){const a=n.rx??n.r,l=n.ry??n.r;if(a==null||l==null)return null;const c=document.createElementNS(r,"ellipse");return c.setAttribute("cx",String(i)),c.setAttribute("cy",String(s)),c.setAttribute("rx",String(me(Number(a),he))),c.setAttribute("ry",String(me(Number(l),pe))),ct(c,lt(e,t)),c}if(n.r==null)return null;const o=document.createElementNS(r,"circle");return o.setAttribute("cx",String(i)),o.setAttribute("cy",String(s)),o.setAttribute("r",String(Ks(Number(n.r)))),ct(o,lt(e,t)),o}function rn(n,e,t){const i=ee(n.color,e),s=n.stroke_width!=null?_(n.stroke_width,t)??t:t;if(n.kind==="circle"||n.kind==="ellipse"||n.r!=null||n.rx!=null||n.ry!=null)return nr(n,i,s);const o=document.createElementNS("http://www.w3.org/2000/svg","path"),a=ee(n.path_d);if(a)return o.setAttribute("d",a),ct(o,lt(i,s)),o;const l=tr(n);return l.length<2?null:(o.setAttribute("d",ir(l,Ce(n.close))),ct(o,lt(i,s)),o)}function on(n,e){const t="http://www.w3.org/2000/svg",i=Tt(n.x,n.y),s=document.createElementNS(t,"text");return s.setAttribute("class","vnr-board-label"),s.setAttribute("x",String(i.bx)),s.setAttribute("y",String(i.by)),s.setAttribute("fill",n.color||e),s.setAttribute("font-size",String(n.font_size??28)),s.setAttribute("font-family","'Architects Daughter', 'Caveat', cursive, sans-serif"),s.setAttribute("text-anchor","middle"),s.setAttribute("dominant-baseline","hanging"),s.textContent=n.text,s}function sr(n,e){return e<=0?(n.style.opacity="1",Promise.resolve()):(n.style.opacity="0",n.getBoundingClientRect(),n.style.transition=`opacity ${Math.min(e,400)}ms ease-out`,n.style.opacity="1",Ut(Math.min(e,400)))}function pi(n,e,t){en(n),Ke(n);for(const i of e.strokes){const s=rn(i,t.strokeColor,t.strokeWidth);s&&n.appendChild(s)}for(const i of e.labels)n.appendChild(on(i,t.labelColor))}async function rr(n,e,t,i){en(n);let s=0,r=0;for(const o of e){if(i.isAborted())break;const a=rn(o,i.strokeColor,i.strokeWidth);a&&(n.appendChild(a),s+=1,i.animate&&i.durationMs>0&&(await kt(a,i.durationMs),i.gapMs>0&&await Ut(i.gapMs)))}for(const o of t){if(i.isAborted())break;const a=on(o,i.labelColor);n.appendChild(a),r+=1,i.animate&&i.durationMs>0&&await sr(a,i.durationMs)}return{strokesDrawn:s,labelsDrawn:r}}function Ve(){return{strokes:[],labels:[]}}function He(n){return n.toLowerCase().replace(/[^a-z0-9]/g,"_")}function or(n){const e=n==null?void 0:n.toLowerCase().trim();if(e){if(e==="tel")return"phone";if(e==="dropdown"||e==="drop_down"||e==="picklist"||e==="combobox")return"select";if(["text","textarea","select","radio","checkbox","email","phone","number","date"].includes(e))return e}}function an(n,e,t=[]){const i=or(e);return i||(t.length>0?"select":n.includes("email")?"email":n.includes("phone")?"phone":n.includes("date")&&!n.includes("update")?"date":"text")}function ar(n){return n?Array.isArray(n)?n.map(e=>{if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return{label:String(t.label??t.value??""),value:String(t.value??t.label??"")}}return String(e)}):typeof n=="string"?n.split(",").map(e=>e.trim()).filter(Boolean):[]:[]}function lr(n){const e=n.value??n.default??n.defaultValue??n.prefill;if(!(e==null||e===""))return String(e)}function yt(n){const e=String(n.label??n.name??n.title??n.field??n.id??n.key??"").trim();if(!e)return null;const t=String(n.id??n.key??He(e)),i=ar(n.options??n.choices??n.values),s=an(t,String(n.type??""),i);return{id:t,label:e,type:s,required:n.required!==!1,placeholder:n.placeholder?String(n.placeholder):void 0,value:lr(n),options:i}}function ui(n){const e=n.trim(),t=He(e);return{id:t,label:e,type:an(t),required:!0,placeholder:`Enter your ${e.toLowerCase()}`,options:[]}}function Ze(n){const e=n.trim();return e?e.startsWith("[")||e.startsWith("{")||e.startsWith('"')?!0:e.includes('"type"')||e.includes('"options"')||e.includes('"label"'):!1}function cr(n){let e=n.trim();for(let t=0;t<3&&typeof e=="string";t++){const i=e.trim();if(!Ze(i))break;try{e=JSON.parse(i)}catch{break}}return e}function $e(n){const e=cr(n);if(Array.isArray(e)||e&&typeof e=="object")return e;if(typeof e=="string"){const t=e.trim();if(t.startsWith("{")&&!t.startsWith("["))try{return JSON.parse(`[${t}]`)}catch{return null}}return null}function dr(n){return n.length<2?!1:n.every(e=>typeof e=="string"&&(e.includes('"')||e.includes("{")||e.includes("[")))}function hr(n){return $e(n.map(e=>e.trim()).join(","))}function Re(n){if(n==null)return[];if(typeof n=="string"){const e=n.trim();if(!e)return[];if(Ze(e)){const t=$e(e);return t!==null?Re(t):[]}return e.split(",").map(t=>t.trim()).filter(Boolean).map(ui)}if(Array.isArray(n)){if(n.length===1&&typeof n[0]=="string"){const t=n[0].trim();if(Ze(t)){const i=$e(t);if(i!==null)return Re(i)}}if(dr(n)){const t=hr(n);if(t!==null)return Re(t)}const e=[];for(const t of n){if(typeof t=="string"){const i=t.trim();if(i.startsWith("{"))try{const s=yt(JSON.parse(i));if(s){e.push(s);continue}}catch{}if(Ze(i)){const s=$e(i);if(s!==null){e.push(...Re(s));continue}}e.push(ui(t));continue}if(t&&typeof t=="object"){const i=yt(t);i&&e.push(i)}}return e}if(typeof n=="object"){const e=yt(n);return e?[e]:[]}return[]}const pr=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,ur=/^\+?[0-9\s\-().]{7,20}$/,gr=/^\d{4}-\d{2}-\d{2}$/;function ln(n,e){const t=n[e.id];return e.type==="checkbox"?t===!0||t==="true"?"true":"false":String(t??"").trim()}function mr(n,e){const t={};for(const i of n){const s=ln(e,i);if(i.type==="checkbox"){i.required&&s!=="true"&&(t[i.id]=`${i.label} is required`);continue}if(i.required&&!s){t[i.id]=`${i.label} is required`;continue}if(!s)continue;const r=fr(i.type,s,i.label);r&&(t[i.id]=r),(i.type==="select"||i.type==="radio")&&i.options.length>0&&(i.options.map(a=>typeof a=="string"?a:a.value).includes(s)||(t[i.id]=`Select a valid ${i.label}`))}return t}function fr(n,e,t){switch(n){case"email":return pr.test(e)?null:`Enter a valid ${t}`;case"phone":return ur.test(e)?null:`Enter a valid phone number for ${t}`;case"number":return Number.isFinite(Number(e))?null:`${t} must be a number`;case"date":return gr.test(e)?Number.isNaN(Date.parse(e))?`Enter a valid ${t}`:null:`${t} must be YYYY-MM-DD`;default:return null}}function vr(n,e){const t={};for(const i of n)t[i.id]=ln(e,i);return t}function cn(n){if(n==null)return{};if(typeof n=="string"){const e=n.trim();if(!e)return{};try{return cn(JSON.parse(e))}catch{return{}}}return typeof n=="object"&&!Array.isArray(n)?n:{}}function Ar(n,e){const t=n.prefill??n.values??n.initial_values??n.defaults??e.prefill??e.values??e.initial_values??e.defaults;return cn(t)}function Pt(n,e){if(n.type==="checkbox"){if(typeof e=="boolean")return e;const t=String(e).trim().toLowerCase();return t==="true"||t==="1"||t==="yes"||t==="on"}return String(e??"").trim()}function yr(n,e){const t=[n.id,n.label,n.label.toLowerCase()];for(const s of t){if(!(s in e))continue;const r=e[s];if(!(r==null||r===""))return Pt(n,r)}const i=He(n.label);for(const[s,r]of Object.entries(e))if(!(r==null||r==="")&&(s===i||He(s)===i||He(s)===n.id))return Pt(n,r)}function br(n,e={}){const t={};for(const i of n){if(i.value!==void 0){t[i.id]=Pt(i,i.value);continue}const s=yr(i,e);t[i.id]=s!==void 0?s:i.type==="checkbox"?!1:""}return t}const dt="vanira:board_abort";function bt(n){if(!n)return"";if(typeof n=="string"){if(n.includes("T")||!isNaN(Date.parse(n)))try{return new Date(n).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}catch{}return n}if(typeof n=="object"){const e=n.start||n.startTime||n.time||n.slot,t=n.end||n.endTime;if(e){let i=String(e),s=t?String(t):"";try{(i.includes("T")||!isNaN(Date.parse(i)))&&(i=new Date(i).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})),s&&(s.includes("T")||!isNaN(Date.parse(s)))&&(s=new Date(s).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}))}catch{}return s?`${i} - ${s}`:i}}return String(n)}function wr(n,e,t,i){let s=Date.UTC(n,e,t,0,0,0,0),r=Date.UTC(n,e,t,23,59,59,999);if(i)try{const o=new Date(Date.UTC(n,e,t,12,0,0)),l=new Intl.DateTimeFormat("en-US",{timeZone:i,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(o),c=C=>{var w;return(w=l.find(x=>x.type===C))==null?void 0:w.value},h=parseInt(c("year")||"0",10),d=parseInt(c("month")||"0",10)-1,g=parseInt(c("day")||"0",10),u=parseInt(c("hour")||"0",10),m=parseInt(c("minute")||"0",10),A=parseInt(c("second")||"0",10),v=u===24?0:u,b=Date.UTC(h,d,g,v,m,A,0)-o.getTime();s=Date.UTC(n,e,t,0,0,0,0)-b,r=Date.UTC(n,e,t,23,59,59,999)-b}catch{}return{start:new Date(s),end:new Date(r)}}function xr(n,e){if(!e){const t=-n.getTimezoneOffset(),i=t>=0?"+":"-",s=o=>String(o).padStart(2,"0"),r=o=>String(o).padStart(3,"0");return n.getFullYear()+"-"+s(n.getMonth()+1)+"-"+s(n.getDate())+"T"+s(n.getHours())+":"+s(n.getMinutes())+":"+s(n.getSeconds())+"."+r(n.getMilliseconds())+i+s(Math.floor(Math.abs(t)/60))+":"+s(Math.abs(t)%60)}try{const i=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(n),s=k=>{var S;return((S=i.find(I=>I.type===k))==null?void 0:S.value)||"0"},r=s("year"),o=s("month").padStart(2,"0"),a=s("day").padStart(2,"0");let l=parseInt(s("hour"),10);l===24&&(l=0);const c=String(l).padStart(2,"0"),h=s("minute").padStart(2,"0"),d=s("second").padStart(2,"0"),g=String(n.getMilliseconds()).padStart(3,"0"),u=parseInt(r,10),m=parseInt(o,10)-1,A=parseInt(a,10),f=Date.UTC(u,m,A,l,parseInt(h,10),parseInt(d,10),n.getMilliseconds())-n.getTime(),b=Math.round(f/6e4),C=b>=0?"+":"-",w=Math.abs(b),x=String(Math.floor(w/60)).padStart(2,"0"),E=String(w%60).padStart(2,"0");return`${r}-${o}-${a}T${c}:${h}:${d}.${g}${C}${x}:${E}`}catch{return n.toISOString()}}const Cr=`
|
|
2541
|
+
.vnr-overlay {
|
|
2542
|
+
position: fixed; inset: 0; z-index: 2147483647;
|
|
2543
|
+
background: rgba(0,0,0,0.45);
|
|
2544
|
+
backdrop-filter: blur(4px);
|
|
2545
|
+
display: flex; align-items: center; justify-content: center; padding: 16px;
|
|
2546
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
2547
|
+
box-sizing: border-box;
|
|
2548
|
+
}
|
|
2549
|
+
/* Whiteboard sits below vanira-convai widget (voice pill stays on top) */
|
|
2550
|
+
.vnr-overlay.vnr-whiteboard-overlay {
|
|
2551
|
+
z-index: 2147483640;
|
|
2552
|
+
background: transparent !important;
|
|
2553
|
+
backdrop-filter: none !important;
|
|
2554
|
+
-webkit-backdrop-filter: none !important;
|
|
2555
|
+
pointer-events: none;
|
|
2556
|
+
}
|
|
2557
|
+
.vnr-overlay.vnr-whiteboard-overlay .vnr-whiteboard-modal {
|
|
2558
|
+
pointer-events: auto;
|
|
2559
|
+
}
|
|
2560
|
+
.vnr-overlay.vnr-whiteboard-overlay-expanded {
|
|
2561
|
+
display: flex;
|
|
2562
|
+
align-items: center;
|
|
2563
|
+
justify-content: center;
|
|
2564
|
+
padding: 16px;
|
|
2565
|
+
padding-bottom: max(100px, calc(20px + env(safe-area-inset-bottom)));
|
|
2566
|
+
}
|
|
2567
|
+
.vnr-overlay.vnr-whiteboard-overlay-reduced {
|
|
2568
|
+
display: block;
|
|
2569
|
+
padding: 0;
|
|
2570
|
+
}
|
|
2571
|
+
.vnr-modal {
|
|
2572
|
+
background: #fff; border-radius: 16px;
|
|
2573
|
+
box-shadow: 0 25px 60px rgba(0,0,0,0.25);
|
|
2574
|
+
width: 100%; max-width: 400px; max-height: 88vh;
|
|
2575
|
+
overflow-y: auto; box-sizing: border-box;
|
|
2576
|
+
padding: 20px;
|
|
2577
|
+
}
|
|
2578
|
+
.vnr-close-btn {
|
|
2579
|
+
position: absolute; top: 16px; right: 16px;
|
|
2580
|
+
background: none; border: none; cursor: pointer;
|
|
2581
|
+
color: #d1d5db; line-height: 1; padding: 4px;
|
|
2582
|
+
}
|
|
2583
|
+
.vnr-close-btn:hover { color: #6b7280; }
|
|
2584
|
+
.vnr-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: #111; letter-spacing: -0.02em; }
|
|
2585
|
+
.vnr-reason {
|
|
2586
|
+
display: flex; align-items: flex-start; gap: 8px;
|
|
2587
|
+
padding: 10px 12px; background: #f9fafb; border: 1px solid #f3f4f6;
|
|
2588
|
+
border-radius: 10px; font-size: 13px; color: #6b7280; line-height: 1.5; margin-bottom: 14px;
|
|
2589
|
+
}
|
|
2590
|
+
.vnr-divider { border-top: 1px solid #f3f4f6; margin: 12px 0; }
|
|
2591
|
+
.vnr-section-label { font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
|
|
2592
|
+
/* Month nav */
|
|
2593
|
+
.vnr-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
|
|
2594
|
+
.vnr-nav-btn {
|
|
2595
|
+
width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
|
|
2596
|
+
border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; cursor: pointer; color: #6b7280;
|
|
2597
|
+
}
|
|
2598
|
+
.vnr-nav-btn:hover:not(:disabled) { border-color: #9ca3af; background: #f9fafb; }
|
|
2599
|
+
.vnr-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }
|
|
2600
|
+
.vnr-month-label { font-size: 14px; font-weight: 600; color: #111; }
|
|
2601
|
+
/* Calendar grid */
|
|
2602
|
+
.vnr-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
|
|
2603
|
+
.vnr-wd { text-align: center; font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 6px; }
|
|
2604
|
+
.vnr-day-btn {
|
|
2605
|
+
display: block; margin: 0 auto; width: 34px; height: 34px; border-radius: 8px;
|
|
2606
|
+
background: transparent; border: 1.5px solid transparent;
|
|
2607
|
+
font-size: 13px; font-weight: 500; color: #111; cursor: pointer;
|
|
2608
|
+
}
|
|
2609
|
+
.vnr-day-btn:hover:not(:disabled):not(.vnr-day-sel) { background: #f3f4f6; }
|
|
2610
|
+
.vnr-day-past { color: #d1d5db !important; cursor: not-allowed !important; }
|
|
2611
|
+
.vnr-day-today { border-color: #111 !important; }
|
|
2612
|
+
.vnr-day-sel { background: #111 !important; color: #fff !important; border-color: transparent !important; }
|
|
2613
|
+
/* Slots */
|
|
2614
|
+
.vnr-slots-grid { display: grid; gap: 6px; }
|
|
2615
|
+
.vnr-slot-btn {
|
|
2616
|
+
padding: 9px 6px; border-radius: 8px; border: 1px solid #e5e7eb;
|
|
2617
|
+
background: #fff; color: #374151; font-size: 12px; font-weight: 500; cursor: pointer; text-align: center;
|
|
2618
|
+
}
|
|
2619
|
+
.vnr-slot-btn:hover:not(.vnr-slot-sel) { border-color: #9ca3af; }
|
|
2620
|
+
.vnr-slot-sel { background: #111 !important; color: #fff !important; border-color: #111 !important; }
|
|
2621
|
+
/* Actions */
|
|
2622
|
+
.vnr-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f3f4f6; }
|
|
2623
|
+
.vnr-cancel-btn {
|
|
2624
|
+
flex: 1; padding: 10px; border-radius: 10px; background: #f3f4f6;
|
|
2625
|
+
border: none; color: #6b7280; font-size: 13px; font-weight: 500; cursor: pointer;
|
|
2626
|
+
}
|
|
2627
|
+
.vnr-confirm-btn {
|
|
2628
|
+
flex: 1; padding: 10px; border-radius: 10px; background: #111;
|
|
2629
|
+
border: none; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
|
|
2630
|
+
display: flex; align-items: center; justify-content: center; gap: 6px;
|
|
2631
|
+
}
|
|
2632
|
+
.vnr-confirm-btn:disabled { background: #e5e7eb !important; color: #9ca3af !important; cursor: not-allowed; }
|
|
2633
|
+
/* Form */
|
|
2634
|
+
.vnr-field-label { display: block; font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
|
|
2635
|
+
.vnr-input {
|
|
2636
|
+
width: 100%; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px;
|
|
2637
|
+
font-size: 13px; color: #111; background: #fff; box-sizing: border-box; outline: none;
|
|
2638
|
+
font-family: inherit;
|
|
2639
|
+
}
|
|
2640
|
+
.vnr-input:focus { border-color: #111; }
|
|
2641
|
+
.vnr-input-error { border-color: #dc2626 !important; }
|
|
2642
|
+
.vnr-textarea { min-height: 88px; resize: vertical; }
|
|
2643
|
+
.vnr-field-error { color: #dc2626; font-size: 12px; margin: 4px 0 0; }
|
|
2644
|
+
.vnr-radio-group, .vnr-checkbox-row { display: flex; flex-direction: column; gap: 8px; }
|
|
2645
|
+
.vnr-radio-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; cursor: pointer; }
|
|
2646
|
+
.vnr-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
|
|
2647
|
+
/* Spinner */
|
|
2648
|
+
@keyframes vnr-spin { to { transform: rotate(360deg); } }
|
|
2649
|
+
.vnr-spinner {
|
|
2650
|
+
width: 16px; height: 16px; border-radius: 50%;
|
|
2651
|
+
border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
|
|
2652
|
+
animation: vnr-spin 0.7s linear infinite;
|
|
2653
|
+
}
|
|
2654
|
+
.vnr-center { text-align: center; padding: 28px 0; color: #9ca3af; font-size: 13px; }
|
|
2655
|
+
/* Camera */
|
|
2656
|
+
.vnr-video-wrap { width:100%; aspect-ratio:4/3; background:#0f172a; border-radius:12px; overflow:hidden; position:relative; }
|
|
2657
|
+
.vnr-video-wrap video { width:100%; height:100%; object-fit:cover; display:block; }
|
|
2658
|
+
.vnr-live-badge { position:absolute; top:10px; left:10px; display:flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px; background:rgba(15,23,42,0.72); border:1px solid rgba(255,255,255,0.1); font-size:11px; font-weight:600; color:#f8fafc; text-transform:uppercase; letter-spacing:.04em; }
|
|
2659
|
+
.vnr-live-dot { width:7px; height:7px; border-radius:50%; background:#22c55e; flex-shrink:0; }
|
|
2660
|
+
/* Upload dropzone */
|
|
2661
|
+
.vnr-dropzone { border:2px dashed #cbd5e1; border-radius:14px; padding:32px 20px; text-align:center; cursor:pointer; background:#fafafa; transition:border-color 0.2s,background 0.2s; }
|
|
2662
|
+
.vnr-dropzone:hover, .vnr-dropzone.drag { border-color:#374151; background:#f3f4f6; }
|
|
2663
|
+
@keyframes vnr-click-pulse {
|
|
2664
|
+
0% { transform: scale(1); }
|
|
2665
|
+
25% { transform: scale(0.96); }
|
|
2666
|
+
50% { transform: scale(1.04); }
|
|
2667
|
+
100% { transform: scale(1); }
|
|
2668
|
+
}
|
|
2669
|
+
.vnr-click-pulse {
|
|
2670
|
+
animation: vnr-click-pulse 0.45s ease-out;
|
|
2671
|
+
outline: 2px solid #6366f1 !important;
|
|
2672
|
+
outline-offset: 3px !important;
|
|
2673
|
+
}
|
|
2674
|
+
/* Whiteboard */
|
|
2675
|
+
.vnr-whiteboard-modal {
|
|
2676
|
+
display: flex !important;
|
|
2677
|
+
flex-direction: column !important;
|
|
2678
|
+
padding: 0 !important;
|
|
2679
|
+
overflow: hidden !important;
|
|
2680
|
+
flex-shrink: 0;
|
|
2681
|
+
box-sizing: border-box;
|
|
2682
|
+
transition: width 0.2s ease, max-width 0.2s ease, height 0.2s ease, max-height 0.2s ease;
|
|
2683
|
+
}
|
|
2684
|
+
.vnr-overlay.vnr-whiteboard-overlay-reduced .vnr-whiteboard-modal {
|
|
2685
|
+
box-shadow: 0 20px 52px rgba(0,0,0,0.6) !important;
|
|
2686
|
+
}
|
|
2687
|
+
.vnr-overlay.vnr-whiteboard-overlay-hidden {
|
|
2688
|
+
display: none !important;
|
|
2689
|
+
}
|
|
2690
|
+
.vnr-whiteboard-header {
|
|
2691
|
+
flex: 0 0 auto;
|
|
2692
|
+
display: flex;
|
|
2693
|
+
align-items: center;
|
|
2694
|
+
justify-content: flex-end;
|
|
2695
|
+
gap: 6px;
|
|
2696
|
+
padding: 8px 10px;
|
|
2697
|
+
background: linear-gradient(180deg, #1e1e24 0%, #16161c 100%);
|
|
2698
|
+
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
2699
|
+
z-index: 30;
|
|
2700
|
+
}
|
|
2701
|
+
.vnr-overlay.vnr-whiteboard-overlay-reduced .vnr-whiteboard-header {
|
|
2702
|
+
cursor: grab;
|
|
2703
|
+
user-select: none;
|
|
2704
|
+
touch-action: none;
|
|
2705
|
+
}
|
|
2706
|
+
.vnr-overlay.vnr-whiteboard-overlay-reduced .vnr-whiteboard-header.is-dragging {
|
|
2707
|
+
cursor: grabbing;
|
|
2708
|
+
}
|
|
2709
|
+
.vnr-whiteboard-action-btn {
|
|
2710
|
+
width: 32px;
|
|
2711
|
+
height: 32px;
|
|
2712
|
+
padding: 0;
|
|
2713
|
+
display: inline-flex;
|
|
2714
|
+
align-items: center;
|
|
2715
|
+
justify-content: center;
|
|
2716
|
+
border-radius: 8px;
|
|
2717
|
+
border: 1px solid rgba(255,255,255,0.15);
|
|
2718
|
+
background: rgba(255,255,255,0.08);
|
|
2719
|
+
color: #e2e8f0;
|
|
2720
|
+
cursor: pointer;
|
|
2721
|
+
font-family: inherit;
|
|
2722
|
+
line-height: 0;
|
|
2723
|
+
}
|
|
2724
|
+
.vnr-whiteboard-action-btn:hover { background: rgba(255,255,255,0.14); }
|
|
2725
|
+
.vnr-whiteboard-action-btn.is-close {
|
|
2726
|
+
border-color: rgba(248,113,113,0.35);
|
|
2727
|
+
color: #fecaca;
|
|
2728
|
+
}
|
|
2729
|
+
.vnr-whiteboard-action-btn.is-close:hover { background: rgba(239,68,68,0.2); }
|
|
2730
|
+
`,Er='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="M14 10l7-7"/><path d="M3 21l7-7"/></svg>',kr='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>',Sr='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',Br="vanira:board-size",Ir={small:{maxWidth:"min(440px, 94vw)",height:"min(340px, 58vh)"},medium:{maxWidth:"min(680px, 96vw)",height:"min(520px, 78vh)"},large:{maxWidth:"min(920px, 98vw)",height:"min(680px, 88vh)"}};function Mr(){try{const n=localStorage.getItem(Br);if(n==="small"||n==="medium"||n==="large")return n}catch{}return"medium"}function gi(n,e){return e===1?n:n.replace(/(\d+(?:\.\d+)?)(px|vw|vh)/g,(t,i,s)=>{const r=Number(i)*e;return`${s==="px"?Math.round(r):r}${s}`})}class dn{constructor(e){p(this,"overlay",null);p(this,"styleInjected",!1);p(this,"chalkboardContent","");p(this,"boardChapterTitle","");p(this,"boardDrawInProgress",!1);p(this,"boardInk",Ve());p(this,"calViewYear",0);p(this,"calViewMonth",0);p(this,"calSelectedTs",null);p(this,"calSelectedTime",null);p(this,"lvSessionId",null);p(this,"lvStream",null);p(this,"lvCaptureInterval",null);p(this,"lvAutoStopTimeout",null);p(this,"lvFrameSeq",0);p(this,"lvVideo",null);p(this,"lvCanvas",null);p(this,"lvPip",null);p(this,"lvPermissionBanner",null);p(this,"lsSessionId",null);p(this,"lsStream",null);p(this,"lsCaptureInterval",null);p(this,"lsAutoStopTimeout",null);p(this,"lsFrameSeq",0);p(this,"lsVideo",null);p(this,"lsCanvas",null);p(this,"lsPip",null);p(this,"lsPermissionBanner",null);p(this,"captureActive",!1);p(this,"captureStream",null);p(this,"captureLivenessInterval",null);p(this,"activePresetGeneration",0);p(this,"boardQueue",[]);p(this,"boardQueueActive",null);p(this,"boardAnimTimer",null);p(this,"settledBoardToolCallIds",new Set);p(this,"activeNavigate",null);p(this,"settledNavigateToolCallIds",new Set);p(this,"activeModalPreset",null);p(this,"boardClient",null);p(this,"boardTurnMonitor",new Vs(()=>this.buildBoardVerification(),()=>this.boardQueueActive!==null||this.boardQueue.length>0||this.boardDrawInProgress||this.activeBoardProgress!==null));p(this,"activeBoardProgress",null);p(this,"boardSizePreset",Mr());p(this,"boardViewMode","expanded");p(this,"boardDragPosition",null);p(this,"boardDragWiredModal",null)}resetChalkboard(){this.chalkboardContent="",this.boardChapterTitle=""}resetBoardSession(){this.boardTurnMonitor.stop(),this.boardDragPosition=null,this.boardDragWiredModal=null,this.activePresetGeneration++,mt(!1),this.clearBoardAnimTimer(),this.boardQueue=[],this.boardQueueActive=null,this.settledBoardToolCallIds.clear(),this.activeBoardProgress=null,this.boardClient=null,this.chalkboardContent="",this.boardChapterTitle="",this.boardDrawInProgress=!1,this.boardInk=Ve(),this.closeBoardUi()}getChalkboardContent(){return this.chalkboardContent}hasActiveBoardSession(){return!!document.querySelector(".vnr-whiteboard-modal")||this.chalkboardContent.length>0||this.boardInk.strokes.length>0||this.boardInk.labels.length>0||this.boardQueue.length>0||this.boardQueueActive!==null}syncChalkboardNotes(){const e=document.querySelector(".vnr-whiteboard-textarea");e&&(e.value.length>this.chalkboardContent.length?this.chalkboardContent=e.value:this.chalkboardContent!==e.value&&(e.value=this.chalkboardContent,e.scrollTop=e.scrollHeight))}buildBoardVerification(){this.syncChalkboardNotes();const e=this.chalkboardContent,t=this.boardInk.strokes.length>0;return{notes_char_count:e.length,notes_preview:e.slice(0,200)||null,has_notes_on_board:e.length>0,has_diagram_geometry:t,strokes_on_board:this.boardInk.strokes.length,labels_on_board:this.boardInk.labels.length,chapter_title:this.boardChapterTitle||null,verification_hint:"Do NOT tell the student notes or diagrams are visible unless has_notes_on_board or has_diagram_geometry is true in this tool result."}}splitChapterHeading(e){const t=e.trim(),i=t.split(`
|
|
2731
|
+
`);if(!/^chapter\s*:/i.test(i[0]??""))return{chapterTitle:null,body:t};const s=i[0].replace(/^chapter\s*:\s*/i,"").trim()||i[0].trim(),r=i.slice(1).join(`
|
|
2732
|
+
`).trim();return{chapterTitle:s,body:r}}getBoardSnapshot(){this.syncChalkboardNotes();const e=this.boardInk.strokes.length>0||this.boardInk.labels.length>0,t=this.chalkboardContent;return{board_layout:e?"diagram_top_notes_bottom":"notes_full",has_diagram:e,strokes_on_board:this.boardInk.strokes.length,labels_on_board:this.boardInk.labels.length,board_size:{width:he,height:pe},coordinate_system:"board_normalized_or_pixels",notes_content:t,notes_char_count:t.length,chapter_title:this.boardChapterTitle||null,agent_hint:e?"TOP = diagram (800×500), BOTTOM = notes. strokes:[{points,close}] — right △: [[0.15,0.25],[0.15,0.75],[0.55,0.75]]. labels below (y≥0.78). clear_old_diagrams_on_board:true wipes.":'draw_on_board: strokes:[{points:[[0.15,0.25],[0.15,0.75],[0.55,0.75]],close:true}] for right triangle. labels:[{x:0.35,y:0.82,text:"..."}]. NOT bare points string or centered apex.'}}syncDiagramLayer(e){pi(e,this.boardInk,{strokeColor:"#ffffff",labelColor:"#4A9EFF",strokeWidth:6})}getBoardProgressSnapshot(){const e=this.activeBoardProgress;if(!e||e.plannedUnits<=0)return null;const t=this.chalkboardContent,i=e.mode==="type"?t.slice(e.textAtStart.length):t;return{write_progress_pct:Math.min(100,Math.round(e.unitsDone/e.plannedUnits*100)),characters_written:e.unitsDone,characters_planned:e.plannedUnits,partial_text_this_command:i}}getNavigateTerminalResult(e,t,i){return{status:e,reason:t||(e==="interrupted"?"Server interrupted":"Navigation cancelled"),preset_id:y.Navigate,navigated_to:i,target_url:i}}completeNavigate(e={}){const t=this.activeNavigate;if(!t||t.settled)return;const i=t.ctx.toolCallId;i&&this.settledNavigateToolCallIds.has(i)||(t.settled=!0,i&&this.settledNavigateToolCallIds.add(i),this.activeNavigate=null,t.onComplete({status:"success",preset_id:y.Navigate,navigated_to:t.targetUrl,target_url:t.targetUrl,...e}))}cancelNavigate(e,t){const i=this.activeNavigate;if(!i||i.settled)return;const s=i.ctx.toolCallId;s&&this.settledNavigateToolCallIds.has(s)||(i.settled=!0,s&&this.settledNavigateToolCallIds.add(s),this.activeNavigate=null,i.onCancel(e,{status:t}))}bindActiveModalPreset(e,t,i,s){this.activeModalPreset={ctx:e,presetId:t,onComplete:i,onCancel:s}}clearActiveModalPreset(){this.activeModalPreset&&(this.activeModalPreset.settled=!0,this.activeModalPreset=null)}cancelActiveModalPreset(e,t){const i=this.activeModalPreset;!i||i.settled||(i.settled=!0,this.activeModalPreset=null,this.overlay&&(this.overlay.remove(),this.overlay=null),this.stopCaptureCamera(),i.onCancel(e,{status:t}))}getBoardTerminalResult(e,t,i){const s={status:e,reason:t||(e==="interrupted"?"Server interrupted":"User dismissed"),...i?{preset_id:i}:{}};if(!i||!xt(i))return s;const r=this.chalkboardContent,o=this.getBoardProgressSnapshot();return{...s,text_written:r,whiteboard_content:r,board_snapshot:this.getBoardSnapshot(),...o||{}}}flushBoardContext(e){if(this.boardClient)try{typeof this.boardClient.sendContextUpdate=="function"?this.boardClient.sendContextUpdate(e):typeof this.boardClient.updateContext=="function"&&this.boardClient.updateContext(e)}catch{}}clearActiveBoardProgress(){this.activeBoardProgress=null}syncBoardProgressUnits(e){this.activeBoardProgress&&(this.activeBoardProgress.unitsDone=e)}buildBoardContextPayload(e,t,i){const s=this.activeBoardProgress,r=(s==null?void 0:s.ctx.toolCallId)===e.toolCallId;let o,a,l,c;r&&s&&(a=s.unitsDone,l=s.plannedUnits,o=s.plannedUnits>0?Math.min(100,Math.round(s.unitsDone/s.plannedUnits*100)):100,s.mode==="type"?c=t.slice(s.textAtStart.length):c=t);const h={ui_state:"whiteboard_active",tool_status:"interrupted",visible_preset:e.presetId,tool_call_id:e.toolCallId,interrupted:!0,interrupt_reason:i||"Server interrupted",whiteboard_content:t};if(o!==void 0){h.write_progress_pct=o,h.characters_written=a,h.characters_planned=l,h.partial_text_this_command=c??"";const d=(s==null?void 0:s.mode)==="erase"?"erase":"write",g=(c??"").length>120?`${(c??"").slice(0,120)}…`:c??"",u=(s==null?void 0:s.mode)==="erase"?"The board already reflects this partial erase — continue from here; do not repeat earlier steps.":"The board already contains this content — continue typing from here; do not repeat what is already on the board.";h.message=`Whiteboard ${d} interrupted at ${o}% (${a}/${l} characters this command). Partial text this turn: "${g}". `+u}return h}sendBoardContextUpdate(e,t,i){this.flushBoardContext(this.buildBoardContextPayload(e,t,i))}handle(e,t,i,s){const r=e.data||e;let o={};const a=r.arguments||r.args;if(typeof a=="string")try{o=JSON.parse(a)}catch{o={}}else a&&typeof a=="object"&&(o=a);const l=r.client_fields||{},c=Be(l,a,r.name||r.tool_name);if(!c||!X(c))return!1;const h={...o,...l},d={toolCallId:r.tool_call_id||r.call_id||"",presetId:c,clientFields:h,args:o,toolCall:r};this.injectStyles();const g=!!document.querySelector(".vnr-whiteboard-modal");switch(xt(c)?g||this.dismissNonBoardUi():ki(c)||In(c)||this.dismiss(),c){case y.Calendar:return this.renderCalendar(d,t,i),!0;case y.Form:return this.renderForm(d,t,i),!0;case y.Camera:return this.renderCamera(d,t,i,s),!0;case y.Upload:return this.renderUpload(d,t,i,s),!0;case y.ClipRegion:return this.renderClipRegion(d,t,i,s),!0;case y.TabScreenshot:return this.renderTabScreenshot(d,t,i,s),!0;case y.Navigate:return this.renderNavigate(d,t,i),!0;case y.HighlightElement:return this.renderHighlight(d,t,i),!0;case y.ClickElement:return this.renderClickElement(d,t,i),!0;case y.SelectOption:return this.renderSelectOption(d,t,i),!0;case y.SetDate:return this.renderSetDate(d,t,i),!0;case y.TypeText:return this.enqueueBoardCommand({ctx:d,presetId:y.TypeText,onComplete:t,onCancel:i},s),!0;case y.EraseText:return this.enqueueBoardCommand({ctx:d,presetId:y.EraseText,onComplete:t,onCancel:i},s),!0;case y.Draw:return this.enqueueBoardCommand({ctx:d,presetId:y.Draw,onComplete:t,onCancel:i},s),!0;case y.EraseDraw:return this.enqueueBoardCommand({ctx:d,presetId:y.EraseDraw,onComplete:t,onCancel:i},s),!0;case y.LiveVision:return this.handleOpenLiveCamera(h,s,d.toolCallId),t({status:"success",preset_id:y.LiveVision,message:"Live camera session started"}),!0;case y.CloseLiveCamera:return this.handleCloseLiveCamera(s),t({status:"success",preset_id:y.CloseLiveCamera,message:"Live camera stopped"}),!0;case y.LiveScreen:return this.handleOpenLiveScreen(h,s,d.toolCallId),t({status:"success",preset_id:y.LiveScreen,message:"Live screen share started"}),!0;case y.CloseLiveScreen:return this.handleCloseLiveScreen(s),t({status:"success",preset_id:y.CloseLiveScreen,message:"Live screen share stopped"}),!0;case y.ScreenInk:return this.renderScreenInk(d,t,i),!0;case y.ScreenCursor:return this.renderScreenCursor(d,t,i),!0;case y.ScreenClick:return this.renderScreenClick(d,t,i),!0;case y.ClearScreenOverlay:return ot(),t({status:"success",preset_id:y.ClearScreenOverlay,message:"Screen overlay cleared"}),!0;case y.PageScan:return Us(d,t,i,s),!0;case y.PointAt:return Os(d,t,i),!0;case y.OutlineTargets:return Ys(d,t,i),!0;case y.ClearGuide:return js(d,t),!0;default:return!1}}abortBoardTools(e="Interrupted",t){const i=this.activeNavigate;i&&!i.settled&&(!t||i.ctx.toolCallId===t)&&this.cancelNavigate(e,"interrupted");const s=this.activeModalPreset;s&&!s.settled&&(!t||s.ctx.toolCallId===t)&&this.cancelActiveModalPreset(e,"interrupted");const r=a=>!t||a.ctx.toolCallId===t;if(this.boardQueueActive&&r(this.boardQueueActive)||this.boardQueue.some(r)){if(this.clearBoardAnimTimer(),this.activePresetGeneration++,this.boardQueueActive&&r(this.boardQueueActive)){const a=this.boardQueueActive;this.boardQueueActive=null,this.settleBoardCancel(a,e,"interrupted")}this.boardQueue=this.boardQueue.filter(a=>r(a)?(this.settleBoardCancel(a,e,"interrupted"),!1):!0)}}dismiss(){this.activeNavigate&&!this.activeNavigate.settled&&this.cancelNavigate("Session ended","interrupted"),this.activeModalPreset=null,this.resetBoardSession(),this.stopCaptureCamera(),this.handleCloseLiveCamera(null),this.handleCloseLiveScreen(null),ft(),this.overlay&&(this.overlay.remove(),this.overlay=null)}teardownSession(){this.dismiss(),ot()}enqueueBoardCommand(e,t){var s;t&&(this.boardClient=t),this.boardClient&&document.querySelector(".vnr-whiteboard-modal")&&this.ensureBoardTurnMonitor();const i=e.ctx.toolCallId;i&&(this.settledBoardToolCallIds.has(i)||((s=this.boardQueueActive)==null?void 0:s.ctx.toolCallId)===i||this.boardQueue.some(r=>r.ctx.toolCallId===i))||(this.boardQueue.push(e),Z("Board:Queue",`Enqueued ${e.presetId}`,{pending:this.boardQueue.length,toolCallId:e.ctx.toolCallId}),this.processBoardQueue())}processBoardQueue(){if(this.boardQueueActive||this.boardQueue.length===0)return;const e=this.boardQueue.shift();this.boardQueueActive=e,Z("Board:Queue",`Running ${e.presetId}`,{toolCallId:e.ctx.toolCallId});const t=(r,o)=>{if(this.boardQueueActive===e){if(e.settled||e.aborted){this.boardQueueActive=null;return}this.boardQueueActive=null,o!==void 0?this.settleBoardCancel(e,o):this.settleBoardComplete(e,r||{}),this.processBoardQueue()}},i=r=>t(r),s=r=>{this.activePresetGeneration++,t(null,r||"Cancelled"),!this.boardQueueActive&&this.boardQueue.length===0&&this.closeBoardUi()};e.presetId===y.TypeText?this.renderTypeText(e.ctx,i,s):e.presetId===y.Draw?this.renderDrawShapes(e.ctx,i,s):e.presetId===y.EraseDraw?this.renderEraseDrawingBoard(e.ctx,i,s):this.renderEraseText(e.ctx,i,s)}closeBoardUi(){this.boardTurnMonitor.stop(),this.boardViewMode="expanded",mt(!1),this.dismissWhiteboard(),this.overlay&&(!document.body.contains(this.overlay)||!this.overlay.childElementCount)&&(this.overlay.remove(),this.overlay=null)}getBoardOverlay(){const e=document.querySelector(".vnr-whiteboard-modal");return(e==null?void 0:e.closest(".vnr-overlay"))??this.overlay}applyBoardLayoutMode(e,t){const i=e??this.getBoardOverlay(),s=t??document.querySelector(".vnr-whiteboard-modal");if(!i||!s)return;const r=this.boardViewMode==="reduced";i.classList.remove("vnr-whiteboard-overlay-hidden"),i.classList.add("vnr-whiteboard-overlay"),i.classList.toggle("vnr-whiteboard-overlay-reduced",r),i.classList.toggle("vnr-whiteboard-overlay-expanded",!r),this.syncBoardResizeButton(s.querySelector(".vnr-whiteboard-resize-btn")),mt(!0,r),this.syncBoardDragLayout(s),this.ensureBoardTurnMonitor()}clearBoardDragStyles(e){e.style.removeProperty("position"),e.style.removeProperty("left"),e.style.removeProperty("top"),e.style.removeProperty("right"),e.style.removeProperty("bottom"),e.style.removeProperty("margin"),e.style.removeProperty("transform")}clampBoardDragPosition(e,t,i){const r=Math.max(8,window.innerWidth-e.offsetWidth-8),o=Math.max(8,window.innerHeight-e.offsetHeight-8);return{x:Math.min(r,Math.max(8,t)),y:Math.min(o,Math.max(8,i))}}applyBoardDragPosition(e,t,i){const s=this.clampBoardDragPosition(e,t,i);e.style.setProperty("position","fixed","important"),e.style.setProperty("left",`${s.x}px`,"important"),e.style.setProperty("top",`${s.y}px`,"important"),e.style.setProperty("right","auto","important"),e.style.setProperty("bottom","auto","important"),e.style.setProperty("margin","0","important"),e.style.setProperty("transform","none","important"),this.boardDragPosition=s}defaultReducedBoardPosition(e){const i=Math.max(96,20+(typeof window<"u"?Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("env(safe-area-inset-bottom)")||"0",10):0));return this.clampBoardDragPosition(e,window.innerWidth-e.offsetWidth-16,window.innerHeight-e.offsetHeight-i)}syncBoardDragLayout(e){if(this.boardViewMode==="reduced"){const t=this.boardDragPosition??this.defaultReducedBoardPosition(e);this.applyBoardDragPosition(e,t.x,t.y)}else this.clearBoardDragStyles(e)}wireBoardDrag(e,t){if(this.boardDragWiredModal===t)return;this.boardDragWiredModal=t;let i=!1,s=0,r=0,o=0,a=0;const l=d=>{if(this.boardViewMode!=="reduced"||d.target.closest("button"))return;i=!0,e.setPointerCapture(d.pointerId);const g=t.getBoundingClientRect();s=d.clientX,r=d.clientY,o=g.left,a=g.top,e.classList.add("is-dragging"),d.preventDefault()},c=d=>{i&&this.applyBoardDragPosition(t,o+(d.clientX-s),a+(d.clientY-r))},h=d=>{i&&(i=!1,e.classList.remove("is-dragging"),e.hasPointerCapture(d.pointerId)&&e.releasePointerCapture(d.pointerId))};e.addEventListener("pointerdown",l),e.addEventListener("pointermove",c),e.addEventListener("pointerup",h),e.addEventListener("pointercancel",h)}ensureBoardTurnMonitor(){this.boardClient&&this.boardTurnMonitor.start(e=>this.flushBoardContext(e))}revealBoardUi(e){this.applyBoardLayoutMode(this.getBoardOverlay(),e)}dismissNonBoardUi(){this.stopCaptureCamera(),this.handleCloseLiveCamera(null),this.handleCloseLiveScreen(null),ft(),this.overlay&&!this.overlay.querySelector(".vnr-whiteboard-modal")&&(this.overlay.remove(),this.overlay=null)}settleBoardCancel(e,t,i="cancelled"){if(e.settled)return;e.aborted=!0,e.settled=!0;const s=e.ctx.toolCallId;s&&this.settledBoardToolCallIds.add(s);const r=this.chalkboardContent;i==="interrupted"&&this.sendBoardContextUpdate(e.ctx,r,t),e.onCancel(t,{status:i}),this.clearActiveBoardProgress()}settleBoardComplete(e,t){if(e.settled||e.aborted)return;e.settled=!0;const i=e.ctx.toolCallId;i&&this.settledBoardToolCallIds.add(i);const s=this.chalkboardContent;e.onComplete({status:"success",preset_id:e.presetId,tool_call_id:e.ctx.toolCallId,text_written:s,whiteboard_content:s,...this.buildBoardVerification(),...t}),this.clearActiveBoardProgress()}clearBoardAnimTimer(){this.boardAnimTimer&&(clearTimeout(this.boardAnimTimer),this.boardAnimTimer=null)}scheduleBoardAnim(e,t){this.clearBoardAnimTimer(),this.boardAnimTimer=setTimeout(()=>{this.boardAnimTimer=null,e()},t)}dismissWhiteboard(){document.querySelectorAll(".vnr-whiteboard-modal").forEach(e=>{var t;(t=e.closest(".vnr-overlay"))==null||t.remove()}),this.overlay&&!document.body.contains(this.overlay)&&(this.overlay=null)}stopCaptureCamera(){var e;this.captureActive=!1,this.captureLivenessInterval&&(clearInterval(this.captureLivenessInterval),this.captureLivenessInterval=null),(e=this.captureStream)==null||e.getTracks().forEach(t=>t.stop()),this.captureStream=null}getBrowserPermissionHint(){const e=navigator.userAgent;return/iPhone|iPad/i.test(e)?"Open Settings → Safari → Camera and allow access for this site.":/Android/i.test(e)?"Tap the lock icon in the address bar → Permissions → Camera → Allow.":"Click the camera icon in your browser's address bar and allow access."}fillCameraPermissionPrompt(e,t){e.style.display="flex",e.innerHTML=`
|
|
2733
|
+
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;text-align:center;width:100%;height:100%;box-sizing:border-box">
|
|
2734
|
+
<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="#f87171" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
2735
|
+
<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/>
|
|
2736
|
+
<line x1="1" y1="1" x2="23" y2="23"/>
|
|
2737
|
+
</svg>
|
|
2738
|
+
<p style="margin:0;font-size:14px;font-weight:600;color:#f87171">Camera access blocked</p>
|
|
2739
|
+
<p style="margin:0;font-size:12px;color:#94a3b8;line-height:1.5;max-width:300px">
|
|
2740
|
+
Allow camera access to continue. ${this.getBrowserPermissionHint()}
|
|
2741
|
+
</p>
|
|
2742
|
+
<div style="display:flex;gap:10px;margin-top:4px;flex-wrap:wrap;justify-content:center">
|
|
2743
|
+
<button type="button" id="vnr-cam-perm-retry" class="vnr-confirm-btn" style="padding:10px 18px">Try Again</button>
|
|
2744
|
+
${t.onDismiss?'<button type="button" id="vnr-cam-perm-dismiss" class="vnr-cancel-btn">Cancel</button>':""}
|
|
2745
|
+
</div>
|
|
2746
|
+
</div>
|
|
2747
|
+
`,e.querySelector("#vnr-cam-perm-retry").addEventListener("click",t.onRetry),t.onDismiss&&e.querySelector("#vnr-cam-perm-dismiss").addEventListener("click",t.onDismiss)}notifyCameraPermissionDenied(e,t){const i="Camera permission denied. Please allow camera access in your browser settings.";if(e!=null&&e.sendToolError&&t)try{e.sendToolError(t,i)}catch{}}showLiveCameraPermissionBanner(e,t){var s;(s=this.lvPermissionBanner)==null||s.remove();const i=document.createElement("div");i.id="vnr-live-cam-perm-banner",i.style.cssText=["position:fixed","bottom:24px","left:50%","transform:translateX(-50%)","z-index:2147483647","max-width:360px","width:calc(100% - 32px)","padding:16px 18px","border-radius:16px","background:#0f172a","border:1px solid rgba(248,113,113,0.35)","box-shadow:0 12px 32px rgba(0,0,0,0.35)","font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"].join(";"),i.innerHTML=`
|
|
2748
|
+
<p style="margin:0 0 6px;font-size:13px;font-weight:700;color:#f87171">Camera access blocked</p>
|
|
2749
|
+
<p style="margin:0 0 12px;font-size:12px;color:#94a3b8;line-height:1.5">${this.getBrowserPermissionHint()}</p>
|
|
2750
|
+
<div style="display:flex;gap:8px">
|
|
2751
|
+
<button type="button" id="vnr-lv-perm-retry" style="flex:1;padding:9px 14px;border:none;border-radius:10px;background:#6366f1;color:#fff;font-size:13px;font-weight:600;cursor:pointer">Try Again</button>
|
|
2752
|
+
<button type="button" id="vnr-lv-perm-dismiss" style="padding:9px 14px;border:1px solid rgba(255,255,255,0.15);border-radius:10px;background:transparent;color:#e2e8f0;font-size:13px;font-weight:600;cursor:pointer">Dismiss</button>
|
|
2753
|
+
</div>
|
|
2754
|
+
`,i.querySelector("#vnr-lv-perm-retry").addEventListener("click",e),i.querySelector("#vnr-lv-perm-dismiss").addEventListener("click",t),document.body.appendChild(i),this.lvPermissionBanner=i}async sendClientEvent(e,t,i){if(typeof(e==null?void 0:e.sendEventWhenReady)=="function"){await e.sendEventWhenReady(t,i);return}if(e!=null&&e.sendEvent){e.sendEvent(t,i);return}}handleOpenLiveCamera(e,t,i){this.handleCloseLiveScreen(t),this.handleCloseLiveCamera(t);const s=e.scope??"until_call_end",r=Math.min(Number(e.target_fps??1),Number(e.max_fps??3)),o=Number(e.max_width??640),a=e.reason??"camera_capture",l=Number(e.duration_sec??0),c=e.facing_mode??"environment",h=e.show_preview!==!1&&e.show_preview!=="false",d=`lv_${crypto.randomUUID()}`;this.lvSessionId=d,this.lvFrameSeq=0;const g=document.createElement("video");g.autoplay=!0,g.playsInline=!0,g.muted=!0,g.style.display="none",document.body.appendChild(g),this.lvVideo=g;const u=document.createElement("canvas");u.style.display="none",document.body.appendChild(u),this.lvCanvas=u,h&&(this.lvPip=this.createLivePip(c,()=>this.handleCloseLiveCamera(t))),(()=>{navigator.mediaDevices.getUserMedia({video:{facingMode:c,width:{ideal:o*2}}}).then(async A=>{var f;if(!this.lvSessionId){A.getTracks().forEach(b=>b.stop());return}if((f=this.lvPermissionBanner)==null||f.remove(),this.lvPermissionBanner=null,this.lvStream=A,g.srcObject=A,this.lvPip){const b=this.lvPip.querySelector("video");b&&(b.srcObject=A)}await this.sendClientEvent(t,"client_live_camera_started",{data:{session_id:d,scope:s,...s==="timed"&&l>0?{duration_sec:l}:{},reason:a,target_fps:r}});const v=Math.round(1e3/r);this.lvCaptureInterval=setInterval(()=>{this.captureAndSendFrame(t,d,o,a)},v),s==="timed"&&l>0&&(this.lvAutoStopTimeout=setTimeout(()=>{this.handleCloseLiveCamera(t)},l*1e3))}).catch(A=>{var v,f;this.lvSessionId=null,(v=this.lvStream)==null||v.getTracks().forEach(b=>b.stop()),this.lvStream=null,(f=this.lvPip)==null||f.remove(),this.lvPip=null,g.remove(),this.lvVideo=null,u.remove(),this.lvCanvas=null,this.notifyCameraPermissionDenied(t,i),this.showLiveCameraPermissionBanner(()=>this.handleOpenLiveCamera(e,t,i),()=>{var b;(b=this.lvPermissionBanner)==null||b.remove(),this.lvPermissionBanner=null})})})()}handleCloseLiveCamera(e){var i,s,r,o,a;const t=this.lvSessionId;this.lvSessionId=null,this.lvCaptureInterval&&(clearInterval(this.lvCaptureInterval),this.lvCaptureInterval=null),this.lvAutoStopTimeout&&(clearTimeout(this.lvAutoStopTimeout),this.lvAutoStopTimeout=null),(i=this.lvStream)==null||i.getTracks().forEach(l=>l.stop()),this.lvStream=null,(s=this.lvVideo)==null||s.remove(),this.lvVideo=null,(r=this.lvCanvas)==null||r.remove(),this.lvCanvas=null,(o=this.lvPip)==null||o.remove(),this.lvPip=null,(a=this.lvPermissionBanner)==null||a.remove(),this.lvPermissionBanner=null,t&&e&&this.sendClientEvent(e,"client_live_camera_stopped",{data:{session_id:t}})}classifyLiveScreenShareFailure(e){if(e instanceof DOMException){if(e.name==="AbortError")return"cancelled";if(e.name==="NotAllowedError"){const i=(e.message||"").toLowerCase();return i.includes("dismiss")||i.includes("cancel")||i.includes("abort")?"cancelled":"denied"}}const t=e instanceof Error?(e.message||"").toLowerCase():"";return t.includes("cancel")||t.includes("dismiss")||t.includes("abort")?"cancelled":"denied"}emitLiveScreenShareFailure(e,t,i,s,r,o){const a=r instanceof DOMException||r instanceof Error?r.name:void 0,l=o??(s==="cancelled"?"User cancelled screen share without selecting a source.":"Screen share permission was not granted."),c=s==="cancelled"?"client_live_screen_cancelled":"client_live_screen_denied";if(e!=null&&e.sendEvent&&e.sendEvent(c,{data:{...t?{session_id:t}:{},...i?{tool_call_id:i}:{},message:l,...a?{error_name:a}:{}}}),e!=null&&e.sendToolError&&i)try{e.sendToolError(i,l)}catch{}}notifyScreenShareUnavailable(e,t){this.emitLiveScreenShareFailure(e,null,t,"denied",void 0,"Screen sharing is not supported in this browser or device.")}showLiveScreenPermissionBanner(e,t,i){var a;(a=this.lsPermissionBanner)==null||a.remove();const s=e==="cancelled"?"Screen share cancelled":"Screen share blocked",r=e==="cancelled"?"You closed the picker without sharing. Try again when you are ready to show your screen.":"Choose a screen, window, or browser tab when prompted to share with the agent.",o=document.createElement("div");o.id="vnr-live-screen-perm-banner",o.style.cssText=["position:fixed","bottom:24px","left:50%","transform:translateX(-50%)","z-index:2147483647","max-width:360px","width:calc(100% - 32px)","padding:16px 18px","border-radius:16px","background:#0f172a","border:1px solid rgba(96,165,250,0.35)","box-shadow:0 12px 32px rgba(0,0,0,0.35)","font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"].join(";"),o.innerHTML=`
|
|
2755
|
+
<p style="margin:0 0 6px;font-size:13px;font-weight:700;color:#60a5fa">${s}</p>
|
|
2756
|
+
<p style="margin:0 0 12px;font-size:12px;color:#94a3b8;line-height:1.5">${r}</p>
|
|
2757
|
+
<div style="display:flex;gap:8px">
|
|
2758
|
+
<button type="button" id="vnr-ls-perm-retry" style="flex:1;padding:9px 14px;border:none;border-radius:10px;background:#6366f1;color:#fff;font-size:13px;font-weight:600;cursor:pointer">Try Again</button>
|
|
2759
|
+
<button type="button" id="vnr-ls-perm-dismiss" style="padding:9px 14px;border:1px solid rgba(255,255,255,0.15);border-radius:10px;background:transparent;color:#e2e8f0;font-size:13px;font-weight:600;cursor:pointer">Dismiss</button>
|
|
2760
|
+
</div>
|
|
2761
|
+
`,o.querySelector("#vnr-ls-perm-retry").addEventListener("click",t),o.querySelector("#vnr-ls-perm-dismiss").addEventListener("click",i),document.body.appendChild(o),this.lsPermissionBanner=o}handleOpenLiveScreen(e,t,i){var A;if(this.handleCloseLiveScreen(t),this.handleCloseLiveCamera(t),!((A=navigator.mediaDevices)!=null&&A.getDisplayMedia)){this.notifyScreenShareUnavailable(t,i);return}const s=e.scope??"until_call_end",r=Math.min(Number(e.target_fps??1),Number(e.max_fps??3)),o=Number(e.max_width??1280),a=e.reason??"screen_capture",l=Number(e.duration_sec??0),c=e.prefer_current_tab===!0||e.prefer_current_tab==="true",h=e.show_preview!==!1&&e.show_preview!=="false",d=`ls_${crypto.randomUUID()}`;this.lsSessionId=d,this.lsFrameSeq=0;const g=document.createElement("video");g.autoplay=!0,g.playsInline=!0,g.muted=!0,g.style.display="none",document.body.appendChild(g),this.lsVideo=g;const u=document.createElement("canvas");u.style.display="none",document.body.appendChild(u),this.lsCanvas=u,h&&(this.lsPip=this.createLiveScreenPip(()=>this.handleCloseLiveScreen(t))),(()=>{const v=c?{displaySurface:"browser"}:!0;navigator.mediaDevices.getDisplayMedia({video:v,audio:!1}).then(async f=>{var x,E;if(!this.lsSessionId){f.getTracks().forEach(k=>k.stop());return}(x=this.lsPermissionBanner)==null||x.remove(),this.lsPermissionBanner=null,this.lsStream=f,g.srcObject=f;const b=f.getVideoTracks()[0];if(b&&(b.onended=()=>{this.handleCloseLiveScreen(t)}),this.lsPip){const k=this.lsPip.querySelector("video");k&&(k.srcObject=f)}const C=((E=b==null?void 0:b.getSettings)==null?void 0:E.call(b).displaySurface)??"unknown";await this.sendClientEvent(t,"client_live_screen_started",{data:{session_id:d,scope:s,...s==="timed"&&l>0?{duration_sec:l}:{},display_surface:C,reason:a,target_fps:r}});const w=Math.round(1e3/r);this.lsCaptureInterval=setInterval(()=>{this.captureAndSendScreenFrame(t,d,o,a)},w),s==="timed"&&l>0&&(this.lsAutoStopTimeout=setTimeout(()=>{this.handleCloseLiveScreen(t)},l*1e3))}).catch(f=>{var C,w;const b=this.classifyLiveScreenShareFailure(f);this.lsSessionId=null,(C=this.lsStream)==null||C.getTracks().forEach(x=>x.stop()),this.lsStream=null,(w=this.lsPip)==null||w.remove(),this.lsPip=null,g.remove(),this.lsVideo=null,u.remove(),this.lsCanvas=null,this.emitLiveScreenShareFailure(t,d,i,b,f),this.showLiveScreenPermissionBanner(b,()=>this.handleOpenLiveScreen(e,t,i),()=>{var x;(x=this.lsPermissionBanner)==null||x.remove(),this.lsPermissionBanner=null})})})()}handleCloseLiveScreen(e){var i,s,r,o,a;const t=this.lsSessionId;this.lsSessionId=null,this.lsCaptureInterval&&(clearInterval(this.lsCaptureInterval),this.lsCaptureInterval=null),this.lsAutoStopTimeout&&(clearTimeout(this.lsAutoStopTimeout),this.lsAutoStopTimeout=null),(i=this.lsStream)==null||i.getTracks().forEach(l=>l.stop()),this.lsStream=null,(s=this.lsVideo)==null||s.remove(),this.lsVideo=null,(r=this.lsCanvas)==null||r.remove(),this.lsCanvas=null,(o=this.lsPip)==null||o.remove(),this.lsPip=null,(a=this.lsPermissionBanner)==null||a.remove(),this.lsPermissionBanner=null,t&&e&&this.sendClientEvent(e,"client_live_screen_stopped",{data:{session_id:t}})}async uploadLiveStreamFrame(e,t,i,s){const r=`frame_${i}.jpg`;if(typeof e.uploadMediaFrame=="function")return e.uploadMediaFrame(t,s,r);const o=e.serverUrl||"";let a="";try{a=new URL(o).origin}catch{a=o.replace(/\/webrtc.*$/,"").replace(/\/$/,"")}const l=e.callId||"",c=`${a}/media/upload`,h=new FormData;h.append("file",t,r),h.append("call_id",l),h.append("reason",s);const d=await fetch(c,{method:"POST",body:h});if(!d.ok)throw new Error(`Upload HTTP ${d.status}`);const g=await d.json();if(!g.media_id||!g.url)throw new Error("Upload response missing media_id/url");return{media_id:g.media_id,url:g.url,content_type:g.content_type||"image/jpeg"}}async captureAndSendScreenFrame(e,t,i,s){if(!e||!this.lsVideo||!this.lsCanvas||!this.lsSessionId)return;const r=this.lsVideo;if(r.readyState<2)return;const o=this.lsCanvas,a=r.videoWidth||i,l=r.videoHeight||i,c=Math.min(1,i/a);o.width=Math.round(a*c),o.height=Math.round(l*c);const h=o.getContext("2d");if(!h)return;h.drawImage(r,0,0,o.width,o.height);let d;try{d=await new Promise((g,u)=>o.toBlob(m=>m?g(m):u(new Error("toBlob failed")),"image/jpeg",.75))}catch{return}try{const{media_id:g,url:u,content_type:m}=await this.uploadLiveStreamFrame(e,d,t,s);if(!this.lsSessionId||this.lsSessionId!==t||!g||!u)return;const A=++this.lsFrameSeq;await this.sendClientEvent(e,"client_media_frame",{data:{session_id:t,source:"screen",frame_seq:A,media_id:g,media_url:u,content_type:m,reason:s,viewport:{width:o.width,height:o.height}}})}catch{}}createLiveScreenPip(e){const t=document.createElement("div");if(t.id="vnr-live-screen-pip",t.style.cssText=["position:fixed","bottom:24px","right:24px","z-index:2147483647","width:220px","height:124px","border-radius:16px","overflow:hidden","background:#0f172a","border:1px solid rgba(96,165,250,0.25)","box-shadow:0 12px 32px rgba(0,0,0,0.35)","font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif","transition:transform 0.2s ease"].join(";"),t.innerHTML=`
|
|
2762
|
+
<video autoplay playsinline muted style="width:100%;height:100%;object-fit:contain;display:block;background:#020617"></video>
|
|
2763
|
+
<div style="position:absolute;top:10px;left:10px;display:flex;align-items:center;gap:6px;padding:3px 8px;border-radius:6px;background:rgba(15,23,42,0.8);border:1px solid rgba(255,255,255,0.1);font-size:10px;font-weight:700;color:#f8fafc;text-transform:uppercase;letter-spacing:0.04em;pointer-events:none;">
|
|
2764
|
+
<span style="width:6px;height:6px;border-radius:50%;background:#3b82f6;flex-shrink:0;animation:vnr-pip-pulse 1.5s ease-in-out infinite;"></span>
|
|
2765
|
+
SCREEN
|
|
2766
|
+
</div>
|
|
2767
|
+
<button id="vnr-screen-pip-stop" style="position:absolute;top:10px;right:10px;width:22px;height:22px;border-radius:50%;background:rgba(15,23,42,0.8);border:1px solid rgba(255,255,255,0.1);color:#fff;font-size:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s,transform 0.2s;">✕</button>
|
|
2768
|
+
`,!document.getElementById("vnr-pip-style")){const i=document.createElement("style");i.id="vnr-pip-style",i.textContent=`
|
|
2769
|
+
@keyframes vnr-pip-pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.5;transform:scale(1.2);}}
|
|
2770
|
+
#vnr-live-screen-pip:hover { transform: scale(1.02); }
|
|
2771
|
+
#vnr-screen-pip-stop:hover { background: rgba(239,68,68,0.9) !important; transform: scale(1.1); }
|
|
2772
|
+
`,document.head.appendChild(i)}return t.querySelector("#vnr-screen-pip-stop").addEventListener("click",()=>e()),document.body.appendChild(t),t}async captureAndSendFrame(e,t,i,s){if(!e||!this.lvVideo||!this.lvCanvas||!this.lvSessionId)return;const r=this.lvVideo;if(r.readyState<2)return;const o=this.lvCanvas,a=r.videoWidth||i,l=r.videoHeight||i,c=Math.min(1,i/a);o.width=Math.round(a*c),o.height=Math.round(l*c);const h=o.getContext("2d");if(!h)return;h.drawImage(r,0,0,o.width,o.height);let d;try{d=await new Promise((g,u)=>o.toBlob(m=>m?g(m):u(new Error("toBlob failed")),"image/jpeg",.75))}catch{return}try{const{media_id:g,url:u,content_type:m}=await this.uploadLiveStreamFrame(e,d,t,s);if(!this.lvSessionId||this.lvSessionId!==t||!g||!u)return;const A=++this.lvFrameSeq;await this.sendClientEvent(e,"client_media_frame",{data:{session_id:t,frame_seq:A,media_id:g,media_url:u,content_type:m,reason:s}})}catch{}}createLivePip(e,t){const i=document.createElement("div");i.id="vnr-live-pip";const s=e==="user";if(i.style.cssText=["position:fixed","bottom:24px","right:24px","z-index:2147483647","width:180px","height:135px","border-radius:16px","overflow:hidden","background:#0f172a","border:1px solid rgba(255,255,255,0.15)","box-shadow:0 12px 32px rgba(0,0,0,0.35)","font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif","transition:transform 0.2s ease"].join(";"),i.innerHTML=`
|
|
2773
|
+
<video autoplay playsinline muted style="width:100%;height:100%;object-fit:cover;display:block;${s?"transform:scaleX(-1);":""}"></video>
|
|
2774
|
+
<div style="position:absolute;top:10px;left:10px;display:flex;align-items:center;gap:6px;padding:3px 8px;border-radius:6px;background:rgba(15,23,42,0.8);border:1px solid rgba(255,255,255,0.1);font-size:10px;font-weight:700;color:#f8fafc;text-transform:uppercase;letter-spacing:0.04em;pointer-events:none;">
|
|
2775
|
+
<span style="width:6px;height:6px;border-radius:50%;background:#ef4444;flex-shrink:0;animation:vnr-pip-pulse 1.5s ease-in-out infinite;"></span>
|
|
2776
|
+
REC
|
|
2777
|
+
</div>
|
|
2778
|
+
<button id="vnr-pip-stop" style="position:absolute;top:10px;right:10px;width:22px;height:22px;border-radius:50%;background:rgba(15,23,42,0.8);border:1px solid rgba(255,255,255,0.1);color:#fff;font-size:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s,transform 0.2s;">✕</button>
|
|
2779
|
+
`,!document.getElementById("vnr-pip-style")){const r=document.createElement("style");r.id="vnr-pip-style",r.textContent=`
|
|
2780
|
+
@keyframes vnr-pip-pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.5;transform:scale(1.2);}}
|
|
2781
|
+
#vnr-live-pip:hover { transform: scale(1.02); }
|
|
2782
|
+
#vnr-pip-stop:hover { background: rgba(239,68,68,0.9) !important; transform: scale(1.1); }
|
|
2783
|
+
`,document.head.appendChild(r)}return i.querySelector("#vnr-pip-stop").addEventListener("click",()=>t()),document.body.appendChild(i),i}injectStyles(){if(this.styleInjected||document.getElementById("vnr-preset-styles"))return;const e=document.createElement("style");e.id="vnr-preset-styles",e.textContent=Cr,document.head.appendChild(e),this.styleInjected=!0}createOverlay(){const e=document.createElement("div");return e.className="vnr-overlay",document.body.appendChild(e),this.overlay=e,e}createModal(e,t,i){const s=document.createElement("div");return s.className="vnr-modal",s.style.position="relative",s.innerHTML=`
|
|
2784
|
+
<button class="vnr-close-btn" aria-label="Close">
|
|
2785
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
2786
|
+
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
|
2787
|
+
</svg>
|
|
2788
|
+
</button>
|
|
2789
|
+
<h2 class="vnr-title">${t}</h2>
|
|
2790
|
+
<div class="vnr-reason">
|
|
2791
|
+
<svg width="14" height="14" style="flex-shrink:0;margin-top:1px" fill="none" stroke="#9ca3af" stroke-width="2" viewBox="0 0 24 24">
|
|
2792
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
|
2793
|
+
</svg>
|
|
2794
|
+
<span>${i}</span>
|
|
2795
|
+
</div>
|
|
2796
|
+
`,e.appendChild(s),s}renderCalendar(e,t,i){this.bindActiveModalPreset(e,y.Calendar,t,i);const s=v=>{this.clearActiveModalPreset(),t({status:"success",preset_id:y.Calendar,...v})},r=v=>{this.clearActiveModalPreset(),i(v,{status:"cancelled"})},o=new Date;o.setHours(0,0,0,0),this.calViewYear=o.getFullYear(),this.calViewMonth=o.getMonth(),this.calSelectedTs=null,this.calSelectedTime=null;const a=e.clientFields.title||"Select Date & Time",l=e.args.reason||"Please select a preferred time for your appointment.",c=this.createOverlay(),h=this.createModal(c,a,l);h.querySelector(".vnr-close-btn").addEventListener("click",()=>{this.dismiss(),r("User closed the preset")});const d=document.createElement("div");h.appendChild(d);const g=document.createElement("div");g.style.display="none",h.appendChild(g);const u=document.createElement("div");u.className="vnr-actions",u.innerHTML=`
|
|
2797
|
+
<button class="vnr-cancel-btn">Cancel</button>
|
|
2798
|
+
<button class="vnr-confirm-btn" disabled>
|
|
2799
|
+
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>
|
|
2800
|
+
Confirm
|
|
2801
|
+
</button>
|
|
2802
|
+
`,h.appendChild(u);const m=u.querySelector(".vnr-confirm-btn");u.querySelector(".vnr-cancel-btn").addEventListener("click",()=>{this.dismiss(),r("User cancelled")}),m.addEventListener("click",()=>{if(!this.calSelectedTs||!this.calSelectedTime)return;const v=new Date(this.calSelectedTs),f=bt(this.calSelectedTime),b=v.getFullYear(),C=String(v.getMonth()+1).padStart(2,"0"),w=String(v.getDate()).padStart(2,"0"),x=`${b}-${C}-${w}`,E=e.clientFields.timezone||"";let k=typeof this.calSelectedTime=="object"?{...this.calSelectedTime}:void 0;if(k){for(const S of["start","startTime","end","endTime"])if(k[S]&&typeof k[S]=="string"&&(k[S].includes("T")||!isNaN(Date.parse(k[S]))))try{k[S]=xr(new Date(k[S]),E)}catch{}}this.dismiss(),s({date:x,time:f,timestamp:this.calSelectedTs,formatted:`${v.toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric"})} at ${f}`,slot_data:k})});const A=()=>{const v=new Date;v.setHours(0,0,0,0);const f=new Date(this.calViewYear,this.calViewMonth,1).getDay(),b=new Date(this.calViewYear,this.calViewMonth+1,0).getDate(),C=new Date(this.calViewYear,this.calViewMonth,1).toLocaleDateString("en-US",{month:"long",year:"numeric"}),w=this.calViewYear===v.getFullYear()&&this.calViewMonth===v.getMonth();d.innerHTML=`
|
|
2803
|
+
<div class="vnr-month-nav">
|
|
2804
|
+
<button class="vnr-nav-btn" id="vnr-prev" ${w?"disabled":""}>
|
|
2805
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="15 18 9 12 15 6"/></svg>
|
|
2806
|
+
</button>
|
|
2807
|
+
<span class="vnr-month-label">${C}</span>
|
|
2808
|
+
<button class="vnr-nav-btn" id="vnr-next">
|
|
2809
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="9 18 15 12 9 6"/></svg>
|
|
2810
|
+
</button>
|
|
2811
|
+
</div>
|
|
2812
|
+
<div class="vnr-cal-grid" id="vnr-grid"></div>
|
|
2813
|
+
`,d.querySelector("#vnr-prev").addEventListener("click",()=>{this.calViewMonth===0?(this.calViewMonth=11,this.calViewYear--):this.calViewMonth--,A()}),d.querySelector("#vnr-next").addEventListener("click",()=>{this.calViewMonth===11?(this.calViewMonth=0,this.calViewYear++):this.calViewMonth++,A()});const x=d.querySelector("#vnr-grid");["Su","Mo","Tu","We","Th","Fr","Sa"].forEach(E=>{const k=document.createElement("div");k.className="vnr-wd",k.textContent=E,x.appendChild(k)});for(let E=0;E<f;E++){const k=document.createElement("div");x.appendChild(k)}for(let E=1;E<=b;E++){const k=new Date(this.calViewYear,this.calViewMonth,E).getTime(),S=k<v.getTime(),I=k===v.getTime(),P=this.calSelectedTs===k,z=document.createElement("div");z.style.textAlign="center";const Q=document.createElement("button");Q.className="vnr-day-btn",S&&Q.classList.add("vnr-day-past"),I&&!P&&Q.classList.add("vnr-day-today"),P&&Q.classList.add("vnr-day-sel"),Q.disabled=S,Q.textContent=String(E),Q.addEventListener("click",()=>{this.calSelectedTs=k,this.calSelectedTime=null,m.disabled=!0,A(),this.loadSlots(e,g,m)}),z.appendChild(Q),x.appendChild(z)}};A()}loadSlots(e,t,i){const s=e.clientFields.slots_api_url;if(!this.calSelectedTs||!s){this.renderSlots(t,["09:00 AM","10:30 AM","01:00 PM","02:30 PM","04:00 PM"],i);return}const r=new Date(this.calSelectedTs),o=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0"),c=`${o}-${a}-${l}`,h=e.clientFields.timezone||"",d=wr(o,r.getMonth(),r.getDate(),h),g=d.start,u=d.end,m=w=>{if(typeof w!="string")return w;let x=w.replace(/\{\{date\}\}/g,c).replace(/\{\{timezone\}\}/g,h).replace(/\{\{start_of_day\}\}/g,g.toISOString()).replace(/\{\{end_of_day\}\}/g,u.toISOString());return Object.entries(e.clientFields).forEach(([E,k])=>{if(k!=null){const S=E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),I=new RegExp(`\\{\\{${S}\\}\\}`,"g");x=x.replace(I,String(k))}}),x},A=(e.clientFields.slots_api_method||"GET").toUpperCase();let v={"Content-Type":"application/json"};try{Object.entries(JSON.parse(e.clientFields.slots_api_headers||"{}")).forEach(([w,x])=>{v[w]=m(String(x))})}catch{}let f={};try{Object.entries(JSON.parse(e.clientFields.slots_api_body||"{}")).forEach(([w,x])=>{f[w]=m(String(x))})}catch{}let b=m(s);const C={method:A,headers:v};if(A==="GET"){const w=new URLSearchParams(Object.entries(f).map(([x,E])=>[x,String(E)])).toString();w&&(b+=(b.includes("?")?"&":"?")+w)}else C.body=JSON.stringify(f);t.style.display="block",t.innerHTML='<div class="vnr-divider"></div><div class="vnr-center"><div class="vnr-spinner" style="margin:0 auto 8px"></div>Loading slots…</div>',fetch(b,C).then(w=>{if(!w.ok)throw new Error(`HTTP ${w.status}`);return w.json()}).then(w=>{let x=[];if(Array.isArray(w))x=w;else if(w&&typeof w=="object"){for(const E of["slots","free_slots","times","data","available_slots"])if(Array.isArray(w[E])){x=w[E];break}}this.renderSlots(t,x,i)}).catch(()=>{t.innerHTML='<div class="vnr-divider"></div><div class="vnr-center" style="color:#ef4444">Failed to load slots. Please try again.</div>'})}renderSlots(e,t,i){const s=this.calSelectedTs?new Date(this.calSelectedTs).toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric"}):"Available Times",r=t.some(a=>bt(a).length>8)?2:3;if(e.style.display="block",e.innerHTML=`
|
|
2814
|
+
<div class="vnr-divider"></div>
|
|
2815
|
+
<div class="vnr-section-label">${s}</div>
|
|
2816
|
+
${t.length===0?'<div class="vnr-center">No slots available for this date.</div>':`<div class="vnr-slots-grid" style="grid-template-columns:repeat(${r},1fr)"></div>`}
|
|
2817
|
+
`,t.length===0)return;const o=e.querySelector(".vnr-slots-grid");t.forEach(a=>{const l=document.createElement("button");l.className="vnr-slot-btn",this.calSelectedTime!==null&&(typeof a=="object"&&typeof this.calSelectedTime=="object"?JSON.stringify(a)===JSON.stringify(this.calSelectedTime):a===this.calSelectedTime)&&l.classList.add("vnr-slot-sel"),l.textContent=bt(a),l.addEventListener("click",()=>{this.calSelectedTime=a,i.disabled=!1,o.querySelectorAll(".vnr-slot-btn").forEach(h=>h.classList.remove("vnr-slot-sel")),l.classList.add("vnr-slot-sel")}),o.appendChild(l)})}collectFormFieldValues(e,t){const i={};for(const s of t){if(s.type==="checkbox"){const o=e.querySelector(`#vnr_${s.id}`);i[s.id]=!!(o!=null&&o.checked);continue}if(s.type==="radio"){const o=e.querySelector(`input[name="vnr_${s.id}"]:checked`);i[s.id]=(o==null?void 0:o.value)??"";continue}const r=e.querySelector(`#vnr_${s.id}`);i[s.id]=String((r==null?void 0:r.value)??"").trim()}return i}appendFormFieldElement(e,t,i){const s=document.createElement("div");s.className="vnr-field-wrap",s.dataset.fieldId=t.id;const r=t.placeholder||`Enter your ${t.label.toLowerCase()}`,o=c=>typeof c=="string"?c:c.value,a=c=>typeof c=="string"?c:c.label;if(t.type!=="checkbox"){const c=document.createElement("label");c.className="vnr-field-label",c.htmlFor=`vnr_${t.id}`,c.textContent=t.required?`${t.label} *`:t.label,s.appendChild(c)}switch(t.type){case"textarea":{const c=document.createElement("textarea");c.className="vnr-input vnr-textarea",c.id=`vnr_${t.id}`,c.rows=4,c.placeholder=r,typeof i=="string"&&(c.value=i),s.appendChild(c);break}case"select":{const c=document.createElement("select");c.className="vnr-input",c.id=`vnr_${t.id}`;const h=document.createElement("option");h.value="",h.textContent="Select…",c.appendChild(h);for(const d of t.options){const g=document.createElement("option");g.value=o(d),g.textContent=a(d),c.appendChild(g)}typeof i=="string"&&i&&(c.value=i),s.appendChild(c);break}case"radio":{const c=document.createElement("div");c.className="vnr-radio-group";const h=typeof i=="string"?i:"";t.options.forEach((d,g)=>{const u=document.createElement("label");u.className="vnr-radio-row";const m=document.createElement("input");m.type="radio",m.name=`vnr_${t.id}`,m.id=`vnr_${t.id}_${g}`;const A=o(d);m.value=A,h&&h===A&&(m.checked=!0);const v=document.createElement("span");v.textContent=a(d),u.appendChild(m),u.appendChild(v),c.appendChild(u)}),s.appendChild(c);break}case"checkbox":{const c=document.createElement("label");c.className="vnr-checkbox-row";const h=document.createElement("input");h.type="checkbox",h.id=`vnr_${t.id}`,h.checked=i===!0||i==="true";const d=document.createElement("span");d.textContent=t.required?`${t.label} *`:t.label,c.appendChild(h),c.appendChild(d),s.appendChild(c);break}default:{const c=document.createElement("input");c.className="vnr-input",c.id=`vnr_${t.id}`,c.placeholder=r,t.type==="phone"?c.type="tel":t.type==="email"||t.type==="number"||t.type==="date"?c.type=t.type:c.type="text",typeof i=="string"&&(c.value=i),s.appendChild(c);break}}const l=document.createElement("p");l.className="vnr-field-error",l.style.display="none",s.appendChild(l),e.appendChild(s)}showFormFieldErrors(e,t){e.querySelectorAll(".vnr-field-wrap").forEach(i=>{var a,l;const s=i.dataset.fieldId;if(!s)return;const r=i.querySelector(".vnr-field-error"),o=t[s];o&&r?(r.textContent=o,r.style.display="block",(a=i.querySelector(".vnr-input, .vnr-textarea"))==null||a.classList.add("vnr-input-error")):r&&(r.style.display="none",(l=i.querySelector(".vnr-input, .vnr-textarea"))==null||l.classList.remove("vnr-input-error"))})}renderForm(e,t,i){this.bindActiveModalPreset(e,y.Form,t,i);const s=v=>{this.clearActiveModalPreset(),t({status:"success",preset_id:y.Form,...v})},r=v=>{this.clearActiveModalPreset(),i(v,{status:"cancelled"})},o=e.args.title||e.clientFields.title||"Please fill out this form",a=e.args.reason||"Please provide the following information.",l=Re(e.args.fields??e.clientFields.fields),c=br(l,Ar(e.args,e.clientFields)),h=this.createOverlay(),d=this.createModal(h,o,a);d.querySelector(".vnr-close-btn").addEventListener("click",()=>{this.dismiss(),r("User closed")});const g=document.createElement("div");if(g.className="vnr-fields",l.length===0){const v=document.createElement("p");v.className="vnr-form-error",v.style.color="#dc2626",v.style.fontSize="13px",v.textContent="No form fields configured.",g.appendChild(v)}else l.forEach(v=>this.appendFormFieldElement(g,v,c[v.id]));d.appendChild(g);const u=document.createElement("p");u.className="vnr-form-error",u.style.cssText="display:none;color:#dc2626;font-size:13px;margin:8px 0 0;",d.appendChild(u);const m=document.createElement("div");m.className="vnr-actions",m.style.marginTop="16px",m.innerHTML=`
|
|
2818
|
+
<button class="vnr-cancel-btn">Cancel</button>
|
|
2819
|
+
<button class="vnr-confirm-btn">
|
|
2820
|
+
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>
|
|
2821
|
+
Submit
|
|
2822
|
+
</button>
|
|
2823
|
+
`,d.appendChild(m),m.querySelector(".vnr-cancel-btn").addEventListener("click",()=>{this.dismiss(),r("User cancelled")});const A=m.querySelector(".vnr-confirm-btn");l.length===0&&(A.disabled=!0),A.addEventListener("click",()=>{if(l.length===0){u.textContent="No form fields configured.",u.style.display="block";return}const v=this.collectFormFieldValues(d,l),f=mr(l,v);if(Object.keys(f).length>0){this.showFormFieldErrors(d,f),u.textContent="Please fix the highlighted fields.",u.style.display="block";const C=Object.keys(f)[0],w=d.querySelector(`[data-field-id="${C}"]`),x=w==null?void 0:w.querySelector("input, textarea, select");x==null||x.focus();return}u.style.display="none",this.showFormFieldErrors(d,{}),A.disabled=!0,A.innerHTML='<div class="vnr-spinner"></div>';const b=vr(l,v);setTimeout(()=>{this.dismiss(),s(b)},300)})}renderCamera(e,t,i,s){this.bindActiveModalPreset(e,y.Camera,t,i);const r=T=>{this.clearActiveModalPreset(),t({status:"success",preset_id:y.Camera,...T})},o=(T,N="cancelled")=>{this.clearActiveModalPreset(),i(T,{status:N})},a=this,l=e.clientFields.title||"Take a Photo",c=e.clientFields.description||"Point your camera at the subject, then tap capture.",h=e.clientFields.facing_mode||e.args.facing_mode||"environment",d=e.clientFields.reason||"camera_capture",g=e.clientFields.liveness_check===!0||e.clientFields.liveness_check==="true"||e.args.liveness_check===!0||e.args.liveness_check==="true";let u=null,m=null;this.stopCaptureCamera(),this.captureActive=!0;const A=this.createOverlay(),v=document.createElement("div");v.className="vnr-modal",v.style.cssText="position:relative;max-width:480px;width:100%",v.innerHTML=`
|
|
2824
|
+
<button class="vnr-close-btn" aria-label="Close">
|
|
2825
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
2826
|
+
</button>
|
|
2827
|
+
<h2 class="vnr-title" style="padding-right:32px">${l}</h2>
|
|
2828
|
+
<p style="margin:0 0 14px;font-size:13px;color:#6b7280;line-height:1.5">${c}</p>
|
|
2829
|
+
|
|
2830
|
+
<div class="vnr-liveness-toggle-wrap" style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;padding:8px 12px">
|
|
2831
|
+
<span style="font-size:12px;font-weight:600;color:#374151">Liveness Verification</span>
|
|
2832
|
+
<label class="vnr-switch" style="position:relative;display:inline-block;width:34px;height:20px">
|
|
2833
|
+
<input type="checkbox" id="vnr-cam-liveness-toggle" style="opacity:0;width:0;height:0">
|
|
2834
|
+
<span class="vnr-slider" style="position:absolute;cursor:pointer;inset:0;background-color:#ccc;transition:.3s;border-radius:20px"></span>
|
|
2835
|
+
</label>
|
|
2836
|
+
</div>
|
|
2837
|
+
|
|
2838
|
+
<div class="vnr-video-wrap" id="vnr-cam-wrap" style="position:relative">
|
|
2839
|
+
<video id="vnr-cam-video" autoplay playsinline muted></video>
|
|
2840
|
+
<div id="vnr-cam-guide" style="display:none;position:absolute;inset:0;pointer-events:none;border:3px dashed rgba(255,255,255,0.45);border-radius:50%;margin:auto;width:180px;height:240px;box-shadow:0 0 0 9999px rgba(15,23,42,0.6);transition:border-color 0.3s ease, box-shadow 0.3s ease">
|
|
2841
|
+
<div id="vnr-cam-guide-text" style="position:absolute;bottom:-45px;left:-40px;right:-40px;text-align:center;color:#fff;font-size:11px;font-weight:600;background:rgba(15,23,42,0.85);padding:6px 10px;border-radius:6px;border:1px solid rgba(255,255,255,0.1)">
|
|
2842
|
+
Align your face
|
|
2843
|
+
</div>
|
|
2844
|
+
</div>
|
|
2845
|
+
<div id="vnr-cam-overlay" style="position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#0f172a">
|
|
2846
|
+
<div class="vnr-spinner" style="width:32px;height:32px;border-width:3px;border-color:rgba(255,255,255,.15);border-top-color:#fff"></div>
|
|
2847
|
+
<p style="margin:0;font-size:13px;color:#94a3b8">Opening camera…</p>
|
|
2848
|
+
</div>
|
|
2849
|
+
</div>
|
|
2850
|
+
|
|
2851
|
+
<div id="vnr-liveness-progress-container" style="display:none;margin-top:12px">
|
|
2852
|
+
<div style="display:flex;justify-content:space-between;font-size:11px;font-weight:700;color:#6b7280;margin-bottom:6px;letter-spacing:0.04em">
|
|
2853
|
+
<span>LIVENESS ANALYSIS</span>
|
|
2854
|
+
<span id="vnr-liveness-pct" style="color:#6366f1">0%</span>
|
|
2855
|
+
</div>
|
|
2856
|
+
<div style="width:100%;height:6px;background:#f3f4f6;border-radius:3px;overflow:hidden">
|
|
2857
|
+
<div id="vnr-liveness-bar" style="width:0%;height:100%;background:#6366f1;transition:width 0.1s linear"></div>
|
|
2858
|
+
</div>
|
|
2859
|
+
</div>
|
|
2860
|
+
|
|
2861
|
+
<canvas id="vnr-cam-canvas" style="display:none"></canvas>
|
|
2862
|
+
<div id="vnr-cam-status" style="display:none"></div>
|
|
2863
|
+
<div class="vnr-actions" style="margin-top:14px">
|
|
2864
|
+
<button class="vnr-cancel-btn" id="vnr-cam-cancel">Cancel</button>
|
|
2865
|
+
<button class="vnr-confirm-btn" id="vnr-cam-capture" disabled>
|
|
2866
|
+
<svg width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
|
|
2867
|
+
Capture & Send
|
|
2868
|
+
</button>
|
|
2869
|
+
</div>
|
|
2870
|
+
`,A.appendChild(v);const f=v.querySelector("#vnr-cam-video"),b=v.querySelector("#vnr-cam-canvas"),C=v.querySelector("#vnr-cam-overlay"),w=v.querySelector("#vnr-cam-status"),x=v.querySelector("#vnr-cam-capture"),E=v.querySelector("#vnr-cam-liveness-toggle"),k=v.querySelector("#vnr-liveness-progress-container"),S=v.querySelector("#vnr-liveness-bar"),I=v.querySelector("#vnr-liveness-pct"),P=v.querySelector("#vnr-cam-guide"),z=v.querySelector("#vnr-cam-guide-text"),Q=()=>{m&&(clearInterval(m),m=null),this.captureLivenessInterval=null,u==null||u.getTracks().forEach(T=>T.stop()),u=null,a.captureStream=null,f.srcObject=null};v.querySelector(".vnr-close-btn").addEventListener("click",()=>{Q(),this.captureActive=!1,this.dismiss(),o("User closed")}),v.querySelector("#vnr-cam-cancel").addEventListener("click",()=>{Q(),this.captureActive=!1,this.dismiss(),o("User cancelled")});const L=()=>{this.captureActive&&(C.style.display="flex",C.innerHTML=`
|
|
2871
|
+
<div class="vnr-spinner" style="width:32px;height:32px;border-width:3px;border-color:rgba(255,255,255,.15);border-top-color:#fff"></div>
|
|
2872
|
+
<p style="margin:0;font-size:13px;color:#94a3b8">Opening camera…</p>
|
|
2873
|
+
`,x.disabled=!0,navigator.mediaDevices.getUserMedia({video:{facingMode:{ideal:h}},audio:!1}).then(T=>{if(!this.captureActive){T.getTracks().forEach(N=>N.stop());return}return u=T,a.captureStream=T,f.srcObject=T,f.play().catch(()=>{})}).then(()=>{if(!(!this.captureActive||!u)){if(C.style.display="none",!v.querySelector(".vnr-live-badge")){const T=document.createElement("div");T.className="vnr-live-badge",T.innerHTML='<span class="vnr-live-dot"></span>LIVE',v.querySelector("#vnr-cam-wrap").appendChild(T)}E.checked=g,Y()}}).catch(()=>{this.captureActive&&(this.notifyCameraPermissionDenied(s,e.toolCallId),this.fillCameraPermissionPrompt(C,{onRetry:L,onDismiss:()=>{Q(),this.captureActive=!1,this.dismiss(),o("Camera permission denied","cancelled")}}))}))};L();function Y(){m&&(clearInterval(m),m=null,a.captureLivenessInterval=null),E.checked?(k.style.display="block",P.style.display="block",x.disabled=!0,M()):(k.style.display="none",P.style.display="none",x.disabled=!1)}E.addEventListener("change",Y);function M(){let T=null;const N=[];let H=1,j=0,V=0,q=0,ne=!1;const ve=document.createElement("canvas"),Ge=ve.getContext("2d");ve.width=80,ve.height=60,S.style.width="0%",S.style.backgroundColor="#6366f1",I.style.color="#6366f1",I.innerText="0%",P.style.borderColor="rgba(255,255,255,0.45)",P.style.boxShadow="0 0 0 9999px rgba(15,23,42,0.6)",z.innerText="Align your face in center",z.style.color="#fff",m=setInterval(()=>{if(!u||f.paused||f.ended)return;Ge.drawImage(f,0,0,80,60);const le=Ge.getImageData(0,0,80,60).data;if(T){let te=0;for(let J=0;J<le.length;J+=4)te+=Math.abs(le[J]-T[J]),te+=Math.abs(le[J+1]-T[J+1]),te+=Math.abs(le[J+2]-T[J+2]);const Ae=te/(le.length/4*3);if(V===0){q++,N.push(Ae);const J=Math.min(100,Math.round(q/15*100));S.style.width=`${J*.3}%`,I.innerText=`${Math.round(J*.3)}%`,z.innerText="Hold still to calibrate…",z.style.color="#a5b4fc",q>=15&&(H=N.reduce((Ie,Fe)=>Ie+Fe,0)/N.length,H<.2&&(H=.2),V=1,q=0,S.style.width="30%",I.innerText="30%")}else if(V===1){z.innerText="Now blink or turn head slightly",z.style.color="#ffd2d2";const J=Math.max(3,H*3.5);if(Ae>J&&Ae<30){j+=15,j>70&&(j=70,ne=!0);const re=30+j;S.style.width=`${re}%`,I.innerText=`${re}%`}else ne&&Ae<=J*1.5&&(V=2,S.style.width="100%",S.style.backgroundColor="#10b981",I.innerText="100%",I.style.color="#10b981",z.innerText="✓ Liveness Verified! Click Capture & Send.",z.style.color="#10b981",P.style.borderColor="#10b981",P.style.boxShadow="0 0 0 9999px rgba(16,185,129,0.2)",x.disabled=!1,m&&(clearInterval(m),m=null,a.captureLivenessInterval=null))}}T=le},100),a.captureLivenessInterval=m}x.addEventListener("click",async()=>{if(!u||f.videoWidth===0)return;b.width=f.videoWidth,b.height=f.videoHeight,b.getContext("2d").drawImage(f,0,0),Q(),v.querySelector("#vnr-cam-wrap").setAttribute("style","display:none"),v.querySelector(".vnr-liveness-toggle-wrap")&&(v.querySelector(".vnr-liveness-toggle-wrap").style.display="none"),k.style.display="none",x.disabled=!0,w.style.display="block",w.innerHTML='<div class="vnr-center"><div class="vnr-spinner" style="margin:0 auto 8px"></div>Sending photo…</div>';try{const N=await new Promise(j=>b.toBlob(V=>j(V),"image/jpeg",.85));if(!N)throw new Error("Capture failed");const H=new File([N],`capture-${Date.now()}.jpg`,{type:"image/jpeg"});if(s&&typeof s.uploadMedia=="function"){const{media_id:j,url:V}=await s.uploadMedia(H,d,"User captured a photo via camera");w.innerHTML='<div class="vnr-center" style="color:#22c55e">✓ Photo sent!</div>',setTimeout(()=>{this.dismiss(),r({file_name:H.name,file_type:H.type,file_size:H.size,media_id:j,url:V,message:"User captured and sent a photo."})},400)}else{const j=b.toDataURL("image/jpeg",.85);w.innerHTML='<div class="vnr-center" style="color:#22c55e">✓ Photo ready!</div>',setTimeout(()=>{this.dismiss(),r({file_name:H.name,data_url:j,message:"User captured a photo."})},400)}}catch(N){w.innerHTML=`<div class="vnr-center" style="color:#ef4444">${(N==null?void 0:N.message)||"Capture failed"}</div>`}})}renderClipRegion(e,t,i,s){const r=e.args??{},o=String(r.reason??e.clientFields.reason??"page_clip"),a=String(r.prompt??r.message??e.clientFields.default_prompt??"").trim(),l=String(e.clientFields.hint??(a?`Select the area to answer: "${a}"`:"Drag to select an area — release to clip.")),c=Number(e.clientFields.min_region_px??24),h=d=>{ft(),i(d,{status:"cancelled"})};if(typeof document>"u"){h("Page clip is only available in browser environments");return}os({hint:l,minSizePx:c}).then(async d=>{if(!d){h("User cancelled region selection");return}const g=new File([d.blob],`clip-${Date.now()}.jpg`,{type:"image/jpeg"}),u=a?`User clipped a page region and asked: ${a}`:"User clipped a region of the page and sent it for analysis.";try{await this.completeBlockingMediaTool(s,g,o,{preset_id:y.ClipRegion,region:d.region,viewport:d.viewport,pixel_size:d.pixelSize,prompt:a||void 0,message:u},t)}catch(m){const A=m instanceof Error?m.message:"Clip upload failed";i(A,{status:"cancelled"})}}).catch(d=>{h(d instanceof Error?d.message:"Region clip failed")})}async completeBlockingMediaTool(e,t,i,s,r){const o=e==null?void 0:e.uploadMediaForToolResult;let a,l;if(o&&typeof o=="function")try{const h=await o.call(e,t,i);a=h.media_id,l=h.url}catch{}if(a&&l){r({status:"success",media_id:a,url:l,...s});return}const c=await new Promise((h,d)=>{const g=new FileReader;g.onload=()=>h(String(g.result)),g.onerror=()=>d(new Error("Failed to read media blob")),g.readAsDataURL(t)});r({status:"success",data_url:c,...s})}renderTabScreenshot(e,t,i,s){const r=e.args??{},o=String(r.reason??e.clientFields.reason??"tab_screenshot"),a=String(r.prompt??r.message??e.clientFields.default_prompt??"").trim(),l=Number(r.max_width??e.clientFields.max_width??1280),c=Number(r.max_elements??e.clientFields.max_elements??80);if(typeof document>"u"){i("Tab screenshot is only available in browser environments");return}(async()=>{try{const h=Ki({maxElements:Number.isFinite(c)?c:80}),d=ds(h),u=`${a?`Tab snapshot captured. Context: ${a}`:"Tab snapshot of the visible page captured."}
|
|
2874
|
+
|
|
2875
|
+
COORDINATES ARE NORMALIZED VIEWPORT (0–1), NOT JPEG PIXELS. viewport=${h.viewport.width}x${h.viewport.height}
|
|
2876
|
+
|
|
2877
|
+
For screen_ink prefer css_selector (live DOM) OR copy stroke_points from below:
|
|
2878
|
+
${d}`,m={layout:h,elements:h.elements,element_count:h.elements.length,layout_summary:d,coordinate_system:h.coordinate_system,drawing_guide:"Use screen_ink with css_selector for exact placement, or strokes:[{ points: element.stroke_points, close:true }]. Coords are 0–1 viewport fractions."};t({status:"success",preset_id:y.TabScreenshot,viewport:h.viewport,prompt:a||void 0,message:u,...m}),(async()=>{try{let A=await Fi();Number.isFinite(l)&&l>0&&(A=Vi(A,l));const v=await Ht(A),f=new File([v],`tab-${Date.now()}.jpg`,{type:"image/jpeg"}),b=s==null?void 0:s.uploadMediaForToolResult;b&&typeof b=="function"&&await b.call(s,f,o)}catch{}})()}catch(h){const d=h instanceof Error?h.message:"Tab screenshot failed";i(d,{status:"cancelled"})}})()}renderUpload(e,t,i,s){this.bindActiveModalPreset(e,y.Upload,t,i);const r=w=>{this.clearActiveModalPreset(),t({status:"success",preset_id:y.Upload,...w})},o=w=>{this.clearActiveModalPreset(),i(w,{status:"cancelled"})},a=e.clientFields.title||"Upload a File",l=e.clientFields.description||"Drop or select a file to send to your agent.",c=e.clientFields.reason||"upload",h=e.clientFields.accept||"image/*,application/pdf,text/plain,text/csv";let d=null;const g=this.createOverlay(),u=document.createElement("div");u.className="vnr-modal",u.style.cssText="position:relative;max-width:480px;width:100%",u.innerHTML=`
|
|
2879
|
+
<button class="vnr-close-btn" aria-label="Close">
|
|
2880
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
2881
|
+
</button>
|
|
2882
|
+
<h2 class="vnr-title" style="padding-right:32px">${a}</h2>
|
|
2883
|
+
<p style="margin:0 0 14px;font-size:13px;color:#6b7280;line-height:1.5">${l}</p>
|
|
2884
|
+
<div class="vnr-dropzone" id="vnr-drop-zone">
|
|
2885
|
+
<div style="font-size:32px;margin-bottom:8px">📁</div>
|
|
2886
|
+
<p style="margin:0 0 4px;font-weight:600;color:#374151;font-size:14px">Drag & drop here</p>
|
|
2887
|
+
<p style="margin:0 0 14px;color:#9ca3af;font-size:12px">or click to browse</p>
|
|
2888
|
+
<span style="display:inline-block;padding:7px 16px;background:#111;color:#fff;border-radius:9px;font-size:13px;font-weight:600">Choose File</span>
|
|
2889
|
+
<p style="margin:12px 0 0;font-size:11px;color:#9ca3af">Images, PDF, CSV, Docs · Max 10 MB</p>
|
|
2890
|
+
</div>
|
|
2891
|
+
<input id="vnr-file-input" type="file" accept="${h}" style="display:none">
|
|
2892
|
+
<div id="vnr-file-preview" style="display:none;border:1px solid #e5e7eb;border-radius:12px;padding:14px;background:#f9fafb"></div>
|
|
2893
|
+
<div id="vnr-upload-status" style="display:none"></div>
|
|
2894
|
+
<div class="vnr-actions" style="margin-top:14px">
|
|
2895
|
+
<button class="vnr-cancel-btn" id="vnr-up-cancel">Cancel</button>
|
|
2896
|
+
<button class="vnr-confirm-btn" id="vnr-up-submit" disabled>
|
|
2897
|
+
<svg width="13" height="13" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>
|
|
2898
|
+
Upload & Send
|
|
2899
|
+
</button>
|
|
2900
|
+
</div>
|
|
2901
|
+
`,g.appendChild(u);const m=u.querySelector("#vnr-drop-zone"),A=u.querySelector("#vnr-file-input"),v=u.querySelector("#vnr-file-preview"),f=u.querySelector("#vnr-upload-status"),b=u.querySelector("#vnr-up-submit");u.querySelector(".vnr-close-btn").addEventListener("click",()=>{this.dismiss(),o("User closed")}),u.querySelector("#vnr-up-cancel").addEventListener("click",()=>{this.dismiss(),o("User cancelled")});const C=w=>{d=w,m.style.display="none";const x=w.type.startsWith("image/")?"🖼️":w.type.includes("pdf")?"📄":"📁",E=(w.size/1024).toFixed(1);v.style.display="block",v.innerHTML=`
|
|
2902
|
+
<div style="display:flex;align-items:center;gap:10px">
|
|
2903
|
+
<span style="font-size:28px">${x}</span>
|
|
2904
|
+
<div style="flex:1;min-width:0">
|
|
2905
|
+
<p style="margin:0;font-weight:600;font-size:13px;color:#111;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${w.name}</p>
|
|
2906
|
+
<p style="margin:3px 0 0;font-size:11px;color:#6b7280">${w.type||"unknown"} · ${E} KB</p>
|
|
2907
|
+
</div>
|
|
2908
|
+
<button id="vnr-remove-file" style="width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #e5e7eb;border-radius:8px;cursor:pointer;color:#6b7280;flex-shrink:0">
|
|
2909
|
+
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
2910
|
+
</button>
|
|
2911
|
+
</div>
|
|
2912
|
+
`,v.querySelector("#vnr-remove-file").addEventListener("click",()=>{d=null,v.style.display="none",m.style.display="block",b.disabled=!0}),b.disabled=!1};m.addEventListener("click",()=>A.click()),m.addEventListener("dragover",w=>{w.preventDefault(),m.classList.add("drag")}),m.addEventListener("dragleave",()=>m.classList.remove("drag")),m.addEventListener("drop",w=>{var E;w.preventDefault(),m.classList.remove("drag");const x=(E=w.dataTransfer)==null?void 0:E.files[0];x&&C(x)}),A.addEventListener("change",()=>{var x;const w=(x=A.files)==null?void 0:x[0];w&&C(w)}),b.addEventListener("click",async()=>{if(!d)return;const w=d;m.style.display="none",v.style.display="none",f.style.display="block",f.innerHTML='<div class="vnr-center"><div class="vnr-spinner" style="margin:0 auto 8px"></div>Uploading…</div>',b.disabled=!0;try{if(s&&typeof s.uploadMedia=="function"){const{media_id:x,url:E}=await s.uploadMedia(w,c,`User uploaded: ${w.name}`);f.innerHTML='<div class="vnr-center" style="color:#22c55e">✓ File sent!</div>',setTimeout(()=>{this.dismiss(),r({file_name:w.name,file_type:w.type,file_size:w.size,media_id:x,url:E,message:`User uploaded: ${w.name}`})},400)}else{const x=new FileReader;x.onload=E=>{f.innerHTML='<div class="vnr-center" style="color:#22c55e">✓ File ready!</div>',setTimeout(()=>{this.dismiss(),r({file_name:w.name,file_type:w.type,file_size:w.size,data_url:E.target.result,message:`User uploaded: ${w.name}`})},400)},x.readAsDataURL(w)}}catch(x){f.innerHTML=`<div class="vnr-center" style="color:#ef4444">${(x==null?void 0:x.message)||"Upload failed. Please try again."}</div>`,b.disabled=!1,this.dismiss(),this.clearActiveModalPreset(),i((x==null?void 0:x.message)||"Upload failed",{status:"cancelled"})}})}extractElementRoute(e){const t=e.args||{},i=e.clientFields||{};return String(t.route||i.route||t.target_route||i.target_route||"").trim()}normalizeRouteForCompare(e){const t=(e.trim()||"/").split("#")[0],i=t.startsWith("/")?t:`/${t}`;try{const s=new URL(i,window.location.origin);return`${s.pathname}${s.search}`||"/"}catch{return i||"/"}}isCurrentRoute(e){const t=this.normalizeRouteForCompare(e);return(`${window.location.pathname}${window.location.search}`||"/")===t}parseDomTarget(e){const t=e.trim();return t?/^[.#\[]/.test(t)||t.includes(" ")||t.includes(">")?{selector:t}:{elementId:t.replace(/^#/,"")}:{}}findDomTarget(e){if(e.selector)try{const t=document.querySelector(e.selector);if(t)return t}catch{}return e.elementId?document.getElementById(e.elementId.replace(/^#/,"")):null}waitForRouteReady(e,t,i=6e3,s=100){return new Promise(r=>{const o=Date.now()+i,a=!!(t.elementId||t.selector),l=()=>{const c=this.isCurrentRoute(e),h=a?!!this.findDomTarget(t):!0;if(c&&h){r(!0);return}if(Date.now()>=o){r(c);return}window.setTimeout(l,s)};window.setTimeout(l,80)})}dispatchAgentNavigate(e,t){Ti(e,{presetId:t.presetId,toolName:t.toolName});const i={url:e,path:e,handled:!1,initiated_by:"agent",preset_id:t.presetId};return window.dispatchEvent(new CustomEvent("vanira:navigate",{detail:i,cancelable:!0})),i}async withElementRoute(e,t,i,s,r){if(!e){s({navigated:!1});return}if(this.isCurrentRoute(e)){s({navigated:!1,route:e});return}const o=this.resolveNavigateTarget(e);if("external"in o){i("Element route must be a same-origin path");return}const a=o.internal;if(!this.dispatchAgentNavigate(a,{presetId:r,toolName:"element_route"}).handled){window.location.assign(a);return}if(!await this.waitForRouteReady(a,t)){i(`Timed out navigating to ${a} for element action`);return}s({navigated:!0,route:a})}resolveNavigateTarget(e){const t=e.trim()||"/";if(t.startsWith("http://")||t.startsWith("https://"))try{const i=new URL(t);return i.origin===window.location.origin?{internal:`${i.pathname}${i.search}${i.hash}`||"/"}:{external:t}}catch{return{internal:t}}return{internal:t}}renderNavigate(e,t,i){var c,h;const s=String(((c=e.clientFields)==null?void 0:c.target_url)||((h=e.args)==null?void 0:h.target_url)||"/"),r=e.toolCallId;if(r&&this.settledNavigateToolCallIds.has(r))return;this.activeNavigate={ctx:e,onComplete:t,onCancel:i,targetUrl:s};const o=this.resolveNavigateTarget(s);if("external"in o){window.open(o.external,"_blank","noopener,noreferrer"),this.completeNavigate({navigation_type:"external"});return}const a=o.internal;if(!this.dispatchAgentNavigate(a,{presetId:y.Navigate,toolName:"vanira_navigate"}).handled){this.cancelNavigate("No SPA listener handled vanira:navigate","cancelled");return}this.completeNavigate({path:a,navigation_type:"internal"})}renderHighlight(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.css_selector||r.css_selector||s.selector||r.selector||""),a=String(s.highlight_color||r.highlight_color||s.color||r.color||"#a855f7"),l=Number(s.duration_ms||r.duration_ms||3e3);if(!o){i("No css_selector provided for highlight");return}const c=document.querySelector(o);if(!c){i(`Element not found for selector: "${o}"`);return}const h=c.style.outline,d=c.style.outlineOffset,g=c.style.boxShadow,u=c.style.transition,m=c.style.scrollMarginTop;c.style.transition="outline 0.2s ease, box-shadow 0.2s ease",c.style.outline=`3px solid ${a}`,c.style.outlineOffset="6px",c.style.boxShadow=`0 0 0 8px ${a}33, 0 0 32px ${a}88`,c.style.scrollMarginTop="100px",c.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{c.style.outline=h,c.style.outlineOffset=d,c.style.boxShadow=g,c.style.transition=u,c.style.scrollMarginTop=m},l),t({status:"success",preset_id:y.HighlightElement,message:`Element highlighted: ${o}`})}renderScreenInk(e,t,i){const s=e.args||{},r=e.clientFields||{},o=ze(),a=s.interactive===!0||s.user_draw===!0||r.interactive===!0||String(s.interactive??r.interactive??"").toLowerCase()==="true";(async()=>{const l=await o.applyInkFromArgs(s,r),c=l.strokes+l.labels;if(c===0&&!a){i("No valid strokes or labels (provide strokes[], labels[], or points)");return}const h=[];l.strokes>0&&h.push(`${l.strokes} stroke(s)`),l.labels>0&&h.push(`${l.labels} label(s)`),t({status:"success",preset_id:y.ScreenInk,message:a?`Drew ${h.join(" and ")}; user can freehand draw until cleared`:`Drew ${h.join(" and ")}`,stroke_count:l.strokes,label_count:l.labels,annotation_count:c,interactive:a||void 0})})()}renderScreenCursor(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.color||r.color||"#f97316"),a=String(s.label||r.label||""),l=Number(s.duration_ms??r.duration_ms??2500),h=ze().showCursor({x:s.x??r.x,y:s.y??r.y,css_selector:String(s.css_selector||r.css_selector||s.selector||r.selector||"")||void 0,label:a||void 0,color:o,duration_ms:l});if(!h){i("No valid position for screen cursor (provide x/y or css_selector)");return}t({status:"success",preset_id:y.ScreenCursor,message:"Screen cursor shown",x:h.px,y:h.py})}renderScreenClick(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.color||r.color||"#f97316"),a=s.show_ripple??r.show_ripple??!0,l=s.show_cursor??r.show_cursor??!0,c=s.perform_click??r.perform_click??!0,h=String(s.css_selector||r.css_selector||s.selector||r.selector||"").trim();let d,g;if(h){const v=document.querySelector(h);if(!v){i(`Element not found for selector: "${h}"`);return}const f=v.getBoundingClientRect();d=f.left+f.width/2,g=f.top+f.height/2}else{const v=s.x??r.x,f=s.y??r.y;if(v==null||f==null){i("No valid position for screen click (provide x/y or css_selector)");return}const b=window.innerWidth,C=window.innerHeight,w=Number(v),x=Number(f);d=w>=0&&w<=1?w*b:w,g=x>=0&&x<=1?x*C:x}const u=ze();l&&u.showCursor({x:d,y:g,color:o,duration_ms:800}),a&&u.showClickRipple(d,g,o);let m="",A="";if(c){const v=Ps(d,g);v&&(Ls(v),m=v.tagName.toLowerCase(),A=v.id||"")}t({status:"success",preset_id:y.ScreenClick,message:c&&m?`Clicked ${m}${A?`#${A}`:""} at (${Math.round(d)}, ${Math.round(g)})`:`Click ripple at (${Math.round(d)}, ${Math.round(g)})`,x:d,y:g,clicked_tag:m||void 0,clicked_id:A||void 0})}renderClickElement(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.element_id||r.element_id||s.id||r.id||"").trim().replace(/^#/,""),a=s.scroll_before_click??r.scroll_before_click??!0,l=this.extractElementRoute(e);if(!o){i("No element_id provided for click");return}this.withElementRoute(l,{elementId:o},i,c=>{this.executeClickElement(o,a,c,t,i)},y.ClickElement)}executeClickElement(e,t,i,s,r){const o=document.getElementById(e);if(!o){r(`Element not found for id: "${e}"`);return}if(!this.isElementClickable(o)){r(`Element matched but is not clickable: "#${e}"`);return}t!==!1&&t!=="false"&&o.scrollIntoView({behavior:"smooth",block:"center"}),o.classList.add("vnr-click-pulse"),window.setTimeout(()=>o.classList.remove("vnr-click-pulse"),450),this.programmaticClick(o),s({status:"success",preset_id:y.ClickElement,element_id:e,...i.route?{route:i.route}:{},...i.navigated?{navigated_to_route:i.route}:{},message:`Clicked element: #${e}`,tag_name:o.tagName.toLowerCase(),element_text:(o.textContent||"").trim().slice(0,120)})}renderSelectOption(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.element_id||r.element_id||s.id||r.id||"").trim().replace(/^#/,""),a=this.extractElementRoute(e),l=String(s.option_value||r.option_value||"").trim(),c=String(s.option_label||r.option_label||s.option_text||r.option_text||"").trim();if(!o){i("No element_id provided for select");return}if(!l&&!c){i("Provide option_value or option_label");return}this.withElementRoute(a,{elementId:o},i,h=>{this.executeSelectOption(o,l,c,h,t,i)},y.SelectOption)}async executeSelectOption(e,t,i,s,r,o){var h,d,g,u;const a=document.getElementById(e);if(!a){o(`Element not found for id: "${e}"`);return}a.scrollIntoView({behavior:"smooth",block:"center"});let l="",c="";if(a instanceof HTMLSelectElement){if(!this.setNativeSelectValue(a,t,i)){o(`No matching option in #${e}`);return}l=a.value,c=((d=(h=a.options[a.selectedIndex])==null?void 0:h.text)==null?void 0:d.trim())||l}else{const m=a.querySelector("select");if(m instanceof HTMLSelectElement){if(!this.setNativeSelectValue(m,t,i)){o(`No matching option in #${e} select`);return}l=m.value,c=((u=(g=m.options[m.selectedIndex])==null?void 0:g.text)==null?void 0:u.trim())||l}else{if(!await this.selectCustomDropdownOption(a,t,i)){o(`Could not select option in #${e}`);return}l=t||i,c=i||t}}r({status:"success",preset_id:y.SelectOption,element_id:e,option_value:l||t,option_label:c||i,...s.route?{route:s.route}:{},...s.navigated?{navigated_to_route:s.route}:{},message:`Selected option in #${e}`})}setNativeSelectValue(e,t,i){const s=t.trim();if(s&&this.applyNativeSelectMatch(e,s,{matchValue:!0,matchLabel:!0}))return!0;const r=i.trim();return!!(r&&this.applyNativeSelectMatch(e,r,{matchValue:!0,matchLabel:!0}))}applyNativeSelectMatch(e,t,i){const s=t.trim();if(!s)return!1;const r=s.toLowerCase();for(const o of Array.from(e.options))if(i.matchValue&&o.value===s)return e.value=o.value,this.dispatchInputChange(e),!0;if(i.matchLabel)for(const o of Array.from(e.options)){const a=o.text.trim().toLowerCase();if(a===r||a.includes(r))return e.value=o.value,this.dispatchInputChange(e),!0}return!1}async selectCustomDropdownOption(e,t,i){this.programmaticClick(e),await new Promise(o=>window.setTimeout(o,200));const s=(i||t||"").trim().toLowerCase(),r=Array.from(document.querySelectorAll('[role="option"], [role="menuitem"], [role="menuitemradio"], li, button, a, div'));for(const o of r){if(!o.offsetParent&&o!==document.activeElement)continue;const a=(o.textContent||"").trim().toLowerCase(),l=o.getAttribute("data-value")||o.getAttribute("value")||"";if(t&&l===t)return this.programmaticClick(o),!0;if(s&&a&&(a===s||a.includes(s)))return this.programmaticClick(o),!0}return!1}renderSetDate(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.element_id||r.element_id||s.id||r.id||"").trim().replace(/^#/,""),a=this.extractElementRoute(e),l=String(s.date||r.date||"").trim(),c=String(s.input_kind||r.input_kind||"text").trim().toLowerCase(),h=String(s.text_format||r.text_format||"YYYY-MM-DD").trim();if(!o){i("No element_id provided for set date");return}if(!this.parseIsoDate(l)){i("date must be ISO YYYY-MM-DD");return}this.withElementRoute(a,{elementId:o},i,d=>{this.executeSetDate(o,l,c,h,d,t,i)},y.SetDate)}executeSetDate(e,t,i,s,r,o,a){const l=document.getElementById(e);if(!l){a(`Element not found for id: "${e}"`);return}if(!(l instanceof HTMLInputElement)&&!(l instanceof HTMLTextAreaElement)){a(`Element #${e} is not an input or textarea`);return}l.scrollIntoView({behavior:"smooth",block:"center"}),l.focus({preventScroll:!0});const c=i==="native_date"||l.type==="date",h=c?t:this.formatIsoDate(t,s);this.setNativeInputValue(l,h),o({status:"success",preset_id:y.SetDate,element_id:e,date:t,formatted_value:h,input_kind:c?"native_date":"text",text_format:c?"YYYY-MM-DD":s,...r.route?{route:r.route}:{},...r.navigated?{navigated_to_route:r.route}:{},message:`Set date on #${e}`})}parseIsoDate(e){const t=String(e).trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const i=parseInt(t[1],10),s=parseInt(t[2],10),r=parseInt(t[3],10);return s<1||s>12||r<1||r>31?null:{y:t[1],mo:t[2],d:t[3],year:i,month:s,day:r}}formatIsoDate(e,t){const i=this.parseIsoDate(e);if(!i)return e;const{y:s,mo:r,d:o,month:a,day:l}=i,c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];switch(t){case"DD/MM/YYYY":return`${o}/${r}/${s}`;case"MM/DD/YYYY":return`${r}/${o}/${s}`;case"DD-MM-YYYY":return`${o}-${r}-${s}`;case"D MMM YYYY":return`${l} ${c[a-1]} ${s}`;case"YYYY-MM-DD":default:return e}}setNativeInputValue(e,t){var r;const i=e instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,s=(r=Object.getOwnPropertyDescriptor(i,"value"))==null?void 0:r.set;s?s.call(e,t):e.value=t,this.dispatchInputChange(e)}dispatchInputChange(e){e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}isElementClickable(e){if(e.hasAttribute("disabled")||"disabled"in e&&e.disabled)return!1;const t=window.getComputedStyle(e);return!(t.display==="none"||t.visibility==="hidden"||t.pointerEvents==="none")}programmaticClick(e){try{e.focus({preventScroll:!0})}catch{}const t=e.tagName.toLowerCase(),i=t==="input"?e.type.toLowerCase():"";if((t==="button"||t==="a"||["submit","button","checkbox","radio","reset"].includes(i))&&typeof e.click=="function"){e.click();return}const r={bubbles:!0,cancelable:!0,view:window,button:0,buttons:1};e.dispatchEvent(new MouseEvent("mousedown",r)),e.dispatchEvent(new MouseEvent("mouseup",r)),e.dispatchEvent(new MouseEvent("click",r))}applyBoardSizeToModal(e){const t=Ir[this.boardSizePreset],i=this.boardViewMode==="reduced"?.5:1,s=gi(t.maxWidth,i),r=gi(t.height,i);e.style.setProperty("width",s,"important"),e.style.setProperty("max-width",s,"important"),e.style.setProperty("height",r,"important"),e.style.setProperty("max-height",r,"important"),e.classList.toggle("is-reduced",i<1),this.boardViewMode==="reduced"&&this.syncBoardDragLayout(e)}syncBoardResizeButton(e){if(!e)return;const t=this.boardViewMode==="reduced";e.innerHTML=t?kr:Er,e.setAttribute("aria-label",t?"Restore board size":"Shrink board to half size"),e.title=t?"Restore board size":"Shrink board to half size"}toggleBoardReduced(e){const t=this.boardViewMode==="reduced";this.boardViewMode=t?"expanded":"reduced",t||(this.boardDragPosition=null),this.applyBoardSizeToModal(e),this.applyBoardLayoutMode(this.getBoardOverlay(),e)}wireChalkboardChrome(e,t){let i=e.querySelector(".vnr-whiteboard-header");if(i){const s=i.querySelector(".vnr-whiteboard-resize-btn");s&&(s.onclick=()=>this.toggleBoardReduced(e));const r=i.querySelector(".vnr-whiteboard-close-btn");r&&(r.onclick=()=>{if(this.activePresetGeneration++,t)try{t()}catch{}this.closeBoardUi()})}else{i=document.createElement("div"),i.className="vnr-whiteboard-header";const s=document.createElement("button");s.type="button",s.className="vnr-whiteboard-action-btn vnr-whiteboard-resize-btn",s.onclick=()=>this.toggleBoardReduced(e);const r=document.createElement("button");r.type="button",r.className="vnr-whiteboard-action-btn is-close vnr-whiteboard-close-btn",r.innerHTML=Sr,r.setAttribute("aria-label","Close board"),r.title="Close board",r.onclick=()=>{if(this.activePresetGeneration++,t)try{t()}catch{}this.closeBoardUi()},i.appendChild(s),i.appendChild(r);const o=e.querySelector(".vnr-whiteboard-canvas-wrap");o?e.insertBefore(i,o):e.prepend(i)}this.applyBoardSizeToModal(e),this.applyBoardLayoutMode(this.getBoardOverlay(),e),i&&this.wireBoardDrag(i,e)}wireChalkboardCloseButton(e,t){this.wireChalkboardChrome(e,t)}styleChalkboardTextarea(e){e.style.width="100%",e.style.height="100%",e.style.flex="1",e.style.position="relative",e.style.zIndex="1",e.style.background="transparent",e.style.border="none",e.style.padding="20px 28px 24px",e.style.fontSize="22px",e.style.lineHeight="1.55",e.style.fontFamily="'Architects Daughter', 'Caveat', 'Chalkboard SE', 'Chalkboard', cursive, sans-serif",e.style.color="#ffffff",e.style.textShadow="0 0 3px rgba(255, 255, 255, 0.45), 0 0 8px rgba(255, 255, 255, 0.15)",e.style.outline="none",e.style.resize="none",e.style.boxSizing="border-box"}applySplitBoardLayout(e,t){let i=e.querySelector(".vnr-whiteboard-draw-zone");if(i)return i;Z("Board","Applying split layout — diagram top, notes below");const s=e.querySelector(".vnr-whiteboard-draw-layer");i=document.createElement("div"),i.className="vnr-whiteboard-draw-zone",i.style.flex="0 0 42%",i.style.minHeight="0",i.style.position="relative",i.style.width="100%",i.style.borderBottom="1px solid rgba(255,255,255,0.1)",i.style.background="#08080a";const r=document.createElement("div");for(r.className="vnr-whiteboard-text-zone",r.style.flex="1",r.style.minHeight="0",r.style.display="flex",r.style.flexDirection="column",r.style.position="relative",r.style.background="#0a0a0c",r.style.overflow="hidden";e.firstChild;)e.removeChild(e.firstChild);return e.appendChild(i),e.appendChild(r),r.appendChild(t),s?i.appendChild(s):ue(i),this.styleChalkboardTextarea(t),this.syncBoardLayout(e),i}syncBoardLayout(e){const t=e.querySelector(".vnr-whiteboard-draw-zone");if(!t)return;const i=this.boardInk.strokes.length>0||this.boardInk.labels.length>0||this.boardDrawInProgress;t.style.display=i?"":"none",t.style.flex=i?"0 0 42%":"0 0 0",t.style.minHeight=i?"200px":"0",this.syncBoardChapterTitle(t),Z("Board:Layout",i?"diagram top + notes below":"notes full board",{strokes:this.boardInk.strokes.length,labels:this.boardInk.labels.length})}syncBoardChapterTitle(e){const t=e??document.querySelector(".vnr-whiteboard-draw-zone");if(!t)return;let i=t.querySelector(".vnr-board-chapter-title");if(!this.boardChapterTitle){i==null||i.remove();return}i||(i=document.createElement("div"),i.className="vnr-board-chapter-title",i.style.cssText=["position:absolute","top:10px","left:12px","right:12px","z-index:3","pointer-events:none","text-align:center","color:#4A9EFF",'font-family:"Architects Daughter","Caveat",cursive,sans-serif',"font-size:22px","line-height:1.3","text-shadow:none"].join(";"),t.appendChild(i)),i.textContent=this.boardChapterTitle}getBoardDrawZone(e){const t=this.upgradeChalkboardCanvas(e),i=this.applySplitBoardLayout(t,e);return this.syncBoardLayout(t),i}upgradeChalkboardCanvas(e){let t=e.closest(".vnr-whiteboard-canvas-wrap");if(t)return t;Z("Board","Upgrading legacy chalkboard — adding draw layer");const i=e.parentElement;if(!i)return e;t=document.createElement("div"),t.className="vnr-whiteboard-canvas-wrap",t.style.display="flex",t.style.flexDirection="column",t.style.flex="1",t.style.height="100%",t.style.position="relative",i.insertBefore(t,e),t.appendChild(e),e.style.position="relative",e.style.zIndex="1",e.style.background="transparent",this.applySplitBoardLayout(t,e);const s=t.querySelector(".vnr-whiteboard-draw-zone");return(this.boardInk.strokes.length>0||this.boardInk.labels.length>0)&&this.syncDiagramLayer(ue(s)),t}ensureChalkboardTextarea(e){let t=document.querySelector(".vnr-whiteboard-textarea");if(t){this.syncChalkboardNotes();const o=this.upgradeChalkboardCanvas(t);this.applySplitBoardLayout(o,t);const a=o.querySelector(".vnr-whiteboard-draw-zone"),l=ue(a);l.childElementCount<=1&&(this.boardInk.strokes.length>0||this.boardInk.labels.length>0)&&this.syncDiagramLayer(l);const c=t.closest(".vnr-whiteboard-modal");return c&&(this.wireChalkboardChrome(c,e),this.revealBoardUi(c)),this.syncBoardLayout(o),t}if(!document.getElementById("vnr-chalk-font")){const o=document.createElement("link");o.id="vnr-chalk-font",o.rel="stylesheet",o.href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Caveat:wght@400;700&display=swap",document.head.appendChild(o)}const i=this.createOverlay();i.classList.add("vnr-whiteboard-overlay","vnr-whiteboard-overlay-expanded");const s=document.createElement("div");s.className="vnr-modal vnr-whiteboard-modal",s.style.position="relative",s.style.display="flex",s.style.flexDirection="column",s.style.background="#0d0e12",s.style.border="12px solid #5c4033",s.style.borderRadius="16px",s.style.boxShadow="0 25px 60px rgba(0,0,0,0.65), inset 0 0 30px rgba(0,0,0,0.95)",s.style.padding="0",s.style.overflow="hidden",this.applyBoardSizeToModal(s);const r=document.createElement("div");if(r.className="vnr-whiteboard-canvas-wrap",r.style.display="flex",r.style.flexDirection="column",r.style.flex="1",r.style.minHeight="0",r.style.height="auto",r.style.position="relative",t=document.createElement("textarea"),t.className="vnr-whiteboard-textarea",t.placeholder="Notes appear here…",t.value=this.chalkboardContent,t.addEventListener("input",()=>{this.chalkboardContent=t.value}),r.appendChild(t),this.applySplitBoardLayout(r,t),this.syncBoardLayout(r),this.boardInk.strokes.length>0||this.boardInk.labels.length>0){const o=r.querySelector(".vnr-whiteboard-draw-zone");this.syncDiagramLayer(ue(o))}return s.appendChild(r),i.appendChild(s),this.wireChalkboardChrome(s,e),t}eraseChalkboardInMemory(e,t){return e==="words"?this.eraseLastWords(this.chalkboardContent,t):(this.boardChapterTitle="","")}renderEraseDrawingBoard(e,t,i){this.syncChalkboardNotes();const s=this.boardInk.strokes.length,r=this.boardInk.labels.length,o=s>0||r>0,a=document.querySelector(".vnr-whiteboard-textarea");if(a){const l=this.getBoardDrawZone(a),c=ue(l);Ke(c);const h=a.closest(".vnr-whiteboard-canvas-wrap");h&&this.syncBoardLayout(h)}else if(o){this.ensureChalkboardTextarea(()=>i("User dismissed chalkboard"));const l=document.querySelector(".vnr-whiteboard-textarea");if(l){const c=this.getBoardDrawZone(l);Ke(ue(c));const h=l.closest(".vnr-whiteboard-canvas-wrap");h&&this.syncBoardLayout(h)}}this.boardInk=Ve(),this.boardDrawInProgress=!1,this.boardChapterTitle="",Z("Board:EraseDraw","Cleared diagram panel (notes kept)",{strokesCleared:s,labelsCleared:r}),t({status:"success",preset_id:y.EraseDraw,message:o?`Cleared ${s} stroke(s) and ${r} label(s) from the diagram panel. Written notes were kept.`:"Diagram panel was already empty. Written notes were not changed.",strokes_cleared:s,labels_cleared:r,shapes_cleared:s+r,diagram_cleared:!0,notes_preserved:!0,whiteboard_content:this.chalkboardContent,text_written:this.chalkboardContent,board_snapshot:this.getBoardSnapshot(),...this.buildBoardVerification()})}renderDrawShapes(e,t,i){const s={...e.clientFields||{},...e.args||{}};this.syncChalkboardNotes();const r=er(s,e.clientFields||{}),o=this.activePresetGeneration;if(Z("Board:Draw","draw_on_board invoked",{toolCallId:e.toolCallId,strokes:r.strokes.length,labels:r.labels.length,clearBefore:r.clearBefore,animate:r.animate,shape_duration_ms:r.durationMs}),!r.clearBefore&&r.strokes.length===0&&r.labels.length===0){Ni("Board:Draw","No strokes or labels",s),t({status:"error",preset_id:y.Draw,message:"Provide strokes[] or labels[] (same as vanira_screen_ink), or flat points/path_d/label_text+coords. Use clear_old_diagrams_on_board:true to wipe the diagram.",board_snapshot:this.getBoardSnapshot()});return}const a=this.ensureChalkboardTextarea(()=>i("User dismissed chalkboard"));if(!a){t({status:"error",message:"Could not open chalkboard"});return}this.syncChalkboardNotes();const l=this.getBoardDrawZone(a),c=ue(l);if(r.clearBefore){Ke(c),this.boardInk=Ve();const g=a.closest(".vnr-whiteboard-canvas-wrap");g&&this.syncBoardLayout(g),Z("Board:Draw","Cleared old diagrams on board (notes kept)")}if(r.strokes.length===0&&r.labels.length===0){t({status:"success",preset_id:y.Draw,message:"Old diagrams cleared from board",strokes_drawn:0,labels_drawn:0,shapes_drawn:0,clear_old_diagrams_on_board:!0,clear_drawings:!0,board_snapshot:this.getBoardSnapshot(),...this.buildBoardVerification()});return}const h=(g,u,m={})=>{this.boardDrawInProgress=!1;const A=o!==this.activePresetGeneration,v=a.closest(".vnr-whiteboard-canvas-wrap");v&&this.syncBoardLayout(v);const f={status:A?"cancelled":"success",preset_id:y.Draw,message:A?`Draw interrupted (${g} stroke(s), ${u} label(s) on board)`:`Drew ${g} stroke(s) and ${u} label(s) on chalkboard`,strokes_drawn:g,labels_drawn:u,shapes_drawn:g+u,shape_duration_ms:r.durationMs,clear_old_diagrams_on_board:r.clearBefore,clear_drawings:r.clearBefore,whiteboard_content:this.chalkboardContent,text_written:this.chalkboardContent,board_snapshot:this.getBoardSnapshot(),...this.buildBoardVerification(),...m};Z("Board:Draw","finished",f),t(f)};this.boardDrawInProgress=!0;const d=a.closest(".vnr-whiteboard-canvas-wrap");if(d&&this.syncBoardLayout(d),!r.animate||r.durationMs<=0){this.boardInk.strokes.push(...r.strokes),this.boardInk.labels.push(...r.labels),this.syncDiagramLayer(c),h(r.strokes.length,r.labels.length);return}(this.boardInk.strokes.length>0||this.boardInk.labels.length>0)&&pi(c,this.boardInk,{strokeColor:r.strokeColor,labelColor:r.labelColor,strokeWidth:r.strokeWidth}),rr(c,r.strokes,r.labels,{strokeColor:r.strokeColor,labelColor:r.labelColor,strokeWidth:r.strokeWidth,animate:!0,durationMs:r.durationMs,gapMs:r.gapMs,isAborted:()=>o!==this.activePresetGeneration}).then(({strokesDrawn:g,labelsDrawn:u})=>{this.boardInk.strokes.push(...r.strokes),this.boardInk.labels.push(...r.labels);const m={};(g<r.strokes.length||u<r.labels.length)&&(m.flushed_remaining=!0),h(g,u,m)})}renderTypeText(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.element_id||r.element_id||s.css_selector||r.css_selector||s.selector||r.selector||"").trim(),a=o?this.extractElementRoute(e):"",l=c=>{this.executeTypeText(e,t,i,o,c)};if(!a){l({navigated:!1});return}this.withElementRoute(a,this.parseDomTarget(o),i,l,y.TypeText)}executeTypeText(e,t,i,s,r){const o=e.args||{},a=e.clientFields||{};let l=String(o.text_to_type||a.text_to_type||o.text||a.text||o.value||a.value||o.search_query||a.search_query||o.query||a.query||"");const{chapterTitle:c,body:h}=this.splitChapterHeading(l),d=Number(o.delay_ms!==void 0?o.delay_ms:a.delay_ms!==void 0?a.delay_ms:50),g=this.resolveTypingMode(e),u=k=>{const S={...k,...r.route?{route:r.route}:{},...r.navigated?{navigated_to_route:r.route}:{}};if(document.querySelector(".vnr-whiteboard-modal")){S.board_snapshot=this.getBoardSnapshot();const I=document.querySelector(".vnr-whiteboard-canvas-wrap");I&&this.syncBoardLayout(I)}t(S)};let m=null;s&&!c&&(m=this.findDomTarget(this.parseDomTarget(s)));const A=()=>{Z("Board:Type","Using chalkboard fallback",{toolCallId:e.toolCallId,textPreview:(h||l).slice(0,80),sessionChars:this.chalkboardContent.length});const k=this.ensureChalkboardTextarea(()=>i("User dismissed typing popup"));if(!k){u({status:"error",message:"Could not open chalkboard"});return}k.focus(),c&&(this.boardChapterTitle=c);const S=c&&!h?l.trim().split(`
|
|
2913
|
+
`)[0].trim():h||l;let I=this.chalkboardContent||"";const P=I?`
|
|
2914
|
+
${S}`:S,z=this.activePresetGeneration,Q=d<=0;if(this.activeBoardProgress={ctx:e,mode:"type",textAtStart:I,plannedUnits:P.length,unitsDone:0},Q){this.chalkboardContent=I+P,k.value=this.chalkboardContent,k.scrollTop=k.scrollHeight;const L=k.closest(".vnr-whiteboard-canvas-wrap");if(L){const Y=L.querySelector(".vnr-whiteboard-draw-zone");this.syncBoardChapterTitle(Y),this.syncBoardLayout(L)}this.syncBoardProgressUnits(P.length),Z("Board:Type","Chalkboard typed (instant)",{chars:this.chalkboardContent.length,preview:this.chalkboardContent.slice(0,120),chapter:c}),u({status:"success",preset_id:y.TypeText,typing_mode:"append",message:"Typed on chalkboard",whiteboard_content:this.chalkboardContent,text_written:this.chalkboardContent,...this.buildBoardVerification()})}else{let L=I,Y=0;const M=()=>{if(z!==this.activePresetGeneration){this.chalkboardContent=L,k.value=L;return}document.body.contains(k)&&(Y<P.length?(L+=P[Y],this.chalkboardContent=L,k.value=L,k.scrollTop=k.scrollHeight,Y++,this.syncBoardProgressUnits(Y),this.scheduleBoardAnim(M,d)):(this.syncBoardProgressUnits(P.length),u({status:"success",preset_id:y.TypeText,typing_mode:"append",message:"Typed on chalkboard",whiteboard_content:this.chalkboardContent,text_written:this.chalkboardContent,...this.buildBoardVerification()})))};M()}};if(!m){A();return}if(m.focus(),!(m instanceof HTMLInputElement||m instanceof HTMLTextAreaElement||"value"in m)){m.textContent=l,u({status:"success"});return}const f=m;let b=f.value||"";if(g==="replace"&&b&&(this.setNativeInputValue(f,""),b=""),d<=0){f.value=b+l,this.dispatchInputChange(f),u({status:"success",preset_id:y.TypeText,typing_mode:g,message:`Typed into ${s||"input"}`});return}let C=b,w=0;const x=this.activePresetGeneration,E=()=>{x===this.activePresetGeneration&&document.body.contains(f)&&(w<l.length?(C+=l[w],f.value=C,f.dispatchEvent(new Event("input",{bubbles:!0})),w++,this.scheduleBoardAnim(E,d)):(f.dispatchEvent(new Event("change",{bubbles:!0})),u({status:"success",preset_id:y.TypeText,typing_mode:g,message:`Typed into ${s||"input"}`})))};E()}resolveTypingMode(e){const t=e.args||{},i=e.clientFields||{},s=String(t.typing_mode||i.typing_mode||"append").trim().toLowerCase();return s==="replace"||s==="clear"||s==="clear_first"||s==="erase_and_type"?"replace":"append"}renderEraseText(e,t,i){const s=e.args||{},r=e.clientFields||{},o=String(s.element_id||r.element_id||s.css_selector||r.css_selector||s.selector||r.selector||"").trim(),a=o?this.extractElementRoute(e):"",l=c=>{this.executeEraseText(e,t,i,o,c)};if(!a){l({navigated:!1});return}this.withElementRoute(a,this.parseDomTarget(o),i,l,y.EraseText)}executeEraseText(e,t,i,s,r){const o=e.args||{},a=e.clientFields||{},l=String(o.mode||a.mode||"all").trim().toLowerCase(),c=Number(o.num_words!==void 0?o.num_words:o.words_count!==void 0?o.words_count:o.count!==void 0?o.count:1),h=Number(o.delay_ms!==void 0?o.delay_ms:a.delay_ms!==void 0?a.delay_ms:50),d=w=>{t({...w,...r.route?{route:r.route}:{},...r.navigated?{navigated_to_route:r.route}:{}})};let g=null;if(s&&(g=this.findDomTarget(this.parseDomTarget(s))),g||(g=document.querySelector(".vnr-whiteboard-textarea")),!g&&this.chalkboardContent&&(g=this.ensureChalkboardTextarea(()=>i("User dismissed chalkboard"))),!g){if(this.chalkboardContent){this.chalkboardContent=this.eraseChalkboardInMemory(l,c),d({status:"success",erased_from_memory:!0});return}d({status:"error",message:"Target element not found"});return}if(g.classList.contains("vnr-whiteboard-textarea")){const w=g.closest(".vnr-whiteboard-modal");w&&this.wireChalkboardCloseButton(w,()=>i("User dismissed chalkboard"))}if(!(g instanceof HTMLInputElement)&&!(g instanceof HTMLTextAreaElement)){if(l==="words"){const w=g.textContent||"";g.textContent=this.eraseLastWords(w,c)}else g.textContent="";d({status:"success"});return}const u=g,m=u.value||"";let A="";if(l==="words"?A=this.eraseLastWords(m,c):A="",h<=0){if(u.value=A,u.classList.contains("vnr-whiteboard-textarea")){this.chalkboardContent=A;const w=Math.max(0,m.length-A.length);this.activeBoardProgress={ctx:e,mode:"erase",textAtStart:m,plannedUnits:w,unitsDone:w}}u.dispatchEvent(new Event("input",{bubbles:!0})),u.dispatchEvent(new Event("change",{bubbles:!0})),d({status:"success"});return}const v=this.activePresetGeneration,f=u.classList.contains("vnr-whiteboard-textarea"),b=Math.max(0,m.length-A.length);f&&(this.activeBoardProgress={ctx:e,mode:"erase",textAtStart:m,plannedUnits:b,unitsDone:0});const C=()=>{v===this.activePresetGeneration&&document.body.contains(u)&&(u.value.length>A.length?(u.value=u.value.slice(0,-1),f&&(this.chalkboardContent=u.value,this.syncBoardProgressUnits(m.length-u.value.length)),u.dispatchEvent(new Event("input",{bubbles:!0})),u.classList.contains("vnr-whiteboard-textarea")&&(u.scrollTop=u.scrollHeight),this.scheduleBoardAnim(C,Math.max(10,h/2))):(u.dispatchEvent(new Event("change",{bubbles:!0})),d({status:"success"})))};C()}eraseLastWords(e,t){if(!e)return"";const i=e.trimEnd();if(!i)return"";let s=i;for(let r=0;r<t;r++){const o=s.lastIndexOf(" "),a=s.lastIndexOf(`
|
|
2915
|
+
`),l=Math.max(o,a);if(l===-1){s="";break}else s=s.slice(0,l).trimEnd()}return s}}const be=class be extends On{constructor(t){super(t);p(this,"vaniraClient",null);p(this,"currentView",null);p(this,"presetRenderer",null);p(this,"boardAbortHandler",null);p(this,"clipRegionHandler",null);p(this,"isPanelOpen",!1);p(this,"callActive",!1);p(this,"callStatus","disconnected");p(this,"micMuted",!1);p(this,"eventSource",null);p(this,"pillAudioCtx",null);p(this,"pillAgentAnalyser",null);p(this,"pillAgentData",null);p(this,"pillActivityRaf",null);p(this,"pillLastTranscriptionAt",0);p(this,"pillActivityState","idle");p(this,"floatingButton",null);p(this,"floatingWelcomeChips",null);p(this,"voiceChatPill",null);p(this,"cleanCardLauncher",null);p(this,"humanPresenceLauncher",null);p(this,"panel",null);p(this,"welcomeChipsData",[]);p(this,"chatAdapter");p(this,"sessionManager",null);p(this,"sessionActive",!1);p(this,"widgetMode","voice_only");p(this,"agentId","");p(this,"prospectGroupId","");p(this,"chatServerUrl","");p(this,"prospectId","");p(this,"chatId",null);p(this,"conversationId",null);p(this,"widgetId","");p(this,"pkKey","");p(this,"chatInitialized",!1);p(this,"primaryColor","#000000");p(this,"secondaryColor","#111111");p(this,"gradient",null);p(this,"positionType","fixed");p(this,"position","bottom-right");p(this,"widgetIcon",null);p(this,"iconConfig",null);p(this,"chatWelcomeMessage",null);this.chatAdapter=new es,this.processConfig(t)}initSessionManager(){const t=this.widgetId||this.agentId||"default";this.sessionManager=new nt(t),this.sessionManager.on("tab_took_over",()=>{this.sessionActive=!1,this.showTabConflictBanner("taken_over")}),this.sessionManager.on("session_cleared",()=>{});const i=this.sessionManager.claimSession();return this.sessionActive=i,i}restoreSessionMessages(){var l,c,h;const t=(l=this.sessionManager)==null?void 0:l.getSession();if(!t)return;const i=(h=(c=this.currentView)==null?void 0:c.getChatWindow)==null?void 0:h.call(c);if(!i)return;const s=t.messages.filter(d=>d.content.trim()!==""),r=`vanira_calls_${this.widgetId||this.agentId}`,o=JSON.parse(localStorage.getItem(r)||"[]");if(s.length===0&&o.length===0)return;i.clearMessages();const a=[...s.map((d,g)=>({type:"msg",role:d.role,content:d.content,ts:d.timestamp??g})),...o.map(d=>({type:"call",durationMs:d.durationMs,startedAt:d.startedAt,ts:d.startedAt}))];a.sort((d,g)=>d.ts-g.ts),a.forEach(d=>{d.type==="msg"?i.addMessage(d.role,d.content,d.ts):i.addCallRecord(d.durationMs,d.startedAt)})}showTabConflictBanner(t){var i,s;this.root&&((i=this.root.querySelector(".vanira-tab-conflict-banner"))==null||i.remove(),t==="conflict"&&((s=this.sessionManager)==null||s.forceClaimSession(),this.sessionActive=!0,this.widgetMode.includes("chat")&&this.initializeChatSession(!1)))}playMessageSound(t){try{if(!be.audioContext){const a=window.AudioContext||window.webkitAudioContext;if(!a)return;be.audioContext=new a}const i=be.audioContext;i.state==="suspended"&&i.resume().catch(()=>{});const s=i.createOscillator(),r=i.createGain();s.connect(r),r.connect(i.destination);const o=i.currentTime;t==="send"?(s.type="sine",s.frequency.setValueAtTime(300,o),s.frequency.exponentialRampToValueAtTime(500,o+.05),r.gain.setValueAtTime(0,o),r.gain.linearRampToValueAtTime(.1,o+.01),r.gain.exponentialRampToValueAtTime(.001,o+.1),s.start(o),s.stop(o+.1)):(s.type="sine",s.frequency.setValueAtTime(500,o),s.frequency.exponentialRampToValueAtTime(800,o+.1),r.gain.setValueAtTime(0,o),r.gain.linearRampToValueAtTime(.15,o+.02),r.gain.exponentialRampToValueAtTime(.001,o+.2),s.start(o),s.stop(o+.2))}catch{}}handleWelcomePayload(t,i="assistant"){var o,a,l,c,h,d,g,u;if(!t||this.widgetMode==="voice_only")return;t.buttons&&Array.isArray(t.buttons)?this.welcomeChipsData=t.buttons:((o=t.widget)==null?void 0:o.type)==="button_list"&&((a=t.widget.data)!=null&&a.buttons)&&(this.welcomeChipsData=t.widget.data.buttons),this.updateWelcomeChipsVisibility();const s=(c=(l=this.currentView)==null?void 0:l.getChatWindow)==null?void 0:c.call(l);let r=t.text||t.response||t.content||t.message||"";if(!r&&!this.welcomeChipsData.length&&(r="Hey! how can I help you ?"),!r&&typeof t=="string"&&t.trim().startsWith("{"))try{const m=JSON.parse(t);r=m.text||m.response||m.content||m.message||"",((h=m.widget)==null?void 0:h.type)==="button_list"&&((d=m.widget.data)!=null&&d.buttons)&&(this.welcomeChipsData=m.widget.data.buttons)}catch{}if(s){if(!r&&this.welcomeChipsData.length===0)return;const m=(g=this.sessionManager)==null?void 0:g.getSession();(m==null?void 0:m.messages.some(v=>v.content===r&&v.role===i))||(r&&(s.addMessage(i,r),(u=this.sessionManager)==null||u.pushMessage(i,r)),this.welcomeChipsData.length>0&&s.addButtons(this.welcomeChipsData))}}async initializeChatSession(t=!1){var i,s,r,o,a;if(this.sessionActive&&!this.chatInitialized){this.chatInitialized=!0;try{oe.setChatUrl(this.chatServerUrl);const l=(i=this.sessionManager)==null?void 0:i.getSession();if(!t&&(l!=null&&l.prospectId)){this.prospectId=l.prospectId,this.chatId=l.chatId,this.conversationId=l.conversationId||null,this.restoreSessionMessages(),this.chatId&&!this.eventSource&&(this.eventSource=oe.listenForAdminReplies(this.chatId,this.prospectId,h=>{var d,g,u;(g=(d=this.currentView)==null?void 0:d.getChatWindow)==null||g.call(d).addMessage("assistant",h),(u=this.sessionManager)==null||u.pushMessage("assistant",h),this.playMessageSound("receive")}));return}this.prospectId||(this.prospectGroupId?this.prospectId=await oe.createChatProspect(this.prospectGroupId):this.prospectId=`anon_${Date.now()}_${Math.random().toString(36).substr(2,9)}`);const c=await oe.fetchWelcomeMessage(this.agentId,this.prospectId,this.widgetId||void 0,this.pkKey||void 0);c&&(this.handleWelcomePayload(c),c.chatId&&!this.chatId&&(this.chatId=c.chatId,this.eventSource||(this.eventSource=oe.listenForAdminReplies(this.chatId,this.prospectId,h=>{var d,g,u;(g=(d=this.currentView)==null?void 0:d.getChatWindow)==null||g.call(d).addMessage("assistant",h),(u=this.sessionManager)==null||u.pushMessage("assistant",h),this.playMessageSound("receive")}))),c.conversationId&&(this.conversationId=c.conversationId)),(s=this.sessionManager)==null||s.saveIds(this.prospectId,this.chatId,this.conversationId)}catch{const c="Hey! how can I help you ?";(o=(r=this.currentView)==null?void 0:r.getChatWindow)==null||o.call(r).addMessage("assistant",c),(a=this.sessionManager)==null||a.pushMessage("assistant",c)}}}async initialize(t,i){await super.initialize(t),this.processConfig(t),i&&(this.root=i),this.root&&this.ui_renderer(this.root)}processConfig(t){var i,s;if(this.widgetId=t.widgetId||t.widget_id||this.widgetId||"",this.agentId=t.agentId||t.agent_id||this.agentId||"",this.prospectGroupId=t.prospectGroupId||((i=t.client)==null?void 0:i.base_prospect_group_id)||this.prospectGroupId||"",this.widgetMode=t.widgetMode||t.mode||this.widgetMode||"voice_only",this.pkKey=t.pkKey||t.pk_key||t.publicKey||t.public_key||this.pkKey||"",this.primaryColor=t.primaryColor||t.primary_color||"#000000",this.secondaryColor=t.secondaryColor||t.secondary_color||"#111111",this.gradient=t.gradient||null,this.position=t.position||"bottom-right",this.positionType=t.positionType||"fixed",this.widgetIcon=t.widgetIcon||t.icon||null,this.iconConfig=t.iconConfig||t.icon_config||null,this.chatWelcomeMessage=t.chatWelcomeMessage||t.chat_welcome_message||((s=t.agent)==null?void 0:s.chat_welcome_message)||null,typeof this.chatWelcomeMessage=="string")try{this.chatWelcomeMessage=JSON.parse(this.chatWelcomeMessage)}catch{}this.chatServerUrl=t.serverUrl||t.chatServerUrl||"https://inboxapi.vanira.io",this.updateWelcomeChipsVisibility()}async create_call(t="continue"){var i,s,r,o;if(!(this.callActive||!this.agentId)){this.sessionActive||((i=this.sessionManager)==null||i.forceClaimSession(),this.sessionActive=!0),t==="new"&&((s=this.presetRenderer)==null||s.resetBoardSession());try{if(this.callActive=!0,this.micMuted=!1,this.syncMicMuteUi(),this.updateViewCallState(!0),this.updateViewStatus("connecting"),this.updateLauncherVisibility(),this.isPanelOpen&&this.minimizePanel(),!this.pkKey)throw new Error("[VaniraAI Widget] pk-key is required for voice calls");const a=((r=this.config)==null?void 0:r.serverUrl)||((o=this.config)==null?void 0:o.chatServerUrl),l=a&&!a.includes("travelr.club")?a:je,c=t==="continue"?Oe(this.agentId):null,h=new de({agentId:this.agentId,apiKey:this.pkKey,sessionBehavior:t,prospectId:this.prospectId||(c==null?void 0:c.prospectId)||void 0,callId:t==="continue"?c==null?void 0:c.callId:void 0,backendUrl:l});h.on("session_started",({prospectId:d,callId:g})=>{var u;d&&(this.prospectId=d,(u=this.sessionManager)==null||u.saveIds(d,this.chatId)),g&&Nt(this.agentId,g,d)}),h.on("connected",()=>this.updateViewStatus("connected")).on("disconnected",()=>this.end_call()).on("error",d=>{this.updateViewStatus("error",d)}).on("transcription",({text:d,isFinal:g})=>{var u,m;d.trim()&&(this.pillLastTranscriptionAt=Date.now()),(m=(u=this.currentView)==null?void 0:u.setTranscription)==null||m.call(u,d,g)}).on("track",({track:d})=>{var g;d.kind==="audio"&&this.setupPillAgentAudio(d),this.widgetMode.includes("avatar")&&d.kind==="video"&&((g=this.currentView)!=null&&g.setVideoTrack)&&this.currentView.setVideoTrack(d)}).on("tool_call",d=>{var m,A,v;if((m=this.presetRenderer)==null?void 0:m.handle(d,f=>{const b=Be(d.client_fields,d.arguments||d.args,d.name),C=d.tool_call_id;if(Se(b)&&C){const w=typeof f=="object"&&f!==null?f:{response:f};if(w.status==="cancelled")return;try{h.sendToolResult(C,w)}catch{}return}if(!(f&&(f.media_id||f.url)&&Ee(b))){if(ke(b)&&b){const w=typeof f=="object"&&f!==null?f:{response:f};if(w.status==="cancelled")return;const x=Ue(b,d.name,d.client_fields);h.triggerActionInterrupt(),h.sendActionTrigger(x,w);return}if(b){const w=Ue(b,d.name,d.client_fields);h.triggerInterrupt(w,f)}}},(f,b)=>{var x,E,k;const C=Be(d.client_fields,d.arguments||d.args,d.name),w=d.tool_call_id;if(Se(C)&&w){const S=(b==null?void 0:b.status)??"cancelled",I=String(((x=d.client_fields)==null?void 0:x.target_url)||(d.arguments||d.args||{}).target_url||"");try{const P=C===y.Navigate?((E=this.presetRenderer)==null?void 0:E.getNavigateTerminalResult(S,f,I||void 0))??{status:S,reason:f||"Navigation cancelled",preset_id:C,target_url:I||void 0}:((k=this.presetRenderer)==null?void 0:k.getBoardTerminalResult(S,f,C))??{status:S,reason:f||"User dismissed",preset_id:C};h.sendToolResult(w,P)}catch{}return}if(Ee(C)&&w){try{h.sendToolResult(w,{status:"cancelled",reason:f||"User dismissed",preset_id:C})}catch{}return}if(ke(C)&&w){try{h.sendToolResult(w,{status:"cancelled",reason:f||"User dismissed",preset_id:C})}catch{}return}try{h.sendToolResult(w,{status:"cancelled",reason:"User dismissed"})}catch{}},h))return;const u=new CustomEvent("vaniraai:tool_call",{detail:d,bubbles:!0,composed:!0});(v=(A=this.root)==null?void 0:A.host)==null||v.dispatchEvent(u)}),this.vaniraClient=h,await h.start(),this.boardAbortHandler=d=>{var u;const g=d.detail||{};(u=this.presetRenderer)==null||u.abortBoardTools(g.reason||"Server interrupted",g.toolCallId)},window.addEventListener(dt,this.boardAbortHandler)}catch(a){this.updateViewStatus("error",(a==null?void 0:a.message)||String(a))}}}isCallActive(){var t;return this.callActive&&!!((t=this.vaniraClient)!=null&&t.isConnected)}updateContext(t){if(!this.isCallActive()||!this.vaniraClient)return!1;try{return this.vaniraClient.updateContext(t),!0}catch{return!1}}triggerInterrupt(t,i={}){if(!this.isCallActive()||!this.vaniraClient)return!1;try{return this.vaniraClient.triggerInterrupt(t,i),!0}catch{return!1}}sendToolResult(t,i){var s;if(!((s=this.vaniraClient)!=null&&s.isConnected)||!t)return!1;try{return this.vaniraClient.sendToolResult(t,i),!0}catch{return!1}}end_call(){var s,r;this.boardAbortHandler&&(window.removeEventListener(dt,this.boardAbortHandler),this.boardAbortHandler=null),this.clipRegionHandler&&(window.removeEventListener(We,this.clipRegionHandler),this.clipRegionHandler=null);const t=(s=this.root)==null?void 0:s.host;t==null||t.classList.remove("vanira-clip-suppressed"),this.callActive=!1,this.callStatus="disconnected",this.micMuted=!1,this.syncMicMuteUi(),this.stopPillActivityMonitor();const i=this.vaniraClient;this.vaniraClient=null,i&&i.stop(),(r=this.presetRenderer)==null||r.teardownSession(),this.updateViewCallState(!1),this.updateLauncherVisibility()}updateViewCallState(t){var i;(i=this.currentView)!=null&&i.setCallActive&&this.currentView.setCallActive(t)}toggleMicMute(){return this.vaniraClient?(this.micMuted=this.vaniraClient.toggleMicrophoneMuted(),this.syncMicMuteUi(),this.micMuted):this.micMuted}syncMicMuteUi(){var t,i,s;(t=this.voiceChatPill)==null||t.setMicMuted(this.micMuted),(s=(i=this.currentView)==null?void 0:i.setMicMuted)==null||s.call(i,this.micMuted)}wireMicMuteControls(){var i,s,r;const t=()=>this.toggleMicMute();(i=this.voiceChatPill)==null||i.bindMicMuteToggle(t),(r=(s=this.currentView)==null?void 0:s.bindMicMuteToggle)==null||r.call(s,t)}updateViewStatus(t,i){var s,r,o,a,l;t==="connecting"?this.callStatus="connecting":t==="connected"?this.callStatus="connected":t==="error"?this.callStatus="error":this.callStatus="disconnected",(s=this.currentView)!=null&&s.setStatus&&this.currentView.setStatus(t,i),this.voiceChatPill&&this.callActive&&!this.isPanelOpen?t==="connected"?(this.pillActivityState="listening",this.voiceChatPill.setActivity("listening"),(o=(r=this.currentView)==null?void 0:r.setActivity)==null||o.call(r,"listening"),this.startPillActivityLoop()):this.voiceChatPill.setStatus(this.callStatus):t==="connected"&&(this.pillActivityState="listening",(l=(a=this.currentView)==null?void 0:a.setActivity)==null||l.call(a,"listening"),this.startPillActivityLoop())}setupPillAgentAudio(t){try{this.pillAudioCtx||(this.pillAudioCtx=new AudioContext),this.pillAudioCtx.state==="suspended"&&this.pillAudioCtx.resume();const i=new MediaStream([t]),s=this.pillAudioCtx.createMediaStreamSource(i);this.pillAgentAnalyser=this.pillAudioCtx.createAnalyser(),this.pillAgentAnalyser.fftSize=256,s.connect(this.pillAgentAnalyser),this.pillAgentData=new Uint8Array(this.pillAgentAnalyser.frequencyBinCount),this.startPillActivityLoop()}catch{}}readPillAgentLevel(){if(!this.pillAgentAnalyser||!this.pillAgentData)return 0;this.pillAgentAnalyser.getByteFrequencyData(this.pillAgentData);let t=0;const i=Math.min(48,this.pillAgentData.length);for(let s=0;s<i;s++)t+=this.pillAgentData[s];return i>0?t/i/255:0}startPillActivityLoop(){if(this.pillActivityRaf!==null)return;const t=()=>{var a,l;if(this.pillActivityRaf=requestAnimationFrame(t),!this.callActive||this.callStatus!=="connected")return;const i=this.readPillAgentLevel(),s=Date.now()-this.pillLastTranscriptionAt<1200,o=i>.06||s?"speaking":"listening";o!==this.pillActivityState&&(this.pillActivityState=o,this.voiceChatPill&&!this.isPanelOpen&&this.voiceChatPill.setActivity(o),(l=(a=this.currentView)==null?void 0:a.setActivity)==null||l.call(a,o))};this.pillActivityRaf=requestAnimationFrame(t)}stopPillActivityMonitor(){this.pillActivityRaf!==null&&(cancelAnimationFrame(this.pillActivityRaf),this.pillActivityRaf=null),this.pillAgentAnalyser=null,this.pillAgentData=null,this.pillLastTranscriptionAt=0,this.pillActivityState="idle",this.pillAudioCtx&&(this.pillAudioCtx.close().catch(()=>{}),this.pillAudioCtx=null)}ui_renderer(t){var c,h,d,g,u;this.root=t,this.root.innerHTML="",this.presetRenderer=new dn(t),this.root.host&&(this.positionType==="fixed"?this.root.host.classList.add("vanira-portal"):this.root.host.classList.remove("vanira-portal")),this.clipRegionHandler&&window.removeEventListener(We,this.clipRegionHandler),this.clipRegionHandler=m=>{var f,b;const A=!!((f=m.detail)!=null&&f.active),v=(b=this.root)==null?void 0:b.host;v&&v.classList.toggle("vanira-clip-suppressed",A)},window.addEventListener(We,this.clipRegionHandler);const i=document.createElement("style");i.textContent=`@keyframes vanira-slide-up {
|
|
2916
|
+
from { opacity:0; transform:translateY(16px); }
|
|
2917
|
+
to { opacity:1; transform:translateY(0); }
|
|
2918
|
+
}`,this.root.appendChild(i);const s=document.createElement("style");s.textContent=`
|
|
2919
|
+
${Gn}
|
|
2920
|
+
:host { ${Yn(this.primaryColor,this.secondaryColor)} }
|
|
2921
|
+
${Jt.styles}
|
|
2922
|
+
${qt.styles}
|
|
2923
|
+
${Wt.styles}
|
|
2924
|
+
${this.gradient?`.widget-fab { background: ${this.gradient} !important; }`:""}
|
|
2925
|
+
.clean-card-launcher {
|
|
2926
|
+
position: fixed;
|
|
2927
|
+
z-index: 9999;
|
|
2928
|
+
bottom: 20px;
|
|
2929
|
+
right: 20px;
|
|
2930
|
+
background: #ffffff;
|
|
2931
|
+
border-radius: 14px;
|
|
2932
|
+
padding: 12px 14px 10px;
|
|
2933
|
+
box-shadow: 0 6px 28px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.08);
|
|
2934
|
+
display: flex;
|
|
2935
|
+
flex-direction: column;
|
|
2936
|
+
gap: 8px;
|
|
2937
|
+
min-width: 180px;
|
|
2938
|
+
max-width: 230px;
|
|
2939
|
+
cursor: pointer;
|
|
2940
|
+
pointer-events: auto !important;
|
|
2941
|
+
animation: fadeInScale 0.35s cubic-bezier(0.34,1.56,0.64,1);
|
|
2942
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
2943
|
+
}
|
|
2944
|
+
.clean-card-logo {
|
|
2945
|
+
font-size: 8px;
|
|
2946
|
+
font-weight: 800;
|
|
2947
|
+
letter-spacing: 0.18em;
|
|
2948
|
+
text-transform: uppercase;
|
|
2949
|
+
color: rgba(0,0,0,0.28);
|
|
2950
|
+
line-height: 1;
|
|
2951
|
+
}
|
|
2952
|
+
.clean-card-title {
|
|
2953
|
+
font-size: 12px;
|
|
2954
|
+
font-weight: 700;
|
|
2955
|
+
color: #0f172a;
|
|
2956
|
+
line-height: 1.3;
|
|
2957
|
+
margin: 1px 0 0;
|
|
2958
|
+
}
|
|
2959
|
+
.clean-card-welcome {
|
|
2960
|
+
font-size: 11px;
|
|
2961
|
+
font-weight: 600;
|
|
2962
|
+
color: #475569;
|
|
2963
|
+
margin-top: 4px;
|
|
2964
|
+
line-height: 1.2;
|
|
2965
|
+
}
|
|
2966
|
+
.clean-card-launcher.has-session-choice {
|
|
2967
|
+
cursor: default;
|
|
2968
|
+
gap: 10px;
|
|
2969
|
+
padding-bottom: 12px;
|
|
2970
|
+
}
|
|
2971
|
+
.clean-card-launcher.has-session-choice .clean-card-title {
|
|
2972
|
+
display: none;
|
|
2973
|
+
}
|
|
2974
|
+
.clean-card-btn {
|
|
2975
|
+
display: flex;
|
|
2976
|
+
align-items: center;
|
|
2977
|
+
justify-content: center;
|
|
2978
|
+
gap: 5px;
|
|
2979
|
+
width: 100%;
|
|
2980
|
+
padding: 7px 12px;
|
|
2981
|
+
border-radius: 8px;
|
|
2982
|
+
background: #0f172a;
|
|
2983
|
+
color: #ffffff;
|
|
2984
|
+
font-size: 10px;
|
|
2985
|
+
font-weight: 700;
|
|
2986
|
+
letter-spacing: 0.05em;
|
|
2987
|
+
text-transform: uppercase;
|
|
2988
|
+
border: none;
|
|
2989
|
+
cursor: pointer;
|
|
2990
|
+
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
|
|
2991
|
+
transition: background 0.2s, transform 0.15s;
|
|
2992
|
+
}
|
|
2993
|
+
.clean-card-btn:hover {
|
|
2994
|
+
background: #1e293b;
|
|
2995
|
+
transform: scale(1.02);
|
|
2996
|
+
}
|
|
2997
|
+
.clean-card-btn svg {
|
|
2998
|
+
width: 12px;
|
|
2999
|
+
height: 12px;
|
|
3000
|
+
fill: currentColor;
|
|
3001
|
+
}
|
|
3002
|
+
`,this.root.appendChild(s);const r=`vanira_pos_${this.widgetId||this.agentId}`,o=localStorage.getItem(r);let a=null;if(o)try{a=JSON.parse(o)}catch{}if(this.floatingButton=new Jt(()=>this.togglePanel(),(m,A)=>{var v,f;(v=this.floatingWelcomeChips)==null||v.updateCoordinates(m,A,A>window.innerHeight/2),this.isPanelOpen&&((f=this.panel)==null||f.updatePosition({left:`${Math.max(20,Math.min(m-170,window.innerWidth-420))}px`,top:A>window.innerHeight/2?"auto":`${A+80}px`,bottom:A>window.innerHeight/2?`${window.innerHeight-A+20}px`:"auto"}))},(m,A)=>{localStorage.setItem(r,JSON.stringify({x:m,y:A}))}),this.floatingButton.setIcon(this.getFabIcon()),a?this.floatingButton.updateCoordinates(a.x,a.y):this.floatingButton.setPosition(this.getPosStyle()),this.floatingWelcomeChips=new qt(m=>this.handleFloatingChipClick(m)),a?this.floatingWelcomeChips.updateCoordinates(a.x,a.y,a.y>window.innerHeight/2):this.floatingWelcomeChips.setPosition(this.getPosStyle()),this.panel=new Wt(()=>this.handlePanelClose(),this.getPanelTitle(),()=>this.minimizePanel()),this.voiceChatPill=new Jn(()=>this.openPanel(),()=>this.end_call(),"Voice chat"),this.root.appendChild(this.voiceChatPill.getElement()),this.root.appendChild(this.floatingWelcomeChips.getElement()),this.widgetIcon==="clean_assistant"){const m=((c=this.iconConfig)==null?void 0:c.logo_text)||"vanira",A=((h=this.iconConfig)==null?void 0:h.title)||"Vanira Voice AI Assistant",v=((d=this.iconConfig)==null?void 0:d.button_text)||"Begin Call",f=Qt(this.agentId);let b=!1;const C=document.createElement("div");C.className="clean-card-launcher",C.innerHTML=`
|
|
3003
|
+
<div class="clean-card-header">
|
|
3004
|
+
<div class="clean-card-logo">${m}</div>
|
|
3005
|
+
<div class="clean-card-title">${A}</div>
|
|
3006
|
+
<div class="clean-card-welcome" style="display: none;">Welcome back</div>
|
|
3007
|
+
</div>
|
|
3008
|
+
${f?`
|
|
3009
|
+
<div class="session-selector-container" style="display: none;">
|
|
3010
|
+
<div class="session-option active" data-behavior="continue">
|
|
3011
|
+
<span class="session-icon" aria-hidden="true">${U.sessionContinue}</span>
|
|
3012
|
+
<span class="session-title">Continue</span>
|
|
3013
|
+
</div>
|
|
3014
|
+
<div class="session-option" data-behavior="new">
|
|
3015
|
+
<span class="session-icon" aria-hidden="true">${U.sessionRestart}</span>
|
|
3016
|
+
<span class="session-title">Restart</span>
|
|
3017
|
+
</div>
|
|
3018
|
+
</div>
|
|
3019
|
+
`:""}
|
|
3020
|
+
<button class="clean-card-btn" type="button">
|
|
3021
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
3022
|
+
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.14 12 19.79 19.79 0 0 1 1.07 3.4 2 2 0 0 1 3 1h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.09 8.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/>
|
|
3023
|
+
</svg>
|
|
3024
|
+
${v}
|
|
3025
|
+
</button>
|
|
3026
|
+
`;const w=C.querySelector(".session-selector-container"),x=C.querySelector(".clean-card-welcome"),E=C.querySelector(".clean-card-btn"),k=P=>{C.style.display="none",this.create_call(P)},S=()=>{b=!0,C.classList.add("has-session-choice"),x&&(x.style.display=""),w&&(w.style.display="flex"),E&&(E.style.display="none")},I=C.querySelectorAll(".session-option");I.forEach(P=>{P.addEventListener("click",z=>{if(z.stopPropagation(),!b)return;I.forEach(L=>L.classList.remove("active")),P.classList.add("active");const Q=P.getAttribute("data-behavior");k(Q)})}),E==null||E.addEventListener("click",P=>{if(P.stopPropagation(),f&&!b){S();return}f||k("continue")}),this.root.appendChild(C),this.cleanCardLauncher=C}else this.widgetIcon==="human_presence"?(this.humanPresenceLauncher=new Wn(()=>this.openPanel(),{greeting:((g=this.iconConfig)==null?void 0:g.greeting)||"Hi there!",subtitle:((u=this.iconConfig)==null?void 0:u.subtitle)||"I'm here to help"}),this.root.appendChild(this.humanPresenceLauncher.getElement())):this.root.appendChild(this.floatingButton.getElement());this.root.appendChild(this.panel.getElement()),this.setupPanelContent(),this.chatWelcomeMessage&&!this.widgetMode.includes("chat")&&this.handleWelcomePayload(this.chatWelcomeMessage),this.initSessionManager()?this.widgetMode.includes("chat")&&this.initializeChatSession():this.showTabConflictBanner("conflict"),this.updateLauncherVisibility()}getFabIcon(){return this.widgetIcon&&st[this.widgetIcon]?st[this.widgetIcon]:this.widgetMode.includes("chat")?U.chat:U.voice_orb}getPanelTitle(){return"Assistant"}getPosStyle(){const t={"bottom-right":"bottom: 24px; right: 24px;","bottom-left":"bottom: 24px; left: 24px;","top-right":"top: 24px; right: 24px;","top-left":"top: 24px; left: 24px;"};return t[this.position]||t["bottom-right"]}setupPanelContent(){var i,s;const t=(r,o)=>{var h,d;const a=(d=(h=this.currentView)==null?void 0:h.getChatWindow)==null?void 0:d.call(h);a&&a.addCallRecord(r,o);const l=`vanira_calls_${this.widgetId||this.agentId}`,c=JSON.parse(localStorage.getItem(l)||"[]");c.push({durationMs:r,startedAt:o}),c.length>50&&c.splice(0,c.length-50),localStorage.setItem(l,JSON.stringify(c))};switch(this.widgetMode){case"chat_only":this.currentView=new Xn(r=>this.handleChatSend(r));break;case"chat_voice":this.currentView=new Kn(r=>this.handleChatSend(r),()=>this.create_call(),()=>this.end_call(),this.primaryColor,this.secondaryColor,t);break;case"avatar_only":this.currentView=new Zn(()=>this.create_call(),()=>this.end_call(),this.primaryColor,this.secondaryColor,t);break;case"chat_avatar":this.currentView=new $n(r=>this.handleChatSend(r),()=>this.create_call(),()=>this.end_call(),this.primaryColor,this.secondaryColor,t);break;case"voice_only":default:this.currentView=new qn(r=>this.create_call(r),()=>this.end_call(),this.primaryColor,this.secondaryColor,t,this.agentId);break}if(this.currentView&&this.panel){this.panel.setContent(this.currentView.getElement()),this.widgetMode==="voice_only"?this.panel.getElement().classList.add("voice-only-panel"):this.panel.getElement().classList.remove("voice-only-panel");const r=(s=(i=this.currentView).getChatWindow)==null?void 0:s.call(i);r&&r.setResolveCallback(()=>this.resolveActiveConversation())}this.wireMicMuteControls()}async handleChatSend(t){var s,r,o,a,l;if(!t)return;this.sessionActive||((s=this.sessionManager)==null||s.forceClaimSession(),this.sessionActive=!0,this.widgetMode.includes("chat")&&await this.initializeChatSession(!1));const i=(o=(r=this.currentView)==null?void 0:r.getChatWindow)==null?void 0:o.call(r);if(i){this.chatId&&!this.eventSource&&(this.eventSource=oe.listenForAdminReplies(this.chatId,this.prospectId,c=>{var h,d,g;(d=(h=this.currentView)==null?void 0:h.getChatWindow)==null||d.call(h).addMessage("assistant",c),(g=this.sessionManager)==null||g.pushMessage("assistant",c),this.playMessageSound("receive")})),i.addMessage("user",t),(a=this.sessionManager)==null||a.pushMessage("user",t),i.setTyping(!0),(l=this.sessionManager)==null||l.pushMessage("assistant","");try{let c=!1;await this.chatAdapter.sendMessage(t,this.agentId,this.prospectId,this.chatId,h=>{var d;c||(this.playMessageSound("receive"),c=!0),i.setTyping(!1),(h==null?void 0:h.type)==="button_list"&&((d=h.data)!=null&&d.buttons)&&(i.addButtons(h.data.buttons),this.welcomeChipsData=h.data.buttons,this.updateWelcomeChipsVisibility())},h=>{var d;c||(this.playMessageSound("receive"),c=!0),i.setTyping(!1),i.updateLastAssistantMessage(h),(d=this.sessionManager)==null||d.updateLastAssistantMessage(h)},(h,d)=>{var g;h&&(this.chatId=h),d&&(this.conversationId=d),(h||d)&&((g=this.sessionManager)==null||g.saveIds(this.prospectId,this.chatId,this.conversationId))},this.widgetId||void 0,this.pkKey||void 0)}catch{i.setTyping(!1),i.addMessage("assistant","Error sending message.")}}}minimizePanel(){this.closePanel()}handlePanelClose(){if(this.callActive){this.minimizePanel();return}this.closePanel()}updateLauncherVisibility(){var r,o,a;const t=this.callActive&&!this.isPanelOpen,i=!this.isPanelOpen&&!t;this.voiceChatPill&&(t?(this.callStatus==="connected"?(this.pillActivityState=this.pillActivityState==="speaking"?"speaking":"listening",this.voiceChatPill.setActivity(this.pillActivityState),this.startPillActivityLoop()):this.voiceChatPill.setStatus(this.callStatus),this.voiceChatPill.show()):(this.voiceChatPill.hide(),this.isPanelOpen&&this.callStatus==="connected"&&((o=(r=this.currentView)==null?void 0:r.setActivity)==null||o.call(r,this.pillActivityState==="speaking"?"speaking":"listening")))),this.callActive&&this.callStatus==="connected"&&this.startPillActivityLoop();const s=(a=this.floatingButton)==null?void 0:a.getElement();if(s){const l=this.isPanelOpen||t||this.widgetIcon==="clean_assistant"||this.widgetIcon==="human_presence";s.classList.toggle("hidden-launcher",l)}this.cleanCardLauncher&&(this.cleanCardLauncher.style.display=i&&this.widgetIcon==="clean_assistant"?"":"none"),this.humanPresenceLauncher&&(i&&this.widgetIcon==="human_presence"?this.humanPresenceLauncher.show():this.humanPresenceLauncher.hide()),this.updateWelcomeChipsVisibility()}togglePanel(){this.isPanelOpen?this.closePanel():this.openPanel()}openPanel(){var s,r,o,a;this.isPanelOpen=!0,this.updateWelcomeChipsVisibility();const t=(s=this.floatingButton)==null?void 0:s.getElement().getBoundingClientRect();if(t&&t.width>0){const l=t.top>window.innerHeight/2;(r=this.panel)==null||r.open({left:`${Math.max(20,Math.min(t.left-170,window.innerWidth-420))}px`,bottom:l?`${window.innerHeight-t.top+20}px`:void 0,top:l?void 0:`${t.top+80}px`})}else(o=this.panel)==null||o.open({bottom:"90px",right:"20px",left:"auto",top:"auto"});(a=this.root)!=null&&a.host&&this.root.host.classList.add("vanira-panel-open"),this.updateLauncherVisibility()}closePanel(){var t,i;this.isPanelOpen=!1,this.updateWelcomeChipsVisibility(),(t=this.panel)==null||t.close(),(i=this.root)!=null&&i.host&&this.root.host.classList.remove("vanira-panel-open"),this.updateLauncherVisibility()}updateWelcomeChipsVisibility(){if(!this.floatingWelcomeChips)return;!this.isPanelOpen&&!this.callActive&&this.welcomeChipsData.length>0?(this.floatingWelcomeChips.setChips(this.welcomeChipsData),this.floatingWelcomeChips.getElement().style.display="flex"):this.floatingWelcomeChips.getElement().style.display="none"}handleFloatingChipClick(t){this.openPanel(),this.handleChatSend(t)}async resolveActiveConversation(){var i,s,r;if(this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.conversationId)try{await oe.resolveConversation(this.conversationId)}catch{}(i=this.sessionManager)==null||i.clearChatKeepProspect(),this.conversationId=null,this.chatId=null;const t=(r=(s=this.currentView)==null?void 0:s.getChatWindow)==null?void 0:r.call(s);t&&t.clearMessages(),this.chatInitialized=!1,await this.initializeChatSession(!0)}};p(be,"audioContext",null);let Lt=be;class Tr{static getProvider(e){return new Lt(e)}}class Dr extends HTMLElement{constructor(){super();p(this,"shadow");p(this,"provider",null);p(this,"widgetId","");p(this,"agentId","");p(this,"pkKey","");p(this,"serverUrl","https://inboxapi.vanira.io");p(this,"position","bottom-right");p(this,"primaryColor","");p(this,"secondaryColor","");p(this,"gradient",null);p(this,"positionType","fixed");p(this,"widgetIcon",null);this.shadow=this.attachShadow({mode:"open"})}static get observedAttributes(){return["widget-id","agent-id","position","primary-color","secondary-color","server-url","gradient","position-type","pk-key","icon","widget-icon"]}connectedCallback(){this.readAttributes(),this.provider=Tr.getProvider(this.buildInitialConfig()),!!(this.widgetId&&!this.agentId)?this.initializeExpandedConfig():this.provider&&this.provider.ui_renderer(this.shadow)}readAttributes(){this.widgetId=this.getAttribute("widget-id")||"",this.agentId=this.getAttribute("agent-id")||"",this.pkKey=this.getAttribute("pk-key")||"",this.serverUrl=this.getAttribute("server-url")||"https://inboxapi.vanira.io",this.position=this.getAttribute("position")||"bottom-right",this.primaryColor=this.getAttribute("primary-color")||"",this.secondaryColor=this.getAttribute("secondary-color")||"",this.gradient=this.getAttribute("gradient"),this.positionType=this.getAttribute("position-type")||"fixed",this.widgetIcon=this.getAttribute("icon")||this.getAttribute("widget-icon")}buildInitialConfig(){const t={widgetId:this.widgetId,agentId:this.agentId,pkKey:this.pkKey,serverUrl:this.serverUrl,position:this.position,positionType:this.positionType,gradient:this.gradient};return this.hasAttribute("primary-color")&&(t.primaryColor=this.primaryColor,t.primary_color=this.primaryColor),this.hasAttribute("secondary-color")&&(t.secondaryColor=this.secondaryColor,t.secondary_color=this.secondaryColor),(this.hasAttribute("icon")||this.hasAttribute("widget-icon"))&&(t.icon=this.widgetIcon,t.widgetIcon=this.widgetIcon),t}buildMergedConfig(t){return{...t,...this.hasAttribute("primary-color")?{primary_color:this.primaryColor,primaryColor:this.primaryColor}:{},...this.hasAttribute("secondary-color")?{secondary_color:this.secondaryColor,secondaryColor:this.secondaryColor}:{},...this.hasAttribute("icon")||this.hasAttribute("widget-icon")?{icon:this.widgetIcon,widgetIcon:this.widgetIcon}:{}}}async initializeExpandedConfig(){try{const t=await Qi.fetchWidgetConfig(this.widgetId,this.pkKey||void 0);this.provider&&await this.provider.initialize(this.buildMergedConfig(t),this.shadow)}catch{this.provider&&await this.provider.initialize(this.buildInitialConfig(),this.shadow)}}isCallActive(){var t;return((t=this.provider)==null?void 0:t.isCallActive())??!1}updateContext(t){var s;const i=((s=this.provider)==null?void 0:s.updateContext(t))??!1;return i&&this.dispatchHostEvent("vaniraai:context_updated",{context:t}),i}triggerInterrupt(t,i={}){var r;const s=((r=this.provider)==null?void 0:r.triggerInterrupt(t,i))??!1;return s&&this.dispatchHostEvent("vaniraai:action_triggered",{actionName:t,data:i}),s}sendToolResult(t,i){var r;return((r=this.provider)==null?void 0:r.sendToolResult(t,i))??!1}dispatchHostEvent(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}}class Pr{constructor(e){p(this,"el");this.el=new Audio,this.el.srcObject=e,this.el.play().catch(t=>{})}pause(){}cleanup(){this.el.pause(),this.el.srcObject=null}onEnded(e){this.el.onended=e}}class hn{createRemotePlayer(e){return new Pr(e)}}class pn{async getUserAudio(e){return navigator.mediaDevices.getUserMedia({audio:e})}stopStream(e){e.getTracks().forEach(t=>t.stop())}}class un{create(e){return new RTCPeerConnection({iceServers:e.iceServers,iceTransportPolicy:e.iceTransportPolicy??"all"})}}class gn{bind(e,t){return e.onopen=()=>t.onOpen(),e.onerror=i=>t.onError(i),e.onmessage=i=>{if(typeof i.data=="string"){t.onMessage({text:i.data});return}if(i.data instanceof ArrayBuffer){try{const s=new TextDecoder().decode(i.data),r=JSON.parse(s);Mi(r)&&t.onMessage({text:s})}catch{}return}i.data instanceof Blob&&i.data.text().then(s=>{t.onMessage({text:s})}).catch(s=>{})},{send(i){e.readyState==="open"&&e.send(i)},isOpen(){return e.readyState==="open"},close(){e.close()}}}}var vi;const mn={supportsAudioEndedEvent:!0,supportsScreenShare:typeof navigator<"u"&&typeof((vi=navigator.mediaDevices)==null?void 0:vi.getDisplayMedia)=="function",supportsDom:typeof document<"u",supportsHtmlAudio:typeof Audio<"u",supportsCustomElements:typeof customElements<"u",supportsLocalStorage:typeof localStorage<"u",supportsBroadcastChannel:typeof BroadcastChannel<"u"},fn={name:"browser",callType:"web",runtimeName:"browser",callIdPrefix:"web_",capabilities:mn,audio:new hn,media:new pn,peer:new un,dataChannel:new gn};function Yt(n){return new de({...n,runtime:fn})}function mi(n){const e=(n==null?void 0:n.data)||n;return String((e==null?void 0:e.tool_call_id)||(e==null?void 0:e.call_id)||"")}const vn=D.forwardRef(function({client:e,toolCall:t=null,onCustomTool:i},s){const r=D.useRef(null),o=D.useRef(new Set),a=D.useRef(new Set),l=D.useRef([]),c=D.useRef(!1);D.useEffect(()=>(r.current=new dn(null),()=>{var u;(u=r.current)==null||u.resetBoardSession()}),[]),D.useEffect(()=>{const u=m=>{var v;const A=m.detail||{};(v=r.current)==null||v.abortBoardTools(A.reason||"Server interrupted",A.toolCallId)};return window.addEventListener(dt,u),()=>window.removeEventListener(dt,u)},[]);const h=D.useCallback(()=>{if(c.current||!r.current||!e)return;const u=l.current.shift();if(!u)return;c.current=!0;const m=u.data||u,A=m.arguments||m.args,v=m.client_fields||{},f=Be(v,A,m.name||m.tool_name),b=mi(u),C=()=>{c.current=!1,l.current.length>0&&h()};if(!f||!X(f)){i&&i(u),C();return}!Ci(f)&&e.sendContextUpdate&&b&&(e.sendToolResult(b,{status:"popup_shown",message:`The UI preset ${f} is now visible. I am waiting for the user to complete it. STAY SILENT.`}),e.sendContextUpdate({ui_state:"waiting_for_preset_data",tool_status:"active_waiting",visible_preset:f})),r.current.handle(u,x=>{var k,S;if(!b){C();return}const E=typeof x=="string"?{response:x}:x;if(Ee(f)){C();return}if(Se(f)){(E==null?void 0:E.status)!=="cancelled"&&!o.current.has(b)&&(o.current.add(b),e.sendToolResult(b,E)),C();return}if(ke(f)){if((E==null?void 0:E.status)==="cancelled"){C();return}(k=e.triggerActionInterrupt)==null||k.call(e);const I=Ue(f,m.name||m.tool_name||"",v);(S=e.sendActionTrigger)==null||S.call(e,I,E),C();return}e.triggerActionInterrupt&&e.triggerActionInterrupt(),e.sendActionTrigger?e.sendActionTrigger(Ue(f,m.name||m.tool_name||"",v),E):e.sendToolResult(b,E),C()},(x,E)=>{var k,S;if(!b){C();return}if(Se(f)){const I=(E==null?void 0:E.status)??"cancelled",P=String(v.target_url||(typeof A=="object"&&A?A.target_url:"")||"");o.current.has(b)||(o.current.add(b),e.sendToolResult(b,f===y.Navigate?((k=r.current)==null?void 0:k.getNavigateTerminalResult(I,x,P||void 0))??{status:I,reason:x||"Navigation cancelled",preset_id:f,target_url:P||void 0}:((S=r.current)==null?void 0:S.getBoardTerminalResult(I,x,f))??{status:I,reason:x||"User dismissed",preset_id:f})),C();return}if(Ee(f))try{e.sendToolResult(b,{status:"cancelled",reason:x||"User dismissed",preset_id:f})}catch{}else if(ke(f))if(typeof e.sendToolError=="function")e.sendToolError(b,x||"User cancelled the action");else try{e.sendToolResult(b,{status:"cancelled",reason:x||"User dismissed",preset_id:f})}catch{}else typeof e.sendToolError=="function"&&e.sendToolError(b,x||"User cancelled the action");C()},e)||(i&&i(u),C())},[e,i]),d=D.useCallback(u=>{const m=mi(u);if(m){if(a.current.has(m))return;a.current.add(m)}l.current.push(u),h()},[h]),g=D.useCallback(()=>{var u,m;l.current=[],c.current=!1,a.current.clear(),o.current.clear(),(u=r.current)!=null&&u.hasActiveBoardSession()||((m=r.current)==null||m.dismiss(),ot())},[]);return D.useImperativeHandle(s,()=>({enqueueToolCall:d,clearQueue:g}),[d,g]),D.useEffect(()=>{t&&d(t)},[t,d]),D.useEffect(()=>{e||g()},[e,g]),null}),fi=`
|
|
3027
|
+
.vcb-root {
|
|
3028
|
+
position: fixed;
|
|
3029
|
+
left: 50%;
|
|
3030
|
+
transform: translateX(-50%);
|
|
3031
|
+
bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
|
|
3032
|
+
z-index: 2147483000;
|
|
3033
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
3034
|
+
pointer-events: auto;
|
|
3035
|
+
animation: vcbFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
3036
|
+
}
|
|
3037
|
+
@keyframes vcbFadeIn {
|
|
3038
|
+
from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
|
|
3039
|
+
to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
.vcb-pill {
|
|
3043
|
+
display: flex;
|
|
3044
|
+
align-items: center;
|
|
3045
|
+
gap: 0.375rem;
|
|
3046
|
+
padding: 0.35rem 0.35rem 0.35rem 0.35rem;
|
|
3047
|
+
border-radius: 999px;
|
|
3048
|
+
background: rgba(255, 255, 255, 0.98);
|
|
3049
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
3050
|
+
box-shadow: 0 2px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
|
|
3051
|
+
width: max-content;
|
|
3052
|
+
max-width: calc(100vw - 2rem);
|
|
3053
|
+
-webkit-tap-highlight-color: transparent;
|
|
3054
|
+
touch-action: manipulation;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
.vcb-pill-main {
|
|
3058
|
+
display: flex;
|
|
3059
|
+
align-items: center;
|
|
3060
|
+
gap: 0.5rem;
|
|
3061
|
+
flex: 0 1 auto;
|
|
3062
|
+
min-width: 0;
|
|
3063
|
+
padding: 0;
|
|
3064
|
+
border: none;
|
|
3065
|
+
background: transparent;
|
|
3066
|
+
cursor: pointer;
|
|
3067
|
+
font: inherit;
|
|
3068
|
+
text-align: left;
|
|
3069
|
+
}
|
|
3070
|
+
.vcb-pill-main:disabled { cursor: default; opacity: 0.9; }
|
|
3071
|
+
|
|
3072
|
+
.vcb-pill-icon {
|
|
3073
|
+
width: 2rem;
|
|
3074
|
+
height: 2rem;
|
|
3075
|
+
border-radius: 999px;
|
|
3076
|
+
flex-shrink: 0;
|
|
3077
|
+
background: #f4f4f5;
|
|
3078
|
+
display: flex;
|
|
3079
|
+
align-items: center;
|
|
3080
|
+
justify-content: center;
|
|
3081
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
3082
|
+
overflow: hidden;
|
|
3083
|
+
}
|
|
3084
|
+
.vcb-pill-icon img {
|
|
3085
|
+
width: 100%;
|
|
3086
|
+
height: 100%;
|
|
3087
|
+
object-fit: cover;
|
|
3088
|
+
}
|
|
3089
|
+
.vcb-pill-icon svg {
|
|
3090
|
+
width: 0.9rem;
|
|
3091
|
+
height: 0.9rem;
|
|
3092
|
+
stroke: #0a0a0a;
|
|
3093
|
+
color: #0a0a0a;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
.vcb-pill-text {
|
|
3097
|
+
display: flex;
|
|
3098
|
+
flex-direction: column;
|
|
3099
|
+
align-items: flex-start;
|
|
3100
|
+
gap: 0.05rem;
|
|
3101
|
+
min-width: 0;
|
|
3102
|
+
}
|
|
3103
|
+
.vcb-pill.is-connecting,
|
|
3104
|
+
.vcb-pill.is-listening {
|
|
3105
|
+
gap: 0.2rem;
|
|
3106
|
+
padding: 0.25rem;
|
|
3107
|
+
}
|
|
3108
|
+
.vcb-pill.is-connecting .vcb-pill-icon,
|
|
3109
|
+
.vcb-pill.is-listening .vcb-pill-icon {
|
|
3110
|
+
width: 1.5rem;
|
|
3111
|
+
height: 1.5rem;
|
|
3112
|
+
}
|
|
3113
|
+
.vcb-pill.is-connecting .vcb-pill-icon svg,
|
|
3114
|
+
.vcb-pill.is-listening .vcb-pill-icon svg {
|
|
3115
|
+
width: 0.75rem;
|
|
3116
|
+
height: 0.75rem;
|
|
3117
|
+
}
|
|
3118
|
+
.vcb-pill.is-connecting .vcb-pill-mute,
|
|
3119
|
+
.vcb-pill.is-listening .vcb-pill-mute,
|
|
3120
|
+
.vcb-pill.is-connecting .vcb-pill-hangup,
|
|
3121
|
+
.vcb-pill.is-listening .vcb-pill-hangup {
|
|
3122
|
+
width: 1.5rem;
|
|
3123
|
+
height: 1.5rem;
|
|
3124
|
+
}
|
|
3125
|
+
.vcb-pill.is-connecting .vcb-pill-mute svg,
|
|
3126
|
+
.vcb-pill.is-listening .vcb-pill-mute svg,
|
|
3127
|
+
.vcb-pill.is-connecting .vcb-pill-hangup svg,
|
|
3128
|
+
.vcb-pill.is-listening .vcb-pill-hangup svg {
|
|
3129
|
+
width: 0.8rem;
|
|
3130
|
+
height: 0.8rem;
|
|
3131
|
+
}
|
|
3132
|
+
.vcb-pill.is-connecting .vcb-pill-main,
|
|
3133
|
+
.vcb-pill.is-listening .vcb-pill-main {
|
|
3134
|
+
gap: 0.3rem;
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
.vcb-pill-live {
|
|
3138
|
+
display: inline-flex;
|
|
3139
|
+
align-items: center;
|
|
3140
|
+
gap: 0.3rem;
|
|
3141
|
+
min-width: 0;
|
|
3142
|
+
}
|
|
3143
|
+
.vcb-pill-live-label {
|
|
3144
|
+
font-size: 0.6875rem;
|
|
3145
|
+
font-weight: 600;
|
|
3146
|
+
color: #0f172a;
|
|
3147
|
+
letter-spacing: -0.02em;
|
|
3148
|
+
line-height: 1.15;
|
|
3149
|
+
white-space: nowrap;
|
|
3150
|
+
max-width: 7rem;
|
|
3151
|
+
overflow: hidden;
|
|
3152
|
+
text-overflow: ellipsis;
|
|
3153
|
+
}
|
|
3154
|
+
.vcb-pill-title {
|
|
3155
|
+
font-size: 0.8125rem;
|
|
3156
|
+
font-weight: 600;
|
|
3157
|
+
color: #0f172a;
|
|
3158
|
+
letter-spacing: -0.02em;
|
|
3159
|
+
line-height: 1.15;
|
|
3160
|
+
white-space: nowrap;
|
|
3161
|
+
}
|
|
3162
|
+
.vcb-pill-status-row {
|
|
3163
|
+
display: inline-flex;
|
|
3164
|
+
align-items: center;
|
|
3165
|
+
gap: 0.35rem;
|
|
3166
|
+
min-height: 0.875rem;
|
|
3167
|
+
}
|
|
3168
|
+
.vcb-pill-status {
|
|
3169
|
+
font-size: 0.6875rem;
|
|
3170
|
+
font-weight: 500;
|
|
3171
|
+
color: #64748b;
|
|
3172
|
+
line-height: 1.1;
|
|
3173
|
+
letter-spacing: -0.01em;
|
|
3174
|
+
white-space: nowrap;
|
|
3175
|
+
}
|
|
3176
|
+
.vcb-pill.is-connecting .vcb-pill-status { color: #94a3b8; }
|
|
3177
|
+
.vcb-pill.is-listening .vcb-pill-status,
|
|
3178
|
+
.vcb-pill.is-speaking .vcb-pill-status { color: #475569; }
|
|
3179
|
+
.vcb-pill.is-error .vcb-pill-status { color: #dc2626; }
|
|
3180
|
+
|
|
3181
|
+
.vcb-pill-bars {
|
|
3182
|
+
display: inline-flex;
|
|
3183
|
+
align-items: flex-end;
|
|
3184
|
+
gap: 2px;
|
|
3185
|
+
height: 0.625rem;
|
|
3186
|
+
flex-shrink: 0;
|
|
3187
|
+
color: #64748b;
|
|
3188
|
+
}
|
|
3189
|
+
.vcb-pill-bars.hidden { display: none; }
|
|
3190
|
+
.vcb-pill-bars i {
|
|
3191
|
+
display: block;
|
|
3192
|
+
width: 2px;
|
|
3193
|
+
height: 3px;
|
|
3194
|
+
border-radius: 999px;
|
|
3195
|
+
background: currentColor;
|
|
3196
|
+
opacity: 0.55;
|
|
3197
|
+
animation: vcbBarListen 1s ease-in-out infinite;
|
|
3198
|
+
}
|
|
3199
|
+
.vcb-pill-bars i:nth-child(2) { animation-delay: 0.12s; }
|
|
3200
|
+
.vcb-pill-bars i:nth-child(3) { animation-delay: 0.24s; }
|
|
3201
|
+
.vcb-pill-bars.speaking i {
|
|
3202
|
+
animation-name: vcbBarSpeak;
|
|
3203
|
+
opacity: 0.85;
|
|
3204
|
+
}
|
|
3205
|
+
@keyframes vcbBarListen {
|
|
3206
|
+
0%, 100% { height: 3px; }
|
|
3207
|
+
50% { height: 7px; }
|
|
3208
|
+
}
|
|
3209
|
+
@keyframes vcbBarSpeak {
|
|
3210
|
+
0%, 100% { height: 4px; }
|
|
3211
|
+
35% { height: 9px; }
|
|
3212
|
+
65% { height: 6px; }
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
.vcb-pill-mute {
|
|
3216
|
+
width: 2rem;
|
|
3217
|
+
height: 2rem;
|
|
3218
|
+
border-radius: 999px;
|
|
3219
|
+
flex-shrink: 0;
|
|
3220
|
+
display: flex;
|
|
3221
|
+
align-items: center;
|
|
3222
|
+
justify-content: center;
|
|
3223
|
+
border: none;
|
|
3224
|
+
background: #f4f4f5;
|
|
3225
|
+
color: #334155;
|
|
3226
|
+
cursor: pointer;
|
|
3227
|
+
transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
|
|
3228
|
+
}
|
|
3229
|
+
.vcb-pill-mute:hover:not(:disabled) { background: #e4e4e7; }
|
|
3230
|
+
.vcb-pill-mute:active:not(:disabled) { transform: scale(0.94); }
|
|
3231
|
+
.vcb-pill-mute:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
3232
|
+
.vcb-pill-mute.is-muted { background: #fef2f2; color: #dc2626; }
|
|
3233
|
+
.vcb-pill-mute svg { width: 0.95rem; height: 0.95rem; stroke: currentColor; }
|
|
3234
|
+
|
|
3235
|
+
.vcb-pill-hangup {
|
|
3236
|
+
width: 2rem;
|
|
3237
|
+
height: 2rem;
|
|
3238
|
+
border-radius: 999px;
|
|
3239
|
+
flex-shrink: 0;
|
|
3240
|
+
display: flex;
|
|
3241
|
+
align-items: center;
|
|
3242
|
+
justify-content: center;
|
|
3243
|
+
border: none;
|
|
3244
|
+
background: #fef2f2;
|
|
3245
|
+
color: #dc2626;
|
|
3246
|
+
cursor: pointer;
|
|
3247
|
+
transition: background 0.15s ease, transform 0.15s ease;
|
|
3248
|
+
}
|
|
3249
|
+
.vcb-pill-hangup:hover { background: #fee2e2; }
|
|
3250
|
+
.vcb-pill-hangup:active { transform: scale(0.94); background: #fecaca; }
|
|
3251
|
+
.vcb-pill-hangup svg {
|
|
3252
|
+
width: 0.95rem;
|
|
3253
|
+
height: 0.95rem;
|
|
3254
|
+
transform: rotate(135deg);
|
|
3255
|
+
stroke: #dc2626;
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
.vcb-pill-minimize {
|
|
3259
|
+
width: 2rem;
|
|
3260
|
+
height: 2rem;
|
|
3261
|
+
border-radius: 999px;
|
|
3262
|
+
flex-shrink: 0;
|
|
3263
|
+
display: flex;
|
|
3264
|
+
align-items: center;
|
|
3265
|
+
justify-content: center;
|
|
3266
|
+
border: none;
|
|
3267
|
+
background: #f4f4f5;
|
|
3268
|
+
color: #64748b;
|
|
3269
|
+
cursor: pointer;
|
|
3270
|
+
transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
|
|
3271
|
+
}
|
|
3272
|
+
.vcb-pill-minimize:hover { background: #e4e4e7; color: #334155; }
|
|
3273
|
+
.vcb-pill-minimize:active { transform: scale(0.94); }
|
|
3274
|
+
.vcb-pill-minimize svg {
|
|
3275
|
+
width: 0.95rem;
|
|
3276
|
+
height: 0.95rem;
|
|
3277
|
+
stroke: currentColor;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
.vcb-fab {
|
|
3281
|
+
width: 2.75rem;
|
|
3282
|
+
height: 2.75rem;
|
|
3283
|
+
border-radius: 999px;
|
|
3284
|
+
display: flex;
|
|
3285
|
+
align-items: center;
|
|
3286
|
+
justify-content: center;
|
|
3287
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
3288
|
+
background: rgba(255, 255, 255, 0.98);
|
|
3289
|
+
box-shadow: 0 2px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
|
|
3290
|
+
cursor: pointer;
|
|
3291
|
+
color: #334155;
|
|
3292
|
+
transition: background 0.15s ease, transform 0.15s ease;
|
|
3293
|
+
-webkit-tap-highlight-color: transparent;
|
|
3294
|
+
}
|
|
3295
|
+
.vcb-fab:hover { background: #fff; }
|
|
3296
|
+
.vcb-fab:active { transform: scale(0.94); }
|
|
3297
|
+
.vcb-fab svg {
|
|
3298
|
+
width: 1rem;
|
|
3299
|
+
height: 1rem;
|
|
3300
|
+
stroke: currentColor;
|
|
3301
|
+
}
|
|
3302
|
+
`,wt=B.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:B.jsx("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.77a16 16 0 0 0 6.29 6.29l.87-.87a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"})}),Lr=B.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}),B.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),B.jsx("line",{x1:"12",x2:"12",y1:"19",y2:"22"})]}),Nr=B.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"}),B.jsx("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),B.jsx("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),B.jsx("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),B.jsx("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),B.jsx("line",{x1:"12",x2:"12",y1:"19",y2:"22"})]}),Qr=B.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:B.jsx("polyline",{points:"6 9 12 15 18 9"})});function Rr(n,e){switch(n){case"connecting":return{className:"is-connecting",statusText:"Connecting…",showBars:!0,barsClass:"",muteEnabled:!1};case"connected":return{className:"is-listening",statusText:"Listening…",showBars:!0,barsClass:"listening",muteEnabled:!0};case"error":return{className:"is-error",statusText:e||"Connection issue",showBars:!1,barsClass:"hidden",muteEnabled:!1};case"disconnected":return{className:"",statusText:"Tap to talk",showBars:!1,barsClass:"hidden",muteEnabled:!1};case"idle":default:return{className:"",statusText:"Tap to talk",showBars:!1,barsClass:"hidden",muteEnabled:!1}}}function An({status:n,startCall:e,endCall:t,client:i,error:s,title:r="Voice chat",avatarUrl:o,showPortrait:a=!0,transcription:l,onMinimize:c}){const[h,d]=D.useState(!1),[g,u]=D.useState(!1),m=Rr(n,s),A=n==="connecting"||n==="connected";D.useEffect(()=>{A&&u(!1)},[A]);const v=n==="connected"&&(l!=null&&l.isFinal)&&l.text?l.text.slice(0,48)+(l.text.length>48?"…":""):m.statusText,f=()=>{i&&(i.toggleMicrophoneMuted(),d(i.isMicrophoneMuted()))},b=()=>{(n==="idle"||n==="disconnected"||n==="error")&&e()},C=n==="connecting"||n==="connected"||n==="error",w=n==="connecting"||n==="connected",x=!A&&(n==="idle"||n==="disconnected"||n==="error"),E=n==="idle"||n==="disconnected"||n==="error",k=()=>{c?c():u(!0)};return!c&&g?B.jsxs(B.Fragment,{children:[B.jsx("style",{children:fi}),B.jsx("div",{className:"vcb-root",children:B.jsx("button",{type:"button",className:"vcb-fab",onClick:()=>u(!1),"aria-label":"Open voice chat",children:wt})})]}):B.jsxs(B.Fragment,{children:[B.jsx("style",{children:fi}),B.jsx("div",{className:"vcb-root",role:"group","aria-label":"Voice chat",children:B.jsxs("div",{className:`vcb-pill ${m.className}`,children:[B.jsxs("button",{type:"button",className:"vcb-pill-main",onClick:b,disabled:n==="connecting"||n==="connected","aria-label":E?"Start voice chat":r,children:[B.jsx("div",{className:"vcb-pill-icon",children:n==="connected"&&a&&o?B.jsx("img",{src:o,alt:""}):wt}),B.jsx("div",{className:"vcb-pill-text",children:A?B.jsxs("span",{className:"vcb-pill-live",children:[m.showBars&&B.jsxs("span",{className:`vcb-pill-bars ${m.barsClass}`,"aria-hidden":"true",children:[B.jsx("i",{}),B.jsx("i",{}),B.jsx("i",{})]}),B.jsx("span",{className:"vcb-pill-live-label",children:v})]}):B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"vcb-pill-title",children:r}),B.jsx("span",{className:"vcb-pill-status-row",children:B.jsx("span",{className:"vcb-pill-status",children:v})})]})})]}),w&&B.jsx("button",{type:"button",className:`vcb-pill-mute ${h?"is-muted":""}`,onClick:f,disabled:!m.muteEnabled,"aria-label":h?"Unmute microphone":"Mute microphone",children:h?Nr:Lr}),C&&B.jsx("button",{type:"button",className:"vcb-pill-hangup",onClick:t,"aria-label":n==="error"?"Close":"End call",children:wt}),x&&B.jsx("button",{type:"button",className:"vcb-pill-minimize",onClick:k,"aria-label":"Minimize",children:Qr})]})})]})}const _e=new Map;function zr(n,e){const t=_e.get(n);if(t)return t;const i=e().finally(()=>{_e.get(n)===i&&_e.delete(n)});return _e.set(n,i),i}function Hr(n){const e=n,t=(e==null?void 0:e.data)??e,i=String(t.name??t.tool_name??""),s=String(t.tool_call_id??t.call_id??"");if(!i||!s)return null;const r=t.arguments??t.args??{},o=t.execution_mode;return{name:i,tool_call_id:s,arguments:r,execution_mode:o==="blocking"||o==="fire_and_forget"?o:void 0}}function Ur({agentId:n,apiKey:e,token:t,prospectId:i,backendUrl:s,sessionBehavior:r="new",callId:o,serverUrl:a,iceServers:l,autoStart:c=!1,sessionKey:h,onClose:d,onMinimize:g,onNavigate:u,onCustomTool:m,onConnected:A,onDisconnected:v,onError:f,onTranscription:b,onRemoteTrack:C,onClientChange:w,children:x,title:E="Voice chat",primaryColor:k="#6366f1",secondaryColor:S,avatarUrl:I,showPortrait:P=!0}){const z=D.useRef(null),Q=D.useRef(!1),L=D.useRef(!1),Y=D.useRef(!1),M=D.useRef(null),T=D.useRef(0),N=D.useRef(d);N.current=d;const H=D.useCallback(()=>{T.current+=1},[]),j=D.useCallback(O=>O===T.current,[]),V=D.useCallback(()=>{var O;(O=z.current)==null||O.clearQueue()},[]),q=D.useCallback((O=!1)=>{Q.current=!1;const W=M.current;if(M.current=null,ve(null),!(!W||!O)){Y.current=!0;try{W.disconnect()}finally{Y.current=!1}}},[]),[ne,ve]=D.useState(null),[Ge,se]=D.useState("idle"),[le,te]=D.useState(null),[Ae,J]=D.useState(null),re=!(a&&o),Ie=D.useMemo(()=>de.normalizeIceServers(l),[l]);D.useEffect(()=>{if(!u)return;const O=W=>{const R=W.detail;u((R==null?void 0:R.path)??"/"),R&&(R.handled=!0)};return window.addEventListener("vanira:navigate",O),()=>window.removeEventListener("vanira:navigate",O)},[u]);const Fe=D.useCallback((O=!1)=>{var W;H(),V(),q(!0),O&&(L.current=!1,(W=N.current)==null||W.call(N))},[H,V,q]),yn=D.useCallback(()=>{var O;H(),V(),q(!0),L.current=!1,se("idle"),te(null),(O=N.current)==null||O.call(N)},[H,V,q]),ht=D.useCallback(async()=>{if(Q.current||M.current)return;if(!e&&!t&&re){const R="VaniraCallBox requires apiKey or token";te(R),se("error"),f==null||f(R);return}const O=T.current;Q.current=!0,te(null),se("connecting");const W=Yt({agentId:n,apiKey:e,token:t,prospectId:i,backendUrl:s,sessionBehavior:r,...re?{}:{callId:o,serverUrl:a,iceServers:Ie.length?Ie:void 0},onSessionStarted:()=>se("connecting"),onConnected:()=>{L.current=!0,se("connected"),A==null||A()},onDisconnected:()=>{var K;if(Y.current)return;const R=L.current;L.current=!1,se("idle"),Q.current=!1,V(),q(!1),R&&((K=N.current)==null||K.call(N)),v==null||v()},onError:R=>{const K=typeof R=="string"?R:(R==null?void 0:R.message)||"Connection error";te(K),se("error"),H(),V(),q(!0),f==null||f(R)},onTranscription:(R,K)=>{J({text:R,isFinal:K}),b==null||b(R,K)},onRemoteTrack:C,onClientToolCall:R=>{var K;return(K=z.current)==null?void 0:K.enqueueToolCall(R)}});ve(W),M.current=W;try{if(!j(O))return;if(await W.connect(),!j(O)){W.disconnect();return}}catch(R){if(!j(O))return;const K=typeof R=="string"?R:(R==null?void 0:R.message)||"Connection failed";te(K),se("error"),Fe(!1),f==null||f(R)}finally{j(O)&&(Q.current=!1)}},[n,e,t,i,s,r,o,a,re,Ie,Fe,j,V,q,H,A,v,f,b,C]);D.useEffect(()=>{w==null||w(ne)},[ne,w]),D.useEffect(()=>{if(!c||re&&!e&&!t)return;const O=`${h??"default"}:${n}:${r}`;zr(O,ht)},[c,h,n,r,e,t,re,ht]),D.useEffect(()=>()=>{Y.current=!0,H(),V(),q(!0),se("idle"),te(null),Y.current=!1},[H,V,q]);const bn=D.useCallback(O=>{if(!ne||!m)return;const W=Hr(O);W&&m(W,ne,O)},[ne,m]),jt={status:Ge,startCall:ht,endCall:yn,client:ne,error:le};return B.jsxs(B.Fragment,{children:[x?x(jt):B.jsx(An,{...jt,primaryColor:k,secondaryColor:S,title:E,avatarUrl:I,showPortrait:P,transcription:Ae,onMinimize:g}),B.jsx(vn,{ref:z,client:ne,onCustomTool:bn})]})}exports.BOARD_QUEUED_PRESET_IDS=wi;exports.BrowserAudioAdapter=hn;exports.BrowserDataChannelAdapter=gn;exports.BrowserMediaAdapter=pn;exports.BrowserPeerAdapter=un;exports.ChatService=oe;exports.ConfigService=Qi;exports.FIRE_AND_FORGET_PRESET_IDS=yi;exports.NON_INTERACTIVE_PRESET_IDS=bi;exports.PresetRenderer=vn;exports.RouteContextTracker=Di;exports.SILENT_COMPLETION_PRESET_IDS=xi;exports.SessionManager=nt;exports.VANIRA_API_BASE_URL=je;exports.VANIRA_PRESET_IDS=Ai;exports.VaniraAI=de;exports.VaniraCallBox=Ur;exports.VaniraCallBoxChrome=An;exports.VaniraClient=de;exports.VaniraPresetId=y;exports.VaniraWidget=Dr;exports.WebRTCClient=de;exports.browserCapabilities=mn;exports.browserRuntime=fn;exports.createBrowserAI=Yt;exports.createBrowserClient=Yt;exports.devLog=Z;exports.devWarn=Ni;exports.extractPresetId=Bi;exports.getCurrentPageRoute=Qe;exports.hasContinueSession=Qt;exports.isActionTriggerCompletionPreset=ke;exports.isBlockingToolResultPreset=Se;exports.isBoardQueuedPreset=xt;exports.isBoardToolResultPreset=kn;exports.isFireAndForgetPreset=Ee;exports.isNonInteractivePreset=Ci;exports.isScreenOverlayPreset=ki;exports.isSilentCompletionPreset=Sn;exports.isVaniraDebug=zt;exports.isVaniraPresetId=X;exports.loadContinueSession=Oe;exports.markAgentNavigation=Ti;exports.normalizePageRoute=Rt;exports.refreshVaniraDebug=Hn;exports.resolvePresetActionTriggerName=Ue;exports.resolvePresetIdForToolCall=Be;exports.saveCallSession=Nt;
|