upfynai-code 3.0.2 → 3.0.4
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/client/dist/api-docs.html +838 -838
- package/client/dist/assets/{AppContent-Bvg0CPCO.js → AppContent-CwrTP6TW.js} +43 -43
- package/client/dist/assets/BrowserPanel-0TLEl-IC.js +2 -0
- package/client/dist/assets/{CanvasFullScreen-BdiJ35aq.js → CanvasFullScreen-D1GWQsGL.js} +1 -1
- package/client/dist/assets/{CanvasWorkspace-Bk9R9_e0.js → CanvasWorkspace-D7ORj358.js} +1 -1
- package/client/dist/assets/DashboardPanel-BV7ybUDe.js +1 -0
- package/client/dist/assets/FileTree-5qfhBqdE.js +1 -0
- package/client/dist/assets/{GitPanel-RtyZUIWS.js → GitPanel-C_xFM-N2.js} +1 -1
- package/client/dist/assets/{LoginModal-BWep8a6g.js → LoginModal-CImJHRjX.js} +3 -3
- package/client/dist/assets/{MarkdownPreview-DHmk3qzu.js → MarkdownPreview-CESjI261.js} +1 -1
- package/client/dist/assets/{MermaidBlock-BuBc_G-F.js → MermaidBlock-BFM21cwe.js} +2 -2
- package/client/dist/assets/Onboarding-B3cteLu2.js +1 -0
- package/client/dist/assets/SetupForm-P6dsYgHO.js +1 -0
- package/client/dist/assets/WorkflowsPanel-CBoN80kc.js +1 -0
- package/client/dist/assets/index-46kkVu2i.css +1 -0
- package/client/dist/assets/{index-C5ptjuTl.js → index-HaY-3pK1.js} +20 -20
- package/client/dist/assets/{vendor-canvas-D39yWul6.js → vendor-canvas-DvHJ_Pn2.js} +1 -1
- package/client/dist/assets/{vendor-codemirror-CbtmxxaB.js → vendor-codemirror-D2ALgpaX.js} +1 -1
- package/client/dist/assets/{vendor-icons-BaD0x9SL.js → vendor-icons-GyYE35HP.js} +178 -138
- package/client/dist/assets/{vendor-mermaid-CH7SGc99.js → vendor-mermaid-DucWyDEe.js} +3 -3
- package/client/dist/assets/{vendor-syntax-DuHI9Ok6.js → vendor-syntax-LS_Nt30I.js} +1 -1
- package/client/dist/clear-cache.html +85 -85
- package/client/dist/index.html +17 -17
- package/client/dist/manifest.json +3 -3
- package/client/dist/mcp-docs.html +108 -108
- package/client/dist/offline.html +84 -84
- package/client/dist/sw.js +82 -82
- package/package.json +136 -136
- package/server/browser.js +131 -0
- package/server/database/db.js +108 -10
- package/server/index.js +27 -28
- package/server/middleware/auth.js +5 -2
- package/server/routes/browser.js +419 -0
- package/server/routes/projects.js +118 -19
- package/server/routes/vapi-chat.js +1 -1
- package/server/services/browser-ai.js +154 -0
- package/client/dist/assets/DashboardPanel-CblJfTGi.js +0 -1
- package/client/dist/assets/FileTree-BDUnBheV.js +0 -1
- package/client/dist/assets/Onboarding-Drnlt75a.js +0 -1
- package/client/dist/assets/SetupForm-CtCKitZG.js +0 -1
- package/client/dist/assets/WorkflowsPanel-B2mIXDvD.js +0 -1
- package/client/dist/assets/index-BFuqS0tY.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SetupForm-
|
|
2
|
-
var Wa=Object.defineProperty;var za=(t,e,r)=>e in t?Wa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var G=(t,e,r)=>za(t,typeof e!="symbol"?e+"":e,r);import{r as j,j as T,b as Ya,g as Ka,B as Qa,d as Xa,e as Dr,R as vt,f as Za}from"./vendor-react-96lCPsRK.js";import{b as Cr}from"./vendor-syntax-DuHI9Ok6.js";import{T as ec,C as tc,a as rc,I as nc,X as sc,M as oc}from"./vendor-icons-BaD0x9SL.js";import{i as In,B as ic}from"./vendor-i18n-DCFGyhQR.js";import"./vendor-markdown-CimbIo6Y.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=r(i);fetch(i.href,n)}})();const ac=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,cc={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},lc=t=>cc[t],uc=t=>t.replace(ac,lc);let en={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:uc,transDefaultProps:void 0};const dc=(t={})=>{en={...en,...t}},Iv=()=>en;let Wo;const pc=t=>{Wo=t},Dv=()=>Wo,hc={type:"3rdParty",init(t){dc(t.options.react),pc(t)}},mc=j.createContext();class Lv{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function fc({i18n:t,defaultNS:e,children:r}){const s=j.useMemo(()=>({i18n:t,defaultNS:e}),[t,e]);return j.createElement(mc.Provider,{value:s},r)}const zo=j.createContext(),Nv=()=>{const t=j.useContext(zo);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t},gc=({children:t})=>{const[e,r]=j.useState(()=>{const n=localStorage.getItem("theme");return n?n==="dark":window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{if(e){document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark");const n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');n&&n.setAttribute("content","black-translucent");const o=document.querySelector('meta[name="theme-color"]');o&&o.setAttribute("content","#0c1117")}else{document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light");const n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');n&&n.setAttribute("content","default");const o=document.querySelector('meta[name="theme-color"]');o&&o.setAttribute("content","#ffffff")}},[e]),j.useEffect(()=>{if(!window.matchMedia)return;const n=window.matchMedia("(prefers-color-scheme: dark)"),o=c=>{localStorage.getItem("theme")||r(c.matches)};return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[]);const i={isDarkMode:e,toggleDarkMode:()=>{r(n=>!n)}};return T.jsx(zo.Provider,{value:i,children:t})};var Ho;const Tr=((Ho=window.__UPFYN_CONFIG__)==null?void 0:Ho.isPlatform)===!0||!1,Rv="",V=(t,e={})=>{const r={};return e.body instanceof FormData||(r["Content-Type"]="application/json"),fetch(t,{...e,credentials:"include",headers:{...r,...e.headers}})},Ce={auth:{status:()=>fetch("/api/auth/status",{credentials:"include"}),login:(t,e)=>fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:e}),credentials:"include"}),register:(t,e,r,s,i)=>fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstName:t,lastName:e,password:r,email:s,phone:i}),credentials:"include"}),user:()=>V("/api/auth/user"),logout:()=>V("/api/auth/logout",{method:"POST"})},projects:()=>{const t=new AbortController,e=setTimeout(()=>t.abort(),1e4);return V("/api/projects",{signal:t.signal}).finally(()=>clearTimeout(e))},sessions:(t,e=5,r=0)=>V(`/api/projects/${t}/sessions?limit=${e}&offset=${r}`),sessionMessages:(t,e,r=null,s=0,i="claude")=>{const n=new URLSearchParams;r!==null&&(n.append("limit",r),n.append("offset",s));const o=n.toString();let c;return i==="codex"?c=`/api/codex/sessions/${e}/messages${o?`?${o}`:""}`:i==="cursor"?c=`/api/cursor/sessions/${e}/messages${o?`?${o}`:""}`:c=`/api/projects/${t}/sessions/${e}/messages${o?`?${o}`:""}`,V(c)},renameProject:(t,e)=>V(`/api/projects/${t}/rename`,{method:"PUT",body:JSON.stringify({displayName:e})}),deleteSession:(t,e)=>V(`/api/projects/${t}/sessions/${e}`,{method:"DELETE"}),deleteCodexSession:t=>V(`/api/codex/sessions/${t}`,{method:"DELETE"}),deleteProject:(t,e=!1)=>V(`/api/projects/${t}${e?"?force=true":""}`,{method:"DELETE"}),createProject:t=>V("/api/projects/create",{method:"POST",body:JSON.stringify({path:t})}),createWorkspace:t=>V("/api/projects/create-workspace",{method:"POST",body:JSON.stringify(t)}),readFile:(t,e)=>V(`/api/projects/${t}/file?filePath=${encodeURIComponent(e)}`),saveFile:(t,e,r)=>V(`/api/projects/${t}/file`,{method:"PUT",body:JSON.stringify({filePath:e,content:r})}),getFiles:(t,e={})=>V(`/api/projects/${t}/files`,e),transcribe:t=>V("/api/transcribe",{method:"POST",body:t,headers:{}}),taskmaster:{init:t=>V(`/api/taskmaster/init/${t}`,{method:"POST"}),addTask:(t,{prompt:e,title:r,description:s,priority:i,dependencies:n})=>V(`/api/taskmaster/add-task/${t}`,{method:"POST",body:JSON.stringify({prompt:e,title:r,description:s,priority:i,dependencies:n})}),parsePRD:(t,{fileName:e,numTasks:r,append:s})=>V(`/api/taskmaster/parse-prd/${t}`,{method:"POST",body:JSON.stringify({fileName:e,numTasks:r,append:s})}),getTemplates:()=>V("/api/taskmaster/prd-templates"),applyTemplate:(t,{templateId:e,fileName:r,customizations:s})=>V(`/api/taskmaster/apply-template/${t}`,{method:"POST",body:JSON.stringify({templateId:e,fileName:r,customizations:s})}),updateTask:(t,e,r)=>V(`/api/taskmaster/update-task/${t}/${e}`,{method:"PUT",body:JSON.stringify(r)})},browseFilesystem:(t=null)=>{const e=new URLSearchParams;return t&&e.append("path",t),V(`/api/browse-filesystem?${e}`)},createFolder:t=>V("/api/create-folder",{method:"POST",body:JSON.stringify({path:t})}),user:{gitConfig:()=>V("/api/user/git-config"),updateGitConfig:(t,e)=>V("/api/user/git-config",{method:"POST",body:JSON.stringify({gitName:t,gitEmail:e})}),onboardingStatus:()=>V("/api/user/onboarding-status"),completeOnboarding:()=>V("/api/user/complete-onboarding",{method:"POST"})},voice:{stt:t=>V("/api/voice/stt",{method:"POST",body:t,headers:{}}),tts:(t,e)=>V("/api/voice/tts",{method:"POST",body:JSON.stringify({text:t,voice:e})}),voices:()=>V("/api/voice/voices")},relay:{status:()=>V("/api/relay/status"),disconnect:()=>V("/api/relay/disconnect",{method:"POST"}),createToken:t=>V("/api/relay/tokens",{method:"POST",body:JSON.stringify({name:t})}),tokens:()=>V("/api/relay/tokens"),deleteToken:t=>V(`/api/relay/tokens/${t}`,{method:"DELETE"})},canvas:{load:t=>V(`/api/canvas/${encodeURIComponent(t)}`),save:(t,e,r)=>V(`/api/canvas/${encodeURIComponent(t)}`,{method:"POST",body:JSON.stringify({elements:e,appState:r})})},composio:{status:()=>V("/api/composio/status"),catalog:()=>V("/api/composio/catalog"),connections:()=>V("/api/composio/connections"),connect:(t,e)=>V("/api/composio/connect",{method:"POST",body:JSON.stringify({appName:t,authConfigId:e})}),waitForConnection:t=>V("/api/composio/connect/wait",{method:"POST",body:JSON.stringify({connectedAccountId:t})}),disconnect:t=>V(`/api/composio/connections/${t}`,{method:"DELETE"}),tools:t=>V(`/api/composio/tools?apps=${(t||[]).join(",")}`),toolSchema:t=>V(`/api/composio/tools/${t}/schema`),executeTool:(t,e)=>V(`/api/composio/tools/${t}/execute`,{method:"POST",body:JSON.stringify({arguments:e})})},get:t=>V(`/api${t}`)},Yo=j.createContext({user:null,login:()=>{},register:()=>{},logout:()=>{},isLoading:!0,needsSetup:!1,hasCompletedOnboarding:!0,refreshOnboardingStatus:()=>{},error:null}),Bt=()=>{const t=j.useContext(Yo);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},vc=({children:t})=>{const[e,r]=j.useState(null),[s,i]=j.useState(!0),[n,o]=j.useState(!1),[c,d]=j.useState(!0),[p,g]=j.useState(null);j.useEffect(()=>{if(Tr){r({username:"platform-user"}),o(!1),S(),i(!1);return}E()},[]);const S=async()=>{try{const P=await Ce.user.onboardingStatus();if(P.ok){const M=await P.json();d(M.hasCompletedOnboarding)}}catch{d(!0)}},C=async()=>{await S()},E=async()=>{try{if(i(!0),g(null),(await(await Ce.auth.status()).json()).needsSetup){o(!0),i(!1);return}try{const y=await Ce.auth.user();if(y.ok){const k=await y.json();r(k.user),o(!1),await S()}else r(null)}catch{r(null)}}catch{g("Failed to check authentication status")}finally{i(!1)}},w={user:e,login:async(P,M)=>{try{g(null);const y=await Ce.auth.login(P,M),k=await y.json();return y.ok?(r(k.user),{success:!0}):(g(k.error||"Login failed"),{success:!1,error:k.error||"Login failed"})}catch{const y="Network error. Please try again.";return g(y),{success:!1,error:y}}},register:async(P,M,y,k,_)=>{try{g(null);const A=await Ce.auth.register(P,M,y,k,_),L=await A.json();return A.ok?(r(L.user),o(!1),{success:!0}):(g(L.error||"Registration failed"),{success:!1,error:L.error||"Registration failed"})}catch{const A="Network error. Please try again.";return g(A),{success:!1,error:A}}},logout:async()=>{try{await Ce.auth.logout()}catch{}r(null),localStorage.removeItem("auth-token")},isLoading:s,needsSetup:n,hasCompletedOnboarding:c,refreshOnboardingStatus:C,error:p};return T.jsx(Yo.Provider,{value:w,children:t})},Ko=j.createContext({toasts:[],addToast:()=>{},removeToast:()=>{}});function Fv(){return j.useContext(Ko)}function yc({children:t}){const[e,r]=j.useState([]),s=j.useRef(0),i=j.useCallback(o=>{r(c=>c.map(d=>d.id===o?{...d,removing:!0}:d)),setTimeout(()=>{r(c=>c.filter(d=>d.id!==o))},250)},[]),n=j.useCallback((o,c="info",d)=>{const p=++s.current,g=d??(c==="error"?8e3:4e3);r(S=>[...S.slice(-4),{id:p,message:o,type:c}]),g>0&&setTimeout(()=>i(p),g)},[i]);return T.jsxs(Ko.Provider,{value:{toasts:e,addToast:n,removeToast:i},children:[t,T.jsx(kc,{toasts:e,onDismiss:i})]})}const bc={info:nc,success:rc,error:tc,warning:ec},wc={info:"border-blue-500/40 bg-blue-500/10 text-blue-300",success:"border-emerald-500/40 bg-emerald-500/10 text-emerald-300",error:"border-red-500/40 bg-red-500/10 text-red-300",warning:"border-amber-500/40 bg-amber-500/10 text-amber-300"},Sc={info:"text-blue-400",success:"text-emerald-400",error:"text-red-400",warning:"text-amber-400"};function kc({toasts:t,onDismiss:e}){return t.length===0?null:T.jsx("div",{className:"fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 max-w-sm pointer-events-none","aria-live":"polite",role:"status",children:t.map(r=>{const s=bc[r.type];return T.jsxs("div",{className:`pointer-events-auto flex items-start gap-2.5 border rounded-xl px-3.5 py-3 text-sm shadow-lg backdrop-blur-md transition-all duration-250 ${r.removing?"opacity-0 translate-x-4":"animate-in slide-in-from-right duration-300"} ${wc[r.type]}`,role:"alert",children:[T.jsx(s,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${Sc[r.type]}`}),T.jsx("span",{className:"flex-1 leading-snug",children:r.message}),T.jsx("button",{onClick:()=>e(r.id),className:"flex-shrink-0 p-0.5 rounded-md hover:bg-white/10 transition-colors","aria-label":"Dismiss",children:T.jsx(sc,{className:"w-3.5 h-3.5 opacity-60 hover:opacity-100"})})]},r.id)})})}const Qo=j.createContext(null),Xo=()=>{const t=j.useContext(Qo);if(!t)throw new Error("useWebSocket must be used within a WebSocketProvider");return t},_c=()=>`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,Cc=3e4,Tc=2e3,Ec=50,Pc=new Set(["claude-command","cursor-command","codex-command","openrouter-command","cancel-command","abort-session","subscribe-session","get-active-sessions"]),xc=()=>{const t=j.useRef(null),e=j.useRef(!1),[r,s]=j.useState(null),[i,n]=j.useState("disconnected"),o=j.useRef(null),c=j.useRef(0),[d,p]=j.useState(0),g=j.useRef([]),S=j.useRef(!1),{user:C}=Bt(),E=j.useCallback(P=>{const M=g.current;if(M.length!==0){g.current=[];for(const y of M)P.readyState===WebSocket.OPEN&&P.send(y)}},[]),h=j.useCallback(()=>{if(e.current||!C&&!Tr)return;const P=S.current;n(P?"reconnecting":"connecting");try{const M=_c(),y=new WebSocket(M);y.onopen=()=>{n("connected"),t.current=y,c.current=0,p(0),S.current=!0,E(y)},y.onmessage=k=>{try{const _=JSON.parse(k.data);s(_)}catch(_){console.error("Error parsing WebSocket message:",_)}},y.onclose=()=>{n(S.current?"reconnecting":"disconnected"),t.current=null;const k=c.current,_=Math.min(Tc*Math.pow(1.5,k),Cc);c.current=k+1,p(k+1),o.current=setTimeout(()=>{e.current||h()},_)},y.onerror=()=>{}}catch(M){console.error("Error creating WebSocket connection:",M),n("disconnected")}},[C,E]);j.useEffect(()=>(e.current=!1,c.current=0,h(),()=>{e.current=!0,o.current&&clearTimeout(o.current),t.current&&t.current.close()}),[C]),j.useEffect(()=>{const P=()=>{(i==="reconnecting"||i==="disconnected")&&(o.current&&clearTimeout(o.current),c.current=0,p(0),h())};return window.addEventListener("online",P),()=>window.removeEventListener("online",P)},[i,h]);const m=j.useCallback(P=>{const M=t.current;if(M&&M.readyState===WebSocket.OPEN)M.send(JSON.stringify(P));else if(P!=null&&P.type&&Pc.has(P.type)){const y=g.current;y.length<Ec&&y.push(JSON.stringify(P))}},[]),b=i==="connected";return j.useMemo(()=>({ws:t.current,sendMessage:m,latestMessage:r,isConnected:b,connectionState:i,reconnectAttempts:d}),[m,r,b,i,d])},Ac=({children:t})=>{const e=xc();return T.jsx(Qo.Provider,{value:e,children:t})},Zo=j.createContext({projects:[],currentProject:null,projectTaskMaster:null,mcpServerStatus:null,tasks:[],nextTask:null,isLoading:!1,isLoadingTasks:!1,isLoadingMCP:!1,error:null,refreshProjects:()=>{},setCurrentProject:()=>{},refreshTasks:()=>{},refreshMCPStatus:()=>{},clearError:()=>{}}),$v=()=>{const t=j.useContext(Zo);if(!t)throw new Error("useTaskMaster must be used within a TaskMasterProvider");return t},jc=({children:t})=>{const{latestMessage:e}=Xo(),{user:r,isLoading:s}=Bt(),i=!!r,[n,o]=j.useState([]),[c,d]=j.useState(null),[p,g]=j.useState(null),[S,C]=j.useState(null),[E,h]=j.useState([]),[m,b]=j.useState(null),[w,P]=j.useState(!1),[M,y]=j.useState(!1),[k,_]=j.useState(!1),[A,L]=j.useState(null),$=(q,X)=>{console.error(`TaskMaster ${X} error:`,q),L({message:q.message||`Failed to ${X}`,context:X,timestamp:new Date().toISOString()})},N=j.useCallback(()=>{L(null)},[]),W=j.useCallback(async()=>{if(!r||!i){o([]),d(null);return}try{P(!0),N();const q=await Ce.get("/projects");if(!q.ok)throw new Error(`Failed to fetch projects: ${q.status}`);const X=await q.json();if(!Array.isArray(X)){console.error("Projects API returned non-array data:",X),o([]);return}const ye=X.map(ae=>{var le,Ae,Fe,a,u,l;return{...ae,taskMasterConfigured:((le=ae.taskmaster)==null?void 0:le.hasTaskmaster)||!1,taskMasterStatus:((Ae=ae.taskmaster)==null?void 0:Ae.status)||"not-configured",taskCount:((a=(Fe=ae.taskmaster)==null?void 0:Fe.metadata)==null?void 0:a.taskCount)||0,completedCount:((l=(u=ae.taskmaster)==null?void 0:u.metadata)==null?void 0:l.completed)||0}});if(o(ye),c){const ae=ye.find(le=>le.name===c.name);ae&&(d(ae),g(ae.taskmaster))}}catch(q){$(q,"load projects")}finally{P(!1)}},[r,i]),ne=j.useCallback(async q=>{try{d(q),h([]),b(null),g((q==null?void 0:q.taskmaster)||null)}catch(X){console.error("Error in setCurrentProject:",X),$(X,"set current project"),g((q==null?void 0:q.taskmaster)||null)}},[]),F=j.useCallback(async()=>{if(!r||!i){C(null);return}try{_(!0),N();const q=await Ce.get("/mcp-utils/taskmaster-server");C(q)}catch(q){$(q,"check MCP server status")}finally{_(!1)}},[r,i]),se=j.useCallback(async()=>{var q;if(!c){h([]),b(null);return}if(!r||!i){h([]),b(null);return}try{y(!0),N();const X=await Ce.get(`/taskmaster/tasks/${encodeURIComponent(c.name)}`);if(!X.ok){const le=await X.json();throw new Error(le.message||"Failed to load tasks")}const ye=await X.json();h(ye.tasks||[]);const ae=((q=ye.tasks)==null?void 0:q.find(le=>le.status==="pending"||le.status==="in-progress"))||null;b(ae)}catch(X){console.error("Error loading tasks:",X),$(X,"load tasks"),h([]),b(null)}finally{y(!1)}},[c,r,i]);j.useEffect(()=>{!s&&r&&i?(W(),F()):console.log("Auth not ready or no user, skipping project load:",{authLoading:s,user:!!r,token:!!i})},[W,F,s,r,i]),j.useEffect(()=>{r&&i&&N()},[r,i,N]),j.useEffect(()=>{c!=null&&c.name&&r&&i&&se()},[c==null?void 0:c.name,r,i,se]),j.useEffect(()=>{if(e)switch(e.type){case"taskmaster-project-updated":e.projectName&&W();break;case"taskmaster-tasks-updated":e.projectName===(c==null?void 0:c.name)&&se();break;case"taskmaster-mcp-status-changed":F();break}},[e,W,se,F,c]);const ie={projects:n,currentProject:c,projectTaskMaster:p,mcpServerStatus:S,tasks:E,nextTask:m,isLoading:w,isLoadingTasks:M,isLoadingMCP:k,error:A,refreshProjects:W,setCurrentProject:ne,refreshTasks:se,refreshMCPStatus:F,clearError:N};return T.jsx(Zo.Provider,{value:ie,children:t})},ei=j.createContext({tasksEnabled:!0,setTasksEnabled:()=>{},toggleTasksEnabled:()=>{},isTaskMasterInstalled:null,isTaskMasterReady:null,installationStatus:null,isCheckingInstallation:!0}),Uv=()=>{const t=j.useContext(ei);if(!t)throw new Error("useTasksSettings must be used within a TasksSettingsProvider");return t},Mc=({children:t})=>{const[e,r]=j.useState(()=>{const E=localStorage.getItem("tasks-enabled");return E!==null?JSON.parse(E):!0}),[s,i]=j.useState(null),[n,o]=j.useState(null),[c,d]=j.useState(null),[p,g]=j.useState(!0);j.useEffect(()=>{localStorage.setItem("tasks-enabled",JSON.stringify(e))},[e]),j.useEffect(()=>{setTimeout(async()=>{var h,m;try{const b=await Ce.get("/taskmaster/installation-status");if(b.ok){const w=await b.json();d(w),i(((h=w.installation)==null?void 0:h.isInstalled)||!1),o(w.isReady||!1);const P=localStorage.getItem("tasks-enabled");!((m=w.installation)!=null&&m.isInstalled)&&!P&&r(!1)}else console.error("Failed to check TaskMaster installation status"),i(!0),o(!1)}catch(b){console.error("Error checking TaskMaster installation:",b),i(!0),o(!1)}finally{g(!1)}},0)},[]);const C={tasksEnabled:e,setTasksEnabled:r,toggleTasksEnabled:()=>{r(E=>!E)},isTaskMasterInstalled:s,isTaskMasterReady:n,installationStatus:c,isCheckingInstallation:p};return T.jsx(ei.Provider,{value:C,children:t})},ti=j.createContext(null),qv=()=>{const t=j.useContext(ti);if(!t)throw new Error("useRelay must be used within a RelayProvider");return t},Oc=({children:t,latestMessage:e})=>{const{user:r}=Bt(),[s,i]=j.useState(!1),[n,o]=j.useState(null),[c,d]=j.useState(null),[p,g]=j.useState(null),[S,C]=j.useState(null),[E,h]=j.useState(null),[m,b]=j.useState(!1),[w,P]=j.useState(!0),[M,y]=j.useState(!1),k=j.useRef(!1),_=j.useCallback(async()=>{var $,N,W;try{P(!0);const ne=await Ce.relay.status();if(ne.ok){const F=await ne.json();i(F.connected===!0),o(F.connectedAt??null),d(F.cwd??(($=F.machine)==null?void 0:$.cwd)??null),g(((N=F.machine)==null?void 0:N.hostname)??F.machine??null),C(((W=F.machine)==null?void 0:W.platform)??F.platform??null),h(F.agents??null),F.sandboxActive!==void 0&&b(F.sandboxActive===!0)}else i(!1),o(null),d(null),g(null),C(null),h(null)}catch{i(!1),o(null),d(null),g(null),C(null),h(null),b(!1)}finally{P(!1)}},[]),A=j.useCallback(async()=>{try{return y(!0),(await Ce.relay.disconnect()).ok?(i(!1),o(null),d(null),g(null),C(null),h(null),b(!1),!0):!1}catch{return!1}finally{y(!1)}},[]);j.useEffect(()=>{r&&!k.current&&(k.current=!0,_()),r||(k.current=!1,i(!1),o(null),d(null),g(null),C(null),h(null),b(!1),P(!1))},[r,_]),j.useEffect(()=>{if(!r)return;const $=setInterval(()=>{_()},15e3);return()=>clearInterval($)},[r,_]),j.useEffect(()=>{e&&(e.type==="relay-status"&&(i(e.connected===!0),o(e.connectedAt??null),e.cwd&&d(e.cwd),e.machine&&g(e.machine),e.platform&&C(e.platform),b(e.sandboxActive===!0),P(!1)),e.type==="relay-agents"&&h(e.agents??null),e.type==="relay-init"&&(i(!0),e.cwd&&d(e.cwd),e.platform&&C(e.platform),P(!1),typeof window.refreshProjects=="function"&&window.refreshProjects()))},[e]),j.useEffect(()=>{if(window.parent!==window)try{window.parent.postMessage({type:"relay-status",connected:s},"*")}catch{}},[s]);const L=j.useMemo(()=>({isRelayConnected:s,relayConnectedAt:n,relayCwd:c,relayMachine:p,relayPlatform:S,relayAgents:E,sandboxActive:m,isChecking:w,isDisconnecting:M,recheckStatus:_,disconnect:A}),[s,n,c,p,S,E,m,w,M,_,A]);return T.jsx(ti.Provider,{value:L,children:t})};function Yn(){const t=j.useRef(null);return j.useEffect(()=>{const e=t.current;if(!e)return;const r=e.getContext("2d");let s,i,n,o,c;const d="アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン0123456789ABCDEFabcdef{}[]()<>=;:+-*/&|!?#@$%^~".split(""),p=14,g=()=>{s=window.innerWidth,i=window.innerHeight,e.width=s,e.height=i,n=Math.floor(s/p),o=Array.from({length:n},()=>Math.random()*-100)};g(),window.addEventListener("resize",g);const S=()=>{r.fillStyle="rgba(0, 0, 0, 0.05)",r.fillRect(0,0,s,i);for(let C=0;C<n;C++){const E=d[Math.floor(Math.random()*d.length)],h=C*p,m=o[C]*p;if(r.fillStyle=`rgba(34, 197, 94, ${.9+Math.random()*.1})`,r.font=`${p}px monospace`,r.fillText(E,h,m),o[C]>1){const b=d[Math.floor(Math.random()*d.length)];r.fillStyle=`rgba(34, 197, 94, ${.15+Math.random()*.15})`,r.fillText(b,h,m-p)}m>i&&Math.random()>.975&&(o[C]=0),o[C]+=.5+Math.random()*.5}c=requestAnimationFrame(S)};return c=requestAnimationFrame(S),()=>{window.removeEventListener("resize",g),cancelAnimationFrame(c)}},[]),T.jsx("canvas",{ref:t,className:"fixed inset-0 z-0 pointer-events-none",style:{opacity:.3}})}const Ic=()=>{const[t,e]=j.useState(null),[r,s]=j.useState(!1),[i,n]=j.useState(""),[o,c]=j.useState(""),[d,p]=j.useState(""),[g,S]=j.useState(""),[C,E]=j.useState(""),[h,m]=j.useState(""),[b,w]=j.useState(""),[P,M]=j.useState(""),[y,k]=j.useState(!1),[_,A]=j.useState(""),{login:L,register:$,user:N}=Bt();j.useEffect(()=>{N&&N.first_name?localStorage.setItem("upfynai-user-name",N.first_name):N&&N.username&&localStorage.setItem("upfynai-user-name",N.username)},[N]);const[W,ne]=j.useState(null);j.useEffect(()=>{const q=localStorage.getItem("upfynai-user-name");q&&ne(q)},[]);const F=q=>{s(!0),A(""),setTimeout(()=>{e(q),s(!1)},400)},se=async q=>{if(q.preventDefault(),A(""),!i||!o){A("Please fill in all fields");return}k(!0);const X=await L(i,o);X.success||A(X.error),k(!1)},ie=async q=>{if(q.preventDefault(),A(""),!d.trim()||!C.trim()||!b){A("First name, email and password are required");return}if(b!==P){A("Passwords do not match");return}if(b.length<6){A("Password must be at least 6 characters");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C)){A("Invalid email format");return}k(!0);const X=await $(d.trim(),g.trim(),b,C.trim(),h.trim()||null);X.success||A(X.error),k(!1)};return t===null?T.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4 overflow-hidden relative",children:[T.jsx(Yn,{}),T.jsx("style",{children:`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SetupForm-P6dsYgHO.js","assets/vendor-react-96lCPsRK.js","assets/vendor-syntax-LS_Nt30I.js","assets/vendor-markdown-CimbIo6Y.js","assets/vendor-icons-GyYE35HP.js","assets/vendor-i18n-DCFGyhQR.js","assets/Onboarding-B3cteLu2.js","assets/LoginModal-CImJHRjX.js","assets/vendor-xterm-CZq1hqo1.js","assets/vendor-xterm-qxJ8_QYu.css","assets/vendor-canvas-DvHJ_Pn2.js","assets/vendor-mermaid-DucWyDEe.js","assets/vendor-canvas-BZV40eAE.css","assets/CanvasFullScreen-D1GWQsGL.js","assets/CanvasWorkspace-D7ORj358.js","assets/AppContent-CwrTP6TW.js","assets/vendor-codemirror-D2ALgpaX.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Qa=Object.defineProperty;var Xa=(t,e,r)=>e in t?Qa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var G=(t,e,r)=>Xa(t,typeof e!="symbol"?e+"":e,r);import{r as j,j as T,b as Za,g as ec,B as tc,d as rc,e as Dr,R as vt,f as nc}from"./vendor-react-96lCPsRK.js";import{b as Cr}from"./vendor-syntax-LS_Nt30I.js";import{T as sc,C as oc,a as ic,I as ac,X as cc,M as lc}from"./vendor-icons-GyYE35HP.js";import{i as On,B as uc}from"./vendor-i18n-DCFGyhQR.js";import"./vendor-markdown-CimbIo6Y.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=r(i);fetch(i.href,n)}})();const dc=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pc={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},hc=t=>pc[t],mc=t=>t.replace(dc,hc);let en={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:mc,transDefaultProps:void 0};const fc=(t={})=>{en={...en,...t}},Fv=()=>en;let Qo;const gc=t=>{Qo=t},$v=()=>Qo,vc={type:"3rdParty",init(t){fc(t.options.react),gc(t)}},yc=j.createContext();class Uv{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function bc({i18n:t,defaultNS:e,children:r}){const s=j.useMemo(()=>({i18n:t,defaultNS:e}),[t,e]);return j.createElement(yc.Provider,{value:s},r)}const Xo=j.createContext(),qv=()=>{const t=j.useContext(Xo);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t},wc=({children:t})=>{const[e,r]=j.useState(()=>{const n=localStorage.getItem("theme");return n?n==="dark":window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{if(e){document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark");const n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');n&&n.setAttribute("content","black-translucent");const o=document.querySelector('meta[name="theme-color"]');o&&o.setAttribute("content","#0c1117")}else{document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light");const n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');n&&n.setAttribute("content","default");const o=document.querySelector('meta[name="theme-color"]');o&&o.setAttribute("content","#ffffff")}},[e]),j.useEffect(()=>{if(!window.matchMedia)return;const n=window.matchMedia("(prefers-color-scheme: dark)"),o=c=>{localStorage.getItem("theme")||r(c.matches)};return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[]);const i={isDarkMode:e,toggleDarkMode:()=>{r(n=>!n)}};return T.jsx(Xo.Provider,{value:i,children:t})};var Wo;const Tr=((Wo=window.__UPFYN_CONFIG__)==null?void 0:Wo.isPlatform)===!0||!1;var zo;const Vv=((zo=window.__UPFYN_CONFIG__)==null?void 0:zo.isLocal)===!0;var Yo;const Sc=((Yo=window.__UPFYN_CONFIG__)==null?void 0:Yo.basename)||"";var Ko;const Yn=((Ko=window.__UPFYN_CONFIG__)==null?void 0:Ko.wsUrl)||void 0||"",U=(t,e={})=>{const r={};return e.body instanceof FormData||(r["Content-Type"]="application/json"),fetch(t,{...e,credentials:"include",headers:{...r,...e.headers}})},Ce={auth:{status:()=>fetch("/api/auth/status",{credentials:"include"}),login:(t,e)=>fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:e}),credentials:"include"}),register:(t,e,r,s,i)=>fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstName:t,lastName:e,password:r,email:s,phone:i}),credentials:"include"}),user:()=>U("/api/auth/user"),logout:()=>U("/api/auth/logout",{method:"POST"})},projects:()=>{const t=new AbortController,e=setTimeout(()=>t.abort(),1e4);return U("/api/projects",{signal:t.signal}).finally(()=>clearTimeout(e))},sessions:(t,e=5,r=0)=>U(`/api/projects/${t}/sessions?limit=${e}&offset=${r}`),sessionMessages:(t,e,r=null,s=0,i="claude")=>{const n=new URLSearchParams;r!==null&&(n.append("limit",r),n.append("offset",s));const o=n.toString();let c;return i==="codex"?c=`/api/codex/sessions/${e}/messages${o?`?${o}`:""}`:i==="cursor"?c=`/api/cursor/sessions/${e}/messages${o?`?${o}`:""}`:c=`/api/projects/${t}/sessions/${e}/messages${o?`?${o}`:""}`,U(c)},renameProject:(t,e)=>U(`/api/projects/${t}/rename`,{method:"PUT",body:JSON.stringify({displayName:e})}),deleteSession:(t,e)=>U(`/api/projects/${t}/sessions/${e}`,{method:"DELETE"}),deleteCodexSession:t=>U(`/api/codex/sessions/${t}`,{method:"DELETE"}),deleteProject:(t,e=!1)=>U(`/api/projects/${t}${e?"?force=true":""}`,{method:"DELETE"}),createProject:t=>U("/api/projects/create",{method:"POST",body:JSON.stringify({path:t})}),createWorkspace:t=>U("/api/projects/create-workspace",{method:"POST",body:JSON.stringify(t)}),readFile:(t,e)=>U(`/api/projects/${t}/file?filePath=${encodeURIComponent(e)}`),saveFile:(t,e,r)=>U(`/api/projects/${t}/file`,{method:"PUT",body:JSON.stringify({filePath:e,content:r})}),getFiles:(t,e={})=>U(`/api/projects/${t}/files`,e),transcribe:t=>U("/api/transcribe",{method:"POST",body:t,headers:{}}),taskmaster:{init:t=>U(`/api/taskmaster/init/${t}`,{method:"POST"}),addTask:(t,{prompt:e,title:r,description:s,priority:i,dependencies:n})=>U(`/api/taskmaster/add-task/${t}`,{method:"POST",body:JSON.stringify({prompt:e,title:r,description:s,priority:i,dependencies:n})}),parsePRD:(t,{fileName:e,numTasks:r,append:s})=>U(`/api/taskmaster/parse-prd/${t}`,{method:"POST",body:JSON.stringify({fileName:e,numTasks:r,append:s})}),getTemplates:()=>U("/api/taskmaster/prd-templates"),applyTemplate:(t,{templateId:e,fileName:r,customizations:s})=>U(`/api/taskmaster/apply-template/${t}`,{method:"POST",body:JSON.stringify({templateId:e,fileName:r,customizations:s})}),updateTask:(t,e,r)=>U(`/api/taskmaster/update-task/${t}/${e}`,{method:"PUT",body:JSON.stringify(r)})},browseFilesystem:(t=null)=>{const e=new URLSearchParams;return t&&e.append("path",t),U(`/api/browse-filesystem?${e}`)},createFolder:t=>U("/api/create-folder",{method:"POST",body:JSON.stringify({path:t})}),user:{gitConfig:()=>U("/api/user/git-config"),updateGitConfig:(t,e)=>U("/api/user/git-config",{method:"POST",body:JSON.stringify({gitName:t,gitEmail:e})}),onboardingStatus:()=>U("/api/user/onboarding-status"),completeOnboarding:()=>U("/api/user/complete-onboarding",{method:"POST"})},voice:{stt:t=>U("/api/voice/stt",{method:"POST",body:t,headers:{}}),tts:(t,e)=>U("/api/voice/tts",{method:"POST",body:JSON.stringify({text:t,voice:e})}),voices:()=>U("/api/voice/voices")},relay:{status:()=>U("/api/relay/status"),disconnect:()=>U("/api/relay/disconnect",{method:"POST"}),createToken:t=>U("/api/relay/tokens",{method:"POST",body:JSON.stringify({name:t})}),tokens:()=>U("/api/relay/tokens"),deleteToken:t=>U(`/api/relay/tokens/${t}`,{method:"DELETE"})},canvas:{load:t=>U(`/api/canvas/${encodeURIComponent(t)}`),save:(t,e,r)=>U(`/api/canvas/${encodeURIComponent(t)}`,{method:"POST",body:JSON.stringify({elements:e,appState:r})})},composio:{status:()=>U("/api/composio/status"),catalog:()=>U("/api/composio/catalog"),connections:()=>U("/api/composio/connections"),connect:(t,e)=>U("/api/composio/connect",{method:"POST",body:JSON.stringify({appName:t,authConfigId:e})}),waitForConnection:t=>U("/api/composio/connect/wait",{method:"POST",body:JSON.stringify({connectedAccountId:t})}),disconnect:t=>U(`/api/composio/connections/${t}`,{method:"DELETE"}),tools:t=>U(`/api/composio/tools?apps=${(t||[]).join(",")}`),toolSchema:t=>U(`/api/composio/tools/${t}/schema`),executeTool:(t,e)=>U(`/api/composio/tools/${t}/execute`,{method:"POST",body:JSON.stringify({arguments:e})})},browser:{status:()=>U("/api/browser/status"),createSession:()=>U("/api/browser/sessions",{method:"POST"}),listSessions:()=>U("/api/browser/sessions"),getSession:t=>U(`/api/browser/sessions/${t}`),closeSession:t=>U(`/api/browser/sessions/${t}`,{method:"DELETE"}),navigate:(t,e)=>U(`/api/browser/sessions/${t}/navigate`,{method:"POST",body:JSON.stringify({url:e})}),sandboxPreview:(t,e)=>U(`/api/browser/sessions/${t}/sandbox-preview`,{method:"POST",body:JSON.stringify({port:e})}),screenshot:t=>U(`/api/browser/sessions/${t}/screenshot`,{method:"POST"}),aiAct:(t,e)=>U(`/api/browser/sessions/${t}/ai/act`,{method:"POST",body:JSON.stringify({instruction:e})}),aiExtract:(t,e,r)=>U(`/api/browser/sessions/${t}/ai/extract`,{method:"POST",body:JSON.stringify({instruction:e,schema:r})}),aiObserve:(t,e)=>U(`/api/browser/sessions/${t}/ai/observe`,{method:"POST",body:JSON.stringify({instruction:e})}),consoleErrors:t=>U(`/api/browser/sessions/${t}/console-errors`)},get:t=>U(`/api${t}`)},Zo=j.createContext({user:null,login:()=>{},register:()=>{},logout:()=>{},isLoading:!0,needsSetup:!1,hasCompletedOnboarding:!0,refreshOnboardingStatus:()=>{},error:null}),Bt=()=>{const t=j.useContext(Zo);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},kc=({children:t})=>{const[e,r]=j.useState(null),[s,i]=j.useState(!0),[n,o]=j.useState(!1),[c,d]=j.useState(!0),[p,g]=j.useState(null);j.useEffect(()=>{if(Tr){r({username:"platform-user"}),o(!1),S(),i(!1);return}E()},[]);const S=async()=>{try{const P=await Ce.user.onboardingStatus();if(P.ok){const M=await P.json();d(M.hasCompletedOnboarding)}}catch{d(!0)}},C=async()=>{await S()},E=async()=>{try{if(i(!0),g(null),(await(await Ce.auth.status()).json()).needsSetup){o(!0),i(!1);return}try{const y=await Ce.auth.user();if(y.ok){const k=await y.json();r(k.user),o(!1),await S()}else r(null)}catch{r(null)}}catch{g("Failed to check authentication status")}finally{i(!1)}},w={user:e,login:async(P,M)=>{try{g(null);const y=await Ce.auth.login(P,M),k=await y.json();return y.ok?(r(k.user),{success:!0}):(g(k.error||"Login failed"),{success:!1,error:k.error||"Login failed"})}catch{const y="Network error. Please try again.";return g(y),{success:!1,error:y}}},register:async(P,M,y,k,_)=>{try{g(null);const A=await Ce.auth.register(P,M,y,k,_),L=await A.json();return A.ok?(r(L.user),o(!1),{success:!0}):(g(L.error||"Registration failed"),{success:!1,error:L.error||"Registration failed"})}catch{const A="Network error. Please try again.";return g(A),{success:!1,error:A}}},logout:async()=>{try{await Ce.auth.logout()}catch{}r(null),localStorage.removeItem("auth-token")},isLoading:s,needsSetup:n,hasCompletedOnboarding:c,refreshOnboardingStatus:C,error:p};return T.jsx(Zo.Provider,{value:w,children:t})},ei=j.createContext({toasts:[],addToast:()=>{},removeToast:()=>{}});function Bv(){return j.useContext(ei)}function _c({children:t}){const[e,r]=j.useState([]),s=j.useRef(0),i=j.useCallback(o=>{r(c=>c.map(d=>d.id===o?{...d,removing:!0}:d)),setTimeout(()=>{r(c=>c.filter(d=>d.id!==o))},250)},[]),n=j.useCallback((o,c="info",d)=>{const p=++s.current,g=d??(c==="error"?8e3:4e3);r(S=>[...S.slice(-4),{id:p,message:o,type:c}]),g>0&&setTimeout(()=>i(p),g)},[i]);return T.jsxs(ei.Provider,{value:{toasts:e,addToast:n,removeToast:i},children:[t,T.jsx(Pc,{toasts:e,onDismiss:i})]})}const Cc={info:ac,success:ic,error:oc,warning:sc},Tc={info:"border-blue-500/40 bg-blue-500/10 text-blue-300",success:"border-emerald-500/40 bg-emerald-500/10 text-emerald-300",error:"border-red-500/40 bg-red-500/10 text-red-300",warning:"border-amber-500/40 bg-amber-500/10 text-amber-300"},Ec={info:"text-blue-400",success:"text-emerald-400",error:"text-red-400",warning:"text-amber-400"};function Pc({toasts:t,onDismiss:e}){return t.length===0?null:T.jsx("div",{className:"fixed bottom-4 right-4 z-[9999] flex flex-col gap-2 max-w-sm pointer-events-none","aria-live":"polite",role:"status",children:t.map(r=>{const s=Cc[r.type];return T.jsxs("div",{className:`pointer-events-auto flex items-start gap-2.5 border rounded-xl px-3.5 py-3 text-sm shadow-lg backdrop-blur-md transition-all duration-250 ${r.removing?"opacity-0 translate-x-4":"animate-in slide-in-from-right duration-300"} ${Tc[r.type]}`,role:"alert",children:[T.jsx(s,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${Ec[r.type]}`}),T.jsx("span",{className:"flex-1 leading-snug",children:r.message}),T.jsx("button",{onClick:()=>e(r.id),className:"flex-shrink-0 p-0.5 rounded-md hover:bg-white/10 transition-colors","aria-label":"Dismiss",children:T.jsx(cc,{className:"w-3.5 h-3.5 opacity-60 hover:opacity-100"})})]},r.id)})})}const ti=j.createContext(null),ri=()=>{const t=j.useContext(ti);if(!t)throw new Error("useWebSocket must be used within a WebSocketProvider");return t},xc=()=>Yn?`${Yn.replace(/^http/,"ws")}/ws`:`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,Ac=3e4,jc=2e3,Mc=50,Ic=new Set(["claude-command","cursor-command","codex-command","openrouter-command","cancel-command","abort-session","subscribe-session","get-active-sessions"]),Oc=()=>{const t=j.useRef(null),e=j.useRef(!1),[r,s]=j.useState(null),[i,n]=j.useState("disconnected"),o=j.useRef(null),c=j.useRef(0),[d,p]=j.useState(0),g=j.useRef([]),S=j.useRef(!1),{user:C}=Bt(),E=j.useCallback(P=>{const M=g.current;if(M.length!==0){g.current=[];for(const y of M)P.readyState===WebSocket.OPEN&&P.send(y)}},[]),h=j.useCallback(()=>{if(e.current||!C&&!Tr)return;const P=S.current;n(P?"reconnecting":"connecting");try{const M=xc(),y=new WebSocket(M);y.onopen=()=>{n("connected"),t.current=y,c.current=0,p(0),S.current=!0,E(y)},y.onmessage=k=>{try{const _=JSON.parse(k.data);s(_)}catch(_){console.error("Error parsing WebSocket message:",_)}},y.onclose=()=>{n(S.current?"reconnecting":"disconnected"),t.current=null;const k=c.current,_=Math.min(jc*Math.pow(1.5,k),Ac);c.current=k+1,p(k+1),o.current=setTimeout(()=>{e.current||h()},_)},y.onerror=()=>{}}catch(M){console.error("Error creating WebSocket connection:",M),n("disconnected")}},[C,E]);j.useEffect(()=>(e.current=!1,c.current=0,h(),()=>{e.current=!0,o.current&&clearTimeout(o.current),t.current&&t.current.close()}),[C]),j.useEffect(()=>{const P=()=>{(i==="reconnecting"||i==="disconnected")&&(o.current&&clearTimeout(o.current),c.current=0,p(0),h())};return window.addEventListener("online",P),()=>window.removeEventListener("online",P)},[i,h]);const m=j.useCallback(P=>{const M=t.current;if(M&&M.readyState===WebSocket.OPEN)M.send(JSON.stringify(P));else if(P!=null&&P.type&&Ic.has(P.type)){const y=g.current;y.length<Mc&&y.push(JSON.stringify(P))}},[]),b=i==="connected";return j.useMemo(()=>({ws:t.current,sendMessage:m,latestMessage:r,isConnected:b,connectionState:i,reconnectAttempts:d}),[m,r,b,i,d])},Dc=({children:t})=>{const e=Oc();return T.jsx(ti.Provider,{value:e,children:t})},ni=j.createContext({projects:[],currentProject:null,projectTaskMaster:null,mcpServerStatus:null,tasks:[],nextTask:null,isLoading:!1,isLoadingTasks:!1,isLoadingMCP:!1,error:null,refreshProjects:()=>{},setCurrentProject:()=>{},refreshTasks:()=>{},refreshMCPStatus:()=>{},clearError:()=>{}}),Jv=()=>{const t=j.useContext(ni);if(!t)throw new Error("useTaskMaster must be used within a TaskMasterProvider");return t},Lc=({children:t})=>{const{latestMessage:e}=ri(),{user:r,isLoading:s}=Bt(),i=!!r,[n,o]=j.useState([]),[c,d]=j.useState(null),[p,g]=j.useState(null),[S,C]=j.useState(null),[E,h]=j.useState([]),[m,b]=j.useState(null),[w,P]=j.useState(!1),[M,y]=j.useState(!1),[k,_]=j.useState(!1),[A,L]=j.useState(null),$=(V,X)=>{console.error(`TaskMaster ${X} error:`,V),L({message:V.message||`Failed to ${X}`,context:X,timestamp:new Date().toISOString()})},N=j.useCallback(()=>{L(null)},[]),W=j.useCallback(async()=>{if(!r||!i){o([]),d(null);return}try{P(!0),N();const V=await Ce.get("/projects");if(!V.ok)throw new Error(`Failed to fetch projects: ${V.status}`);const X=await V.json();if(!Array.isArray(X)){console.error("Projects API returned non-array data:",X),o([]);return}const ye=X.map(ae=>{var le,Ae,Fe,a,u,l;return{...ae,taskMasterConfigured:((le=ae.taskmaster)==null?void 0:le.hasTaskmaster)||!1,taskMasterStatus:((Ae=ae.taskmaster)==null?void 0:Ae.status)||"not-configured",taskCount:((a=(Fe=ae.taskmaster)==null?void 0:Fe.metadata)==null?void 0:a.taskCount)||0,completedCount:((l=(u=ae.taskmaster)==null?void 0:u.metadata)==null?void 0:l.completed)||0}});if(o(ye),c){const ae=ye.find(le=>le.name===c.name);ae&&(d(ae),g(ae.taskmaster))}}catch(V){$(V,"load projects")}finally{P(!1)}},[r,i]),ne=j.useCallback(async V=>{try{d(V),h([]),b(null),g((V==null?void 0:V.taskmaster)||null)}catch(X){console.error("Error in setCurrentProject:",X),$(X,"set current project"),g((V==null?void 0:V.taskmaster)||null)}},[]),F=j.useCallback(async()=>{if(!r||!i){C(null);return}try{_(!0),N();const V=await Ce.get("/mcp-utils/taskmaster-server");C(V)}catch(V){$(V,"check MCP server status")}finally{_(!1)}},[r,i]),se=j.useCallback(async()=>{var V;if(!c){h([]),b(null);return}if(!r||!i){h([]),b(null);return}try{y(!0),N();const X=await Ce.get(`/taskmaster/tasks/${encodeURIComponent(c.name)}`);if(!X.ok){const le=await X.json();throw new Error(le.message||"Failed to load tasks")}const ye=await X.json();h(ye.tasks||[]);const ae=((V=ye.tasks)==null?void 0:V.find(le=>le.status==="pending"||le.status==="in-progress"))||null;b(ae)}catch(X){console.error("Error loading tasks:",X),$(X,"load tasks"),h([]),b(null)}finally{y(!1)}},[c,r,i]);j.useEffect(()=>{!s&&r&&i?(W(),F()):console.log("Auth not ready or no user, skipping project load:",{authLoading:s,user:!!r,token:!!i})},[W,F,s,r,i]),j.useEffect(()=>{r&&i&&N()},[r,i,N]),j.useEffect(()=>{c!=null&&c.name&&r&&i&&se()},[c==null?void 0:c.name,r,i,se]),j.useEffect(()=>{if(e)switch(e.type){case"taskmaster-project-updated":e.projectName&&W();break;case"taskmaster-tasks-updated":e.projectName===(c==null?void 0:c.name)&&se();break;case"taskmaster-mcp-status-changed":F();break}},[e,W,se,F,c]);const ie={projects:n,currentProject:c,projectTaskMaster:p,mcpServerStatus:S,tasks:E,nextTask:m,isLoading:w,isLoadingTasks:M,isLoadingMCP:k,error:A,refreshProjects:W,setCurrentProject:ne,refreshTasks:se,refreshMCPStatus:F,clearError:N};return T.jsx(ni.Provider,{value:ie,children:t})},si=j.createContext({tasksEnabled:!0,setTasksEnabled:()=>{},toggleTasksEnabled:()=>{},isTaskMasterInstalled:null,isTaskMasterReady:null,installationStatus:null,isCheckingInstallation:!0}),Gv=()=>{const t=j.useContext(si);if(!t)throw new Error("useTasksSettings must be used within a TasksSettingsProvider");return t},Nc=({children:t})=>{const[e,r]=j.useState(()=>{const E=localStorage.getItem("tasks-enabled");return E!==null?JSON.parse(E):!0}),[s,i]=j.useState(null),[n,o]=j.useState(null),[c,d]=j.useState(null),[p,g]=j.useState(!0);j.useEffect(()=>{localStorage.setItem("tasks-enabled",JSON.stringify(e))},[e]),j.useEffect(()=>{setTimeout(async()=>{var h,m;try{const b=await Ce.get("/taskmaster/installation-status");if(b.ok){const w=await b.json();d(w),i(((h=w.installation)==null?void 0:h.isInstalled)||!1),o(w.isReady||!1);const P=localStorage.getItem("tasks-enabled");!((m=w.installation)!=null&&m.isInstalled)&&!P&&r(!1)}else console.error("Failed to check TaskMaster installation status"),i(!0),o(!1)}catch(b){console.error("Error checking TaskMaster installation:",b),i(!0),o(!1)}finally{g(!1)}},0)},[]);const C={tasksEnabled:e,setTasksEnabled:r,toggleTasksEnabled:()=>{r(E=>!E)},isTaskMasterInstalled:s,isTaskMasterReady:n,installationStatus:c,isCheckingInstallation:p};return T.jsx(si.Provider,{value:C,children:t})},oi=j.createContext(null),Hv=()=>{const t=j.useContext(oi);if(!t)throw new Error("useRelay must be used within a RelayProvider");return t},Rc=({children:t,latestMessage:e})=>{const{user:r}=Bt(),[s,i]=j.useState(!1),[n,o]=j.useState(null),[c,d]=j.useState(null),[p,g]=j.useState(null),[S,C]=j.useState(null),[E,h]=j.useState(null),[m,b]=j.useState(!1),[w,P]=j.useState(!0),[M,y]=j.useState(!1),k=j.useRef(!1),_=j.useCallback(async()=>{var $,N,W;try{P(!0);const ne=await Ce.relay.status();if(ne.ok){const F=await ne.json();i(F.connected===!0),o(F.connectedAt??null),d(F.cwd??(($=F.machine)==null?void 0:$.cwd)??null),g(((N=F.machine)==null?void 0:N.hostname)??F.machine??null),C(((W=F.machine)==null?void 0:W.platform)??F.platform??null),h(F.agents??null),F.sandboxActive!==void 0&&b(F.sandboxActive===!0)}else i(!1),o(null),d(null),g(null),C(null),h(null)}catch{i(!1),o(null),d(null),g(null),C(null),h(null),b(!1)}finally{P(!1)}},[]),A=j.useCallback(async()=>{try{return y(!0),(await Ce.relay.disconnect()).ok?(i(!1),o(null),d(null),g(null),C(null),h(null),b(!1),!0):!1}catch{return!1}finally{y(!1)}},[]);j.useEffect(()=>{r&&!k.current&&(k.current=!0,_()),r||(k.current=!1,i(!1),o(null),d(null),g(null),C(null),h(null),b(!1),P(!1))},[r,_]),j.useEffect(()=>{if(!r)return;const $=setInterval(()=>{_()},15e3);return()=>clearInterval($)},[r,_]),j.useEffect(()=>{e&&(e.type==="relay-status"&&(i(e.connected===!0),o(e.connectedAt??null),e.cwd&&d(e.cwd),e.machine&&g(e.machine),e.platform&&C(e.platform),b(e.sandboxActive===!0),P(!1)),e.type==="relay-agents"&&h(e.agents??null),e.type==="relay-init"&&(i(!0),e.cwd&&d(e.cwd),e.platform&&C(e.platform),P(!1),typeof window.refreshProjects=="function"&&window.refreshProjects()))},[e]);const L=j.useMemo(()=>({isRelayConnected:s,relayConnectedAt:n,relayCwd:c,relayMachine:p,relayPlatform:S,relayAgents:E,sandboxActive:m,isChecking:w,isDisconnecting:M,recheckStatus:_,disconnect:A}),[s,n,c,p,S,E,m,w,M,_,A]);return T.jsx(oi.Provider,{value:L,children:t})};function Kn(){const t=j.useRef(null);return j.useEffect(()=>{const e=t.current;if(!e)return;const r=e.getContext("2d");let s,i,n,o,c;const d="アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン0123456789ABCDEFabcdef{}[]()<>=;:+-*/&|!?#@$%^~".split(""),p=14,g=()=>{s=window.innerWidth,i=window.innerHeight,e.width=s,e.height=i,n=Math.floor(s/p),o=Array.from({length:n},()=>Math.random()*-100)};g(),window.addEventListener("resize",g);const S=()=>{r.fillStyle="rgba(0, 0, 0, 0.05)",r.fillRect(0,0,s,i);for(let C=0;C<n;C++){const E=d[Math.floor(Math.random()*d.length)],h=C*p,m=o[C]*p;if(r.fillStyle=`rgba(34, 197, 94, ${.9+Math.random()*.1})`,r.font=`${p}px monospace`,r.fillText(E,h,m),o[C]>1){const b=d[Math.floor(Math.random()*d.length)];r.fillStyle=`rgba(34, 197, 94, ${.15+Math.random()*.15})`,r.fillText(b,h,m-p)}m>i&&Math.random()>.975&&(o[C]=0),o[C]+=.5+Math.random()*.5}c=requestAnimationFrame(S)};return c=requestAnimationFrame(S),()=>{window.removeEventListener("resize",g),cancelAnimationFrame(c)}},[]),T.jsx("canvas",{ref:t,className:"fixed inset-0 z-0 pointer-events-none",style:{opacity:.3}})}const Fc=()=>{const[t,e]=j.useState(null),[r,s]=j.useState(!1),[i,n]=j.useState(""),[o,c]=j.useState(""),[d,p]=j.useState(""),[g,S]=j.useState(""),[C,E]=j.useState(""),[h,m]=j.useState(""),[b,w]=j.useState(""),[P,M]=j.useState(""),[y,k]=j.useState(!1),[_,A]=j.useState(""),{login:L,register:$,user:N}=Bt();j.useEffect(()=>{N&&N.first_name?localStorage.setItem("upfynai-user-name",N.first_name):N&&N.username&&localStorage.setItem("upfynai-user-name",N.username)},[N]);const[W,ne]=j.useState(null);j.useEffect(()=>{const V=localStorage.getItem("upfynai-user-name");V&&ne(V)},[]);const F=V=>{s(!0),A(""),setTimeout(()=>{e(V),s(!1)},400)},se=async V=>{if(V.preventDefault(),A(""),!i||!o){A("Please fill in all fields");return}k(!0);const X=await L(i,o);X.success||A(X.error),k(!1)},ie=async V=>{if(V.preventDefault(),A(""),!d.trim()||!C.trim()||!b){A("First name, email and password are required");return}if(b!==P){A("Passwords do not match");return}if(b.length<6){A("Password must be at least 6 characters");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C)){A("Invalid email format");return}k(!0);const X=await $(d.trim(),g.trim(),b,C.trim(),h.trim()||null);X.success||A(X.error),k(!1)};return t===null?T.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4 overflow-hidden relative",children:[T.jsx(Kn,{}),T.jsx("style",{children:`
|
|
3
3
|
@keyframes fadeGrow {
|
|
4
4
|
0% { opacity: 1; transform: scale(1); }
|
|
5
5
|
100% { opacity: 0; transform: scale(3); filter: blur(20px); }
|
|
@@ -12,25 +12,25 @@ var Wa=Object.defineProperty;var za=(t,e,r)=>e in t?Wa(t,e,{enumerable:!0,config
|
|
|
12
12
|
100% { opacity: 1; transform: translateY(0); }
|
|
13
13
|
}
|
|
14
14
|
.fade-in { animation: fadeIn 0.6s ease-out; }
|
|
15
|
-
`}),T.jsx("div",{className:`text-center relative z-10 ${r?"splash-animate":"fade-in"}`,children:W?T.jsxs(T.Fragment,{children:[T.jsx("button",{onClick:()=>F("login"),className:"block mx-auto mb-6 focus:outline-none group",children:T.jsxs("h1",{className:"text-5xl sm:text-7xl font-bold text-foreground transition-all duration-200 group-hover:text-blue-500 group-hover:scale-105 cursor-pointer",children:["Welcome, ",W,"!"]})}),T.jsxs("button",{onClick:()=>F("signup"),className:"text-sm text-muted-foreground hover:text-foreground transition-colors focus:outline-none",children:["Not ",W,"? ",T.jsx("span",{className:"underline",children:"Create a new account"})]})]}):T.jsxs("div",{className:"flex flex-col items-center gap-8",children:[T.jsx("button",{onClick:()=>F("signup"),className:"focus:outline-none group",children:T.jsx("h1",{className:"text-5xl sm:text-7xl font-bold text-foreground transition-all duration-200 group-hover:text-blue-500 group-hover:scale-105 cursor-pointer",children:"Hello"})}),T.jsx("div",{className:"w-16 h-px bg-border"}),T.jsx("button",{onClick:()=>F("login"),className:"focus:outline-none group",children:T.jsx("h1",{className:"text-5xl sm:text-7xl font-bold text-muted-foreground transition-all duration-200 group-hover:text-blue-500 group-hover:scale-105 cursor-pointer",children:"Welcome back"})})]})})]}):T.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4 overflow-hidden relative",children:[T.jsx(
|
|
15
|
+
`}),T.jsx("div",{className:`text-center relative z-10 ${r?"splash-animate":"fade-in"}`,children:W?T.jsxs(T.Fragment,{children:[T.jsx("button",{onClick:()=>F("login"),className:"block mx-auto mb-6 focus:outline-none group",children:T.jsxs("h1",{className:"text-5xl sm:text-7xl font-bold text-foreground transition-all duration-200 group-hover:text-blue-500 group-hover:scale-105 cursor-pointer",children:["Welcome, ",W,"!"]})}),T.jsxs("button",{onClick:()=>F("signup"),className:"text-sm text-muted-foreground hover:text-foreground transition-colors focus:outline-none",children:["Not ",W,"? ",T.jsx("span",{className:"underline",children:"Create a new account"})]})]}):T.jsxs("div",{className:"flex flex-col items-center gap-8",children:[T.jsx("button",{onClick:()=>F("signup"),className:"focus:outline-none group",children:T.jsx("h1",{className:"text-5xl sm:text-7xl font-bold text-foreground transition-all duration-200 group-hover:text-blue-500 group-hover:scale-105 cursor-pointer",children:"Hello"})}),T.jsx("div",{className:"w-16 h-px bg-border"}),T.jsx("button",{onClick:()=>F("login"),className:"focus:outline-none group",children:T.jsx("h1",{className:"text-5xl sm:text-7xl font-bold text-muted-foreground transition-all duration-200 group-hover:text-blue-500 group-hover:scale-105 cursor-pointer",children:"Welcome back"})})]})})]}):T.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4 overflow-hidden relative",children:[T.jsx(Kn,{}),T.jsx("style",{children:`
|
|
16
16
|
@keyframes growIn {
|
|
17
17
|
0% { opacity: 0; transform: scale(0.8); filter: blur(10px); }
|
|
18
18
|
100% { opacity: 1; transform: scale(1); filter: blur(0px); }
|
|
19
19
|
}
|
|
20
20
|
.grow-in { animation: growIn 0.4s ease-out; }
|
|
21
|
-
`}),T.jsx("div",{className:"fixed inset-0 z-[1] bg-background/80 backdrop-blur-md",onClick:()=>{y||(e(null),A(""))}}),T.jsx("div",{className:"relative z-10 w-full max-w-md grow-in",children:T.jsxs("div",{className:"bg-card rounded-xl shadow-2xl border border-border p-8 space-y-6",children:[T.jsxs("div",{className:"text-center",children:[T.jsx("h1",{className:"text-3xl font-bold text-foreground mb-1",children:t==="login"?W?`Welcome back, ${W}!`:"Welcome back":"Hello, let's get started"}),T.jsx("p",{className:"text-muted-foreground text-sm",children:t==="login"?"Enter your credentials":"Join Upfyn-Code"})]}),t==="login"&&T.jsxs("form",{onSubmit:se,className:"space-y-4",children:[T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Email, Username, or Mobile"}),T.jsx("input",{type:"text",value:i,onChange:q=>n(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"you@example.com",required:!0,disabled:y,autoFocus:!0,autoComplete:"username"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Password"}),T.jsx("input",{type:"password",value:o,onChange:q=>c(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Your password",required:!0,disabled:y,autoComplete:"current-password"})]}),_&&T.jsx("div",{className:"p-3 bg-red-100 dark:bg-red-900/20 border border-red-300 dark:border-red-800 rounded-lg",children:T.jsx("p",{className:"text-sm text-red-700 dark:text-red-400",children:_})}),T.jsx("button",{type:"submit",disabled:y,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white font-medium py-2.5 rounded-lg transition-colors",children:y?"Signing in...":"Sign In"}),T.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",T.jsx("button",{type:"button",onClick:()=>{e("signup"),A("")},className:"text-blue-500 hover:underline",children:"Sign Up"})]})]}),t==="signup"&&T.jsxs("form",{onSubmit:ie,className:"space-y-3",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"First Name"}),T.jsx("input",{type:"text",value:d,onChange:q=>p(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"John",required:!0,disabled:y,autoFocus:!0})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Last Name"}),T.jsx("input",{type:"text",value:g,onChange:q=>S(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Doe",disabled:y})]})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Email"}),T.jsx("input",{type:"email",value:C,onChange:q=>E(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"you@example.com",required:!0,disabled:y})]}),T.jsxs("div",{children:[T.jsxs("label",{className:"block text-sm font-medium text-foreground mb-1",children:["Mobile ",T.jsx("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),T.jsx("input",{type:"tel",value:h,onChange:q=>m(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"+91 9876543210",disabled:y})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Password"}),T.jsx("input",{type:"password",value:b,onChange:q=>w(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"At least 6 characters",required:!0,disabled:y})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Confirm Password"}),T.jsx("input",{type:"password",value:P,onChange:q=>M(q.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Confirm password",required:!0,disabled:y})]}),_&&T.jsx("div",{className:"p-3 bg-red-100 dark:bg-red-900/20 border border-red-300 dark:border-red-800 rounded-lg",children:T.jsx("p",{className:"text-sm text-red-700 dark:text-red-400",children:_})}),T.jsx("button",{type:"submit",disabled:y,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white font-medium py-2.5 rounded-lg transition-colors",children:y?"Creating account...":"Create Account"}),T.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",T.jsx("button",{type:"button",onClick:()=>{e("login"),A("")},className:"text-blue-500 hover:underline",children:"Sign In"})]})]})]})})]})},Dc=j.lazy(()=>Cr(()=>import("./SetupForm-CtCKitZG.js"),__vite__mapDeps([0,1,2,3,4,5]))),Lc=j.lazy(()=>Cr(()=>import("./Onboarding-Drnlt75a.js"),__vite__mapDeps([6,1,7,8,9,10,11,2,3,12,4,5]))),zt=()=>T.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:T.jsxs("div",{className:"text-center",children:[T.jsx("div",{className:"flex justify-center mb-4",children:T.jsx("div",{className:"w-16 h-16 bg-primary rounded-lg flex items-center justify-center shadow-sm",children:T.jsx(oc,{className:"w-8 h-8 text-primary-foreground"})})}),T.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Upfyn-Code"}),T.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[T.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce"}),T.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),T.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]}),T.jsx("p",{className:"text-muted-foreground mt-2",children:"Loading..."})]})}),Nc=({children:t})=>{const{user:e,isLoading:r,needsSetup:s,hasCompletedOnboarding:i,refreshOnboardingStatus:n}=Bt();return Tr?r?T.jsx(zt,{}):i?t:T.jsx(j.Suspense,{fallback:T.jsx(zt,{}),children:T.jsx(Lc,{onComplete:n})}):r?T.jsx(zt,{}):s?T.jsx(j.Suspense,{fallback:T.jsx(zt,{}),children:T.jsx(Dc,{})}):e?t:T.jsx(Ic,{})};var ft={};function Kn(t,e){if(t==null)return{};var r,s,i=(function(o,c){if(o==null)return{};var d={};for(var p in o)if({}.hasOwnProperty.call(o,p)){if(c.indexOf(p)!==-1)continue;d[p]=o[p]}return d})(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(s=0;s<n.length;s++)r=n[s],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t){return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(t)}function ri(t){var e=(function(r,s){if(Q(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,s);if(Q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)})(t,"string");return Q(e)=="symbol"?e:e+""}function Qn(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,ri(s.key),s)}}function ke(t,e,r){return e&&Qn(t.prototype,e),r&&Qn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Er(t,e){if(e&&(Q(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r})(t)}function Ie(t){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(t)}function qt(t,e){return qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},qt(t,e)}function Pr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qt(t,e)}function Re(t,e,r){return(e=ri(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xn(t,e,r,s,i,n,o){try{var c=t[n](o),d=c.value}catch(p){return void r(p)}c.done?e(d):Promise.resolve(d).then(s,i)}function B(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function o(d){Xn(n,s,i,o,c,"next",d)}function c(d){Xn(n,s,i,o,c,"throw",d)}o(void 0)}))}}function Zn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function me(t,e){return(function(r){if(Array.isArray(r))return r})(t)||(function(r,s){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,o,c,d,p=[],g=!0,S=!1;try{if(c=(i=i.call(r)).next,s===0){if(Object(i)!==i)return;g=!1}else for(;!(g=(n=c.call(i)).done)&&(p.push(n.value),p.length!==s);g=!0);}catch(C){S=!0,o=C}finally{try{if(!g&&i.return!=null&&(d=i.return(),Object(d)!==d))return}finally{if(S)throw o}}return p}})(t,e)||(function(r,s){if(r){if(typeof r=="string")return Zn(r,s);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Zn(r,s):void 0}})(t,e)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
22
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Rc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var es,Yt={exports:{}},tn=(function(){if(es)return Yt.exports;es=1;var t,e=typeof Reflect=="object"?Reflect:null,r=e&&typeof e.apply=="function"?e.apply:function(m,b,w){return Function.prototype.apply.call(m,b,w)};t=e&&typeof e.ownKeys=="function"?e.ownKeys:Object.getOwnPropertySymbols?function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:function(m){return Object.getOwnPropertyNames(m)};var s=Number.isNaN||function(m){return m!=m};function i(){i.init.call(this)}Yt.exports=i,Yt.exports.once=function(m,b){return new Promise((function(w,P){function M(k){m.removeListener(b,y),P(k)}function y(){typeof m.removeListener=="function"&&m.removeListener("error",M),w([].slice.call(arguments))}h(m,b,y,{once:!0}),b!=="error"&&(function(k,_,A){typeof k.on=="function"&&h(k,"error",_,A)})(m,M,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var n=10;function o(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}function c(m){return m._maxListeners===void 0?i.defaultMaxListeners:m._maxListeners}function d(m,b,w,P){var M,y,k,_;if(o(w),(y=m._events)===void 0?(y=m._events=Object.create(null),m._eventsCount=0):(y.newListener!==void 0&&(m.emit("newListener",b,w.listener?w.listener:w),y=m._events),k=y[b]),k===void 0)k=y[b]=w,++m._eventsCount;else if(typeof k=="function"?k=y[b]=P?[w,k]:[k,w]:P?k.unshift(w):k.push(w),(M=c(m))>0&&k.length>M&&!k.warned){k.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=m,A.type=b,A.count=k.length,_=A,console&&console.warn&&console.warn(_)}return m}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(m,b,w){var P={fired:!1,wrapFn:void 0,target:m,type:b,listener:w},M=p.bind(P);return M.listener=w,P.wrapFn=M,M}function S(m,b,w){var P=m._events;if(P===void 0)return[];var M=P[b];return M===void 0?[]:typeof M=="function"?w?[M.listener||M]:[M]:w?(function(y){for(var k=new Array(y.length),_=0;_<k.length;++_)k[_]=y[_].listener||y[_];return k})(M):E(M,M.length)}function C(m){var b=this._events;if(b!==void 0){var w=b[m];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}function E(m,b){for(var w=new Array(b),P=0;P<b;++P)w[P]=m[P];return w}function h(m,b,w,P){if(typeof m.on=="function")P.once?m.once(b,w):m.on(b,w);else{if(typeof m.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof m);m.addEventListener(b,(function M(y){P.once&&m.removeEventListener(b,M),w(y)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(m){if(typeof m!="number"||m<0||s(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");n=m}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||s(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(m){for(var b=[],w=1;w<arguments.length;w++)b.push(arguments[w]);var P=m==="error",M=this._events;if(M!==void 0)P=P&&M.error===void 0;else if(!P)return!1;if(P){var y;if(b.length>0&&(y=b[0]),y instanceof Error)throw y;var k=new Error("Unhandled error."+(y?" ("+y.message+")":""));throw k.context=y,k}var _=M[m];if(_===void 0)return!1;if(typeof _=="function")r(_,this,b);else{var A=_.length,L=E(_,A);for(w=0;w<A;++w)r(L[w],this,b)}return!0},i.prototype.addListener=function(m,b){return d(this,m,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(m,b){return d(this,m,b,!0)},i.prototype.once=function(m,b){return o(b),this.on(m,g(this,m,b)),this},i.prototype.prependOnceListener=function(m,b){return o(b),this.prependListener(m,g(this,m,b)),this},i.prototype.removeListener=function(m,b){var w,P,M,y,k;if(o(b),(P=this._events)===void 0)return this;if((w=P[m])===void 0)return this;if(w===b||w.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete P[m],P.removeListener&&this.emit("removeListener",m,w.listener||b));else if(typeof w!="function"){for(M=-1,y=w.length-1;y>=0;y--)if(w[y]===b||w[y].listener===b){k=w[y].listener,M=y;break}if(M<0)return this;M===0?w.shift():(function(_,A){for(;A+1<_.length;A++)_[A]=_[A+1];_.pop()})(w,M),w.length===1&&(P[m]=w[0]),P.removeListener!==void 0&&this.emit("removeListener",m,k||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(m){var b,w,P;if((w=this._events)===void 0)return this;if(w.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):w[m]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete w[m]),this;if(arguments.length===0){var M,y=Object.keys(w);for(P=0;P<y.length;++P)(M=y[P])!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=w[m])=="function")this.removeListener(m,b);else if(b!==void 0)for(P=b.length-1;P>=0;P--)this.removeListener(m,b[P]);return this},i.prototype.listeners=function(m){return S(this,m,!0)},i.prototype.rawListeners=function(m){return S(this,m,!1)},i.listenerCount=function(m,b){return typeof m.listenerCount=="function"?m.listenerCount(b):C.call(m,b)},i.prototype.listenerCount=C,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},Yt.exports})(),Kt=Rc(tn),ts=Object.prototype.hasOwnProperty;function rs(t,e,r){for(r of t.keys())if(ge(r,e))return r}function ge(t,e){var r,s,i;if(t===e)return!0;if(t&&e&&(r=t.constructor)===e.constructor){if(r===Date)return t.getTime()===e.getTime();if(r===RegExp)return t.toString()===e.toString();if(r===Array){if((s=t.length)===e.length)for(;s--&&ge(t[s],e[s]););return s===-1}if(r===Set){if(t.size!==e.size)return!1;for(s of t)if((i=s)&&typeof i=="object"&&!(i=rs(e,i))||!e.has(i))return!1;return!0}if(r===Map){if(t.size!==e.size)return!1;for(s of t)if((i=s[0])&&typeof i=="object"&&!(i=rs(e,i))||!ge(s[1],e.get(i)))return!1;return!0}if(r===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(r===DataView){if((s=t.byteLength)===e.byteLength)for(;s--&&t.getInt8(s)===e.getInt8(s););return s===-1}if(ArrayBuffer.isView(t)){if((s=t.byteLength)===e.byteLength)for(;s--&&t[s]===e[s];);return s===-1}if(!r||typeof t=="object"){for(r in s=0,t)if(ts.call(t,r)&&++s&&!ts.call(e,r)||!(r in e)||!ge(t[r],e[r]))return!1;return Object.keys(e).length===s}}return t!=t&&e!=e}const Fc={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},ni={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},oe={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fe={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},We={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class O{static getFirstMatch(e,r){const s=r.match(e);return s&&s.length>0&&s[1]||""}static getSecondMatch(e,r){const s=r.match(e);return s&&s.length>1&&s[2]||""}static matchAndReturnConst(e,r,s){if(e.test(r))return s}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const r=e.split(".").splice(0,2).map((s=>parseInt(s,10)||0));if(r.push(0),r[0]===10)switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const r=e.split(".").splice(0,2).map((s=>parseInt(s,10)||0));if(r.push(0),!(r[0]===1&&r[1]<5))return r[0]===1&&r[1]<6?"Cupcake":r[0]===1&&r[1]>=6?"Donut":r[0]===2&&r[1]<2?"Eclair":r[0]===2&&r[1]===2?"Froyo":r[0]===2&&r[1]>2?"Gingerbread":r[0]===3?"Honeycomb":r[0]===4&&r[1]<1?"Ice Cream Sandwich":r[0]===4&&r[1]<4?"Jelly Bean":r[0]===4&&r[1]>=4?"KitKat":r[0]===5?"Lollipop":r[0]===6?"Marshmallow":r[0]===7?"Nougat":r[0]===8?"Oreo":r[0]===9?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,r,s=!1){const i=O.getVersionPrecision(e),n=O.getVersionPrecision(r);let o=Math.max(i,n),c=0;const d=O.map([e,r],(p=>{const g=o-O.getVersionPrecision(p),S=p+new Array(g+1).join(".0");return O.map(S.split("."),(C=>new Array(20-C.length).join("0")+C)).reverse()}));for(s&&(c=o-Math.min(i,n)),o-=1;o>=c;){if(d[0][o]>d[1][o])return 1;if(d[0][o]===d[1][o]){if(o===c)return 0;o-=1}else if(d[0][o]<d[1][o])return-1}}static map(e,r){const s=[];let i;if(Array.prototype.map)return Array.prototype.map.call(e,r);for(i=0;i<e.length;i+=1)s.push(r(e[i]));return s}static find(e,r){let s,i;if(Array.prototype.find)return Array.prototype.find.call(e,r);for(s=0,i=e.length;s<i;s+=1){const n=e[s];if(r(n,s))return n}}static assign(e,...r){const s=e;let i,n;if(Object.assign)return Object.assign(e,...r);for(i=0,n=r.length;i<n;i+=1){const o=r[i];typeof o=="object"&&o!==null&&Object.keys(o).forEach((c=>{s[c]=o[c]}))}return e}static getBrowserAlias(e){return Fc[e]}static getBrowserTypeByAlias(e){return ni[e]||""}}const ee=/version\/(\d+(\.?_?\d+)+)/i,$c=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=O.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=O.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=O.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=O.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=O.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=O.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=O.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=O.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=O.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=O.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=O.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=O.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=O.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=O.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=O.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=O.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=O.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=O.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=O.getFirstMatch(ee,t)||O.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=O.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=O.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=O.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=O.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=O.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=O.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=O.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=O.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=O.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=O.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=t.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:O.getFirstMatch(e,t),version:O.getSecondMatch(e,t)}}}];var Uc=[{test:[/Roku\/DVP/],describe(t){const e=O.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:fe.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=O.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:fe.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=O.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=O.getWindowsVersionName(e);return{name:fe.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:fe.iOS},r=O.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=O.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=O.getMacOSVersionName(e),s={name:fe.MacOS,version:e};return r&&(s.versionName=r),s}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=O.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:fe.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=O.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=O.getAndroidVersionName(e),s={name:fe.Android,version:e};return r&&(s.versionName=r),s}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=O.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:fe.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=O.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||O.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||O.getFirstMatch(/\bbb(\d+)/i,t);return{name:fe.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=O.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:fe.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=O.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:fe.Tizen,version:e}}},{test:[/linux/i],describe:()=>({name:fe.Linux})},{test:[/CrOS/],describe:()=>({name:fe.ChromeOS})},{test:[/PlayStation 4/],describe(t){const e=O.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:fe.PlayStation4,version:e}}}],qc=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(t){const e=O.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:oe.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:oe.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:oe.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:oe.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:oe.tablet})},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=O.getFirstMatch(/(ipod|iphone)/i,t);return{type:oe.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:oe.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:oe.mobile})},{test:t=>t.getBrowserName(!0)==="blackberry",describe:()=>({type:oe.mobile,vendor:"BlackBerry"})},{test:t=>t.getBrowserName(!0)==="bada",describe:()=>({type:oe.mobile})},{test:t=>t.getBrowserName()==="windows phone",describe:()=>({type:oe.mobile,vendor:"Microsoft"})},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe:()=>({type:oe.tablet})},{test:t=>t.getOSName(!0)==="android",describe:()=>({type:oe.mobile})},{test:t=>t.getOSName(!0)==="macos",describe:()=>({type:oe.desktop,vendor:"Apple"})},{test:t=>t.getOSName(!0)==="windows",describe:()=>({type:oe.desktop})},{test:t=>t.getOSName(!0)==="linux",describe:()=>({type:oe.desktop})},{test:t=>t.getOSName(!0)==="playstation 4",describe:()=>({type:oe.tv})},{test:t=>t.getOSName(!0)==="roku",describe:()=>({type:oe.tv})}],Vc=[{test:t=>t.getBrowserName(!0)==="microsoft edge",describe(t){if(/\sedg\//i.test(t))return{name:We.Blink};const e=O.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:We.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){const e={name:We.Trident},r=O.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:t=>t.test(/presto/i),describe(t){const e={name:We.Presto},r=O.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:We.Gecko},r=O.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:We.Blink})},{test:[/(apple)?webkit/i],describe(t){const e={name:We.WebKit},r=O.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class ns{constructor(e,r=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=O.find($c,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=O.find(Uc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:r}=this.getOS();return e?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:r}=this.getPlatform();return e?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const e=O.find(qc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=O.find(Vc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return O.assign({},this.parsedResult)}satisfies(e){const r={};let s=0;const i={};let n=0;if(Object.keys(e).forEach((o=>{const c=e[o];typeof c=="string"?(i[o]=c,n+=1):typeof c=="object"&&(r[o]=c,s+=1)})),s>0){const o=Object.keys(r),c=O.find(o,(p=>this.isOS(p)));if(c){const p=this.satisfies(r[c]);if(p!==void 0)return p}const d=O.find(o,(p=>this.isPlatform(p)));if(d){const p=this.satisfies(r[d]);if(p!==void 0)return p}}if(n>0){const o=Object.keys(i),c=O.find(o,(d=>this.isBrowser(d,!0)));if(c!==void 0)return this.compareVersion(i[c])}}isBrowser(e,r=!1){const s=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const n=O.getBrowserTypeByAlias(i);return r&&n&&(i=n.toLowerCase()),i===s}compareVersion(e){let r=[0],s=e,i=!1;const n=this.getBrowserVersion();if(typeof n=="string")return e[0]===">"||e[0]==="<"?(s=e.substr(1),e[1]==="="?(i=!0,s=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?s=e.substr(1):e[0]==="~"&&(i=!0,s=e.substr(1)),r.indexOf(O.compareVersions(n,s,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,r=!1){return this.isBrowser(e,r)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((r=>this.is(r)))}}/*!
|
|
21
|
+
`}),T.jsx("div",{className:"fixed inset-0 z-[1] bg-background/80 backdrop-blur-md",onClick:()=>{y||(e(null),A(""))}}),T.jsx("div",{className:"relative z-10 w-full max-w-md grow-in",children:T.jsxs("div",{className:"bg-card rounded-xl shadow-2xl border border-border p-8 space-y-6",children:[T.jsxs("div",{className:"text-center",children:[T.jsx("h1",{className:"text-3xl font-bold text-foreground mb-1",children:t==="login"?W?`Welcome back, ${W}!`:"Welcome back":"Hello, let's get started"}),T.jsx("p",{className:"text-muted-foreground text-sm",children:t==="login"?"Enter your credentials":"Join UpfynAI"})]}),t==="login"&&T.jsxs("form",{onSubmit:se,className:"space-y-4",children:[T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Email, Username, or Mobile"}),T.jsx("input",{type:"text",value:i,onChange:V=>n(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"you@example.com",required:!0,disabled:y,autoFocus:!0,autoComplete:"username"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Password"}),T.jsx("input",{type:"password",value:o,onChange:V=>c(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Your password",required:!0,disabled:y,autoComplete:"current-password"})]}),_&&T.jsx("div",{className:"p-3 bg-red-100 dark:bg-red-900/20 border border-red-300 dark:border-red-800 rounded-lg",children:T.jsx("p",{className:"text-sm text-red-700 dark:text-red-400",children:_})}),T.jsx("button",{type:"submit",disabled:y,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white font-medium py-2.5 rounded-lg transition-colors",children:y?"Signing in...":"Sign In"}),T.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",T.jsx("button",{type:"button",onClick:()=>{e("signup"),A("")},className:"text-blue-500 hover:underline",children:"Sign Up"})]})]}),t==="signup"&&T.jsxs("form",{onSubmit:ie,className:"space-y-3",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"First Name"}),T.jsx("input",{type:"text",value:d,onChange:V=>p(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"John",required:!0,disabled:y,autoFocus:!0})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Last Name"}),T.jsx("input",{type:"text",value:g,onChange:V=>S(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Doe",disabled:y})]})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Email"}),T.jsx("input",{type:"email",value:C,onChange:V=>E(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"you@example.com",required:!0,disabled:y})]}),T.jsxs("div",{children:[T.jsxs("label",{className:"block text-sm font-medium text-foreground mb-1",children:["Mobile ",T.jsx("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),T.jsx("input",{type:"tel",value:h,onChange:V=>m(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"+91 9876543210",disabled:y})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Password"}),T.jsx("input",{type:"password",value:b,onChange:V=>w(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"At least 6 characters",required:!0,disabled:y})]}),T.jsxs("div",{children:[T.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Confirm Password"}),T.jsx("input",{type:"password",value:P,onChange:V=>M(V.target.value),className:"w-full px-3 py-2.5 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Confirm password",required:!0,disabled:y})]}),_&&T.jsx("div",{className:"p-3 bg-red-100 dark:bg-red-900/20 border border-red-300 dark:border-red-800 rounded-lg",children:T.jsx("p",{className:"text-sm text-red-700 dark:text-red-400",children:_})}),T.jsx("button",{type:"submit",disabled:y,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white font-medium py-2.5 rounded-lg transition-colors",children:y?"Creating account...":"Create Account"}),T.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",T.jsx("button",{type:"button",onClick:()=>{e("login"),A("")},className:"text-blue-500 hover:underline",children:"Sign In"})]})]})]})})]})},$c=j.lazy(()=>Cr(()=>import("./SetupForm-P6dsYgHO.js"),__vite__mapDeps([0,1,2,3,4,5]))),Uc=j.lazy(()=>Cr(()=>import("./Onboarding-B3cteLu2.js"),__vite__mapDeps([6,1,7,8,9,10,11,2,3,12,4,5]))),zt=()=>T.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:T.jsxs("div",{className:"text-center",children:[T.jsx("div",{className:"flex justify-center mb-4",children:T.jsx("div",{className:"w-16 h-16 bg-primary rounded-lg flex items-center justify-center shadow-sm",children:T.jsx(lc,{className:"w-8 h-8 text-primary-foreground"})})}),T.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"UpfynAI"}),T.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[T.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce"}),T.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),T.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]}),T.jsx("p",{className:"text-muted-foreground mt-2",children:"Loading..."})]})}),qc=({children:t})=>{const{user:e,isLoading:r,needsSetup:s,hasCompletedOnboarding:i,refreshOnboardingStatus:n}=Bt();return Tr?r?T.jsx(zt,{}):i?t:T.jsx(j.Suspense,{fallback:T.jsx(zt,{}),children:T.jsx(Uc,{onComplete:n})}):r?T.jsx(zt,{}):s?T.jsx(j.Suspense,{fallback:T.jsx(zt,{}),children:T.jsx($c,{})}):e?t:T.jsx(Fc,{})};var ft={};function Qn(t,e){if(t==null)return{};var r,s,i=(function(o,c){if(o==null)return{};var d={};for(var p in o)if({}.hasOwnProperty.call(o,p)){if(c.indexOf(p)!==-1)continue;d[p]=o[p]}return d})(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(s=0;s<n.length;s++)r=n[s],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t){return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(t)}function ii(t){var e=(function(r,s){if(Q(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,s);if(Q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)})(t,"string");return Q(e)=="symbol"?e:e+""}function Xn(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,ii(s.key),s)}}function ke(t,e,r){return e&&Xn(t.prototype,e),r&&Xn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Er(t,e){if(e&&(Q(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r})(t)}function Oe(t){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(t)}function qt(t,e){return qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},qt(t,e)}function Pr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qt(t,e)}function Re(t,e,r){return(e=ii(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zn(t,e,r,s,i,n,o){try{var c=t[n](o),d=c.value}catch(p){return void r(p)}c.done?e(d):Promise.resolve(d).then(s,i)}function B(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function o(d){Zn(n,s,i,o,c,"next",d)}function c(d){Zn(n,s,i,o,c,"throw",d)}o(void 0)}))}}function es(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function me(t,e){return(function(r){if(Array.isArray(r))return r})(t)||(function(r,s){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,o,c,d,p=[],g=!0,S=!1;try{if(c=(i=i.call(r)).next,s===0){if(Object(i)!==i)return;g=!1}else for(;!(g=(n=c.call(i)).done)&&(p.push(n.value),p.length!==s);g=!0);}catch(C){S=!0,o=C}finally{try{if(!g&&i.return!=null&&(d=i.return(),Object(d)!==d))return}finally{if(S)throw o}}return p}})(t,e)||(function(r,s){if(r){if(typeof r=="string")return es(r,s);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?es(r,s):void 0}})(t,e)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
22
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Vc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ts,Yt={exports:{}},tn=(function(){if(ts)return Yt.exports;ts=1;var t,e=typeof Reflect=="object"?Reflect:null,r=e&&typeof e.apply=="function"?e.apply:function(m,b,w){return Function.prototype.apply.call(m,b,w)};t=e&&typeof e.ownKeys=="function"?e.ownKeys:Object.getOwnPropertySymbols?function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:function(m){return Object.getOwnPropertyNames(m)};var s=Number.isNaN||function(m){return m!=m};function i(){i.init.call(this)}Yt.exports=i,Yt.exports.once=function(m,b){return new Promise((function(w,P){function M(k){m.removeListener(b,y),P(k)}function y(){typeof m.removeListener=="function"&&m.removeListener("error",M),w([].slice.call(arguments))}h(m,b,y,{once:!0}),b!=="error"&&(function(k,_,A){typeof k.on=="function"&&h(k,"error",_,A)})(m,M,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var n=10;function o(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}function c(m){return m._maxListeners===void 0?i.defaultMaxListeners:m._maxListeners}function d(m,b,w,P){var M,y,k,_;if(o(w),(y=m._events)===void 0?(y=m._events=Object.create(null),m._eventsCount=0):(y.newListener!==void 0&&(m.emit("newListener",b,w.listener?w.listener:w),y=m._events),k=y[b]),k===void 0)k=y[b]=w,++m._eventsCount;else if(typeof k=="function"?k=y[b]=P?[w,k]:[k,w]:P?k.unshift(w):k.push(w),(M=c(m))>0&&k.length>M&&!k.warned){k.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=m,A.type=b,A.count=k.length,_=A,console&&console.warn&&console.warn(_)}return m}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(m,b,w){var P={fired:!1,wrapFn:void 0,target:m,type:b,listener:w},M=p.bind(P);return M.listener=w,P.wrapFn=M,M}function S(m,b,w){var P=m._events;if(P===void 0)return[];var M=P[b];return M===void 0?[]:typeof M=="function"?w?[M.listener||M]:[M]:w?(function(y){for(var k=new Array(y.length),_=0;_<k.length;++_)k[_]=y[_].listener||y[_];return k})(M):E(M,M.length)}function C(m){var b=this._events;if(b!==void 0){var w=b[m];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}function E(m,b){for(var w=new Array(b),P=0;P<b;++P)w[P]=m[P];return w}function h(m,b,w,P){if(typeof m.on=="function")P.once?m.once(b,w):m.on(b,w);else{if(typeof m.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof m);m.addEventListener(b,(function M(y){P.once&&m.removeEventListener(b,M),w(y)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(m){if(typeof m!="number"||m<0||s(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");n=m}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||s(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(m){for(var b=[],w=1;w<arguments.length;w++)b.push(arguments[w]);var P=m==="error",M=this._events;if(M!==void 0)P=P&&M.error===void 0;else if(!P)return!1;if(P){var y;if(b.length>0&&(y=b[0]),y instanceof Error)throw y;var k=new Error("Unhandled error."+(y?" ("+y.message+")":""));throw k.context=y,k}var _=M[m];if(_===void 0)return!1;if(typeof _=="function")r(_,this,b);else{var A=_.length,L=E(_,A);for(w=0;w<A;++w)r(L[w],this,b)}return!0},i.prototype.addListener=function(m,b){return d(this,m,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(m,b){return d(this,m,b,!0)},i.prototype.once=function(m,b){return o(b),this.on(m,g(this,m,b)),this},i.prototype.prependOnceListener=function(m,b){return o(b),this.prependListener(m,g(this,m,b)),this},i.prototype.removeListener=function(m,b){var w,P,M,y,k;if(o(b),(P=this._events)===void 0)return this;if((w=P[m])===void 0)return this;if(w===b||w.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete P[m],P.removeListener&&this.emit("removeListener",m,w.listener||b));else if(typeof w!="function"){for(M=-1,y=w.length-1;y>=0;y--)if(w[y]===b||w[y].listener===b){k=w[y].listener,M=y;break}if(M<0)return this;M===0?w.shift():(function(_,A){for(;A+1<_.length;A++)_[A]=_[A+1];_.pop()})(w,M),w.length===1&&(P[m]=w[0]),P.removeListener!==void 0&&this.emit("removeListener",m,k||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(m){var b,w,P;if((w=this._events)===void 0)return this;if(w.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):w[m]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete w[m]),this;if(arguments.length===0){var M,y=Object.keys(w);for(P=0;P<y.length;++P)(M=y[P])!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=w[m])=="function")this.removeListener(m,b);else if(b!==void 0)for(P=b.length-1;P>=0;P--)this.removeListener(m,b[P]);return this},i.prototype.listeners=function(m){return S(this,m,!0)},i.prototype.rawListeners=function(m){return S(this,m,!1)},i.listenerCount=function(m,b){return typeof m.listenerCount=="function"?m.listenerCount(b):C.call(m,b)},i.prototype.listenerCount=C,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},Yt.exports})(),Kt=Vc(tn),rs=Object.prototype.hasOwnProperty;function ns(t,e,r){for(r of t.keys())if(ge(r,e))return r}function ge(t,e){var r,s,i;if(t===e)return!0;if(t&&e&&(r=t.constructor)===e.constructor){if(r===Date)return t.getTime()===e.getTime();if(r===RegExp)return t.toString()===e.toString();if(r===Array){if((s=t.length)===e.length)for(;s--&&ge(t[s],e[s]););return s===-1}if(r===Set){if(t.size!==e.size)return!1;for(s of t)if((i=s)&&typeof i=="object"&&!(i=ns(e,i))||!e.has(i))return!1;return!0}if(r===Map){if(t.size!==e.size)return!1;for(s of t)if((i=s[0])&&typeof i=="object"&&!(i=ns(e,i))||!ge(s[1],e.get(i)))return!1;return!0}if(r===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(r===DataView){if((s=t.byteLength)===e.byteLength)for(;s--&&t.getInt8(s)===e.getInt8(s););return s===-1}if(ArrayBuffer.isView(t)){if((s=t.byteLength)===e.byteLength)for(;s--&&t[s]===e[s];);return s===-1}if(!r||typeof t=="object"){for(r in s=0,t)if(rs.call(t,r)&&++s&&!rs.call(e,r)||!(r in e)||!ge(t[r],e[r]))return!1;return Object.keys(e).length===s}}return t!=t&&e!=e}const Bc={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},ai={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},oe={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fe={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},We={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class I{static getFirstMatch(e,r){const s=r.match(e);return s&&s.length>0&&s[1]||""}static getSecondMatch(e,r){const s=r.match(e);return s&&s.length>1&&s[2]||""}static matchAndReturnConst(e,r,s){if(e.test(r))return s}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const r=e.split(".").splice(0,2).map((s=>parseInt(s,10)||0));if(r.push(0),r[0]===10)switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const r=e.split(".").splice(0,2).map((s=>parseInt(s,10)||0));if(r.push(0),!(r[0]===1&&r[1]<5))return r[0]===1&&r[1]<6?"Cupcake":r[0]===1&&r[1]>=6?"Donut":r[0]===2&&r[1]<2?"Eclair":r[0]===2&&r[1]===2?"Froyo":r[0]===2&&r[1]>2?"Gingerbread":r[0]===3?"Honeycomb":r[0]===4&&r[1]<1?"Ice Cream Sandwich":r[0]===4&&r[1]<4?"Jelly Bean":r[0]===4&&r[1]>=4?"KitKat":r[0]===5?"Lollipop":r[0]===6?"Marshmallow":r[0]===7?"Nougat":r[0]===8?"Oreo":r[0]===9?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,r,s=!1){const i=I.getVersionPrecision(e),n=I.getVersionPrecision(r);let o=Math.max(i,n),c=0;const d=I.map([e,r],(p=>{const g=o-I.getVersionPrecision(p),S=p+new Array(g+1).join(".0");return I.map(S.split("."),(C=>new Array(20-C.length).join("0")+C)).reverse()}));for(s&&(c=o-Math.min(i,n)),o-=1;o>=c;){if(d[0][o]>d[1][o])return 1;if(d[0][o]===d[1][o]){if(o===c)return 0;o-=1}else if(d[0][o]<d[1][o])return-1}}static map(e,r){const s=[];let i;if(Array.prototype.map)return Array.prototype.map.call(e,r);for(i=0;i<e.length;i+=1)s.push(r(e[i]));return s}static find(e,r){let s,i;if(Array.prototype.find)return Array.prototype.find.call(e,r);for(s=0,i=e.length;s<i;s+=1){const n=e[s];if(r(n,s))return n}}static assign(e,...r){const s=e;let i,n;if(Object.assign)return Object.assign(e,...r);for(i=0,n=r.length;i<n;i+=1){const o=r[i];typeof o=="object"&&o!==null&&Object.keys(o).forEach((c=>{s[c]=o[c]}))}return e}static getBrowserAlias(e){return Bc[e]}static getBrowserTypeByAlias(e){return ai[e]||""}}const ee=/version\/(\d+(\.?_?\d+)+)/i,Jc=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=I.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=I.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=I.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=I.getFirstMatch(ee,t)||I.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=I.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=I.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=I.getFirstMatch(ee,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=t.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:I.getFirstMatch(e,t),version:I.getSecondMatch(e,t)}}}];var Gc=[{test:[/Roku\/DVP/],describe(t){const e=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:fe.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:fe.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=I.getWindowsVersionName(e);return{name:fe.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:fe.iOS},r=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=I.getMacOSVersionName(e),s={name:fe.MacOS,version:e};return r&&(s.versionName=r),s}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:fe.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=I.getAndroidVersionName(e),s={name:fe.Android,version:e};return r&&(s.versionName=r),s}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:fe.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||I.getFirstMatch(/\bbb(\d+)/i,t);return{name:fe.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:fe.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:fe.Tizen,version:e}}},{test:[/linux/i],describe:()=>({name:fe.Linux})},{test:[/CrOS/],describe:()=>({name:fe.ChromeOS})},{test:[/PlayStation 4/],describe(t){const e=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:fe.PlayStation4,version:e}}}],Hc=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(t){const e=I.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:oe.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:oe.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:oe.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:oe.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:oe.tablet})},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=I.getFirstMatch(/(ipod|iphone)/i,t);return{type:oe.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:oe.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:oe.mobile})},{test:t=>t.getBrowserName(!0)==="blackberry",describe:()=>({type:oe.mobile,vendor:"BlackBerry"})},{test:t=>t.getBrowserName(!0)==="bada",describe:()=>({type:oe.mobile})},{test:t=>t.getBrowserName()==="windows phone",describe:()=>({type:oe.mobile,vendor:"Microsoft"})},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe:()=>({type:oe.tablet})},{test:t=>t.getOSName(!0)==="android",describe:()=>({type:oe.mobile})},{test:t=>t.getOSName(!0)==="macos",describe:()=>({type:oe.desktop,vendor:"Apple"})},{test:t=>t.getOSName(!0)==="windows",describe:()=>({type:oe.desktop})},{test:t=>t.getOSName(!0)==="linux",describe:()=>({type:oe.desktop})},{test:t=>t.getOSName(!0)==="playstation 4",describe:()=>({type:oe.tv})},{test:t=>t.getOSName(!0)==="roku",describe:()=>({type:oe.tv})}],Wc=[{test:t=>t.getBrowserName(!0)==="microsoft edge",describe(t){if(/\sedg\//i.test(t))return{name:We.Blink};const e=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:We.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){const e={name:We.Trident},r=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:t=>t.test(/presto/i),describe(t){const e={name:We.Presto},r=I.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:We.Gecko},r=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:We.Blink})},{test:[/(apple)?webkit/i],describe(t){const e={name:We.WebKit},r=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class ss{constructor(e,r=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=I.find(Jc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=I.find(Gc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:r}=this.getOS();return e?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:r}=this.getPlatform();return e?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const e=I.find(Hc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=I.find(Wc,(r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some((s=>this.test(s)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return I.assign({},this.parsedResult)}satisfies(e){const r={};let s=0;const i={};let n=0;if(Object.keys(e).forEach((o=>{const c=e[o];typeof c=="string"?(i[o]=c,n+=1):typeof c=="object"&&(r[o]=c,s+=1)})),s>0){const o=Object.keys(r),c=I.find(o,(p=>this.isOS(p)));if(c){const p=this.satisfies(r[c]);if(p!==void 0)return p}const d=I.find(o,(p=>this.isPlatform(p)));if(d){const p=this.satisfies(r[d]);if(p!==void 0)return p}}if(n>0){const o=Object.keys(i),c=I.find(o,(d=>this.isBrowser(d,!0)));if(c!==void 0)return this.compareVersion(i[c])}}isBrowser(e,r=!1){const s=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const n=I.getBrowserTypeByAlias(i);return r&&n&&(i=n.toLowerCase()),i===s}compareVersion(e){let r=[0],s=e,i=!1;const n=this.getBrowserVersion();if(typeof n=="string")return e[0]===">"||e[0]==="<"?(s=e.substr(1),e[1]==="="?(i=!0,s=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?s=e.substr(1):e[0]==="~"&&(i=!0,s=e.substr(1)),r.indexOf(I.compareVersions(n,s,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,r=!1){return this.isBrowser(e,r)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((r=>this.is(r)))}}/*!
|
|
23
23
|
* Bowser - a browser detector
|
|
24
24
|
* https://github.com/lancedikson/bowser
|
|
25
25
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
26
26
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
27
|
-
*/class
|
|
27
|
+
*/class zc{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new ss(e,r)}static parse(e){return new ss(e).getResult()}static get BROWSER_MAP(){return ai}static get ENGINE_MAP(){return We}static get OS_MAP(){return fe}static get PLATFORMS_MAP(){return oe}}function xr(){return Date.now()+Math.random().toString()}function It(){throw new Error("Method must be implemented in subclass")}function ci(t,e){return e!=null&&e.proxyUrl?e.proxyUrl+(e.proxyUrl.slice(-1)==="/"?"":"/")+t.substring(8):t}function mr(t){return t!=null&&t.callObjectBundleUrlOverride?t.callObjectBundleUrlOverride:ci("https://c.daily.co/call-machine/versioned/".concat("0.85.0","/static/call-machine-object-bundle.js"),t)}function fr(t){try{new URL(t)}catch{return!1}return!0}const re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,it="8.55.0",Z=globalThis;function gr(t,e,r){const s=Z,i=s.__SENTRY__=s.__SENTRY__||{},n=i[it]=i[it]||{};return n[t]||(n[t]=e())}const ht=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rn=["debug","info","warn","error","log","assert","trace"],vr={};function Jt(t){if(!("console"in Z))return t();const e=Z.console,r={},s=Object.keys(vr);s.forEach((i=>{const n=vr[i];r[i]=e[i],e[i]=n}));try{return t()}finally{s.forEach((i=>{e[i]=r[i]}))}}const J=gr("logger",(function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return ht?rn.forEach((r=>{e[r]=(...s)=>{t&&Jt((()=>{Z.console[r](`Sentry Logger [${r}]:`,...s)}))}})):rn.forEach((r=>{e[r]=()=>{}})),e})),ot="?",os=/\(error: (.*)\)/,is=/captureMessage|captureException/;function Qt(t){return t[t.length-1]||{}}const as="<anonymous>";function Qe(t){try{return t&&typeof t=="function"&&t.name||as}catch{return as}}function cs(t){const e=t.exception;if(e){const r=[];try{return e.values.forEach((s=>{s.stacktrace.frames&&r.push(...s.stacktrace.frames)})),r}catch{return}}}const lr={},ls={};function at(t,e){lr[t]=lr[t]||[],lr[t].push(e)}function ct(t,e){if(!ls[t]){ls[t]=!0;try{e()}catch(r){ht&&J.error(`Error while instrumenting ${t}`,r)}}}function Ie(t,e){const r=t&&lr[t];if(r)for(const s of r)try{s(e)}catch(i){ht&&J.error(`Error while triggering instrumentation handler.
|
|
28
28
|
Type: ${t}
|
|
29
29
|
Name: ${Qe(s)}
|
|
30
|
-
Error:`,i)}}let Lr=null;function Jc(){Lr=Z.onerror,Z.onerror=function(t,e,r,s,i){return Oe("error",{column:s,error:i,line:r,msg:t,url:e}),!!Lr&&Lr.apply(this,arguments)},Z.onerror.__SENTRY_INSTRUMENTED__=!0}let Nr=null;function Gc(){Nr=Z.onunhandledrejection,Z.onunhandledrejection=function(t){return Oe("unhandledrejection",t),!Nr||Nr.apply(this,arguments)},Z.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ar(){return Dn(Z),Z}function Dn(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||it,e[it]=e[it]||{}}const oi=Object.prototype.toString;function Ln(t){switch(oi.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return lt(t,Error)}}function Pt(t,e){return oi.call(t)===`[object ${e}]`}function ii(t){return Pt(t,"ErrorEvent")}function ls(t){return Pt(t,"DOMError")}function Be(t){return Pt(t,"String")}function Nn(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function nn(t){return t===null||Nn(t)||typeof t!="object"&&typeof t!="function"}function kt(t){return Pt(t,"Object")}function jr(t){return typeof Event<"u"&<(t,Event)}function Mr(t){return!!(t&&t.then&&typeof t.then=="function")}function lt(t,e){try{return t instanceof e}catch{return!1}}function ai(t){return!(typeof t!="object"||t===null||!t.__isVue&&!t._isVue)}const Rn=Z;function ci(t,e={}){if(!t)return"<unknown>";try{let r=t;const s=5,i=[];let n=0,o=0;const c=" > ",d=c.length;let p;const g=Array.isArray(e)?e:e.keyAttrs,S=!Array.isArray(e)&&e.maxStringLength||80;for(;r&&n++<s&&(p=Hc(r,g),!(p==="html"||n>1&&o+i.length*d+p.length>=S));)i.push(p),o+=p.length,r=r.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function Hc(t,e){const r=t,s=[];if(!r||!r.tagName)return"";if(Rn.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}s.push(r.tagName.toLowerCase());const i=e&&e.length?e.filter((o=>r.getAttribute(o))).map((o=>[o,r.getAttribute(o)])):null;if(i&&i.length)i.forEach((o=>{s.push(`[${o[0]}="${o[1]}"]`)}));else{r.id&&s.push(`#${r.id}`);const o=r.className;if(o&&Be(o)){const c=o.split(/\s+/);for(const d of c)s.push(`.${d}`)}}const n=["aria-label","type","name","title","alt"];for(const o of n){const c=r.getAttribute(o);c&&s.push(`[${o}="${c}"]`)}return s.join("")}function bt(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function us(t,e){if(!Array.isArray(t))return"";const r=[];for(let s=0;s<t.length;s++){const i=t[s];try{ai(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function Wc(t,e,r=!1){return!!Be(t)&&(Pt(e,"RegExp")?e.test(t):!!Be(e)&&(r?t===e:t.includes(e)))}function Xt(t,e=[],r=!1){return e.some((s=>Wc(t,s,r)))}function we(t,e,r){if(!(e in t))return;const s=t[e],i=r(s);typeof i=="function"&&li(i,s);try{t[e]=i}catch{ht&&J.log(`Failed to replace method "${e}" in object`,t)}}function ut(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{ht&&J.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function li(t,e){try{const r=e.prototype||{};t.prototype=e.prototype=r,ut(t,"__sentry_original__",e)}catch{}}function Fn(t){return t.__sentry_original__}function ui(t){if(Ln(t))return{message:t.message,name:t.name,stack:t.stack,...ps(t)};if(jr(t)){const e={type:t.type,target:ds(t.target),currentTarget:ds(t.currentTarget),...ps(t)};return typeof CustomEvent<"u"&<(t,CustomEvent)&&(e.detail=t.detail),e}return t}function ds(t){try{return e=t,typeof Element<"u"&<(e,Element)?ci(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var e}function ps(t){if(typeof t=="object"&&t!==null){const e={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}return{}}function Ee(t){return sn(t,new Map)}function sn(t,e){if((function(r){if(!kt(r))return!1;try{const s=Object.getPrototypeOf(r).constructor.name;return!s||s==="Object"}catch{return!0}})(t)){const r=e.get(t);if(r!==void 0)return r;const s={};e.set(t,s);for(const i of Object.getOwnPropertyNames(t))t[i]!==void 0&&(s[i]=sn(t[i],e));return s}if(Array.isArray(t)){const r=e.get(t);if(r!==void 0)return r;const s=[];return e.set(t,s),t.forEach((i=>{s.push(sn(i,e))})),s}return t}function Gt(){return Date.now()/1e3}const Ge=(function(){const{performance:t}=Z;if(!t||!t.now)return Gt;const e=Date.now()-t.now(),r=t.timeOrigin==null?e:t.timeOrigin;return()=>(r+t.now())/1e3})();function Pe(){const t=Z,e=t.crypto||t.msCrypto;let r=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>{const s=new Uint8Array(1);return e.getRandomValues(s),s[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,(s=>(s^(15&r())>>s/4).toString(16)))}function di(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ye(t){const{message:e,event_id:r}=t;if(e)return e;const s=di(t);return s?s.type&&s.value?`${s.type}: ${s.value}`:s.type||s.value||r||"<unknown>":r||"<unknown>"}function on(t,e,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],n=i[0]=i[0]||{};n.value||(n.value=e||""),n.type||(n.type="Error")}function _t(t,e){const r=di(t);if(!r)return;const s=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...s,...e},e&&"data"in e){const i={...s&&s.data,...e.data};r.mechanism.data=i}}function hs(t){if((function(e){try{return e.__sentry_captured__}catch{}})(t))return!0;try{ut(t,"__sentry_captured__",!0)}catch{}return!1}var qe;function dt(t){return new Te((e=>{e(t)}))}function yr(t){return new Te(((e,r)=>{r(t)}))}(()=>{const{performance:t}=Z;!t||!t.now||(t.now(),t.timing&&t.timing.navigationStart)})(),(function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"})(qe||(qe={}));class Te{constructor(e){Te.prototype.__init.call(this),Te.prototype.__init2.call(this),Te.prototype.__init3.call(this),Te.prototype.__init4.call(this),this._state=qe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new Te(((s,i)=>{this._handlers.push([!1,n=>{if(e)try{s(e(n))}catch(o){i(o)}else s(n)},n=>{if(r)try{s(r(n))}catch(o){i(o)}else i(n)}]),this._executeHandlers()}))}catch(e){return this.then((r=>r),e)}finally(e){return new Te(((r,s)=>{let i,n;return this.then((o=>{n=!1,i=o,e&&e()}),(o=>{n=!0,i=o,e&&e()})).then((()=>{n?s(i):r(i)}))}))}__init(){this._resolve=e=>{this._setResult(qe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(qe.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{this._state===qe.PENDING&&(Mr(r)?r.then(this._resolve,this._reject):(this._state=e,this._value=r,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===qe.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((r=>{r[0]||(this._state===qe.RESOLVED&&r[1](this._value),this._state===qe.REJECTED&&r[2](this._value),r[0]=!0)}))}}}function zc(t){const e=Ge(),r={sid:Pe(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(s){return Ee({sid:`${s.sid}`,init:s.init,started:new Date(1e3*s.started).toISOString(),timestamp:new Date(1e3*s.timestamp).toISOString(),status:s.status,errors:s.errors,did:typeof s.did=="number"||typeof s.did=="string"?`${s.did}`:void 0,duration:s.duration,abnormal_mechanism:s.abnormal_mechanism,attrs:{release:s.release,environment:s.environment,ip_address:s.ipAddress,user_agent:s.userAgent}})})(r)};return t&&Ct(r,t),r}function Ct(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Ge(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Pe()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function ms(){return Pe()}function an(){return Pe().substring(16)}function Or(t,e,r=2){if(!e||typeof e!="object"||r<=0)return e;if(t&&e&&Object.keys(e).length===0)return t;const s={...t};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=Or(s[i],e[i],r-1));return s}const cn="_sentrySpan";function fs(t,e){e?ut(t,cn,e):delete t[cn]}function gs(t){return t[cn]}class $n{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ms(),spanId:an()}}clone(){const e=new $n;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,fs(e,gs(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ct(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const r=typeof e=="function"?e(this):e,[s,i]=r instanceof Xe?[r.getScopeData(),r.getRequestSession()]:kt(r)?[e,e.requestSession]:[],{tags:n,extra:o,user:c,contexts:d,level:p,fingerprint:g=[],propagationContext:S}=s||{};return this._tags={...this._tags,...n},this._extra={...this._extra,...o},this._contexts={...this._contexts,...d},c&&Object.keys(c).length&&(this._user=c),p&&(this._level=p),g.length&&(this._fingerprint=g),S&&(this._propagationContext=S),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,fs(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ms()}),this._notifyScopeListeners(),this}addBreadcrumb(e,r){const s=typeof r=="number"?r:100;if(s<=0)return this;const i={timestamp:Gt(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>s&&(this._breadcrumbs=this._breadcrumbs.slice(-s),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:gs(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Or(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:an(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,r){const s=r&&r.event_id?r.event_id:Pe();if(!this._client)return J.warn("No client configured on scope - will not capture exception!"),s;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureMessage(e,r,s){const i=s&&s.event_id?s.event_id:Pe();if(!this._client)return J.warn("No client configured on scope - will not capture message!"),i;const n=new Error(e);return this._client.captureMessage(e,r,{originalException:e,syntheticException:n,...s,event_id:i},this),i}captureEvent(e,r){const s=r&&r.event_id?r.event_id:Pe();return this._client?(this._client.captureEvent(e,{...r,event_id:s},this),s):(J.warn("No client configured on scope - will not capture event!"),s)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Xe=$n;class Yc{constructor(e,r){let s,i;s=e||new Xe,i=r||new Xe,this._stack=[{scope:s}],this._isolationScope=i}withScope(e){const r=this._pushScope();let s;try{s=e(r)}catch(i){throw this._popScope(),i}return Mr(s)?s.then((i=>(this._popScope(),i)),(i=>{throw this._popScope(),i})):(this._popScope(),s)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Tt(){const t=Dn(Ar());return t.stack=t.stack||new Yc(gr("defaultCurrentScope",(()=>new Xe)),gr("defaultIsolationScope",(()=>new Xe)))}function Kc(t){return Tt().withScope(t)}function Qc(t,e){const r=Tt();return r.withScope((()=>(r.getStackTop().scope=t,e(t))))}function vs(t){return Tt().withScope((()=>t(Tt().getIsolationScope())))}function Un(t){const e=Dn(t);return e.acs?e.acs:{withIsolationScope:vs,withScope:Kc,withSetScope:Qc,withSetIsolationScope:(r,s)=>vs(s),getCurrentScope:()=>Tt().getScope(),getIsolationScope:()=>Tt().getIsolationScope()}}function mt(){return Un(Ar()).getCurrentScope()}function Ht(){return Un(Ar()).getIsolationScope()}function he(){return mt().getClient()}function Xc(t){const e=t.getPropagationContext(),{traceId:r,spanId:s,parentSpanId:i}=e;return Ee({trace_id:r,span_id:s,parent_span_id:i})}function Zc(t){const e=t._sentryMetrics;if(!e)return;const r={};for(const[,[s,i]]of e)(r[s]||(r[s]=[])).push(Ee(i));return r}const el=/^sentry-/;function tl(t){const e=(function(s){if(!(!s||!Be(s)&&!Array.isArray(s)))return Array.isArray(s)?s.reduce(((i,n)=>{const o=ys(n);return Object.entries(o).forEach((([c,d])=>{i[c]=d})),i}),{}):ys(s)})(t);if(!e)return;const r=Object.entries(e).reduce(((s,[i,n])=>(i.match(el)&&(s[i.slice(7)]=n),s)),{});return Object.keys(r).length>0?r:void 0}function ys(t){return t.split(",").map((e=>e.split("=").map((r=>decodeURIComponent(r.trim()))))).reduce(((e,[r,s])=>(r&&s&&(e[r]=s),e)),{})}let bs=!1;function rl(t){const{spanId:e,traceId:r,isRemote:s}=t.spanContext();return Ee({parent_span_id:s?e:qn(t).parent_span_id,span_id:s?an():e,trace_id:r})}function ws(t){return typeof t=="number"?Ss(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Ss(t.getTime()):Ge()}function Ss(t){return t>9999999999?t/1e3:t}function qn(t){if((function(e){return typeof e.getSpanJSON=="function"})(t))return t.getSpanJSON();try{const{spanId:e,traceId:r}=t.spanContext();if((function(s){const i=s;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)})(t)){const{attributes:s,startTime:i,name:n,endTime:o,parentSpanId:c,status:d}=t;return Ee({span_id:e,trace_id:r,data:s,description:n,parent_span_id:c,start_timestamp:ws(i),timestamp:ws(o)||void 0,status:nl(d),op:s["sentry.op"],origin:s["sentry.origin"],_metrics_summary:Zc(t)})}return{span_id:e,trace_id:r}}catch{return{}}}function nl(t){if(t&&t.code!==0)return t.code===1?"ok":t.message||"unknown_error"}function pi(t){return t._sentryRootSpan||t}function sl(){bs||(Jt((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),bs=!0)}const Vn="production";function hi(t,e){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},i=Ee({environment:r.environment||Vn,release:r.release,public_key:s,trace_id:t});return e.emit("createDsc",i),i}function ol(t){const e=he();if(!e)return{};const r=pi(t),s=r._frozenDsc;if(s)return s;const i=r.spanContext().traceState,n=i&&i.get("sentry.dsc"),o=n&&tl(n);if(o)return o;const c=hi(t.spanContext().traceId,e),d=qn(r),p=d.data||{},g=p["sentry.sample_rate"];g!=null&&(c.sample_rate=`${g}`);const S=p["sentry.source"],C=d.description;return S!=="url"&&C&&(c.transaction=C),(function(E){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const h=he(),m=h&&h.getOptions();return!!m&&(m.enableTracing||"tracesSampleRate"in m||"tracesSampler"in m)})()&&(c.sampled=String((function(E){const{traceFlags:h}=E.spanContext();return h===1})(r))),e.emit("createDsc",c,r),c}const il=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function br(t,e=!1){const{host:r,path:s,pass:i,port:n,projectId:o,protocol:c,publicKey:d}=t;return`${c}://${d}${e&&i?`:${i}`:""}@${r}${n?`:${n}`:""}/${s&&`${s}/`}${o}`}function ks(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function al(t){const e=typeof t=="string"?(function(r){const s=il.exec(r);if(!s)return void Jt((()=>{console.error(`Invalid Sentry Dsn: ${r}`)}));const[i,n,o="",c="",d="",p=""]=s.slice(1);let g="",S=p;const C=S.split("/");if(C.length>1&&(g=C.slice(0,-1).join("/"),S=C.pop()),S){const E=S.match(/^\d+/);E&&(S=E[0])}return ks({host:c,pass:o,path:g,projectId:S,port:d,protocol:i,publicKey:n})})(t):ks(t);if(e&&(function(r){if(!ht)return!0;const{port:s,projectId:i,protocol:n}=r;return!(["protocol","publicKey","host","projectId"].find((o=>!r[o]&&(J.error(`Invalid Sentry Dsn: ${o} missing`),!0)))||(i.match(/^\d+$/)?(function(o){return o==="http"||o==="https"})(n)?s&&isNaN(parseInt(s,10))&&(J.error(`Invalid Sentry Dsn: Invalid port ${s}`),1):(J.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),1):(J.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))})(e))return e}function Ve(t,e=100,r=1/0){try{return ln("",t,e,r)}catch(s){return{ERROR:`**non-serializable** (${s})`}}}function mi(t,e=3,r=102400){const s=Ve(t,e);return i=s,(function(n){return~-encodeURI(n).split(/%..|./).length})(JSON.stringify(i))>r?mi(t,e-1,r):s;var i}function ln(t,e,r=1/0,s=1/0,i=(function(){const n=typeof WeakSet=="function",o=n?new WeakSet:[];return[function(c){if(n)return!!o.has(c)||(o.add(c),!1);for(let d=0;d<o.length;d++)if(o[d]===c)return!0;return o.push(c),!1},function(c){if(n)o.delete(c);else for(let d=0;d<o.length;d++)if(o[d]===c){o.splice(d,1);break}}]})()){const[n,o]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const c=(function(E,h){try{if(E==="domain"&&h&&typeof h=="object"&&h._events)return"[Domain]";if(E==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&h===global)return"[Global]";if(typeof window<"u"&&h===window)return"[Window]";if(typeof document<"u"&&h===document)return"[Document]";if(ai(h))return"[VueViewModel]";if(kt(m=h)&&"nativeEvent"in m&&"preventDefault"in m&&"stopPropagation"in m)return"[SyntheticEvent]";if(typeof h=="number"&&!Number.isFinite(h))return`[${h}]`;if(typeof h=="function")return`[Function: ${Qe(h)}]`;if(typeof h=="symbol")return`[${String(h)}]`;if(typeof h=="bigint")return`[BigInt: ${String(h)}]`;const b=(function(w){const P=Object.getPrototypeOf(w);return P?P.constructor.name:"null prototype"})(h);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var m})(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const d=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(d===0)return c.replace("object ","");if(n(e))return"[Circular ~]";const p=e;if(p&&typeof p.toJSON=="function")try{return ln("",p.toJSON(),d-1,s,i)}catch{}const g=Array.isArray(e)?[]:{};let S=0;const C=ui(e);for(const E in C){if(!Object.prototype.hasOwnProperty.call(C,E))continue;if(S>=s){g[E]="[MaxProperties ~]";break}const h=C[E];g[E]=ln(E,h,d-1,s,i),S++}return o(e),g}function Vt(t,e=[]){return[t,e]}function cl(t,e){const[r,s]=t;return[r,[...s,e]]}function _s(t,e){const r=t[1];for(const s of r)if(e(s,s[0].type))return!0;return!1}function un(t){return Z.__SENTRY__&&Z.__SENTRY__.encodePolyfill?Z.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function ll(t){const[e,r]=t;let s=JSON.stringify(e);function i(n){typeof s=="string"?s=typeof n=="string"?s+n:[un(s),n]:s.push(typeof n=="string"?un(n):n)}for(const n of r){const[o,c]=n;if(i(`
|
|
30
|
+
Error:`,i)}}let Lr=null;function Yc(){Lr=Z.onerror,Z.onerror=function(t,e,r,s,i){return Ie("error",{column:s,error:i,line:r,msg:t,url:e}),!!Lr&&Lr.apply(this,arguments)},Z.onerror.__SENTRY_INSTRUMENTED__=!0}let Nr=null;function Kc(){Nr=Z.onunhandledrejection,Z.onunhandledrejection=function(t){return Ie("unhandledrejection",t),!Nr||Nr.apply(this,arguments)},Z.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ar(){return Dn(Z),Z}function Dn(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||it,e[it]=e[it]||{}}const li=Object.prototype.toString;function Ln(t){switch(li.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return lt(t,Error)}}function Pt(t,e){return li.call(t)===`[object ${e}]`}function ui(t){return Pt(t,"ErrorEvent")}function us(t){return Pt(t,"DOMError")}function Be(t){return Pt(t,"String")}function Nn(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function nn(t){return t===null||Nn(t)||typeof t!="object"&&typeof t!="function"}function kt(t){return Pt(t,"Object")}function jr(t){return typeof Event<"u"&<(t,Event)}function Mr(t){return!!(t&&t.then&&typeof t.then=="function")}function lt(t,e){try{return t instanceof e}catch{return!1}}function di(t){return!(typeof t!="object"||t===null||!t.__isVue&&!t._isVue)}const Rn=Z;function pi(t,e={}){if(!t)return"<unknown>";try{let r=t;const s=5,i=[];let n=0,o=0;const c=" > ",d=c.length;let p;const g=Array.isArray(e)?e:e.keyAttrs,S=!Array.isArray(e)&&e.maxStringLength||80;for(;r&&n++<s&&(p=Qc(r,g),!(p==="html"||n>1&&o+i.length*d+p.length>=S));)i.push(p),o+=p.length,r=r.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function Qc(t,e){const r=t,s=[];if(!r||!r.tagName)return"";if(Rn.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}s.push(r.tagName.toLowerCase());const i=e&&e.length?e.filter((o=>r.getAttribute(o))).map((o=>[o,r.getAttribute(o)])):null;if(i&&i.length)i.forEach((o=>{s.push(`[${o[0]}="${o[1]}"]`)}));else{r.id&&s.push(`#${r.id}`);const o=r.className;if(o&&Be(o)){const c=o.split(/\s+/);for(const d of c)s.push(`.${d}`)}}const n=["aria-label","type","name","title","alt"];for(const o of n){const c=r.getAttribute(o);c&&s.push(`[${o}="${c}"]`)}return s.join("")}function bt(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function ds(t,e){if(!Array.isArray(t))return"";const r=[];for(let s=0;s<t.length;s++){const i=t[s];try{di(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function Xc(t,e,r=!1){return!!Be(t)&&(Pt(e,"RegExp")?e.test(t):!!Be(e)&&(r?t===e:t.includes(e)))}function Xt(t,e=[],r=!1){return e.some((s=>Xc(t,s,r)))}function we(t,e,r){if(!(e in t))return;const s=t[e],i=r(s);typeof i=="function"&&hi(i,s);try{t[e]=i}catch{ht&&J.log(`Failed to replace method "${e}" in object`,t)}}function ut(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{ht&&J.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function hi(t,e){try{const r=e.prototype||{};t.prototype=e.prototype=r,ut(t,"__sentry_original__",e)}catch{}}function Fn(t){return t.__sentry_original__}function mi(t){if(Ln(t))return{message:t.message,name:t.name,stack:t.stack,...hs(t)};if(jr(t)){const e={type:t.type,target:ps(t.target),currentTarget:ps(t.currentTarget),...hs(t)};return typeof CustomEvent<"u"&<(t,CustomEvent)&&(e.detail=t.detail),e}return t}function ps(t){try{return e=t,typeof Element<"u"&<(e,Element)?pi(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var e}function hs(t){if(typeof t=="object"&&t!==null){const e={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}return{}}function Ee(t){return sn(t,new Map)}function sn(t,e){if((function(r){if(!kt(r))return!1;try{const s=Object.getPrototypeOf(r).constructor.name;return!s||s==="Object"}catch{return!0}})(t)){const r=e.get(t);if(r!==void 0)return r;const s={};e.set(t,s);for(const i of Object.getOwnPropertyNames(t))t[i]!==void 0&&(s[i]=sn(t[i],e));return s}if(Array.isArray(t)){const r=e.get(t);if(r!==void 0)return r;const s=[];return e.set(t,s),t.forEach((i=>{s.push(sn(i,e))})),s}return t}function Gt(){return Date.now()/1e3}const Ge=(function(){const{performance:t}=Z;if(!t||!t.now)return Gt;const e=Date.now()-t.now(),r=t.timeOrigin==null?e:t.timeOrigin;return()=>(r+t.now())/1e3})();function Pe(){const t=Z,e=t.crypto||t.msCrypto;let r=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>{const s=new Uint8Array(1);return e.getRandomValues(s),s[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,(s=>(s^(15&r())>>s/4).toString(16)))}function fi(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ye(t){const{message:e,event_id:r}=t;if(e)return e;const s=fi(t);return s?s.type&&s.value?`${s.type}: ${s.value}`:s.type||s.value||r||"<unknown>":r||"<unknown>"}function on(t,e,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],n=i[0]=i[0]||{};n.value||(n.value=e||""),n.type||(n.type="Error")}function _t(t,e){const r=fi(t);if(!r)return;const s=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...s,...e},e&&"data"in e){const i={...s&&s.data,...e.data};r.mechanism.data=i}}function ms(t){if((function(e){try{return e.__sentry_captured__}catch{}})(t))return!0;try{ut(t,"__sentry_captured__",!0)}catch{}return!1}var qe;function dt(t){return new Te((e=>{e(t)}))}function yr(t){return new Te(((e,r)=>{r(t)}))}(()=>{const{performance:t}=Z;!t||!t.now||(t.now(),t.timing&&t.timing.navigationStart)})(),(function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"})(qe||(qe={}));class Te{constructor(e){Te.prototype.__init.call(this),Te.prototype.__init2.call(this),Te.prototype.__init3.call(this),Te.prototype.__init4.call(this),this._state=qe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new Te(((s,i)=>{this._handlers.push([!1,n=>{if(e)try{s(e(n))}catch(o){i(o)}else s(n)},n=>{if(r)try{s(r(n))}catch(o){i(o)}else i(n)}]),this._executeHandlers()}))}catch(e){return this.then((r=>r),e)}finally(e){return new Te(((r,s)=>{let i,n;return this.then((o=>{n=!1,i=o,e&&e()}),(o=>{n=!0,i=o,e&&e()})).then((()=>{n?s(i):r(i)}))}))}__init(){this._resolve=e=>{this._setResult(qe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(qe.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{this._state===qe.PENDING&&(Mr(r)?r.then(this._resolve,this._reject):(this._state=e,this._value=r,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===qe.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((r=>{r[0]||(this._state===qe.RESOLVED&&r[1](this._value),this._state===qe.REJECTED&&r[2](this._value),r[0]=!0)}))}}}function Zc(t){const e=Ge(),r={sid:Pe(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(s){return Ee({sid:`${s.sid}`,init:s.init,started:new Date(1e3*s.started).toISOString(),timestamp:new Date(1e3*s.timestamp).toISOString(),status:s.status,errors:s.errors,did:typeof s.did=="number"||typeof s.did=="string"?`${s.did}`:void 0,duration:s.duration,abnormal_mechanism:s.abnormal_mechanism,attrs:{release:s.release,environment:s.environment,ip_address:s.ipAddress,user_agent:s.userAgent}})})(r)};return t&&Ct(r,t),r}function Ct(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Ge(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Pe()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function fs(){return Pe()}function an(){return Pe().substring(16)}function Ir(t,e,r=2){if(!e||typeof e!="object"||r<=0)return e;if(t&&e&&Object.keys(e).length===0)return t;const s={...t};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=Ir(s[i],e[i],r-1));return s}const cn="_sentrySpan";function gs(t,e){e?ut(t,cn,e):delete t[cn]}function vs(t){return t[cn]}class $n{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:fs(),spanId:an()}}clone(){const e=new $n;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,gs(e,vs(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ct(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const r=typeof e=="function"?e(this):e,[s,i]=r instanceof Xe?[r.getScopeData(),r.getRequestSession()]:kt(r)?[e,e.requestSession]:[],{tags:n,extra:o,user:c,contexts:d,level:p,fingerprint:g=[],propagationContext:S}=s||{};return this._tags={...this._tags,...n},this._extra={...this._extra,...o},this._contexts={...this._contexts,...d},c&&Object.keys(c).length&&(this._user=c),p&&(this._level=p),g.length&&(this._fingerprint=g),S&&(this._propagationContext=S),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,gs(this,void 0),this._attachments=[],this.setPropagationContext({traceId:fs()}),this._notifyScopeListeners(),this}addBreadcrumb(e,r){const s=typeof r=="number"?r:100;if(s<=0)return this;const i={timestamp:Gt(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>s&&(this._breadcrumbs=this._breadcrumbs.slice(-s),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:vs(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ir(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:an(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,r){const s=r&&r.event_id?r.event_id:Pe();if(!this._client)return J.warn("No client configured on scope - will not capture exception!"),s;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureMessage(e,r,s){const i=s&&s.event_id?s.event_id:Pe();if(!this._client)return J.warn("No client configured on scope - will not capture message!"),i;const n=new Error(e);return this._client.captureMessage(e,r,{originalException:e,syntheticException:n,...s,event_id:i},this),i}captureEvent(e,r){const s=r&&r.event_id?r.event_id:Pe();return this._client?(this._client.captureEvent(e,{...r,event_id:s},this),s):(J.warn("No client configured on scope - will not capture event!"),s)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Xe=$n;class el{constructor(e,r){let s,i;s=e||new Xe,i=r||new Xe,this._stack=[{scope:s}],this._isolationScope=i}withScope(e){const r=this._pushScope();let s;try{s=e(r)}catch(i){throw this._popScope(),i}return Mr(s)?s.then((i=>(this._popScope(),i)),(i=>{throw this._popScope(),i})):(this._popScope(),s)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Tt(){const t=Dn(Ar());return t.stack=t.stack||new el(gr("defaultCurrentScope",(()=>new Xe)),gr("defaultIsolationScope",(()=>new Xe)))}function tl(t){return Tt().withScope(t)}function rl(t,e){const r=Tt();return r.withScope((()=>(r.getStackTop().scope=t,e(t))))}function ys(t){return Tt().withScope((()=>t(Tt().getIsolationScope())))}function Un(t){const e=Dn(t);return e.acs?e.acs:{withIsolationScope:ys,withScope:tl,withSetScope:rl,withSetIsolationScope:(r,s)=>ys(s),getCurrentScope:()=>Tt().getScope(),getIsolationScope:()=>Tt().getIsolationScope()}}function mt(){return Un(Ar()).getCurrentScope()}function Ht(){return Un(Ar()).getIsolationScope()}function he(){return mt().getClient()}function nl(t){const e=t.getPropagationContext(),{traceId:r,spanId:s,parentSpanId:i}=e;return Ee({trace_id:r,span_id:s,parent_span_id:i})}function sl(t){const e=t._sentryMetrics;if(!e)return;const r={};for(const[,[s,i]]of e)(r[s]||(r[s]=[])).push(Ee(i));return r}const ol=/^sentry-/;function il(t){const e=(function(s){if(!(!s||!Be(s)&&!Array.isArray(s)))return Array.isArray(s)?s.reduce(((i,n)=>{const o=bs(n);return Object.entries(o).forEach((([c,d])=>{i[c]=d})),i}),{}):bs(s)})(t);if(!e)return;const r=Object.entries(e).reduce(((s,[i,n])=>(i.match(ol)&&(s[i.slice(7)]=n),s)),{});return Object.keys(r).length>0?r:void 0}function bs(t){return t.split(",").map((e=>e.split("=").map((r=>decodeURIComponent(r.trim()))))).reduce(((e,[r,s])=>(r&&s&&(e[r]=s),e)),{})}let ws=!1;function al(t){const{spanId:e,traceId:r,isRemote:s}=t.spanContext();return Ee({parent_span_id:s?e:qn(t).parent_span_id,span_id:s?an():e,trace_id:r})}function Ss(t){return typeof t=="number"?ks(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ks(t.getTime()):Ge()}function ks(t){return t>9999999999?t/1e3:t}function qn(t){if((function(e){return typeof e.getSpanJSON=="function"})(t))return t.getSpanJSON();try{const{spanId:e,traceId:r}=t.spanContext();if((function(s){const i=s;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)})(t)){const{attributes:s,startTime:i,name:n,endTime:o,parentSpanId:c,status:d}=t;return Ee({span_id:e,trace_id:r,data:s,description:n,parent_span_id:c,start_timestamp:Ss(i),timestamp:Ss(o)||void 0,status:cl(d),op:s["sentry.op"],origin:s["sentry.origin"],_metrics_summary:sl(t)})}return{span_id:e,trace_id:r}}catch{return{}}}function cl(t){if(t&&t.code!==0)return t.code===1?"ok":t.message||"unknown_error"}function gi(t){return t._sentryRootSpan||t}function ll(){ws||(Jt((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),ws=!0)}const Vn="production";function vi(t,e){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},i=Ee({environment:r.environment||Vn,release:r.release,public_key:s,trace_id:t});return e.emit("createDsc",i),i}function ul(t){const e=he();if(!e)return{};const r=gi(t),s=r._frozenDsc;if(s)return s;const i=r.spanContext().traceState,n=i&&i.get("sentry.dsc"),o=n&&il(n);if(o)return o;const c=vi(t.spanContext().traceId,e),d=qn(r),p=d.data||{},g=p["sentry.sample_rate"];g!=null&&(c.sample_rate=`${g}`);const S=p["sentry.source"],C=d.description;return S!=="url"&&C&&(c.transaction=C),(function(E){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const h=he(),m=h&&h.getOptions();return!!m&&(m.enableTracing||"tracesSampleRate"in m||"tracesSampler"in m)})()&&(c.sampled=String((function(E){const{traceFlags:h}=E.spanContext();return h===1})(r))),e.emit("createDsc",c,r),c}const dl=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function br(t,e=!1){const{host:r,path:s,pass:i,port:n,projectId:o,protocol:c,publicKey:d}=t;return`${c}://${d}${e&&i?`:${i}`:""}@${r}${n?`:${n}`:""}/${s&&`${s}/`}${o}`}function _s(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function pl(t){const e=typeof t=="string"?(function(r){const s=dl.exec(r);if(!s)return void Jt((()=>{console.error(`Invalid Sentry Dsn: ${r}`)}));const[i,n,o="",c="",d="",p=""]=s.slice(1);let g="",S=p;const C=S.split("/");if(C.length>1&&(g=C.slice(0,-1).join("/"),S=C.pop()),S){const E=S.match(/^\d+/);E&&(S=E[0])}return _s({host:c,pass:o,path:g,projectId:S,port:d,protocol:i,publicKey:n})})(t):_s(t);if(e&&(function(r){if(!ht)return!0;const{port:s,projectId:i,protocol:n}=r;return!(["protocol","publicKey","host","projectId"].find((o=>!r[o]&&(J.error(`Invalid Sentry Dsn: ${o} missing`),!0)))||(i.match(/^\d+$/)?(function(o){return o==="http"||o==="https"})(n)?s&&isNaN(parseInt(s,10))&&(J.error(`Invalid Sentry Dsn: Invalid port ${s}`),1):(J.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),1):(J.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))})(e))return e}function Ve(t,e=100,r=1/0){try{return ln("",t,e,r)}catch(s){return{ERROR:`**non-serializable** (${s})`}}}function yi(t,e=3,r=102400){const s=Ve(t,e);return i=s,(function(n){return~-encodeURI(n).split(/%..|./).length})(JSON.stringify(i))>r?yi(t,e-1,r):s;var i}function ln(t,e,r=1/0,s=1/0,i=(function(){const n=typeof WeakSet=="function",o=n?new WeakSet:[];return[function(c){if(n)return!!o.has(c)||(o.add(c),!1);for(let d=0;d<o.length;d++)if(o[d]===c)return!0;return o.push(c),!1},function(c){if(n)o.delete(c);else for(let d=0;d<o.length;d++)if(o[d]===c){o.splice(d,1);break}}]})()){const[n,o]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const c=(function(E,h){try{if(E==="domain"&&h&&typeof h=="object"&&h._events)return"[Domain]";if(E==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&h===global)return"[Global]";if(typeof window<"u"&&h===window)return"[Window]";if(typeof document<"u"&&h===document)return"[Document]";if(di(h))return"[VueViewModel]";if(kt(m=h)&&"nativeEvent"in m&&"preventDefault"in m&&"stopPropagation"in m)return"[SyntheticEvent]";if(typeof h=="number"&&!Number.isFinite(h))return`[${h}]`;if(typeof h=="function")return`[Function: ${Qe(h)}]`;if(typeof h=="symbol")return`[${String(h)}]`;if(typeof h=="bigint")return`[BigInt: ${String(h)}]`;const b=(function(w){const P=Object.getPrototypeOf(w);return P?P.constructor.name:"null prototype"})(h);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var m})(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const d=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(d===0)return c.replace("object ","");if(n(e))return"[Circular ~]";const p=e;if(p&&typeof p.toJSON=="function")try{return ln("",p.toJSON(),d-1,s,i)}catch{}const g=Array.isArray(e)?[]:{};let S=0;const C=mi(e);for(const E in C){if(!Object.prototype.hasOwnProperty.call(C,E))continue;if(S>=s){g[E]="[MaxProperties ~]";break}const h=C[E];g[E]=ln(E,h,d-1,s,i),S++}return o(e),g}function Vt(t,e=[]){return[t,e]}function hl(t,e){const[r,s]=t;return[r,[...s,e]]}function Cs(t,e){const r=t[1];for(const s of r)if(e(s,s[0].type))return!0;return!1}function un(t){return Z.__SENTRY__&&Z.__SENTRY__.encodePolyfill?Z.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function ml(t){const[e,r]=t;let s=JSON.stringify(e);function i(n){typeof s=="string"?s=typeof n=="string"?s+n:[un(s),n]:s.push(typeof n=="string"?un(n):n)}for(const n of r){const[o,c]=n;if(i(`
|
|
31
31
|
${JSON.stringify(o)}
|
|
32
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let d;try{d=JSON.stringify(c)}catch{d=JSON.stringify(Ve(c))}i(d)}}return typeof s=="string"?s:(function(n){const o=n.reduce(((p,g)=>p+g.length),0),c=new Uint8Array(o);let d=0;for(const p of n)c.set(p,d),d+=p.length;return c})(s)}function ul(t){const e=typeof t.data=="string"?un(t.data):t.data;return[Ee({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const dl={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Cs(t){return dl[t]}function fi(t){if(!t||!t.sdk)return;const{name:e,version:r}=t.sdk;return{name:e,version:r}}function pl(t,e,r,s){const i=fi(r),n=t.type&&t.type!=="replay_event"?t.type:"event";(function(c,d){d&&(c.sdk=c.sdk||{},c.sdk.name=c.sdk.name||d.name,c.sdk.version=c.sdk.version||d.version,c.sdk.integrations=[...c.sdk.integrations||[],...d.integrations||[]],c.sdk.packages=[...c.sdk.packages||[],...d.packages||[]])})(t,r&&r.sdk);const o=(function(c,d,p,g){const S=c.sdkProcessingMetadata&&c.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:c.event_id,sent_at:new Date().toISOString(),...d&&{sdk:d},...!!p&&g&&{dsn:br(g)},...S&&{trace:Ee({...S})}}})(t,i,s,e);return delete t.sdkProcessingMetadata,Vt(o,[[{type:n},t]])}function dn(t,e,r,s=0){return new Te(((i,n)=>{const o=t[s];if(e===null||typeof o!="function")i(e);else{const c=o({...e},r);re&&o.id&&c===null&&J.log(`Event processor "${o.id}" dropped event`),Mr(c)?c.then((d=>dn(t,d,r,s+1).then(i))).then(null,n):dn(t,c,r,s+1).then(i).then(null,n)}}))}let Zt,Ts,Rr;function hl(t,e){const{fingerprint:r,span:s,breadcrumbs:i,sdkProcessingMetadata:n}=e;(function(o,c){const{extra:d,tags:p,user:g,contexts:S,level:C,transactionName:E}=c,h=Ee(d);h&&Object.keys(h).length&&(o.extra={...h,...o.extra});const m=Ee(p);m&&Object.keys(m).length&&(o.tags={...m,...o.tags});const b=Ee(g);b&&Object.keys(b).length&&(o.user={...b,...o.user});const w=Ee(S);w&&Object.keys(w).length&&(o.contexts={...w,...o.contexts}),C&&(o.level=C),E&&o.type!=="transaction"&&(o.transaction=E)})(t,e),s&&(function(o,c){o.contexts={trace:rl(c),...o.contexts},o.sdkProcessingMetadata={dynamicSamplingContext:ol(c),...o.sdkProcessingMetadata};const d=pi(c),p=qn(d).description;p&&!o.transaction&&o.type==="transaction"&&(o.transaction=p)})(t,s),(function(o,c){o.fingerprint=o.fingerprint?Array.isArray(o.fingerprint)?o.fingerprint:[o.fingerprint]:[],c&&(o.fingerprint=o.fingerprint.concat(c)),o.fingerprint&&!o.fingerprint.length&&delete o.fingerprint})(t,r),(function(o,c){const d=[...o.breadcrumbs||[],...c];o.breadcrumbs=d.length?d:void 0})(t,i),(function(o,c){o.sdkProcessingMetadata={...o.sdkProcessingMetadata,...c}})(t,n)}function Es(t,e){const{extra:r,tags:s,user:i,contexts:n,level:o,sdkProcessingMetadata:c,breadcrumbs:d,fingerprint:p,eventProcessors:g,attachments:S,propagationContext:C,transactionName:E,span:h}=e;er(t,"extra",r),er(t,"tags",s),er(t,"user",i),er(t,"contexts",n),t.sdkProcessingMetadata=Or(t.sdkProcessingMetadata,c,2),o&&(t.level=o),E&&(t.transactionName=E),h&&(t.span=h),d.length&&(t.breadcrumbs=[...t.breadcrumbs,...d]),p.length&&(t.fingerprint=[...t.fingerprint,...p]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),S.length&&(t.attachments=[...t.attachments,...S]),t.propagationContext={...t.propagationContext,...C}}function er(t,e,r){t[e]=Or(t[e],r,1)}function ml(t,e,r,s,i,n){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t,d={...e,event_id:e.event_id||r.event_id||Pe(),timestamp:e.timestamp||Gt()},p=r.integrations||t.integrations.map((h=>h.name));(function(h,m){const{environment:b,release:w,dist:P,maxValueLength:M=250}=m;h.environment=h.environment||b||Vn,!h.release&&w&&(h.release=w),!h.dist&&P&&(h.dist=P),h.message&&(h.message=bt(h.message,M));const y=h.exception&&h.exception.values&&h.exception.values[0];y&&y.value&&(y.value=bt(y.value,M));const k=h.request;k&&k.url&&(k.url=bt(k.url,M))})(d,t),(function(h,m){m.length>0&&(h.sdk=h.sdk||{},h.sdk.integrations=[...h.sdk.integrations||[],...m])})(d,p),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&(function(h,m){const b=(function(w){const P=Z._sentryDebugIds;if(!P)return{};const M=Object.keys(P);return Rr&&M.length===Ts||(Ts=M.length,Rr=M.reduce(((y,k)=>{Zt||(Zt={});const _=Zt[k];if(_)y[_[0]]=_[1];else{const A=w(k);for(let L=A.length-1;L>=0;L--){const $=A[L],N=$&&$.filename,W=P[k];if(N&&W){y[N]=W,Zt[k]=[N,W];break}}}return y}),{})),Rr})(m);try{h.exception.values.forEach((w=>{w.stacktrace.frames.forEach((P=>{b&&P.filename&&(P.debug_id=b[P.filename])}))}))}catch{}})(d,t.stackParser);const g=(function(h,m){if(!m)return h;const b=h?h.clone():new Xe;return b.update(m),b})(s,r.captureContext);r.mechanism&&_t(d,r.mechanism);const S=i?i.getEventProcessors():[],C=gr("globalScope",(()=>new Xe)).getScopeData();n&&Es(C,n.getScopeData()),g&&Es(C,g.getScopeData());const E=[...r.attachments||[],...C.attachments];return E.length&&(r.attachments=E),hl(d,C),dn([...S,...C.eventProcessors],d,r).then((h=>(h&&(function(m){const b={};try{m.exception.values.forEach((P=>{P.stacktrace.frames.forEach((M=>{M.debug_id&&(M.abs_path?b[M.abs_path]=M.debug_id:M.filename&&(b[M.filename]=M.debug_id),delete M.debug_id)}))}))}catch{}if(Object.keys(b).length===0)return;m.debug_meta=m.debug_meta||{},m.debug_meta.images=m.debug_meta.images||[];const w=m.debug_meta.images;Object.entries(b).forEach((([P,M])=>{w.push({type:"sourcemap",code_file:P,debug_id:M})}))})(h),typeof o=="number"&&o>0?(function(m,b,w){if(!m)return null;const P={...m,...m.breadcrumbs&&{breadcrumbs:m.breadcrumbs.map((M=>({...M,...M.data&&{data:Ve(M.data,b,w)}})))},...m.user&&{user:Ve(m.user,b,w)},...m.contexts&&{contexts:Ve(m.contexts,b,w)},...m.extra&&{extra:Ve(m.extra,b,w)}};return m.contexts&&m.contexts.trace&&P.contexts&&(P.contexts.trace=m.contexts.trace,m.contexts.trace.data&&(P.contexts.trace.data=Ve(m.contexts.trace.data,b,w))),m.spans&&(P.spans=m.spans.map((M=>({...M,...M.data&&{data:Ve(M.data,b,w)}})))),m.contexts&&m.contexts.flags&&P.contexts&&(P.contexts.flags=Ve(m.contexts.flags,3,w)),P})(h,o,c):h)))}function Ps(t,e){return mt().captureEvent(t,e)}function xs(t){const e=he(),r=Ht(),s=mt(),{release:i,environment:n=Vn}=e&&e.getOptions()||{},{userAgent:o}=Z.navigator||{},c=zc({release:i,environment:n,user:s.getUser()||r.getUser(),...o&&{userAgent:o},...t}),d=r.getSession();return d&&d.status==="ok"&&Ct(d,{status:"exited"}),gi(),r.setSession(c),s.setSession(c),c}function gi(){const t=Ht(),e=mt(),r=e.getSession()||t.getSession();r&&(function(s,i){let n={};s.status==="ok"&&(n={status:"exited"}),Ct(s,n)})(r),vi(),t.setSession(),e.setSession()}function vi(){const t=Ht(),e=mt(),r=he(),s=e.getSession()||t.getSession();s&&r&&r.captureSession(s)}function As(t=!1){t?gi():vi()}function fl(t,e,r){return e||`${(function(s){return`${(function(i){const n=i.protocol?`${i.protocol}:`:"",o=i.port?`:${i.port}`:"";return`${n}//${i.host}${o}${i.path?`/${i.path}`:""}/api/`})(s)}${s.projectId}/envelope/`})(t)}?${(function(s,i){const n={sentry_version:"7"};return s.publicKey&&(n.sentry_key=s.publicKey),i&&(n.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(n).toString()})(t,r)}`}const js=[];function Ms(t,e){for(const r of e)r&&r.afterAllSetup&&r.afterAllSetup(t)}function Os(t,e,r){if(r[e.name])re&&J.log(`Integration skipped because it was already installed: ${e.name}`);else{if(r[e.name]=e,js.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),js.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const s=e.preprocessEvent.bind(e);t.on("preprocessEvent",((i,n)=>s(i,n,t)))}if(typeof e.processEvent=="function"){const s=e.processEvent.bind(e),i=Object.assign(((n,o)=>s(n,o,t)),{id:e.name});t.addEventProcessor(i)}re&&J.log(`Integration installed: ${e.name}`)}}class Me extends Error{constructor(e,r="warn"){super(e),this.message=e,this.logLevel=r}}const Is="Not capturing exception because it's already been captured.";class gl{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=al(e.dsn):re&&J.warn("No DSN provided, client will not send events."),this._dsn){const s=fl(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:s})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find((s=>s in e&&e[s]==null));r&&Jt((()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,r,s){const i=Pe();if(hs(e))return re&&J.log(Is),i;const n={event_id:i,...r};return this._process(this.eventFromException(e,n).then((o=>this._captureEvent(o,n,s)))),n.event_id}captureMessage(e,r,s,i){const n={event_id:Pe(),...s},o=Nn(e)?e:String(e),c=nn(e)?this.eventFromMessage(o,r,n):this.eventFromException(e,n);return this._process(c.then((d=>this._captureEvent(d,n,i)))),n.event_id}captureEvent(e,r,s){const i=Pe();if(r&&r.originalException&&hs(r.originalException))return re&&J.log(Is),i;const n={event_id:i,...r},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,o||s)),n.event_id}captureSession(e){typeof e.release!="string"?re&&J.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Ct(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(e).then((s=>r.flush(e).then((i=>s&&i))))):dt(!0)}close(e){return this.flush(e).then((r=>(this.getOptions().enabled=!1,this.emit("close"),r)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const r=this._integrations[e.name];Os(this,e,this._integrations),r||Ms(this,[e])}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let s=pl(e,this._dsn,this._options._metadata,this._options.tunnel);for(const n of r.attachments||[])s=cl(s,ul(n));const i=this.sendEnvelope(s);i&&i.then((n=>this.emit("afterSendEvent",e,n)),null)}sendSession(e){const r=(function(s,i,n,o){const c=fi(n);return Vt({sent_at:new Date().toISOString(),...c&&{sdk:c},...!!o&&i&&{dsn:br(i)}},["aggregates"in s?[{type:"sessions"},s]:[{type:"session"},s.toJSON()]])})(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,r,s){if(this._options.sendClientReports){const i=typeof s=="number"?s:1,n=`${e}:${r}`;re&&J.log(`Recording outcome: "${n}"${i>1?` (${i} times)`:""}`),this._outcomes[n]=(this._outcomes[n]||0)+i}}on(e,r){const s=this._hooks[e]=this._hooks[e]||[];return s.push(r),()=>{const i=s.indexOf(r);i>-1&&s.splice(i,1)}}emit(e,...r){const s=this._hooks[e];s&&s.forEach((i=>i(...r)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(r=>(re&&J.error("Error while sending envelope:",r),r))):(re&&J.error("Transport disabled"),dt({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=(function(r,s){const i={};return s.forEach((n=>{n&&Os(r,n,i)})),i})(this,e),Ms(this,e)}_updateSessionFromEvent(e,r){let s=r.level==="fatal",i=!1;const n=r.exception&&r.exception.values;if(n){i=!0;for(const c of n){const d=c.mechanism;if(d&&d.handled===!1){s=!0;break}}}const o=e.status==="ok";(o&&e.errors===0||o&&s)&&(Ct(e,{...s&&{status:"crashed"},errors:e.errors||Number(i||s)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Te((r=>{let s=0;const i=setInterval((()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(s+=1,e&&s>=e&&(clearInterval(i),r(!1)))}),1)}))}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,s=mt(),i=Ht()){const n=this.getOptions(),o=Object.keys(this._integrations);return!r.integrations&&o.length>0&&(r.integrations=o),this.emit("preprocessEvent",e,r),e.type||i.setLastEventId(e.event_id||r.event_id),ml(n,e,r,s,this,i).then((c=>{if(c===null)return c;c.contexts={trace:Xc(s),...c.contexts};const d=(function(p,g){const S=g.getPropagationContext();return S.dsc||hi(S.traceId,p)})(this,s);return c.sdkProcessingMetadata={dynamicSamplingContext:d,...c.sdkProcessingMetadata},c}))}_captureEvent(e,r={},s){return this._processEvent(e,r,s).then((i=>i.event_id),(i=>{re&&(i instanceof Me&&i.logLevel==="log"?J.log(i.message):J.warn(i))}))}_processEvent(e,r,s){const i=this.getOptions(),{sampleRate:n}=i,o=Ls(e),c=Ds(e),d=e.type||"error",p=`before send for type \`${d}\``,g=n===void 0?void 0:(function(E){if(typeof E=="boolean")return Number(E);const h=typeof E=="string"?parseFloat(E):E;if(!(typeof h!="number"||isNaN(h)||h<0||h>1))return h;re&&J.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(E)} of type ${JSON.stringify(typeof E)}.`)})(n);if(c&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),yr(new Me(`Discarding event because it's not included in the random sample (sampling rate = ${n})`,"log"));const S=d==="replay_event"?"replay":d,C=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,r,s,C).then((E=>{if(E===null)throw this.recordDroppedEvent("event_processor",S,e),new Me("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return E;const h=(function(m,b,w,P){const{beforeSend:M,beforeSendTransaction:y,beforeSendSpan:k}=b;if(Ds(w)&&M)return M(w,P);if(Ls(w)){if(w.spans&&k){const _=[];for(const A of w.spans){const L=k(A);L?_.push(L):(sl(),m.recordDroppedEvent("before_send","span"))}w.spans=_}if(y){if(w.spans){const _=w.spans.length;w.sdkProcessingMetadata={...w.sdkProcessingMetadata,spanCountBeforeProcessing:_}}return y(w,P)}}return w})(this,i,E,r);return(function(m,b){const w=`${b} must return \`null\` or a valid event.`;if(Mr(m))return m.then((P=>{if(!kt(P)&&P!==null)throw new Me(w);return P}),(P=>{throw new Me(`${b} rejected with ${P}`)}));if(!kt(m)&&m!==null)throw new Me(w);return m})(h,p)})).then((E=>{if(E===null){if(this.recordDroppedEvent("before_send",S,e),o){const b=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new Me(`${p} returned \`null\`, will not send event.`,"log")}const h=s&&s.getSession();if(!o&&h&&this._updateSessionFromEvent(h,E),o){const b=(E.sdkProcessingMetadata&&E.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(E.spans?E.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const m=E.transaction_info;if(o&&m&&E.transaction!==e.transaction){const b="custom";E.transaction_info={...m,source:b}}return this.sendEvent(E,r),E})).then(null,(E=>{throw E instanceof Me?E:(this.captureException(E,{data:{__sentry__:!0},originalException:E}),new Me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
33
|
-
Reason: ${E}`))}))}_process(e){this._numProcessing++,e.then((r=>(this._numProcessing--,r)),(r=>(this._numProcessing--,r)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([r,s])=>{const[i,n]=r.split(":");return{reason:i,category:n,quantity:s}}))}_flushOutcomes(){re&&J.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0)return void(re&&J.log("No outcomes to send"));if(!this._dsn)return void(re&&J.log("No dsn provided, will not send outcomes"));re&&J.log("Sending outcomes:",e);const r=(s=e,Vt((i=this._options.tunnel&&br(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:n||Gt(),discarded_events:s}]]));var s,i,n;this.sendEnvelope(r)}}function
|
|
32
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let d;try{d=JSON.stringify(c)}catch{d=JSON.stringify(Ve(c))}i(d)}}return typeof s=="string"?s:(function(n){const o=n.reduce(((p,g)=>p+g.length),0),c=new Uint8Array(o);let d=0;for(const p of n)c.set(p,d),d+=p.length;return c})(s)}function fl(t){const e=typeof t.data=="string"?un(t.data):t.data;return[Ee({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const gl={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ts(t){return gl[t]}function bi(t){if(!t||!t.sdk)return;const{name:e,version:r}=t.sdk;return{name:e,version:r}}function vl(t,e,r,s){const i=bi(r),n=t.type&&t.type!=="replay_event"?t.type:"event";(function(c,d){d&&(c.sdk=c.sdk||{},c.sdk.name=c.sdk.name||d.name,c.sdk.version=c.sdk.version||d.version,c.sdk.integrations=[...c.sdk.integrations||[],...d.integrations||[]],c.sdk.packages=[...c.sdk.packages||[],...d.packages||[]])})(t,r&&r.sdk);const o=(function(c,d,p,g){const S=c.sdkProcessingMetadata&&c.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:c.event_id,sent_at:new Date().toISOString(),...d&&{sdk:d},...!!p&&g&&{dsn:br(g)},...S&&{trace:Ee({...S})}}})(t,i,s,e);return delete t.sdkProcessingMetadata,Vt(o,[[{type:n},t]])}function dn(t,e,r,s=0){return new Te(((i,n)=>{const o=t[s];if(e===null||typeof o!="function")i(e);else{const c=o({...e},r);re&&o.id&&c===null&&J.log(`Event processor "${o.id}" dropped event`),Mr(c)?c.then((d=>dn(t,d,r,s+1).then(i))).then(null,n):dn(t,c,r,s+1).then(i).then(null,n)}}))}let Zt,Es,Rr;function yl(t,e){const{fingerprint:r,span:s,breadcrumbs:i,sdkProcessingMetadata:n}=e;(function(o,c){const{extra:d,tags:p,user:g,contexts:S,level:C,transactionName:E}=c,h=Ee(d);h&&Object.keys(h).length&&(o.extra={...h,...o.extra});const m=Ee(p);m&&Object.keys(m).length&&(o.tags={...m,...o.tags});const b=Ee(g);b&&Object.keys(b).length&&(o.user={...b,...o.user});const w=Ee(S);w&&Object.keys(w).length&&(o.contexts={...w,...o.contexts}),C&&(o.level=C),E&&o.type!=="transaction"&&(o.transaction=E)})(t,e),s&&(function(o,c){o.contexts={trace:al(c),...o.contexts},o.sdkProcessingMetadata={dynamicSamplingContext:ul(c),...o.sdkProcessingMetadata};const d=gi(c),p=qn(d).description;p&&!o.transaction&&o.type==="transaction"&&(o.transaction=p)})(t,s),(function(o,c){o.fingerprint=o.fingerprint?Array.isArray(o.fingerprint)?o.fingerprint:[o.fingerprint]:[],c&&(o.fingerprint=o.fingerprint.concat(c)),o.fingerprint&&!o.fingerprint.length&&delete o.fingerprint})(t,r),(function(o,c){const d=[...o.breadcrumbs||[],...c];o.breadcrumbs=d.length?d:void 0})(t,i),(function(o,c){o.sdkProcessingMetadata={...o.sdkProcessingMetadata,...c}})(t,n)}function Ps(t,e){const{extra:r,tags:s,user:i,contexts:n,level:o,sdkProcessingMetadata:c,breadcrumbs:d,fingerprint:p,eventProcessors:g,attachments:S,propagationContext:C,transactionName:E,span:h}=e;er(t,"extra",r),er(t,"tags",s),er(t,"user",i),er(t,"contexts",n),t.sdkProcessingMetadata=Ir(t.sdkProcessingMetadata,c,2),o&&(t.level=o),E&&(t.transactionName=E),h&&(t.span=h),d.length&&(t.breadcrumbs=[...t.breadcrumbs,...d]),p.length&&(t.fingerprint=[...t.fingerprint,...p]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),S.length&&(t.attachments=[...t.attachments,...S]),t.propagationContext={...t.propagationContext,...C}}function er(t,e,r){t[e]=Ir(t[e],r,1)}function bl(t,e,r,s,i,n){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t,d={...e,event_id:e.event_id||r.event_id||Pe(),timestamp:e.timestamp||Gt()},p=r.integrations||t.integrations.map((h=>h.name));(function(h,m){const{environment:b,release:w,dist:P,maxValueLength:M=250}=m;h.environment=h.environment||b||Vn,!h.release&&w&&(h.release=w),!h.dist&&P&&(h.dist=P),h.message&&(h.message=bt(h.message,M));const y=h.exception&&h.exception.values&&h.exception.values[0];y&&y.value&&(y.value=bt(y.value,M));const k=h.request;k&&k.url&&(k.url=bt(k.url,M))})(d,t),(function(h,m){m.length>0&&(h.sdk=h.sdk||{},h.sdk.integrations=[...h.sdk.integrations||[],...m])})(d,p),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&(function(h,m){const b=(function(w){const P=Z._sentryDebugIds;if(!P)return{};const M=Object.keys(P);return Rr&&M.length===Es||(Es=M.length,Rr=M.reduce(((y,k)=>{Zt||(Zt={});const _=Zt[k];if(_)y[_[0]]=_[1];else{const A=w(k);for(let L=A.length-1;L>=0;L--){const $=A[L],N=$&&$.filename,W=P[k];if(N&&W){y[N]=W,Zt[k]=[N,W];break}}}return y}),{})),Rr})(m);try{h.exception.values.forEach((w=>{w.stacktrace.frames.forEach((P=>{b&&P.filename&&(P.debug_id=b[P.filename])}))}))}catch{}})(d,t.stackParser);const g=(function(h,m){if(!m)return h;const b=h?h.clone():new Xe;return b.update(m),b})(s,r.captureContext);r.mechanism&&_t(d,r.mechanism);const S=i?i.getEventProcessors():[],C=gr("globalScope",(()=>new Xe)).getScopeData();n&&Ps(C,n.getScopeData()),g&&Ps(C,g.getScopeData());const E=[...r.attachments||[],...C.attachments];return E.length&&(r.attachments=E),yl(d,C),dn([...S,...C.eventProcessors],d,r).then((h=>(h&&(function(m){const b={};try{m.exception.values.forEach((P=>{P.stacktrace.frames.forEach((M=>{M.debug_id&&(M.abs_path?b[M.abs_path]=M.debug_id:M.filename&&(b[M.filename]=M.debug_id),delete M.debug_id)}))}))}catch{}if(Object.keys(b).length===0)return;m.debug_meta=m.debug_meta||{},m.debug_meta.images=m.debug_meta.images||[];const w=m.debug_meta.images;Object.entries(b).forEach((([P,M])=>{w.push({type:"sourcemap",code_file:P,debug_id:M})}))})(h),typeof o=="number"&&o>0?(function(m,b,w){if(!m)return null;const P={...m,...m.breadcrumbs&&{breadcrumbs:m.breadcrumbs.map((M=>({...M,...M.data&&{data:Ve(M.data,b,w)}})))},...m.user&&{user:Ve(m.user,b,w)},...m.contexts&&{contexts:Ve(m.contexts,b,w)},...m.extra&&{extra:Ve(m.extra,b,w)}};return m.contexts&&m.contexts.trace&&P.contexts&&(P.contexts.trace=m.contexts.trace,m.contexts.trace.data&&(P.contexts.trace.data=Ve(m.contexts.trace.data,b,w))),m.spans&&(P.spans=m.spans.map((M=>({...M,...M.data&&{data:Ve(M.data,b,w)}})))),m.contexts&&m.contexts.flags&&P.contexts&&(P.contexts.flags=Ve(m.contexts.flags,3,w)),P})(h,o,c):h)))}function xs(t,e){return mt().captureEvent(t,e)}function As(t){const e=he(),r=Ht(),s=mt(),{release:i,environment:n=Vn}=e&&e.getOptions()||{},{userAgent:o}=Z.navigator||{},c=Zc({release:i,environment:n,user:s.getUser()||r.getUser(),...o&&{userAgent:o},...t}),d=r.getSession();return d&&d.status==="ok"&&Ct(d,{status:"exited"}),wi(),r.setSession(c),s.setSession(c),c}function wi(){const t=Ht(),e=mt(),r=e.getSession()||t.getSession();r&&(function(s,i){let n={};s.status==="ok"&&(n={status:"exited"}),Ct(s,n)})(r),Si(),t.setSession(),e.setSession()}function Si(){const t=Ht(),e=mt(),r=he(),s=e.getSession()||t.getSession();s&&r&&r.captureSession(s)}function js(t=!1){t?wi():Si()}function wl(t,e,r){return e||`${(function(s){return`${(function(i){const n=i.protocol?`${i.protocol}:`:"",o=i.port?`:${i.port}`:"";return`${n}//${i.host}${o}${i.path?`/${i.path}`:""}/api/`})(s)}${s.projectId}/envelope/`})(t)}?${(function(s,i){const n={sentry_version:"7"};return s.publicKey&&(n.sentry_key=s.publicKey),i&&(n.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(n).toString()})(t,r)}`}const Ms=[];function Is(t,e){for(const r of e)r&&r.afterAllSetup&&r.afterAllSetup(t)}function Os(t,e,r){if(r[e.name])re&&J.log(`Integration skipped because it was already installed: ${e.name}`);else{if(r[e.name]=e,Ms.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Ms.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const s=e.preprocessEvent.bind(e);t.on("preprocessEvent",((i,n)=>s(i,n,t)))}if(typeof e.processEvent=="function"){const s=e.processEvent.bind(e),i=Object.assign(((n,o)=>s(n,o,t)),{id:e.name});t.addEventProcessor(i)}re&&J.log(`Integration installed: ${e.name}`)}}class Me extends Error{constructor(e,r="warn"){super(e),this.message=e,this.logLevel=r}}const Ds="Not capturing exception because it's already been captured.";class Sl{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=pl(e.dsn):re&&J.warn("No DSN provided, client will not send events."),this._dsn){const s=wl(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:s})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find((s=>s in e&&e[s]==null));r&&Jt((()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,r,s){const i=Pe();if(ms(e))return re&&J.log(Ds),i;const n={event_id:i,...r};return this._process(this.eventFromException(e,n).then((o=>this._captureEvent(o,n,s)))),n.event_id}captureMessage(e,r,s,i){const n={event_id:Pe(),...s},o=Nn(e)?e:String(e),c=nn(e)?this.eventFromMessage(o,r,n):this.eventFromException(e,n);return this._process(c.then((d=>this._captureEvent(d,n,i)))),n.event_id}captureEvent(e,r,s){const i=Pe();if(r&&r.originalException&&ms(r.originalException))return re&&J.log(Ds),i;const n={event_id:i,...r},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,o||s)),n.event_id}captureSession(e){typeof e.release!="string"?re&&J.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Ct(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(e).then((s=>r.flush(e).then((i=>s&&i))))):dt(!0)}close(e){return this.flush(e).then((r=>(this.getOptions().enabled=!1,this.emit("close"),r)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const r=this._integrations[e.name];Os(this,e,this._integrations),r||Is(this,[e])}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let s=vl(e,this._dsn,this._options._metadata,this._options.tunnel);for(const n of r.attachments||[])s=hl(s,fl(n));const i=this.sendEnvelope(s);i&&i.then((n=>this.emit("afterSendEvent",e,n)),null)}sendSession(e){const r=(function(s,i,n,o){const c=bi(n);return Vt({sent_at:new Date().toISOString(),...c&&{sdk:c},...!!o&&i&&{dsn:br(i)}},["aggregates"in s?[{type:"sessions"},s]:[{type:"session"},s.toJSON()]])})(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,r,s){if(this._options.sendClientReports){const i=typeof s=="number"?s:1,n=`${e}:${r}`;re&&J.log(`Recording outcome: "${n}"${i>1?` (${i} times)`:""}`),this._outcomes[n]=(this._outcomes[n]||0)+i}}on(e,r){const s=this._hooks[e]=this._hooks[e]||[];return s.push(r),()=>{const i=s.indexOf(r);i>-1&&s.splice(i,1)}}emit(e,...r){const s=this._hooks[e];s&&s.forEach((i=>i(...r)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(r=>(re&&J.error("Error while sending envelope:",r),r))):(re&&J.error("Transport disabled"),dt({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=(function(r,s){const i={};return s.forEach((n=>{n&&Os(r,n,i)})),i})(this,e),Is(this,e)}_updateSessionFromEvent(e,r){let s=r.level==="fatal",i=!1;const n=r.exception&&r.exception.values;if(n){i=!0;for(const c of n){const d=c.mechanism;if(d&&d.handled===!1){s=!0;break}}}const o=e.status==="ok";(o&&e.errors===0||o&&s)&&(Ct(e,{...s&&{status:"crashed"},errors:e.errors||Number(i||s)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Te((r=>{let s=0;const i=setInterval((()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(s+=1,e&&s>=e&&(clearInterval(i),r(!1)))}),1)}))}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,s=mt(),i=Ht()){const n=this.getOptions(),o=Object.keys(this._integrations);return!r.integrations&&o.length>0&&(r.integrations=o),this.emit("preprocessEvent",e,r),e.type||i.setLastEventId(e.event_id||r.event_id),bl(n,e,r,s,this,i).then((c=>{if(c===null)return c;c.contexts={trace:nl(s),...c.contexts};const d=(function(p,g){const S=g.getPropagationContext();return S.dsc||vi(S.traceId,p)})(this,s);return c.sdkProcessingMetadata={dynamicSamplingContext:d,...c.sdkProcessingMetadata},c}))}_captureEvent(e,r={},s){return this._processEvent(e,r,s).then((i=>i.event_id),(i=>{re&&(i instanceof Me&&i.logLevel==="log"?J.log(i.message):J.warn(i))}))}_processEvent(e,r,s){const i=this.getOptions(),{sampleRate:n}=i,o=Ns(e),c=Ls(e),d=e.type||"error",p=`before send for type \`${d}\``,g=n===void 0?void 0:(function(E){if(typeof E=="boolean")return Number(E);const h=typeof E=="string"?parseFloat(E):E;if(!(typeof h!="number"||isNaN(h)||h<0||h>1))return h;re&&J.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(E)} of type ${JSON.stringify(typeof E)}.`)})(n);if(c&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),yr(new Me(`Discarding event because it's not included in the random sample (sampling rate = ${n})`,"log"));const S=d==="replay_event"?"replay":d,C=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,r,s,C).then((E=>{if(E===null)throw this.recordDroppedEvent("event_processor",S,e),new Me("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return E;const h=(function(m,b,w,P){const{beforeSend:M,beforeSendTransaction:y,beforeSendSpan:k}=b;if(Ls(w)&&M)return M(w,P);if(Ns(w)){if(w.spans&&k){const _=[];for(const A of w.spans){const L=k(A);L?_.push(L):(ll(),m.recordDroppedEvent("before_send","span"))}w.spans=_}if(y){if(w.spans){const _=w.spans.length;w.sdkProcessingMetadata={...w.sdkProcessingMetadata,spanCountBeforeProcessing:_}}return y(w,P)}}return w})(this,i,E,r);return(function(m,b){const w=`${b} must return \`null\` or a valid event.`;if(Mr(m))return m.then((P=>{if(!kt(P)&&P!==null)throw new Me(w);return P}),(P=>{throw new Me(`${b} rejected with ${P}`)}));if(!kt(m)&&m!==null)throw new Me(w);return m})(h,p)})).then((E=>{if(E===null){if(this.recordDroppedEvent("before_send",S,e),o){const b=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new Me(`${p} returned \`null\`, will not send event.`,"log")}const h=s&&s.getSession();if(!o&&h&&this._updateSessionFromEvent(h,E),o){const b=(E.sdkProcessingMetadata&&E.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(E.spans?E.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const m=E.transaction_info;if(o&&m&&E.transaction!==e.transaction){const b="custom";E.transaction_info={...m,source:b}}return this.sendEvent(E,r),E})).then(null,(E=>{throw E instanceof Me?E:(this.captureException(E,{data:{__sentry__:!0},originalException:E}),new Me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
33
|
+
Reason: ${E}`))}))}_process(e){this._numProcessing++,e.then((r=>(this._numProcessing--,r)),(r=>(this._numProcessing--,r)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([r,s])=>{const[i,n]=r.split(":");return{reason:i,category:n,quantity:s}}))}_flushOutcomes(){re&&J.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0)return void(re&&J.log("No outcomes to send"));if(!this._dsn)return void(re&&J.log("No dsn provided, will not send outcomes"));re&&J.log("Sending outcomes:",e);const r=(s=e,Vt((i=this._options.tunnel&&br(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:n||Gt(),discarded_events:s}]]));var s,i,n;this.sendEnvelope(r)}}function Ls(t){return t.type===void 0}function Ns(t){return t.type==="transaction"}function kl(t){const e=[];function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(s){if(!(t===void 0||e.length<t))return yr(new Me("Not adding Promise because buffer limit was reached."));const i=s();return e.indexOf(i)===-1&&e.push(i),i.then((()=>r(i))).then(null,(()=>r(i).then(null,(()=>{})))),i},drain:function(s){return new Te(((i,n)=>{let o=e.length;if(!o)return i(!0);const c=setTimeout((()=>{s&&s>0&&i(!1)}),s);e.forEach((d=>{dt(d).then((()=>{--o||(clearTimeout(c),i(!0))}),n)}))}))}}}function _l(t,{statusCode:e,headers:r},s=Date.now()){const i={...t},n=r&&r["x-sentry-rate-limits"],o=r&&r["retry-after"];if(n)for(const c of n.trim().split(",")){const[d,p,,,g]=c.split(":",5),S=parseInt(d,10),C=1e3*(isNaN(S)?60:S);if(p)for(const E of p.split(";"))E==="metric_bucket"&&g&&!g.split(";").includes("custom")||(i[E]=s+C);else i.all=s+C}else o?i.all=s+(function(c,d=Date.now()){const p=parseInt(`${c}`,10);if(!isNaN(p))return 1e3*p;const g=Date.parse(`${c}`);return isNaN(g)?6e4:g-d})(o,s):e===429&&(i.all=s+6e4);return i}function Cl(t,e,r=kl(t.bufferSize||64)){let s={};return{send:function(i){const n=[];if(Cs(i,((d,p)=>{const g=Ts(p);if((function(S,C,E=Date.now()){return(function(h,m){return h[m]||h.all||0})(S,C)>E})(s,g)){const S=Rs(d,p);t.recordDroppedEvent("ratelimit_backoff",g,S)}else n.push(d)})),n.length===0)return dt({});const o=Vt(i[0],n),c=d=>{Cs(o,((p,g)=>{const S=Rs(p,g);t.recordDroppedEvent(d,Ts(g),S)}))};return r.add((()=>e({body:ml(o)}).then((d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&re&&J.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),s=_l(s,d),d)),(d=>{throw c("network_error"),d})))).then((d=>d),(d=>{if(d instanceof Me)return re&&J.error("Skipped sending event because buffer is full."),c("queue_overflow"),dt({});throw d}))},flush:i=>r.drain(i)}}function Rs(t,e){if(e==="event"||e==="transaction")return Array.isArray(t)?t[1]:void 0}const Tl=100;function tt(t,e){const r=he(),s=Ht();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:n=Tl}=r.getOptions();if(n<=0)return;const o={timestamp:Gt(),...t},c=i?Jt((()=>i(o,e))):o;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,e),s.addBreadcrumb(c,n))}let Fs;const $s=new WeakMap,El=()=>({name:"FunctionToString",setupOnce(){Fs=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Fn(this),r=$s.has(he())&&e!==void 0?e:this;return Fs.apply(r,t)}}catch{}},setup(t){$s.set(t,!0)}}),Pl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],xl=(t={})=>({name:"InboundFilters",processEvent(e,r,s){const i=s.getOptions(),n=(function(o={},c={}){return{allowUrls:[...o.allowUrls||[],...c.allowUrls||[]],denyUrls:[...o.denyUrls||[],...c.denyUrls||[]],ignoreErrors:[...o.ignoreErrors||[],...c.ignoreErrors||[],...o.disableErrorDefaults?[]:Pl],ignoreTransactions:[...o.ignoreTransactions||[],...c.ignoreTransactions||[]],ignoreInternal:o.ignoreInternal===void 0||o.ignoreInternal}})(t,i);return(function(o,c){return c.ignoreInternal&&(function(d){try{return d.exception.values[0].type==="SentryError"}catch{}return!1})(o)?(re&&J.warn(`Event dropped due to being internal Sentry Error.
|
|
34
34
|
Event: ${Ye(o)}`),!0):(function(d,p){return d.type||!p||!p.length?!1:(function(g){const S=[];g.message&&S.push(g.message);let C;try{C=g.exception.values[g.exception.values.length-1]}catch{}return C&&C.value&&(S.push(C.value),C.type&&S.push(`${C.type}: ${C.value}`)),S})(d).some((g=>Xt(g,p)))})(o,c.ignoreErrors)?(re&&J.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
35
35
|
Event: ${Ye(o)}`),!0):(function(d){return d.type||!d.exception||!d.exception.values||d.exception.values.length===0?!1:!d.message&&!d.exception.values.some((p=>p.stacktrace||p.type&&p.type!=="Error"||p.value))})(o)?(re&&J.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
36
36
|
Event: ${Ye(o)}`),!0):(function(d,p){if(d.type!=="transaction"||!p||!p.length)return!1;const g=d.transaction;return!!g&&Xt(g,p)})(o,c.ignoreTransactions)?(re&&J.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
@@ -38,16 +38,16 @@ Event: ${Ye(o)}`),!0):(function(d,p){if(!p||!p.length)return!1;const g=tr(d);ret
|
|
|
38
38
|
Event: ${Ye(o)}.
|
|
39
39
|
Url: ${tr(o)}`),!0):(function(d,p){if(!p||!p.length)return!0;const g=tr(d);return!g||Xt(g,p)})(o,c.allowUrls)?!1:(re&&J.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
40
40
|
Event: ${Ye(o)}.
|
|
41
|
-
Url: ${tr(o)}`),!0)})(e,n)?null:e}});function tr(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?(function(r=[]){for(let s=r.length-1;s>=0;s--){const i=r[s];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null})(e):null}catch{return re&&J.error(`Cannot extract url for event ${Ye(t)}`),null}}function Cl(t,e,r=250,s,i,n,o){if(!(n.exception&&n.exception.values&&o&<(o.originalException,Error)))return;const c=n.exception.values.length>0?n.exception.values[n.exception.values.length-1]:void 0;var d,p;c&&(n.exception.values=(d=pn(t,e,i,o.originalException,s,n.exception.values,c,0),p=r,d.map((g=>(g.value&&(g.value=bt(g.value,p)),g)))))}function pn(t,e,r,s,i,n,o,c){if(n.length>=r+1)return n;let d=[...n];if(lt(s[i],Error)){$s(o,c);const p=t(e,s[i]),g=d.length;Us(p,i,g,c),d=pn(t,e,r,s[i],i,[p,...d],p,g)}return Array.isArray(s.errors)&&s.errors.forEach(((p,g)=>{if(lt(p,Error)){$s(o,c);const S=t(e,p),C=d.length;Us(S,`errors[${g}]`,C,c),d=pn(t,e,r,p,i,[S,...d],S,C)}})),d}function $s(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Us(t,e,r,s){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:s}}function Fr(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const r=e[6]||"",s=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:s,relative:e[5]+r+s}}function Tl(){"console"in Z&&rn.forEach((function(t){t in Z.console&&we(Z.console,t,(function(e){return vr[t]=e,function(...r){Oe("console",{args:r,level:t});const s=vr[t];s&&s.apply(Z.console,r)}}))}))}function El(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Pl=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if((function(r,s){return s?!!((function(i,n){const o=i.message,c=n.message;return!(!o&&!c||o&&!c||!o&&c||o!==c||!Vs(i,n)||!qs(i,n))})(r,s)||(function(i,n){const o=Bs(n),c=Bs(i);return!(!o||!c||o.type!==c.type||o.value!==c.value||!Vs(i,n)||!qs(i,n))})(r,s)):!1})(e,t))return re&&J.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function qs(t,e){let r=as(t),s=as(e);if(!r&&!s)return!0;if(r&&!s||!r&&s||s.length!==r.length)return!1;for(let i=0;i<s.length;i++){const n=s[i],o=r[i];if(n.filename!==o.filename||n.lineno!==o.lineno||n.colno!==o.colno||n.function!==o.function)return!1}return!0}function Vs(t,e){let r=t.fingerprint,s=e.fingerprint;if(!r&&!s)return!0;if(r&&!s||!r&&s)return!1;try{return r.join("")===s.join("")}catch{return!1}}function Bs(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Js(t){return t===void 0?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const $r=Z;function hn(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function xl(){if(typeof EdgeRuntime=="string")return!0;if(!(function(){if(!("fetch"in $r))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}})())return!1;if(hn($r.fetch))return!0;let t=!1;const e=$r.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=hn(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){ht&&J.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function Al(t,e){const r="fetch";at(r,t),ct(r,(()=>(function(s,i=!1){i&&!xl()||we(Z,"fetch",(function(n){return function(...o){const c=new Error,{method:d,url:p}=(function(S){if(S.length===0)return{method:"GET",url:""};if(S.length===2){const[E,h]=S;return{url:Gs(E),method:mn(h,"method")?String(h.method).toUpperCase():"GET"}}const C=S[0];return{url:Gs(C),method:mn(C,"method")?String(C.method).toUpperCase():"GET"}})(o),g={args:o,fetchData:{method:d,url:p},startTimestamp:1e3*Ge(),virtualError:c};return s||Oe("fetch",{...g}),n.apply(Z,o).then((async S=>(s?s(S):Oe("fetch",{...g,endTimestamp:1e3*Ge(),response:S}),S)),(S=>{throw Oe("fetch",{...g,endTimestamp:1e3*Ge(),error:S}),Ln(S)&&S.stack===void 0&&(S.stack=c.stack,ut(S,"framesToPop",1)),S}))}}))})(void 0,e)))}function mn(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Gs(t){return typeof t=="string"?t:t?mn(t,"url")?t.url:t.toString?t.toString():"":""}const rr=Z,de=Z;let fn=0;function Hs(){return fn>0}function Et(t,e={}){if(!(function(s){return typeof s=="function"})(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(Fn(t))return t}catch{return t}const r=function(...s){try{const i=s.map((n=>Et(n,e)));return t.apply(this,i)}catch(i){throw fn++,setTimeout((()=>{fn--})),(function(...n){const o=Un(Ar());if(n.length===2){const[c,d]=n;return c?o.withSetScope(c,d):o.withScope(d)}o.withScope(n[0])})((n=>{var o;n.addEventProcessor((c=>(e.mechanism&&(on(c,void 0),_t(c,e.mechanism)),c.extra={...c.extra,arguments:s},c))),o=i,mt().captureException(o,void 0)})),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}li(r,t),ut(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch{}return r}const Ir=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Bn(t,e){const r=Jn(t,e),s={type:Ol(e),value:Il(e)};return r.length&&(s.stacktrace={frames:r}),s.type===void 0&&s.value===""&&(s.value="Unrecoverable error caught"),s}function jl(t,e,r,s){const i=he(),n=i&&i.getOptions().normalizeDepth,o=(function(p){for(const g in p)if(Object.prototype.hasOwnProperty.call(p,g)){const S=p[g];if(S instanceof Error)return S}})(e),c={__serialized__:mi(e,n)};if(o)return{exception:{values:[Bn(t,o)]},extra:c};const d={exception:{values:[{type:jr(e)?e.constructor.name:s?"UnhandledRejection":"Error",value:Dl(e,{isUnhandledRejection:s})}]},extra:c};if(r){const p=Jn(t,r);p.length&&(d.exception.values[0].stacktrace={frames:p})}return d}function Ur(t,e){return{exception:{values:[Bn(t,e)]}}}function Jn(t,e){const r=e.stacktrace||e.stack||"",s=(function(n){return n&&Ml.test(n.message)?1:0})(e),i=(function(n){return typeof n.framesToPop=="number"?n.framesToPop:0})(e);try{return t(r,s,i)}catch{}return[]}const Ml=/Minified React error #\d+;/i;function yi(t){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&t instanceof WebAssembly.Exception}function Ol(t){const e=t&&t.name;return!e&&yi(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Il(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:yi(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function gn(t,e,r,s,i){let n;if(ii(e)&&e.error)return Ur(t,e.error);if(ls(e)||Pt(e,"DOMException")){const o=e;if("stack"in e)n=Ur(t,e);else{const c=o.name||(ls(o)?"DOMError":"DOMException"),d=o.message?`${c}: ${o.message}`:c;n=vn(t,d,r,s),on(n,d)}return"code"in o&&(n.tags={...n.tags,"DOMException.code":`${o.code}`}),n}return Ln(e)?Ur(t,e):kt(e)||jr(e)?(n=jl(t,e,r,i),_t(n,{synthetic:!0}),n):(n=vn(t,e,r,s),on(n,`${e}`),_t(n,{synthetic:!0}),n)}function vn(t,e,r,s){const i={};if(s&&r){const n=Jn(t,r);n.length&&(i.exception={values:[{value:e,stacktrace:{frames:n}}]}),_t(i,{synthetic:!0})}if(Nn(e)){const{__sentry_template_string__:n,__sentry_template_values__:o}=e;return i.logentry={message:n,params:o},i}return i.message=e,i}function Dl(t,{isUnhandledRejection:e}){const r=(function(i,n=40){const o=Object.keys(ui(i));o.sort();const c=o[0];if(!c)return"[object has no keys]";if(c.length>=n)return bt(c,n);for(let d=o.length;d>0;d--){const p=o.slice(0,d).join(", ");if(!(p.length>n))return d===o.length?p:bt(p,n)}return""})(t),s=e?"promise rejection":"exception";return ii(t)?`Event \`ErrorEvent\` captured as ${s} with message \`${t.message}\``:jr(t)?`Event \`${(function(i){try{const n=Object.getPrototypeOf(i);return n?n.constructor.name:void 0}catch{}})(t)}\` (type=${t.type}) captured as ${s}`:`Object captured as ${s} with keys: ${r}`}class Ll extends gl{constructor(e){const r={parentSpanIsAlwaysRootSpan:!0,...e};(function(s,i,n=[i],o="npm"){const c=s._metadata||{};c.sdk||(c.sdk={name:`sentry.javascript.${i}`,packages:n.map((d=>({name:`${o}:@sentry/${d}`,version:it}))),version:it}),s._metadata=c})(r,"browser",["browser"],de.SENTRY_SDK_SOURCE||"npm"),super(r),r.sendClientReports&&de.document&&de.document.addEventListener("visibilitychange",(()=>{de.document.visibilityState==="hidden"&&this._flushOutcomes()}))}eventFromException(e,r){return(function(s,i,n,o){const c=gn(s,i,n&&n.syntheticException||void 0,o);return _t(c),c.level="error",n&&n.event_id&&(c.event_id=n.event_id),dt(c)})(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",s){return(function(i,n,o="info",c,d){const p=vn(i,n,c&&c.syntheticException||void 0,d);return p.level=o,c&&c.event_id&&(p.event_id=c.event_id),dt(p)})(this._options.stackParser,e,r,s,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Ir&&J.warn("SDK not enabled, will not capture user feedback."));const r=(function(s,{metadata:i,tunnel:n,dsn:o}){const c={event_id:s.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!n&&!!o&&{dsn:br(o)}};return Vt(c,[(function(p){return[{type:"user_report"},p]})(s)])})(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(e,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,s)}}const Nl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ve=Z;let Ws,qr,Vr,nr;function Rl(){if(!ve.document)return;const t=Oe.bind(null,"dom"),e=zs(t,!0);ve.document.addEventListener("click",e,!1),ve.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((r=>{const s=ve[r],i=s&&s.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(we(i,"addEventListener",(function(n){return function(o,c,d){if(o==="click"||o=="keypress")try{const p=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=p[o]=p[o]||{refCount:0};if(!g.handler){const S=zs(t);g.handler=S,n.call(this,o,S,d)}g.refCount++}catch{}return n.call(this,o,c,d)}})),we(i,"removeEventListener",(function(n){return function(o,c,d){if(o==="click"||o=="keypress")try{const p=this.__sentry_instrumentation_handlers__||{},g=p[o];g&&(g.refCount--,g.refCount<=0&&(n.call(this,o,g.handler,d),g.handler=void 0,delete p[o]),Object.keys(p).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return n.call(this,o,c,d)}})))}))}function zs(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;const s=(function(n){try{return n.target}catch{return null}})(r);if((function(n,o){return n==="keypress"&&(!o||!o.tagName||o.tagName!=="INPUT"&&o.tagName!=="TEXTAREA"&&!o.isContentEditable)})(r.type,s))return;ut(r,"_sentryCaptured",!0),s&&!s._sentryId&&ut(s,"_sentryId",Pe());const i=r.type==="keypress"?"input":r.type;(function(n){if(n.type!==qr)return!1;try{if(!n.target||n.target._sentryId!==Vr)return!1}catch{}return!0})(r)||(t({event:r,name:i,global:e}),qr=r.type,Vr=s?s._sentryId:void 0),clearTimeout(Ws),Ws=ve.setTimeout((()=>{Vr=void 0,qr=void 0}),1e3)}}function bi(t){const e="history";at(e,t),ct(e,Fl)}function Fl(){if(!(function(){const r=rr.chrome,s=r&&r.app&&r.app.runtime,i="history"in rr&&!!rr.history.pushState&&!!rr.history.replaceState;return!s&&i})())return;const t=ve.onpopstate;function e(r){return function(...s){const i=s.length>2?s[2]:void 0;if(i){const n=nr,o=String(i);nr=o,Oe("history",{from:n,to:o})}return r.apply(this,s)}}ve.onpopstate=function(...r){const s=ve.location.href,i=nr;if(nr=s,Oe("history",{from:i,to:s}),t)try{return t.apply(this,r)}catch{}},we(ve.history,"pushState",e),we(ve.history,"replaceState",e)}const ur={};function Ys(t){ur[t]=void 0}const Lt="__sentry_xhr_v3__";function $l(){if(!ve.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,r,s){const i=new Error,n=1e3*Ge(),o=Be(s[0])?s[0].toUpperCase():void 0,c=(function(p){if(Be(p))return p;try{return p.toString()}catch{}})(s[1]);if(!o||!c)return e.apply(r,s);r[Lt]={method:o,url:c,request_headers:{}},o==="POST"&&c.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const d=()=>{const p=r[Lt];if(p&&r.readyState===4){try{p.status_code=r.status}catch{}Oe("xhr",{endTimestamp:1e3*Ge(),startTimestamp:n,xhr:r,virtualError:i})}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply:(p,g,S)=>(d(),p.apply(g,S))}):r.addEventListener("readystatechange",d),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(p,g,S){const[C,E]=S,h=g[Lt];return h&&Be(C)&&Be(E)&&(h.request_headers[C.toLowerCase()]=E),p.apply(g,S)}}),e.apply(r,s)}}),t.send=new Proxy(t.send,{apply(e,r,s){const i=r[Lt];return i?(s[0]!==void 0&&(i.body=s[0]),Oe("xhr",{startTimestamp:1e3*Ge(),xhr:r}),e.apply(r,s)):e.apply(r,s)}})}function Ul(t,e=(function(r){const s=ur[r];if(s)return s;let i=ve[r];if(hn(i))return ur[r]=i.bind(ve);const n=ve.document;if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const c=o.contentWindow;c&&c[r]&&(i=c[r]),n.head.removeChild(o)}catch(o){Nl&&J.warn(`Could not create sandbox iframe for ${r} check, bailing to window.${r}: `,o)}return i&&(ur[r]=i.bind(ve))})("fetch")){let r=0,s=0;return bl(t,(function(i){const n=i.body.length;r+=n,s++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&s<15,...t.fetchOptions};if(!e)return Ys("fetch"),yr("No fetch implementation available");try{return e(t.url,o).then((c=>(r-=n,s--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}})))}catch(c){return Ys("fetch"),r-=n,s--,yr(c)}}))}function Br(t,e,r,s){const i={filename:t,function:e==="<anonymous>"?ot:e,in_app:!0};return r!==void 0&&(i.lineno=r),s!==void 0&&(i.colno=s),i}const ql=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Vl=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Bl=/\((\S*)(?::(\d+))(?::(\d+))\)/,Jl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hl=(function(...t){const e=t.sort(((r,s)=>r[0]-s[0])).map((r=>r[1]));return(r,s=0,i=0)=>{const n=[],o=r.split(`
|
|
42
|
-
`);for(let c=s;c<o.length;c++){const d=o[c];if(d.length>1024)continue;const p=ss.test(d)?d.replace(ss,"$1"):d;if(!p.match(/\S*Error: /)){for(const g of e){const S=g(p);if(S){n.push(S);break}}if(n.length>=50+i)break}}return(function(c){if(!c.length)return[];const d=Array.from(c);return/sentryWrapped/.test(Qt(d).function||"")&&d.pop(),d.reverse(),os.test(Qt(d).function||"")&&(d.pop(),os.test(Qt(d).function||"")&&d.pop()),d.slice(0,50).map((p=>({...p,filename:p.filename||Qt(d).filename,function:p.function||ot})))})(n.slice(i))}})([30,t=>{const e=ql.exec(t);if(e){const[,s,i,n]=e;return Br(s,ot,+i,+n)}const r=Vl.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){const n=Bl.exec(r[2]);n&&(r[2]=n[1],r[3]=n[2],r[4]=n[3])}const[s,i]=Ks(r[1]||ot,r[2]);return Br(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,t=>{const e=Jl.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=Gl.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||ot;return[s,r]=Ks(s,r),Br(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]),Ks=(t,e)=>{const r=t.indexOf("safari-extension")!==-1,s=t.indexOf("safari-web-extension")!==-1;return r||s?[t.indexOf("@")!==-1?t.split("@")[0]:ot,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Qs=1024,Wl=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(r){var s;e.console&&(function(i){const n="console";at(n,i),ct(n,Tl)})((function(i){return function(n){if(he()!==i)return;const o={category:"console",data:{arguments:n.args,logger:"console"},level:El(n.level),message:us(n.args," ")};if(n.level==="assert"){if(n.args[0]!==!1)return;o.message=`Assertion failed: ${us(n.args.slice(1)," ")||"console.assert"}`,o.data.arguments=n.args.slice(1)}tt(o,{input:n.args,level:n.level})}})(r)),e.dom&&(s=(function(i,n){return function(o){if(he()!==i)return;let c,d,p=typeof n=="object"?n.serializeAttribute:void 0,g=typeof n=="object"&&typeof n.maxStringLength=="number"?n.maxStringLength:void 0;g&&g>Qs&&(Ir&&J.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${g} was configured. Sentry will use 1024 instead.`),g=Qs),typeof p=="string"&&(p=[p]);try{const C=o.event,E=(function(h){return!!h&&!!h.target})(C)?C.target:C;c=ci(E,{keyAttrs:p,maxStringLength:g}),d=(function(h){if(!Rn.HTMLElement)return null;let m=h;for(let b=0;b<5;b++){if(!m)return null;if(m instanceof HTMLElement){if(m.dataset.sentryComponent)return m.dataset.sentryComponent;if(m.dataset.sentryElement)return m.dataset.sentryElement}m=m.parentNode}return null})(E)}catch{c="<unknown>"}if(c.length===0)return;const S={category:`ui.${o.name}`,message:c};d&&(S.data={"ui.component_name":d}),tt(S,{event:o.event,name:o.name,global:o.global})}})(r,e.dom),at("dom",s),ct("dom",Rl)),e.xhr&&(function(i){at("xhr",i),ct("xhr",$l)})((function(i){return function(n){if(he()!==i)return;const{startTimestamp:o,endTimestamp:c}=n,d=n.xhr[Lt];if(!o||!c||!d)return;const{method:p,url:g,status_code:S,body:C}=d,E={method:p,url:g,status_code:S},h={xhr:n.xhr,input:C,startTimestamp:o,endTimestamp:c};tt({category:"xhr",data:E,type:"http",level:Js(S)},h)}})(r)),e.fetch&&Al((function(i){return function(n){if(he()!==i)return;const{startTimestamp:o,endTimestamp:c}=n;if(c&&(!n.fetchData.url.match(/sentry_key/)||n.fetchData.method!=="POST"))if(n.error)tt({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:o,endTimestamp:c});else{const d=n.response,p={...n.fetchData,status_code:d&&d.status},g={input:n.args,response:d,startTimestamp:o,endTimestamp:c};tt({category:"fetch",data:p,type:"http",level:Js(p.status_code)},g)}}})(r)),e.history&&bi((function(i){return function(n){if(he()!==i)return;let o=n.from,c=n.to;const d=Fr(de.location.href);let p=o?Fr(o):void 0;const g=Fr(c);p&&p.path||(p=d),d.protocol===g.protocol&&d.host===g.host&&(c=g.relative),d.protocol===p.protocol&&d.host===p.host&&(o=p.relative),tt({category:"navigation",data:{from:o,to:c}})}})(r)),e.sentry&&r.on("beforeSendEvent",(function(i){return function(n){he()===i&&tt({category:"sentry."+(n.type==="transaction"?"transaction":"event"),event_id:n.event_id,level:n.level,message:Ye(n)},{event:n})}})(r))}}},zl=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Yl=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&we(de,"setTimeout",Xs),e.setInterval&&we(de,"setInterval",Xs),e.requestAnimationFrame&&we(de,"requestAnimationFrame",Kl),e.XMLHttpRequest&&"XMLHttpRequest"in de&&we(XMLHttpRequest.prototype,"send",Ql);const r=e.eventTarget;r&&(Array.isArray(r)?r:zl).forEach(Xl)}}};function Xs(t){return function(...e){const r=e[0];return e[0]=Et(r,{mechanism:{data:{function:Qe(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Kl(t){return function(e){return t.apply(this,[Et(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Qe(t)},handled:!1,type:"instrument"}})])}}function Ql(t){return function(...e){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((s=>{s in r&&typeof r[s]=="function"&&we(r,s,(function(i){const n={mechanism:{data:{function:s,handler:Qe(i)},handled:!1,type:"instrument"}},o=Fn(i);return o&&(n.mechanism.data.handler=Qe(o)),Et(i,n)}))})),t.apply(this,e)}}function Xl(t){const e=de[t],r=e&&e.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(we(r,"addEventListener",(function(s){return function(i,n,o){try{typeof n.handleEvent=="function"&&(n.handleEvent=Et(n.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Qe(n),target:t},handled:!1,type:"instrument"}}))}catch{}return s.apply(this,[i,Et(n,{mechanism:{data:{function:"addEventListener",handler:Qe(n),target:t},handled:!1,type:"instrument"}}),o])}})),we(r,"removeEventListener",(function(s){return function(i,n,o){try{const c=n.__sentry_wrapped__;c&&s.call(this,i,c,o)}catch{}return s.call(this,i,n,o)}})))}const Zl=()=>({name:"BrowserSession",setupOnce(){de.document!==void 0?(xs({ignoreDuration:!0}),As(),bi((({from:t,to:e})=>{t!==void 0&&t!==e&&(xs({ignoreDuration:!0}),As())}))):Ir&&J.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),eu=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&((function(s){(function(i){const n="error";at(n,i),ct(n,Jc)})((i=>{const{stackParser:n,attachStacktrace:o}=eo();if(he()!==s||Hs())return;const{msg:c,url:d,line:p,column:g,error:S}=i,C=(function(E,h,m,b){const w=E.exception=E.exception||{},P=w.values=w.values||[],M=P[0]=P[0]||{},y=M.stacktrace=M.stacktrace||{},k=y.frames=y.frames||[],_=b,A=m,L=Be(h)&&h.length>0?h:(function(){try{return Rn.document.location.href}catch{return""}})();return k.length===0&&k.push({colno:_,filename:L,function:ot,in_app:!0,lineno:A}),E})(gn(n,S||c,void 0,o,!1),d,p,g);C.level="error",Ps(C,{originalException:S,mechanism:{handled:!1,type:"onerror"}})}))})(r),Zs("onerror")),e.onunhandledrejection&&((function(s){(function(i){const n="unhandledrejection";at(n,i),ct(n,Gc)})((i=>{const{stackParser:n,attachStacktrace:o}=eo();if(he()!==s||Hs())return;const c=(function(p){if(nn(p))return p;try{if("reason"in p)return p.reason;if("detail"in p&&"reason"in p.detail)return p.detail.reason}catch{}return p})(i),d=nn(c)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(c)}`}]}}:gn(n,c,void 0,o,!0);d.level="error",Ps(d,{originalException:c,mechanism:{handled:!1,type:"onunhandledrejection"}})}))})(r),Zs("onunhandledrejection"))}}};function Zs(t){Ir&&J.log(`Global Handler attached: ${t}`)}function eo(){const t=he();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const tu=()=>({name:"HttpContext",preprocessEvent(t){if(!de.navigator&&!de.location&&!de.document)return;const e=t.request&&t.request.url||de.location&&de.location.href,{referrer:r}=de.document||{},{userAgent:s}=de.navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...s&&{"User-Agent":s}},n={...t.request,...e&&{url:e},headers:i};t.request=n}}),ru=(t={})=>{const e=t.limit||5,r=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(s,i,n){const o=n.getOptions();Cl(Bn,o.stackParser,o.maxValueLength,r,e,s,i)}}};var yn="new",to="loading",ro="loaded",wr="joining-meeting",Ke="joined-meeting",ze="left-meeting",Ue="error",nu="blocked",su="off",ou="sendable",iu="loading",au="interrupted",wi="playable",dr="unknown",Si="full",cu="lobby",lu="none",ki="base",uu="*",du="ejected",pu="nbf-room",hu="nbf-token",mu="exp-room",fu="exp-token",bn="no-room",gu="meeting-full",_i="end-of-life",vu="not-allowed",Ci="connection-error",yu="cam-in-use",bu="mic-in-use",wu="cam-mic-in-use",Su="permissions",ku="undefined-mediadevices",_u="not-found",Cu="constraints",Tu="unknown",Ti="iframe-ready-for-launch-config",Ei="iframe-launch-config",Pi="theme-updated",xi="loading",Ai="load-attempt-failed",wn="loaded",ji="started-camera",Mi="camera-error",Oi="joining-meeting",Ii="joined-meeting",Di="left-meeting",Li="participant-joined",Ni="participant-updated",Ri="participant-left",Fi="participant-counts-updated",$i="access-state-updated",Ui="meeting-session-summary-updated",qi="meeting-session-state-updated",Eu="meeting-session-data-error",Vi="waiting-participant-added",Bi="waiting-participant-updated",Ji="waiting-participant-removed",Gi="track-started",Hi="track-stopped",Wi="transcription-started",zi="transcription-stopped",Yi="transcription-error",Sn="recording-started",kn="recording-stopped",Ki="recording-stats",Qi="recording-error",Xi="recording-upload-completed",Zi="recording-data",ea="app-message",ta="transcription-message",ra="remote-media-player-started",na="remote-media-player-updated",sa="remote-media-player-stopped",oa="local-screen-share-started",ia="local-screen-share-stopped",aa="local-screen-share-canceled",ca="active-speaker-change",la="active-speaker-mode-change",ua="network-quality-change",da="network-connection",pa="cpu-load-change",ha="face-counts-updated",Nt="fullscreen",Rt="exited-fullscreen",ma="live-streaming-started",fa="live-streaming-updated",ga="live-streaming-stopped",va="live-streaming-error",ya="lang-updated",ba="receive-settings-updated",_n="input-settings-updated",Cn="nonfatal-error",Tn="error",Jr=4096,no=102400,Gr="iframe-call-message",so="local-screen-start",oo="daily-method-update-live-streaming-endpoints",sr="transmit-log",Je="daily-custom-track",pr={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},wa={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},En={PLAY:"play",PAUSE:"pause"},Hr=["jpg","png","jpeg"],Pu="add-endpoints",xu="remove-endpoints",io="sip-call-transfer";function xe(){return!Y()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Y(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function Sa(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Au(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&((function(t,e){if(!t||!e)return!0;switch(t){case"Chrome":return e.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(e.major===13&&e.minor===0&&e.point===0);case"Firefox":return e.major>=67}return!0})(pt(),Sr())||Y())}function ao(){if(Y()||!document)return!1;var t=document.createElement("iframe");return!!t.requestFullscreen||!!t.webkitRequestFullscreen}var Pn="none",ju="software",Mu="hardware",Ou=(function(){try{var t,e=document.createElement("canvas"),r=!1;(t=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(r=!0,t=e.getContext("webgl2"));var s=t!=null;return e.remove(),s?r?ju:Mu:Pn}catch{return Pn}})();function ka(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!Y()&&Ou!==Pn&&(t?(function(){return co()?!1:["Chrome","Firefox"].includes(pt())})():(function(){if(co())return!1;var e=pt();if(e==="Safari"){var r=Hn();if(r.major<15||r.major===15&&r.minor<4)return!1}return e==="Chrome"?Gn().major>=77:e==="Firefox"?Wn().major>=97:["Chrome","Firefox","Safari"].includes(e)})())}function _a(){if(Y()||Ca()||typeof AudioWorkletNode>"u")return!1;switch(pt()){case"Chrome":case"Firefox":return!0;case"Safari":var t=Sr();return t.major>17||t.major===17&&t.minor>=4}return!1}function Wr(){return Sa()&&typeof MediaStreamTrack<"u"&&!(function(){var t,e=pt();if(!xe())return!0;switch(e){case"Chrome":return(t=Gn()).major&&t.major>0&&t.major<75;case"Firefox":return(t=Wn()).major<91;case"Safari":return(t=Hn()).major<13||t.major===13&&t.minor<1;default:return!0}})()}function Ca(){return xe().match(/Linux; Android/)}function co(){var t,e=xe(),r=e.match(/Mac/)&&(!Y()&&typeof window<"u"&&(t=window)!==null&&t!==void 0&&(t=t.navigator)!==null&&t!==void 0&&t.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(e.match(/Mobi/)||e.match(/Android/)||r)||!!xe().match(/DailyAnd\//)||void 0}function pt(){if(typeof window<"u"){var t=xe();return Ta()?"Safari":t.indexOf("Edge")>-1?"Edge":t.match(/Chrome\//)?"Chrome":t.indexOf("Safari")>-1||Ea()?"Safari":t.indexOf("Firefox")>-1?"Firefox":t.indexOf("MSIE")>-1||t.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Sr(){switch(pt()){case"Chrome":return Gn();case"Safari":return Hn();case"Firefox":return Wn();case"Edge":return(function(){var t=0,e=0;if(typeof window<"u"){var r=xe().match(/Edge\/(\d+).(\d+)/);if(r)try{t=parseInt(r[1]),e=parseInt(r[2])}catch{}}return{major:t,minor:e}})()}}function Gn(){var t=0,e=0,r=0,s=0,i=!1;if(typeof window<"u"){var n=xe(),o=n.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(o)try{t=parseInt(o[1]),e=parseInt(o[2]),r=parseInt(o[3]),s=parseInt(o[4]),i=n.indexOf("OPR/")>-1}catch{}}return{major:t,minor:e,build:r,patch:s,opera:i}}function Ta(){return!!xe().match(/iPad|iPhone|iPod/i)&&Sa()}function Ea(){return xe().indexOf("AppleWebKit/605.1.15")>-1}function Hn(){var t=0,e=0,r=0;if(typeof window<"u"){var s=xe().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(s)try{t=parseInt(s[1]),e=parseInt(s[2]),r=parseInt(s[4])}catch{}else(Ta()||Ea())&&(t=14,e=0,r=3)}return{major:t,minor:e,point:r}}function Wn(){var t=0,e=0;if(typeof window<"u"){var r=xe().match(/Firefox\/(\d+).(\d+)/);if(r)try{t=parseInt(r[1]),e=parseInt(r[2])}catch{}}return{major:t,minor:e}}var Pa=(function(){return ke((function t(){Se(this,t)}),[{key:"addListenerForMessagesFromCallMachine",value:function(t,e,r){Ot()}},{key:"addListenerForMessagesFromDailyJs",value:function(t,e,r){Ot()}},{key:"sendMessageToCallMachine",value:function(t,e,r,s){Ot()}},{key:"sendMessageToDailyJs",value:function(t,e){Ot()}},{key:"removeListener",value:function(t){Ot()}}])})();function lo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function zr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lo(Object(r),!0).forEach((function(s){Re(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lo(Object(r)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))}))}return t}function xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xa=function(){return!!t})()}var Iu=(function(){function t(){var e,r,s,i;return Se(this,t),r=this,s=Ie(s=t),(e=Er(r,xa()?Reflect.construct(s,[],Ie(r).constructor):s.apply(r,i)))._wrappedListeners={},e._messageCallbacks={},e}return Pr(t,Pa),ke(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,r,s){var i=this,n=function(o){if(o.data&&o.data.what==="iframe-call-message"&&(!o.data.callClientId||o.data.callClientId===r)&&(!o.data.from||o.data.from!=="module")){var c=zr({},o.data);if(delete c.from,c.callbackStamp&&i._messageCallbacks[c.callbackStamp]){var d=c.callbackStamp;i._messageCallbacks[d].call(s,c),delete i._messageCallbacks[d]}delete c.what,delete c.callbackStamp,e.call(s,c)}};this._wrappedListeners[e]=n,window.addEventListener("message",n)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,r,s){var i=function(n){var o;if(!(!n.data||n.data.what!==Gr||!n.data.action||n.data.from&&n.data.from!=="module"||n.data.callClientId&&r&&n.data.callClientId!==r||n!=null&&(o=n.data)!==null&&o!==void 0&&o.callFrameId)){var c=n.data;e.call(s,c)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(e,r,s,i){if(!s)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var n=zr({},e);if(n.what=Gr,n.from="module",n.callClientId=s,r){var o=xr();this._messageCallbacks[o]=r,n.callbackStamp=o}var c=i?i.contentWindow:window,d=this._callMachineTargetOrigin(i);d&&c.postMessage(n,d)}},{key:"sendMessageToDailyJs",value:function(e,r){e.what=Gr,e.callClientId=r,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var r=this._wrappedListeners[e];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,r,s){var i=zr({},e);i.callClientId=s;var n=r?r.contentWindow:window,o=this._callMachineTargetOrigin(r);o&&n.postMessage(i,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,r){var s=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===r)&&(!i.data.from||i.data.from!=="module")){var n=i.data;e(n)}};return this._wrappedListeners[e]=s,window.addEventListener("message",s),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var r=this._wrappedListeners[e];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])})();function uo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function Aa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Aa=function(){return!!t})()}var Du=(function(){function t(){var e,r,s,i;return Se(this,t),r=this,s=Ie(s=t),e=Er(r,Aa()?Reflect.construct(s,[],Ie(r).constructor):s.apply(r,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new tn.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new tn.EventEmitter,e._wrappedListeners={},e._messageCallbacks={},e}return Pr(t,Pa),ke(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,r,s){this._addListener(e,global.callMachineToDailyJsEmitter,r,s,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,r,s){this._addListener(e,global.dailyJsToCallMachineEmitter,r,s,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,r,s){this._sendMessage(e,global.dailyJsToCallMachineEmitter,s,r,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,r){this._sendMessage(e,global.callMachineToDailyJsEmitter,r,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var r=this._wrappedListeners[e];r&&(global.callMachineToDailyJsEmitter.removeListener("message",r),global.dailyJsToCallMachineEmitter.removeListener("message",r),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,r,s,i,n){var o=this,c=function(d){if(d.callClientId===s){if(d.callbackStamp&&o._messageCallbacks[d.callbackStamp]){var p=d.callbackStamp;o._messageCallbacks[p].call(i,d),delete o._messageCallbacks[p]}e.call(i,d)}};this._wrappedListeners[e]=c,r.addListener("message",c)}},{key:"_sendMessage",value:function(e,r,s,i,n){var o=(function(d){for(var p=1;p<arguments.length;p++){var g=arguments[p]!=null?arguments[p]:{};p%2?uo(Object(g),!0).forEach((function(S){Re(d,S,g[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(g)):uo(Object(g)).forEach((function(S){Object.defineProperty(d,S,Object.getOwnPropertyDescriptor(g,S))}))}return d})({},e);if(o.callClientId=s,i){var c=xr();this._messageCallbacks[c]=i,o.callbackStamp=c}r.emit("message",o)}}])})(),xn="replace",An="shallow-merge",po=[xn,An],Lu=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.data,s=e.mergeStrategy,i=s===void 0?xn:s;Se(this,t),t._validateMergeStrategy(i),t._validateData(r,i),this.mergeStrategy=i,this.data=r}return ke(t,[{key:"isNoOp",value:function(){return t.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,r){return Object.keys(e).length===0&&r===An}},{key:"_validateMergeStrategy",value:function(e){if(!po.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(po,"]"))}},{key:"_validateData",value:function(e,r){if(!(function(c){if(c==null||Q(c)!=="object")return!1;var d=Object.getPrototypeOf(c);return d==null||d===Object.prototype})(e))throw Error("Meeting session data must be a plain (map-like) object");var s;try{if(s=JSON.stringify(e),r===xn){var i=JSON.parse(s);ge(i,e)||console.warn("The meeting session data provided will be modified when serialized.",i,e)}else if(r===An){for(var n in e)if(Object.hasOwnProperty.call(e,n)&&e[n]!==void 0){var o=JSON.parse(JSON.stringify(e[n]));ge(e[n],o)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",o,e[n])}}}catch(c){throw Error("Meeting session data must be serializable to JSON: ".concat(c))}if(s.length>no)throw Error("Meeting session data is too large (".concat(s.length," characters). Maximum size suppported is ").concat(no,"."))}}])})();function ja(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ja=function(){return!!t})()}function jn(t){var e=typeof Map=="function"?new Map:void 0;return jn=function(r){if(r===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,s)}function s(){return(function(i,n,o){if(ja())return Reflect.construct.apply(null,arguments);var c=[null];c.push.apply(c,n);var d=new(i.bind.apply(i,c));return o&&qt(d,o.prototype),d})(r,arguments,Ie(this).constructor)}return s.prototype=Object.create(r.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),qt(s,r)},jn(t)}function Ma(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ma=function(){return!!t})()}function ho(t){var e,r=(e=window._daily)===null||e===void 0?void 0:e.pendings;if(r){var s=r.indexOf(t);s!==-1&&r.splice(s,1)}}var Nu=(function(){return ke((function t(e){Se(this,t),this._currentLoad=null,this._callClientId=e}),[{key:"load",value:function(){var t,e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void s(!0);t=this._callClientId,window._daily.pendings.push(t),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Ru(r,(function(){s(!1)}),(function(n,o){o||ho(e._callClientId),i(n,o)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),ho(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])})(),Ru=(function(){return ke((function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0;Se(this,t),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=e,this._successCallback=r,this._failureCallback=s}),[{key:"start",value:function(){var t=this;if(!this._currentAttempt){var e=function(r){t._currentAttempt.cancelled||(t._attemptsRemaining--,t._failureCallback(r,t._attemptsRemaining>0),t._attemptsRemaining<=0||setTimeout((function(){t._currentAttempt.cancelled||(t._currentAttempt=new mo(t._dailyConfig,t._successCallback,e),t._currentAttempt.start())}),3e3))};this._currentAttempt=new mo(this._dailyConfig,this._successCallback,e),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])})(),Yr=(function(){function t(){return Se(this,t),e=this,s=arguments,r=Ie(r=t),Er(e,Ma()?Reflect.construct(r,s||[],Ie(e).constructor):r.apply(e,s));var e,r,s}return Pr(t,jn(Error)),ke(t)})(),kr=2e4,mo=(function(){return ke((function e(r,s,i){Se(this,e),this._loadAttemptImpl=Y()||!r.avoidEval?new Fu(r,s,i):new $u(r,s,i)}),[{key:"start",value:(t=B((function*(){return this._loadAttemptImpl.start()})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var t})(),Fu=(function(){return ke((function i(n,o,c){Se(this,i),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=n,this._successCallback=o,this._failureCallback=c}),[{key:"start",value:(s=B((function*(){var i=mr(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)})),function(){return s.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=B((function*(i){if(!this._iosCache)return!1;try{var n=yield this._iosCache.get(i);return!!this.cancelled||!!n&&(n.code?(Function('"use strict";'+n.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=n.refetchHeaders,!1))}catch{return!1}})),function(i){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(e=B((function*(i){var n=this;this._networkTimeout=setTimeout((function(){n._networkTimedOut=!0,n._failureCallback({msg:"Timed out (>".concat(kr," ms) when loading call object bundle ").concat(i),type:"timeout"})}),kr);try{var o=this._refetchHeaders?{headers:this._refetchHeaders}:{},c=yield fetch(i,o);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Yr;var d=yield this._getBundleCodeFromResponse(i,c);if(this.cancelled)throw new Yr;Function('"use strict";'+d)(),this._iosCache&&this._iosCache.set(i,d,c.headers),this.succeeded=!0,this._successCallback()}catch(p){if(clearTimeout(this._networkTimeout),p instanceof Yr||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(p),type:p.message})}})),function(i){return e.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=B((function*(i,n){if(n.ok)return yield n.text();if(this._iosCache&&n.status===304)return(yield this._iosCache.renew(i,n.headers)).code;throw new Error("Received ".concat(n.status," response"))})),function(i,n){return t.apply(this,arguments)})}]);var t,e,r,s})(),$u=(function(){return ke((function t(e,r,s){Se(this,t),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=e,this._successCallback=r,this._failureCallback=s,this._attemptId=xr(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var t=mr(this._dailyConfig);(typeof document>"u"?"undefined":Q(document))==="object"?this._startLoading(t):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(t){var e=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){e._stopLoading(),e._failureCallback({msg:"Timed out (>".concat(kr," ms) when loading call object bundle ").concat(t),type:"timeout"})}),kr);var r=document.getElementsByTagName("head")[0],s=document.createElement("script");this._scriptElement=s,s.onload=function(){e._stopLoading(),e.succeeded=!0,e._successCallback()},s.onerror=function(i){e._stopLoading(),e._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.message})},s.src=t,r.appendChild(s)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])})(),or=function(t,e,r){return qu(t.local,e,r)===!0},Uu=function(t,e,r){return t.local.streams&&t.local.streams[e]&&t.local.streams[e].stream&&t.local.streams[e].stream["get".concat(r==="video"?"Video":"Audio","Tracks")]()[0]},yt=function(t,e,r,s){var i=Vu(t,e,r,s);return i&&i.pendingTrack},qu=function(t,e,r){if(!t)return!1;var s=function(n){switch(n){case"avatar":return!0;case"staged":return n;default:return!!n}},i=t.public.subscribedTracks;return i&&i[e]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(r)===-1&&i[e].custom?[!0,"staged"].includes(i[e].custom)?s(i[e].custom):s(i[e].custom[r]):s(i[e][r]):!i||s(i.ALL)},Vu=function(t,e,r,s){var i=Object.values(t.streams||{}).filter((function(n){return n.participantId===e&&n.type===r&&n.pendingTrack&&n.pendingTrack.kind===s})).sort((function(n,o){return new Date(o.starttime)-new Date(n.starttime)}));return i&&i[0]},Bu=function(t,e){var r=t.local.public.customTracks;if(r&&r[e])return r[e].track};function fo(t,e){for(var r=e.getState(),s=0,i=["cam","screen"];s<i.length;s++)for(var n=i[s],o=0,c=["video","audio"];o<c.length;o++){var d=c[o],p=n==="cam"?d:"screen".concat(d.charAt(0).toUpperCase()+d.slice(1)),g=t.tracks[p];if(g){var S=t.local?Uu(r,n,d):yt(r,t.session_id,n,d);g.state==="playable"&&(g.track=S),g.persistentTrack=S}}}function go(t,e){try{var r=e.getState();for(var s in t.tracks)if(!Ju(s)){var i=t.tracks[s].kind;if(i){var n=t.tracks[s];if(n){var o=t.local?Bu(r,s):yt(r,t.session_id,s,i);n.state==="playable"&&(t.tracks[s].track=o),n.persistentTrack=o}}else console.error("unknown type for custom track")}}catch(c){console.error(c)}}function Ju(t){return["video","audio","screenVideo","screenAudio"].includes(t)}function vo(t,e,r){var s=r.getState();if(t.local){if(t.audio)try{t.audioTrack=s.local.streams.cam.stream.getAudioTracks()[0],t.audioTrack||(t.audio=!1)}catch{}if(t.video)try{t.videoTrack=s.local.streams.cam.stream.getVideoTracks()[0],t.videoTrack||(t.video=!1)}catch{}if(t.screen)try{t.screenVideoTrack=s.local.streams.screen.stream.getVideoTracks()[0],t.screenAudioTrack=s.local.streams.screen.stream.getAudioTracks()[0],t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch{}}else{var i=!0;try{var n=s.participants[t.session_id];n&&n.public&&n.public.rtcType&&n.public.rtcType.impl==="peer-to-peer"&&n.private&&!["connected","completed"].includes(n.private.peeringState)&&(i=!1)}catch(g){console.error(g)}if(!i)return t.audio=!1,t.audioTrack=!1,t.video=!1,t.videoTrack=!1,t.screen=!1,void(t.screenTrack=!1);try{if(s.streams,t.audio&&or(s,t.session_id,"cam-audio")){var o=yt(s,t.session_id,"cam","audio");o&&(e&&e.audioTrack&&e.audioTrack.id===o.id?t.audioTrack=o:o.muted||(t.audioTrack=o)),t.audioTrack||(t.audio=!1)}if(t.video&&or(s,t.session_id,"cam-video")){var c=yt(s,t.session_id,"cam","video");c&&(e&&e.videoTrack&&e.videoTrack.id===c.id?t.videoTrack=c:c.muted||(t.videoTrack=c)),t.videoTrack||(t.video=!1)}if(t.screen&&or(s,t.session_id,"screen-audio")){var d=yt(s,t.session_id,"screen","audio");d&&(e&&e.screenAudioTrack&&e.screenAudioTrack.id===d.id?t.screenAudioTrack=d:d.muted||(t.screenAudioTrack=d))}if(t.screen&&or(s,t.session_id,"screen-video")){var p=yt(s,t.session_id,"screen","video");p&&(e&&e.screenVideoTrack&&e.screenVideoTrack.id===p.id?t.screenVideoTrack=p:p.muted||(t.screenVideoTrack=p))}t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(g){console.error("unexpected error matching up tracks",g)}}}function Gu(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=(function(d,p){if(d){if(typeof d=="string")return yo(d,p);var g={}.toString.call(d).slice(8,-1);return g==="Object"&&d.constructor&&(g=d.constructor.name),g==="Map"||g==="Set"?Array.from(d):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?yo(d,p):void 0}})(t))||e){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
43
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return o=d.done,d},e:function(d){c=!0,n=d},f:function(){try{o||r.return==null||r.return()}finally{if(c)throw n}}}}function
|
|
44
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return o=d.done,d},e:function(d){c=!0,n=d},f:function(){try{o||r.return==null||r.return()}finally{if(c)throw n}}}}function bo(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}var Ne=new Map,$t=null;function Wu(t){Oa()?(function(e){Le.has(e)||(Le.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(r){Le.has(e)&&(Le.get(e).lastDevicesString=JSON.stringify(r),wt||(wt=(function(){var s=B((function*(){var i,n=yield navigator.mediaDevices.enumerateDevices(),o=Gu(Le.keys());try{for(o.s();!(i=o.n()).done;){var c=i.value,d=JSON.stringify(n);d!==Le.get(c).lastDevicesString&&(Le.get(c).lastDevicesString=d,c(n))}}catch(p){o.e(p)}finally{o.f()}}));return function(){return s.apply(this,arguments)}})(),navigator.mediaDevices.addEventListener("devicechange",wt)))})).catch((function(){})))})(t):(function(e){Ne.has(e)||(Ne.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(r){Ne.has(e)&&(Ne.get(e).lastDevicesString=JSON.stringify(r),$t||($t=setInterval(B((function*(){var s,i=yield navigator.mediaDevices.enumerateDevices(),n=Hu(Ne.keys());try{for(n.s();!(s=n.n()).done;){var o=s.value,c=JSON.stringify(i);c!==Ne.get(o).lastDevicesString&&(Ne.get(o).lastDevicesString=c,o(i))}}catch(d){n.e(d)}finally{n.f()}})),3e3)))})))})(t)}function zu(t){Oa()?(function(e){Le.has(e)&&(Le.delete(e),Le.size===0&&wt&&(navigator.mediaDevices.removeEventListener("devicechange",wt),wt=null))})(t):(function(e){Ne.has(e)&&(Ne.delete(e),Ne.size===0&&$t&&(clearInterval($t),$t=null))})(t)}function Oa(){var t;return Y()||((t=navigator.mediaDevices)===null||t===void 0?void 0:t.ondevicechange)!==void 0}var Yu=new Set;function Ku(t,e){return t&&t.readyState==="live"&&!(function(r,s){return r.muted&&!Yu.has(r.id)})(t)}function wo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wo(Object(r),!0).forEach((function(s){Re(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wo(Object(r)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))}))}return t}var Ft=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),Qu=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Ut=Object.values(Ft),So=["v","a","sv","sa","cv","ca"];Object.freeze(Ut.reduce((function(t,e,r){return t[e]=So[r],t}),{})),Object.freeze(So.reduce((function(t,e,r){return t[e]=Ut[r],t}),{}));var Xu=[Ft.VIDEO,Ft.AUDIO,Ft.SCREEN_VIDEO,Ft.SCREEN_AUDIO],ko=Object.values(Qu),_o=["p","s","t"];Object.freeze(ko.reduce((function(t,e,r){return t[e]=_o[r],t}),{})),Object.freeze(_o.reduce((function(t,e,r){return t[e]=ko[r],t}),{}));var Ia=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.base,s=e.byUserId,i=e.byParticipantId;Se(this,t),this.base=r,this.byUserId=s,this.byParticipantId=i}return ke(t,[{key:"clone",value:function(){var e=new t;if(this.base instanceof pe?e.base=this.base.clone():e.base=this.base,this.byUserId!==void 0)for(var r in e.byUserId={},this.byUserId){var s=this.byUserId[r];e.byUserId[r]=s instanceof pe?s.clone():s}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var n=this.byParticipantId[i];e.byParticipantId[i]=n instanceof pe?n.clone():n}return e}},{key:"toJSONObject",value:function(){var e={};if(typeof this.base=="boolean"?e.base=this.base:this.base instanceof pe&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var r in e.byUserId={},this.byUserId){var s=this.byUserId[r];e.byUserId[r]=s instanceof pe?s.toJSONObject():s}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var n=this.byParticipantId[i];e.byParticipantId[i]=n instanceof pe?n.toJSONObject():n}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(this.base!==void 0&&(typeof this.base=="boolean"?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var r in e.u={},this.byUserId){var s=this.byUserId[r];e.u[r]=typeof s=="boolean"?s:s.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in e.p={},this.byParticipantId){var n=this.byParticipantId[i];e.p[i]=typeof n=="boolean"?n:n.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof pe&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(e){var r=me(e,2),s=r[0],i=r[1];return[s,i instanceof pe?i.normalize():i]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(e){var r=me(e,2),s=r[0],i=r[1];return[s,i instanceof pe?i.normalize():i]})))),this}}],[{key:"fromJSONObject",value:function(e){var r,s,i;if(e.base!==void 0&&(r=typeof e.base=="boolean"?e.base:pe.fromJSONObject(e.base)),e.byUserId!==void 0)for(var n in s={},e.byUserId){var o=e.byUserId[n];s[n]=typeof o=="boolean"?o:pe.fromJSONObject(o)}if(e.byParticipantId!==void 0)for(var c in i={},e.byParticipantId){var d=e.byParticipantId[c];i[c]=typeof d=="boolean"?d:pe.fromJSONObject(d)}return new t({base:r,byUserId:s,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(e){var r,s,i;if(e.b!==void 0&&(r=typeof e.b=="boolean"?e.b:pe.fromMinifiedJSONObject(e.b)),e.u!==void 0)for(var n in s={},e.u){var o=e.u[n];s[n]=typeof o=="boolean"?o:pe.fromMinifiedJSONObject(o)}if(e.p!==void 0)for(var c in i={},e.p){var d=e.p[c];i[c]=typeof d=="boolean"?d:pe.fromMinifiedJSONObject(d)}return new t({base:r,byUserId:s,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if(Q(e)!=="object")return[!1,"canReceive must be an object"];for(var r=["base","byUserId","byParticipantId"],s=0,i=Object.keys(e);s<i.length;s++){var n=i[s];if(!r.includes(n))return[!1,"canReceive can only contain keys (".concat(r.join(", "),")")];if(n==="base"){var o=me(pe.validateJSONObject(e.base,!0),2),c=o[0],d=o[1];if(!c)return[!1,d]}else{if(Q(e[n])!=="object")return[!1,"invalid (non-object) value for field '".concat(n,"' in canReceive")];for(var p=0,g=Object.values(e[n]);p<g.length;p++){var S=g[p],C=me(pe.validateJSONObject(S),2),E=C[0],h=C[1];if(!E)return[!1,h]}}}return[!0]}}])})(),pe=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.video,s=e.audio,i=e.screenVideo,n=e.screenAudio,o=e.customVideo,c=e.customAudio;Se(this,t),this.video=r,this.audio=s,this.screenVideo=i,this.screenAudio=n,this.customVideo=o,this.customAudio=c}return ke(t,[{key:"clone",value:function(){var e=new t;return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=He({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=He({},this.customAudio)),e}},{key:"toJSONObject",value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=He({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=He({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=He({},this.customVideo)),this.customAudio!==void 0&&(e.ca=He({},this.customAudio)),e}},{key:"normalize",value:function(){function e(r,s){return r&&Object.keys(r).length===1&&r["*"]===s}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(e){return new t({video:e,audio:e,screenVideo:e,screenAudio:e,customVideo:{"*":e},customAudio:{"*":e}})}},{key:"fromJSONObject",value:function(e){return new t({video:e.video,audio:e.audio,screenVideo:e.screenVideo,screenAudio:e.screenAudio,customVideo:e.customVideo!==void 0?He({},e.customVideo):void 0,customAudio:e.customAudio!==void 0?He({},e.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(e){return new t({video:e.v,audio:e.a,screenVideo:e.sv,screenAudio:e.sa,customVideo:e.cv,customAudio:e.ca})}},{key:"validateJSONObject",value:function(e,r){if(typeof e=="boolean")return[!0];if(Q(e)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var s=Object.keys(e),i=0,n=s;i<n.length;i++){var o=n[i];if(!Ut.includes(o))return[!1,"invalid media type '".concat(o,"' in canReceive")];if(Xu.includes(o)){if(typeof e[o]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(o,"' in canReceive")]}else{if(Q(e[o])!=="object")return[!1,"invalid (non-object) value for media type '".concat(o,"' in canReceive")];for(var c=0,d=Object.values(e[o]);c<d.length;c++)if(typeof d[c]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(o,"' in canReceive")];if(r&&e[o]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(o,"'")]}}return r&&s.length!==Ut.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Ut.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])})(),Zu=["result"],ed=["preserveIframe"];function Co(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function U(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Co(Object(r),!0).forEach((function(s){Re(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Co(Object(r)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))}))}return t}function Da(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Da=function(){return!!t})()}function To(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=(function(d,p){if(d){if(typeof d=="string")return Eo(d,p);var g={}.toString.call(d).slice(8,-1);return g==="Object"&&d.constructor&&(g=d.constructor.name),g==="Map"||g==="Set"?Array.from(d):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?Eo(d,p):void 0}})(t))||e){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
45
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return o=d.done,d},e:function(d){c=!0,n=d},f:function(){try{o||r.return==null||r.return()}finally{if(c)throw n}}}}function Eo(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}var rt={},Po="video",td="voice",xo=Y()?{data:{}}:{data:{},topology:"none"},Ao={present:0,hidden:0},La={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Kr=Object.keys(La),jo=["state","volume","simulcastEncodings"],Mo={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},_r={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},Mn={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},nt={customIntegrations:{validate:Ba,help:qa()},customTrayButtons:{validate:Va,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(_r))},url:{validate:function(t){return typeof t=="string"},help:"url should be a string"},baseUrl:{validate:function(t){return typeof t=="string"},help:"baseUrl should be a string"},token:{validate:function(t){return typeof t=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(t,e){try{return e.validateDailyConfig(t),!0}catch(r){console.error("Failed to validate dailyConfig",r)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(t){return Ja(t,Mo)},help:"reactNativeConfig should look like ".concat(JSON.stringify(Mo),", all fields optional")},lang:{validate:function(t){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(t)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(t){try{return Na(t),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(t,e){if(typeof t=="boolean")return e._preloadCache.allowLocalVideo=t,!0;var r;if(t instanceof MediaStreamTrack)e._sharedTracks.videoTrack=t,r={customTrack:Je};else{if(delete e._sharedTracks.videoTrack,typeof t!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:t}}return e._updatePreloadCacheInputSettings({video:{settings:r}},!1),!0}},audioSource:{validate:function(t,e){if(typeof t=="boolean")return e._preloadCache.allowLocalAudio=t,!0;var r;if(t instanceof MediaStreamTrack)e._sharedTracks.audioTrack=t,r={customTrack:Je};else{if(delete e._sharedTracks.audioTrack,typeof t!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:t}}return e._updatePreloadCacheInputSettings({audio:{settings:r}},!1),!0}},subscribeToTracksAutomatically:{validate:function(t,e){return e._preloadCache.subscribeToTracksAutomatically=t,!0}},theme:{validate:function(t){var e=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],r=function(s){for(var i=0,n=Object.keys(s);i<n.length;i++){var o=n[i];if(!e.includes(o))return console.error('unsupported color "'.concat(o,'". Valid colors: ').concat(e.join(", "))),!1;if(!s[o].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(o,' theme color should be provided in valid hex color format. Received: "').concat(s[o],'"')),!1}return!0};return Q(t)==="object"&&("light"in t&&"dark"in t||"colors"in t)?"light"in t&&"dark"in t?"colors"in t.light?"colors"in t.dark?r(t.light.colors)&&r(t.dark.colors):(console.error('Dark theme is missing "colors" property.',t),!1):(console.error('Light theme is missing "colors" property.',t),!1):r(t.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',t),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(t){if("grid"in t){var e=t.grid;if("maxTilesPerPage"in e){if(!Number.isInteger(e.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(e.maxTilesPerPage,".")),!1;if(e.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in e){if(!Number.isInteger(e.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(e.minTilesPerPage,".")),!1;if(e.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in e&&e.minTilesPerPage>e.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(t){return Ra(t,{allowAllParticipantsKey:!1})},help:Ua({allowAllParticipantsKey:!1})},sendSettings:{validate:function(t,e){return!!(function(r,s){try{return s.validateUpdateSendSettings(r),!0}catch(i){return console.error("Failed to validate send settings",i),!1}})(t,e)&&(e._preloadCache.sendSettings=t,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(t,e){var r;return!!Fa(t)&&(e._inputSettings||(e._inputSettings={}),$a(t,(r=e.properties)===null||r===void 0?void 0:r.dailyConfig,e._sharedTracks),e._updatePreloadCacheInputSettings(t,!0),!0)},help:On()},layout:{validate:function(t){return t==="custom-v1"||t==="browser"||t==="none"},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},ir={styles:{validate:function(t){for(var e in t)if(e!=="cam"&&e!=="screen")return!1;if(t.cam){for(var r in t.cam)if(r!=="div"&&r!=="video")return!1}if(t.screen){for(var s in t.screen)if(s!=="div"&&s!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(t,e){if(e._preloadCache.subscribeToTracksAutomatically)return!1;var r=[!0,!1,"staged"];if(r.includes(t)||!Y()&&t==="avatar")return!0;var s=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(n){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var c in n)if(c==="custom"){if(!r.includes(n[c])&&!i(n[c],!0))return!1}else{var d=!o&&!s.includes(c),p=!r.includes(n[c]);if(d||p)return!1}return!0};return i(t)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Y()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(t){return t===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var s=me(r[e],2),i=s[0],n=s[1];switch(i){case"hasPresence":if(typeof n!="boolean")return!1;break;case"canSend":if(n instanceof Set||n instanceof Array||Array.isArray(n)){var o,c=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],d=To(n);try{for(d.s();!(o=d.n()).done;){var p=o.value;if(!c.includes(p))return!1}}catch(w){d.e(w)}finally{d.f()}}else if(typeof n!="boolean")return!1;(n instanceof Array||Array.isArray(n))&&(t.canSend=new Set(n));break;case"canReceive":var g=me(Ia.validateJSONObject(n),2),S=g[0],C=g[1];if(!S)return console.error(C),!1;break;case"canAdmin":if(n instanceof Set||n instanceof Array||Array.isArray(n)){var E,h=["participants","streaming","transcription"],m=To(n);try{for(m.s();!(E=m.n()).done;){var b=E.value;if(!h.includes(b))return!1}}catch(w){m.e(w)}finally{m.f()}}else if(typeof n!="boolean")return!1;(n instanceof Array||Array.isArray(n))&&(t.canAdmin=new Set(n));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=(function(){var t=B((function*(e){return new Promise((function(r,s){var i=[];e.forEach((function(n){return Promise.resolve(n).then((function(o){r(o)})).catch((function(o){i.push(o),i.length===e.length&&s(i)}))}))}))}));return function(e){return t.apply(this,arguments)}})());var rd=(function(){function t(a){var u,l,f,v,x,I,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Se(this,t),f=this,v=Ie(v=t),Re(l=Er(f,Da()?Reflect.construct(v,[],Ie(f).constructor):v.apply(f,x)),"startListeningForDeviceChanges",(function(){Wu(l.handleDeviceChange)})),Re(l,"stopListeningForDeviceChanges",(function(){zu(l.handleDeviceChange)})),Re(l,"handleDeviceChange",(function(H){H=H.map((function(K){return JSON.parse(JSON.stringify(K))})),l.emitDailyJSEvent({action:"available-devices-updated",availableDevices:H})})),Re(l,"handleNativeAppStateChange",(function(){var H=B((function*(K){if(K==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield l.destroy());var De=K==="active";l.disableReactNativeAutoDeviceManagement("video")||(De?l.camUnmutedBeforeLosingNativeActiveState&&l.setLocalVideo(!0):(l.camUnmutedBeforeLosingNativeActiveState=l.localVideo(),l.camUnmutedBeforeLosingNativeActiveState&&l.setLocalVideo(!1)))}));return function(K){return H.apply(this,arguments)}})()),Re(l,"handleNativeAudioFocusChange",(function(H){l.disableReactNativeAutoDeviceManagement("audio")||(l._hasNativeAudioFocus=H,l.toggleParticipantAudioBasedOnNativeAudioFocus(),l._hasNativeAudioFocus?l.micUnmutedBeforeLosingNativeAudioFocus&&l.setLocalAudio(!0):(l.micUnmutedBeforeLosingNativeAudioFocus=l.localAudio(),l.setLocalAudio(!1)))})),Re(l,"handleNativeSystemScreenCaptureStop",(function(){l.stopScreenShare()})),!Wr()&&!Y())throw new Error("WebRTC not supported or suppressed");if(l.strictMode=D.strictMode===void 0||D.strictMode,l.allowMultipleCallInstances=(u=D.allowMultipleCallInstances)!==null&&u!==void 0&&u,Object.keys(rt).length&&(l._logDuplicateInstanceAttempt(),!l.allowMultipleCallInstances)){if(l.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),l.callClientId=xr(),rt[(I=l).callClientId]=I,window._daily.instances[l.callClientId]={},l._sharedTracks={},window._daily.instances[l.callClientId].tracks=l._sharedTracks,D.dailyJsVersion=t.version(),l._iframe=a,l._callObjectMode=D.layout==="none"&&!l._iframe,l._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},D.showLocalVideo!==void 0?l._callObjectMode?console.error("showLocalVideo is not available in call object mode"):l._showLocalVideo=!!D.showLocalVideo:l._showLocalVideo=!0,D.showParticipantsBar!==void 0?l._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):l._showParticipantsBar=!!D.showParticipantsBar:l._showParticipantsBar=!0,D.customIntegrations!==void 0?l._callObjectMode?console.error("customIntegrations is not available in call object mode"):l._customIntegrations=D.customIntegrations:l._customIntegrations={},D.customTrayButtons!==void 0?l._callObjectMode?console.error("customTrayButtons is not available in call object mode"):l._customTrayButtons=D.customTrayButtons:l._customTrayButtons={},D.activeSpeakerMode!==void 0?l._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):l._activeSpeakerMode=!!D.activeSpeakerMode:l._activeSpeakerMode=!1,D.receiveSettings?l._callObjectMode?l._receiveSettings=D.receiveSettings:console.error("receiveSettings is only available in call object mode"):l._receiveSettings={},l.validateProperties(D),l.properties=U({},D),l._inputSettings||(l._inputSettings={}),l._callObjectLoader=l._callObjectMode?new Nu(l.callClientId):null,l._callState=yn,l._isPreparingToJoin=!1,l._accessState={access:dr},l._meetingSessionSummary={},l._finalSummaryOfPrevSession={},l._meetingSessionState=Zr(xo,l._callObjectMode),l._nativeInCallAudioMode=Po,l._participants={},l._isScreenSharing=!1,l._participantCounts=Ao,l._rmpPlayerState={},l._waitingParticipants={},l._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},l._activeSpeaker={},l._localAudioLevel=0,l._isLocalAudioLevelObserverRunning=!1,l._remoteParticipantsAudioLevel={},l._isRemoteParticipantsAudioLevelObserverRunning=!1,l._maxAppMessageSize=Jr,l._messageChannel=Y()?new Du:new Iu,l._iframe&&(l._iframe.requestFullscreen?l._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===l._iframe?(l.emitDailyJSEvent({action:Nt}),l.sendMessageToCallMachine({action:Nt})):(l.emitDailyJSEvent({action:Rt}),l.sendMessageToCallMachine({action:Rt}))})):l._iframe.webkitRequestFullscreen&&l._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===l._iframe?(l.emitDailyJSEvent({action:Nt}),l.sendMessageToCallMachine({action:Nt})):(l.emitDailyJSEvent({action:Rt}),l.sendMessageToCallMachine({action:Rt}))}))),Y()){var R=l.nativeUtils();R.addAudioFocusChangeListener&&R.removeAudioFocusChangeListener&&R.addAppStateChangeListener&&R.removeAppStateChangeListener&&R.addSystemScreenCaptureStopListener&&R.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),l._hasNativeAudioFocus=!0,R.addAudioFocusChangeListener(l.handleNativeAudioFocusChange),R.addAppStateChangeListener(l.handleNativeAppStateChange),R.addSystemScreenCaptureStopListener(l.handleNativeSystemScreenCaptureStop)}return l._callObjectMode&&l.startListeningForDeviceChanges(),l._messageChannel.addListenerForMessagesFromCallMachine(l.handleMessageFromCallMachine,l.callClientId,l),l}return Pr(t,Kt),ke(t,[{key:"destroy",value:(Fe=B((function*(){var a;try{yield this.leave()}catch{}var u=this._iframe;if(u){var l=u.parentElement;l&&l.removeChild(u)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Y()){var f=this.nativeUtils();f.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),f.removeAppStateChangeListener(this.handleNativeAppStateChange),f.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete rt[this.callClientId],!((a=window)===null||a===void 0||(a=a._daily)===null||a===void 0)&&a.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return Fe.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(a){var u=a.bodyClass,l=a.cssFile,f=a.cssText;return z(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(l),bodyClass:u,cssText:f}),this}},{key:"iframe",value:function(){return z(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return je(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return je(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(a,u){for(var l in u){if(!ir[l])throw new Error("unrecognized updateParticipant property ".concat(l));if(ir[l].validate&&!ir[l].validate(u[l],this,this._participants[a]))throw new Error(ir[l].help)}}},{key:"updateParticipant",value:function(a,u){return this._participants.local&&this._participants.local.session_id===a&&(a="local"),a&&u&&(this.validateParticipantProperties(a,u),this.sendMessageToCallMachine({action:"update-participant",id:a,properties:u})),this}},{key:"updateParticipants",value:function(a){var u=this._participants.local&&this._participants.local.session_id;for(var l in a)l===u&&(l="local"),l&&a[l]&&this.validateParticipantProperties(l,a[l]);return this.sendMessageToCallMachine({action:"update-participants",participants:a}),this}},{key:"updateWaitingParticipant",value:(Ae=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(je(this._callObjectMode,"updateWaitingParticipant()"),te(this._callState,"updateWaitingParticipant()"),typeof u!="string"||Q(l)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(f,v){a.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:u,updates:l},(function(x){x.error&&v(x.error),x.id||v(new Error("unknown error in updateWaitingParticipant()")),f({id:x.id})}))}))})),function(){return Ae.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(le=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(je(this._callObjectMode,"updateWaitingParticipants()"),te(this._callState,"updateWaitingParticipants()"),Q(u)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(l,f){a.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:u},(function(v){v.error&&f(v.error),v.ids||f(new Error("unknown error in updateWaitingParticipants()")),l({ids:v.ids})}))}))})),function(){return le.apply(this,arguments)})},{key:"requestAccess",value:(ae=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=u.access,f=l===void 0?{level:Si}:l,v=u.name,x=v===void 0?"":v;return je(this._callObjectMode,"requestAccess()"),te(this._callState,"requestAccess()"),new Promise((function(I,D){a.sendMessageToCallMachine({action:"daily-method-request-access",access:f,name:x},(function(R){R.error&&D(R.error),R.access||D(new Error("unknown error in requestAccess()")),I({access:R.access,granted:R.granted})}))}))})),function(){return ae.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in u&&(Y()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),u={}):a&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),u={})),this.sendMessageToCallMachine({action:"local-audio",state:a,options:u}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(a){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:a}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(a){return this.sendMessageToCallMachine({action:"local-video",state:a}),this}},{key:"_setAllowLocalAudio",value:function(a){if(this._preloadCache.allowLocalAudio=a,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:a}),this}},{key:"_setAllowLocalVideo",value:function(a){if(this._preloadCache.allowLocalVideo=a,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:a}),this}},{key:"getReceiveSettings",value:(ye=B((function*(a){var u=this,l=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,f=l!==void 0&&l;if(je(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(Q(a)){case"string":return new Promise((function(v){u.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:a,showInheritedValues:f},(function(x){v(x.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}})),function(a){return ye.apply(this,arguments)})},{key:"updateReceiveSettings",value:(X=B((function*(a){var u=this;if(je(this._callObjectMode,"updateReceiveSettings()"),!Ra(a,{allowAllParticipantsKey:!0}))throw new Error(Ua({allowAllParticipantsKey:!0}));return te(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(l){u.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:a},(function(f){l({receiveSettings:f.receiveSettings})}))}))})),function(a){return X.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(a,u){if(a){var l={};if(a.audio){var f,v,x;a.audio.settings&&(!Object.keys(a.audio.settings).length&&u||(l.audio={settings:U({},a.audio.settings)})),u&&(f=l.audio)!==null&&f!==void 0&&(f=f.settings)!==null&&f!==void 0&&f.customTrack&&(l.audio.settings={customTrack:this._sharedTracks.audioTrack});var I=((v=a.audio.processor)===null||v===void 0?void 0:v.type)==="none"&&((x=a.audio.processor)===null||x===void 0?void 0:x._isDefaultWhenNone);if(a.audio.processor&&!I){var D=U({},a.audio.processor);delete D._isDefaultWhenNone,l.audio=U(U({},l.audio),{},{processor:D})}}if(a.video){var R,H,K;a.video.settings&&(!Object.keys(a.video.settings).length&&u||(l.video={settings:U({},a.video.settings)})),u&&(R=l.video)!==null&&R!==void 0&&(R=R.settings)!==null&&R!==void 0&&R.customTrack&&(l.video.settings={customTrack:this._sharedTracks.videoTrack});var De=((H=a.video.processor)===null||H===void 0?void 0:H.type)==="none"&&((K=a.video.processor)===null||K===void 0?void 0:K._isDefaultWhenNone);if(a.video.processor&&!De){var Ze=U({},a.video.processor);delete Ze._isDefaultWhenNone,l.video=U(U({},l.video),{},{processor:Ze})}}return l}}},{key:"getInputSettings",value:function(){var a=this;return z(),new Promise((function(u){u(a._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var a,u,l,f,v,x,I={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(a=((l=this._inputSettings)===null||l===void 0?void 0:l.video)||I,u=((f=this._inputSettings)===null||f===void 0?void 0:f.audio)||I):(a=((v=this._preloadCache)===null||v===void 0||(v=v.inputSettings)===null||v===void 0?void 0:v.video)||I,u=((x=this._preloadCache)===null||x===void 0||(x=x.inputSettings)===null||x===void 0?void 0:x.audio)||I);var D={audio:u,video:a};return this._prepInputSettingsForSharing(D,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(a,u){var l=this._inputSettings||{},f={};if(a.video){var v,x,I;f.video={},a.video.settings?(f.video.settings={},u||a.video.settings.customTrack||(I=l.video)===null||I===void 0||!I.settings?f.video.settings=a.video.settings:f.video.settings=U(U({},l.video.settings),a.video.settings),Object.keys(f.video.settings).length||delete f.video.settings):(v=l.video)!==null&&v!==void 0&&v.settings&&(f.video.settings=l.video.settings),a.video.processor?f.video.processor=a.video.processor:(x=l.video)!==null&&x!==void 0&&x.processor&&(f.video.processor=l.video.processor)}else l.video&&(f.video=l.video);if(a.audio){var D,R,H;f.audio={},a.audio.settings?(f.audio.settings={},u||a.audio.settings.customTrack||(H=l.audio)===null||H===void 0||!H.settings?f.audio.settings=a.audio.settings:f.audio.settings=U(U({},l.audio.settings),a.audio.settings),Object.keys(f.audio.settings).length||delete f.audio.settings):(D=l.audio)!==null&&D!==void 0&&D.settings&&(f.audio.settings=l.audio.settings),a.audio.processor?f.audio.processor=a.audio.processor:(R=l.audio)!==null&&R!==void 0&&R.processor&&(f.audio.processor=l.audio.processor)}else l.audio&&(f.audio=l.audio);this._maybeUpdateInputSettings(f)}},{key:"_devicesFromInputSettings",value:function(a){var u,l,f=(a==null||(u=a.video)===null||u===void 0||(u=u.settings)===null||u===void 0?void 0:u.deviceId)||null,v=(a==null||(l=a.audio)===null||l===void 0||(l=l.settings)===null||l===void 0?void 0:l.deviceId)||null,x=this._preloadCache.outputDeviceId||null;return{camera:f?{deviceId:f}:{},mic:v?{deviceId:v}:{},speaker:x?{deviceId:x}:{}}}},{key:"updateInputSettings",value:(q=B((function*(a){var u=this;return z(),Fa(a)?a.video||a.audio?($a(a,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(a,!0),this._getInputSettings()):new Promise((function(l,f){u.sendMessageToCallMachine({action:"update-input-settings",inputSettings:a},(function(v){if(v.error)f(v.error);else{if(v.returnPreloadCache)return u._updatePreloadCacheInputSettings(a,!0),void l(u._getInputSettings());u._maybeUpdateInputSettings(v.inputSettings),l(u._prepInputSettingsForSharing(v.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(On()),Promise.reject(On()))})),function(a){return q.apply(this,arguments)})},{key:"setBandwidth",value:function(a){var u=a.kbs,l=a.trackConstraints;if(z(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:u,trackConstraints:l}),this}},{key:"getDailyLang",value:function(){var a=this;if(z(),this._callMachineInitialized)return new Promise((function(u){a.sendMessageToCallMachine({action:"get-daily-lang"},(function(l){delete l.action,delete l.callbackStamp,u(l)}))}))}},{key:"setDailyLang",value:function(a){return z(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:a}),this}},{key:"setProxyUrl",value:function(a){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:a}),this}},{key:"setIceConfig",value:function(a){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:a}),this}},{key:"meetingSessionSummary",value:function(){return[ze,Ue].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(ie=B((function*(){var a=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),te(this._callState,"getMeetingSession()"),new Promise((function(u){a.sendMessageToCallMachine({action:"get-meeting-session"},(function(l){delete l.action,delete l.callbackStamp,u(l)}))}))})),function(){return ie.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return te(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";je(this._callObjectMode,"setMeetingSessionData()"),te(this._callState,"setMeetingSessionData");try{(function(l,f){new Lu({data:l,mergeStrategy:f})})(a,u)}catch(l){throw console.error(l),l}try{this.sendMessageToCallMachine({action:"set-session-data",data:a,mergeStrategy:u})}catch(l){throw new Error("Error setting meeting session data: ".concat(l))}}},{key:"setUserName",value:function(a,u){var l=this;return this.properties.userName=a,new Promise((function(f){l.sendMessageToCallMachine({action:"set-user-name",name:a??"",thisMeetingOnly:Y()||!!u&&!!u.thisMeetingOnly},(function(v){delete v.action,delete v.callbackStamp,f(v)}))}))}},{key:"setUserData",value:(se=B((function*(a){var u=this;try{Na(a)}catch(l){throw console.error(l),l}if(this.properties.userData=a,this._callMachineInitialized)return new Promise((function(l){try{u.sendMessageToCallMachine({action:"set-user-data",userData:a},(function(f){delete f.action,delete f.callbackStamp,l(f)}))}catch(f){throw new Error("Error setting user data: ".concat(f))}}))})),function(a){return se.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(a){if(a&&(a<100||typeof a!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(a){var u=this;if(typeof AudioWorkletNode>"u"&&!Y())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(a),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(l,f){u.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:a},(function(v){u._isLocalAudioLevelObserverRunning=!v.error,v.error?f({error:v.error}):l()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:a}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(a){var u=this;if(this.validateAudioLevelInterval(a),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(l,f){u.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:a},(function(v){u._isRemoteParticipantsAudioLevelObserverRunning=!v.error,v.error?f({error:v.error}):l()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:a}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(F=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(je(this._callObjectMode,"startCamera()"),Qr(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(u)}catch(l){return Promise.reject(l)}else{if(this._didPreAuth){if(u.url&&u.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(u.token&&u.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(u),this.properties=U(U({},this.properties),u)}return new Promise((function(l){a._preloadCache.inputSettings=a._prepInputSettingsForSharing(a._inputSettings,!1),a.sendMessageToCallMachine({action:"start-camera",properties:gt(a.properties,a.callClientId),preloadCache:gt(a._preloadCache,a.callClientId)},(function(f){l({camera:f.camera,mic:f.mic,speaker:f.speaker})}))}))})),function(){return F.apply(this,arguments)})},{key:"validateCustomTrack",value:function(a,u,l){if(l&&l.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(u&&u!=="music"&&u!=="speech"&&!(u instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(l&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(l))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(a instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return z(),te(this._callState,"startCustomTrack()"),this.validateCustomTrack(u.track,u.mode,u.trackName),new Promise((function(l,f){a._sharedTracks.customTrack=u.track,u.track=Je,a.sendMessageToCallMachine({action:"start-custom-track",properties:u},(function(v){v.error?f({error:v.error}):l(v.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(a){var u=this;return z(),te(this._callState,"stopCustomTrack()"),new Promise((function(l){u.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:a},(function(f){l(f.mediaTag)}))}))}},{key:"setCamera",value:function(a){var u=this;return It(),ar(this._callMachineInitialized,"setCamera()"),new Promise((function(l){u.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:a},(function(f){l({device:f.device})}))}))}},{key:"setAudioDevice",value:(ne=B((function*(a){return It(),this.nativeUtils().setAudioDevice(a),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(a){return ne.apply(this,arguments)})},{key:"cycleCamera",value:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(l){a.sendMessageToCallMachine({action:"cycle-camera",properties:u},(function(f){l({device:f.device})}))}))}},{key:"cycleMic",value:function(){var a=this;return z(),new Promise((function(u){a.sendMessageToCallMachine({action:"cycle-mic"},(function(l){u({device:l.device})}))}))}},{key:"getCameraFacingMode",value:function(){var a=this;return It(),new Promise((function(u){a.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(l){u(l.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(W=B((function*(a){var u=this,l=a.audioDeviceId,f=a.videoDeviceId,v=a.audioSource,x=a.videoSource;if(z(),v!==void 0&&(l=v),x!==void 0&&(f=x),typeof l=="boolean"&&(this._setAllowLocalAudio(l),l=void 0),typeof f=="boolean"&&(this._setAllowLocalVideo(f),f=void 0),!l&&!f)return yield this.getInputDevices();var I={};return l&&(l instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=l,l=Je,I.audio={settings:{customTrack:l}}):(delete this._sharedTracks.audioTrack,I.audio={settings:{deviceId:l}})),f&&(f instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=f,f=Je,I.video={settings:{customTrack:f}}):(delete this._sharedTracks.videoTrack,I.video={settings:{deviceId:f}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(I,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(D){u.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:l,videoDeviceId:f},(function(R){if(delete R.action,delete R.callbackStamp,R.returnPreloadCache)return u._updatePreloadCacheInputSettings(I,!1),void D(u._devicesFromInputSettings(u._inputSettings));D(R)}))}))})),function(a){return W.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(N=B((function*(a){var u=this,l=a.outputDeviceId;if(z(),!l||typeof l!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=l,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(f,v){u.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:l},(function(x){if(delete x.action,delete x.callbackStamp,x.error){var I=new Error(x.error.message);return I.type=x.error.type,void v(I)}x.returnPreloadCache?f(u._devicesFromInputSettings(u._inputSettings)):f(x)}))}))})),function(a){return N.apply(this,arguments)})},{key:"getInputDevices",value:($=B((function*(){var a=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(u){a.sendMessageToCallMachine({action:"get-input-devices"},(function(l){l.returnPreloadCache?u(a._devicesFromInputSettings(a._inputSettings)):u({camera:l.camera,mic:l.mic,speaker:l.speaker})}))}))})),function(){return $.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return It(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(a){if(It(),[Po,td].includes(a)){if(a!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=a,!this.disableReactNativeAutoDeviceManagement("audio")&&hr(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",a)}},{key:"preAuth",value:(L=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(je(this._callObjectMode,"preAuth()"),Qr(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(u)),!u.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(u),this.properties=U(U({},this.properties),u),new Promise((function(l,f){a._preloadCache.inputSettings=a._prepInputSettingsForSharing(a._inputSettings,!1),a.sendMessageToCallMachine({action:"daily-method-preauth",properties:gt(a.properties,a.callClientId),preloadCache:gt(a._preloadCache,a.callClientId)},(function(v){return v.error?f(v.error):v.access?(a._didPreAuth=!0,void l({access:v.access})):f(new Error("unknown error in preAuth()"))}))}))})),function(){return L.apply(this,arguments)})},{key:"load",value:(A=B((function*(a){var u=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(a&&(this.validateProperties(a),this.properties=U(U({},this.properties),a)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(to),this.emitDailyJSEvent({action:xi}),this._callObjectMode?new Promise((function(l,f){u._callObjectLoader.cancel();var v=Date.now();u._callObjectLoader.load(u.properties.dailyConfig,(function(x){u._bundleLoadTime=x?"no-op":Date.now()-v,u._updateCallState(ro),x&&u.emitDailyJSEvent({action:wn}),l()}),(function(x,I){if(u.emitDailyJSEvent({action:Ai}),!I){u._updateCallState(Ue),u.resetMeetingDependentVars();var D={action:Tn,errorMsg:x.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:x,bundleUrl:mr(u.properties.dailyConfig)}}};u._maybeSendToSentry(D),u.emitDailyJSEvent(D),f(x.msg)}}))})):(this._iframe.src=si(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(l,f){u._loadedCallback=function(v){u._callState!==Ue?(u._updateCallState(ro),(u.properties.cssFile||u.properties.cssText)&&u.loadCss(u.properties),l()):f(v)}})))}})),function(a){return A.apply(this,arguments)})},{key:"join",value:(_=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var l=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(u)}catch(f){return this.updateIsPreparingToJoin(!1),Promise.reject(f)}}else{if(l=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(u.url&&u.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(u.token&&u.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(u.url&&!this._callObjectMode&&u.url&&u.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(u.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(u),this.properties=U(U({},this.properties),u)}return u.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!u.showLocalVideo),u.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!u.showParticipantsBar),this._callState===Ke||this._callState===wr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(wr,!1),this.emitDailyJSEvent({action:Oi}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:gt(this.properties,this.callClientId),preloadCache:gt(this._preloadCache,this.callClientId)}),new Promise((function(f,v){a._joinedCallback=function(x,I){if(a._callState!==Ue){if(a._updateCallState(Ke),x)for(var D in x){if(a._callObjectMode){var R=a._callMachine().store;fo(x[D],R),go(x[D],R),vo(x[D],a._participants[D],R)}a._participants[D]=U({},x[D]),a.toggleParticipantAudioBasedOnNativeAudioFocus()}l&&a.loadCss(a.properties),f(x)}else v(I)}})))})),function(){return _.apply(this,arguments)})},{key:"leave",value:(k=B((function*(){var a=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(u){a._callState===ze||a._callState===Ue?u():a._callObjectLoader&&!a._callObjectLoader.loaded?(a._callObjectLoader.cancel(),a._updateCallState(ze),a.resetMeetingDependentVars(),a.emitDailyJSEvent({action:ze}),u()):(a._resolveLeave=u,a.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return k.apply(this,arguments)})},{key:"startScreenShare",value:(y=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ar(this._callMachineInitialized,"startScreenShare()"),u.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",u.screenVideoSendSettings),u.mediaStream&&(this._sharedTracks.screenMediaStream=u.mediaStream,u.mediaStream=Je),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var l=this.nativeUtils();if(yield l.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Cn,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});l.setSystemScreenCaptureStartCallback((function(){l.setSystemScreenCaptureStartCallback(null),a.sendMessageToCallMachine({action:so,captureOptions:u})})),l.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:so,captureOptions:u})})),function(){return y.apply(this,arguments)})},{key:"stopScreenShare",value:function(){ar(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.type;if(u&&u!=="cloud"&&u!=="raw-tracks"&&u!=="local")throw new Error("invalid type: ".concat(u,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(U({action:"local-recording-start"},a))}},{key:"updateRecording",value:function(a){var u=a.layout,l=u===void 0?{preset:"default"}:u,f=a.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:l,instanceId:f})}},{key:"stopRecording",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({action:"local-recording-stop"},a))}},{key:"startLiveStreaming",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({action:"daily-method-start-live-streaming"},a))}},{key:"updateLiveStreaming",value:function(a){var u=a.layout,l=u===void 0?{preset:"default"}:u,f=a.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:l,instanceId:f})}},{key:"addLiveStreamingEndpoints",value:function(a){var u=a.endpoints,l=a.instanceId;this.sendMessageToCallMachine({action:oo,endpointsOp:Pu,endpoints:u,instanceId:l})}},{key:"removeLiveStreamingEndpoints",value:function(a){var u=a.endpoints,l=a.instanceId;this.sendMessageToCallMachine({action:oo,endpointsOp:xu,endpoints:u,instanceId:l})}},{key:"stopLiveStreaming",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({action:"daily-method-stop-live-streaming"},a))}},{key:"validateDailyConfig",value:function(a){a.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(a.camSimulcastEncodings)),a.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Ca()&&a.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(a){if(!(a instanceof Array||Array.isArray(a)))throw new Error("encodings must be an Array");if(!No(a.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var f=0;f<a.length;f++){var v=a[f];for(var x in this._validateEncodingLayerHasValidProperties(v),v)if(Kr.includes(x)){if(typeof v[x]!="number")throw new Error("".concat(x," must be a number"));if(u){var I=u[x],D=I.min,R=I.max;if(!No(v[x],D,R))throw new Error("".concat(x," value not in range. valid range: ").concat(D," to ").concat(R))}}else if(!["active","scalabilityMode"].includes(x))throw new Error("Invalid key ".concat(x,", valid keys are:")+Object.values(Kr));if(l&&!v.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(M=B((function*(a){var u=this,l=a.url,f=a.settings,v=f===void 0?{state:En.PLAY}:f;try{(function(x){if(typeof x!="string")throw new Error('url parameter must be "string" type')})(l),Lo(v),(function(x){for(var I in x)if(!jo.includes(I))throw new Error("Invalid key ".concat(I,", valid keys are: ").concat(jo));x.simulcastEncodings&&this.validateSimulcastEncodings(x.simulcastEncodings,La,!0)})(v)}catch(x){throw console.error("invalid argument Error: ".concat(x)),console.error(`startRemoteMediaPlayer arguments must be of the form:
|
|
41
|
+
Url: ${tr(o)}`),!0)})(e,n)?null:e}});function tr(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?(function(r=[]){for(let s=r.length-1;s>=0;s--){const i=r[s];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null})(e):null}catch{return re&&J.error(`Cannot extract url for event ${Ye(t)}`),null}}function Al(t,e,r=250,s,i,n,o){if(!(n.exception&&n.exception.values&&o&<(o.originalException,Error)))return;const c=n.exception.values.length>0?n.exception.values[n.exception.values.length-1]:void 0;var d,p;c&&(n.exception.values=(d=pn(t,e,i,o.originalException,s,n.exception.values,c,0),p=r,d.map((g=>(g.value&&(g.value=bt(g.value,p)),g)))))}function pn(t,e,r,s,i,n,o,c){if(n.length>=r+1)return n;let d=[...n];if(lt(s[i],Error)){Us(o,c);const p=t(e,s[i]),g=d.length;qs(p,i,g,c),d=pn(t,e,r,s[i],i,[p,...d],p,g)}return Array.isArray(s.errors)&&s.errors.forEach(((p,g)=>{if(lt(p,Error)){Us(o,c);const S=t(e,p),C=d.length;qs(S,`errors[${g}]`,C,c),d=pn(t,e,r,p,i,[S,...d],S,C)}})),d}function Us(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function qs(t,e,r,s){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:s}}function Fr(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const r=e[6]||"",s=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:s,relative:e[5]+r+s}}function jl(){"console"in Z&&rn.forEach((function(t){t in Z.console&&we(Z.console,t,(function(e){return vr[t]=e,function(...r){Ie("console",{args:r,level:t});const s=vr[t];s&&s.apply(Z.console,r)}}))}))}function Ml(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Il=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if((function(r,s){return s?!!((function(i,n){const o=i.message,c=n.message;return!(!o&&!c||o&&!c||!o&&c||o!==c||!Bs(i,n)||!Vs(i,n))})(r,s)||(function(i,n){const o=Js(n),c=Js(i);return!(!o||!c||o.type!==c.type||o.value!==c.value||!Bs(i,n)||!Vs(i,n))})(r,s)):!1})(e,t))return re&&J.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function Vs(t,e){let r=cs(t),s=cs(e);if(!r&&!s)return!0;if(r&&!s||!r&&s||s.length!==r.length)return!1;for(let i=0;i<s.length;i++){const n=s[i],o=r[i];if(n.filename!==o.filename||n.lineno!==o.lineno||n.colno!==o.colno||n.function!==o.function)return!1}return!0}function Bs(t,e){let r=t.fingerprint,s=e.fingerprint;if(!r&&!s)return!0;if(r&&!s||!r&&s)return!1;try{return r.join("")===s.join("")}catch{return!1}}function Js(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Gs(t){return t===void 0?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const $r=Z;function hn(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ol(){if(typeof EdgeRuntime=="string")return!0;if(!(function(){if(!("fetch"in $r))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}})())return!1;if(hn($r.fetch))return!0;let t=!1;const e=$r.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=hn(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){ht&&J.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function Dl(t,e){const r="fetch";at(r,t),ct(r,(()=>(function(s,i=!1){i&&!Ol()||we(Z,"fetch",(function(n){return function(...o){const c=new Error,{method:d,url:p}=(function(S){if(S.length===0)return{method:"GET",url:""};if(S.length===2){const[E,h]=S;return{url:Hs(E),method:mn(h,"method")?String(h.method).toUpperCase():"GET"}}const C=S[0];return{url:Hs(C),method:mn(C,"method")?String(C.method).toUpperCase():"GET"}})(o),g={args:o,fetchData:{method:d,url:p},startTimestamp:1e3*Ge(),virtualError:c};return s||Ie("fetch",{...g}),n.apply(Z,o).then((async S=>(s?s(S):Ie("fetch",{...g,endTimestamp:1e3*Ge(),response:S}),S)),(S=>{throw Ie("fetch",{...g,endTimestamp:1e3*Ge(),error:S}),Ln(S)&&S.stack===void 0&&(S.stack=c.stack,ut(S,"framesToPop",1)),S}))}}))})(void 0,e)))}function mn(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Hs(t){return typeof t=="string"?t:t?mn(t,"url")?t.url:t.toString?t.toString():"":""}const rr=Z,de=Z;let fn=0;function Ws(){return fn>0}function Et(t,e={}){if(!(function(s){return typeof s=="function"})(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(Fn(t))return t}catch{return t}const r=function(...s){try{const i=s.map((n=>Et(n,e)));return t.apply(this,i)}catch(i){throw fn++,setTimeout((()=>{fn--})),(function(...n){const o=Un(Ar());if(n.length===2){const[c,d]=n;return c?o.withSetScope(c,d):o.withScope(d)}o.withScope(n[0])})((n=>{var o;n.addEventProcessor((c=>(e.mechanism&&(on(c,void 0),_t(c,e.mechanism)),c.extra={...c.extra,arguments:s},c))),o=i,mt().captureException(o,void 0)})),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}hi(r,t),ut(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch{}return r}const Or=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Bn(t,e){const r=Jn(t,e),s={type:Rl(e),value:Fl(e)};return r.length&&(s.stacktrace={frames:r}),s.type===void 0&&s.value===""&&(s.value="Unrecoverable error caught"),s}function Ll(t,e,r,s){const i=he(),n=i&&i.getOptions().normalizeDepth,o=(function(p){for(const g in p)if(Object.prototype.hasOwnProperty.call(p,g)){const S=p[g];if(S instanceof Error)return S}})(e),c={__serialized__:yi(e,n)};if(o)return{exception:{values:[Bn(t,o)]},extra:c};const d={exception:{values:[{type:jr(e)?e.constructor.name:s?"UnhandledRejection":"Error",value:$l(e,{isUnhandledRejection:s})}]},extra:c};if(r){const p=Jn(t,r);p.length&&(d.exception.values[0].stacktrace={frames:p})}return d}function Ur(t,e){return{exception:{values:[Bn(t,e)]}}}function Jn(t,e){const r=e.stacktrace||e.stack||"",s=(function(n){return n&&Nl.test(n.message)?1:0})(e),i=(function(n){return typeof n.framesToPop=="number"?n.framesToPop:0})(e);try{return t(r,s,i)}catch{}return[]}const Nl=/Minified React error #\d+;/i;function ki(t){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&t instanceof WebAssembly.Exception}function Rl(t){const e=t&&t.name;return!e&&ki(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Fl(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:ki(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function gn(t,e,r,s,i){let n;if(ui(e)&&e.error)return Ur(t,e.error);if(us(e)||Pt(e,"DOMException")){const o=e;if("stack"in e)n=Ur(t,e);else{const c=o.name||(us(o)?"DOMError":"DOMException"),d=o.message?`${c}: ${o.message}`:c;n=vn(t,d,r,s),on(n,d)}return"code"in o&&(n.tags={...n.tags,"DOMException.code":`${o.code}`}),n}return Ln(e)?Ur(t,e):kt(e)||jr(e)?(n=Ll(t,e,r,i),_t(n,{synthetic:!0}),n):(n=vn(t,e,r,s),on(n,`${e}`),_t(n,{synthetic:!0}),n)}function vn(t,e,r,s){const i={};if(s&&r){const n=Jn(t,r);n.length&&(i.exception={values:[{value:e,stacktrace:{frames:n}}]}),_t(i,{synthetic:!0})}if(Nn(e)){const{__sentry_template_string__:n,__sentry_template_values__:o}=e;return i.logentry={message:n,params:o},i}return i.message=e,i}function $l(t,{isUnhandledRejection:e}){const r=(function(i,n=40){const o=Object.keys(mi(i));o.sort();const c=o[0];if(!c)return"[object has no keys]";if(c.length>=n)return bt(c,n);for(let d=o.length;d>0;d--){const p=o.slice(0,d).join(", ");if(!(p.length>n))return d===o.length?p:bt(p,n)}return""})(t),s=e?"promise rejection":"exception";return ui(t)?`Event \`ErrorEvent\` captured as ${s} with message \`${t.message}\``:jr(t)?`Event \`${(function(i){try{const n=Object.getPrototypeOf(i);return n?n.constructor.name:void 0}catch{}})(t)}\` (type=${t.type}) captured as ${s}`:`Object captured as ${s} with keys: ${r}`}class Ul extends Sl{constructor(e){const r={parentSpanIsAlwaysRootSpan:!0,...e};(function(s,i,n=[i],o="npm"){const c=s._metadata||{};c.sdk||(c.sdk={name:`sentry.javascript.${i}`,packages:n.map((d=>({name:`${o}:@sentry/${d}`,version:it}))),version:it}),s._metadata=c})(r,"browser",["browser"],de.SENTRY_SDK_SOURCE||"npm"),super(r),r.sendClientReports&&de.document&&de.document.addEventListener("visibilitychange",(()=>{de.document.visibilityState==="hidden"&&this._flushOutcomes()}))}eventFromException(e,r){return(function(s,i,n,o){const c=gn(s,i,n&&n.syntheticException||void 0,o);return _t(c),c.level="error",n&&n.event_id&&(c.event_id=n.event_id),dt(c)})(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",s){return(function(i,n,o="info",c,d){const p=vn(i,n,c&&c.syntheticException||void 0,d);return p.level=o,c&&c.event_id&&(p.event_id=c.event_id),dt(p)})(this._options.stackParser,e,r,s,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Or&&J.warn("SDK not enabled, will not capture user feedback."));const r=(function(s,{metadata:i,tunnel:n,dsn:o}){const c={event_id:s.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!n&&!!o&&{dsn:br(o)}};return Vt(c,[(function(p){return[{type:"user_report"},p]})(s)])})(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(e,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,s)}}const ql=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ve=Z;let zs,qr,Vr,nr;function Vl(){if(!ve.document)return;const t=Ie.bind(null,"dom"),e=Ys(t,!0);ve.document.addEventListener("click",e,!1),ve.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((r=>{const s=ve[r],i=s&&s.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(we(i,"addEventListener",(function(n){return function(o,c,d){if(o==="click"||o=="keypress")try{const p=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=p[o]=p[o]||{refCount:0};if(!g.handler){const S=Ys(t);g.handler=S,n.call(this,o,S,d)}g.refCount++}catch{}return n.call(this,o,c,d)}})),we(i,"removeEventListener",(function(n){return function(o,c,d){if(o==="click"||o=="keypress")try{const p=this.__sentry_instrumentation_handlers__||{},g=p[o];g&&(g.refCount--,g.refCount<=0&&(n.call(this,o,g.handler,d),g.handler=void 0,delete p[o]),Object.keys(p).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return n.call(this,o,c,d)}})))}))}function Ys(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;const s=(function(n){try{return n.target}catch{return null}})(r);if((function(n,o){return n==="keypress"&&(!o||!o.tagName||o.tagName!=="INPUT"&&o.tagName!=="TEXTAREA"&&!o.isContentEditable)})(r.type,s))return;ut(r,"_sentryCaptured",!0),s&&!s._sentryId&&ut(s,"_sentryId",Pe());const i=r.type==="keypress"?"input":r.type;(function(n){if(n.type!==qr)return!1;try{if(!n.target||n.target._sentryId!==Vr)return!1}catch{}return!0})(r)||(t({event:r,name:i,global:e}),qr=r.type,Vr=s?s._sentryId:void 0),clearTimeout(zs),zs=ve.setTimeout((()=>{Vr=void 0,qr=void 0}),1e3)}}function _i(t){const e="history";at(e,t),ct(e,Bl)}function Bl(){if(!(function(){const r=rr.chrome,s=r&&r.app&&r.app.runtime,i="history"in rr&&!!rr.history.pushState&&!!rr.history.replaceState;return!s&&i})())return;const t=ve.onpopstate;function e(r){return function(...s){const i=s.length>2?s[2]:void 0;if(i){const n=nr,o=String(i);nr=o,Ie("history",{from:n,to:o})}return r.apply(this,s)}}ve.onpopstate=function(...r){const s=ve.location.href,i=nr;if(nr=s,Ie("history",{from:i,to:s}),t)try{return t.apply(this,r)}catch{}},we(ve.history,"pushState",e),we(ve.history,"replaceState",e)}const ur={};function Ks(t){ur[t]=void 0}const Lt="__sentry_xhr_v3__";function Jl(){if(!ve.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,r,s){const i=new Error,n=1e3*Ge(),o=Be(s[0])?s[0].toUpperCase():void 0,c=(function(p){if(Be(p))return p;try{return p.toString()}catch{}})(s[1]);if(!o||!c)return e.apply(r,s);r[Lt]={method:o,url:c,request_headers:{}},o==="POST"&&c.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const d=()=>{const p=r[Lt];if(p&&r.readyState===4){try{p.status_code=r.status}catch{}Ie("xhr",{endTimestamp:1e3*Ge(),startTimestamp:n,xhr:r,virtualError:i})}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply:(p,g,S)=>(d(),p.apply(g,S))}):r.addEventListener("readystatechange",d),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(p,g,S){const[C,E]=S,h=g[Lt];return h&&Be(C)&&Be(E)&&(h.request_headers[C.toLowerCase()]=E),p.apply(g,S)}}),e.apply(r,s)}}),t.send=new Proxy(t.send,{apply(e,r,s){const i=r[Lt];return i?(s[0]!==void 0&&(i.body=s[0]),Ie("xhr",{startTimestamp:1e3*Ge(),xhr:r}),e.apply(r,s)):e.apply(r,s)}})}function Gl(t,e=(function(r){const s=ur[r];if(s)return s;let i=ve[r];if(hn(i))return ur[r]=i.bind(ve);const n=ve.document;if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const c=o.contentWindow;c&&c[r]&&(i=c[r]),n.head.removeChild(o)}catch(o){ql&&J.warn(`Could not create sandbox iframe for ${r} check, bailing to window.${r}: `,o)}return i&&(ur[r]=i.bind(ve))})("fetch")){let r=0,s=0;return Cl(t,(function(i){const n=i.body.length;r+=n,s++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&s<15,...t.fetchOptions};if(!e)return Ks("fetch"),yr("No fetch implementation available");try{return e(t.url,o).then((c=>(r-=n,s--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}})))}catch(c){return Ks("fetch"),r-=n,s--,yr(c)}}))}function Br(t,e,r,s){const i={filename:t,function:e==="<anonymous>"?ot:e,in_app:!0};return r!==void 0&&(i.lineno=r),s!==void 0&&(i.colno=s),i}const Hl=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Wl=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zl=/\((\S*)(?::(\d+))(?::(\d+))\)/,Yl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Kl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ql=(function(...t){const e=t.sort(((r,s)=>r[0]-s[0])).map((r=>r[1]));return(r,s=0,i=0)=>{const n=[],o=r.split(`
|
|
42
|
+
`);for(let c=s;c<o.length;c++){const d=o[c];if(d.length>1024)continue;const p=os.test(d)?d.replace(os,"$1"):d;if(!p.match(/\S*Error: /)){for(const g of e){const S=g(p);if(S){n.push(S);break}}if(n.length>=50+i)break}}return(function(c){if(!c.length)return[];const d=Array.from(c);return/sentryWrapped/.test(Qt(d).function||"")&&d.pop(),d.reverse(),is.test(Qt(d).function||"")&&(d.pop(),is.test(Qt(d).function||"")&&d.pop()),d.slice(0,50).map((p=>({...p,filename:p.filename||Qt(d).filename,function:p.function||ot})))})(n.slice(i))}})([30,t=>{const e=Hl.exec(t);if(e){const[,s,i,n]=e;return Br(s,ot,+i,+n)}const r=Wl.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){const n=zl.exec(r[2]);n&&(r[2]=n[1],r[3]=n[2],r[4]=n[3])}const[s,i]=Qs(r[1]||ot,r[2]);return Br(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,t=>{const e=Yl.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=Kl.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||ot;return[s,r]=Qs(s,r),Br(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]),Qs=(t,e)=>{const r=t.indexOf("safari-extension")!==-1,s=t.indexOf("safari-web-extension")!==-1;return r||s?[t.indexOf("@")!==-1?t.split("@")[0]:ot,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Xs=1024,Xl=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(r){var s;e.console&&(function(i){const n="console";at(n,i),ct(n,jl)})((function(i){return function(n){if(he()!==i)return;const o={category:"console",data:{arguments:n.args,logger:"console"},level:Ml(n.level),message:ds(n.args," ")};if(n.level==="assert"){if(n.args[0]!==!1)return;o.message=`Assertion failed: ${ds(n.args.slice(1)," ")||"console.assert"}`,o.data.arguments=n.args.slice(1)}tt(o,{input:n.args,level:n.level})}})(r)),e.dom&&(s=(function(i,n){return function(o){if(he()!==i)return;let c,d,p=typeof n=="object"?n.serializeAttribute:void 0,g=typeof n=="object"&&typeof n.maxStringLength=="number"?n.maxStringLength:void 0;g&&g>Xs&&(Or&&J.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${g} was configured. Sentry will use 1024 instead.`),g=Xs),typeof p=="string"&&(p=[p]);try{const C=o.event,E=(function(h){return!!h&&!!h.target})(C)?C.target:C;c=pi(E,{keyAttrs:p,maxStringLength:g}),d=(function(h){if(!Rn.HTMLElement)return null;let m=h;for(let b=0;b<5;b++){if(!m)return null;if(m instanceof HTMLElement){if(m.dataset.sentryComponent)return m.dataset.sentryComponent;if(m.dataset.sentryElement)return m.dataset.sentryElement}m=m.parentNode}return null})(E)}catch{c="<unknown>"}if(c.length===0)return;const S={category:`ui.${o.name}`,message:c};d&&(S.data={"ui.component_name":d}),tt(S,{event:o.event,name:o.name,global:o.global})}})(r,e.dom),at("dom",s),ct("dom",Vl)),e.xhr&&(function(i){at("xhr",i),ct("xhr",Jl)})((function(i){return function(n){if(he()!==i)return;const{startTimestamp:o,endTimestamp:c}=n,d=n.xhr[Lt];if(!o||!c||!d)return;const{method:p,url:g,status_code:S,body:C}=d,E={method:p,url:g,status_code:S},h={xhr:n.xhr,input:C,startTimestamp:o,endTimestamp:c};tt({category:"xhr",data:E,type:"http",level:Gs(S)},h)}})(r)),e.fetch&&Dl((function(i){return function(n){if(he()!==i)return;const{startTimestamp:o,endTimestamp:c}=n;if(c&&(!n.fetchData.url.match(/sentry_key/)||n.fetchData.method!=="POST"))if(n.error)tt({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:o,endTimestamp:c});else{const d=n.response,p={...n.fetchData,status_code:d&&d.status},g={input:n.args,response:d,startTimestamp:o,endTimestamp:c};tt({category:"fetch",data:p,type:"http",level:Gs(p.status_code)},g)}}})(r)),e.history&&_i((function(i){return function(n){if(he()!==i)return;let o=n.from,c=n.to;const d=Fr(de.location.href);let p=o?Fr(o):void 0;const g=Fr(c);p&&p.path||(p=d),d.protocol===g.protocol&&d.host===g.host&&(c=g.relative),d.protocol===p.protocol&&d.host===p.host&&(o=p.relative),tt({category:"navigation",data:{from:o,to:c}})}})(r)),e.sentry&&r.on("beforeSendEvent",(function(i){return function(n){he()===i&&tt({category:"sentry."+(n.type==="transaction"?"transaction":"event"),event_id:n.event_id,level:n.level,message:Ye(n)},{event:n})}})(r))}}},Zl=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],eu=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&we(de,"setTimeout",Zs),e.setInterval&&we(de,"setInterval",Zs),e.requestAnimationFrame&&we(de,"requestAnimationFrame",tu),e.XMLHttpRequest&&"XMLHttpRequest"in de&&we(XMLHttpRequest.prototype,"send",ru);const r=e.eventTarget;r&&(Array.isArray(r)?r:Zl).forEach(nu)}}};function Zs(t){return function(...e){const r=e[0];return e[0]=Et(r,{mechanism:{data:{function:Qe(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function tu(t){return function(e){return t.apply(this,[Et(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Qe(t)},handled:!1,type:"instrument"}})])}}function ru(t){return function(...e){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((s=>{s in r&&typeof r[s]=="function"&&we(r,s,(function(i){const n={mechanism:{data:{function:s,handler:Qe(i)},handled:!1,type:"instrument"}},o=Fn(i);return o&&(n.mechanism.data.handler=Qe(o)),Et(i,n)}))})),t.apply(this,e)}}function nu(t){const e=de[t],r=e&&e.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(we(r,"addEventListener",(function(s){return function(i,n,o){try{typeof n.handleEvent=="function"&&(n.handleEvent=Et(n.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Qe(n),target:t},handled:!1,type:"instrument"}}))}catch{}return s.apply(this,[i,Et(n,{mechanism:{data:{function:"addEventListener",handler:Qe(n),target:t},handled:!1,type:"instrument"}}),o])}})),we(r,"removeEventListener",(function(s){return function(i,n,o){try{const c=n.__sentry_wrapped__;c&&s.call(this,i,c,o)}catch{}return s.call(this,i,n,o)}})))}const su=()=>({name:"BrowserSession",setupOnce(){de.document!==void 0?(As({ignoreDuration:!0}),js(),_i((({from:t,to:e})=>{t!==void 0&&t!==e&&(As({ignoreDuration:!0}),js())}))):Or&&J.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),ou=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&((function(s){(function(i){const n="error";at(n,i),ct(n,Yc)})((i=>{const{stackParser:n,attachStacktrace:o}=to();if(he()!==s||Ws())return;const{msg:c,url:d,line:p,column:g,error:S}=i,C=(function(E,h,m,b){const w=E.exception=E.exception||{},P=w.values=w.values||[],M=P[0]=P[0]||{},y=M.stacktrace=M.stacktrace||{},k=y.frames=y.frames||[],_=b,A=m,L=Be(h)&&h.length>0?h:(function(){try{return Rn.document.location.href}catch{return""}})();return k.length===0&&k.push({colno:_,filename:L,function:ot,in_app:!0,lineno:A}),E})(gn(n,S||c,void 0,o,!1),d,p,g);C.level="error",xs(C,{originalException:S,mechanism:{handled:!1,type:"onerror"}})}))})(r),eo("onerror")),e.onunhandledrejection&&((function(s){(function(i){const n="unhandledrejection";at(n,i),ct(n,Kc)})((i=>{const{stackParser:n,attachStacktrace:o}=to();if(he()!==s||Ws())return;const c=(function(p){if(nn(p))return p;try{if("reason"in p)return p.reason;if("detail"in p&&"reason"in p.detail)return p.detail.reason}catch{}return p})(i),d=nn(c)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(c)}`}]}}:gn(n,c,void 0,o,!0);d.level="error",xs(d,{originalException:c,mechanism:{handled:!1,type:"onunhandledrejection"}})}))})(r),eo("onunhandledrejection"))}}};function eo(t){Or&&J.log(`Global Handler attached: ${t}`)}function to(){const t=he();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const iu=()=>({name:"HttpContext",preprocessEvent(t){if(!de.navigator&&!de.location&&!de.document)return;const e=t.request&&t.request.url||de.location&&de.location.href,{referrer:r}=de.document||{},{userAgent:s}=de.navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...s&&{"User-Agent":s}},n={...t.request,...e&&{url:e},headers:i};t.request=n}}),au=(t={})=>{const e=t.limit||5,r=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(s,i,n){const o=n.getOptions();Al(Bn,o.stackParser,o.maxValueLength,r,e,s,i)}}};var yn="new",ro="loading",no="loaded",wr="joining-meeting",Ke="joined-meeting",ze="left-meeting",Ue="error",cu="blocked",lu="off",uu="sendable",du="loading",pu="interrupted",Ci="playable",dr="unknown",Ti="full",hu="lobby",mu="none",Ei="base",fu="*",gu="ejected",vu="nbf-room",yu="nbf-token",bu="exp-room",wu="exp-token",bn="no-room",Su="meeting-full",Pi="end-of-life",ku="not-allowed",xi="connection-error",_u="cam-in-use",Cu="mic-in-use",Tu="cam-mic-in-use",Eu="permissions",Pu="undefined-mediadevices",xu="not-found",Au="constraints",ju="unknown",Ai="iframe-ready-for-launch-config",ji="iframe-launch-config",Mi="theme-updated",Ii="loading",Oi="load-attempt-failed",wn="loaded",Di="started-camera",Li="camera-error",Ni="joining-meeting",Ri="joined-meeting",Fi="left-meeting",$i="participant-joined",Ui="participant-updated",qi="participant-left",Vi="participant-counts-updated",Bi="access-state-updated",Ji="meeting-session-summary-updated",Gi="meeting-session-state-updated",Mu="meeting-session-data-error",Hi="waiting-participant-added",Wi="waiting-participant-updated",zi="waiting-participant-removed",Yi="track-started",Ki="track-stopped",Qi="transcription-started",Xi="transcription-stopped",Zi="transcription-error",Sn="recording-started",kn="recording-stopped",ea="recording-stats",ta="recording-error",ra="recording-upload-completed",na="recording-data",sa="app-message",oa="transcription-message",ia="remote-media-player-started",aa="remote-media-player-updated",ca="remote-media-player-stopped",la="local-screen-share-started",ua="local-screen-share-stopped",da="local-screen-share-canceled",pa="active-speaker-change",ha="active-speaker-mode-change",ma="network-quality-change",fa="network-connection",ga="cpu-load-change",va="face-counts-updated",Nt="fullscreen",Rt="exited-fullscreen",ya="live-streaming-started",ba="live-streaming-updated",wa="live-streaming-stopped",Sa="live-streaming-error",ka="lang-updated",_a="receive-settings-updated",_n="input-settings-updated",Cn="nonfatal-error",Tn="error",Jr=4096,so=102400,Gr="iframe-call-message",oo="local-screen-start",io="daily-method-update-live-streaming-endpoints",sr="transmit-log",Je="daily-custom-track",pr={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},Ca={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},En={PLAY:"play",PAUSE:"pause"},Hr=["jpg","png","jpeg"],Iu="add-endpoints",Ou="remove-endpoints",ao="sip-call-transfer";function xe(){return!Y()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Y(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function Ta(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Du(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&((function(t,e){if(!t||!e)return!0;switch(t){case"Chrome":return e.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(e.major===13&&e.minor===0&&e.point===0);case"Firefox":return e.major>=67}return!0})(pt(),Sr())||Y())}function co(){if(Y()||!document)return!1;var t=document.createElement("iframe");return!!t.requestFullscreen||!!t.webkitRequestFullscreen}var Pn="none",Lu="software",Nu="hardware",Ru=(function(){try{var t,e=document.createElement("canvas"),r=!1;(t=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(r=!0,t=e.getContext("webgl2"));var s=t!=null;return e.remove(),s?r?Lu:Nu:Pn}catch{return Pn}})();function Ea(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!Y()&&Ru!==Pn&&(t?(function(){return lo()?!1:["Chrome","Firefox"].includes(pt())})():(function(){if(lo())return!1;var e=pt();if(e==="Safari"){var r=Hn();if(r.major<15||r.major===15&&r.minor<4)return!1}return e==="Chrome"?Gn().major>=77:e==="Firefox"?Wn().major>=97:["Chrome","Firefox","Safari"].includes(e)})())}function Pa(){if(Y()||xa()||typeof AudioWorkletNode>"u")return!1;switch(pt()){case"Chrome":case"Firefox":return!0;case"Safari":var t=Sr();return t.major>17||t.major===17&&t.minor>=4}return!1}function Wr(){return Ta()&&typeof MediaStreamTrack<"u"&&!(function(){var t,e=pt();if(!xe())return!0;switch(e){case"Chrome":return(t=Gn()).major&&t.major>0&&t.major<75;case"Firefox":return(t=Wn()).major<91;case"Safari":return(t=Hn()).major<13||t.major===13&&t.minor<1;default:return!0}})()}function xa(){return xe().match(/Linux; Android/)}function lo(){var t,e=xe(),r=e.match(/Mac/)&&(!Y()&&typeof window<"u"&&(t=window)!==null&&t!==void 0&&(t=t.navigator)!==null&&t!==void 0&&t.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(e.match(/Mobi/)||e.match(/Android/)||r)||!!xe().match(/DailyAnd\//)||void 0}function pt(){if(typeof window<"u"){var t=xe();return Aa()?"Safari":t.indexOf("Edge")>-1?"Edge":t.match(/Chrome\//)?"Chrome":t.indexOf("Safari")>-1||ja()?"Safari":t.indexOf("Firefox")>-1?"Firefox":t.indexOf("MSIE")>-1||t.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Sr(){switch(pt()){case"Chrome":return Gn();case"Safari":return Hn();case"Firefox":return Wn();case"Edge":return(function(){var t=0,e=0;if(typeof window<"u"){var r=xe().match(/Edge\/(\d+).(\d+)/);if(r)try{t=parseInt(r[1]),e=parseInt(r[2])}catch{}}return{major:t,minor:e}})()}}function Gn(){var t=0,e=0,r=0,s=0,i=!1;if(typeof window<"u"){var n=xe(),o=n.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(o)try{t=parseInt(o[1]),e=parseInt(o[2]),r=parseInt(o[3]),s=parseInt(o[4]),i=n.indexOf("OPR/")>-1}catch{}}return{major:t,minor:e,build:r,patch:s,opera:i}}function Aa(){return!!xe().match(/iPad|iPhone|iPod/i)&&Ta()}function ja(){return xe().indexOf("AppleWebKit/605.1.15")>-1}function Hn(){var t=0,e=0,r=0;if(typeof window<"u"){var s=xe().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(s)try{t=parseInt(s[1]),e=parseInt(s[2]),r=parseInt(s[4])}catch{}else(Aa()||ja())&&(t=14,e=0,r=3)}return{major:t,minor:e,point:r}}function Wn(){var t=0,e=0;if(typeof window<"u"){var r=xe().match(/Firefox\/(\d+).(\d+)/);if(r)try{t=parseInt(r[1]),e=parseInt(r[2])}catch{}}return{major:t,minor:e}}var Ma=(function(){return ke((function t(){Se(this,t)}),[{key:"addListenerForMessagesFromCallMachine",value:function(t,e,r){It()}},{key:"addListenerForMessagesFromDailyJs",value:function(t,e,r){It()}},{key:"sendMessageToCallMachine",value:function(t,e,r,s){It()}},{key:"sendMessageToDailyJs",value:function(t,e){It()}},{key:"removeListener",value:function(t){It()}}])})();function uo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function zr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uo(Object(r),!0).forEach((function(s){Re(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uo(Object(r)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))}))}return t}function Ia(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ia=function(){return!!t})()}var Fu=(function(){function t(){var e,r,s,i;return Se(this,t),r=this,s=Oe(s=t),(e=Er(r,Ia()?Reflect.construct(s,[],Oe(r).constructor):s.apply(r,i)))._wrappedListeners={},e._messageCallbacks={},e}return Pr(t,Ma),ke(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,r,s){var i=this,n=function(o){if(o.data&&o.data.what==="iframe-call-message"&&(!o.data.callClientId||o.data.callClientId===r)&&(!o.data.from||o.data.from!=="module")){var c=zr({},o.data);if(delete c.from,c.callbackStamp&&i._messageCallbacks[c.callbackStamp]){var d=c.callbackStamp;i._messageCallbacks[d].call(s,c),delete i._messageCallbacks[d]}delete c.what,delete c.callbackStamp,e.call(s,c)}};this._wrappedListeners[e]=n,window.addEventListener("message",n)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,r,s){var i=function(n){var o;if(!(!n.data||n.data.what!==Gr||!n.data.action||n.data.from&&n.data.from!=="module"||n.data.callClientId&&r&&n.data.callClientId!==r||n!=null&&(o=n.data)!==null&&o!==void 0&&o.callFrameId)){var c=n.data;e.call(s,c)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(e,r,s,i){if(!s)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var n=zr({},e);if(n.what=Gr,n.from="module",n.callClientId=s,r){var o=xr();this._messageCallbacks[o]=r,n.callbackStamp=o}var c=i?i.contentWindow:window,d=this._callMachineTargetOrigin(i);d&&c.postMessage(n,d)}},{key:"sendMessageToDailyJs",value:function(e,r){e.what=Gr,e.callClientId=r,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var r=this._wrappedListeners[e];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,r,s){var i=zr({},e);i.callClientId=s;var n=r?r.contentWindow:window,o=this._callMachineTargetOrigin(r);o&&n.postMessage(i,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,r){var s=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===r)&&(!i.data.from||i.data.from!=="module")){var n=i.data;e(n)}};return this._wrappedListeners[e]=s,window.addEventListener("message",s),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var r=this._wrappedListeners[e];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])})();function po(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function Oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Oa=function(){return!!t})()}var $u=(function(){function t(){var e,r,s,i;return Se(this,t),r=this,s=Oe(s=t),e=Er(r,Oa()?Reflect.construct(s,[],Oe(r).constructor):s.apply(r,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new tn.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new tn.EventEmitter,e._wrappedListeners={},e._messageCallbacks={},e}return Pr(t,Ma),ke(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,r,s){this._addListener(e,global.callMachineToDailyJsEmitter,r,s,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,r,s){this._addListener(e,global.dailyJsToCallMachineEmitter,r,s,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,r,s){this._sendMessage(e,global.dailyJsToCallMachineEmitter,s,r,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,r){this._sendMessage(e,global.callMachineToDailyJsEmitter,r,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var r=this._wrappedListeners[e];r&&(global.callMachineToDailyJsEmitter.removeListener("message",r),global.dailyJsToCallMachineEmitter.removeListener("message",r),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,r,s,i,n){var o=this,c=function(d){if(d.callClientId===s){if(d.callbackStamp&&o._messageCallbacks[d.callbackStamp]){var p=d.callbackStamp;o._messageCallbacks[p].call(i,d),delete o._messageCallbacks[p]}e.call(i,d)}};this._wrappedListeners[e]=c,r.addListener("message",c)}},{key:"_sendMessage",value:function(e,r,s,i,n){var o=(function(d){for(var p=1;p<arguments.length;p++){var g=arguments[p]!=null?arguments[p]:{};p%2?po(Object(g),!0).forEach((function(S){Re(d,S,g[S])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(g)):po(Object(g)).forEach((function(S){Object.defineProperty(d,S,Object.getOwnPropertyDescriptor(g,S))}))}return d})({},e);if(o.callClientId=s,i){var c=xr();this._messageCallbacks[c]=i,o.callbackStamp=c}r.emit("message",o)}}])})(),xn="replace",An="shallow-merge",ho=[xn,An],Uu=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.data,s=e.mergeStrategy,i=s===void 0?xn:s;Se(this,t),t._validateMergeStrategy(i),t._validateData(r,i),this.mergeStrategy=i,this.data=r}return ke(t,[{key:"isNoOp",value:function(){return t.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,r){return Object.keys(e).length===0&&r===An}},{key:"_validateMergeStrategy",value:function(e){if(!ho.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(ho,"]"))}},{key:"_validateData",value:function(e,r){if(!(function(c){if(c==null||Q(c)!=="object")return!1;var d=Object.getPrototypeOf(c);return d==null||d===Object.prototype})(e))throw Error("Meeting session data must be a plain (map-like) object");var s;try{if(s=JSON.stringify(e),r===xn){var i=JSON.parse(s);ge(i,e)||console.warn("The meeting session data provided will be modified when serialized.",i,e)}else if(r===An){for(var n in e)if(Object.hasOwnProperty.call(e,n)&&e[n]!==void 0){var o=JSON.parse(JSON.stringify(e[n]));ge(e[n],o)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",o,e[n])}}}catch(c){throw Error("Meeting session data must be serializable to JSON: ".concat(c))}if(s.length>so)throw Error("Meeting session data is too large (".concat(s.length," characters). Maximum size suppported is ").concat(so,"."))}}])})();function Da(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Da=function(){return!!t})()}function jn(t){var e=typeof Map=="function"?new Map:void 0;return jn=function(r){if(r===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,s)}function s(){return(function(i,n,o){if(Da())return Reflect.construct.apply(null,arguments);var c=[null];c.push.apply(c,n);var d=new(i.bind.apply(i,c));return o&&qt(d,o.prototype),d})(r,arguments,Oe(this).constructor)}return s.prototype=Object.create(r.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),qt(s,r)},jn(t)}function La(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(La=function(){return!!t})()}function mo(t){var e,r=(e=window._daily)===null||e===void 0?void 0:e.pendings;if(r){var s=r.indexOf(t);s!==-1&&r.splice(s,1)}}var qu=(function(){return ke((function t(e){Se(this,t),this._currentLoad=null,this._callClientId=e}),[{key:"load",value:function(){var t,e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void s(!0);t=this._callClientId,window._daily.pendings.push(t),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Vu(r,(function(){s(!1)}),(function(n,o){o||mo(e._callClientId),i(n,o)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),mo(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])})(),Vu=(function(){return ke((function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0;Se(this,t),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=e,this._successCallback=r,this._failureCallback=s}),[{key:"start",value:function(){var t=this;if(!this._currentAttempt){var e=function(r){t._currentAttempt.cancelled||(t._attemptsRemaining--,t._failureCallback(r,t._attemptsRemaining>0),t._attemptsRemaining<=0||setTimeout((function(){t._currentAttempt.cancelled||(t._currentAttempt=new fo(t._dailyConfig,t._successCallback,e),t._currentAttempt.start())}),3e3))};this._currentAttempt=new fo(this._dailyConfig,this._successCallback,e),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])})(),Yr=(function(){function t(){return Se(this,t),e=this,s=arguments,r=Oe(r=t),Er(e,La()?Reflect.construct(r,s||[],Oe(e).constructor):r.apply(e,s));var e,r,s}return Pr(t,jn(Error)),ke(t)})(),kr=2e4,fo=(function(){return ke((function e(r,s,i){Se(this,e),this._loadAttemptImpl=Y()||!r.avoidEval?new Bu(r,s,i):new Ju(r,s,i)}),[{key:"start",value:(t=B((function*(){return this._loadAttemptImpl.start()})),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var t})(),Bu=(function(){return ke((function i(n,o,c){Se(this,i),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=n,this._successCallback=o,this._failureCallback=c}),[{key:"start",value:(s=B((function*(){var i=mr(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)})),function(){return s.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=B((function*(i){if(!this._iosCache)return!1;try{var n=yield this._iosCache.get(i);return!!this.cancelled||!!n&&(n.code?(Function('"use strict";'+n.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=n.refetchHeaders,!1))}catch{return!1}})),function(i){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(e=B((function*(i){var n=this;this._networkTimeout=setTimeout((function(){n._networkTimedOut=!0,n._failureCallback({msg:"Timed out (>".concat(kr," ms) when loading call object bundle ").concat(i),type:"timeout"})}),kr);try{var o=this._refetchHeaders?{headers:this._refetchHeaders}:{},c=yield fetch(i,o);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Yr;var d=yield this._getBundleCodeFromResponse(i,c);if(this.cancelled)throw new Yr;Function('"use strict";'+d)(),this._iosCache&&this._iosCache.set(i,d,c.headers),this.succeeded=!0,this._successCallback()}catch(p){if(clearTimeout(this._networkTimeout),p instanceof Yr||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(p),type:p.message})}})),function(i){return e.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=B((function*(i,n){if(n.ok)return yield n.text();if(this._iosCache&&n.status===304)return(yield this._iosCache.renew(i,n.headers)).code;throw new Error("Received ".concat(n.status," response"))})),function(i,n){return t.apply(this,arguments)})}]);var t,e,r,s})(),Ju=(function(){return ke((function t(e,r,s){Se(this,t),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=e,this._successCallback=r,this._failureCallback=s,this._attemptId=xr(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var t=mr(this._dailyConfig);(typeof document>"u"?"undefined":Q(document))==="object"?this._startLoading(t):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(t){var e=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){e._stopLoading(),e._failureCallback({msg:"Timed out (>".concat(kr," ms) when loading call object bundle ").concat(t),type:"timeout"})}),kr);var r=document.getElementsByTagName("head")[0],s=document.createElement("script");this._scriptElement=s,s.onload=function(){e._stopLoading(),e.succeeded=!0,e._successCallback()},s.onerror=function(i){e._stopLoading(),e._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.message})},s.src=t,r.appendChild(s)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])})(),or=function(t,e,r){return Hu(t.local,e,r)===!0},Gu=function(t,e,r){return t.local.streams&&t.local.streams[e]&&t.local.streams[e].stream&&t.local.streams[e].stream["get".concat(r==="video"?"Video":"Audio","Tracks")]()[0]},yt=function(t,e,r,s){var i=Wu(t,e,r,s);return i&&i.pendingTrack},Hu=function(t,e,r){if(!t)return!1;var s=function(n){switch(n){case"avatar":return!0;case"staged":return n;default:return!!n}},i=t.public.subscribedTracks;return i&&i[e]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(r)===-1&&i[e].custom?[!0,"staged"].includes(i[e].custom)?s(i[e].custom):s(i[e].custom[r]):s(i[e][r]):!i||s(i.ALL)},Wu=function(t,e,r,s){var i=Object.values(t.streams||{}).filter((function(n){return n.participantId===e&&n.type===r&&n.pendingTrack&&n.pendingTrack.kind===s})).sort((function(n,o){return new Date(o.starttime)-new Date(n.starttime)}));return i&&i[0]},zu=function(t,e){var r=t.local.public.customTracks;if(r&&r[e])return r[e].track};function go(t,e){for(var r=e.getState(),s=0,i=["cam","screen"];s<i.length;s++)for(var n=i[s],o=0,c=["video","audio"];o<c.length;o++){var d=c[o],p=n==="cam"?d:"screen".concat(d.charAt(0).toUpperCase()+d.slice(1)),g=t.tracks[p];if(g){var S=t.local?Gu(r,n,d):yt(r,t.session_id,n,d);g.state==="playable"&&(g.track=S),g.persistentTrack=S}}}function vo(t,e){try{var r=e.getState();for(var s in t.tracks)if(!Yu(s)){var i=t.tracks[s].kind;if(i){var n=t.tracks[s];if(n){var o=t.local?zu(r,s):yt(r,t.session_id,s,i);n.state==="playable"&&(t.tracks[s].track=o),n.persistentTrack=o}}else console.error("unknown type for custom track")}}catch(c){console.error(c)}}function Yu(t){return["video","audio","screenVideo","screenAudio"].includes(t)}function yo(t,e,r){var s=r.getState();if(t.local){if(t.audio)try{t.audioTrack=s.local.streams.cam.stream.getAudioTracks()[0],t.audioTrack||(t.audio=!1)}catch{}if(t.video)try{t.videoTrack=s.local.streams.cam.stream.getVideoTracks()[0],t.videoTrack||(t.video=!1)}catch{}if(t.screen)try{t.screenVideoTrack=s.local.streams.screen.stream.getVideoTracks()[0],t.screenAudioTrack=s.local.streams.screen.stream.getAudioTracks()[0],t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch{}}else{var i=!0;try{var n=s.participants[t.session_id];n&&n.public&&n.public.rtcType&&n.public.rtcType.impl==="peer-to-peer"&&n.private&&!["connected","completed"].includes(n.private.peeringState)&&(i=!1)}catch(g){console.error(g)}if(!i)return t.audio=!1,t.audioTrack=!1,t.video=!1,t.videoTrack=!1,t.screen=!1,void(t.screenTrack=!1);try{if(s.streams,t.audio&&or(s,t.session_id,"cam-audio")){var o=yt(s,t.session_id,"cam","audio");o&&(e&&e.audioTrack&&e.audioTrack.id===o.id?t.audioTrack=o:o.muted||(t.audioTrack=o)),t.audioTrack||(t.audio=!1)}if(t.video&&or(s,t.session_id,"cam-video")){var c=yt(s,t.session_id,"cam","video");c&&(e&&e.videoTrack&&e.videoTrack.id===c.id?t.videoTrack=c:c.muted||(t.videoTrack=c)),t.videoTrack||(t.video=!1)}if(t.screen&&or(s,t.session_id,"screen-audio")){var d=yt(s,t.session_id,"screen","audio");d&&(e&&e.screenAudioTrack&&e.screenAudioTrack.id===d.id?t.screenAudioTrack=d:d.muted||(t.screenAudioTrack=d))}if(t.screen&&or(s,t.session_id,"screen-video")){var p=yt(s,t.session_id,"screen","video");p&&(e&&e.screenVideoTrack&&e.screenVideoTrack.id===p.id?t.screenVideoTrack=p:p.muted||(t.screenVideoTrack=p))}t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(g){console.error("unexpected error matching up tracks",g)}}}function Ku(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=(function(d,p){if(d){if(typeof d=="string")return bo(d,p);var g={}.toString.call(d).slice(8,-1);return g==="Object"&&d.constructor&&(g=d.constructor.name),g==="Map"||g==="Set"?Array.from(d):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?bo(d,p):void 0}})(t))||e){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return o=d.done,d},e:function(d){c=!0,n=d},f:function(){try{o||r.return==null||r.return()}finally{if(c)throw n}}}}function bo(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}var Le=new Map,wt=null;function Qu(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=(function(d,p){if(d){if(typeof d=="string")return wo(d,p);var g={}.toString.call(d).slice(8,-1);return g==="Object"&&d.constructor&&(g=d.constructor.name),g==="Map"||g==="Set"?Array.from(d):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?wo(d,p):void 0}})(t))||e){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return o=d.done,d},e:function(d){c=!0,n=d},f:function(){try{o||r.return==null||r.return()}finally{if(c)throw n}}}}function wo(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}var Ne=new Map,$t=null;function Xu(t){Na()?(function(e){Le.has(e)||(Le.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(r){Le.has(e)&&(Le.get(e).lastDevicesString=JSON.stringify(r),wt||(wt=(function(){var s=B((function*(){var i,n=yield navigator.mediaDevices.enumerateDevices(),o=Ku(Le.keys());try{for(o.s();!(i=o.n()).done;){var c=i.value,d=JSON.stringify(n);d!==Le.get(c).lastDevicesString&&(Le.get(c).lastDevicesString=d,c(n))}}catch(p){o.e(p)}finally{o.f()}}));return function(){return s.apply(this,arguments)}})(),navigator.mediaDevices.addEventListener("devicechange",wt)))})).catch((function(){})))})(t):(function(e){Ne.has(e)||(Ne.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(r){Ne.has(e)&&(Ne.get(e).lastDevicesString=JSON.stringify(r),$t||($t=setInterval(B((function*(){var s,i=yield navigator.mediaDevices.enumerateDevices(),n=Qu(Ne.keys());try{for(n.s();!(s=n.n()).done;){var o=s.value,c=JSON.stringify(i);c!==Ne.get(o).lastDevicesString&&(Ne.get(o).lastDevicesString=c,o(i))}}catch(d){n.e(d)}finally{n.f()}})),3e3)))})))})(t)}function Zu(t){Na()?(function(e){Le.has(e)&&(Le.delete(e),Le.size===0&&wt&&(navigator.mediaDevices.removeEventListener("devicechange",wt),wt=null))})(t):(function(e){Ne.has(e)&&(Ne.delete(e),Ne.size===0&&$t&&(clearInterval($t),$t=null))})(t)}function Na(){var t;return Y()||((t=navigator.mediaDevices)===null||t===void 0?void 0:t.ondevicechange)!==void 0}var ed=new Set;function td(t,e){return t&&t.readyState==="live"&&!(function(r,s){return r.muted&&!ed.has(r.id)})(t)}function So(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?So(Object(r),!0).forEach((function(s){Re(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))}))}return t}var Ft=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),rd=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Ut=Object.values(Ft),ko=["v","a","sv","sa","cv","ca"];Object.freeze(Ut.reduce((function(t,e,r){return t[e]=ko[r],t}),{})),Object.freeze(ko.reduce((function(t,e,r){return t[e]=Ut[r],t}),{}));var nd=[Ft.VIDEO,Ft.AUDIO,Ft.SCREEN_VIDEO,Ft.SCREEN_AUDIO],_o=Object.values(rd),Co=["p","s","t"];Object.freeze(_o.reduce((function(t,e,r){return t[e]=Co[r],t}),{})),Object.freeze(Co.reduce((function(t,e,r){return t[e]=_o[r],t}),{}));var Ra=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.base,s=e.byUserId,i=e.byParticipantId;Se(this,t),this.base=r,this.byUserId=s,this.byParticipantId=i}return ke(t,[{key:"clone",value:function(){var e=new t;if(this.base instanceof pe?e.base=this.base.clone():e.base=this.base,this.byUserId!==void 0)for(var r in e.byUserId={},this.byUserId){var s=this.byUserId[r];e.byUserId[r]=s instanceof pe?s.clone():s}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var n=this.byParticipantId[i];e.byParticipantId[i]=n instanceof pe?n.clone():n}return e}},{key:"toJSONObject",value:function(){var e={};if(typeof this.base=="boolean"?e.base=this.base:this.base instanceof pe&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var r in e.byUserId={},this.byUserId){var s=this.byUserId[r];e.byUserId[r]=s instanceof pe?s.toJSONObject():s}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var n=this.byParticipantId[i];e.byParticipantId[i]=n instanceof pe?n.toJSONObject():n}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(this.base!==void 0&&(typeof this.base=="boolean"?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var r in e.u={},this.byUserId){var s=this.byUserId[r];e.u[r]=typeof s=="boolean"?s:s.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in e.p={},this.byParticipantId){var n=this.byParticipantId[i];e.p[i]=typeof n=="boolean"?n:n.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof pe&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(e){var r=me(e,2),s=r[0],i=r[1];return[s,i instanceof pe?i.normalize():i]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(e){var r=me(e,2),s=r[0],i=r[1];return[s,i instanceof pe?i.normalize():i]})))),this}}],[{key:"fromJSONObject",value:function(e){var r,s,i;if(e.base!==void 0&&(r=typeof e.base=="boolean"?e.base:pe.fromJSONObject(e.base)),e.byUserId!==void 0)for(var n in s={},e.byUserId){var o=e.byUserId[n];s[n]=typeof o=="boolean"?o:pe.fromJSONObject(o)}if(e.byParticipantId!==void 0)for(var c in i={},e.byParticipantId){var d=e.byParticipantId[c];i[c]=typeof d=="boolean"?d:pe.fromJSONObject(d)}return new t({base:r,byUserId:s,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(e){var r,s,i;if(e.b!==void 0&&(r=typeof e.b=="boolean"?e.b:pe.fromMinifiedJSONObject(e.b)),e.u!==void 0)for(var n in s={},e.u){var o=e.u[n];s[n]=typeof o=="boolean"?o:pe.fromMinifiedJSONObject(o)}if(e.p!==void 0)for(var c in i={},e.p){var d=e.p[c];i[c]=typeof d=="boolean"?d:pe.fromMinifiedJSONObject(d)}return new t({base:r,byUserId:s,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if(Q(e)!=="object")return[!1,"canReceive must be an object"];for(var r=["base","byUserId","byParticipantId"],s=0,i=Object.keys(e);s<i.length;s++){var n=i[s];if(!r.includes(n))return[!1,"canReceive can only contain keys (".concat(r.join(", "),")")];if(n==="base"){var o=me(pe.validateJSONObject(e.base,!0),2),c=o[0],d=o[1];if(!c)return[!1,d]}else{if(Q(e[n])!=="object")return[!1,"invalid (non-object) value for field '".concat(n,"' in canReceive")];for(var p=0,g=Object.values(e[n]);p<g.length;p++){var S=g[p],C=me(pe.validateJSONObject(S),2),E=C[0],h=C[1];if(!E)return[!1,h]}}}return[!0]}}])})(),pe=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.video,s=e.audio,i=e.screenVideo,n=e.screenAudio,o=e.customVideo,c=e.customAudio;Se(this,t),this.video=r,this.audio=s,this.screenVideo=i,this.screenAudio=n,this.customVideo=o,this.customAudio=c}return ke(t,[{key:"clone",value:function(){var e=new t;return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=He({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=He({},this.customAudio)),e}},{key:"toJSONObject",value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=He({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=He({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=He({},this.customVideo)),this.customAudio!==void 0&&(e.ca=He({},this.customAudio)),e}},{key:"normalize",value:function(){function e(r,s){return r&&Object.keys(r).length===1&&r["*"]===s}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(e){return new t({video:e,audio:e,screenVideo:e,screenAudio:e,customVideo:{"*":e},customAudio:{"*":e}})}},{key:"fromJSONObject",value:function(e){return new t({video:e.video,audio:e.audio,screenVideo:e.screenVideo,screenAudio:e.screenAudio,customVideo:e.customVideo!==void 0?He({},e.customVideo):void 0,customAudio:e.customAudio!==void 0?He({},e.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(e){return new t({video:e.v,audio:e.a,screenVideo:e.sv,screenAudio:e.sa,customVideo:e.cv,customAudio:e.ca})}},{key:"validateJSONObject",value:function(e,r){if(typeof e=="boolean")return[!0];if(Q(e)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var s=Object.keys(e),i=0,n=s;i<n.length;i++){var o=n[i];if(!Ut.includes(o))return[!1,"invalid media type '".concat(o,"' in canReceive")];if(nd.includes(o)){if(typeof e[o]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(o,"' in canReceive")]}else{if(Q(e[o])!=="object")return[!1,"invalid (non-object) value for media type '".concat(o,"' in canReceive")];for(var c=0,d=Object.values(e[o]);c<d.length;c++)if(typeof d[c]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(o,"' in canReceive")];if(r&&e[o]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(o,"'")]}}return r&&s.length!==Ut.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Ut.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])})(),sd=["result"],od=["preserveIframe"];function To(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,s)}return r}function q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?To(Object(r),!0).forEach((function(s){Re(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):To(Object(r)).forEach((function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))}))}return t}function Fa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fa=function(){return!!t})()}function Eo(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=(function(d,p){if(d){if(typeof d=="string")return Po(d,p);var g={}.toString.call(d).slice(8,-1);return g==="Object"&&d.constructor&&(g=d.constructor.name),g==="Map"||g==="Set"?Array.from(d):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?Po(d,p):void 0}})(t))||e){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return o=d.done,d},e:function(d){c=!0,n=d},f:function(){try{o||r.return==null||r.return()}finally{if(c)throw n}}}}function Po(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}var rt={},xo="video",id="voice",Ao=Y()?{data:{}}:{data:{},topology:"none"},jo={present:0,hidden:0},$a={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Kr=Object.keys($a),Mo=["state","volume","simulcastEncodings"],Io={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},_r={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},Mn={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},nt={customIntegrations:{validate:Wa,help:Ga()},customTrayButtons:{validate:Ha,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(_r))},url:{validate:function(t){return typeof t=="string"},help:"url should be a string"},baseUrl:{validate:function(t){return typeof t=="string"},help:"baseUrl should be a string"},token:{validate:function(t){return typeof t=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(t,e){try{return e.validateDailyConfig(t),!0}catch(r){console.error("Failed to validate dailyConfig",r)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(t){return za(t,Io)},help:"reactNativeConfig should look like ".concat(JSON.stringify(Io),", all fields optional")},lang:{validate:function(t){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(t)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(t){try{return Ua(t),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(t,e){if(typeof t=="boolean")return e._preloadCache.allowLocalVideo=t,!0;var r;if(t instanceof MediaStreamTrack)e._sharedTracks.videoTrack=t,r={customTrack:Je};else{if(delete e._sharedTracks.videoTrack,typeof t!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:t}}return e._updatePreloadCacheInputSettings({video:{settings:r}},!1),!0}},audioSource:{validate:function(t,e){if(typeof t=="boolean")return e._preloadCache.allowLocalAudio=t,!0;var r;if(t instanceof MediaStreamTrack)e._sharedTracks.audioTrack=t,r={customTrack:Je};else{if(delete e._sharedTracks.audioTrack,typeof t!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:t}}return e._updatePreloadCacheInputSettings({audio:{settings:r}},!1),!0}},subscribeToTracksAutomatically:{validate:function(t,e){return e._preloadCache.subscribeToTracksAutomatically=t,!0}},theme:{validate:function(t){var e=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],r=function(s){for(var i=0,n=Object.keys(s);i<n.length;i++){var o=n[i];if(!e.includes(o))return console.error('unsupported color "'.concat(o,'". Valid colors: ').concat(e.join(", "))),!1;if(!s[o].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(o,' theme color should be provided in valid hex color format. Received: "').concat(s[o],'"')),!1}return!0};return Q(t)==="object"&&("light"in t&&"dark"in t||"colors"in t)?"light"in t&&"dark"in t?"colors"in t.light?"colors"in t.dark?r(t.light.colors)&&r(t.dark.colors):(console.error('Dark theme is missing "colors" property.',t),!1):(console.error('Light theme is missing "colors" property.',t),!1):r(t.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',t),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(t){if("grid"in t){var e=t.grid;if("maxTilesPerPage"in e){if(!Number.isInteger(e.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(e.maxTilesPerPage,".")),!1;if(e.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in e){if(!Number.isInteger(e.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(e.minTilesPerPage,".")),!1;if(e.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in e&&e.minTilesPerPage>e.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(t){return qa(t,{allowAllParticipantsKey:!1})},help:Ja({allowAllParticipantsKey:!1})},sendSettings:{validate:function(t,e){return!!(function(r,s){try{return s.validateUpdateSendSettings(r),!0}catch(i){return console.error("Failed to validate send settings",i),!1}})(t,e)&&(e._preloadCache.sendSettings=t,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(t,e){var r;return!!Va(t)&&(e._inputSettings||(e._inputSettings={}),Ba(t,(r=e.properties)===null||r===void 0?void 0:r.dailyConfig,e._sharedTracks),e._updatePreloadCacheInputSettings(t,!0),!0)},help:In()},layout:{validate:function(t){return t==="custom-v1"||t==="browser"||t==="none"},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},ir={styles:{validate:function(t){for(var e in t)if(e!=="cam"&&e!=="screen")return!1;if(t.cam){for(var r in t.cam)if(r!=="div"&&r!=="video")return!1}if(t.screen){for(var s in t.screen)if(s!=="div"&&s!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(t,e){if(e._preloadCache.subscribeToTracksAutomatically)return!1;var r=[!0,!1,"staged"];if(r.includes(t)||!Y()&&t==="avatar")return!0;var s=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(n){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var c in n)if(c==="custom"){if(!r.includes(n[c])&&!i(n[c],!0))return!1}else{var d=!o&&!s.includes(c),p=!r.includes(n[c]);if(d||p)return!1}return!0};return i(t)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Y()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(t){return t===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var s=me(r[e],2),i=s[0],n=s[1];switch(i){case"hasPresence":if(typeof n!="boolean")return!1;break;case"canSend":if(n instanceof Set||n instanceof Array||Array.isArray(n)){var o,c=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],d=Eo(n);try{for(d.s();!(o=d.n()).done;){var p=o.value;if(!c.includes(p))return!1}}catch(w){d.e(w)}finally{d.f()}}else if(typeof n!="boolean")return!1;(n instanceof Array||Array.isArray(n))&&(t.canSend=new Set(n));break;case"canReceive":var g=me(Ra.validateJSONObject(n),2),S=g[0],C=g[1];if(!S)return console.error(C),!1;break;case"canAdmin":if(n instanceof Set||n instanceof Array||Array.isArray(n)){var E,h=["participants","streaming","transcription"],m=Eo(n);try{for(m.s();!(E=m.n()).done;){var b=E.value;if(!h.includes(b))return!1}}catch(w){m.e(w)}finally{m.f()}}else if(typeof n!="boolean")return!1;(n instanceof Array||Array.isArray(n))&&(t.canAdmin=new Set(n));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=(function(){var t=B((function*(e){return new Promise((function(r,s){var i=[];e.forEach((function(n){return Promise.resolve(n).then((function(o){r(o)})).catch((function(o){i.push(o),i.length===e.length&&s(i)}))}))}))}));return function(e){return t.apply(this,arguments)}})());var ad=(function(){function t(a){var u,l,f,v,x,O,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Se(this,t),f=this,v=Oe(v=t),Re(l=Er(f,Fa()?Reflect.construct(v,[],Oe(f).constructor):v.apply(f,x)),"startListeningForDeviceChanges",(function(){Xu(l.handleDeviceChange)})),Re(l,"stopListeningForDeviceChanges",(function(){Zu(l.handleDeviceChange)})),Re(l,"handleDeviceChange",(function(H){H=H.map((function(K){return JSON.parse(JSON.stringify(K))})),l.emitDailyJSEvent({action:"available-devices-updated",availableDevices:H})})),Re(l,"handleNativeAppStateChange",(function(){var H=B((function*(K){if(K==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield l.destroy());var De=K==="active";l.disableReactNativeAutoDeviceManagement("video")||(De?l.camUnmutedBeforeLosingNativeActiveState&&l.setLocalVideo(!0):(l.camUnmutedBeforeLosingNativeActiveState=l.localVideo(),l.camUnmutedBeforeLosingNativeActiveState&&l.setLocalVideo(!1)))}));return function(K){return H.apply(this,arguments)}})()),Re(l,"handleNativeAudioFocusChange",(function(H){l.disableReactNativeAutoDeviceManagement("audio")||(l._hasNativeAudioFocus=H,l.toggleParticipantAudioBasedOnNativeAudioFocus(),l._hasNativeAudioFocus?l.micUnmutedBeforeLosingNativeAudioFocus&&l.setLocalAudio(!0):(l.micUnmutedBeforeLosingNativeAudioFocus=l.localAudio(),l.setLocalAudio(!1)))})),Re(l,"handleNativeSystemScreenCaptureStop",(function(){l.stopScreenShare()})),!Wr()&&!Y())throw new Error("WebRTC not supported or suppressed");if(l.strictMode=D.strictMode===void 0||D.strictMode,l.allowMultipleCallInstances=(u=D.allowMultipleCallInstances)!==null&&u!==void 0&&u,Object.keys(rt).length&&(l._logDuplicateInstanceAttempt(),!l.allowMultipleCallInstances)){if(l.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),l.callClientId=xr(),rt[(O=l).callClientId]=O,window._daily.instances[l.callClientId]={},l._sharedTracks={},window._daily.instances[l.callClientId].tracks=l._sharedTracks,D.dailyJsVersion=t.version(),l._iframe=a,l._callObjectMode=D.layout==="none"&&!l._iframe,l._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},D.showLocalVideo!==void 0?l._callObjectMode?console.error("showLocalVideo is not available in call object mode"):l._showLocalVideo=!!D.showLocalVideo:l._showLocalVideo=!0,D.showParticipantsBar!==void 0?l._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):l._showParticipantsBar=!!D.showParticipantsBar:l._showParticipantsBar=!0,D.customIntegrations!==void 0?l._callObjectMode?console.error("customIntegrations is not available in call object mode"):l._customIntegrations=D.customIntegrations:l._customIntegrations={},D.customTrayButtons!==void 0?l._callObjectMode?console.error("customTrayButtons is not available in call object mode"):l._customTrayButtons=D.customTrayButtons:l._customTrayButtons={},D.activeSpeakerMode!==void 0?l._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):l._activeSpeakerMode=!!D.activeSpeakerMode:l._activeSpeakerMode=!1,D.receiveSettings?l._callObjectMode?l._receiveSettings=D.receiveSettings:console.error("receiveSettings is only available in call object mode"):l._receiveSettings={},l.validateProperties(D),l.properties=q({},D),l._inputSettings||(l._inputSettings={}),l._callObjectLoader=l._callObjectMode?new qu(l.callClientId):null,l._callState=yn,l._isPreparingToJoin=!1,l._accessState={access:dr},l._meetingSessionSummary={},l._finalSummaryOfPrevSession={},l._meetingSessionState=Zr(Ao,l._callObjectMode),l._nativeInCallAudioMode=xo,l._participants={},l._isScreenSharing=!1,l._participantCounts=jo,l._rmpPlayerState={},l._waitingParticipants={},l._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},l._activeSpeaker={},l._localAudioLevel=0,l._isLocalAudioLevelObserverRunning=!1,l._remoteParticipantsAudioLevel={},l._isRemoteParticipantsAudioLevelObserverRunning=!1,l._maxAppMessageSize=Jr,l._messageChannel=Y()?new $u:new Fu,l._iframe&&(l._iframe.requestFullscreen?l._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===l._iframe?(l.emitDailyJSEvent({action:Nt}),l.sendMessageToCallMachine({action:Nt})):(l.emitDailyJSEvent({action:Rt}),l.sendMessageToCallMachine({action:Rt}))})):l._iframe.webkitRequestFullscreen&&l._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===l._iframe?(l.emitDailyJSEvent({action:Nt}),l.sendMessageToCallMachine({action:Nt})):(l.emitDailyJSEvent({action:Rt}),l.sendMessageToCallMachine({action:Rt}))}))),Y()){var R=l.nativeUtils();R.addAudioFocusChangeListener&&R.removeAudioFocusChangeListener&&R.addAppStateChangeListener&&R.removeAppStateChangeListener&&R.addSystemScreenCaptureStopListener&&R.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),l._hasNativeAudioFocus=!0,R.addAudioFocusChangeListener(l.handleNativeAudioFocusChange),R.addAppStateChangeListener(l.handleNativeAppStateChange),R.addSystemScreenCaptureStopListener(l.handleNativeSystemScreenCaptureStop)}return l._callObjectMode&&l.startListeningForDeviceChanges(),l._messageChannel.addListenerForMessagesFromCallMachine(l.handleMessageFromCallMachine,l.callClientId,l),l}return Pr(t,Kt),ke(t,[{key:"destroy",value:(Fe=B((function*(){var a;try{yield this.leave()}catch{}var u=this._iframe;if(u){var l=u.parentElement;l&&l.removeChild(u)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Y()){var f=this.nativeUtils();f.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),f.removeAppStateChangeListener(this.handleNativeAppStateChange),f.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete rt[this.callClientId],!((a=window)===null||a===void 0||(a=a._daily)===null||a===void 0)&&a.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return Fe.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(a){var u=a.bodyClass,l=a.cssFile,f=a.cssText;return z(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(l),bodyClass:u,cssText:f}),this}},{key:"iframe",value:function(){return z(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return je(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return je(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(a,u){for(var l in u){if(!ir[l])throw new Error("unrecognized updateParticipant property ".concat(l));if(ir[l].validate&&!ir[l].validate(u[l],this,this._participants[a]))throw new Error(ir[l].help)}}},{key:"updateParticipant",value:function(a,u){return this._participants.local&&this._participants.local.session_id===a&&(a="local"),a&&u&&(this.validateParticipantProperties(a,u),this.sendMessageToCallMachine({action:"update-participant",id:a,properties:u})),this}},{key:"updateParticipants",value:function(a){var u=this._participants.local&&this._participants.local.session_id;for(var l in a)l===u&&(l="local"),l&&a[l]&&this.validateParticipantProperties(l,a[l]);return this.sendMessageToCallMachine({action:"update-participants",participants:a}),this}},{key:"updateWaitingParticipant",value:(Ae=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(je(this._callObjectMode,"updateWaitingParticipant()"),te(this._callState,"updateWaitingParticipant()"),typeof u!="string"||Q(l)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(f,v){a.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:u,updates:l},(function(x){x.error&&v(x.error),x.id||v(new Error("unknown error in updateWaitingParticipant()")),f({id:x.id})}))}))})),function(){return Ae.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(le=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(je(this._callObjectMode,"updateWaitingParticipants()"),te(this._callState,"updateWaitingParticipants()"),Q(u)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(l,f){a.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:u},(function(v){v.error&&f(v.error),v.ids||f(new Error("unknown error in updateWaitingParticipants()")),l({ids:v.ids})}))}))})),function(){return le.apply(this,arguments)})},{key:"requestAccess",value:(ae=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=u.access,f=l===void 0?{level:Ti}:l,v=u.name,x=v===void 0?"":v;return je(this._callObjectMode,"requestAccess()"),te(this._callState,"requestAccess()"),new Promise((function(O,D){a.sendMessageToCallMachine({action:"daily-method-request-access",access:f,name:x},(function(R){R.error&&D(R.error),R.access||D(new Error("unknown error in requestAccess()")),O({access:R.access,granted:R.granted})}))}))})),function(){return ae.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in u&&(Y()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),u={}):a&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),u={})),this.sendMessageToCallMachine({action:"local-audio",state:a,options:u}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(a){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:a}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(a){return this.sendMessageToCallMachine({action:"local-video",state:a}),this}},{key:"_setAllowLocalAudio",value:function(a){if(this._preloadCache.allowLocalAudio=a,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:a}),this}},{key:"_setAllowLocalVideo",value:function(a){if(this._preloadCache.allowLocalVideo=a,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:a}),this}},{key:"getReceiveSettings",value:(ye=B((function*(a){var u=this,l=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,f=l!==void 0&&l;if(je(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(Q(a)){case"string":return new Promise((function(v){u.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:a,showInheritedValues:f},(function(x){v(x.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}})),function(a){return ye.apply(this,arguments)})},{key:"updateReceiveSettings",value:(X=B((function*(a){var u=this;if(je(this._callObjectMode,"updateReceiveSettings()"),!qa(a,{allowAllParticipantsKey:!0}))throw new Error(Ja({allowAllParticipantsKey:!0}));return te(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(l){u.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:a},(function(f){l({receiveSettings:f.receiveSettings})}))}))})),function(a){return X.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(a,u){if(a){var l={};if(a.audio){var f,v,x;a.audio.settings&&(!Object.keys(a.audio.settings).length&&u||(l.audio={settings:q({},a.audio.settings)})),u&&(f=l.audio)!==null&&f!==void 0&&(f=f.settings)!==null&&f!==void 0&&f.customTrack&&(l.audio.settings={customTrack:this._sharedTracks.audioTrack});var O=((v=a.audio.processor)===null||v===void 0?void 0:v.type)==="none"&&((x=a.audio.processor)===null||x===void 0?void 0:x._isDefaultWhenNone);if(a.audio.processor&&!O){var D=q({},a.audio.processor);delete D._isDefaultWhenNone,l.audio=q(q({},l.audio),{},{processor:D})}}if(a.video){var R,H,K;a.video.settings&&(!Object.keys(a.video.settings).length&&u||(l.video={settings:q({},a.video.settings)})),u&&(R=l.video)!==null&&R!==void 0&&(R=R.settings)!==null&&R!==void 0&&R.customTrack&&(l.video.settings={customTrack:this._sharedTracks.videoTrack});var De=((H=a.video.processor)===null||H===void 0?void 0:H.type)==="none"&&((K=a.video.processor)===null||K===void 0?void 0:K._isDefaultWhenNone);if(a.video.processor&&!De){var Ze=q({},a.video.processor);delete Ze._isDefaultWhenNone,l.video=q(q({},l.video),{},{processor:Ze})}}return l}}},{key:"getInputSettings",value:function(){var a=this;return z(),new Promise((function(u){u(a._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var a,u,l,f,v,x,O={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(a=((l=this._inputSettings)===null||l===void 0?void 0:l.video)||O,u=((f=this._inputSettings)===null||f===void 0?void 0:f.audio)||O):(a=((v=this._preloadCache)===null||v===void 0||(v=v.inputSettings)===null||v===void 0?void 0:v.video)||O,u=((x=this._preloadCache)===null||x===void 0||(x=x.inputSettings)===null||x===void 0?void 0:x.audio)||O);var D={audio:u,video:a};return this._prepInputSettingsForSharing(D,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(a,u){var l=this._inputSettings||{},f={};if(a.video){var v,x,O;f.video={},a.video.settings?(f.video.settings={},u||a.video.settings.customTrack||(O=l.video)===null||O===void 0||!O.settings?f.video.settings=a.video.settings:f.video.settings=q(q({},l.video.settings),a.video.settings),Object.keys(f.video.settings).length||delete f.video.settings):(v=l.video)!==null&&v!==void 0&&v.settings&&(f.video.settings=l.video.settings),a.video.processor?f.video.processor=a.video.processor:(x=l.video)!==null&&x!==void 0&&x.processor&&(f.video.processor=l.video.processor)}else l.video&&(f.video=l.video);if(a.audio){var D,R,H;f.audio={},a.audio.settings?(f.audio.settings={},u||a.audio.settings.customTrack||(H=l.audio)===null||H===void 0||!H.settings?f.audio.settings=a.audio.settings:f.audio.settings=q(q({},l.audio.settings),a.audio.settings),Object.keys(f.audio.settings).length||delete f.audio.settings):(D=l.audio)!==null&&D!==void 0&&D.settings&&(f.audio.settings=l.audio.settings),a.audio.processor?f.audio.processor=a.audio.processor:(R=l.audio)!==null&&R!==void 0&&R.processor&&(f.audio.processor=l.audio.processor)}else l.audio&&(f.audio=l.audio);this._maybeUpdateInputSettings(f)}},{key:"_devicesFromInputSettings",value:function(a){var u,l,f=(a==null||(u=a.video)===null||u===void 0||(u=u.settings)===null||u===void 0?void 0:u.deviceId)||null,v=(a==null||(l=a.audio)===null||l===void 0||(l=l.settings)===null||l===void 0?void 0:l.deviceId)||null,x=this._preloadCache.outputDeviceId||null;return{camera:f?{deviceId:f}:{},mic:v?{deviceId:v}:{},speaker:x?{deviceId:x}:{}}}},{key:"updateInputSettings",value:(V=B((function*(a){var u=this;return z(),Va(a)?a.video||a.audio?(Ba(a,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(a,!0),this._getInputSettings()):new Promise((function(l,f){u.sendMessageToCallMachine({action:"update-input-settings",inputSettings:a},(function(v){if(v.error)f(v.error);else{if(v.returnPreloadCache)return u._updatePreloadCacheInputSettings(a,!0),void l(u._getInputSettings());u._maybeUpdateInputSettings(v.inputSettings),l(u._prepInputSettingsForSharing(v.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(In()),Promise.reject(In()))})),function(a){return V.apply(this,arguments)})},{key:"setBandwidth",value:function(a){var u=a.kbs,l=a.trackConstraints;if(z(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:u,trackConstraints:l}),this}},{key:"getDailyLang",value:function(){var a=this;if(z(),this._callMachineInitialized)return new Promise((function(u){a.sendMessageToCallMachine({action:"get-daily-lang"},(function(l){delete l.action,delete l.callbackStamp,u(l)}))}))}},{key:"setDailyLang",value:function(a){return z(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:a}),this}},{key:"setProxyUrl",value:function(a){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:a}),this}},{key:"setIceConfig",value:function(a){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:a}),this}},{key:"meetingSessionSummary",value:function(){return[ze,Ue].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(ie=B((function*(){var a=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),te(this._callState,"getMeetingSession()"),new Promise((function(u){a.sendMessageToCallMachine({action:"get-meeting-session"},(function(l){delete l.action,delete l.callbackStamp,u(l)}))}))})),function(){return ie.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return te(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";je(this._callObjectMode,"setMeetingSessionData()"),te(this._callState,"setMeetingSessionData");try{(function(l,f){new Uu({data:l,mergeStrategy:f})})(a,u)}catch(l){throw console.error(l),l}try{this.sendMessageToCallMachine({action:"set-session-data",data:a,mergeStrategy:u})}catch(l){throw new Error("Error setting meeting session data: ".concat(l))}}},{key:"setUserName",value:function(a,u){var l=this;return this.properties.userName=a,new Promise((function(f){l.sendMessageToCallMachine({action:"set-user-name",name:a??"",thisMeetingOnly:Y()||!!u&&!!u.thisMeetingOnly},(function(v){delete v.action,delete v.callbackStamp,f(v)}))}))}},{key:"setUserData",value:(se=B((function*(a){var u=this;try{Ua(a)}catch(l){throw console.error(l),l}if(this.properties.userData=a,this._callMachineInitialized)return new Promise((function(l){try{u.sendMessageToCallMachine({action:"set-user-data",userData:a},(function(f){delete f.action,delete f.callbackStamp,l(f)}))}catch(f){throw new Error("Error setting user data: ".concat(f))}}))})),function(a){return se.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(a){if(a&&(a<100||typeof a!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(a){var u=this;if(typeof AudioWorkletNode>"u"&&!Y())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(a),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(l,f){u.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:a},(function(v){u._isLocalAudioLevelObserverRunning=!v.error,v.error?f({error:v.error}):l()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:a}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(a){var u=this;if(this.validateAudioLevelInterval(a),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(l,f){u.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:a},(function(v){u._isRemoteParticipantsAudioLevelObserverRunning=!v.error,v.error?f({error:v.error}):l()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:a}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(F=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(je(this._callObjectMode,"startCamera()"),Qr(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(u)}catch(l){return Promise.reject(l)}else{if(this._didPreAuth){if(u.url&&u.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(u.token&&u.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(u),this.properties=q(q({},this.properties),u)}return new Promise((function(l){a._preloadCache.inputSettings=a._prepInputSettingsForSharing(a._inputSettings,!1),a.sendMessageToCallMachine({action:"start-camera",properties:gt(a.properties,a.callClientId),preloadCache:gt(a._preloadCache,a.callClientId)},(function(f){l({camera:f.camera,mic:f.mic,speaker:f.speaker})}))}))})),function(){return F.apply(this,arguments)})},{key:"validateCustomTrack",value:function(a,u,l){if(l&&l.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(u&&u!=="music"&&u!=="speech"&&!(u instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(l&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(l))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(a instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return z(),te(this._callState,"startCustomTrack()"),this.validateCustomTrack(u.track,u.mode,u.trackName),new Promise((function(l,f){a._sharedTracks.customTrack=u.track,u.track=Je,a.sendMessageToCallMachine({action:"start-custom-track",properties:u},(function(v){v.error?f({error:v.error}):l(v.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(a){var u=this;return z(),te(this._callState,"stopCustomTrack()"),new Promise((function(l){u.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:a},(function(f){l(f.mediaTag)}))}))}},{key:"setCamera",value:function(a){var u=this;return Ot(),ar(this._callMachineInitialized,"setCamera()"),new Promise((function(l){u.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:a},(function(f){l({device:f.device})}))}))}},{key:"setAudioDevice",value:(ne=B((function*(a){return Ot(),this.nativeUtils().setAudioDevice(a),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(a){return ne.apply(this,arguments)})},{key:"cycleCamera",value:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(l){a.sendMessageToCallMachine({action:"cycle-camera",properties:u},(function(f){l({device:f.device})}))}))}},{key:"cycleMic",value:function(){var a=this;return z(),new Promise((function(u){a.sendMessageToCallMachine({action:"cycle-mic"},(function(l){u({device:l.device})}))}))}},{key:"getCameraFacingMode",value:function(){var a=this;return Ot(),new Promise((function(u){a.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(l){u(l.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(W=B((function*(a){var u=this,l=a.audioDeviceId,f=a.videoDeviceId,v=a.audioSource,x=a.videoSource;if(z(),v!==void 0&&(l=v),x!==void 0&&(f=x),typeof l=="boolean"&&(this._setAllowLocalAudio(l),l=void 0),typeof f=="boolean"&&(this._setAllowLocalVideo(f),f=void 0),!l&&!f)return yield this.getInputDevices();var O={};return l&&(l instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=l,l=Je,O.audio={settings:{customTrack:l}}):(delete this._sharedTracks.audioTrack,O.audio={settings:{deviceId:l}})),f&&(f instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=f,f=Je,O.video={settings:{customTrack:f}}):(delete this._sharedTracks.videoTrack,O.video={settings:{deviceId:f}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(O,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(D){u.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:l,videoDeviceId:f},(function(R){if(delete R.action,delete R.callbackStamp,R.returnPreloadCache)return u._updatePreloadCacheInputSettings(O,!1),void D(u._devicesFromInputSettings(u._inputSettings));D(R)}))}))})),function(a){return W.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(N=B((function*(a){var u=this,l=a.outputDeviceId;if(z(),!l||typeof l!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=l,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(f,v){u.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:l},(function(x){if(delete x.action,delete x.callbackStamp,x.error){var O=new Error(x.error.message);return O.type=x.error.type,void v(O)}x.returnPreloadCache?f(u._devicesFromInputSettings(u._inputSettings)):f(x)}))}))})),function(a){return N.apply(this,arguments)})},{key:"getInputDevices",value:($=B((function*(){var a=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(u){a.sendMessageToCallMachine({action:"get-input-devices"},(function(l){l.returnPreloadCache?u(a._devicesFromInputSettings(a._inputSettings)):u({camera:l.camera,mic:l.mic,speaker:l.speaker})}))}))})),function(){return $.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return Ot(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(a){if(Ot(),[xo,id].includes(a)){if(a!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=a,!this.disableReactNativeAutoDeviceManagement("audio")&&hr(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",a)}},{key:"preAuth",value:(L=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(je(this._callObjectMode,"preAuth()"),Qr(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(u)),!u.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(u),this.properties=q(q({},this.properties),u),new Promise((function(l,f){a._preloadCache.inputSettings=a._prepInputSettingsForSharing(a._inputSettings,!1),a.sendMessageToCallMachine({action:"daily-method-preauth",properties:gt(a.properties,a.callClientId),preloadCache:gt(a._preloadCache,a.callClientId)},(function(v){return v.error?f(v.error):v.access?(a._didPreAuth=!0,void l({access:v.access})):f(new Error("unknown error in preAuth()"))}))}))})),function(){return L.apply(this,arguments)})},{key:"load",value:(A=B((function*(a){var u=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(a&&(this.validateProperties(a),this.properties=q(q({},this.properties),a)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(ro),this.emitDailyJSEvent({action:Ii}),this._callObjectMode?new Promise((function(l,f){u._callObjectLoader.cancel();var v=Date.now();u._callObjectLoader.load(u.properties.dailyConfig,(function(x){u._bundleLoadTime=x?"no-op":Date.now()-v,u._updateCallState(no),x&&u.emitDailyJSEvent({action:wn}),l()}),(function(x,O){if(u.emitDailyJSEvent({action:Oi}),!O){u._updateCallState(Ue),u.resetMeetingDependentVars();var D={action:Tn,errorMsg:x.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:x,bundleUrl:mr(u.properties.dailyConfig)}}};u._maybeSendToSentry(D),u.emitDailyJSEvent(D),f(x.msg)}}))})):(this._iframe.src=ci(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(l,f){u._loadedCallback=function(v){u._callState!==Ue?(u._updateCallState(no),(u.properties.cssFile||u.properties.cssText)&&u.loadCss(u.properties),l()):f(v)}})))}})),function(a){return A.apply(this,arguments)})},{key:"join",value:(_=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var l=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(u)}catch(f){return this.updateIsPreparingToJoin(!1),Promise.reject(f)}}else{if(l=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(u.url&&u.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(u.token&&u.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(u.url&&!this._callObjectMode&&u.url&&u.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(u.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(u),this.properties=q(q({},this.properties),u)}return u.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!u.showLocalVideo),u.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!u.showParticipantsBar),this._callState===Ke||this._callState===wr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(wr,!1),this.emitDailyJSEvent({action:Ni}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:gt(this.properties,this.callClientId),preloadCache:gt(this._preloadCache,this.callClientId)}),new Promise((function(f,v){a._joinedCallback=function(x,O){if(a._callState!==Ue){if(a._updateCallState(Ke),x)for(var D in x){if(a._callObjectMode){var R=a._callMachine().store;go(x[D],R),vo(x[D],R),yo(x[D],a._participants[D],R)}a._participants[D]=q({},x[D]),a.toggleParticipantAudioBasedOnNativeAudioFocus()}l&&a.loadCss(a.properties),f(x)}else v(O)}})))})),function(){return _.apply(this,arguments)})},{key:"leave",value:(k=B((function*(){var a=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(u){a._callState===ze||a._callState===Ue?u():a._callObjectLoader&&!a._callObjectLoader.loaded?(a._callObjectLoader.cancel(),a._updateCallState(ze),a.resetMeetingDependentVars(),a.emitDailyJSEvent({action:ze}),u()):(a._resolveLeave=u,a.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return k.apply(this,arguments)})},{key:"startScreenShare",value:(y=B((function*(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ar(this._callMachineInitialized,"startScreenShare()"),u.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",u.screenVideoSendSettings),u.mediaStream&&(this._sharedTracks.screenMediaStream=u.mediaStream,u.mediaStream=Je),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var l=this.nativeUtils();if(yield l.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Cn,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});l.setSystemScreenCaptureStartCallback((function(){l.setSystemScreenCaptureStartCallback(null),a.sendMessageToCallMachine({action:oo,captureOptions:u})})),l.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:oo,captureOptions:u})})),function(){return y.apply(this,arguments)})},{key:"stopScreenShare",value:function(){ar(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.type;if(u&&u!=="cloud"&&u!=="raw-tracks"&&u!=="local")throw new Error("invalid type: ".concat(u,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(q({action:"local-recording-start"},a))}},{key:"updateRecording",value:function(a){var u=a.layout,l=u===void 0?{preset:"default"}:u,f=a.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:l,instanceId:f})}},{key:"stopRecording",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(q({action:"local-recording-stop"},a))}},{key:"startLiveStreaming",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(q({action:"daily-method-start-live-streaming"},a))}},{key:"updateLiveStreaming",value:function(a){var u=a.layout,l=u===void 0?{preset:"default"}:u,f=a.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:l,instanceId:f})}},{key:"addLiveStreamingEndpoints",value:function(a){var u=a.endpoints,l=a.instanceId;this.sendMessageToCallMachine({action:io,endpointsOp:Iu,endpoints:u,instanceId:l})}},{key:"removeLiveStreamingEndpoints",value:function(a){var u=a.endpoints,l=a.instanceId;this.sendMessageToCallMachine({action:io,endpointsOp:Ou,endpoints:u,instanceId:l})}},{key:"stopLiveStreaming",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(q({action:"daily-method-stop-live-streaming"},a))}},{key:"validateDailyConfig",value:function(a){a.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(a.camSimulcastEncodings)),a.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),xa()&&a.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(a){if(!(a instanceof Array||Array.isArray(a)))throw new Error("encodings must be an Array");if(!Ro(a.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var f=0;f<a.length;f++){var v=a[f];for(var x in this._validateEncodingLayerHasValidProperties(v),v)if(Kr.includes(x)){if(typeof v[x]!="number")throw new Error("".concat(x," must be a number"));if(u){var O=u[x],D=O.min,R=O.max;if(!Ro(v[x],D,R))throw new Error("".concat(x," value not in range. valid range: ").concat(D," to ").concat(R))}}else if(!["active","scalabilityMode"].includes(x))throw new Error("Invalid key ".concat(x,", valid keys are:")+Object.values(Kr));if(l&&!v.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(M=B((function*(a){var u=this,l=a.url,f=a.settings,v=f===void 0?{state:En.PLAY}:f;try{(function(x){if(typeof x!="string")throw new Error('url parameter must be "string" type')})(l),No(v),(function(x){for(var O in x)if(!Mo.includes(O))throw new Error("Invalid key ".concat(O,", valid keys are: ").concat(Mo));x.simulcastEncodings&&this.validateSimulcastEncodings(x.simulcastEncodings,$a,!0)})(v)}catch(x){throw console.error("invalid argument Error: ".concat(x)),console.error(`startRemoteMediaPlayer arguments must be of the form:
|
|
46
46
|
{ url: "playback url",
|
|
47
47
|
settings?:
|
|
48
|
-
{state: "play"|"pause", simulcastEncodings?: [{}] } }`),x}return new Promise((function(x,
|
|
48
|
+
{state: "play"|"pause", simulcastEncodings?: [{}] } }`),x}return new Promise((function(x,O){u.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:l,settings:v},(function(D){D.error?O({error:D.error,errorMsg:D.errorMsg}):x({session_id:D.session_id,remoteMediaPlayerState:{state:D.state,settings:D.settings}})}))}))})),function(a){return M.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(P=B((function*(a){var u=this;if(typeof a!="string")throw new Error(" remotePlayerID must be of type string");return new Promise((function(l,f){u.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:a},(function(v){v.error?f({error:v.error,errorMsg:v.errorMsg}):l()}))}))})),function(a){return P.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(w=B((function*(a){var u=this,l=a.session_id,f=a.settings;try{No(f)}catch(v){throw console.error("invalid argument Error: ".concat(v)),console.error(`updateRemoteMediaPlayer arguments must be of the form:
|
|
49
49
|
session_id: "participant session",
|
|
50
|
-
{ settings?: {state: "play"|"pause"} }`),v}return new Promise((function(v,x){u.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:l,settings:f},(function(I){I.error?x({error:I.error,errorMsg:I.errorMsg}):v({session_id:I.session_id,remoteMediaPlayerState:{state:I.state,settings:I.settings}})}))}))})),function(a){return w.apply(this,arguments)})},{key:"startTranscription",value:function(a){te(this._callState,"startTranscription()"),this.sendMessageToCallMachine(U({action:"daily-method-start-transcription"},a))}},{key:"updateTranscription",value:function(a){if(te(this._callState,"updateTranscription()"),!a)throw new Error("updateTranscription Error: options is mandatory");if(Q(a)!=="object")throw new Error("updateTranscription Error: options must be object type");if(a.participants&&!Array.isArray(a.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(U({action:"daily-method-update-transcription"},a))}},{key:"stopTranscription",value:function(a){if(te(this._callState,"stopTranscription()"),a&&Q(a)!=="object")throw new Error("stopTranscription Error: options must be object type");if(a&&!a.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(U({action:"daily-method-stop-transcription"},a))}},{key:"startDialOut",value:(b=B((function*(a){var u=this;te(this._callState,"startDialOut()");var l=function(I){if(I){if(!Array.isArray(I))throw new Error("Error starting dial out: audio codec must be an array");if(I.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");I.forEach((function(D){if(typeof D!="string")throw new Error("Error starting dial out: audio codec must be a string");if(D!=="OPUS"&&D!=="PCMU"&&D!=="PCMA"&&D!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!a.sipUri&&!a.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(a.sipUri&&a.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(a.sipUri){if(typeof a.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!a.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(a.video&&typeof a.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(I){if(I&&(l(I.audio),I.video)){if(!Array.isArray(I.video))throw new Error("Error starting dial out: video codec must be an array");if(I.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");I.video.forEach((function(D){if(typeof D!="string")throw new Error("Error starting dial out: video codec must be a string");if(D!=="H264"&&D!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}})(a.codecs)}if(a.phoneNumber){if(typeof a.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(a.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");a.codecs&&l(a.codecs.audio)}if(a.callerId){if(typeof a.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(a.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(a.displayName){if(typeof a.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(a.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(a.userId){if(typeof a.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(a.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(Oo(a),a.permissions&&a.permissions.canReceive){var f=me(Ia.validateJSONObject(a.permissions.canReceive),2),v=f[0],x=f[1];if(!v)throw new Error(x)}if(a.provider){if(a.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(a.provider));if(a.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");console.warn("(pre-beta) provider=daily is currently in pre-beta, things might break!")}return new Promise((function(I,D){u.sendMessageToCallMachine(U({action:"dialout-start"},a),(function(R){R.error?D(R.error):I(R)}))}))})),function(a){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(a){var u=this;return te(this._callState,"stopDialOut()"),new Promise((function(l,f){u.sendMessageToCallMachine(U({action:"dialout-stop"},a),(function(v){v.error?f(v.error):l(v)}))}))}},{key:"sipCallTransfer",value:(m=B((function*(a){var u=this;if(te(this._callState,"sipCallTransfer()"),!a)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return a.useSipRefer=!1,Do(a,"sipCallTransfer"),Oo(a),new Promise((function(l,f){u.sendMessageToCallMachine(U({action:io},a),(function(v){v.error?f(v.error):l(v)}))}))})),function(a){return m.apply(this,arguments)})},{key:"sipRefer",value:(h=B((function*(a){var u=this;if(te(this._callState,"sipRefer()"),!a)throw new Error("sessionId and toEndPoint are mandatory parameter");return a.useSipRefer=!0,Do(a,"sipRefer"),new Promise((function(l,f){u.sendMessageToCallMachine(U({action:io},a),(function(v){v.error?f(v.error):l(v)}))}))})),function(a){return h.apply(this,arguments)})},{key:"sendDTMF",value:(E=B((function*(a){var u=this;return te(this._callState,"sendDTMF()"),(function(l){var f=l.sessionId,v=l.tones;if(!f||!v)throw new Error("sessionId and tones are mandatory parameter");if(typeof f!="string"||typeof v!="string")throw new Error("sessionId and tones should be of string type");if(v.length>20)throw new Error("tones string must be upto 20 characters");var x=/[^0-9A-D*#]/g,I=v.match(x);if(I&&I[0])throw new Error("".concat(I[0]," is not valid DTMF tone"))})(a),new Promise((function(l,f){u.sendMessageToCallMachine(U({action:"send-dtmf"},a),(function(v){v.error?f(v.error):l(v)}))}))})),function(a){return E.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var a=this;return this._callState!==Ke?Promise.resolve(U({stats:{latest:{}}},this._network)):new Promise((function(u){a.sendMessageToCallMachine({action:"get-calc-stats"},(function(l){u(U(U({},a._network),{},{stats:l.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(C=B((function*(){var a=this;if(Xr(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(u){return Promise.reject(u)}return new Promise((function(u,l){a.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(f){f.error?l(f.error):u(f.results)}))}))})),function(){return C.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(a){return a?a instanceof MediaStreamTrack?!!Ku(a)||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(S=B((function*(){var a=this;z(),je(this._callObjectMode,"testCallQuality()"),ar(this._callMachineInitialized,"testCallQuality()",null,!0),Qr(this._callState,this._isPreparingToJoin,"testCallQuality()");var u=this._testCallAlreadyInProgress,l=function(v){u||(a._testCallInProgress=v)};if(l(!0),this.needsLoad())try{var f=this._callState;yield this.load(),this._callState=f}catch(v){return l(!1),Promise.reject(v)}return new Promise((function(v){a.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:a.properties.dailyJsVersion},(function(x){var I=x.results,D=I.result,R=Kn(I,Zu);if(D==="failed"){var H,K=U({},R);(H=R.error)!==null&&H!==void 0&&H.details?(R.error.details=JSON.parse(R.error.details),K.error=U(U({},K.error),{},{details:U({},K.error.details)}),K.error.details.duringTest="testCallQuality"):(K.error=K.error?U({},K.error):{},K.error.details={duringTest:"testCallQuality"}),a._maybeSendToSentry(K)}l(!1),v(U({result:D},R))}))}))})),function(){return S.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=B((function*(a){var u;Y()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),u=yield this.testPeerToPeerCallQuality(a)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),u=yield this.testCallQuality());var l={result:u.result,secondsElapsed:u.secondsElapsed};return u.data&&(l.data={maxRTT:u.data.maxRoundTripTime,packetLoss:u.data.avgRecvPacketLoss}),l})),function(a){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(p=B((function*(a){var u=this;if(Xr(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(v){return Promise.reject(v)}var l=a.videoTrack,f=a.duration;if(!this._validateVideoTrackForNetworkTests(l))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=l,new Promise((function(v,x){u.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:f},(function(I){I.error?x(I.error):v(I.results)}))}))})),function(a){return p.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){Y()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(d=B((function*(a){var u=this;if(Xr(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(l){return Promise.reject(l)}if(!this._validateVideoTrackForNetworkTests(a))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=a,new Promise((function(l,f){u.sendMessageToCallMachine({action:"test-network-connectivity"},(function(v){v.error?f(v.error):l(v.results)}))}))})),function(a){return d.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var a=this;return new Promise((function(u){a._callState===Ke?a.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(l){u(l.cpuStats)})):u({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(a){var u;if(!(((u=Object.keys(a))===null||u===void 0?void 0:u.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Kr))}},{key:"_validateVideoSendSettings",value:function(a,u){var l=a==="screenVideo"?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],f="Video send settings should be either an object or one of the supported presets: ".concat(l.join());if(typeof u=="string"){if(!l.includes(u))throw new Error(f)}else{if(Q(u)!=="object")throw new Error(f);if(!u.maxQuality&&!u.encodings&&u.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(u.maxQuality&&["low","medium","high"].indexOf(u.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(u.encodings){var v=!1;switch(Object.keys(u.encodings).length){case 1:v=!u.encodings.low;break;case 2:v=!u.encodings.low||!u.encodings.medium;break;case 3:v=!u.encodings.low||!u.encodings.medium||!u.encodings.high;break;default:v=!0}if(v)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");u.encodings.low&&this._validateEncodingLayerHasValidProperties(u.encodings.low),u.encodings.medium&&this._validateEncodingLayerHasValidProperties(u.encodings.medium),u.encodings.high&&this._validateEncodingLayerHasValidProperties(u.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(a){var u=this;if(!a||Object.keys(a).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(a).forEach((function(l){var f=me(l,2),v=f[0],x=f[1];u._validateVideoSendSettings(v,x)}))}},{key:"updateSendSettings",value:function(a){var u=this;return this.validateUpdateSendSettings(a),this.needsLoad()?(this._preloadCache.sendSettings=a,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(l,f){u.sendMessageToCallMachine({action:"update-send-settings",sendSettings:a},(function(v){v.error?f(v.error):l(v.sendSettings)}))}))}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return z(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(a){return z(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:a}),this}},{key:"activeSpeakerMode",value:function(){return z(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(a){return te(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=a,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:a}),this}},{key:"enumerateDevices",value:(c=B((function*(){var a=this;if(this._callObjectMode){var u=yield navigator.mediaDevices.enumerateDevices();return pt()==="Firefox"&&Sr().major>115&&Sr().major<123&&(u=u.filter((function(l){return l.kind!=="audiooutput"}))),{devices:u.map((function(l){var f=JSON.parse(JSON.stringify(l));if(!Y()&&l.kind==="videoinput"&&l.getCapabilities){var v,x=l.getCapabilities();f.facing=(x==null||(v=x.facingMode)===null||v===void 0?void 0:v.length)>=1?x.facingMode[0]:void 0}return f}))}}return new Promise((function(l){a.sendMessageToCallMachine({action:"enumerate-devices"},(function(f){l({devices:f.devices})}))}))})),function(){return c.apply(this,arguments)})},{key:"sendAppMessage",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(te(this._callState,"sendAppMessage()"),JSON.stringify(a).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:a,to:u}),this}},{key:"addFakeParticipant",value:function(a){return z(),te(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(U({action:"add-fake-participant"},a)),this}},{key:"setShowNamesMode",value:function(a){return be(this._callObjectMode,"setShowNamesMode()"),z(),a&&a!=="always"&&a!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:a}),this)}},{key:"setShowLocalVideo",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return be(this._callObjectMode,"setShowLocalVideo()"),z(),te(this._callState,"setShowLocalVideo()"),typeof a!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:a}),this._showLocalVideo=a,this)}},{key:"showLocalVideo",value:function(){return be(this._callObjectMode,"showLocalVideo()"),z(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return be(this._callObjectMode,"setShowParticipantsBar()"),z(),te(this._callState,"setShowParticipantsBar()"),typeof a!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:a}),this._showParticipantsBar=a,this)}},{key:"showParticipantsBar",value:function(){return be(this._callObjectMode,"showParticipantsBar()"),z(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return z(),be(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(a){return z(),be(this._callObjectMode,"setCustomIntegrations()"),te(this._callState,"setCustomIntegrations()"),Ba(a)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:a}),this._customIntegrations=a,this):this}},{key:"startCustomIntegrations",value:function(a){var u=this;if(z(),be(this._callObjectMode,"startCustomIntegrations()"),te(this._callState,"startCustomIntegrations()"),Array.isArray(a)&&a.some((function(v){return typeof v!="string"}))||!Array.isArray(a)&&typeof a!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var l=typeof a=="string"?[a]:a,f=l.filter((function(v){return!(v in u._customIntegrations)}));return f.length?(console.error(`Can't find custom integration(s): "`.concat(f.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:l}),this)}},{key:"stopCustomIntegrations",value:function(a){var u=this;if(z(),be(this._callObjectMode,"stopCustomIntegrations()"),te(this._callState,"stopCustomIntegrations()"),Array.isArray(a)&&a.some((function(v){return typeof v!="string"}))||!Array.isArray(a)&&typeof a!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var l=typeof a=="string"?[a]:a,f=l.filter((function(v){return!(v in u._customIntegrations)}));return f.length?(console.error(`Can't find custom integration(s): "`.concat(f.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:l}),this)}},{key:"customTrayButtons",value:function(){return be(this._callObjectMode,"customTrayButtons()"),z(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(a){return be(this._callObjectMode,"updateCustomTrayButtons()"),z(),te(this._callState,"updateCustomTrayButtons()"),Va(a)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:a}),this._customTrayButtons=a,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(_r))),this)}},{key:"theme",value:function(){return be(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(a){var u=this;return be(this._callObjectMode,"setTheme()"),new Promise((function(l,f){try{u.validateProperties({theme:a}),u.properties.theme=U({},a),u.sendMessageToCallMachine({action:"set-theme",theme:u.properties.theme});try{u.emitDailyJSEvent({action:Pi,theme:u.properties.theme})}catch(v){console.log("could not emit 'theme-updated'",v)}l(u.properties.theme)}catch(v){f(v)}}))}},{key:"requestFullscreen",value:(o=B((function*(){if(z(),this._iframe&&!document.fullscreenElement&&ao())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(a){console.log("could not make video call fullscreen",a)}})),function(){return o.apply(this,arguments)})},{key:"exitFullscreen",value:function(){z(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(n=B((function*(){var a=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(u){a.sendMessageToCallMachine({action:"get-sidebar-view"},(function(l){u(l.view)}))}))})),function(){return n.apply(this,arguments)})},{key:"setSidebarView",value:function(a){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:a}),this)}},{key:"room",value:(i=B((function*(){var a=this,u=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,l=u===void 0||u;return this._accessState.access===dr||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(f){a.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:l},(function(v){delete v.action,delete v.callbackStamp,f(v)}))}))})),function(){return i.apply(this,arguments)})},{key:"geo",value:(s=B((function*(){try{var a=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield a.json()).geo}}catch(u){return console.error("geo lookup failed",u),{current:""}}})),function(){return s.apply(this,arguments)})},{key:"setNetworkTopology",value:(r=B((function*(a){var u=this;return z(),te(this._callState,"setNetworkTopology()"),new Promise((function(l,f){u.sendMessageToCallMachine({action:"set-network-topology",opts:a},(function(v){v.error?f({error:v.error}):l({workerId:v.workerId})}))}))})),function(a){return r.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=B((function*(){var a=this;return new Promise((function(u,l){a.needsLoad()&&u({topology:"none"}),a.sendMessageToCallMachine({action:"get-network-topology"},(function(f){f.error?l({error:f.error}):u({topology:f.topology})}))}))})),function(){return e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(a){if(z(),typeof a!="number"&&a!==!0&&a!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(a));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:a})}},{key:"on",value:function(a,u){return Kt.prototype.on.call(this,a,u)}},{key:"once",value:function(a,u){return Kt.prototype.once.call(this,a,u)}},{key:"off",value:function(a,u){return Kt.prototype.off.call(this,a,u)}},{key:"validateProperties",value:function(a){var u,l;if(a!=null&&(u=a.dailyConfig)!==null&&u!==void 0&&u.userMediaAudioConstraints){var f,v;Y()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var x=a.inputSettings||{};x.audio=((f=a.inputSettings)===null||f===void 0?void 0:f.audio)||{},x.audio.settings=((v=a.inputSettings)===null||v===void 0||(v=v.audio)===null||v===void 0?void 0:v.settings)||{},x.audio.settings=U(U({},x.audio.settings),a.dailyConfig.userMediaAudioConstraints),a.inputSettings=x,delete a.dailyConfig.userMediaAudioConstraints}if(a!=null&&(l=a.dailyConfig)!==null&&l!==void 0&&l.userMediaVideoConstraints){var I,D;Y()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var R=a.inputSettings||{};R.video=((I=a.inputSettings)===null||I===void 0?void 0:I.video)||{},R.video.settings=((D=a.inputSettings)===null||D===void 0||(D=D.video)===null||D===void 0?void 0:D.settings)||{},R.video.settings=U(U({},R.video.settings),a.dailyConfig.userMediaVideoConstraints),a.inputSettings=R,delete a.dailyConfig.userMediaVideoConstraints}for(var H in a)if(nt[H]){if(nt[H].validate&&!nt[H].validate(a[H],this))throw new Error("property '".concat(H,"': ").concat(nt[H].help))}else console.warn("Ignoring unrecognized property '".concat(H,"'")),delete a[H]}},{key:"assembleMeetingUrl",value:function(){var a,u,l=U(U({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(a=this.properties.dailyConfig)!==null&&a!==void 0&&a.proxyUrl?encodeURIComponent((u=this.properties.dailyConfig)===null||u===void 0?void 0:u.proxyUrl):void 0}),f=l.url.match(/\?/)?"&":"?";return l.url+f+Object.keys(nt).filter((function(v){return nt[v].queryString&&l[v]!==void 0})).map((function(v){return"".concat(nt[v].queryString,"=").concat(l[v])})).join("&")}},{key:"needsLoad",value:function(){return[yn,to,ze,Ue].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(a,u){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(a,u,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(a){this._messageChannel.forwardPackagedMessageToCallMachine(a,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(a){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(a,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(a){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(a)}},{key:"handleMessageFromCallMachine",value:function(a){switch(a.action){case Ti:this.sendMessageToCallMachine(U({action:Ei},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var u={action:sr,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:mr(this.properties.dailyConfig)}};this.sendMessageToCallMachine(u),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case wn:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(a);break;case Ii:var l,f=U({},a);delete f.internal,this._maxAppMessageSize=((l=a.internal)===null||l===void 0?void 0:l._maxAppMessageSize)||Jr,this._joinedCallback&&(this._joinedCallback(a.participants),this._joinedCallback=null),this.emitDailyJSEvent(f);break;case Li:case Ni:if(this._callState===ze)return;if(a.participant&&a.participant.session_id){var v=a.participant.local?"local":a.participant.session_id;if(this._callObjectMode){var x=this._callMachine().store;fo(a.participant,x),go(a.participant,x),vo(a.participant,this._participants[v],x)}try{this.maybeParticipantTracksStopped(this._participants[v],a.participant),this.maybeParticipantTracksStarted(this._participants[v],a.participant),this.maybeEventRecordingStopped(this._participants[v],a.participant),this.maybeEventRecordingStarted(this._participants[v],a.participant)}catch(Ha){console.error("track events error",Ha)}this.compareEqualForParticipantUpdateEvent(a.participant,this._participants[v])||(this._participants[v]=U({},a.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(a))}break;case Ri:if(a.participant&&a.participant.session_id){var I=this._participants[a.participant.session_id];I&&this.maybeParticipantTracksStopped(I,null),delete this._participants[a.participant.session_id],this.emitDailyJSEvent(a)}break;case Fi:ge(this._participantCounts,a.participantCounts)||(this._participantCounts=a.participantCounts,this.emitDailyJSEvent(a));break;case $i:var D={access:a.access};a.awaitingAccess&&(D.awaitingAccess=a.awaitingAccess),ge(this._accessState,D)||(this._accessState=D,this.emitDailyJSEvent(a));break;case Ui:if(a.meetingSession){this._meetingSessionSummary=a.meetingSession,this.emitDailyJSEvent(a);var R=U(U({},a),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(R)}break;case Tn:var H;this._iframe&&!a.preserveIframe&&(this._iframe.src=""),this._updateCallState(Ue),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(a.errorMsg),this._loadedCallback=null),a.preserveIframe;var K=Kn(a,ed);K!=null&&(H=K.error)!==null&&H!==void 0&&H.details&&(K.error.details=JSON.parse(K.error.details)),this._maybeSendToSentry(a),this._joinedCallback&&(this._joinedCallback(null,K),this._joinedCallback=null),this.emitDailyJSEvent(K);break;case Di:this._callState!==Ue&&this._updateCallState(ze),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(a);break;case"selected-devices-updated":a.devices&&this.emitDailyJSEvent(a);break;case ua:var De=a.state,Ze=a.threshold,xt=a.quality,ue=De.state,_e=De.reasons;ue===this._network.networkState&&ge(_e,this._network.networkStateReasons)&&Ze===this._network.threshold&&xt===this._network.quality||(this._network.networkState=ue,this._network.networkStateReasons=_e,this._network.quality=xt,this._network.threshold=Ze,a.networkState=ue,_e.length&&(a.networkStateReasons=_e),delete a.state,this.emitDailyJSEvent(a));break;case pa:a&&a.cpuLoadState&&this.emitDailyJSEvent(a);break;case ha:a&&a.faceCounts!==void 0&&this.emitDailyJSEvent(a);break;case ca:var et=a.activeSpeaker;this._activeSpeaker.peerId!==et.peerId&&(this._activeSpeaker.peerId=et.peerId,this.emitDailyJSEvent({action:a.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var At=a.show;this._showLocalVideo=At,this.emitDailyJSEvent({action:a.action,show:At});break;case la:var Wt=a.enabled;this._activeSpeakerMode!==Wt&&(this._activeSpeakerMode=Wt,this.emitDailyJSEvent({action:a.action,enabled:this._activeSpeakerMode}));break;case Vi:case Bi:case Ji:this._waitingParticipants=a.allWaitingParticipants,this.emitDailyJSEvent({action:a.action,participant:a.participant});break;case ba:ge(this._receiveSettings,a.receiveSettings)||(this._receiveSettings=a.receiveSettings,this.emitDailyJSEvent({action:a.action,receiveSettings:a.receiveSettings}));break;case _n:this._maybeUpdateInputSettings(a.inputSettings);break;case"send-settings-updated":ge(this._sendSettings,a.sendSettings)||(this._sendSettings=a.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:a.action,sendSettings:a.sendSettings}));break;case"local-audio-level":this._localAudioLevel=a.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(a);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=a.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(a);break;case ra:var jt=a.session_id;this._rmpPlayerState[jt]=a.playerState,this.emitDailyJSEvent(a);break;case sa:delete this._rmpPlayerState[a.session_id],this.emitDailyJSEvent(a);break;case na:var Mt=a.session_id,zn=this._rmpPlayerState[Mt];zn&&this.compareEqualForRMPUpdateEvent(zn,a.remoteMediaPlayerState)||(this._rmpPlayerState[Mt]=a.remoteMediaPlayerState,this.emitDailyJSEvent(a));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(a);break;case qi:var Ga=this._meetingSessionState.topology!==(a.meetingSessionState&&a.meetingSessionState.topology);this._meetingSessionState=Zr(a.meetingSessionState,this._callObjectMode),(this._callObjectMode||Ga)&&this.emitDailyJSEvent(a);break;case oa:this._isScreenSharing=!0,this.emitDailyJSEvent(a);break;case ia:case aa:this._isScreenSharing=!1,this.emitDailyJSEvent(a);break;case Sn:case kn:case Ki:case Qi:case Xi:case Wi:case zi:case Yi:case ji:case Mi:case ea:case ta:case"test-completed":case da:case Zi:case ma:case fa:case ga:case va:case Cn:case ya:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(a);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(a,u){var l="record";a&&(u.local||u[l]!==!1||a[l]===u[l]||this.emitDailyJSEvent({action:kn}))}},{key:"maybeEventRecordingStarted",value:function(a,u){var l="record";a&&(u.local||u[l]!==!0||a[l]===u[l]||this.emitDailyJSEvent({action:Sn}))}},{key:"_trackStatePlayable",value:function(a){return!(!a||a.state!==wi)}},{key:"_trackChanged",value:function(a,u){return(a==null?void 0:a.id)!==(u==null?void 0:u.id)}},{key:"maybeEventTrackStopped",value:function(a,u,l){var f,v,x=(f=u==null?void 0:u.tracks[a])!==null&&f!==void 0?f:null,I=(v=l==null?void 0:l.tracks[a])!==null&&v!==void 0?v:null,D=x==null?void 0:x.track;if(D){var R=this._trackStatePlayable(x),H=this._trackStatePlayable(I),K=this._trackChanged(D,I==null?void 0:I.track);R&&(H&&!K||this.emitDailyJSEvent({action:Hi,track:D,participant:l??u,type:a}))}}},{key:"maybeEventTrackStarted",value:function(a,u,l){var f,v,x=(f=u==null?void 0:u.tracks[a])!==null&&f!==void 0?f:null,I=(v=l==null?void 0:l.tracks[a])!==null&&v!==void 0?v:null,D=I==null?void 0:I.track;if(D){var R=this._trackStatePlayable(x),H=this._trackStatePlayable(I),K=this._trackChanged(x==null?void 0:x.track,D);H&&(R&&!K||this.emitDailyJSEvent({action:Gi,track:D,participant:l,type:a}))}}},{key:"maybeParticipantTracksStopped",value:function(a,u){if(a)for(var l in a.tracks)this.maybeEventTrackStopped(l,a,u)}},{key:"maybeParticipantTracksStarted",value:function(a,u){if(u)for(var l in u.tracks)this.maybeEventTrackStarted(l,a,u)}},{key:"compareEqualForRMPUpdateEvent",value:function(a,u){var l,f;return a.state===u.state&&((l=a.settings)===null||l===void 0?void 0:l.volume)===((f=u.settings)===null||f===void 0?void 0:f.volume)}},{key:"emitDailyJSEvent",value:function(a){try{a.callClientId=this.callClientId,this.emit(a.action,a)}catch(u){console.log("could not emit",a,u)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(a,u){return!!ge(a,u)&&(!a.videoTrack||!u.videoTrack||a.videoTrack.id===u.videoTrack.id&&a.videoTrack.muted===u.videoTrack.muted&&a.videoTrack.enabled===u.videoTrack.enabled)&&(!a.audioTrack||!u.audioTrack||a.audioTrack.id===u.audioTrack.id&&a.audioTrack.muted===u.audioTrack.muted&&a.audioTrack.enabled===u.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return Y()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(a){this._updateCallState(this._callState,a)}},{key:"_updateCallState",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(a!==this._callState||u!==this._isPreparingToJoin){var l=this._callState,f=this._isPreparingToJoin;this._callState=a,this._isPreparingToJoin=u;var v=this._callState===Ke;this.updateShowAndroidOngoingMeetingNotification(v);var x=hr(l,f),I=hr(this._callState,this._isPreparingToJoin);x!==I&&(this.updateKeepDeviceAwake(I),this.updateDeviceAudioMode(I),this.updateNoOpRecordingEnsuringBackgroundContinuity(I))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Ao,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:dr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Zr(xo,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Jr,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(a){Y()&&this.nativeUtils().setKeepDeviceAwake(a,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(a){if(Y()&&!this.disableReactNativeAutoDeviceManagement("audio")){var u=a?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(u)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(a){if(Y()&&this.nativeUtils().setShowOngoingMeetingNotification){var u,l,f,v;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var x=this.properties.reactNativeConfig.androidInCallNotification;u=x.title,l=x.subtitle,f=x.iconName,v=x.disableForCustomOverride}v&&(a=!1),this.nativeUtils().setShowOngoingMeetingNotification(a,u,l,f,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(a){Y()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(a)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var a;if(Y()){var u=(a=this._callMachine())===null||a===void 0||(a=a.store)===null||a===void 0?void 0:a.getState();for(var l in u==null?void 0:u.streams){var f=u.streams[l];f&&f.pendingTrack&&f.pendingTrack.kind==="audio"&&(f.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(a){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[a]}},{key:"absoluteUrl",value:function(a){if(a!==void 0){var u=document.createElement("a");return u.href=a,u.href}}},{key:"sayHello",value:function(){var a="hello, world.";return console.log(a),a}},{key:"_logUseAfterDestroy",value:function(){var a=Object.values(rt)[0];if(this.needsLoad())if(a&&!a.needsLoad()){var u={action:sr,level:"error",code:this.strictMode?9995:9997};a.sendMessageToCallMachine(u)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var l={action:sr,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(l,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var a=0,u=Object.values(rt);a<u.length;a++){var l=u[a];l._callMachineInitialized?(l.sendMessageToCallMachine({action:sr,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),l._delayDuplicateInstanceLog=!1):l._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(a){var u,l,f,v;if(!((u=a.error)!==null&&u!==void 0&&u.type&&(![Ci,_i,bn].includes(a.error.type)||a.error.type===bn&&a.error.msg.includes("deleted")))){var x=(l=this.properties)!==null&&l!==void 0&&l.url?new URL(this.properties.url):void 0,I="production";x&&x.host.includes(".staging.daily")&&(I="staging");var D,R,H,K,De,Ze=(function(jt){const Mt=[_l(),Sl(),Yl(),Wl(),eu(),ru(),Pl(),tu()];return jt.autoSessionTracking!==!1&&Mt.push(Zl()),Mt})({}).filter((function(jt){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(jt.name)})),xt=new Ll({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:Ul,stackParser:Hl,integrations:Ze,environment:I}),ue=new Xe;if(ue.setClient(xt),xt.init(),this.session_id&&ue.setExtra("sessionId",this.session_id),this.properties){var _e=U({},this.properties);_e.userName=_e.userName?"[Filtered]":void 0,_e.userData=_e.userData?"[Filtered]":void 0,_e.token=_e.token?"[Filtered]":void 0,ue.setExtra("properties",_e)}if(x){var et=x.searchParams.get("domain");if(!et){var At=x.host.match(/(.*?)\./);et=At&&At[1]||""}et&&ue.setTag("domain",et)}a.error&&(ue.setTag("fatalErrorType",a.error.type),ue.setExtra("errorDetails",a.error.details),!((D=a.error.details)===null||D===void 0)&&D.uri&&ue.setTag("serverAddress",a.error.details.uri),!((R=a.error.details)===null||R===void 0)&&R.workerGroup&&ue.setTag("workerGroup",a.error.details.workerGroup),!((H=a.error.details)===null||H===void 0)&&H.geoGroup&&ue.setTag("geoGroup",a.error.details.geoGroup),!((K=a.error.details)===null||K===void 0)&&K.on&&ue.setTag("connectionAttempt",a.error.details.on),(De=a.error.details)!==null&&De!==void 0&&De.bundleUrl&&(ue.setTag("bundleUrl",a.error.details.bundleUrl),ue.setTag("bundleError",a.error.details.sourceError.type))),ue.setTags({callMode:this._callObjectMode?Y()?"reactNative":(f=this.properties)!==null&&f!==void 0&&(f=f.dailyConfig)!==null&&f!==void 0&&(f=f.callMode)!==null&&f!==void 0&&f.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:t.version()});var Wt=((v=a.error)===null||v===void 0?void 0:v.msg)||a.errorMsg;ue.captureException(new Error(Wt))}}},{key:"_callMachine",value:function(){var a;return(a=window._daily)===null||a===void 0||(a=a.instances)===null||a===void 0||(a=a[this.callClientId])===null||a===void 0?void 0:a.callMachine}},{key:"_maybeUpdateInputSettings",value:function(a){if(!ge(this._inputSettings,a)){var u=this._getInputSettings();this._inputSettings=a;var l=this._getInputSettings();ge(u,l)||this.emitDailyJSEvent({action:_n,inputSettings:l})}}}],[{key:"supportedBrowser",value:function(){if(Y())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var a=Bc.getParser(xe());return{supported:!!Wr(),mobile:a.getPlatformType()==="mobile",name:a.getBrowserName(),version:a.getBrowserVersion(),supportsFullscreen:!!ao(),supportsScreenShare:!!Au(),supportsSfu:!!Wr(),supportsVideoProcessing:ka(),supportsAudioProcessing:_a()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return a.layout="none",new t(null,a)}},{key:"wrap",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z(),!a||!a.contentWindow||typeof a.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return u.layout||(u.customLayout?u.layout="custom-v1":u.layout="browser"),new t(a,u)}},{key:"createFrame",value:function(a,u){var l,f;z(),a&&u?(l=a,f=u):a&&a.append?(l=a,f={}):(l=document.body,f=a||{});var v=f.iframeStyle;v||(v=l===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var x=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?x.allow="microphone, camera":x.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",x.style.visibility="hidden",l.appendChild(x),x.style.visibility=null,Object.keys(v).forEach((function(I){return x.style[I]=v[I]})),f.layout||(f.customLayout?f.layout="custom-v1":f.layout="browser");try{return new t(x,f)}catch(I){throw l.removeChild(x),I}}},{key:"createTransparentFrame",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};z();var u=document.createElement("iframe");return u.allow="microphone; camera; autoplay",u.style.cssText=`
|
|
50
|
+
{ settings?: {state: "play"|"pause"} }`),v}return new Promise((function(v,x){u.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:l,settings:f},(function(O){O.error?x({error:O.error,errorMsg:O.errorMsg}):v({session_id:O.session_id,remoteMediaPlayerState:{state:O.state,settings:O.settings}})}))}))})),function(a){return w.apply(this,arguments)})},{key:"startTranscription",value:function(a){te(this._callState,"startTranscription()"),this.sendMessageToCallMachine(q({action:"daily-method-start-transcription"},a))}},{key:"updateTranscription",value:function(a){if(te(this._callState,"updateTranscription()"),!a)throw new Error("updateTranscription Error: options is mandatory");if(Q(a)!=="object")throw new Error("updateTranscription Error: options must be object type");if(a.participants&&!Array.isArray(a.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(q({action:"daily-method-update-transcription"},a))}},{key:"stopTranscription",value:function(a){if(te(this._callState,"stopTranscription()"),a&&Q(a)!=="object")throw new Error("stopTranscription Error: options must be object type");if(a&&!a.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(q({action:"daily-method-stop-transcription"},a))}},{key:"startDialOut",value:(b=B((function*(a){var u=this;te(this._callState,"startDialOut()");var l=function(O){if(O){if(!Array.isArray(O))throw new Error("Error starting dial out: audio codec must be an array");if(O.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");O.forEach((function(D){if(typeof D!="string")throw new Error("Error starting dial out: audio codec must be a string");if(D!=="OPUS"&&D!=="PCMU"&&D!=="PCMA"&&D!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!a.sipUri&&!a.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(a.sipUri&&a.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(a.sipUri){if(typeof a.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!a.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(a.video&&typeof a.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(O){if(O&&(l(O.audio),O.video)){if(!Array.isArray(O.video))throw new Error("Error starting dial out: video codec must be an array");if(O.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");O.video.forEach((function(D){if(typeof D!="string")throw new Error("Error starting dial out: video codec must be a string");if(D!=="H264"&&D!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}})(a.codecs)}if(a.phoneNumber){if(typeof a.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(a.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");a.codecs&&l(a.codecs.audio)}if(a.callerId){if(typeof a.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(a.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(a.displayName){if(typeof a.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(a.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(a.userId){if(typeof a.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(a.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(Oo(a),a.permissions&&a.permissions.canReceive){var f=me(Ra.validateJSONObject(a.permissions.canReceive),2),v=f[0],x=f[1];if(!v)throw new Error(x)}if(a.provider){if(a.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(a.provider));if(a.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");console.warn("(pre-beta) provider=daily is currently in pre-beta, things might break!")}return new Promise((function(O,D){u.sendMessageToCallMachine(q({action:"dialout-start"},a),(function(R){R.error?D(R.error):O(R)}))}))})),function(a){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(a){var u=this;return te(this._callState,"stopDialOut()"),new Promise((function(l,f){u.sendMessageToCallMachine(q({action:"dialout-stop"},a),(function(v){v.error?f(v.error):l(v)}))}))}},{key:"sipCallTransfer",value:(m=B((function*(a){var u=this;if(te(this._callState,"sipCallTransfer()"),!a)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return a.useSipRefer=!1,Lo(a,"sipCallTransfer"),Oo(a),new Promise((function(l,f){u.sendMessageToCallMachine(q({action:ao},a),(function(v){v.error?f(v.error):l(v)}))}))})),function(a){return m.apply(this,arguments)})},{key:"sipRefer",value:(h=B((function*(a){var u=this;if(te(this._callState,"sipRefer()"),!a)throw new Error("sessionId and toEndPoint are mandatory parameter");return a.useSipRefer=!0,Lo(a,"sipRefer"),new Promise((function(l,f){u.sendMessageToCallMachine(q({action:ao},a),(function(v){v.error?f(v.error):l(v)}))}))})),function(a){return h.apply(this,arguments)})},{key:"sendDTMF",value:(E=B((function*(a){var u=this;return te(this._callState,"sendDTMF()"),(function(l){var f=l.sessionId,v=l.tones;if(!f||!v)throw new Error("sessionId and tones are mandatory parameter");if(typeof f!="string"||typeof v!="string")throw new Error("sessionId and tones should be of string type");if(v.length>20)throw new Error("tones string must be upto 20 characters");var x=/[^0-9A-D*#]/g,O=v.match(x);if(O&&O[0])throw new Error("".concat(O[0]," is not valid DTMF tone"))})(a),new Promise((function(l,f){u.sendMessageToCallMachine(q({action:"send-dtmf"},a),(function(v){v.error?f(v.error):l(v)}))}))})),function(a){return E.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var a=this;return this._callState!==Ke?Promise.resolve(q({stats:{latest:{}}},this._network)):new Promise((function(u){a.sendMessageToCallMachine({action:"get-calc-stats"},(function(l){u(q(q({},a._network),{},{stats:l.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(C=B((function*(){var a=this;if(Xr(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(u){return Promise.reject(u)}return new Promise((function(u,l){a.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(f){f.error?l(f.error):u(f.results)}))}))})),function(){return C.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(a){return a?a instanceof MediaStreamTrack?!!td(a)||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(S=B((function*(){var a=this;z(),je(this._callObjectMode,"testCallQuality()"),ar(this._callMachineInitialized,"testCallQuality()",null,!0),Qr(this._callState,this._isPreparingToJoin,"testCallQuality()");var u=this._testCallAlreadyInProgress,l=function(v){u||(a._testCallInProgress=v)};if(l(!0),this.needsLoad())try{var f=this._callState;yield this.load(),this._callState=f}catch(v){return l(!1),Promise.reject(v)}return new Promise((function(v){a.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:a.properties.dailyJsVersion},(function(x){var O=x.results,D=O.result,R=Qn(O,sd);if(D==="failed"){var H,K=q({},R);(H=R.error)!==null&&H!==void 0&&H.details?(R.error.details=JSON.parse(R.error.details),K.error=q(q({},K.error),{},{details:q({},K.error.details)}),K.error.details.duringTest="testCallQuality"):(K.error=K.error?q({},K.error):{},K.error.details={duringTest:"testCallQuality"}),a._maybeSendToSentry(K)}l(!1),v(q({result:D},R))}))}))})),function(){return S.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=B((function*(a){var u;Y()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),u=yield this.testPeerToPeerCallQuality(a)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),u=yield this.testCallQuality());var l={result:u.result,secondsElapsed:u.secondsElapsed};return u.data&&(l.data={maxRTT:u.data.maxRoundTripTime,packetLoss:u.data.avgRecvPacketLoss}),l})),function(a){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(p=B((function*(a){var u=this;if(Xr(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(v){return Promise.reject(v)}var l=a.videoTrack,f=a.duration;if(!this._validateVideoTrackForNetworkTests(l))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=l,new Promise((function(v,x){u.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:f},(function(O){O.error?x(O.error):v(O.results)}))}))})),function(a){return p.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){Y()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(d=B((function*(a){var u=this;if(Xr(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(l){return Promise.reject(l)}if(!this._validateVideoTrackForNetworkTests(a))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=a,new Promise((function(l,f){u.sendMessageToCallMachine({action:"test-network-connectivity"},(function(v){v.error?f(v.error):l(v.results)}))}))})),function(a){return d.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var a=this;return new Promise((function(u){a._callState===Ke?a.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(l){u(l.cpuStats)})):u({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(a){var u;if(!(((u=Object.keys(a))===null||u===void 0?void 0:u.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Kr))}},{key:"_validateVideoSendSettings",value:function(a,u){var l=a==="screenVideo"?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],f="Video send settings should be either an object or one of the supported presets: ".concat(l.join());if(typeof u=="string"){if(!l.includes(u))throw new Error(f)}else{if(Q(u)!=="object")throw new Error(f);if(!u.maxQuality&&!u.encodings&&u.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(u.maxQuality&&["low","medium","high"].indexOf(u.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(u.encodings){var v=!1;switch(Object.keys(u.encodings).length){case 1:v=!u.encodings.low;break;case 2:v=!u.encodings.low||!u.encodings.medium;break;case 3:v=!u.encodings.low||!u.encodings.medium||!u.encodings.high;break;default:v=!0}if(v)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");u.encodings.low&&this._validateEncodingLayerHasValidProperties(u.encodings.low),u.encodings.medium&&this._validateEncodingLayerHasValidProperties(u.encodings.medium),u.encodings.high&&this._validateEncodingLayerHasValidProperties(u.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(a){var u=this;if(!a||Object.keys(a).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(a).forEach((function(l){var f=me(l,2),v=f[0],x=f[1];u._validateVideoSendSettings(v,x)}))}},{key:"updateSendSettings",value:function(a){var u=this;return this.validateUpdateSendSettings(a),this.needsLoad()?(this._preloadCache.sendSettings=a,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(l,f){u.sendMessageToCallMachine({action:"update-send-settings",sendSettings:a},(function(v){v.error?f(v.error):l(v.sendSettings)}))}))}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return z(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(a){return z(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:a}),this}},{key:"activeSpeakerMode",value:function(){return z(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(a){return te(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=a,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:a}),this}},{key:"enumerateDevices",value:(c=B((function*(){var a=this;if(this._callObjectMode){var u=yield navigator.mediaDevices.enumerateDevices();return pt()==="Firefox"&&Sr().major>115&&Sr().major<123&&(u=u.filter((function(l){return l.kind!=="audiooutput"}))),{devices:u.map((function(l){var f=JSON.parse(JSON.stringify(l));if(!Y()&&l.kind==="videoinput"&&l.getCapabilities){var v,x=l.getCapabilities();f.facing=(x==null||(v=x.facingMode)===null||v===void 0?void 0:v.length)>=1?x.facingMode[0]:void 0}return f}))}}return new Promise((function(l){a.sendMessageToCallMachine({action:"enumerate-devices"},(function(f){l({devices:f.devices})}))}))})),function(){return c.apply(this,arguments)})},{key:"sendAppMessage",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(te(this._callState,"sendAppMessage()"),JSON.stringify(a).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:a,to:u}),this}},{key:"addFakeParticipant",value:function(a){return z(),te(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(q({action:"add-fake-participant"},a)),this}},{key:"setShowNamesMode",value:function(a){return be(this._callObjectMode,"setShowNamesMode()"),z(),a&&a!=="always"&&a!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:a}),this)}},{key:"setShowLocalVideo",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return be(this._callObjectMode,"setShowLocalVideo()"),z(),te(this._callState,"setShowLocalVideo()"),typeof a!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:a}),this._showLocalVideo=a,this)}},{key:"showLocalVideo",value:function(){return be(this._callObjectMode,"showLocalVideo()"),z(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return be(this._callObjectMode,"setShowParticipantsBar()"),z(),te(this._callState,"setShowParticipantsBar()"),typeof a!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:a}),this._showParticipantsBar=a,this)}},{key:"showParticipantsBar",value:function(){return be(this._callObjectMode,"showParticipantsBar()"),z(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return z(),be(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(a){return z(),be(this._callObjectMode,"setCustomIntegrations()"),te(this._callState,"setCustomIntegrations()"),Wa(a)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:a}),this._customIntegrations=a,this):this}},{key:"startCustomIntegrations",value:function(a){var u=this;if(z(),be(this._callObjectMode,"startCustomIntegrations()"),te(this._callState,"startCustomIntegrations()"),Array.isArray(a)&&a.some((function(v){return typeof v!="string"}))||!Array.isArray(a)&&typeof a!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var l=typeof a=="string"?[a]:a,f=l.filter((function(v){return!(v in u._customIntegrations)}));return f.length?(console.error(`Can't find custom integration(s): "`.concat(f.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:l}),this)}},{key:"stopCustomIntegrations",value:function(a){var u=this;if(z(),be(this._callObjectMode,"stopCustomIntegrations()"),te(this._callState,"stopCustomIntegrations()"),Array.isArray(a)&&a.some((function(v){return typeof v!="string"}))||!Array.isArray(a)&&typeof a!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var l=typeof a=="string"?[a]:a,f=l.filter((function(v){return!(v in u._customIntegrations)}));return f.length?(console.error(`Can't find custom integration(s): "`.concat(f.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:l}),this)}},{key:"customTrayButtons",value:function(){return be(this._callObjectMode,"customTrayButtons()"),z(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(a){return be(this._callObjectMode,"updateCustomTrayButtons()"),z(),te(this._callState,"updateCustomTrayButtons()"),Ha(a)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:a}),this._customTrayButtons=a,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(_r))),this)}},{key:"theme",value:function(){return be(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(a){var u=this;return be(this._callObjectMode,"setTheme()"),new Promise((function(l,f){try{u.validateProperties({theme:a}),u.properties.theme=q({},a),u.sendMessageToCallMachine({action:"set-theme",theme:u.properties.theme});try{u.emitDailyJSEvent({action:Mi,theme:u.properties.theme})}catch(v){console.log("could not emit 'theme-updated'",v)}l(u.properties.theme)}catch(v){f(v)}}))}},{key:"requestFullscreen",value:(o=B((function*(){if(z(),this._iframe&&!document.fullscreenElement&&co())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(a){console.log("could not make video call fullscreen",a)}})),function(){return o.apply(this,arguments)})},{key:"exitFullscreen",value:function(){z(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(n=B((function*(){var a=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(u){a.sendMessageToCallMachine({action:"get-sidebar-view"},(function(l){u(l.view)}))}))})),function(){return n.apply(this,arguments)})},{key:"setSidebarView",value:function(a){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:a}),this)}},{key:"room",value:(i=B((function*(){var a=this,u=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,l=u===void 0||u;return this._accessState.access===dr||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(f){a.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:l},(function(v){delete v.action,delete v.callbackStamp,f(v)}))}))})),function(){return i.apply(this,arguments)})},{key:"geo",value:(s=B((function*(){try{var a=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield a.json()).geo}}catch(u){return console.error("geo lookup failed",u),{current:""}}})),function(){return s.apply(this,arguments)})},{key:"setNetworkTopology",value:(r=B((function*(a){var u=this;return z(),te(this._callState,"setNetworkTopology()"),new Promise((function(l,f){u.sendMessageToCallMachine({action:"set-network-topology",opts:a},(function(v){v.error?f({error:v.error}):l({workerId:v.workerId})}))}))})),function(a){return r.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=B((function*(){var a=this;return new Promise((function(u,l){a.needsLoad()&&u({topology:"none"}),a.sendMessageToCallMachine({action:"get-network-topology"},(function(f){f.error?l({error:f.error}):u({topology:f.topology})}))}))})),function(){return e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(a){if(z(),typeof a!="number"&&a!==!0&&a!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(a));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:a})}},{key:"on",value:function(a,u){return Kt.prototype.on.call(this,a,u)}},{key:"once",value:function(a,u){return Kt.prototype.once.call(this,a,u)}},{key:"off",value:function(a,u){return Kt.prototype.off.call(this,a,u)}},{key:"validateProperties",value:function(a){var u,l;if(a!=null&&(u=a.dailyConfig)!==null&&u!==void 0&&u.userMediaAudioConstraints){var f,v;Y()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var x=a.inputSettings||{};x.audio=((f=a.inputSettings)===null||f===void 0?void 0:f.audio)||{},x.audio.settings=((v=a.inputSettings)===null||v===void 0||(v=v.audio)===null||v===void 0?void 0:v.settings)||{},x.audio.settings=q(q({},x.audio.settings),a.dailyConfig.userMediaAudioConstraints),a.inputSettings=x,delete a.dailyConfig.userMediaAudioConstraints}if(a!=null&&(l=a.dailyConfig)!==null&&l!==void 0&&l.userMediaVideoConstraints){var O,D;Y()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var R=a.inputSettings||{};R.video=((O=a.inputSettings)===null||O===void 0?void 0:O.video)||{},R.video.settings=((D=a.inputSettings)===null||D===void 0||(D=D.video)===null||D===void 0?void 0:D.settings)||{},R.video.settings=q(q({},R.video.settings),a.dailyConfig.userMediaVideoConstraints),a.inputSettings=R,delete a.dailyConfig.userMediaVideoConstraints}for(var H in a)if(nt[H]){if(nt[H].validate&&!nt[H].validate(a[H],this))throw new Error("property '".concat(H,"': ").concat(nt[H].help))}else console.warn("Ignoring unrecognized property '".concat(H,"'")),delete a[H]}},{key:"assembleMeetingUrl",value:function(){var a,u,l=q(q({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(a=this.properties.dailyConfig)!==null&&a!==void 0&&a.proxyUrl?encodeURIComponent((u=this.properties.dailyConfig)===null||u===void 0?void 0:u.proxyUrl):void 0}),f=l.url.match(/\?/)?"&":"?";return l.url+f+Object.keys(nt).filter((function(v){return nt[v].queryString&&l[v]!==void 0})).map((function(v){return"".concat(nt[v].queryString,"=").concat(l[v])})).join("&")}},{key:"needsLoad",value:function(){return[yn,ro,ze,Ue].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(a,u){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(a,u,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(a){this._messageChannel.forwardPackagedMessageToCallMachine(a,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(a){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(a,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(a){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(a)}},{key:"handleMessageFromCallMachine",value:function(a){switch(a.action){case Ai:this.sendMessageToCallMachine(q({action:ji},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var u={action:sr,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:mr(this.properties.dailyConfig)}};this.sendMessageToCallMachine(u),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case wn:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(a);break;case Ri:var l,f=q({},a);delete f.internal,this._maxAppMessageSize=((l=a.internal)===null||l===void 0?void 0:l._maxAppMessageSize)||Jr,this._joinedCallback&&(this._joinedCallback(a.participants),this._joinedCallback=null),this.emitDailyJSEvent(f);break;case $i:case Ui:if(this._callState===ze)return;if(a.participant&&a.participant.session_id){var v=a.participant.local?"local":a.participant.session_id;if(this._callObjectMode){var x=this._callMachine().store;go(a.participant,x),vo(a.participant,x),yo(a.participant,this._participants[v],x)}try{this.maybeParticipantTracksStopped(this._participants[v],a.participant),this.maybeParticipantTracksStarted(this._participants[v],a.participant),this.maybeEventRecordingStopped(this._participants[v],a.participant),this.maybeEventRecordingStarted(this._participants[v],a.participant)}catch(Ka){console.error("track events error",Ka)}this.compareEqualForParticipantUpdateEvent(a.participant,this._participants[v])||(this._participants[v]=q({},a.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(a))}break;case qi:if(a.participant&&a.participant.session_id){var O=this._participants[a.participant.session_id];O&&this.maybeParticipantTracksStopped(O,null),delete this._participants[a.participant.session_id],this.emitDailyJSEvent(a)}break;case Vi:ge(this._participantCounts,a.participantCounts)||(this._participantCounts=a.participantCounts,this.emitDailyJSEvent(a));break;case Bi:var D={access:a.access};a.awaitingAccess&&(D.awaitingAccess=a.awaitingAccess),ge(this._accessState,D)||(this._accessState=D,this.emitDailyJSEvent(a));break;case Ji:if(a.meetingSession){this._meetingSessionSummary=a.meetingSession,this.emitDailyJSEvent(a);var R=q(q({},a),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(R)}break;case Tn:var H;this._iframe&&!a.preserveIframe&&(this._iframe.src=""),this._updateCallState(Ue),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(a.errorMsg),this._loadedCallback=null),a.preserveIframe;var K=Qn(a,od);K!=null&&(H=K.error)!==null&&H!==void 0&&H.details&&(K.error.details=JSON.parse(K.error.details)),this._maybeSendToSentry(a),this._joinedCallback&&(this._joinedCallback(null,K),this._joinedCallback=null),this.emitDailyJSEvent(K);break;case Fi:this._callState!==Ue&&this._updateCallState(ze),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(a);break;case"selected-devices-updated":a.devices&&this.emitDailyJSEvent(a);break;case ma:var De=a.state,Ze=a.threshold,xt=a.quality,ue=De.state,_e=De.reasons;ue===this._network.networkState&&ge(_e,this._network.networkStateReasons)&&Ze===this._network.threshold&&xt===this._network.quality||(this._network.networkState=ue,this._network.networkStateReasons=_e,this._network.quality=xt,this._network.threshold=Ze,a.networkState=ue,_e.length&&(a.networkStateReasons=_e),delete a.state,this.emitDailyJSEvent(a));break;case ga:a&&a.cpuLoadState&&this.emitDailyJSEvent(a);break;case va:a&&a.faceCounts!==void 0&&this.emitDailyJSEvent(a);break;case pa:var et=a.activeSpeaker;this._activeSpeaker.peerId!==et.peerId&&(this._activeSpeaker.peerId=et.peerId,this.emitDailyJSEvent({action:a.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var At=a.show;this._showLocalVideo=At,this.emitDailyJSEvent({action:a.action,show:At});break;case ha:var Wt=a.enabled;this._activeSpeakerMode!==Wt&&(this._activeSpeakerMode=Wt,this.emitDailyJSEvent({action:a.action,enabled:this._activeSpeakerMode}));break;case Hi:case Wi:case zi:this._waitingParticipants=a.allWaitingParticipants,this.emitDailyJSEvent({action:a.action,participant:a.participant});break;case _a:ge(this._receiveSettings,a.receiveSettings)||(this._receiveSettings=a.receiveSettings,this.emitDailyJSEvent({action:a.action,receiveSettings:a.receiveSettings}));break;case _n:this._maybeUpdateInputSettings(a.inputSettings);break;case"send-settings-updated":ge(this._sendSettings,a.sendSettings)||(this._sendSettings=a.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:a.action,sendSettings:a.sendSettings}));break;case"local-audio-level":this._localAudioLevel=a.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(a);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=a.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(a);break;case ia:var jt=a.session_id;this._rmpPlayerState[jt]=a.playerState,this.emitDailyJSEvent(a);break;case ca:delete this._rmpPlayerState[a.session_id],this.emitDailyJSEvent(a);break;case aa:var Mt=a.session_id,zn=this._rmpPlayerState[Mt];zn&&this.compareEqualForRMPUpdateEvent(zn,a.remoteMediaPlayerState)||(this._rmpPlayerState[Mt]=a.remoteMediaPlayerState,this.emitDailyJSEvent(a));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(a);break;case Gi:var Ya=this._meetingSessionState.topology!==(a.meetingSessionState&&a.meetingSessionState.topology);this._meetingSessionState=Zr(a.meetingSessionState,this._callObjectMode),(this._callObjectMode||Ya)&&this.emitDailyJSEvent(a);break;case la:this._isScreenSharing=!0,this.emitDailyJSEvent(a);break;case ua:case da:this._isScreenSharing=!1,this.emitDailyJSEvent(a);break;case Sn:case kn:case ea:case ta:case ra:case Qi:case Xi:case Zi:case Di:case Li:case sa:case oa:case"test-completed":case fa:case na:case ya:case ba:case wa:case Sa:case Cn:case ka:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(a);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(a,u){var l="record";a&&(u.local||u[l]!==!1||a[l]===u[l]||this.emitDailyJSEvent({action:kn}))}},{key:"maybeEventRecordingStarted",value:function(a,u){var l="record";a&&(u.local||u[l]!==!0||a[l]===u[l]||this.emitDailyJSEvent({action:Sn}))}},{key:"_trackStatePlayable",value:function(a){return!(!a||a.state!==Ci)}},{key:"_trackChanged",value:function(a,u){return(a==null?void 0:a.id)!==(u==null?void 0:u.id)}},{key:"maybeEventTrackStopped",value:function(a,u,l){var f,v,x=(f=u==null?void 0:u.tracks[a])!==null&&f!==void 0?f:null,O=(v=l==null?void 0:l.tracks[a])!==null&&v!==void 0?v:null,D=x==null?void 0:x.track;if(D){var R=this._trackStatePlayable(x),H=this._trackStatePlayable(O),K=this._trackChanged(D,O==null?void 0:O.track);R&&(H&&!K||this.emitDailyJSEvent({action:Ki,track:D,participant:l??u,type:a}))}}},{key:"maybeEventTrackStarted",value:function(a,u,l){var f,v,x=(f=u==null?void 0:u.tracks[a])!==null&&f!==void 0?f:null,O=(v=l==null?void 0:l.tracks[a])!==null&&v!==void 0?v:null,D=O==null?void 0:O.track;if(D){var R=this._trackStatePlayable(x),H=this._trackStatePlayable(O),K=this._trackChanged(x==null?void 0:x.track,D);H&&(R&&!K||this.emitDailyJSEvent({action:Yi,track:D,participant:l,type:a}))}}},{key:"maybeParticipantTracksStopped",value:function(a,u){if(a)for(var l in a.tracks)this.maybeEventTrackStopped(l,a,u)}},{key:"maybeParticipantTracksStarted",value:function(a,u){if(u)for(var l in u.tracks)this.maybeEventTrackStarted(l,a,u)}},{key:"compareEqualForRMPUpdateEvent",value:function(a,u){var l,f;return a.state===u.state&&((l=a.settings)===null||l===void 0?void 0:l.volume)===((f=u.settings)===null||f===void 0?void 0:f.volume)}},{key:"emitDailyJSEvent",value:function(a){try{a.callClientId=this.callClientId,this.emit(a.action,a)}catch(u){console.log("could not emit",a,u)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(a,u){return!!ge(a,u)&&(!a.videoTrack||!u.videoTrack||a.videoTrack.id===u.videoTrack.id&&a.videoTrack.muted===u.videoTrack.muted&&a.videoTrack.enabled===u.videoTrack.enabled)&&(!a.audioTrack||!u.audioTrack||a.audioTrack.id===u.audioTrack.id&&a.audioTrack.muted===u.audioTrack.muted&&a.audioTrack.enabled===u.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return Y()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(a){this._updateCallState(this._callState,a)}},{key:"_updateCallState",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(a!==this._callState||u!==this._isPreparingToJoin){var l=this._callState,f=this._isPreparingToJoin;this._callState=a,this._isPreparingToJoin=u;var v=this._callState===Ke;this.updateShowAndroidOngoingMeetingNotification(v);var x=hr(l,f),O=hr(this._callState,this._isPreparingToJoin);x!==O&&(this.updateKeepDeviceAwake(O),this.updateDeviceAudioMode(O),this.updateNoOpRecordingEnsuringBackgroundContinuity(O))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=jo,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:dr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Zr(Ao,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Jr,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(a){Y()&&this.nativeUtils().setKeepDeviceAwake(a,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(a){if(Y()&&!this.disableReactNativeAutoDeviceManagement("audio")){var u=a?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(u)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(a){if(Y()&&this.nativeUtils().setShowOngoingMeetingNotification){var u,l,f,v;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var x=this.properties.reactNativeConfig.androidInCallNotification;u=x.title,l=x.subtitle,f=x.iconName,v=x.disableForCustomOverride}v&&(a=!1),this.nativeUtils().setShowOngoingMeetingNotification(a,u,l,f,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(a){Y()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(a)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var a;if(Y()){var u=(a=this._callMachine())===null||a===void 0||(a=a.store)===null||a===void 0?void 0:a.getState();for(var l in u==null?void 0:u.streams){var f=u.streams[l];f&&f.pendingTrack&&f.pendingTrack.kind==="audio"&&(f.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(a){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[a]}},{key:"absoluteUrl",value:function(a){if(a!==void 0){var u=document.createElement("a");return u.href=a,u.href}}},{key:"sayHello",value:function(){var a="hello, world.";return console.log(a),a}},{key:"_logUseAfterDestroy",value:function(){var a=Object.values(rt)[0];if(this.needsLoad())if(a&&!a.needsLoad()){var u={action:sr,level:"error",code:this.strictMode?9995:9997};a.sendMessageToCallMachine(u)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var l={action:sr,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(l,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var a=0,u=Object.values(rt);a<u.length;a++){var l=u[a];l._callMachineInitialized?(l.sendMessageToCallMachine({action:sr,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),l._delayDuplicateInstanceLog=!1):l._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(a){var u,l,f,v;if(!((u=a.error)!==null&&u!==void 0&&u.type&&(![xi,Pi,bn].includes(a.error.type)||a.error.type===bn&&a.error.msg.includes("deleted")))){var x=(l=this.properties)!==null&&l!==void 0&&l.url?new URL(this.properties.url):void 0,O="production";x&&x.host.includes(".staging.daily")&&(O="staging");var D,R,H,K,De,Ze=(function(jt){const Mt=[xl(),El(),eu(),Xl(),ou(),au(),Il(),iu()];return jt.autoSessionTracking!==!1&&Mt.push(su()),Mt})({}).filter((function(jt){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(jt.name)})),xt=new Ul({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:Gl,stackParser:Ql,integrations:Ze,environment:O}),ue=new Xe;if(ue.setClient(xt),xt.init(),this.session_id&&ue.setExtra("sessionId",this.session_id),this.properties){var _e=q({},this.properties);_e.userName=_e.userName?"[Filtered]":void 0,_e.userData=_e.userData?"[Filtered]":void 0,_e.token=_e.token?"[Filtered]":void 0,ue.setExtra("properties",_e)}if(x){var et=x.searchParams.get("domain");if(!et){var At=x.host.match(/(.*?)\./);et=At&&At[1]||""}et&&ue.setTag("domain",et)}a.error&&(ue.setTag("fatalErrorType",a.error.type),ue.setExtra("errorDetails",a.error.details),!((D=a.error.details)===null||D===void 0)&&D.uri&&ue.setTag("serverAddress",a.error.details.uri),!((R=a.error.details)===null||R===void 0)&&R.workerGroup&&ue.setTag("workerGroup",a.error.details.workerGroup),!((H=a.error.details)===null||H===void 0)&&H.geoGroup&&ue.setTag("geoGroup",a.error.details.geoGroup),!((K=a.error.details)===null||K===void 0)&&K.on&&ue.setTag("connectionAttempt",a.error.details.on),(De=a.error.details)!==null&&De!==void 0&&De.bundleUrl&&(ue.setTag("bundleUrl",a.error.details.bundleUrl),ue.setTag("bundleError",a.error.details.sourceError.type))),ue.setTags({callMode:this._callObjectMode?Y()?"reactNative":(f=this.properties)!==null&&f!==void 0&&(f=f.dailyConfig)!==null&&f!==void 0&&(f=f.callMode)!==null&&f!==void 0&&f.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:t.version()});var Wt=((v=a.error)===null||v===void 0?void 0:v.msg)||a.errorMsg;ue.captureException(new Error(Wt))}}},{key:"_callMachine",value:function(){var a;return(a=window._daily)===null||a===void 0||(a=a.instances)===null||a===void 0||(a=a[this.callClientId])===null||a===void 0?void 0:a.callMachine}},{key:"_maybeUpdateInputSettings",value:function(a){if(!ge(this._inputSettings,a)){var u=this._getInputSettings();this._inputSettings=a;var l=this._getInputSettings();ge(u,l)||this.emitDailyJSEvent({action:_n,inputSettings:l})}}}],[{key:"supportedBrowser",value:function(){if(Y())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var a=zc.getParser(xe());return{supported:!!Wr(),mobile:a.getPlatformType()==="mobile",name:a.getBrowserName(),version:a.getBrowserVersion(),supportsFullscreen:!!co(),supportsScreenShare:!!Du(),supportsSfu:!!Wr(),supportsVideoProcessing:Ea(),supportsAudioProcessing:Pa()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return a.layout="none",new t(null,a)}},{key:"wrap",value:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z(),!a||!a.contentWindow||typeof a.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return u.layout||(u.customLayout?u.layout="custom-v1":u.layout="browser"),new t(a,u)}},{key:"createFrame",value:function(a,u){var l,f;z(),a&&u?(l=a,f=u):a&&a.append?(l=a,f={}):(l=document.body,f=a||{});var v=f.iframeStyle;v||(v=l===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var x=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?x.allow="microphone, camera":x.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",x.style.visibility="hidden",l.appendChild(x),x.style.visibility=null,Object.keys(v).forEach((function(O){return x.style[O]=v[O]})),f.layout||(f.customLayout?f.layout="custom-v1":f.layout="browser");try{return new t(x,f)}catch(O){throw l.removeChild(x),O}}},{key:"createTransparentFrame",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};z();var u=document.createElement("iframe");return u.allow="microphone; camera; autoplay",u.style.cssText=`
|
|
51
51
|
position: fixed;
|
|
52
52
|
top: 0;
|
|
53
53
|
left: 0;
|
|
@@ -55,14 +55,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
55
55
|
height: 100%;
|
|
56
56
|
border: 0;
|
|
57
57
|
pointer-events: none;
|
|
58
|
-
`,document.body.appendChild(u),a.layout||(a.layout="custom-v1"),t.wrap(u,a)}},{key:"getCallInstance",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return a?rt[a]:Object.values(rt)[0]}}]);var e,r,s,i,n,o,c,d,p,g,S,C,E,h,m,b,w,P,M,y,k,_,A,L,$,N,W,ne,F,se,ie,q,X,ye,ae,le,Ae,Fe})();function Oo(t){if(t.extension){if(typeof t.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(t.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(t.waitBeforeExtensionDialSec){if(typeof t.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(t.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!t.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function gt(t,e){var r={};for(var s in t)if(t[s]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",s),r[s]=Je;else if(s==="dailyConfig"){if(t[s].modifyLocalSdpHook){var i=window._daily.instances[e].customCallbacks||{};i.modifyLocalSdpHook=t[s].modifyLocalSdpHook,window._daily.instances[e].customCallbacks=i,delete t[s].modifyLocalSdpHook}if(t[s].modifyRemoteSdpHook){var n=window._daily.instances[e].customCallbacks||{};n.modifyRemoteSdpHook=t[s].modifyRemoteSdpHook,window._daily.instances[e].customCallbacks=n,delete t[s].modifyRemoteSdpHook}r[s]=t[s]}else r[s]=t[s];return r}function te(t){var e=arguments.length>2?arguments[2]:void 0;if(t!==Ke){var r="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw e&&(r+=" ".concat(e)),console.error(r),new Error(r)}}function hr(t,e){return[wr,Ke].includes(t)||e}function Qr(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",s=arguments.length>3?arguments[3]:void 0;if(hr(t,e)){var i="".concat(r," not supported after joining a meeting.");throw s&&(i+=" ".concat(s)),console.error(i),new Error(i)}}function ar(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",r=arguments.length>2?arguments[2]:void 0;if(!t){var s="".concat(e,arguments.length>3&&arguments[3]!==void 0&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw r&&(s+=" ".concat(r)),console.error(s),new Error(s)}}function Xr(t){if(t){var e="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(e),new Error(e)}}function je(t){if(!t){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(e),new Error(e)}}function be(t){if(t){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(e),new Error(e)}}function z(){if(Y())throw new Error("This daily-js method is not currently supported in React Native")}function It(){if(!Y())throw new Error("This daily-js method is only supported in React Native")}function Na(t){if(t===void 0)return!0;var e;if(typeof t=="string")e=t;else try{e=JSON.stringify(t),ge(JSON.parse(e),t)||console.warn("The userData provided will be modified when serialized.")}catch(r){throw Error("userData must be serializable to JSON: ".concat(r))}if(e.length>4096)throw Error("userData is too large (".concat(e.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function Ra(t,e){for(var r=e.allowAllParticipantsKey,s=function(S){var C=["local"];return r||C.push("*"),S&&!C.includes(S)},i=function(S){return!!(S.layer===void 0||Number.isInteger(S.layer)&&S.layer>=0||S.layer==="inherit")},n=function(S){return!!S&&!(S.video&&!i(S.video))&&!(S.screenVideo&&!i(S.screenVideo))},o=0,c=Object.entries(t);o<c.length;o++){var d=me(c[o],2),p=d[0],g=d[1];if(!s(p)||!n(g))return!1}return!0}function Fa(t){if(Q(t)!=="object")return!1;for(var e=0,r=Object.entries(t);e<r.length;e++){var s=me(r[e],2),i=s[0],n=s[1];switch(i){case"video":if(Q(n)!=="object")return!1;for(var o=0,c=Object.entries(n);o<c.length;o++){var d=me(c[o],2),p=d[0],g=d[1];switch(p){case"processor":if(!sd(g))return!1;break;case"settings":if(!Io(g))return!1;break;default:return!1}}break;case"audio":if(Q(n)!=="object")return!1;for(var S=0,C=Object.entries(n);S<C.length;S++){var E=me(C[S],2),h=E[0],m=E[1];switch(h){case"processor":if(!nd(m))return!1;break;case"settings":if(!Io(m))return!1;break;default:return!1}}break;default:return!1}}return!0}function $a(t,e,r){var s,i=[];t.video&&t.video.processor&&(ka((s=e==null?void 0:e.useLegacyVideoProcessor)!==null&&s!==void 0&&s)||(t.video.settings?delete t.video.processor:delete t.video,i.push("video"))),t.audio&&t.audio.processor&&(_a()||(t.audio.settings?delete t.audio.processor:delete t.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),t.audio&&t.audio.settings&&(t.audio.settings.customTrack?(r.audioTrack=t.audio.settings.customTrack,t.audio.settings={customTrack:Je}):delete r.audioTrack),t.video&&t.video.settings&&(t.video.settings.customTrack?(r.videoTrack=t.video.settings.customTrack,t.video.settings={customTrack:Je}):delete r.videoTrack)}function nd(t){if(Y())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type"];return!!t&&Q(t)==="object"&&(Object.keys(t).filter((function(r){return!e.includes(r)})).forEach((function(r){console.warn("invalid key inputSettings -> audio -> processor : ".concat(r)),delete t[r]})),!!(function(r){return typeof r!="string"?!1:Object.values(wa).includes(r)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(t.type))}function sd(t){if(Y())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type","config"];return!t||Q(t)!=="object"||!(function(r){return typeof r!="string"?!1:Object.values(pr).includes(r)?!0:(console.error("inputSettings video processor type invalid"),!1)})(t.type)||t.config&&(Q(t.config)!=="object"||!(function(r,s){var i=Object.keys(s);if(i.length===0)return!0;var n="invalid object in inputSettings -> video -> processor -> config";switch(r){case pr.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(n),!1):!(typeof s.strength!="number"||s.strength<=0||s.strength>1||isNaN(s.strength))||(console.error("".concat(n,"; expected: {0 < strength <= 1}, got: ").concat(s.strength)),!1);case pr.BGIMAGE:return!(s.source!==void 0&&!(function(o){if(o.source==="default")return o.type="default",!0;if(o.source instanceof ArrayBuffer)return!0;if(fr(o.source))return o.type="url",!!(function(p){var g=new URL(p),S=g.pathname;if(g.protocol==="data:")try{var C=S.substring(S.indexOf(":")+1,S.indexOf(";")).split("/")[1];return Hr.includes(C)}catch(h){return console.error("failed to deduce blob content type",h),!1}var E=S.split(".").at(-1).toLowerCase().trim();return Hr.includes(E)})(o.source)||(console.error("invalid image type; supported types: [".concat(Hr.join(", "),"]")),!1);return c=o.source,d=Number(c),isNaN(d)||!Number.isInteger(d)||d<=0||d>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(o.type="daily-preselect",!0);var c,d})(s));default:return!0}})(t.type,t.config))?!1:(Object.keys(t).filter((function(r){return!e.includes(r)})).forEach((function(r){console.warn("invalid key inputSettings -> video -> processor : ".concat(r)),delete t[r]})),!0)}function Io(t){return Q(t)==="object"&&(!t.customTrack||t.customTrack instanceof MediaStreamTrack)}function On(){var t=Object.values(pr).join(" | "),e=Object.values(wa).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(t," ], config?: {} } }, audio?: { processor: {type: [ ").concat(e," ] } } }")}function Ua(t){var e=t.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(ki).concat(e?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function qa(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Mn),".")}function Va(t){if(t&&Q(t)!=="object"||Array.isArray(t))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(_r),".")),!1;if(t)for(var e=0,r=Object.entries(t);e<r.length;e++)for(var s=me(r[e],1)[0],i=0,n=Object.entries(t[s]);i<n.length;i++){var o=me(n[i],2),c=o[0],d=o[1],p=_r.id[c];if(!p)return console.error("customTrayButton does not support key ".concat(c)),!1;switch(c){case"iconPath":case"iconPathDarkMode":if(!fr(d))return console.error("customTrayButton ".concat(c," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(d))return console.error("customTrayButton ".concat(c," should be ").concat(p,". Got: ").concat(d)),!1;break;default:if(Q(d)!==p)return console.error("customTrayButton ".concat(c," should be a ").concat(p,".")),!1}}return!0}function Ba(t){if(!t||t&&Q(t)!=="object"||Array.isArray(t))return console.error(qa()),!1;for(var e=function(S){return"".concat(S," should be ").concat(Mn.id[S])},r=function(S,C){return console.error("customIntegration ".concat(S,": ").concat(C))},s=0,i=Object.entries(t);s<i.length;s++){var n=me(i[s],1)[0];if(!("label"in t[n]))return r(n,"label is required"),!1;if(!("location"in t[n]))return r(n,"location is required"),!1;if(!("src"in t[n])&&!("srcdoc"in t[n]))return r(n,"src or srcdoc is required"),!1;for(var o=0,c=Object.entries(t[n]);o<c.length;o++){var d=me(c[o],2),p=d[0],g=d[1];switch(p){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof g!="string")return r(n,e(p)),!1;break;case"iconURL":if(!fr(g))return r(n,"".concat(p," should be a url")),!1;break;case"src":if("srcdoc"in t[n])return r(n,"cannot have both src and srcdoc"),!1;if(!fr(g))return r(n,'src "'.concat(g,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in t[n])return r(n,"cannot have both src and srcdoc"),!1;if(typeof g!="string")return r(n,e(p)),!1;break;case"location":if(!["main","sidebar"].includes(g))return r(n,e(p)),!1;break;case"controlledBy":if(g!=="*"&&g!=="owners"&&(!Array.isArray(g)||g.some((function(S){return typeof S!="string"}))))return r(n,e(p)),!1;break;case"shared":if((!Array.isArray(g)||g.some((function(S){return typeof S!="string"})))&&g!=="owners"&&typeof g!="boolean")return r(n,e(p)),!1;break;default:if(!Mn.id[p])return console.error("customIntegration does not support key ".concat(p)),!1}}}return!0}function Ja(t,e){if(e===void 0)return!1;switch(Q(e)){case"string":return Q(t)===e;case"object":if(Q(t)!=="object")return!1;for(var r in t)if(!Ja(t[r],e[r]))return!1;return!0;default:return!1}}function Do(t,e){var r=t.sessionId,s=t.toEndPoint,i=t.callerId,n=t.useSipRefer;if(!r||!s)throw new Error("".concat(e,"() requires a sessionId and toEndPoint"));if(typeof r!="string"||typeof s!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(n&&!s.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!s.startsWith("sip:")&&!s.startsWith("+"))throw new Error("toEndPoint: ".concat(s,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!s.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function Lo(t){if(Q(t)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(t.state&&!Object.values(En).includes(t.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(En));if(t.volume){if(typeof t.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(t.volume<0||t.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function No(t,e,r){return!(typeof t!="number"||t<e||t>r)}function Zr(t,e){return t&&!e&&delete t.data,t}const od=Object.freeze(Object.defineProperty({__proto__:null,DAILY_ACCESS_LEVEL_FULL:Si,DAILY_ACCESS_LEVEL_LOBBY:cu,DAILY_ACCESS_LEVEL_NONE:lu,DAILY_ACCESS_UNKNOWN:dr,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:wu,DAILY_CAMERA_ERROR_CAM_IN_USE:yu,DAILY_CAMERA_ERROR_CONSTRAINTS:Cu,DAILY_CAMERA_ERROR_MIC_IN_USE:bu,DAILY_CAMERA_ERROR_NOT_FOUND:_u,DAILY_CAMERA_ERROR_PERMISSIONS:Su,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:ku,DAILY_CAMERA_ERROR_UNKNOWN:Tu,DAILY_EVENT_ACCESS_STATE_UPDATED:$i,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:ca,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:la,DAILY_EVENT_APP_MSG:ea,DAILY_EVENT_CAMERA_ERROR:Mi,DAILY_EVENT_CPU_LOAD_CHANGE:pa,DAILY_EVENT_ERROR:Tn,DAILY_EVENT_EXIT_FULLSCREEN:Rt,DAILY_EVENT_FACE_COUNTS_UPDATED:ha,DAILY_EVENT_FULLSCREEN:Nt,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:Ei,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:Ti,DAILY_EVENT_INPUT_SETTINGS_UPDATED:_n,DAILY_EVENT_JOINED_MEETING:Ii,DAILY_EVENT_JOINING_MEETING:Oi,DAILY_EVENT_LANG_UPDATED:ya,DAILY_EVENT_LEFT_MEETING:Di,DAILY_EVENT_LIVE_STREAMING_ERROR:va,DAILY_EVENT_LIVE_STREAMING_STARTED:ma,DAILY_EVENT_LIVE_STREAMING_STOPPED:ga,DAILY_EVENT_LIVE_STREAMING_UPDATED:fa,DAILY_EVENT_LOADED:wn,DAILY_EVENT_LOADING:xi,DAILY_EVENT_LOAD_ATTEMPT_FAILED:Ai,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:aa,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:oa,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:ia,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:Eu,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:qi,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:Ui,DAILY_EVENT_NETWORK_CONNECTION:da,DAILY_EVENT_NETWORK_QUALITY_CHANGE:ua,DAILY_EVENT_NONFATAL_ERROR:Cn,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:Fi,DAILY_EVENT_PARTICIPANT_JOINED:Li,DAILY_EVENT_PARTICIPANT_LEFT:Ri,DAILY_EVENT_PARTICIPANT_UPDATED:Ni,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:ba,DAILY_EVENT_RECORDING_DATA:Zi,DAILY_EVENT_RECORDING_ERROR:Qi,DAILY_EVENT_RECORDING_STARTED:Sn,DAILY_EVENT_RECORDING_STATS:Ki,DAILY_EVENT_RECORDING_STOPPED:kn,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:Xi,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:ra,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:sa,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:na,DAILY_EVENT_STARTED_CAMERA:ji,DAILY_EVENT_THEME_UPDATED:Pi,DAILY_EVENT_TRACK_STARTED:Gi,DAILY_EVENT_TRACK_STOPPED:Hi,DAILY_EVENT_TRANSCRIPTION_ERROR:Yi,DAILY_EVENT_TRANSCRIPTION_MSG:ta,DAILY_EVENT_TRANSCRIPTION_STARTED:Wi,DAILY_EVENT_TRANSCRIPTION_STOPPED:zi,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:Vi,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:Ji,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:Bi,DAILY_FATAL_ERROR_CONNECTION:Ci,DAILY_FATAL_ERROR_EJECTED:du,DAILY_FATAL_ERROR_EOL:_i,DAILY_FATAL_ERROR_EXP_ROOM:mu,DAILY_FATAL_ERROR_EXP_TOKEN:fu,DAILY_FATAL_ERROR_MEETING_FULL:gu,DAILY_FATAL_ERROR_NBF_ROOM:pu,DAILY_FATAL_ERROR_NBF_TOKEN:hu,DAILY_FATAL_ERROR_NOT_ALLOWED:vu,DAILY_FATAL_ERROR_NO_ROOM:bn,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:uu,DAILY_RECEIVE_SETTINGS_BASE_KEY:ki,DAILY_STATE_ERROR:Ue,DAILY_STATE_JOINED:Ke,DAILY_STATE_JOINING:wr,DAILY_STATE_LEFT:ze,DAILY_STATE_NEW:yn,DAILY_TRACK_STATE_BLOCKED:nu,DAILY_TRACK_STATE_INTERRUPTED:au,DAILY_TRACK_STATE_LOADING:iu,DAILY_TRACK_STATE_OFF:su,DAILY_TRACK_STATE_PLAYABLE:wi,DAILY_TRACK_STATE_SENDABLE:ou,default:rd},Symbol.toStringTag,{value:"Module"})),id=Ya(od);var cr={exports:{}},Ro;function ad(){if(Ro)return cr.exports;Ro=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(k,_,A){return Function.prototype.apply.call(k,_,A)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:r=function(k){return Object.getOwnPropertyNames(k)};function s(y){console&&console.warn&&console.warn(y)}var i=Number.isNaN||function(k){return k!==k};function n(){n.init.call(this)}cr.exports=n,cr.exports.once=w,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var o=10;function c(y){if(typeof y!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof y)}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+y+".");o=y}}),n.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||i(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function d(y){return y._maxListeners===void 0?n.defaultMaxListeners:y._maxListeners}n.prototype.getMaxListeners=function(){return d(this)},n.prototype.emit=function(k){for(var _=[],A=1;A<arguments.length;A++)_.push(arguments[A]);var L=k==="error",$=this._events;if($!==void 0)L=L&&$.error===void 0;else if(!L)return!1;if(L){var N;if(_.length>0&&(N=_[0]),N instanceof Error)throw N;var W=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw W.context=N,W}var ne=$[k];if(ne===void 0)return!1;if(typeof ne=="function")e(ne,this,_);else for(var F=ne.length,se=h(ne,F),A=0;A<F;++A)e(se[A],this,_);return!0};function p(y,k,_,A){var L,$,N;if(c(_),$=y._events,$===void 0?($=y._events=Object.create(null),y._eventsCount=0):($.newListener!==void 0&&(y.emit("newListener",k,_.listener?_.listener:_),$=y._events),N=$[k]),N===void 0)N=$[k]=_,++y._eventsCount;else if(typeof N=="function"?N=$[k]=A?[_,N]:[N,_]:A?N.unshift(_):N.push(_),L=d(y),L>0&&N.length>L&&!N.warned){N.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=y,W.type=k,W.count=N.length,s(W)}return y}n.prototype.addListener=function(k,_){return p(this,k,_,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(k,_){return p(this,k,_,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(y,k,_){var A={fired:!1,wrapFn:void 0,target:y,type:k,listener:_},L=g.bind(A);return L.listener=_,A.wrapFn=L,L}n.prototype.once=function(k,_){return c(_),this.on(k,S(this,k,_)),this},n.prototype.prependOnceListener=function(k,_){return c(_),this.prependListener(k,S(this,k,_)),this},n.prototype.removeListener=function(k,_){var A,L,$,N,W;if(c(_),L=this._events,L===void 0)return this;if(A=L[k],A===void 0)return this;if(A===_||A.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete L[k],L.removeListener&&this.emit("removeListener",k,A.listener||_));else if(typeof A!="function"){for($=-1,N=A.length-1;N>=0;N--)if(A[N]===_||A[N].listener===_){W=A[N].listener,$=N;break}if($<0)return this;$===0?A.shift():m(A,$),A.length===1&&(L[k]=A[0]),L.removeListener!==void 0&&this.emit("removeListener",k,W||_)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(k){var _,A,L;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[k]),this;if(arguments.length===0){var $=Object.keys(A),N;for(L=0;L<$.length;++L)N=$[L],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=A[k],typeof _=="function")this.removeListener(k,_);else if(_!==void 0)for(L=_.length-1;L>=0;L--)this.removeListener(k,_[L]);return this};function C(y,k,_){var A=y._events;if(A===void 0)return[];var L=A[k];return L===void 0?[]:typeof L=="function"?_?[L.listener||L]:[L]:_?b(L):h(L,L.length)}n.prototype.listeners=function(k){return C(this,k,!0)},n.prototype.rawListeners=function(k){return C(this,k,!1)},n.listenerCount=function(y,k){return typeof y.listenerCount=="function"?y.listenerCount(k):E.call(y,k)},n.prototype.listenerCount=E;function E(y){var k=this._events;if(k!==void 0){var _=k[y];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function h(y,k){for(var _=new Array(k),A=0;A<k;++A)_[A]=y[A];return _}function m(y,k){for(;k+1<y.length;k++)y[k]=y[k+1];y.pop()}function b(y){for(var k=new Array(y.length),_=0;_<k.length;++_)k[_]=y[_].listener||y[_];return k}function w(y,k){return new Promise(function(_,A){function L(N){y.removeListener(k,$),A(N)}function $(){typeof y.removeListener=="function"&&y.removeListener("error",L),_([].slice.call(arguments))}M(y,k,$,{once:!0}),k!=="error"&&P(y,L,{once:!0})})}function P(y,k,_){typeof y.on=="function"&&M(y,"error",k,_)}function M(y,k,_,A){if(typeof y.on=="function")A.once?y.once(k,_):y.on(k,_);else if(typeof y.addEventListener=="function")y.addEventListener(k,function L($){A.once&&y.removeEventListener(k,L),_($)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof y)}return cr.exports}var Dt={},$e={},Fo;function cd(){if(Fo)return $e;Fo=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.Api=$e.HttpClient=$e.ContentType=void 0;var t;(function(s){s.Json="application/json",s.JsonApi="application/vnd.api+json",s.FormData="multipart/form-data",s.UrlEncoded="application/x-www-form-urlencoded",s.Text="text/plain"})(t||($e.ContentType=t={}));class e{constructor(i={}){G(this,"baseUrl","https://api.vapi.ai");G(this,"securityData",null);G(this,"securityWorker");G(this,"abortControllers",new Map);G(this,"customFetch",(...i)=>fetch(...i));G(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});G(this,"setSecurityData",i=>{this.securityData=i});G(this,"contentFormatters",{[t.Json]:i=>i!==null&&(typeof i=="object"||typeof i=="string")?JSON.stringify(i):i,[t.JsonApi]:i=>i!==null&&(typeof i=="object"||typeof i=="string")?JSON.stringify(i):i,[t.Text]:i=>i!==null&&typeof i!="string"?JSON.stringify(i):i,[t.FormData]:i=>i instanceof FormData?i:Object.keys(i||{}).reduce((n,o)=>{const c=i[o];return n.append(o,c instanceof Blob?c:typeof c=="object"&&c!==null?JSON.stringify(c):`${c}`),n},new FormData),[t.UrlEncoded]:i=>this.toQueryString(i)});G(this,"createAbortSignal",i=>{if(this.abortControllers.has(i)){const o=this.abortControllers.get(i);return o?o.signal:void 0}const n=new AbortController;return this.abortControllers.set(i,n),n.signal});G(this,"abortRequest",i=>{const n=this.abortControllers.get(i);n&&(n.abort(),this.abortControllers.delete(i))});G(this,"request",async({body:i,secure:n,path:o,type:c,query:d,format:p,baseUrl:g,cancelToken:S,...C})=>{const E=(typeof n=="boolean"?n:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},h=this.mergeRequestParams(C,E),m=d&&this.toQueryString(d),b=this.contentFormatters[c||t.Json],w=p||h.format;return this.customFetch(`${g||this.baseUrl||""}${o}${m?`?${m}`:""}`,{...h,headers:{...h.headers||{},...c&&c!==t.FormData?{"Content-Type":c}:{}},signal:(S?this.createAbortSignal(S):h.signal)||null,body:typeof i>"u"||i===null?null:b(i)}).then(async P=>{const M=P;M.data=null,M.error=null;const y=w?P.clone():P,k=w?await y[w]().then(_=>(M.ok?M.data=_:M.error=_,M)).catch(_=>(M.error=_,M)):M;if(S&&this.abortControllers.delete(S),!P.ok)throw k;return k})});Object.assign(this,i)}encodeQueryParam(i,n){return`${encodeURIComponent(i)}=${encodeURIComponent(typeof n=="number"?n:`${n}`)}`}addQueryParam(i,n){return this.encodeQueryParam(n,i[n])}addArrayQueryParam(i,n){return i[n].map(c=>this.encodeQueryParam(n,c)).join("&")}toQueryString(i){const n=i||{};return Object.keys(n).filter(c=>typeof n[c]<"u").map(c=>Array.isArray(n[c])?this.addArrayQueryParam(n,c):this.addQueryParam(n,c)).join("&")}addQueryParams(i){const n=this.toQueryString(i);return n?`?${n}`:""}mergeRequestParams(i,n){return{...this.baseApiParams,...i,...n||{},headers:{...this.baseApiParams.headers||{},...i.headers||{},...n&&n.headers||{}}}}}$e.HttpClient=e;class r extends e{constructor(){super(...arguments);G(this,"assistant",{assistantControllerCreate:(n,o={})=>this.request({path:"/assistant",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),assistantControllerFindAll:(n,o={})=>this.request({path:"/assistant",method:"GET",query:n,secure:!0,format:"json",...o}),assistantControllerFindOne:(n,o={})=>this.request({path:`/assistant/${n}`,method:"GET",secure:!0,format:"json",...o}),assistantControllerUpdate:(n,o,c={})=>this.request({path:`/assistant/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),assistantControllerReplace:(n,o,c={})=>this.request({path:`/assistant/${n}`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...c}),assistantControllerRemove:(n,o={})=>this.request({path:`/assistant/${n}`,method:"DELETE",secure:!0,format:"json",...o}),assistantControllerFindVersions:(n,o,c={})=>this.request({path:`/assistant/${n}/version`,method:"GET",query:o,secure:!0,format:"json",...c})});G(this,"v2",{assistantControllerFindAllPaginated:(n,o={})=>this.request({path:"/v2/assistant",method:"GET",query:n,secure:!0,format:"json",...o}),callControllerCallsExport:(n,o={})=>this.request({path:"/v2/call/export",method:"GET",query:n,secure:!0,...o}),callControllerFindAllPaginated:(n,o={})=>this.request({path:"/v2/call",method:"GET",query:n,secure:!0,format:"json",...o}),callControllerFindAllMetadataPaginated:(n,o={})=>this.request({path:"/v2/call/metadata",method:"GET",query:n,secure:!0,format:"json",...o}),phoneNumberControllerFindAllPaginated:(n,o={})=>this.request({path:"/v2/phone-number",method:"GET",query:n,secure:!0,format:"json",...o})});G(this,"squad",{squadControllerCreate:(n,o={})=>this.request({path:"/squad",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),squadControllerFindAll:(n,o={})=>this.request({path:"/squad",method:"GET",query:n,secure:!0,format:"json",...o}),squadControllerFindOne:(n,o={})=>this.request({path:`/squad/${n}`,method:"GET",secure:!0,format:"json",...o}),squadControllerUpdate:(n,o,c={})=>this.request({path:`/squad/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),squadControllerRemove:(n,o={})=>this.request({path:`/squad/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"workflow",{workflowControllerFindAll:(n={})=>this.request({path:"/workflow",method:"GET",secure:!0,format:"json",...n}),workflowControllerCreate:(n,o={})=>this.request({path:"/workflow",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),workflowControllerFindOne:(n,o={})=>this.request({path:`/workflow/${n}`,method:"GET",secure:!0,format:"json",...o}),workflowControllerDelete:(n,o={})=>this.request({path:`/workflow/${n}`,method:"DELETE",secure:!0,format:"json",...o}),workflowControllerUpdate:(n,o,c={})=>this.request({path:`/workflow/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c})});G(this,"call",{callControllerCreate:(n,o={})=>this.request({path:"/call",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),callControllerFindAll:(n,o={})=>this.request({path:"/call",method:"GET",query:n,secure:!0,format:"json",...o}),callControllerFindOne:(n,o={})=>this.request({path:`/call/${n}`,method:"GET",secure:!0,format:"json",...o}),callControllerUpdate:(n,o,c={})=>this.request({path:`/call/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),callControllerDeleteCallData:(n,o,c={})=>this.request({path:`/call/${n}`,method:"DELETE",body:o,secure:!0,type:t.Json,format:"json",...c}),callControllerCreatePhoneCall:(n,o={})=>this.request({path:"/call/phone",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),callControllerCreateWebCall:(n,o={})=>this.request({path:"/call/web",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"chat",{chatControllerListChats:(n,o={})=>this.request({path:"/chat",method:"GET",query:n,secure:!0,format:"json",...o}),chatControllerCreateChat:(n,o={})=>this.request({path:"/chat",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),chatControllerGetChat:(n,o={})=>this.request({path:`/chat/${n}`,method:"GET",secure:!0,format:"json",...o}),chatControllerDeleteChat:(n,o={})=>this.request({path:`/chat/${n}`,method:"DELETE",secure:!0,format:"json",...o}),chatControllerCreateOpenAiChat:(n,o={})=>this.request({path:"/chat/responses",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),chatControllerCreateWebChat:(n,o={})=>this.request({path:"/chat/web",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),chatControllerCreateOpenAiWebChat:(n,o={})=>this.request({path:"/chat/web/responses",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"campaign",{campaignControllerCreate:(n,o={})=>this.request({path:"/campaign",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),campaignControllerFindAll:(n,o={})=>this.request({path:"/campaign",method:"GET",query:n,secure:!0,format:"json",...o}),campaignControllerFindOne:(n,o={})=>this.request({path:`/campaign/${n}`,method:"GET",secure:!0,format:"json",...o}),campaignControllerUpdate:(n,o,c={})=>this.request({path:`/campaign/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),campaignControllerRemove:(n,o={})=>this.request({path:`/campaign/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"session",{sessionControllerCreate:(n,o={})=>this.request({path:"/session",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),sessionControllerFindAllPaginated:(n,o={})=>this.request({path:"/session",method:"GET",query:n,secure:!0,format:"json",...o}),sessionControllerFindOne:(n,o={})=>this.request({path:`/session/${n}`,method:"GET",secure:!0,format:"json",...o}),sessionControllerUpdate:(n,o,c={})=>this.request({path:`/session/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),sessionControllerRemove:(n,o={})=>this.request({path:`/session/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"phoneNumber",{phoneNumberControllerImportTwilio:(n,o={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),phoneNumberControllerImportVonage:(n,o={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),phoneNumberControllerCreate:(n,o={})=>this.request({path:"/phone-number",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),phoneNumberControllerFindAll:(n,o={})=>this.request({path:"/phone-number",method:"GET",query:n,secure:!0,format:"json",...o}),phoneNumberControllerFindOne:(n,o={})=>this.request({path:`/phone-number/${n}`,method:"GET",secure:!0,format:"json",...o}),phoneNumberControllerUpdate:(n,o,c={})=>this.request({path:`/phone-number/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),phoneNumberControllerRemove:(n,o={})=>this.request({path:`/phone-number/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"tool",{toolControllerCreate:(n,o={})=>this.request({path:"/tool",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),toolControllerFindAll:(n,o={})=>this.request({path:"/tool",method:"GET",query:n,secure:!0,format:"json",...o}),toolControllerFindOne:(n,o={})=>this.request({path:`/tool/${n}`,method:"GET",secure:!0,format:"json",...o}),toolControllerUpdate:(n,o,c={})=>this.request({path:`/tool/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),toolControllerRemove:(n,o={})=>this.request({path:`/tool/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"file",{fileControllerCreateDeprecated:(n,o={})=>this.request({path:"/file/upload",method:"POST",body:n,secure:!0,type:t.FormData,format:"json",...o}),fileControllerCreate:(n,o={})=>this.request({path:"/file",method:"POST",body:n,secure:!0,type:t.FormData,format:"json",...o}),fileControllerFindAll:(n={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...n}),fileControllerFindOne:(n,o={})=>this.request({path:`/file/${n}`,method:"GET",secure:!0,format:"json",...o}),fileControllerUpdate:(n,o,c={})=>this.request({path:`/file/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),fileControllerRemove:(n,o={})=>this.request({path:`/file/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"knowledgeBase",{knowledgeBaseControllerCreate:(n,o={})=>this.request({path:"/knowledge-base",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),knowledgeBaseControllerFindAll:(n,o={})=>this.request({path:"/knowledge-base",method:"GET",query:n,secure:!0,format:"json",...o}),knowledgeBaseControllerFindOne:(n,o={})=>this.request({path:`/knowledge-base/${n}`,method:"GET",secure:!0,format:"json",...o}),knowledgeBaseControllerUpdate:(n,o,c={})=>this.request({path:`/knowledge-base/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),knowledgeBaseControllerRemove:(n,o={})=>this.request({path:`/knowledge-base/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"structuredOutput",{structuredOutputControllerFindAll:(n,o={})=>this.request({path:"/structured-output",method:"GET",query:n,secure:!0,format:"json",...o}),structuredOutputControllerCreate:(n,o={})=>this.request({path:"/structured-output",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),structuredOutputControllerFindOne:(n,o={})=>this.request({path:`/structured-output/${n}`,method:"GET",secure:!0,format:"json",...o}),structuredOutputControllerUpdate:(n,o,c,d={})=>this.request({path:`/structured-output/${n}`,method:"PATCH",query:o,body:c,secure:!0,type:t.Json,format:"json",...d}),structuredOutputControllerRemove:(n,o={})=>this.request({path:`/structured-output/${n}`,method:"DELETE",secure:!0,format:"json",...o}),structuredOutputControllerRun:(n,o={})=>this.request({path:"/structured-output/run",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"testSuite",{testSuiteControllerFindAllPaginated:(n,o={})=>this.request({path:"/test-suite",method:"GET",query:n,secure:!0,format:"json",...o}),testSuiteControllerCreate:(n,o={})=>this.request({path:"/test-suite",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),testSuiteControllerFindOne:(n,o={})=>this.request({path:`/test-suite/${n}`,method:"GET",secure:!0,format:"json",...o}),testSuiteControllerUpdate:(n,o,c={})=>this.request({path:`/test-suite/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),testSuiteControllerRemove:(n,o={})=>this.request({path:`/test-suite/${n}`,method:"DELETE",secure:!0,format:"json",...o}),testSuiteTestControllerFindAllPaginated:(n,o,c={})=>this.request({path:`/test-suite/${n}/test`,method:"GET",query:o,secure:!0,format:"json",...c}),testSuiteTestControllerCreate:(n,o,c={})=>this.request({path:`/test-suite/${n}/test`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),testSuiteTestControllerFindOne:(n,o,c={})=>this.request({path:`/test-suite/${n}/test/${o}`,method:"GET",secure:!0,format:"json",...c}),testSuiteTestControllerUpdate:(n,o,c,d={})=>this.request({path:`/test-suite/${n}/test/${o}`,method:"PATCH",body:c,secure:!0,type:t.Json,format:"json",...d}),testSuiteTestControllerRemove:(n,o,c={})=>this.request({path:`/test-suite/${n}/test/${o}`,method:"DELETE",secure:!0,format:"json",...c}),testSuiteRunControllerFindAllPaginated:(n,o,c={})=>this.request({path:`/test-suite/${n}/run`,method:"GET",query:o,secure:!0,format:"json",...c}),testSuiteRunControllerCreate:(n,o,c={})=>this.request({path:`/test-suite/${n}/run`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),testSuiteRunControllerFindOne:(n,o,c={})=>this.request({path:`/test-suite/${n}/run/${o}`,method:"GET",secure:!0,format:"json",...c}),testSuiteRunControllerUpdate:(n,o,c,d={})=>this.request({path:`/test-suite/${n}/run/${o}`,method:"PATCH",body:c,secure:!0,type:t.Json,format:"json",...d}),testSuiteRunControllerRemove:(n,o,c={})=>this.request({path:`/test-suite/${n}/run/${o}`,method:"DELETE",secure:!0,format:"json",...c})});G(this,"reporting",{insightControllerCreate:(n,o={})=>this.request({path:"/reporting/insight",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),insightControllerFindAll:(n,o={})=>this.request({path:"/reporting/insight",method:"GET",query:n,secure:!0,format:"json",...o}),insightControllerUpdate:(n,o,c={})=>this.request({path:`/reporting/insight/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),insightControllerFindOne:(n,o={})=>this.request({path:`/reporting/insight/${n}`,method:"GET",secure:!0,format:"json",...o}),insightControllerRemove:(n,o={})=>this.request({path:`/reporting/insight/${n}`,method:"DELETE",secure:!0,format:"json",...o}),insightControllerRun:(n,o,c={})=>this.request({path:`/reporting/insight/${n}/run`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),insightControllerPreview:(n,o={})=>this.request({path:"/reporting/insight/preview",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"eval",{evalControllerCreate:(n,o={})=>this.request({path:"/eval",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),evalControllerGetPaginated:(n,o={})=>this.request({path:"/eval",method:"GET",query:n,secure:!0,format:"json",...o}),evalControllerUpdate:(n,o,c={})=>this.request({path:`/eval/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),evalControllerRemove:(n,o={})=>this.request({path:`/eval/${n}`,method:"DELETE",secure:!0,format:"json",...o}),evalControllerGet:(n,o={})=>this.request({path:`/eval/${n}`,method:"GET",secure:!0,format:"json",...o}),evalControllerRemoveRun:(n,o={})=>this.request({path:`/eval/run/${n}`,method:"DELETE",secure:!0,format:"json",...o}),evalControllerGetRun:(n,o={})=>this.request({path:`/eval/run/${n}`,method:"GET",secure:!0,format:"json",...o}),evalControllerRun:(n,o={})=>this.request({path:"/eval/run",method:"POST",body:n,secure:!0,type:t.Json,...o}),evalControllerGetRunsPaginated:(n,o={})=>this.request({path:"/eval/run",method:"GET",query:n,secure:!0,format:"json",...o})});G(this,"observability",{scorecardControllerGet:(n,o={})=>this.request({path:`/observability/scorecard/${n}`,method:"GET",secure:!0,format:"json",...o}),scorecardControllerUpdate:(n,o,c={})=>this.request({path:`/observability/scorecard/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),scorecardControllerRemove:(n,o={})=>this.request({path:`/observability/scorecard/${n}`,method:"DELETE",secure:!0,format:"json",...o}),scorecardControllerGetPaginated:(n,o={})=>this.request({path:"/observability/scorecard",method:"GET",query:n,secure:!0,format:"json",...o}),scorecardControllerCreate:(n,o={})=>this.request({path:"/observability/scorecard",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"org",{orgControllerCreate:(n,o={})=>this.request({path:"/org",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),orgControllerFindAll:(n={})=>this.request({path:"/org",method:"GET",secure:!0,format:"json",...n}),orgControllerFeatureFlagEnabled:(n,o={})=>this.request({path:"/org/feature-flag",method:"GET",query:n,secure:!0,format:"json",...o}),orgControllerFindOne:(n,o={})=>this.request({path:`/org/${n}`,method:"GET",secure:!0,format:"json",...o}),orgControllerUpdate:(n,o,c={})=>this.request({path:`/org/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),orgControllerDeleteOrg:(n,o={})=>this.request({path:`/org/${n}`,method:"DELETE",secure:!0,...o}),orgControllerFindAllUsers:(n,o={})=>this.request({path:`/org/${n}/user`,method:"GET",secure:!0,format:"json",...o}),orgControllerOrgLeave:(n,o={})=>this.request({path:`/org/${n}/leave`,method:"DELETE",secure:!0,...o}),orgControllerOrgRemoveUser:(n,o,c={})=>this.request({path:`/org/${n}/member/${o}/leave`,method:"DELETE",secure:!0,...c}),orgControllerUsersInvite:(n,o,c={})=>this.request({path:`/org/${n}/invite`,method:"POST",body:o,secure:!0,type:t.Json,...c}),orgControllerUserUpdate:(n,o,c={})=>this.request({path:`/org/${n}/role`,method:"PATCH",body:o,secure:!0,type:t.Json,...c}),orgControllerOrgToken:(n,o={})=>this.request({path:`/org/${n}/auth`,method:"GET",secure:!0,format:"json",...o})});G(this,"token",{tokenControllerCreate:(n,o={})=>this.request({path:"/token",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),tokenControllerFindAll:(n,o={})=>this.request({path:"/token",method:"GET",query:n,secure:!0,format:"json",...o}),tokenControllerFindOne:(n,o={})=>this.request({path:`/token/${n}`,method:"GET",secure:!0,format:"json",...o}),tokenControllerUpdate:(n,o,c={})=>this.request({path:`/token/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),tokenControllerRemove:(n,o={})=>this.request({path:`/token/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"credential",{credentialControllerCreate:(n,o={})=>this.request({path:"/credential",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),credentialControllerFindAll:(n,o={})=>this.request({path:"/credential",method:"GET",query:n,secure:!0,format:"json",...o}),credentialControllerFindOne:(n,o={})=>this.request({path:`/credential/${n}`,method:"GET",secure:!0,format:"json",...o}),credentialControllerUpdate:(n,o,c={})=>this.request({path:`/credential/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),credentialControllerRemove:(n,o={})=>this.request({path:`/credential/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"template",{templateControllerCreate:(n,o={})=>this.request({path:"/template",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),templateControllerFindAll:(n,o={})=>this.request({path:"/template",method:"GET",query:n,secure:!0,format:"json",...o}),templateControllerFindAllPinned:(n={})=>this.request({path:"/template/pinned",method:"GET",secure:!0,format:"json",...n}),templateControllerFindOne:(n,o={})=>this.request({path:`/template/${n}`,method:"GET",secure:!0,format:"json",...o}),templateControllerUpdate:(n,o,c={})=>this.request({path:`/template/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),templateControllerRemove:(n,o={})=>this.request({path:`/template/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"voiceLibrary",{voiceLibraryControllerVoiceGetByProvider:(n,o,c={})=>this.request({path:`/voice-library/${n}`,method:"GET",query:o,secure:!0,format:"json",...c}),voiceLibraryControllerVoiceGetAccentsByProvider:(n,o={})=>this.request({path:`/voice-library/${n}/accents`,method:"GET",secure:!0,format:"json",...o}),voiceLibraryControllerVoiceLibrarySyncByProvider:(n,o={})=>this.request({path:`/voice-library/sync/${n}`,method:"POST",secure:!0,format:"json",...o}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(n,o={})=>this.request({path:"/voice-library/sync",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),voiceLibraryControllerVoiceLibraryCreateSesameVoice:(n,o={})=>this.request({path:"/voice-library/create-sesame-voice",method:"POST",body:n,secure:!0,type:t.Json,...o})});G(this,"provider",{providerResourceControllerCreateProviderResource:(n,o,c={})=>this.request({path:`/provider/${n}/${o}`,method:"POST",secure:!0,format:"json",...c}),providerResourceControllerGetProviderResourcesPaginated:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}`,method:"GET",query:c,secure:!0,format:"json",...d}),providerResourceControllerGetProviderResource:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}/${c}`,method:"GET",secure:!0,format:"json",...d}),providerResourceControllerDeleteProviderResource:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}/${c}`,method:"DELETE",secure:!0,format:"json",...d}),providerResourceControllerUpdateProviderResource:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}/${c}`,method:"PATCH",secure:!0,format:"json",...d}),providerControllerGetWorkflows:(n,o,c={})=>this.request({path:`/${n}/workflows`,method:"GET",query:o,secure:!0,format:"json",...c}),providerControllerGetWorkflowTriggerHook:(n,o,c={})=>this.request({path:`/${n}/workflows/${o}/hooks`,method:"GET",secure:!0,format:"json",...c}),providerControllerGetLocations:(n,o={})=>this.request({path:`/${n}/locations`,method:"GET",secure:!0,format:"json",...o}),voiceProviderControllerSearchVoices:(n,o,c={})=>this.request({path:`/${n}/voices/search`,method:"GET",query:o,secure:!0,format:"json",...c}),voiceProviderControllerSearchVoice:(n,o,c={})=>this.request({path:`/${n}/voice/search`,method:"GET",query:o,secure:!0,format:"json",...c}),voiceProviderControllerAddVoices:(n,o,c={})=>this.request({path:`/${n}/voices/add`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),voiceProviderControllerAddVoice:(n,o,c={})=>this.request({path:`/${n}/voice/add`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c})});G(this,"v11Labs",{voiceProviderControllerCloneVoices:(n,o={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:n,secure:!0,type:t.FormData,...o})});G(this,"analytics",{analyticsControllerQuery:(n,o={})=>this.request({path:"/analytics",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})})}}return $e.Api=r,$e}var $o;function ld(){if($o)return Dt;$o=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.client=void 0;const t=cd(),e=new t.Api({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async r=>{if(r)return{headers:{Authorization:`Bearer ${r}`}}}});return Dt.client=e,Dt}var st={},Uo;function ud(){if(Uo)return st;Uo=1,Object.defineProperty(st,"__esModule",{value:!0}),st.createSafeDailyConfig=t,st.safeSetLocalAudio=e,st.safeSetInputDevicesAsync=r,st.createSafeDailyFactoryOptions=s;function t(i){if(!i)return{};const{alwaysIncludeMicInPermissionPrompt:n,...o}=i;return n===!1?(console.warn("[Vapi] alwaysIncludeMicInPermissionPrompt:false detected. This can cause Chrome 140+ issues. Removing the property."),o):i}function e(i,n){if(!i)throw new Error("Call object is not available.");i.setLocalAudio(n)}async function r(i,n){if(!i)throw new Error("Call object is not available.");if("audioSource"in n&&n.audioSource===!1){console.warn("[Vapi] setInputDevicesAsync with audioSource:false detected. This can cause Chrome 140+ issues. Using default device instead.");const{audioSource:o,...c}=n;await i.setInputDevicesAsync(c);return}await i.setInputDevicesAsync(n)}function s(i){return i?i.audioSource===!1?(console.warn("[Vapi] audioSource:false detected in factory options. This can cause Chrome 140+ issues. Defaulting to true."),{...i,audioSource:!0}):i:{}}return st}var qo;function dd(){if(qo)return ft;qo=1;var t=ft&&ft.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ft,"__esModule",{value:!0});const e=t(id),r=t(ad()),s=ld(),i=ud();function n(C){if(C==null)return{message:"Unknown error (null or undefined)"};if(C instanceof Error){const E={message:C.message,name:C.name,stack:C.stack},h=C;return h.code!==void 0&&(E.code=h.code),h.cause!==void 0&&(E.cause=String(h.cause)),h.reason!==void 0&&(E.reason=h.reason),h.details!==void 0&&(E.details=h.details),h.errorMsg!==void 0&&(E.errorMsg=h.errorMsg),h.error!==void 0&&typeof h.error=="string"&&(E.errorDetail=h.error),E}if(typeof C=="string")return{message:C};if(typeof C=="object"){const E=C;return{message:E.message||E.error||JSON.stringify(C),...E}}return{message:String(C)}}async function o(C,E){C.muted=!1,C.autoplay=!0,E!=null&&(C.srcObject=new MediaStream([E]),await C.play())}async function c(C,E){const h=document.createElement("audio");return h.dataset.participantId=E,document.body.appendChild(h),await o(h,C),h}function d(C){const E=document.querySelector(`audio[data-participant-id="${C}"]`);E==null||E.remove()}function p(C,E,h,m){C.participant.local||E.updateParticipant(C.participant.session_id,{setSubscribedTracks:{audio:!0,video:h||m}})}class g extends r.default{on(E,h){return super.on(E,h),this}once(E,h){return super.once(E,h),this}emit(E,...h){return super.emit(E,...h)}removeListener(E,h){return super.removeListener(E,h),this}removeAllListeners(E){return super.removeAllListeners(E),this}}class S extends g{constructor(h,m,b,w){super();G(this,"started",!1);G(this,"call",null);G(this,"speakingTimeout",null);G(this,"dailyCallConfig",{});G(this,"dailyCallObject",{});G(this,"hasEmittedCallEndedStatus",!1);s.client.baseUrl=m??"https://api.vapi.ai",s.client.setSecurityData(h),this.dailyCallConfig=(0,i.createSafeDailyConfig)(b),this.dailyCallObject=(0,i.createSafeDailyFactoryOptions)(w)}async cleanup(){this.started=!1,this.hasEmittedCallEndedStatus=!1,this.call&&(await this.call.destroy(),this.call=null),this.speakingTimeout=null}isMobileDevice(){if(typeof navigator>"u")return!1;const h=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(h.toLowerCase())}async sleep(h){return new Promise(m=>setTimeout(m,h))}async start(h,m,b,w,P,M){var k,_,A,L,$,N,W;const y=Date.now();if(!h&&!b&&!w){const ne=new Error("Assistant or Squad or Workflow must be provided.");throw this.emit("error",{type:"validation-error",stage:"input-validation",error:n(ne),timestamp:new Date().toISOString()}),ne}if(this.started)return this.emit("call-start-progress",{stage:"validation",status:"failed",timestamp:new Date().toISOString(),metadata:{reason:"already-started"}}),null;this.emit("call-start-progress",{stage:"initialization",status:"started",timestamp:new Date().toISOString(),metadata:{hasAssistant:!!h,hasSquad:!!b,hasWorkflow:!!w}}),this.started=!0;try{this.emit("call-start-progress",{stage:"web-call-creation",status:"started",timestamp:new Date().toISOString()});const ne=Date.now(),F=(await s.client.call.callControllerCreateWebCall({assistant:typeof h=="string"?void 0:h,assistantId:typeof h=="string"?h:void 0,assistantOverrides:m,squad:typeof b=="string"?void 0:b,squadId:typeof b=="string"?b:void 0,workflow:typeof w=="string"?void 0:w,workflowId:typeof w=="string"?w:void 0,workflowOverrides:P,roomDeleteOnUserLeaveEnabled:M==null?void 0:M.roomDeleteOnUserLeaveEnabled})).data,se=Date.now()-ne;this.emit("call-start-progress",{stage:"web-call-creation",status:"completed",duration:se,timestamp:new Date().toISOString(),metadata:{callId:(F==null?void 0:F.id)||"unknown",videoRecordingEnabled:((k=F==null?void 0:F.artifactPlan)==null?void 0:k.videoRecordingEnabled)??!1,voiceProvider:((A=(_=F==null?void 0:F.assistant)==null?void 0:_.voice)==null?void 0:A.provider)||"unknown"}}),this.call&&(this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{action:"cleanup-existing"}}),await this.cleanup());const ie=((L=F==null?void 0:F.artifactPlan)==null?void 0:L.videoRecordingEnabled)??!1,q=((N=($=F==null?void 0:F.assistant)==null?void 0:$.voice)==null?void 0:N.provider)==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??ie,isVideoRecordingEnabled:ie,isVideoEnabled:q}});const X=Date.now();try{this.call=e.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??ie,dailyConfig:this.dailyCallConfig});const a=Date.now()-X;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-X,l=n(a);throw this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"daily-call-object-creation-error",stage:"daily-call-object-creation",error:l,timestamp:new Date().toISOString()}),a}(W=this.call.iframe())==null||W.style.setProperty("display","none"),this.call.on("left-meeting",()=>{var a;this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),ie&&((a=this.call)==null||a.stopRecording()),this.cleanup().catch(console.error)}),this.call.on("error",a=>{var u;this.emit("error",{type:"daily-error",error:n(a),timestamp:new Date().toISOString()}),ie&&((u=this.call)==null||u.stopRecording())}),this.call.on("camera-error",a=>{this.emit("camera-error",{type:"camera-error",error:n(a),timestamp:new Date().toISOString()})}),this.call.on("network-quality-change",a=>{this.emit("network-quality-change",a)}),this.call.on("network-connection",a=>{this.emit("network-connection",a)}),this.call.on("track-started",async a=>{var u,l,f;!a||!a.participant||(u=a.participant)!=null&&u.local||((l=a.participant)==null?void 0:l.user_name)==="Vapi Speaker"&&(a.track.kind==="video"&&this.emit("video",a.track),a.track.kind==="audio"&&await c(a.track,a.participant.session_id),(f=this.call)==null||f.sendAppMessage("playable"))}),this.call.on("participant-joined",a=>{!a||!this.call||p(a,this.call,ie,q)}),this.call.on("participant-updated",a=>{a&&this.emit("daily-participant-updated",a.participant)}),this.call.on("participant-left",a=>{a&&d(a.participant.session_id)});const ye=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:ye}}),ye){const a=Date.now();await this.sleep(1e3);const u=Date.now()-a;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:u,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const ae=Date.now();try{await this.call.join({url:F.webCallUrl,subscribeToTracksAutomatically:!1});const a=Date.now()-ae;this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-ae,l=n(a);throw this.emit("call-start-progress",{stage:"daily-call-join",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"daily-call-join-error",stage:"daily-call-join",error:l,duration:u,timestamp:new Date().toISOString()}),a}if(ie){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const a=new Date().getTime(),u=Date.now();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const l=Date.now()-u;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:l,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const f=(new Date().getTime()-a)/1e3;this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:f}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:f})})}catch(l){const f=Date.now()-u,v=n(l);this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:f,timestamp:new Date().toISOString(),metadata:{error:v.message}}),this.emit("error",{type:"video-recording-setup-error",stage:"video-recording-setup",error:v,timestamp:new Date().toISOString()})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const le=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const a=Date.now()-le;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-le,l=n(a);this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"audio-observer-setup-error",stage:"audio-observer-setup",error:l,timestamp:new Date().toISOString()})}this.call.on("remote-participants-audio-level",a=>{a&&this.handleRemoteParticipantsAudioLevel(a)}),this.call.on("app-message",a=>this.onAppMessage(a)),this.call.on("nonfatal-error",a=>{var u;(a==null?void 0:a.type)==="audio-processor-error"&&((u=this.call)==null||u.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{(0,i.safeSetLocalAudio)(this.call,!0)}))}),this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const Ae=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const a=Date.now()-Ae;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-Ae,l=n(a);this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"audio-processing-setup-error",stage:"audio-processing-setup",error:l,timestamp:new Date().toISOString()})}const Fe=Date.now()-y;return this.emit("call-start-success",{totalDuration:Fe,callId:(F==null?void 0:F.id)||"unknown",timestamp:new Date().toISOString()}),F}catch(ne){const F=Date.now()-y,se=n(ne);return this.emit("call-start-failed",{stage:"unknown",totalDuration:F,error:se.message,errorStack:se.stack||"No stack trace available",timestamp:new Date().toISOString(),context:{hasAssistant:!!h,hasSquad:!!b,hasWorkflow:!!w,isMobile:this.isMobileDevice()}}),this.emit("error",{type:"start-method-error",stage:"unknown",error:se,totalDuration:F,timestamp:new Date().toISOString(),context:{hasAssistant:!!h,hasSquad:!!b,hasWorkflow:!!w,isMobile:this.isMobileDevice()}}),await this.cleanup(),null}}onAppMessage(h){if(h)try{if(h.data==="listening")return this.emit("call-start");try{const m=JSON.parse(h.data);this.emit("message",m),m&&"type"in m&&"status"in m&&m.type==="status-update"&&m.status==="ended"&&(this.hasEmittedCallEndedStatus=!0)}catch(m){console.log("Error parsing message data: ",m)}}catch(m){console.error(m)}}handleRemoteParticipantsAudioLevel(h){const m=Object.values(h.participantsAudioLevel).reduce((w,P)=>w+P,0);this.emit("volume-level",Math.min(1,m/.15)),m>.01&&(this.speakingTimeout?(clearTimeout(this.speakingTimeout),this.speakingTimeout=null):this.emit("speech-start"),this.speakingTimeout=setTimeout(()=>{this.emit("speech-end"),this.speakingTimeout=null},1e3))}async stop(){this.started=!1,this.call&&(await this.call.destroy(),this.call=null),this.speakingTimeout=null}send(h){var m;(m=this.call)==null||m.sendAppMessage(JSON.stringify(h))}setMuted(h){(0,i.safeSetLocalAudio)(this.call,!h)}isMuted(){return this.call?this.call.localAudio()===!1:!1}say(h,m,b,w){this.send({type:"say",message:h,endCallAfterSpoken:m,interruptionsEnabled:b??!1,interruptAssistantEnabled:w??!1})}end(){this.send({type:"end-call"}),this.stop()}setInputDevicesAsync(h){return(0,i.safeSetInputDevicesAsync)(this.call,h)}async increaseMicLevel(h){if(!this.call)throw new Error("Call object is not available.");try{const m=await navigator.mediaDevices.getUserMedia({audio:!0}),b=new AudioContext,w=b.createMediaStreamSource(m),P=b.createGain();P.gain.value=h,w.connect(P);const M=b.createMediaStreamDestination();P.connect(M);const[y]=M.stream.getAudioTracks();await(0,i.safeSetInputDevicesAsync)(this.call,{audioSource:y})}catch(m){console.error("Error adjusting microphone level:",m)}}setOutputDeviceAsync(h){var m;(m=this.call)==null||m.setOutputDeviceAsync(h)}getDailyCallObject(){return this.call}startScreenSharing(h,m){var b;(b=this.call)==null||b.startScreenShare({displayMediaOptions:h,screenVideoSendSettings:m})}stopScreenSharing(){var h;(h=this.call)==null||h.stopScreenShare()}async reconnect(h){var b,w,P,M,y,k,_,A,L,$,N,W,ne;const m=Date.now();if(this.started)throw new Error("Cannot reconnect while a call is already in progress. Call stop() first.");if(!h.webCallUrl)throw new Error("webCallUrl is required for reconnection.");this.emit("call-start-progress",{stage:"reconnect-initialization",status:"started",timestamp:new Date().toISOString(),metadata:{callId:h.id||"unknown",hasVideoRecording:!!((b=h==null?void 0:h.artifactPlan)!=null&&b.videoRecordingEnabled),voiceProvider:((P=(w=h==null?void 0:h.assistant)==null?void 0:w.voice)==null?void 0:P.provider)||"unknown"}}),this.started=!0;try{this.call&&(this.emit("call-start-progress",{stage:"cleanup-existing-call",status:"started",timestamp:new Date().toISOString()}),await this.cleanup(),this.emit("call-start-progress",{stage:"cleanup-existing-call",status:"completed",timestamp:new Date().toISOString()}));const F=((M=h==null?void 0:h.artifactPlan)==null?void 0:M.videoRecordingEnabled)??!1,se=((k=(y=h==null?void 0:h.assistant)==null?void 0:y.voice)==null?void 0:k.provider)==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??F,isVideoRecordingEnabled:F,isVideoEnabled:se}});const ie=Date.now();this.call=e.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??F,dailyConfig:this.dailyCallConfig});const q=Date.now()-ie;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:q,timestamp:new Date().toISOString()}),(_=this.call.iframe())==null||_.style.setProperty("display","none"),this.call.on("left-meeting",()=>{var a;this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),F&&((a=this.call)==null||a.stopRecording()),this.cleanup().catch(console.error)}),this.call.on("error",a=>{var u;this.emit("error",{type:"daily-error",error:n(a),timestamp:new Date().toISOString()}),F&&((u=this.call)==null||u.stopRecording())}),this.call.on("camera-error",a=>{this.emit("camera-error",{type:"camera-error",error:n(a),timestamp:new Date().toISOString()})}),this.call.on("network-quality-change",a=>{this.emit("network-quality-change",a)}),this.call.on("network-connection",a=>{this.emit("network-connection",a)}),this.call.on("track-started",async a=>{var u,l,f;!a||!a.participant||(u=a.participant)!=null&&u.local||((l=a.participant)==null?void 0:l.user_name)==="Vapi Speaker"&&(a.track.kind==="video"&&this.emit("video",a.track),a.track.kind==="audio"&&await c(a.track,a.participant.session_id),(f=this.call)==null||f.sendAppMessage("playable"))}),this.call.on("participant-joined",a=>{!a||!this.call||p(a,this.call,F,se)}),this.call.on("participant-updated",a=>{a&&this.emit("daily-participant-updated",a.participant)}),this.call.on("participant-left",a=>{a&&d(a.participant.session_id)}),this.call.on("remote-participants-audio-level",a=>{a&&this.handleRemoteParticipantsAudioLevel(a)}),this.call.on("app-message",a=>this.onAppMessage(a)),this.call.on("nonfatal-error",a=>{var u;(a==null?void 0:a.type)==="audio-processor-error"&&((u=this.call)==null||u.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{(0,i.safeSetLocalAudio)(this.call,!0)}))});const X=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:X}}),X){const a=Date.now();await this.sleep(1e3);const u=Date.now()-a;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:u,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const ye=Date.now();await this.call.join({url:h.webCallUrl,subscribeToTracksAutomatically:!1});const ae=Date.now()-ye;if(this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:ae,timestamp:new Date().toISOString()}),F){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const a=Date.now(),u=new Date().getTime();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const l=Date.now()-a;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:l,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const f=(new Date().getTime()-u)/1e3;this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:f}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:f})})}catch(l){const f=Date.now()-a,v=n(l);this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:f,timestamp:new Date().toISOString(),metadata:{error:v.message}})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const le=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const a=Date.now()-le;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-le,l=n(a);this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}})}this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const Ae=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const a=Date.now()-Ae;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-Ae,l=n(a);this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}})}const Fe=Date.now()-m;this.emit("call-start-success",{totalDuration:Fe,callId:(h==null?void 0:h.id)||"unknown",timestamp:new Date().toISOString()}),this.emit("call-start")}catch(F){const se=Date.now()-m,ie=n(F);throw this.emit("call-start-failed",{stage:"reconnect",totalDuration:se,error:ie.message,errorStack:ie.stack||"No stack trace available",timestamp:new Date().toISOString(),context:{isReconnect:!0,callId:(h==null?void 0:h.id)||"unknown",hasVideoRecording:!!((A=h==null?void 0:h.artifactPlan)!=null&&A.videoRecordingEnabled),voiceProvider:(($=(L=h==null?void 0:h.assistant)==null?void 0:L.voice)==null?void 0:$.provider)||"unknown",isMobile:this.isMobileDevice()}}),this.emit("error",{type:"reconnect-error",error:ie,totalDuration:se,timestamp:new Date().toISOString(),context:{isReconnect:!0,callId:(h==null?void 0:h.id)||"unknown",hasVideoRecording:!!((N=h==null?void 0:h.artifactPlan)!=null&&N.videoRecordingEnabled),voiceProvider:((ne=(W=h==null?void 0:h.assistant)==null?void 0:W.voice)==null?void 0:ne.provider)||"unknown",isMobile:this.isMobileDevice()}}),await this.cleanup(),F}}static async runNetworkTestsStandalone(){console.log("Starting standalone network connectivity tests...");const h={};let m=null;try{console.log("Creating temporary call object for testing..."),m=e.default.createCallObject({audioSource:!0,videoSource:!0}),console.log(`
|
|
58
|
+
`,document.body.appendChild(u),a.layout||(a.layout="custom-v1"),t.wrap(u,a)}},{key:"getCallInstance",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return a?rt[a]:Object.values(rt)[0]}}]);var e,r,s,i,n,o,c,d,p,g,S,C,E,h,m,b,w,P,M,y,k,_,A,L,$,N,W,ne,F,se,ie,V,X,ye,ae,le,Ae,Fe})();function Oo(t){if(t.extension){if(typeof t.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(t.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(t.waitBeforeExtensionDialSec){if(typeof t.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(t.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!t.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function gt(t,e){var r={};for(var s in t)if(t[s]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",s),r[s]=Je;else if(s==="dailyConfig"){if(t[s].modifyLocalSdpHook){var i=window._daily.instances[e].customCallbacks||{};i.modifyLocalSdpHook=t[s].modifyLocalSdpHook,window._daily.instances[e].customCallbacks=i,delete t[s].modifyLocalSdpHook}if(t[s].modifyRemoteSdpHook){var n=window._daily.instances[e].customCallbacks||{};n.modifyRemoteSdpHook=t[s].modifyRemoteSdpHook,window._daily.instances[e].customCallbacks=n,delete t[s].modifyRemoteSdpHook}r[s]=t[s]}else r[s]=t[s];return r}function te(t){var e=arguments.length>2?arguments[2]:void 0;if(t!==Ke){var r="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw e&&(r+=" ".concat(e)),console.error(r),new Error(r)}}function hr(t,e){return[wr,Ke].includes(t)||e}function Qr(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",s=arguments.length>3?arguments[3]:void 0;if(hr(t,e)){var i="".concat(r," not supported after joining a meeting.");throw s&&(i+=" ".concat(s)),console.error(i),new Error(i)}}function ar(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",r=arguments.length>2?arguments[2]:void 0;if(!t){var s="".concat(e,arguments.length>3&&arguments[3]!==void 0&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw r&&(s+=" ".concat(r)),console.error(s),new Error(s)}}function Xr(t){if(t){var e="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(e),new Error(e)}}function je(t){if(!t){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(e),new Error(e)}}function be(t){if(t){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(e),new Error(e)}}function z(){if(Y())throw new Error("This daily-js method is not currently supported in React Native")}function Ot(){if(!Y())throw new Error("This daily-js method is only supported in React Native")}function Ua(t){if(t===void 0)return!0;var e;if(typeof t=="string")e=t;else try{e=JSON.stringify(t),ge(JSON.parse(e),t)||console.warn("The userData provided will be modified when serialized.")}catch(r){throw Error("userData must be serializable to JSON: ".concat(r))}if(e.length>4096)throw Error("userData is too large (".concat(e.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function qa(t,e){for(var r=e.allowAllParticipantsKey,s=function(S){var C=["local"];return r||C.push("*"),S&&!C.includes(S)},i=function(S){return!!(S.layer===void 0||Number.isInteger(S.layer)&&S.layer>=0||S.layer==="inherit")},n=function(S){return!!S&&!(S.video&&!i(S.video))&&!(S.screenVideo&&!i(S.screenVideo))},o=0,c=Object.entries(t);o<c.length;o++){var d=me(c[o],2),p=d[0],g=d[1];if(!s(p)||!n(g))return!1}return!0}function Va(t){if(Q(t)!=="object")return!1;for(var e=0,r=Object.entries(t);e<r.length;e++){var s=me(r[e],2),i=s[0],n=s[1];switch(i){case"video":if(Q(n)!=="object")return!1;for(var o=0,c=Object.entries(n);o<c.length;o++){var d=me(c[o],2),p=d[0],g=d[1];switch(p){case"processor":if(!ld(g))return!1;break;case"settings":if(!Do(g))return!1;break;default:return!1}}break;case"audio":if(Q(n)!=="object")return!1;for(var S=0,C=Object.entries(n);S<C.length;S++){var E=me(C[S],2),h=E[0],m=E[1];switch(h){case"processor":if(!cd(m))return!1;break;case"settings":if(!Do(m))return!1;break;default:return!1}}break;default:return!1}}return!0}function Ba(t,e,r){var s,i=[];t.video&&t.video.processor&&(Ea((s=e==null?void 0:e.useLegacyVideoProcessor)!==null&&s!==void 0&&s)||(t.video.settings?delete t.video.processor:delete t.video,i.push("video"))),t.audio&&t.audio.processor&&(Pa()||(t.audio.settings?delete t.audio.processor:delete t.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),t.audio&&t.audio.settings&&(t.audio.settings.customTrack?(r.audioTrack=t.audio.settings.customTrack,t.audio.settings={customTrack:Je}):delete r.audioTrack),t.video&&t.video.settings&&(t.video.settings.customTrack?(r.videoTrack=t.video.settings.customTrack,t.video.settings={customTrack:Je}):delete r.videoTrack)}function cd(t){if(Y())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type"];return!!t&&Q(t)==="object"&&(Object.keys(t).filter((function(r){return!e.includes(r)})).forEach((function(r){console.warn("invalid key inputSettings -> audio -> processor : ".concat(r)),delete t[r]})),!!(function(r){return typeof r!="string"?!1:Object.values(Ca).includes(r)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(t.type))}function ld(t){if(Y())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type","config"];return!t||Q(t)!=="object"||!(function(r){return typeof r!="string"?!1:Object.values(pr).includes(r)?!0:(console.error("inputSettings video processor type invalid"),!1)})(t.type)||t.config&&(Q(t.config)!=="object"||!(function(r,s){var i=Object.keys(s);if(i.length===0)return!0;var n="invalid object in inputSettings -> video -> processor -> config";switch(r){case pr.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(n),!1):!(typeof s.strength!="number"||s.strength<=0||s.strength>1||isNaN(s.strength))||(console.error("".concat(n,"; expected: {0 < strength <= 1}, got: ").concat(s.strength)),!1);case pr.BGIMAGE:return!(s.source!==void 0&&!(function(o){if(o.source==="default")return o.type="default",!0;if(o.source instanceof ArrayBuffer)return!0;if(fr(o.source))return o.type="url",!!(function(p){var g=new URL(p),S=g.pathname;if(g.protocol==="data:")try{var C=S.substring(S.indexOf(":")+1,S.indexOf(";")).split("/")[1];return Hr.includes(C)}catch(h){return console.error("failed to deduce blob content type",h),!1}var E=S.split(".").at(-1).toLowerCase().trim();return Hr.includes(E)})(o.source)||(console.error("invalid image type; supported types: [".concat(Hr.join(", "),"]")),!1);return c=o.source,d=Number(c),isNaN(d)||!Number.isInteger(d)||d<=0||d>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(o.type="daily-preselect",!0);var c,d})(s));default:return!0}})(t.type,t.config))?!1:(Object.keys(t).filter((function(r){return!e.includes(r)})).forEach((function(r){console.warn("invalid key inputSettings -> video -> processor : ".concat(r)),delete t[r]})),!0)}function Do(t){return Q(t)==="object"&&(!t.customTrack||t.customTrack instanceof MediaStreamTrack)}function In(){var t=Object.values(pr).join(" | "),e=Object.values(Ca).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(t," ], config?: {} } }, audio?: { processor: {type: [ ").concat(e," ] } } }")}function Ja(t){var e=t.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Ei).concat(e?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Ga(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Mn),".")}function Ha(t){if(t&&Q(t)!=="object"||Array.isArray(t))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(_r),".")),!1;if(t)for(var e=0,r=Object.entries(t);e<r.length;e++)for(var s=me(r[e],1)[0],i=0,n=Object.entries(t[s]);i<n.length;i++){var o=me(n[i],2),c=o[0],d=o[1],p=_r.id[c];if(!p)return console.error("customTrayButton does not support key ".concat(c)),!1;switch(c){case"iconPath":case"iconPathDarkMode":if(!fr(d))return console.error("customTrayButton ".concat(c," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(d))return console.error("customTrayButton ".concat(c," should be ").concat(p,". Got: ").concat(d)),!1;break;default:if(Q(d)!==p)return console.error("customTrayButton ".concat(c," should be a ").concat(p,".")),!1}}return!0}function Wa(t){if(!t||t&&Q(t)!=="object"||Array.isArray(t))return console.error(Ga()),!1;for(var e=function(S){return"".concat(S," should be ").concat(Mn.id[S])},r=function(S,C){return console.error("customIntegration ".concat(S,": ").concat(C))},s=0,i=Object.entries(t);s<i.length;s++){var n=me(i[s],1)[0];if(!("label"in t[n]))return r(n,"label is required"),!1;if(!("location"in t[n]))return r(n,"location is required"),!1;if(!("src"in t[n])&&!("srcdoc"in t[n]))return r(n,"src or srcdoc is required"),!1;for(var o=0,c=Object.entries(t[n]);o<c.length;o++){var d=me(c[o],2),p=d[0],g=d[1];switch(p){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof g!="string")return r(n,e(p)),!1;break;case"iconURL":if(!fr(g))return r(n,"".concat(p," should be a url")),!1;break;case"src":if("srcdoc"in t[n])return r(n,"cannot have both src and srcdoc"),!1;if(!fr(g))return r(n,'src "'.concat(g,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in t[n])return r(n,"cannot have both src and srcdoc"),!1;if(typeof g!="string")return r(n,e(p)),!1;break;case"location":if(!["main","sidebar"].includes(g))return r(n,e(p)),!1;break;case"controlledBy":if(g!=="*"&&g!=="owners"&&(!Array.isArray(g)||g.some((function(S){return typeof S!="string"}))))return r(n,e(p)),!1;break;case"shared":if((!Array.isArray(g)||g.some((function(S){return typeof S!="string"})))&&g!=="owners"&&typeof g!="boolean")return r(n,e(p)),!1;break;default:if(!Mn.id[p])return console.error("customIntegration does not support key ".concat(p)),!1}}}return!0}function za(t,e){if(e===void 0)return!1;switch(Q(e)){case"string":return Q(t)===e;case"object":if(Q(t)!=="object")return!1;for(var r in t)if(!za(t[r],e[r]))return!1;return!0;default:return!1}}function Lo(t,e){var r=t.sessionId,s=t.toEndPoint,i=t.callerId,n=t.useSipRefer;if(!r||!s)throw new Error("".concat(e,"() requires a sessionId and toEndPoint"));if(typeof r!="string"||typeof s!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(n&&!s.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!s.startsWith("sip:")&&!s.startsWith("+"))throw new Error("toEndPoint: ".concat(s,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!s.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function No(t){if(Q(t)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(t.state&&!Object.values(En).includes(t.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(En));if(t.volume){if(typeof t.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(t.volume<0||t.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Ro(t,e,r){return!(typeof t!="number"||t<e||t>r)}function Zr(t,e){return t&&!e&&delete t.data,t}const ud=Object.freeze(Object.defineProperty({__proto__:null,DAILY_ACCESS_LEVEL_FULL:Ti,DAILY_ACCESS_LEVEL_LOBBY:hu,DAILY_ACCESS_LEVEL_NONE:mu,DAILY_ACCESS_UNKNOWN:dr,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:Tu,DAILY_CAMERA_ERROR_CAM_IN_USE:_u,DAILY_CAMERA_ERROR_CONSTRAINTS:Au,DAILY_CAMERA_ERROR_MIC_IN_USE:Cu,DAILY_CAMERA_ERROR_NOT_FOUND:xu,DAILY_CAMERA_ERROR_PERMISSIONS:Eu,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:Pu,DAILY_CAMERA_ERROR_UNKNOWN:ju,DAILY_EVENT_ACCESS_STATE_UPDATED:Bi,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:pa,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:ha,DAILY_EVENT_APP_MSG:sa,DAILY_EVENT_CAMERA_ERROR:Li,DAILY_EVENT_CPU_LOAD_CHANGE:ga,DAILY_EVENT_ERROR:Tn,DAILY_EVENT_EXIT_FULLSCREEN:Rt,DAILY_EVENT_FACE_COUNTS_UPDATED:va,DAILY_EVENT_FULLSCREEN:Nt,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:ji,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:Ai,DAILY_EVENT_INPUT_SETTINGS_UPDATED:_n,DAILY_EVENT_JOINED_MEETING:Ri,DAILY_EVENT_JOINING_MEETING:Ni,DAILY_EVENT_LANG_UPDATED:ka,DAILY_EVENT_LEFT_MEETING:Fi,DAILY_EVENT_LIVE_STREAMING_ERROR:Sa,DAILY_EVENT_LIVE_STREAMING_STARTED:ya,DAILY_EVENT_LIVE_STREAMING_STOPPED:wa,DAILY_EVENT_LIVE_STREAMING_UPDATED:ba,DAILY_EVENT_LOADED:wn,DAILY_EVENT_LOADING:Ii,DAILY_EVENT_LOAD_ATTEMPT_FAILED:Oi,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:da,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:la,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:ua,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:Mu,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:Gi,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:Ji,DAILY_EVENT_NETWORK_CONNECTION:fa,DAILY_EVENT_NETWORK_QUALITY_CHANGE:ma,DAILY_EVENT_NONFATAL_ERROR:Cn,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:Vi,DAILY_EVENT_PARTICIPANT_JOINED:$i,DAILY_EVENT_PARTICIPANT_LEFT:qi,DAILY_EVENT_PARTICIPANT_UPDATED:Ui,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:_a,DAILY_EVENT_RECORDING_DATA:na,DAILY_EVENT_RECORDING_ERROR:ta,DAILY_EVENT_RECORDING_STARTED:Sn,DAILY_EVENT_RECORDING_STATS:ea,DAILY_EVENT_RECORDING_STOPPED:kn,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:ra,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:ia,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:ca,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:aa,DAILY_EVENT_STARTED_CAMERA:Di,DAILY_EVENT_THEME_UPDATED:Mi,DAILY_EVENT_TRACK_STARTED:Yi,DAILY_EVENT_TRACK_STOPPED:Ki,DAILY_EVENT_TRANSCRIPTION_ERROR:Zi,DAILY_EVENT_TRANSCRIPTION_MSG:oa,DAILY_EVENT_TRANSCRIPTION_STARTED:Qi,DAILY_EVENT_TRANSCRIPTION_STOPPED:Xi,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:Hi,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:zi,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:Wi,DAILY_FATAL_ERROR_CONNECTION:xi,DAILY_FATAL_ERROR_EJECTED:gu,DAILY_FATAL_ERROR_EOL:Pi,DAILY_FATAL_ERROR_EXP_ROOM:bu,DAILY_FATAL_ERROR_EXP_TOKEN:wu,DAILY_FATAL_ERROR_MEETING_FULL:Su,DAILY_FATAL_ERROR_NBF_ROOM:vu,DAILY_FATAL_ERROR_NBF_TOKEN:yu,DAILY_FATAL_ERROR_NOT_ALLOWED:ku,DAILY_FATAL_ERROR_NO_ROOM:bn,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:fu,DAILY_RECEIVE_SETTINGS_BASE_KEY:Ei,DAILY_STATE_ERROR:Ue,DAILY_STATE_JOINED:Ke,DAILY_STATE_JOINING:wr,DAILY_STATE_LEFT:ze,DAILY_STATE_NEW:yn,DAILY_TRACK_STATE_BLOCKED:cu,DAILY_TRACK_STATE_INTERRUPTED:pu,DAILY_TRACK_STATE_LOADING:du,DAILY_TRACK_STATE_OFF:lu,DAILY_TRACK_STATE_PLAYABLE:Ci,DAILY_TRACK_STATE_SENDABLE:uu,default:ad},Symbol.toStringTag,{value:"Module"})),dd=Za(ud);var cr={exports:{}},Fo;function pd(){if(Fo)return cr.exports;Fo=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(k,_,A){return Function.prototype.apply.call(k,_,A)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:r=function(k){return Object.getOwnPropertyNames(k)};function s(y){console&&console.warn&&console.warn(y)}var i=Number.isNaN||function(k){return k!==k};function n(){n.init.call(this)}cr.exports=n,cr.exports.once=w,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var o=10;function c(y){if(typeof y!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof y)}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+y+".");o=y}}),n.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||i(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function d(y){return y._maxListeners===void 0?n.defaultMaxListeners:y._maxListeners}n.prototype.getMaxListeners=function(){return d(this)},n.prototype.emit=function(k){for(var _=[],A=1;A<arguments.length;A++)_.push(arguments[A]);var L=k==="error",$=this._events;if($!==void 0)L=L&&$.error===void 0;else if(!L)return!1;if(L){var N;if(_.length>0&&(N=_[0]),N instanceof Error)throw N;var W=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw W.context=N,W}var ne=$[k];if(ne===void 0)return!1;if(typeof ne=="function")e(ne,this,_);else for(var F=ne.length,se=h(ne,F),A=0;A<F;++A)e(se[A],this,_);return!0};function p(y,k,_,A){var L,$,N;if(c(_),$=y._events,$===void 0?($=y._events=Object.create(null),y._eventsCount=0):($.newListener!==void 0&&(y.emit("newListener",k,_.listener?_.listener:_),$=y._events),N=$[k]),N===void 0)N=$[k]=_,++y._eventsCount;else if(typeof N=="function"?N=$[k]=A?[_,N]:[N,_]:A?N.unshift(_):N.push(_),L=d(y),L>0&&N.length>L&&!N.warned){N.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=y,W.type=k,W.count=N.length,s(W)}return y}n.prototype.addListener=function(k,_){return p(this,k,_,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(k,_){return p(this,k,_,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(y,k,_){var A={fired:!1,wrapFn:void 0,target:y,type:k,listener:_},L=g.bind(A);return L.listener=_,A.wrapFn=L,L}n.prototype.once=function(k,_){return c(_),this.on(k,S(this,k,_)),this},n.prototype.prependOnceListener=function(k,_){return c(_),this.prependListener(k,S(this,k,_)),this},n.prototype.removeListener=function(k,_){var A,L,$,N,W;if(c(_),L=this._events,L===void 0)return this;if(A=L[k],A===void 0)return this;if(A===_||A.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete L[k],L.removeListener&&this.emit("removeListener",k,A.listener||_));else if(typeof A!="function"){for($=-1,N=A.length-1;N>=0;N--)if(A[N]===_||A[N].listener===_){W=A[N].listener,$=N;break}if($<0)return this;$===0?A.shift():m(A,$),A.length===1&&(L[k]=A[0]),L.removeListener!==void 0&&this.emit("removeListener",k,W||_)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(k){var _,A,L;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[k]),this;if(arguments.length===0){var $=Object.keys(A),N;for(L=0;L<$.length;++L)N=$[L],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=A[k],typeof _=="function")this.removeListener(k,_);else if(_!==void 0)for(L=_.length-1;L>=0;L--)this.removeListener(k,_[L]);return this};function C(y,k,_){var A=y._events;if(A===void 0)return[];var L=A[k];return L===void 0?[]:typeof L=="function"?_?[L.listener||L]:[L]:_?b(L):h(L,L.length)}n.prototype.listeners=function(k){return C(this,k,!0)},n.prototype.rawListeners=function(k){return C(this,k,!1)},n.listenerCount=function(y,k){return typeof y.listenerCount=="function"?y.listenerCount(k):E.call(y,k)},n.prototype.listenerCount=E;function E(y){var k=this._events;if(k!==void 0){var _=k[y];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function h(y,k){for(var _=new Array(k),A=0;A<k;++A)_[A]=y[A];return _}function m(y,k){for(;k+1<y.length;k++)y[k]=y[k+1];y.pop()}function b(y){for(var k=new Array(y.length),_=0;_<k.length;++_)k[_]=y[_].listener||y[_];return k}function w(y,k){return new Promise(function(_,A){function L(N){y.removeListener(k,$),A(N)}function $(){typeof y.removeListener=="function"&&y.removeListener("error",L),_([].slice.call(arguments))}M(y,k,$,{once:!0}),k!=="error"&&P(y,L,{once:!0})})}function P(y,k,_){typeof y.on=="function"&&M(y,"error",k,_)}function M(y,k,_,A){if(typeof y.on=="function")A.once?y.once(k,_):y.on(k,_);else if(typeof y.addEventListener=="function")y.addEventListener(k,function L($){A.once&&y.removeEventListener(k,L),_($)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof y)}return cr.exports}var Dt={},$e={},$o;function hd(){if($o)return $e;$o=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.Api=$e.HttpClient=$e.ContentType=void 0;var t;(function(s){s.Json="application/json",s.JsonApi="application/vnd.api+json",s.FormData="multipart/form-data",s.UrlEncoded="application/x-www-form-urlencoded",s.Text="text/plain"})(t||($e.ContentType=t={}));class e{constructor(i={}){G(this,"baseUrl","https://api.vapi.ai");G(this,"securityData",null);G(this,"securityWorker");G(this,"abortControllers",new Map);G(this,"customFetch",(...i)=>fetch(...i));G(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});G(this,"setSecurityData",i=>{this.securityData=i});G(this,"contentFormatters",{[t.Json]:i=>i!==null&&(typeof i=="object"||typeof i=="string")?JSON.stringify(i):i,[t.JsonApi]:i=>i!==null&&(typeof i=="object"||typeof i=="string")?JSON.stringify(i):i,[t.Text]:i=>i!==null&&typeof i!="string"?JSON.stringify(i):i,[t.FormData]:i=>i instanceof FormData?i:Object.keys(i||{}).reduce((n,o)=>{const c=i[o];return n.append(o,c instanceof Blob?c:typeof c=="object"&&c!==null?JSON.stringify(c):`${c}`),n},new FormData),[t.UrlEncoded]:i=>this.toQueryString(i)});G(this,"createAbortSignal",i=>{if(this.abortControllers.has(i)){const o=this.abortControllers.get(i);return o?o.signal:void 0}const n=new AbortController;return this.abortControllers.set(i,n),n.signal});G(this,"abortRequest",i=>{const n=this.abortControllers.get(i);n&&(n.abort(),this.abortControllers.delete(i))});G(this,"request",async({body:i,secure:n,path:o,type:c,query:d,format:p,baseUrl:g,cancelToken:S,...C})=>{const E=(typeof n=="boolean"?n:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},h=this.mergeRequestParams(C,E),m=d&&this.toQueryString(d),b=this.contentFormatters[c||t.Json],w=p||h.format;return this.customFetch(`${g||this.baseUrl||""}${o}${m?`?${m}`:""}`,{...h,headers:{...h.headers||{},...c&&c!==t.FormData?{"Content-Type":c}:{}},signal:(S?this.createAbortSignal(S):h.signal)||null,body:typeof i>"u"||i===null?null:b(i)}).then(async P=>{const M=P;M.data=null,M.error=null;const y=w?P.clone():P,k=w?await y[w]().then(_=>(M.ok?M.data=_:M.error=_,M)).catch(_=>(M.error=_,M)):M;if(S&&this.abortControllers.delete(S),!P.ok)throw k;return k})});Object.assign(this,i)}encodeQueryParam(i,n){return`${encodeURIComponent(i)}=${encodeURIComponent(typeof n=="number"?n:`${n}`)}`}addQueryParam(i,n){return this.encodeQueryParam(n,i[n])}addArrayQueryParam(i,n){return i[n].map(c=>this.encodeQueryParam(n,c)).join("&")}toQueryString(i){const n=i||{};return Object.keys(n).filter(c=>typeof n[c]<"u").map(c=>Array.isArray(n[c])?this.addArrayQueryParam(n,c):this.addQueryParam(n,c)).join("&")}addQueryParams(i){const n=this.toQueryString(i);return n?`?${n}`:""}mergeRequestParams(i,n){return{...this.baseApiParams,...i,...n||{},headers:{...this.baseApiParams.headers||{},...i.headers||{},...n&&n.headers||{}}}}}$e.HttpClient=e;class r extends e{constructor(){super(...arguments);G(this,"assistant",{assistantControllerCreate:(n,o={})=>this.request({path:"/assistant",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),assistantControllerFindAll:(n,o={})=>this.request({path:"/assistant",method:"GET",query:n,secure:!0,format:"json",...o}),assistantControllerFindOne:(n,o={})=>this.request({path:`/assistant/${n}`,method:"GET",secure:!0,format:"json",...o}),assistantControllerUpdate:(n,o,c={})=>this.request({path:`/assistant/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),assistantControllerReplace:(n,o,c={})=>this.request({path:`/assistant/${n}`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...c}),assistantControllerRemove:(n,o={})=>this.request({path:`/assistant/${n}`,method:"DELETE",secure:!0,format:"json",...o}),assistantControllerFindVersions:(n,o,c={})=>this.request({path:`/assistant/${n}/version`,method:"GET",query:o,secure:!0,format:"json",...c})});G(this,"v2",{assistantControllerFindAllPaginated:(n,o={})=>this.request({path:"/v2/assistant",method:"GET",query:n,secure:!0,format:"json",...o}),callControllerCallsExport:(n,o={})=>this.request({path:"/v2/call/export",method:"GET",query:n,secure:!0,...o}),callControllerFindAllPaginated:(n,o={})=>this.request({path:"/v2/call",method:"GET",query:n,secure:!0,format:"json",...o}),callControllerFindAllMetadataPaginated:(n,o={})=>this.request({path:"/v2/call/metadata",method:"GET",query:n,secure:!0,format:"json",...o}),phoneNumberControllerFindAllPaginated:(n,o={})=>this.request({path:"/v2/phone-number",method:"GET",query:n,secure:!0,format:"json",...o})});G(this,"squad",{squadControllerCreate:(n,o={})=>this.request({path:"/squad",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),squadControllerFindAll:(n,o={})=>this.request({path:"/squad",method:"GET",query:n,secure:!0,format:"json",...o}),squadControllerFindOne:(n,o={})=>this.request({path:`/squad/${n}`,method:"GET",secure:!0,format:"json",...o}),squadControllerUpdate:(n,o,c={})=>this.request({path:`/squad/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),squadControllerRemove:(n,o={})=>this.request({path:`/squad/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"workflow",{workflowControllerFindAll:(n={})=>this.request({path:"/workflow",method:"GET",secure:!0,format:"json",...n}),workflowControllerCreate:(n,o={})=>this.request({path:"/workflow",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),workflowControllerFindOne:(n,o={})=>this.request({path:`/workflow/${n}`,method:"GET",secure:!0,format:"json",...o}),workflowControllerDelete:(n,o={})=>this.request({path:`/workflow/${n}`,method:"DELETE",secure:!0,format:"json",...o}),workflowControllerUpdate:(n,o,c={})=>this.request({path:`/workflow/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c})});G(this,"call",{callControllerCreate:(n,o={})=>this.request({path:"/call",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),callControllerFindAll:(n,o={})=>this.request({path:"/call",method:"GET",query:n,secure:!0,format:"json",...o}),callControllerFindOne:(n,o={})=>this.request({path:`/call/${n}`,method:"GET",secure:!0,format:"json",...o}),callControllerUpdate:(n,o,c={})=>this.request({path:`/call/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),callControllerDeleteCallData:(n,o,c={})=>this.request({path:`/call/${n}`,method:"DELETE",body:o,secure:!0,type:t.Json,format:"json",...c}),callControllerCreatePhoneCall:(n,o={})=>this.request({path:"/call/phone",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),callControllerCreateWebCall:(n,o={})=>this.request({path:"/call/web",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"chat",{chatControllerListChats:(n,o={})=>this.request({path:"/chat",method:"GET",query:n,secure:!0,format:"json",...o}),chatControllerCreateChat:(n,o={})=>this.request({path:"/chat",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),chatControllerGetChat:(n,o={})=>this.request({path:`/chat/${n}`,method:"GET",secure:!0,format:"json",...o}),chatControllerDeleteChat:(n,o={})=>this.request({path:`/chat/${n}`,method:"DELETE",secure:!0,format:"json",...o}),chatControllerCreateOpenAiChat:(n,o={})=>this.request({path:"/chat/responses",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),chatControllerCreateWebChat:(n,o={})=>this.request({path:"/chat/web",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),chatControllerCreateOpenAiWebChat:(n,o={})=>this.request({path:"/chat/web/responses",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"campaign",{campaignControllerCreate:(n,o={})=>this.request({path:"/campaign",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),campaignControllerFindAll:(n,o={})=>this.request({path:"/campaign",method:"GET",query:n,secure:!0,format:"json",...o}),campaignControllerFindOne:(n,o={})=>this.request({path:`/campaign/${n}`,method:"GET",secure:!0,format:"json",...o}),campaignControllerUpdate:(n,o,c={})=>this.request({path:`/campaign/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),campaignControllerRemove:(n,o={})=>this.request({path:`/campaign/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"session",{sessionControllerCreate:(n,o={})=>this.request({path:"/session",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),sessionControllerFindAllPaginated:(n,o={})=>this.request({path:"/session",method:"GET",query:n,secure:!0,format:"json",...o}),sessionControllerFindOne:(n,o={})=>this.request({path:`/session/${n}`,method:"GET",secure:!0,format:"json",...o}),sessionControllerUpdate:(n,o,c={})=>this.request({path:`/session/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),sessionControllerRemove:(n,o={})=>this.request({path:`/session/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"phoneNumber",{phoneNumberControllerImportTwilio:(n,o={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),phoneNumberControllerImportVonage:(n,o={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),phoneNumberControllerCreate:(n,o={})=>this.request({path:"/phone-number",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),phoneNumberControllerFindAll:(n,o={})=>this.request({path:"/phone-number",method:"GET",query:n,secure:!0,format:"json",...o}),phoneNumberControllerFindOne:(n,o={})=>this.request({path:`/phone-number/${n}`,method:"GET",secure:!0,format:"json",...o}),phoneNumberControllerUpdate:(n,o,c={})=>this.request({path:`/phone-number/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),phoneNumberControllerRemove:(n,o={})=>this.request({path:`/phone-number/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"tool",{toolControllerCreate:(n,o={})=>this.request({path:"/tool",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),toolControllerFindAll:(n,o={})=>this.request({path:"/tool",method:"GET",query:n,secure:!0,format:"json",...o}),toolControllerFindOne:(n,o={})=>this.request({path:`/tool/${n}`,method:"GET",secure:!0,format:"json",...o}),toolControllerUpdate:(n,o,c={})=>this.request({path:`/tool/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),toolControllerRemove:(n,o={})=>this.request({path:`/tool/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"file",{fileControllerCreateDeprecated:(n,o={})=>this.request({path:"/file/upload",method:"POST",body:n,secure:!0,type:t.FormData,format:"json",...o}),fileControllerCreate:(n,o={})=>this.request({path:"/file",method:"POST",body:n,secure:!0,type:t.FormData,format:"json",...o}),fileControllerFindAll:(n={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...n}),fileControllerFindOne:(n,o={})=>this.request({path:`/file/${n}`,method:"GET",secure:!0,format:"json",...o}),fileControllerUpdate:(n,o,c={})=>this.request({path:`/file/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),fileControllerRemove:(n,o={})=>this.request({path:`/file/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"knowledgeBase",{knowledgeBaseControllerCreate:(n,o={})=>this.request({path:"/knowledge-base",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),knowledgeBaseControllerFindAll:(n,o={})=>this.request({path:"/knowledge-base",method:"GET",query:n,secure:!0,format:"json",...o}),knowledgeBaseControllerFindOne:(n,o={})=>this.request({path:`/knowledge-base/${n}`,method:"GET",secure:!0,format:"json",...o}),knowledgeBaseControllerUpdate:(n,o,c={})=>this.request({path:`/knowledge-base/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),knowledgeBaseControllerRemove:(n,o={})=>this.request({path:`/knowledge-base/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"structuredOutput",{structuredOutputControllerFindAll:(n,o={})=>this.request({path:"/structured-output",method:"GET",query:n,secure:!0,format:"json",...o}),structuredOutputControllerCreate:(n,o={})=>this.request({path:"/structured-output",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),structuredOutputControllerFindOne:(n,o={})=>this.request({path:`/structured-output/${n}`,method:"GET",secure:!0,format:"json",...o}),structuredOutputControllerUpdate:(n,o,c,d={})=>this.request({path:`/structured-output/${n}`,method:"PATCH",query:o,body:c,secure:!0,type:t.Json,format:"json",...d}),structuredOutputControllerRemove:(n,o={})=>this.request({path:`/structured-output/${n}`,method:"DELETE",secure:!0,format:"json",...o}),structuredOutputControllerRun:(n,o={})=>this.request({path:"/structured-output/run",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"testSuite",{testSuiteControllerFindAllPaginated:(n,o={})=>this.request({path:"/test-suite",method:"GET",query:n,secure:!0,format:"json",...o}),testSuiteControllerCreate:(n,o={})=>this.request({path:"/test-suite",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),testSuiteControllerFindOne:(n,o={})=>this.request({path:`/test-suite/${n}`,method:"GET",secure:!0,format:"json",...o}),testSuiteControllerUpdate:(n,o,c={})=>this.request({path:`/test-suite/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),testSuiteControllerRemove:(n,o={})=>this.request({path:`/test-suite/${n}`,method:"DELETE",secure:!0,format:"json",...o}),testSuiteTestControllerFindAllPaginated:(n,o,c={})=>this.request({path:`/test-suite/${n}/test`,method:"GET",query:o,secure:!0,format:"json",...c}),testSuiteTestControllerCreate:(n,o,c={})=>this.request({path:`/test-suite/${n}/test`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),testSuiteTestControllerFindOne:(n,o,c={})=>this.request({path:`/test-suite/${n}/test/${o}`,method:"GET",secure:!0,format:"json",...c}),testSuiteTestControllerUpdate:(n,o,c,d={})=>this.request({path:`/test-suite/${n}/test/${o}`,method:"PATCH",body:c,secure:!0,type:t.Json,format:"json",...d}),testSuiteTestControllerRemove:(n,o,c={})=>this.request({path:`/test-suite/${n}/test/${o}`,method:"DELETE",secure:!0,format:"json",...c}),testSuiteRunControllerFindAllPaginated:(n,o,c={})=>this.request({path:`/test-suite/${n}/run`,method:"GET",query:o,secure:!0,format:"json",...c}),testSuiteRunControllerCreate:(n,o,c={})=>this.request({path:`/test-suite/${n}/run`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),testSuiteRunControllerFindOne:(n,o,c={})=>this.request({path:`/test-suite/${n}/run/${o}`,method:"GET",secure:!0,format:"json",...c}),testSuiteRunControllerUpdate:(n,o,c,d={})=>this.request({path:`/test-suite/${n}/run/${o}`,method:"PATCH",body:c,secure:!0,type:t.Json,format:"json",...d}),testSuiteRunControllerRemove:(n,o,c={})=>this.request({path:`/test-suite/${n}/run/${o}`,method:"DELETE",secure:!0,format:"json",...c})});G(this,"reporting",{insightControllerCreate:(n,o={})=>this.request({path:"/reporting/insight",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),insightControllerFindAll:(n,o={})=>this.request({path:"/reporting/insight",method:"GET",query:n,secure:!0,format:"json",...o}),insightControllerUpdate:(n,o,c={})=>this.request({path:`/reporting/insight/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),insightControllerFindOne:(n,o={})=>this.request({path:`/reporting/insight/${n}`,method:"GET",secure:!0,format:"json",...o}),insightControllerRemove:(n,o={})=>this.request({path:`/reporting/insight/${n}`,method:"DELETE",secure:!0,format:"json",...o}),insightControllerRun:(n,o,c={})=>this.request({path:`/reporting/insight/${n}/run`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),insightControllerPreview:(n,o={})=>this.request({path:"/reporting/insight/preview",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"eval",{evalControllerCreate:(n,o={})=>this.request({path:"/eval",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),evalControllerGetPaginated:(n,o={})=>this.request({path:"/eval",method:"GET",query:n,secure:!0,format:"json",...o}),evalControllerUpdate:(n,o,c={})=>this.request({path:`/eval/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),evalControllerRemove:(n,o={})=>this.request({path:`/eval/${n}`,method:"DELETE",secure:!0,format:"json",...o}),evalControllerGet:(n,o={})=>this.request({path:`/eval/${n}`,method:"GET",secure:!0,format:"json",...o}),evalControllerRemoveRun:(n,o={})=>this.request({path:`/eval/run/${n}`,method:"DELETE",secure:!0,format:"json",...o}),evalControllerGetRun:(n,o={})=>this.request({path:`/eval/run/${n}`,method:"GET",secure:!0,format:"json",...o}),evalControllerRun:(n,o={})=>this.request({path:"/eval/run",method:"POST",body:n,secure:!0,type:t.Json,...o}),evalControllerGetRunsPaginated:(n,o={})=>this.request({path:"/eval/run",method:"GET",query:n,secure:!0,format:"json",...o})});G(this,"observability",{scorecardControllerGet:(n,o={})=>this.request({path:`/observability/scorecard/${n}`,method:"GET",secure:!0,format:"json",...o}),scorecardControllerUpdate:(n,o,c={})=>this.request({path:`/observability/scorecard/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),scorecardControllerRemove:(n,o={})=>this.request({path:`/observability/scorecard/${n}`,method:"DELETE",secure:!0,format:"json",...o}),scorecardControllerGetPaginated:(n,o={})=>this.request({path:"/observability/scorecard",method:"GET",query:n,secure:!0,format:"json",...o}),scorecardControllerCreate:(n,o={})=>this.request({path:"/observability/scorecard",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})});G(this,"org",{orgControllerCreate:(n,o={})=>this.request({path:"/org",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),orgControllerFindAll:(n={})=>this.request({path:"/org",method:"GET",secure:!0,format:"json",...n}),orgControllerFeatureFlagEnabled:(n,o={})=>this.request({path:"/org/feature-flag",method:"GET",query:n,secure:!0,format:"json",...o}),orgControllerFindOne:(n,o={})=>this.request({path:`/org/${n}`,method:"GET",secure:!0,format:"json",...o}),orgControllerUpdate:(n,o,c={})=>this.request({path:`/org/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),orgControllerDeleteOrg:(n,o={})=>this.request({path:`/org/${n}`,method:"DELETE",secure:!0,...o}),orgControllerFindAllUsers:(n,o={})=>this.request({path:`/org/${n}/user`,method:"GET",secure:!0,format:"json",...o}),orgControllerOrgLeave:(n,o={})=>this.request({path:`/org/${n}/leave`,method:"DELETE",secure:!0,...o}),orgControllerOrgRemoveUser:(n,o,c={})=>this.request({path:`/org/${n}/member/${o}/leave`,method:"DELETE",secure:!0,...c}),orgControllerUsersInvite:(n,o,c={})=>this.request({path:`/org/${n}/invite`,method:"POST",body:o,secure:!0,type:t.Json,...c}),orgControllerUserUpdate:(n,o,c={})=>this.request({path:`/org/${n}/role`,method:"PATCH",body:o,secure:!0,type:t.Json,...c}),orgControllerOrgToken:(n,o={})=>this.request({path:`/org/${n}/auth`,method:"GET",secure:!0,format:"json",...o})});G(this,"token",{tokenControllerCreate:(n,o={})=>this.request({path:"/token",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),tokenControllerFindAll:(n,o={})=>this.request({path:"/token",method:"GET",query:n,secure:!0,format:"json",...o}),tokenControllerFindOne:(n,o={})=>this.request({path:`/token/${n}`,method:"GET",secure:!0,format:"json",...o}),tokenControllerUpdate:(n,o,c={})=>this.request({path:`/token/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),tokenControllerRemove:(n,o={})=>this.request({path:`/token/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"credential",{credentialControllerCreate:(n,o={})=>this.request({path:"/credential",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),credentialControllerFindAll:(n,o={})=>this.request({path:"/credential",method:"GET",query:n,secure:!0,format:"json",...o}),credentialControllerFindOne:(n,o={})=>this.request({path:`/credential/${n}`,method:"GET",secure:!0,format:"json",...o}),credentialControllerUpdate:(n,o,c={})=>this.request({path:`/credential/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),credentialControllerRemove:(n,o={})=>this.request({path:`/credential/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"template",{templateControllerCreate:(n,o={})=>this.request({path:"/template",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),templateControllerFindAll:(n,o={})=>this.request({path:"/template",method:"GET",query:n,secure:!0,format:"json",...o}),templateControllerFindAllPinned:(n={})=>this.request({path:"/template/pinned",method:"GET",secure:!0,format:"json",...n}),templateControllerFindOne:(n,o={})=>this.request({path:`/template/${n}`,method:"GET",secure:!0,format:"json",...o}),templateControllerUpdate:(n,o,c={})=>this.request({path:`/template/${n}`,method:"PATCH",body:o,secure:!0,type:t.Json,format:"json",...c}),templateControllerRemove:(n,o={})=>this.request({path:`/template/${n}`,method:"DELETE",secure:!0,format:"json",...o})});G(this,"voiceLibrary",{voiceLibraryControllerVoiceGetByProvider:(n,o,c={})=>this.request({path:`/voice-library/${n}`,method:"GET",query:o,secure:!0,format:"json",...c}),voiceLibraryControllerVoiceGetAccentsByProvider:(n,o={})=>this.request({path:`/voice-library/${n}/accents`,method:"GET",secure:!0,format:"json",...o}),voiceLibraryControllerVoiceLibrarySyncByProvider:(n,o={})=>this.request({path:`/voice-library/sync/${n}`,method:"POST",secure:!0,format:"json",...o}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(n,o={})=>this.request({path:"/voice-library/sync",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o}),voiceLibraryControllerVoiceLibraryCreateSesameVoice:(n,o={})=>this.request({path:"/voice-library/create-sesame-voice",method:"POST",body:n,secure:!0,type:t.Json,...o})});G(this,"provider",{providerResourceControllerCreateProviderResource:(n,o,c={})=>this.request({path:`/provider/${n}/${o}`,method:"POST",secure:!0,format:"json",...c}),providerResourceControllerGetProviderResourcesPaginated:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}`,method:"GET",query:c,secure:!0,format:"json",...d}),providerResourceControllerGetProviderResource:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}/${c}`,method:"GET",secure:!0,format:"json",...d}),providerResourceControllerDeleteProviderResource:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}/${c}`,method:"DELETE",secure:!0,format:"json",...d}),providerResourceControllerUpdateProviderResource:(n,o,c,d={})=>this.request({path:`/provider/${n}/${o}/${c}`,method:"PATCH",secure:!0,format:"json",...d}),providerControllerGetWorkflows:(n,o,c={})=>this.request({path:`/${n}/workflows`,method:"GET",query:o,secure:!0,format:"json",...c}),providerControllerGetWorkflowTriggerHook:(n,o,c={})=>this.request({path:`/${n}/workflows/${o}/hooks`,method:"GET",secure:!0,format:"json",...c}),providerControllerGetLocations:(n,o={})=>this.request({path:`/${n}/locations`,method:"GET",secure:!0,format:"json",...o}),voiceProviderControllerSearchVoices:(n,o,c={})=>this.request({path:`/${n}/voices/search`,method:"GET",query:o,secure:!0,format:"json",...c}),voiceProviderControllerSearchVoice:(n,o,c={})=>this.request({path:`/${n}/voice/search`,method:"GET",query:o,secure:!0,format:"json",...c}),voiceProviderControllerAddVoices:(n,o,c={})=>this.request({path:`/${n}/voices/add`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c}),voiceProviderControllerAddVoice:(n,o,c={})=>this.request({path:`/${n}/voice/add`,method:"POST",body:o,secure:!0,type:t.Json,format:"json",...c})});G(this,"v11Labs",{voiceProviderControllerCloneVoices:(n,o={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:n,secure:!0,type:t.FormData,...o})});G(this,"analytics",{analyticsControllerQuery:(n,o={})=>this.request({path:"/analytics",method:"POST",body:n,secure:!0,type:t.Json,format:"json",...o})})}}return $e.Api=r,$e}var Uo;function md(){if(Uo)return Dt;Uo=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.client=void 0;const t=hd(),e=new t.Api({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async r=>{if(r)return{headers:{Authorization:`Bearer ${r}`}}}});return Dt.client=e,Dt}var st={},qo;function fd(){if(qo)return st;qo=1,Object.defineProperty(st,"__esModule",{value:!0}),st.createSafeDailyConfig=t,st.safeSetLocalAudio=e,st.safeSetInputDevicesAsync=r,st.createSafeDailyFactoryOptions=s;function t(i){if(!i)return{};const{alwaysIncludeMicInPermissionPrompt:n,...o}=i;return n===!1?(console.warn("[Vapi] alwaysIncludeMicInPermissionPrompt:false detected. This can cause Chrome 140+ issues. Removing the property."),o):i}function e(i,n){if(!i)throw new Error("Call object is not available.");i.setLocalAudio(n)}async function r(i,n){if(!i)throw new Error("Call object is not available.");if("audioSource"in n&&n.audioSource===!1){console.warn("[Vapi] setInputDevicesAsync with audioSource:false detected. This can cause Chrome 140+ issues. Using default device instead.");const{audioSource:o,...c}=n;await i.setInputDevicesAsync(c);return}await i.setInputDevicesAsync(n)}function s(i){return i?i.audioSource===!1?(console.warn("[Vapi] audioSource:false detected in factory options. This can cause Chrome 140+ issues. Defaulting to true."),{...i,audioSource:!0}):i:{}}return st}var Vo;function gd(){if(Vo)return ft;Vo=1;var t=ft&&ft.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ft,"__esModule",{value:!0});const e=t(dd),r=t(pd()),s=md(),i=fd();function n(C){if(C==null)return{message:"Unknown error (null or undefined)"};if(C instanceof Error){const E={message:C.message,name:C.name,stack:C.stack},h=C;return h.code!==void 0&&(E.code=h.code),h.cause!==void 0&&(E.cause=String(h.cause)),h.reason!==void 0&&(E.reason=h.reason),h.details!==void 0&&(E.details=h.details),h.errorMsg!==void 0&&(E.errorMsg=h.errorMsg),h.error!==void 0&&typeof h.error=="string"&&(E.errorDetail=h.error),E}if(typeof C=="string")return{message:C};if(typeof C=="object"){const E=C;return{message:E.message||E.error||JSON.stringify(C),...E}}return{message:String(C)}}async function o(C,E){C.muted=!1,C.autoplay=!0,E!=null&&(C.srcObject=new MediaStream([E]),await C.play())}async function c(C,E){const h=document.createElement("audio");return h.dataset.participantId=E,document.body.appendChild(h),await o(h,C),h}function d(C){const E=document.querySelector(`audio[data-participant-id="${C}"]`);E==null||E.remove()}function p(C,E,h,m){C.participant.local||E.updateParticipant(C.participant.session_id,{setSubscribedTracks:{audio:!0,video:h||m}})}class g extends r.default{on(E,h){return super.on(E,h),this}once(E,h){return super.once(E,h),this}emit(E,...h){return super.emit(E,...h)}removeListener(E,h){return super.removeListener(E,h),this}removeAllListeners(E){return super.removeAllListeners(E),this}}class S extends g{constructor(h,m,b,w){super();G(this,"started",!1);G(this,"call",null);G(this,"speakingTimeout",null);G(this,"dailyCallConfig",{});G(this,"dailyCallObject",{});G(this,"hasEmittedCallEndedStatus",!1);s.client.baseUrl=m??"https://api.vapi.ai",s.client.setSecurityData(h),this.dailyCallConfig=(0,i.createSafeDailyConfig)(b),this.dailyCallObject=(0,i.createSafeDailyFactoryOptions)(w)}async cleanup(){this.started=!1,this.hasEmittedCallEndedStatus=!1,this.call&&(await this.call.destroy(),this.call=null),this.speakingTimeout=null}isMobileDevice(){if(typeof navigator>"u")return!1;const h=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(h.toLowerCase())}async sleep(h){return new Promise(m=>setTimeout(m,h))}async start(h,m,b,w,P,M){var k,_,A,L,$,N,W;const y=Date.now();if(!h&&!b&&!w){const ne=new Error("Assistant or Squad or Workflow must be provided.");throw this.emit("error",{type:"validation-error",stage:"input-validation",error:n(ne),timestamp:new Date().toISOString()}),ne}if(this.started)return this.emit("call-start-progress",{stage:"validation",status:"failed",timestamp:new Date().toISOString(),metadata:{reason:"already-started"}}),null;this.emit("call-start-progress",{stage:"initialization",status:"started",timestamp:new Date().toISOString(),metadata:{hasAssistant:!!h,hasSquad:!!b,hasWorkflow:!!w}}),this.started=!0;try{this.emit("call-start-progress",{stage:"web-call-creation",status:"started",timestamp:new Date().toISOString()});const ne=Date.now(),F=(await s.client.call.callControllerCreateWebCall({assistant:typeof h=="string"?void 0:h,assistantId:typeof h=="string"?h:void 0,assistantOverrides:m,squad:typeof b=="string"?void 0:b,squadId:typeof b=="string"?b:void 0,workflow:typeof w=="string"?void 0:w,workflowId:typeof w=="string"?w:void 0,workflowOverrides:P,roomDeleteOnUserLeaveEnabled:M==null?void 0:M.roomDeleteOnUserLeaveEnabled})).data,se=Date.now()-ne;this.emit("call-start-progress",{stage:"web-call-creation",status:"completed",duration:se,timestamp:new Date().toISOString(),metadata:{callId:(F==null?void 0:F.id)||"unknown",videoRecordingEnabled:((k=F==null?void 0:F.artifactPlan)==null?void 0:k.videoRecordingEnabled)??!1,voiceProvider:((A=(_=F==null?void 0:F.assistant)==null?void 0:_.voice)==null?void 0:A.provider)||"unknown"}}),this.call&&(this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{action:"cleanup-existing"}}),await this.cleanup());const ie=((L=F==null?void 0:F.artifactPlan)==null?void 0:L.videoRecordingEnabled)??!1,V=((N=($=F==null?void 0:F.assistant)==null?void 0:$.voice)==null?void 0:N.provider)==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??ie,isVideoRecordingEnabled:ie,isVideoEnabled:V}});const X=Date.now();try{this.call=e.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??ie,dailyConfig:this.dailyCallConfig});const a=Date.now()-X;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-X,l=n(a);throw this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"daily-call-object-creation-error",stage:"daily-call-object-creation",error:l,timestamp:new Date().toISOString()}),a}(W=this.call.iframe())==null||W.style.setProperty("display","none"),this.call.on("left-meeting",()=>{var a;this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),ie&&((a=this.call)==null||a.stopRecording()),this.cleanup().catch(console.error)}),this.call.on("error",a=>{var u;this.emit("error",{type:"daily-error",error:n(a),timestamp:new Date().toISOString()}),ie&&((u=this.call)==null||u.stopRecording())}),this.call.on("camera-error",a=>{this.emit("camera-error",{type:"camera-error",error:n(a),timestamp:new Date().toISOString()})}),this.call.on("network-quality-change",a=>{this.emit("network-quality-change",a)}),this.call.on("network-connection",a=>{this.emit("network-connection",a)}),this.call.on("track-started",async a=>{var u,l,f;!a||!a.participant||(u=a.participant)!=null&&u.local||((l=a.participant)==null?void 0:l.user_name)==="Vapi Speaker"&&(a.track.kind==="video"&&this.emit("video",a.track),a.track.kind==="audio"&&await c(a.track,a.participant.session_id),(f=this.call)==null||f.sendAppMessage("playable"))}),this.call.on("participant-joined",a=>{!a||!this.call||p(a,this.call,ie,V)}),this.call.on("participant-updated",a=>{a&&this.emit("daily-participant-updated",a.participant)}),this.call.on("participant-left",a=>{a&&d(a.participant.session_id)});const ye=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:ye}}),ye){const a=Date.now();await this.sleep(1e3);const u=Date.now()-a;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:u,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const ae=Date.now();try{await this.call.join({url:F.webCallUrl,subscribeToTracksAutomatically:!1});const a=Date.now()-ae;this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-ae,l=n(a);throw this.emit("call-start-progress",{stage:"daily-call-join",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"daily-call-join-error",stage:"daily-call-join",error:l,duration:u,timestamp:new Date().toISOString()}),a}if(ie){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const a=new Date().getTime(),u=Date.now();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const l=Date.now()-u;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:l,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const f=(new Date().getTime()-a)/1e3;this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:f}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:f})})}catch(l){const f=Date.now()-u,v=n(l);this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:f,timestamp:new Date().toISOString(),metadata:{error:v.message}}),this.emit("error",{type:"video-recording-setup-error",stage:"video-recording-setup",error:v,timestamp:new Date().toISOString()})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const le=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const a=Date.now()-le;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-le,l=n(a);this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"audio-observer-setup-error",stage:"audio-observer-setup",error:l,timestamp:new Date().toISOString()})}this.call.on("remote-participants-audio-level",a=>{a&&this.handleRemoteParticipantsAudioLevel(a)}),this.call.on("app-message",a=>this.onAppMessage(a)),this.call.on("nonfatal-error",a=>{var u;(a==null?void 0:a.type)==="audio-processor-error"&&((u=this.call)==null||u.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{(0,i.safeSetLocalAudio)(this.call,!0)}))}),this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const Ae=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const a=Date.now()-Ae;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-Ae,l=n(a);this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}}),this.emit("error",{type:"audio-processing-setup-error",stage:"audio-processing-setup",error:l,timestamp:new Date().toISOString()})}const Fe=Date.now()-y;return this.emit("call-start-success",{totalDuration:Fe,callId:(F==null?void 0:F.id)||"unknown",timestamp:new Date().toISOString()}),F}catch(ne){const F=Date.now()-y,se=n(ne);return this.emit("call-start-failed",{stage:"unknown",totalDuration:F,error:se.message,errorStack:se.stack||"No stack trace available",timestamp:new Date().toISOString(),context:{hasAssistant:!!h,hasSquad:!!b,hasWorkflow:!!w,isMobile:this.isMobileDevice()}}),this.emit("error",{type:"start-method-error",stage:"unknown",error:se,totalDuration:F,timestamp:new Date().toISOString(),context:{hasAssistant:!!h,hasSquad:!!b,hasWorkflow:!!w,isMobile:this.isMobileDevice()}}),await this.cleanup(),null}}onAppMessage(h){if(h)try{if(h.data==="listening")return this.emit("call-start");try{const m=JSON.parse(h.data);this.emit("message",m),m&&"type"in m&&"status"in m&&m.type==="status-update"&&m.status==="ended"&&(this.hasEmittedCallEndedStatus=!0)}catch(m){console.log("Error parsing message data: ",m)}}catch(m){console.error(m)}}handleRemoteParticipantsAudioLevel(h){const m=Object.values(h.participantsAudioLevel).reduce((w,P)=>w+P,0);this.emit("volume-level",Math.min(1,m/.15)),m>.01&&(this.speakingTimeout?(clearTimeout(this.speakingTimeout),this.speakingTimeout=null):this.emit("speech-start"),this.speakingTimeout=setTimeout(()=>{this.emit("speech-end"),this.speakingTimeout=null},1e3))}async stop(){this.started=!1,this.call&&(await this.call.destroy(),this.call=null),this.speakingTimeout=null}send(h){var m;(m=this.call)==null||m.sendAppMessage(JSON.stringify(h))}setMuted(h){(0,i.safeSetLocalAudio)(this.call,!h)}isMuted(){return this.call?this.call.localAudio()===!1:!1}say(h,m,b,w){this.send({type:"say",message:h,endCallAfterSpoken:m,interruptionsEnabled:b??!1,interruptAssistantEnabled:w??!1})}end(){this.send({type:"end-call"}),this.stop()}setInputDevicesAsync(h){return(0,i.safeSetInputDevicesAsync)(this.call,h)}async increaseMicLevel(h){if(!this.call)throw new Error("Call object is not available.");try{const m=await navigator.mediaDevices.getUserMedia({audio:!0}),b=new AudioContext,w=b.createMediaStreamSource(m),P=b.createGain();P.gain.value=h,w.connect(P);const M=b.createMediaStreamDestination();P.connect(M);const[y]=M.stream.getAudioTracks();await(0,i.safeSetInputDevicesAsync)(this.call,{audioSource:y})}catch(m){console.error("Error adjusting microphone level:",m)}}setOutputDeviceAsync(h){var m;(m=this.call)==null||m.setOutputDeviceAsync(h)}getDailyCallObject(){return this.call}startScreenSharing(h,m){var b;(b=this.call)==null||b.startScreenShare({displayMediaOptions:h,screenVideoSendSettings:m})}stopScreenSharing(){var h;(h=this.call)==null||h.stopScreenShare()}async reconnect(h){var b,w,P,M,y,k,_,A,L,$,N,W,ne;const m=Date.now();if(this.started)throw new Error("Cannot reconnect while a call is already in progress. Call stop() first.");if(!h.webCallUrl)throw new Error("webCallUrl is required for reconnection.");this.emit("call-start-progress",{stage:"reconnect-initialization",status:"started",timestamp:new Date().toISOString(),metadata:{callId:h.id||"unknown",hasVideoRecording:!!((b=h==null?void 0:h.artifactPlan)!=null&&b.videoRecordingEnabled),voiceProvider:((P=(w=h==null?void 0:h.assistant)==null?void 0:w.voice)==null?void 0:P.provider)||"unknown"}}),this.started=!0;try{this.call&&(this.emit("call-start-progress",{stage:"cleanup-existing-call",status:"started",timestamp:new Date().toISOString()}),await this.cleanup(),this.emit("call-start-progress",{stage:"cleanup-existing-call",status:"completed",timestamp:new Date().toISOString()}));const F=((M=h==null?void 0:h.artifactPlan)==null?void 0:M.videoRecordingEnabled)??!1,se=((k=(y=h==null?void 0:h.assistant)==null?void 0:y.voice)==null?void 0:k.provider)==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??F,isVideoRecordingEnabled:F,isVideoEnabled:se}});const ie=Date.now();this.call=e.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??F,dailyConfig:this.dailyCallConfig});const V=Date.now()-ie;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:V,timestamp:new Date().toISOString()}),(_=this.call.iframe())==null||_.style.setProperty("display","none"),this.call.on("left-meeting",()=>{var a;this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),F&&((a=this.call)==null||a.stopRecording()),this.cleanup().catch(console.error)}),this.call.on("error",a=>{var u;this.emit("error",{type:"daily-error",error:n(a),timestamp:new Date().toISOString()}),F&&((u=this.call)==null||u.stopRecording())}),this.call.on("camera-error",a=>{this.emit("camera-error",{type:"camera-error",error:n(a),timestamp:new Date().toISOString()})}),this.call.on("network-quality-change",a=>{this.emit("network-quality-change",a)}),this.call.on("network-connection",a=>{this.emit("network-connection",a)}),this.call.on("track-started",async a=>{var u,l,f;!a||!a.participant||(u=a.participant)!=null&&u.local||((l=a.participant)==null?void 0:l.user_name)==="Vapi Speaker"&&(a.track.kind==="video"&&this.emit("video",a.track),a.track.kind==="audio"&&await c(a.track,a.participant.session_id),(f=this.call)==null||f.sendAppMessage("playable"))}),this.call.on("participant-joined",a=>{!a||!this.call||p(a,this.call,F,se)}),this.call.on("participant-updated",a=>{a&&this.emit("daily-participant-updated",a.participant)}),this.call.on("participant-left",a=>{a&&d(a.participant.session_id)}),this.call.on("remote-participants-audio-level",a=>{a&&this.handleRemoteParticipantsAudioLevel(a)}),this.call.on("app-message",a=>this.onAppMessage(a)),this.call.on("nonfatal-error",a=>{var u;(a==null?void 0:a.type)==="audio-processor-error"&&((u=this.call)==null||u.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{(0,i.safeSetLocalAudio)(this.call,!0)}))});const X=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:X}}),X){const a=Date.now();await this.sleep(1e3);const u=Date.now()-a;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:u,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const ye=Date.now();await this.call.join({url:h.webCallUrl,subscribeToTracksAutomatically:!1});const ae=Date.now()-ye;if(this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:ae,timestamp:new Date().toISOString()}),F){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const a=Date.now(),u=new Date().getTime();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const l=Date.now()-a;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:l,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const f=(new Date().getTime()-u)/1e3;this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:f}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:f})})}catch(l){const f=Date.now()-a,v=n(l);this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:f,timestamp:new Date().toISOString(),metadata:{error:v.message}})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const le=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const a=Date.now()-le;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-le,l=n(a);this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}})}this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const Ae=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const a=Date.now()-Ae;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:a,timestamp:new Date().toISOString()})}catch(a){const u=Date.now()-Ae,l=n(a);this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:u,timestamp:new Date().toISOString(),metadata:{error:l.message}})}const Fe=Date.now()-m;this.emit("call-start-success",{totalDuration:Fe,callId:(h==null?void 0:h.id)||"unknown",timestamp:new Date().toISOString()}),this.emit("call-start")}catch(F){const se=Date.now()-m,ie=n(F);throw this.emit("call-start-failed",{stage:"reconnect",totalDuration:se,error:ie.message,errorStack:ie.stack||"No stack trace available",timestamp:new Date().toISOString(),context:{isReconnect:!0,callId:(h==null?void 0:h.id)||"unknown",hasVideoRecording:!!((A=h==null?void 0:h.artifactPlan)!=null&&A.videoRecordingEnabled),voiceProvider:(($=(L=h==null?void 0:h.assistant)==null?void 0:L.voice)==null?void 0:$.provider)||"unknown",isMobile:this.isMobileDevice()}}),this.emit("error",{type:"reconnect-error",error:ie,totalDuration:se,timestamp:new Date().toISOString(),context:{isReconnect:!0,callId:(h==null?void 0:h.id)||"unknown",hasVideoRecording:!!((N=h==null?void 0:h.artifactPlan)!=null&&N.videoRecordingEnabled),voiceProvider:((ne=(W=h==null?void 0:h.assistant)==null?void 0:W.voice)==null?void 0:ne.provider)||"unknown",isMobile:this.isMobileDevice()}}),await this.cleanup(),F}}static async runNetworkTestsStandalone(){console.log("Starting standalone network connectivity tests...");const h={};let m=null;try{console.log("Creating temporary call object for testing..."),m=e.default.createCallObject({audioSource:!0,videoSource:!0}),console.log(`
|
|
59
59
|
1. Testing network connectivity (TURN server)...`);let b=null;try{b=(await navigator.mediaDevices.getUserMedia({video:!0})).getVideoTracks()[0];const P=await m.testNetworkConnectivity(b);h.networkConnectivity=P,console.log("Network connectivity test result:",P)}catch(w){h.networkConnectivity={result:"error",error:w==null?void 0:w.toString()},console.error("Network connectivity test error:",w)}finally{b&&b.stop()}console.log(`
|
|
60
60
|
2. Testing websocket connectivity...`);try{const w=await m.testWebsocketConnectivity();h.websocketConnectivity=w,console.log("Websocket connectivity test result:",w)}catch(w){h.websocketConnectivity={result:"error",error:w==null?void 0:w.toString()},console.error("Websocket connectivity test error:",w)}console.log(`
|
|
61
61
|
3. Testing call quality...`);try{if(typeof m.testCallQuality=="function")try{console.log("Initializing call state with startCamera..."),await m.startCamera();const w=await m.testCallQuality();h.callQuality=w,console.log("Call quality test result:",w)}catch(w){console.error("Failed to start camera for call quality test:",w),h.callQuality={result:"error",error:w==null?void 0:w.toString(),message:"Failed to initialize camera for call quality test. Check camera permissions."}}else h.callQuality={result:"not-available",message:"testCallQuality method not available"},console.log("Call quality test not available in current Daily.co version")}catch(w){h.callQuality={result:"error",error:w==null?void 0:w.toString()},console.error("Call quality test error:",w)}}catch(b){console.error("Failed to create temporary call object:",b),h.error=b==null?void 0:b.toString()}finally{if(m)try{console.log("Cleaning up temporary call object..."),await m.destroy()}catch(b){console.error("Error destroying temporary call object:",b)}}return console.log(`
|
|
62
|
-
=== Network Test Summary ===`),console.log("Results:",JSON.stringify(h,null,2)),h}}return ft.default=S,ft}var pd=dd();const hd=Ka(pd),St={},Vo=(St==null?void 0:St.VITE_VAPI_PUBLIC_KEY)||"",Bo=(St==null?void 0:St.VITE_VAPI_ASSISTANT_ID)||"";function Jo(t,e="Call error"){var i,n,o;if(!t)return e;if(typeof t=="string")return t;const r=t,s=c=>typeof c=="string"?c:null;return s(r.message)||s((i=r.error)==null?void 0:i.message)||s((o=(n=r.error)==null?void 0:n.error)==null?void 0:o.message)||s(r.errorMsg)||(()=>{try{return JSON.stringify(t)}catch{return e}})()}function md(){const[t,e]=j.useState(!1),[r,s]=j.useState("idle"),[i,n]=j.useState(null),o=j.useRef(null),[c,d]=j.useState([]),[p,g]=j.useState(""),[S,C]=j.useState(!1),[E,h]=j.useState(null),m=j.useRef(null),b=j.useRef(!1),[w,P]=j.useState("chat");if(!Tr||!Vo||!Bo)return null;j.useEffect(()=>()=>{var _;(_=o.current)==null||_.stop()},[]),j.useEffect(()=>{var _;(_=m.current)==null||_.scrollIntoView({behavior:"smooth"})},[c]),j.useEffect(()=>{!t||w!=="chat"||b.current||(b.current=!0,C(!0),fetch("/api/vapi/chat",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({})}).then(_=>_.json()).then(_=>{_.reply&&(d([{role:"assistant",text:_.reply}]),_.chatId&&h(_.chatId))}).catch(()=>{}).finally(()=>C(!1)))},[t,w]);const M=j.useCallback(async()=>{const _=p.trim();if(!(!_||S)){g(""),d(A=>[...A,{role:"user",text:_}]),C(!0);try{const A=await fetch("/api/vapi/chat",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({message:_,chatId:E})}),L=await A.json();A.ok?(d($=>[...$,{role:"assistant",text:L.reply}]),L.chatId&&h(L.chatId)):d($=>[...$,{role:"assistant",text:L.error||"Something went wrong"}])}catch{d(A=>[...A,{role:"assistant",text:"Failed to reach server"}])}C(!1)}},[p,S,E]),y=j.useCallback(async()=>{var _;if(n(null),r==="active"){(_=o.current)==null||_.stop(),o.current=null,s("idle");return}s("connecting");try{let A=null;try{const N=await fetch("/api/vapi/call-context",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});N.ok&&(A=await N.json())}catch{}const L=new hd(Vo);L.on("call-start",()=>{n(null),s("active")}),L.on("call-end",()=>{s("idle"),o.current=null}),L.on("error",N=>{n(Jo(N)),s("idle"),o.current=null});const $={};A&&(A.metadata&&Object.keys(A.metadata).length>0&&($.metadata=A.metadata),A.variableValues&&($.variableValues=A.variableValues),A.firstMessage&&($.firstMessage=A.firstMessage)),await L.start(Bo,$),o.current=L}catch(A){n(Jo(A,"Failed to start call")),s("idle")}},[r]),k=r==="idle"?"Start Call":r==="connecting"?"Connecting...":"End Call";return T.jsxs(T.Fragment,{children:[t&&T.jsxs("div",{style:ce.panel,children:[T.jsxs("div",{style:ce.header,children:[T.jsx("span",{style:ce.title,children:"Upfyn"}),T.jsxs("div",{style:ce.tabs,children:[T.jsx("button",{style:{...ce.tab,...w==="chat"?ce.tabActive:{}},onClick:()=>P("chat"),children:"Chat"}),T.jsx("button",{style:{...ce.tab,...w==="voice"?ce.tabActive:{}},onClick:()=>P("voice"),children:"Voice"})]}),T.jsx("button",{onClick:()=>e(!1),style:ce.close,children:"×"})]}),w==="chat"?T.jsxs(T.Fragment,{children:[T.jsxs("div",{style:ce.messages,children:[c.map((_,A)=>T.jsx("div",{style:_.role==="user"?ce.msgUser:ce.msgAssistant,children:_.text},A)),S&&T.jsx("div",{style:ce.msgAssistant,children:"Typing..."}),T.jsx("div",{ref:m})]}),T.jsxs("div",{style:ce.inputRow,children:[T.jsx("input",{type:"text",value:p,onChange:_=>g(_.target.value),onKeyDown:_=>_.key==="Enter"&&M(),placeholder:"Type a message...",style:ce.input}),T.jsx("button",{onClick:M,disabled:S||!p.trim(),style:ce.send,children:"Send"})]})]}):T.jsxs("div",{style:ce.voicePane,children:[T.jsx("div",{style:{fontSize:"2rem",marginBottom:"0.5rem"},children:r==="active"?"🔊":"🎙️"}),T.jsxs("p",{style:{fontSize:"0.85rem",color:"#94a3b8",margin:"0.5rem 0"},children:[r==="idle"&&"Tap below to start a voice call",r==="connecting"&&"Connecting...",r==="active"&&"Listening — tap to end"]}),i&&T.jsx("p",{style:{color:"#ef4444",fontSize:"0.75rem",margin:"0.5rem 0"},children:i}),T.jsx("button",{onClick:y,style:ce.voiceBtn,children:k})]})]}),T.jsx("button",{onClick:()=>e(_=>!_),style:ce.fab,children:t?"✕":"💬"})]})}const ce={panel:{position:"fixed",bottom:"5rem",right:"1rem",width:"340px",maxHeight:"480px",background:"#0f172a",border:"1px solid #1e293b",borderRadius:"12px",display:"flex",flexDirection:"column",zIndex:9999,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.4)"},header:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.75rem 1rem",borderBottom:"1px solid #1e293b",background:"#0a0f1e"},title:{fontWeight:700,color:"#f8fafc",fontSize:"0.95rem"},tabs:{display:"flex",gap:"0.25rem",marginLeft:"auto"},tab:{background:"transparent",border:"1px solid #334155",color:"#94a3b8",padding:"0.2rem 0.6rem",borderRadius:"6px",cursor:"pointer",fontSize:"0.75rem"},tabActive:{background:"#3B82F6",color:"#fff",borderColor:"#3B82F6"},close:{background:"transparent",border:"none",color:"#94a3b8",fontSize:"1.2rem",cursor:"pointer",marginLeft:"0.5rem"},messages:{flex:1,overflowY:"auto",padding:"0.75rem",display:"flex",flexDirection:"column",gap:"0.5rem",minHeight:"200px",maxHeight:"320px"},msgUser:{alignSelf:"flex-end",background:"#3B82F6",color:"#fff",padding:"0.5rem 0.75rem",borderRadius:"12px 12px 2px 12px",maxWidth:"80%",fontSize:"0.85rem"},msgAssistant:{alignSelf:"flex-start",background:"#1e293b",color:"#e2e8f0",padding:"0.5rem 0.75rem",borderRadius:"12px 12px 12px 2px",maxWidth:"80%",fontSize:"0.85rem"},inputRow:{display:"flex",gap:"0.5rem",padding:"0.5rem 0.75rem",borderTop:"1px solid #1e293b",background:"#0a0f1e"},input:{flex:1,background:"#1e293b",border:"1px solid #334155",borderRadius:"8px",padding:"0.5rem 0.75rem",color:"#f8fafc",fontSize:"0.85rem",outline:"none"},send:{background:"#3B82F6",color:"#fff",border:"none",borderRadius:"8px",padding:"0.5rem 1rem",cursor:"pointer",fontSize:"0.85rem",fontWeight:600},voicePane:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem 1rem",minHeight:"200px"},voiceBtn:{background:"#3B82F6",color:"#fff",border:"none",borderRadius:"999px",padding:"0.6rem 2rem",cursor:"pointer",fontSize:"0.9rem",fontWeight:600,marginTop:"0.5rem"},fab:{position:"fixed",bottom:"1rem",right:"1rem",width:"48px",height:"48px",borderRadius:"50%",background:"#3B82F6",color:"#fff",border:"none",fontSize:"1.3rem",cursor:"pointer",zIndex:9999,boxShadow:"0 4px 16px rgba(59,130,246,0.4)",display:"flex",alignItems:"center",justifyContent:"center"}},fd={save:"Save",cancel:"Cancel",delete:"Delete",create:"Create",edit:"Edit",close:"Close",confirm:"Confirm",submit:"Submit",retry:"Retry",refresh:"Refresh",search:"Search",clear:"Clear",copy:"Copy",download:"Download",upload:"Upload",browse:"Browse"},gd={chat:"Chat",shell:"Shell",files:"Files",git:"Source Control",tasks:"Tasks"},vd={loading:"Loading...",success:"Success",error:"Error",failed:"Failed",pending:"Pending",completed:"Completed",inProgress:"In Progress"},yd={savedSuccessfully:"Saved successfully",deletedSuccessfully:"Deleted successfully",updatedSuccessfully:"Updated successfully",operationFailed:"Operation failed",networkError:"Network error. Please check your connection.",unauthorized:"Unauthorized. Please log in.",notFound:"Not found",invalidInput:"Invalid input",requiredField:"This field is required",unknownError:"An unknown error occurred"},bd={settings:"Settings",home:"Home",back:"Back",next:"Next",previous:"Previous",logout:"Logout"},wd={language:"Language",theme:"Theme",darkMode:"Dark Mode",lightMode:"Light Mode",name:"Name",description:"Description",enabled:"Enabled",disabled:"Disabled",optional:"Optional",version:"Version",select:"Select",selectAll:"Select All",deselectAll:"Deselect All"},Sd={justNow:"Just now",minutesAgo:"{{count}} mins ago",hoursAgo:"{{count}} hours ago",daysAgo:"{{count}} days ago",yesterday:"Yesterday"},kd={newFile:"New File",newFolder:"New Folder",rename:"Rename",move:"Move",copyPath:"Copy Path",openInEditor:"Open in Editor"},_d={loading:"Loading Upfyn-Code",settingUpWorkspace:"Setting up your workspace...",chooseProject:"Choose Your Project",selectProjectDescription:"Select a project from the sidebar to start coding with Claude. Each project contains your chat sessions and file history.",tip:"Tip",createProjectMobile:"Tap the menu button above to access projects",createProjectDesktop:"Create a new project by clicking the folder icon in the sidebar",newSession:"New Session",untitledSession:"Untitled Session",projectFiles:"Project Files"},Cd={loading:"Loading files...",files:"Files",simpleView:"Simple view",compactView:"Compact view",detailedView:"Detailed view",searchPlaceholder:"Search files and folders...",clearSearch:"Clear search",name:"Name",size:"Size",modified:"Modified",permissions:"Permissions",noFilesFound:"No files found",checkProjectPath:"Check if the project path is accessible",noMatchesFound:"No matches found",tryDifferentSearch:"Try a different search term or clear the search",justNow:"just now",minAgo:"{{count}} min ago",hoursAgo:"{{count}} hours ago",daysAgo:"{{count}} days ago"},Td={title:"Create New Project",steps:{type:"Type",configure:"Configure",confirm:"Confirm"},step1:{question:"Do you already have a workspace, or would you like to create a new one?",existing:{title:"Existing Workspace",description:"I already have a workspace on my server and just need to add it to the project list"},new:{title:"New Workspace",description:"Create a new workspace, optionally clone from a GitHub repository"}},step2:{existingPath:"Workspace Path",newPath:"Workspace Path",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"Full path to your existing workspace directory",newHelp:"Full path to your workspace directory",githubUrl:"GitHub URL (Optional)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"Optional: provide a GitHub URL to clone a repository",githubAuth:"GitHub Authentication (Optional)",githubAuthHelp:"Only required for private repositories. Public repos can be cloned without authentication.",loadingTokens:"Loading stored tokens...",storedToken:"Stored Token",newToken:"New Token",nonePublic:"None (Public)",selectToken:"Select Token",selectTokenPlaceholder:"-- Select a token --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"This token will be used only for this operation",publicRepoInfo:"Public repositories don't require authentication. You can skip providing a token if cloning a public repo.",noTokensHelp:"No stored tokens available. You can add tokens in Settings → API Keys for easier reuse.",optionalTokenPublic:"GitHub Token (Optional for Public Repos)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (leave empty for public repos)"},step3:{reviewConfig:"Review Your Configuration",workspaceType:"Workspace Type:",existingWorkspace:"Existing Workspace",newWorkspace:"New Workspace",path:"Path:",cloneFrom:"Clone From:",authentication:"Authentication:",usingStoredToken:"Using stored token:",usingProvidedToken:"Using provided token",noAuthentication:"No authentication",sshKey:"SSH Key",existingInfo:"The workspace will be added to your project list and will be available for Claude/Cursor sessions.",newWithClone:"The repository will be cloned from this folder.",newEmpty:"The workspace will be added to your project list and will be available for Claude/Cursor sessions.",cloningRepository:"Cloning repository..."},buttons:{cancel:"Cancel",back:"Back",next:"Next",createProject:"Create Project",creating:"Creating...",cloning:"Cloning..."},errors:{selectType:"Please select whether you have an existing workspace or want to create a new one",providePath:"Please provide a workspace path",failedToCreate:"Failed to create workspace",failedToCreateFolder:"Failed to create folder"}},Ed={title:"Update Available",newVersionReady:"A new version is ready",currentVersion:"Current Version",latestVersion:"Latest Version",whatsNew:"What's New:",viewFullRelease:"View full release",updateProgress:"Update Progress:",manualUpgrade:"Manual upgrade:",manualUpgradeHint:'Or click "Update Now" to run the update automatically.',updateCompleted:"Update completed successfully!",restartServer:"Please restart the server to apply changes.",updateFailed:"Update failed",buttons:{close:"Close",later:"Later",copyCommand:"Copy Command",updateNow:"Update Now",updating:"Updating..."},ariaLabels:{closeModal:"Close version upgrade modal",showSidebar:"Show sidebar",settings:"Settings",updateAvailable:"Update available",closeSidebar:"Close sidebar"}},Pd={buttons:fd,tabs:gd,status:vd,messages:yd,navigation:bd,common:wd,time:Sd,fileOperations:kd,mainContent:_d,fileTree:Cd,projectWizard:Td,versionUpdate:Ed},xd="Settings",Ad={account:"Account",permissions:"Permissions",mcpServers:"MCP Servers",appearance:"Appearance"},jd={title:"Account",language:"Language",languageLabel:"Display Language",languageDescription:"Choose your preferred language for the interface",username:"Username",email:"Email",profile:"Profile",changePassword:"Change Password"},Md={title:"MCP Servers",addServer:"Add Server",editServer:"Edit Server",deleteServer:"Delete Server",serverName:"Server Name",serverType:"Server Type",config:"Configuration",testConnection:"Test Connection",status:"Status",connected:"Connected",disconnected:"Disconnected",scope:{label:"Scope",user:"User",project:"Project"}},Od={title:"Appearance",theme:"Theme",codeEditor:"Code Editor",editorTheme:"Editor Theme",wordWrap:"Word Wrap",showMinimap:"Show Minimap",lineNumbers:"Line Numbers",fontSize:"Font Size"},Id={saveChanges:"Save Changes",resetToDefaults:"Reset to Defaults",cancelChanges:"Cancel Changes"},Dd={title:"Quick Settings",sections:{appearance:"Appearance",toolDisplay:"Tool Display",viewOptions:"View Options",inputSettings:"Input Settings",whisperDictation:"Whisper Dictation"},darkMode:"Dark Mode",autoExpandTools:"Auto-expand tools",showRawParameters:"Show raw parameters",showThinking:"Show thinking",autoScrollToBottom:"Auto-scroll to bottom",sendByCtrlEnter:"Send by Ctrl+Enter",sendByCtrlEnterDescription:"When enabled, pressing Ctrl+Enter will send the message instead of just Enter. This is useful for IME users to avoid accidental sends.",dragHandle:{dragging:"Dragging handle",closePanel:"Close settings panel",openPanel:"Open settings panel",draggingStatus:"Dragging...",toggleAndMove:"Click to toggle, drag to move"},whisper:{modes:{default:"Default Mode",defaultDescription:"Direct transcription of your speech",prompt:"Prompt Enhancement",promptDescription:"Transform rough ideas into clear, detailed AI prompts",vibe:"Vibe Mode",vibeDescription:"Format ideas as clear agent instructions with details"}}},Ld={agents:"Agents",appearance:"Appearance",git:"Git",apiTokens:"API & Tokens",tasks:"Tasks"},Nd={darkMode:{label:"Dark Mode",description:"Toggle between light and dark themes"},projectSorting:{label:"Project Sorting",description:"How projects are ordered in the sidebar",alphabetical:"Alphabetical",recentActivity:"Recent Activity"},codeEditor:{title:"Code Editor",theme:{label:"Editor Theme",description:"Default theme for the code editor"},wordWrap:{label:"Word Wrap",description:"Enable word wrapping by default in the editor"},showMinimap:{label:"Show Minimap",description:"Display a minimap for easier navigation in diff view"},lineNumbers:{label:"Show Line Numbers",description:"Display line numbers in the editor"},fontSize:{label:"Font Size",description:"Editor font size in pixels"}}},Rd={title:{add:"Add MCP Server",edit:"Edit MCP Server"},importMode:{form:"Form Input",json:"JSON Import"},scope:{label:"Scope",userGlobal:"User (Global)",projectLocal:"Project (Local)",userDescription:"User scope: Available across all projects on your machine",projectDescription:"Local scope: Only available in the selected project",cannotChange:"Scope cannot be changed when editing an existing server"},fields:{serverName:"Server Name",transportType:"Transport Type",command:"Command",arguments:"Arguments (one per line)",jsonConfig:"JSON Configuration",url:"URL",envVars:"Environment Variables (KEY=value, one per line)",headers:"Headers (KEY=value, one per line)",selectProject:"Select a project..."},placeholders:{serverName:"my-server"},validation:{missingType:"Missing required field: type",stdioRequiresCommand:"stdio type requires a command field",httpRequiresUrl:"{{type}} type requires a url field",invalidJson:"Invalid JSON format",jsonHelp:"Paste your MCP server configuration in JSON format. Example formats:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"Configuration Details (from {{configFile}})",projectPath:"Path: {{path}}",actions:{cancel:"Cancel",saving:"Saving...",addServer:"Add Server",updateServer:"Update Server"}},Fd={success:"Settings saved successfully!",error:"Failed to save settings",saving:"Saving..."},$d={save:"Save Settings",cancel:"Cancel"},Ud={title:"Git Configuration",description:"Configure your git identity for commits. These settings will be applied globally via git config --global",name:{label:"Git Name",help:"Your name for git commits"},email:{label:"Git Email",help:"Your email for git commits"},actions:{save:"Save Configuration",saving:"Saving..."},status:{success:"Saved successfully"}},qd={title:"API Keys",description:"Generate API keys to access the external API from other applications.",newKey:{alertTitle:"⚠️ Save Your API Key",alertMessage:"This is the only time you'll see this key. Store it securely.",iveSavedIt:"I've saved it"},form:{placeholder:"API Key Name (e.g., Production Server)",createButton:"Create",cancelButton:"Cancel"},newButton:"New API Key",empty:"No API keys created yet.",list:{created:"Created:",lastUsed:"Last used:"},confirmDelete:"Are you sure you want to delete this API key?",status:{active:"Active",inactive:"Inactive"},github:{title:"GitHub Tokens",description:"Add GitHub Personal Access Tokens to clone private repositories via the external API.",descriptionAlt:"Add GitHub Personal Access Tokens to clone private repositories. You can also pass tokens directly in API requests without storing them.",addButton:"Add Token",form:{namePlaceholder:"Token Name (e.g., Personal Repos)",tokenPlaceholder:"GitHub Personal Access Token (ghp_...)",descriptionPlaceholder:"Description (optional)",addButton:"Add Token",cancelButton:"Cancel",howToCreate:"How to create a GitHub Personal Access Token →"},empty:"No GitHub tokens added yet.",added:"Added:",confirmDelete:"Are you sure you want to delete this GitHub token?"},apiDocsLink:"API Documentation",documentation:{title:"External API Documentation",description:"Learn how to use the external API to trigger Claude/Cursor sessions from your applications.",viewLink:"View API Documentation →"},loading:"Loading...",version:{updateAvailable:"Update available: v{{version}}"}},Vd={checking:"Checking TaskMaster installation...",notInstalled:{title:"TaskMaster AI CLI Not Installed",description:"TaskMaster CLI is required to use task management features. Install it to get started:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"View on GitHub",afterInstallation:"After installation:",steps:{restart:"Restart this application",autoAvailable:"TaskMaster features will automatically become available",initCommand:"Use task-master init in your project directory"}},settings:{enableLabel:"Enable TaskMaster Integration",enableDescription:"Show TaskMaster tasks, banners, and sidebar indicators across the interface"}},Bd={authStatus:{checking:"Checking...",connected:"Connected",notConnected:"Not connected",disconnected:"Disconnected",checkingAuth:"Checking authentication status...",loggedInAs:"Logged in as {{email}}",authenticatedUser:"authenticated user"},account:{claude:{description:"Anthropic Claude AI assistant"},cursor:{description:"Cursor AI-powered code editor"},codex:{description:"OpenAI Codex AI assistant"}},connectionStatus:"Connection Status",login:{title:"Login",reAuthenticate:"Re-authenticate",description:"Sign in to your {{agent}} account to enable AI features",reAuthDescription:"Sign in with a different account or refresh credentials",button:"Login",reLoginButton:"Re-login"},error:"Error: {{error}}"},Jd={title:"Permission Settings",skipPermissions:{label:"Skip permission prompts (use with caution)",claudeDescription:"Equivalent to --dangerously-skip-permissions flag",cursorDescription:"Equivalent to -f flag in Cursor CLI"},allowedTools:{title:"Allowed Tools",description:"Tools that are automatically allowed without prompting for permission",placeholder:'e.g., "Bash(git log:*)" or "Write"',quickAdd:"Quick add common tools:",empty:"No allowed tools configured"},blockedTools:{title:"Blocked Tools",description:"Tools that are automatically blocked without prompting for permission",placeholder:'e.g., "Bash(rm:*)"',empty:"No blocked tools configured"},allowedCommands:{title:"Allowed Shell Commands",description:"Shell commands that are automatically allowed without prompting",placeholder:'e.g., "Shell(ls)" or "Shell(git status)"',quickAdd:"Quick add common commands:",empty:"No allowed commands configured"},blockedCommands:{title:"Blocked Shell Commands",description:"Shell commands that are automatically blocked",placeholder:'e.g., "Shell(rm -rf)" or "Shell(sudo)"',empty:"No blocked commands configured"},toolExamples:{title:"Tool Pattern Examples:",bashGitLog:"- Allow all git log commands",bashGitDiff:"- Allow all git diff commands",write:"- Allow all Write tool usage",bashRm:"- Block all rm commands (dangerous)"},shellExamples:{title:"Shell Command Examples:",ls:"- Allow ls command",gitStatus:"- Allow git status",npmInstall:"- Allow npm install",rmRf:"- Block recursive delete"},codex:{permissionMode:"Permission Mode",description:"Controls how Codex handles file modifications and command execution",modes:{default:{title:"Default",description:"Only trusted commands (ls, cat, grep, git status, etc.) run automatically. Other commands are skipped. Can write to workspace."},acceptEdits:{title:"Accept Edits",description:"All commands run automatically within the workspace. Full auto mode with sandboxed execution."},bypassPermissions:{title:"Bypass Permissions",description:"Full system access with no restrictions. All commands run automatically with full disk and network access. Use with caution."}},technicalDetails:"Technical details",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted. Trusted commands: cat, cd, grep, head, ls, pwd, tail, git status/log/diff/show, find (without -exec), etc.",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never. All commands auto-execute within project directory.",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never. Full system access, use only in trusted environments.",overrideNote:"You can override this per-session using the mode button in the chat interface."}},actions:{add:"Add"}},Gd={title:"MCP Servers",description:{claude:"Model Context Protocol servers provide additional tools and data sources to Claude",cursor:"Model Context Protocol servers provide additional tools and data sources to Cursor",codex:"Model Context Protocol servers provide additional tools and data sources to Codex"},addButton:"Add MCP Server",empty:"No MCP servers configured",serverType:"Type",scope:{local:"local",user:"user"},config:{command:"Command",url:"URL",args:"Args",environment:"Environment"},tools:{title:"Tools",count:"({{count}}):",more:"+{{count}} more"},actions:{edit:"Edit server",delete:"Delete server"},help:{title:"About Codex MCP",description:"Codex supports stdio-based MCP servers. You can add servers that extend Codex's capabilities with additional tools and resources."}},Hd={title:xd,tabs:Ad,account:jd,mcp:Md,appearance:Od,actions:Id,quickSettings:Dd,mainTabs:Ld,appearanceSettings:Nd,mcpForm:Rd,saveStatus:Fd,footerActions:$d,git:Ud,apiKeys:qd,tasks:Vd,agents:Bd,permissions:Jd,mcpServers:Gd},Wd={title:"Welcome Back",description:"Sign in to your Upfyn-Code account",username:"Username",password:"Password",submit:"Sign In",loading:"Signing in...",errors:{invalidCredentials:"Invalid username or password",requiredFields:"Please fill in all fields",networkError:"Network error. Please try again."},placeholders:{username:"Enter your username",password:"Enter your password"}},zd={title:"Create Account",username:"Username",password:"Password",confirmPassword:"Confirm Password",submit:"Create Account",loading:"Creating account...",errors:{passwordMismatch:"Passwords do not match",usernameTaken:"Username is already taken",weakPassword:"Password is too weak"}},Yd={title:"Sign Out",confirm:"Are you sure you want to sign out?",button:"Sign Out"},Kd={login:Wd,register:zd,logout:Yd},Qd={title:"Projects",newProject:"New Project",deleteProject:"Delete Project",renameProject:"Rename Project",noProjects:"No projects found",loadingProjects:"Loading projects...",searchPlaceholder:"Search projects...",projectNamePlaceholder:"Project name",starred:"Starred",all:"All",untitledSession:"Untitled Session",newSession:"New Session",codexSession:"Codex Session",fetchingProjects:"Fetching your Claude projects and sessions",projects:"projects",noMatchingProjects:"No matching projects",tryDifferentSearch:"Try adjusting your search term",runClaudeCli:"Run Claude CLI in a project directory to get started"},Xd={title:"Upfyn-Code",subtitle:"Visual AI coding interface by Thinqmesh"},Zd={title:"Sessions",newSession:"New Session",deleteSession:"Delete Session",renameSession:"Rename Session",noSessions:"No sessions yet",loadingSessions:"Loading sessions...",unnamed:"Unnamed",loading:"Loading...",showMore:"Show more sessions"},ep={viewEnvironments:"View Environments",hideSidebar:"Hide sidebar",createProject:"Create new project",refresh:"Refresh projects and sessions (Ctrl+R)",renameProject:"Rename project (F2)",deleteProject:"Delete empty project (Delete)",addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites",editSessionName:"Manually edit session name",deleteSession:"Delete this session permanently",save:"Save",cancel:"Cancel"},tp={chat:"Chat",files:"Files",git:"Git",terminal:"Terminal",tasks:"Tasks"},rp={refresh:"Refresh",settings:"Settings",collapseAll:"Collapse All",expandAll:"Expand All",cancel:"Cancel",save:"Save",delete:"Delete",rename:"Rename"},np={active:"Active",inactive:"Inactive",thinking:"Thinking...",error:"Error",aborted:"Aborted",unknown:"Unknown"},sp={justNow:"Just now",oneMinuteAgo:"1 min ago",minutesAgo:"{{count}} mins ago",oneHourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",oneDayAgo:"1 day ago",daysAgo:"{{count}} days ago"},op={deleteConfirm:"Are you sure you want to delete this?",renameSuccess:"Renamed successfully",deleteSuccess:"Deleted successfully",errorOccurred:"An error occurred",deleteSessionConfirm:"Are you sure you want to delete this session? This action cannot be undone.",deleteProjectConfirm:"Are you sure you want to delete this empty project? This action cannot be undone.",enterProjectPath:"Please enter a project path",deleteSessionFailed:"Failed to delete session. Please try again.",deleteSessionError:"Error deleting session. Please try again.",deleteProjectFailed:"Failed to delete project. Please try again.",deleteProjectError:"Error deleting project. Please try again.",createProjectFailed:"Failed to create project. Please try again.",createProjectError:"Error creating project. Please try again."},ip={updateAvailable:"Update available"},ap={deleteProject:"Delete Project",deleteSession:"Delete Session",confirmDelete:"Are you sure you want to delete",sessionCount_one:"This project contains {{count}} conversation.",sessionCount_other:"This project contains {{count}} conversations.",allConversationsDeleted:"All conversations will be permanently deleted.",cannotUndo:"This action cannot be undone."},cp={projects:Qd,app:Xd,sessions:Zd,tooltips:ep,navigation:tp,actions:rp,status:np,time:sp,messages:op,version:ip,deleteConfirmation:ap},lp={copy:"Copy",copied:"Copied",copyCode:"Copy code"},up={user:"U",error:"Error",tool:"Tool",claude:"Claude",cursor:"Cursor",codex:"Codex"},dp={settings:"Tool Settings",error:"Tool Error",result:"Tool Result",viewParams:"View input parameters",viewRawParams:"View raw parameters",viewDiff:"View edit diff for",creatingFile:"Creating new file:",updatingTodo:"Updating Todo List",read:"Read",readFile:"Read file",updateTodo:"Update todo list",readTodo:"Read todo list",searchResults:"results"},pp={found:"Found {{count}} {{type}}",file:"file",files:"files",pattern:"pattern:",in:"in:"},hp={updated:"File updated successfully",created:"File created successfully",written:"File written successfully",diff:"Diff",newFile:"New File",viewContent:"View file content",viewFullOutput:"View full output ({{count}} chars)",contentDisplayed:"The file content is displayed in the diff view above"},mp={title:"Interactive Prompt",waiting:"Waiting for your response in the CLI",instruction:"Please select an option in your terminal where Claude is running.",selectedOption:"✓ Claude selected option {{number}}",instructionDetail:"In the CLI, you would select this option interactively using arrow keys or by typing the number."},fp={title:"Thinking...",emoji:"💭 Thinking..."},gp={response:"JSON Response"},vp={grant:"Grant permission for {{tool}}",added:"Permission added",addTo:"Adds {{entry}} to Allowed Tools.",retry:"Permission saved. Retry the request to use the tool.",error:"Unable to update permissions. Please try again.",openSettings:"Open settings"},yp={updated:"Todo list has been updated successfully",current:"Current Todo List"},bp={viewPlan:"📋 View implementation plan",title:"Implementation Plan"},wp={resetAt:"Claude usage limit reached. Your limit will reset at **{{time}} {{timezone}}** - {{date}}"},Sp={permissionMode:"Permission Mode",modes:{default:"Default Mode",acceptEdits:"Accept Edits",bypassPermissions:"Bypass Permissions",plan:"Plan Mode"},descriptions:{default:"Only trusted commands (ls, cat, grep, git status, etc.) run automatically. Other commands are skipped. Can write to workspace.",acceptEdits:"All commands run automatically within the workspace. Full auto mode with sandboxed execution.",bypassPermissions:"Full system access with no restrictions. All commands run automatically with full disk and network access. Use with caution.",plan:"Planning mode - no commands are executed"},technicalDetails:"Technical details"},kp={placeholder:"Type / for commands, @ for files, or ask {{provider}} anything...",placeholderDefault:"Type your message...",disabled:"Input disabled",attachFiles:"Attach files",attachImages:"Attach images",send:"Send",stop:"Stop",hintText:{ctrlEnter:"Ctrl+Enter to send • Shift+Enter for new line • Tab to change modes • / for slash commands",enter:"Enter to send • Shift+Enter for new line • Tab to change modes • / for slash commands"},clickToChangeMode:"Click to change permission mode (or press Tab in input)",showAllCommands:"Show all commands",clearInput:"Clear input",scrollToBottom:"Scroll to bottom"},_p={selector:{title:"Thinking Mode",description:"Extended thinking gives Claude more time to evaluate alternatives",active:"Active",tip:"Higher thinking modes take more time but provide more thorough analysis"},modes:{none:{name:"Standard",description:"Regular Claude response",prefix:""},think:{name:"Think",description:"Basic extended thinking",prefix:"think"},thinkHard:{name:"Think Hard",description:"More thorough evaluation",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"Deep analysis with alternatives",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"Maximum thinking budget",prefix:"ultrathink"}},buttonTitle:"Thinking mode: {{mode}}"},Cp={title:"Choose Your AI Assistant",description:"Select a provider to start a new conversation",selectModel:"Select Model",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",cursorEditor:"AI Code Editor"},readyPrompt:{claude:"Ready to use Claude with {{model}}. Start typing your message below.",cursor:"Ready to use Cursor with {{model}}. Start typing your message below.",codex:"Ready to use Codex with {{model}}. Start typing your message below.",default:"Select a provider above to begin"}},Tp={continue:{title:"Continue your conversation",description:"Ask questions about your code, request changes, or get help with development tasks"},loading:{olderMessages:"Loading older messages...",sessionMessages:"Loading session messages..."},messages:{showingOf:"Showing {{shown}} of {{total}} messages",scrollToLoad:"Scroll up to load more",showingLast:"Showing last {{count}} messages ({{total}} total)",loadEarlier:"Load earlier messages",loadAll:"Load all messages",loadingAll:"Loading all messages...",allLoaded:"All messages loaded",perfWarning:'All messages loaded — scrolling may be slower. Click "Scroll to bottom" to restore performance.'}},Ep={selectProject:{title:"Select a Project",description:"Choose a project to open an interactive shell in that directory"},status:{newSession:"New Session",initializing:"Initializing...",restarting:"Restarting..."},actions:{disconnect:"Disconnect",disconnectTitle:"Disconnect from shell",restart:"Restart",restartTitle:"Restart Shell (disconnect first)",connect:"Continue in Shell",connectTitle:"Connect to shell"},loading:"Loading terminal...",connecting:"Connecting to shell...",startSession:"Start a new Claude session",resumeSession:"Resume session: {{displayName}}...",runCommand:"Run {{command}} in {{projectName}}",startCli:"Starting Claude CLI in {{projectName}}",defaultCommand:"command"},Pp={startChatWithProvider:"Select a project to start chatting with {{provider}}"},xp={nextTaskPrompt:"Start the next task"},Ap={codeBlock:lp,messageTypes:up,tools:dp,search:pp,fileOperations:hp,interactive:mp,thinking:fp,json:gp,permissions:vp,todo:yp,plan:bp,usageLimit:wp,codex:Sp,input:kp,thinkingMode:_p,providerSelection:Cp,session:Tp,shell:Ep,projectSelection:Pp,tasks:xp},jp={changes:"changes",previousChange:"Previous change",nextChange:"Next change",hideDiff:"Hide diff highlighting",showDiff:"Show diff highlighting",settings:"Editor Settings",collapse:"Collapse editor",expand:"Expand editor to full width"},Mp="Loading {{fileName}}...",Op={showingChanges:"Showing changes"},Ip={download:"Download file",save:"Save",saving:"Saving...",saved:"Saved!",exitFullscreen:"Exit fullscreen",fullscreen:"Fullscreen",close:"Close",previewMarkdown:"Preview markdown",editMarkdown:"Edit markdown"},Dp={lines:"Lines:",characters:"Characters:",shortcuts:"Press Ctrl+S to save • Esc to close"},Lp={toolbar:jp,loading:Mp,header:Op,actions:Ip,footer:Dp},Np={title:"TaskMaster AI is not configured",description:"TaskMaster helps break down complex projects into manageable tasks with AI-powered assistance",whatIsTitle:"🎯 What is TaskMaster?",features:{aiPowered:"AI-Powered Task Management: Break complex projects into manageable subtasks",prdTemplates:"PRD Templates: Generate tasks from Product Requirements Documents",dependencyTracking:"Dependency Tracking: Understand task relationships and execution order",progressVisualization:"Progress Visualization: Kanban boards and detailed task analytics",cliIntegration:"CLI Integration: Use taskmaster commands for advanced workflows"},initializeButton:"Initialize TaskMaster AI"},Rp={title:"Getting Started with TaskMaster",subtitle:"TaskMaster is initialized! Here's what to do next:",steps:{createPRD:{title:"Create a Product Requirements Document (PRD)",description:"Discuss your project idea and create a PRD that describes what you want to build.",addButton:"Add PRD",existingPRDs:"Existing PRDs:"},generateTasks:{title:"Generate Tasks from PRD",description:"Once you have a PRD, ask your AI assistant to parse it and TaskMaster will automatically break it down into manageable tasks with implementation details."},analyzeTasks:{title:"Analyze & Expand Tasks",description:"Ask your AI assistant to analyze task complexity and expand them into detailed subtasks for easier implementation."},startBuilding:{title:"Start Building",description:"Ask your AI assistant to begin working on tasks, update their status, and add new tasks as your project evolves."}},tip:"💡 Tip: Start with a PRD to get the most out of TaskMaster's AI-powered task generation"},Fp={title:"TaskMaster Setup",subtitle:"Interactive CLI for {{projectName}}",willStart:"TaskMaster initialization will start automatically",completed:"TaskMaster setup completed! You can now close this window.",closeButton:"Close",closeContinueButton:"Close & Continue"},$p={title:"Getting Started with TaskMaster",subtitle:"Your guide to productive task management",examples:{parsePRD:`💬 Example:
|
|
62
|
+
=== Network Test Summary ===`),console.log("Results:",JSON.stringify(h,null,2)),h}}return ft.default=S,ft}var vd=gd();const yd=ec(vd),St={},Bo=(St==null?void 0:St.VITE_VAPI_PUBLIC_KEY)||"",Jo=(St==null?void 0:St.VITE_VAPI_ASSISTANT_ID)||"";function Go(t,e="Call error"){var i,n,o;if(!t)return e;if(typeof t=="string")return t;const r=t,s=c=>typeof c=="string"?c:null;return s(r.message)||s((i=r.error)==null?void 0:i.message)||s((o=(n=r.error)==null?void 0:n.error)==null?void 0:o.message)||s(r.errorMsg)||(()=>{try{return JSON.stringify(t)}catch{return e}})()}function bd(){const[t,e]=j.useState(!1),[r,s]=j.useState("idle"),[i,n]=j.useState(null),o=j.useRef(null),[c,d]=j.useState([]),[p,g]=j.useState(""),[S,C]=j.useState(!1),[E,h]=j.useState(null),m=j.useRef(null),b=j.useRef(!1),[w,P]=j.useState("chat");if(!Tr||!Bo||!Jo)return null;j.useEffect(()=>()=>{var _;(_=o.current)==null||_.stop()},[]),j.useEffect(()=>{var _;(_=m.current)==null||_.scrollIntoView({behavior:"smooth"})},[c]),j.useEffect(()=>{!t||w!=="chat"||b.current||(b.current=!0,C(!0),fetch("/api/vapi/chat",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({})}).then(_=>_.json()).then(_=>{_.reply&&(d([{role:"assistant",text:_.reply}]),_.chatId&&h(_.chatId))}).catch(()=>{}).finally(()=>C(!1)))},[t,w]);const M=j.useCallback(async()=>{const _=p.trim();if(!(!_||S)){g(""),d(A=>[...A,{role:"user",text:_}]),C(!0);try{const A=await fetch("/api/vapi/chat",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({message:_,chatId:E})}),L=await A.json();A.ok?(d($=>[...$,{role:"assistant",text:L.reply}]),L.chatId&&h(L.chatId)):d($=>[...$,{role:"assistant",text:L.error||"Something went wrong"}])}catch{d(A=>[...A,{role:"assistant",text:"Failed to reach server"}])}C(!1)}},[p,S,E]),y=j.useCallback(async()=>{var _;if(n(null),r==="active"){(_=o.current)==null||_.stop(),o.current=null,s("idle");return}s("connecting");try{let A=null;try{const N=await fetch("/api/vapi/call-context",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});N.ok&&(A=await N.json())}catch{}const L=new yd(Bo);L.on("call-start",()=>{n(null),s("active")}),L.on("call-end",()=>{s("idle"),o.current=null}),L.on("error",N=>{n(Go(N)),s("idle"),o.current=null});const $={};A&&(A.metadata&&Object.keys(A.metadata).length>0&&($.metadata=A.metadata),A.variableValues&&($.variableValues=A.variableValues),A.firstMessage&&($.firstMessage=A.firstMessage)),await L.start(Jo,$),o.current=L}catch(A){n(Go(A,"Failed to start call")),s("idle")}},[r]),k=r==="idle"?"Start Call":r==="connecting"?"Connecting...":"End Call";return T.jsxs(T.Fragment,{children:[t&&T.jsxs("div",{style:ce.panel,children:[T.jsxs("div",{style:ce.header,children:[T.jsx("span",{style:ce.title,children:"Upfyn"}),T.jsxs("div",{style:ce.tabs,children:[T.jsx("button",{style:{...ce.tab,...w==="chat"?ce.tabActive:{}},onClick:()=>P("chat"),children:"Chat"}),T.jsx("button",{style:{...ce.tab,...w==="voice"?ce.tabActive:{}},onClick:()=>P("voice"),children:"Voice"})]}),T.jsx("button",{onClick:()=>e(!1),style:ce.close,children:"×"})]}),w==="chat"?T.jsxs(T.Fragment,{children:[T.jsxs("div",{style:ce.messages,children:[c.map((_,A)=>T.jsx("div",{style:_.role==="user"?ce.msgUser:ce.msgAssistant,children:_.text},A)),S&&T.jsx("div",{style:ce.msgAssistant,children:"Typing..."}),T.jsx("div",{ref:m})]}),T.jsxs("div",{style:ce.inputRow,children:[T.jsx("input",{type:"text",value:p,onChange:_=>g(_.target.value),onKeyDown:_=>_.key==="Enter"&&M(),placeholder:"Type a message...",style:ce.input}),T.jsx("button",{onClick:M,disabled:S||!p.trim(),style:ce.send,children:"Send"})]})]}):T.jsxs("div",{style:ce.voicePane,children:[T.jsx("div",{style:{fontSize:"2rem",marginBottom:"0.5rem"},children:r==="active"?"🔊":"🎙️"}),T.jsxs("p",{style:{fontSize:"0.85rem",color:"#94a3b8",margin:"0.5rem 0"},children:[r==="idle"&&"Tap below to start a voice call",r==="connecting"&&"Connecting...",r==="active"&&"Listening — tap to end"]}),i&&T.jsx("p",{style:{color:"#ef4444",fontSize:"0.75rem",margin:"0.5rem 0"},children:i}),T.jsx("button",{onClick:y,style:ce.voiceBtn,children:k})]})]}),T.jsx("button",{onClick:()=>e(_=>!_),style:ce.fab,children:t?"✕":"💬"})]})}const ce={panel:{position:"fixed",bottom:"5rem",right:"1rem",width:"340px",maxHeight:"480px",background:"#0f172a",border:"1px solid #1e293b",borderRadius:"12px",display:"flex",flexDirection:"column",zIndex:9999,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.4)"},header:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.75rem 1rem",borderBottom:"1px solid #1e293b",background:"#0a0f1e"},title:{fontWeight:700,color:"#f8fafc",fontSize:"0.95rem"},tabs:{display:"flex",gap:"0.25rem",marginLeft:"auto"},tab:{background:"transparent",border:"1px solid #334155",color:"#94a3b8",padding:"0.2rem 0.6rem",borderRadius:"6px",cursor:"pointer",fontSize:"0.75rem"},tabActive:{background:"#3B82F6",color:"#fff",borderColor:"#3B82F6"},close:{background:"transparent",border:"none",color:"#94a3b8",fontSize:"1.2rem",cursor:"pointer",marginLeft:"0.5rem"},messages:{flex:1,overflowY:"auto",padding:"0.75rem",display:"flex",flexDirection:"column",gap:"0.5rem",minHeight:"200px",maxHeight:"320px"},msgUser:{alignSelf:"flex-end",background:"#3B82F6",color:"#fff",padding:"0.5rem 0.75rem",borderRadius:"12px 12px 2px 12px",maxWidth:"80%",fontSize:"0.85rem"},msgAssistant:{alignSelf:"flex-start",background:"#1e293b",color:"#e2e8f0",padding:"0.5rem 0.75rem",borderRadius:"12px 12px 12px 2px",maxWidth:"80%",fontSize:"0.85rem"},inputRow:{display:"flex",gap:"0.5rem",padding:"0.5rem 0.75rem",borderTop:"1px solid #1e293b",background:"#0a0f1e"},input:{flex:1,background:"#1e293b",border:"1px solid #334155",borderRadius:"8px",padding:"0.5rem 0.75rem",color:"#f8fafc",fontSize:"0.85rem",outline:"none"},send:{background:"#3B82F6",color:"#fff",border:"none",borderRadius:"8px",padding:"0.5rem 1rem",cursor:"pointer",fontSize:"0.85rem",fontWeight:600},voicePane:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem 1rem",minHeight:"200px"},voiceBtn:{background:"#3B82F6",color:"#fff",border:"none",borderRadius:"999px",padding:"0.6rem 2rem",cursor:"pointer",fontSize:"0.9rem",fontWeight:600,marginTop:"0.5rem"},fab:{position:"fixed",bottom:"1rem",right:"1rem",width:"48px",height:"48px",borderRadius:"50%",background:"#3B82F6",color:"#fff",border:"none",fontSize:"1.3rem",cursor:"pointer",zIndex:9999,boxShadow:"0 4px 16px rgba(59,130,246,0.4)",display:"flex",alignItems:"center",justifyContent:"center"}},wd={save:"Save",cancel:"Cancel",delete:"Delete",create:"Create",edit:"Edit",close:"Close",confirm:"Confirm",submit:"Submit",retry:"Retry",refresh:"Refresh",search:"Search",clear:"Clear",copy:"Copy",download:"Download",upload:"Upload",browse:"Browse"},Sd={chat:"Chat",shell:"Shell",files:"Files",git:"Source Control",tasks:"Tasks"},kd={loading:"Loading...",success:"Success",error:"Error",failed:"Failed",pending:"Pending",completed:"Completed",inProgress:"In Progress"},_d={savedSuccessfully:"Saved successfully",deletedSuccessfully:"Deleted successfully",updatedSuccessfully:"Updated successfully",operationFailed:"Operation failed",networkError:"Network error. Please check your connection.",unauthorized:"Unauthorized. Please log in.",notFound:"Not found",invalidInput:"Invalid input",requiredField:"This field is required",unknownError:"An unknown error occurred"},Cd={settings:"Settings",home:"Home",back:"Back",next:"Next",previous:"Previous",logout:"Logout"},Td={language:"Language",theme:"Theme",darkMode:"Dark Mode",lightMode:"Light Mode",name:"Name",description:"Description",enabled:"Enabled",disabled:"Disabled",optional:"Optional",version:"Version",select:"Select",selectAll:"Select All",deselectAll:"Deselect All"},Ed={justNow:"Just now",minutesAgo:"{{count}} mins ago",hoursAgo:"{{count}} hours ago",daysAgo:"{{count}} days ago",yesterday:"Yesterday"},Pd={newFile:"New File",newFolder:"New Folder",rename:"Rename",move:"Move",copyPath:"Copy Path",openInEditor:"Open in Editor"},xd={loading:"Loading UpfynAI",settingUpWorkspace:"Setting up your workspace...",chooseProject:"Choose Your Project",selectProjectDescription:"Select a project from the sidebar to start coding with Claude. Each project contains your chat sessions and file history.",tip:"Tip",createProjectMobile:"Tap the menu button above to access projects",createProjectDesktop:"Create a new project by clicking the folder icon in the sidebar",newSession:"New Session",untitledSession:"Untitled Session",projectFiles:"Project Files"},Ad={loading:"Loading files...",files:"Files",simpleView:"Simple view",compactView:"Compact view",detailedView:"Detailed view",searchPlaceholder:"Search files and folders...",clearSearch:"Clear search",name:"Name",size:"Size",modified:"Modified",permissions:"Permissions",noFilesFound:"No files found",checkProjectPath:"Check if the project path is accessible",noMatchesFound:"No matches found",tryDifferentSearch:"Try a different search term or clear the search",justNow:"just now",minAgo:"{{count}} min ago",hoursAgo:"{{count}} hours ago",daysAgo:"{{count}} days ago"},jd={title:"Create New Project",steps:{type:"Type",configure:"Configure",confirm:"Confirm"},step1:{question:"Do you already have a workspace, or would you like to create a new one?",existing:{title:"Existing Workspace",description:"I already have a workspace on my server and just need to add it to the project list"},new:{title:"New Workspace",description:"Create a new workspace, optionally clone from a GitHub repository"}},step2:{existingPath:"Workspace Path",newPath:"Workspace Path",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"Full path to your existing workspace directory",newHelp:"Full path to your workspace directory",githubUrl:"GitHub URL (Optional)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"Optional: provide a GitHub URL to clone a repository",githubAuth:"GitHub Authentication (Optional)",githubAuthHelp:"Only required for private repositories. Public repos can be cloned without authentication.",loadingTokens:"Loading stored tokens...",storedToken:"Stored Token",newToken:"New Token",nonePublic:"None (Public)",selectToken:"Select Token",selectTokenPlaceholder:"-- Select a token --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"This token will be used only for this operation",publicRepoInfo:"Public repositories don't require authentication. You can skip providing a token if cloning a public repo.",noTokensHelp:"No stored tokens available. You can add tokens in Settings → API Keys for easier reuse.",optionalTokenPublic:"GitHub Token (Optional for Public Repos)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (leave empty for public repos)"},step3:{reviewConfig:"Review Your Configuration",workspaceType:"Workspace Type:",existingWorkspace:"Existing Workspace",newWorkspace:"New Workspace",path:"Path:",cloneFrom:"Clone From:",authentication:"Authentication:",usingStoredToken:"Using stored token:",usingProvidedToken:"Using provided token",noAuthentication:"No authentication",sshKey:"SSH Key",existingInfo:"The workspace will be added to your project list and will be available for Claude/Cursor sessions.",newWithClone:"The repository will be cloned from this folder.",newEmpty:"The workspace will be added to your project list and will be available for Claude/Cursor sessions.",cloningRepository:"Cloning repository..."},buttons:{cancel:"Cancel",back:"Back",next:"Next",createProject:"Create Project",creating:"Creating...",cloning:"Cloning..."},errors:{selectType:"Please select whether you have an existing workspace or want to create a new one",providePath:"Please provide a workspace path",failedToCreate:"Failed to create workspace",failedToCreateFolder:"Failed to create folder"}},Md={title:"Update Available",newVersionReady:"A new version is ready",currentVersion:"Current Version",latestVersion:"Latest Version",whatsNew:"What's New:",viewFullRelease:"View full release",updateProgress:"Update Progress:",manualUpgrade:"Manual upgrade:",manualUpgradeHint:'Or click "Update Now" to run the update automatically.',updateCompleted:"Update completed successfully!",restartServer:"Please restart the server to apply changes.",updateFailed:"Update failed",buttons:{close:"Close",later:"Later",copyCommand:"Copy Command",updateNow:"Update Now",updating:"Updating..."},ariaLabels:{closeModal:"Close version upgrade modal",showSidebar:"Show sidebar",settings:"Settings",updateAvailable:"Update available",closeSidebar:"Close sidebar"}},Id={buttons:wd,tabs:Sd,status:kd,messages:_d,navigation:Cd,common:Td,time:Ed,fileOperations:Pd,mainContent:xd,fileTree:Ad,projectWizard:jd,versionUpdate:Md},Od="Settings",Dd={account:"Account",permissions:"Permissions",mcpServers:"MCP Servers",appearance:"Appearance"},Ld={title:"Account",language:"Language",languageLabel:"Display Language",languageDescription:"Choose your preferred language for the interface",username:"Username",email:"Email",profile:"Profile",changePassword:"Change Password"},Nd={title:"MCP Servers",addServer:"Add Server",editServer:"Edit Server",deleteServer:"Delete Server",serverName:"Server Name",serverType:"Server Type",config:"Configuration",testConnection:"Test Connection",status:"Status",connected:"Connected",disconnected:"Disconnected",scope:{label:"Scope",user:"User",project:"Project"}},Rd={title:"Appearance",theme:"Theme",codeEditor:"Code Editor",editorTheme:"Editor Theme",wordWrap:"Word Wrap",showMinimap:"Show Minimap",lineNumbers:"Line Numbers",fontSize:"Font Size"},Fd={saveChanges:"Save Changes",resetToDefaults:"Reset to Defaults",cancelChanges:"Cancel Changes"},$d={title:"Quick Settings",sections:{appearance:"Appearance",toolDisplay:"Tool Display",viewOptions:"View Options",inputSettings:"Input Settings",whisperDictation:"Whisper Dictation"},darkMode:"Dark Mode",autoExpandTools:"Auto-expand tools",showRawParameters:"Show raw parameters",showThinking:"Show thinking",autoScrollToBottom:"Auto-scroll to bottom",sendByCtrlEnter:"Send by Ctrl+Enter",sendByCtrlEnterDescription:"When enabled, pressing Ctrl+Enter will send the message instead of just Enter. This is useful for IME users to avoid accidental sends.",dragHandle:{dragging:"Dragging handle",closePanel:"Close settings panel",openPanel:"Open settings panel",draggingStatus:"Dragging...",toggleAndMove:"Click to toggle, drag to move"},whisper:{modes:{default:"Default Mode",defaultDescription:"Direct transcription of your speech",prompt:"Prompt Enhancement",promptDescription:"Transform rough ideas into clear, detailed AI prompts",vibe:"Vibe Mode",vibeDescription:"Format ideas as clear agent instructions with details"}}},Ud={agents:"Agents",appearance:"Appearance",git:"Git",apiTokens:"API & Tokens",tasks:"Tasks"},qd={darkMode:{label:"Dark Mode",description:"Toggle between light and dark themes"},projectSorting:{label:"Project Sorting",description:"How projects are ordered in the sidebar",alphabetical:"Alphabetical",recentActivity:"Recent Activity"},codeEditor:{title:"Code Editor",theme:{label:"Editor Theme",description:"Default theme for the code editor"},wordWrap:{label:"Word Wrap",description:"Enable word wrapping by default in the editor"},showMinimap:{label:"Show Minimap",description:"Display a minimap for easier navigation in diff view"},lineNumbers:{label:"Show Line Numbers",description:"Display line numbers in the editor"},fontSize:{label:"Font Size",description:"Editor font size in pixels"}}},Vd={title:{add:"Add MCP Server",edit:"Edit MCP Server"},importMode:{form:"Form Input",json:"JSON Import"},scope:{label:"Scope",userGlobal:"User (Global)",projectLocal:"Project (Local)",userDescription:"User scope: Available across all projects on your machine",projectDescription:"Local scope: Only available in the selected project",cannotChange:"Scope cannot be changed when editing an existing server"},fields:{serverName:"Server Name",transportType:"Transport Type",command:"Command",arguments:"Arguments (one per line)",jsonConfig:"JSON Configuration",url:"URL",envVars:"Environment Variables (KEY=value, one per line)",headers:"Headers (KEY=value, one per line)",selectProject:"Select a project..."},placeholders:{serverName:"my-server"},validation:{missingType:"Missing required field: type",stdioRequiresCommand:"stdio type requires a command field",httpRequiresUrl:"{{type}} type requires a url field",invalidJson:"Invalid JSON format",jsonHelp:"Paste your MCP server configuration in JSON format. Example formats:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"Configuration Details (from {{configFile}})",projectPath:"Path: {{path}}",actions:{cancel:"Cancel",saving:"Saving...",addServer:"Add Server",updateServer:"Update Server"}},Bd={success:"Settings saved successfully!",error:"Failed to save settings",saving:"Saving..."},Jd={save:"Save Settings",cancel:"Cancel"},Gd={title:"Git Configuration",description:"Configure your git identity for commits. These settings will be applied globally via git config --global",name:{label:"Git Name",help:"Your name for git commits"},email:{label:"Git Email",help:"Your email for git commits"},actions:{save:"Save Configuration",saving:"Saving..."},status:{success:"Saved successfully"}},Hd={title:"API Keys",description:"Generate API keys to access the external API from other applications.",newKey:{alertTitle:"⚠️ Save Your API Key",alertMessage:"This is the only time you'll see this key. Store it securely.",iveSavedIt:"I've saved it"},form:{placeholder:"API Key Name (e.g., Production Server)",createButton:"Create",cancelButton:"Cancel"},newButton:"New API Key",empty:"No API keys created yet.",list:{created:"Created:",lastUsed:"Last used:"},confirmDelete:"Are you sure you want to delete this API key?",status:{active:"Active",inactive:"Inactive"},github:{title:"GitHub Tokens",description:"Add GitHub Personal Access Tokens to clone private repositories via the external API.",descriptionAlt:"Add GitHub Personal Access Tokens to clone private repositories. You can also pass tokens directly in API requests without storing them.",addButton:"Add Token",form:{namePlaceholder:"Token Name (e.g., Personal Repos)",tokenPlaceholder:"GitHub Personal Access Token (ghp_...)",descriptionPlaceholder:"Description (optional)",addButton:"Add Token",cancelButton:"Cancel",howToCreate:"How to create a GitHub Personal Access Token →"},empty:"No GitHub tokens added yet.",added:"Added:",confirmDelete:"Are you sure you want to delete this GitHub token?"},apiDocsLink:"API Documentation",documentation:{title:"External API Documentation",description:"Learn how to use the external API to trigger Claude/Cursor sessions from your applications.",viewLink:"View API Documentation →"},loading:"Loading...",version:{updateAvailable:"Update available: v{{version}}"}},Wd={checking:"Checking TaskMaster installation...",notInstalled:{title:"TaskMaster AI CLI Not Installed",description:"TaskMaster CLI is required to use task management features. Install it to get started:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"View on GitHub",afterInstallation:"After installation:",steps:{restart:"Restart this application",autoAvailable:"TaskMaster features will automatically become available",initCommand:"Use task-master init in your project directory"}},settings:{enableLabel:"Enable TaskMaster Integration",enableDescription:"Show TaskMaster tasks, banners, and sidebar indicators across the interface"}},zd={authStatus:{checking:"Checking...",connected:"Connected",notConnected:"Not connected",disconnected:"Disconnected",checkingAuth:"Checking authentication status...",loggedInAs:"Logged in as {{email}}",authenticatedUser:"authenticated user"},account:{claude:{description:"Anthropic Claude AI assistant"},cursor:{description:"Cursor AI-powered code editor"},codex:{description:"OpenAI Codex AI assistant"}},connectionStatus:"Connection Status",login:{title:"Login",reAuthenticate:"Re-authenticate",description:"Sign in to your {{agent}} account to enable AI features",reAuthDescription:"Sign in with a different account or refresh credentials",button:"Login",reLoginButton:"Re-login"},error:"Error: {{error}}"},Yd={title:"Permission Settings",skipPermissions:{label:"Skip permission prompts (use with caution)",claudeDescription:"Equivalent to --dangerously-skip-permissions flag",cursorDescription:"Equivalent to -f flag in Cursor CLI"},allowedTools:{title:"Allowed Tools",description:"Tools that are automatically allowed without prompting for permission",placeholder:'e.g., "Bash(git log:*)" or "Write"',quickAdd:"Quick add common tools:",empty:"No allowed tools configured"},blockedTools:{title:"Blocked Tools",description:"Tools that are automatically blocked without prompting for permission",placeholder:'e.g., "Bash(rm:*)"',empty:"No blocked tools configured"},allowedCommands:{title:"Allowed Shell Commands",description:"Shell commands that are automatically allowed without prompting",placeholder:'e.g., "Shell(ls)" or "Shell(git status)"',quickAdd:"Quick add common commands:",empty:"No allowed commands configured"},blockedCommands:{title:"Blocked Shell Commands",description:"Shell commands that are automatically blocked",placeholder:'e.g., "Shell(rm -rf)" or "Shell(sudo)"',empty:"No blocked commands configured"},toolExamples:{title:"Tool Pattern Examples:",bashGitLog:"- Allow all git log commands",bashGitDiff:"- Allow all git diff commands",write:"- Allow all Write tool usage",bashRm:"- Block all rm commands (dangerous)"},shellExamples:{title:"Shell Command Examples:",ls:"- Allow ls command",gitStatus:"- Allow git status",npmInstall:"- Allow npm install",rmRf:"- Block recursive delete"},codex:{permissionMode:"Permission Mode",description:"Controls how Codex handles file modifications and command execution",modes:{default:{title:"Default",description:"Only trusted commands (ls, cat, grep, git status, etc.) run automatically. Other commands are skipped. Can write to workspace."},acceptEdits:{title:"Accept Edits",description:"All commands run automatically within the workspace. Full auto mode with sandboxed execution."},bypassPermissions:{title:"Bypass Permissions",description:"Full system access with no restrictions. All commands run automatically with full disk and network access. Use with caution."}},technicalDetails:"Technical details",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted. Trusted commands: cat, cd, grep, head, ls, pwd, tail, git status/log/diff/show, find (without -exec), etc.",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never. All commands auto-execute within project directory.",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never. Full system access, use only in trusted environments.",overrideNote:"You can override this per-session using the mode button in the chat interface."}},actions:{add:"Add"}},Kd={title:"MCP Servers",description:{claude:"Model Context Protocol servers provide additional tools and data sources to Claude",cursor:"Model Context Protocol servers provide additional tools and data sources to Cursor",codex:"Model Context Protocol servers provide additional tools and data sources to Codex"},addButton:"Add MCP Server",empty:"No MCP servers configured",serverType:"Type",scope:{local:"local",user:"user"},config:{command:"Command",url:"URL",args:"Args",environment:"Environment"},tools:{title:"Tools",count:"({{count}}):",more:"+{{count}} more"},actions:{edit:"Edit server",delete:"Delete server"},help:{title:"About Codex MCP",description:"Codex supports stdio-based MCP servers. You can add servers that extend Codex's capabilities with additional tools and resources."}},Qd={title:Od,tabs:Dd,account:Ld,mcp:Nd,appearance:Rd,actions:Fd,quickSettings:$d,mainTabs:Ud,appearanceSettings:qd,mcpForm:Vd,saveStatus:Bd,footerActions:Jd,git:Gd,apiKeys:Hd,tasks:Wd,agents:zd,permissions:Yd,mcpServers:Kd},Xd={title:"Welcome Back",description:"Sign in to your UpfynAI account",username:"Username",password:"Password",submit:"Sign In",loading:"Signing in...",errors:{invalidCredentials:"Invalid username or password",requiredFields:"Please fill in all fields",networkError:"Network error. Please try again."},placeholders:{username:"Enter your username",password:"Enter your password"}},Zd={title:"Create Account",username:"Username",password:"Password",confirmPassword:"Confirm Password",submit:"Create Account",loading:"Creating account...",errors:{passwordMismatch:"Passwords do not match",usernameTaken:"Username is already taken",weakPassword:"Password is too weak"}},ep={title:"Sign Out",confirm:"Are you sure you want to sign out?",button:"Sign Out"},tp={login:Xd,register:Zd,logout:ep},rp={title:"Projects",newProject:"New Project",deleteProject:"Delete Project",renameProject:"Rename Project",noProjects:"No projects found",loadingProjects:"Loading projects...",searchPlaceholder:"Search projects...",projectNamePlaceholder:"Project name",starred:"Starred",all:"All",untitledSession:"Untitled Session",newSession:"New Session",codexSession:"Codex Session",fetchingProjects:"Fetching your Claude projects and sessions",projects:"projects",noMatchingProjects:"No matching projects",tryDifferentSearch:"Try adjusting your search term",runClaudeCli:"Run Claude CLI in a project directory to get started"},np={title:"UpfynAI",subtitle:"Visual AI coding interface by Thinqmesh"},sp={title:"Sessions",newSession:"New Session",deleteSession:"Delete Session",renameSession:"Rename Session",noSessions:"No sessions yet",loadingSessions:"Loading sessions...",unnamed:"Unnamed",loading:"Loading...",showMore:"Show more sessions"},op={viewEnvironments:"View Environments",hideSidebar:"Hide sidebar",createProject:"Create new project",refresh:"Refresh projects and sessions (Ctrl+R)",renameProject:"Rename project (F2)",deleteProject:"Delete empty project (Delete)",addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites",editSessionName:"Manually edit session name",deleteSession:"Delete this session permanently",save:"Save",cancel:"Cancel"},ip={chat:"Chat",files:"Files",git:"Git",terminal:"Terminal",tasks:"Tasks"},ap={refresh:"Refresh",settings:"Settings",collapseAll:"Collapse All",expandAll:"Expand All",cancel:"Cancel",save:"Save",delete:"Delete",rename:"Rename"},cp={active:"Active",inactive:"Inactive",thinking:"Thinking...",error:"Error",aborted:"Aborted",unknown:"Unknown"},lp={justNow:"Just now",oneMinuteAgo:"1 min ago",minutesAgo:"{{count}} mins ago",oneHourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",oneDayAgo:"1 day ago",daysAgo:"{{count}} days ago"},up={deleteConfirm:"Are you sure you want to delete this?",renameSuccess:"Renamed successfully",deleteSuccess:"Deleted successfully",errorOccurred:"An error occurred",deleteSessionConfirm:"Are you sure you want to delete this session? This action cannot be undone.",deleteProjectConfirm:"Are you sure you want to delete this empty project? This action cannot be undone.",enterProjectPath:"Please enter a project path",deleteSessionFailed:"Failed to delete session. Please try again.",deleteSessionError:"Error deleting session. Please try again.",deleteProjectFailed:"Failed to delete project. Please try again.",deleteProjectError:"Error deleting project. Please try again.",createProjectFailed:"Failed to create project. Please try again.",createProjectError:"Error creating project. Please try again."},dp={updateAvailable:"Update available"},pp={deleteProject:"Delete Project",deleteSession:"Delete Session",confirmDelete:"Are you sure you want to delete",sessionCount_one:"This project contains {{count}} conversation.",sessionCount_other:"This project contains {{count}} conversations.",allConversationsDeleted:"All conversations will be permanently deleted.",cannotUndo:"This action cannot be undone."},hp={projects:rp,app:np,sessions:sp,tooltips:op,navigation:ip,actions:ap,status:cp,time:lp,messages:up,version:dp,deleteConfirmation:pp},mp={copy:"Copy",copied:"Copied",copyCode:"Copy code"},fp={user:"U",error:"Error",tool:"Tool",claude:"Claude",cursor:"Cursor",codex:"Codex"},gp={settings:"Tool Settings",error:"Tool Error",result:"Tool Result",viewParams:"View input parameters",viewRawParams:"View raw parameters",viewDiff:"View edit diff for",creatingFile:"Creating new file:",updatingTodo:"Updating Todo List",read:"Read",readFile:"Read file",updateTodo:"Update todo list",readTodo:"Read todo list",searchResults:"results"},vp={found:"Found {{count}} {{type}}",file:"file",files:"files",pattern:"pattern:",in:"in:"},yp={updated:"File updated successfully",created:"File created successfully",written:"File written successfully",diff:"Diff",newFile:"New File",viewContent:"View file content",viewFullOutput:"View full output ({{count}} chars)",contentDisplayed:"The file content is displayed in the diff view above"},bp={title:"Interactive Prompt",waiting:"Waiting for your response in the CLI",instruction:"Please select an option in your terminal where Claude is running.",selectedOption:"✓ Claude selected option {{number}}",instructionDetail:"In the CLI, you would select this option interactively using arrow keys or by typing the number."},wp={title:"Thinking...",emoji:"💭 Thinking..."},Sp={response:"JSON Response"},kp={grant:"Grant permission for {{tool}}",added:"Permission added",addTo:"Adds {{entry}} to Allowed Tools.",retry:"Permission saved. Retry the request to use the tool.",error:"Unable to update permissions. Please try again.",openSettings:"Open settings"},_p={updated:"Todo list has been updated successfully",current:"Current Todo List"},Cp={viewPlan:"📋 View implementation plan",title:"Implementation Plan"},Tp={resetAt:"Claude usage limit reached. Your limit will reset at **{{time}} {{timezone}}** - {{date}}"},Ep={permissionMode:"Permission Mode",modes:{default:"Default Mode",acceptEdits:"Accept Edits",bypassPermissions:"Bypass Permissions",plan:"Plan Mode"},descriptions:{default:"Only trusted commands (ls, cat, grep, git status, etc.) run automatically. Other commands are skipped. Can write to workspace.",acceptEdits:"All commands run automatically within the workspace. Full auto mode with sandboxed execution.",bypassPermissions:"Full system access with no restrictions. All commands run automatically with full disk and network access. Use with caution.",plan:"Planning mode - no commands are executed"},technicalDetails:"Technical details"},Pp={placeholder:"Type / for commands, @ for files, or ask {{provider}} anything...",placeholderDefault:"Type your message...",disabled:"Input disabled",attachFiles:"Attach files",attachImages:"Attach images",send:"Send",stop:"Stop",hintText:{ctrlEnter:"Ctrl+Enter to send • Shift+Enter for new line • Tab to change modes • / for slash commands",enter:"Enter to send • Shift+Enter for new line • Tab to change modes • / for slash commands"},clickToChangeMode:"Click to change permission mode (or press Tab in input)",showAllCommands:"Show all commands",clearInput:"Clear input",scrollToBottom:"Scroll to bottom"},xp={selector:{title:"Thinking Mode",description:"Extended thinking gives Claude more time to evaluate alternatives",active:"Active",tip:"Higher thinking modes take more time but provide more thorough analysis"},modes:{none:{name:"Standard",description:"Regular Claude response",prefix:""},think:{name:"Think",description:"Basic extended thinking",prefix:"think"},thinkHard:{name:"Think Hard",description:"More thorough evaluation",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"Deep analysis with alternatives",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"Maximum thinking budget",prefix:"ultrathink"}},buttonTitle:"Thinking mode: {{mode}}"},Ap={title:"Choose Your AI Assistant",description:"Select a provider to start a new conversation",selectModel:"Select Model",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",cursorEditor:"AI Code Editor"},readyPrompt:{claude:"Ready to use Claude with {{model}}. Start typing your message below.",cursor:"Ready to use Cursor with {{model}}. Start typing your message below.",codex:"Ready to use Codex with {{model}}. Start typing your message below.",default:"Select a provider above to begin"}},jp={continue:{title:"Continue your conversation",description:"Ask questions about your code, request changes, or get help with development tasks"},loading:{olderMessages:"Loading older messages...",sessionMessages:"Loading session messages..."},messages:{showingOf:"Showing {{shown}} of {{total}} messages",scrollToLoad:"Scroll up to load more",showingLast:"Showing last {{count}} messages ({{total}} total)",loadEarlier:"Load earlier messages",loadAll:"Load all messages",loadingAll:"Loading all messages...",allLoaded:"All messages loaded",perfWarning:'All messages loaded — scrolling may be slower. Click "Scroll to bottom" to restore performance.'}},Mp={selectProject:{title:"Select a Project",description:"Choose a project to open an interactive shell in that directory"},status:{newSession:"New Session",initializing:"Initializing...",restarting:"Restarting..."},actions:{disconnect:"Disconnect",disconnectTitle:"Disconnect from shell",restart:"Restart",restartTitle:"Restart Shell (disconnect first)",connect:"Continue in Shell",connectTitle:"Connect to shell"},loading:"Loading terminal...",connecting:"Connecting to shell...",startSession:"Start a new Claude session",resumeSession:"Resume session: {{displayName}}...",runCommand:"Run {{command}} in {{projectName}}",startCli:"Starting Claude CLI in {{projectName}}",defaultCommand:"command"},Ip={startChatWithProvider:"Select a project to start chatting with {{provider}}"},Op={nextTaskPrompt:"Start the next task"},Dp={codeBlock:mp,messageTypes:fp,tools:gp,search:vp,fileOperations:yp,interactive:bp,thinking:wp,json:Sp,permissions:kp,todo:_p,plan:Cp,usageLimit:Tp,codex:Ep,input:Pp,thinkingMode:xp,providerSelection:Ap,session:jp,shell:Mp,projectSelection:Ip,tasks:Op},Lp={changes:"changes",previousChange:"Previous change",nextChange:"Next change",hideDiff:"Hide diff highlighting",showDiff:"Show diff highlighting",settings:"Editor Settings",collapse:"Collapse editor",expand:"Expand editor to full width"},Np="Loading {{fileName}}...",Rp={showingChanges:"Showing changes"},Fp={download:"Download file",save:"Save",saving:"Saving...",saved:"Saved!",exitFullscreen:"Exit fullscreen",fullscreen:"Fullscreen",close:"Close",previewMarkdown:"Preview markdown",editMarkdown:"Edit markdown"},$p={lines:"Lines:",characters:"Characters:",shortcuts:"Press Ctrl+S to save • Esc to close"},Up={toolbar:Lp,loading:Np,header:Rp,actions:Fp,footer:$p},qp={title:"TaskMaster AI is not configured",description:"TaskMaster helps break down complex projects into manageable tasks with AI-powered assistance",whatIsTitle:"🎯 What is TaskMaster?",features:{aiPowered:"AI-Powered Task Management: Break complex projects into manageable subtasks",prdTemplates:"PRD Templates: Generate tasks from Product Requirements Documents",dependencyTracking:"Dependency Tracking: Understand task relationships and execution order",progressVisualization:"Progress Visualization: Kanban boards and detailed task analytics",cliIntegration:"CLI Integration: Use taskmaster commands for advanced workflows"},initializeButton:"Initialize TaskMaster AI"},Vp={title:"Getting Started with TaskMaster",subtitle:"TaskMaster is initialized! Here's what to do next:",steps:{createPRD:{title:"Create a Product Requirements Document (PRD)",description:"Discuss your project idea and create a PRD that describes what you want to build.",addButton:"Add PRD",existingPRDs:"Existing PRDs:"},generateTasks:{title:"Generate Tasks from PRD",description:"Once you have a PRD, ask your AI assistant to parse it and TaskMaster will automatically break it down into manageable tasks with implementation details."},analyzeTasks:{title:"Analyze & Expand Tasks",description:"Ask your AI assistant to analyze task complexity and expand them into detailed subtasks for easier implementation."},startBuilding:{title:"Start Building",description:"Ask your AI assistant to begin working on tasks, update their status, and add new tasks as your project evolves."}},tip:"💡 Tip: Start with a PRD to get the most out of TaskMaster's AI-powered task generation"},Bp={title:"TaskMaster Setup",subtitle:"Interactive CLI for {{projectName}}",willStart:"TaskMaster initialization will start automatically",completed:"TaskMaster setup completed! You can now close this window.",closeButton:"Close",closeContinueButton:"Close & Continue"},Jp={title:"Getting Started with TaskMaster",subtitle:"Your guide to productive task management",examples:{parsePRD:`💬 Example:
|
|
63
63
|
"I've just initialized a new project with Claude Task Master. I have a PRD at .taskmaster/docs/prd.txt. Can you help me parse it and set up the initial tasks?"`,expandTask:`💬 Example:
|
|
64
64
|
"Task 5 seems complex. Can you break it down into subtasks?"`,addTask:`💬 Example:
|
|
65
|
-
"Please add a new task to implement user profile image uploads using Cloudinary, research the best approach."`},moreExamples:"View more examples and usage patterns →",proTips:{title:"💡 Pro Tips",search:"Use the search bar to quickly find specific tasks",views:"Switch between Kanban, List, and Grid views using the view toggles",filters:"Use filters to focus on specific task statuses or priorities",details:"Click on any task to view detailed information and manage subtasks"},learnMore:{title:"📚 Learn More",description:"TaskMaster AI is an advanced task management system built for developers. Get documentation, examples, and contribute to the project.",githubButton:"View on GitHub"}},Up={placeholder:"Search tasks..."},qp={button:"Filters",status:"Status",priority:"Priority",sortBy:"Sort By",allStatuses:"All Statuses",allPriorities:"All Priorities",showing:"Showing {{filtered}} of {{total}} tasks",clearFilters:"Clear Filters"},Vp={id:"ID",status:"Status",priority:"Priority",idAsc:"ID (Ascending)",idDesc:"ID (Descending)",titleAsc:"Title (A-Z)",titleDesc:"Title (Z-A)",statusAsc:"Status (Pending First)",statusDesc:"Status (Done First)",priorityAsc:"Priority (High First)",priorityDesc:"Priority (Low First)"},Bp={kanban:"Kanban view",list:"List view",grid:"Grid view"},Jp={pending:"📋 To Do",inProgress:"🚀 In Progress",done:"✅ Done",blocked:"🚫 Blocked",deferred:"⏳ Deferred",cancelled:"❌ Cancelled",noTasksYet:"No tasks yet",tasksWillAppear:"Tasks will appear here",moveTasksHere:"Move tasks here when started",completedTasksHere:"Completed tasks appear here",statusTasksHere:"Tasks with this status will appear here"},Gp={help:"TaskMaster Getting Started Guide",prds:"PRDs",addPRD:"Add PRD",addTask:"Add Task",createNewPRD:"Create New PRD",prdsAvailable:"{{count}} PRD(s) available"},Hp={modified:"Modified: {{date}}"},Wp={pending:"Pending","in-progress":"In Progress",done:"Done",blocked:"Blocked",deferred:"Deferred",cancelled:"Cancelled"},zp={high:"High",medium:"Medium",low:"Low"},Yp={title:"No tasks match your filters",description:"Try adjusting your search or filter criteria."},Kp={notConfigured:Np,gettingStarted:Rp,setupModal:Fp,helpGuide:$p,search:Up,filters:qp,sort:Vp,views:Bp,kanban:Jp,buttons:Gp,prd:Hp,statuses:Wp,priorities:zp,noMatchingTasks:Yp},Qp={save:"저장",cancel:"취소",delete:"삭제",create:"생성",edit:"편집",close:"닫기",confirm:"확인",submit:"제출",retry:"재시도",refresh:"새로고침",search:"검색",clear:"지우기",copy:"복사",download:"다운로드",upload:"업로드",browse:"찾아보기"},Xp={chat:"채팅",shell:"Shell",files:"파일",git:"소스 관리",tasks:"작업"},Zp={loading:"로딩 중...",success:"성공",error:"오류",failed:"실패",pending:"대기 중",completed:"완료",inProgress:"진행 중"},eh={savedSuccessfully:"저장되었습니다",deletedSuccessfully:"삭제되었습니다",updatedSuccessfully:"업데이트되었습니다",operationFailed:"작업 실패",networkError:"네트워크 오류. 연결을 확인해주세요.",unauthorized:"인증되지 않았습니다. 로그인해주세요.",notFound:"찾을 수 없음",invalidInput:"잘못된 입력",requiredField:"필수 항목입니다",unknownError:"알 수 없는 오류가 발생했습니다"},th={settings:"설정",home:"홈",back:"뒤로",next:"다음",previous:"이전",logout:"로그아웃"},rh={language:"언어",theme:"테마",darkMode:"다크 모드",lightMode:"라이트 모드",name:"이름",description:"설명",enabled:"활성화",disabled:"비활성화",optional:"선택사항",version:"버전",select:"선택",selectAll:"전체 선택",deselectAll:"전체 해제"},nh={justNow:"방금 전",minutesAgo:"{{count}}분 전",hoursAgo:"{{count}}시간 전",daysAgo:"{{count}}일 전",yesterday:"어제"},sh={newFile:"새 파일",newFolder:"새 폴더",rename:"이름 변경",move:"이동",copyPath:"경로 복사",openInEditor:"에디터에서 열기"},oh={loading:"Upfyn-Code 로딩 중",settingUpWorkspace:"워크스페이스 설정 중...",chooseProject:"프로젝트 선택",selectProjectDescription:"사이드바에서 프로젝트를 선택하여 Claude와 코딩을 시작하세요. 각 프로젝트에는 채팅 세션과 파일 히스토리가 포함됩니다.",tip:"팁",createProjectMobile:"위의 메뉴 버튼을 눌러 프로젝트에 접근하세요",createProjectDesktop:"사이드바의 폴더 아이콘을 클릭하여 새 프로젝트를 생성하세요",newSession:"새 세션",untitledSession:"제목 없는 세션",projectFiles:"프로젝트 파일"},ih={loading:"파일 로딩 중...",files:"파일",simpleView:"간단히 보기",compactView:"컴팩트 보기",detailedView:"상세히 보기",searchPlaceholder:"파일 및 폴더 검색...",clearSearch:"검색 지우기",name:"이름",size:"크기",modified:"수정일",permissions:"권한",noFilesFound:"파일을 찾을 수 없음",checkProjectPath:"프로젝트 경로가 접근 가능한지 확인하세요",noMatchesFound:"일치하는 항목 없음",tryDifferentSearch:"다른 검색어를 시도하거나 검색을 지우세요",justNow:"방금 전",minAgo:"{{count}}분 전",hoursAgo:"{{count}}시간 전",daysAgo:"{{count}}일 전"},ah={title:"새 프로젝트 생성",steps:{type:"유형",configure:"설정",confirm:"확인"},step1:{question:"이미 워크스페이스가 있으신가요, 아니면 새로 생성하시겠습니까?",existing:{title:"기존 워크스페이스",description:"서버에 이미 워크스페이스가 있고 프로젝트 목록에 추가만 하면 됩니다"},new:{title:"새 워크스페이스",description:"새 워크스페이스를 생성하고, 선택적으로 GitHub 저장소에서 clone합니다"}},step2:{existingPath:"워크스페이스 경로",newPath:"워크스페이스 경로",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"기존 워크스페이스 디렉토리의 전체 경로",newHelp:"워크스페이스 디렉토리의 전체 경로",githubUrl:"GitHub URL (선택사항)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"선택사항: 저장소를 clone하려면 GitHub URL을 입력하세요",githubAuth:"GitHub 인증 (선택사항)",githubAuthHelp:"비공개 저장소에만 필요합니다. 공개 저장소는 인증 없이 clone할 수 있습니다.",loadingTokens:"저장된 토큰 로딩 중...",storedToken:"저장된 토큰",newToken:"새 토큰",nonePublic:"없음 (공개)",selectToken:"토큰 선택",selectTokenPlaceholder:"-- 토큰 선택 --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"이 토큰은 이 작업에만 사용됩니다",publicRepoInfo:"공개 저장소는 인증이 필요하지 않습니다. 공개 저장소를 clone하는 경우 토큰을 생략할 수 있습니다.",noTokensHelp:"저장된 토큰이 없습니다. 설정 → API Keys에서 토큰을 추가하면 재사용이 편리합니다.",optionalTokenPublic:"GitHub 토큰 (공개 저장소는 선택사항)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (공개 저장소는 비워두세요)"},step3:{reviewConfig:"설정 검토",workspaceType:"워크스페이스 유형:",existingWorkspace:"기존 워크스페이스",newWorkspace:"새 워크스페이스",path:"경로:",cloneFrom:"Clone 소스:",authentication:"인증:",usingStoredToken:"저장된 토큰 사용:",usingProvidedToken:"제공된 토큰 사용",noAuthentication:"인증 없음",sshKey:"SSH 키",existingInfo:"워크스페이스가 프로젝트 목록에 추가되며 Claude/Cursor 세션에서 사용할 수 있습니다.",newWithClone:"이 폴더에 저장소가 clone됩니다.",newEmpty:"워크스페이스가 프로젝트 목록에 추가되며 Claude/Cursor 세션에서 사용할 수 있습니다.",cloningRepository:"저장소 clone 중..."},buttons:{cancel:"취소",back:"뒤로",next:"다음",createProject:"프로젝트 생성",creating:"생성 중...",cloning:"Clone 중..."},errors:{selectType:"기존 워크스페이스를 사용할지 새로 생성할지 선택해주세요",providePath:"워크스페이스 경로를 입력해주세요",failedToCreate:"워크스페이스 생성 실패",failedToCreateFolder:"폴더 생성 실패"}},ch={title:"업데이트 가능",newVersionReady:"새 버전이 준비되었습니다",currentVersion:"현재 버전",latestVersion:"최신 버전",whatsNew:"새로운 기능:",viewFullRelease:"전체 릴리스 보기",updateProgress:"업데이트 진행 상황:",manualUpgrade:"수동 업그레이드:",manualUpgradeHint:'또는 "지금 업데이트"를 클릭하여 자동으로 업데이트합니다.',updateCompleted:"업데이트가 완료되었습니다!",restartServer:"변경사항을 적용하려면 서버를 재시작하세요.",updateFailed:"업데이트 실패",buttons:{close:"닫기",later:"나중에",copyCommand:"명령어 복사",updateNow:"지금 업데이트",updating:"업데이트 중..."},ariaLabels:{closeModal:"버전 업그레이드 모달 닫기",showSidebar:"사이드바 표시",settings:"설정",updateAvailable:"업데이트 가능",closeSidebar:"사이드바 닫기"}},lh={buttons:Qp,tabs:Xp,status:Zp,messages:eh,navigation:th,common:rh,time:nh,fileOperations:sh,mainContent:oh,fileTree:ih,projectWizard:ah,versionUpdate:ch},uh="설정",dh={account:"계정",permissions:"권한",mcpServers:"MCP 서버",appearance:"외관"},ph={title:"계정",language:"언어",languageLabel:"표시 언어",languageDescription:"인터페이스에 사용할 언어를 선택하세요",username:"사용자명",email:"이메일",profile:"프로필",changePassword:"비밀번호 변경"},hh={title:"MCP 서버",addServer:"서버 추가",editServer:"서버 편집",deleteServer:"서버 삭제",serverName:"서버 이름",serverType:"서버 유형",config:"설정",testConnection:"연결 테스트",status:"상태",connected:"연결됨",disconnected:"연결 끊김",scope:{label:"범위",user:"사용자",project:"프로젝트"}},mh={title:"외관",theme:"테마",codeEditor:"코드 에디터",editorTheme:"에디터 테마",wordWrap:"자동 줄바꿈",showMinimap:"미니맵 표시",lineNumbers:"줄 번호",fontSize:"글꼴 크기"},fh={saveChanges:"변경사항 저장",resetToDefaults:"기본값으로 초기화",cancelChanges:"변경 취소"},gh={title:"빠른 설정",sections:{appearance:"외관",toolDisplay:"도구 표시",viewOptions:"보기 옵션",inputSettings:"입력 설정",whisperDictation:"Whisper 음성 인식"},darkMode:"다크 모드",autoExpandTools:"도구 자동 펼치기",showRawParameters:"Raw 파라미터 표시",showThinking:"생각 과정 표시",autoScrollToBottom:"자동 스크롤",sendByCtrlEnter:"Ctrl+Enter로 전송",sendByCtrlEnterDescription:"활성화하면 Enter 대신 Ctrl+Enter로 메시지를 전송합니다. IME 사용자가 실수로 전송하는 것을 방지하는 데 유용합니다.",dragHandle:{dragging:"드래그 핸들",closePanel:"설정 패널 닫기",openPanel:"설정 패널 열기",draggingStatus:"드래그 중...",toggleAndMove:"클릭하여 토글, 드래그하여 이동"},whisper:{modes:{default:"기본 모드",defaultDescription:"음성을 그대로 텍스트로 변환",prompt:"프롬프트 향상",promptDescription:"거친 아이디어를 명확하고 상세한 AI 프롬프트로 변환",vibe:"Vibe 모드",vibeDescription:"아이디어를 상세한 에이전트 지침 형식으로 변환"}}},vh={agents:"에이전트",appearance:"외관",git:"Git",apiTokens:"API & 토큰",tasks:"작업"},yh={darkMode:{label:"다크 모드",description:"라이트/다크 테마 전환"},projectSorting:{label:"프로젝트 정렬",description:"사이드바에서 프로젝트 정렬 방식",alphabetical:"알파벳순",recentActivity:"최근 활동순"},codeEditor:{title:"코드 에디터",theme:{label:"에디터 테마",description:"코드 에디터의 기본 테마"},wordWrap:{label:"자동 줄바꿈",description:"에디터에서 기본적으로 자동 줄바꿈 활성화"},showMinimap:{label:"미니맵 표시",description:"Diff 보기에서 쉬운 탐색을 위한 미니맵 표시"},lineNumbers:{label:"줄 번호 표시",description:"에디터에 줄 번호 표시"},fontSize:{label:"글꼴 크기",description:"에디터 글꼴 크기 (픽셀)"}}},bh={title:{add:"MCP 서버 추가",edit:"MCP 서버 편집"},importMode:{form:"폼 입력",json:"JSON 가져오기"},scope:{label:"범위",userGlobal:"사용자 (전역)",projectLocal:"프로젝트 (로컬)",userDescription:"사용자 범위: 모든 프로젝트에서 사용 가능",projectDescription:"로컬 범위: 선택한 프로젝트에서만 사용 가능",cannotChange:"기존 서버를 편집할 때는 범위를 변경할 수 없습니다"},fields:{serverName:"서버 이름",transportType:"전송 유형",command:"명령어",arguments:"인수 (한 줄에 하나씩)",jsonConfig:"JSON 설정",url:"URL",envVars:"환경 변수 (KEY=value, 한 줄에 하나씩)",headers:"헤더 (KEY=value, 한 줄에 하나씩)",selectProject:"프로젝트 선택..."},placeholders:{serverName:"my-server"},validation:{missingType:"필수 항목 누락: type",stdioRequiresCommand:"stdio 유형은 command 필드가 필요합니다",httpRequiresUrl:"{{type}} 유형은 url 필드가 필요합니다",invalidJson:"잘못된 JSON 형식",jsonHelp:"MCP 서버 설정을 JSON 형식으로 붙여넣으세요. 예시:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"설정 상세 ({{configFile}}에서)",projectPath:"경로: {{path}}",actions:{cancel:"취소",saving:"저장 중...",addServer:"서버 추가",updateServer:"서버 업데이트"}},wh={success:"설정이 저장되었습니다!",error:"설정 저장 실패",saving:"저장 중..."},Sh={save:"설정 저장",cancel:"취소"},kh={title:"Git 설정",description:"커밋을 위한 Git 정보를 설정합니다. 이 설정은 git config --global로 전역 적용됩니다",name:{label:"Git 이름",help:"Git 커밋에 사용될 이름"},email:{label:"Git 이메일",help:"Git 커밋에 사용될 이메일"},actions:{save:"설정 저장",saving:"저장 중..."},status:{success:"저장 완료"}},_h={title:"API 키",description:"다른 애플리케이션에서 외부 API에 접근하기 위한 API 키를 생성합니다.",newKey:{alertTitle:"⚠️ API 키를 저장하세요",alertMessage:"이 키는 지금만 볼 수 있습니다. 안전하게 보관하세요.",iveSavedIt:"저장했습니다"},form:{placeholder:"API 키 이름 (예: Production Server)",createButton:"생성",cancelButton:"취소"},newButton:"새 API 키",empty:"생성된 API 키가 없습니다.",list:{created:"생성일:",lastUsed:"마지막 사용:"},confirmDelete:"이 API 키를 삭제하시겠습니까?",status:{active:"활성",inactive:"비활성"},github:{title:"GitHub 토큰",description:"외부 API를 통해 비공개 저장소를 clone하기 위한 GitHub Personal Access Token을 추가합니다.",descriptionAlt:"비공개 저장소를 clone하기 위한 GitHub Personal Access Token을 추가합니다. 저장하지 않고 API 요청에 직접 토큰을 전달할 수도 있습니다.",addButton:"토큰 추가",form:{namePlaceholder:"토큰 이름 (예: Personal Repos)",tokenPlaceholder:"GitHub Personal Access Token (ghp_...)",descriptionPlaceholder:"설명 (선택사항)",addButton:"토큰 추가",cancelButton:"취소",howToCreate:"GitHub Personal Access Token 생성 방법 →"},empty:"추가된 GitHub 토큰이 없습니다.",added:"추가일:",confirmDelete:"이 GitHub 토큰을 삭제하시겠습니까?"},apiDocsLink:"API 문서",documentation:{title:"외부 API 문서",description:"외부 API를 사용하여 애플리케이션에서 Claude/Cursor 세션을 트리거하는 방법을 알아보세요.",viewLink:"API 문서 보기 →"},loading:"로딩 중...",version:{updateAvailable:"업데이트 가능: v{{version}}"}},Ch={checking:"TaskMaster 설치 확인 중...",notInstalled:{title:"TaskMaster AI CLI가 설치되지 않았습니다",description:"작업 관리 기능을 사용하려면 TaskMaster CLI가 필요합니다. 시작하려면 설치하세요:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"GitHub에서 보기",afterInstallation:"설치 후:",steps:{restart:"이 애플리케이션을 재시작하세요",autoAvailable:"TaskMaster 기능이 자동으로 활성화됩니다",initCommand:"프로젝트 디렉토리에서 task-master init을 사용하세요"}},settings:{enableLabel:"TaskMaster 통합 활성화",enableDescription:"인터페이스 전체에 TaskMaster 작업, 배너 및 사이드바 표시"}},Th={authStatus:{checking:"확인 중...",connected:"연결됨",notConnected:"연결되지 않음",disconnected:"연결 끊김",checkingAuth:"인증 상태 확인 중...",loggedInAs:"{{email}}(으)로 로그인됨",authenticatedUser:"인증된 사용자"},account:{claude:{description:"Anthropic Claude AI 어시스턴트"},cursor:{description:"Cursor AI 기반 코드 에디터"},codex:{description:"OpenAI Codex AI 어시스턴트"}},connectionStatus:"연결 상태",login:{title:"로그인",reAuthenticate:"재인증",description:"AI 기능을 활성화하려면 {{agent}} 계정에 로그인하세요",reAuthDescription:"다른 계정으로 로그인하거나 자격 증명을 새로고침하세요",button:"로그인",reLoginButton:"재로그인"},error:"오류: {{error}}"},Eh={title:"권한 설정",skipPermissions:{label:"권한 확인 건너뛰기 (주의해서 사용)",claudeDescription:"--dangerously-skip-permissions 플래그와 동일",cursorDescription:"Cursor CLI의 -f 플래그와 동일"},allowedTools:{title:"허용된 도구",description:"권한 확인 없이 자동으로 허용되는 도구",placeholder:'예: "Bash(git log:*)" 또는 "Write"',quickAdd:"자주 쓰는 도구 빠른 추가:",empty:"설정된 허용 도구 없음"},blockedTools:{title:"차단된 도구",description:"권한 확인 없이 자동으로 차단되는 도구",placeholder:'예: "Bash(rm:*)"',empty:"설정된 차단 도구 없음"},allowedCommands:{title:"허용된 Shell 명령어",description:"권한 확인 없이 자동으로 허용되는 Shell 명령어",placeholder:'예: "Shell(ls)" 또는 "Shell(git status)"',quickAdd:"자주 쓰는 명령어 빠른 추가:",empty:"설정된 허용 명령어 없음"},blockedCommands:{title:"차단된 Shell 명령어",description:"자동으로 차단되는 Shell 명령어",placeholder:'예: "Shell(rm -rf)" 또는 "Shell(sudo)"',empty:"설정된 차단 명령어 없음"},toolExamples:{title:"도구 패턴 예시:",bashGitLog:"- 모든 git log 명령어 허용",bashGitDiff:"- 모든 git diff 명령어 허용",write:"- 모든 Write 도구 사용 허용",bashRm:"- 모든 rm 명령어 차단 (위험)"},shellExamples:{title:"Shell 명령어 예시:",ls:"- ls 명령어 허용",gitStatus:"- git status 허용",npmInstall:"- npm install 허용",rmRf:"- 재귀 삭제 차단"},codex:{permissionMode:"권한 모드",description:"Codex가 파일 수정 및 명령어 실행을 처리하는 방식을 제어합니다",modes:{default:{title:"기본",description:"신뢰할 수 있는 명령어(ls, cat, grep, git status 등)만 자동 실행됩니다. 다른 명령어는 건너뜁니다. 워크스페이스에 쓰기 가능."},acceptEdits:{title:"편집 허용",description:"워크스페이스 내에서 모든 명령어가 자동 실행됩니다. 샌드박스 내 완전 자동 모드."},bypassPermissions:{title:"권한 우회",description:"제한 없는 전체 시스템 접근. 모든 명령어가 전체 디스크 및 네트워크 접근 권한으로 자동 실행됩니다. 주의해서 사용하세요."}},technicalDetails:"기술 상세",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted. 신뢰할 수 있는 명령어: cat, cd, grep, head, ls, pwd, tail, git status/log/diff/show, find(-exec 제외) 등.",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never. 프로젝트 디렉토리 내에서 모든 명령어 자동 실행.",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never. 전체 시스템 접근, 신뢰할 수 있는 환경에서만 사용하세요.",overrideNote:"채팅 인터페이스의 모드 버튼을 사용하여 세션별로 재정의할 수 있습니다."}},actions:{add:"추가"}},Ph={title:"MCP 서버",description:{claude:"Model Context Protocol 서버는 Claude에 추가 도구와 데이터 소스를 제공합니다",cursor:"Model Context Protocol 서버는 Cursor에 추가 도구와 데이터 소스를 제공합니다",codex:"Model Context Protocol 서버는 Codex에 추가 도구와 데이터 소스를 제공합니다"},addButton:"MCP 서버 추가",empty:"설정된 MCP 서버 없음",serverType:"유형",scope:{local:"로컬",user:"사용자"},config:{command:"명령어",url:"URL",args:"인수",environment:"환경"},tools:{title:"도구",count:"({{count}}):",more:"+{{count}}개 더"},actions:{edit:"서버 편집",delete:"서버 삭제"},help:{title:"Codex MCP 정보",description:"Codex는 stdio 기반 MCP 서버를 지원합니다. 추가 도구와 리소스로 Codex의 기능을 확장하는 서버를 추가할 수 있습니다."}},xh={title:uh,tabs:dh,account:ph,mcp:hh,appearance:mh,actions:fh,quickSettings:gh,mainTabs:vh,appearanceSettings:yh,mcpForm:bh,saveStatus:wh,footerActions:Sh,git:kh,apiKeys:_h,tasks:Ch,agents:Th,permissions:Eh,mcpServers:Ph},Ah={title:"다시 오신 것을 환영합니다",description:"Upfyn-Code 계정에 로그인하세요",username:"사용자명",password:"비밀번호",submit:"로그인",loading:"로그인 중...",errors:{invalidCredentials:"사용자명 또는 비밀번호가 잘못되었습니다",requiredFields:"모든 항목을 입력해주세요",networkError:"네트워크 오류. 다시 시도해주세요."},placeholders:{username:"사용자명을 입력하세요",password:"비밀번호를 입력하세요"}},jh={title:"계정 생성",username:"사용자명",password:"비밀번호",confirmPassword:"비밀번호 확인",submit:"계정 생성",loading:"계정 생성 중...",errors:{passwordMismatch:"비밀번호가 일치하지 않습니다",usernameTaken:"이미 사용 중인 사용자명입니다",weakPassword:"비밀번호가 너무 약합니다"}},Mh={title:"로그아웃",confirm:"정말 로그아웃하시겠습니까?",button:"로그아웃"},Oh={login:Ah,register:jh,logout:Mh},Ih={title:"프로젝트",newProject:"새 프로젝트",deleteProject:"프로젝트 삭제",renameProject:"프로젝트 이름 변경",noProjects:"프로젝트가 없습니다",loadingProjects:"프로젝트 로딩 중...",searchPlaceholder:"프로젝트 검색...",projectNamePlaceholder:"프로젝트 이름",starred:"즐겨찾기",all:"전체",untitledSession:"제목 없는 세션",newSession:"새 세션",codexSession:"Codex 세션",fetchingProjects:"Claude 프로젝트와 세션을 가져오는 중",projects:"프로젝트",noMatchingProjects:"일치하는 프로젝트 없음",tryDifferentSearch:"검색어를 변경해보세요",runClaudeCli:"프로젝트 디렉토리에서 Claude CLI를 실행하여 시작하세요"},Dh={title:"Upfyn-Code",subtitle:"AI 코딩 어시스턴트 UI"},Lh={title:"세션",newSession:"새 세션",deleteSession:"세션 삭제",renameSession:"세션 이름 변경",noSessions:"세션이 없습니다",loadingSessions:"세션 로딩 중...",unnamed:"이름 없음",loading:"로딩 중...",showMore:"더 많은 세션 보기"},Nh={viewEnvironments:"환경 보기",hideSidebar:"사이드바 숨기기",createProject:"새 프로젝트 생성",refresh:"프로젝트 및 세션 새로고침 (Ctrl+R)",renameProject:"프로젝트 이름 변경 (F2)",deleteProject:"빈 프로젝트 삭제 (Delete)",addToFavorites:"즐겨찾기에 추가",removeFromFavorites:"즐겨찾기에서 제거",editSessionName:"세션 이름 직접 편집",deleteSession:"이 세션 영구 삭제",save:"저장",cancel:"취소"},Rh={chat:"채팅",files:"파일",git:"Git",terminal:"터미널",tasks:"작업"},Fh={refresh:"새로고침",settings:"설정",collapseAll:"모두 접기",expandAll:"모두 펼치기",cancel:"취소",save:"저장",delete:"삭제",rename:"이름 변경"},$h={active:"활성",inactive:"비활성",thinking:"생각 중...",error:"오류",aborted:"중단됨",unknown:"알 수 없음"},Uh={justNow:"방금 전",oneMinuteAgo:"1분 전",minutesAgo:"{{count}}분 전",oneHourAgo:"1시간 전",hoursAgo:"{{count}}시간 전",oneDayAgo:"1일 전",daysAgo:"{{count}}일 전"},qh={deleteConfirm:"정말 삭제하시겠습니까?",renameSuccess:"이름이 변경되었습니다",deleteSuccess:"삭제되었습니다",errorOccurred:"오류가 발생했습니다",deleteSessionConfirm:"이 세션을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",deleteProjectConfirm:"이 빈 프로젝트를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",enterProjectPath:"프로젝트 경로를 입력해주세요",deleteSessionFailed:"세션 삭제 실패. 다시 시도해주세요.",deleteSessionError:"세션 삭제 오류. 다시 시도해주세요.",deleteProjectFailed:"프로젝트 삭제 실패. 다시 시도해주세요.",deleteProjectError:"프로젝트 삭제 오류. 다시 시도해주세요.",createProjectFailed:"프로젝트 생성 실패. 다시 시도해주세요.",createProjectError:"프로젝트 생성 오류. 다시 시도해주세요."},Vh={updateAvailable:"업데이트 가능"},Bh={deleteProject:"프로젝트 삭제",deleteSession:"세션 삭제",confirmDelete:"정말 삭제하시겠습니까",sessionCount_one:"이 프로젝트에는 {{count}}개의 대화가 있습니다.",sessionCount_other:"이 프로젝트에는 {{count}}개의 대화가 있습니다.",allConversationsDeleted:"모든 대화가 영구적으로 삭제됩니다.",cannotUndo:"이 작업은 취소할 수 없습니다."},Jh={projects:Ih,app:Dh,sessions:Lh,tooltips:Nh,navigation:Rh,actions:Fh,status:$h,time:Uh,messages:qh,version:Vh,deleteConfirmation:Bh},Gh={copy:"복사",copied:"복사됨",copyCode:"코드 복사"},Hh={user:"U",error:"오류",tool:"도구",claude:"Claude",cursor:"Cursor",codex:"Codex"},Wh={settings:"도구 설정",error:"도구 오류",result:"도구 결과",viewParams:"입력 파라미터 보기",viewRawParams:"Raw 파라미터 보기",viewDiff:"편집 Diff 보기:",creatingFile:"새 파일 생성:",updatingTodo:"Todo 리스트 업데이트",read:"읽기",readFile:"파일 읽기",updateTodo:"Todo 리스트 업데이트",readTodo:"Todo 리스트 읽기",searchResults:"결과"},zh={found:"{{count}}개의 {{type}} 발견",file:"파일",files:"파일",pattern:"패턴:",in:"위치:"},Yh={updated:"파일이 업데이트되었습니다",created:"파일이 생성되었습니다",written:"파일이 작성되었습니다",diff:"Diff",newFile:"새 파일",viewContent:"파일 내용 보기",viewFullOutput:"전체 출력 보기 ({{count}}자)",contentDisplayed:"파일 내용이 위의 Diff 보기에 표시됩니다"},Kh={title:"대화형 프롬프트",waiting:"CLI에서 응답을 기다리는 중",instruction:"Claude가 실행 중인 터미널에서 옵션을 선택해주세요.",selectedOption:"✓ Claude가 옵션 {{number}}을(를) 선택했습니다",instructionDetail:"CLI에서 화살표 키 또는 숫자를 입력하여 이 옵션을 대화형으로 선택합니다."},Qh={title:"생각 중...",emoji:"💭 생각 중..."},Xh={response:"JSON 응답"},Zh={grant:"{{tool}}에 대한 권한 부여",added:"권한이 추가되었습니다",addTo:"{{entry}}을(를) 허용된 도구에 추가합니다.",retry:"권한이 저장되었습니다. 도구를 사용하려면 요청을 재시도하세요.",error:"권한을 업데이트할 수 없습니다. 다시 시도해주세요.",openSettings:"설정 열기"},em={updated:"Todo 리스트가 업데이트되었습니다",current:"현재 Todo 리스트"},tm={viewPlan:"📋 구현 계획 보기",title:"구현 계획"},rm={resetAt:"Claude 사용량 한도에 도달했습니다. 한도는 **{{time}} {{timezone}}** - {{date}}에 초기화됩니다"},nm={permissionMode:"권한 모드",modes:{default:"기본 모드",acceptEdits:"편집 허용",bypassPermissions:"권한 우회",plan:"Plan 모드"},descriptions:{default:"신뢰할 수 있는 명령어(ls, cat, grep, git status 등)만 자동 실행됩니다. 다른 명령어는 건너뜁니다. 워크스페이스에 쓰기 가능.",acceptEdits:"워크스페이스 내에서 모든 명령어가 자동 실행됩니다. 샌드박스 내 완전 자동 모드.",bypassPermissions:"제한 없는 전체 시스템 접근. 모든 명령어가 전체 디스크 및 네트워크 접근 권한으로 자동 실행됩니다. 주의해서 사용하세요.",plan:"계획 모드 - 명령어가 실행되지 않습니다"},technicalDetails:"기술 상세"},sm={placeholder:"/를 입력하여 명령어, @를 입력하여 파일, 또는 {{provider}}에게 무엇이든 물어보세요...",placeholderDefault:"메시지를 입력하세요...",disabled:"입력 비활성화",attachFiles:"파일 첨부",attachImages:"이미지 첨부",send:"전송",stop:"중지",hintText:{ctrlEnter:"Ctrl+Enter로 전송 • Shift+Enter로 줄바꿈 • Tab으로 모드 변경 • /로 슬래시 명령어",enter:"Enter로 전송 • Shift+Enter로 줄바꿈 • Tab으로 모드 변경 • /로 슬래시 명령어"},clickToChangeMode:"클릭하여 권한 모드 변경 (또는 입력창에서 Tab)",showAllCommands:"모든 명령어 보기",clearInput:"입력 지우기",scrollToBottom:"맨 아래로 스크롤"},om={selector:{title:"Thinking 모드",description:"확장된 thinking은 Claude에게 대안을 평가할 시간을 더 줍니다",active:"활성",tip:"높은 thinking 모드는 시간이 더 걸리지만 더 철저한 분석을 제공합니다"},modes:{none:{name:"Standard",description:"일반 Claude 응답",prefix:""},think:{name:"Think",description:"기본 확장 thinking",prefix:"think"},thinkHard:{name:"Think Hard",description:"더 철저한 평가",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"대안을 포함한 심층 분석",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"최대 thinking 예산",prefix:"ultrathink"}},buttonTitle:"Thinking 모드: {{mode}}"},im={title:"AI 어시스턴트 선택",description:"새 대화를 시작할 프로바이더를 선택하세요",selectModel:"모델 선택",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",cursorEditor:"AI 코드 에디터"},readyPrompt:{claude:"{{model}}로 Claude를 사용할 준비가 되었습니다. 아래에 메시지를 입력하세요.",cursor:"{{model}}로 Cursor를 사용할 준비가 되었습니다. 아래에 메시지를 입력하세요.",codex:"{{model}}로 Codex를 사용할 준비가 되었습니다. 아래에 메시지를 입력하세요.",default:"시작하려면 위에서 프로바이더를 선택하세요"}},am={continue:{title:"대화 계속하기",description:"코드에 대해 질문하거나, 변경을 요청하거나, 개발 작업에 도움을 받으세요"},loading:{olderMessages:"이전 메시지 로딩 중...",sessionMessages:"세션 메시지 로딩 중..."},messages:{showingOf:"{{total}}개 중 {{shown}}개 표시",scrollToLoad:"위로 스크롤하여 더 로드",showingLast:"마지막 {{count}}개 메시지 표시 (총 {{total}}개)",loadEarlier:"이전 메시지 로드",loadAll:"모든 메시지 로드",loadingAll:"모든 메시지 로딩 중...",allLoaded:"모든 메시지 로드 완료",perfWarning:'모든 메시지가 로드됨 - 스크롤이 느려질 수 있습니다. "맨 아래로 스크롤"을 클릭하면 성능이 복구됩니다.'}},cm={selectProject:{title:"프로젝트 선택",description:"해당 디렉토리에서 대화형 Shell을 열 프로젝트를 선택하세요"},status:{newSession:"새 세션",initializing:"초기화 중...",restarting:"재시작 중..."},actions:{disconnect:"연결 끊기",disconnectTitle:"Shell 연결 끊기",restart:"재시작",restartTitle:"Shell 재시작 (먼저 연결 끊기)",connect:"Shell에서 계속",connectTitle:"Shell에 연결"},loading:"터미널 로딩 중...",connecting:"Shell에 연결 중...",startSession:"새 Claude 세션 시작",resumeSession:"세션 재개: {{displayName}}...",runCommand:"{{projectName}}에서 {{command}} 실행",startCli:"{{projectName}}에서 Claude CLI 시작",defaultCommand:"명령어"},lm={startChatWithProvider:"{{provider}}와 채팅을 시작하려면 프로젝트를 선택하세요"},um={nextTaskPrompt:"다음 작업 시작"},dm={codeBlock:Gh,messageTypes:Hh,tools:Wh,search:zh,fileOperations:Yh,interactive:Kh,thinking:Qh,json:Xh,permissions:Zh,todo:em,plan:tm,usageLimit:rm,codex:nm,input:sm,thinkingMode:om,providerSelection:im,session:am,shell:cm,projectSelection:lm,tasks:um},pm={changes:"변경사항",previousChange:"이전 변경",nextChange:"다음 변경",hideDiff:"Diff 하이라이트 숨기기",showDiff:"Diff 하이라이트 표시",settings:"에디터 설정",collapse:"에디터 접기",expand:"에디터 전체 너비로 펼치기"},hm="{{fileName}} 로딩 중...",mm={showingChanges:"변경사항 표시"},fm={download:"파일 다운로드",save:"저장",saving:"저장 중...",saved:"저장됨!",exitFullscreen:"전체화면 종료",fullscreen:"전체화면",close:"닫기"},gm={lines:"줄:",characters:"문자:",shortcuts:"Ctrl+S로 저장 • Esc로 닫기"},vm={toolbar:pm,loading:hm,header:mm,actions:fm,footer:gm},ym={save:"保存",cancel:"取消",delete:"删除",create:"创建",edit:"编辑",close:"关闭",confirm:"确认",submit:"提交",retry:"重试",refresh:"刷新",search:"搜索",clear:"清除",copy:"复制",download:"下载",upload:"上传",browse:"浏览"},bm={chat:"聊天",shell:"终端",files:"文件",git:"源代码管理",tasks:"任务"},wm={loading:"加载中...",success:"成功",error:"错误",failed:"失败",pending:"待处理",completed:"已完成",inProgress:"进行中"},Sm={savedSuccessfully:"保存成功",deletedSuccessfully:"删除成功",updatedSuccessfully:"更新成功",operationFailed:"操作失败",networkError:"网络错误,请检查您的连接。",unauthorized:"未授权,请登录。",notFound:"未找到",invalidInput:"输入无效",requiredField:"此字段为必填项",unknownError:"发生未知错误"},km={settings:"设置",home:"首页",back:"返回",next:"下一步",previous:"上一步",logout:"退出登录"},_m={language:"语言",theme:"主题",darkMode:"深色模式",lightMode:"浅色模式",name:"名称",description:"描述",enabled:"已启用",disabled:"已禁用",optional:"可选",version:"版本",select:"选择",selectAll:"全选",deselectAll:"取消全选"},Cm={justNow:"刚刚",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前",yesterday:"昨天"},Tm={newFile:"新建文件",newFolder:"新建文件夹",rename:"重命名",move:"移动",copyPath:"复制路径",openInEditor:"在编辑器中打开"},Em={loading:"正在加载 Upfyn-Code",settingUpWorkspace:"正在设置您的工作空间...",chooseProject:"选择您的项目",selectProjectDescription:"从侧边栏选择一个项目以开始使用 Claude 进行编程。每个项目包含您的聊天会话和文件历史。",tip:"提示",createProjectMobile:"点击上方的菜单按钮以访问项目",createProjectDesktop:"点击侧边栏中的文件夹图标以创建新项目",newSession:"新会话",untitledSession:"未命名会话",projectFiles:"项目文件"},Pm={loading:"正在加载文件...",files:"文件",simpleView:"简单视图",compactView:"紧凑视图",detailedView:"详细视图",searchPlaceholder:"搜索文件和文件夹...",clearSearch:"清除搜索",name:"名称",size:"大小",modified:"修改时间",permissions:"权限",noFilesFound:"未找到文件",checkProjectPath:"检查项目路径是否可访问",noMatchesFound:"未找到匹配项",tryDifferentSearch:"尝试不同的搜索词或清除搜索",justNow:"刚刚",minAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前"},xm={title:"创建新项目",steps:{type:"类型",configure:"配置",confirm:"确认"},step1:{question:"您已经有工作区,还是想创建一个新的工作区?",existing:{title:"现有工作区",description:"我的服务器上已经有工作区,只需要将其添加到项目列表中"},new:{title:"新建工作区",description:"创建一个新工作区,可选择从 GitHub 仓库克隆"}},step2:{existingPath:"工作区路径",newPath:"工作区路径",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"您现有工作区目录的完整路径",newHelp:"工作区目录的完整路径",githubUrl:"GitHub URL(可选)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"可选:提供 GitHub URL 以克隆仓库",githubAuth:"GitHub 身份验证(可选)",githubAuthHelp:"仅私有仓库需要。公共仓库无需身份验证即可克隆。",loadingTokens:"正在加载已保存的令牌...",storedToken:"已保存的令牌",newToken:"新令牌",nonePublic:"无(公共)",selectToken:"选择令牌",selectTokenPlaceholder:"-- 选择令牌 --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"此令牌仅用于此操作",publicRepoInfo:"公共仓库不需要身份验证。如果克隆公共仓库,可以跳过提供令牌。",noTokensHelp:"没有可用的已保存令牌。您可以在 设置 → API 密钥 中添加令牌以便重复使用。",optionalTokenPublic:"GitHub 令牌(公共仓库可选)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(公共仓库可留空)"},step3:{reviewConfig:"查看您的配置",workspaceType:"工作区类型:",existingWorkspace:"现有工作区",newWorkspace:"新建工作区",path:"路径:",cloneFrom:"克隆自:",authentication:"身份验证:",usingStoredToken:"使用已保存的令牌:",usingProvidedToken:"使用提供的令牌",noAuthentication:"无身份验证",sshKey:"SSH 密钥",existingInfo:"工作区将被添加到您的项目列表中,并可用于 Claude/Cursor 会话。",newWithClone:"仓库将从此文件夹克隆。",newEmpty:"工作区将被添加到您的项目列表中,并可用于 Claude/Cursor 会话。",cloningRepository:"正在克隆仓库..."},buttons:{cancel:"取消",back:"返回",next:"下一步",createProject:"创建项目",creating:"创建中...",cloning:"正在克隆..."},errors:{selectType:"请选择您已有现有工作区还是想创建新工作区",providePath:"请提供工作区路径",failedToCreate:"创建工作区失败",failedToCreateFolder:"创建文件夹失败"}},Am={title:"有可用更新",newVersionReady:"新版本已准备就绪",currentVersion:"当前版本",latestVersion:"最新版本",whatsNew:"新内容:",viewFullRelease:"查看完整发布",updateProgress:"更新进度:",manualUpgrade:"手动升级:",manualUpgradeHint:"或点击'立即更新'以自动运行更新。",updateCompleted:"更新成功完成!",restartServer:"请重启服务器以应用更改。",updateFailed:"更新失败",buttons:{close:"关闭",later:"稍后",copyCommand:"复制命令",updateNow:"立即更新",updating:"更新中..."},ariaLabels:{closeModal:"关闭版本升级模态框",showSidebar:"显示侧边栏",settings:"设置",updateAvailable:"有可用更新",closeSidebar:"关闭侧边栏"}},jm={buttons:ym,tabs:bm,status:wm,messages:Sm,navigation:km,common:_m,time:Cm,fileOperations:Tm,mainContent:Em,fileTree:Pm,projectWizard:xm,versionUpdate:Am},Mm="设置",Om={account:"账户",permissions:"权限",mcpServers:"MCP 服务器",appearance:"外观"},Im={title:"账户",language:"语言",languageLabel:"显示语言",languageDescription:"选择您偏好的界面语言",username:"用户名",email:"邮箱",profile:"个人资料",changePassword:"修改密码"},Dm={title:"MCP 服务器",addServer:"添加服务器",editServer:"编辑服务器",deleteServer:"删除服务器",serverName:"服务器名称",serverType:"服务器类型",config:"配置",testConnection:"测试连接",status:"状态",connected:"已连接",disconnected:"未连接",scope:{label:"范围",user:"用户",project:"项目"}},Lm={title:"外观",theme:"主题",codeEditor:"代码编辑器",editorTheme:"编辑器主题",wordWrap:"自动换行",showMinimap:"显示缩略图",lineNumbers:"行号",fontSize:"字体大小"},Nm={saveChanges:"保存更改",resetToDefaults:"重置为默认值",cancelChanges:"取消更改"},Rm={title:"快速设置",sections:{appearance:"外观",toolDisplay:"工具显示",viewOptions:"视图选项",inputSettings:"输入设置",whisperDictation:"Whisper 听写"},darkMode:"深色模式",autoExpandTools:"自动展开工具",showRawParameters:"显示原始参数",showThinking:"显示思考过程",autoScrollToBottom:"自动滚动到底部",sendByCtrlEnter:"使用 Ctrl+Enter 发送",sendByCtrlEnterDescription:"启用后,按 Ctrl+Enter 发送消息,而不是仅按 Enter。这对于使用输入法的用户可以避免意外发送。",dragHandle:{dragging:"正在拖拽手柄",closePanel:"关闭设置面板",openPanel:"打开设置面板",draggingStatus:"正在拖拽...",toggleAndMove:"点击切换,拖拽移动"},whisper:{modes:{default:"默认模式",defaultDescription:"直接转录您的语音",prompt:"提示词增强",promptDescription:"将粗略的想法转化为清晰、详细的 AI 提示词",vibe:"Vibe 模式",vibeDescription:"将想法格式化为带有详细说明的清晰智能体指令"}}},Fm={agents:"智能体",appearance:"外观",git:"Git",apiTokens:"API 和令牌",tasks:"任务"},$m={darkMode:{label:"深色模式",description:"切换浅色和深色主题"},projectSorting:{label:"项目排序",description:"项目在侧边栏中的排列方式",alphabetical:"按字母顺序",recentActivity:"最近活动"},codeEditor:{title:"代码编辑器",theme:{label:"编辑器主题",description:"代码编辑器的默认主题"},wordWrap:{label:"自动换行",description:"在编辑器中默认启用自动换行"},showMinimap:{label:"显示缩略图",description:"在差异视图中显示缩略图以便于导航"},lineNumbers:{label:"显示行号",description:"在编辑器中显示行号"},fontSize:{label:"字体大小",description:"编辑器字体大小(px)"}}},Um={title:{add:"添加 MCP 服务器",edit:"编辑 MCP 服务器"},importMode:{form:"表单输入",json:"JSON 导入"},scope:{label:"范围",userGlobal:"用户(全局)",projectLocal:"项目(本地)",userDescription:"用户范围:在您机器上的所有项目中可用",projectDescription:"本地范围:仅在选定项目中可用",cannotChange:"编辑现有服务器时无法更改范围"},fields:{serverName:"服务器名称",transportType:"传输类型",command:"命令",arguments:"参数(每行一个)",jsonConfig:"JSON 配置",url:"URL",envVars:"环境变量(KEY=值,每行一个)",headers:"请求头(KEY=值,每行一个)",selectProject:"选择项目..."},placeholders:{serverName:"我的服务"},validation:{missingType:"缺少必填字段:type",stdioRequiresCommand:"stdio 类型需要 command 字段",httpRequiresUrl:"{{type}} 类型需要 url 字段",invalidJson:"无效的 JSON 格式",jsonHelp:"粘贴您的 MCP 服务器配置(JSON 格式)。示例格式:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"配置详细信息(来自 {{configFile}})",projectPath:"路径:{{path}}",actions:{cancel:"取消",saving:"保存中...",addServer:"添加服务器",updateServer:"更新服务器"}},qm={success:"设置保存成功!",error:"保存设置失败",saving:"保存中..."},Vm={save:"保存设置",cancel:"取消"},Bm={title:"Git 配置",description:"配置您的 git 提交身份。这些设置将通过 git config --global 全局应用",name:{label:"Git 名称",help:"您的 git 提交名称"},email:{label:"Git 邮箱",help:"您的 git 提交邮箱"},actions:{save:"保存配置",saving:"保存中..."},status:{success:"保存成功"}},Jm={title:"API 密钥",description:"生成 API 密钥以从其他应用访问外部 API。",newKey:{alertTitle:"⚠️ 保存您的 API 密钥",alertMessage:"这是您唯一一次看到此密钥。请妥善保存。",iveSavedIt:"我已保存"},form:{placeholder:"API 密钥名称(例如:生产服务器)",createButton:"创建",cancelButton:"取消"},newButton:"新建 API 密钥",empty:"尚未创建 API 密钥。",list:{created:"创建时间:",lastUsed:"最后使用:"},confirmDelete:"确定要删除此 API 密钥吗?",status:{active:"激活",inactive:"未激活"},github:{title:"GitHub 令牌",description:"添加 GitHub 个人访问令牌以通过外部 API 克隆私有仓库。",descriptionAlt:"添加 GitHub 个人访问令牌以克隆私有仓库。您也可以直接在 API 请求中传递令牌而无需存储。",addButton:"添加令牌",form:{namePlaceholder:"令牌名称(例如:个人仓库)",tokenPlaceholder:"GitHub 个人访问令牌(ghp_...)",descriptionPlaceholder:"描述(可选)",addButton:"添加令牌",cancelButton:"取消",howToCreate:"如何创建 GitHub 个人访问令牌 →"},empty:"尚未添加 GitHub 令牌。",added:"添加时间:",confirmDelete:"确定要删除此 GitHub 令牌吗?"},apiDocsLink:"API 文档",documentation:{title:"外部 API 文档",description:"了解如何使用外部 API 从您的应用程序触发 Claude/Cursor 会话。",viewLink:"查看 API 文档 →"},loading:"加载中...",version:{updateAvailable:"有可用更新:v{{version}}"}},Gm={checking:"正在检查 TaskMaster 安装...",notInstalled:{title:"未安装 TaskMaster AI CLI",description:"需要 TaskMaster CLI 才能使用任务管理功能。安装它以开始使用:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"在 GitHub 上查看",afterInstallation:"安装后:",steps:{restart:"重启此应用程序",autoAvailable:"TaskMaster 功能将自动可用",initCommand:"在项目目录中使用 task-master init"}},settings:{enableLabel:"启用 TaskMaster 集成",enableDescription:"在整个界面中显示 TaskMaster 任务、横幅和侧边栏指示器"}},Hm={authStatus:{checking:"检查中...",connected:"已连接",notConnected:"未连接",disconnected:"已断开",checkingAuth:"正在检查认证状态...",loggedInAs:"登录为 {{email}}",authenticatedUser:"已认证用户"},account:{claude:{description:"Anthropic Claude AI 助手"},cursor:{description:"Cursor AI 驱动的代码编辑器"},codex:{description:"OpenAI Codex AI 助手"}},connectionStatus:"连接状态",login:{title:"登录",reAuthenticate:"重新认证",description:"登录您的 {{agent}} 账户以启用 AI 功能",reAuthDescription:"使用其他账户登录或刷新凭据",button:"登录",reLoginButton:"重新登录"},error:"错误:{{error}}"},Wm={title:"权限设置",skipPermissions:{label:"跳过权限提示(请谨慎使用)",claudeDescription:"等同于 --dangerously-skip-permissions 标志",cursorDescription:"等同于 Cursor CLI 中的 -f 标志"},allowedTools:{title:"允许的工具",description:"无需权限提示即可自动使用的工具",placeholder:'例如:"Bash(git log:*)" 或 "Write"',quickAdd:"快速添加常用工具:",empty:"未配置允许的工具"},blockedTools:{title:"禁用的工具",description:"无需权限提示即可自动禁用的工具",placeholder:'例如:"Bash(rm:*)"',empty:"未配置禁用的工具"},allowedCommands:{title:"允许的 Shell 命令",description:"无需权限提示即可自动执行的 Shell 命令",placeholder:'例如:"Shell(ls)" 或 "Shell(git status)"',quickAdd:"快速添加常用命令:",empty:"未配置允许的命令"},blockedCommands:{title:"阻止的 Shell 命令",description:"自动阻止的 Shell 命令",placeholder:'例如:"Shell(rm -rf)" 或 "Shell(sudo)"',empty:"未配置阻止的命令"},toolExamples:{title:"工具模式示例:",bashGitLog:"- 允许所有 git log 命令",bashGitDiff:"- 允许所有 git diff 命令",write:"- 允许所有 Write 工具使用",bashRm:"- 阻止所有 rm 命令(危险)"},shellExamples:{title:"Shell 命令示例:",ls:"- 允许 ls 命令",gitStatus:"- 允许 git status",npmInstall:"- 允许 npm install",rmRf:"- 阻止递归删除"},codex:{permissionMode:"权限模式",description:"控制 Codex 如何处理文件修改和命令执行",modes:{default:{title:"默认",description:"只有受信任的命令(ls、cat、grep、git status 等)会自动运行。其他命令将被跳过。可以写入工作区。"},acceptEdits:{title:"接受编辑",description:"所有命令在工作区内自动运行。具有沙箱执行的全自动模式。"},bypassPermissions:{title:"绕过权限",description:"完全系统访问,无任何限制。所有命令自动运行,具有完整的磁盘和网络访问权限。请谨慎使用。"}},technicalDetails:"技术详情",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted。受信任的命令:cat、cd、grep、head、ls、pwd、tail、git status/log/diff/show、find(不带 -exec)等。",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never。所有命令在项目目录内自动执行。",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never。完全系统访问权限,仅在可信环境中使用。",overrideNote:"您可以使用聊天界面中的模式按钮按会话覆盖此设置。"}},actions:{add:"添加"}},zm={title:"MCP 服务器",description:{claude:"Model Context Protocol 服务器为 Claude 提供额外的工具和数据源",cursor:"Model Context Protocol 服务器为 Cursor 提供额外的工具和数据源",codex:"Model Context Protocol 服务器为 Codex 提供额外的工具和数据源"},addButton:"添加 MCP 服务器",empty:"未配置 MCP 服务器",serverType:"类型",scope:{local:"本地",user:"用户"},config:{command:"命令",url:"URL",args:"参数",environment:"环境变量"},tools:{title:"工具",count:"({{count}}):",more:"还有 {{count}} 个"},actions:{edit:"编辑服务器",delete:"删除服务器"},help:{title:"关于 Codex MCP",description:"Codex 支持基于 stdio 的 MCP 服务器。您可以添加服务器,通过额外的工具和资源来扩展 Codex 的功能。"}},Ym={title:Mm,tabs:Om,account:Im,mcp:Dm,appearance:Lm,actions:Nm,quickSettings:Rm,mainTabs:Fm,appearanceSettings:$m,mcpForm:Um,saveStatus:qm,footerActions:Vm,git:Bm,apiKeys:Jm,tasks:Gm,agents:Hm,permissions:Wm,mcpServers:zm},Km={title:"欢迎回来",description:"登录您的 Upfyn-Code 账户",username:"用户名",password:"密码",submit:"登录",loading:"登录中...",errors:{invalidCredentials:"用户名或密码无效",requiredFields:"请填写所有字段",networkError:"网络错误,请重试。"},placeholders:{username:"输入您的用户名",password:"输入您的密码"}},Qm={title:"创建账户",username:"用户名",password:"密码",confirmPassword:"确认密码",submit:"创建账户",loading:"创建账户中...",errors:{passwordMismatch:"密码不匹配",usernameTaken:"用户名已被占用",weakPassword:"密码强度太弱"}},Xm={title:"退出登录",confirm:"确定要退出登录吗?",button:"退出登录"},Zm={login:Km,register:Qm,logout:Xm},ef={title:"项目",newProject:"新建项目",deleteProject:"删除项目",renameProject:"重命名项目",noProjects:"未找到项目",loadingProjects:"加载项目中...",searchPlaceholder:"搜索项目...",projectNamePlaceholder:"项目名称",starred:"星标",all:"全部",untitledSession:"未命名会话",newSession:"新会话",codexSession:"Codex 会话",fetchingProjects:"正在获取您的 Claude 项目和会话",projects:"项目",noMatchingProjects:"未找到匹配的项目",tryDifferentSearch:"尝试调整您的搜索词",runClaudeCli:"在项目目录中运行 Claude CLI 以开始使用"},tf={title:"Upfyn-Code",subtitle:"AI 编程助手"},rf={title:"会话",newSession:"新建会话",deleteSession:"删除会话",renameSession:"重命名会话",noSessions:"暂无会话",loadingSessions:"加载会话中...",unnamed:"未命名",loading:"加载中...",showMore:"显示更多会话"},nf={viewEnvironments:"查看环境",hideSidebar:"隐藏侧边栏",createProject:"创建新项目",refresh:"刷新项目和会话 (Ctrl+R)",renameProject:"重命名项目 (F2)",deleteProject:"删除空项目 (Delete)",addToFavorites:"添加到收藏",removeFromFavorites:"从收藏移除",editSessionName:"手动编辑会话名称",deleteSession:"永久删除此会话",save:"保存",cancel:"取消"},sf={chat:"聊天",files:"文件",git:"Git",terminal:"终端",tasks:"任务"},of={refresh:"刷新",settings:"设置",collapseAll:"全部折叠",expandAll:"全部展开",cancel:"取消",save:"保存",delete:"删除",rename:"重命名"},af={active:"活动",inactive:"非活动",thinking:"思考中...",error:"错误",aborted:"已中止",unknown:"未知"},cf={justNow:"刚刚",oneMinuteAgo:"1 分钟前",minutesAgo:"{{count}} 分钟前",oneHourAgo:"1 小时前",hoursAgo:"{{count}} 小时前",oneDayAgo:"1 天前",daysAgo:"{{count}} 天前"},lf={deleteConfirm:"确定要删除吗?",renameSuccess:"重命名成功",deleteSuccess:"删除成功",errorOccurred:"发生错误",deleteSessionConfirm:"确定要删除此会话吗?此操作无法撤销。",deleteProjectConfirm:"确定要删除此空项目吗?此操作无法撤销。",enterProjectPath:"请输入项目路径",deleteSessionFailed:"删除会话失败,请重试。",deleteSessionError:"删除会话时出错,请重试。",deleteProjectFailed:"删除项目失败,请重试。",deleteProjectError:"删除项目时出错,请重试。",createProjectFailed:"创建项目失败,请重试。",createProjectError:"创建项目时出错,请重试。"},uf={updateAvailable:"有可用更新"},df={deleteProject:"删除项目",deleteSession:"删除会话",confirmDelete:"您确定要删除",sessionCount_one:"此项目包含 {{count}} 个对话。",sessionCount_other:"此项目包含 {{count}} 个对话。",allConversationsDeleted:"所有对话将被永久删除。",cannotUndo:"此操作无法撤销。"},pf={projects:ef,app:tf,sessions:rf,tooltips:nf,navigation:sf,actions:of,status:af,time:cf,messages:lf,version:uf,deleteConfirmation:df},hf={copy:"复制",copied:"已复制",copyCode:"复制代码"},mf={user:"U",error:"错误",tool:"工具",claude:"Claude",cursor:"Cursor",codex:"Codex"},ff={settings:"工具设置",error:"工具错误",result:"工具结果",viewParams:"查看输入参数",viewRawParams:"查看原始参数",viewDiff:"查看编辑差异",creatingFile:"创建新文件:",updatingTodo:"更新待办事项",read:"读取",readFile:"读取文件",updateTodo:"更新待办列表",readTodo:"读取待办列表",searchResults:"结果"},gf={found:"找到 {{count}} 个{{type}}",file:"文件",files:"文件",pattern:"模式:",in:"在:"},vf={updated:"文件更新成功",created:"文件创建成功",written:"文件写入成功",diff:"差异",newFile:"新文件",viewContent:"查看文件内容",viewFullOutput:"查看完整输出({{count}} 个字符)",contentDisplayed:"文件内容显示在上面的差异视图中"},yf={title:"交互式提示",waiting:"等待您在 CLI 中响应",instruction:"请在 Claude 运行的终端中选择一个选项。",selectedOption:"✓ Claude 选择了选项 {{number}}",instructionDetail:"在 CLI 中,您可以使用方向键或输入数字来交互式地选择此选项。"},bf={title:"思考中...",emoji:"💭 思考中..."},wf={response:"JSON 响应"},Sf={grant:"授予 {{tool}} 权限",added:"权限已添加",addTo:"将 {{entry}} 添加到允许的工具。",retry:"权限已保存。重试请求以使用该工具。",error:"无法更新权限。请重试。",openSettings:"打开设置"},kf={updated:"待办列表已成功更新",current:"当前待办列表"},_f={viewPlan:"📋 查看实施计划",title:"实施计划"},Cf={resetAt:"Claude 使用限制已达到。您的限制将在 **{{time}} {{timezone}}** - {{date}} 重置"},Tf={permissionMode:"权限模式",modes:{default:"默认模式",acceptEdits:"编辑模式",bypassPermissions:"无限制模式",plan:"计划模式"},descriptions:{default:"只有受信任的命令(ls、cat、grep、git status 等)自动运行。其他命令将被跳过。可以写入工作区。",acceptEdits:"工作区内的所有命令自动运行。完全自动模式,具有沙盒执行功能。",bypassPermissions:"完全的系统访问,无限制。所有命令自动运行,具有完整的磁盘和网络访问权限。请谨慎使用。",plan:"计划模式 - 不执行任何命令"},technicalDetails:"技术细节"},Ef={placeholder:"输入 / 调用命令,@ 选择文件,或向 {{provider}} 提问...",placeholderDefault:"输入您的消息...",disabled:"输入已禁用",attachFiles:"附加文件",attachImages:"附加图片",send:"发送",stop:"停止",hintText:{ctrlEnter:"Ctrl+Enter 发送 • Shift+Enter 换行 • Tab 切换模式 • / 斜杠命令",enter:"Enter 发送 • Shift+Enter 换行 • Tab 切换模式 • / 斜杠命令"},clickToChangeMode:"点击更改权限模式(或在输入框中按 Tab)",showAllCommands:"显示所有命令",clearInput:"清空输入",scrollToBottom:"滚动到底部"},Pf={selector:{title:"思考模式",description:"扩展思考给 Claude 更多时间来评估替代方案",active:"激活",tip:"更高的思考模式需要更多时间,但提供更彻底的分析"},modes:{none:{name:"标准",description:"常规 Claude 响应",prefix:""},think:{name:"思考",description:"基本扩展思考",prefix:"思考"},thinkHard:{name:"深入思考",description:"更彻底的评估",prefix:"深入思考"},thinkHarder:{name:"更深入思考",description:"考虑替代方案的深度分析",prefix:"更深入思考"},ultrathink:{name:"超级思考",description:"最大思考预算",prefix:"超级思考"}},buttonTitle:"思考模式:{{mode}}"},xf={title:"选择您的 AI 助手",description:"选择一个供应商以开始新对话",selectModel:"选择模型",providerInfo:{anthropic:"Anthropic",openai:"OpenAI",cursorEditor:"AI 代码编辑器"},readyPrompt:{claude:"已准备好使用 Claude {{model}}。在下方输入您的消息。",cursor:"已准备好使用 Cursor {{model}}。在下方输入您的消息。",codex:"已准备好使用 Codex {{model}}。在下方输入您的消息。",default:"请在上方选择一个供应商以开始"}},Af={continue:{title:"继续您的对话",description:"询问有关代码的问题、请求更改或获取开发任务的帮助"},loading:{olderMessages:"正在加载更早的消息...",sessionMessages:"正在加载会话消息..."},messages:{showingOf:"显示 {{shown}} / {{total}} 条消息",scrollToLoad:"向上滚动以加载更多",showingLast:"显示最近 {{count}} 条消息(共 {{total}} 条)",loadEarlier:"加载更早的消息",loadAll:"加载全部消息",loadingAll:"正在加载全部消息...",allLoaded:"全部消息已加载",perfWarning:"已加载全部消息 - 滚动可能变慢。点击「滚动到底部」恢复性能。"}},jf={selectProject:{title:"选择项目",description:"选择一个项目以在该目录中打开交互式 Shell"},status:{newSession:"新会话",initializing:"初始化中...",restarting:"重启中..."},actions:{disconnect:"断开连接",disconnectTitle:"断开 Shell 连接",restart:"重启",restartTitle:"重启 Shell(请先断开连接)",connect:"在 Shell 中继续",connectTitle:"连接到 Shell"},loading:"正在加载终端...",connecting:"正在连接到 Shell...",startSession:"启动新的 Claude 会话",resumeSession:"恢复会话:{{displayName}}...",runCommand:"在 {{projectName}} 中运行 {{command}}",startCli:"在 {{projectName}} 中启动 Claude CLI",defaultCommand:"命令"},Mf={startChatWithProvider:"选择一个项目以开始与 {{provider}} 聊天"},Of={nextTaskPrompt:"开始下一个任务"},If={codeBlock:hf,messageTypes:mf,tools:ff,search:gf,fileOperations:vf,interactive:yf,thinking:bf,json:wf,permissions:Sf,todo:kf,plan:_f,usageLimit:Cf,codex:Tf,input:Ef,thinkingMode:Pf,providerSelection:xf,session:Af,shell:jf,projectSelection:Mf,tasks:Of},Df={changes:"个更改",previousChange:"上一个更改",nextChange:"下一个更改",hideDiff:"隐藏差异高亮",showDiff:"显示差异高亮",settings:"编辑器设置",collapse:"折叠编辑器",expand:"展开编辑器到全宽"},Lf="正在加载 {{fileName}}...",Nf={showingChanges:"显示更改"},Rf={download:"下载文件",save:"保存",saving:"保存中...",saved:"已保存!",exitFullscreen:"退出全屏",fullscreen:"全屏",close:"关闭"},Ff={lines:"行数:",characters:"字符数:",shortcuts:"按 Ctrl+S 保存 • Esc 关闭"},$f={toolbar:Df,loading:Lf,header:Nf,actions:Rf,footer:Ff},Uf={save:"保存",cancel:"キャンセル",delete:"削除",create:"作成",edit:"編集",close:"閉じる",confirm:"確認",submit:"送信",retry:"再試行",refresh:"更新",search:"検索",clear:"クリア",copy:"コピー",download:"ダウンロード",upload:"アップロード",browse:"参照"},qf={chat:"チャット",shell:"シェル",files:"ファイル",git:"ソース管理",tasks:"タスク"},Vf={loading:"読み込み中...",success:"成功",error:"エラー",failed:"失敗",pending:"保留中",completed:"完了",inProgress:"進行中"},Bf={savedSuccessfully:"保存しました",deletedSuccessfully:"削除しました",updatedSuccessfully:"更新しました",operationFailed:"操作に失敗しました",networkError:"ネットワークエラー。接続を確認してください。",unauthorized:"認証されていません。ログインしてください。",notFound:"見つかりません",invalidInput:"入力が無効です",requiredField:"この項目は必須です",unknownError:"不明なエラーが発生しました"},Jf={settings:"設定",home:"ホーム",back:"戻る",next:"次へ",previous:"前へ",logout:"ログアウト"},Gf={language:"言語",theme:"テーマ",darkMode:"ダークモード",lightMode:"ライトモード",name:"名前",description:"説明",enabled:"有効",disabled:"無効",optional:"任意",version:"バージョン",select:"選択",selectAll:"すべて選択",deselectAll:"すべて解除"},Hf={justNow:"たった今",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",daysAgo:"{{count}}日前",yesterday:"昨日"},Wf={newFile:"新規ファイル",newFolder:"新規フォルダ",rename:"名前の変更",move:"移動",copyPath:"パスをコピー",openInEditor:"エディタで開く"},zf={loading:"Upfyn-Code を読み込んでいます",settingUpWorkspace:"ワークスペースを準備しています...",chooseProject:"プロジェクトを選択",selectProjectDescription:"サイドバーからプロジェクトを選択して、Claudeとコーディングを始めましょう。各プロジェクトにはチャットセッションとファイル履歴が含まれています。",tip:"ヒント",createProjectMobile:"上部のメニューボタンからプロジェクトにアクセスできます",createProjectDesktop:"サイドバーのフォルダアイコンをクリックして新しいプロジェクトを作成できます",newSession:"新しいセッション",untitledSession:"無題のセッション",projectFiles:"プロジェクトファイル"},Yf={loading:"ファイルを読み込んでいます...",files:"ファイル",simpleView:"シンプル表示",compactView:"コンパクト表示",detailedView:"詳細表示",searchPlaceholder:"ファイルやフォルダを検索...",clearSearch:"検索をクリア",name:"名前",size:"サイズ",modified:"更新日時",permissions:"権限",noFilesFound:"ファイルが見つかりません",checkProjectPath:"プロジェクトのパスがアクセス可能か確認してください",noMatchesFound:"一致するものが見つかりません",tryDifferentSearch:"別の検索語を試すか、検索をクリアしてください",justNow:"たった今",minAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",daysAgo:"{{count}}日前"},Kf={title:"新規プロジェクトを作成",steps:{type:"種類",configure:"設定",confirm:"確認"},step1:{question:"既存のワークスペースがありますか?それとも新しく作成しますか?",existing:{title:"既存のワークスペース",description:"サーバー上に既存のワークスペースがあり、プロジェクト一覧に追加したい"},new:{title:"新しいワークスペース",description:"新しいワークスペースを作成し、必要に応じてGitHubリポジトリからクローンする"}},step2:{existingPath:"ワークスペースのパス",newPath:"ワークスペースのパス",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"既存のワークスペースディレクトリのフルパス",newHelp:"ワークスペースディレクトリのフルパス",githubUrl:"GitHub URL(任意)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"任意: リポジトリをクローンするためのGitHub URLを入力してください",githubAuth:"GitHub認証(任意)",githubAuthHelp:"プライベートリポジトリの場合のみ必要です。パブリックリポジトリは認証なしでクローンできます。",loadingTokens:"保存済みトークンを読み込んでいます...",storedToken:"保存済みトークン",newToken:"新しいトークン",nonePublic:"なし(パブリック)",selectToken:"トークンを選択",selectTokenPlaceholder:"-- トークンを選択 --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"このトークンはこの操作にのみ使用されます",publicRepoInfo:"パブリックリポジトリには認証は不要です。パブリックリポジトリをクローンする場合、トークンは省略できます。",noTokensHelp:"保存済みトークンがありません。設定 → APIキーでトークンを追加すると再利用が簡単になります。",optionalTokenPublic:"GitHubトークン(パブリックリポジトリの場合は任意)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(パブリックリポジトリの場合は空欄可)"},step3:{reviewConfig:"設定の確認",workspaceType:"ワークスペースの種類:",existingWorkspace:"既存のワークスペース",newWorkspace:"新しいワークスペース",path:"パス:",cloneFrom:"クローン元:",authentication:"認証:",usingStoredToken:"保存済みトークンを使用:",usingProvidedToken:"入力されたトークンを使用",noAuthentication:"認証なし",sshKey:"SSHキー",existingInfo:"ワークスペースがプロジェクト一覧に追加され、Claude/Cursorセッションで使用できるようになります。",newWithClone:"このフォルダからリポジトリがクローンされます。",newEmpty:"ワークスペースがプロジェクト一覧に追加され、Claude/Cursorセッションで使用できるようになります。",cloningRepository:"リポジトリをクローンしています..."},buttons:{cancel:"キャンセル",back:"戻る",next:"次へ",createProject:"プロジェクトを作成",creating:"作成中...",cloning:"クローン中..."},errors:{selectType:"既存のワークスペースか新規作成かを選択してください",providePath:"ワークスペースのパスを入力してください",failedToCreate:"ワークスペースの作成に失敗しました",failedToCreateFolder:"フォルダの作成に失敗しました"}},Qf={title:"アップデートのお知らせ",newVersionReady:"新しいバージョンが利用可能です",currentVersion:"現在のバージョン",latestVersion:"最新バージョン",whatsNew:"変更点:",viewFullRelease:"リリース全文を見る",updateProgress:"アップデートの進捗:",manualUpgrade:"手動アップグレード:",manualUpgradeHint:"または「今すぐ更新」をクリックして自動的にアップデートを実行できます。",updateCompleted:"アップデートが完了しました!",restartServer:"変更を適用するにはサーバーを再起動してください。",updateFailed:"アップデートに失敗しました",buttons:{close:"閉じる",later:"後で",copyCommand:"コマンドをコピー",updateNow:"今すぐ更新",updating:"更新中..."},ariaLabels:{closeModal:"バージョンアップグレードモーダルを閉じる",showSidebar:"サイドバーを表示",settings:"設定",updateAvailable:"アップデートあり",closeSidebar:"サイドバーを閉じる"}},Xf={buttons:Uf,tabs:qf,status:Vf,messages:Bf,navigation:Jf,common:Gf,time:Hf,fileOperations:Wf,mainContent:zf,fileTree:Yf,projectWizard:Kf,versionUpdate:Qf},Zf="設定",eg={account:"アカウント",permissions:"権限",mcpServers:"MCPサーバー",appearance:"外観"},tg={title:"アカウント",language:"言語",languageLabel:"表示言語",languageDescription:"インターフェースの表示言語を選択してください",username:"ユーザー名",email:"メールアドレス",profile:"プロフィール",changePassword:"パスワードを変更"},rg={title:"MCPサーバー",addServer:"サーバーを追加",editServer:"サーバーを編集",deleteServer:"サーバーを削除",serverName:"サーバー名",serverType:"サーバーの種類",config:"設定",testConnection:"接続テスト",status:"状態",connected:"接続済み",disconnected:"未接続",scope:{label:"スコープ",user:"ユーザー",project:"プロジェクト"}},ng={title:"外観",theme:"テーマ",codeEditor:"コードエディタ",editorTheme:"エディタのテーマ",wordWrap:"折り返し",showMinimap:"ミニマップを表示",lineNumbers:"行番号",fontSize:"フォントサイズ"},sg={saveChanges:"変更を保存",resetToDefaults:"デフォルトに戻す",cancelChanges:"変更をキャンセル"},og={title:"クイック設定",sections:{appearance:"外観",toolDisplay:"ツール表示",viewOptions:"表示オプション",inputSettings:"入力設定",whisperDictation:"Whisper音声入力"},darkMode:"ダークモード",autoExpandTools:"ツールを自動展開",showRawParameters:"生パラメータを表示",showThinking:"思考を表示",autoScrollToBottom:"自動スクロール",sendByCtrlEnter:"Ctrl+Enterで送信",sendByCtrlEnterDescription:"有効にすると、Enterではなく Ctrl+Enter でメッセージを送信します。IMEユーザーの誤送信防止に便利です。",dragHandle:{dragging:"ドラッグ中",closePanel:"設定パネルを閉じる",openPanel:"設定パネルを開く",draggingStatus:"ドラッグ中...",toggleAndMove:"クリックで切替、ドラッグで移動"},whisper:{modes:{default:"標準モード",defaultDescription:"音声をそのまま文字起こしします",prompt:"プロンプト強化",promptDescription:"ラフなアイデアを明確で詳細なAIプロンプトに変換します",vibe:"バイブモード",vibeDescription:"アイデアを明確なエージェント指示に整形します"}}},ig={agents:"エージェント",appearance:"外観",git:"Git",apiTokens:"API & トークン",tasks:"タスク"},ag={darkMode:{label:"ダークモード",description:"ライトテーマとダークテーマを切り替えます"},projectSorting:{label:"プロジェクトの並び順",description:"サイドバーでのプロジェクトの並び順を設定します",alphabetical:"アルファベット順",recentActivity:"最近のアクティビティ順"},codeEditor:{title:"コードエディタ",theme:{label:"エディタのテーマ",description:"コードエディタのデフォルトテーマ"},wordWrap:{label:"折り返し",description:"エディタでデフォルトで折り返しを有効にします"},showMinimap:{label:"ミニマップを表示",description:"差分ビューでナビゲーション用のミニマップを表示します"},lineNumbers:{label:"行番号を表示",description:"エディタに行番号を表示します"},fontSize:{label:"フォントサイズ",description:"エディタのフォントサイズ(ピクセル)"}}},cg={title:{add:"MCPサーバーを追加",edit:"MCPサーバーを編集"},importMode:{form:"フォーム入力",json:"JSONインポート"},scope:{label:"スコープ",userGlobal:"ユーザー(グローバル)",projectLocal:"プロジェクト(ローカル)",userDescription:"ユーザースコープ: すべてのプロジェクトで利用可能",projectDescription:"ローカルスコープ: 選択したプロジェクトでのみ利用可能",cannotChange:"既存のサーバーを編集する場合、スコープは変更できません"},fields:{serverName:"サーバー名",transportType:"トランスポートの種類",command:"コマンド",arguments:"引数(1行に1つ)",jsonConfig:"JSON設定",url:"URL",envVars:"環境変数(KEY=value、1行に1つ)",headers:"ヘッダー(KEY=value、1行に1つ)",selectProject:"プロジェクトを選択..."},placeholders:{serverName:"my-server"},validation:{missingType:"必須フィールドがありません: type",stdioRequiresCommand:"stdioタイプにはcommandフィールドが必要です",httpRequiresUrl:"{{type}}タイプにはurlフィールドが必要です",invalidJson:"無効なJSON形式です",jsonHelp:"MCPサーバー設定をJSON形式で貼り付けてください。例:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"設定の詳細({{configFile}}より)",projectPath:"パス: {{path}}",actions:{cancel:"キャンセル",saving:"保存中...",addServer:"サーバーを追加",updateServer:"サーバーを更新"}},lg={success:"設定を保存しました!",error:"設定の保存に失敗しました",saving:"保存中..."},ug={save:"設定を保存",cancel:"キャンセル"},dg={title:"Git設定",description:"コミット用のGit IDを設定します。この設定は git config --global で適用されます",name:{label:"Git名前",help:"コミットに使用する名前"},email:{label:"Gitメールアドレス",help:"コミットに使用するメールアドレス"},actions:{save:"設定を保存",saving:"保存中..."},status:{success:"保存しました"}},pg={title:"APIキー",description:"外部APIにアクセスするためのAPIキーを生成します。",newKey:{alertTitle:"⚠️ APIキーを保存してください",alertMessage:"このキーが表示されるのは今回限りです。安全な場所に保管してください。",iveSavedIt:"保存しました"},form:{placeholder:"APIキーの名前(例: 本番サーバー)",createButton:"作成",cancelButton:"キャンセル"},newButton:"新しいAPIキー",empty:"APIキーはまだ作成されていません。",list:{created:"作成日:",lastUsed:"最終使用日:"},confirmDelete:"このAPIキーを削除してもよろしいですか?",status:{active:"有効",inactive:"無効"},github:{title:"GitHubトークン",description:"外部APIからプライベートリポジトリをクローンするためのGitHubパーソナルアクセストークンを追加します。",descriptionAlt:"プライベートリポジトリをクローンするためのGitHubパーソナルアクセストークンを追加します。保存せずにAPIリクエストで直接トークンを渡すこともできます。",addButton:"トークンを追加",form:{namePlaceholder:"トークンの名前(例: 個人リポジトリ)",tokenPlaceholder:"GitHubパーソナルアクセストークン(ghp_...)",descriptionPlaceholder:"説明(任意)",addButton:"トークンを追加",cancelButton:"キャンセル",howToCreate:"GitHubパーソナルアクセストークンの作成方法 →"},empty:"GitHubトークンはまだ追加されていません。",added:"追加日:",confirmDelete:"このGitHubトークンを削除してもよろしいですか?"},apiDocsLink:"APIドキュメント",documentation:{title:"外部APIドキュメント",description:"外部APIを使用してアプリケーションからClaude/Cursorセッションを起動する方法を学びます。",viewLink:"APIドキュメントを見る →"},loading:"読み込み中...",version:{updateAvailable:"アップデートあり: v{{version}}"}},hg={checking:"TaskMasterのインストールを確認しています...",notInstalled:{title:"TaskMaster AI CLIがインストールされていません",description:"タスク管理機能を使用するにはTaskMaster CLIが必要です。以下のコマンドでインストールしてください:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"GitHubで見る",afterInstallation:"インストール後:",steps:{restart:"このアプリケーションを再起動してください",autoAvailable:"TaskMaster機能が自動的に利用可能になります",initCommand:"プロジェクトディレクトリで task-master init を実行してください"}},settings:{enableLabel:"TaskMaster統合を有効にする",enableDescription:"インターフェース全体でTaskMasterのタスク、バナー、サイドバーインジケータを表示します"}},mg={authStatus:{checking:"確認中...",connected:"接続済み",notConnected:"未接続",disconnected:"切断",checkingAuth:"認証状態を確認しています...",loggedInAs:"{{email}}でログイン中",authenticatedUser:"認証済みユーザー"},account:{claude:{description:"Anthropic Claude AIアシスタント"},cursor:{description:"Cursor AI搭載コードエディタ"},codex:{description:"OpenAI Codex AIアシスタント"}},connectionStatus:"接続状態",login:{title:"ログイン",reAuthenticate:"再認証",description:"{{agent}}アカウントにサインインしてAI機能を有効にします",reAuthDescription:"別のアカウントでサインインするか、認証情報を更新します",button:"ログイン",reLoginButton:"再ログイン"},error:"エラー: {{error}}"},fg={title:"権限設定",skipPermissions:{label:"権限プロンプトをスキップ(注意して使用)",claudeDescription:"--dangerously-skip-permissions フラグに相当",cursorDescription:"Cursor CLIの -f フラグに相当"},allowedTools:{title:"許可されたツール",description:"権限の確認なしに自動的に許可されるツール",placeholder:'例: "Bash(git log:*)" または "Write"',quickAdd:"よく使うツールを追加:",empty:"許可されたツールはありません"},blockedTools:{title:"ブロックされたツール",description:"権限の確認なしに自動的にブロックされるツール",placeholder:'例: "Bash(rm:*)"',empty:"ブロックされたツールはありません"},allowedCommands:{title:"許可されたシェルコマンド",description:"権限の確認なしに自動的に許可されるシェルコマンド",placeholder:'例: "Shell(ls)" または "Shell(git status)"',quickAdd:"よく使うコマンドを追加:",empty:"許可されたコマンドはありません"},blockedCommands:{title:"ブロックされたシェルコマンド",description:"自動的にブロックされるシェルコマンド",placeholder:'例: "Shell(rm -rf)" または "Shell(sudo)"',empty:"ブロックされたコマンドはありません"},toolExamples:{title:"ツールパターンの例:",bashGitLog:"- すべてのgit logコマンドを許可",bashGitDiff:"- すべてのgit diffコマンドを許可",write:"- すべてのWriteツールの使用を許可",bashRm:"- すべてのrmコマンドをブロック(危険)"},shellExamples:{title:"シェルコマンドの例:",ls:"- lsコマンドを許可",gitStatus:"- git statusを許可",npmInstall:"- npm installを許可",rmRf:"- 再帰的削除をブロック"},codex:{permissionMode:"権限モード",description:"Codexがファイルの変更やコマンドの実行を処理する方法を制御します",modes:{default:{title:"デフォルト",description:"信頼されたコマンド(ls、cat、grep、git statusなど)のみ自動実行。その他のコマンドはスキップ。ワークスペースへの書き込みは可能。"},acceptEdits:{title:"編集を許可",description:"ワークスペース内ですべてのコマンドを自動実行。サンドボックス環境での完全自動モード。"},bypassPermissions:{title:"権限をバイパス",description:"制限なしの完全なシステムアクセス。すべてのコマンドがディスクとネットワークへの完全なアクセスで自動実行されます。注意して使用してください。"}},technicalDetails:"技術的な詳細",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted。信頼されたコマンド: cat, cd, grep, head, ls, pwd, tail, git status/log/diff/show, find(-execなし)など。",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never。すべてのコマンドがプロジェクトディレクトリ内で自動実行。",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never。完全なシステムアクセス。信頼された環境でのみ使用してください。",overrideNote:"チャットインターフェースのモードボタンを使用してセッションごとに上書きできます。"}},actions:{add:"追加"}},gg={title:"MCPサーバー",description:{claude:"Model Context Protocolサーバーは、Claudeに追加のツールやデータソースを提供します",cursor:"Model Context Protocolサーバーは、Cursorに追加のツールやデータソースを提供します",codex:"Model Context Protocolサーバーは、Codexに追加のツールやデータソースを提供します"},addButton:"MCPサーバーを追加",empty:"MCPサーバーは設定されていません",serverType:"種類",scope:{local:"ローカル",user:"ユーザー"},config:{command:"コマンド",url:"URL",args:"引数",environment:"環境変数"},tools:{title:"ツール",count:"({{count}}):",more:"他{{count}}件"},actions:{edit:"サーバーを編集",delete:"サーバーを削除"},help:{title:"Codex MCPについて",description:"Codexはstdioベースのツールサーバーをサポートしています。追加のツールやリソースでCodexの機能を拡張するサーバーを追加できます。"}},vg={title:Zf,tabs:eg,account:tg,mcp:rg,appearance:ng,actions:sg,quickSettings:og,mainTabs:ig,appearanceSettings:ag,mcpForm:cg,saveStatus:lg,footerActions:ug,git:dg,apiKeys:pg,tasks:hg,agents:mg,permissions:fg,mcpServers:gg},yg={title:"おかえりなさい",description:"Upfyn-Codeアカウントにサインイン",username:"ユーザー名",password:"パスワード",submit:"サインイン",loading:"サインイン中...",errors:{invalidCredentials:"ユーザー名またはパスワードが正しくありません",requiredFields:"すべての項目を入力してください",networkError:"ネットワークエラー。もう一度お試しください。"},placeholders:{username:"ユーザー名を入力",password:"パスワードを入力"}},bg={title:"アカウント作成",username:"ユーザー名",password:"パスワード",confirmPassword:"パスワードの確認",submit:"アカウントを作成",loading:"アカウントを作成中...",errors:{passwordMismatch:"パスワードが一致しません",usernameTaken:"このユーザー名は既に使用されています",weakPassword:"パスワードが弱すぎます"}},wg={title:"サインアウト",confirm:"サインアウトしてもよろしいですか?",button:"サインアウト"},Sg={login:yg,register:bg,logout:wg},kg={title:"プロジェクト",newProject:"新規プロジェクト",deleteProject:"プロジェクトを削除",renameProject:"プロジェクト名を変更",noProjects:"プロジェクトが見つかりません",loadingProjects:"プロジェクトを読み込んでいます...",searchPlaceholder:"プロジェクトを検索...",projectNamePlaceholder:"プロジェクト名",starred:"お気に入り",all:"すべて",untitledSession:"無題のセッション",newSession:"新しいセッション",codexSession:"Codexセッション",fetchingProjects:"Claudeのプロジェクトとセッションを取得しています",projects:"プロジェクト",noMatchingProjects:"一致するプロジェクトがありません",tryDifferentSearch:"検索語を変えてお試しください",runClaudeCli:"プロジェクトディレクトリでClaude CLIを実行して始めましょう"},_g={title:"Upfyn-Code",subtitle:"AIコーディングアシスタント"},Cg={title:"セッション",newSession:"新しいセッション",deleteSession:"セッションを削除",renameSession:"セッション名を変更",noSessions:"セッションはまだありません",loadingSessions:"セッションを読み込んでいます...",unnamed:"名称未設定",loading:"読み込み中...",showMore:"さらにセッションを表示"},Tg={viewEnvironments:"環境を表示",hideSidebar:"サイドバーを隠す",createProject:"新しいプロジェクトを作成",refresh:"プロジェクトとセッションを更新 (Ctrl+R)",renameProject:"プロジェクト名を変更 (F2)",deleteProject:"空のプロジェクトを削除 (Delete)",addToFavorites:"お気に入りに追加",removeFromFavorites:"お気に入りから削除",editSessionName:"セッション名を手動で編集",deleteSession:"このセッションを完全に削除",save:"保存",cancel:"キャンセル"},Eg={chat:"チャット",files:"ファイル",git:"Git",terminal:"ターミナル",tasks:"タスク"},Pg={refresh:"更新",settings:"設定",collapseAll:"すべて折りたたむ",expandAll:"すべて展開",cancel:"キャンセル",save:"保存",delete:"削除",rename:"名前の変更"},xg={active:"アクティブ",inactive:"非アクティブ",thinking:"思考中...",error:"エラー",aborted:"中断",unknown:"不明"},Ag={justNow:"たった今",oneMinuteAgo:"1分前",minutesAgo:"{{count}}分前",oneHourAgo:"1時間前",hoursAgo:"{{count}}時間前",oneDayAgo:"1日前",daysAgo:"{{count}}日前"},jg={deleteConfirm:"本当に削除しますか?",renameSuccess:"名前を変更しました",deleteSuccess:"削除しました",errorOccurred:"エラーが発生しました",deleteSessionConfirm:"このセッションを削除してもよろしいですか?この操作は取り消せません。",deleteProjectConfirm:"この空のプロジェクトを削除してもよろしいですか?この操作は取り消せません。",enterProjectPath:"プロジェクトのパスを入力してください",deleteSessionFailed:"セッションの削除に失敗しました。もう一度お試しください。",deleteSessionError:"セッションの削除でエラーが発生しました。もう一度お試しください。",deleteProjectFailed:"プロジェクトの削除に失敗しました。もう一度お試しください。",deleteProjectError:"プロジェクトの削除でエラーが発生しました。もう一度お試しください。",createProjectFailed:"プロジェクトの作成に失敗しました。もう一度お試しください。",createProjectError:"プロジェクトの作成でエラーが発生しました。もう一度お試しください。"},Mg={updateAvailable:"アップデートあり"},Og={deleteProject:"プロジェクトを削除",deleteSession:"セッションを削除",confirmDelete:"本当に削除しますか?",sessionCount:"このプロジェクトには{{count}}件の会話があります。",allConversationsDeleted:"すべての会話が完全に削除されます。",cannotUndo:"この操作は取り消せません。"},Ig={projects:kg,app:_g,sessions:Cg,tooltips:Tg,navigation:Eg,actions:Pg,status:xg,time:Ag,messages:jg,version:Mg,deleteConfirmation:Og},Dg={copy:"コピー",copied:"コピーしました",copyCode:"コードをコピー"},Lg={user:"U",error:"エラー",tool:"ツール",claude:"Claude",cursor:"Cursor",codex:"Codex"},Ng={settings:"ツール設定",error:"ツールエラー",result:"ツール結果",viewParams:"入力パラメータを表示",viewRawParams:"生パラメータを表示",viewDiff:"編集差分を表示:",creatingFile:"新規ファイルを作成:",updatingTodo:"Todoリストを更新中",read:"読み取り",readFile:"ファイルを読み取り",updateTodo:"Todoリストを更新",readTodo:"Todoリストを読み取り",searchResults:"件の結果"},Rg={found:"{{count}}件の{{type}}が見つかりました",file:"ファイル",files:"ファイル",pattern:"パターン:",in:"場所:"},Fg={updated:"ファイルを更新しました",created:"ファイルを作成しました",written:"ファイルを書き込みました",diff:"差分",newFile:"新規ファイル",viewContent:"ファイルの内容を表示",viewFullOutput:"全出力を表示({{count}}文字)",contentDisplayed:"ファイルの内容は上の差分ビューに表示されています"},$g={title:"インタラクティブプロンプト",waiting:"CLIでの応答を待っています",instruction:"Claudeが実行されているターミナルでオプションを選択してください。",selectedOption:"✓ Claudeがオプション{{number}}を選択しました",instructionDetail:"CLIでは、矢印キーまたは番号を入力してオプションを選択します。"},Ug={title:"思考中...",emoji:"💭 思考中..."},qg={response:"JSONレスポンス"},Vg={grant:"{{tool}}に権限を付与",added:"権限を追加しました",addTo:"{{entry}}を許可されたツールに追加します。",retry:"権限を保存しました。ツールを使用するにはリクエストを再試行してください。",error:"権限を更新できませんでした。もう一度お試しください。",openSettings:"設定を開く"},Bg={updated:"Todoリストを更新しました",current:"現在のTodoリスト"},Jg={viewPlan:"📋 実装プランを表示",title:"実装プラン"},Gg={resetAt:"Claudeの使用制限に達しました。制限は**{{time}} {{timezone}}** - {{date}}にリセットされます"},Hg={permissionMode:"権限モード",modes:{default:"デフォルトモード",acceptEdits:"編集を許可",bypassPermissions:"権限をバイパス",plan:"プランモード"},descriptions:{default:"信頼されたコマンド(ls、cat、grep、git statusなど)のみ自動実行。その他のコマンドはスキップ。ワークスペースへの書き込みは可能。",acceptEdits:"ワークスペース内ですべてのコマンドを自動実行。サンドボックス環境での完全自動モード。",bypassPermissions:"制限なしの完全なシステムアクセス。すべてのコマンドがディスクとネットワークへの完全なアクセスで自動実行されます。注意して使用してください。",plan:"プランニングモード - コマンドは実行されません"},technicalDetails:"技術的な詳細"},Wg={placeholder:"/ でコマンド、@ でファイル指定、または {{provider}} に何でも聞いてください...",placeholderDefault:"メッセージを入力...",disabled:"入力無効",attachFiles:"ファイルを添付",attachImages:"画像を添付",send:"送信",stop:"停止",hintText:{ctrlEnter:"Ctrl+Enterで送信 • Shift+Enterで改行 • Tabでモード切替 • / でスラッシュコマンド",enter:"Enterで送信 • Shift+Enterで改行 • Tabでモード切替 • / でスラッシュコマンド"},clickToChangeMode:"クリックで権限モードを変更(または入力欄でTab)",showAllCommands:"すべてのコマンドを表示"},zg={selector:{title:"思考モード",description:"拡張思考によりClaudeがより多くの選択肢を検討できます",active:"有効",tip:"高い思考モードは時間がかかりますが、より深い分析が得られます"},modes:{none:{name:"標準",description:"通常のClaudeの応答",prefix:""},think:{name:"Think",description:"基本的な拡張思考",prefix:"think"},thinkHard:{name:"Think Hard",description:"より深い検討",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"代替案を含む深い分析",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"最大限の思考予算",prefix:"ultrathink"}},buttonTitle:"思考モード: {{mode}}"},Yg={title:"AIアシスタントを選択",description:"新しい会話を始めるプロバイダーを選択してください",selectModel:"モデルを選択",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",cursorEditor:"AIコードエディタ"},readyPrompt:{claude:"{{model}}でClaudeを使用する準備ができました。下にメッセージを入力してください。",cursor:"{{model}}でCursorを使用する準備ができました。下にメッセージを入力してください。",codex:"{{model}}でCodexを使用する準備ができました。下にメッセージを入力してください。",default:"上からプロバイダーを選択して開始してください"}},Kg={continue:{title:"会話を続ける",description:"コードについて質問したり、変更をリクエストしたり、開発タスクのサポートを受けられます"},loading:{olderMessages:"過去のメッセージを読み込んでいます...",sessionMessages:"セッションメッセージを読み込んでいます..."},messages:{showingOf:"{{total}}件中{{shown}}件を表示",scrollToLoad:"上にスクロールしてさらに読み込む",showingLast:"最新{{count}}件を表示(全{{total}}件)",loadEarlier:"過去のメッセージを読み込む"}},Qg={selectProject:{title:"プロジェクトを選択",description:"プロジェクトを選択してそのディレクトリでシェルを開きます"},status:{newSession:"新しいセッション",initializing:"初期化中...",restarting:"再起動中..."},actions:{disconnect:"切断",disconnectTitle:"シェルから切断",restart:"再起動",restartTitle:"シェルを再起動(先に切断してください)",connect:"シェルで続行",connectTitle:"シェルに接続"},loading:"ターミナルを読み込んでいます...",connecting:"シェルに接続しています...",startSession:"新しいClaudeセッションを開始",resumeSession:"セッションを再開: {{displayName}}...",runCommand:"{{projectName}}で{{command}}を実行",startCli:"{{projectName}}でClaude CLIを起動しています",defaultCommand:"コマンド"},Xg={codeBlock:Dg,messageTypes:Lg,tools:Ng,search:Rg,fileOperations:Fg,interactive:$g,thinking:Ug,json:qg,permissions:Vg,todo:Bg,plan:Jg,usageLimit:Gg,codex:Hg,input:Wg,thinkingMode:zg,providerSelection:Yg,session:Kg,shell:Qg},Zg={changes:"件の変更",previousChange:"前の変更",nextChange:"次の変更",hideDiff:"差分ハイライトを非表示",showDiff:"差分ハイライトを表示",settings:"エディタ設定",collapse:"エディタを折りたたむ",expand:"エディタを全幅に展開"},ev="{{fileName}}を読み込んでいます...",tv={showingChanges:"変更を表示中"},rv={download:"ファイルをダウンロード",save:"保存",saving:"保存中...",saved:"保存しました!",exitFullscreen:"全画面を終了",fullscreen:"全画面",close:"閉じる"},nv={lines:"行数:",characters:"文字数:",shortcuts:"Ctrl+Sで保存 • Escで閉じる"},sv={toolbar:Zg,loading:ev,header:tv,actions:rv,footer:nv},ov={title:"TaskMaster AIが設定されていません",description:"TaskMasterは、AIを活用した支援により、複雑なプロジェクトを管理しやすいタスクに分解するのに役立ちます",whatIsTitle:"🎯 TaskMasterとは?",features:{aiPowered:"AIを活用したタスク管理:複雑なプロジェクトを管理しやすいサブタスクに分解",prdTemplates:"PRDテンプレート:Product Requirements Documentからタスクを生成",dependencyTracking:"依存関係の追跡:タスクの関係性と実行順序を理解",progressVisualization:"進捗の可視化:カンバンボードと詳細なタスク分析",cliIntegration:"CLI統合:高度なワークフローのためにtaskmasterコマンドを使用"},initializeButton:"TaskMaster AIを初期化"},iv={title:"TaskMasterを始める",subtitle:"TaskMasterが初期化されました!次にすることは:",steps:{createPRD:{title:"Product Requirements Document (PRD) を作成",description:"プロジェクトのアイデアについて話し合い、構築したい内容を説明するPRDを作成します。",addButton:"PRDを追加",existingPRDs:"既存のPRD:"},generateTasks:{title:"PRDからタスクを生成",description:"PRDができたら、AIアシスタントに解析を依頼してください。TaskMasterが自動的に実装の詳細を含む管理しやすいタスクに分解します。"},analyzeTasks:{title:"タスクの分析と展開",description:"AIアシスタントにタスクの複雑さを分析してもらい、より簡単に実装できる詳細なサブタスクに展開します。"},startBuilding:{title:"開発を始める",description:"AIアシスタントにタスクの作業を開始してもらい、ステータスを更新し、プロジェクトの進行に応じて新しいタスクを追加します。"}},tip:"💡 ヒント:TaskMasterのAIを活用したタスク生成を最大限に活用するには、PRDから始めましょう"},av={title:"TaskMasterのセットアップ",subtitle:"{{projectName}}のインタラクティブCLI",willStart:"TaskMasterの初期化が自動的に開始されます",completed:"TaskMasterのセットアップが完了しました!このウィンドウを閉じることができます。",closeButton:"閉じる",closeContinueButton:"閉じて続ける"},cv={title:"TaskMasterを始める",subtitle:"生産的なタスク管理のガイド",examples:{parsePRD:`💬 例:
|
|
65
|
+
"Please add a new task to implement user profile image uploads using Cloudinary, research the best approach."`},moreExamples:"View more examples and usage patterns →",proTips:{title:"💡 Pro Tips",search:"Use the search bar to quickly find specific tasks",views:"Switch between Kanban, List, and Grid views using the view toggles",filters:"Use filters to focus on specific task statuses or priorities",details:"Click on any task to view detailed information and manage subtasks"},learnMore:{title:"📚 Learn More",description:"TaskMaster AI is an advanced task management system built for developers. Get documentation, examples, and contribute to the project.",githubButton:"View on GitHub"}},Gp={placeholder:"Search tasks..."},Hp={button:"Filters",status:"Status",priority:"Priority",sortBy:"Sort By",allStatuses:"All Statuses",allPriorities:"All Priorities",showing:"Showing {{filtered}} of {{total}} tasks",clearFilters:"Clear Filters"},Wp={id:"ID",status:"Status",priority:"Priority",idAsc:"ID (Ascending)",idDesc:"ID (Descending)",titleAsc:"Title (A-Z)",titleDesc:"Title (Z-A)",statusAsc:"Status (Pending First)",statusDesc:"Status (Done First)",priorityAsc:"Priority (High First)",priorityDesc:"Priority (Low First)"},zp={kanban:"Kanban view",list:"List view",grid:"Grid view"},Yp={pending:"📋 To Do",inProgress:"🚀 In Progress",done:"✅ Done",blocked:"🚫 Blocked",deferred:"⏳ Deferred",cancelled:"❌ Cancelled",noTasksYet:"No tasks yet",tasksWillAppear:"Tasks will appear here",moveTasksHere:"Move tasks here when started",completedTasksHere:"Completed tasks appear here",statusTasksHere:"Tasks with this status will appear here"},Kp={help:"TaskMaster Getting Started Guide",prds:"PRDs",addPRD:"Add PRD",addTask:"Add Task",createNewPRD:"Create New PRD",prdsAvailable:"{{count}} PRD(s) available"},Qp={modified:"Modified: {{date}}"},Xp={pending:"Pending","in-progress":"In Progress",done:"Done",blocked:"Blocked",deferred:"Deferred",cancelled:"Cancelled"},Zp={high:"High",medium:"Medium",low:"Low"},eh={title:"No tasks match your filters",description:"Try adjusting your search or filter criteria."},th={notConfigured:qp,gettingStarted:Vp,setupModal:Bp,helpGuide:Jp,search:Gp,filters:Hp,sort:Wp,views:zp,kanban:Yp,buttons:Kp,prd:Qp,statuses:Xp,priorities:Zp,noMatchingTasks:eh},rh={save:"저장",cancel:"취소",delete:"삭제",create:"생성",edit:"편집",close:"닫기",confirm:"확인",submit:"제출",retry:"재시도",refresh:"새로고침",search:"검색",clear:"지우기",copy:"복사",download:"다운로드",upload:"업로드",browse:"찾아보기"},nh={chat:"채팅",shell:"Shell",files:"파일",git:"소스 관리",tasks:"작업"},sh={loading:"로딩 중...",success:"성공",error:"오류",failed:"실패",pending:"대기 중",completed:"완료",inProgress:"진행 중"},oh={savedSuccessfully:"저장되었습니다",deletedSuccessfully:"삭제되었습니다",updatedSuccessfully:"업데이트되었습니다",operationFailed:"작업 실패",networkError:"네트워크 오류. 연결을 확인해주세요.",unauthorized:"인증되지 않았습니다. 로그인해주세요.",notFound:"찾을 수 없음",invalidInput:"잘못된 입력",requiredField:"필수 항목입니다",unknownError:"알 수 없는 오류가 발생했습니다"},ih={settings:"설정",home:"홈",back:"뒤로",next:"다음",previous:"이전",logout:"로그아웃"},ah={language:"언어",theme:"테마",darkMode:"다크 모드",lightMode:"라이트 모드",name:"이름",description:"설명",enabled:"활성화",disabled:"비활성화",optional:"선택사항",version:"버전",select:"선택",selectAll:"전체 선택",deselectAll:"전체 해제"},ch={justNow:"방금 전",minutesAgo:"{{count}}분 전",hoursAgo:"{{count}}시간 전",daysAgo:"{{count}}일 전",yesterday:"어제"},lh={newFile:"새 파일",newFolder:"새 폴더",rename:"이름 변경",move:"이동",copyPath:"경로 복사",openInEditor:"에디터에서 열기"},uh={loading:"UpfynAI 로딩 중",settingUpWorkspace:"워크스페이스 설정 중...",chooseProject:"프로젝트 선택",selectProjectDescription:"사이드바에서 프로젝트를 선택하여 Claude와 코딩을 시작하세요. 각 프로젝트에는 채팅 세션과 파일 히스토리가 포함됩니다.",tip:"팁",createProjectMobile:"위의 메뉴 버튼을 눌러 프로젝트에 접근하세요",createProjectDesktop:"사이드바의 폴더 아이콘을 클릭하여 새 프로젝트를 생성하세요",newSession:"새 세션",untitledSession:"제목 없는 세션",projectFiles:"프로젝트 파일"},dh={loading:"파일 로딩 중...",files:"파일",simpleView:"간단히 보기",compactView:"컴팩트 보기",detailedView:"상세히 보기",searchPlaceholder:"파일 및 폴더 검색...",clearSearch:"검색 지우기",name:"이름",size:"크기",modified:"수정일",permissions:"권한",noFilesFound:"파일을 찾을 수 없음",checkProjectPath:"프로젝트 경로가 접근 가능한지 확인하세요",noMatchesFound:"일치하는 항목 없음",tryDifferentSearch:"다른 검색어를 시도하거나 검색을 지우세요",justNow:"방금 전",minAgo:"{{count}}분 전",hoursAgo:"{{count}}시간 전",daysAgo:"{{count}}일 전"},ph={title:"새 프로젝트 생성",steps:{type:"유형",configure:"설정",confirm:"확인"},step1:{question:"이미 워크스페이스가 있으신가요, 아니면 새로 생성하시겠습니까?",existing:{title:"기존 워크스페이스",description:"서버에 이미 워크스페이스가 있고 프로젝트 목록에 추가만 하면 됩니다"},new:{title:"새 워크스페이스",description:"새 워크스페이스를 생성하고, 선택적으로 GitHub 저장소에서 clone합니다"}},step2:{existingPath:"워크스페이스 경로",newPath:"워크스페이스 경로",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"기존 워크스페이스 디렉토리의 전체 경로",newHelp:"워크스페이스 디렉토리의 전체 경로",githubUrl:"GitHub URL (선택사항)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"선택사항: 저장소를 clone하려면 GitHub URL을 입력하세요",githubAuth:"GitHub 인증 (선택사항)",githubAuthHelp:"비공개 저장소에만 필요합니다. 공개 저장소는 인증 없이 clone할 수 있습니다.",loadingTokens:"저장된 토큰 로딩 중...",storedToken:"저장된 토큰",newToken:"새 토큰",nonePublic:"없음 (공개)",selectToken:"토큰 선택",selectTokenPlaceholder:"-- 토큰 선택 --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"이 토큰은 이 작업에만 사용됩니다",publicRepoInfo:"공개 저장소는 인증이 필요하지 않습니다. 공개 저장소를 clone하는 경우 토큰을 생략할 수 있습니다.",noTokensHelp:"저장된 토큰이 없습니다. 설정 → API Keys에서 토큰을 추가하면 재사용이 편리합니다.",optionalTokenPublic:"GitHub 토큰 (공개 저장소는 선택사항)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (공개 저장소는 비워두세요)"},step3:{reviewConfig:"설정 검토",workspaceType:"워크스페이스 유형:",existingWorkspace:"기존 워크스페이스",newWorkspace:"새 워크스페이스",path:"경로:",cloneFrom:"Clone 소스:",authentication:"인증:",usingStoredToken:"저장된 토큰 사용:",usingProvidedToken:"제공된 토큰 사용",noAuthentication:"인증 없음",sshKey:"SSH 키",existingInfo:"워크스페이스가 프로젝트 목록에 추가되며 Claude/Cursor 세션에서 사용할 수 있습니다.",newWithClone:"이 폴더에 저장소가 clone됩니다.",newEmpty:"워크스페이스가 프로젝트 목록에 추가되며 Claude/Cursor 세션에서 사용할 수 있습니다.",cloningRepository:"저장소 clone 중..."},buttons:{cancel:"취소",back:"뒤로",next:"다음",createProject:"프로젝트 생성",creating:"생성 중...",cloning:"Clone 중..."},errors:{selectType:"기존 워크스페이스를 사용할지 새로 생성할지 선택해주세요",providePath:"워크스페이스 경로를 입력해주세요",failedToCreate:"워크스페이스 생성 실패",failedToCreateFolder:"폴더 생성 실패"}},hh={title:"업데이트 가능",newVersionReady:"새 버전이 준비되었습니다",currentVersion:"현재 버전",latestVersion:"최신 버전",whatsNew:"새로운 기능:",viewFullRelease:"전체 릴리스 보기",updateProgress:"업데이트 진행 상황:",manualUpgrade:"수동 업그레이드:",manualUpgradeHint:'또는 "지금 업데이트"를 클릭하여 자동으로 업데이트합니다.',updateCompleted:"업데이트가 완료되었습니다!",restartServer:"변경사항을 적용하려면 서버를 재시작하세요.",updateFailed:"업데이트 실패",buttons:{close:"닫기",later:"나중에",copyCommand:"명령어 복사",updateNow:"지금 업데이트",updating:"업데이트 중..."},ariaLabels:{closeModal:"버전 업그레이드 모달 닫기",showSidebar:"사이드바 표시",settings:"설정",updateAvailable:"업데이트 가능",closeSidebar:"사이드바 닫기"}},mh={buttons:rh,tabs:nh,status:sh,messages:oh,navigation:ih,common:ah,time:ch,fileOperations:lh,mainContent:uh,fileTree:dh,projectWizard:ph,versionUpdate:hh},fh="설정",gh={account:"계정",permissions:"권한",mcpServers:"MCP 서버",appearance:"외관"},vh={title:"계정",language:"언어",languageLabel:"표시 언어",languageDescription:"인터페이스에 사용할 언어를 선택하세요",username:"사용자명",email:"이메일",profile:"프로필",changePassword:"비밀번호 변경"},yh={title:"MCP 서버",addServer:"서버 추가",editServer:"서버 편집",deleteServer:"서버 삭제",serverName:"서버 이름",serverType:"서버 유형",config:"설정",testConnection:"연결 테스트",status:"상태",connected:"연결됨",disconnected:"연결 끊김",scope:{label:"범위",user:"사용자",project:"프로젝트"}},bh={title:"외관",theme:"테마",codeEditor:"코드 에디터",editorTheme:"에디터 테마",wordWrap:"자동 줄바꿈",showMinimap:"미니맵 표시",lineNumbers:"줄 번호",fontSize:"글꼴 크기"},wh={saveChanges:"변경사항 저장",resetToDefaults:"기본값으로 초기화",cancelChanges:"변경 취소"},Sh={title:"빠른 설정",sections:{appearance:"외관",toolDisplay:"도구 표시",viewOptions:"보기 옵션",inputSettings:"입력 설정",whisperDictation:"Whisper 음성 인식"},darkMode:"다크 모드",autoExpandTools:"도구 자동 펼치기",showRawParameters:"Raw 파라미터 표시",showThinking:"생각 과정 표시",autoScrollToBottom:"자동 스크롤",sendByCtrlEnter:"Ctrl+Enter로 전송",sendByCtrlEnterDescription:"활성화하면 Enter 대신 Ctrl+Enter로 메시지를 전송합니다. IME 사용자가 실수로 전송하는 것을 방지하는 데 유용합니다.",dragHandle:{dragging:"드래그 핸들",closePanel:"설정 패널 닫기",openPanel:"설정 패널 열기",draggingStatus:"드래그 중...",toggleAndMove:"클릭하여 토글, 드래그하여 이동"},whisper:{modes:{default:"기본 모드",defaultDescription:"음성을 그대로 텍스트로 변환",prompt:"프롬프트 향상",promptDescription:"거친 아이디어를 명확하고 상세한 AI 프롬프트로 변환",vibe:"Vibe 모드",vibeDescription:"아이디어를 상세한 에이전트 지침 형식으로 변환"}}},kh={agents:"에이전트",appearance:"외관",git:"Git",apiTokens:"API & 토큰",tasks:"작업"},_h={darkMode:{label:"다크 모드",description:"라이트/다크 테마 전환"},projectSorting:{label:"프로젝트 정렬",description:"사이드바에서 프로젝트 정렬 방식",alphabetical:"알파벳순",recentActivity:"최근 활동순"},codeEditor:{title:"코드 에디터",theme:{label:"에디터 테마",description:"코드 에디터의 기본 테마"},wordWrap:{label:"자동 줄바꿈",description:"에디터에서 기본적으로 자동 줄바꿈 활성화"},showMinimap:{label:"미니맵 표시",description:"Diff 보기에서 쉬운 탐색을 위한 미니맵 표시"},lineNumbers:{label:"줄 번호 표시",description:"에디터에 줄 번호 표시"},fontSize:{label:"글꼴 크기",description:"에디터 글꼴 크기 (픽셀)"}}},Ch={title:{add:"MCP 서버 추가",edit:"MCP 서버 편집"},importMode:{form:"폼 입력",json:"JSON 가져오기"},scope:{label:"범위",userGlobal:"사용자 (전역)",projectLocal:"프로젝트 (로컬)",userDescription:"사용자 범위: 모든 프로젝트에서 사용 가능",projectDescription:"로컬 범위: 선택한 프로젝트에서만 사용 가능",cannotChange:"기존 서버를 편집할 때는 범위를 변경할 수 없습니다"},fields:{serverName:"서버 이름",transportType:"전송 유형",command:"명령어",arguments:"인수 (한 줄에 하나씩)",jsonConfig:"JSON 설정",url:"URL",envVars:"환경 변수 (KEY=value, 한 줄에 하나씩)",headers:"헤더 (KEY=value, 한 줄에 하나씩)",selectProject:"프로젝트 선택..."},placeholders:{serverName:"my-server"},validation:{missingType:"필수 항목 누락: type",stdioRequiresCommand:"stdio 유형은 command 필드가 필요합니다",httpRequiresUrl:"{{type}} 유형은 url 필드가 필요합니다",invalidJson:"잘못된 JSON 형식",jsonHelp:"MCP 서버 설정을 JSON 형식으로 붙여넣으세요. 예시:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"설정 상세 ({{configFile}}에서)",projectPath:"경로: {{path}}",actions:{cancel:"취소",saving:"저장 중...",addServer:"서버 추가",updateServer:"서버 업데이트"}},Th={success:"설정이 저장되었습니다!",error:"설정 저장 실패",saving:"저장 중..."},Eh={save:"설정 저장",cancel:"취소"},Ph={title:"Git 설정",description:"커밋을 위한 Git 정보를 설정합니다. 이 설정은 git config --global로 전역 적용됩니다",name:{label:"Git 이름",help:"Git 커밋에 사용될 이름"},email:{label:"Git 이메일",help:"Git 커밋에 사용될 이메일"},actions:{save:"설정 저장",saving:"저장 중..."},status:{success:"저장 완료"}},xh={title:"API 키",description:"다른 애플리케이션에서 외부 API에 접근하기 위한 API 키를 생성합니다.",newKey:{alertTitle:"⚠️ API 키를 저장하세요",alertMessage:"이 키는 지금만 볼 수 있습니다. 안전하게 보관하세요.",iveSavedIt:"저장했습니다"},form:{placeholder:"API 키 이름 (예: Production Server)",createButton:"생성",cancelButton:"취소"},newButton:"새 API 키",empty:"생성된 API 키가 없습니다.",list:{created:"생성일:",lastUsed:"마지막 사용:"},confirmDelete:"이 API 키를 삭제하시겠습니까?",status:{active:"활성",inactive:"비활성"},github:{title:"GitHub 토큰",description:"외부 API를 통해 비공개 저장소를 clone하기 위한 GitHub Personal Access Token을 추가합니다.",descriptionAlt:"비공개 저장소를 clone하기 위한 GitHub Personal Access Token을 추가합니다. 저장하지 않고 API 요청에 직접 토큰을 전달할 수도 있습니다.",addButton:"토큰 추가",form:{namePlaceholder:"토큰 이름 (예: Personal Repos)",tokenPlaceholder:"GitHub Personal Access Token (ghp_...)",descriptionPlaceholder:"설명 (선택사항)",addButton:"토큰 추가",cancelButton:"취소",howToCreate:"GitHub Personal Access Token 생성 방법 →"},empty:"추가된 GitHub 토큰이 없습니다.",added:"추가일:",confirmDelete:"이 GitHub 토큰을 삭제하시겠습니까?"},apiDocsLink:"API 문서",documentation:{title:"외부 API 문서",description:"외부 API를 사용하여 애플리케이션에서 Claude/Cursor 세션을 트리거하는 방법을 알아보세요.",viewLink:"API 문서 보기 →"},loading:"로딩 중...",version:{updateAvailable:"업데이트 가능: v{{version}}"}},Ah={checking:"TaskMaster 설치 확인 중...",notInstalled:{title:"TaskMaster AI CLI가 설치되지 않았습니다",description:"작업 관리 기능을 사용하려면 TaskMaster CLI가 필요합니다. 시작하려면 설치하세요:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"GitHub에서 보기",afterInstallation:"설치 후:",steps:{restart:"이 애플리케이션을 재시작하세요",autoAvailable:"TaskMaster 기능이 자동으로 활성화됩니다",initCommand:"프로젝트 디렉토리에서 task-master init을 사용하세요"}},settings:{enableLabel:"TaskMaster 통합 활성화",enableDescription:"인터페이스 전체에 TaskMaster 작업, 배너 및 사이드바 표시"}},jh={authStatus:{checking:"확인 중...",connected:"연결됨",notConnected:"연결되지 않음",disconnected:"연결 끊김",checkingAuth:"인증 상태 확인 중...",loggedInAs:"{{email}}(으)로 로그인됨",authenticatedUser:"인증된 사용자"},account:{claude:{description:"Anthropic Claude AI 어시스턴트"},cursor:{description:"Cursor AI 기반 코드 에디터"},codex:{description:"OpenAI Codex AI 어시스턴트"}},connectionStatus:"연결 상태",login:{title:"로그인",reAuthenticate:"재인증",description:"AI 기능을 활성화하려면 {{agent}} 계정에 로그인하세요",reAuthDescription:"다른 계정으로 로그인하거나 자격 증명을 새로고침하세요",button:"로그인",reLoginButton:"재로그인"},error:"오류: {{error}}"},Mh={title:"권한 설정",skipPermissions:{label:"권한 확인 건너뛰기 (주의해서 사용)",claudeDescription:"--dangerously-skip-permissions 플래그와 동일",cursorDescription:"Cursor CLI의 -f 플래그와 동일"},allowedTools:{title:"허용된 도구",description:"권한 확인 없이 자동으로 허용되는 도구",placeholder:'예: "Bash(git log:*)" 또는 "Write"',quickAdd:"자주 쓰는 도구 빠른 추가:",empty:"설정된 허용 도구 없음"},blockedTools:{title:"차단된 도구",description:"권한 확인 없이 자동으로 차단되는 도구",placeholder:'예: "Bash(rm:*)"',empty:"설정된 차단 도구 없음"},allowedCommands:{title:"허용된 Shell 명령어",description:"권한 확인 없이 자동으로 허용되는 Shell 명령어",placeholder:'예: "Shell(ls)" 또는 "Shell(git status)"',quickAdd:"자주 쓰는 명령어 빠른 추가:",empty:"설정된 허용 명령어 없음"},blockedCommands:{title:"차단된 Shell 명령어",description:"자동으로 차단되는 Shell 명령어",placeholder:'예: "Shell(rm -rf)" 또는 "Shell(sudo)"',empty:"설정된 차단 명령어 없음"},toolExamples:{title:"도구 패턴 예시:",bashGitLog:"- 모든 git log 명령어 허용",bashGitDiff:"- 모든 git diff 명령어 허용",write:"- 모든 Write 도구 사용 허용",bashRm:"- 모든 rm 명령어 차단 (위험)"},shellExamples:{title:"Shell 명령어 예시:",ls:"- ls 명령어 허용",gitStatus:"- git status 허용",npmInstall:"- npm install 허용",rmRf:"- 재귀 삭제 차단"},codex:{permissionMode:"권한 모드",description:"Codex가 파일 수정 및 명령어 실행을 처리하는 방식을 제어합니다",modes:{default:{title:"기본",description:"신뢰할 수 있는 명령어(ls, cat, grep, git status 등)만 자동 실행됩니다. 다른 명령어는 건너뜁니다. 워크스페이스에 쓰기 가능."},acceptEdits:{title:"편집 허용",description:"워크스페이스 내에서 모든 명령어가 자동 실행됩니다. 샌드박스 내 완전 자동 모드."},bypassPermissions:{title:"권한 우회",description:"제한 없는 전체 시스템 접근. 모든 명령어가 전체 디스크 및 네트워크 접근 권한으로 자동 실행됩니다. 주의해서 사용하세요."}},technicalDetails:"기술 상세",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted. 신뢰할 수 있는 명령어: cat, cd, grep, head, ls, pwd, tail, git status/log/diff/show, find(-exec 제외) 등.",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never. 프로젝트 디렉토리 내에서 모든 명령어 자동 실행.",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never. 전체 시스템 접근, 신뢰할 수 있는 환경에서만 사용하세요.",overrideNote:"채팅 인터페이스의 모드 버튼을 사용하여 세션별로 재정의할 수 있습니다."}},actions:{add:"추가"}},Ih={title:"MCP 서버",description:{claude:"Model Context Protocol 서버는 Claude에 추가 도구와 데이터 소스를 제공합니다",cursor:"Model Context Protocol 서버는 Cursor에 추가 도구와 데이터 소스를 제공합니다",codex:"Model Context Protocol 서버는 Codex에 추가 도구와 데이터 소스를 제공합니다"},addButton:"MCP 서버 추가",empty:"설정된 MCP 서버 없음",serverType:"유형",scope:{local:"로컬",user:"사용자"},config:{command:"명령어",url:"URL",args:"인수",environment:"환경"},tools:{title:"도구",count:"({{count}}):",more:"+{{count}}개 더"},actions:{edit:"서버 편집",delete:"서버 삭제"},help:{title:"Codex MCP 정보",description:"Codex는 stdio 기반 MCP 서버를 지원합니다. 추가 도구와 리소스로 Codex의 기능을 확장하는 서버를 추가할 수 있습니다."}},Oh={title:fh,tabs:gh,account:vh,mcp:yh,appearance:bh,actions:wh,quickSettings:Sh,mainTabs:kh,appearanceSettings:_h,mcpForm:Ch,saveStatus:Th,footerActions:Eh,git:Ph,apiKeys:xh,tasks:Ah,agents:jh,permissions:Mh,mcpServers:Ih},Dh={title:"다시 오신 것을 환영합니다",description:"UpfynAI 계정에 로그인하세요",username:"사용자명",password:"비밀번호",submit:"로그인",loading:"로그인 중...",errors:{invalidCredentials:"사용자명 또는 비밀번호가 잘못되었습니다",requiredFields:"모든 항목을 입력해주세요",networkError:"네트워크 오류. 다시 시도해주세요."},placeholders:{username:"사용자명을 입력하세요",password:"비밀번호를 입력하세요"}},Lh={title:"계정 생성",username:"사용자명",password:"비밀번호",confirmPassword:"비밀번호 확인",submit:"계정 생성",loading:"계정 생성 중...",errors:{passwordMismatch:"비밀번호가 일치하지 않습니다",usernameTaken:"이미 사용 중인 사용자명입니다",weakPassword:"비밀번호가 너무 약합니다"}},Nh={title:"로그아웃",confirm:"정말 로그아웃하시겠습니까?",button:"로그아웃"},Rh={login:Dh,register:Lh,logout:Nh},Fh={title:"프로젝트",newProject:"새 프로젝트",deleteProject:"프로젝트 삭제",renameProject:"프로젝트 이름 변경",noProjects:"프로젝트가 없습니다",loadingProjects:"프로젝트 로딩 중...",searchPlaceholder:"프로젝트 검색...",projectNamePlaceholder:"프로젝트 이름",starred:"즐겨찾기",all:"전체",untitledSession:"제목 없는 세션",newSession:"새 세션",codexSession:"Codex 세션",fetchingProjects:"Claude 프로젝트와 세션을 가져오는 중",projects:"프로젝트",noMatchingProjects:"일치하는 프로젝트 없음",tryDifferentSearch:"검색어를 변경해보세요",runClaudeCli:"프로젝트 디렉토리에서 Claude CLI를 실행하여 시작하세요"},$h={title:"UpfynAI",subtitle:"AI 코딩 어시스턴트 UI"},Uh={title:"세션",newSession:"새 세션",deleteSession:"세션 삭제",renameSession:"세션 이름 변경",noSessions:"세션이 없습니다",loadingSessions:"세션 로딩 중...",unnamed:"이름 없음",loading:"로딩 중...",showMore:"더 많은 세션 보기"},qh={viewEnvironments:"환경 보기",hideSidebar:"사이드바 숨기기",createProject:"새 프로젝트 생성",refresh:"프로젝트 및 세션 새로고침 (Ctrl+R)",renameProject:"프로젝트 이름 변경 (F2)",deleteProject:"빈 프로젝트 삭제 (Delete)",addToFavorites:"즐겨찾기에 추가",removeFromFavorites:"즐겨찾기에서 제거",editSessionName:"세션 이름 직접 편집",deleteSession:"이 세션 영구 삭제",save:"저장",cancel:"취소"},Vh={chat:"채팅",files:"파일",git:"Git",terminal:"터미널",tasks:"작업"},Bh={refresh:"새로고침",settings:"설정",collapseAll:"모두 접기",expandAll:"모두 펼치기",cancel:"취소",save:"저장",delete:"삭제",rename:"이름 변경"},Jh={active:"활성",inactive:"비활성",thinking:"생각 중...",error:"오류",aborted:"중단됨",unknown:"알 수 없음"},Gh={justNow:"방금 전",oneMinuteAgo:"1분 전",minutesAgo:"{{count}}분 전",oneHourAgo:"1시간 전",hoursAgo:"{{count}}시간 전",oneDayAgo:"1일 전",daysAgo:"{{count}}일 전"},Hh={deleteConfirm:"정말 삭제하시겠습니까?",renameSuccess:"이름이 변경되었습니다",deleteSuccess:"삭제되었습니다",errorOccurred:"오류가 발생했습니다",deleteSessionConfirm:"이 세션을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",deleteProjectConfirm:"이 빈 프로젝트를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",enterProjectPath:"프로젝트 경로를 입력해주세요",deleteSessionFailed:"세션 삭제 실패. 다시 시도해주세요.",deleteSessionError:"세션 삭제 오류. 다시 시도해주세요.",deleteProjectFailed:"프로젝트 삭제 실패. 다시 시도해주세요.",deleteProjectError:"프로젝트 삭제 오류. 다시 시도해주세요.",createProjectFailed:"프로젝트 생성 실패. 다시 시도해주세요.",createProjectError:"프로젝트 생성 오류. 다시 시도해주세요."},Wh={updateAvailable:"업데이트 가능"},zh={deleteProject:"프로젝트 삭제",deleteSession:"세션 삭제",confirmDelete:"정말 삭제하시겠습니까",sessionCount_one:"이 프로젝트에는 {{count}}개의 대화가 있습니다.",sessionCount_other:"이 프로젝트에는 {{count}}개의 대화가 있습니다.",allConversationsDeleted:"모든 대화가 영구적으로 삭제됩니다.",cannotUndo:"이 작업은 취소할 수 없습니다."},Yh={projects:Fh,app:$h,sessions:Uh,tooltips:qh,navigation:Vh,actions:Bh,status:Jh,time:Gh,messages:Hh,version:Wh,deleteConfirmation:zh},Kh={copy:"복사",copied:"복사됨",copyCode:"코드 복사"},Qh={user:"U",error:"오류",tool:"도구",claude:"Claude",cursor:"Cursor",codex:"Codex"},Xh={settings:"도구 설정",error:"도구 오류",result:"도구 결과",viewParams:"입력 파라미터 보기",viewRawParams:"Raw 파라미터 보기",viewDiff:"편집 Diff 보기:",creatingFile:"새 파일 생성:",updatingTodo:"Todo 리스트 업데이트",read:"읽기",readFile:"파일 읽기",updateTodo:"Todo 리스트 업데이트",readTodo:"Todo 리스트 읽기",searchResults:"결과"},Zh={found:"{{count}}개의 {{type}} 발견",file:"파일",files:"파일",pattern:"패턴:",in:"위치:"},em={updated:"파일이 업데이트되었습니다",created:"파일이 생성되었습니다",written:"파일이 작성되었습니다",diff:"Diff",newFile:"새 파일",viewContent:"파일 내용 보기",viewFullOutput:"전체 출력 보기 ({{count}}자)",contentDisplayed:"파일 내용이 위의 Diff 보기에 표시됩니다"},tm={title:"대화형 프롬프트",waiting:"CLI에서 응답을 기다리는 중",instruction:"Claude가 실행 중인 터미널에서 옵션을 선택해주세요.",selectedOption:"✓ Claude가 옵션 {{number}}을(를) 선택했습니다",instructionDetail:"CLI에서 화살표 키 또는 숫자를 입력하여 이 옵션을 대화형으로 선택합니다."},rm={title:"생각 중...",emoji:"💭 생각 중..."},nm={response:"JSON 응답"},sm={grant:"{{tool}}에 대한 권한 부여",added:"권한이 추가되었습니다",addTo:"{{entry}}을(를) 허용된 도구에 추가합니다.",retry:"권한이 저장되었습니다. 도구를 사용하려면 요청을 재시도하세요.",error:"권한을 업데이트할 수 없습니다. 다시 시도해주세요.",openSettings:"설정 열기"},om={updated:"Todo 리스트가 업데이트되었습니다",current:"현재 Todo 리스트"},im={viewPlan:"📋 구현 계획 보기",title:"구현 계획"},am={resetAt:"Claude 사용량 한도에 도달했습니다. 한도는 **{{time}} {{timezone}}** - {{date}}에 초기화됩니다"},cm={permissionMode:"권한 모드",modes:{default:"기본 모드",acceptEdits:"편집 허용",bypassPermissions:"권한 우회",plan:"Plan 모드"},descriptions:{default:"신뢰할 수 있는 명령어(ls, cat, grep, git status 등)만 자동 실행됩니다. 다른 명령어는 건너뜁니다. 워크스페이스에 쓰기 가능.",acceptEdits:"워크스페이스 내에서 모든 명령어가 자동 실행됩니다. 샌드박스 내 완전 자동 모드.",bypassPermissions:"제한 없는 전체 시스템 접근. 모든 명령어가 전체 디스크 및 네트워크 접근 권한으로 자동 실행됩니다. 주의해서 사용하세요.",plan:"계획 모드 - 명령어가 실행되지 않습니다"},technicalDetails:"기술 상세"},lm={placeholder:"/를 입력하여 명령어, @를 입력하여 파일, 또는 {{provider}}에게 무엇이든 물어보세요...",placeholderDefault:"메시지를 입력하세요...",disabled:"입력 비활성화",attachFiles:"파일 첨부",attachImages:"이미지 첨부",send:"전송",stop:"중지",hintText:{ctrlEnter:"Ctrl+Enter로 전송 • Shift+Enter로 줄바꿈 • Tab으로 모드 변경 • /로 슬래시 명령어",enter:"Enter로 전송 • Shift+Enter로 줄바꿈 • Tab으로 모드 변경 • /로 슬래시 명령어"},clickToChangeMode:"클릭하여 권한 모드 변경 (또는 입력창에서 Tab)",showAllCommands:"모든 명령어 보기",clearInput:"입력 지우기",scrollToBottom:"맨 아래로 스크롤"},um={selector:{title:"Thinking 모드",description:"확장된 thinking은 Claude에게 대안을 평가할 시간을 더 줍니다",active:"활성",tip:"높은 thinking 모드는 시간이 더 걸리지만 더 철저한 분석을 제공합니다"},modes:{none:{name:"Standard",description:"일반 Claude 응답",prefix:""},think:{name:"Think",description:"기본 확장 thinking",prefix:"think"},thinkHard:{name:"Think Hard",description:"더 철저한 평가",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"대안을 포함한 심층 분석",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"최대 thinking 예산",prefix:"ultrathink"}},buttonTitle:"Thinking 모드: {{mode}}"},dm={title:"AI 어시스턴트 선택",description:"새 대화를 시작할 프로바이더를 선택하세요",selectModel:"모델 선택",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",cursorEditor:"AI 코드 에디터"},readyPrompt:{claude:"{{model}}로 Claude를 사용할 준비가 되었습니다. 아래에 메시지를 입력하세요.",cursor:"{{model}}로 Cursor를 사용할 준비가 되었습니다. 아래에 메시지를 입력하세요.",codex:"{{model}}로 Codex를 사용할 준비가 되었습니다. 아래에 메시지를 입력하세요.",default:"시작하려면 위에서 프로바이더를 선택하세요"}},pm={continue:{title:"대화 계속하기",description:"코드에 대해 질문하거나, 변경을 요청하거나, 개발 작업에 도움을 받으세요"},loading:{olderMessages:"이전 메시지 로딩 중...",sessionMessages:"세션 메시지 로딩 중..."},messages:{showingOf:"{{total}}개 중 {{shown}}개 표시",scrollToLoad:"위로 스크롤하여 더 로드",showingLast:"마지막 {{count}}개 메시지 표시 (총 {{total}}개)",loadEarlier:"이전 메시지 로드",loadAll:"모든 메시지 로드",loadingAll:"모든 메시지 로딩 중...",allLoaded:"모든 메시지 로드 완료",perfWarning:'모든 메시지가 로드됨 - 스크롤이 느려질 수 있습니다. "맨 아래로 스크롤"을 클릭하면 성능이 복구됩니다.'}},hm={selectProject:{title:"프로젝트 선택",description:"해당 디렉토리에서 대화형 Shell을 열 프로젝트를 선택하세요"},status:{newSession:"새 세션",initializing:"초기화 중...",restarting:"재시작 중..."},actions:{disconnect:"연결 끊기",disconnectTitle:"Shell 연결 끊기",restart:"재시작",restartTitle:"Shell 재시작 (먼저 연결 끊기)",connect:"Shell에서 계속",connectTitle:"Shell에 연결"},loading:"터미널 로딩 중...",connecting:"Shell에 연결 중...",startSession:"새 Claude 세션 시작",resumeSession:"세션 재개: {{displayName}}...",runCommand:"{{projectName}}에서 {{command}} 실행",startCli:"{{projectName}}에서 Claude CLI 시작",defaultCommand:"명령어"},mm={startChatWithProvider:"{{provider}}와 채팅을 시작하려면 프로젝트를 선택하세요"},fm={nextTaskPrompt:"다음 작업 시작"},gm={codeBlock:Kh,messageTypes:Qh,tools:Xh,search:Zh,fileOperations:em,interactive:tm,thinking:rm,json:nm,permissions:sm,todo:om,plan:im,usageLimit:am,codex:cm,input:lm,thinkingMode:um,providerSelection:dm,session:pm,shell:hm,projectSelection:mm,tasks:fm},vm={changes:"변경사항",previousChange:"이전 변경",nextChange:"다음 변경",hideDiff:"Diff 하이라이트 숨기기",showDiff:"Diff 하이라이트 표시",settings:"에디터 설정",collapse:"에디터 접기",expand:"에디터 전체 너비로 펼치기"},ym="{{fileName}} 로딩 중...",bm={showingChanges:"변경사항 표시"},wm={download:"파일 다운로드",save:"저장",saving:"저장 중...",saved:"저장됨!",exitFullscreen:"전체화면 종료",fullscreen:"전체화면",close:"닫기"},Sm={lines:"줄:",characters:"문자:",shortcuts:"Ctrl+S로 저장 • Esc로 닫기"},km={toolbar:vm,loading:ym,header:bm,actions:wm,footer:Sm},_m={save:"保存",cancel:"取消",delete:"删除",create:"创建",edit:"编辑",close:"关闭",confirm:"确认",submit:"提交",retry:"重试",refresh:"刷新",search:"搜索",clear:"清除",copy:"复制",download:"下载",upload:"上传",browse:"浏览"},Cm={chat:"聊天",shell:"终端",files:"文件",git:"源代码管理",tasks:"任务"},Tm={loading:"加载中...",success:"成功",error:"错误",failed:"失败",pending:"待处理",completed:"已完成",inProgress:"进行中"},Em={savedSuccessfully:"保存成功",deletedSuccessfully:"删除成功",updatedSuccessfully:"更新成功",operationFailed:"操作失败",networkError:"网络错误,请检查您的连接。",unauthorized:"未授权,请登录。",notFound:"未找到",invalidInput:"输入无效",requiredField:"此字段为必填项",unknownError:"发生未知错误"},Pm={settings:"设置",home:"首页",back:"返回",next:"下一步",previous:"上一步",logout:"退出登录"},xm={language:"语言",theme:"主题",darkMode:"深色模式",lightMode:"浅色模式",name:"名称",description:"描述",enabled:"已启用",disabled:"已禁用",optional:"可选",version:"版本",select:"选择",selectAll:"全选",deselectAll:"取消全选"},Am={justNow:"刚刚",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前",yesterday:"昨天"},jm={newFile:"新建文件",newFolder:"新建文件夹",rename:"重命名",move:"移动",copyPath:"复制路径",openInEditor:"在编辑器中打开"},Mm={loading:"正在加载 UpfynAI",settingUpWorkspace:"正在设置您的工作空间...",chooseProject:"选择您的项目",selectProjectDescription:"从侧边栏选择一个项目以开始使用 Claude 进行编程。每个项目包含您的聊天会话和文件历史。",tip:"提示",createProjectMobile:"点击上方的菜单按钮以访问项目",createProjectDesktop:"点击侧边栏中的文件夹图标以创建新项目",newSession:"新会话",untitledSession:"未命名会话",projectFiles:"项目文件"},Im={loading:"正在加载文件...",files:"文件",simpleView:"简单视图",compactView:"紧凑视图",detailedView:"详细视图",searchPlaceholder:"搜索文件和文件夹...",clearSearch:"清除搜索",name:"名称",size:"大小",modified:"修改时间",permissions:"权限",noFilesFound:"未找到文件",checkProjectPath:"检查项目路径是否可访问",noMatchesFound:"未找到匹配项",tryDifferentSearch:"尝试不同的搜索词或清除搜索",justNow:"刚刚",minAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前"},Om={title:"创建新项目",steps:{type:"类型",configure:"配置",confirm:"确认"},step1:{question:"您已经有工作区,还是想创建一个新的工作区?",existing:{title:"现有工作区",description:"我的服务器上已经有工作区,只需要将其添加到项目列表中"},new:{title:"新建工作区",description:"创建一个新工作区,可选择从 GitHub 仓库克隆"}},step2:{existingPath:"工作区路径",newPath:"工作区路径",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"您现有工作区目录的完整路径",newHelp:"工作区目录的完整路径",githubUrl:"GitHub URL(可选)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"可选:提供 GitHub URL 以克隆仓库",githubAuth:"GitHub 身份验证(可选)",githubAuthHelp:"仅私有仓库需要。公共仓库无需身份验证即可克隆。",loadingTokens:"正在加载已保存的令牌...",storedToken:"已保存的令牌",newToken:"新令牌",nonePublic:"无(公共)",selectToken:"选择令牌",selectTokenPlaceholder:"-- 选择令牌 --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"此令牌仅用于此操作",publicRepoInfo:"公共仓库不需要身份验证。如果克隆公共仓库,可以跳过提供令牌。",noTokensHelp:"没有可用的已保存令牌。您可以在 设置 → API 密钥 中添加令牌以便重复使用。",optionalTokenPublic:"GitHub 令牌(公共仓库可选)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(公共仓库可留空)"},step3:{reviewConfig:"查看您的配置",workspaceType:"工作区类型:",existingWorkspace:"现有工作区",newWorkspace:"新建工作区",path:"路径:",cloneFrom:"克隆自:",authentication:"身份验证:",usingStoredToken:"使用已保存的令牌:",usingProvidedToken:"使用提供的令牌",noAuthentication:"无身份验证",sshKey:"SSH 密钥",existingInfo:"工作区将被添加到您的项目列表中,并可用于 Claude/Cursor 会话。",newWithClone:"仓库将从此文件夹克隆。",newEmpty:"工作区将被添加到您的项目列表中,并可用于 Claude/Cursor 会话。",cloningRepository:"正在克隆仓库..."},buttons:{cancel:"取消",back:"返回",next:"下一步",createProject:"创建项目",creating:"创建中...",cloning:"正在克隆..."},errors:{selectType:"请选择您已有现有工作区还是想创建新工作区",providePath:"请提供工作区路径",failedToCreate:"创建工作区失败",failedToCreateFolder:"创建文件夹失败"}},Dm={title:"有可用更新",newVersionReady:"新版本已准备就绪",currentVersion:"当前版本",latestVersion:"最新版本",whatsNew:"新内容:",viewFullRelease:"查看完整发布",updateProgress:"更新进度:",manualUpgrade:"手动升级:",manualUpgradeHint:"或点击'立即更新'以自动运行更新。",updateCompleted:"更新成功完成!",restartServer:"请重启服务器以应用更改。",updateFailed:"更新失败",buttons:{close:"关闭",later:"稍后",copyCommand:"复制命令",updateNow:"立即更新",updating:"更新中..."},ariaLabels:{closeModal:"关闭版本升级模态框",showSidebar:"显示侧边栏",settings:"设置",updateAvailable:"有可用更新",closeSidebar:"关闭侧边栏"}},Lm={buttons:_m,tabs:Cm,status:Tm,messages:Em,navigation:Pm,common:xm,time:Am,fileOperations:jm,mainContent:Mm,fileTree:Im,projectWizard:Om,versionUpdate:Dm},Nm="设置",Rm={account:"账户",permissions:"权限",mcpServers:"MCP 服务器",appearance:"外观"},Fm={title:"账户",language:"语言",languageLabel:"显示语言",languageDescription:"选择您偏好的界面语言",username:"用户名",email:"邮箱",profile:"个人资料",changePassword:"修改密码"},$m={title:"MCP 服务器",addServer:"添加服务器",editServer:"编辑服务器",deleteServer:"删除服务器",serverName:"服务器名称",serverType:"服务器类型",config:"配置",testConnection:"测试连接",status:"状态",connected:"已连接",disconnected:"未连接",scope:{label:"范围",user:"用户",project:"项目"}},Um={title:"外观",theme:"主题",codeEditor:"代码编辑器",editorTheme:"编辑器主题",wordWrap:"自动换行",showMinimap:"显示缩略图",lineNumbers:"行号",fontSize:"字体大小"},qm={saveChanges:"保存更改",resetToDefaults:"重置为默认值",cancelChanges:"取消更改"},Vm={title:"快速设置",sections:{appearance:"外观",toolDisplay:"工具显示",viewOptions:"视图选项",inputSettings:"输入设置",whisperDictation:"Whisper 听写"},darkMode:"深色模式",autoExpandTools:"自动展开工具",showRawParameters:"显示原始参数",showThinking:"显示思考过程",autoScrollToBottom:"自动滚动到底部",sendByCtrlEnter:"使用 Ctrl+Enter 发送",sendByCtrlEnterDescription:"启用后,按 Ctrl+Enter 发送消息,而不是仅按 Enter。这对于使用输入法的用户可以避免意外发送。",dragHandle:{dragging:"正在拖拽手柄",closePanel:"关闭设置面板",openPanel:"打开设置面板",draggingStatus:"正在拖拽...",toggleAndMove:"点击切换,拖拽移动"},whisper:{modes:{default:"默认模式",defaultDescription:"直接转录您的语音",prompt:"提示词增强",promptDescription:"将粗略的想法转化为清晰、详细的 AI 提示词",vibe:"Vibe 模式",vibeDescription:"将想法格式化为带有详细说明的清晰智能体指令"}}},Bm={agents:"智能体",appearance:"外观",git:"Git",apiTokens:"API 和令牌",tasks:"任务"},Jm={darkMode:{label:"深色模式",description:"切换浅色和深色主题"},projectSorting:{label:"项目排序",description:"项目在侧边栏中的排列方式",alphabetical:"按字母顺序",recentActivity:"最近活动"},codeEditor:{title:"代码编辑器",theme:{label:"编辑器主题",description:"代码编辑器的默认主题"},wordWrap:{label:"自动换行",description:"在编辑器中默认启用自动换行"},showMinimap:{label:"显示缩略图",description:"在差异视图中显示缩略图以便于导航"},lineNumbers:{label:"显示行号",description:"在编辑器中显示行号"},fontSize:{label:"字体大小",description:"编辑器字体大小(px)"}}},Gm={title:{add:"添加 MCP 服务器",edit:"编辑 MCP 服务器"},importMode:{form:"表单输入",json:"JSON 导入"},scope:{label:"范围",userGlobal:"用户(全局)",projectLocal:"项目(本地)",userDescription:"用户范围:在您机器上的所有项目中可用",projectDescription:"本地范围:仅在选定项目中可用",cannotChange:"编辑现有服务器时无法更改范围"},fields:{serverName:"服务器名称",transportType:"传输类型",command:"命令",arguments:"参数(每行一个)",jsonConfig:"JSON 配置",url:"URL",envVars:"环境变量(KEY=值,每行一个)",headers:"请求头(KEY=值,每行一个)",selectProject:"选择项目..."},placeholders:{serverName:"我的服务"},validation:{missingType:"缺少必填字段:type",stdioRequiresCommand:"stdio 类型需要 command 字段",httpRequiresUrl:"{{type}} 类型需要 url 字段",invalidJson:"无效的 JSON 格式",jsonHelp:"粘贴您的 MCP 服务器配置(JSON 格式)。示例格式:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"配置详细信息(来自 {{configFile}})",projectPath:"路径:{{path}}",actions:{cancel:"取消",saving:"保存中...",addServer:"添加服务器",updateServer:"更新服务器"}},Hm={success:"设置保存成功!",error:"保存设置失败",saving:"保存中..."},Wm={save:"保存设置",cancel:"取消"},zm={title:"Git 配置",description:"配置您的 git 提交身份。这些设置将通过 git config --global 全局应用",name:{label:"Git 名称",help:"您的 git 提交名称"},email:{label:"Git 邮箱",help:"您的 git 提交邮箱"},actions:{save:"保存配置",saving:"保存中..."},status:{success:"保存成功"}},Ym={title:"API 密钥",description:"生成 API 密钥以从其他应用访问外部 API。",newKey:{alertTitle:"⚠️ 保存您的 API 密钥",alertMessage:"这是您唯一一次看到此密钥。请妥善保存。",iveSavedIt:"我已保存"},form:{placeholder:"API 密钥名称(例如:生产服务器)",createButton:"创建",cancelButton:"取消"},newButton:"新建 API 密钥",empty:"尚未创建 API 密钥。",list:{created:"创建时间:",lastUsed:"最后使用:"},confirmDelete:"确定要删除此 API 密钥吗?",status:{active:"激活",inactive:"未激活"},github:{title:"GitHub 令牌",description:"添加 GitHub 个人访问令牌以通过外部 API 克隆私有仓库。",descriptionAlt:"添加 GitHub 个人访问令牌以克隆私有仓库。您也可以直接在 API 请求中传递令牌而无需存储。",addButton:"添加令牌",form:{namePlaceholder:"令牌名称(例如:个人仓库)",tokenPlaceholder:"GitHub 个人访问令牌(ghp_...)",descriptionPlaceholder:"描述(可选)",addButton:"添加令牌",cancelButton:"取消",howToCreate:"如何创建 GitHub 个人访问令牌 →"},empty:"尚未添加 GitHub 令牌。",added:"添加时间:",confirmDelete:"确定要删除此 GitHub 令牌吗?"},apiDocsLink:"API 文档",documentation:{title:"外部 API 文档",description:"了解如何使用外部 API 从您的应用程序触发 Claude/Cursor 会话。",viewLink:"查看 API 文档 →"},loading:"加载中...",version:{updateAvailable:"有可用更新:v{{version}}"}},Km={checking:"正在检查 TaskMaster 安装...",notInstalled:{title:"未安装 TaskMaster AI CLI",description:"需要 TaskMaster CLI 才能使用任务管理功能。安装它以开始使用:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"在 GitHub 上查看",afterInstallation:"安装后:",steps:{restart:"重启此应用程序",autoAvailable:"TaskMaster 功能将自动可用",initCommand:"在项目目录中使用 task-master init"}},settings:{enableLabel:"启用 TaskMaster 集成",enableDescription:"在整个界面中显示 TaskMaster 任务、横幅和侧边栏指示器"}},Qm={authStatus:{checking:"检查中...",connected:"已连接",notConnected:"未连接",disconnected:"已断开",checkingAuth:"正在检查认证状态...",loggedInAs:"登录为 {{email}}",authenticatedUser:"已认证用户"},account:{claude:{description:"Anthropic Claude AI 助手"},cursor:{description:"Cursor AI 驱动的代码编辑器"},codex:{description:"OpenAI Codex AI 助手"}},connectionStatus:"连接状态",login:{title:"登录",reAuthenticate:"重新认证",description:"登录您的 {{agent}} 账户以启用 AI 功能",reAuthDescription:"使用其他账户登录或刷新凭据",button:"登录",reLoginButton:"重新登录"},error:"错误:{{error}}"},Xm={title:"权限设置",skipPermissions:{label:"跳过权限提示(请谨慎使用)",claudeDescription:"等同于 --dangerously-skip-permissions 标志",cursorDescription:"等同于 Cursor CLI 中的 -f 标志"},allowedTools:{title:"允许的工具",description:"无需权限提示即可自动使用的工具",placeholder:'例如:"Bash(git log:*)" 或 "Write"',quickAdd:"快速添加常用工具:",empty:"未配置允许的工具"},blockedTools:{title:"禁用的工具",description:"无需权限提示即可自动禁用的工具",placeholder:'例如:"Bash(rm:*)"',empty:"未配置禁用的工具"},allowedCommands:{title:"允许的 Shell 命令",description:"无需权限提示即可自动执行的 Shell 命令",placeholder:'例如:"Shell(ls)" 或 "Shell(git status)"',quickAdd:"快速添加常用命令:",empty:"未配置允许的命令"},blockedCommands:{title:"阻止的 Shell 命令",description:"自动阻止的 Shell 命令",placeholder:'例如:"Shell(rm -rf)" 或 "Shell(sudo)"',empty:"未配置阻止的命令"},toolExamples:{title:"工具模式示例:",bashGitLog:"- 允许所有 git log 命令",bashGitDiff:"- 允许所有 git diff 命令",write:"- 允许所有 Write 工具使用",bashRm:"- 阻止所有 rm 命令(危险)"},shellExamples:{title:"Shell 命令示例:",ls:"- 允许 ls 命令",gitStatus:"- 允许 git status",npmInstall:"- 允许 npm install",rmRf:"- 阻止递归删除"},codex:{permissionMode:"权限模式",description:"控制 Codex 如何处理文件修改和命令执行",modes:{default:{title:"默认",description:"只有受信任的命令(ls、cat、grep、git status 等)会自动运行。其他命令将被跳过。可以写入工作区。"},acceptEdits:{title:"接受编辑",description:"所有命令在工作区内自动运行。具有沙箱执行的全自动模式。"},bypassPermissions:{title:"绕过权限",description:"完全系统访问,无任何限制。所有命令自动运行,具有完整的磁盘和网络访问权限。请谨慎使用。"}},technicalDetails:"技术详情",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted。受信任的命令:cat、cd、grep、head、ls、pwd、tail、git status/log/diff/show、find(不带 -exec)等。",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never。所有命令在项目目录内自动执行。",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never。完全系统访问权限,仅在可信环境中使用。",overrideNote:"您可以使用聊天界面中的模式按钮按会话覆盖此设置。"}},actions:{add:"添加"}},Zm={title:"MCP 服务器",description:{claude:"Model Context Protocol 服务器为 Claude 提供额外的工具和数据源",cursor:"Model Context Protocol 服务器为 Cursor 提供额外的工具和数据源",codex:"Model Context Protocol 服务器为 Codex 提供额外的工具和数据源"},addButton:"添加 MCP 服务器",empty:"未配置 MCP 服务器",serverType:"类型",scope:{local:"本地",user:"用户"},config:{command:"命令",url:"URL",args:"参数",environment:"环境变量"},tools:{title:"工具",count:"({{count}}):",more:"还有 {{count}} 个"},actions:{edit:"编辑服务器",delete:"删除服务器"},help:{title:"关于 Codex MCP",description:"Codex 支持基于 stdio 的 MCP 服务器。您可以添加服务器,通过额外的工具和资源来扩展 Codex 的功能。"}},ef={title:Nm,tabs:Rm,account:Fm,mcp:$m,appearance:Um,actions:qm,quickSettings:Vm,mainTabs:Bm,appearanceSettings:Jm,mcpForm:Gm,saveStatus:Hm,footerActions:Wm,git:zm,apiKeys:Ym,tasks:Km,agents:Qm,permissions:Xm,mcpServers:Zm},tf={title:"欢迎回来",description:"登录您的 UpfynAI 账户",username:"用户名",password:"密码",submit:"登录",loading:"登录中...",errors:{invalidCredentials:"用户名或密码无效",requiredFields:"请填写所有字段",networkError:"网络错误,请重试。"},placeholders:{username:"输入您的用户名",password:"输入您的密码"}},rf={title:"创建账户",username:"用户名",password:"密码",confirmPassword:"确认密码",submit:"创建账户",loading:"创建账户中...",errors:{passwordMismatch:"密码不匹配",usernameTaken:"用户名已被占用",weakPassword:"密码强度太弱"}},nf={title:"退出登录",confirm:"确定要退出登录吗?",button:"退出登录"},sf={login:tf,register:rf,logout:nf},of={title:"项目",newProject:"新建项目",deleteProject:"删除项目",renameProject:"重命名项目",noProjects:"未找到项目",loadingProjects:"加载项目中...",searchPlaceholder:"搜索项目...",projectNamePlaceholder:"项目名称",starred:"星标",all:"全部",untitledSession:"未命名会话",newSession:"新会话",codexSession:"Codex 会话",fetchingProjects:"正在获取您的 Claude 项目和会话",projects:"项目",noMatchingProjects:"未找到匹配的项目",tryDifferentSearch:"尝试调整您的搜索词",runClaudeCli:"在项目目录中运行 Claude CLI 以开始使用"},af={title:"UpfynAI",subtitle:"AI 编程助手"},cf={title:"会话",newSession:"新建会话",deleteSession:"删除会话",renameSession:"重命名会话",noSessions:"暂无会话",loadingSessions:"加载会话中...",unnamed:"未命名",loading:"加载中...",showMore:"显示更多会话"},lf={viewEnvironments:"查看环境",hideSidebar:"隐藏侧边栏",createProject:"创建新项目",refresh:"刷新项目和会话 (Ctrl+R)",renameProject:"重命名项目 (F2)",deleteProject:"删除空项目 (Delete)",addToFavorites:"添加到收藏",removeFromFavorites:"从收藏移除",editSessionName:"手动编辑会话名称",deleteSession:"永久删除此会话",save:"保存",cancel:"取消"},uf={chat:"聊天",files:"文件",git:"Git",terminal:"终端",tasks:"任务"},df={refresh:"刷新",settings:"设置",collapseAll:"全部折叠",expandAll:"全部展开",cancel:"取消",save:"保存",delete:"删除",rename:"重命名"},pf={active:"活动",inactive:"非活动",thinking:"思考中...",error:"错误",aborted:"已中止",unknown:"未知"},hf={justNow:"刚刚",oneMinuteAgo:"1 分钟前",minutesAgo:"{{count}} 分钟前",oneHourAgo:"1 小时前",hoursAgo:"{{count}} 小时前",oneDayAgo:"1 天前",daysAgo:"{{count}} 天前"},mf={deleteConfirm:"确定要删除吗?",renameSuccess:"重命名成功",deleteSuccess:"删除成功",errorOccurred:"发生错误",deleteSessionConfirm:"确定要删除此会话吗?此操作无法撤销。",deleteProjectConfirm:"确定要删除此空项目吗?此操作无法撤销。",enterProjectPath:"请输入项目路径",deleteSessionFailed:"删除会话失败,请重试。",deleteSessionError:"删除会话时出错,请重试。",deleteProjectFailed:"删除项目失败,请重试。",deleteProjectError:"删除项目时出错,请重试。",createProjectFailed:"创建项目失败,请重试。",createProjectError:"创建项目时出错,请重试。"},ff={updateAvailable:"有可用更新"},gf={deleteProject:"删除项目",deleteSession:"删除会话",confirmDelete:"您确定要删除",sessionCount_one:"此项目包含 {{count}} 个对话。",sessionCount_other:"此项目包含 {{count}} 个对话。",allConversationsDeleted:"所有对话将被永久删除。",cannotUndo:"此操作无法撤销。"},vf={projects:of,app:af,sessions:cf,tooltips:lf,navigation:uf,actions:df,status:pf,time:hf,messages:mf,version:ff,deleteConfirmation:gf},yf={copy:"复制",copied:"已复制",copyCode:"复制代码"},bf={user:"U",error:"错误",tool:"工具",claude:"Claude",cursor:"Cursor",codex:"Codex"},wf={settings:"工具设置",error:"工具错误",result:"工具结果",viewParams:"查看输入参数",viewRawParams:"查看原始参数",viewDiff:"查看编辑差异",creatingFile:"创建新文件:",updatingTodo:"更新待办事项",read:"读取",readFile:"读取文件",updateTodo:"更新待办列表",readTodo:"读取待办列表",searchResults:"结果"},Sf={found:"找到 {{count}} 个{{type}}",file:"文件",files:"文件",pattern:"模式:",in:"在:"},kf={updated:"文件更新成功",created:"文件创建成功",written:"文件写入成功",diff:"差异",newFile:"新文件",viewContent:"查看文件内容",viewFullOutput:"查看完整输出({{count}} 个字符)",contentDisplayed:"文件内容显示在上面的差异视图中"},_f={title:"交互式提示",waiting:"等待您在 CLI 中响应",instruction:"请在 Claude 运行的终端中选择一个选项。",selectedOption:"✓ Claude 选择了选项 {{number}}",instructionDetail:"在 CLI 中,您可以使用方向键或输入数字来交互式地选择此选项。"},Cf={title:"思考中...",emoji:"💭 思考中..."},Tf={response:"JSON 响应"},Ef={grant:"授予 {{tool}} 权限",added:"权限已添加",addTo:"将 {{entry}} 添加到允许的工具。",retry:"权限已保存。重试请求以使用该工具。",error:"无法更新权限。请重试。",openSettings:"打开设置"},Pf={updated:"待办列表已成功更新",current:"当前待办列表"},xf={viewPlan:"📋 查看实施计划",title:"实施计划"},Af={resetAt:"Claude 使用限制已达到。您的限制将在 **{{time}} {{timezone}}** - {{date}} 重置"},jf={permissionMode:"权限模式",modes:{default:"默认模式",acceptEdits:"编辑模式",bypassPermissions:"无限制模式",plan:"计划模式"},descriptions:{default:"只有受信任的命令(ls、cat、grep、git status 等)自动运行。其他命令将被跳过。可以写入工作区。",acceptEdits:"工作区内的所有命令自动运行。完全自动模式,具有沙盒执行功能。",bypassPermissions:"完全的系统访问,无限制。所有命令自动运行,具有完整的磁盘和网络访问权限。请谨慎使用。",plan:"计划模式 - 不执行任何命令"},technicalDetails:"技术细节"},Mf={placeholder:"输入 / 调用命令,@ 选择文件,或向 {{provider}} 提问...",placeholderDefault:"输入您的消息...",disabled:"输入已禁用",attachFiles:"附加文件",attachImages:"附加图片",send:"发送",stop:"停止",hintText:{ctrlEnter:"Ctrl+Enter 发送 • Shift+Enter 换行 • Tab 切换模式 • / 斜杠命令",enter:"Enter 发送 • Shift+Enter 换行 • Tab 切换模式 • / 斜杠命令"},clickToChangeMode:"点击更改权限模式(或在输入框中按 Tab)",showAllCommands:"显示所有命令",clearInput:"清空输入",scrollToBottom:"滚动到底部"},If={selector:{title:"思考模式",description:"扩展思考给 Claude 更多时间来评估替代方案",active:"激活",tip:"更高的思考模式需要更多时间,但提供更彻底的分析"},modes:{none:{name:"标准",description:"常规 Claude 响应",prefix:""},think:{name:"思考",description:"基本扩展思考",prefix:"思考"},thinkHard:{name:"深入思考",description:"更彻底的评估",prefix:"深入思考"},thinkHarder:{name:"更深入思考",description:"考虑替代方案的深度分析",prefix:"更深入思考"},ultrathink:{name:"超级思考",description:"最大思考预算",prefix:"超级思考"}},buttonTitle:"思考模式:{{mode}}"},Of={title:"选择您的 AI 助手",description:"选择一个供应商以开始新对话",selectModel:"选择模型",providerInfo:{anthropic:"Anthropic",openai:"OpenAI",cursorEditor:"AI 代码编辑器"},readyPrompt:{claude:"已准备好使用 Claude {{model}}。在下方输入您的消息。",cursor:"已准备好使用 Cursor {{model}}。在下方输入您的消息。",codex:"已准备好使用 Codex {{model}}。在下方输入您的消息。",default:"请在上方选择一个供应商以开始"}},Df={continue:{title:"继续您的对话",description:"询问有关代码的问题、请求更改或获取开发任务的帮助"},loading:{olderMessages:"正在加载更早的消息...",sessionMessages:"正在加载会话消息..."},messages:{showingOf:"显示 {{shown}} / {{total}} 条消息",scrollToLoad:"向上滚动以加载更多",showingLast:"显示最近 {{count}} 条消息(共 {{total}} 条)",loadEarlier:"加载更早的消息",loadAll:"加载全部消息",loadingAll:"正在加载全部消息...",allLoaded:"全部消息已加载",perfWarning:"已加载全部消息 - 滚动可能变慢。点击「滚动到底部」恢复性能。"}},Lf={selectProject:{title:"选择项目",description:"选择一个项目以在该目录中打开交互式 Shell"},status:{newSession:"新会话",initializing:"初始化中...",restarting:"重启中..."},actions:{disconnect:"断开连接",disconnectTitle:"断开 Shell 连接",restart:"重启",restartTitle:"重启 Shell(请先断开连接)",connect:"在 Shell 中继续",connectTitle:"连接到 Shell"},loading:"正在加载终端...",connecting:"正在连接到 Shell...",startSession:"启动新的 Claude 会话",resumeSession:"恢复会话:{{displayName}}...",runCommand:"在 {{projectName}} 中运行 {{command}}",startCli:"在 {{projectName}} 中启动 Claude CLI",defaultCommand:"命令"},Nf={startChatWithProvider:"选择一个项目以开始与 {{provider}} 聊天"},Rf={nextTaskPrompt:"开始下一个任务"},Ff={codeBlock:yf,messageTypes:bf,tools:wf,search:Sf,fileOperations:kf,interactive:_f,thinking:Cf,json:Tf,permissions:Ef,todo:Pf,plan:xf,usageLimit:Af,codex:jf,input:Mf,thinkingMode:If,providerSelection:Of,session:Df,shell:Lf,projectSelection:Nf,tasks:Rf},$f={changes:"个更改",previousChange:"上一个更改",nextChange:"下一个更改",hideDiff:"隐藏差异高亮",showDiff:"显示差异高亮",settings:"编辑器设置",collapse:"折叠编辑器",expand:"展开编辑器到全宽"},Uf="正在加载 {{fileName}}...",qf={showingChanges:"显示更改"},Vf={download:"下载文件",save:"保存",saving:"保存中...",saved:"已保存!",exitFullscreen:"退出全屏",fullscreen:"全屏",close:"关闭"},Bf={lines:"行数:",characters:"字符数:",shortcuts:"按 Ctrl+S 保存 • Esc 关闭"},Jf={toolbar:$f,loading:Uf,header:qf,actions:Vf,footer:Bf},Gf={save:"保存",cancel:"キャンセル",delete:"削除",create:"作成",edit:"編集",close:"閉じる",confirm:"確認",submit:"送信",retry:"再試行",refresh:"更新",search:"検索",clear:"クリア",copy:"コピー",download:"ダウンロード",upload:"アップロード",browse:"参照"},Hf={chat:"チャット",shell:"シェル",files:"ファイル",git:"ソース管理",tasks:"タスク"},Wf={loading:"読み込み中...",success:"成功",error:"エラー",failed:"失敗",pending:"保留中",completed:"完了",inProgress:"進行中"},zf={savedSuccessfully:"保存しました",deletedSuccessfully:"削除しました",updatedSuccessfully:"更新しました",operationFailed:"操作に失敗しました",networkError:"ネットワークエラー。接続を確認してください。",unauthorized:"認証されていません。ログインしてください。",notFound:"見つかりません",invalidInput:"入力が無効です",requiredField:"この項目は必須です",unknownError:"不明なエラーが発生しました"},Yf={settings:"設定",home:"ホーム",back:"戻る",next:"次へ",previous:"前へ",logout:"ログアウト"},Kf={language:"言語",theme:"テーマ",darkMode:"ダークモード",lightMode:"ライトモード",name:"名前",description:"説明",enabled:"有効",disabled:"無効",optional:"任意",version:"バージョン",select:"選択",selectAll:"すべて選択",deselectAll:"すべて解除"},Qf={justNow:"たった今",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",daysAgo:"{{count}}日前",yesterday:"昨日"},Xf={newFile:"新規ファイル",newFolder:"新規フォルダ",rename:"名前の変更",move:"移動",copyPath:"パスをコピー",openInEditor:"エディタで開く"},Zf={loading:"UpfynAI を読み込んでいます",settingUpWorkspace:"ワークスペースを準備しています...",chooseProject:"プロジェクトを選択",selectProjectDescription:"サイドバーからプロジェクトを選択して、Claudeとコーディングを始めましょう。各プロジェクトにはチャットセッションとファイル履歴が含まれています。",tip:"ヒント",createProjectMobile:"上部のメニューボタンからプロジェクトにアクセスできます",createProjectDesktop:"サイドバーのフォルダアイコンをクリックして新しいプロジェクトを作成できます",newSession:"新しいセッション",untitledSession:"無題のセッション",projectFiles:"プロジェクトファイル"},eg={loading:"ファイルを読み込んでいます...",files:"ファイル",simpleView:"シンプル表示",compactView:"コンパクト表示",detailedView:"詳細表示",searchPlaceholder:"ファイルやフォルダを検索...",clearSearch:"検索をクリア",name:"名前",size:"サイズ",modified:"更新日時",permissions:"権限",noFilesFound:"ファイルが見つかりません",checkProjectPath:"プロジェクトのパスがアクセス可能か確認してください",noMatchesFound:"一致するものが見つかりません",tryDifferentSearch:"別の検索語を試すか、検索をクリアしてください",justNow:"たった今",minAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",daysAgo:"{{count}}日前"},tg={title:"新規プロジェクトを作成",steps:{type:"種類",configure:"設定",confirm:"確認"},step1:{question:"既存のワークスペースがありますか?それとも新しく作成しますか?",existing:{title:"既存のワークスペース",description:"サーバー上に既存のワークスペースがあり、プロジェクト一覧に追加したい"},new:{title:"新しいワークスペース",description:"新しいワークスペースを作成し、必要に応じてGitHubリポジトリからクローンする"}},step2:{existingPath:"ワークスペースのパス",newPath:"ワークスペースのパス",existingPlaceholder:"/path/to/existing/workspace",newPlaceholder:"/path/to/new/workspace",existingHelp:"既存のワークスペースディレクトリのフルパス",newHelp:"ワークスペースディレクトリのフルパス",githubUrl:"GitHub URL(任意)",githubPlaceholder:"https://github.com/username/repository",githubHelp:"任意: リポジトリをクローンするためのGitHub URLを入力してください",githubAuth:"GitHub認証(任意)",githubAuthHelp:"プライベートリポジトリの場合のみ必要です。パブリックリポジトリは認証なしでクローンできます。",loadingTokens:"保存済みトークンを読み込んでいます...",storedToken:"保存済みトークン",newToken:"新しいトークン",nonePublic:"なし(パブリック)",selectToken:"トークンを選択",selectTokenPlaceholder:"-- トークンを選択 --",tokenPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",tokenHelp:"このトークンはこの操作にのみ使用されます",publicRepoInfo:"パブリックリポジトリには認証は不要です。パブリックリポジトリをクローンする場合、トークンは省略できます。",noTokensHelp:"保存済みトークンがありません。設定 → APIキーでトークンを追加すると再利用が簡単になります。",optionalTokenPublic:"GitHubトークン(パブリックリポジトリの場合は任意)",tokenPublicPlaceholder:"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(パブリックリポジトリの場合は空欄可)"},step3:{reviewConfig:"設定の確認",workspaceType:"ワークスペースの種類:",existingWorkspace:"既存のワークスペース",newWorkspace:"新しいワークスペース",path:"パス:",cloneFrom:"クローン元:",authentication:"認証:",usingStoredToken:"保存済みトークンを使用:",usingProvidedToken:"入力されたトークンを使用",noAuthentication:"認証なし",sshKey:"SSHキー",existingInfo:"ワークスペースがプロジェクト一覧に追加され、Claude/Cursorセッションで使用できるようになります。",newWithClone:"このフォルダからリポジトリがクローンされます。",newEmpty:"ワークスペースがプロジェクト一覧に追加され、Claude/Cursorセッションで使用できるようになります。",cloningRepository:"リポジトリをクローンしています..."},buttons:{cancel:"キャンセル",back:"戻る",next:"次へ",createProject:"プロジェクトを作成",creating:"作成中...",cloning:"クローン中..."},errors:{selectType:"既存のワークスペースか新規作成かを選択してください",providePath:"ワークスペースのパスを入力してください",failedToCreate:"ワークスペースの作成に失敗しました",failedToCreateFolder:"フォルダの作成に失敗しました"}},rg={title:"アップデートのお知らせ",newVersionReady:"新しいバージョンが利用可能です",currentVersion:"現在のバージョン",latestVersion:"最新バージョン",whatsNew:"変更点:",viewFullRelease:"リリース全文を見る",updateProgress:"アップデートの進捗:",manualUpgrade:"手動アップグレード:",manualUpgradeHint:"または「今すぐ更新」をクリックして自動的にアップデートを実行できます。",updateCompleted:"アップデートが完了しました!",restartServer:"変更を適用するにはサーバーを再起動してください。",updateFailed:"アップデートに失敗しました",buttons:{close:"閉じる",later:"後で",copyCommand:"コマンドをコピー",updateNow:"今すぐ更新",updating:"更新中..."},ariaLabels:{closeModal:"バージョンアップグレードモーダルを閉じる",showSidebar:"サイドバーを表示",settings:"設定",updateAvailable:"アップデートあり",closeSidebar:"サイドバーを閉じる"}},ng={buttons:Gf,tabs:Hf,status:Wf,messages:zf,navigation:Yf,common:Kf,time:Qf,fileOperations:Xf,mainContent:Zf,fileTree:eg,projectWizard:tg,versionUpdate:rg},sg="設定",og={account:"アカウント",permissions:"権限",mcpServers:"MCPサーバー",appearance:"外観"},ig={title:"アカウント",language:"言語",languageLabel:"表示言語",languageDescription:"インターフェースの表示言語を選択してください",username:"ユーザー名",email:"メールアドレス",profile:"プロフィール",changePassword:"パスワードを変更"},ag={title:"MCPサーバー",addServer:"サーバーを追加",editServer:"サーバーを編集",deleteServer:"サーバーを削除",serverName:"サーバー名",serverType:"サーバーの種類",config:"設定",testConnection:"接続テスト",status:"状態",connected:"接続済み",disconnected:"未接続",scope:{label:"スコープ",user:"ユーザー",project:"プロジェクト"}},cg={title:"外観",theme:"テーマ",codeEditor:"コードエディタ",editorTheme:"エディタのテーマ",wordWrap:"折り返し",showMinimap:"ミニマップを表示",lineNumbers:"行番号",fontSize:"フォントサイズ"},lg={saveChanges:"変更を保存",resetToDefaults:"デフォルトに戻す",cancelChanges:"変更をキャンセル"},ug={title:"クイック設定",sections:{appearance:"外観",toolDisplay:"ツール表示",viewOptions:"表示オプション",inputSettings:"入力設定",whisperDictation:"Whisper音声入力"},darkMode:"ダークモード",autoExpandTools:"ツールを自動展開",showRawParameters:"生パラメータを表示",showThinking:"思考を表示",autoScrollToBottom:"自動スクロール",sendByCtrlEnter:"Ctrl+Enterで送信",sendByCtrlEnterDescription:"有効にすると、Enterではなく Ctrl+Enter でメッセージを送信します。IMEユーザーの誤送信防止に便利です。",dragHandle:{dragging:"ドラッグ中",closePanel:"設定パネルを閉じる",openPanel:"設定パネルを開く",draggingStatus:"ドラッグ中...",toggleAndMove:"クリックで切替、ドラッグで移動"},whisper:{modes:{default:"標準モード",defaultDescription:"音声をそのまま文字起こしします",prompt:"プロンプト強化",promptDescription:"ラフなアイデアを明確で詳細なAIプロンプトに変換します",vibe:"バイブモード",vibeDescription:"アイデアを明確なエージェント指示に整形します"}}},dg={agents:"エージェント",appearance:"外観",git:"Git",apiTokens:"API & トークン",tasks:"タスク"},pg={darkMode:{label:"ダークモード",description:"ライトテーマとダークテーマを切り替えます"},projectSorting:{label:"プロジェクトの並び順",description:"サイドバーでのプロジェクトの並び順を設定します",alphabetical:"アルファベット順",recentActivity:"最近のアクティビティ順"},codeEditor:{title:"コードエディタ",theme:{label:"エディタのテーマ",description:"コードエディタのデフォルトテーマ"},wordWrap:{label:"折り返し",description:"エディタでデフォルトで折り返しを有効にします"},showMinimap:{label:"ミニマップを表示",description:"差分ビューでナビゲーション用のミニマップを表示します"},lineNumbers:{label:"行番号を表示",description:"エディタに行番号を表示します"},fontSize:{label:"フォントサイズ",description:"エディタのフォントサイズ(ピクセル)"}}},hg={title:{add:"MCPサーバーを追加",edit:"MCPサーバーを編集"},importMode:{form:"フォーム入力",json:"JSONインポート"},scope:{label:"スコープ",userGlobal:"ユーザー(グローバル)",projectLocal:"プロジェクト(ローカル)",userDescription:"ユーザースコープ: すべてのプロジェクトで利用可能",projectDescription:"ローカルスコープ: 選択したプロジェクトでのみ利用可能",cannotChange:"既存のサーバーを編集する場合、スコープは変更できません"},fields:{serverName:"サーバー名",transportType:"トランスポートの種類",command:"コマンド",arguments:"引数(1行に1つ)",jsonConfig:"JSON設定",url:"URL",envVars:"環境変数(KEY=value、1行に1つ)",headers:"ヘッダー(KEY=value、1行に1つ)",selectProject:"プロジェクトを選択..."},placeholders:{serverName:"my-server"},validation:{missingType:"必須フィールドがありません: type",stdioRequiresCommand:"stdioタイプにはcommandフィールドが必要です",httpRequiresUrl:"{{type}}タイプにはurlフィールドが必要です",invalidJson:"無効なJSON形式です",jsonHelp:"MCPサーバー設定をJSON形式で貼り付けてください。例:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"設定の詳細({{configFile}}より)",projectPath:"パス: {{path}}",actions:{cancel:"キャンセル",saving:"保存中...",addServer:"サーバーを追加",updateServer:"サーバーを更新"}},mg={success:"設定を保存しました!",error:"設定の保存に失敗しました",saving:"保存中..."},fg={save:"設定を保存",cancel:"キャンセル"},gg={title:"Git設定",description:"コミット用のGit IDを設定します。この設定は git config --global で適用されます",name:{label:"Git名前",help:"コミットに使用する名前"},email:{label:"Gitメールアドレス",help:"コミットに使用するメールアドレス"},actions:{save:"設定を保存",saving:"保存中..."},status:{success:"保存しました"}},vg={title:"APIキー",description:"外部APIにアクセスするためのAPIキーを生成します。",newKey:{alertTitle:"⚠️ APIキーを保存してください",alertMessage:"このキーが表示されるのは今回限りです。安全な場所に保管してください。",iveSavedIt:"保存しました"},form:{placeholder:"APIキーの名前(例: 本番サーバー)",createButton:"作成",cancelButton:"キャンセル"},newButton:"新しいAPIキー",empty:"APIキーはまだ作成されていません。",list:{created:"作成日:",lastUsed:"最終使用日:"},confirmDelete:"このAPIキーを削除してもよろしいですか?",status:{active:"有効",inactive:"無効"},github:{title:"GitHubトークン",description:"外部APIからプライベートリポジトリをクローンするためのGitHubパーソナルアクセストークンを追加します。",descriptionAlt:"プライベートリポジトリをクローンするためのGitHubパーソナルアクセストークンを追加します。保存せずにAPIリクエストで直接トークンを渡すこともできます。",addButton:"トークンを追加",form:{namePlaceholder:"トークンの名前(例: 個人リポジトリ)",tokenPlaceholder:"GitHubパーソナルアクセストークン(ghp_...)",descriptionPlaceholder:"説明(任意)",addButton:"トークンを追加",cancelButton:"キャンセル",howToCreate:"GitHubパーソナルアクセストークンの作成方法 →"},empty:"GitHubトークンはまだ追加されていません。",added:"追加日:",confirmDelete:"このGitHubトークンを削除してもよろしいですか?"},apiDocsLink:"APIドキュメント",documentation:{title:"外部APIドキュメント",description:"外部APIを使用してアプリケーションからClaude/Cursorセッションを起動する方法を学びます。",viewLink:"APIドキュメントを見る →"},loading:"読み込み中...",version:{updateAvailable:"アップデートあり: v{{version}}"}},yg={checking:"TaskMasterのインストールを確認しています...",notInstalled:{title:"TaskMaster AI CLIがインストールされていません",description:"タスク管理機能を使用するにはTaskMaster CLIが必要です。以下のコマンドでインストールしてください:",installCommand:"npm install -g task-master-ai",viewOnGitHub:"GitHubで見る",afterInstallation:"インストール後:",steps:{restart:"このアプリケーションを再起動してください",autoAvailable:"TaskMaster機能が自動的に利用可能になります",initCommand:"プロジェクトディレクトリで task-master init を実行してください"}},settings:{enableLabel:"TaskMaster統合を有効にする",enableDescription:"インターフェース全体でTaskMasterのタスク、バナー、サイドバーインジケータを表示します"}},bg={authStatus:{checking:"確認中...",connected:"接続済み",notConnected:"未接続",disconnected:"切断",checkingAuth:"認証状態を確認しています...",loggedInAs:"{{email}}でログイン中",authenticatedUser:"認証済みユーザー"},account:{claude:{description:"Anthropic Claude AIアシスタント"},cursor:{description:"Cursor AI搭載コードエディタ"},codex:{description:"OpenAI Codex AIアシスタント"}},connectionStatus:"接続状態",login:{title:"ログイン",reAuthenticate:"再認証",description:"{{agent}}アカウントにサインインしてAI機能を有効にします",reAuthDescription:"別のアカウントでサインインするか、認証情報を更新します",button:"ログイン",reLoginButton:"再ログイン"},error:"エラー: {{error}}"},wg={title:"権限設定",skipPermissions:{label:"権限プロンプトをスキップ(注意して使用)",claudeDescription:"--dangerously-skip-permissions フラグに相当",cursorDescription:"Cursor CLIの -f フラグに相当"},allowedTools:{title:"許可されたツール",description:"権限の確認なしに自動的に許可されるツール",placeholder:'例: "Bash(git log:*)" または "Write"',quickAdd:"よく使うツールを追加:",empty:"許可されたツールはありません"},blockedTools:{title:"ブロックされたツール",description:"権限の確認なしに自動的にブロックされるツール",placeholder:'例: "Bash(rm:*)"',empty:"ブロックされたツールはありません"},allowedCommands:{title:"許可されたシェルコマンド",description:"権限の確認なしに自動的に許可されるシェルコマンド",placeholder:'例: "Shell(ls)" または "Shell(git status)"',quickAdd:"よく使うコマンドを追加:",empty:"許可されたコマンドはありません"},blockedCommands:{title:"ブロックされたシェルコマンド",description:"自動的にブロックされるシェルコマンド",placeholder:'例: "Shell(rm -rf)" または "Shell(sudo)"',empty:"ブロックされたコマンドはありません"},toolExamples:{title:"ツールパターンの例:",bashGitLog:"- すべてのgit logコマンドを許可",bashGitDiff:"- すべてのgit diffコマンドを許可",write:"- すべてのWriteツールの使用を許可",bashRm:"- すべてのrmコマンドをブロック(危険)"},shellExamples:{title:"シェルコマンドの例:",ls:"- lsコマンドを許可",gitStatus:"- git statusを許可",npmInstall:"- npm installを許可",rmRf:"- 再帰的削除をブロック"},codex:{permissionMode:"権限モード",description:"Codexがファイルの変更やコマンドの実行を処理する方法を制御します",modes:{default:{title:"デフォルト",description:"信頼されたコマンド(ls、cat、grep、git statusなど)のみ自動実行。その他のコマンドはスキップ。ワークスペースへの書き込みは可能。"},acceptEdits:{title:"編集を許可",description:"ワークスペース内ですべてのコマンドを自動実行。サンドボックス環境での完全自動モード。"},bypassPermissions:{title:"権限をバイパス",description:"制限なしの完全なシステムアクセス。すべてのコマンドがディスクとネットワークへの完全なアクセスで自動実行されます。注意して使用してください。"}},technicalDetails:"技術的な詳細",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=untrusted。信頼されたコマンド: cat, cd, grep, head, ls, pwd, tail, git status/log/diff/show, find(-execなし)など。",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never。すべてのコマンドがプロジェクトディレクトリ内で自動実行。",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never。完全なシステムアクセス。信頼された環境でのみ使用してください。",overrideNote:"チャットインターフェースのモードボタンを使用してセッションごとに上書きできます。"}},actions:{add:"追加"}},Sg={title:"MCPサーバー",description:{claude:"Model Context Protocolサーバーは、Claudeに追加のツールやデータソースを提供します",cursor:"Model Context Protocolサーバーは、Cursorに追加のツールやデータソースを提供します",codex:"Model Context Protocolサーバーは、Codexに追加のツールやデータソースを提供します"},addButton:"MCPサーバーを追加",empty:"MCPサーバーは設定されていません",serverType:"種類",scope:{local:"ローカル",user:"ユーザー"},config:{command:"コマンド",url:"URL",args:"引数",environment:"環境変数"},tools:{title:"ツール",count:"({{count}}):",more:"他{{count}}件"},actions:{edit:"サーバーを編集",delete:"サーバーを削除"},help:{title:"Codex MCPについて",description:"Codexはstdioベースのツールサーバーをサポートしています。追加のツールやリソースでCodexの機能を拡張するサーバーを追加できます。"}},kg={title:sg,tabs:og,account:ig,mcp:ag,appearance:cg,actions:lg,quickSettings:ug,mainTabs:dg,appearanceSettings:pg,mcpForm:hg,saveStatus:mg,footerActions:fg,git:gg,apiKeys:vg,tasks:yg,agents:bg,permissions:wg,mcpServers:Sg},_g={title:"おかえりなさい",description:"UpfynAIアカウントにサインイン",username:"ユーザー名",password:"パスワード",submit:"サインイン",loading:"サインイン中...",errors:{invalidCredentials:"ユーザー名またはパスワードが正しくありません",requiredFields:"すべての項目を入力してください",networkError:"ネットワークエラー。もう一度お試しください。"},placeholders:{username:"ユーザー名を入力",password:"パスワードを入力"}},Cg={title:"アカウント作成",username:"ユーザー名",password:"パスワード",confirmPassword:"パスワードの確認",submit:"アカウントを作成",loading:"アカウントを作成中...",errors:{passwordMismatch:"パスワードが一致しません",usernameTaken:"このユーザー名は既に使用されています",weakPassword:"パスワードが弱すぎます"}},Tg={title:"サインアウト",confirm:"サインアウトしてもよろしいですか?",button:"サインアウト"},Eg={login:_g,register:Cg,logout:Tg},Pg={title:"プロジェクト",newProject:"新規プロジェクト",deleteProject:"プロジェクトを削除",renameProject:"プロジェクト名を変更",noProjects:"プロジェクトが見つかりません",loadingProjects:"プロジェクトを読み込んでいます...",searchPlaceholder:"プロジェクトを検索...",projectNamePlaceholder:"プロジェクト名",starred:"お気に入り",all:"すべて",untitledSession:"無題のセッション",newSession:"新しいセッション",codexSession:"Codexセッション",fetchingProjects:"Claudeのプロジェクトとセッションを取得しています",projects:"プロジェクト",noMatchingProjects:"一致するプロジェクトがありません",tryDifferentSearch:"検索語を変えてお試しください",runClaudeCli:"プロジェクトディレクトリでClaude CLIを実行して始めましょう"},xg={title:"UpfynAI",subtitle:"AIコーディングアシスタント"},Ag={title:"セッション",newSession:"新しいセッション",deleteSession:"セッションを削除",renameSession:"セッション名を変更",noSessions:"セッションはまだありません",loadingSessions:"セッションを読み込んでいます...",unnamed:"名称未設定",loading:"読み込み中...",showMore:"さらにセッションを表示"},jg={viewEnvironments:"環境を表示",hideSidebar:"サイドバーを隠す",createProject:"新しいプロジェクトを作成",refresh:"プロジェクトとセッションを更新 (Ctrl+R)",renameProject:"プロジェクト名を変更 (F2)",deleteProject:"空のプロジェクトを削除 (Delete)",addToFavorites:"お気に入りに追加",removeFromFavorites:"お気に入りから削除",editSessionName:"セッション名を手動で編集",deleteSession:"このセッションを完全に削除",save:"保存",cancel:"キャンセル"},Mg={chat:"チャット",files:"ファイル",git:"Git",terminal:"ターミナル",tasks:"タスク"},Ig={refresh:"更新",settings:"設定",collapseAll:"すべて折りたたむ",expandAll:"すべて展開",cancel:"キャンセル",save:"保存",delete:"削除",rename:"名前の変更"},Og={active:"アクティブ",inactive:"非アクティブ",thinking:"思考中...",error:"エラー",aborted:"中断",unknown:"不明"},Dg={justNow:"たった今",oneMinuteAgo:"1分前",minutesAgo:"{{count}}分前",oneHourAgo:"1時間前",hoursAgo:"{{count}}時間前",oneDayAgo:"1日前",daysAgo:"{{count}}日前"},Lg={deleteConfirm:"本当に削除しますか?",renameSuccess:"名前を変更しました",deleteSuccess:"削除しました",errorOccurred:"エラーが発生しました",deleteSessionConfirm:"このセッションを削除してもよろしいですか?この操作は取り消せません。",deleteProjectConfirm:"この空のプロジェクトを削除してもよろしいですか?この操作は取り消せません。",enterProjectPath:"プロジェクトのパスを入力してください",deleteSessionFailed:"セッションの削除に失敗しました。もう一度お試しください。",deleteSessionError:"セッションの削除でエラーが発生しました。もう一度お試しください。",deleteProjectFailed:"プロジェクトの削除に失敗しました。もう一度お試しください。",deleteProjectError:"プロジェクトの削除でエラーが発生しました。もう一度お試しください。",createProjectFailed:"プロジェクトの作成に失敗しました。もう一度お試しください。",createProjectError:"プロジェクトの作成でエラーが発生しました。もう一度お試しください。"},Ng={updateAvailable:"アップデートあり"},Rg={deleteProject:"プロジェクトを削除",deleteSession:"セッションを削除",confirmDelete:"本当に削除しますか?",sessionCount:"このプロジェクトには{{count}}件の会話があります。",allConversationsDeleted:"すべての会話が完全に削除されます。",cannotUndo:"この操作は取り消せません。"},Fg={projects:Pg,app:xg,sessions:Ag,tooltips:jg,navigation:Mg,actions:Ig,status:Og,time:Dg,messages:Lg,version:Ng,deleteConfirmation:Rg},$g={copy:"コピー",copied:"コピーしました",copyCode:"コードをコピー"},Ug={user:"U",error:"エラー",tool:"ツール",claude:"Claude",cursor:"Cursor",codex:"Codex"},qg={settings:"ツール設定",error:"ツールエラー",result:"ツール結果",viewParams:"入力パラメータを表示",viewRawParams:"生パラメータを表示",viewDiff:"編集差分を表示:",creatingFile:"新規ファイルを作成:",updatingTodo:"Todoリストを更新中",read:"読み取り",readFile:"ファイルを読み取り",updateTodo:"Todoリストを更新",readTodo:"Todoリストを読み取り",searchResults:"件の結果"},Vg={found:"{{count}}件の{{type}}が見つかりました",file:"ファイル",files:"ファイル",pattern:"パターン:",in:"場所:"},Bg={updated:"ファイルを更新しました",created:"ファイルを作成しました",written:"ファイルを書き込みました",diff:"差分",newFile:"新規ファイル",viewContent:"ファイルの内容を表示",viewFullOutput:"全出力を表示({{count}}文字)",contentDisplayed:"ファイルの内容は上の差分ビューに表示されています"},Jg={title:"インタラクティブプロンプト",waiting:"CLIでの応答を待っています",instruction:"Claudeが実行されているターミナルでオプションを選択してください。",selectedOption:"✓ Claudeがオプション{{number}}を選択しました",instructionDetail:"CLIでは、矢印キーまたは番号を入力してオプションを選択します。"},Gg={title:"思考中...",emoji:"💭 思考中..."},Hg={response:"JSONレスポンス"},Wg={grant:"{{tool}}に権限を付与",added:"権限を追加しました",addTo:"{{entry}}を許可されたツールに追加します。",retry:"権限を保存しました。ツールを使用するにはリクエストを再試行してください。",error:"権限を更新できませんでした。もう一度お試しください。",openSettings:"設定を開く"},zg={updated:"Todoリストを更新しました",current:"現在のTodoリスト"},Yg={viewPlan:"📋 実装プランを表示",title:"実装プラン"},Kg={resetAt:"Claudeの使用制限に達しました。制限は**{{time}} {{timezone}}** - {{date}}にリセットされます"},Qg={permissionMode:"権限モード",modes:{default:"デフォルトモード",acceptEdits:"編集を許可",bypassPermissions:"権限をバイパス",plan:"プランモード"},descriptions:{default:"信頼されたコマンド(ls、cat、grep、git statusなど)のみ自動実行。その他のコマンドはスキップ。ワークスペースへの書き込みは可能。",acceptEdits:"ワークスペース内ですべてのコマンドを自動実行。サンドボックス環境での完全自動モード。",bypassPermissions:"制限なしの完全なシステムアクセス。すべてのコマンドがディスクとネットワークへの完全なアクセスで自動実行されます。注意して使用してください。",plan:"プランニングモード - コマンドは実行されません"},technicalDetails:"技術的な詳細"},Xg={placeholder:"/ でコマンド、@ でファイル指定、または {{provider}} に何でも聞いてください...",placeholderDefault:"メッセージを入力...",disabled:"入力無効",attachFiles:"ファイルを添付",attachImages:"画像を添付",send:"送信",stop:"停止",hintText:{ctrlEnter:"Ctrl+Enterで送信 • Shift+Enterで改行 • Tabでモード切替 • / でスラッシュコマンド",enter:"Enterで送信 • Shift+Enterで改行 • Tabでモード切替 • / でスラッシュコマンド"},clickToChangeMode:"クリックで権限モードを変更(または入力欄でTab)",showAllCommands:"すべてのコマンドを表示"},Zg={selector:{title:"思考モード",description:"拡張思考によりClaudeがより多くの選択肢を検討できます",active:"有効",tip:"高い思考モードは時間がかかりますが、より深い分析が得られます"},modes:{none:{name:"標準",description:"通常のClaudeの応答",prefix:""},think:{name:"Think",description:"基本的な拡張思考",prefix:"think"},thinkHard:{name:"Think Hard",description:"より深い検討",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"代替案を含む深い分析",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"最大限の思考予算",prefix:"ultrathink"}},buttonTitle:"思考モード: {{mode}}"},ev={title:"AIアシスタントを選択",description:"新しい会話を始めるプロバイダーを選択してください",selectModel:"モデルを選択",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",cursorEditor:"AIコードエディタ"},readyPrompt:{claude:"{{model}}でClaudeを使用する準備ができました。下にメッセージを入力してください。",cursor:"{{model}}でCursorを使用する準備ができました。下にメッセージを入力してください。",codex:"{{model}}でCodexを使用する準備ができました。下にメッセージを入力してください。",default:"上からプロバイダーを選択して開始してください"}},tv={continue:{title:"会話を続ける",description:"コードについて質問したり、変更をリクエストしたり、開発タスクのサポートを受けられます"},loading:{olderMessages:"過去のメッセージを読み込んでいます...",sessionMessages:"セッションメッセージを読み込んでいます..."},messages:{showingOf:"{{total}}件中{{shown}}件を表示",scrollToLoad:"上にスクロールしてさらに読み込む",showingLast:"最新{{count}}件を表示(全{{total}}件)",loadEarlier:"過去のメッセージを読み込む"}},rv={selectProject:{title:"プロジェクトを選択",description:"プロジェクトを選択してそのディレクトリでシェルを開きます"},status:{newSession:"新しいセッション",initializing:"初期化中...",restarting:"再起動中..."},actions:{disconnect:"切断",disconnectTitle:"シェルから切断",restart:"再起動",restartTitle:"シェルを再起動(先に切断してください)",connect:"シェルで続行",connectTitle:"シェルに接続"},loading:"ターミナルを読み込んでいます...",connecting:"シェルに接続しています...",startSession:"新しいClaudeセッションを開始",resumeSession:"セッションを再開: {{displayName}}...",runCommand:"{{projectName}}で{{command}}を実行",startCli:"{{projectName}}でClaude CLIを起動しています",defaultCommand:"コマンド"},nv={codeBlock:$g,messageTypes:Ug,tools:qg,search:Vg,fileOperations:Bg,interactive:Jg,thinking:Gg,json:Hg,permissions:Wg,todo:zg,plan:Yg,usageLimit:Kg,codex:Qg,input:Xg,thinkingMode:Zg,providerSelection:ev,session:tv,shell:rv},sv={changes:"件の変更",previousChange:"前の変更",nextChange:"次の変更",hideDiff:"差分ハイライトを非表示",showDiff:"差分ハイライトを表示",settings:"エディタ設定",collapse:"エディタを折りたたむ",expand:"エディタを全幅に展開"},ov="{{fileName}}を読み込んでいます...",iv={showingChanges:"変更を表示中"},av={download:"ファイルをダウンロード",save:"保存",saving:"保存中...",saved:"保存しました!",exitFullscreen:"全画面を終了",fullscreen:"全画面",close:"閉じる"},cv={lines:"行数:",characters:"文字数:",shortcuts:"Ctrl+Sで保存 • Escで閉じる"},lv={toolbar:sv,loading:ov,header:iv,actions:av,footer:cv},uv={title:"TaskMaster AIが設定されていません",description:"TaskMasterは、AIを活用した支援により、複雑なプロジェクトを管理しやすいタスクに分解するのに役立ちます",whatIsTitle:"🎯 TaskMasterとは?",features:{aiPowered:"AIを活用したタスク管理:複雑なプロジェクトを管理しやすいサブタスクに分解",prdTemplates:"PRDテンプレート:Product Requirements Documentからタスクを生成",dependencyTracking:"依存関係の追跡:タスクの関係性と実行順序を理解",progressVisualization:"進捗の可視化:カンバンボードと詳細なタスク分析",cliIntegration:"CLI統合:高度なワークフローのためにtaskmasterコマンドを使用"},initializeButton:"TaskMaster AIを初期化"},dv={title:"TaskMasterを始める",subtitle:"TaskMasterが初期化されました!次にすることは:",steps:{createPRD:{title:"Product Requirements Document (PRD) を作成",description:"プロジェクトのアイデアについて話し合い、構築したい内容を説明するPRDを作成します。",addButton:"PRDを追加",existingPRDs:"既存のPRD:"},generateTasks:{title:"PRDからタスクを生成",description:"PRDができたら、AIアシスタントに解析を依頼してください。TaskMasterが自動的に実装の詳細を含む管理しやすいタスクに分解します。"},analyzeTasks:{title:"タスクの分析と展開",description:"AIアシスタントにタスクの複雑さを分析してもらい、より簡単に実装できる詳細なサブタスクに展開します。"},startBuilding:{title:"開発を始める",description:"AIアシスタントにタスクの作業を開始してもらい、ステータスを更新し、プロジェクトの進行に応じて新しいタスクを追加します。"}},tip:"💡 ヒント:TaskMasterのAIを活用したタスク生成を最大限に活用するには、PRDから始めましょう"},pv={title:"TaskMasterのセットアップ",subtitle:"{{projectName}}のインタラクティブCLI",willStart:"TaskMasterの初期化が自動的に開始されます",completed:"TaskMasterのセットアップが完了しました!このウィンドウを閉じることができます。",closeButton:"閉じる",closeContinueButton:"閉じて続ける"},hv={title:"TaskMasterを始める",subtitle:"生産的なタスク管理のガイド",examples:{parsePRD:`💬 例:
|
|
66
66
|
「Claude Task Masterで新しいプロジェクトを初期化しました。.taskmaster/docs/prd.txtにPRDがあります。解析して初期タスクを設定するのを手伝ってもらえますか?」`,expandTask:`💬 例:
|
|
67
67
|
「タスク5は複雑そうです。サブタスクに分解してもらえますか?」`,addTask:`💬 例:
|
|
68
|
-
「Cloudinaryを使用してユーザープロフィール画像のアップロードを実装する新しいタスクを追加してください。最適なアプローチを調査してください。」`},moreExamples:"さらなる例と使用パターンを見る →",proTips:{title:"💡 プロのヒント",search:"検索バーを使用して特定のタスクをすばやく見つける",views:"ビュー切替を使用してカンバン、リスト、グリッドビューを切り替える",filters:"フィルターを使用して特定のタスクステータスや優先度に焦点を当てる",details:"任意のタスクをクリックして詳細情報を表示し、サブタスクを管理する"},learnMore:{title:"📚 詳細を見る",description:"TaskMaster AIは開発者向けに構築された高度なタスク管理システムです。ドキュメント、例を入手し、プロジェクトに貢献できます。",githubButton:"GitHubで見る"}},
|
|
68
|
+
「Cloudinaryを使用してユーザープロフィール画像のアップロードを実装する新しいタスクを追加してください。最適なアプローチを調査してください。」`},moreExamples:"さらなる例と使用パターンを見る →",proTips:{title:"💡 プロのヒント",search:"検索バーを使用して特定のタスクをすばやく見つける",views:"ビュー切替を使用してカンバン、リスト、グリッドビューを切り替える",filters:"フィルターを使用して特定のタスクステータスや優先度に焦点を当てる",details:"任意のタスクをクリックして詳細情報を表示し、サブタスクを管理する"},learnMore:{title:"📚 詳細を見る",description:"TaskMaster AIは開発者向けに構築された高度なタスク管理システムです。ドキュメント、例を入手し、プロジェクトに貢献できます。",githubButton:"GitHubで見る"}},mv={placeholder:"タスクを検索..."},fv={button:"フィルター",status:"ステータス",priority:"優先度",sortBy:"並び替え",allStatuses:"すべてのステータス",allPriorities:"すべての優先度",showing:"{{filtered}}件のタスクを表示中(全{{total}}件)",clearFilters:"フィルターをクリア"},gv={id:"ID",status:"ステータス",priority:"優先度",idAsc:"ID(昇順)",idDesc:"ID(降順)",titleAsc:"タイトル(A-Z)",titleDesc:"タイトル(Z-A)",statusAsc:"ステータス(保留中が先)",statusDesc:"ステータス(完了が先)",priorityAsc:"優先度(高が先)",priorityDesc:"優先度(低が先)"},vv={kanban:"カンバンビュー",list:"リストビュー",grid:"グリッドビュー"},yv={pending:"📋 やること",inProgress:"🚀 進行中",done:"✅ 完了",blocked:"🚫 ブロック中",deferred:"⏳ 延期",cancelled:"❌ キャンセル",noTasksYet:"まだタスクはありません",tasksWillAppear:"タスクはここに表示されます",moveTasksHere:"開始したらタスクをここに移動",completedTasksHere:"完了したタスクはここに表示されます",statusTasksHere:"このステータスのタスクはここに表示されます"},bv={help:"TaskMaster入門ガイド",prds:"PRD",addPRD:"PRDを追加",addTask:"タスクを追加",createNewPRD:"新しいPRDを作成",prdsAvailable:"{{count}}件のPRDがあります"},wv={modified:"更新日: {{date}}"},Sv={pending:"保留中","in-progress":"進行中",done:"完了",blocked:"ブロック中",deferred:"延期",cancelled:"キャンセル"},kv={high:"高",medium:"中",low:"低"},_v={title:"フィルターに一致するタスクがありません",description:"検索条件またはフィルター基準を調整してみてください。"},Cv={notConfigured:uv,gettingStarted:dv,setupModal:pv,helpGuide:hv,search:mv,filters:fv,sort:gv,views:vv,kanban:yv,buttons:bv,prd:wv,statuses:Sv,priorities:kv,noMatchingTasks:_v},Tv=[{value:"en",label:"English",nativeName:"English"},{value:"ko",label:"Korean",nativeName:"한국어"},{value:"zh-CN",label:"Simplified Chinese",nativeName:"简体中文"},{value:"ja",label:"Japanese",nativeName:"日本語"}],Ev=()=>{try{const t=localStorage.getItem("userLanguage");return t&&Tv.some(e=>e.value===t)?t:"en"}catch{return"en"}};On.use(uc).use(vc).init({resources:{en:{common:Id,settings:Qd,auth:tp,sidebar:hp,chat:Dp,codeEditor:Up,tasks:th},ko:{common:mh,settings:Oh,auth:Rh,sidebar:Yh,chat:gm,codeEditor:km},"zh-CN":{common:Lm,settings:ef,auth:sf,sidebar:vf,chat:Ff,codeEditor:Jf},ja:{common:ng,settings:kg,auth:Eg,sidebar:Fg,chat:nv,codeEditor:lv,tasks:Cv}},lng:Ev(),fallbackLng:"en",debug:!1,ns:["common","settings","auth","sidebar","chat","codeEditor","tasks"],defaultNS:"common",keySeparator:".",nsSeparator:":",saveMissing:!1,interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged",bindI18nStore:!1},detection:{order:["localStorage"],lookupLocalStorage:"userLanguage",caches:["localStorage"]}});On.on("languageChanged",t=>{try{localStorage.setItem("userLanguage",t)}catch(e){console.error("Failed to save language preference:",e)}});const Pv=j.lazy(()=>Cr(()=>import("./CanvasFullScreen-D1GWQsGL.js"),__vite__mapDeps([13,1,14,2,3,10,11,12,4,5]))),Ho=j.lazy(()=>Cr(()=>import("./AppContent-CwrTP6TW.js").then(t=>t.A),__vite__mapDeps([15,1,4,7,8,9,10,11,2,3,12,16]))),xv=()=>T.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:T.jsxs("div",{className:"text-center space-y-4",children:[T.jsx("img",{src:"/favicon.svg",alt:"",className:"w-12 h-12 mx-auto rounded-xl animate-pulse"}),T.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[T.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-bounce"}),T.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-bounce",style:{animationDelay:"0.15s"}}),T.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-bounce",style:{animationDelay:"0.3s"}})]})]})});function Av({children:t}){const{latestMessage:e}=ri();return T.jsx(Rc,{latestMessage:e,children:t})}function jv(){return T.jsx(bc,{i18n:On,children:T.jsx(wc,{children:T.jsx(_c,{children:T.jsx(kc,{children:T.jsx(Dc,{children:T.jsx(Av,{children:T.jsx(Nc,{children:T.jsx(Lc,{children:T.jsx(qc,{children:T.jsxs(tc,{basename:Sc,children:[T.jsx(j.Suspense,{fallback:T.jsx(xv,{}),children:T.jsxs(rc,{children:[T.jsx(Dr,{path:"/",element:T.jsx(Ho,{})}),T.jsx(Dr,{path:"/session/:sessionId",element:T.jsx(Ho,{})}),T.jsx(Dr,{path:"/canvas/:projectName",element:T.jsx(Pv,{})})]})}),T.jsx(bd,{})]})})})})})})})})})})}class Mv extends vt.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("App crashed:",e,r)}render(){return this.state.hasError?vt.createElement("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"16px",background:"#0a0f1e",color:"#e2e8f0",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',padding:"24px",textAlign:"center"}},vt.createElement("h1",{style:{fontSize:"1.5rem",fontWeight:700}},"UpfynAI"),vt.createElement("p",{style:{color:"#94a3b8"}},"Something went wrong. Please refresh the page."),vt.createElement("button",{onClick:()=>window.location.reload(),style:{padding:"10px 24px",borderRadius:"8px",border:"none",background:"#3b82f6",color:"#fff",cursor:"pointer",fontSize:"14px"}},"Refresh")):this.props.children}}window.__REACT_MOUNTED=!0;if(window.parent!==window)try{window.parent.postMessage({type:"app-loaded"},"*")}catch{}nc.createRoot(document.getElementById("root")).render(T.jsx(vt.StrictMode,{children:T.jsx(Mv,{children:T.jsx(jv,{})})}));export{Tr as I,Uv as R,Yn as W,Bv as a,Ce as b,Hv as c,U as d,Gv as e,qv as f,Jv as g,Vv as h,Bt as i,yc as j,Fv as k,Tv as l,$v as m,ri as u};
|